Annotation of /trunk/core/openssh/openssh-7.9p1-r1.smage2
Parent Directory | Revision Log
Revision 31598 -
(hide annotations)
(download)
Mon Dec 3 14:21:48 2018 UTC (5 years, 5 months ago) by niro
File size: 2901 byte(s)
Mon Dec 3 14:21:48 2018 UTC (5 years, 5 months ago) by niro
File size: 2901 byte(s)
auto added: ver bump to 7.9p1-r1
1 | niro | 31598 | # $Id$ |
2 | |||
3 | PNAME="openssh" | ||
4 | PVER="7.9p1" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="net-misc" | ||
8 | |||
9 | DESCRIPTION="Port of OpenBSD's free SSH release." | ||
10 | HOMEPAGE="http://www.openssh.com/" | ||
11 | |||
12 | DEPEND=">= dev-libs/openssl-1.1.1 | ||
13 | >= sys-libs/zlib-1.2.8 | ||
14 | >= sys-libs/pam-1.1 | ||
15 | >= virtual/sed" | ||
16 | |||
17 | PROVIDE="virtual/ssh-server | ||
18 | virtual/ssh-client" | ||
19 | |||
20 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
22 | |||
23 | sminclude mbuild mtools systemd | ||
24 | msetfeature "!check" | ||
25 | |||
26 | SVC_REV=1.6 | ||
27 | |||
28 | SRC_URI=( | ||
29 | ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE} | ||
30 | ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/OpenSSH/portable/${SRCFILE} | ||
31 | mirror://${PNAME}/${SRCFILE} | ||
32 | mirror://${PNAME}/sshd.service-${SVC_REV} | ||
33 | # mirror://${PNAME}/sshd.socket | ||
34 | mirror://${PNAME}/ssh-keygen.service | ||
35 | mirror://${PNAME}/sshd.conf.tempfile | ||
36 | mirror://${PNAME}/sshd.pam | ||
37 | mirror://${PNAME}/${PNAME}-${PVER}-openssl-1.1.0.patch | ||
38 | mirror://${PNAME}/${PNAME}-${PVER}-tuntap.patch | ||
39 | ) | ||
40 | |||
41 | UP2DATE="updatecmd http://ftp2.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/ | highesttarball gz" | ||
42 | |||
43 | pkg_setup() | ||
44 | { | ||
45 | preinstall | ||
46 | } | ||
47 | |||
48 | src_prepare() | ||
49 | { | ||
50 | munpack ${SRCFILE} || die | ||
51 | cd ${SRCDIR} | ||
52 | |||
53 | # upstream - fix broken tunnel forwarding | ||
54 | mpatch ${PNAME}-${PVER}-tuntap.patch || die | ||
55 | |||
56 | # support openssl-1.1 | ||
57 | mpatch ${PNAME}-${PVER}-openssl-1.1.0.patch || die | ||
58 | } | ||
59 | |||
60 | src_compile() | ||
61 | { | ||
62 | cd ${SRCDIR} | ||
63 | |||
64 | mconfigure \ | ||
65 | --sysconfdir=/etc/ssh \ | ||
66 | --libexecdir=/usr/$(mlibdir)/misc \ | ||
67 | --datadir=/usr/share/openssh \ | ||
68 | --disable-suid-ssh \ | ||
69 | --with-privsep-path=/var/empty \ | ||
70 | --with-privsep-user=sshd \ | ||
71 | --with-md5-passwords \ | ||
72 | --with-ipv4-default \ | ||
73 | --without-zlib-version-check \ | ||
74 | --with-pam \ | ||
75 | || die | ||
76 | |||
77 | mmake || die | ||
78 | } | ||
79 | |||
80 | src_install() | ||
81 | { | ||
82 | cd ${SRCDIR} | ||
83 | mmake DESTDIR=${BINDIR} install-nokeys || die | ||
84 | |||
85 | # install systemd units | ||
86 | minstallunit sshd.service-${SVC_REV} sshd.service || die | ||
87 | # minstallunit sshd.socket || die | ||
88 | minstallunit ssh-keygen.service || die | ||
89 | minstalltmp sshd.conf.tempfile sshd.conf || die | ||
90 | minstallpam sshd.pam sshd || die | ||
91 | |||
92 | # fix sshd_config to enable pam support | ||
93 | sed -i -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ | ||
94 | -e '/^#UsePAM no$/c UsePAM yes' \ | ||
95 | ${BINDIR}/etc/ssh/sshd_config || die | ||
96 | |||
97 | # needed to run sshd | ||
98 | mkeepdir /var/empty || die | ||
99 | mchown root:sys /var/empty || die | ||
100 | |||
101 | minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ | ||
102 | README* RFC.nroff TODO WARNING.RNG || die | ||
103 | } | ||
104 | |||
105 | preinstall() | ||
106 | { | ||
107 | # adding ssh user | ||
108 | mgroupadd -o "-g 22" sshd | ||
109 | museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd | ||
110 | } | ||
111 | |||
112 | postinstall() | ||
113 | { | ||
114 | # cleanup old symlinks | ||
115 | local i | ||
116 | for i in dsa ecdsa rsa1 rsa ed25519 | ||
117 | do | ||
118 | if [ -L ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service ] | ||
119 | then | ||
120 | rm ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service | ||
121 | fi | ||
122 | done | ||
123 | |||
124 | mstartunit sshd.service | ||
125 | # per socket connection not supported atm | ||
126 | #mstartunit sshd.socket | ||
127 | } | ||
128 | |||
129 | postremove() | ||
130 | { | ||
131 | mstopunit sshd.service | ||
132 | # per socket connection not supported atm | ||
133 | #mstopunit sshd.socket | ||
134 | } |