http://svn.freebsd.org/viewvc/base?limit_changes=0&view=revision&revision=208361 I'm not sure what's up with this update, but it hosed up the default behavior of cpio. It appears now that -o won't do the same things that it used to: + cd / + find -x . + egrep -v '^\.(/snap|/usr/sup|/boot/kernel/kernel \.[[:alpha:]_]+\.[[:digit:]]+|/boot/kernel/kernel \.old|/etc/start_if.*|/etc/ssh/ssh_host_.*key|/etc/hostid|/etc/(master.passwd|passwd|spwd.db|pwd.db))' + '[' -n '' ']' + '[' 7 = 4 ']' + '[' -n '' -a -z '' ']' + '[' -n /home/backup ']' + echo 'dumping / ...' dumping / ... + cpio -o --quiet --format crc -O /home/backup/root.amd64.cpio cpio: ./dev not dumped: minor number would be truncated cpio: Removing leading `/' from member names cpio: ./proc not dumped: minor number would be truncated cpio: Removing leading `../' from member names We've had to revert this change from our local tree, suggestions? Sean
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Sean, On 2010/06/15 15:10, Sean Bruno wrote:> http://svn.freebsd.org/viewvc/base?limit_changes=0&view=revision&revision=208361 > > I'm not sure what's up with this update, but it hosed up the default > behavior of cpio.[...]> We've had to revert this change from our local tree, suggestions?Could you please test the attached patch? Cheers, - -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBCAAGBQJMGAz/AAoJEATO+BI/yjfBoMsH/09y4W745hnblSDFM3J8zBaa rQjXnN08vtitqu55uFz1dBwFrP9IvbIU0yCNqOOiYduBvhjQt4IMM/FY+sXDBbHo U5jZ7jQvu+usw3mewRMrnc1weCQnehyQMC9u5ZCVZYXp2aK/MhOXTX6/faZpxseW zStQYjAtXOzMQ7oEWV6DBFbwOXaCGybfqNKoygeqTlGDDrdh0RXbXBzeYDmh9FNt lA4+utFRcDOgupZDP+bDe3tR7Tl/keBFCCOkuBjrYtZaMDePxSWFC9ES2zvOue1c IekVMB71elpgnUsjv/ryqwLB4SanDB5c/QCCFHtr77FsxJh4muv2ecX2sNj2zvg=YFSQ -----END PGP SIGNATURE----- -------------- next part -------------- Index: contrib/cpio/src/util.c ==================================================================--- contrib/cpio/src/util.c (revision 209216) +++ contrib/cpio/src/util.c (working copy) @@ -1252,8 +1252,25 @@ stat_to_cpio (struct cpio_file_stat *hdr, struct s hdr->c_uid = CPIO_UID (st->st_uid); hdr->c_gid = CPIO_GID (st->st_gid); hdr->c_nlink = st->st_nlink; - hdr->c_rdev_maj = major (st->st_rdev); - hdr->c_rdev_min = minor (st->st_rdev); + + switch (hdr->c_mode & CP_IFMT) + { + case CP_IFBLK: + case CP_IFCHR: +#ifdef CP_IFIFO + case CP_IFIFO: +#endif +#ifdef CP_IFSOCK + case CP_IFSOCK: +#endif + hdr->c_rdev_maj = major (st->st_rdev); + hdr->c_rdev_min = minor (st->st_rdev); + break; + default: + hdr->c_rdev_maj = 0; + hdr->c_rdev_min = 0; + break; + } hdr->c_mtime = st->st_mtime; hdr->c_filesize = st->st_size; hdr->c_chksum = 0;
On Tue, 2010-06-15 at 17:10 -0500, Sean Bruno wrote:> http://svn.freebsd.org/viewvc/base?limit_changes=0&view=revision&revision=208361 > > I'm not sure what's up with this update, but it hosed up the default > behavior of cpio. > > It appears now that -o won't do the same things that it used to: > > + cd / > + find -x . > + egrep -v '^\.(/snap|/usr/sup|/boot/kernel/kernel > \.[[:alpha:]_]+\.[[:digit:]]+|/boot/kernel/kernel > \.old|/etc/start_if.*|/etc/ssh/ssh_host_.*key|/etc/hostid|/etc/(master.passwd|passwd|spwd.db|pwd.db))' > + '[' -n '' ']' > + '[' 7 = 4 ']' > + '[' -n '' -a -z '' ']' > + '[' -n /home/backup ']' > + echo 'dumping / ...' > dumping / ... > + cpio -o --quiet --format crc -O /home/backup/root.amd64.cpio > cpio: ./dev not dumped: minor number would be truncated > cpio: Removing leading `/' from member names > cpio: ./proc not dumped: minor number would be truncated > cpio: Removing leading `../' from member names > > We've had to revert this change from our local tree, suggestions? > > SeanA little more background. It looks like symlinks are getting stripped of their '/' which sucks. Ideas? Sean e.g. /home/foo/bar -> /opt/baz/blob becomes home/foo/bar -> opt/baz/blob Yuck.