diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-06-18 11:52:18 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-06-18 11:52:18 +0000 |
commit | 326451395a9b9ffb0684ee33da1336468a2456e3 (patch) | |
tree | 8e3d06ff595f43e1d044c54711fe86d45961bdf9 /app-arch | |
parent | ia64 stable wrt #182398 (diff) | |
download | gentoo-2-326451395a9b9ffb0684ee33da1336468a2456e3.tar.gz gentoo-2-326451395a9b9ffb0684ee33da1336468a2456e3.tar.bz2 gentoo-2-326451395a9b9ffb0684ee33da1336468a2456e3.zip |
Revision bump to make rpm2targz compatible with non-bash shells. See bug #168253 by Emanuele Bagnaschi; thanks to Emanuele Giaquinta (exg) for the suggestions too. As I'm here, I've also removed the warnings during build and the QA notice about poor programming practices.
(Portage version: 2.1.2.9)
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/rpm2targz/ChangeLog | 12 | ||||
-rw-r--r-- | app-arch/rpm2targz/files/digest-rpm2targz-9.0-r6 | 3 | ||||
-rw-r--r-- | app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch | 22 | ||||
-rw-r--r-- | app-arch/rpm2targz/files/rpm2targz-9.0-warnings.patch | 27 | ||||
-rw-r--r-- | app-arch/rpm2targz/rpm2targz-9.0-r6.ebuild | 56 |
5 files changed, 119 insertions, 1 deletions
diff --git a/app-arch/rpm2targz/ChangeLog b/app-arch/rpm2targz/ChangeLog index 18922e923ab4..25b7880db264 100644 --- a/app-arch/rpm2targz/ChangeLog +++ b/app-arch/rpm2targz/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-arch/rpm2targz # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm2targz/ChangeLog,v 1.53 2007/01/21 17:02:28 eroyf Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm2targz/ChangeLog,v 1.54 2007/06/18 11:52:18 flameeyes Exp $ + +*rpm2targz-9.0-r6 (18 Jun 2007) + + 18 Jun 2007; Diego Pettenò <flameeyes@gentoo.org> + +files/rpm2targz-9.0-sh.patch, +files/rpm2targz-9.0-warnings.patch, + +rpm2targz-9.0-r6.ebuild: + Revision bump to make rpm2targz compatible with non-bash shells. See bug + #168253 by Emanuele Bagnaschi; thanks to Emanuele Giaquinta (exg) for the + suggestions too. As I'm here, I've also removed the warnings during build + and the QA notice about poor programming practices. 21 Jan 2007; Alexander H. Færøy <eroyf@gentoo.org> rpm2targz-9.0-r5.ebuild: diff --git a/app-arch/rpm2targz/files/digest-rpm2targz-9.0-r6 b/app-arch/rpm2targz/files/digest-rpm2targz-9.0-r6 new file mode 100644 index 000000000000..338d1be8e9d6 --- /dev/null +++ b/app-arch/rpm2targz/files/digest-rpm2targz-9.0-r6 @@ -0,0 +1,3 @@ +MD5 7b8ba680dcbe7e1e4e349698400bcea6 rpm2targz-9.0.tar.gz 2639 +RMD160 443f405a17dc6fd4128ed98e2aeb0d6cb6a3a8bf rpm2targz-9.0.tar.gz 2639 +SHA256 ddc2a8728edaf137f887a7cf0404c46df1454c758052e9323ec878fa0b2c9c56 rpm2targz-9.0.tar.gz 2639 diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch new file mode 100644 index 000000000000..c78c9ca6b22f --- /dev/null +++ b/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch @@ -0,0 +1,22 @@ +Index: work/rpm2targz +=================================================================== +--- work.orig/rpm2targz ++++ work/rpm2targz +@@ -23,7 +23,7 @@ + + # debug switch to allow to bypass use of rpm2cpio provided by the rpm package + USERPM2CPIO=true +-[ "$TMPDIR" == "" ] && TMPDIR=/tmp ++[ "$TMPDIR" = "" ] && TMPDIR=/tmp + if [ ! -d "$TMPDIR" ]; then + echo "TMPDIR=$TMPDIR is not a dir" > /dev/stderr + exit 1 +@@ -88,7 +88,7 @@ for i in $* ; do + PAYLOADOFFSET=`rpmoffset < $i` + #identify compression + PAYLOADHEAD=`dd ibs=${PAYLOADOFFSET} skip=1 if=$i 2> /dev/null | dd bs=10 count=1 2> /dev/null` +- if echo ${PAYLOADHEAD} | grep -e $'^\037\213' > /dev/null ; then ++ if echo ${PAYLOADHEAD} | od -c | grep '037.213' > /dev/null ; then + echo "found gzip magic bytes" + decomp="gzip" + elif echo ${PAYLOADHEAD} | grep -e "^BZh" > /dev/null ; then diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-warnings.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-warnings.patch new file mode 100644 index 000000000000..301b772fb499 --- /dev/null +++ b/app-arch/rpm2targz/files/rpm2targz-9.0-warnings.patch @@ -0,0 +1,27 @@ +Index: work/rpmoffset.c +=================================================================== +--- work.orig/rpmoffset.c ++++ work/rpmoffset.c +@@ -5,6 +5,7 @@ + /* Wouldn't it be a lot more sane if we could just untar these things? */ + + #include <stdlib.h> ++#include <stdio.h> + + /* These offsets keep getting bigger, so we're going to just bite a 2MB */ + /* chunk of RAM right away so that we have enough. Yeah, horrible */ +@@ -19,12 +20,12 @@ main() + { + if (*p == '\037' && p[1] == '\213' && p[2] == '\010') + { +- printf("%d\n",p - buff); ++ printf("%ld\n",p - buff); + exit(0); + } + else if (*p == 'B' && p[1] == 'Z' && p[2] == 'h' ) + { +- printf("%d\n",p - buff); ++ printf("%ld\n",p - buff); + exit(0); + } + } diff --git a/app-arch/rpm2targz/rpm2targz-9.0-r6.ebuild b/app-arch/rpm2targz/rpm2targz-9.0-r6.ebuild new file mode 100644 index 000000000000..0f5a2946849a --- /dev/null +++ b/app-arch/rpm2targz/rpm2targz-9.0-r6.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm2targz/rpm2targz-9.0-r6.ebuild,v 1.1 2007/06/18 11:52:18 flameeyes Exp $ + +inherit toolchain-funcs eutils + +DESCRIPTION="Convert a .rpm file to a .tar.gz archive" +HOMEPAGE="http://www.slackware.com/config/packages.php" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="" + +# NOTE: rpm2targz autodetects rpm2cpio at runtime, and uses it if available, +# so we don't explicitly set it as a dependency. +DEPEND="app-arch/cpio + sys-apps/file" +RDEPEND="${DEPEND} + userland_GNU? ( + sys-apps/util-linux + sys-apps/which )" + +S=${WORKDIR} + +src_unpack() { + unpack ${A} + cd "${S}" + # makes rpm2targz extract in current dir + epatch "${FILESDIR}"/${P}-gentoo.patch + # adds bzip2 detection (#23249) + epatch "${FILESDIR}"/${P}-bzip2.patch + # adds bzip2 decompression to rpm2targz (#31164) + epatch "${FILESDIR}"/${P}-bzip2_rpm2targz.patch + # secures temp file handling (#96192) + epatch "${FILESDIR}"/${P}-secure_temp_handling.patch + # add supprot for a quicker rpm2tar + epatch "${FILESDIR}"/${P}-rpm2tar.patch + # non-gnu portability with which + epatch "${FILESDIR}"/${P}-portability.patch + # remove bashisms to be compatible with other sh + epatch "${FILESDIR}"/${P}-sh.patch + # remove warnings from the compiler (and QA warnings too) + epatch "${FILESDIR}"/${P}-warnings.patch +} + +src_compile() { + emake rpmoffset CC=$(tc-getCC) || die +} + +src_install() { + dobin rpmoffset rpm2targz || die + dosym rpm2targz /usr/bin/rpm2tar + dodoc rpm2targz.README +} |