summaryrefslogtreecommitdiffstats
path: root/system/vlock
diff options
context:
space:
mode:
author Menno E. Duursma <druiloor@zonnet.nl>2010-05-11 20:02:10 +0200
committer Robby Workman <rworkman@slackbuilds.org>2010-05-11 20:02:10 +0200
commit16868a57c4e2b4d9b5dac5064fabbb38e684ec28 (patch)
tree166f1ff6cf32ca16b0707ef6a903d74521732b40 /system/vlock
parent1cf63f9c53e863a15ca0b38c1ed4ca43118b3508 (diff)
downloadslackbuilds-16868a57c4e2b4d9b5dac5064fabbb38e684ec28.tar.gz
slackbuilds-16868a57c4e2b4d9b5dac5064fabbb38e684ec28.tar.xz
system/vlock: Added to 12.0 repository
Diffstat (limited to 'system/vlock')
-rw-r--r--system/vlock/Makefile.diff16
-rw-r--r--system/vlock/README13
-rw-r--r--system/vlock/config.mk.diff36
-rw-r--r--system/vlock/slack-desc19
-rw-r--r--system/vlock/vlock.SlackBuild67
-rw-r--r--system/vlock/vlock.info8
6 files changed, 159 insertions, 0 deletions
diff --git a/system/vlock/Makefile.diff b/system/vlock/Makefile.diff
new file mode 100644
index 0000000000..8555b803a0
--- /dev/null
+++ b/system/vlock/Makefile.diff
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 0000000000..d6f73253d6
--- /dev/null
+++ b/system/vlock/README
@@ -0,0 +1,13 @@
+vlock is a program to lock one or more sessions on the Linux console.
+
+This is especially useful for Linux machines which have multiple users with
+access to the console. One user may lock his or her session(s) while still
+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.
diff --git a/system/vlock/config.mk.diff b/system/vlock/config.mk.diff
new file mode 100644
index 0000000000..d2754d9b14
--- /dev/null
+++ b/system/vlock/config.mk.diff
@@ -0,0 +1,36 @@
+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
new file mode 100644
index 0000000000..1aba23940f
--- /dev/null
+++ b/system/vlock/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+vlock: vlock (virtual console lock program)
+vlock:
+vlock: vlock is a program to lock one or more sessions on the Linux console.
+vlock: One user may lock his or her session(s) while still allowing other
+vlock: users to use the system on other virtual consoles. If desired, the
+vlock: entire console may be locked and virtual console switching disabled.
+vlock:
+vlock: vlock's original author is Michael K. Johnson
+vlock: The current maintainer of vlock is Frank Benkstein
+vlock:
+vlock:
diff --git a/system/vlock/vlock.SlackBuild b/system/vlock/vlock.SlackBuild
new file mode 100644
index 0000000000..8d8a7e2e25
--- /dev/null
+++ b/system/vlock/vlock.SlackBuild
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# Slackware build script for vlock
+# Written by Menno E. Duursma <druiloor@zonnet.nl>
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=vlock
+VERSION=2.1
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+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 {} \;
+
+# 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 make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . -type f \
+ | xargs file \
+ | grep "executable" \
+ | grep "ELF" \
+ | cut -f 1 -d : \
+ | xargs strip
+)
+
+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
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z][A-Z]* ChangeLog $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.tgz
diff --git a/system/vlock/vlock.info b/system/vlock/vlock.info
new file mode 100644
index 0000000000..556ab442ba
--- /dev/null
+++ b/system/vlock/vlock.info
@@ -0,0 +1,8 @@
+PRGNAM="vlock"
+VERSION="2.1"
+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"