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