1 |
commit: f3cafd190f4b4632ccac19b6fde6e8f948eeb34e |
2 |
Author: Quentin Retornaz <caseoffr <AT> outlook <DOT> com> |
3 |
AuthorDate: Wed Apr 25 19:56:18 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 26 00:26:38 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3cafd19 |
7 |
|
8 |
net-dns/getdns: add systemd unit files |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
net-dns/getdns/files/stubby.systemd | 12 ++++++++++++ |
13 |
net-dns/getdns/files/stubby.tmpfilesd | 2 ++ |
14 |
.../getdns/{getdns-1.4.1.ebuild => getdns-1.4.1-r1.ebuild} | 4 +++- |
15 |
3 files changed, 17 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/net-dns/getdns/files/stubby.systemd b/net-dns/getdns/files/stubby.systemd |
18 |
new file mode 100644 |
19 |
index 00000000000..b85b8e90b03 |
20 |
--- /dev/null |
21 |
+++ b/net-dns/getdns/files/stubby.systemd |
22 |
@@ -0,0 +1,12 @@ |
23 |
+[Unit] |
24 |
+Description=stubby DNS resolver |
25 |
+ |
26 |
+[Service] |
27 |
+WorkingDirectory=/run/stubby |
28 |
+ExecStart=/usr/bin/stubby |
29 |
+AmbientCapabilities=CAP_NET_BIND_SERVICE |
30 |
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
31 |
+User=stubby |
32 |
+ |
33 |
+[Install] |
34 |
+WantedBy=multi-user.target |
35 |
|
36 |
diff --git a/net-dns/getdns/files/stubby.tmpfilesd b/net-dns/getdns/files/stubby.tmpfilesd |
37 |
new file mode 100644 |
38 |
index 00000000000..bf70492743a |
39 |
--- /dev/null |
40 |
+++ b/net-dns/getdns/files/stubby.tmpfilesd |
41 |
@@ -0,0 +1,2 @@ |
42 |
+# tmpfiles.d (5) for use with stubby.service |
43 |
+d /run/stubby 0750 root stubby - - |
44 |
|
45 |
diff --git a/net-dns/getdns/getdns-1.4.1.ebuild b/net-dns/getdns/getdns-1.4.1-r1.ebuild |
46 |
similarity index 91% |
47 |
rename from net-dns/getdns/getdns-1.4.1.ebuild |
48 |
rename to net-dns/getdns/getdns-1.4.1-r1.ebuild |
49 |
index 699abdbc82f..db4a0afb74a 100644 |
50 |
--- a/net-dns/getdns/getdns-1.4.1.ebuild |
51 |
+++ b/net-dns/getdns/getdns-1.4.1-r1.ebuild |
52 |
@@ -3,7 +3,7 @@ |
53 |
|
54 |
EAPI=6 |
55 |
|
56 |
-inherit user fcaps |
57 |
+inherit user fcaps systemd |
58 |
|
59 |
DESCRIPTION="Modern asynchronous DNS API" |
60 |
HOMEPAGE="https://getdnsapi.net/" |
61 |
@@ -52,6 +52,8 @@ src_install() { |
62 |
if use stubby; then |
63 |
newinitd "${FILESDIR}"/stubby.initd stubby |
64 |
newconfd "${FILESDIR}"/stubby.confd stubby |
65 |
+ systemd_newunit "${FILESDIR}"/stubby.systemd stubby.service |
66 |
+ systemd_newtmpfilesd "${FILESDIR}"/stubby.tmpfilesd stubby.conf |
67 |
fi |
68 |
} |