wok annotate openssh/receipt @ rev 25673

Fix tcpdump path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 26 14:52:00 2024 +0000 (8 months ago)
parents d88295c12cfc
children
rev   line source
pascal@860 1 # SliTaz package receipt.
pascal@860 2
pascal@860 3 PACKAGE="openssh"
pascal@25631 4 VERSION="9.3p1"
pascal@860 5 CATEGORY="security"
Hans-G?nter@25027 6 TAGS="ssh security"
pascal@860 7 SHORT_DESC="Openbsd Secure Shell."
pascal@860 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14657 9 LICENSE="BSD"
Hans-G?nter@25027 10 WEB_SITE="https://www.openssh.com/"
Hans-G?nter@25027 11
pascal@860 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@24099 13 WGET_URL="https://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
Hans-G?nter@25027 14
Hans-G?nter@25027 15 PROVIDE="ssh"
Hans-G?nter@25027 16 SUGGESTED="gtk+"
Hans-G?nter@25027 17 DEPENDS="libcrypto sftp-server zlib"
Hans-G?nter@25027 18 BUILD_DEPENDS="gtk+-dev libcrypto-dev openssl-dev zlib-dev"
Hans-G?nter@25027 19 SPLIT="sftp-server"
Hans-G?nter@25027 20 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options|web::$WEB_SITE"
Hans-G?nter@25027 21
pascal@23902 22 CONFIG_FILES="/etc/ssh/*config /etc/ssh/moduli"
pascal@23902 23 SECRET_FILES="/etc/ssh/*key*"
Hans-G?nter@25027 24
pankso@16381 25 HOST_ARCH="i486 arm"
pankso@16381 26
Hans-G?nter@25027 27 # @maintainer: Please update also sftp-server
pascal@860 28
pascal@25631 29 # What is the latest version available today?
pascal@22825 30 current_version()
pascal@22825 31 {
pascal@22826 32 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@22826 33 sed '/tar..z"/!d;s|.*ssh-\(.*\).tar..z".*|\1|' | tail -n1
pascal@22825 34 }
pascal@22825 35
pascal@860 36 # Rules to configure and make the package.
pascal@860 37 compile_rules()
pascal@860 38 {
pankso@16381 39 unset LD # for cross compiling with --disable-strip
Hans-G?nter@25027 40 ./configure \
Hans-G?nter@25027 41 --prefix=/usr \
Hans-G?nter@25027 42 --sysconfdir=/etc/ssh \
Hans-G?nter@25027 43 --libexecdir=/usr/sbin \
Hans-G?nter@25027 44 --with-privsep-user=nobody \
Hans-G?nter@25027 45 --with-xauth=/usr/bin/xauth \
Hans-G?nter@25027 46 --with-privsep-path=/var/run/sshd \
Hans-G?nter@25027 47 --without-pam \
Hans-G?nter@25027 48 --disable-strip \
pascal@1514 49 $CONFIGURE_ARGS &&
pankso@16381 50 make STRIP_OPT="" &&
Hans-G?nter@25027 51 make install -j 1 DESTDIR=$DESTDIR
Hans-G?nter@25027 52 install -d -m 755 $DESTDIR/usr/share/doc &&
Hans-G?nter@25027 53 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
pascal@20876 54 cd contrib &&
pascal@20876 55 cc -Wall $(pkg-config --cflags gtk+-2.0) gnome-ssh-askpass2.c \
pascal@20877 56 -o gnome-ssh-askpass $(pkg-config --libs gtk+-2.0) -lX11 &&
Hans-G?nter@25027 57 cp gnome-ssh-askpass $DESTDIR/usr/bin/ssh-askpass
pascal@860 58 }
pascal@860 59
pascal@860 60 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@860 61 genpkg_rules()
pascal@860 62 {
Hans-G?nter@25027 63 mkdir -p $fs/usr
Hans-G?nter@25027 64 mkdir -p $fs/etc/init.d
Hans-G?nter@25027 65 mkdir -p $fs/etc/ssh
Hans-G?nter@25027 66
Hans-G?nter@25027 67 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@25027 68 cp -a $install/usr/bin $fs/usr
Hans-G?nter@25027 69 rm -f $fs/usr/sbin/sftp-server
Hans-G?nter@25027 70 install -m 755 -oroot -groot $src/contrib/ssh-copy-id \
Hans-G?nter@25027 71 $fs/usr/bin
Hans-G?nter@25027 72 cp $src/contrib/ssh-copy-id.1 $install/usr/share/man/cat1
Hans-G?nter@25027 73 cp -a $install/etc $fs
Hans-G?nter@25027 74 cp $stuff/openssh $fs/etc/init.d
pascal@2598 75 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
Hans-G?nter@25027 76 $fs/etc/ssh/sshd_config
pascal@18807 77
pascal@19409 78 cat >> $fs/etc/ssh/ssh_config <<EOT
pascal@19409 79
pascal@19409 80 # client bug CVE-2016-0777 and CVE-2016-0778
pascal@19409 81 Host *
pascal@19409 82 UseRoaming no
pascal@19409 83
pascal@19409 84 # From https://wiki.gentoo.org/wiki/SSH_jump_host
pascal@19409 85 Host *+*
pascal@23654 86 ProxyCommand ssh \$(echo %h | sed 's/+[^+]*$//;s/\\([^+%%]*\\)%%\\([^+]*\\)\$/\\2 -l \\1/;s/:/ -p /') exec nc -w1 \$(echo %h | sed 's/^.*+//;/:/!s/\$/ %p/;s/:/ /')
pascal@19409 87
pascal@19409 88 EOT
pascal@860 89 }
pascal@860 90
pascal@7303 91 post_install()
pascal@7303 92 {
Hans-G?nter@25027 93 grep -q ssh "$1/etc/inetd.conf" ||
Hans-G?nter@25027 94 cat >> "$1/etc/inetd.conf" <<EOT
pascal@17048 95 #ssh stream tcp nowait root sshd sshd -i
pascal@17048 96 EOT
Hans-G?nter@25027 97 while read dropbear openssh
Hans-G?nter@25027 98 do
al@18689 99 [ -s "$1$dropbear" ] || continue
pascal@23995 100 [ -s "$1$openssh" ] && continue
pascal@18730 101 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
pascal@18730 102 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
pascal@18730 103 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
Hans-G?nter@25027 104 done <<EOT
pascal@7303 105 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 106 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@19829 107 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
pascal@23868 108 /etc/dropbear/dropbear_ed25519_host_key /etc/ssh/ssh_host_ed25519_key
pascal@7303 109 EOT
al@18689 110
al@18689 111 chroot "$1/" ssh-keygen -A
pascal@7303 112 }
pascal@17048 113
pascal@17048 114 post_remove()
pascal@17048 115 {
Hans-G?nter@25027 116 grep -q sshd "$1/etc/inetd.conf" &&
Hans-G?nter@25027 117 sed -i '/sshd/d' "$1/etc/inetd.conf"
pascal@17048 118 }