wok-current annotate openssh/receipt @ rev 22417

clamav-dev rebuild: WANTED package clamav is broken
author Erkan Yilmaz <erkan@slitaz.org>
date Sun Dec 15 08:20:39 2019 +0000 (2019-12-15)
parents 07197587ca55
children f18534b5699c
rev   line source
pascal@860 1 # SliTaz package receipt.
pascal@860 2
pascal@860 3 PACKAGE="openssh"
pascal@20518 4 VERSION="7.9p1"
pascal@860 5 CATEGORY="security"
pascal@860 6 SHORT_DESC="Openbsd Secure Shell."
pascal@860 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14657 8 LICENSE="BSD"
pascal@860 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@1597 10 WEB_SITE="http://www.openssh.org/"
devl547@18175 11 WGET_URL="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
pascal@17048 12 CONFIG_FILES="/etc/ssh /etc/inetd.conf"
pankso@16381 13 TAGS="ssh security"
pankso@16381 14 HOST_ARCH="i486 arm"
pankso@16381 15
pascal@14772 16 PROVIDE="ssh"
pascal@3628 17 DEPENDS="sftp-server libcrypto zlib"
pascal@20876 18 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev gtk+-dev"
pascal@20876 19 SUGGESTED="gtk+"
pankso@16381 20 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options|web::$WEB_SITE"
pascal@860 21
pascal@860 22 # Rules to configure and make the package.
pascal@860 23 compile_rules()
pascal@860 24 {
pascal@20313 25 patch -p1 < $stuff/knock.u
pankso@16381 26 unset LD # for cross compiling with --disable-strip
pankso@16381 27 ./configure \
pankso@16381 28 --prefix=/usr \
pankso@16381 29 --sysconfdir=/etc/ssh \
pankso@2213 30 --libexecdir=/usr/sbin \
pankso@16381 31 --with-privsep-user=nobody \
pascal@16754 32 --with-xauth=/usr/bin/xauth \
pankso@16381 33 --with-privsep-path=/var/run/sshd \
pankso@16381 34 --without-pam \
pankso@16381 35 --disable-strip \
pascal@1514 36 $CONFIGURE_ARGS &&
pankso@16381 37 make STRIP_OPT="" &&
slaxemulator@11063 38 make DESTDIR=$DESTDIR install
pascal@19369 39 install -d -m 755 $DESTDIR/usr/share/doc &&
pascal@19371 40 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
pascal@20876 41 cd contrib &&
pascal@20876 42 cc -Wall $(pkg-config --cflags gtk+-2.0) gnome-ssh-askpass2.c \
pascal@20877 43 -o gnome-ssh-askpass $(pkg-config --libs gtk+-2.0) -lX11 &&
pascal@20876 44 cp gnome-ssh-askpass $DESTDIR/usr/bin/ssh-askpass
pascal@860 45 }
pascal@860 46
pascal@860 47 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@860 48 genpkg_rules()
pascal@860 49 {
al@18689 50 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
pascal@14772 51 cp -a $install/usr/sbin $install/usr/bin $fs/usr
pascal@3628 52 rm -f $fs/usr/sbin/sftp-server
pascal@20876 53 install -m 755 -oroot -groot $src/contrib/ssh-copy-id $fs/usr/bin
pascal@20876 54 cp $src/contrib/ssh-copy-id.1 $install/usr/share/man/cat1
pascal@14772 55 cp -a $install/etc $fs
slaxemulator@11063 56 cp $stuff/openssh $fs/etc/init.d
pascal@2598 57 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
pascal@2598 58 $fs/etc/ssh/sshd_config
pascal@18807 59
pascal@19409 60 cat >> $fs/etc/ssh/ssh_config <<EOT
pascal@19409 61
pascal@19409 62 # client bug CVE-2016-0777 and CVE-2016-0778
pascal@19409 63 Host *
pascal@19409 64 UseRoaming no
pascal@19409 65
pascal@19409 66 # From https://wiki.gentoo.org/wiki/SSH_jump_host
pascal@19409 67 Host *+*
pascal@19409 68 ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
pascal@19409 69
pascal@19409 70 EOT
pascal@860 71 }
pascal@860 72
pascal@7303 73 post_install()
pascal@7303 74 {
al@18689 75 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
pascal@17048 76 #ssh stream tcp nowait root sshd sshd -i
pascal@17048 77 EOT
pascal@16753 78 while read dropbear openssh ; do
al@18689 79 [ -s "$1$dropbear" ] || continue
pascal@18730 80 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
pascal@18730 81 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
pascal@18730 82 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
pascal@16753 83 done <<EOT
pascal@7303 84 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 85 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@19829 86 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
pascal@7303 87 EOT
al@18689 88
al@18689 89 chroot "$1/" ssh-keygen -A
pascal@7303 90 }
pascal@17048 91
pascal@17048 92 post_remove()
pascal@17048 93 {
al@18689 94 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf"
pascal@17048 95 }