wok-next rev 21600

updated dropbear (2018.76 -> 2020.79)
author Hans-G?nter Theisgen
date Wed Jun 24 15:06:36 2020 +0100 (2020-06-24)
parents 74d9eeadaadc
children 0826ff96200d
files dropbear/receipt
line diff
     1.1 --- a/dropbear/receipt	Wed Jun 24 14:49:10 2020 +0100
     1.2 +++ b/dropbear/receipt	Wed Jun 24 15:06:36 2020 +0100
     1.3 @@ -1,8 +1,9 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="dropbear"
     1.7 -VERSION="2018.76"
     1.8 +VERSION="2020.79"
     1.9  CATEGORY="security"
    1.10 +TAGS="ssh"
    1.11  SHORT_DESC="Lightweight SSH2 server and client"
    1.12  MAINTAINER="pascal.bellard@slitaz.org"
    1.13  LICENSE="MIT"
    1.14 @@ -11,58 +12,62 @@
    1.15  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.16  WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
    1.17  
    1.18 -BUILD_DEPENDS="zlib-dev pam-dev"
    1.19 +BUILD_DEPENDS="pam-dev zlib-dev"
    1.20  SPLIT="$PACKAGE-pam"
    1.21  
    1.22 -compile_rules() {
    1.23 +compile_rules()
    1.24 +{
    1.25  	local i DROPBEARS="dropbearkey dropbearconvert dbclient scp"
    1.26 -	sed -iold -e 's|/usr/.*/xauth|/usr/bin/xauth|' \
    1.27 -		-e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
    1.28 +	sed -iold	-e 's|/usr/.*/xauth|/usr/bin/xauth|' \
    1.29 +			-e 's|ENABLE_SVR_PAM_AUTH|ENABLE_SVR_PASSWORD_AUTH|' \
    1.30  		options.h
    1.31  
    1.32 -	./configure \
    1.33 -		--prefix=/usr \
    1.34 -		--without-pam \
    1.35 +	./configure		\
    1.36 +		--prefix=/usr	\
    1.37 +		--without-pam	\
    1.38  		$CONFIGURE_ARGS &&
    1.39  	make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
    1.40  	install -Dm755 dropbearmulti $install/usr/sbin/dropbear || return 1
    1.41  
    1.42 -	sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' options.h
    1.43 -	./configure \
    1.44 -		--enable-pam \
    1.45 +	sed -i 's|ENABLE_SVR_PASSWORD_AUTH|ENABLE_SVR_PAM_AUTH|' \
    1.46 +		options.h
    1.47 +	./configure		\
    1.48 +		--enable-pam	\
    1.49  		$CONFIGURE_ARGS &&
    1.50  	make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
    1.51  	install -Dm755 dropbearmulti $install/usr/sbin/dropbear-pam || return 1
    1.52  
    1.53  	install -dm755 $install/usr/bin &&
    1.54 -	for i in $DROPBEARS ssh; do
    1.55 +	for i in $DROPBEARS ssh
    1.56 +	  do
    1.57  		ln -s ../sbin/dropbear $install/usr/bin/$i || return 1
    1.58 -	done
    1.59 +	  done
    1.60  
    1.61  	cook_pick_manpages $src/*.1 $src/*.8
    1.62  	cook_pick_docs CHANGES INSTALL LICENSE MULTI README SMALL
    1.63  
    1.64 -	# Config file and init script.
    1.65 +	# Configuration file and init script.
    1.66  	mkdir -p $install/etc
    1.67 -	cp -a $stuff/dropbear $install/etc
    1.68 -	cp -a $stuff/init.d $install/etc
    1.69 -	cp -a $stuff/sshx $install/usr/bin
    1.70 -	ln -s sshx $install/usr/bin/pppssh
    1.71 -	ln -s sshx $install/usr/bin/sshfbvnc
    1.72 +	cp -a $stuff/dropbear	$install/etc
    1.73 +	cp -a $stuff/init.d	$install/etc
    1.74 +	cp -a $stuff/sshx	$install/usr/bin
    1.75 +	ln -s sshx		$install/usr/bin/pppssh
    1.76 +	ln -s sshx		$install/usr/bin/sshfbvnc
    1.77  	touch $install/etc/dropbear/dropbear_dss_host_key \
    1.78  	      $install/etc/dropbear/dropbear_rsa_host_key \
    1.79  	      $install/etc/dropbear/dropbear_ecdsa_host_key
    1.80  
    1.81  	# PAM
    1.82 -	cp -a $stuff/pam.d $install/etc
    1.83 +	cp -a $stuff/pam.d	$install/etc
    1.84  
    1.85 -	# Fix dropbear initscript perms
    1.86 -	chown -R root:root $install
    1.87 +	# Fix dropbear initscript permissions
    1.88 +	chown -R root:root	$install
    1.89  
    1.90 -	ln -s daemon $install/etc/init.d/sshd
    1.91 +	ln -s daemon		$install/etc/init.d/sshd
    1.92  }
    1.93  
    1.94 -genpkg_rules() {
    1.95 +genpkg_rules()
    1.96 +{
    1.97  	case $PACKAGE in
    1.98  		dropbear)
    1.99  			copy @std
   1.100 @@ -71,7 +76,6 @@
   1.101  			DEPENDS="zlib"
   1.102  			CONFIG_FILES="/etc/dropbear"
   1.103  			PROVIDE="ssh"
   1.104 -			TAGS="ssh"
   1.105  			;;
   1.106  		dropbear-pam)
   1.107  			copy dropbear-pam pam.d/
   1.108 @@ -79,18 +83,19 @@
   1.109  			DEPENDS="dropbear pam"
   1.110  			CAT="security|with PAM support"
   1.111  			PROVIDE="dropbear:pam ssh:pam"
   1.112 -			TAGS="ssh"
   1.113  			;;
   1.114  	esac
   1.115  }
   1.116  
   1.117  # Post message when installing.
   1.118 -post_install_dropbear() {
   1.119 -	while read dropbear openssh; do
   1.120 +post_install_dropbear()
   1.121 +{
   1.122 +	while read dropbear openssh
   1.123 +	  do
   1.124  		[ -s "$1/$openssh" ] || continue
   1.125  		chroot "$1/" dropbearconvert openssh dropbear $openssh $dropbear
   1.126  		chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
   1.127 -	done <<EOT
   1.128 +	  done <<EOT
   1.129  /etc/dropbear/dropbear_rsa_host_key	/etc/ssh/ssh_host_rsa_key
   1.130  /etc/dropbear/dropbear_dss_host_key	/etc/ssh/ssh_host_dsa_key
   1.131  /etc/dropbear/dropbear_ecdsa_host_key	/etc/ssh/ssh_host_ecdsa_key
   1.132 @@ -109,11 +114,13 @@
   1.133  EOT
   1.134  }
   1.135  
   1.136 -post_remove_dropbear() {
   1.137 -	grep -q dropbear "$1/etc/inetd.conf" &&
   1.138 -	sed -i '/dropbear/d' "$1/etc/inetd.conf"
   1.139 +post_remove_dropbear()
   1.140 +{
   1.141 +	grep -q dropbear	"$1/etc/inetd.conf" &&
   1.142 +	sed -i '/dropbear/d'	"$1/etc/inetd.conf"
   1.143  }
   1.144  
   1.145 -post_remove_dropbear_pam() {
   1.146 +post_remove_dropbear_pam()
   1.147 +{
   1.148  	tazpkg -gi dropbear --forced
   1.149  }