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