wok view openssh-pam/receipt @ rev 20641

Add SSL support to retawq (needed by man to browse linux.die.net)
author Lucas Levrel <llevrel@yahoo.fr>
date Fri Jan 11 09:19:11 2019 +0100 (2019-01-11)
parents 294deb0fa681
children 07197587ca55
line source
1 # SliTaz package receipt.
3 PACKAGE="openssh-pam"
4 VERSION="7.6p1"
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 /etc/inetd.conf"
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"
19 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options::OPENSSH_OPTIONS|web::$WEB_SITE"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 patch -p1 < ../$SOURCE/stuff/knock.u
25 unset LD # for cross compiling with --disable-strip
26 ./configure \
27 --prefix=/usr \
28 --sysconfdir=/etc/ssh \
29 --libexecdir=/usr/sbin \
30 --with-privsep-user=nobody \
31 --with-xauth=/usr/bin/xauth \
32 --with-privsep-path=/var/run/sshd \
33 --with-pam \
34 --disable-strip \
35 $CONFIGURE_ARGS &&
36 make STRIP_OPT="" &&
37 make DESTDIR=$DESTDIR install
38 install -d -m 755 $DESTDIR/usr/share/doc &&
39 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
46 cp -a $install/usr/sbin $install/usr/bin $fs/usr
47 rm -f $fs/usr/sbin/sftp-server
48 cp -a $install/etc $fs
49 cp ../$SOURCE/stuff/openssh $fs/etc/init.d
50 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config
51 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
52 $fs/etc/ssh/sshd_config
54 cat >> $fs/etc/ssh/ssh_config <<EOT
56 # client bug CVE-2016-0777 and CVE-2016-0778
57 Host *
58 UseRoaming no
60 # From https://wiki.gentoo.org/wiki/SSH_jump_host
61 Host *+*
62 ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
64 EOT
65 }
67 post_install()
68 {
69 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
70 #ssh stream tcp nowait root sshd sshd -i
71 EOT
72 while read dropbear openssh ; do
73 [ -s "$1$dropbear" ] || continue
74 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
75 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
76 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
77 done <<EOT
78 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
79 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
80 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
81 EOT
83 chroot "$1/" ssh-keygen -A
84 }
86 post_remove()
87 {
88 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf"
89 }