1 |
commit: c1770fa205521b5abfbe16fb46a5ba3383218250 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 22 07:15:56 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 22 08:01:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1770fa2 |
7 |
|
8 |
net-misc/miniupnpd: Bump to 2.2.3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
net-misc/miniupnpd/Manifest | 2 + |
13 |
.../files/miniupnpd-2.2.3-testgetifaddr.patch | 14 +++ |
14 |
net-misc/miniupnpd/miniupnpd-2.2.3.ebuild | 100 +++++++++++++++++++++ |
15 |
3 files changed, 116 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest |
18 |
index cc070f82277..b26631d98c5 100644 |
19 |
--- a/net-misc/miniupnpd/Manifest |
20 |
+++ b/net-misc/miniupnpd/Manifest |
21 |
@@ -1,2 +1,4 @@ |
22 |
DIST miniupnpd-2.2.2.tar.gz 250649 BLAKE2B d561916ced9b5c58371382fe0bec68cd0771d1dc3b2c7fa7e3701cb2579db69697fbdcd724bea2350abd46381eda1fd257dede6df99f99fa54e423db4ee52717 SHA512 3cc11ad901e93a9879fe07e35a20f8977df466bb402e0270e46d1dbd0b5dc3b5dc22303467d5022103952d7dd789ac590c17d0fa81fc7ec42676b66223d37ee4 |
23 |
DIST miniupnpd-2.2.2.tar.gz.sig 543 BLAKE2B 461a9149c66b0e314a767405024fc7bfb641a20ae36b908dc467c9211660d5cb0753fb3c99fa9d6df35d693a2f6790efb6a325f0005804572eaa78a02b23a482 SHA512 8ffc9901cd992cbd9d0fa4c5e510fe43f748ab4a7c4732cc8f2f685f19b71a3f087a63a39e1dbf081175ac65de34b5c05dc3ef636a805e550a0406119a5904ef |
24 |
+DIST miniupnpd-2.2.3.tar.gz 254752 BLAKE2B ebdb8d4ce7dc649ef0243d2d698b9f51cb2006055eb3abb70d9ccc839cb57c7113595ef1b9b5886f55bc458d8260edf95ae6e1964a5d5423f9b0b46e07e02775 SHA512 56b1e93e9576fa412202e1940fcd8b7af57584714c15017bbcec1aa4fa7bba7a6fa5d1136048100d7cce3222f31b38837de1eae344b533164314c858cdf08ef9 |
25 |
+DIST miniupnpd-2.2.3.tar.gz.sig 543 BLAKE2B 3ba2e69cfd7e0a27a746f45e5eb10e573e00c4fc20a7d62b94a2e0b7e4e9ad8779d53df72e31547b78dc6e34676204a4848652e81d1e479a68973e150f51f468 SHA512 9f766f3e94de1fbd458c7bda30cc87892198af7544aa9dc0fa4c6b6a1c9434e4bab6f8583eeccf3ae613da240ad599d750425c507e8138d483710459f31a0b21 |
26 |
|
27 |
diff --git a/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch b/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..73e4a87903e |
30 |
--- /dev/null |
31 |
+++ b/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch |
32 |
@@ -0,0 +1,14 @@ |
33 |
+diff --git a/miniupnpd/testgetifaddr.sh b/miniupnpd/testgetifaddr.sh |
34 |
+index 7ad56d9..2a26a24 100755 |
35 |
+--- a/testgetifaddr.sh |
36 |
++++ b/testgetifaddr.sh |
37 |
+@@ -12,7 +12,8 @@ case $OS in |
38 |
+ *) |
39 |
+ IP="`which ip`" || exit 1 |
40 |
+ EXTIF="`LC_ALL=C $IP -4 route | grep 'default' | sed -e 's/.*dev[[:space:]]*//' -e 's/[[:space:]].*//'`" || exit 1 |
41 |
+- EXTIP="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/inet/ { print $2 }' | cut -d "/" -f 1`" |
42 |
++ EXTIF="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/[0-9]+:/ { print $2; exit 0 }' | cut -d ":" -f 1`" |
43 |
++ EXTIP="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/inet/ { print $2; exit 0 }' | cut -d "/" -f 1`" |
44 |
+ ;; |
45 |
+ esac |
46 |
+ |
47 |
|
48 |
diff --git a/net-misc/miniupnpd/miniupnpd-2.2.3.ebuild b/net-misc/miniupnpd/miniupnpd-2.2.3.ebuild |
49 |
new file mode 100644 |
50 |
index 00000000000..1042f0c2cb8 |
51 |
--- /dev/null |
52 |
+++ b/net-misc/miniupnpd/miniupnpd-2.2.3.ebuild |
53 |
@@ -0,0 +1,100 @@ |
54 |
+# Copyright 1999-2021 Gentoo Authors |
55 |
+# Distributed under the terms of the GNU General Public License v2 |
56 |
+ |
57 |
+EAPI=8 |
58 |
+inherit toolchain-funcs verify-sig |
59 |
+ |
60 |
+MY_P=${P/_rc/-RC} |
61 |
+DESCRIPTION="MiniUPnP IGD Daemon" |
62 |
+HOMEPAGE="http://miniupnp.free.fr/" |
63 |
+SRC_URI="http://miniupnp.free.fr/files/${MY_P}.tar.gz |
64 |
+ verify-sig? ( http://miniupnp.free.fr/files/${MY_P}.tar.gz.sig )" |
65 |
+S=${WORKDIR}/${MY_P} |
66 |
+ |
67 |
+LICENSE="BSD" |
68 |
+SLOT="0" |
69 |
+KEYWORDS="~amd64 ~arm ~x86" |
70 |
+IUSE="+leasefile igd2 ipv6 nftables pcp-peer portinuse strict" |
71 |
+ |
72 |
+RDEPEND=" |
73 |
+ dev-libs/gmp:0= |
74 |
+ sys-apps/util-linux:= |
75 |
+ dev-libs/openssl:0= |
76 |
+ !nftables? ( |
77 |
+ >=net-firewall/iptables-1.4.6:0=[ipv6?] |
78 |
+ net-libs/libnfnetlink:= |
79 |
+ net-libs/libmnl:= |
80 |
+ ) |
81 |
+ nftables? ( |
82 |
+ net-firewall/nftables |
83 |
+ net-libs/libnftnl:= |
84 |
+ net-libs/libmnl:= |
85 |
+ )" |
86 |
+DEPEND="${RDEPEND}" |
87 |
+BDEPEND=" |
88 |
+ sys-apps/lsb-release |
89 |
+ verify-sig? ( app-crypt/openpgp-keys-miniupnp )" |
90 |
+ |
91 |
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/miniupnp.asc |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ local PATCHES=( |
95 |
+ "${FILESDIR}"/${P}-testgetifaddr.patch |
96 |
+ ) |
97 |
+ |
98 |
+ default |
99 |
+ |
100 |
+ # fails without a default route |
101 |
+ sed -i -e 's:EXTIF=.*:EXTIF=lo:' testgetifaddr.sh || die |
102 |
+} |
103 |
+ |
104 |
+src_configure() { |
105 |
+ local opts=( |
106 |
+ --vendorcfg |
107 |
+ $(usex igd2 '--igd2' '') |
108 |
+ $(usex ipv6 '--ipv6' '') |
109 |
+ $(usex leasefile '--leasefile' '') |
110 |
+ $(usex portinuse '--portinuse' '') |
111 |
+ $(usex pcp-peer '--pcp-peer' '') |
112 |
+ $(usex strict '--strict' '') |
113 |
+ --firewall=$(usex nftables nftables iptables) |
114 |
+ ) |
115 |
+ |
116 |
+ # custom script |
117 |
+ ./configure "${opts[@]}" || die |
118 |
+ # prevent gzipping manpage |
119 |
+ sed -i -e '/gzip/d' Makefile || die |
120 |
+} |
121 |
+ |
122 |
+src_compile() { |
123 |
+ # By default, it builds a bunch of unittests that are missing wrapper |
124 |
+ # scripts in the tarball |
125 |
+ emake CC="$(tc-getCC)" STRIP=true miniupnpd |
126 |
+} |
127 |
+ |
128 |
+src_test() { |
129 |
+ emake CC="$(tc-getCC)" check |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ emake PREFIX="${ED}" STRIP=true install |
134 |
+ |
135 |
+ local confd_seds=() |
136 |
+ if use nftables; then |
137 |
+ confd_seds+=( -e 's/^iptables_scripts=/#&/' ) |
138 |
+ else |
139 |
+ confd_seds+=( -e 's/^nftables_scripts=/#&/' ) |
140 |
+ fi |
141 |
+ if ! use ipv6 || use nftables; then |
142 |
+ confd_seds+=( -e 's/^ip6tables_scripts=/#&/' ) |
143 |
+ fi |
144 |
+ |
145 |
+ newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN} |
146 |
+ newconfd - ${PN} < <(sed "${confd_seds[@]}" \ |
147 |
+ "${FILESDIR}"/${PN}-conf.d-r2 || die) |
148 |
+} |
149 |
+ |
150 |
+pkg_postinst() { |
151 |
+ elog "Please correct the external interface in the top of the two" |
152 |
+ elog "scripts in /etc/miniupnpd and edit the config file in there too" |
153 |
+} |