wok view openssh-pam/receipt @ rev 23675
updated strigi, strigi-client and strigi-dev (0.7.5 -> 0.7.8)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Apr 26 10:35:40 2020 +0100 (2020-04-26) |
parents | e04fb802c121 |
children | 2c466aa0cddc |
line source
1 # SliTaz package receipt.
3 PACKAGE="openssh-pam"
4 VERSION="8.2p1"
5 CATEGORY="security"
6 SHORT_DESC="Openbsd Secure Shell using PAM."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 SOURCE="openssh"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.openssh.org/"
12 WGET_URL="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
13 CONFIG_FILES="/etc/ssh"
14 TAGS="ssh security"
16 PROVIDE="openssh:pam ssh:pam"
17 DEPENDS="sftp-server libcrypto zlib pam"
18 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev gtk+-dev"
19 SUGGESTED="gtk+"
20 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options::OPENSSH_OPTIONS|web::$WEB_SITE"
22 current_version()
23 {
24 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
25 sed '/tar..z"/!d;s|.*ssh-\(.*\).tar..z".*|\1|' | tail -n1
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 unset LD # for cross compiling with --disable-strip
32 ./configure \
33 --prefix=/usr \
34 --sysconfdir=/etc/ssh \
35 --libexecdir=/usr/sbin \
36 --with-privsep-user=nobody \
37 --with-xauth=/usr/bin/xauth \
38 --with-privsep-path=/var/run/sshd \
39 --with-pam \
40 --disable-strip \
41 $CONFIGURE_ARGS &&
42 make STRIP_OPT="" &&
43 make -j 1 DESTDIR=$DESTDIR install
44 install -d -m 755 $DESTDIR/usr/share/doc &&
45 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
46 cd contrib &&
47 cc -Wall $(pkg-config --cflags gtk+-2.0) gnome-ssh-askpass2.c \
48 -o gnome-ssh-askpass $(pkg-config --libs gtk+-2.0) -lX11 &&
49 cp gnome-ssh-askpass $DESTDIR/usr/bin/ssh-askpass
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
56 cp -a $install/usr/sbin $install/usr/bin $fs/usr
57 rm -f $fs/usr/sbin/sftp-server
58 install -D -m 755 -oroot -groot $src/contrib/sshd.pam.generic $fs/etc/pam.d/sshd
59 install -m 755 -oroot -groot $src/contrib/ssh-copy-id $fs/usr/bin
60 cp $src/contrib/ssh-copy-id.1 $install/usr/share/man/cat1
61 cp -a $install/etc $fs
62 cp ../$SOURCE/stuff/openssh $fs/etc/init.d
63 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config
64 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
65 $fs/etc/ssh/sshd_config
67 cat >> $fs/etc/ssh/ssh_config <<EOT
69 # client bug CVE-2016-0777 and CVE-2016-0778
70 Host *
71 UseRoaming no
73 # From https://wiki.gentoo.org/wiki/SSH_jump_host
74 Host *+*
75 ProxyCommand ssh \$(echo %h | sed 's/+[^+]*$//;s/\\([^+%%]*\\)%%\\([^+]*\\)\$/\\2 -l \\1/;s/:/ -p /') exec nc -w1 \$(echo %h | sed 's/^.*+//;/:/!s/\$/ %p/;s/:/ /')
77 EOT
78 }
80 post_install()
81 {
82 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
83 #ssh stream tcp nowait root sshd sshd -i
84 EOT
85 while read dropbear openssh ; do
86 [ -s "$1$dropbear" ] || continue
87 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
88 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
89 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
90 done <<EOT
91 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
92 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
93 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
94 EOT
96 chroot "$1/" ssh-keygen -A
97 }
99 post_remove()
100 {
101 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf"
102 }