diff options
author | B. Watson <urchlay@slackware.uk> | 2024-08-28 16:09:35 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-31 07:56:39 +0700 |
commit | 1dd4bfbf053f6901a00f685b73fa53de6248f8d2 (patch) | |
tree | bcfc6d047a6ff7434b0816b85e16a7ab75b4d458 /system | |
parent | ef5683f37041a01496ecf9cb9b68ee3dc3bb9775 (diff) |
system/sandbox: Updated for version 3.1, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/sandbox/README | 10 | ||||
-rw-r--r-- | system/sandbox/doinst.sh | 7 | ||||
-rw-r--r-- | system/sandbox/sandbox.SlackBuild | 58 | ||||
-rw-r--r-- | system/sandbox/sandbox.info | 10 |
4 files changed, 32 insertions, 53 deletions
diff --git a/system/sandbox/README b/system/sandbox/README index 005f35d16e..01f2cd2935 100644 --- a/system/sandbox/README +++ b/system/sandbox/README @@ -1,11 +1,13 @@ +sandbox (Gentoo Sandbox Tool) + Sandbox is a library (and helper utility) to run programs in a "sandboxed" environment. This is used as a QA measure to try and prevent applications from modifying files they should not. -For example, in the Gentoo world we use it so we can build applications -as root and make sure that the build system does not do crazy things -outside of its build directory. Such as install files to the live root -file system or modify config files on the fly. +For example, in the Gentoo world they use it so they can build +applications as root and make sure that the build system does not do +crazy things outside of its build directory. Such as install files to +the live root file system or modify config files on the fly. For people who are familiar with the Debian "fakeroot" project or the RPM based "InstallWatch", sandbox is in the same vein of projects. diff --git a/system/sandbox/doinst.sh b/system/sandbox/doinst.sh index 7d374f28ab..2dc08dba5c 100644 --- a/system/sandbox/doinst.sh +++ b/system/sandbox/doinst.sh @@ -1,19 +1,12 @@ config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy rm $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... } config etc/sandbox.conf.new config etc/sandbox.d/00default.new - -if [ -x /usr/bin/update-desktop-database ]; then - /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 -fi diff --git a/system/sandbox/sandbox.SlackBuild b/system/sandbox/sandbox.SlackBuild index 9c5cc396e5..0733c86608 100644 --- a/system/sandbox/sandbox.SlackBuild +++ b/system/sandbox/sandbox.SlackBuild @@ -2,30 +2,20 @@ # Slackware build script for sandbox -# Copyright 2018-2021 Hunter Sezen California, 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. +# Originally written by Hunter Sezen. +# Modified and now maintained by B. Watson <urchlay@slackware.uk> + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240828 bkw: +# - new maintainer. +# - udpate for v3.1. +# - add ChangeLog and TODO to doc dir. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=sandbox -VERSION=${VERSION:-2.23} +VERSION=${VERSION:-3.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +28,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -73,11 +60,8 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + autoreconf -fi @@ -90,17 +74,17 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new -mv $PKG/etc/$PRGNAM.d/00default $PKG/etc/$PRGNAM.d/00default.new +make install-strip DESTDIR=$PKG -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 +for i in $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.d/*; do + mv $i $i.new +done -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING README $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# 20240828 bkw: NEWS just tells you "blah, read the ChangeLog", don't bother. +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYING README* ChangeLog* TODO $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/system/sandbox/sandbox.info b/system/sandbox/sandbox.info index 0b459185c2..4a54d21ed6 100644 --- a/system/sandbox/sandbox.info +++ b/system/sandbox/sandbox.info @@ -1,10 +1,10 @@ PRGNAM="sandbox" -VERSION="2.23" +VERSION="3.1" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" -DOWNLOAD="https://gitweb.gentoo.org/proj/sandbox.git/snapshot/sandbox-2.23.tar.bz2" -MD5SUM="e7db0100a885b52129bb98871ab6ccf0" +DOWNLOAD="https://gitweb.gentoo.org/proj/sandbox.git/snapshot/sandbox-3.1.tar.bz2" +MD5SUM="527f9b1afe71e8c70cc913f5305056bf" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Hunter Sezen" -EMAIL="orbea@riseup.net" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" |