Merge pull request #243 from TobiasFaller/feature-screen-bundle
Draft: Added GNU screen overlay bundle
This commit is contained in:
commit
a490e248ff
@ -164,6 +164,7 @@ OVERLAY_TYPE=folder
|
|||||||
# nweb - simple mini http server.
|
# nweb - simple mini http server.
|
||||||
# openjdk - installs Open JDK. All operations are automated.
|
# openjdk - installs Open JDK. All operations are automated.
|
||||||
# python - Python3 scripting support (pip and packages optional).
|
# python - Python3 scripting support (pip and packages optional).
|
||||||
|
# screen - GNU screen utility to interact with VT100 terminals
|
||||||
# static_get - portable binaries for Linux (http://s.minos.io).
|
# static_get - portable binaries for Linux (http://s.minos.io).
|
||||||
# stress - CPU and RAM load generator.
|
# stress - CPU and RAM load generator.
|
||||||
# util_linux - executable utilities distributed by the Linux Kernel org.
|
# util_linux - executable utilities distributed by the Linux Kernel org.
|
||||||
|
@ -30,6 +30,7 @@ CFLAGS="$CFLAGS" ./configure \
|
|||||||
--with-default-terminfo-dirs=/lib/terminfo \
|
--with-default-terminfo-dirs=/lib/terminfo \
|
||||||
--without-normal \
|
--without-normal \
|
||||||
--without-debug \
|
--without-debug \
|
||||||
|
--without-ada \
|
||||||
--without-cxx-binding \
|
--without-cxx-binding \
|
||||||
--with-abi-version=6 \
|
--with-abi-version=6 \
|
||||||
--enable-widec \
|
--enable-widec \
|
||||||
|
0
src/minimal_overlay/bundles/passwd/.config
Normal file
0
src/minimal_overlay/bundles/passwd/.config
Normal file
10
src/minimal_overlay/bundles/passwd/01_create.sh
Executable file
10
src/minimal_overlay/bundles/passwd/01_create.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
mkdir -p $DEST_DIR/etc
|
||||||
|
echo 'root::0:0:Superuser:/:/bin/sh' > $DEST_DIR/etc/passwd
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
14
src/minimal_overlay/bundles/passwd/02_install.sh
Executable file
14
src/minimal_overlay/bundles/passwd/02_install.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
# 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 '$BUNDLE_NAME' has been installed."
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
10
src/minimal_overlay/bundles/passwd/bundle.sh
Executable file
10
src/minimal_overlay/bundles/passwd/bundle.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
./01_create.sh
|
||||||
|
./02_install.sh
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
5
src/minimal_overlay/bundles/screen/.config
Normal file
5
src/minimal_overlay/bundles/screen/.config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# You can find the latest screen source bundles here:
|
||||||
|
#
|
||||||
|
# https://www.gnu.org/software/screen/
|
||||||
|
#
|
||||||
|
SCREEN_SOURCE_URL=https://ftp.gnu.org/gnu/screen/screen-4.8.0.tar.gz
|
38
src/minimal_overlay/bundles/screen/01_get.sh
Executable file
38
src/minimal_overlay/bundles/screen/01_get.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
# Read the common configuration properties.
|
||||||
|
DOWNLOAD_URL=`read_property SCREEN_SOURCE_URL`
|
||||||
|
USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
|
||||||
|
|
||||||
|
# Grab everything after the last '/' character.
|
||||||
|
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||||
|
|
||||||
|
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
|
||||||
|
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
|
||||||
|
USE_LOCAL_SOURCE="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/source/overlay
|
||||||
|
|
||||||
|
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||||
|
# Downloading screen source bundle file. The '-c' option allows the download to resume.
|
||||||
|
echo "Downloading screen source bundle from $DOWNLOAD_URL"
|
||||||
|
wget -c $DOWNLOAD_URL
|
||||||
|
else
|
||||||
|
echo "Using local screen source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Delete folder with previously extracted screen.
|
||||||
|
echo "Removing screen work area. This may take a while."
|
||||||
|
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
|
# Extract screen to folder 'work/overlay/screen'.
|
||||||
|
# Full path will be something like 'work/overlay/screen/screen-4.8.0'.
|
||||||
|
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
50
src/minimal_overlay/bundles/screen/02_build.sh
Executable file
50
src/minimal_overlay/bundles/screen/02_build.sh
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
cd $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
|
# Change to the screen source directory which ls finds, e.g. 'screen-4.8.0'.
|
||||||
|
cd $(ls -d screen-*)
|
||||||
|
|
||||||
|
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 "Configuring '$BUNDLE_NAME'."
|
||||||
|
CFLAGS="$CFLAGS -I${OVERLAY_ROOTFS}/include" \
|
||||||
|
LDFLAGS="$LDFLAGS -L${OVERLAY_ROOTFS}/lib -L${OVERLAY_ROOTFS}/usr/lib" \
|
||||||
|
./configure --prefix=/usr
|
||||||
|
|
||||||
|
# Remove the dependency to libutempter as it is
|
||||||
|
# not available on the target system.
|
||||||
|
echo "Patching configuration of '$BUNDLE_NAME'."
|
||||||
|
sed -i 's|-lutempter||g' Makefile
|
||||||
|
sed -i 's|#define HAVE_UTEMPTER 1||g' config.h
|
||||||
|
|
||||||
|
echo "Building '$BUNDLE_NAME'."
|
||||||
|
make -j $NUM_JOBS
|
||||||
|
|
||||||
|
echo "Installing '$BUNDLE_NAME'."
|
||||||
|
make -j $NUM_JOBS install DESTDIR=$DEST_DIR
|
||||||
|
|
||||||
|
echo "Reducing '$BUNDLE_NAME' size."
|
||||||
|
set +e
|
||||||
|
strip -g $DEST_DIR/usr/bin/*
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# 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 '$BUNDLE_NAME' has been installed."
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
10
src/minimal_overlay/bundles/screen/bundle.sh
Executable file
10
src/minimal_overlay/bundles/screen/bundle.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
./01_get.sh
|
||||||
|
./02_build.sh
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
3
src/minimal_overlay/bundles/screen/bundle_deps
Normal file
3
src/minimal_overlay/bundles/screen/bundle_deps
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ncurses
|
||||||
|
passwd
|
||||||
|
libxcrypt
|
Loading…
x
Reference in New Issue
Block a user