setup-2.8.5-1 is not installed to fresh chroot

Bug #1192167 reported by Elan Ruusamäe on 2013-06-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PLD Linux
Undecided
Unassigned

Bug Description

# rm -rf /tmp/rd; install -d /tmp/rd; rpm -r /tmp/rd --initdb; poldek -r /tmp/rd/ -u setup --noask
Processing dependencies...
setup-2.8.5-1.x86_64 marks FHS-2.3-35.x86_64 (cap /etc)
setup-2.8.5-1.x86_64 marks glibc-2.17-6.x86_64 (cap libc.so.6()(64bit))
 glibc-2.17-6.x86_64 marks mksh-44-1.x86_64 (cap /bin/sh)
 glibc-2.17-6.x86_64 marks filesystem-4.0-22.x86_64 (cap /etc/default)
 glibc-2.17-6.x86_64 marks ldconfig-2.17-6.x86_64 (cap /sbin/ldconfig)
 glibc-2.17-6.x86_64 marks libselinux-2.1.9-2.x86_64 (cap libselinux.so.1()(64bit))
  libselinux-2.1.9-2.x86_64 marks libsepol-2.1.4-1.x86_64 (cap libsepol >= 2.1.4)
There are 8 packages to install (7 marked by dependencies):
I setup-2.8.5-1.x86_64
D FHS-2.3-35.x86_64 filesystem-4.0-22.x86_64 glibc-2.17-6.x86_64 ldconfig-2.17-6.x86_64 libselinux-2.1.9-2.x86_64 libsepol-2.1.4-1.x86_64 mksh-44-1.x86_64
This operation will use 10.9MB of disk space.
Need to get 3.4MB of archives (208.7KB to download).

Retrieving th::setup-2.8.5-1.x86_64.rpm...
.............................. 100.0% [208.7K (208.7K/s)]
Executing rpm --upgrade -vh --root /tmp/rd --define _check_dirname_deps 1...
Preparing... ########################################### [100%]
   1:FHS ########################################### [ 13%]
   2:ldconfig ########################################### [ 25%]
   3:filesystem ########################################### [ 38%]
   4:libsepol ########################################### [ 50%]
   5:setup ########################################### [ 63%]
error: %post(setup-2.8.5-1.x86_64) scriptlet failed, exit status 255
   6:glibc ########################################### [ 75%]
   7:libselinux ########################################### [ 88%]
   8:mksh ########################################### [100%]
Adding /bin/sh to /etc/shells
Adding /bin/ksh to /etc/shells
Adding /bin/mksh to /etc/shells

# rpm -r /tmp/rd -q setup
package setup is not installed

# poldek -r /tmp/rd/ -u setup
Processing dependencies...
There are 1 package to install:
I setup-2.8.5-1.x86_64
This operation will use 758.4KB of disk space.
Need to get 208.7KB of archives.
Executing etckeeper.sh --upgrade -vh --root /tmp/rd --define _check_dirname_deps 1...
Preparing... ########################################### [100%]
   1:setup ########################################### [100%]

# rpm -r /tmp/rd -q setup
setup-2.8.5-1.x86_64

the same problem occours in i686 as well

Elan Ruusamäe (glen666) wrote :

here are two problems:

1. setup %post -p /sbin/postshell fails, because switch to glibc change:
http://git.pld-linux.org/?p=packages/setup.git;a=commitdiff;h=a0098a54771a73283ff3da722d9d6518a5d909d4

and that does not seem to work if glibc is not installed

2. rpm db is inconsistent that "setup" package is omitted from rpmdb but packages require it:
# rpm -r /tmp/rd -Va
Unsatisfied dependencies for glibc-2.17-6.x86_64:
   Requires: /sbin/postshell
   Requires: /sbin/postshell

Unsatisfied dependencies for mksh-44-1.x86_64:
   Requires: setup >= 2.4.6-2

Elan Ruusamäe (glen666) wrote :
Download full text (3.4 KiB)

there's actually third problem too. target files which are marked %config noreplace [1] (passwd, group) are overwritten (but not shadow!):

[1] http://git.pld-linux.org/?p=packages/setup.git;a=blob;f=setup.spec;h=aee3d7136ce65089457055de8d025a8d7fc34606;hb=c06b68d04ea31d59d6cb35d18b124d626695fe23#l160

# echo p > /tmp/rd/etc/passwd
# echo g > /tmp/rd/etc/group
# echo s > /tmp/rd/etc/shadow

install to chroot when it first fails, then:
# poldek -r /tmp/rd/ -u setup; rpm -r /tmp/rd -q setup
Processing dependencies...
There are 1 package to install:
I setup-2.8.5-1.x86_64
This operation will use 758.4KB of disk space.
Need to get 208.7KB of archives.
Executing rpm --upgrade -vh --root /tmp/rd --define _check_dirname_deps 1...
Preparing... ########################################### [100%]
   1:setup ########################################### [100%]

# rpm -r /tmp/rd -V setup

# grep . /tmp/rd/etc/{passwd,group,shadow}
/tmp/rd/etc/passwd:root::0:0:root:/root:/bin/sh
/tmp/rd/etc/passwd:bin:*:1:1:bin:/bin:/bin/false
/tmp/rd/etc/passwd:daemon:*:2:2:daemon:/sbin:/bin/false
/tmp/rd/etc/passwd:adm:*:3:4:adm:/var/account:/bin/false
/tmp/rd/etc/passwd:lp:*:4:7:lp:/var/spool/lpd:/bin/false
/tmp/rd/etc/passwd:sync:*:5:0:sync:/sbin:/bin/sync
/tmp/rd/etc/passwd:shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
/tmp/rd/etc/passwd:halt:*:7:0:halt:/sbin:/sbin/halt
/tmp/rd/etc/passwd:mail:*:8:12:mail:/var/mail:/bin/false
/tmp/rd/etc/passwd:news:*:9:13:news:/home/services/news:/bin/false
/tmp/rd/etc/passwd:uucp:*:10:14:uucp:/var/spool/uucp:/bin/false
/tmp/rd/etc/passwd:operator:*:11:0:operator:/root:/bin/false
/tmp/rd/etc/passwd:games:*:12:20:games:/usr/games:/bin/false
/tmp/rd/etc/passwd:ftp:*:14:50:FTP User:/home/services/ftp:/bin/false
/tmp/rd/etc/passwd:http:*:51:51:HTTP User:/home/services/httpd:/bin/false
/tmp/rd/etc/passwd:stats:*:123:123:Statistics generator user:/usr/share/empty:/bin/false
/tmp/rd/etc/passwd:nobody:*:99:99:Nobody:/usr/share/empty:/bin/false

/tmp/rd/etc/group:root::0:root
/tmp/rd/etc/group:bin::1:root,bin,daemon
/tmp/rd/etc/group:daemon::2:root,bin,daemon
/tmp/rd/etc/group:sys::3:root,bin,adm
/tmp/rd/etc/group:adm::4:root,adm,daemon
/tmp/rd/etc/group:tty::5:
/tmp/rd/etc/group:disk::6:root
/tmp/rd/etc/group:lp::7:daemon,lp
/tmp/rd/etc/group:mem::8:
/tmp/rd/etc/group:kmem::9:
/tmp/rd/etc/group:wheel::10:root
/tmp/rd/etc/group:icmp::11:
/tmp/rd/etc/group:mail::12:mail
/tmp/rd/etc/group:news::13:news
/tmp/rd/etc/group:uucp::14:uucp,mail
/tmp/rd/etc/group:man::15:
/tmp/rd/etc/group:dialout::16:
/tmp/rd/etc/group:proc::17:
/tmp/rd/etc/group:floppy::19:
/tmp/rd/etc/group:games::20:
/tmp/rd/etc/group:slocate::21:
/tmp/rd/etc/group:utmp::22:
/tmp/rd/etc/group:audio::23:
/tmp/rd/etc/group:video::24:
/tmp/rd/etc/group:cdrom::27:
/tmp/rd/etc/group:fsctrl::28:
/tmp/rd/etc/group:console::31:
/tmp/rd/etc/group:backup::39:
/tmp/rd/etc/group:dip::40:
/tmp/rd/etc/group:ftp::50:
/tmp/rd/etc/group:http::51:
/tmp/rd/etc/group:tape::68:
/tmp/rd/etc/group:usb::78:
/tmp/rd/etc/group:fuse::84:
/tmp/rd/etc/group:nobody::99:
/tmp/rd/etc/group:stats::123:
/tmp/rd/etc/group:logs::124:stats
/tmp/rd/etc/group:fileshare::138:
/tmp/rd/etc/g...

Read more...

Elan Ruusamäe (glen666) wrote :

# rpm -q rpm poldek
rpm-5.4.10-53.x86_64
poldek-0.30.0-1.rc7.4.x86_64

Elan Ruusamäe (glen666) wrote :

when setup is built with diet, the install order is totally different:

# rm -rf /tmp/rd; install -d /tmp/rd; rpm -r /tmp/rd --initdb; poldek --sn th -s . -r /tmp/rd/ -u setup --noask

Processing dependencies...
setup-2.8.5-2.1.x86_64 marks FHS-2.3-35.x86_64 (cap /etc)
There are 2 packages to install (1 marked by dependencies):
I setup-2.8.5-2.1.x86_64
D FHS-2.3-35.x86_64
This operation will use 755.5KB of disk space.
Need to get 318.8KB of archives.
Executing etckeeper.sh --upgrade -vh --root /tmp/rd --define _check_dirname_deps 1...
Preparing... ########################################### [100%]
   1:FHS ########################################### [ 50%]
   2:setup ########################################### [100%]

# rpm -qp setup-2.8.5-2.1.x86_64.rpm --requires
FHS >= 2.3-24.1

Elan Ruusamäe (glen666) wrote :

seems that setup provided binaries are not compiled static!

# rpm -q setup-2.8.5-1.x86_64 --requires
FHS >= 2.3-24.1
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
rtld(GNU_HASH)
rpmlib(PayloadIsLzma) <= 4.4.6-1

Elan Ruusamäe (glen666) wrote :

# rpm -ql setup-2.8.5-1.x86_64|xargs file|grep exec
/sbin/delpasswd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=39b2b4b8236546f4c63e6681f4334cf099633773, stripped
/sbin/joinpasswd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=c1b4a0fedde21bfaecf5a591437e133717ec3e77, stripped
/sbin/postshell: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=6b6f698ca73b14a4b2dd2ce014223fc7e62997bb, stripped
/sbin/update-fstab: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=087337839647bd9338adb02f9b611772c868acd5, stripped

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers