running `busybox --install -s` as non-root in a staging dir
Natanael Copa
ncopa at alpinelinux.org
Thu Dec 15 16:11:10 UTC 2016
On Thu, 15 Dec 2016 16:37:22 +0100
Natanael Copa <ncopa at alpinelinux.org> wrote:
> Hi,
>
> I am working on creating a rootfs tarball for alpine linux to be used
> as base for things like docker images. Currently all alpine release
> iso images are created as non-root, with some help from fakeroot.
>
> I do have a problem with the rootfs image. The problem is that package
> manager (apk-tools) runs the install scripts in a chroot. This is
> because we need `/bin/busybox --install -s` to run relative the temp
> root. chroot(2) will fail in fakeroot with permission denied.
>
> I need a way to install the busybox symlinks relative a root. I know
> `/bin/busybox --install -s <DIR>` but that will install all the
> symlinks in a give dir instead of <DIR>/usr/bin <DIR>/sbin etc.
>
> Possible solutions:
>
> 1) Add a -p flag to indicate that DIR is a root prefix instead of
> target directory for all links.
>
> /bin/busybox --install -s -p DIR
>
> 2) Add an flag to print all install paths to the applet.
>
> /bin/busybox --print-paths
I just relalized there is a `/bin/busybox --list-full`. I think I am all good.
Thanks!
-nc
More information about the busybox
mailing list