aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ipkg-utils
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /tools/ipkg-utils
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'tools/ipkg-utils')
-rw-r--r--tools/ipkg-utils/.svn/entries65
-rw-r--r--tools/ipkg-utils/.svn/prop-base/Makefile.svn-base5
-rw-r--r--tools/ipkg-utils/.svn/text-base/Makefile.svn-base32
-rw-r--r--tools/ipkg-utils/Makefile32
-rw-r--r--tools/ipkg-utils/patches/.svn/entries470
-rw-r--r--tools/ipkg-utils/patches/.svn/prop-base/100-build_clean.patch.svn-base5
-rw-r--r--tools/ipkg-utils/patches/.svn/prop-base/110-buildpackage.patch.svn-base5
-rw-r--r--tools/ipkg-utils/patches/.svn/prop-base/120-build_tar.patch.svn-base5
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/100-build_clean.patch.svn-base35
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/110-buildpackage.patch.svn-base23
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/111-buildpackage_conffiles.patch.svn-base11
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/120-build_tar.patch.svn-base36
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/130-tar_wildcards.patch.svn-base23
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/140-portability.patch.svn-base19
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/150-uppercase_letters.patch.svn-base22
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/160-find.patch.svn-base39
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/170-resolve_conffiles.patch.svn-base23
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/180-add_installed_size.patch.svn-base14
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/190-preserve_permissions.patch.svn-base12
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/200-force_gnu_format.patch.svn-base27
-rw-r--r--tools/ipkg-utils/patches/.svn/text-base/210-remove_field_checks.patch.svn-base36
-rw-r--r--tools/ipkg-utils/patches/100-build_clean.patch35
-rw-r--r--tools/ipkg-utils/patches/110-buildpackage.patch23
-rw-r--r--tools/ipkg-utils/patches/111-buildpackage_conffiles.patch11
-rw-r--r--tools/ipkg-utils/patches/120-build_tar.patch36
-rw-r--r--tools/ipkg-utils/patches/130-tar_wildcards.patch23
-rw-r--r--tools/ipkg-utils/patches/140-portability.patch19
-rw-r--r--tools/ipkg-utils/patches/150-uppercase_letters.patch22
-rw-r--r--tools/ipkg-utils/patches/160-find.patch39
-rw-r--r--tools/ipkg-utils/patches/170-resolve_conffiles.patch23
-rw-r--r--tools/ipkg-utils/patches/180-add_installed_size.patch14
-rw-r--r--tools/ipkg-utils/patches/190-preserve_permissions.patch12
-rw-r--r--tools/ipkg-utils/patches/200-force_gnu_format.patch27
-rw-r--r--tools/ipkg-utils/patches/210-remove_field_checks.patch36
34 files changed, 1259 insertions, 0 deletions
diff --git a/tools/ipkg-utils/.svn/entries b/tools/ipkg-utils/.svn/entries
new file mode 100644
index 0000000..b1d36d5
--- /dev/null
+++ b/tools/ipkg-utils/.svn/entries
@@ -0,0 +1,65 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/tools/ipkg-utils
+svn://svn.openwrt.org/openwrt
+
+
+
+2012-12-22T19:56:17.837587Z
+34870
+nbd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+patches
+dir
+
+Makefile
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+cc2ede46ff427b9deb3aae7d26ae8b6a
+2011-01-16T22:16:49.222509Z
+25021
+jow
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+744
+
diff --git a/tools/ipkg-utils/.svn/prop-base/Makefile.svn-base b/tools/ipkg-utils/.svn/prop-base/Makefile.svn-base
new file mode 100644
index 0000000..bdbd305
--- /dev/null
+++ b/tools/ipkg-utils/.svn/prop-base/Makefile.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:eol-style
+V 6
+native
+END
diff --git a/tools/ipkg-utils/.svn/text-base/Makefile.svn-base b/tools/ipkg-utils/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..7782609
--- /dev/null
+++ b/tools/ipkg-utils/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ipkg-utils
+PKG_VERSION:=1.7
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://handhelds.org/packages/ipkg-utils/
+PKG_MD5SUM:=da3e3ef772973d7370a6ac95f0fef9b8
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Install
+ $(INSTALL_BIN) \
+ $(HOST_BUILD_DIR)/ipkg-build \
+ $(HOST_BUILD_DIR)/ipkg-buildpackage \
+ $(HOST_BUILD_DIR)/ipkg-make-index \
+ $(HOST_BUILD_DIR)/ipkg.py \
+ $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+ rm -f $(STAGING_DIR)/etc/ipkg.conf
+ rm -f $(STAGING_DIR_HOST)/bin/ipkg*
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/ipkg-utils/Makefile b/tools/ipkg-utils/Makefile
new file mode 100644
index 0000000..7782609
--- /dev/null
+++ b/tools/ipkg-utils/Makefile
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ipkg-utils
+PKG_VERSION:=1.7
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://handhelds.org/packages/ipkg-utils/
+PKG_MD5SUM:=da3e3ef772973d7370a6ac95f0fef9b8
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Install
+ $(INSTALL_BIN) \
+ $(HOST_BUILD_DIR)/ipkg-build \
+ $(HOST_BUILD_DIR)/ipkg-buildpackage \
+ $(HOST_BUILD_DIR)/ipkg-make-index \
+ $(HOST_BUILD_DIR)/ipkg.py \
+ $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+ rm -f $(STAGING_DIR)/etc/ipkg.conf
+ rm -f $(STAGING_DIR_HOST)/bin/ipkg*
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/ipkg-utils/patches/.svn/entries b/tools/ipkg-utils/patches/.svn/entries
new file mode 100644
index 0000000..ad32500
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/entries
@@ -0,0 +1,470 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/tools/ipkg-utils/patches
+svn://svn.openwrt.org/openwrt
+
+
+
+2012-12-22T19:56:17.837587Z
+34870
+nbd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+111-buildpackage_conffiles.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+354b206d0532b0aafd28e401d8c890d8
+2009-02-21T14:46:03.215753Z
+14589
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+288
+
+130-tar_wildcards.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+d3c5aa325da2af5646f2eeb14c5f1179
+2009-02-21T14:46:03.215753Z
+14589
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1198
+
+140-portability.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+4f98af9931ce2db95228d6369ea4b921
+2009-02-21T14:46:03.215753Z
+14589
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+362
+
+160-find.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+28e88df95c7710c71ff05518bae5b0bb
+2009-02-21T14:46:03.215753Z
+14589
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1013
+
+120-build_tar.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+ee24a53f2f75bdbc8f79b7eae5ded139
+2009-04-17T14:32:29.989894Z
+15245
+nico
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1263
+
+180-add_installed_size.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+1cd2d08fd97fff90ed6f3056f411cd9e
+2011-04-13T13:26:26.334137Z
+26642
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+428
+
+110-buildpackage.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+763d1ec61fae9237a3de45882ada9194
+2009-04-17T14:32:29.989894Z
+15245
+nico
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+424
+
+150-uppercase_letters.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+0a500fe7d5a17a74788c56a433b85132
+2009-02-21T14:46:03.215753Z
+14589
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+776
+
+170-resolve_conffiles.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+1ac1f0ebd6fad87905b4c1d006aefc44
+2010-10-05T19:18:15.079999Z
+23256
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+640
+
+190-preserve_permissions.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+063e96bae745197e79f5c00d9d068ff1
+2011-03-21T17:36:50.573646Z
+26258
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+491
+
+200-force_gnu_format.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+e83760728606bd831a8e9a4f43facf39
+2012-11-19T19:29:01.113325Z
+34261
+acinonyx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1146
+
+100-build_clean.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+3f72fbacac6f992ef5e6311f7a126ba9
+2009-04-17T14:32:29.989894Z
+15245
+nico
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+906
+
+210-remove_field_checks.patch
+file
+
+
+
+
+2013-03-17T12:13:23.000000Z
+50ff3061f6189d3e773fc914deb5cdbd
+2012-12-22T19:56:17.837587Z
+34870
+nbd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1352
+
diff --git a/tools/ipkg-utils/patches/.svn/prop-base/100-build_clean.patch.svn-base b/tools/ipkg-utils/patches/.svn/prop-base/100-build_clean.patch.svn-base
new file mode 100644
index 0000000..bdbd305
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/prop-base/100-build_clean.patch.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:eol-style
+V 6
+native
+END
diff --git a/tools/ipkg-utils/patches/.svn/prop-base/110-buildpackage.patch.svn-base b/tools/ipkg-utils/patches/.svn/prop-base/110-buildpackage.patch.svn-base
new file mode 100644
index 0000000..bdbd305
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/prop-base/110-buildpackage.patch.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:eol-style
+V 6
+native
+END
diff --git a/tools/ipkg-utils/patches/.svn/prop-base/120-build_tar.patch.svn-base b/tools/ipkg-utils/patches/.svn/prop-base/120-build_tar.patch.svn-base
new file mode 100644
index 0000000..bdbd305
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/prop-base/120-build_tar.patch.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:eol-style
+V 6
+native
+END
diff --git a/tools/ipkg-utils/patches/.svn/text-base/100-build_clean.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/100-build_clean.patch.svn-base
new file mode 100644
index 0000000..7df272f
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/100-build_clean.patch.svn-base
@@ -0,0 +1,35 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -47,6 +47,19 @@ pkg_appears_sane() {
+
+ 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 @@ You probably want to chown these to a sy
+
+ 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/.svn/text-base/110-buildpackage.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/110-buildpackage.patch.svn-base
new file mode 100644
index 0000000..8e62ee7
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/110-buildpackage.patch.svn-base
@@ -0,0 +1,23 @@
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -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 @@ done
+ # 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/.svn/text-base/111-buildpackage_conffiles.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/111-buildpackage_conffiles.patch.svn-base
new file mode 100644
index 0000000..dacdaae
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/111-buildpackage_conffiles.patch.svn-base
@@ -0,0 +1,11 @@
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -190,7 +190,7 @@ fi
+ mkdir /tmp/${pkg}/CONTROL
+
+ files_required="control"
+-files_optional="preinst postinst prerm postrm"
++files_optional="preinst postinst prerm postrm conffiles"
+
+ for i in ${files_required} ; do
+ file=${CONTROL}/$i
diff --git a/tools/ipkg-utils/patches/.svn/text-base/120-build_tar.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/120-build_tar.patch.svn-base
new file mode 100644
index 0000000..acf6b79
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/120-build_tar.patch.svn-base
@@ -0,0 +1,36 @@
+This patch from aorlinsk fixes an issue with order in options passed to tar
+
+ http://openwrt.org/forum/viewtopic.php?pid=8332#p8332
+
+
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -184,7 +184,7 @@ while getopts "cg:ho:v" opt; do
+ g ) group=$OPTARG
+ ogargs="$ogargs --group=$group"
+ ;;
+- c ) outer=tar
++ c ) outer=$TAR
+ ;;
+ C ) noclean=1
+ ;;
+@@ -243,8 +243,8 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ 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/$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 +254,7 @@ rm -f $pkg_file
+ 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 --git a/tools/ipkg-utils/patches/.svn/text-base/130-tar_wildcards.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/130-tar_wildcards.patch.svn-base
new file mode 100644
index 0000000..ba949c1
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/130-tar_wildcards.patch.svn-base
@@ -0,0 +1,23 @@
+--- a/ipkg.py
++++ b/ipkg.py
+@@ -93,9 +93,9 @@ class Package:
+ 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 @@ class Package:
+ 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/.svn/text-base/140-portability.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/140-portability.patch.svn-base
new file mode 100644
index 0000000..417c409
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/140-portability.patch.svn-base
@@ -0,0 +1,19 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -11,6 +11,8 @@ set -e
+
+ version=1.0
+
++TAR="${TAR:-$(which tar)}"
++
+ ipkg_extract_value() {
+ sed -e "s/^[^:]*:[[:space:]]*//"
+ }
+--- a/ipkg-make-index
++++ b/ipkg-make-index
+@@ -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
diff --git a/tools/ipkg-utils/patches/.svn/text-base/150-uppercase_letters.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/150-uppercase_letters.patch.svn-base
new file mode 100644
index 0000000..cef200d
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/150-uppercase_letters.patch.svn-base
@@ -0,0 +1,22 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -133,7 +133,7 @@ You probably want to chown these to a sy
+ disallowed_filename=`disallowed_field Filename`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+- if echo $pkg | grep '[^a-z0-9.+-]'; then
++ if echo $pkg | grep '[^a-zA-Z0-9_.+-]'; then
+ echo "*** Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" >&2
+ PKG_ERROR=1;
+ fi
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -69,7 +69,7 @@ pkg_appears_sane_control() {
+ required_field Maintainer >/dev/null
+ required_field Description >/dev/null
+
+- if echo $pkg | grep '[^a-z0-9.+-]'; then
++ if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
+ echo "ipkg-build: Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])"
+ PKG_ERROR=1;
+ fi
diff --git a/tools/ipkg-utils/patches/.svn/text-base/160-find.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/160-find.patch.svn-base
new file mode 100644
index 0000000..45ef3c6
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/160-find.patch.svn-base
@@ -0,0 +1,39 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -10,7 +10,8 @@
+ set -e
+
+ version=1.0
+-
++FIND="$(which find)"
++FIND="${FIND:-$(which gfind)}"
+ TAR="${TAR:-$(which tar)}"
+
+ ipkg_extract_value() {
+@@ -49,7 +50,7 @@ pkg_appears_sane() {
+
+ PKG_ERROR=0
+
+- cvs_dirs=`find . -name 'CVS'`
++ cvs_dirs=`$FIND . -name 'CVS'`
+ if [ -n "$cvs_dirs" ]; then
+ if [ "$noclean" = "1" ]; then
+ echo "*** Warning: The following CVS directories where found.
+@@ -62,7 +63,7 @@ You probably want to remove them: " >&2
+ fi
+ fi
+
+- tilde_files=`find . -name '*~'`
++ tilde_files=`$FIND . -name '*~'`
+ if [ -n "$tilde_files" ]; then
+ if [ "$noclean" = "1" ]; then
+ echo "*** Warning: The following files have names ending in '~'.
+@@ -75,7 +76,7 @@ You probably want to remove them: " >&2
+ fi
+ fi
+
+- large_uid_files=`find . -uid +99 || true`
++ large_uid_files=`$FIND . -uid +99 || true`
+
+ if [ "$ogargs" = "" ] && [ -n "$large_uid_files" ]; then
+ echo "*** Warning: The following files have a UID greater than 99.
diff --git a/tools/ipkg-utils/patches/.svn/text-base/170-resolve_conffiles.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/170-resolve_conffiles.patch.svn-base
new file mode 100644
index 0000000..31faf30
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/170-resolve_conffiles.patch.svn-base
@@ -0,0 +1,23 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -160,12 +160,15 @@ You probably want to chown these to a sy
+ done
+
+ if [ -f $CONTROL/conffiles ]; then
+- for cf in `cat $CONTROL/conffiles`; do
+- if [ ! -f ./$cf ]; then
+- echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2
+- PKG_ERROR=1
+- fi
++ rm -f $CONTROL/conffiles.resolved
++
++ for cf in `$FIND $(sed -e "s!^/!$pkg_dir/!" $CONTROL/conffiles) -type f`; do
++ echo "${cf#$pkg_dir}" >> $CONTROL/conffiles.resolved
+ done
++
++ rm $CONTROL/conffiles
++ mv $CONTROL/conffiles.resolved $CONTROL/conffiles
++ chmod 0644 $CONTROL/conffiles
+ fi
+
+ cd $owd
diff --git a/tools/ipkg-utils/patches/.svn/text-base/180-add_installed_size.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/180-add_installed_size.patch.svn-base
new file mode 100644
index 0000000..fb91a31
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/180-add_installed_size.patch.svn-base
@@ -0,0 +1,14 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -250,6 +250,11 @@ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+ ( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
++
++installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
++sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
++ $pkg_dir/$CONTROL/control
++
+ ( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
diff --git a/tools/ipkg-utils/patches/.svn/text-base/190-preserve_permissions.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/190-preserve_permissions.patch.svn-base
new file mode 100644
index 0000000..27ba521
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/190-preserve_permissions.patch.svn-base
@@ -0,0 +1,12 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -249,7 +249,8 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
++# Preserve permissions (-p) when creating data.tar.gz as non-root user
++( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czpf $tmp_dir/data.tar.gz . )
+
+ installed_size=`du -b $tmp_dir/data.tar.gz | cut -f1`
+ sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
diff --git a/tools/ipkg-utils/patches/.svn/text-base/200-force_gnu_format.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/200-force_gnu_format.patch.svn-base
new file mode 100644
index 0000000..f363acb
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/200-force_gnu_format.patch.svn-base
@@ -0,0 +1,27 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -250,13 +250,13 @@ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+ # Preserve permissions (-p) when creating data.tar.gz as non-root user
+-( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czpf $tmp_dir/data.tar.gz . )
++( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX --format=gnu -czpf $tmp_dir/data.tar.gz . )
+
+ installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
+ sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
+ $pkg_dir/$CONTROL/control
+
+-( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
++( cd $pkg_dir/$CONTROL && $TAR $ogargs --format=gnu -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -266,7 +266,7 @@ rm -f $pkg_file
+ 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 --format=gnu -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 --git a/tools/ipkg-utils/patches/.svn/text-base/210-remove_field_checks.patch.svn-base b/tools/ipkg-utils/patches/.svn/text-base/210-remove_field_checks.patch.svn-base
new file mode 100644
index 0000000..2f1f2ea
--- /dev/null
+++ b/tools/ipkg-utils/patches/.svn/text-base/210-remove_field_checks.patch.svn-base
@@ -0,0 +1,36 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -101,9 +101,6 @@ You probably want to chown these to a sy
+ arch=`required_field Architecture`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+- required_field Maintainer >/dev/null
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+-
+ required_field Description >/dev/null
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+@@ -114,23 +111,6 @@ You probably want to chown these to a sy
+ echo "admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2
+ fi
+
+- priority=`required_field Priority`
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+- if [ -z "$priority" ]; then
+- echo "The Priority field should have one of the following values:" >&2
+- echo "required, important, standard, optional, extra." >&2
+- echo "If you don't know which priority value you should be using, then use \`optional'" >&2
+- fi
+-
+- source=`required_field Source`
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+- if [ -z "$source" ]; then
+- echo "The Source field contain the URL's or filenames of the source code and any patches"
+- echo "used to build this package. Either gnu-style tarballs or Debian source packages "
+- echo "are acceptable. Relative filenames may be used if they are distributed in the same"
+- echo "directory as the .ipk file."
+- fi
+-
+ disallowed_filename=`disallowed_field Filename`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
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 0000000..7df272f
--- /dev/null
+++ b/tools/ipkg-utils/patches/100-build_clean.patch
@@ -0,0 +1,35 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -47,6 +47,19 @@ pkg_appears_sane() {
+
+ 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 @@ You probably want to chown these to a sy
+
+ 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 0000000..8e62ee7
--- /dev/null
+++ b/tools/ipkg-utils/patches/110-buildpackage.patch
@@ -0,0 +1,23 @@
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -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 @@ done
+ # 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/111-buildpackage_conffiles.patch b/tools/ipkg-utils/patches/111-buildpackage_conffiles.patch
new file mode 100644
index 0000000..dacdaae
--- /dev/null
+++ b/tools/ipkg-utils/patches/111-buildpackage_conffiles.patch
@@ -0,0 +1,11 @@
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -190,7 +190,7 @@ fi
+ mkdir /tmp/${pkg}/CONTROL
+
+ files_required="control"
+-files_optional="preinst postinst prerm postrm"
++files_optional="preinst postinst prerm postrm conffiles"
+
+ for i in ${files_required} ; do
+ file=${CONTROL}/$i
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 0000000..acf6b79
--- /dev/null
+++ b/tools/ipkg-utils/patches/120-build_tar.patch
@@ -0,0 +1,36 @@
+This patch from aorlinsk fixes an issue with order in options passed to tar
+
+ http://openwrt.org/forum/viewtopic.php?pid=8332#p8332
+
+
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -184,7 +184,7 @@ while getopts "cg:ho:v" opt; do
+ g ) group=$OPTARG
+ ogargs="$ogargs --group=$group"
+ ;;
+- c ) outer=tar
++ c ) outer=$TAR
+ ;;
+ C ) noclean=1
+ ;;
+@@ -243,8 +243,8 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ 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/$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 +254,7 @@ rm -f $pkg_file
+ 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 --git a/tools/ipkg-utils/patches/130-tar_wildcards.patch b/tools/ipkg-utils/patches/130-tar_wildcards.patch
new file mode 100644
index 0000000..ba949c1
--- /dev/null
+++ b/tools/ipkg-utils/patches/130-tar_wildcards.patch
@@ -0,0 +1,23 @@
+--- a/ipkg.py
++++ b/ipkg.py
+@@ -93,9 +93,9 @@ class Package:
+ 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 @@ class Package:
+ 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 0000000..417c409
--- /dev/null
+++ b/tools/ipkg-utils/patches/140-portability.patch
@@ -0,0 +1,19 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -11,6 +11,8 @@ set -e
+
+ version=1.0
+
++TAR="${TAR:-$(which tar)}"
++
+ ipkg_extract_value() {
+ sed -e "s/^[^:]*:[[:space:]]*//"
+ }
+--- a/ipkg-make-index
++++ b/ipkg-make-index
+@@ -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
diff --git a/tools/ipkg-utils/patches/150-uppercase_letters.patch b/tools/ipkg-utils/patches/150-uppercase_letters.patch
new file mode 100644
index 0000000..cef200d
--- /dev/null
+++ b/tools/ipkg-utils/patches/150-uppercase_letters.patch
@@ -0,0 +1,22 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -133,7 +133,7 @@ You probably want to chown these to a sy
+ disallowed_filename=`disallowed_field Filename`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+- if echo $pkg | grep '[^a-z0-9.+-]'; then
++ if echo $pkg | grep '[^a-zA-Z0-9_.+-]'; then
+ echo "*** Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" >&2
+ PKG_ERROR=1;
+ fi
+--- a/ipkg-buildpackage
++++ b/ipkg-buildpackage
+@@ -69,7 +69,7 @@ pkg_appears_sane_control() {
+ required_field Maintainer >/dev/null
+ required_field Description >/dev/null
+
+- if echo $pkg | grep '[^a-z0-9.+-]'; then
++ if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
+ echo "ipkg-build: Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])"
+ PKG_ERROR=1;
+ fi
diff --git a/tools/ipkg-utils/patches/160-find.patch b/tools/ipkg-utils/patches/160-find.patch
new file mode 100644
index 0000000..45ef3c6
--- /dev/null
+++ b/tools/ipkg-utils/patches/160-find.patch
@@ -0,0 +1,39 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -10,7 +10,8 @@
+ set -e
+
+ version=1.0
+-
++FIND="$(which find)"
++FIND="${FIND:-$(which gfind)}"
+ TAR="${TAR:-$(which tar)}"
+
+ ipkg_extract_value() {
+@@ -49,7 +50,7 @@ pkg_appears_sane() {
+
+ PKG_ERROR=0
+
+- cvs_dirs=`find . -name 'CVS'`
++ cvs_dirs=`$FIND . -name 'CVS'`
+ if [ -n "$cvs_dirs" ]; then
+ if [ "$noclean" = "1" ]; then
+ echo "*** Warning: The following CVS directories where found.
+@@ -62,7 +63,7 @@ You probably want to remove them: " >&2
+ fi
+ fi
+
+- tilde_files=`find . -name '*~'`
++ tilde_files=`$FIND . -name '*~'`
+ if [ -n "$tilde_files" ]; then
+ if [ "$noclean" = "1" ]; then
+ echo "*** Warning: The following files have names ending in '~'.
+@@ -75,7 +76,7 @@ You probably want to remove them: " >&2
+ fi
+ fi
+
+- large_uid_files=`find . -uid +99 || true`
++ large_uid_files=`$FIND . -uid +99 || true`
+
+ if [ "$ogargs" = "" ] && [ -n "$large_uid_files" ]; then
+ echo "*** Warning: The following files have a UID greater than 99.
diff --git a/tools/ipkg-utils/patches/170-resolve_conffiles.patch b/tools/ipkg-utils/patches/170-resolve_conffiles.patch
new file mode 100644
index 0000000..31faf30
--- /dev/null
+++ b/tools/ipkg-utils/patches/170-resolve_conffiles.patch
@@ -0,0 +1,23 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -160,12 +160,15 @@ You probably want to chown these to a sy
+ done
+
+ if [ -f $CONTROL/conffiles ]; then
+- for cf in `cat $CONTROL/conffiles`; do
+- if [ ! -f ./$cf ]; then
+- echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2
+- PKG_ERROR=1
+- fi
++ rm -f $CONTROL/conffiles.resolved
++
++ for cf in `$FIND $(sed -e "s!^/!$pkg_dir/!" $CONTROL/conffiles) -type f`; do
++ echo "${cf#$pkg_dir}" >> $CONTROL/conffiles.resolved
+ done
++
++ rm $CONTROL/conffiles
++ mv $CONTROL/conffiles.resolved $CONTROL/conffiles
++ chmod 0644 $CONTROL/conffiles
+ fi
+
+ cd $owd
diff --git a/tools/ipkg-utils/patches/180-add_installed_size.patch b/tools/ipkg-utils/patches/180-add_installed_size.patch
new file mode 100644
index 0000000..fb91a31
--- /dev/null
+++ b/tools/ipkg-utils/patches/180-add_installed_size.patch
@@ -0,0 +1,14 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -250,6 +250,11 @@ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+ ( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
++
++installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
++sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
++ $pkg_dir/$CONTROL/control
++
+ ( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
diff --git a/tools/ipkg-utils/patches/190-preserve_permissions.patch b/tools/ipkg-utils/patches/190-preserve_permissions.patch
new file mode 100644
index 0000000..27ba521
--- /dev/null
+++ b/tools/ipkg-utils/patches/190-preserve_permissions.patch
@@ -0,0 +1,12 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -249,7 +249,8 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
++# Preserve permissions (-p) when creating data.tar.gz as non-root user
++( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czpf $tmp_dir/data.tar.gz . )
+
+ installed_size=`du -b $tmp_dir/data.tar.gz | cut -f1`
+ sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
diff --git a/tools/ipkg-utils/patches/200-force_gnu_format.patch b/tools/ipkg-utils/patches/200-force_gnu_format.patch
new file mode 100644
index 0000000..f363acb
--- /dev/null
+++ b/tools/ipkg-utils/patches/200-force_gnu_format.patch
@@ -0,0 +1,27 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -250,13 +250,13 @@ mkdir $tmp_dir
+
+ echo $CONTROL > $tmp_dir/tarX
+ # Preserve permissions (-p) when creating data.tar.gz as non-root user
+-( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czpf $tmp_dir/data.tar.gz . )
++( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX --format=gnu -czpf $tmp_dir/data.tar.gz . )
+
+ installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
+ sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
+ $pkg_dir/$CONTROL/control
+
+-( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
++( cd $pkg_dir/$CONTROL && $TAR $ogargs --format=gnu -czf $tmp_dir/control.tar.gz . )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -266,7 +266,7 @@ rm -f $pkg_file
+ 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 --format=gnu -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 --git a/tools/ipkg-utils/patches/210-remove_field_checks.patch b/tools/ipkg-utils/patches/210-remove_field_checks.patch
new file mode 100644
index 0000000..2f1f2ea
--- /dev/null
+++ b/tools/ipkg-utils/patches/210-remove_field_checks.patch
@@ -0,0 +1,36 @@
+--- a/ipkg-build
++++ b/ipkg-build
+@@ -101,9 +101,6 @@ You probably want to chown these to a sy
+ arch=`required_field Architecture`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+- required_field Maintainer >/dev/null
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+-
+ required_field Description >/dev/null
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+
+@@ -114,23 +111,6 @@ You probably want to chown these to a sy
+ echo "admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2
+ fi
+
+- priority=`required_field Priority`
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+- if [ -z "$priority" ]; then
+- echo "The Priority field should have one of the following values:" >&2
+- echo "required, important, standard, optional, extra." >&2
+- echo "If you don't know which priority value you should be using, then use \`optional'" >&2
+- fi
+-
+- source=`required_field Source`
+- [ "$?" -ne 0 ] && PKG_ERROR=1
+- if [ -z "$source" ]; then
+- echo "The Source field contain the URL's or filenames of the source code and any patches"
+- echo "used to build this package. Either gnu-style tarballs or Debian source packages "
+- echo "are acceptable. Relative filenames may be used if they are distributed in the same"
+- echo "directory as the .ipk file."
+- fi
+-
+ disallowed_filename=`disallowed_field Filename`
+ [ "$?" -ne 0 ] && PKG_ERROR=1
+