summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-05-24 08:18:04 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-05-24 08:18:04 +0200
commitf55b3f501deca90c105019bf2ef8fafd09a592f8 (patch)
tree5a7dbacb40c64302b04db0c299658733808fa84b
parent4d7ff1b8e46a242ead09e044262e7daec642e3b7 (diff)
downloadptxdist-f55b3f501deca90c105019bf2ef8fafd09a592f8.tar.gz
ptxdist-f55b3f501deca90c105019bf2ef8fafd09a592f8.tar.xz
opkg-utils: add patches to make opkg-build more robust
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch3
-rw-r--r--patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch53
-rw-r--r--patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch25
-rw-r--r--patches/opkg-utils-r4747/series4
4 files changed, 83 insertions, 2 deletions
diff --git a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
index 745336306..4e64f97e9 100644
--- a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
+++ b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
@@ -1,4 +1,3 @@
-From a84ad7f392520432d6364523f17fc9777310fb13 Mon Sep 17 00:00:00 2001
From: George McCollister <george.mccollister@gmail.com>
Date: Fri, 13 May 2011 10:00:47 -0500
Subject: [PATCH] opkg-utils: use env python instead of fixed path
@@ -67,5 +66,5 @@ index 807f8f4..3864fa5 100755
import sys, os
from glob import glob
--
-1.7.1
+1.7.5.1
diff --git a/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch
new file mode 100644
index 000000000..8bca65fca
--- /dev/null
+++ b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch
@@ -0,0 +1,53 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 24 May 2011 07:56:53 +0200
+Subject: [PATCH] opkg: make ar deterministic
+
+Based on a patch from Darren Hutchinson <dhutchinson@google.com>
+
+From the original description:
+
+I had a strange problem when I tried to create an image.
+The last part of the error message was:
+
+File
+"<path to ptxdist>/projects/<project name>/ \
+platform-<project name>/sysroot-host/lib/python2.6/site-packages/arfile.py",
+line 79, in _scan
+ size = int(descriptor[5])
+ValueError: invalid literal for int() with base 10: '`'
+
+The problem eventually turned out to be that arfile.py has trouble parsing AR
+files created with a UID >99999 - it relies on the (ascii) AR header fields
+using one digit less than their allocated sizes so it can the padding
+space to split() them.
+
+The original patch added the option 'D' to ar to set the UID and GID to
+zero. This option is not available in older versions of ar. chown to 0:0
+instead. This is possible because the everything is run in fakeroot.
+
+Not for upstream!
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ opkg-build | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 012afd3..1c323c3 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -247,7 +247,10 @@ fi
+
+ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+- ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
++ # chown the content to "0:0". files. This is needed as high UID values (>
++ # 99999) cause problems when parsing ar file headers
++ ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz &&
++ 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 )
+ fi
+--
+1.7.5.1
+
diff --git a/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch
new file mode 100644
index 000000000..159ad3ccc
--- /dev/null
+++ b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch
@@ -0,0 +1,25 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 24 May 2011 08:15:20 +0200
+Subject: [PATCH] opkg-build: don't use bashism
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ opkg-build | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 1c323c3..f9251ea 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -239,7 +239,7 @@ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+
+-if (( $opkext == 1)); then
++if [ $opkext -eq 1 ]; then
+ pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk
+ else
+ pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
+--
+1.7.5.1
+
diff --git a/patches/opkg-utils-r4747/series b/patches/opkg-utils-r4747/series
index 2ec6b23fd..10d49a15d 100644
--- a/patches/opkg-utils-r4747/series
+++ b/patches/opkg-utils-r4747/series
@@ -1 +1,5 @@
+# generated by git-ptx-patches
0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
+0002-opkg-make-ar-deterministic.patch
+0003-opkg-build-don-t-use-bashism.patch
+# 84a0f076891d7ac6d8273feb988f63df - git-ptx-patches magic