diff options
author | root | 2010-08-11 20:17:59 +0200 |
---|---|---|
committer | root | 2010-08-11 20:17:59 +0200 |
commit | 0ab268ee5f3ae1db199200091d694cf12bc76064 (patch) | |
tree | e821afc22a38f0fa355192ad1ffd0d01cd902963 /chroot-scripts | |
parent | foo (diff) | |
download | broot-0ab268ee5f3ae1db199200091d694cf12bc76064.tar.gz broot-0ab268ee5f3ae1db199200091d694cf12bc76064.tar.xz broot-0ab268ee5f3ae1db199200091d694cf12bc76064.zip |
.. we have working packages :)
Diffstat (limited to 'chroot-scripts')
-rw-r--r-- | chroot-scripts/build-core.sh | 15 | ||||
-rw-r--r-- | chroot-scripts/packages/dialog.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/dropbear.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/hwinfo.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/kexec.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/nbd-client.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/splashy.pkg.sh | 3 | ||||
-rw-r--r-- | chroot-scripts/packages/strace.pkg.sh | 3 | ||||
-rwxr-xr-x | chroot-scripts/pkg-builder.sh | 12 |
9 files changed, 39 insertions, 9 deletions
diff --git a/chroot-scripts/build-core.sh b/chroot-scripts/build-core.sh index d5e14ce..3ddfec5 100644 --- a/chroot-scripts/build-core.sh +++ b/chroot-scripts/build-core.sh @@ -1,16 +1,23 @@ #!/bin/bash +cd /root/bin + . ./pkg-builder.sh -PACKAGES="eglibc kexec dialog dropbear nbd-client iw strace" +PACKAGES="eglibc kexec dialog nbd-client iw splashy hwinfo strace" mkdir -p /root/packages +[ -d /root/packages/indices/ ] && rm /root/packages/indices/* for p in $PACKAGES do - . ./packages/$p.pkg.sh - aptitude install -y $APT_PACKAGES - copyfileswithdependencies + mkdir -p /chroot + . /root/bin/packages/$p.pkg.sh + aptitude install -y -q $APT_PACKAGES + killall dbus-daemon cd /chroot + copyfileswithdependencies tar cfvz /root/packages/$p.tgz * + cd /root/bin + rm -rf /chroot done diff --git a/chroot-scripts/packages/dialog.pkg.sh b/chroot-scripts/packages/dialog.pkg.sh new file mode 100644 index 0000000..67706e5 --- /dev/null +++ b/chroot-scripts/packages/dialog.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="dialog" +APT_PACKAGES="dialog" +REQUIRED_BINARIES="$(which dialog)" diff --git a/chroot-scripts/packages/dropbear.pkg.sh b/chroot-scripts/packages/dropbear.pkg.sh new file mode 100644 index 0000000..18fdff8 --- /dev/null +++ b/chroot-scripts/packages/dropbear.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="dropbear" +APT_PACKAGES="dropbear" +REQUIRED_BINARIES="$(which dropbear)" diff --git a/chroot-scripts/packages/hwinfo.pkg.sh b/chroot-scripts/packages/hwinfo.pkg.sh new file mode 100644 index 0000000..b86f0fd --- /dev/null +++ b/chroot-scripts/packages/hwinfo.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="hwinfo" +APT_PACKAGES="hwinfo" +REQUIRED_BINARIES="$(which hwinfo)" diff --git a/chroot-scripts/packages/kexec.pkg.sh b/chroot-scripts/packages/kexec.pkg.sh new file mode 100644 index 0000000..827bc76 --- /dev/null +++ b/chroot-scripts/packages/kexec.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="kexec" +APT_PACKAGES="kexec-tools" +REQUIRED_BINARIES="$(which kexec)" diff --git a/chroot-scripts/packages/nbd-client.pkg.sh b/chroot-scripts/packages/nbd-client.pkg.sh new file mode 100644 index 0000000..79584af --- /dev/null +++ b/chroot-scripts/packages/nbd-client.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="nbd-client" +APT_PACKAGES="nbd-client" +REQUIRED_BINARIES="$(which nbd-client)" diff --git a/chroot-scripts/packages/splashy.pkg.sh b/chroot-scripts/packages/splashy.pkg.sh new file mode 100644 index 0000000..701b413 --- /dev/null +++ b/chroot-scripts/packages/splashy.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="splashy" +APT_PACKAGES="splashy" +REQUIRED_BINARIES="$(which splashy)" diff --git a/chroot-scripts/packages/strace.pkg.sh b/chroot-scripts/packages/strace.pkg.sh new file mode 100644 index 0000000..917f20e --- /dev/null +++ b/chroot-scripts/packages/strace.pkg.sh @@ -0,0 +1,3 @@ +PKG_NAME="strace" +APT_PACKAGES="strace" +REQUIRED_BINARIES="$(which strace)" diff --git a/chroot-scripts/pkg-builder.sh b/chroot-scripts/pkg-builder.sh index d172860..ec97343 100755 --- a/chroot-scripts/pkg-builder.sh +++ b/chroot-scripts/pkg-builder.sh @@ -6,7 +6,7 @@ if [ "$(readlink -f $0| xargs basename)" == "pkg-builder.sh" ]; then fi ### Variables ##### -CHROOT_DIR=/tmp/chroot +CHROOT_DIR=/chroot PKG_DIR=/root/packages [ ! -d "$PKG_DIR/indices" ] && mkdir -p "$PKG_DIR/indices" @@ -15,28 +15,30 @@ copyfileswithdependencies () { # Create $CHROOT_DIR [ ! -d $CHROOT_DIR ] && mkdir $CHROOT_DIR cd $CHROOT_DIR - # Copy $REQUIRED_CHROOT_FILES and shared library dependencies # to chroot environment [ -f "$PKG_DIR/indices/$PKG_NAME.files" ] && rm -f "$PKG_DIR/indices/$PKG_NAME.files" - for FILE in $REQUIRED_CHROOT_FILES + for FILE in $REQUIRED_BINARIES do DIR=`dirname $FILE | cut -c2-` - [ ! -d $DIR ] && mkdir -p $DIR + echo $DIR + [ ! -d "$DIR" ] && mkdir -p "$DIR" cp $FILE `echo $FILE | cut -c2-` echo $FILE | cut -c1- >> "$PKG_DIR/indices/$PKG_NAME.files" for SHARED_LIBRARY in `ldd $FILE | awk '{print $3}' |grep ^/` do + echo "$SHARED_LIBRARY" DIR=`dirname $SHARED_LIBRARY | cut -c2-` [ ! -d $DIR ] && mkdir -p $DIR [ ! -s "`echo $SHARED_LIBRARY | cut -c2-`" ] && \ - [ ! "$(grep -l $SHARED_LIBRARY $PKG_DIR/indices/*| wc -l)" == "0" ] && \ + [ "$(grep -l $SHARED_LIBRARY $PKG_DIR/indices/*| wc -l)" == "0" ] && \ cp $SHARED_LIBRARY `echo $SHARED_LIBRARY | cut -c2-` && \ echo $SHARED_LIBRARY | cut -c1- >> "$PKG_DIR/indices/$PKG_NAME.files" done done + REQUIRED_BINARIES="" #cp /lib/ld-* lib } |