--- cpio-2.8.orig/debian/control +++ cpio-2.8/debian/control @@ -0,0 +1,19 @@ +Source: cpio +Section: utils +Priority: important +Maintainer: Ubuntu Core developers +XSBC-Original-Maintainer: Clint Adams +Build-Depends: texinfo, gettext +Standards-Version: 3.7.2 +XS-VCS-Git: git://git.debian.org/git/private/schizo/cpio +XS-VCS-Browser: http://git.debian.org/?p=private/schizo/cpio/.git + +Package: cpio +Architecture: any +Depends: ${shlibs:Depends} +Replaces: cpio-mt +Conflicts: mt-st (<< 0.6), cpio-mt +Description: GNU cpio -- a program to manage archives of files + GNU cpio is a tool for creating and extracting archives, or copying + files from one place to another. It handles a number of cpio formats + as well as reading and writing tar files. --- cpio-2.8.orig/debian/rules +++ cpio-2.8/debian/rules @@ -0,0 +1,112 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +package=cpio + +CFLAGS = -Wall -g -fgnu89-inline +INSTALL = install +INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 +INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 +INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 +INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +INSTALL_PROGRAM += -s +endif + +Makefile: + $(checkdir) + CFLAGS='$(CFLAGS)' CPIO_MT_PROG=mt ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --bindir=/bin \ + --libexecdir=/usr/sbin + + touch tests/testsuite + +build: Makefile + $(checkdir) + $(MAKE) + touch tests/testsuite.at tests/testsuite + $(MAKE) check + touch build + +clean: + $(checkdir) + $(RM) build + -$(MAKE) -i distclean + $(RM) config.cache + $(RM) -r *~ debian/tmp debian/*~ debian/files* + $(RM) -f debian/substvars + +binary-indep: checkroot build + $(checkdir) + +binary-arch: checkroot build + $(checkdir) + $(RM) -r debian/tmp + $(INSTALL_DIR) debian/tmp debian/tmp/DEBIAN + $(INSTALL_DIR) debian/tmp/usr/share/doc/$(package) +# Install Debian package control information files + $(INSTALL_SCRIPT) debian/preinst debian/postinst \ + debian/prerm debian/tmp/DEBIAN/. +# Install directories + $(INSTALL_DIR) \ + debian/tmp/bin \ + debian/tmp/usr/share/man/man1 \ + debian/tmp/usr/share/info +# Install files + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + rm -rf debian/tmp/usr/libexec + mv debian/tmp/bin/mt debian/tmp/bin/mt-gnu + mv debian/tmp/usr/share/man/man1/mt.1 \ + debian/tmp/usr/share/man/man1/mt-gnu.1 +# Strip binaries (including hack by policy wonks) +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + strip -R.note -R.comment debian/tmp/bin/* +endif + rm -rf debian/tmp/usr/sbin +# Install documentation + install -m 644 ChangeLog debian/tmp/usr/share/doc/$(package)/changelog + install -m 644 NEWS README debian/tmp/usr/share/doc/$(package)/. +# Install changelog & copyright + install -m 644 debian/changelog \ + debian/tmp/usr/share/doc/$(package)/changelog.Debian + gzip -9v debian/tmp/usr/share/doc/$(package)/* + gzip -9v debian/tmp/usr/share/man/*/* + gzip -9v debian/tmp/usr/share/info/* + install -m 644 debian/copyright debian/tmp/usr/share/doc/$(package)/. +# Determine shared library dependencies + dpkg-shlibdeps debian/tmp/bin/cpio debian/tmp/bin/mt-gnu + +# Generate md5sums + cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums + +# Generate deb file + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + dpkg-deb --build debian/tmp .. + +define checkdir + test -f src/$(package).h && test -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- cpio-2.8.orig/debian/prerm +++ cpio-2.8/debian/prerm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = remove ]; then + update-alternatives --remove mt /bin/mt-gnu + install-info --quiet --remove /usr/share/info/cpio.info + if test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then + rm -f /sbin/rmt + fi +fi --- cpio-2.8.orig/debian/changelog +++ cpio-2.8/debian/changelog @@ -0,0 +1,493 @@ +cpio (2.8-1ubuntu2.2) gutsy-security; urgency=low + + * SECURITY UPDATE: Buffer overflow in the safer_name_suffix function in GNU + cpio has unspecified attack vectors and impact, resulting in a "crashing + stack." + * patch paxnames.c to correct an allocation weakness in safer_name_suffix() + which could lead to a crash. Thanks to Stephan Hermann + * References: + CVE-2007-4476 + LP: #161173 + + -- Jamie Strandboge Mon, 29 Sep 2008 16:58:13 -0500 + +cpio (2.8-1ubuntu2) gutsy; urgency=low + + * src/copyin.c: Applied patch from Dave Gilbert inline to fix + possible segfault when fixing headers, where the magic number + is byte swapped (LP: #139928) + + -- dAniel hAhler Tue, 02 Oct 2007 04:54:51 +0200 + +cpio (2.8-1ubuntu1) gutsy; urgency=low + + * Build with -fgnu89-inline to build with gcc-4.3. LP: #138566. + * Set Ubuntu maintainer address. + + -- Matthias Klose Wed, 12 Sep 2007 20:02:12 +0000 + +cpio (2.8-1) unstable; urgency=low + + * New upstream release. + - Includes updated nl.po. closes: #427375. + * Move package from Arch to git and add XS-VCS-Git and XS-VCS-Browser + to debian/control. + + -- Clint Adams Sun, 10 Jun 2007 10:46:03 -0400 + +cpio (2.7-4) unstable; urgency=low + + * Reapply Russell Stuart's patch from 2.7-2, since it went + missing. + + -- Clint Adams Fri, 08 Jun 2007 16:13:20 -0400 + +cpio (2.7-3) unstable; urgency=low + + * Apply upstream patches: + - (long_format): Use PRIuMAX for printing file size + - (from_ascii): Bugfix: allow for empty fields. closes: #425532. + - (process_copy_out): Fix memory leaks on orig_file_name. + - (process_copy_pass): symlink_error takes two arguments. + + -- Clint Adams Tue, 22 May 2007 09:40:44 -0400 + +cpio (2.7-2) unstable; urgency=medium + + * Apply patch from Russell Stuart to fix some malformed + creation of ustar archives. closes: #358990. + + -- Clint Adams Thu, 19 Apr 2007 18:47:50 -0400 + +cpio (2.7-1) unstable; urgency=low + + * New upstream release. + * Apply upstream patch to fix permissions breakage in pass mode. + * Apply upstream patch to fix symlink string termination. + closes: #412799. + * Apply upstream patch to fix size conversion. + + -- Clint Adams Sun, 8 Apr 2007 10:57:59 -0400 + +cpio (2.6-17) unstable; urgency=high + + * Fix setlocale glitch. closes: #381348. + + -- Clint Adams Fri, 4 Aug 2006 09:45:10 -0400 + +cpio (2.6-16) unstable; urgency=low + + * Use correct path for rmt. closes: #293632. + + -- Clint Adams Thu, 6 Jul 2006 20:31:27 -0400 + +cpio (2.6-15) unstable; urgency=high + + * Don't fail the preinst if the symlink doesn't exist. + + -- Clint Adams Wed, 28 Jun 2006 21:24:57 -0400 + +cpio (2.6-14) unstable; urgency=low + + * Fix prerm to remove the correct info file. + * Clean up /usr/doc/cpio symlink in preinst + (fix for #322778 was accidentally removed). + closes: #375727. + + -- Clint Adams Tue, 27 Jun 2006 23:26:22 -0400 + +cpio (2.6-13) unstable; urgency=high + + * Updated German program translation from Holger Wansing. + closes: #373942. + * Patch from Holger Wansing to update the FSF address in + cpio.pot. + * Fix postinst to install the correct info file. closes: #374143. + * Add "Plural-Forms" to Danish .po. + * Add build-dependency on gettext, and generate all .gmos at + build time. + + -- Clint Adams Sun, 18 Jun 2006 11:14:20 -0400 + +cpio (2.6-12) unstable; urgency=low + + * Updated Danish program translation from Claus Hindsgaul. + closes: #359212. + * Bump Standards-Version to 3.7.2. + * Add watch file. + + -- Clint Adams Sun, 28 May 2006 10:54:16 -0400 + +cpio (2.6-11) unstable; urgency=low + + * Forward-port fix for #88419. closes: #350827. + + -- Clint Adams Sat, 11 Mar 2006 20:31:55 -0500 + +cpio (2.6-10) unstable; urgency=medium + + * Fix potential buffer overflow on 64-bit architectures. + [CVE-2005-4268]. closes: #344134. + + -- Clint Adams Tue, 20 Dec 2005 12:44:50 -0500 + +cpio (2.6-9) unstable; urgency=high + + * configure.ac, src/extern.h, src/global.c: actually fix + the error with checksums on 64-bit platforms. + + -- Clint Adams Sun, 30 Oct 2005 17:14:08 -0500 + +cpio (2.6-8) unstable; urgency=high + + * src/copyout.c: fix regression of #100456 (checksum errors on + 64-bit platforms), thanks to Jim Castleberry. + + -- Clint Adams Mon, 24 Oct 2005 15:23:44 -0400 + +cpio (2.6-7) unstable; urgency=low + + * src/mt.c: don't block on opening tape device. + closes: #239130. + + -- Clint Adams Thu, 20 Oct 2005 21:10:55 -0400 + +cpio (2.6-6) unstable; urgency=critical + + * Forward-port Martin Pitt's security patch from Ubuntu: + - SECURITY UPDATE: Modify permissions of arbitrary files, path traversal. + - copyin.c, copypass.c: Use fchmod() and fchown() before closing the output + file instead of chmod() and chown() after closing it. This avoids + exploiting this race condition with a hardlink attach to chmod/chown + arbitrary files. [CAN-2005-1111]. closes: #305372. + - copyin.c: Separate out path sanitizing to safer_name_suffix(): Apart from + leading slashes, filter out ".." components from output file names if + --no-absolute-filenames is given, to avoid path traversal. [CAN-2005-1229] + closes: #306693. + + -- Clint Adams Thu, 29 Sep 2005 10:22:52 -0400 + +cpio (2.6-5) unstable; urgency=medium + + * Fix 'ustar' format mtime overflow. closes: #238177. + * Fix symlink dereferencing problem. + closes: #322608, #323141, #326090. + + -- Clint Adams Sun, 4 Sep 2005 10:44:40 -0400 + +cpio (2.6-4) unstable; urgency=low + + * Restore previous mt behaviors. + * Add/improve density descriptions for DLT IV 4000, 7000, 8000; + uncompressed and compressed; thanks to Calum Mackay. + closes: #222378. + * Ship md5sums. closes: #325617. + + -- Clint Adams Mon, 29 Aug 2005 17:19:46 -0400 + +cpio (2.6-3) unstable; urgency=high + + * Fix inability to install if /usr/doc/cpio symlink did not exist. + closes: #322999, #323005. + + -- Clint Adams Sun, 14 Aug 2005 11:20:05 -0400 + +cpio (2.6-2) unstable; urgency=medium + + * Remove old /usr/doc/cpio symlink in postinst, since + the 2.5 packages did not remove it properly in prerm. + closes: #322778. + + -- Clint Adams Fri, 12 Aug 2005 16:53:51 -0400 + +cpio (2.6-1) unstable; urgency=low + + * New upstream version. closes: #275116, #319028. + - No longer has manpage typos reported by A Costa. + closes: #307035. + - No longer has manpage typo reported by Matthew Vernon. + closes: #170558. + - Checks for LFS. closes: #165217. + * New maintainer. closes: #321333. + * Bump Standards-Version to 3.6.2. + * Remove /usr/doc symlink code. closes: #320085. + * Remove a couple of nasty XSIisms in preinst, prerm, and rules. + closes: #253008, #256199. + * Fix "Wrong spelling (chechdir) in rules file". closes: #223970. + * Drop trailing period from short description. closes: #174470. + * Drop support for 'debug' in DEB_BUILD_OPTIONS, and add 'noopt'. + + -- Clint Adams Thu, 4 Aug 2005 21:56:42 -0400 + +cpio (2.5-1.2) unstable; urgency=HIGH + + * NMU + * Forward ported patch from Albert Chin-A-Young to fix broken + permissions on output file with -O/-F [main.c, CAN-1999-1572, + http://groups-beta.google.com/group/gnu.utils.bug/msg/4db088ee6031c9ec] + Closes: #293379 + + -- Joey Hess Fri, 4 Feb 2005 16:43:38 -0500 + +cpio (2.5-1.1) unstable; urgency=low + + * Non-maintainer upload according to the release manager's plan. + * Fix LSB 1.3 non-compliance (Closes: Bug#184887). + + -- Roland Mas Sat, 23 Aug 2003 16:07:05 +0200 + +cpio (2.5-1) unstable; urgency=low + + * New upstream version (after six years). (Closes: Bug#150342, + Bug#132312) + * Fixed symlink /usr/doc -> ../share/doc. (Closes: Bug#131461) + * Fixed reference to GPL. + * Modified postinst to ignore an existing /usr/doc/$package directory. + * Improved stripping of binaries. + * Removed reference to rmt in the package description. (Closes: + Bug#147468) + + -- Brian Mays Sat, 22 Jun 2002 15:46:48 -0400 + +cpio (2.4.2-40) unstable; urgency=low + + * Fixed symlink /usr/doc -> ../share/doc. (Closes: Bug#131039) + + -- Brian Mays Sun, 27 Jan 2002 15:40:39 -0500 + +cpio (2.4.2-39) unstable; urgency=medium + + * Added density description for 0x45 (QIC-3095). (Closes: Bug#117427) + * Removed rmt from cpio package. It has moved to the tar package. + + -- Brian Mays Fri, 23 Nov 2001 13:30:50 -0500 + +cpio (2.4.2-38) unstable; urgency=low + + * Added a verbose-skip command line option (by Tomas Pospisek + ). (Closes: Bug#114587) + + -- Brian Mays Thu, 25 Oct 2001 14:28:18 -0400 + +cpio (2.4.2-37) unstable; urgency=low + + * Fixed checksum error on 64-byte machines. (Closes: Bug#100456) + * Hacked cpio to honor the umask when creating directories with the + "-d" option. (Closes: Bug#88419) + * Made /etc/rmt a conffile. (Closes: Bug#91226) + * Removed "-g" gcc option as per policy. + * Fixed typos in find_inode_file function causing it to occasionally + miss inodes and, therefore, to copy out the same (hard-linked) + file several times to a tar archive. (Closes: Bug#66354) + * Fixed error with mt alternatives. (Closes: Bug#84476) + * Added additional density codes. (Closes: Bug#104149) + + -- Brian Mays Wed, 25 Jul 2001 12:01:51 -0400 + +cpio (2.4.2-35) unstable; urgency=low + + * Renamed gmt to mt-gnu. (Closes: Bug#84118) + + -- Brian Mays Tue, 30 Jan 2001 19:42:28 -0500 + +cpio (2.4.2-34) unstable; urgency=low + + * Added an environment variable to cpio and mt to specify the remote + command. (Closes: Bug#71048) + * Added compatibility with the mt-st package. (Closes: Bug#83813) + + -- Brian Mays Sun, 28 Jan 2001 16:15:44 -0500 + +cpio (2.4.2-33) unstable; urgency=low + + * Added density code 0x22 (SLR4DC) to mt. (Closes: Bug#67424) + + -- Brian Mays Thu, 27 Jul 2000 17:49:56 -0400 + +cpio (2.4.2-32) frozen unstable; urgency=low + + * Added patch by Fred Long and Marc SCHAEFER + to fix file corruption when a file changes + during the backup. (Closes: Bug#53056) + * Added patch from Anders Hammarquist to make + rmt work with Solaris ufsdump/ufsrestore. (Closes: Bug#58323) + + -- Brian Mays Thu, 17 Feb 2000 12:43:01 -0500 + +cpio (2.4.2-31) frozen unstable; urgency=low + + * Fixed missing element from manpage. (Closes: Bug#56904) + + -- Brian Mays Thu, 3 Feb 2000 13:39:55 -0500 + +cpio (2.4.2-30) frozen unstable; urgency=low + + * Added build-time dependencies. + + -- Brian Mays Mon, 17 Jan 2000 13:32:18 -0500 + +cpio (2.4.2-29) unstable; urgency=low + + * Added patch from Mark Eichin to fix mt's datcompression. (Closes: + Bug#52755) + + -- Brian Mays Fri, 17 Dec 1999 14:14:40 -0500 + +cpio (2.4.2-28) unstable; urgency=low + + * Modified cpio so that the -v and -V flags work with + --only-verify-crc. (Closes: Bug#49791) + + -- Brian Mays Wed, 10 Nov 1999 08:42:34 -0500 + +cpio (2.4.2-27) unstable; urgency=low + + * Fixed FHS /usr/doc -> /usr/share/doc transition scheme. + + -- Brian Mays Fri, 1 Oct 1999 12:43:24 -0400 + +cpio (2.4.2-26) unstable; urgency=low + + * Added symbolic link /usr/doc/cpio -> /usr/share/doc/cpio. + + -- Brian Mays Thu, 16 Sep 1999 13:45:04 -0400 + +cpio (2.4.2-25) unstable; urgency=low + + * Changed section to "utils". + * Made /etc/rmt a wrapper script (with comments detailing its purpose) + instead of a symlink. + * Removed tar from cpio man page. (Closes: Bug#38043) + * Moved doc, man, and info to /usr/share as per the FHS. + * Fixed bug in rmt causing problems on systems (such as the Hurd) + where sys_errlist is not available. (Closes: Bug#37164) + + -- Brian Mays Thu, 22 Jul 1999 12:04:32 -0400 + +cpio (2.4.2-24) unstable; urgency=low + + * Made Debian scripts create and remove the symbolic links to rmt. + (Closes: Bug#33670) + + -- Brian Mays Mon, 22 Feb 1999 17:24:21 -0500 + +cpio (2.4.2-23) frozen unstable; urgency=low + + * Fixed a bug causing cpio to segfault when the tar format is used. + * Fixed bugs causing cpio to use the wrong minor device numbers. + + -- Brian Mays Wed, 6 Jan 1999 09:59:24 -0500 + +cpio (2.4.2-22) unstable frozen; urgency=low + + * Fixed "Lwhence\noffset\n" error in rmt manual page. (Fixes: + Bug#28960) + + -- Brian Mays Fri, 6 Nov 1998 11:01:57 -0500 + +cpio (2.4.2-21) unstable; urgency=low + + * Modified cpio to use the -n flag also to extract tar archives using + the numeric UID/GID instead of the user/group names in /etc/passwd + and /etc/groups. + + -- Brian Mays Thu, 15 Oct 1998 15:20:34 -0400 + +cpio (2.4.2-20) unstable; urgency=low + + * Fixed bug in --sparse feature. + + -- Brian Mays Mon, 5 Oct 1998 12:51:47 -0400 + +cpio (2.4.2-19) unstable; urgency=low + + * Added NEWS and README to /usr/doc/cpio. (Fixes: Bug#26338) + + -- Brian Mays Wed, 2 Sep 1998 13:32:18 -0400 + +cpio (2.4.2-18) unstable; urgency=low + + * Added patch from Evan Harris to fix mt's datcompression. (Fixes: + Bug#23980) + + -- Brian Mays Mon, 29 Jun 1998 11:35:57 -0400 + +cpio (2.4.2-17) unstable; urgency=low + + * Added patch necessary to build cpio in glibc_2.1. (Provided by + Juan Cespedes .) (Fixes: Bug#22643) + * Added a --rsh-command command line option (similar to tar's) to + cpio and mt. + * Made ssh the default remote command. + + -- Brian Mays Tue, 26 May 1998 13:01:27 -0400 + +cpio (2.4.2-16) unstable frozen; urgency=low + + * Fixed problem causing corruption of old style ascii cpio archives. + Problem caused by a change in the dev_t type used by glibc. + (Fixes: Bug#22857) + + -- Brian Mays Tue, 26 May 1998 13:01:19 -0400 + +cpio (2.4.2-15) frozen unstable; urgency=low + + * Added a patch required for cpio to compile on a PowerPC. Fixes: + Bug#21411. + * Removed bashisms from the debian/rules makefile. + + -- Brian Mays Mon, 20 Apr 1998 14:20:36 -0400 + +cpio (2.4.2-14) unstable; urgency=low + + * Removed old FSF address from copyright file. + + -- Brian Mays Thu, 12 Feb 1998 17:45:29 -0500 + +cpio (2.4.2-13) unstable; urgency=low + + * Changed the function responsible for processing the count parameter + from atoi() to strtol(). This will allow entries such as 0x24 to be + used. + + -- Brian Mays Fri, 5 Dec 1997 17:21:08 -0500 + +cpio (2.4.2-12) unstable; urgency=low + + * Added patch to report more information on FTAPE drives. + * Made several miscellaneous fixes to source. + + -- Brian Mays Sun, 26 Oct 1997 15:47:59 -0500 + +cpio (2.4.2-11) unstable; urgency=low + + * Libc6 release. + + -- Brian Mays Tue, 5 Aug 1997 16:53:14 -0400 + +cpio (2.4.2-10) unstable; urgency=low + + * Added CR at end of `mt status' output (fixed Bug#7632). + + -- Brian Mays Tue, 25 Feb 1997 12:15:09 -0500 + +cpio (2.4.2-9) unstable; urgency=low + + * Fixed a couple of bugs. + * Moved /usr/doc/cpio/ChangeLog.gz to /usr/doc/cpio/changelog.gz. + + -- Brian Mays Thu, 2 Jan 1997 12:18:39 -0500 + +cpio (2.4.2-8) unstable; urgency=low + + * Fixed bug #4427, wrong syscall used to print position of tape. + + -- Brian Mays Thu, 12 Sep 1996 09:55:21 -0400 + +cpio (2.4.2-7) unstable; urgency=low + + * New upstream source. + * Added an rmt manpage (from BSD). + * First release with the new source format. + + -- Brian Mays Fri, 23 Aug 1996 23:27:40 -0400 --- cpio-2.8.orig/debian/preinst +++ cpio-2.8/debian/preinst @@ -0,0 +1,16 @@ +#!/bin/sh -e + +# Fix up remnants of old packages +if [ "$1" = upgrade ] && [ -n "$2" ]; then + if dpkg --compare-versions "$2" lt '2.4.2-39' && \ + test -L /sbin/rmt && test /sbin/rmt -ef /usr/sbin/rmt; then + rm -f /sbin/rmt + fi + if dpkg --compare-versions "$2" eq '2.4.2-34' || \ + dpkg --compare-versions "$2" eq '2.4.2-35'; then + update-alternatives --remove mt /bin/gmt + fi + if test -L /usr/doc/cpio; then + rm -f /usr/doc/cpio + fi +fi --- cpio-2.8.orig/debian/postinst +++ cpio-2.8/debian/postinst @@ -0,0 +1,13 @@ +#!/bin/sh -e + +if [ "$1" = configure ]; then + # Fix some screwup in old package + case "$2" in + (2.4.2-3[45]) update-alternatives --remove mt /bin/gmt; esac + update-alternatives --install /bin/mt mt /bin/mt-gnu 10 \ + --slave \ + /usr/share/man/man1/mt.1.gz mt.1.gz /usr/share/man/man1/mt-gnu.1.gz + install-info --quiet \ + --description="A program to manage archives of files." \ + --section "General Commands" "General Commands" /usr/share/info/cpio.info +fi --- cpio-2.8.orig/debian/watch +++ cpio-2.8/debian/watch @@ -0,0 +1,3 @@ +version=2 + +ftp://ftp.gnu.org/gnu/cpio/cpio-(.*)\.tar\.gz --- cpio-2.8.orig/debian/copyright +++ cpio-2.8/debian/copyright @@ -0,0 +1,55 @@ +This is the Debian GNU/Linux prepackaged version of GNU cpio +(including mt). + +This package was put together by Ian Murdock , +from sources obtained from: + prep.ai.mit.edu:/pub/gnu + +This package has been modified by Brian Mays . +Modifications of cpio package for Debian GNU/Linux Copyright (C) +1996-2002 Brian Mays and are released under the GPL (on Debian systems +see "/usr/share/common-licenses/GPL"). + +Changes: + * added Debian GNU/Linux package maintenance system files + * split cpio and mt into two separate Debian binary packages + * fixed "mt -V" bug + * modified cpio to print a list of filenames terminated by a null + character when the -t and -0 flags are used + * eliminated a spurious error message printed when the -a flag is + used on a read-only filesystem + * fixed a remote ioctl bug in mt that caused spurious error messages + when commands were sent to a remote tape device + * added SCSI support to mt + * fixed "cpio --sparse" bug + * added an rmt man page (from BSD). + * fixed a bug that could cause an endless loop + * fixed a bug that can occur when restoring a whole filesystem + * fixed problem causing corruption of old style ascii cpio archives + * fixed a bug that prevents cpio from being compiled with glibc 2.1 + * added an rsh-command option to cpio and mt + * made ssh the default remote command (instead of rsh) + * fixed bug causing cpio to segfault when the tar format is used + * fixed bugs causing cpio to use the wrong minor device numbers + * fixed bug in rmt causing problems on systems (such as the Hurd) + where sys_errlist is not available + * modified cpio so that the -v and -V flags work with + --only-verify-crc + * modified cpio so that creating directories with the -d option honors + the umask + * fixed typos in find_inode_file function causing it to occasionally + miss inodes + +GNU cpio is Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in "/usr/share/common-licenses/GPL". --- cpio-2.8.orig/lib/paxnames.c +++ cpio-2.8/lib/paxnames.c @@ -36,15 +36,27 @@ return strcmp (name1, name2) == 0; } -/* Return zero if TABLE contains a copy of STRING; otherwise, insert a - copy of STRING to TABLE and return 1. */ -bool -hash_string_insert (Hash_table **table, char const *string) +/* Return zero if TABLE contains a LEN-character long prefix of STRING, + otherwise, insert a newly allocated copy of this prefix to TABLE and + return 1. If RETURN_PREFIX is not NULL, point it to the allocated + copy. */ +static bool +hash_string_insert_prefix (Hash_table **table, char const *string, size_t len, + const char **return_prefix) { Hash_table *t = *table; - char *s = xstrdup (string); + char *s; char *e; + if (len) + { + s = xmalloc (len + 1); + memcpy (s, string, len); + s[len] = 0; + } + else + s = xstrdup (string); + if (! ((t || (*table = t = hash_initialize (0, 0, hash_string_hasher, hash_string_compare, 0))) @@ -52,7 +64,11 @@ xalloc_die (); if (e == s) - return 1; + { + if (return_prefix) + *return_prefix = s; + return 1; + } else { free (s); @@ -60,6 +76,14 @@ } } +/* Return zero if TABLE contains a copy of STRING; otherwise, insert a + copy of STRING to TABLE and return 1. */ +bool +hash_string_insert (Hash_table **table, char const *string) +{ + return hash_string_insert_prefix (table, string, 0, NULL); +} + /* Return 1 if TABLE contains STRING. */ bool hash_string_lookup (Hash_table const *table, char const *string) @@ -88,7 +112,8 @@ If ABSOLUTE_NAMES is 0, strip filesystem prefix from the file name. */ char * -safer_name_suffix (char const *file_name, bool link_target, bool absolute_names) +safer_name_suffix (char const *file_name, bool link_target, + bool absolute_names) { char const *p; @@ -121,11 +146,9 @@ if (prefix_len) { - char *prefix = alloca (prefix_len + 1); - memcpy (prefix, file_name, prefix_len); - prefix[prefix_len] = '\0'; - - if (hash_string_insert (&prefix_table[link_target], prefix)) + const char *prefix; + if (hash_string_insert_prefix (&prefix_table[link_target], file_name, + prefix_len, &prefix)) { static char const *const diagnostic[] = { --- cpio-2.8.orig/src/copyin.c +++ cpio-2.8/src/copyin.c @@ -1266,7 +1266,7 @@ error (0, 0, _("warning: archive header has reverse byte-order")); warned = 1; } - swab_array ((char *) &short_hdr, 13); + swab_array ((char *) short_hdr, 13); } file_hdr->c_dev_maj = major (short_hdr->c_dev);