dot

packages and services management
Log | Files | Refs | README

commit 592f2e0a1b761227bbebc2716f69c2aa53130fcd
parent 4bb33c10743c92a2e48214056438bb2153999c34
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 29 Jul 2018 22:02:11 +0200

bin/pack-chroot: ready to go

Diffstat:
Abin/pack-chroot | 23+++++++++++++++++++++++
Dbin/pack-test | 16----------------
Mpack/busybox/config | 5++---
Mpack/dash/build | 2+-
4 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/bin/pack-chroot b/bin/pack-chroot @@ -0,0 +1,23 @@ +#!/bin/sh -e + +pack add busybox +pack add dash + +rm -rf /mnt/pack +mkdir -p /mnt/pack +cd /mnt/pack +mkdir -p etc/pack bin dev #sys proc + +cp -r /etc/pack/* etc/pack +cp -r /opt/dash/cur/* . +ln -s dash bin/sh +cp /opt/busybox/cur/bin/busybox bin +cp "$(which pack)" bin +echo root:x:0:0:root:/root:/bin/bash >etc/passwd +echo nameserver 87.98.175.85 >etc/resolv.conf + +mount -t devtmpfs devtmpfs dev + +PATH=/bin chroot /mnt/pack /bin/sh -c '/bin/busybox --install -s /bin && exec ash' + +umount /mnt/pack/dev diff --git a/bin/pack-test b/bin/pack-test @@ -1,16 +0,0 @@ -#!/bin/sh -e - -pack add busybox -pack add dash - -rm -rf /mnt/pack -mkdir -p /mnt/pack -cd /mnt/pack -mkdir -p etc dev lib proc sys usr -cp -r /opt/dash/cur/* . -cp /opt/busybox/cur/bin/busybox bin -#cp -r /etc/pack/* etc/pack -echo root:x:0:0:root:/root:/bin/bash >/etc/passwd -ln -s dash /mnt/pack/bin/sh - -PATH=/bin chroot /mnt/pack /bin/busybox --install -s / diff --git a/pack/busybox/config b/pack/busybox/config @@ -1,5 +1,4 @@ # -# Automatically generated make config: don't edit # Busybox version: 1.29.1 # Sun Jul 29 15:32:11 2018 # @@ -39,11 +38,11 @@ CONFIG_PLATFORM_LINUX=y # # Build Options # -# CONFIG_STATIC is not set +CONFIG_STATIC=y # CONFIG_PIE is not set # CONFIG_NOMMU is not set # CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set +CONFIG_FEATURE_LIBBUSYBOX_STATIC="" # CONFIG_FEATURE_INDIVIDUAL is not set # CONFIG_FEATURE_SHARED_BUSYBOX is not set CONFIG_CROSS_COMPILER_PREFIX="" diff --git a/pack/dash/build b/pack/dash/build @@ -1,4 +1,4 @@ #!/bin/sh -ex -./configure --prefix="$PREFIX" +./configure --prefix="$PREFIX" --enable-static make install