wok-current view openssh/receipt @ rev 20254

firefox: force 32 bits arch (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 12 22:19:24 2018 +0100 (2018-03-12)
parents e564e12169b9
children fa77ea692592
line source
1 # SliTaz package receipt.
3 PACKAGE="openssh"
4 VERSION="7.6p1"
5 CATEGORY="security"
6 SHORT_DESC="Openbsd Secure Shell."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.openssh.org/"
11 WGET_URL="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
12 CONFIG_FILES="/etc/ssh /etc/inetd.conf"
13 TAGS="ssh security"
14 HOST_ARCH="i486 arm"
16 PROVIDE="ssh"
17 DEPENDS="sftp-server libcrypto zlib"
18 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev"
19 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options|web::$WEB_SITE"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 unset LD # for cross compiling with --disable-strip
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc/ssh \
28 --libexecdir=/usr/sbin \
29 --with-privsep-user=nobody \
30 --with-xauth=/usr/bin/xauth \
31 --with-privsep-path=/var/run/sshd \
32 --without-pam \
33 --disable-strip \
34 $CONFIGURE_ARGS &&
35 make STRIP_OPT="" &&
36 make DESTDIR=$DESTDIR install
37 install -d -m 755 $DESTDIR/usr/share/doc &&
38 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
45 cp -a $install/usr/sbin $install/usr/bin $fs/usr
46 rm -f $fs/usr/sbin/sftp-server
47 cp -a $install/etc $fs
48 cp $stuff/openssh $fs/etc/init.d
49 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \
50 $fs/etc/ssh/sshd_config
52 cat >> $fs/etc/ssh/ssh_config <<EOT
54 # client bug CVE-2016-0777 and CVE-2016-0778
55 Host *
56 UseRoaming no
58 # From https://wiki.gentoo.org/wiki/SSH_jump_host
59 Host *+*
60 ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
62 EOT
63 }
65 post_install()
66 {
67 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
68 #ssh stream tcp nowait root sshd sshd -i
69 EOT
70 while read dropbear openssh ; do
71 [ -s "$1$dropbear" ] || continue
72 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh
73 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub"
74 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint
75 done <<EOT
76 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
77 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
78 /etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key
79 EOT
81 chroot "$1/" ssh-keygen -A
82 }
84 post_remove()
85 {
86 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf"
87 }