From b3810b12552a937dcb6486ccf775a0bd9094db23 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sun, 22 Apr 2018 16:26:22 -0400 Subject: Added libarchive Moved syslinux config file still messing with packaging --- local/boot/syslinux.cfg | 16 ++++++++++++++++ local/etc/syslinux.cfg | 16 ---------------- scripts/build.sh | 3 +++ scripts/conf.sh | 5 +++++ scripts/libarchive.sh | 27 +++++++++++++++++++++++++++ scripts/openssh.sh | 4 ---- scripts/tar-pfx.sh | 10 ++++++++++ sources.lst | 1 + 8 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 local/boot/syslinux.cfg delete mode 100644 local/etc/syslinux.cfg create mode 100644 scripts/conf.sh create mode 100644 scripts/libarchive.sh create mode 100644 scripts/tar-pfx.sh diff --git a/local/boot/syslinux.cfg b/local/boot/syslinux.cfg new file mode 100644 index 0000000..f5ef39c --- /dev/null +++ b/local/boot/syslinux.cfg @@ -0,0 +1,16 @@ +SERIAL 0 115200 +PROMPT 1 +TIMEOUT 50 +DEFAULT linux-runit + +LABEL linux-runit + LINUX /boot/vmlinuz-4.16.2 + APPEND root=/dev/vda1 rw init=/sbin/runit-init console=tty0 console=ttyS0,11500n8 + +LABEL linux-mksh + LINUX /boot/vmlinuz-4.16.2 + APPEND root=/dev/vda1 rw init=/bin/mksh console=tty0 console=ttyS0,11500n8 + +LABEL linux + LINUX /boot/vmlinuz-4.16.2 + APPEND root=/dev/vda1 rw init=/sbin/init console=tty0 console=ttyS0,11500n8 diff --git a/local/etc/syslinux.cfg b/local/etc/syslinux.cfg deleted file mode 100644 index 197ad00..0000000 --- a/local/etc/syslinux.cfg +++ /dev/null @@ -1,16 +0,0 @@ -SERIAL 0 115200 -PROMPT 1 -TIMEOUT 50 -DEFAULT linux-runit - -LABEL linux-mksh - LINUX /boot/vmlinuz-4.16.2 - APPEND root=/dev/vda1 rw init=/bin/mksh console=tty0 console=ttyS0,11500n8 - -LABEL linux-runit - LINUX /boot/vmlinuz-4.16.2 - APPEND root=/dev/vda1 rw init=/sbin/runit-init console=tty0 console=ttyS0,11500n8 - -LABEL linux - LINUX /boot/vmlinuz-4.16.2 - APPEND root=/dev/vda1 rw init=/sbin/init console=tty0 console=ttyS0,11500n8 diff --git a/scripts/build.sh b/scripts/build.sh index da3ea68..c5b47bd 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -12,5 +12,8 @@ $shell scripts/zlib.sh $shell scripts/libressl.sh $shell scripts/openssh.sh $shell scripts/nginx.sh +$shell scripts/libarchive.sh.sh $shell scripts/runit.sh +$shell scripts/conf.sh +$shell scripts/tar-pfx.sh # $shell scripts/grub.sh diff --git a/scripts/conf.sh b/scripts/conf.sh new file mode 100644 index 0000000..568bcdd --- /dev/null +++ b/scripts/conf.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Installs *MIN*imum system configuration files +. ./.vars + +cp -av local/* $prefix/ diff --git a/scripts/libarchive.sh b/scripts/libarchive.sh new file mode 100644 index 0000000..6311950 --- /dev/null +++ b/scripts/libarchive.sh @@ -0,0 +1,27 @@ +#!/bin/sh +. ./.vars +VERSION=3.3.2 +APP_NAME="libarchive" +BUILD_DIR="${build_dir}/$APP_NAME-$VERSION" +if ! [ -d "$BUILD_DIR" ] ; then + cd "$build_dir" + tar xfzv ${dist_dir}/$APP_NAME-$VERSION.tar.gz +fi +cd "$BUILD_DIR" +export CC=$BUILD_TGT-gcc +export CFLAGS="-I$prefix/usr/include -static" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -static" +rm config.log || echo "" +make clean || echo "" +./configure \ + --host=$BUILD_TGT \ + --prefix=/usr \ + --without-xml2 \ + --enable-bsdtar=static \ + --enable-bsdcpio=static \ + --enable-bsdcat=static \ + --without-openssl \ + --with-sysroot=$prefix +make -j$(nproc) +make install diff --git a/scripts/openssh.sh b/scripts/openssh.sh index 78e814f..ac59fd3 100644 --- a/scripts/openssh.sh +++ b/scripts/openssh.sh @@ -1,6 +1,5 @@ #!/bin/sh . ./.vars -export DESTDIR=$prefix VERSION=7.7p1 BUILD_DIR="${build_dir}/openssh-$VERSION" if ! [ -d "$BUILD_DIR" ] ; then @@ -8,10 +7,7 @@ if ! [ -d "$BUILD_DIR" ] ; then tar xfzv ${dist_dir}/openssh-$VERSION.tar.gz fi cd "$BUILD_DIR" -# export CC=gcc export CFLAGS="-I$prefix/usr/include" -# export CPPFLAGS="$CFLAGS" -# export CXXFLAGS="$CFLAGS" export LDFLAGS="-static -L$prefix/usr/lib/" export DESTDIR="$prefix" rm config.log || echo "" diff --git a/scripts/tar-pfx.sh b/scripts/tar-pfx.sh new file mode 100644 index 0000000..b395764 --- /dev/null +++ b/scripts/tar-pfx.sh @@ -0,0 +1,10 @@ +#!/bin/sh +. ./.vars + +bsdtar \ + --numeric-owner \ + --owner=root \ + --group=root \ + -C pfx \ + -cvf - . \ + | xz -9 -T0 -vc > pfx.txz diff --git a/sources.lst b/sources.lst index dbe2330..c8ea5b8 100644 --- a/sources.lst +++ b/sources.lst @@ -13,3 +13,4 @@ https://www.zlib.net/zlib-1.2.11.tar.gz https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.2.tar.gz https://www.openssl.org/source/openssl-1.0.2o.tar.gz http://nginx.org/download/nginx-1.14.0.tar.gz +http://libarchive.org/downloads/libarchive-3.3.2.tar.gz -- cgit v1.2.3