Comment 2 for bug 1192167

Revision history for this message
Elan Ruusamäe (glen666) wrote :

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/group:users::1000:
/tmp/rd/etc/group:tpexec::65500:
/tmp/rd/etc/group:nosock::65501:
/tmp/rd/etc/group:nocsock::65502:
/tmp/rd/etc/group:nossock::65503:
/tmp/rd/etc/group:nofork::65504:
/tmp/rd/etc/group:nogroup::65534:

/tmp/rd/etc/shadow:s