Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for building 15.0 and the latest -current. #18

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions base/15.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM vbatts/slackware-base:15.0
MAINTAINER Vincent Batts <[email protected]>
46 changes: 46 additions & 0 deletions base/15.0/README.md
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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.
25 changes: 21 additions & 4 deletions mkimage-slackware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down