Message ID | 20200904224636.484105-1-mail@aparcar.org |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/2] build: ipkg-build add -r option for all-root | expand |
Paul Spooren <mail@aparcar.org> wrote: > > diff --git a/scripts/ipkg-build b/scripts/ipkg-build > index e3a9a882cf..38149c4432 100755 > --- a/scripts/ipkg-build > +++ b/scripts/ipkg-build > @@ -1,5 +1,7 @@ > #!/bin/sh > > +set -x > + Do you mean to have this in the patch? Sincerely, Karl Palsson
On Sat Sep 5, 2020 at 1:58 AM HST, Karl Palsson wrote: > > Paul Spooren <mail@aparcar.org> wrote: > > > > diff --git a/scripts/ipkg-build b/scripts/ipkg-build > > index e3a9a882cf..38149c4432 100755 > > --- a/scripts/ipkg-build > > +++ b/scripts/ipkg-build > > @@ -1,5 +1,7 @@ > > #!/bin/sh > > > > +set -x > > + > > Do you mean to have this in the patch? No thanks for spotting. I initially created this because I thought fakeroot would be the cause slowing down the buildbots, however Felix found that it was something related to `get_source_date_epoch.sh` calls. I therefore set these two patches to "not applicable". > > Sincerely, > Karl Palsson
diff --git a/scripts/ipkg-build b/scripts/ipkg-build index e3a9a882cf..38149c4432 100755 --- a/scripts/ipkg-build +++ b/scripts/ipkg-build @@ -1,5 +1,7 @@ #!/bin/sh +set -x + # ipkg-build -- construct a .ipk from a directory # Carl Worth <cworth@east.isi.edu> # based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 @@ -72,13 +74,14 @@ pkg_appears_sane() { # ipkg-build "main" ### file_modes="" -usage="Usage: $0 [-v] [-h] [-m] <pkg_directory> [<destination_directory>]" -while getopts "hvm:" opt; do +usage="Usage: $0 [-v] [-h] [-r] [-m] <pkg_directory> [<destination_directory>]" +while getopts "hvrm:" opt; do case $opt in v ) echo $version exit 0 ;; h ) echo $usage >&2 ;; + r ) TAR="$TAR --owner=0 --group=0" ;; m ) file_modes=$OPTARG ;; \? ) echo $usage >&2 esac
The `ipkg-build` script create installable `ipk` packages. The newly added `-r` option attaches the `--owner=0 --group=0` to the `tar` command, allowing to run without a `fakeroot` context and still result in root-owned package contents. This approach is much faster than wrapping the packaging script with `fakeroot`. Signed-off-by: Paul Spooren <mail@aparcar.org> --- scripts/ipkg-build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)