Contents of /trunk/core/openssh/openssh-9.4p1-r1.smage2
Parent Directory | Revision Log
Revision 33594 -
(show annotations)
(download)
Thu Aug 10 14:47:12 2023 UTC (9 months, 2 weeks ago) by niro
File size: 2729 byte(s)
Thu Aug 10 14:47:12 2023 UTC (9 months, 2 weeks ago) by niro
File size: 2729 byte(s)
-ver bump to 9.4p1-r1
1 | # $Id$ |
2 | |
3 | PNAME="openssh" |
4 | PVER="9.4p1" |
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-3.1.1 |
13 | >= sys-libs/zlib-1.2.13 |
14 | >= sys-libs/libxcrypt-4.4 |
15 | >= sys-libs/pam-1.5 |
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 | https://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 | ) |
39 | |
40 | UP2DATE="updatecmd http://ftp2.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/ | highesttarball gz" |
41 | |
42 | pkg_setup() |
43 | { |
44 | preinstall |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | local myopts |
51 | |
52 | # no libfido2 atm |
53 | # builtin fido2 support, requires libfido2 |
54 | #myopts+=" --with-security-key-builtin" |
55 | |
56 | mconfigure \ |
57 | --sysconfdir=/etc/ssh \ |
58 | --libexecdir=/usr/$(mlibdir)/misc \ |
59 | --datadir=/usr/share/openssh \ |
60 | --with-pid-dir=/run \ |
61 | --disable-strip \ |
62 | --with-privsep-path=/var/empty \ |
63 | --with-privsep-user=sshd \ |
64 | --without-zlib-version-check \ |
65 | --with-pam \ |
66 | --with-ssl-engine \ |
67 | ${myopts} \ |
68 | || die |
69 | |
70 | mmake || die |
71 | } |
72 | |
73 | src_install() |
74 | { |
75 | cd ${SRCDIR} |
76 | mmake DESTDIR=${BINDIR} install-nokeys || die |
77 | |
78 | # install systemd units |
79 | minstallunit sshd.service-${SVC_REV} sshd.service || die |
80 | # minstallunit sshd.socket || die |
81 | minstallunit ssh-keygen.service || die |
82 | minstalltmp sshd.conf.tempfile sshd.conf || die |
83 | minstallpam sshd.pam sshd || die |
84 | |
85 | # fix sshd_config to enable pam support |
86 | sed -i -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ |
87 | -e '/^#UsePAM no$/c UsePAM yes' \ |
88 | ${BINDIR}/etc/ssh/sshd_config || die |
89 | |
90 | # needed to run sshd |
91 | mkeepdir /var/empty || die |
92 | mchown root:sys /var/empty || die |
93 | |
94 | minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ |
95 | README* RFC.nroff TODO WARNING.RNG || die |
96 | } |
97 | |
98 | preinstall() |
99 | { |
100 | # adding ssh user |
101 | mgroupadd -o "-g 22" sshd |
102 | museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd |
103 | } |
104 | |
105 | postinstall() |
106 | { |
107 | # cleanup old symlinks |
108 | local i |
109 | for i in dsa ecdsa rsa1 rsa ed25519 |
110 | do |
111 | if [ -L ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service ] |
112 | then |
113 | rm ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service |
114 | fi |
115 | done |
116 | |
117 | mstartunit sshd.service |
118 | # per socket connection not supported atm |
119 | #mstartunit sshd.socket |
120 | } |
121 | |
122 | postremove() |
123 | { |
124 | mstopunit sshd.service |
125 | # per socket connection not supported atm |
126 | #mstopunit sshd.socket |
127 | } |