1 |
commit: c86a486ae4e9a65297ef3d6025873a014a8a4c20 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 18:53:40 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 18:58:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c86a486a |
7 |
|
8 |
net-vpn/openvpn: update live ebuild |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
.../openvpn-2.5.2-detect-python-rst2man.patch | 14 ++++ |
14 |
net-vpn/openvpn/openvpn-2.5.2.ebuild | 19 ++++- |
15 |
net-vpn/openvpn/openvpn-9999.ebuild | 94 ++++++++++++++-------- |
16 |
3 files changed, 89 insertions(+), 38 deletions(-) |
17 |
|
18 |
diff --git a/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch b/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..d2060bbff4b |
21 |
--- /dev/null |
22 |
+++ b/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch |
23 |
@@ -0,0 +1,14 @@ |
24 |
+--- a/configure.ac |
25 |
++++ b/configure.ac |
26 |
+@@ -376,8 +376,8 @@ AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"], [Path |
27 |
+ # |
28 |
+ AC_ARG_VAR([RST2MAN], [path to rst2man utility]) |
29 |
+ AC_ARG_VAR([RST2HTML], [path to rst2html utility]) |
30 |
+-AC_CHECK_PROGS([RST2MAN], [rst2man]) |
31 |
+-AC_CHECK_PROGS([RST2HTML], [rst2html]) |
32 |
++AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py]) |
33 |
++AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py]) |
34 |
+ AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"]) |
35 |
+ |
36 |
+ # Set -std=c99 unless user already specified a -std= |
37 |
+ |
38 |
|
39 |
diff --git a/net-vpn/openvpn/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild |
40 |
index 83cf65e13cb..20cd58c60ee 100644 |
41 |
--- a/net-vpn/openvpn/openvpn-2.5.2.ebuild |
42 |
+++ b/net-vpn/openvpn/openvpn-2.5.2.ebuild |
43 |
@@ -6,12 +6,20 @@ EAPI=7 |
44 |
inherit autotools flag-o-matic systemd linux-info |
45 |
|
46 |
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" |
47 |
-SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" |
48 |
HOMEPAGE="https://openvpn.net/" |
49 |
|
50 |
+if [[ ${PV} == "9999" ]]; then |
51 |
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" |
52 |
+ EGIT_SUBMODULES=(-cmocka) |
53 |
+ |
54 |
+ inherit git-r3 |
55 |
+else |
56 |
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" |
57 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
58 |
+fi |
59 |
+ |
60 |
LICENSE="GPL-2" |
61 |
SLOT="0" |
62 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
63 |
|
64 |
IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" |
65 |
IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" |
66 |
@@ -48,8 +56,13 @@ RDEPEND="${CDEPEND} |
67 |
selinux? ( sec-policy/selinux-openvpn ) |
68 |
" |
69 |
|
70 |
+if [[ ${PV} = "9999" ]]; then |
71 |
+ BDEPEND+=" dev-python/docutils" |
72 |
+fi |
73 |
+ |
74 |
PATCHES=( |
75 |
- "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch" |
76 |
+ "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch |
77 |
+ "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch |
78 |
) |
79 |
|
80 |
pkg_setup() { |
81 |
|
82 |
diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild |
83 |
index dd958ea3cc0..20cd58c60ee 100644 |
84 |
--- a/net-vpn/openvpn/openvpn-9999.ebuild |
85 |
+++ b/net-vpn/openvpn/openvpn-9999.ebuild |
86 |
@@ -3,22 +3,31 @@ |
87 |
|
88 |
EAPI=7 |
89 |
|
90 |
-inherit autotools flag-o-matic systemd linux-info git-r3 |
91 |
+inherit autotools flag-o-matic systemd linux-info |
92 |
|
93 |
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" |
94 |
-EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" |
95 |
-EGIT_SUBMODULES=(-cmocka) |
96 |
HOMEPAGE="https://openvpn.net/" |
97 |
|
98 |
+if [[ ${PV} == "9999" ]]; then |
99 |
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" |
100 |
+ EGIT_SUBMODULES=(-cmocka) |
101 |
+ |
102 |
+ inherit git-r3 |
103 |
+else |
104 |
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" |
105 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
106 |
+fi |
107 |
+ |
108 |
LICENSE="GPL-2" |
109 |
SLOT="0" |
110 |
-KEYWORDS="" |
111 |
|
112 |
-IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls pam" |
113 |
-IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" |
114 |
+IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" |
115 |
+IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" |
116 |
|
117 |
RESTRICT="!test? ( test )" |
118 |
-REQUIRED_USE="pkcs11? ( ssl ) |
119 |
+REQUIRED_USE=" |
120 |
+ ^^ ( openssl mbedtls ) |
121 |
+ pkcs11? ( !mbedtls ) |
122 |
!plugins? ( !pam !down-root ) |
123 |
inotify? ( plugins ) |
124 |
" |
125 |
@@ -26,18 +35,18 @@ REQUIRED_USE="pkcs11? ( ssl ) |
126 |
CDEPEND=" |
127 |
kernel_linux? ( |
128 |
iproute2? ( sys-apps/iproute2[-minimal] ) |
129 |
- !iproute2? ( >=sys-apps/net-tools-1.60_p20160215155418 ) |
130 |
- ) |
131 |
- pam? ( sys-libs/pam ) |
132 |
- ssl? ( |
133 |
- !mbedtls? ( >=dev-libs/openssl-0.9.8:0= ) |
134 |
- mbedtls? ( net-libs/mbedtls:= ) |
135 |
) |
136 |
lz4? ( app-arch/lz4 ) |
137 |
lzo? ( >=dev-libs/lzo-1.07 ) |
138 |
+ mbedtls? ( net-libs/mbedtls:= ) |
139 |
+ openssl? ( >=dev-libs/openssl-0.9.8:0= ) |
140 |
+ pam? ( sys-libs/pam ) |
141 |
pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) |
142 |
systemd? ( sys-apps/systemd ) |
143 |
" |
144 |
+ |
145 |
+BDEPEND="virtual/pkgconfig" |
146 |
+ |
147 |
DEPEND="${CDEPEND} |
148 |
test? ( dev-util/cmocka ) |
149 |
" |
150 |
@@ -47,9 +56,17 @@ RDEPEND="${CDEPEND} |
151 |
selinux? ( sec-policy/selinux-openvpn ) |
152 |
" |
153 |
|
154 |
-CONFIG_CHECK="~TUN" |
155 |
+if [[ ${PV} = "9999" ]]; then |
156 |
+ BDEPEND+=" dev-python/docutils" |
157 |
+fi |
158 |
+ |
159 |
+PATCHES=( |
160 |
+ "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch |
161 |
+ "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch |
162 |
+) |
163 |
|
164 |
pkg_setup() { |
165 |
+ local CONFIG_CHECK="~TUN" |
166 |
linux-info_pkg_setup |
167 |
} |
168 |
|
169 |
@@ -59,28 +76,37 @@ src_prepare() { |
170 |
} |
171 |
|
172 |
src_configure() { |
173 |
- SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ |
174 |
- TMPFILES_DIR="/usr/lib/tmpfiles.d" \ |
175 |
- econf \ |
176 |
- --with-plugindir="${EPREFIX}/usr/$(get_libdir)/${PN}" \ |
177 |
- $(use_enable inotify async-push) \ |
178 |
- $(use_enable ssl crypto) \ |
179 |
- $(use_with ssl crypto-library $(usex mbedtls mbedtls openssl)) \ |
180 |
- $(use_enable lz4) \ |
181 |
- $(use_enable lzo) \ |
182 |
- $(use_enable pkcs11) \ |
183 |
- $(use_enable plugins) \ |
184 |
- $(use_enable iproute2) \ |
185 |
- $(use_enable pam plugin-auth-pam) \ |
186 |
- $(use_enable down-root plugin-down-root) \ |
187 |
+ local -a myeconfargs |
188 |
+ |
189 |
+ if ! use mbedtls; then |
190 |
+ myeconfargs+=( |
191 |
+ $(use_enable pkcs11) |
192 |
+ ) |
193 |
+ fi |
194 |
+ myeconfargs+=( |
195 |
+ $(use_enable inotify async-push) |
196 |
+ --with-crypto-library=$(usex mbedtls mbedtls openssl) |
197 |
+ $(use_enable lz4) |
198 |
+ $(use_enable lzo) |
199 |
+ $(use_enable plugins) |
200 |
+ $(use_enable iproute2) |
201 |
+ $(use_enable pam plugin-auth-pam) |
202 |
+ $(use_enable down-root plugin-down-root) |
203 |
$(use_enable systemd) |
204 |
+ ) |
205 |
+ SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ |
206 |
+ TMPFILES_DIR="/usr/lib/tmpfiles.d" \ |
207 |
+ IPROUTE=$(usex iproute2 '/bin/ip' '') \ |
208 |
+ econf "${myeconfargs[@]}" |
209 |
} |
210 |
|
211 |
src_test() { |
212 |
+ local -x RUN_SUDO=false |
213 |
+ |
214 |
make check || die "top-level tests failed" |
215 |
- pushd tests/unit_tests > /dev/null || die |
216 |
+ pushd tests/unit_tests &>/dev/null || die |
217 |
make check || die "unit tests failed" |
218 |
- popd > /dev/null || die |
219 |
+ popd &>/dev/null || die |
220 |
} |
221 |
|
222 |
src_install() { |
223 |
@@ -107,6 +133,9 @@ src_install() { |
224 |
docinto /usr/share/doc/${PF}/examples |
225 |
dodoc -r sample contrib |
226 |
fi |
227 |
+ |
228 |
+ # https://bugs.gentoo.org/755680#c3 |
229 |
+ doman doc/openvpn.8 |
230 |
} |
231 |
|
232 |
pkg_postinst() { |
233 |
@@ -157,9 +186,4 @@ pkg_postinst() { |
234 |
einfo "" |
235 |
einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins" |
236 |
fi |
237 |
- |
238 |
- ewarn "" |
239 |
- ewarn "You are using a live ebuild building from the sources of openvpn" |
240 |
- ewarn "repository from http://openvpn.git.sourceforge.net. For reporting" |
241 |
- ewarn "bugs please contact: openvpn-devel@×××××××××××××××××.net." |
242 |
} |