summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-05-24 08:07:41 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-11-28 16:56:42 +0100
commitc765d8933d8af3c647d08fa1fd50c428526c7162 (patch)
tree823a3eca261d67e974f8fb14ee1c245eabea29f1
parentc8d7e98ecc49d21fb325ff69a07848709c5914cc (diff)
downloadptxdist-c765d8933d8af3c647d08fa1fd50c428526c7162.tar.gz
ptxdist-c765d8933d8af3c647d08fa1fd50c428526c7162.tar.xz
ipkg-utils: rewrite patch for issue with ar and large UIDs
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 4d7ff1b8e46a242ead09e044262e7daec642e3b7) Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch30
-rw-r--r--patches/ipkg-utils-050831/series2
2 files changed, 18 insertions, 14 deletions
diff --git a/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch b/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch
index 58990a96d..61196502b 100644
--- a/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch
+++ b/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch
@@ -1,7 +1,11 @@
-From: Darren Hutchinson <dhutchinson@google.com>
-Date: Mon, 8 Nov 2010 13:21:56 +0100
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 24 May 2011 07:56:53 +0200
Subject: [PATCH] ipkg: 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:
@@ -17,19 +21,19 @@ 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.
-There is no real need to use the actual UID in the ar header, and GNU AR has a
-'D' option that uses UID and GID values of zero when creating the ipkg archive.
-I have put together a quick patch that tells ptxdist to patch ipkg-build to use
-the 'D' option when invoking AR.
+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: Darren Hutchinson <dhutchinson@google.com>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
ipkg-build | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ipkg-build b/ipkg-build
-index 77367ac..27e4868 100755
+index 77367ac..7234e64 100755
--- a/ipkg-build
+++ b/ipkg-build
@@ -235,7 +235,10 @@ echo "2.0" > $tmp_dir/debian-binary
@@ -37,10 +41,10 @@ index 77367ac..27e4868 100755
rm -f $pkg_file
if [ "$outer" = "ar" ] ; then
- ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
-+ # Add 'D' flag to ar. This forces UID 0 to be used when creating ipkg
-+ # files. This is needed as high UID values (> 99999) cause problems when
-+ # parsing ar file headers
-+ ( cd $tmp_dir && ar -crDf $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
diff --git a/patches/ipkg-utils-050831/series b/patches/ipkg-utils-050831/series
index 687aa30fb..96fc5fe56 100644
--- a/patches/ipkg-utils-050831/series
+++ b/patches/ipkg-utils-050831/series
@@ -8,5 +8,5 @@
0007-ipkg-env.patch
0008-ipkg.py-don-t-use-wildcards.patch
0009-Makefile-add-prefix-to-python-install.patch
-#0010-ipkg-make-ar-deterministic.patch
+0010-ipkg-make-ar-deterministic.patch
# 15e754b052c20bbbef97578c9ec3e691 - git-ptx-patches magic