wok-6.x annotate openssh/receipt @ rev 19668
syslinux: fix win32.c (thanks totoetsasoeur)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 01 14:58:10 2017 +0100 (2017-02-01) |
parents | cb01d1d24314 |
children | ce7157786dac |
rev | line source |
---|---|
pascal@860 | 1 # SliTaz package receipt. |
pascal@860 | 2 |
pascal@860 | 3 PACKAGE="openssh" |
pascal@19624 | 4 VERSION="7.4p1" |
pascal@860 | 5 CATEGORY="security" |
pascal@860 | 6 SHORT_DESC="Openbsd Secure Shell." |
pascal@860 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14657 | 8 LICENSE="BSD" |
pascal@860 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@1597 | 10 WEB_SITE="http://www.openssh.org/" |
devl547@18175 | 11 WGET_URL="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL" |
pascal@17048 | 12 CONFIG_FILES="/etc/ssh /etc/inetd.conf" |
pankso@16381 | 13 TAGS="ssh security" |
pankso@16381 | 14 HOST_ARCH="i486 arm" |
pankso@16381 | 15 |
pascal@14772 | 16 PROVIDE="ssh" |
pascal@3628 | 17 DEPENDS="sftp-server libcrypto zlib" |
pascal@1514 | 18 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev" |
pankso@16381 | 19 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options|web::$WEB_SITE" |
pascal@860 | 20 |
pascal@860 | 21 # Rules to configure and make the package. |
pascal@860 | 22 compile_rules() |
pascal@860 | 23 { |
pankso@16381 | 24 unset LD # for cross compiling with --disable-strip |
pankso@16381 | 25 ./configure \ |
pankso@16381 | 26 --prefix=/usr \ |
pankso@16381 | 27 --sysconfdir=/etc/ssh \ |
pankso@2213 | 28 --libexecdir=/usr/sbin \ |
pankso@16381 | 29 --with-privsep-user=nobody \ |
pascal@16754 | 30 --with-xauth=/usr/bin/xauth \ |
pankso@16381 | 31 --with-privsep-path=/var/run/sshd \ |
pascal@18050 | 32 --without-ssh1 \ |
pankso@16381 | 33 --without-pam \ |
pankso@16381 | 34 --disable-strip \ |
pascal@1514 | 35 $CONFIGURE_ARGS && |
pankso@16381 | 36 make STRIP_OPT="" && |
slaxemulator@11063 | 37 make DESTDIR=$DESTDIR install |
pascal@19369 | 38 install -d -m 755 $DESTDIR/usr/share/doc && |
pascal@19371 | 39 install -m 644 $src/[A-Z][A-Z]* $DESTDIR/usr/share/doc |
pascal@860 | 40 } |
pascal@860 | 41 |
pascal@860 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@860 | 43 genpkg_rules() |
pascal@860 | 44 { |
al@18689 | 45 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh |
pascal@14772 | 46 cp -a $install/usr/sbin $install/usr/bin $fs/usr |
pascal@3628 | 47 rm -f $fs/usr/sbin/sftp-server |
pascal@14772 | 48 cp -a $install/etc $fs |
slaxemulator@11063 | 49 cp $stuff/openssh $fs/etc/init.d |
pascal@2598 | 50 sed -i 's|/usr/libexec/sftp-server|/usr/sbin/sftp-server|' \ |
pascal@2598 | 51 $fs/etc/ssh/sshd_config |
pascal@18807 | 52 |
pascal@19409 | 53 cat >> $fs/etc/ssh/ssh_config <<EOT |
pascal@19409 | 54 |
pascal@19409 | 55 # client bug CVE-2016-0777 and CVE-2016-0778 |
pascal@19409 | 56 Host * |
pascal@19409 | 57 UseRoaming no |
pascal@19409 | 58 |
pascal@19409 | 59 # From https://wiki.gentoo.org/wiki/SSH_jump_host |
pascal@19409 | 60 Host *+* |
pascal@19409 | 61 ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /') |
pascal@19409 | 62 |
pascal@19409 | 63 EOT |
pascal@860 | 64 } |
pascal@860 | 65 |
pascal@7303 | 66 post_install() |
pascal@7303 | 67 { |
al@18689 | 68 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT |
pascal@17048 | 69 #ssh stream tcp nowait root sshd sshd -i |
pascal@17048 | 70 EOT |
pascal@16753 | 71 while read dropbear openssh ; do |
al@18689 | 72 [ -s "$1$dropbear" ] || continue |
pascal@18730 | 73 chroot "$1/" dropbearconvert dropbear openssh $dropbear $openssh |
pascal@18730 | 74 chroot "$1/" dropbearkey -y -f $dropbear | grep ssh > "$1$openssh.pub" |
pascal@18730 | 75 chroot "$1/" dropbearkey -y -f $dropbear | grep Fingerprint |
pascal@16753 | 76 done <<EOT |
pascal@7303 | 77 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key |
pascal@7305 | 78 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key |
pascal@7303 | 79 EOT |
al@18689 | 80 |
al@18689 | 81 chroot "$1/" ssh-keygen -A |
pascal@7303 | 82 } |
pascal@17048 | 83 |
pascal@17048 | 84 post_remove() |
pascal@17048 | 85 { |
al@18689 | 86 grep -q sshd "$1/etc/inetd.conf" && sed -i '/sshd/d' "$1/etc/inetd.conf" |
pascal@17048 | 87 } |