diff options
Diffstat (limited to 'app-arch/rpm2targz/files')
9 files changed, 0 insertions, 332 deletions
diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2.patch deleted file mode 100644 index 5803eac4d007..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- rpmoffset.c -+++ rpmoffset.c -@@ -16,8 +15,17 @@ - { - char *buff = malloc(RPMBUFSIZ),*eb,*p; - for (p = buff, eb = buff + read(0,buff,RPMBUFSIZ); p < eb; p++) -- if (*p == '\037' && p[1] == '\213' && p[2] == '\010') -- printf("%d\n",p - buff), -+ { -+ if (*p == '\037' && p[1] == '\213' && p[2] == '\010') -+ { -+ printf("%d\n",p - buff); - exit(0); -+ } -+ else if (*p == 'B' && p[1] == 'Z' && p[2] == 'h' ) -+ { -+ printf("%d\n",p - buff); -+ exit(0); -+ } -+ } - exit(1); - } diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2_rpm2targz.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2_rpm2targz.patch deleted file mode 100644 index 4204d82a654e..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-bzip2_rpm2targz.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- rpm2targz 2003-10-15 00:46:48.000000000 +0200 -+++ rpm2targz.new 2003-10-15 01:39:00.000000000 +0200 -@@ -21,6 +21,8 @@ - # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - -+# debug switch to allow to bypass use of rpm2cpio provided by the rpm package -+USERPM2CPIO=true - if [ "$TMPDIR" = "" ]; then - TMPDIR=/tmp - fi -@@ -46,7 +48,7 @@ - fi - for i in $* ; do - if [ ! "$1" = "$*" ]; then -- echo -n "Processing file: $i" -+ echo "Processing file: $i" - fi - rm -rf $TMPDIR/rpm2targz$COOKIE # clear the way, just in case of mischief - mkdir $TMPDIR/rpm2targz$COOKIE -@@ -68,7 +70,7 @@ - fi - - ofn=$TMPDIR/rpm2targz$COOKIE/`basename $i .rpm`.cpio -- if which rpm2cpio 1> /dev/null 2> /dev/null ; then -+ if $USERPM2CPIO && which rpm2cpio 1> /dev/null 2> /dev/null ; then - rpm2cpio $i > $ofn 2> /dev/null - if [ ! $? = 0 ]; then - echo "... rpm2cpio failed. (maybe $i is not an RPM?)" -@@ -76,7 +78,31 @@ - continue - fi - else # less reliable than rpm2cpio... -- dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | gzip -dc > $ofn -+ # get offset of start of payload -+ 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 -+ echo "found gzip magic bytes" -+ decomp="gzip" -+ elif echo ${PAYLOADHEAD} | grep -e "^BZh" > /dev/null ; then -+ echo "found bzip magic bytes" -+ decomp="bzip2" -+ else -+ echo " $i - no magic compression identifier found - skipping file" -+ ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ continue -+ fi -+ echo -n " trying to decompress with ${decomp}..." -+ dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | ${decomp} -dc > $ofn 2> /dev/null -+ if [ $? = 0 ]; then -+ echo " OK" -+ else -+ echo " FAILED" -+ echo " $i failed to decompress - skipping file" -+ ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ continue -+ fi - fi - DEST=$TMPDIR/rpm2targz$COOKIE - #if [ "$isSource" = "1" ]; then diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-gentoo.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-gentoo.patch deleted file mode 100644 index 17d01adea573..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- rpm2targz 2003-06-21 13:25:33.000000000 +0100 -+++ rpm2targz 2003-06-21 14:26:30.000000000 +0100 -@@ -79,9 +79,9 @@ - dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | gzip -dc > $ofn - fi - DEST=$TMPDIR/rpm2targz$COOKIE -- if [ "$isSource" = "1" ]; then -- DEST=$DEST/$(basename $(basename $i .rpm) .src) -- fi -+ #if [ "$isSource" = "1" ]; then -+ # DEST=$DEST/$(basename $(basename $i .rpm) .src) -+ #fi - mkdir -p $DEST - ( cd $DEST - cpio --extract --preserve-modification-time --make-directories < $ofn 1> /dev/null 2> /dev/null diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-increase-RPMBUFSIZ.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-increase-RPMBUFSIZ.patch deleted file mode 100644 index 5d063e9ece41..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-increase-RPMBUFSIZ.patch +++ /dev/null @@ -1,14 +0,0 @@ -Increase RPMBUFSIZ to increase the possibility to find magic compression identifier -http://bugs.gentoo.org/187219#c13 - ---- rpmoffset.c -+++ rpmoffset.c -@@ -10,7 +10,7 @@ - /* chunk of RAM right away so that we have enough. Yeah, horrible */ - /* quick and dirty implementation, but hey -- it gets the job done. */ - --#define RPMBUFSIZ 2097152 -+#define RPMBUFSIZ 3145728 - - main() - { diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch deleted file mode 100644 index 9ab75e63685d..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- rpm2targz 2006-04-24 14:55:23.000000000 +0200 -+++ rpm2targz 2006-04-24 15:02:02.000000000 +0200 -@@ -58,7 +58,7 @@ - - # Determine if this is a source or binary RPM. - # If we have getrpmtype, use that. Otherwise, try "file". -- if which getrpmtype 1> /dev/null 2> /dev/null; then -+ if command -v getrpmtype 1> /dev/null 2> /dev/null; then - if getrpmtype -n $i | grep source 1> /dev/null 2> /dev/null ; then - isSource=1 - else -@@ -73,7 +73,7 @@ - fi - - ofn=${WORKDIR}/`basename $i .rpm`.cpio -- if $USERPM2CPIO && which rpm2cpio 1> /dev/null 2> /dev/null ; then -+ if $USERPM2CPIO && command -v rpm2cpio 1> /dev/null 2> /dev/null ; then - rpm2cpio $i > $ofn 2> /dev/null - if [ ! $? = 0 ]; then - echo "... rpm2cpio failed. (maybe $i is not an RPM?)" -@@ -113,7 +113,7 @@ - #fi - mkdir -p $DEST - ( cd $DEST -- cpio --extract --preserve-modification-time --make-directories < $ofn 1> /dev/null 2> /dev/null -+ cpio -i -m -d < $ofn 1> /dev/null 2> /dev/null - rm -f $ofn - find . -type d -perm 700 -exec chmod 755 {} \; ) - ( cd ${WORKDIR} ; tar cf - . ) > `basename $i .rpm`.tar diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch deleted file mode 100644 index 2dee633816f6..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch +++ /dev/null @@ -1,41 +0,0 @@ -Add support for turning rpm's into tar's and skipping the gzip stage ... -Much faster on slower boxes and useful when you just want to rip apart -a rpm and look at the insides. - ---- rpm2targz -+++ rpm2targz -@@ -35,6 +35,7 @@ - exit 1 - fi - -+BASENAME="`basename $0`" - if [ "$1" = "" ]; then - echo "$0: Converts RPM format to standard GNU tar + GNU zip format." - if [ -e /etc/slackware-version ]; then -@@ -44,8 +45,10 @@ - fi - echo - echo "Usage: $0 <file.rpm>" -- if [ "`basename $0`" = "rpm2tgz" ]; then -+ if [ "$BASENAME" = "rpm2tgz" ]; then - echo " (Outputs \"file.tgz\")" -+ elif [ "$BASENAME" = "rpm2tar" ]; then -+ echo " (Outputs \"file.tar\")" - else - echo " (Outputs \"file.tar.gz\")" - fi -@@ -118,9 +121,11 @@ - rm -f $ofn - find . -type d -perm 700 -exec chmod 755 {} \; ) - ( cd ${WORKDIR} ; tar cf - . ) > `basename $i .rpm`.tar -- gzip -9 `basename $i .rpm`.tar -- if [ "`basename $0`" = "rpm2tgz" ]; then -- mv `basename $i .rpm`.tar.gz `basename $i .rpm`.tgz -+ if [ "$BASENAME" != "rpm2tar" ]; then -+ gzip -9 `basename $i .rpm`.tar -+ if [ "$BASENAME" = "rpm2tgz" ]; then -+ mv `basename $i .rpm`.tar.gz `basename $i .rpm`.tgz -+ fi - fi - ( rm -rf "${WORKDIR}/*" ) - echo diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-secure_temp_handling.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-secure_temp_handling.patch deleted file mode 100644 index 7d2b9f22b163..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-secure_temp_handling.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- rpm2targz 2006-04-24 14:36:40.000000000 +0200 -+++ rpm2targz 2006-04-24 14:37:08.000000000 +0200 -@@ -23,20 +23,24 @@ - - # debug switch to allow to bypass use of rpm2cpio provided by the rpm package - USERPM2CPIO=true --if [ "$TMPDIR" = "" ]; then -- TMPDIR=/tmp -+[ "$TMPDIR" == "" ] && TMPDIR=/tmp -+if [ ! -d "$TMPDIR" ]; then -+ echo "TMPDIR=$TMPDIR is not a dir" > /dev/stderr -+ exit 1 - fi --# If mcookie is available, use it for better /tmp security. --if [ -x `which mcookie` ]; then -- COOKIE=`mcookie` --else -- COOKIE=$$ -+WORKDIR=`mktemp -d $TMPDIR/$$XXXXXX` -+if [ $? != 0 ]; then -+ echo "Failed to make tmp workdir for file i/o conversion" > /dev/stderr -+ exit 1 - fi -+ - if [ "$1" = "" ]; then - echo "$0: Converts RPM format to standard GNU tar + GNU zip format." -- echo " (view converted packages with \"less\", install and remove" -- echo " with \"installpkg\", \"removepkg\", \"pkgtool\", or manually" -- echo " with \"tar\")" -+ if [ -e /etc/slackware-version ]; then -+ echo " (view converted packages with \"less\", install and remove" -+ echo " with \"installpkg\", \"removepkg\", \"pkgtool\", or manually" -+ echo " with \"tar\")" -+ fi - echo - echo "Usage: $0 <file.rpm>" - if [ "`basename $0`" = "rpm2tgz" ]; then -@@ -50,8 +54,7 @@ - if [ ! "$1" = "$*" ]; then - echo "Processing file: $i" - fi -- rm -rf $TMPDIR/rpm2targz$COOKIE # clear the way, just in case of mischief -- mkdir $TMPDIR/rpm2targz$COOKIE -+ rm -rf ${WORKDIR}/* || exit 1 ; # clear the way, just in case of mischief - - # Determine if this is a source or binary RPM. - # If we have getrpmtype, use that. Otherwise, try "file". -@@ -69,12 +72,12 @@ - fi - fi - -- ofn=$TMPDIR/rpm2targz$COOKIE/`basename $i .rpm`.cpio -+ ofn=${WORKDIR}/`basename $i .rpm`.cpio - if $USERPM2CPIO && which rpm2cpio 1> /dev/null 2> /dev/null ; then - rpm2cpio $i > $ofn 2> /dev/null - if [ ! $? = 0 ]; then - echo "... rpm2cpio failed. (maybe $i is not an RPM?)" -- ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ ( rm -rf "${WORKDIR}/*" ) - continue - fi - else # less reliable than rpm2cpio... -@@ -90,7 +93,7 @@ - decomp="bzip2" - else - echo " $i - no magic compression identifier found - skipping file" -- ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ ( rm -rf "${WORKDIR}/*" ) - continue - fi - echo -n " trying to decompress with ${decomp}..." -@@ -100,11 +103,11 @@ - else - echo " FAILED" - echo " $i failed to decompress - skipping file" -- ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ ( rm -rf "${WORKDIR}/*" ) - continue - fi - fi -- DEST=$TMPDIR/rpm2targz$COOKIE -+ DEST=${WORKDIR} - #if [ "$isSource" = "1" ]; then - # DEST=$DEST/$(basename $(basename $i .rpm) .src) - #fi -@@ -113,11 +116,12 @@ - cpio --extract --preserve-modification-time --make-directories < $ofn 1> /dev/null 2> /dev/null - rm -f $ofn - find . -type d -perm 700 -exec chmod 755 {} \; ) -- ( cd $TMPDIR/rpm2targz$COOKIE ; tar cf - . ) > `basename $i .rpm`.tar -+ ( cd ${WORKDIR} ; tar cf - . ) > `basename $i .rpm`.tar - gzip -9 `basename $i .rpm`.tar - if [ "`basename $0`" = "rpm2tgz" ]; then - mv `basename $i .rpm`.tar.gz `basename $i .rpm`.tgz - fi -- ( cd $TMPDIR ; rm -rf rpm2targz$COOKIE ) -+ ( rm -rf "${WORKDIR}/*" ) - echo - done -+rm -rf ${WORKDIR} diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch deleted file mode 100644 index c78c9ca6b22f..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-sh.patch +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 301b772fb499..000000000000 --- a/app-arch/rpm2targz/files/rpm2targz-9.0-warnings.patch +++ /dev/null @@ -1,27 +0,0 @@ -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); - } - } |