diff options
-rw-r--r-- | system/buildah/README | 35 | ||||
-rw-r--r-- | system/buildah/buildah.SlackBuild | 102 | ||||
-rw-r--r-- | system/buildah/buildah.info | 10 | ||||
-rw-r--r-- | system/buildah/slack-desc | 19 |
4 files changed, 166 insertions, 0 deletions
diff --git a/system/buildah/README b/system/buildah/README new file mode 100644 index 0000000000000..75d3214ce27f4 --- /dev/null +++ b/system/buildah/README @@ -0,0 +1,35 @@ +buildah is a (daemon-free) container build utility + +The Buildah package provides a command line tool that can be used to + +* create a working container, either from scratch or using an image as a + starting point +* create an image, either from a working container or via the instructions in a + Dockerfile +* images can be built in either the OCI image format or the traditional + upstream docker image format +* mount a working container's root filesystem for manipulation +* unmount a working container's root filesystem +* use the updated contents of a container's root filesystem as a filesystem + layer to create a new image +* delete a working container or an image +* rename a local container + +For examples, see: +* https://github.com/containers/buildah or /usr/doc/buildah-*/README.md +* man pages + +non-root usage: + +plenty of kernel recent kernel's support the user-namespace sub uid/gid +mapping. Only recent versions of shadow-utils will append a new mapping for +users when they are created. You may have to add a mapping for your user like +so: + +```shell +echo "$YOURUSER:100000:65536" > /etc/subuid +echo "$YOURGROUP:100000:65536" > /etc/subgid +``` + +if you have more than one non-root user to add a mapping for, then their start +number (like `100000` above) would begin after 100000+65536. diff --git a/system/buildah/buildah.SlackBuild b/system/buildah/buildah.SlackBuild new file mode 100644 index 0000000000000..eb674e63c6a30 --- /dev/null +++ b/system/buildah/buildah.SlackBuild @@ -0,0 +1,102 @@ +#!/bin/sh + +# Slackware build script for buildah + +# Copyright 2019 Vincent Batts, Raleigh, NC, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 AUTHOR 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. + +PRGNAM=buildah +VERSION=${VERSION:-1.5} +GIT_COMMIT="e94b4f9" +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# The domain part of the go package name, usually the hosting platform +DOMAIN=github.com +# The name of the organization/owner of the package +ORG=containers + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION/src/$DOMAIN/$ORG +cd $PRGNAM-$VERSION/src/$DOMAIN/$ORG +rm -rf $PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +mv $PRGNAM-$VERSION $PRGNAM +cd $PRGNAM +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Point go to the location of the source tree +export GOPATH="$TMP/$PRGNAM-$VERSION" + +sed -i 's|GIT_COMMIT :=|GIT_COMMIT ?=|' Makefile + +make binary docs GIT_COMMIT="$GIT_COMMIT" TAGS="'seccomp containers_image_ostree_stub'" +make install install.completions GIT_COMMIT="$GIT_COMMIT" PREFIX="/usr" DESTDIR="$PKG" MANDIR="/usr/man" + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + LICENSE README.md vendor.conf \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/buildah/buildah.info b/system/buildah/buildah.info new file mode 100644 index 0000000000000..5ae306f82ab17 --- /dev/null +++ b/system/buildah/buildah.info @@ -0,0 +1,10 @@ +PRGNAM="buildah" +VERSION="1.5" +HOMEPAGE="https://github.com/containers/buildah" +DOWNLOAD="https://github.com/containers/buildah/archive/v1.5/buildah-1.5.tar.gz" +MD5SUM="a1b38dcbab076e058e1098a84fde3c17" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="go-md2man runc" +MAINTAINER="Vincent Batts" +EMAIL="vbatts@hashbangbash.com" diff --git a/system/buildah/slack-desc b/system/buildah/slack-desc new file mode 100644 index 0000000000000..defd1be19fdf0 --- /dev/null +++ b/system/buildah/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +buildah: buildah (container build utility) +buildah: +buildah: buildah facilitates building OCI container images, all without a +buildah: daemon. It supports a bash-style invocation, as well as Dockerfiles. +buildah: +buildah: https://github.com/containers/buildah +buildah: +buildah: +buildah: +buildah: +buildah: |