wok-tiny rev 69
Add dropbear-without-zlib
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 16 18:15:41 2011 +0200 (2011-09-16) |
parents | 5b93527a19eb |
children | 067b5cbe1e8e |
files | dropbear-without-zlib/receipt dropbear/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dropbear-without-zlib/receipt Fri Sep 16 18:15:41 2011 +0200 1.3 @@ -0,0 +1,136 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="dropbear-without-zlib" 1.7 +VERSION="0.53" 1.8 +CATEGORY="security" 1.9 +SHORT_DESC="Light SSH client and server without compression support." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +DEPENDS="libutil" 1.13 +[ -n "$TARGET" ] || TARGET="i486" 1.14 +BUILD_DEPENDS="dropbear uclibc-cross-compiler-$TARGET" 1.15 +SUGGESTED="sftp-server" 1.16 +WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html" 1.17 +WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL" 1.18 +CONFIG_FILES="/etc/dropbear /etc/daemons.conf /etc/rcS.conf" 1.19 +PROVIDE="ssh dropbear" 1.20 +TAGS="ssh" 1.21 + 1.22 +# Rules to configure and make the package. 1.23 +compile_rules() 1.24 +{ 1.25 + local i 1.26 + local DROPBEARS 1.27 + DROPBEARS="dbclient scp" 1.28 + cd $src 1.29 + sed -i -e 's|/usr/X11R6/bin/xauth|/usr/bin/xauth|' \ 1.30 + -e 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \ 1.31 + options.h 1.32 + ./configure --prefix=/usr --without-pam --host=$TARGET-pc-linux-gnu \ 1.33 + --disable-zlib CC=uclibc-$TARGET-cc && 1.34 + make PROGRAMS="dropbear $DROPBEARS" MULTI=1 && 1.35 + install -d -m 755 $PWD/_pkg/usr/sbin && 1.36 + install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear && 1.37 + chown root $PWD/_pkg/usr/sbin/dropbear && 1.38 + chgrp 0 $PWD/_pkg/usr/sbin/dropbear && 1.39 + install -d -m 755 $PWD/_pkg/usr/bin && 1.40 + for i in $DROPBEARS ssh; do 1.41 + ln -s ../sbin/dropbear $PWD/_pkg/usr/bin/$i 1.42 + done 1.43 +} 1.44 + 1.45 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.46 +genpkg_rules() 1.47 +{ 1.48 + mkdir -p $fs/usr $fs/etc/init.d $fs/etc/dropbear 1.49 + cp -a $_pkg/usr/bin $fs/usr 1.50 + cp -a $_pkg/usr/sbin $fs/usr 1.51 + ln -s daemon $fs/etc/init.d/dropbear 1.52 + cat > $fs/etc/dropbear/banner <<EOT 1.53 + 1.54 +Secure login on Tiny SliTaz GNU/Linux powered by Dropbear. 1.55 +EOT 1.56 + 1.57 + # Fix dropbear initscript perms 1.58 + chown -R root.root $fs 1.59 +} 1.60 + 1.61 +# Post message when installing. 1.62 +post_install() 1.63 +{ 1.64 + cat >> $1/etc/daemons.conf <<EOT 1.65 + 1.66 +# Dropbear SSH server options. 1.67 +DROPBEAR_OPTIONS="$DROPBEAR_OPTS" 1.68 +EOT 1.69 + grep -qs 'dropbear ' $1/etc/rcS.conf || 1.70 + sed -i 's/^RUN_DAEMONS="/&dropbear /' $1/etc/rcS.conf 1.71 + dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_dss_host_key 1.72 +$DSSKEY 1.73 +EOT 1.74 + dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_rsa_host_key 1.75 +$RSAKEY 1.76 +EOT 1.77 + chmod 600 $1/etc/dropbear/dropbear_*_host_key 1.78 +} 1.79 + 1.80 +config_form() 1.81 +{ 1.82 + [ -n "$DROPBEAR_OPTS" ] || DROPBEAR_OPTS="-b /etc/dropbear/banner" 1.83 + if [ -z "$DSSKEY" ]; then 1.84 + dropbearkey -t dss -f /tmp/mkssh$$ > /dev/null 2>&1 1.85 + DSSKEY="$(uuencode -m - < /tmp/mkssh$$)" 1.86 + rm -f /tmp/mkssh$$ 1.87 + fi 1.88 + uudecode - > /tmp/mkssh$$ <<EOT 1.89 +$DSSKEY 1.90 +EOT 1.91 + DSSPUB="$(dropbearkey -y -f /tmp/mkssh$$ | grep ^ssh)" 1.92 + rm -f /tmp/mkssh$$ 1.93 + if [ -z "$RSAKEY" ]; then 1.94 + dropbearkey -t rsa -f /tmp/mkssh$$ > /dev/null 2>&1 1.95 + RSAKEY="$(uuencode -m - < /tmp/mkssh$$)" 1.96 + rm -f /tmp/mkssh$$ 1.97 + fi 1.98 + uudecode - > /tmp/mkssh$$ <<EOT 1.99 +$RSAKEY 1.100 +EOT 1.101 + RSAPUB="$(dropbearkey -y -f /tmp/mkssh$$ | grep ^ssh)" 1.102 + rm -f /tmp/mkssh$$ 1.103 + cat <<EOT 1.104 +<table> 1.105 +<tr> 1.106 +<td>Server options</td> 1.107 +<td><input type="text" name="DROPBEAR_OPTS" value="$DROPBEAR_OPTS" /></td> 1.108 +</tr> 1.109 +<tr> 1.110 +<td>DSS key</td> 1.111 +<td><textarea name="DSSKEY" cols="60" rows="13" wrap="off"> 1.112 +$DSSKEY 1.113 +</textarea></td> 1.114 +</tr> 1.115 +<tr> 1.116 +<td>RSA key</td> 1.117 +<td><textarea name="RSAKEY" cols="60" rows="12" wrap="off"> 1.118 +$RSAKEY 1.119 +</textarea></td> 1.120 +</tr> 1.121 +</table> 1.122 +You can set your dropbear key 1.123 +<pre> 1.124 +# uuencode -m - < /etc/dropbear/dropbear_dss_host_key 1.125 +</pre> 1.126 +Or your ssh key 1.127 +<pre> 1.128 +# dropbearconvert openssh dropbear /etc/ssh/id_dsa /dev/stdout | uuencode -m - 1.129 +</pre> 1.130 +Default DSS public key is 1.131 +<pre> 1.132 +$DSSPUB 1.133 +</pre> 1.134 +Default RSA public key is 1.135 +<pre> 1.136 +$RSAPUB 1.137 +</pre> 1.138 +EOT 1.139 +}
2.1 --- a/dropbear/receipt Mon Sep 12 15:43:10 2011 +0200 2.2 +++ b/dropbear/receipt Fri Sep 16 18:15:41 2011 +0200 2.3 @@ -6,7 +6,7 @@ 2.4 SHORT_DESC="Light SSH client and server." 2.5 MAINTAINER="pascal.bellard@slitaz.org" 2.6 TARBALL="$PACKAGE-$VERSION.tar.gz" 2.7 -DEPENDS="libutil" 2.8 +DEPENDS="libutil zlib" 2.9 [ -n "$TARGET" ] || TARGET="i486" 2.10 BUILD_DEPENDS="dropbear uclibc-cross-compiler-$TARGET" 2.11 SUGGESTED="sftp-server" 2.12 @@ -27,7 +27,7 @@ 2.13 -e 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \ 2.14 options.h 2.15 ./configure --prefix=/usr --without-pam --host=$TARGET-pc-linux-gnu \ 2.16 - --disable-zlib CC=uclibc-$TARGET-cc && 2.17 + CC=uclibc-$TARGET-cc && 2.18 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 && 2.19 install -d -m 755 $PWD/_pkg/usr/sbin && 2.20 install -m 755 dropbearmulti $PWD/_pkg/usr/sbin/dropbear &&