On Sun, May 22, 2011 at 02:21:59PM -0400, Jon Ringle wrote: > Older ar versions do not support 'D' flag, so fall back to not using 'D' flag > if ar fails. > > Signed-off-by: Jon Ringle <[email protected]> > --- > .../0010-ipkg-make-ar-deterministic.patch | 27 +++++++++++++------ > patches/ipkg-utils-050831/series | 2 +- > 2 files changed, 19 insertions(+), 10 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 58990a9..b18c870 100644 > --- a/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch > +++ b/patches/ipkg-utils-050831/0010-ipkg-make-ar-deterministic.patch > @@ -1,5 +1,6 @@ > -From: Darren Hutchinson <[email protected]> > -Date: Mon, 8 Nov 2010 13:21:56 +0100 > +From a319fdbca37a6d584192746adda73b784eff428d Mon Sep 17 00:00:00 2001 > +From: Jon Ringle <[email protected]> > +Date: Sun, 22 May 2011 13:54:50 -0400 > Subject: [PATCH] ipkg: make ar deterministic > > I had a strange problem when I tried to create an image. > @@ -22,28 +23,36 @@ There is no real need to use the actual UID in the ar > header, and GNU AR has a > I have put together a quick patch that tells ptxdist to patch ipkg-build to > use > the 'D' option when invoking AR. > > +Older ar versions do not support 'D' flag, so fall back to not using 'D' flag > +if ar fails. > + > Signed-off-by: Darren Hutchinson <[email protected]> > Signed-off-by: Marc Kleine-Budde <[email protected]> > +Signed-off-by: Jon Ringle <[email protected]> > --- > - ipkg-build | 5 ++++- > - 1 files changed, 4 insertions(+), 1 deletions(-) > + ipkg-build | 9 ++++++++- > + 1 files changed, 8 insertions(+), 1 deletions(-) > > diff --git a/ipkg-build b/ipkg-build > -index 77367ac..27e4868 100755 > +index 77367ac..1d46a48 100755 > --- a/ipkg-build > +++ b/ipkg-build > -@@ -235,7 +235,10 @@ echo "2.0" > $tmp_dir/debian-binary > +@@ -235,7 +235,14 @@ echo "2.0" > $tmp_dir/debian-binary > pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk > 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 ) > ++ # parsing ar file headers. > ++ # Older ar versions do not support 'D' flag, so fall back to not using 'D' > ++ # flag if ar fails. > ++ ( cd $tmp_dir && > ++ ( ar -crDf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz || > ++ ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) )
I think all this is run in fakeroot, isn't it? You could do a chown instead. That should always work and you can avoid te whole mess. Michael > else > ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz > ./control.tar.gz ) > fi > -- > -1.7.2.3 > +1.7.0.4 > > diff --git a/patches/ipkg-utils-050831/series > b/patches/ipkg-utils-050831/series > index 687aa30..96fc5fe 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 > -- > 1.7.0.4 > > > -- > ptxdist mailing list > [email protected] > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list [email protected]
