Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dropbear/
Date: Wed, 06 Apr 2022 20:21:26
Message-Id: 1649276473.db50f8ef891f5143f45cd548e17af125b537024b.sam@gentoo
1 commit: db50f8ef891f5143f45cd548e17af125b537024b
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 6 20:20:44 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 6 20:21:13 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db50f8ef
7
8 net-misc/dropbear: add 2022.82
9
10 Closes: https://bugs.gentoo.org/836900
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 net-misc/dropbear/Manifest | 2 +
14 net-misc/dropbear/dropbear-2022.82.ebuild | 136 ++++++++++++++++++++++++++++++
15 2 files changed, 138 insertions(+)
16
17 diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest
18 index 9c19bcaada0f..796b3a343889 100644
19 --- a/net-misc/dropbear/Manifest
20 +++ b/net-misc/dropbear/Manifest
21 @@ -1 +1,3 @@
22 DIST dropbear-2020.81.tar.bz2 2289644 BLAKE2B eb80ff88d75ae97365570f8793aee855cc615f6a46c49c4efa026d14ba8507c41b87093ca5b86dd1fcd3602f5e24b7b9c4f83c7cf4f6dc7945ff628b09c98794 SHA512 2fa9d4d7dcb1c81281f5e47c8a99b7300eb46b3bb605daaec956404eae9124879a8bbbef521dea6da8b3643f3dc6f7f5005e265bfcaba97e89812f5642c294da
23 +DIST dropbear-2022.82.tar.bz2 2309514 BLAKE2B 56ff931de1e5681850a4c96b8f2c1d90db1680a08a8a741ae3034a433c2780715ede9754357477c9adfe35a310859641d7a03534e6a656e11cd7de8832fbc27d SHA512 94c664e0d56bce3750b04aff166bf073f778dc2aa08e093541b520db1f165d4173e1cf25eef69a59b0a5a0a63cfb3ce8bbf94d6c4010687a0233ba1ad8ea403b
24 +DIST dropbear-2022.82.tar.bz2.asc 833 BLAKE2B 7d152456f24a61add2935e7f2c9ae7a05e00137ae2c39638004cccc1fd0491311328b5e829443cbe727ae6ec9d58973270b917bae0f23ddcef0b5051b62ca60b SHA512 a45fa49857598195b8d7e51e02bf26498a74c6900245c114ce1fa19bc4eb0ef0518cbb68996c3584c0b98c22bb2078eb963e4a513f0dfb03baae6d04f5911105
25
26 diff --git a/net-misc/dropbear/dropbear-2022.82.ebuild b/net-misc/dropbear/dropbear-2022.82.ebuild
27 new file mode 100644
28 index 000000000000..27bbc8b51dd6
29 --- /dev/null
30 +++ b/net-misc/dropbear/dropbear-2022.82.ebuild
31 @@ -0,0 +1,136 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/dropbear.asc
38 +inherit savedconfig pam verify-sig
39 +
40 +DESCRIPTION="Small SSH 2 client/server designed for small memory environments"
41 +HOMEPAGE="https://matt.ucc.asn.au/dropbear/dropbear.html"
42 +SRC_URI="https://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
43 + https://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
44 +SRC_URI+=" verify-sig? (
45 + https://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2.asc
46 + https://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2.asc
47 + )"
48 +
49 +LICENSE="MIT GPL-2" # (init script is GPL-2 #426056)
50 +SLOT="0"
51 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
52 +IUSE="bsdpty minimal multicall pam +shadow static +syslog zlib"
53 +
54 +LIB_DEPEND="
55 + virtual/libcrypt[static-libs(+)]
56 + zlib? ( sys-libs/zlib[static-libs(+)] )
57 +"
58 +RDEPEND="
59 + acct-group/sshd
60 + acct-user/sshd
61 + !static? (
62 + >=dev-libs/libtomcrypt-1.18.2-r2[libtommath]
63 + >=dev-libs/libtommath-1.2.0
64 + ${LIB_DEPEND//\[static-libs(+)]}
65 + )
66 + pam? ( sys-libs/pam )
67 +"
68 +DEPEND="
69 + ${RDEPEND}
70 + static? ( ${LIB_DEPEND} )
71 +"
72 +RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
73 +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-dropbear )"
74 +
75 +REQUIRED_USE="pam? ( !static )"
76 +
77 +PATCHES=(
78 + "${FILESDIR}"/${PN}-0.46-dbscp.patch
79 +)
80 +
81 +set_options() {
82 + progs=(
83 + dropbear dbclient dropbearkey
84 + $(usex minimal "" "dropbearconvert scp")
85 + )
86 + makeopts=(
87 + MULTI=$(usex multicall 1 0)
88 + )
89 +}
90 +
91 +pkg_setup() {
92 + if use static ; then
93 + ewarn "Using bundled copies of libtommath and libtomcrypt"
94 + fi
95 +}
96 +
97 +src_prepare() {
98 + default
99 + sed \
100 + -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
101 + default_options.h > localoptions.h || die
102 + sed \
103 + -e '/pam_start/s:sshd:dropbear:' \
104 + -i svr-authpam.c || die
105 + restore_config localoptions.h
106 +}
107 +
108 +src_configure() {
109 + # Notes:
110 + # 1) We use bundled libtom* when static build is enabled because
111 + # libtomcrypt lacks it and we don't particularly want to add it.
112 + # 2) We disable the hardening flags as our compiler already enables them
113 + # by default as is appropriate for the target.
114 + local myeconfargs=(
115 + --disable-harden
116 +
117 + # bug #836900
118 + $(use_enable !elibc_musl lastlog)
119 + $(use_enable !elibc_musl wtmp)
120 +
121 + $(use_enable static bundled-libtom)
122 + $(use_enable zlib)
123 + $(use_enable pam)
124 + $(use_enable !bsdpty openpty)
125 + $(use_enable shadow)
126 + $(use_enable static)
127 + $(use_enable syslog)
128 + )
129 +
130 + econf "${myeconfargs[@]}"
131 +}
132 +
133 +src_compile() {
134 + set_options
135 + emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
136 +}
137 +
138 +src_install() {
139 + set_options
140 + emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
141 + doman *.8
142 + newinitd "${FILESDIR}"/dropbear.init.d dropbear
143 + newconfd "${FILESDIR}"/dropbear.conf.d dropbear
144 + dodoc CHANGES README SMALL MULTI
145 +
146 + # The multi install target does not install the links right.
147 + if use multicall ; then
148 + cd "${ED}"/usr/bin || die
149 + local x
150 + for x in "${progs[@]}" ; do
151 + ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
152 + done
153 + rm -f dropbear
154 + dodir /usr/sbin
155 + dosym ../bin/dropbearmulti /usr/sbin/dropbear
156 + cd "${S}" || die
157 + fi
158 + save_config localoptions.h
159 +
160 + if ! use minimal ; then
161 + mv "${ED}"/usr/bin/{,db}scp || die
162 + fi
163 +
164 + if use pam; then
165 + pamd_mimic system-remote-login dropbear auth account password session
166 + fi
167 +}