wok annotate openssh-pam/receipt @ rev 24899
updated mediawiki (1.34.1 -> 1.37.2)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Apr 09 09:41:00 2022 +0100 (2022-04-09) |
parents | 6b6d14c9f7e9 |
children | 980adf6bb9e7 |
rev | line source |
---|---|
pascal@2188 | 1 # SliTaz package receipt. |
pascal@2188 | 2 |
pascal@2188 | 3 PACKAGE="openssh-pam" |
pascal@24049 | 4 VERSION="8.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@23902 | 13 CONFIG_FILES="/etc/ssh/*config /etc/ssh/moduli" |
pascal@23902 | 14 SECRET_FILES="/etc/ssh/*key*" |
pascal@18050 | 15 TAGS="ssh security" |
pascal@18050 | 16 |
pascal@14772 | 17 PROVIDE="openssh:pam ssh:pam" |
pascal@3628 | 18 DEPENDS="sftp-server libcrypto zlib pam" |
pascal@20876 | 19 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev gtk+-dev" |
pascal@20876 | 20 SUGGESTED="gtk+" |
pascal@18050 | 21 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options::OPENSSH_OPTIONS|web::$WEB_SITE" |
pascal@2188 | 22 |
pascal@22829 | 23 current_version() |
pascal@22829 | 24 { |
pascal@22829 | 25 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@22829 | 26 sed '/tar..z"/!d;s|.*ssh-\(.*\).tar..z".*|\1|' | tail -n1 |
pascal@22829 | 27 } |
pascal@22829 | 28 |
pascal@2188 | 29 # Rules to configure and make the package. |
pascal@2188 | 30 compile_rules() |
pascal@2188 | 31 { |
pascal@18050 | 32 unset LD # for cross compiling with --disable-strip |
pascal@18050 | 33 ./configure \ |
pascal@18050 | 34 --prefix=/usr \ |
pascal@18050 | 35 --sysconfdir=/etc/ssh \ |
pascal@18050 | 36 --libexecdir=/usr/sbin \ |
pascal@18050 | 37 --with-privsep-user=nobody \ |
pascal@16754 | 38 --with-xauth=/usr/bin/xauth \ |
pascal@18050 | 39 --with-privsep-path=/var/run/sshd \ |
pascal@18050 | 40 --with-pam \ |
pascal@18050 | 41 --disable-strip \ |
pascal@2188 | 42 $CONFIGURE_ARGS && |
pascal@18050 | 43 make STRIP_OPT="" && |
pascal@23631 | 44 make -j 1 DESTDIR=$DESTDIR install |
pascal@20171 | 45 install -d -m 755 $DESTDIR/usr/share/doc && |
pascal@20171 | 46 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc |
pascal@20876 | 47 cd contrib && |
pascal@20876 | 48 cc -Wall $(pkg-config --cflags gtk+-2.0) gnome-ssh-askpass2.c \ |
pascal@20877 | 49 -o gnome-ssh-askpass $(pkg-config --libs gtk+-2.0) -lX11 && |
pascal@20876 | 50 cp gnome-ssh-askpass $DESTDIR/usr/bin/ssh-askpass |
pascal@2188 | 51 } |
pascal@2188 | 52 |
pascal@2188 | 53 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2188 | 54 genpkg_rules() |
pascal@2188 | 55 { |
al@18689 | 56 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh |
pascal@14772 | 57 cp -a $install/usr/sbin $install/usr/bin $fs/usr |
pascal@3628 | 58 rm -f $fs/usr/sbin/sftp-server |
pascal@20876 | 59 install -D -m 755 -oroot -groot $src/contrib/sshd.pam.generic $fs/etc/pam.d/sshd |
pascal@20876 | 60 install -m 755 -oroot -groot $src/contrib/ssh-copy-id $fs/usr/bin |
pascal@20876 | 61 cp $src/contrib/ssh-copy-id.1 $install/usr/share/man/cat1 |
pascal@14772 | 62 cp -a $install/etc $fs |
slaxemulator@9701 | 63 cp ../$SOURCE/stuff/openssh $fs/etc/init.d |
slaxemulator@9003 | 64 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config |
pascal@18050 | 65 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \ |
pascal@18050 | 66 $fs/etc/ssh/sshd_config |
pascal@18807 | 67 |
pascal@19409 | 68 cat >> $fs/etc/ssh/ssh_config <<EOT |
pascal@19409 | 69 |
pascal@19409 | 70 # client bug CVE-2016-0777 and CVE-2016-0778 |
pascal@19409 | 71 Host * |
pascal@19409 | 72 UseRoaming no |
pascal@19409 | 73 |
pascal@19409 | 74 # From https://wiki.gentoo.org/wiki/SSH_jump_host |
pascal@19409 | 75 Host *+* |
pascal@23654 | 76 ProxyCommand ssh \$(echo %h | sed 's/+[^+]*$//;s/\\([^+%%]*\\)%%\\([^+]*\\)\$/\\2 -l \\1/;s/:/ -p /') exec nc -w1 \$(echo %h | sed 's/^.*+//;/:/!s/\$/ %p/;s/:/ /') |
pascal@19409 | 77 |
pascal@19409 | 78 EOT |
pascal@2188 | 79 } |
pascal@2188 | 80 |
pascal@7303 | 81 post_install() |
pascal@7303 | 82 { |
al@18689 | 83 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT |
pascal@17048 | 84 #ssh stream tcp nowait root sshd sshd -i |
pascal@17048 | 85 EOT |
pascal@16754 | 86 while read dropbear openssh ; do |
al@18689 | 87 [ -s "$1$dropbear" ] || continue |
pascal@23995 | 88 [ -s "$1$openssh" ] && continue |
pascal@18730 | 89 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh |
pascal@18730 | 90 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub" |
pascal@18730 | 91 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint |
pascal@16754 | 92 done <<EOT |
pascal@7303 | 93 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key |
pascal@7305 | 94 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key |
pascal@19829 | 95 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key |
pascal@23868 | 96 /etc/dropbear/dropbear_ed25519_host_key /etc/ssh/ssh_host_ed25519_key |
pascal@7303 | 97 EOT |
al@18689 | 98 |
al@18689 | 99 chroot "$1/" ssh-keygen -A |
pascal@7303 | 100 } |
pascal@17048 | 101 |
pascal@17048 | 102 post_remove() |
pascal@17048 | 103 { |
al@18689 | 104 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf" |
pascal@17048 | 105 } |