diff options
author | Johannes Winkelmann <jw@smts.ch> | 2006-02-23 15:26:10 +0000 |
---|---|---|
committer | Johannes Winkelmann <jw@smts.ch> | 2006-02-23 15:26:10 +0000 |
commit | e3afe2298e821d7f5860128720e665d8fb3bd641 (patch) | |
tree | bfb499432688352b1140b13ad8252c8e4e739006 /cpio | |
download | pkgutils-e3afe2298e821d7f5860128720e665d8fb3bd641.tar.gz pkgutils-e3afe2298e821d7f5860128720e665d8fb3bd641.tar.xz |
create branch for 2.2
Diffstat (limited to 'cpio')
-rw-r--r-- | cpio/.footprint | 6 | ||||
-rw-r--r-- | cpio/.md5sum | 2 | ||||
-rw-r--r-- | cpio/Pkgfile | 20 | ||||
-rw-r--r-- | cpio/cpio-2.6.patch | 72 |
4 files changed, 100 insertions, 0 deletions
diff --git a/cpio/.footprint b/cpio/.footprint new file mode 100644 index 00000000..635fa767 --- /dev/null +++ b/cpio/.footprint @@ -0,0 +1,6 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/cpio +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man1/ +-rw-r--r-- root/root usr/man/man1/cpio.1.gz diff --git a/cpio/.md5sum b/cpio/.md5sum new file mode 100644 index 00000000..27ec2bd3 --- /dev/null +++ b/cpio/.md5sum @@ -0,0 +1,2 @@ +546dbd4aa403e5ee2dd4065e077b9917 cpio-2.6.patch +25e0e8725bc60ed3460c9cde92752674 cpio-2.6.tar.bz2 diff --git a/cpio/Pkgfile b/cpio/Pkgfile new file mode 100644 index 00000000..69038141 --- /dev/null +++ b/cpio/Pkgfile @@ -0,0 +1,20 @@ +# Description: A tool to copy files into or out of a cpio or tar archive +# URL: http://www.gnu.org/software/cpio/ +# Maintainer: Per Lidén <per@fukt.bth.se> + +name=cpio +version=2.6 +release=2 +source=(http://mirrors.sunsite.dk/gnu/$name/$name-$version.tar.bz2 \ + $name-$version.patch) + +build() { + cd $name-$version + patch -p1 < ../$name-$version.patch + ./configure --prefix=/usr + make + make DESTDIR=$PKG install + rm -rf $PKG/usr/{share,info,libexec} \ + $PKG/usr/bin/mt \ + $PKG/usr/man/man1/mt.1 +} diff --git a/cpio/cpio-2.6.patch b/cpio/cpio-2.6.patch new file mode 100644 index 00000000..728f6253 --- /dev/null +++ b/cpio/cpio-2.6.patch @@ -0,0 +1,72 @@ +Description: Fix for not allowing a malicious cpio file to extract to an arbitrary directory. +Origin: http://lwn.net/Articles/143418/ + http://www.xs4all.nl/~hanb/software/crux/han/cpio/cpio.patch +Upstream status: Unknown (2005-07-21) + +diff -Nru cpio-2.6/configure.ac cpio-2.6-new/configure.ac +--- cpio-2.6/configure.ac 2004-12-20 11:46:30.000000000 +0100 ++++ cpio-2.6-new/configure.ac 2005-07-21 16:07:42.000000000 +0200 +@@ -95,7 +95,7 @@ + AC_CHECK_FUNCS(lchown endpwent endgrent) + AC_FUNC_VPRINTF + AC_FUNC_ALLOCA +-AC_CHECK_LIB(nsl, gethostname, [LIBS="$LIBS -lnsl"]) ++dnl AC_CHECK_LIB(nsl, gethostname, [LIBS="$LIBS -lnsl"]) + AC_CHECK_LIB(socket, setsockopt, [LIBS="$LIBS -lsocket"]) + + # Gettext. +diff -Nru cpio-2.6/src/copyout.c cpio-2.6-new/src/copyout.c +--- cpio-2.6/src/copyout.c 2004-10-14 11:14:03.000000000 +0200 ++++ cpio-2.6-new/src/copyout.c 2005-07-21 16:07:42.000000000 +0200 +@@ -305,7 +305,7 @@ + else + magic_string = "070701"; + sprintf (ascii_header, +- "%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx", ++ "%6s%08lx%08lx%08lx%08lx%08lx%08x%08lx%08lx%08lx%08lx%08lx%08lx%08lx", + magic_string, + file_hdr->c_ino, file_hdr->c_mode, file_hdr->c_uid, + file_hdr->c_gid, file_hdr->c_nlink, file_hdr->c_mtime, +diff -Nru cpio-2.6/src/extern.h cpio-2.6-new/src/extern.h +--- cpio-2.6/src/extern.h 2004-09-08 12:49:57.000000000 +0200 ++++ cpio-2.6-new/src/extern.h 2005-07-21 16:07:42.000000000 +0200 +@@ -91,6 +91,7 @@ + extern char input_is_seekable; + extern char output_is_seekable; + extern char *program_name; ++extern mode_t sys_umask; + extern int (*xstat) (); + extern void (*copy_function) (); + +diff -Nru cpio-2.6/src/global.c cpio-2.6-new/src/global.c +--- cpio-2.6/src/global.c 2004-09-08 12:23:44.000000000 +0200 ++++ cpio-2.6-new/src/global.c 2005-07-21 16:07:42.000000000 +0200 +@@ -195,6 +195,9 @@ + /* The name this program was run with. */ + char *program_name; + ++/* Debian hack to make the -d option honor the umask. */ ++mode_t sys_umask; ++ + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); +diff -Nru cpio-2.6/src/main.c cpio-2.6-new/src/main.c +--- cpio-2.6/src/main.c 2004-11-23 01:42:18.000000000 +0100 ++++ cpio-2.6-new/src/main.c 2005-07-21 16:07:42.000000000 +0200 +@@ -740,7 +740,6 @@ + textdomain (PACKAGE); + + program_name = argv[0]; +- umask (0); + + #ifdef __TURBOC__ + _fmode = O_BINARY; /* Put stdin and stdout in binary mode. */ +@@ -751,6 +750,7 @@ + #endif + + process_args (argc, argv); ++ sys_umask = umask (0); + + initialize_buffers (); + |