Bug 24932 - small inconsistency in pre-install script
small inconsistency in pre-install script
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: dev (Show other bugs)
7.0
i386 Linux
low Severity low
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-25 09:58 EST by Need Real Name
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-25 09:58:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-01-25 09:58:22 EST
The "dev" package's preinstall script does the following:

/usr/sbin/groupadd -g 19 -r -f floppy > /dev/null 2>/dev/null ||:

This groupadd is necessary because files like /dev/fd0 will be installed
under this group. However, this script, as written cannot run if "dev" was
never previously installed, because /dev/null doesn't exist yet! It's the
classic chicken-and-egg problem :)

This problem is never visible during normal installations, perhaps because
of
the way the standard Redhat installer works (maybe it creates a simple /dev
when
starting - I don't know). But it did present itself whenI tried to create a
"custom"
distribution by opening up a list of rpms myself using something like
        rpm -root $DIR file.rpm ....

Possible solutions are to remove the redirection (perhaps a "-q", quit flag
should be added to the groupadd program?), to do an mknod of /dev/null
in the preinstall script (this is probably ugly), or to move /dev/null to
another
package (e.g., "setup").
Comment 1 Nalin Dahyabhai 2001-01-25 15:46:24 EST
I'll add this workaround to dev-3.1.0-3 (source tarball already out in
http://people.redhat.com/nalin/MAKEDEV/):

If /dev doesn't exist, create it.  Redirection to /dev/null will work, and the
temporaray file which is created will be nuked when the package's payload is
extracted.

I'm going to hold off on committing this to our tree until I can test it
(removing /dev is non-trivial), so it may take a while for the package to show
up in Raw Hide, but it will eventually.

Note You need to log in before you can comment on or make changes to this bug.