From 86d4c12c0967d8aa6a0e3ac9ba46d4ade13f1911 Mon Sep 17 00:00:00 2001 From: Andrew Clemons Date: Sun, 27 Feb 2022 18:42:28 +1300 Subject: [PATCH] Updates for building 15.0 and the latest -current. --- base/15.0/Dockerfile | 2 ++ base/15.0/README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++ mkimage-slackware.sh | 25 ++++++++++++++++++++---- 3 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 base/15.0/Dockerfile create mode 100644 base/15.0/README.md diff --git a/base/15.0/Dockerfile b/base/15.0/Dockerfile new file mode 100644 index 0000000..5a8dfd9 --- /dev/null +++ b/base/15.0/Dockerfile @@ -0,0 +1,2 @@ +FROM vbatts/slackware-base:15.0 +MAINTAINER Vincent Batts diff --git a/base/15.0/README.md b/base/15.0/README.md new file mode 100644 index 0000000..3614121 --- /dev/null +++ b/base/15.0/README.md @@ -0,0 +1,46 @@ +vbatts/slackware +================ + +base image of slackware64-15.0 + +Index +===== + +This is this build process used to be the base of 'vbatts/slackware' on the +http://index.docker.io/ + +Just running: + + $> sudo docker run -i -t vbatts/slackware:15.0 /bin/sh + +Will pull down this image for testing. + +Contributing +============ +please hack on this and send feedback! + +License +======= + +Copyright (c) 2013, Vincent Batts +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/mkimage-slackware.sh b/mkimage-slackware.sh index d0bd3bf..0016096 100755 --- a/mkimage-slackware.sh +++ b/mkimage-slackware.sh @@ -21,11 +21,9 @@ ROOTFS=${ROOTFS:-"/tmp/rootfs-${RELEASE}"} CWD=$(pwd) base_pkgs="a/aaa_base \ - a/aaa_elflibs \ a/aaa_libraries \ a/coreutils \ a/glibc-solibs \ - a/aaa_glibc-solibs \ a/aaa_terminfo \ a/pam \ a/cracklib \ @@ -72,6 +70,24 @@ base_pkgs="a/aaa_base \ n/iproute2 \ n/openssl" +base_pkgs_legacy="a/aaa_elflibs \ + a/glibc-solibs" +base_pkgs_15_0="a/aaa_libraries \ + a/aaa_glibc-solibs" +base_pkgs_current="a/aaa_libraries \ + a/aaa_glibc-solibs" + +if [[ "$VERSION" == "current" ]]; then + base_pkgs="$base_pkgs_current \ + $base_pkgs" +elif [[ "$VERSION" == "15.0" ]]; then + base_pkgs="$base_pkgs_15_0 \ + $base_pkgs" +else + base_pkgs="$base_pkgs_legacy \ + $base_pkgs" +fi + function cacheit() { file=$1 if [ ! -f "${CACHEFS}/${file}" ] ; then @@ -126,7 +142,7 @@ fi # an update in upgradepkg during the 14.2 -> 15.0 cycle changed/broke this root_env="" root_flag="--root /mnt" -if [ "$VERSION" = "current" ] ; then +if [ "$VERSION" = "15.0" ] || [ "$VERSION" = "current" ] ; then root_env='ROOT=/mnt' root_flag='' fi @@ -186,7 +202,8 @@ mount --bind /etc/resolv.conf etc/resolv.conf PATH=/bin:/sbin:/usr/bin:/usr/sbin \ chroot . /bin/bash -c 'yes y | /usr/sbin/slackpkg -batch=on -default_answer=y update' PATH=/bin:/sbin:/usr/bin:/usr/sbin \ -chroot . /bin/bash -c '/usr/sbin/slackpkg -batch=on -default_answer=y upgrade-all' +# handle new exit codes from slackpkg in 15.0 and newer +chroot . /bin/bash -c 'EXIT_CODE=0 && { /usr/sbin/slackpkg -batch=on -default_answer=y upgrade-all || EXIT_CODE=$? ; } && if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 20 ] ; then exit $EXIT_CODE ; fi' # now some cleanup of the minimal image set +x