=== removed file 'configs/alpine-amd64-edge_lxc-guest' --- configs/alpine-amd64-edge_lxc-guest 2019-01-25 18:02:55 +0000 +++ configs/alpine-amd64-edge_lxc-guest 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -FSB_TARGET=alpine_ssh_key -source $0:h/alpine-amd64-edge -STAGE_ALPINE_PACKAGES=( rsync mksh zsh findutils openssh ) -STAGE_ALPINE_REPOSITORIES=( main testing ) -STAGE_ALPINE_S6RC_SERVICES=( udhcpc sshd ) === modified file 'configs/alpine-x86-edge_router' --- configs/alpine-x86-edge_router 2019-01-25 18:02:55 +0000 +++ configs/alpine-x86-edge_router 2017-04-11 16:44:24 +0000 @@ -1,3 +1,3 @@ source $0:h/alpine-x86-edge -STAGE_ALPINE_PACKAGES=( rsync mksh zsh findutils dnssec-root unbound dhcp dhcpcd s6 s6-networking ppp syslinux iptables e2fsprogs xfsprogs minicom ntop htop netdata linux-vanilla util-linux ) +STAGE_ALPINE_PACKAGES=( rsync mksh zsh findutils dnssec-root unbound dhcp dhcpcd s6 s6-networking ppp syslinux iptables e2fsprogs xfsprogs minicom ntop htop collectd{,-{network,iptables,snmp}} linux-grsec util-linux ) STAGE_ALPINE_REPOSITORIES=( main testing ) === removed file 'configs/alpine-x86-stable' --- configs/alpine-x86-stable 2019-01-25 18:02:55 +0000 +++ configs/alpine-x86-stable 1970-01-01 00:00:00 +0000 @@ -1,4 +0,0 @@ -: ${FSB_TARGET:=alpine_packages} -STAGE_ALPINE_ARCH=x86 -STAGE_ALPINE_RELEASE=latest-stable - === removed file 'configs/alpine-x86-stable_router' --- configs/alpine-x86-stable_router 2019-01-25 18:02:55 +0000 +++ configs/alpine-x86-stable_router 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -source $0:h/alpine-x86-stable -STAGE_ALPINE_PACKAGES=( rsync mksh zsh findutils dnssec-root unbound dhcp dhcpcd s6 s6-networking ppp syslinux iptables e2fsprogs xfsprogs minicom ntop htop netdata linux-grsec util-linux ) -STAGE_ALPINE_REPOSITORIES=( main ) === modified file 'configs/amd64_desktop_minimal' --- configs/amd64_desktop_minimal 2019-01-25 18:02:55 +0000 +++ configs/amd64_desktop_minimal 2017-05-31 14:45:10 +0000 @@ -3,4 +3,3 @@ STAGE_GENTOO_PROFILE=default/linux/amd64/13.0 STAGE_GENTOO_FLAVOR=minimal-desktop FSB_TARGET=gentoo_bootloader -unset EATMYDATA === removed file 'functions/fsb_target_alpine_s6_init' --- functions/fsb_target_alpine_s6_init 2019-01-25 18:02:55 +0000 +++ functions/fsb_target_alpine_s6_init 1970-01-01 00:00:00 +0000 @@ -1,38 +0,0 @@ -# vim: ft=zsh -if [[ $1 == info ]]; then - if ! (($+STAGE_ALPINE_S6RC_SERVICES)); then - die "STAGE_ALPINE_S6RC_SERVICES needs to be defined" - fi - FSB_INFO_DEPEND=alpine_packages - FSB_INFO_BASE=%s - FSB_INFO_DIR=%s-s6-init - return -elif [[ $1 != build ]]; then - die "unimplemented action: $*" -fi - -$build_dir/chroot.sh /sbin/apk add --verbose s6 s6-rc s6-portable-utils s6-linux-utils rsync zsh || \ - die "Could not install alpine packages: s6 s6-rc" - -fsapply $build_dir $FSB_TEMPLATE_DIR/s6-init.fslist || \ - die "fsapply failed" - -#$build_dir/chroot.sh /root/s6-init/install || \ -# die "s6-linux-init-maker failed" - -s6-linux-init-maker \ - -b /bin \ - -p /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - $build_dir/etc/s6-linux-init || \ - die "s6-linux-init-maker failed" - #-G "/sbin/getty 38400 tty2" \ - -local svc -for svc in $STAGE_ALPINE_S6RC_SERVICES; do - fsapply $build_dir/etc/s6-rc/source $FSB_TEMPLATE_DIR/s6-rc.$svc.fslist || \ - die "fsapply failed" - printf "%s\n" $svc >>$build_dir/etc/s6-rc/source/ok-all/contents -done - -$build_dir/chroot.sh /etc/s6-rc/compile || \ - die "s6-rc-compile failed" === removed file 'functions/fsb_target_alpine_ssh_key' --- functions/fsb_target_alpine_ssh_key 2019-01-25 18:02:55 +0000 +++ functions/fsb_target_alpine_ssh_key 1970-01-01 00:00:00 +0000 @@ -1,15 +0,0 @@ -# vim: ft=zsh -if [[ $1 == info ]]; then - if ! (($+STAGE_ALPINE_S6RC_SERVICES)); then - die "STAGE_ALPINE_S6RC_SERVICES needs to be defined" - fi - FSB_INFO_DEPEND=alpine_s6_init - FSB_INFO_BASE=%s - FSB_INFO_DIR=%s-ssh-key - return -elif [[ $1 != build ]]; then - die "unimplemented action: $*" -fi - -fsapply $build_dir $FSB_TEMPLATE_DIR/root-ssh.fslist || \ - die "fsapply failed" === modified file 'functions/fsb_target_gentoo_init' --- functions/fsb_target_gentoo_init 2019-01-25 18:02:55 +0000 +++ functions/fsb_target_gentoo_init 2017-05-31 14:45:10 +0000 @@ -48,7 +48,7 @@ fi fi -mkdir -p $build_dir/usr/portage/gentoo || die +mkdir -p $build_dir/usr/portage || die for dir in $dir in $build_dir/etc/portage/package.{mask,keywords,use}; do if [[ -f $dir ]]; then @@ -65,7 +65,6 @@ EMERGE_DEFAULT_OPTS="--verbose --quiet-build=y --keep-going" MAKEOPTS="${MAKEOPTS:--j$(cat /proc/cpuinfo | grep '^processor' | wc -l)}" -PORTDIR="/usr/portage/gentoo" PORTDIR_OVERLAY="/var/portage/local" PKGDIR="/var/portage/packages" DISTDIR="/var/portage/distfiles" @@ -81,13 +80,12 @@ profile_link="$(readlink $build_dir/etc/portage/make.profile)" || die "could not read $build_dir/etc/portage/make.profile" [[ -n $profile_link ]] || die "$build_dir/etc/portage/make.profile is invalid" -profile_expected=../usr/portage/gentoo/profiles/$STAGE_GENTOO_PROFILE +profile_expected=../usr/portage/profiles/$STAGE_GENTOO_PROFILE [[ $profile_link != $profile_expected ]] || \ die $'mismatched profile\nexpected: '${(qqq)profile_expected}$'\ngot: '${(qqq)profile_link} mv $build_dir/etc/portage/make.profile{,.orig} || die -#profile=/usr/portage/gentoo/${${profile_link#*/portage}#/gentoo} -profile=/etc/portage/$profile_link +profile=/usr/portage/${profile_link#*/portage/} ln -s ../../var/portage/local/profiles/custom $build_dir/etc/portage/make.profile || die print -r - $profile >>$build_dir/var/portage/local/profiles/custom/parent || die fsb_gentoo_overlay_add ccx-bootstrap === modified file 'template/chroot.sh' --- template/chroot.sh 2019-01-25 18:02:55 +0000 +++ template/chroot.sh 2013-05-22 20:34:55 +0000 @@ -71,7 +71,7 @@ trymount -t proc none proc [[ -d usr/portage ]] && \ - trymount --bind $PORTDIR usr/portage/gentoo + trymount --bind $PORTDIR usr/portage [[ -d var/portage/distfiles ]] && \ trymount --bind $DISTDIR var/portage/distfiles === removed file 'template/root-ssh.fslist' --- template/root-ssh.fslist 2019-01-25 18:02:55 +0000 +++ template/root-ssh.fslist 1970-01-01 00:00:00 +0000 @@ -1,19 +0,0 @@ -/root d -/root/.ssh d -/root/.ssh/authorized_keys -!fc awk ' - BEGIN{ getline key <"/home/ccx/.ssh/id_rsa.pub" } #> - $0 == key { seen = 1 } - { print $0 } - END { if(!seen) print key } - ' -m600 -#/etc/ssh/sshd_config -#!fc awk ' -# BEGIN{ getline key <"/home/ccx/.ssh/id_rsa.pub" } #> -# $0 == key { seen = 1 } -# { print $0 } -# END { if(!seen) print key } -# ' -#m600 - === removed file 'template/s6-init.fslist' --- template/s6-init.fslist 2019-01-25 18:02:55 +0000 +++ template/s6-init.fslist 1970-01-01 00:00:00 +0000 @@ -1,109 +0,0 @@ -/root/s6-init d o0:0 m755 -/root/s6-init/install -C #!/bin/zsh - cd $0:h || exit $? - if [[ -d basedir ]]; then - rm -rf basedir || exit $? - fi - s6-linux-init-maker \ - -b /bin \ - -p /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - basedir || exit $? - # -G "/sbin/getty 38400 tty2" \ - rsync -aAH --delete ./basedir/ /etc/s6-linux-init/ -o0:0 m755 - -/etc/s6-rc d o0:0 m755 -/etc/s6-rc/compile -C #!/bin/zsh - zmodload zsh/stat || exit $? - zmodload zsh/datetime || exit $? - set -x - cd $0:h || exit $? - dst=./versions/compiled.$EPOCHSECONDS - s6-rc-compile $dst.new source || exit $? - s6-rename $dst.new $dst || exit $? - exec s6-ln -s -f -n $dst compiled - # if [[ -d compiled ]]; then - # if [[ ! -e old ]]; then - # mkdir old || exit $? - # fi - # s6-rename ./compiled ./old/compiled.$(zstat +mtime compiled) || exit $? - # fi -o0:0 m755 -/etc/s6-rc/source d o0:0 m755 -/etc/s6-rc/source/ok-all d o0:0 m755 -/etc/s6-rc/source/ok-all/type c bundle o0:0 m644 -/etc/s6-rc/update -C #!/bin/zsh - zmodload zsh/stat || exit $? - zmodload zsh/datetime || exit $? - set -x - cd $0:h || exit $? - dst=./versions/compiled.$EPOCHSECONDS - s6-rc-compile $dst.new source || exit $? - s6-rename $dst.new $dst || exit $? - s6-rc-update -v 2 $(realpath $dst) || exit $? - s6-rc -u change ok-all || exit $? - exec s6-ln -s -f -n $dst compiled -o0:0 m755 -/etc/s6-rc/versions d o0:0 m755 - -/etc/rc.init -C #!/bin/execlineb -P - - export TERM "linux" - - # Set the system clock to something sensible, - # to get coherent logs until the initial NTP exchange - - if { /sbin/openrc sysinit } - #if { /sbin/openrc boot } - #if { /sbin/openrc default } - - # if { s6-clock @400000005a58000000000000 } - - - # Initialize the service manager - - if { s6-rc-init -d /run/service } - - - # Run the service manager. - # Call it twice because the first time may spuriously "timeout" - # due to the clock jumping forward. - - if -nt { s6-rc -t 600000 -- change ok-all } - s6-rc -t 600000 -- change ok-all -o0:0 m755 - -/etc/rc.shutdown -C #!/bin/execlineb -P - - redirfd -w 1 /dev/console - fdmove -c 2 1 - - foreground - { - s6-echo "/etc/rc.shutdown called" - } - - # Write a message to /var/log/syslogd - - foreground - { - s6-ipcclient -l0 /dev/log - fdmove 1 7 - s6-echo "/etc/rc.shutdown: shutdown requested" - } - - # foreground { /sbin/openrc shutdown } - - # Shut down all services - - if -n { s6-rc -da change } - foreground { s6-echo "`s6-rc -da change` failed" } - foreground { sleep 2s } -o0:0 m755 - -/sbin/init l ../etc/s6-linux-init/init o0:0 === removed file 'template/s6-rc.sshd.fslist' --- template/s6-rc.sshd.fslist 2019-01-25 18:02:55 +0000 +++ template/s6-rc.sshd.fslist 1970-01-01 00:00:00 +0000 @@ -1,7 +0,0 @@ -/sshd d -/sshd/type c longrun -/sshd/run -C #!/bin/execlineb -P - foreground { ssh-keygen -A } - /usr/sbin/sshd - === removed file 'template/s6-rc.udhcpcd.fslist' --- template/s6-rc.udhcpcd.fslist 2019-01-25 18:02:55 +0000 +++ template/s6-rc.udhcpcd.fslist 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -/udhcpc d -/udhcpc/type c longrun -/udhcpc/run -C #!/bin/execlineb -P - udhcpc -f