1 |
commit: 849af898011882c2ac7b50c80e2821e61e25c2fb |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 22 05:37:27 2019 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 22 05:37:27 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=849af898 |
7 |
|
8 |
net-vpn/libreswan: add 3.28 |
9 |
|
10 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
12 |
|
13 |
net-vpn/libreswan/Manifest | 1 + |
14 |
net-vpn/libreswan/libreswan-3.28.ebuild | 113 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 114 insertions(+) |
16 |
|
17 |
diff --git a/net-vpn/libreswan/Manifest b/net-vpn/libreswan/Manifest |
18 |
index 3a8dc89ba1f..ff909b43f58 100644 |
19 |
--- a/net-vpn/libreswan/Manifest |
20 |
+++ b/net-vpn/libreswan/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST libreswan-3.27.tar.gz 3720103 BLAKE2B 51ee792cd3fb8330a9cfee0b1a27e48c9a8c8fd3346e8c06fe0a911c813c400ef62d68b1d06bb849695aad5f4d5a496dc444b2543aa9ffbc59d373081c0b85e5 SHA512 b92ecfd08b9d19dc801032176eff3dd07f625223d4f0dd07ff10f639644573430a55f7aebfcc8b9d2424e194ca9d06b17ad5a13dad5dc6f659d19bc5d32520f5 |
23 |
+DIST libreswan-3.28.tar.gz 3842828 BLAKE2B 7e78f3c6d1d6a22a64f1316bb63366823ce763a3eb236e2cd64dc7f3fa9a84caff7a31cb65a6583521280e5ee84ac220c1770d230ba0b7098a1582613751c456 SHA512 aeb3ea723f2ca10098f2626172166cddea59b3bc084f0fefc823fd784d8986b12adc5a5b0965f2c7ecdfff5ac8029a922b8357debf79ff43605783d80e144983 |
24 |
|
25 |
diff --git a/net-vpn/libreswan/libreswan-3.28.ebuild b/net-vpn/libreswan/libreswan-3.28.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..184f4518824 |
28 |
--- /dev/null |
29 |
+++ b/net-vpn/libreswan/libreswan-3.28.ebuild |
30 |
@@ -0,0 +1,113 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit systemd toolchain-funcs |
37 |
+ |
38 |
+SRC_URI="https://download.libreswan.org/${P}.tar.gz" |
39 |
+KEYWORDS="~amd64 ~ppc ~x86" |
40 |
+ |
41 |
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan" |
42 |
+HOMEPAGE="https://libreswan.org/" |
43 |
+ |
44 |
+LICENSE="GPL-2 BSD-4 RSA DES" |
45 |
+SLOT="0" |
46 |
+IUSE="caps curl dnssec ldap pam seccomp selinux systemd test" |
47 |
+ |
48 |
+DEPEND=" |
49 |
+ dev-libs/gmp:0= |
50 |
+ dev-libs/libevent:0= |
51 |
+ dev-libs/nspr |
52 |
+ caps? ( sys-libs/libcap-ng ) |
53 |
+ curl? ( net-misc/curl ) |
54 |
+ dnssec? ( net-dns/unbound:= net-libs/ldns ) |
55 |
+ ldap? ( net-nds/openldap ) |
56 |
+ pam? ( sys-libs/pam ) |
57 |
+ seccomp? ( sys-libs/libseccomp ) |
58 |
+ selinux? ( sys-libs/libselinux ) |
59 |
+ systemd? ( sys-apps/systemd:0= ) |
60 |
+" |
61 |
+BDEPEND=" |
62 |
+ app-text/docbook-xml-dtd:4.1.2 |
63 |
+ app-text/xmlto |
64 |
+ dev-libs/nss |
65 |
+ sys-devel/bison |
66 |
+ sys-devel/flex |
67 |
+ virtual/pkgconfig |
68 |
+ test? ( dev-python/setproctitle ) |
69 |
+" |
70 |
+RDEPEND="${DEPEND} |
71 |
+ dev-libs/nss[utils(+)] |
72 |
+ sys-apps/iproute2 |
73 |
+ !net-misc/openswan |
74 |
+ !net-vpn/strongswan |
75 |
+ selinux? ( sec-policy/selinux-ipsec ) |
76 |
+" |
77 |
+ |
78 |
+usetf() { |
79 |
+ usex "$1" true false |
80 |
+} |
81 |
+ |
82 |
+src_prepare() { |
83 |
+ sed -i -e 's:/sbin/runscript:/sbin/openrc-run:' initsystems/openrc/ipsec.init.in || die |
84 |
+ sed -i -e '/^install/ s/postcheck//' -e '/^doinstall/ s/oldinitdcheck//' initsystems/systemd/Makefile || die |
85 |
+ default |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ tc-export AR CC |
90 |
+ export INC_USRLOCAL=/usr |
91 |
+ export INC_MANDIR=share/man |
92 |
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF} |
93 |
+ export FINALDOCDIR=/usr/share/doc/${PF}/html |
94 |
+ export INITSYSTEM=openrc |
95 |
+ export INC_RCDIRS= |
96 |
+ export INC_RCDEFAULT=/etc/init.d |
97 |
+ export USERCOMPILE= |
98 |
+ export USERLINK= |
99 |
+ export USE_DNSSEC=$(usetf dnssec) |
100 |
+ export USE_LABELED_IPSEC=$(usetf selinux) |
101 |
+ export USE_LIBCAP_NG=$(usetf caps) |
102 |
+ export USE_LIBCURL=$(usetf curl) |
103 |
+ export USE_LINUX_AUDIT=$(usetf selinux) |
104 |
+ export USE_LDAP=$(usetf ldap) |
105 |
+ export USE_SECCOMP=$(usetf seccomp) |
106 |
+ export USE_SYSTEMD_WATCHDOG=$(usetf systemd) |
107 |
+ export SD_WATCHDOGSEC=$(usex systemd 200 0) |
108 |
+ export USE_XAUTHPAM=$(usetf pam) |
109 |
+ export DEBUG_CFLAGS= |
110 |
+ export OPTIMIZE_CFLAGS= |
111 |
+ export WERROR_CFLAGS= |
112 |
+} |
113 |
+ |
114 |
+src_compile() { |
115 |
+ emake all |
116 |
+ emake -C initsystems INITSYSTEM=systemd SYSTEMUNITDIR="$(systemd_get_systemunitdir)" SYSTEMTMPFILESDIR="/usr/lib/tmpfiles.d" all |
117 |
+} |
118 |
+ |
119 |
+src_test() { |
120 |
+ : # integration tests only that require set of kvms to be set up |
121 |
+} |
122 |
+ |
123 |
+src_install() { |
124 |
+ default |
125 |
+ emake -C initsystems INITSYSTEM=systemd SYSTEMUNITDIR="$(systemd_get_systemunitdir)" SYSTEMTMPFILESDIR="/usr/lib/tmpfiles.d" DESTDIR="${D}" install |
126 |
+ |
127 |
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets |
128 |
+ fperms 0600 /etc/ipsec.secrets |
129 |
+ |
130 |
+ dodoc -r docs |
131 |
+ |
132 |
+ find "${D}" -type d -empty -delete || die |
133 |
+} |
134 |
+ |
135 |
+pkg_postinst() { |
136 |
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d |
137 |
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db && ! -f ${IPSEC_CONFDIR}/cert9.db ]] ; then |
138 |
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR} with empty password" |
139 |
+ certutil -N -d "${IPSEC_CONFDIR}" --empty-password |
140 |
+ eend $? |
141 |
+ einfo "To set a password: certutil -W -d sql:${IPSEC_CONFDIR}" |
142 |
+ fi |
143 |
+} |