Bug 186441

Summary: bind will not update
Product: [Fedora] Fedora Reporter: euphgeek <wbaker+rhn>
Component: bindAssignee: Jason Vas Dias <jvdias>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-23 17:12:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description euphgeek 2006-03-23 16:39:33 UTC
Description of problem:
# rpm -q bind
bind-9.3.2-4.1

# yum update bind
Updating:
 bind           i386      30:9.3.2-12.FC5   updates-released  929 k
Installing for dependencies:
 shadow-utils   i386      2:4.0.14-5.FC5    updates-released  937 k
[...]
Transaction Test Succeeded
Running Transaction
  Installing: shadow-utils                                          
[1/3]warning: /etc/default/useradd saved as /etc/default/useradd.rpmorig
  Installing: shadow-utils                                          
[1/3]warning: /etc/login.defs saved as /etc/login.defs.rpmorig
  Installing: shadow-utils                 #                        
[1/3]file_contexts:  invalid context system_u:object_r:groupadd_exec_t
  Installing: shadow-utils                 ######################### [1/3]
error: unpacking of archive failed on file /usr/bin/gpasswd: cpio: lsetfilecon
  Updating  : bind                                                  
[2/3]file_contexts:  invalid context system_u:object_r:dbusd_etc_t
  Updating  : bind                         ######################### [2/3]
error: unpacking of archive failed on file /etc/dbus-1/system.d/named.conf:
cpio: lsetfilecon

Dependency Installed: shadow-utils.i386 2:4.0.14-5.FC5
Updated: bind.i386 30:9.3.2-12.FC5

# rpm -q bind shadow-utils
bind-9.3.2-4.1
package shadow-utils is not installed

Version-Release number of selected component (if applicable):
bind-9.3.2-4.1

How reproducible:
Always

Steps to Reproduce:
1. Try to update bind on FC5
  
Actual results:
bind will not update

Expected results:
bind should update to 9.3.2-12.FC5 and shadow-utils should be installed

Additional info:
# rpm -Uvh bind-9.3.2-12.FC5.i386.rpm shadow-utils-4.0.14-5.FC5.i386.rpm
Preparing...                ########################################### [100%]
   1:shadow-utils           warning: /etc/default/useradd saved as
/etc/default/useradd.rpmorig
warning: /etc/login.defs saved as /etc/login.defs.rpmorig
file_contexts:  invalid context system_u:object_r:groupadd_exec_t
########################################### [ 50%]
error: unpacking of archive failed on file /usr/bin/gpasswd: cpio: lsetfilecon
failed - Invalid argument
   2:bind                   file_contexts:  invalid context
system_u:object_r:dbusd_etc_t
########################################### [100%]
error: unpacking of archive failed on file /etc/dbus-1/system.d/named.conf:
cpio: lsetfilecon failed - Invalid argument

Comment 1 Jason Vas Dias 2006-03-23 17:12:41 UTC
It looks like your SELinux attributes are hosed:

  Installing: shadow-utils                 ######################### [1/3]
error: unpacking of archive failed on file /usr/bin/gpasswd: cpio: lsetfilecon
  Updating  : bind                                                  
[2/3]file_contexts:  invalid context system_u:object_r:dbusd_etc_t
  Updating  : bind                         ######################### [2/3]
error: unpacking of archive failed on file /etc/dbus-1/system.d/named.conf:
cpio: lsetfilecon

Nothing in the bind.spec file does any chcon / lsetfilecon of the /etc/dbus-1*
files - this is done internally by RPM (cpio) and it is failing because your
SELinux system is not installed correctly, or you ran with the kernel
boot argument 'selinux=0' .

Try doing this -

Download these rpms from 
download.fedora.redhat.com:/pub/fedora/linux/core/5/i386/os/Fedora/RPMS, and
do :
# rpm -Uvh --force \
libselinux-1.29.7-1.2.i386.rpm \
libselinux-devel-1.29.7-1.2.i386.rpm \
libsemanage-1.5.28-1.i386.rpm \
libsemanage-devel-1.5.28-1.i386.rpm \
libsepol-1.11.18-2.i386.rpm \
libsepol-devel-1.11.18-2.i386.rpm \
libsetrans-0.1.18-1.2.i386.rpm \
selinux-policy-2.2.23-15.noarch.rpm \
selinux-policy-targeted-2.2.23-15.noarch.rpm \
setools-2.3-1.2.i386.rpm \
setools-devel-2.3-1.2.i386.rpm \
policycoreutils-1.29.26-6.i386.rpm;

Then touch /.autorelabel and reboot the machine - NEVER specify 
a kernel boot argument of 'selinux=0' (ie. disabling SELinux support
in the kernel - then these type of problems will continue re-occurring).
If you do not want to enable SELinux security protection, run SELinux in 
permissive mode, with the kernel boot argument 'enforcing=0'.

Once the relabel is complete, do a yum update . You may need to manually
'rpm -Uvh --force' ALL the packages for which previous yum updates got the
error 'lsetfilecon failed' - eg. shadowutils and bind - it may be easier
to clean install the system.