From 87107c2990bc84fa2f86a2e894c7c3efcbc81d20 Mon Sep 17 00:00:00 2001 From: Menno Duursma Date: Thu, 13 May 2010 00:39:58 +0200 Subject: system/conserver: Updated for version 8.1.17 --- system/conserver/config/conserver.cf | 53 ++++++++++++++++++++ system/conserver/config/conserver.passwd | 5 ++ system/conserver/config/console.cf | 7 +++ system/conserver/config/rc.conserver | 53 ++++++++++++++++++++ system/conserver/conserver.SlackBuild | 83 ++++++++++++++------------------ system/conserver/conserver.cf | 49 ------------------- system/conserver/conserver.info | 12 +++-- system/conserver/conserver.passwd | 5 -- system/conserver/console.cf | 6 ++- system/conserver/rc.conserver | 53 -------------------- 10 files changed, 167 insertions(+), 159 deletions(-) create mode 100644 system/conserver/config/conserver.cf create mode 100644 system/conserver/config/conserver.passwd create mode 100644 system/conserver/config/console.cf create mode 100644 system/conserver/config/rc.conserver delete mode 100644 system/conserver/conserver.cf delete mode 100644 system/conserver/conserver.passwd delete mode 100644 system/conserver/rc.conserver (limited to 'system') diff --git a/system/conserver/config/conserver.cf b/system/conserver/config/conserver.cf new file mode 100644 index 0000000000..365062c0c9 --- /dev/null +++ b/system/conserver/config/conserver.cf @@ -0,0 +1,53 @@ +# +# Sample conserver.cf file, to give you ideas of what you can do with +# the various configuration items. +# + +### set up global access +default full { + rw *; +} + +### set the defaults for all the consoles +# these get applied before anything else +default * { + # The '&' character is substituted with the console name + logfile /var/consoles/&; + # timestamps every hour with activity and break logging + timestamp 1hab; + # include the 'full' default + include full; + # master server is localhost + master localhost; +} + +### and now some one-off consoles +# we still inherit the '*' default set +# a simple ssh invocation +console ssh { + type exec; + exec ssh localhost; + # provide a 'message-of-the-day' + motd "just a simple ssh to localhost"; +} + +# +# Note: the user running conserver is expected to have 'dialout' group membership +# + +# Local COM2: port +console ttyS1 { + master localhost; + type device; + device /dev/ttyS1; + baud 9600; + parity none; +} + +### list of clients we allow +access * { + trusted 127.0.0.1; + # RFC 1918 + #allowed 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8; +} + diff --git a/system/conserver/config/conserver.passwd b/system/conserver/config/conserver.passwd new file mode 100644 index 0000000000..f0e1200b2a --- /dev/null +++ b/system/conserver/config/conserver.passwd @@ -0,0 +1,5 @@ +# Everyone uses their regular login and password. +# note: the account running conserver needs /etc/shadow privs for this +# +*any*:*passwd* + diff --git a/system/conserver/config/console.cf b/system/conserver/config/console.cf new file mode 100644 index 0000000000..262f6950b5 --- /dev/null +++ b/system/conserver/config/console.cf @@ -0,0 +1,7 @@ +config * { + master localhost; + + # Below are default on some Debian(-derived) systems: + #port 3109; + #sslenabled no; +} diff --git a/system/conserver/config/rc.conserver b/system/conserver/config/rc.conserver new file mode 100644 index 0000000000..715a9663cb --- /dev/null +++ b/system/conserver/config/rc.conserver @@ -0,0 +1,53 @@ +#!/bin/sh +# Start/stop/restart the conserver console server daemon. + +# Start conserver: +conserver_start() { + if [ -x /usr/sbin/conserver -a -d /var/consoles ]; then + echo "Starting conserver: /usr/sbin/conserver -d -v" + /usr/sbin/conserver -d -v + fi +} + +# Stop conserver: +conserver_stop() { + /bin/killall conserver +} + +# Restart conserver: +conserver_restart() { + conserver_stop + /bin/sleep 1 + conserver_start +} + +# Reload conserver: +conserver_reload() { + /bin/killall -HUP conserver +} + +# Reconnect to any consoles that seem down: +conserver_reconnect() { + /bin/killall -USR1 conserver +} + +case "$1" in +'start') + conserver_start + ;; +'stop') + conserver_stop + ;; +'restart') + conserver_restart + ;; +'reload') + conserver_reload + ;; +'reconnect') + conserver_reconnect + ;; +*) + echo "usage $0 start|stop|restart|reload|reconnect" +esac + diff --git a/system/conserver/conserver.SlackBuild b/system/conserver/conserver.SlackBuild index c416c0a4f8..2fc521fab0 100644 --- a/system/conserver/conserver.SlackBuild +++ b/system/conserver/conserver.SlackBuild @@ -1,11 +1,14 @@ #!/bin/sh # Slackware build script for Conserver - # Written by Menno Duursma +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + PRGNAM=conserver -VERSION=8.1.16 +VERSION=8.1.17 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -17,8 +20,13 @@ OUTPUT=${OUTPUT:-/tmp} 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 # Bail out if we have a problem @@ -27,54 +35,49 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find . -type d -exec chmod 0755 {} \; chmod -R a-s,u+w,go+r-w . -# Bake-in: libwrap (TCP Wrapper) and SSL support CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --with-libwrap \ --with-openssl \ - || exit 1 + --build=$ARCH-slackware-linux -make || exit 1 -make install DESTDIR=$PKG || exit 1 +make +make install DESTDIR=$PKG -# Strip binaries and libraries ( cd $PKG - find . -type f | \ - xargs file | \ - grep "executable" | \ - grep ELF | \ - cut -f 1 -d : | \ - xargs strip --strip-unneeded \ - 2> /dev/null - - find . -type f | \ - xargs file | \ - grep "shared object" | \ - grep ELF | \ - cut -f 1 -d : | \ - xargs strip --strip-unneeded \ - 2> /dev/null + 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 || true ) -if [ -d $PKG/usr/man ]; then - gzip -9 $PKG/usr/man/man?/* -fi +( 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 +) + +# Include dist config files as documentation +install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.cf $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.cf +install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.passwd $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.passwd +install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.rc $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.rc + +# Toss redundant dir included with source +rm -rf $PKG/usr/share -# Documentation : mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/contrib cp [A-Z][A-Z]* conserver.html $PKG/usr/doc/$PRGNAM-$VERSION -# We'll consider this to be documentation here cp -a autologin $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/conserver.cf @@ -92,33 +95,21 @@ cd ../contrib cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG cd - -# Toss redundant example config files included with source -rm -rf $PKG/usr/share - ## Sample configuration files mkdir -p $PKG/etc -cat $CWD/conserver.cf > $PKG/etc/conserver.cf.new -cat $CWD/conserver.passwd >$PKG/etc/conserver.passwd.new -cat $CWD/console.cf >$PKG/etc/console.cf.new +cat $CWD/config/conserver.cf > $PKG/etc/conserver.cf.new +cat $CWD/config/conserver.passwd > $PKG/etc/conserver.passwd.new +cat $CWD/config/console.cf > $PKG/etc/console.cf.new # Include sample rc file -mkdir -p $PKG/etc/rc.d -install -m 0755 $CWD/rc.conserver $PKG/etc/rc.d/rc.conserver.new +install -D -m 0755 $CWD/config/rc.conserver $PKG/etc/rc.d/rc.conserver.new -# Default directory console messages get logged to +# Pre-create the default directory console messages get logged to mkdir -p $PKG/var/consoles mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Prepend any symlinks and such to the existing doinst.sh file cd $PKG -/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz - -# Clean up the extra stuff -if [ "$1" = "--cleanup" ]; then - rm -rf $TMP/$PRGNAM-$VERSION - rm -rf $PKG -fi - +/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/conserver/conserver.cf b/system/conserver/conserver.cf deleted file mode 100644 index 296889e7ba..0000000000 --- a/system/conserver/conserver.cf +++ /dev/null @@ -1,49 +0,0 @@ -# -# Sample conserver.cf file, to give you ideas of what you can do with -# the various configuration items. -# - -### set up global access -default full { - rw *; -} - -### set the defaults for all the consoles -# these get applied before anything else -default * { - # The '&' character is substituted with the console name - logfile /var/consoles/&; - # timestamps every hour with activity and break logging - timestamp 1hab; - # include the 'full' default - include full; - # master server is localhost - master localhost; -} - -### and now some one-off consoles -# we still inherit the '*' default set -# a simple ssh invocation -console ssh { - type exec; - exec ssh localhost; - # provide a 'message-of-the-day' - motd "just a simple ssh to localhost"; -} - -# Local COM2: port -console ttyS1 { - master localhost; - type device; - device /dev/ttyS1; - baud 9600; - parity none; -} - -### list of clients we allow -access * { - trusted 127.0.0.1; - # RFC 1918 - allowed 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8; -} - diff --git a/system/conserver/conserver.info b/system/conserver/conserver.info index 7990061fd4..baaf791465 100644 --- a/system/conserver/conserver.info +++ b/system/conserver/conserver.info @@ -1,8 +1,10 @@ PRGNAM="conserver" -VERSION="8.1.16" +VERSION="8.1.17" HOMEPAGE="http://www.conserver.com/" -DOWNLOAD="http://www.conserver.com/conserver-8.1.16.tar.gz" -MD5SUM="2364ba56f5201b07646bdfaefedd330b" -MAINTAINER="Menno E. Duursma" +DOWNLOAD="http://www.conserver.com/conserver-8.1.17.tar.gz" +MD5SUM="9bd085daa5450ca7b45e4187ec6eff1f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Menno Duursma" EMAIL="druiloor@zonnet.nl" -APPROVED="rworkman" +APPROVED="Erik Hanson" diff --git a/system/conserver/conserver.passwd b/system/conserver/conserver.passwd deleted file mode 100644 index f0e1200b2a..0000000000 --- a/system/conserver/conserver.passwd +++ /dev/null @@ -1,5 +0,0 @@ -# Everyone uses their regular login and password. -# note: the account running conserver needs /etc/shadow privs for this -# -*any*:*passwd* - diff --git a/system/conserver/console.cf b/system/conserver/console.cf index 2a04510fbe..7e3cf0d628 100644 --- a/system/conserver/console.cf +++ b/system/conserver/console.cf @@ -1,3 +1,7 @@ +# default config for console config * { - master localhost; + master localhost; + # Some (Ubuntu) systems seem to be using this: + #port 3109; + #sslenabled no; } diff --git a/system/conserver/rc.conserver b/system/conserver/rc.conserver deleted file mode 100644 index c5dca028c5..0000000000 --- a/system/conserver/rc.conserver +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# Start/stop/restart the conserver console server daemon. - -# Start conserver: -conserver_start() { - if [ -x /usr/sbin/conserver -a -d /var/consoles ]; then - echo "Starting conserver: /usr/sbin/conserver -d -v" - /usr/sbin/conserver -d -v - fi -} - -# Stop conserver: -conserver_stop() { - /bin/killall conserver -} - -# Restart conserver: -conserver_restart() { - conserver_stop - /bin/sleep 1 - conserver_start -} - -# Reread the configuration file -conserver_reload() { - /bin/killall -HUP conserver -} - -# Try and reconnect to any consoles that seem down -conserver_reconnect() { - /bin/killall -USR1 conserver -} - -case "$1" in -'start') - conserver_start - ;; -'stop') - conserver_stop - ;; -'restart') - conserver_restart - ;; -'reload') - conserver_reload - ;; -'reconnect') - conserver_reconnect - ;; -*) - echo "usage $0 start|stop|restart|reload|reconnect" -esac - -- cgit v1.2.3