wok-4.x rev 2186

Add dropbear-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 09 09:44:28 2009 +0000 (2009-02-09)
parents 74b05c130986
children e3a0a2a27697
files dropbear-pam/receipt dropbear-pam/stuff/dropbear-xauth.u dropbear-pam/stuff/dropbear/banner dropbear-pam/stuff/init.d/dropbear dropbear/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dropbear-pam/receipt	Mon Feb 09 09:44:28 2009 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="dropbear-pam"
     1.7 +VERSION="0.51"
     1.8 +CATEGORY="security"
     1.9 +SHORT_DESC="Light SSH client and server using PAM."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +SOURCE="dropbear"
    1.12 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.13 +DEPENDS="zlib pam"
    1.14 +BUILD_DEPENDS="zlib zlib-dev pam pam-dev"
    1.15 +WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
    1.16 +WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
    1.17 +CONFIG_FILES="/etc/dropbear"
    1.18 +PROVIDE="dropbear:pam"
    1.19 +
    1.20 +# Rules to configure and make the package.
    1.21 +compile_rules()
    1.22 +{
    1.23 +	local i
    1.24 +	local DROPBEARS
    1.25 +	DROPBEARS="dropbearkey dropbearconvert dbclient scp"
    1.26 +	cd $src
    1.27 +	[ -f done.dropbear-xauth.u ] || patch -p1 < ../stuff/dropbear-xauth.u
    1.28 +	touch done.dropbear-xauth.u
    1.29 +	./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
    1.30 +	make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
    1.31 +	install -d -m 755 $PWD/_pkg/usr/sbin &&
    1.32 +	install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear &&
    1.33 +	chown root $PWD/_pkg/usr/sbin/dropbear &&
    1.34 +	chgrp 0 $PWD/_pkg/usr/sbin/dropbear &&
    1.35 +	install -d -m 755 $PWD/_pkg/usr/bin &&
    1.36 +	for i in $DROPBEARS ssh; do
    1.37 +		ln -s ../sbin/dropbear $PWD/_pkg/usr/bin/$i
    1.38 +	done
    1.39 +}
    1.40 +
    1.41 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.42 +genpkg_rules()
    1.43 +{
    1.44 +	mkdir -p $fs/usr
    1.45 +	cp -a $_pkg/usr/bin $fs/usr
    1.46 +	cp -a $_pkg/usr/sbin $fs/usr
    1.47 +	strip -s $fs/usr/bin/*
    1.48 +	strip -s $fs/usr/sbin/*
    1.49 +	# Config file and init script.
    1.50 +	mkdir -p $fs/etc
    1.51 +	cp -a stuff/dropbear $fs/etc
    1.52 +	cp -a stuff/init.d $fs/etc
    1.53 +	touch   $fs/etc/dropbear/dropbear_dss_host_key \
    1.54 +		$fs/etc/dropbear/dropbear_rsa_host_key
    1.55 +	
    1.56 +	# Fix dropbear initscript perms
    1.57 +	chown -R root.root $fs
    1.58 +}
    1.59 +
    1.60 +# Post message when installing.
    1.61 +post_install()
    1.62 +{
    1.63 +	echo -e "\nTo starts $PACKAGE server you can run :\n"
    1.64 +	echo "/etc/init.d/$PACKAGE start"
    1.65 +	echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
    1.66 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/dropbear-pam/stuff/dropbear-xauth.u	Mon Feb 09 09:44:28 2009 +0000
     2.3 @@ -0,0 +1,7 @@
     2.4 +--- dropbear-0.50/options.h
     2.5 ++++ dropbear-0.50/options.h
     2.6 +@@ -199,3 +199,3 @@
     2.7 + #ifndef XAUTH_COMMAND
     2.8 +-#define XAUTH_COMMAND "/usr/X11R6/bin/xauth -q"
     2.9 ++#define XAUTH_COMMAND "/usr/bin/xauth -q"
    2.10 + #endif
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/dropbear-pam/stuff/dropbear/banner	Mon Feb 09 09:44:28 2009 +0000
     3.3 @@ -0,0 +1,2 @@
     3.4 +
     3.5 +Secure login on SliTaz GNU/Linux powered by Dropbear SSH server.
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/dropbear-pam/stuff/init.d/dropbear	Mon Feb 09 09:44:28 2009 +0000
     4.3 @@ -0,0 +1,70 @@
     4.4 +#!/bin/sh
     4.5 +# /etc/init.d/dropbear : Start, stop and restart SSH server on SliTaz, at 
     4.6 +# boot time or with the command line.
     4.7 +#
     4.8 +# To start SSH server at boot time, just put dropbear in the $RUN_DAEMONS
     4.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    4.10 +#
    4.11 +. /etc/init.d/rc.functions
    4.12 +. /etc/daemons.conf
    4.13 +
    4.14 +NAME=Dropbear
    4.15 +DESC="SSH server"
    4.16 +DAEMON=/usr/sbin/dropbear
    4.17 +OPTIONS=$DROPBEAR_OPTIONS
    4.18 +PIDFILE=/var/run/dropbear.pid
    4.19 +
    4.20 +case "$1" in
    4.21 +  start)
    4.22 +    # We need rsa and dss host key file to start dropbear.
    4.23 +    if [ ! -s /etc/dropbear/dropbear_rsa_host_key ] ; then
    4.24 +      echo -n "Generating $NAME rsa key... "
    4.25 +      # Need to delete key before creating it.
    4.26 +      rm -f /etc/dropbear/dropbear_rsa_host_key
    4.27 +      dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1
    4.28 +      status
    4.29 +    fi
    4.30 +    if [ ! -s /etc/dropbear/dropbear_dss_host_key ] ; then
    4.31 +      echo -n "Generating $NAME dss key... "
    4.32 +      # Need to delete key before creating it.
    4.33 +      rm -f /etc/dropbear/dropbear_dss_host_key
    4.34 +      dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1
    4.35 +      status
    4.36 +    fi
    4.37 +    if [ -f $PIDFILE ] ; then
    4.38 +      echo "$NAME already running."
    4.39 +      exit 1
    4.40 +    fi
    4.41 +    echo -n "Starting $DESC: $NAME... "
    4.42 +    $DAEMON $OPTIONS
    4.43 +    status
    4.44 +    ;;
    4.45 +  stop)
    4.46 +    if [ ! -f $PIDFILE ] ; then
    4.47 +      echo "$NAME is not running."
    4.48 +      exit 1
    4.49 +    fi
    4.50 +    echo -n "Stopping $DESC: $NAME... "
    4.51 +    kill `cat $PIDFILE`
    4.52 +    status
    4.53 +    ;;
    4.54 +  restart)
    4.55 +    if [ ! -f $PIDFILE ] ; then
    4.56 +      echo "$NAME is not running."
    4.57 +      exit 1
    4.58 +    fi
    4.59 +    echo -n "Restarting $DESC: $NAME... "
    4.60 +    kill `cat $PIDFILE`
    4.61 +    sleep 2
    4.62 +    $DAEMON $OPTIONS
    4.63 +    status
    4.64 +    ;;
    4.65 +  *)
    4.66 +    echo ""
    4.67 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    4.68 +    echo ""
    4.69 +    exit 1
    4.70 +    ;;
    4.71 +esac
    4.72 +
    4.73 +exit 0
     5.1 --- a/dropbear/receipt	Mon Feb 09 09:39:53 2009 +0000
     5.2 +++ b/dropbear/receipt	Mon Feb 09 09:44:28 2009 +0000
     5.3 @@ -6,6 +6,7 @@
     5.4  SHORT_DESC="Light SSH client and server."
     5.5  MAINTAINER="pascal.bellard@slitaz.org"
     5.6  TARBALL="$PACKAGE-$VERSION.tar.gz"
     5.7 +DEPENDS="zlib"
     5.8  BUILD_DEPENDS="zlib-dev"
     5.9  WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
    5.10  WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
    5.11 @@ -20,7 +21,7 @@
    5.12  	cd $src
    5.13  	[ -f done.dropbear-xauth.u ] || patch -p1 < ../stuff/dropbear-xauth.u
    5.14  	touch done.dropbear-xauth.u
    5.15 -	./configure --prefix=/usr $CONFIGURE_ARGS &&
    5.16 +	./configure --prefix=/usr --without-pam $CONFIGURE_ARGS &&
    5.17  	make PROGRAMS="dropbear $DROPBEARS" MULTI=1 &&
    5.18  	install -d -m 755 $PWD/_pkg/usr/sbin &&
    5.19  	install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear &&