Ticket #2779: openssh.diff
File openssh.diff, 3.5 KB (added by mww@…, 20 years ago) |
---|
-
Portfile
old new 2 2 3 3 PortSystem 1.0 4 4 name openssh 5 version 3.8.1p1 6 revision 1 7 revision 0 5 version 4.0 8 6 categories net 9 7 maintainers yeled@opendarwin.org 10 8 description OpenSSH secure login server … … 20 18 methods. 21 19 homepage http://www.openssh.com/ 22 20 platforms darwin 23 checksums md5 1dbfd40ae683f822ae917eebf171ca42 21 distname ${distname}p1 22 checksums md5 7b36f28fc16e1b7f4ba3c1dca191ac92 24 23 master_sites openbsd:OpenSSH/portable \ 25 24 ftp://carroll.cac.psu.edu/pub/OpenBSD/OpenSSH/portable/ 26 depends_lib lib: libssl.0.9.7:openssl lib:libz.1.1.4:zlib25 depends_lib lib:XXX:openssl lib:XXX:zlib 27 26 28 27 # Specified -fno-builtin because GCC 3.3 has log() as a builtin 29 28 # (from math.h) while OpenSSH has its own log() function … … 32 31 configure.args --with-ssl-dir=${prefix} --sysconfdir=${prefix}/etc/ssh \ 33 32 --with-privsep-path=${prefix}/var/empty --with-md5-passwords \ 34 33 --with-pid-dir=${prefix}/var/run --with-tcp-wrappers \ 35 --with-pam --disable-suid-ssh --with-random=/dev/urandom 34 --with-pam --disable-suid-ssh --with-random=/dev/urandom \ 35 --mandir=${prefix}/share/man 36 36 37 37 destroot.target install-nokeys 38 38 39 39 post-destroot { 40 xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d41 40 destroot.keepdirs ${destroot}${prefix}/var/run ${destroot}${prefix}/var/empty 42 xinstall -o root -m 755 -c ${portpath}/files/openssh.sh ${destroot}${prefix}/etc/rc.d 43 reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/openssh.sh 41 reinplace "s|#Port 22|Port 2222|g" ${destroot}${prefix}/etc/ssh/sshd_config 44 42 } 45 43 46 44 # For X11 Forwarding … … 53 51 } 54 52 55 53 variant darwin { 56 depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup57 54 # ln -s /usr/include/pam to work/include/security because 'security' was 58 55 # renamed to 'pam' in OS X. 59 pre-configure { system "mkdir ${workpath}/include" 60 system "ln -s /usr/include/pam ${workpath}/include/security" } 61 post-install { 62 ui_msg "===============================================================================\n" 63 ui_msg "Setup instructions:\n\t 64 Make sure SSHSERVER=-NO- is set in /etc/hostconfig or untick\n\t'Remote Sharing' option in System Preferences > Sharing.\n\tOPTIONAL: Copy your /etc/ssh_host* files to ${prefix}/etc/ssh/\n\tRun: `sudo killall sshd && sudo ${prefix}/etc/rc.d/openssh.sh`\n" 65 ui_msg "===============================================================================\n" 56 pre-configure { 57 file mkdir ${workpath}/include 58 system "ln -s /usr/include/pam ${workpath}/include/security" 66 59 } 67 60 } 68 61 62 startupitem.create yes 63 startupitem.name OpenSSH 64 startupitem.start \ 65 "if \[ -x ${prefix}/sbin/sshd ]; then 66 if \[ ! -f ${prefix}/etc/ssh/ssh_host_key \]; then 67 ${prefix}/bin/ssh-keygen -t rsa1 -f \\ 68 ${prefix}/etc/ssh/ssh_host_key -N \"\" -C `hostname` 69 fi 70 if \[ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key \]; then 71 ${prefix}/bin/ssh-keygen -t dsa -f \\ 72 ${prefix}/etc/ssh/ssh_host_dsa_key -N \"\" -C `hostname` 73 fi 74 if \[ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key \]; then 75 ${prefix}/bin/ssh-keygen -t rsa -f \\ 76 ${prefix}/etc/ssh/ssh_host_rsa_key -N \"\" -C `hostname` 77 fi 78 ${prefix}/sbin/sshd 79 fi" 80 startupitem.stop \ 81 "if \[ -r ${prefix}/var/run/sshd.pid \]; then 82 kill `cat ${prefix}/var/run/sshd.pid` && rm ${prefix}/var/run/sshd.pid 83 fi" 84 startupitem.restart "StopService; StartService"