wok view openssh-pam/receipt @ rev 14531

openssh-pam: privsep-path fixs no start
author Richard Dunbar <mojo@slitaz.org>
date Sun May 19 00:26:53 2013 +0000 (2013-05-19)
parents d88afe58888c
children ad59999b3fce
line source
1 # SliTaz package receipt.
3 PACKAGE="openssh-pam"
4 VERSION="5.9p1"
5 CATEGORY="security"
6 SHORT_DESC="Openbsd Secure Shell using PAM."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="openssh"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://www.openssh.org/"
11 WGET_URL="ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
12 DEPENDS="sftp-server libcrypto zlib pam"
13 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev"
14 PROVIDE="openssh:pam ssh:pam"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam \
21 --with-privsep-user=nobody --with-privsep-path=/var/run/sshd \
22 --libexecdir=/usr/sbin \
23 $CONFIGURE_ARGS &&
24 make &&
25 make DESTDIR=$DESTDIR install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
32 cp -a $_pkg/usr/sbin $_pkg/usr/bin $fs/usr
33 rm -f $fs/usr/sbin/sftp-server
34 cp -a $_pkg/etc $fs
35 cp ../$SOURCE/stuff/openssh $fs/etc/init.d
36 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config
37 }
39 # Pre and post install commands for Tazpkg.
40 pre_install()
41 {
42 mkdir -p /var/run/sshd
43 }
45 post_install()
46 {
47 while read dropbear openssh ; do
48 [ -s $dropbear ] || continue
49 dropbearconvert dropbear openssh $1$dropbear $1$openssh
50 dropbearkey -y -f $1$dropbear | grep ssh > $1$openssh.pub
51 dropbearkey -y -f $1$dropbear | grep Fingerprint
52 done <<EOT
53 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
54 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
55 EOT
56 }
58 # Pre and post remove commands for Tazpkg.
59 post_remove()
60 {
61 rm -fr /var/run/sshd
62 }