wok-current annotate openssh/receipt @ rev 25614

use gcc49 to build syslinux (seem corrupt with new gcc)
author Stanislas Leduc <shann@slitaz.org>
date Sun Sep 03 13:07:16 2023 +0000 (14 months ago)
parents 980adf6bb9e7
children 3ad63c8fc2f9
rev   line source
pascal@860 1 # SliTaz package receipt.
pascal@860 2
pascal@860 3 PACKAGE="openssh"
pascal@25563 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@22825 29 current_version()
pascal@22825 30 {
pascal@22826 31 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@22826 32 sed '/tar..z"/!d;s|.*ssh-\(.*\).tar..z".*|\1|' | tail -n1
pascal@22825 33 }
pascal@22825 34
pascal@860 35 # Rules to configure and make the package.
pascal@860 36 compile_rules()
pascal@860 37 {
pankso@16381 38 unset LD # for cross compiling with --disable-strip
Hans-G?nter@25027 39 ./configure \
Hans-G?nter@25027 40 --prefix=/usr \
Hans-G?nter@25027 41 --sysconfdir=/etc/ssh \
Hans-G?nter@25027 42 --libexecdir=/usr/sbin \
Hans-G?nter@25027 43 --with-privsep-user=nobody \
Hans-G?nter@25027 44 --with-xauth=/usr/bin/xauth \
Hans-G?nter@25027 45 --with-privsep-path=/var/run/sshd \
Hans-G?nter@25027 46 --without-pam \
Hans-G?nter@25027 47 --disable-strip \
pascal@1514 48 $CONFIGURE_ARGS &&
pankso@16381 49 make STRIP_OPT="" &&
Hans-G?nter@25027 50 make install -j 1 DESTDIR=$DESTDIR
Hans-G?nter@25027 51 install -d -m 755 $DESTDIR/usr/share/doc &&
Hans-G?nter@25027 52 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
pascal@20876 53 cd contrib &&
pascal@20876 54 cc -Wall $(pkg-config --cflags gtk+-2.0) gnome-ssh-askpass2.c \
pascal@20877 55 -o gnome-ssh-askpass $(pkg-config --libs gtk+-2.0) -lX11 &&
Hans-G?nter@25027 56 cp gnome-ssh-askpass $DESTDIR/usr/bin/ssh-askpass
pascal@860 57 }
pascal@860 58
pascal@860 59 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@860 60 genpkg_rules()
pascal@860 61 {
Hans-G?nter@25027 62 mkdir -p $fs/usr
Hans-G?nter@25027 63 mkdir -p $fs/etc/init.d
Hans-G?nter@25027 64 mkdir -p $fs/etc/ssh
Hans-G?nter@25027 65
Hans-G?nter@25027 66 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@25027 67 cp -a $install/usr/bin $fs/usr
Hans-G?nter@25027 68 rm -f $fs/usr/sbin/sftp-server
Hans-G?nter@25027 69 install -m 755 -oroot -groot $src/contrib/ssh-copy-id \
Hans-G?nter@25027 70 $fs/usr/bin
Hans-G?nter@25027 71 cp $src/contrib/ssh-copy-id.1 $install/usr/share/man/cat1
Hans-G?nter@25027 72 cp -a $install/etc $fs
Hans-G?nter@25027 73 cp $stuff/openssh $fs/etc/init.d
pascal@2598 74 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
Hans-G?nter@25027 75 $fs/etc/ssh/sshd_config
pascal@18807 76
pascal@19409 77 cat >> $fs/etc/ssh/ssh_config <<EOT
pascal@19409 78
pascal@19409 79 # client bug CVE-2016-0777 and CVE-2016-0778
pascal@19409 80 Host *
pascal@19409 81 UseRoaming no
pascal@19409 82
pascal@19409 83 # From https://wiki.gentoo.org/wiki/SSH_jump_host
pascal@19409 84 Host *+*
pascal@23654 85 ProxyCommand ssh \$(echo %h | sed 's/+[^+]*$//;s/\\([^+%%]*\\)%%\\([^+]*\\)\$/\\2 -l \\1/;s/:/ -p /') exec nc -w1 \$(echo %h | sed 's/^.*+//;/:/!s/\$/ %p/;s/:/ /')
pascal@19409 86
pascal@19409 87 EOT
pascal@860 88 }
pascal@860 89
pascal@7303 90 post_install()
pascal@7303 91 {
Hans-G?nter@25027 92 grep -q ssh "$1/etc/inetd.conf" ||
Hans-G?nter@25027 93 cat >> "$1/etc/inetd.conf" <<EOT
pascal@17048 94 #ssh stream tcp nowait root sshd sshd -i
pascal@17048 95 EOT
Hans-G?nter@25027 96 while read dropbear openssh
Hans-G?nter@25027 97 do
al@18689 98 [ -s "$1$dropbear" ] || continue
pascal@23995 99 [ -s "$1$openssh" ] && continue
pascal@18730 100 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
pascal@18730 101 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
pascal@18730 102 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
Hans-G?nter@25027 103 done <<EOT
pascal@7303 104 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
pascal@7305 105 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
pascal@19829 106 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
pascal@23868 107 /etc/dropbear/dropbear_ed25519_host_key /etc/ssh/ssh_host_ed25519_key
pascal@7303 108 EOT
al@18689 109
al@18689 110 chroot "$1/" ssh-keygen -A
pascal@7303 111 }
pascal@17048 112
pascal@17048 113 post_remove()
pascal@17048 114 {
Hans-G?nter@25027 115 grep -q sshd "$1/etc/inetd.conf" &&
Hans-G?nter@25027 116 sed -i '/sshd/d' "$1/etc/inetd.conf"
pascal@17048 117 }