diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-05-14 22:12:41 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-05-14 22:12:41 +0000 |
commit | c4a33a966086477d62510bbed9de7dc4de5c36ce (patch) | |
tree | 748fb321133d634a1ec7b3df65b40514c29c7c7d /app-arch | |
parent | Remove old (diff) | |
download | historical-c4a33a966086477d62510bbed9de7dc4de5c36ce.tar.gz historical-c4a33a966086477d62510bbed9de7dc4de5c36ce.tar.bz2 historical-c4a33a966086477d62510bbed9de7dc4de5c36ce.zip |
Add a patch to fix behaviour with pipe, allows for bsdtar to work with current Portage behaviour.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/libarchive/ChangeLog | 9 | ||||
-rw-r--r-- | app-arch/libarchive/Manifest | 14 | ||||
-rw-r--r-- | app-arch/libarchive/files/libarchive-2.7.0-pipe.patch | 113 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-2.7.0-r1.ebuild | 85 |
4 files changed, 219 insertions, 2 deletions
diff --git a/app-arch/libarchive/ChangeLog b/app-arch/libarchive/ChangeLog index 0a5e0f64a2c4..3792b9e1610d 100644 --- a/app-arch/libarchive/ChangeLog +++ b/app-arch/libarchive/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-arch/libarchive # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/ChangeLog,v 1.57 2009/04/27 13:51:00 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/ChangeLog,v 1.58 2009/05/14 22:12:41 flameeyes Exp $ + +*libarchive-2.7.0-r1 (14 May 2009) + + 14 May 2009; Diego E. Pettenò <flameeyes@gentoo.org> + +libarchive-2.7.0-r1.ebuild, +files/libarchive-2.7.0-pipe.patch: + Add a patch to fix behaviour with pipe, allows for bsdtar to work with + current Portage behaviour. 27 Apr 2009; Jeroen Roovers <jer@gentoo.org> libarchive-2.6.2: Stable for HPPA (bug #260063). diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest index 7fa3f66ee430..2fda1846d7f1 100644 --- a/app-arch/libarchive/Manifest +++ b/app-arch/libarchive/Manifest @@ -1,6 +1,10 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX libarchive-2.6.0-nolibs.patch 1104 RMD160 1c753db6a19e73307fdc7c43e781b3713526bde2 SHA1 92136bb9721c13553e8ccf466eef001d295d1564 SHA256 1040029f59302f5d147ba09021820ad06f171488abdb6467173c36e5c1afb98b AUX libarchive-2.6.1-headers.patch 635 RMD160 d6d2e7f1dfda2c352fac08b1b48fea611543ab17 SHA1 04fc37daef70f40aafeeadcd627432551533b505 SHA256 a5167e9cc721f3e946ba36e5d2beb35310facea8360c5582adf3d6fa142c2c22 AUX libarchive-2.7.0-fortified-sources.patch 1057 RMD160 66f769ff31e29399f71f23f972026d46516cac5d SHA1 5187d93686eff8c1f3d8eca8f6389dc0b3cdfdc6 SHA256 78d8bd768e621d91e988570dbff907c37f06895649706aaaa4ccd5e56f0899cf +AUX libarchive-2.7.0-pipe.patch 3859 RMD160 334dd1d0b9e3e4310afc5c757287f47c6a867ef2 SHA1 e2b3ffd4d16420098abb9d994648feca6b8e9b82 SHA256 01fc2a68b0c9bbcdfd93d69c81f4aa23bf29bd946e8aa768f46b9741ee28f023 DIST libarchive-2.6.0.tar.gz 948077 RMD160 2eb439ffd367052e1917652dbcff616861f93fef SHA1 8288d79c00cea65b73aad7f9e0090257227b4edb SHA256 6b924c2dc7d6584792ac5a90866edaded6a7695080de89b9880f42bcabf1fa03 DIST libarchive-2.6.1.tar.gz 948450 RMD160 577d88c26047cdcdef0477fae61c54bc12122eb4 SHA1 f0fa90645afce1ff1d8c5f5e21a1ce986d58e376 SHA256 4d0ad4e5c33aa9725c7d92a42ae605815781372db949cd9906945e6c0d85c179 DIST libarchive-2.6.2.tar.gz 948569 RMD160 a32ea45632b2704b13cf04ec5ffba44258c85fa4 SHA1 56be9601877f467369cc7792f1319f0271becd1c SHA256 48c27c0ce12e1363e6f7dd87ee5cf65aaad6ebbaa502791e9aa548d1523ebbb1 @@ -8,6 +12,14 @@ DIST libarchive-2.7.0.tar.gz 1243793 RMD160 997f2809cb91eb84707714cb58f4840dee0a EBUILD libarchive-2.6.0.ebuild 1918 RMD160 1b91013a5c1543d238bb0e8818fead95dfceefb8 SHA1 9d84abe8d80b75b6ae12deaf0a7dd3bcba6d6210 SHA256 4d3a72604e3e36e85f76b413e9faffa461e79a1e4f817a0e5f4fcc9cf0b2bcb9 EBUILD libarchive-2.6.1.ebuild 1928 RMD160 14d6b5328f85275c21ae18ed0424894bc5392da2 SHA1 dbb0dddfc7013e54a2b3f1110ed445ee89612a90 SHA256 5595309ea655599054d31340b92a52c329d31ac10c12abf96ed377b4a2affd18 EBUILD libarchive-2.6.2.ebuild 1876 RMD160 84556dfbcab7b5d05d05e3d1996b581820437241 SHA1 0d58c1d98da2ddbaefd67b216883702c0c7b532e SHA256 7506f0e66beff98c1733a48068eb263a3d4c28197fcc1cd8016353e6887ffaa0 +EBUILD libarchive-2.7.0-r1.ebuild 2303 RMD160 7b783778950b4e010428df567355230440abeaed SHA1 bfbad7c60f505952e678ede2326882deaa0d8449 SHA256 ec16eb6c52d93b003b80e86519a3ede64aca8a5db3f6513c12336fe2f402fa89 EBUILD libarchive-2.7.0.ebuild 2262 RMD160 3a3bc5873a1e4a2fd1093f5fca7e0621b7fe96e0 SHA1 b7ea6e33b9cbdc9c3aff0aed213d958b75c1b85d SHA256 966ebcf176ed359cac912808af4c96eb2548608b605596929c8de0739a48f708 -MISC ChangeLog 21749 RMD160 4f41f4d2a0f69027dd3e1deff61825f189acf425 SHA1 ca2c4c693f87e4e3478d8ceadce4dc94dee0fad0 SHA256 b649ee26f30d44f85a9329d55cd98d7cddb9baaa0b6ebcd8c65d0168268da175 +MISC ChangeLog 22017 RMD160 ae59331680887c323d4b6eb127a12238579a7164 SHA1 7c6e1a169856df6a917fc766a8d439541e8ffc9c SHA256 2fa5a925e5753c2f8bc29d884e7e48dc52118c505a52ecba7cdb9e1645268ade MISC metadata.xml 872 RMD160 895e9e13d46da8427f2695bc24aaefb16a5d8195 SHA1 e64e4be1a494de7e45305a7085b82b4b551c9c6f SHA256 c736f7829f1a1571706230bd5ec245389317faa2888300a1b74f440307f2c6e9 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.11 (GNU/Linux) + +iEYEARECAAYFAkoMl18ACgkQAiZjviIA2Xic7wCfT9chV90GlDAm20iBYH5cjXoS +5IcAoKivjajT0dIO2ObKNtLyl9v1rkH8 +=O6h8 +-----END PGP SIGNATURE----- diff --git a/app-arch/libarchive/files/libarchive-2.7.0-pipe.patch b/app-arch/libarchive/files/libarchive-2.7.0-pipe.patch new file mode 100644 index 000000000000..3b872b5ae534 --- /dev/null +++ b/app-arch/libarchive/files/libarchive-2.7.0-pipe.patch @@ -0,0 +1,113 @@ +--- head/lib/libarchive/archive_read_open_filename.c 2009/05/07 21:51:13 191903 ++++ head/lib/libarchive/archive_read_open_filename.c 2009/05/07 23:01:03 191904 +@@ -85,19 +85,31 @@ + int fd; + +- if (filename == NULL || filename[0] == '\0') +- return (archive_read_open_fd(a, 0, block_size)); +- +- fd = open(filename, O_RDONLY | O_BINARY); +- if (fd < 0) { +- archive_set_error(a, errno, "Failed to open '%s'", filename); +- return (ARCHIVE_FATAL); ++ if (filename == NULL || filename[0] == '\0') { ++ /* We used to invoke archive_read_open_fd(a,0,block_size) ++ * here, but that doesn't (and shouldn't) handle the ++ * end-of-file flush when reading stdout from a pipe. ++ * Basically, read_open_fd() is intended for folks who ++ * are willing to handle such details themselves. This ++ * API is intended to be a little smarter for folks who ++ * want easy handling of the common case. ++ */ ++ filename = ""; /* Normalize NULL to "" */ ++ fd = 0; ++ } else { ++ fd = open(filename, O_RDONLY | O_BINARY); ++ if (fd < 0) { ++ archive_set_error(a, errno, ++ "Failed to open '%s'", filename); ++ return (ARCHIVE_FATAL); ++ } + } + if (fstat(fd, &st) != 0) { + archive_set_error(a, errno, "Can't stat '%s'", filename); + return (ARCHIVE_FATAL); + } + +- mine = (struct read_file_data *)malloc(sizeof(*mine) + strlen(filename)); ++ mine = (struct read_file_data *)calloc(1, ++ sizeof(*mine) + strlen(filename)); + b = malloc(block_size); + if (mine == NULL || b == NULL) { + archive_set_error(a, ENOMEM, "No memory"); +@@ -117,15 +129,20 @@ + if (S_ISREG(st.st_mode)) { + archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino); + /* +- * Skip is a performance optimization for anything +- * that supports lseek(). Generally, that only +- * includes regular files and possibly raw disk +- * devices, but there's no good portable way to detect +- * raw disks. ++ * Enabling skip here is a performance optimization ++ * for anything that supports lseek(). On FreeBSD ++ * (and probably many other systems), only regular ++ * files and raw disk devices support lseek() (on ++ * other input types, lseek() returns success but ++ * doesn't actually change the file pointer, which ++ * just completely screws up the position-tracking ++ * logic). In addition, I've yet to find a portable ++ * way to determine if a device is a raw disk device. ++ * So I don't see a way to do much better than to only ++ * enable this optimization for regular files. + */ + mine->can_skip = 1; +- } else +- mine->can_skip = 0; ++ } + return (archive_read_open2(a, mine, + NULL, file_read, file_skip, file_close)); + } +@@ -139,8 +156,11 @@ + *buff = mine->buffer; + bytes_read = read(mine->fd, mine->buffer, mine->block_size); + if (bytes_read < 0) { +- archive_set_error(a, errno, "Error reading '%s'", +- mine->filename); ++ if (mine->filename[0] == '\0') ++ archive_set_error(a, errno, "Error reading stdin"); ++ else ++ archive_set_error(a, errno, "Error reading '%s'", ++ mine->filename); + } + return (bytes_read); + } +@@ -190,8 +210,15 @@ + * likely caused by a programmer error (too large request) + * or a corrupted archive file. + */ +- archive_set_error(a, errno, "Error seeking in '%s'", +- mine->filename); ++ if (mine->filename[0] == '\0') ++ /* ++ * Should never get here, since lseek() on stdin ought ++ * to return an ESPIPE error. ++ */ ++ archive_set_error(a, errno, "Error seeking in stdin"); ++ else ++ archive_set_error(a, errno, "Error seeking in '%s'", ++ mine->filename); + return (-1); + } + return (new_offset - old_offset); +@@ -225,7 +252,9 @@ + mine->block_size); + } while (bytesRead > 0); + } +- close(mine->fd); ++ /* If a named file was opened, then it needs to be closed. */ ++ if (mine->filename[0] != '\0') ++ close(mine->fd); + } + free(mine->buffer); + free(mine); diff --git a/app-arch/libarchive/libarchive-2.7.0-r1.ebuild b/app-arch/libarchive/libarchive-2.7.0-r1.ebuild new file mode 100644 index 000000000000..5d9184cfa7eb --- /dev/null +++ b/app-arch/libarchive/libarchive-2.7.0-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/libarchive-2.7.0-r1.ebuild,v 1.1 2009/05/14 22:12:41 flameeyes Exp $ + +EAPI=1 + +inherit eutils libtool toolchain-funcs flag-o-matic + +DESCRIPTION="BSD tar command" +HOMEPAGE="http://people.freebsd.org/~kientzle/libarchive" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz + http://people.freebsd.org/~kientzle/libarchive/src/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="static acl xattr kernel_linux +bzip2 +lzma +zlib" + +COMPRESS_LIBS_DEPEND="lzma? ( app-arch/lzma-utils ) + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib )" + +RDEPEND="!dev-libs/libarchive + kernel_linux? ( + acl? ( sys-apps/acl ) + xattr? ( sys-apps/attr ) + ) + !static? ( ${COMPRESS_LIBS_DEPEND} )" +DEPEND="${RDEPEND} + ${COMPRESS_LIBS_DEPEND} + kernel_linux? ( sys-fs/e2fsprogs + virtual/os-headers )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-fortified-sources.patch + epatch "${FILESDIR}"/${P}-pipe.patch + + elibtoolize + epunt_cxx +} + +src_compile() { + local myconf + + if ! use static ; then + myconf="--enable-bsdtar=shared --enable-bsdcpio=shared" + fi + + # Check for need of this in 2.7.1 and later, on 2.7.0, -Werror was + # added to the final release, but since it's done in the + # Makefile.am we can just work it around this way. + append-flags -Wno-error + + # We disable lzma because we don't have liblzma (not liblzmadec!) + # currently. + econf --bindir=/bin \ + --enable-bsdtar --enable-bsdcpio \ + $(use_enable acl) $(use_enable xattr) \ + $(use_with zlib) \ + $(use_with bzip2 bz2lib) $(use_with lzma lzmadec) \ + --without-lzma \ + ${myconf} \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + + # Create tar symlink for FreeBSD + if [[ ${CHOST} == *-freebsd* ]]; then + dosym bsdtar /bin/tar + dosym bsdtar.1 /usr/share/man/man1/tar.1 + # We may wish to switch to symlink bsdcpio to cpio too one day + fi + + dodoc NEWS README + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir) + gen_usr_ldscript libarchive.so +} |