aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ipkg-utils/patches
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ipkg-utils/patches')
-rw-r--r--tools/ipkg-utils/patches/100-build_clean.patch36
-rw-r--r--tools/ipkg-utils/patches/110-buildpackage.patch24
-rw-r--r--tools/ipkg-utils/patches/120-build_tar.patch16
-rw-r--r--tools/ipkg-utils/patches/130-tar_wildcards.patch23
-rw-r--r--tools/ipkg-utils/patches/140-portability.patch50
5 files changed, 149 insertions, 0 deletions
diff --git a/tools/ipkg-utils/patches/100-build_clean.patch b/tools/ipkg-utils/patches/100-build_clean.patch
new file mode 100644
index 0000000000..4cff731d5b
--- /dev/null
+++ b/tools/ipkg-utils/patches/100-build_clean.patch
@@ -0,0 +1,36 @@
+diff -ruN ipkg-utils-1.7-old/ipkg-build ipkg-utils-1.7-new/ipkg-build
+--- ipkg-utils-1.7-old/ipkg-build 2004-08-24 04:56:12.000000000 +0200
++++ ipkg-utils-1.7-new/ipkg-build 2004-08-24 04:55:49.000000000 +0200
+@@ -47,6 +47,19 @@
+
+ PKG_ERROR=0
+
++ cvs_dirs=`find . -name 'CVS'`
++ if [ -n "$cvs_dirs" ]; then
++ if [ "$noclean" = "1" ]; then
++ echo "*** Warning: The following CVS directories where found.
++You probably want to remove them: " >&2
++ ls -ld $cvs_dirs
++ echo >&2
++ else
++ echo "*** Removing the following files: $cvs_dirs"
++ rm -rf "$cvs_dirs"
++ fi
++ fi
++
+ tilde_files=`find . -name '*~'`
+ if [ -n "$tilde_files" ]; then
+ if [ "$noclean" = "1" ]; then
+@@ -134,8 +147,12 @@
+
+ for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do
+ if [ -f $script -a ! -x $script ]; then
++ if [ "$noclean" = "1" ]; then
+ echo "*** Error: package script $script is not executable" >&2
+ PKG_ERROR=1
++ else
++ chmod a+x $script
++ fi
+ fi
+ done
+
diff --git a/tools/ipkg-utils/patches/110-buildpackage.patch b/tools/ipkg-utils/patches/110-buildpackage.patch
new file mode 100644
index 0000000000..d0a30489ae
--- /dev/null
+++ b/tools/ipkg-utils/patches/110-buildpackage.patch
@@ -0,0 +1,24 @@
+diff -ruN ipkg-utils-1.7-old/ipkg-buildpackage ipkg-utils-1.7-new/ipkg-buildpackage
+--- ipkg-utils-1.7-old/ipkg-buildpackage 2001-07-26 17:36:36.000000000 +0200
++++ ipkg-utils-1.7-new/ipkg-buildpackage 2004-07-05 19:46:24.000000000 +0200
+@@ -30,8 +30,9 @@
+
+ set -e
+
+-#SCRIPTDIR=/usr/local/bin
+-SCRIPTDIR=/other/kurth/ipaq-dev/familiar/dist/ipkg/util/
++SCRIPTDIR=/usr/local/bin
++
++IPKG_BUILD_OPTIONS=$*
+
+ SCRIPTNAME=`basename $0`
+
+@@ -212,7 +213,7 @@
+ # build the ipk package
+ owd=`pwd`
+ cd ..
+-ipkg-build /tmp/${pkg} || exit 1
++ipkg-build $IPKG_BUILD_OPTIONS /tmp/${pkg} || exit 1
+
+ rm -rf /tmp/${pkg}
+
diff --git a/tools/ipkg-utils/patches/120-build_tar.patch b/tools/ipkg-utils/patches/120-build_tar.patch
new file mode 100644
index 0000000000..441d3adf04
--- /dev/null
+++ b/tools/ipkg-utils/patches/120-build_tar.patch
@@ -0,0 +1,16 @@
+This patch from aorlinsk fixes an issue with order in options passed to tar
+
+ http://openwrt.org/forum/viewtopic.php?pid=8332#p8332
+
+
+--- ipkg-utils-1.7/ipkg-build.orig 2005-06-14 23:48:36.000000000 +0200
++++ ipkg-utils-1.7/ipkg-build 2005-06-14 23:50:03.000000000 +0200
+@@ -243,7 +243,7 @@
+ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs -czf $tmp_dir/data.tar.gz . -X $tmp_dir/tarX )
++( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
+ ( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
diff --git a/tools/ipkg-utils/patches/130-tar_wildcards.patch b/tools/ipkg-utils/patches/130-tar_wildcards.patch
new file mode 100644
index 0000000000..80a7d1db61
--- /dev/null
+++ b/tools/ipkg-utils/patches/130-tar_wildcards.patch
@@ -0,0 +1,23 @@
+--- ipkg-utils-1.7/ipkg.py.orig 2006-06-29 14:16:00.000000000 +0200
++++ ipkg-utils-1.7/ipkg.py 2006-06-29 14:36:01.000000000 +0200
+@@ -93,9 +93,9 @@
+ self.filename = os.path.basename(fn)
+ ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,))
+ if self.isdeb:
+- control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r")
++ control = os.popen("ar p "+fn+" control.tar.gz | tar xzO --wildcards -f - '*control'","r")
+ else:
+- control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r")
++ control = os.popen("tar xzO --wildcards -f "+fn+" '*control.tar.gz' | tar xzO --wildcards -f - '*control'","r")
+ line = control.readline()
+ while 1:
+ if not line: break
+@@ -122,7 +122,7 @@
+ if self.isdeb:
+ data = os.popen("ar p "+fn+" data.tar.gz | tar tfz -","r")
+ else:
+- data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r")
++ data = os.popen("tar xzO --wildcards -f "+fn+" '*data.tar.gz' | tar tfz -","r")
+ while 1:
+ line = data.readline()
+ if not line: break
diff --git a/tools/ipkg-utils/patches/140-portability.patch b/tools/ipkg-utils/patches/140-portability.patch
new file mode 100644
index 0000000000..5ba06b3a45
--- /dev/null
+++ b/tools/ipkg-utils/patches/140-portability.patch
@@ -0,0 +1,50 @@
+diff -ur ipkg.old/ipkg-build ipkg.dev/ipkg-build
+--- ipkg.old/ipkg-build Tue Oct 10 22:52:58 2006
++++ ipkg.dev/ipkg-build Tue Oct 10 22:56:32 2006
+@@ -11,6 +11,8 @@
+
+ version=1.0
+
++TAR="${TAR:-$(which tar)}"
++
+ ipkg_extract_value() {
+ sed -e "s/^[^:]*:[[:space:]]*//"
+ }
+@@ -184,7 +186,7 @@
+ g ) group=$OPTARG
+ ogargs="$ogargs --group=$group"
+ ;;
+- c ) outer=tar
++ c ) outer=$TAR
+ ;;
+ C ) noclean=1
+ ;;
+@@ -243,8 +245,8 @@
+ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
+-( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . )
++( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
++( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -254,7 +256,7 @@
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
+ else
+- ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
++ ( cd $tmp_dir && $TAR -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz
+diff -ur ipkg.old/ipkg-make-index ipkg.dev/ipkg-make-index
+--- ipkg.old/ipkg-make-index Tue Oct 10 22:52:58 2006
++++ ipkg.dev/ipkg-make-index Tue Oct 10 22:57:53 2006
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python
+ # $Id: ipkg-make-index,v 1.20 2003/10/30 02:32:09 jamey Exp $
+
+ import sys, os, posixpath