The overlay structure is copied in proper way (this was serious bug). ALso added some enhancements, improvements and fixed few bugs.

This commit is contained in:
Ivan Davidov 2017-12-02 03:32:36 +02:00
parent 5dd6368e69
commit dbfd661372
46 changed files with 526 additions and 230 deletions

View File

@ -23,7 +23,10 @@ cd $DEST_DIR
ln -s ../opt/$BUNDLE_NAME/cf bin/cf ln -s ../opt/$BUNDLE_NAME/cf bin/cf
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "Cloud Foundry CLI has been installed." echo "Cloud Foundry CLI has been installed."

View File

@ -9,26 +9,35 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the coreutils source directory which ls finds, e.g. 'coreutils-8.28'. # Change to the coreutils source directory which ls finds, e.g. 'coreutils-8.28'.
cd $(ls -d coreutils-*) cd $(ls -d coreutils-*)
echo "Preparing coreutils work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring coreutils." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building coreutils." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing coreutils." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing coreutils size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "coreutils has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,26 +9,34 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the dialog source directory which ls finds, e.g. 'dialog-1.3-20170509'. # Change to the dialog source directory which ls finds, e.g. 'dialog-1.3-20170509'.
cd $(ls -d dialog-*) cd $(ls -d dialog-*)
echo "Preparing dialog work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing 'dialog' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for 'dialog' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
# Configure dialog echo "Configuring 'dialog'."
echo "Configuring dialog."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building dialog." echo "Building 'dialog'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing dialog." echo "Installing 'dialog'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing dialog size." echo "Reducing 'dialog' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/usr/* \
$OVERLAY_ROOTFS
echo "Bundle 'dialog' has been installed." echo "Bundle 'dialog' has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
set -e set -ex
. ../../common.sh . ../../common.sh
@ -9,21 +9,26 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the Dropbear source directory which ls finds, e.g. 'dropbear-2016.73'. # Change to the Dropbear source directory which ls finds, e.g. 'dropbear-2016.73'.
cd $(ls -d dropbear-*) cd $(ls -d dropbear-*)
echo "Preparing Dropbear work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing 'Dropbear' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for 'Dropbear' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring Dropbear." echo "Configuring 'Dropbear'."
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--disable-zlib \ --disable-zlib \
--disable-loginfunc --disable-loginfunc
CFLAGS="$CFLAGS" CFLAGS="$CFLAGS"
echo "Building Dropbear." echo "Building 'Dropbear'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing Dropbear." echo "Installing 'Dropbear'."
make -j $NUM_JOBS install DESTDIR="$DEST_DIR" make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
mkdir -p $DEST_DIR/etc/dropbear mkdir -p $DEST_DIR/etc/dropbear
@ -31,7 +36,7 @@ mkdir -p $DEST_DIR/etc/dropbear
# Create Dropbear SSH configuration BEGIN # Create Dropbear SSH configuration BEGIN
for key_type in rsa dss ecdsa; do for key_type in rsa dss ecdsa; do
echo "generating $key_type host key" echo "Generating '$key_type' host key."
$DEST_DIR/usr/bin/dropbearkey \ $DEST_DIR/usr/bin/dropbearkey \
-t $key_type \ -t $key_type \
-f $DEST_DIR/etc/dropbear/dropbear_${key_type}_host_key -f $DEST_DIR/etc/dropbear/dropbear_${key_type}_host_key
@ -54,20 +59,27 @@ mkdir -p $DEST_DIR/root
# Create Dropbear SSH configuration END # Create Dropbear SSH configuration END
echo "Reducing Dropbear size." echo "Reducing 'Dropbear' size."
set +e
strip -g \ strip -g \
$DEST_DIR/usr/bin/* \ $DEST_DIR/usr/bin/* \
$DEST_DIR/usr/sbin/* \ $DEST_DIR/usr/sbin/*
$DEST_DIR/lib/* set -e
mkdir -p $OVERLAY_ROOTFS/usr mkdir -p $OVERLAY_ROOTFS/usr
cp -r $DEST_DIR/etc $OVERLAY_ROOTFS
cp -r $DEST_DIR/usr/bin $OVERLAY_ROOTFS/usr # With '--remove-destination' all possibly existing soft links in
cp -r $DEST_DIR/usr/sbin $OVERLAY_ROOTFS/usr # '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r $DEST_DIR/lib $OVERLAY_ROOTFS cp -r --remove-destination $DEST_DIR/etc \
$OVERLAY_ROOTFS
cp -r --remove-destination $DEST_DIR/usr/bin \
$OVERLAY_ROOTFS/usr
cp -r --remove-destination $DEST_DIR/usr/sbin \
$OVERLAY_ROOTFS/usr
mkdir -p "$OVERLAY_ROOTFS/etc/autorun" mkdir -p "$OVERLAY_ROOTFS/etc/autorun"
install -m 0755 "$SRC_DIR/20_dropbear.sh" "$OVERLAY_ROOTFS/etc/autorun/" install -m 0755 "$SRC_DIR/20_dropbear.sh" "$OVERLAY_ROOTFS/etc/autorun/"
echo "Dropbear has been installed." echo "Bundle 'Dropbear' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,3 +1,9 @@
#!/bin/sh #!/bin/sh
echo "starting dropbear ssh server"
cat << CEOF
Starting Dropbear SSH server.
CEOF
dropbear dropbear

View File

@ -4,7 +4,7 @@ set -e
. ../../common.sh . ../../common.sh
echo "Removing old Apache Felix artifacts. This may take a while." echo "Removing old 'Apache Felix' artifacts. This may take a while."
rm -rf $DEST_DIR rm -rf $DEST_DIR
mkdir -p $DEST_DIR/opt/felix mkdir -p $DEST_DIR/opt/felix
mkdir -p $DEST_DIR/bin mkdir -p $DEST_DIR/bin
@ -28,9 +28,12 @@ cd $DEST_DIR
ln -s ../opt/felix/bin/felix-start.sh bin/felix-start ln -s ../opt/felix/bin/felix-start.sh bin/felix-start
cp -r $DEST_DIR/* $OVERLAYFS_ROOT # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "Apache Felix has been installed." echo "Bundle 'Apache Felix' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,26 +9,35 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the fio source directory which ls finds, e.g. 'fio-3.2'. # Change to the fio source directory which ls finds, e.g. 'fio-3.2'.
cd $(ls -d fio-*) cd $(ls -d fio-*)
echo "Preparing fio work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing 'fio' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for 'fio' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring fio." echo "Configuring 'fio'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building fio." echo "Building 'fio'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing fio." echo "Installing 'fio'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing fio size." echo "Reducing 'fio' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "fio has been installed." echo "Bundle 'fio' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libBrokenLocale.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libBrokenLocale.so.1 $DEST_DIR/lib/
ln -s libBrokenLocale.so.1 $DEST_DIR/lib/libBrokenLocale.so ln -s libBrokenLocale.so.1 $DEST_DIR/lib/libBrokenLocale.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libanl.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libanl.so.1 $DEST_DIR/lib/
ln -s libanl.so.1 $DEST_DIR/lib/libanl.so ln -s libanl.so.1 $DEST_DIR/lib/libanl.so
echo "Reducing $BUNDLE_NAME size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libcidn.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libcidn.so.1 $DEST_DIR/lib/
ln -s libcidn.so.1 $DEST_DIR/lib/libcidn.so ln -s libcidn.so.1 $DEST_DIR/lib/libcidn.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libcrypt.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libcrypt.so.1 $DEST_DIR/lib/
ln -s libcrypt.so.1 $DEST_DIR/lib/libcrypt.so ln -s libcrypt.so.1 $DEST_DIR/lib/libcrypt.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/
ln -s libdl.so.2 $DEST_DIR/lib/libdl.so ln -s libdl.so.2 $DEST_DIR/lib/libdl.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnsl.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libnsl.so.1 $DEST_DIR/lib/
ln -s libnsl.so.1 $DEST_DIR/lib/libnsl.so ln -s libnsl.so.1 $DEST_DIR/lib/libnsl.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_db.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libnss_db.so.2 $DEST_DIR/lib/
ln -s libnss_db.so.2 $DEST_DIR/lib/libnss_db.so ln -s libnss_db.so.2 $DEST_DIR/lib/libnss_db.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_dns.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libnss_dns.so.2 $DEST_DIR/lib/
ln -s libnss_dns.so.2 $DEST_DIR/lib/libnss_dns.so ln -s libnss_dns.so.2 $DEST_DIR/lib/libnss_dns.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_files.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libnss_files.so.2 $DEST_DIR/lib/
ln -s libnss_files.so.2 $DEST_DIR/lib/libnss_files.so ln -s libnss_files.so.2 $DEST_DIR/lib/libnss_files.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_hesiod.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libnss_hesiod.so.2 $DEST_DIR/lib/
ln -s libnss_hesiod.so.2 $DEST_DIR/lib/libnss_hesiod.so ln -s libnss_hesiod.so.2 $DEST_DIR/lib/libnss_hesiod.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libpthread.so.0 $DEST_DIR/lib/ cp $SYSROOT/lib/libpthread.so.0 $DEST_DIR/lib/
ln -s libpthread.so.0 $DEST_DIR/lib/libpthread.so ln -s libpthread.so.0 $DEST_DIR/lib/libpthread.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libresolv.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libresolv.so.2 $DEST_DIR/lib/
ln -s libresolv.so.2 $DEST_DIR/lib/libresolv.so ln -s libresolv.so.2 $DEST_DIR/lib/libresolv.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/librt.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/librt.so.1 $DEST_DIR/lib/
ln -s librt.so.1 $DEST_DIR/lib/librt.so ln -s librt.so.1 $DEST_DIR/lib/librt.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libthread_db.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libthread_db.so.1 $DEST_DIR/lib/
ln -s libthread_db.so.1 $DEST_DIR/lib/libthread_db.so ln -s libthread_db.so.1 $DEST_DIR/lib/libthread_db.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -18,11 +18,16 @@ mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libutil.so.1 $DEST_DIR/lib/ cp $SYSROOT/lib/libutil.so.1 $DEST_DIR/lib/
ln -s libutil.so.1 $DEST_DIR/lib/libutil.so ln -s libutil.so.1 $DEST_DIR/lib/libutil.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -48,7 +48,10 @@ do
ln -s ../opt/$BUNDLE_NAME/bin/$FILE ../bin/$FILE ln -s ../opt/$BUNDLE_NAME/bin/$FILE ../bin/$FILE
done done
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "Java has been installed." echo "Java has been installed."

View File

@ -9,33 +9,45 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the kbd source directory which ls finds, e.g. 'kbd-2.04'. # Change to the kbd source directory which ls finds, e.g. 'kbd-2.04'.
cd $(ls -d kbd-*) cd $(ls -d kbd-*)
echo "Preparing kbd work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring kbd." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
--disable-vlock --disable-vlock
# vlock requires PAM # vlock requires PAM
echo "Building kbd." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing kbd." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR="$DEST_DIR" make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
echo "Reducing kbd size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g \ strip -g \
$DEST_DIR/usr/bin/* \ $DEST_DIR/usr/bin/* \
$DEST_DIR/usr/sbin/* \ $DEST_DIR/usr/sbin/* \
$DEST_DIR/lib/* $DEST_DIR/lib/*
set -e
mkdir -p $OVERLAY_ROOTFS/usr mkdir -p $OVERLAY_ROOTFS/usr
cp -r "$DEST_DIR/usr/bin" \ mkdir -p $OVERLAY_ROOTFS/etc/autorun
"$DEST_DIR/usr/share" \
"$OVERLAY_ROOTFS/usr/"
echo "Bundle 'kbd' has been installed." # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination "$DEST_DIR/usr/bin" "$DEST_DIR/usr/share" \
"$OVERLAY_ROOTFS/usr/"
cp -r --remove-destination "$SRC_DIR/90_kbd.sh" \
"$OVERLAY_ROOTFS/etc/autorun"
echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -0,0 +1,22 @@
#!/bin/sh
# This sample command loads German keyboard layout on boot.
#
# loadkeys de
cat << CEOF
The default keyboard layout is English (US). You can
change the keyboard layout to German like this:
loadkeys de
You can go back to the original US keyboard layout
like this:
loadkeys us
Alternatively, change the file '90_kbd.sh' in the
'kbd' bundle and set the layout you want to use.
CEOF

View File

@ -1,34 +0,0 @@
#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the kexec-tools source directory which ls finds, e.g. 'kexec-tools-2.0.15'.
cd $(ls -d kexec-tools-*)
echo "Preparing kexec-tools work area. This may take a while."
make -j $NUM_JOBS clean
rm -rf $DEST_DIR
echo "Building kexec-tools."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--without-lzama
make -j $NUM_JOBS
make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
echo "Reducing kexec-tools size."
strip -g $DEST_DIR/usr/bin/* \
$DEST_DIR/usr/lib/* 2>/dev/null
mkdir -p $OVERLAY_ROOTFS/usr/
cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS/usr/
echo "kexec-tools has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,45 @@
#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the kexec-tools source directory which ls finds, e.g. 'kexec-tools-2.0.15'.
cd $(ls -d kexec-tools-*)
if [ -f Makefile ] ; then
echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR
echo "Building '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--without-lzama
make -j $NUM_JOBS
make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* \
$DEST_DIR/usr/lib/* 2>/dev/null
set -e
mkdir -p $OVERLAY_ROOTFS/usr/
# With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/usr/* \
$OVERLAY_ROOTFS/usr/
echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR

View File

@ -9,25 +9,34 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the libevent source directory which ls finds, e.g. 'libevent-2.1.8-stable'. # Change to the libevent source directory which ls finds, e.g. 'libevent-2.1.8-stable'.
cd $(ls -d libevent-*) cd $(ls -d libevent-*)
echo "Preparing libevent work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring libevent." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure CFLAGS="$CFLAGS" ./configure
echo "Building libevent." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing libevent." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing libevent size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/usr/local/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r $DEST_DIR/usr/local/* \
$OVERLAY_ROOTFS
echo "libevent has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,12 +9,16 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the Links source directory which ls finds, e.g. 'links-2.12'. # Change to the Links source directory which ls finds, e.g. 'links-2.12'.
cd $(ls -d links-*) cd $(ls -d links-*)
echo "Preparing Links work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing 'Links' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for 'Links' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring Links." echo "Configuring 'Links'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
--disable-graphics \ --disable-graphics \
@ -24,18 +28,24 @@ CFLAGS="$CFLAGS" ./configure \
--without-zlib \ --without-zlib \
--without-x --without-x
echo "Building Links." echo "Building 'Links'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing Links." echo "Installing 'Links'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing Links size." echo "Reducing 'Links' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
mkdir -p "$OVERLAY_ROOTFS/usr/bin" mkdir -p "$OVERLAY_ROOTFS/usr/bin"
cp -r $DEST_DIR/usr/bin/* $OVERLAY_ROOTFS/usr/bin/
echo "Links has been installed." # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/usr/bin/* \
$OVERLAY_ROOTFS/usr/bin/
echo "Bundle 'Links' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -11,23 +11,36 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the Lua source directory which ls finds, e.g. 'lua-5.3.4'. # Change to the Lua source directory which ls finds, e.g. 'lua-5.3.4'.
cd $(ls -d lua-*) cd $(ls -d lua-*)
echo "Preparing Lua work area. This may take a while." echo "Preparing 'Lua' work area. This may take a while."
# we install lua to /usr and not to /usr/local so we need to fix luaconf.h so lua can find modules, etc. # we install lua to /usr and not to /usr/local so we need to fix luaconf.h so lua can find modules, etc.
sed -i 's/#define LUA_ROOT.*/#define LUA_ROOT \"\/usr\/\"/' src/luaconf.h sed -i 's/#define LUA_ROOT.*/#define LUA_ROOT \"\/usr\/\"/' src/luaconf.h
make -j $NUM_JOBS clean
if [ -f Makefile ] ; then
echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Building Lua." echo "Building 'Lua'."
make -j $NUM_JOBS posix CFLAGS="$CFLAGS" make -j $NUM_JOBS posix CFLAGS="$CFLAGS"
make -j $NUM_JOBS install INSTALL_TOP="$DEST_DIR/usr" make -j $NUM_JOBS install INSTALL_TOP="$DEST_DIR/usr"
echo "Reducing Lua size." echo "Reducing 'Lua' size."
set +e
strip -g $DEST_DIR/usr/bin/* 2>/dev/null strip -g $DEST_DIR/usr/bin/* 2>/dev/null
set -e
mkdir -p $OVERLAY_ROOTFS/usr/ mkdir -p $OVERLAY_ROOTFS/usr/
cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS/usr/
echo "Lua has been installed." # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r $DEST_DIR/usr/* \
$OVERLAY_ROOTFS/usr/
echo "Bundle 'Lua' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,29 +9,38 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the make source directory which ls finds, e.g. 'make-8.28'. # Change to the make source directory which ls finds, e.g. 'make-8.28'.
cd $(ls -d make-*) cd $(ls -d make-*)
echo "Preparing make work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring make." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building make." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing make." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
mkdir -p $DEST_DIR/lib mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/ cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/
echo "Reducing make size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "make has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -26,8 +26,11 @@ cd $DEST_DIR/usr/src
# empty folders. # empty folders.
find * -type f -name '.gitignore' -exec rm {} + find * -type f -name '.gitignore' -exec rm {} +
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -5,12 +5,15 @@ set -e
. ../../common.sh . ../../common.sh
if [ ! -d "$WORK_DIR/overlay/$BUNDLE_NAME" ] ; then if [ ! -d "$WORK_DIR/overlay/$BUNDLE_NAME" ] ; then
echo "The directory $WORK_DIR/overlay/$BUNDLE_NAME does not exist. Cannot continue." echo "The directory '$WORK_DIR/overlay/$BUNDLE_NAME' does not exist. Cannot continue."
exit 1 exit 1
fi fi
# Copy all generated files to the source overlay folder. # Copy all generated files to the source overlay folder.
cp -r $WORK_DIR/overlay/$BUNDLE_NAME/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r $WORK_DIR/overlay/$BUNDLE_NAME/* \
$OVERLAY_ROOTFS
echo "All MLL utilities have been installed." echo "All MLL utilities have been installed."

View File

@ -9,27 +9,36 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the nano source directory which ls finds, e.g. 'nano-2.8.7'. # Change to the nano source directory which ls finds, e.g. 'nano-2.8.7'.
cd $(ls -d nano-*) cd $(ls -d nano-*)
echo "Preparing nano work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring nano." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
LDFLAGS=-L$DEST_DIR/usr/include LDFLAGS=-L$DEST_DIR/usr/include
echo "Building nano." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing nano." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing nano size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "nano has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1 +1,11 @@
# TODO - 'nano' seems to work fine but it prints the
# following after file has been saved.
#
# nano: /lib/libncurses.so.5: no version information available (required by nano)
# nano: /lib/libncurses.so.5: no version information available (required by nano)
# nano: /lib/libtinfo.so.5: no version information available (required by nano)
# nano: /lib/libtinfo.so.5: no version information available (required by nano)
#
# This needs further investigation.
ncurses ncurses

View File

@ -9,8 +9,12 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the ncurses source directory which ls finds, e.g. 'ncurses-6.0'. # Change to the ncurses source directory which ls finds, e.g. 'ncurses-6.0'.
cd $(ls -d ncurses-*) cd $(ls -d ncurses-*)
echo "Preparing ncurses work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
@ -18,8 +22,7 @@ rm -rf $DEST_DIR
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
# http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html # http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html
# Configure Ncurses echo "Configuring '$BUNDLE_NAME'."
echo "Configuring ncurses."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
--with-termlib \ --with-termlib \
@ -42,10 +45,10 @@ CFLAGS="$CFLAGS" ./configure \
# CPPFLAGS fixes a bug with Ubuntu 16.04 # CPPFLAGS fixes a bug with Ubuntu 16.04
# https://trac.sagemath.org/ticket/19762 # https://trac.sagemath.org/ticket/19762
echo "Building ncurses." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing ncurses." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
# Symnlink wide character libraries # Symnlink wide character libraries
@ -55,11 +58,16 @@ ln -s libncurses.so.5 libncurses.so
ln -s libtinfow.so.5 libtinfo.so.5 ln -s libtinfow.so.5 libtinfo.so.5
ln -s libtinfo.so.5 libtinfo.so ln -s libtinfo.so.5 libtinfo.so
echo "Reducing ncurses size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/usr/* \
$OVERLAY_ROOTFS
echo "ncurses has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,3 +1,9 @@
#!/bin/sh #!/bin/sh
echo "starting nweb on port 80 serving /srv/www"
cat << CEOF
Starting 'nweb' on port 80. Serving '/srv/www'.
CEOF
nweb 80 /srv/www nweb 80 /srv/www

View File

@ -4,7 +4,7 @@ set -e
. ../../common.sh . ../../common.sh
echo "removing previous work area" echo "Removing previous work area."
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
@ -12,7 +12,7 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# nweb # nweb
gcc $CFLAGS $SRC_DIR/nweb23.c -o nweb gcc $CFLAGS $SRC_DIR/nweb23.c -o nweb
echo "nweb has been build." echo "'nweb' has been compiled."
install -d -m755 "$OVERLAY_ROOTFS/usr" install -d -m755 "$OVERLAY_ROOTFS/usr"
install -d -m755 "$OVERLAY_ROOTFS/usr/bin" install -d -m755 "$OVERLAY_ROOTFS/usr/bin"
@ -24,5 +24,5 @@ install -d -m755 "$OVERLAY_ROOTFS/etc"
install -d -m755 "$OVERLAY_ROOTFS/etc/autorun" install -d -m755 "$OVERLAY_ROOTFS/etc/autorun"
install -m755 "$SRC_DIR/90_nweb.sh" "$OVERLAY_ROOTFS/etc/autorun/90_nweb.sh" install -m755 "$SRC_DIR/90_nweb.sh" "$OVERLAY_ROOTFS/etc/autorun/90_nweb.sh"
echo "nweb has been installed." echo "Bundle 'nweb' has been installed."
echo "It will be autostarted on boot." echo "It will be autostarted on boot."

View File

@ -18,7 +18,9 @@ do
ln -s ../opt/$BUNDLE_NAME/bin/$FILE $FILE ln -s ../opt/$BUNDLE_NAME/bin/$FILE $FILE
done done
cp -r $WORK_DIR/overlay/$BUNDLE_NAME/* \ # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $WORK_DIR/overlay/$BUNDLE_NAME/* \
$OVERLAY_ROOTFS $OVERLAY_ROOTFS
echo "Open JDK has been installed." echo "Open JDK has been installed."

View File

@ -4,7 +4,7 @@ set -e
. ../../common.sh . ../../common.sh
echo "Removing old static-get artifacts. This may take a while." echo "Removing old 'static-get' artifacts. This may take a while."
rm -rf $DEST_DIR rm -rf $DEST_DIR
mkdir -p $DEST_DIR/opt/$BUNDLE_NAME mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
mkdir -p $DEST_DIR/bin mkdir -p $DEST_DIR/bin
@ -22,9 +22,11 @@ cd $DEST_DIR
ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/static-get ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/static-get
ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/mll-get ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/mll-get
cp -r $DEST_DIR/* \ # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS $OVERLAY_ROOTFS
echo "static-get has been installed." echo "Bundle 'static-get' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -6,31 +6,38 @@ set -e
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/stress_installed"
# Change to the stress source directory which ls finds, e.g. 'stress-1.0.4'. # Change to the stress source directory which ls finds, e.g. 'stress-1.0.4'.
cd $(ls -d stress-*) cd $(ls -d stress-*)
echo "Preparing stress work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring stress." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building stress." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing stress." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing stress size." echo "Reducing stress '$BUNDLE_NAME'."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "stress has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -6,15 +6,31 @@ set -e
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
if [ ! "$(id -u)" = "0" ] ; then
cat << CEOF
The build process for bundle '$BUNDLE_NAME' requires root
permissions. Restart the build process as 'root' in order
to build '$BUNDLE_NAME'.
CEOF
exit 1
fi
# Change to the util-linux source directory which ls finds, e.g. 'util-linux-2.31'. # Change to the util-linux source directory which ls finds, e.g. 'util-linux-2.31'.
cd $(ls -d util-linux-*) cd $(ls -d util-linux-*)
echo "Preparing util-linux work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring util-linux." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
ADJTIME_PATH=/var/lib/hwclock/adjtime \ ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-2.31 \ --docdir=/usr/share/doc/util-linux-2.31 \
@ -30,17 +46,22 @@ CFLAGS="$CFLAGS" ./configure \
--without-systemd \ --without-systemd \
--without-systemdsystemunitdir --without-systemdsystemunitdir
echo "Building util-linux." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing util-linux." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing util-linux size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "util-linux has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,27 +9,31 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the vim source directory which ls finds, e.g. 'vim-8.0.1298'. # Change to the vim source directory which ls finds, e.g. 'vim-8.0.1298'.
cd $(ls -d vim-*) cd $(ls -d vim-*)
echo "Preparing vim work area. This may take a while." if [ -f Makefile ] ; then
make -j $NUM_JOBS clean echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean
else
echo "The clean phase for '$BUNDLE_NAME' has been skipped."
fi
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Setting vimrc location." echo "Setting 'vimrc' location."
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
echo "Configuring vim." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr --prefix=/usr
echo "Building vim." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing vim." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install DESTDIR=$DEST_DIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Generating vimrc." echo "Generating '$BUNDLE_NAME'."
mkdir -p $DEST_DIR/etc mkdir -p $DEST_DIR/etc
cat > $DES_TDIR/etc/vimrc << "EOF" cat > $DEST_DIR/etc/vimrc << "EOF"
" Begin /etc/vimrc " Begin /etc/vimrc
set nocompatible set nocompatible
@ -41,16 +45,21 @@ set background=dark
" End /etc/vimrc " End /etc/vimrc
EOF EOF
echo "Symlinking vim to vi." echo "Symlinking 'vim' to 'vi'."
ln -sv vim $DEST_DIR/usr/bin/vi ln -sv vim $DEST_DIR/usr/bin/vi
mkdir -p $DEST_DIR/bin mkdir -p $DEST_DIR/bin
ln -sv vim $DEST_DIR/bin/vi ln -sv vim $DEST_DIR/bin/vi
echo "Reducing vim size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
set -e
cp -r $DEST_DIR/* $OVERLAY_ROOTFS # With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "vim has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -9,27 +9,29 @@ cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the Links source directory which ls finds, e.g. 'zlib-1.2.11'. # Change to the Links source directory which ls finds, e.g. 'zlib-1.2.11'.
cd $(ls -d zlib-*) cd $(ls -d zlib-*)
echo "Preparing ZLIB work area. This may take a while." echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make -j $NUM_JOBS clean make -j $NUM_JOBS distclean
rm -rf $DEST_DIR rm -rf $DEST_DIR
echo "Configuring ZLIB." echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=$DEST_DIR --prefix=$DEST_DIR
echo "Building ZLIB." echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing ZLIB." echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install make -j $NUM_JOBS install
echo "Reducing ZLIB size." echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/* strip -g $DEST_DIR/lib/*
set -e
mkdir -p "$OVERLAY_ROOTFS/lib" mkdir -p "$OVERLAY_ROOTFS/lib"
cp -r $DEST_DIR/lib/libz.so.1.* $OVERLAY_ROOTFS/lib/libz.so.1 cp -r $DEST_DIR/lib/libz.so.1.* $OVERLAY_ROOTFS/lib/libz.so.1
echo "ZLIB has been installed." echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR cd $SRC_DIR