diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-04-23 00:23:36 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-04-23 00:31:02 -0400 |
| commit | 477bfced7fdaa525f9cc7f13afdacb2a48f07379 (patch) | |
| tree | fc1e657add7456e7c791d7729c08e37feae4567e /scripts | |
| parent | 42f57801fc0a0842aedbb8d645641710f4877c87 (diff) | |
| download | min-477bfced7fdaa525f9cc7f13afdacb2a48f07379.tar.gz min-477bfced7fdaa525f9cc7f13afdacb2a48f07379.tar.xz | |
Bump to 4.16.3 in /boot/syslinux.cfg
Add `ssh`, `nobody`, and `nogroup`, in `/etc/passwd` and `/etc/group`
Updated the init script to use `mdev`
Added a service definition for a getty on tty0
Added a service definition for sshd
Added busybox udhcpc `default.script` I *still need to check the
license* ( Copied from my Gentoo installation, and works )
Updated readme.md to reflect the fact that we pull in the commands from
`pfx` and you'll need to add `/lib/ld-musl-x86_64.so.1` or change the
PATH in `./inc`
Added rsync, ncdu xz and grub. Removed tar-pfx.sh Replaced with
cpio-pfx.sh
added `conf.sh` which will be taking care of basic system configuration
for now
Change configuration directory for libressl
Enable wide chars in `ncurses`
Use `/etc` for SSH configuration files
Remove make clean from tree.sh and xz.sh
Added relevant files to sources.lst
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build.sh | 6 | ||||
| -rw-r--r-- | scripts/conf.sh | 2 | ||||
| -rw-r--r-- | scripts/cpio-pfx.sh | 11 | ||||
| -rw-r--r-- | scripts/grub.sh | 7 | ||||
| -rw-r--r-- | scripts/libarchive.sh | 2 | ||||
| -rw-r--r-- | scripts/libressl.sh | 2 | ||||
| -rw-r--r-- | scripts/ncdu.sh | 21 | ||||
| -rw-r--r-- | scripts/ncurses.sh | 1 | ||||
| -rw-r--r-- | scripts/nginx.sh | 3 | ||||
| -rw-r--r-- | scripts/openssh.sh | 3 | ||||
| -rw-r--r-- | scripts/pv.sh | 2 | ||||
| -rw-r--r-- | scripts/rsync.sh | 21 | ||||
| -rw-r--r-- | scripts/tar-pfx.sh | 18 | ||||
| -rw-r--r-- | scripts/tree.sh | 1 | ||||
| -rw-r--r-- | scripts/xz.sh | 2 |
15 files changed, 69 insertions, 33 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 604af31..92296cf 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -14,7 +14,9 @@ $shell scripts/libressl.sh $shell scripts/openssh.sh $shell scripts/nginx.sh $shell scripts/libarchive.sh +$shell scripts/rsync.sh +$shell scripts/ncdu.sh +$shell scripts/xz.sh $shell scripts/runit.sh $shell scripts/conf.sh -$shell scripts/tar-pfx.sh -# $shell scripts/grub.sh +$shell scripts/grub.sh diff --git a/scripts/conf.sh b/scripts/conf.sh index 568bcdd..385f028 100644 --- a/scripts/conf.sh +++ b/scripts/conf.sh @@ -3,3 +3,5 @@ . ./.vars cp -av local/* $prefix/ +cd $prefix +mkdir -p dev proc sys tmp run var/log var/tmp var/run root diff --git a/scripts/cpio-pfx.sh b/scripts/cpio-pfx.sh new file mode 100644 index 0000000..483b4d9 --- /dev/null +++ b/scripts/cpio-pfx.sh @@ -0,0 +1,11 @@ +#!/bin/sh +. ./.vars + +SZE=$(du -sm $prefix |awk '{print $1}') + + # | cpio -R root:root -do - \ +cd "$prefix" +find . \ + | cpio -v -R root:root -oH newc \ + | pv -s ${SZE}M \ + | xz -T1 -1 -c > $base_dir/pfx.cpio.xz diff --git a/scripts/grub.sh b/scripts/grub.sh index 8c37155..37c8e3c 100644 --- a/scripts/grub.sh +++ b/scripts/grub.sh @@ -7,9 +7,14 @@ if ! [ -d "${build_dir}/grub-$VERSION" ] ; then fi cd "grub-$VERSION" export DESTDIR="$prefix" +export LDFLAGS="-static" +export CFLAGS="-static" +export CPPFLAGS="$CFLAGS" ./configure \ --prefix='/usr' \ + --sysconfdir='/etc' \ + --host=$BUILD_TGT \ --disable-werror # Why in the fuck do I have to add disable -Werror? # Is GRUB really *that* shit? -make -j8 +make -j$(nproc) make install diff --git a/scripts/libarchive.sh b/scripts/libarchive.sh index 6311950..a669b11 100644 --- a/scripts/libarchive.sh +++ b/scripts/libarchive.sh @@ -12,8 +12,6 @@ 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 \ diff --git a/scripts/libressl.sh b/scripts/libressl.sh index ed330e0..f5458d7 100644 --- a/scripts/libressl.sh +++ b/scripts/libressl.sh @@ -12,8 +12,8 @@ cd "$BUILD_DIR" export CFLAGS="-static -I$prefix/usr/include" export LDFLAGS="-static -L$prefix/usr/lib" export DESTDIR="$prefix" -make clean || echo "" ./configure --prefix=/usr \ + --sysconfdir=/etc \ --host=$BUILD_TGT \ --with-sysroot=$prefix \ --enable-static=yes diff --git a/scripts/ncdu.sh b/scripts/ncdu.sh new file mode 100644 index 0000000..b8bee9a --- /dev/null +++ b/scripts/ncdu.sh @@ -0,0 +1,21 @@ +#!/bin/sh +. ./.vars +VERSION=1.13 +APP_NAME="ncdu" +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 CPPFLAGS="$CFLAGS" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -L$prefix/lib -static" +./configure \ + --prefix=/usr \ + --with-local-dir=$prefix/usr \ + --with-ncurses +make -j$(nproc) +make install diff --git a/scripts/ncurses.sh b/scripts/ncurses.sh index 3f12d93..f07783d 100644 --- a/scripts/ncurses.sh +++ b/scripts/ncurses.sh @@ -14,6 +14,7 @@ export DESTDIR="$prefix" ./configure \ --host=$BUILD_TGT \ --prefix=/usr \ + --enable-wide \ --enable-static make -j$(numproc) make install diff --git a/scripts/nginx.sh b/scripts/nginx.sh index 5035a19..de7fb0e 100644 --- a/scripts/nginx.sh +++ b/scripts/nginx.sh @@ -14,7 +14,7 @@ cd "$BUILD_DIR" export CFLAGS="-static -I$prefix/usr/include" export LDFLAGS="-static -L$prefix/usr/lib" export DESTDIR="$prefix" -make clean || echo "" +# make clean || echo "" > /dev/null ./configure --prefix=/usr \ --without-pcre \ --conf-path="/etc/nginx/nginx.conf" \ @@ -30,5 +30,4 @@ sed -e"s/^CC =.*$/CC = ${BUILD_TGT}-gcc/g" \ -e'1aLDFLAGS = -static' \ objs/Makefile.bak > objs/Makefile make -j$(nproc) -# make make install diff --git a/scripts/openssh.sh b/scripts/openssh.sh index ac59fd3..1f1f5b2 100644 --- a/scripts/openssh.sh +++ b/scripts/openssh.sh @@ -10,10 +10,9 @@ cd "$BUILD_DIR" export CFLAGS="-I$prefix/usr/include" export LDFLAGS="-static -L$prefix/usr/lib/" export DESTDIR="$prefix" -rm config.log || echo "" -make clean || echo "" ./configure \ --host=$BUILD_TGT \ + --sysconfdir=/etc \ --prefix=/usr \ --without-openssl cp Makefile Makefile.bak diff --git a/scripts/pv.sh b/scripts/pv.sh index f715dc7..3bdfecb 100644 --- a/scripts/pv.sh +++ b/scripts/pv.sh @@ -12,8 +12,6 @@ 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 \ diff --git a/scripts/rsync.sh b/scripts/rsync.sh new file mode 100644 index 0000000..6944e75 --- /dev/null +++ b/scripts/rsync.sh @@ -0,0 +1,21 @@ +#!/bin/sh +. ./.vars +VERSION=3.1.3 +APP_NAME="rsync" +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 CPPFLAGS="$CFLAGS" +export DESTDIR=$prefix +export LDFLAGS="-L$prefix/usr/lib/ -static" +./configure \ + --host=$BUILD_TGT \ + --prefix=/usr \ + --with-sysroot=$prefix +make -j$(nproc) +make install diff --git a/scripts/tar-pfx.sh b/scripts/tar-pfx.sh deleted file mode 100644 index 2b5a215..0000000 --- a/scripts/tar-pfx.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -. ./.vars - -SZE=$(du -sm $prefix |awk '{print $1}') - - # | cpio -R root:root -do - \ -find $prefix \ - | cpio -v -R root:root -oH newc \ - | pv -s ${SZE}M \ - | xz -T0 -9 -c > pfx.txz - -# bsdtar \ -# --numeric-owner \ -# --owner=root \ -# --group=root \ -# -C pfx \ -# -cvf - . \ -# | xz -9 -T0 -vc > pfx.txz diff --git a/scripts/tree.sh b/scripts/tree.sh index 7f804cf..c3a61f7 100644 --- a/scripts/tree.sh +++ b/scripts/tree.sh @@ -16,6 +16,5 @@ sed -e's/^CC.*$/CC = gcc/g' \ -e"s@^prefix.*\$@prefix = $prefix/usr@g" \ < Makefile.bak > Makefile rm Makefile.bak -make clean || echo "" > /dev/null make make install diff --git a/scripts/xz.sh b/scripts/xz.sh index 079f3e2..9ff33a1 100644 --- a/scripts/xz.sh +++ b/scripts/xz.sh @@ -13,8 +13,6 @@ export CFLAGS="-I$prefix/usr/include -static" export CPPFLAGS="$CFLAGS" export DESTDIR=$prefix export LDFLAGS="-L$prefix/usr/lib/ -static" -rm config.log || echo "" -make clean || echo "" ./configure \ --host=$BUILD_TGT \ --prefix=/usr \ |
