diff options
-rw-r--r-- | system/vlock/Makefile.diff | 16 | ||||
-rw-r--r-- | system/vlock/README | 24 | ||||
-rw-r--r-- | system/vlock/config.mk.diff | 36 | ||||
-rw-r--r-- | system/vlock/slack-desc | 2 | ||||
-rw-r--r-- | system/vlock/vlock.SlackBuild | 45 | ||||
-rw-r--r-- | system/vlock/vlock.info | 14 |
6 files changed, 57 insertions, 80 deletions
diff --git a/system/vlock/Makefile.diff b/system/vlock/Makefile.diff deleted file mode 100644 index 8555b803a0..0000000000 --- a/system/vlock/Makefile.diff +++ /dev/null @@ -1,16 +0,0 @@ -diff -Nur vlock-2.1.orig/Makefile vlock-2.1/Makefile ---- vlock-2.1.orig/Makefile 2007-09-08 13:04:25.000000000 -0500 -+++ vlock-2.1/Makefile 2007-12-31 23:06:31.231101644 -0600 -@@ -63,10 +63,10 @@ - .PHONY: install-programs - install-programs: $(PROGRAMS) - $(INSTALL) -D -m 755 -o root -g $(ROOT_GROUP) vlock $(DESTDIR)$(PREFIX)/bin/vlock -- $(INSTALL) -D -m 4711 -o root -g $(ROOT_GROUP) vlock-current $(DESTDIR)$(PREFIX)/sbin/vlock-current -+ $(INSTALL) -D -m 2751 -o root -g shadow vlock-current $(DESTDIR)$(PREFIX)/sbin/vlock-current - $(INSTALL) -D -m 755 -o root -g $(ROOT_GROUP) vlock-all $(DESTDIR)$(PREFIX)/sbin/vlock-all - $(INSTALL) -D -m $(VLOCK_MODE) -o root -g $(VLOCK_GROUP) vlock-nosysrq $(DESTDIR)$(PREFIX)/sbin/vlock-nosysrq -- $(INSTALL) -D -m $(VLOCK_MODE) -o root -g $(VLOCK_GROUP) vlock-new $(DESTDIR)$(PREFIX)/sbin/vlock-new -+ $(INSTALL) -D -m 2751 -o root -g tty vlock-new $(DESTDIR)$(PREFIX)/sbin/vlock-new - - .PHONY: install-man - install-man: diff --git a/system/vlock/README b/system/vlock/README index d6f73253d6..1aca46ec14 100644 --- a/system/vlock/README +++ b/system/vlock/README @@ -7,7 +7,23 @@ allowing other users to use the system on other virtual consoles. If desired, the entire console may be locked and virtual console switching disabled. -On machines that support "Magic SysRq" (enabled via a compile-time option -and /etc/sysctl.conf setting) users that lock all VT's on the machine must -be members of the "wheel" group. Note that 12.0's stock kernels include -support for the SysRq key. +vlock has two particular options that this SlackBuild reserves to the wheel +group: + + -n,--new + + Switch to a new virtual console before locking all console + sessions. + +and + -s ,--disable-sysrq + + Disable the SysRq mechanism (enabled by stock Slackware 13.0 + kernels) while consoles are locked. This option only works if + the -a, --all option given. + +If you would like to set an alternative group, you may pass the VLOCK_GROUP +variable to the SlackBuild like this: + +VLOCK_GROUP=users ./vlock.SlackBuild + diff --git a/system/vlock/config.mk.diff b/system/vlock/config.mk.diff deleted file mode 100644 index d2754d9b14..0000000000 --- a/system/vlock/config.mk.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff -Nur vlock-2.1.orig/config.mk vlock-2.1/config.mk ---- vlock-2.1.orig/config.mk 2007-09-08 13:04:25.000000000 -0500 -+++ vlock-2.1/config.mk 2007-12-31 23:00:18.717873325 -0600 -@@ -1,5 +1,5 @@ - # authentification method (pam or shadow) --AUTH_METHOD = pam -+AUTH_METHOD = shadow - # use pam for permission checking - USE_PAM = n - # also prompt for the root password in adition to the user's -@@ -9,7 +9,7 @@ - - # group to install vlock-all and vlock-nosysrq as - # defaults to 'root') --VLOCK_GROUP = -+VLOCK_GROUP = wheel - # mode to install vlock-all and vlock-nosysrq as - # defaults to 4711 if group is unset and 4710 otherwise - VLOCK_MODE = -@@ -18,14 +18,14 @@ - ROOT_GROUP = root - - # installation prefix --PREFIX = /usr/local -+PREFIX = /usr - # installation root - DESTDIR = - - # c compiler - CC = gcc - # c compiler flags --CFLAGS = -O2 -Wall -W -pedantic -std=gnu99 -+CFLAGS += -Wall -W -pedantic -std=gnu99 - # linker flags - LDFLAGS = - diff --git a/system/vlock/slack-desc b/system/vlock/slack-desc index 1aba23940f..a6ef6fd2bc 100644 --- a/system/vlock/slack-desc +++ b/system/vlock/slack-desc @@ -5,7 +5,7 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| vlock: vlock (virtual console lock program) vlock: vlock: vlock is a program to lock one or more sessions on the Linux console. diff --git a/system/vlock/vlock.SlackBuild b/system/vlock/vlock.SlackBuild index 8d8a7e2e25..9693d50ed5 100644 --- a/system/vlock/vlock.SlackBuild +++ b/system/vlock/vlock.SlackBuild @@ -3,9 +3,10 @@ # Slackware build script for vlock # Written by Menno E. Duursma <druiloor@zonnet.nl> # Modified by Robby Workman <rworkman@slackbuilds.org> +# Modified by Chris Abela <chris.abela@maltats.com> PRGNAM=vlock -VERSION=2.1 +VERSION=2.2.2 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -15,10 +16,17 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +VLOCK_GRP=${VLOCK_GROUP:-wheel} + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e # Exit on most errors @@ -30,27 +38,30 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find . -type d -exec chmod 755 {} \; -find . -type f -exec chmod a-s,go-w {} \; +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; -# Patch to use /etc/shadow directly rather then via PAM -# and install setgid tty/shadow, rather then setuid root -patch -p1 < $CWD/config.mk.diff -patch -p1 < $CWD/Makefile.diff +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --enable-shadow \ -CFLAGS=$SLKCFLAGS make -make install DESTDIR=$PKG +make +make install DESTDIR=$PKG VLOCK_GROUP="$VLOCK_GRP" ( cd $PKG - find . -type f \ - | xargs file \ - | grep "executable" \ - | grep "ELF" \ - | cut -f 1 -d : \ - | xargs strip + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) -mv $PKG/usr/share/man $PKG/usr && rmdir $PKG/usr/share ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done @@ -64,4 +75,4 @@ 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.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/vlock/vlock.info b/system/vlock/vlock.info index 556ab442ba..c67fdb4689 100644 --- a/system/vlock/vlock.info +++ b/system/vlock/vlock.info @@ -1,8 +1,10 @@ PRGNAM="vlock" -VERSION="2.1" +VERSION="2.2.2" HOMEPAGE="http://cthulhu.c3d2.de/~toidinamai/vlock/vlock.html" -DOWNLOAD="http://cthulhu.c3d2.de/~toidinamai/vlock/archive/vlock-2.1.tar.gz" -MD5SUM="a365a8fdde9379417ef2adc1c1230c4d" -MAINTAINER="Menno E. Duursma" -EMAIL="druiloor@zonnet.nl" -APPROVED="rworkman" +DOWNLOAD="http://cthulhu.c3d2.de/~toidinamai/vlock/archive/vlock-2.2.2.tar.gz" +MD5SUM="51c389ee4ef814bf59063bc367437eb8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Chris Abela" +EMAIL="chris.abela@maltats.com" +APPROVED="dsomero" |