Magellan Linux

Annotation of /trunk/core/openssh/openssh-7.9p1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31600 - (hide annotations) (download)
Mon Dec 3 14:51:31 2018 UTC (5 years, 5 months ago) by niro
File size: 2759 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 niro 31599 mirror://${PNAME}/${PNAME}-7.7p1-openssl-1.1.0.patch
38 niro 31598 )
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_prepare()
48     {
49     munpack ${SRCFILE} || die
50     cd ${SRCDIR}
51    
52     # support openssl-1.1
53 niro 31599 mpatch ${PNAME}-7.7p1-openssl-1.1.0.patch || die
54 niro 31598 }
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     }