wok-6.x annotate dropbear/receipt @ rev 24786

updated libspectre-dev (0.2.7 -> 0.2.9)
author Hans-G?nter Theisgen
date Mon Mar 21 08:06:51 2022 +0100 (2022-03-21)
parents a8546de77bcc
children 3b19fa0b9a88
rev   line source
pankso@126 1 # SliTaz package receipt.
pankso@126 2
pankso@126 3 PACKAGE="dropbear"
pascal@23995 4 VERSION="2020.81"
pankso@209 5 CATEGORY="security"
al@17992 6 SHORT_DESC="Lightweight SSH2 server and client"
pankso@126 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14657 8 LICENSE="MIT"
pankso@12689 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@23881 10 WEB_SITE="https://matt.ucc.asn.au/dropbear/dropbear.html"
pascal@23881 11 WGET_URL="https://matt.ucc.asn.au/dropbear/releases/$TARBALL"
pascal@23902 12 CONFIG_FILES="/etc/dropbear/banner"
pascal@23902 13 SECRET_FILES="/etc/dropbear/*key"
pankso@12839 14 SUGGESTED="sftp-server"
pascal@4904 15 PROVIDE="ssh"
jozee@4934 16 TAGS="ssh"
pankso@12839 17 HOST_ARCH="i486 arm"
pankso@126 18
pankso@12689 19 DEPENDS="zlib"
pankso@12689 20 BUILD_DEPENDS="zlib-dev pam pam-dev"
pankso@12689 21
pankso@12839 22 # Handle multiarch compilation.
pankso@12834 23 case "$ARCH" in
pankso@12839 24 arm)
pankso@12839 25 BUILD_DEPENDS=""
pankso@12839 26 CROSS_ARGS="--disable-zlib"
pankso@12839 27 CROSS_BUGS="Fails to find zlib: -lz... no" ;;
pankso@12834 28 esac
pankso@12834 29
pascal@22822 30 current_version()
pascal@22822 31 {
pascal@22822 32 wget -O - $WEB_SITE 2>/dev/null | \
pascal@22822 33 sed "/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
pascal@22822 34 }
pascal@22822 35
pankso@126 36 # Rules to configure and make the package.
pankso@126 37 compile_rules()
pankso@126 38 {
pankso@126 39 local i
pankso@126 40 local DROPBEARS
pankso@126 41 DROPBEARS="dropbearkey dropbearconvert dbclient scp"
pascal@20233 42 cat > localoptions.h <<EOT
pascal@20233 43 #define SFTPSERVER_PATH "/usr/sbin/sftp-server"
pascal@23872 44 #define DROPBEAR_X11FWD 1
pascal@20233 45 EOT
pascal@20234 46 sed -i 's|shell arch|shell uname -m|' libtommath/makefile_include.mk
pankso@12839 47 ./configure --prefix=/usr --without-pam $CONFIGURE_ARGS $CROSS_ARGS &&
pankso@12834 48 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
slaxemulator@11100 49 install -d -m 755 $DESTDIR/usr/sbin &&
slaxemulator@11100 50 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear &&
pankso@12834 51 chown 0.0 $DESTDIR/usr/sbin/dropbear || exit 1
pankso@12834 52
pankso@12834 53 # No pam support in ARM
pankso@12834 54 case "$ARCH" in
pankso@12834 55 arm) echo "Skipping Dropbear PAM..." ;;
pankso@12839 56 i?86)
pascal@20233 57 cat >> localoptions.h <<EOT
pascal@20233 58 #define DROPBEAR_SVR_PASSWORD_AUTH 0
pascal@20233 59 #define DROPBEAR_SVR_PAM_AUTH 1
pascal@20233 60 EOT
pankso@12834 61 ./configure --prefix=/usr --enable-pam $CONFIGURE_ARGS &&
pankso@12834 62 make PROGRAMS="dropbear $DROPBEARS" MULTI=1 SCPPROGRESS=1 &&
pankso@12834 63 install -m 755 dropbearmulti $DESTDIR/usr/sbin/dropbear-pam &&
pankso@12834 64 chown 0.0 $DESTDIR/usr/sbin/dropbear-pam || exit 1 ;;
pankso@12834 65 esac
pankso@12834 66
slaxemulator@11100 67 install -d -m 755 $DESTDIR/usr/bin &&
pascal@1440 68 for i in $DROPBEARS ssh; do
pankso@12834 69 ln -s ../sbin/dropbear $DESTDIR/usr/bin/$i || exit 1
pankso@126 70 done
pascal@19369 71 install -d -m 755 $DESTDIR/usr/share/man/man1 &&
pascal@19371 72 install -m 644 $src/*.1 $DESTDIR/usr/share/man/man1 &&
pascal@19369 73 install -d -m 755 $DESTDIR/usr/share/man/man8 &&
pascal@19371 74 install -m 644 $src/*.8 $DESTDIR/usr/share/man/man8 &&
pascal@19369 75 install -d -m 755 $DESTDIR/usr/share/doc &&
pascal@19371 76 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
pankso@126 77 }
pankso@126 78
pankso@126 79 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@126 80 genpkg_rules()
pankso@126 81 {
pankso@126 82 mkdir -p $fs/usr
pankso@12689 83 cp -a $install/usr/bin $fs/usr
pankso@12689 84 cp -a $install/usr/sbin $fs/usr
pascal@11595 85 rm -f $fs/usr/sbin/dropbear-pam
pankso@126 86 # Config file and init script.
pankso@126 87 mkdir -p $fs/etc
slaxemulator@11100 88 cp -a $stuff/dropbear $fs/etc
slaxemulator@11100 89 cp -a $stuff/init.d $fs/etc
devl547@18881 90 ln -s daemon $fs/etc/init.d/sshd
slaxemulator@11100 91 cp -a $stuff/sshx $fs/usr/bin
pascal@14027 92 ln -s sshx $fs/usr/bin/pppssh
pascal@18330 93 ln -s sshx $fs/usr/bin/sshfbvnc
pankso@12834 94 touch $fs/etc/dropbear/dropbear_dss_host_key \
al@18599 95 $fs/etc/dropbear/dropbear_rsa_host_key \
pascal@23872 96 $fs/etc/dropbear/dropbear_ecdsa_host_key \
pascal@23872 97 $fs/etc/dropbear/dropbear_ed25519_host_key
pankso@12689 98
erjo@1074 99 # Fix dropbear initscript perms
pankso@1091 100 chown -R root.root $fs
pankso@126 101 }
pankso@126 102
pankso@126 103 # Post message when installing.
pankso@126 104 post_install()
pankso@126 105 {
pascal@18730 106 while read dropbear openssh ; do
pascal@18730 107 [ -s "$1/$openssh" ] || continue
pascal@23995 108 [ -s "$1/$dropbear" ] && continue
pascal@18730 109 chroot "$1/" dropbearconvert openssh dropbear $openssh $dropbear
pascal@18730 110 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
pascal@7304 111 done <<EOT
pascal@7304 112 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 113 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@19829 114 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
pascal@23868 115 /etc/dropbear/dropbear_ed25519_host_key /etc/ssh/ssh_host_ed25519_key
pascal@7304 116 EOT
mojo@19390 117 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
pascal@17046 118 #ssh stream tcp nowait root dropbear dropbear -i -b /etc/dropbear/banner
pascal@17046 119 EOT
al@18968 120 [ -n "$quiet" ] && return
pankso@126 121 echo -e "\nTo starts $PACKAGE server you can run :\n"
pankso@126 122 echo "/etc/init.d/$PACKAGE start"
pankso@126 123 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
pankso@126 124 }
pascal@17046 125
pascal@17046 126 post_remove()
pascal@17046 127 {
pascal@18730 128 grep -q dropbear "$1/etc/inetd.conf" && sed -i '/dropbear/d' "$1/etc/inetd.conf"
pascal@17046 129 }