wok annotate openssh-pam/receipt @ rev 20641

Add SSL support to retawq (needed by man to browse linux.die.net)
author Lucas Levrel <llevrel@yahoo.fr>
date Fri Jan 11 09:19:11 2019 +0100 (14 months ago)
parents 294deb0fa681
children 07197587ca55
rev   line source
pascal@2188 1 # SliTaz package receipt.
pascal@2188 2
pascal@2188 3 PACKAGE="openssh-pam"
pascal@20171 4 VERSION="7.6p1"
pascal@2188 5 CATEGORY="security"
pascal@2188 6 SHORT_DESC="Openbsd Secure Shell using PAM."
pascal@2188 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14657 8 LICENSE="BSD"
pascal@2188 9 SOURCE="openssh"
pascal@2188 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@2188 11 WEB_SITE="http://www.openssh.org/"
devl547@18175 12 WGET_URL="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
pascal@17048 13 CONFIG_FILES="/etc/ssh /etc/inetd.conf"
pascal@18050 14 TAGS="ssh security"
pascal@18050 15
pascal@14772 16 PROVIDE="openssh:pam ssh:pam"
pascal@3628 17 DEPENDS="sftp-server libcrypto zlib pam"
pascal@2188 18 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev"
pascal@18050 19 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options::OPENSSH_OPTIONS|web::$WEB_SITE"
pascal@2188 20
pascal@2188 21 # Rules to configure and make the package.
pascal@2188 22 compile_rules()
pascal@2188 23 {
pascal@20313 24 patch -p1 < ../$SOURCE/stuff/knock.u
pascal@18050 25 unset LD # for cross compiling with --disable-strip
pascal@18050 26 ./configure \
pascal@18050 27 --prefix=/usr \
pascal@18050 28 --sysconfdir=/etc/ssh \
pascal@18050 29 --libexecdir=/usr/sbin \
pascal@18050 30 --with-privsep-user=nobody \
pascal@16754 31 --with-xauth=/usr/bin/xauth \
pascal@18050 32 --with-privsep-path=/var/run/sshd \
pascal@18050 33 --with-pam \
pascal@18050 34 --disable-strip \
pascal@2188 35 $CONFIGURE_ARGS &&
pascal@18050 36 make STRIP_OPT="" &&
slaxemulator@11063 37 make DESTDIR=$DESTDIR install
pascal@20171 38 install -d -m 755 $DESTDIR/usr/share/doc &&
pascal@20171 39 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
pascal@2188 40 }
pascal@2188 41
pascal@2188 42 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2188 43 genpkg_rules()
pascal@2188 44 {
al@18689 45 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
pascal@14772 46 cp -a $install/usr/sbin $install/usr/bin $fs/usr
pascal@3628 47 rm -f $fs/usr/sbin/sftp-server
pascal@14772 48 cp -a $install/etc $fs
slaxemulator@9701 49 cp ../$SOURCE/stuff/openssh $fs/etc/init.d
slaxemulator@9003 50 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config
pascal@18050 51 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
pascal@18050 52 $fs/etc/ssh/sshd_config
pascal@18807 53
pascal@19409 54 cat >> $fs/etc/ssh/ssh_config <<EOT
pascal@19409 55
pascal@19409 56 # client bug CVE-2016-0777 and CVE-2016-0778
pascal@19409 57 Host *
pascal@19409 58 UseRoaming no
pascal@19409 59
pascal@19409 60 # From https://wiki.gentoo.org/wiki/SSH_jump_host
pascal@19409 61 Host *+*
pascal@19409 62 ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
pascal@19409 63
pascal@19409 64 EOT
pascal@2188 65 }
pascal@2188 66
pascal@7303 67 post_install()
pascal@7303 68 {
al@18689 69 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
pascal@17048 70 #ssh stream tcp nowait root sshd sshd -i
pascal@17048 71 EOT
pascal@16754 72 while read dropbear openssh ; do
al@18689 73 [ -s "$1$dropbear" ] || continue
pascal@18730 74 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
pascal@18730 75 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
pascal@18730 76 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
pascal@16754 77 done <<EOT
pascal@7303 78 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 79 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@19829 80 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
pascal@7303 81 EOT
al@18689 82
al@18689 83 chroot "$1/" ssh-keygen -A
pascal@7303 84 }
pascal@17048 85
pascal@17048 86 post_remove()
pascal@17048 87 {
al@18689 88 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf"
pascal@17048 89 }