Bug 175888 - groupadd in rpm scriptlet failed when using yum.
groupadd in rpm scriptlet failed when using yum.
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-15 18:14 EST by Tim Taiwanese Liim
Modified: 2014-01-21 17:53 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-26 12:43:34 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 Tim Taiwanese Liim 2005-12-15 18:14:05 EST
Description of problem:
  Try
      yum install screen.i386
  and it failed during groupadd
      groupadd: cannot rewrite group file
      error: %pre(screen-4.0.2-10.i386) scriptlet failed, exit status 10
      error:   install: %pre scriptlet failed (2), skipping screen-4.0.2-10
  The same package installed by rpm went ok:
      [root@yam packages]# time rpm -i screen-4.0.2-10.i386.rpm
      warning: screen-4.0.2-10.i386.rpm: Header V3 DSA signature: NOKEY, key ID
30c9ecf8
  Trying groupadd from command line went ok:
      [root@yam ~]# /usr/sbin/groupadd -g 84 -r -f screen
      [root@yam packages]# id
      uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),
      4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t:s0-s0:c0.c255
  Feels like yum uses a different id or context when
  running scriptlet, which caused groupadd to fail.


Version-Release number of selected component (if applicable):
  fc5test1, installed from CD iso image.

How reproducible:
  always

Steps to Reproduce:
  1. install fc5test1 from CD.
  2. run "yum install screen.i386"

Actual results:
    see the error:
      groupadd: cannot rewrite group file
      error: %pre(screen-4.0.2-10.i386) scriptlet failed, exit status 10
      error:   install: %pre scriptlet failed (2), skipping screen-4.0.2-10
    and package not installed.

Expected results:
    package installed successfully.


Additional info:
  rpm handled the package ok, but yum does not:
     as root run rpm:
          time rpm -i screen-4.0.2-10.i386.rpm
     and installation ok.
Comment 1 Tim Taiwanese Liim 2005-12-26 12:25:55 EST
A bit more info on "rpm -i":
  - rpm-4.4.2-7 produces the same error:
      groupadd: cannot rewrite group file
      error: %pre(screen-4.0.2-10.i386) scriptlet failed, exit status 10
      error:   install: %pre scriptlet failed (2), skipping screen-4.0.2-10
  - rpm-4.4.2-11 installed screen-4.0.2-10.i386 ok
It seems that between rpm...-7 and -11 some permission (selinux context?) issue
was fixed.  Maybe yum can do the same too.
Comment 2 Tim Taiwanese Liim 2005-12-26 12:43:34 EST
Tried yum just now.  It's fixed as of 12/26/2005, after "yum update" 
from raw-hide.  I think you are right, it was NOT a problem of yum
to begin with.  I'll close this ticket.

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