summaryrefslogtreecommitdiff
path: root/net-vpn/libreswan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-13 04:04:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-13 04:04:07 +0100
commit7b5306e0d287565138e8b051e32f57e6af6ae0ed (patch)
tree7e232eacc1f02fc6abb1c416458b5a564d0e295f /net-vpn/libreswan
parent3980ecf15e6202ac2f2015045b549600e709b721 (diff)
gentoo auto-resync : 13:10:2024 - 04:04:06
Diffstat (limited to 'net-vpn/libreswan')
-rw-r--r--net-vpn/libreswan/Manifest2
-rw-r--r--net-vpn/libreswan/libreswan-5.1.ebuild135
2 files changed, 137 insertions, 0 deletions
diff --git a/net-vpn/libreswan/Manifest b/net-vpn/libreswan/Manifest
index 7a821fefda5d..f95e6aba1f13 100644
--- a/net-vpn/libreswan/Manifest
+++ b/net-vpn/libreswan/Manifest
@@ -1,6 +1,8 @@
AUX libreswan-4.2-ip-path.patch 679 BLAKE2B 1af9dab7911ce25dff6f31437ced5ba5291701ed39a9852ff541c8d6e5523eeb317a5b25d5385c68bb9d5aa239570e11ec9118631e45af710e855b7ab9224575 SHA512 8035c77c1f3c927ccfcc2b7dfa84d9e095aaaa0e3274933c52a9de0726c83318b214118033a353be7b99a57f3cacb3ff9a83e8584a385304b599c6ce6fecb17f
DIST libreswan-4.15.tar.gz 3728498 BLAKE2B f2fd0955c73fb7278f4b2dbce3c1fa483406502c12340746426c77faa39143252e9b5f0b2c0cb60e238a962789b22b1f5b33a5bf5a42e79bb7e513fb2f12855f SHA512 49a60688bb4a5241dbd791bdde0c71ae80cfb7383bb841ea0788a9d0237569d7ad79e59985c700526e3807817ddae77ebd57521897526fbb8fb93ffbea631efe
DIST libreswan-5.0.tar.gz 3957806 BLAKE2B c7ff493c332ac63d416651e9a85254bfe3c749dc812ff682b8aa99c35887cc6976d23fb5a5013196e0973681a2d7054167d06d29b33ca6d93809e35a130e4bb0 SHA512 b1c7cebe1ffc21aeaae76f2562764195d535ff5d51fb6ad570046678df19387df68f2d52586eb290844019cbdc17e6192773f9110531a26cf1583e2c016289c6
+DIST libreswan-5.1.tar.gz 4031106 BLAKE2B fa2e4b5ed93bfedd1bbbcc7b2fcd585178f02951aaf719bf5f600258a085e084ea15b60061d3f380e52062be57a5823952ff96297cf4990343413f395e1c9188 SHA512 9ee8b071be414737c61529420af22b789d8968e99e376250afe42e1a5890d864dc2697ecfeb33a6c50de38a361bddf125852a8eb86318e544fc2f162f8ff6522
EBUILD libreswan-4.15.ebuild 3586 BLAKE2B 959c608b98ee1b84d6159b14d42faa5c2afbff89e6065a1907425d7ee60c1cb17052c084bb22c2f9c51c1fdf4dfa7e2f82414c7b211ccac554d9a8f4d38eac2a SHA512 cd6f241e70e39f62382fc90d4a5308bb7a16e7d61f3e68d4c52bcf0844eec3608949bc2d6dd883515e913676497563ca70adf86fbbac6fa37bcdbe6147fdf571
EBUILD libreswan-5.0.ebuild 3585 BLAKE2B ca5b12930242adb893c2cd477bedbef3dce4c0f4d936ba46474b6ed0b7f4fe2578db2072698c1ae53c452a04cc6072d7d78a3e251075fecb3c0d811eb54878c7 SHA512 40c2b646becfe2841905dd7519442de622c8253090afea2916bc223a16b1b1123dd69878d19cff2214e435b5a698e698c6641c194a572002ed2bb2019d55bda5
+EBUILD libreswan-5.1.ebuild 3585 BLAKE2B ca5b12930242adb893c2cd477bedbef3dce4c0f4d936ba46474b6ed0b7f4fe2578db2072698c1ae53c452a04cc6072d7d78a3e251075fecb3c0d811eb54878c7 SHA512 40c2b646becfe2841905dd7519442de622c8253090afea2916bc223a16b1b1123dd69878d19cff2214e435b5a698e698c6641c194a572002ed2bb2019d55bda5
MISC metadata.xml 472 BLAKE2B 4e17159bafff8a30ddc9388ff6068458ef948b9854f78f7f03fd8b0fa78ee9b9e2bf21a2cead24381702c0513a39a375df77eb42bc74389069dc41f5c0522749 SHA512 1f27565366ef12eafe4a8aa548fba67ddee5b662ccba672c9d3cdb1463e1b944040ab11c455d8bb8459b911aa00cc4cff82dcd7e26404c6867c6eb4ec94402ff
diff --git a/net-vpn/libreswan/libreswan-5.1.ebuild b/net-vpn/libreswan/libreswan-5.1.ebuild
new file mode 100644
index 000000000000..c9e2f853b153
--- /dev/null
+++ b/net-vpn/libreswan/libreswan-5.1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd flag-o-matic toolchain-funcs tmpfiles
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="caps curl dnssec +ikev1 ldap networkmanager pam seccomp selinux systemd test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/gmp:0=
+ dev-libs/libevent:0=
+ dev-libs/nspr
+ >=dev-libs/nss-3.42
+ >=sys-kernel/linux-headers-4.19
+ virtual/libcrypt:=
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( >=net-dns/unbound-1.9.1-r1:= net-libs/ldns:= net-dns/dnssec-root )
+ ldap? ( net-nds/openldap:= )
+ pam? ( sys-libs/pam )
+ seccomp? ( sys-libs/libseccomp )
+ selinux? ( sys-libs/libselinux )
+ systemd? ( sys-apps/systemd:0= )
+"
+BDEPEND="
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( dev-python/setproctitle )
+"
+RDEPEND="${DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-vpn/strongswan
+ selinux? ( sec-policy/selinux-ipsec )
+"
+DEPEND+=" elibc_musl? ( sys-libs/queue-standalone )"
+
+usetf() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ sed -i -e 's:/sbin/runscript:/sbin/openrc-run:' initsystems/openrc/ipsec.init.in || die
+ sed -i -e '/^install/ s/postcheck//' -e '/^doinstall/ s/oldinitdcheck//' initsystems/systemd/Makefile || die
+ default
+}
+
+src_configure() {
+ tc-export AR CC
+
+ use elibc_musl && append-cflags -DGLIBC_KERN_FLIP_HEADERS
+
+ export PREFIX=/usr
+ export DEFAULT_DNSSEC_ROOTKEY_FILE=/etc/dnssec/icannbundle.pem
+ export EXAMPLE_IPSEC_SYSCONFDIR=/usr/share/doc/${PF}
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export INITSYSTEM=$(usex systemd systemd openrc)
+ export INITDDIRS=
+ export INITDDIR_DEFAULT=/etc/init.d
+ export USERCOMPILE=${CFLAGS}
+ export USERLINK=${LDFLAGS}
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_IKEV1=$(usetf ikev1)
+ export USE_LABELED_IPSEC=$(usetf selinux)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LINUX_AUDIT=$(usetf selinux)
+ export USE_LDAP=$(usetf ldap)
+ export USE_NM=$(usetf networkmanager)
+ export USE_SECCOMP=$(usetf seccomp)
+ export USE_SYSTEMD_WATCHDOG=$(usetf systemd)
+ export SD_WATCHDOGSEC=$(usex systemd 200 0)
+ export USE_AUTHPAM=$(usetf pam)
+ export DEBUG_CFLAGS=
+ export OPTIMIZE_CFLAGS=
+ export WERROR_CFLAGS=
+}
+
+src_compile() {
+ emake all
+ emake -C initsystems \
+ INITSYSTEM=systemd \
+ SYSTEMUNITDIR="$(systemd_get_systemunitdir)" \
+ SYSTEMTMPFILESDIR="/usr/lib/tmpfiles.d" \
+ all
+}
+
+src_test() {
+ : # integration tests only that require set of kvms to be set up
+}
+
+src_install() {
+ default
+ emake -C initsystems \
+ INITSYSTEM=systemd \
+ SYSTEMUNITDIR="$(systemd_get_systemunitdir)" \
+ SYSTEMTMPFILESDIR="/usr/lib/tmpfiles.d" \
+ DESTDIR="${D}" \
+ install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ keepdir /var/lib/ipsec/nss
+ fperms 0700 /var/lib/ipsec/nss
+
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ tmpfiles_process libreswan.conf
+
+ local IPSEC_CONFDIR=${ROOT}/var/lib/ipsec/nss
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db && ! -f ${IPSEC_CONFDIR}/cert9.db ]] ; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR} with empty password"
+ certutil -N -d "${IPSEC_CONFDIR}" --empty-password
+ eend $?
+ einfo "To set a password: certutil -W -d sql:${IPSEC_CONFDIR}"
+ fi
+}