summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-04-30 20:53:40 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-04-30 20:58:35 +0200
commitc86a486ae4e9a65297ef3d6025873a014a8a4c20 (patch)
treeecd7a7be04a8913c62a4b670efd58150293915c9 /net-vpn/openvpn
parentnet-vpn/openvpn: don't call sudo during test phase (diff)
downloadgentoo-c86a486ae4e9a65297ef3d6025873a014a8a4c20.tar.gz
gentoo-c86a486ae4e9a65297ef3d6025873a014a8a4c20.tar.bz2
gentoo-c86a486ae4e9a65297ef3d6025873a014a8a4c20.zip
net-vpn/openvpn: update live ebuild
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r--net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch14
-rw-r--r--net-vpn/openvpn/openvpn-2.5.2.ebuild19
-rw-r--r--net-vpn/openvpn/openvpn-9999.ebuild94
3 files changed, 89 insertions, 38 deletions
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
new file mode 100644
index 000000000000..d2060bbff4b1
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -376,8 +376,8 @@ AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"], [Path
+ #
+ AC_ARG_VAR([RST2MAN], [path to rst2man utility])
+ AC_ARG_VAR([RST2HTML], [path to rst2html utility])
+-AC_CHECK_PROGS([RST2MAN], [rst2man])
+-AC_CHECK_PROGS([RST2HTML], [rst2html])
++AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py])
++AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py])
+ AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"])
+
+ # Set -std=c99 unless user already specified a -std=
+
diff --git a/net-vpn/openvpn/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild
index 83cf65e13cb1..20cd58c60ee4 100644
--- a/net-vpn/openvpn/openvpn-2.5.2.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.2.ebuild
@@ -6,12 +6,20 @@ EAPI=7
inherit autotools flag-o-matic systemd linux-info
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
-SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz"
HOMEPAGE="https://openvpn.net/"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+ EGIT_SUBMODULES=(-cmocka)
+
+ inherit git-r3
+else
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD"
@@ -48,8 +56,13 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
"
+if [[ ${PV} = "9999" ]]; then
+ BDEPEND+=" dev-python/docutils"
+fi
+
PATCHES=(
- "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+ "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch
+ "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch
)
pkg_setup() {
diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild
index dd958ea3cc04..20cd58c60ee4 100644
--- a/net-vpn/openvpn/openvpn-9999.ebuild
+++ b/net-vpn/openvpn/openvpn-9999.ebuild
@@ -3,22 +3,31 @@
EAPI=7
-inherit autotools flag-o-matic systemd linux-info git-r3
+inherit autotools flag-o-matic systemd linux-info
DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
-EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
-EGIT_SUBMODULES=(-cmocka)
HOMEPAGE="https://openvpn.net/"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+ EGIT_SUBMODULES=(-cmocka)
+
+ inherit git-r3
+else
+ SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS=""
-IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls pam"
-IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD"
+IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
+IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD"
RESTRICT="!test? ( test )"
-REQUIRED_USE="pkcs11? ( ssl )
+REQUIRED_USE="
+ ^^ ( openssl mbedtls )
+ pkcs11? ( !mbedtls )
!plugins? ( !pam !down-root )
inotify? ( plugins )
"
@@ -26,18 +35,18 @@ REQUIRED_USE="pkcs11? ( ssl )
CDEPEND="
kernel_linux? (
iproute2? ( sys-apps/iproute2[-minimal] )
- !iproute2? ( >=sys-apps/net-tools-1.60_p20160215155418 )
- )
- pam? ( sys-libs/pam )
- ssl? (
- !mbedtls? ( >=dev-libs/openssl-0.9.8:0= )
- mbedtls? ( net-libs/mbedtls:= )
)
lz4? ( app-arch/lz4 )
lzo? ( >=dev-libs/lzo-1.07 )
+ mbedtls? ( net-libs/mbedtls:= )
+ openssl? ( >=dev-libs/openssl-0.9.8:0= )
+ pam? ( sys-libs/pam )
pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
systemd? ( sys-apps/systemd )
"
+
+BDEPEND="virtual/pkgconfig"
+
DEPEND="${CDEPEND}
test? ( dev-util/cmocka )
"
@@ -47,9 +56,17 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
"
-CONFIG_CHECK="~TUN"
+if [[ ${PV} = "9999" ]]; then
+ BDEPEND+=" dev-python/docutils"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch
+ "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch
+)
pkg_setup() {
+ local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
}
@@ -59,28 +76,37 @@ src_prepare() {
}
src_configure() {
- SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
- TMPFILES_DIR="/usr/lib/tmpfiles.d" \
- econf \
- --with-plugindir="${EPREFIX}/usr/$(get_libdir)/${PN}" \
- $(use_enable inotify async-push) \
- $(use_enable ssl crypto) \
- $(use_with ssl crypto-library $(usex mbedtls mbedtls openssl)) \
- $(use_enable lz4) \
- $(use_enable lzo) \
- $(use_enable pkcs11) \
- $(use_enable plugins) \
- $(use_enable iproute2) \
- $(use_enable pam plugin-auth-pam) \
- $(use_enable down-root plugin-down-root) \
+ local -a myeconfargs
+
+ if ! use mbedtls; then
+ myeconfargs+=(
+ $(use_enable pkcs11)
+ )
+ fi
+ myeconfargs+=(
+ $(use_enable inotify async-push)
+ --with-crypto-library=$(usex mbedtls mbedtls openssl)
+ $(use_enable lz4)
+ $(use_enable lzo)
+ $(use_enable plugins)
+ $(use_enable iproute2)
+ $(use_enable pam plugin-auth-pam)
+ $(use_enable down-root plugin-down-root)
$(use_enable systemd)
+ )
+ SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
+ TMPFILES_DIR="/usr/lib/tmpfiles.d" \
+ IPROUTE=$(usex iproute2 '/bin/ip' '') \
+ econf "${myeconfargs[@]}"
}
src_test() {
+ local -x RUN_SUDO=false
+
make check || die "top-level tests failed"
- pushd tests/unit_tests > /dev/null || die
+ pushd tests/unit_tests &>/dev/null || die
make check || die "unit tests failed"
- popd > /dev/null || die
+ popd &>/dev/null || die
}
src_install() {
@@ -107,6 +133,9 @@ src_install() {
docinto /usr/share/doc/${PF}/examples
dodoc -r sample contrib
fi
+
+ # https://bugs.gentoo.org/755680#c3
+ doman doc/openvpn.8
}
pkg_postinst() {
@@ -157,9 +186,4 @@ pkg_postinst() {
einfo ""
einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins"
fi
-
- ewarn ""
- ewarn "You are using a live ebuild building from the sources of openvpn"
- ewarn "repository from http://openvpn.git.sourceforge.net. For reporting"
- ewarn "bugs please contact: openvpn-devel@lists.sourceforge.net."
}