Bug 175888 - groupadd in rpm scriptlet failed when using yum.
Summary: groupadd in rpm scriptlet failed when using yum.
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 5
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-15 23:14 UTC by Tim Taiwanese Liim
Modified: 2014-01-21 22:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-26 17:43:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Taiwanese Liim 2005-12-15 23:14:05 UTC
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 17:25:55 UTC
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 17:43:34 UTC
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.