wok-6.x rev 12834
dropbear: prepa for ARM and SCPPROGRESS=1
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 22 17:21:11 2012 +0200 (2012-05-22) |
parents | b6587677282b |
children | b61c615f20eb |
files | dropbear/receipt |
line diff
1.1 --- a/dropbear/receipt Tue May 22 16:51:07 2012 +0200 1.2 +++ b/dropbear/receipt Tue May 22 17:21:11 2012 +0200 1.3 @@ -12,10 +12,16 @@ 1.4 CONFIG_FILES="/etc/dropbear" 1.5 PROVIDE="ssh" 1.6 TAGS="ssh" 1.7 +#HOST_ARCH="i486 arm" 1.8 1.9 DEPENDS="zlib" 1.10 BUILD_DEPENDS="zlib-dev pam pam-dev" 1.11 1.12 +# Handle multiarch compilation 1.13 +case "$ARCH" in 1.14 + arm) BUILD_DEPENDS="zlib-dev" ;; 1.15 +esac 1.16 + 1.17 # Rules to configure and make the package. 1.18 compile_rules() 1.19 { 1.20 @@ -28,21 +34,26 @@ 1.21 -e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \ 1.22 options.h 1.23 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS && 1.24 - make PROGRAMS="dropbear $DROPBEARS" MULTI=1 && 1.25 + make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 && 1.26 install -d -m 755 $DESTDIR/usr/sbin && 1.27 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear && 1.28 - chown root $DESTDIR/usr/sbin/dropbear && 1.29 - chgrp 0 $DESTDIR/usr/sbin/dropbear && 1.30 - sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \ 1.31 - options.h 1.32 - ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS && 1.33 - make PROGRAMS="dropbear $DROPBEARS" MULTI=1 && 1.34 - install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam && 1.35 - chown root $DESTDIR/usr/sbin/dropbear-pam && 1.36 - chgrp 0 $DESTDIR/usr/sbin/dropbear-pam && 1.37 + chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1 1.38 + 1.39 + # No pam support in ARM 1.40 + case "$ARCH" in 1.41 + arm) echo "Skipping Dropbear PAM..." ;; 1.42 + *) 1.43 + sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \ 1.44 + options.h 1.45 + ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS && 1.46 + make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 && 1.47 + install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam && 1.48 + chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;; 1.49 + esac 1.50 + 1.51 install -d -m 755 $DESTDIR/usr/bin && 1.52 for i in $DROPBEARS ssh; do 1.53 - ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i 1.54 + ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1 1.55 done 1.56 } 1.57 1.58 @@ -58,7 +69,7 @@ 1.59 cp -a $stuff/dropbear $fs/etc 1.60 cp -a $stuff/init.d $fs/etc 1.61 cp -a $stuff/sshx $fs/usr/bin 1.62 - touch $fs/etc/dropbear/dropbear_dss_host_key \ 1.63 + touch $fs/etc/dropbear/dropbear_dss_host_key \ 1.64 $fs/etc/dropbear/dropbear_rsa_host_key 1.65 1.66 # Fix dropbear initscript perms 1.67 @@ -70,8 +81,8 @@ 1.68 { 1.69 while read dropbear openssh ; do 1.70 [ -s $openssh ] || continue 1.71 - dropbearconvert openssh dropbear $1$openssh $1$dropbear 1.72 - dropbearkey -y -f $1$dropbear | grep Fingerprint 1.73 + dropbearconvert openssh dropbear ${root}$openssh ${root}$dropbear 1.74 + dropbearkey -y -f ${root}$dropbear | grep Fingerprint 1.75 done <<EOT 1.76 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key 1.77 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key