1 |
commit: 3dabba831c4f4ffe807b2731de0930f69facccec |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 21 10:00:55 2021 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 21 10:02:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dabba83 |
7 |
|
8 |
app-backup/bareos: revbump for improved systemd units |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
12 |
|
13 |
...eos-18.2.10.ebuild => bareos-18.2.10-r1.ebuild} | 16 ++++--------- |
14 |
...eos-19.2.10.ebuild => bareos-19.2.10-r1.ebuild} | 16 ++++--------- |
15 |
...areos-20.0.2.ebuild => bareos-20.0.2-r1.ebuild} | 16 ++++--------- |
16 |
app-backup/bareos/files/bareos-dir.service | 27 +++++++++++++++++++++ |
17 |
app-backup/bareos/files/bareos-fd.service | 26 ++++++++++++++++++++ |
18 |
app-backup/bareos/files/bareos-sd.service | 28 ++++++++++++++++++++++ |
19 |
6 files changed, 96 insertions(+), 33 deletions(-) |
20 |
|
21 |
diff --git a/app-backup/bareos/bareos-18.2.10.ebuild b/app-backup/bareos/bareos-18.2.10-r1.ebuild |
22 |
similarity index 96% |
23 |
rename from app-backup/bareos/bareos-18.2.10.ebuild |
24 |
rename to app-backup/bareos/bareos-18.2.10-r1.ebuild |
25 |
index a707bd84416..996c4c35ce1 100644 |
26 |
--- a/app-backup/bareos/bareos-18.2.10.ebuild |
27 |
+++ b/app-backup/bareos/bareos-18.2.10-r1.ebuild |
28 |
@@ -200,8 +200,8 @@ src_install() { |
29 |
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
30 |
rm -f "${D}"/usr/sbin/bareos |
31 |
|
32 |
- # remove upstream init scripts |
33 |
- rm -f "${D}"/etc/init.d/bareos-* |
34 |
+ # remove upstream init scripts and systemd units |
35 |
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service |
36 |
|
37 |
# rename statically linked apps |
38 |
if use clientonly && use static ; then |
39 |
@@ -247,9 +247,6 @@ src_install() { |
40 |
|
41 |
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
42 |
if use clientonly || ! use director; then |
43 |
- if use systemd; then |
44 |
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service |
45 |
- fi |
46 |
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
47 |
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
48 |
rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
49 |
@@ -265,9 +262,6 @@ src_install() { |
50 |
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
51 |
fi |
52 |
if use clientonly || ! use storage-daemon; then |
53 |
- if use systemd; then |
54 |
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service |
55 |
- fi |
56 |
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
57 |
rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
58 |
rm -vf "${D}"/usr/share/man/man8/bextract.8* |
59 |
@@ -331,10 +325,10 @@ src_install() { |
60 |
# install systemd unit files |
61 |
if use systemd; then |
62 |
if ! use clientonly; then |
63 |
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service |
64 |
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service |
65 |
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
66 |
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
67 |
fi |
68 |
- systemd_dounit core/platforms/systemd/bareos-fd.service |
69 |
+ systemd_dounit "${FILESDIR}"/bareos-fd.service |
70 |
fi |
71 |
|
72 |
# make sure the working directory exists |
73 |
|
74 |
diff --git a/app-backup/bareos/bareos-19.2.10.ebuild b/app-backup/bareos/bareos-19.2.10-r1.ebuild |
75 |
similarity index 95% |
76 |
rename from app-backup/bareos/bareos-19.2.10.ebuild |
77 |
rename to app-backup/bareos/bareos-19.2.10-r1.ebuild |
78 |
index ee87d3e36f9..a9e76afe101 100644 |
79 |
--- a/app-backup/bareos/bareos-19.2.10.ebuild |
80 |
+++ b/app-backup/bareos/bareos-19.2.10-r1.ebuild |
81 |
@@ -189,8 +189,8 @@ src_install() { |
82 |
# remove timelimit to fix #778557 |
83 |
rm -f "${D}"/usr/{,s}bin/timelimit |
84 |
|
85 |
- # remove upstream init scripts |
86 |
- rm -f "${D}"/etc/init.d/bareos-* |
87 |
+ # remove upstream init scripts and systemd units |
88 |
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service |
89 |
|
90 |
# rename statically linked apps |
91 |
if use clientonly && use static ; then |
92 |
@@ -236,9 +236,6 @@ src_install() { |
93 |
|
94 |
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
95 |
if use clientonly || ! use director; then |
96 |
- if use systemd; then |
97 |
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service |
98 |
- fi |
99 |
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
100 |
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
101 |
rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
102 |
@@ -254,9 +251,6 @@ src_install() { |
103 |
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
104 |
fi |
105 |
if use clientonly || ! use storage-daemon; then |
106 |
- if use systemd; then |
107 |
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service |
108 |
- fi |
109 |
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
110 |
rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
111 |
rm -vf "${D}"/usr/share/man/man8/bextract.8* |
112 |
@@ -320,10 +314,10 @@ src_install() { |
113 |
# install systemd unit files |
114 |
if use systemd; then |
115 |
if ! use clientonly; then |
116 |
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service |
117 |
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service |
118 |
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
119 |
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
120 |
fi |
121 |
- systemd_dounit core/platforms/systemd/bareos-fd.service |
122 |
+ systemd_dounit "${FILESDIR}"/bareos-fd.service |
123 |
fi |
124 |
|
125 |
# make sure the working directory exists |
126 |
|
127 |
diff --git a/app-backup/bareos/bareos-20.0.2.ebuild b/app-backup/bareos/bareos-20.0.2-r1.ebuild |
128 |
similarity index 96% |
129 |
rename from app-backup/bareos/bareos-20.0.2.ebuild |
130 |
rename to app-backup/bareos/bareos-20.0.2-r1.ebuild |
131 |
index 2b7f4265375..edf65d1c2d9 100644 |
132 |
--- a/app-backup/bareos/bareos-20.0.2.ebuild |
133 |
+++ b/app-backup/bareos/bareos-20.0.2-r1.ebuild |
134 |
@@ -191,8 +191,8 @@ src_install() { |
135 |
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql} |
136 |
rm -f "${D}"/usr/sbin/bareos |
137 |
|
138 |
- # remove upstream init scripts |
139 |
- rm -f "${D}"/etc/init.d/bareos-* |
140 |
+ # remove upstream init scripts and systemd units |
141 |
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service |
142 |
|
143 |
# get rid of py2 stuff if USE=-vmware |
144 |
if ! use vmware; then |
145 |
@@ -244,9 +244,6 @@ src_install() { |
146 |
|
147 |
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1* |
148 |
if use clientonly || ! use director; then |
149 |
- if use systemd; then |
150 |
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service |
151 |
- fi |
152 |
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8* |
153 |
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8* |
154 |
rm -vf "${D}"/usr/share/man/man1/bsmtp.1* |
155 |
@@ -262,9 +259,6 @@ src_install() { |
156 |
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup |
157 |
fi |
158 |
if use clientonly || ! use storage-daemon; then |
159 |
- if use systemd; then |
160 |
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service |
161 |
- fi |
162 |
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8* |
163 |
rm -vf "${D}"/usr/share/man/man8/bcopy.8* |
164 |
rm -vf "${D}"/usr/share/man/man8/bextract.8* |
165 |
@@ -328,10 +322,10 @@ src_install() { |
166 |
# install systemd unit files |
167 |
if use systemd; then |
168 |
if ! use clientonly; then |
169 |
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service |
170 |
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service |
171 |
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service |
172 |
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service |
173 |
fi |
174 |
- systemd_dounit core/platforms/systemd/bareos-fd.service |
175 |
+ systemd_dounit "${FILESDIR}"/bareos-fd.service |
176 |
fi |
177 |
|
178 |
# make sure the working directory exists |
179 |
|
180 |
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service |
181 |
new file mode 100644 |
182 |
index 00000000000..a342671d0d0 |
183 |
--- /dev/null |
184 |
+++ b/app-backup/bareos/files/bareos-dir.service |
185 |
@@ -0,0 +1,27 @@ |
186 |
+# Copyright 1999-2021 Gentoo Authors |
187 |
+# Distributed under the terms of the GNU General Public License v2 |
188 |
+# |
189 |
+# Bareos Director Daemon |
190 |
+# |
191 |
+[Unit] |
192 |
+Description=Bareos Director Daemon |
193 |
+Documentation=man:bareos-dir(8) |
194 |
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target |
195 |
+After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service |
196 |
+ConditionPathIsDirectory=/var/lib/bareos |
197 |
+ |
198 |
+[Service] |
199 |
+Type=forking |
200 |
+User=bareos |
201 |
+Group=bareos |
202 |
+WorkingDirectory=/var/lib/bareos |
203 |
+PIDFile=/run/bareos/bareos-dir.9101.pid |
204 |
+StandardError=journal |
205 |
+ExecStartPre=/usr/sbin/bareos-dir -t -f |
206 |
+ExecStart=/usr/sbin/bareos-dir |
207 |
+SuccessExitStatus=0 1 15 |
208 |
+#Restart=on-failure |
209 |
+ |
210 |
+[Install] |
211 |
+Alias=bareos-director.service |
212 |
+WantedBy=multi-user.target |
213 |
|
214 |
diff --git a/app-backup/bareos/files/bareos-fd.service b/app-backup/bareos/files/bareos-fd.service |
215 |
new file mode 100644 |
216 |
index 00000000000..e9b4b832afb |
217 |
--- /dev/null |
218 |
+++ b/app-backup/bareos/files/bareos-fd.service |
219 |
@@ -0,0 +1,26 @@ |
220 |
+# Copyright 1999-2021 Gentoo Authors |
221 |
+# Distributed under the terms of the GNU General Public License v2 |
222 |
+# |
223 |
+# Bareos File Daemon |
224 |
+# |
225 |
+[Unit] |
226 |
+Description=Bareos File Daemon |
227 |
+Documentation=man:bareos-fd(8) |
228 |
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target |
229 |
+After=nss-lookup.target network.target remote-fs.target time-sync.target |
230 |
+ |
231 |
+[Service] |
232 |
+Type=forking |
233 |
+User=root |
234 |
+Group=bareos |
235 |
+WorkingDirectory=/var/lib/bareos |
236 |
+PIDFile=/run/bareos/bareos-fd.9102.pid |
237 |
+StandardError=journal |
238 |
+ExecStartPre=/usr/sbin/bareos-fd -f -t |
239 |
+ExecStart=/usr/sbin/bareos-fd |
240 |
+SuccessExitStatus=0 15 |
241 |
+#Restart=on-failure |
242 |
+ |
243 |
+[Install] |
244 |
+Alias=bareos-filedaemon.service |
245 |
+WantedBy=multi-user.target |
246 |
|
247 |
diff --git a/app-backup/bareos/files/bareos-sd.service b/app-backup/bareos/files/bareos-sd.service |
248 |
new file mode 100644 |
249 |
index 00000000000..80d9edbc973 |
250 |
--- /dev/null |
251 |
+++ b/app-backup/bareos/files/bareos-sd.service |
252 |
@@ -0,0 +1,28 @@ |
253 |
+# Copyright 1999-2021 Gentoo Authors |
254 |
+# Distributed under the terms of the GNU General Public License v2 |
255 |
+# |
256 |
+# Bareos Storage Daemon |
257 |
+# |
258 |
+[Unit] |
259 |
+Description=Bareos Storage Daemon |
260 |
+Documentation=man:bareos-sd(8) |
261 |
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target |
262 |
+After=nss-lookup.target network.target remote-fs.target time-sync.target |
263 |
+ |
264 |
+[Service] |
265 |
+Type=forking |
266 |
+User=root |
267 |
+Group=bareos |
268 |
+WorkingDirectory=/var/lib/bareos |
269 |
+PIDFile=/run/bareos/bareos-sd.9103.pid |
270 |
+StandardError=journal |
271 |
+ExecStartPre=/usr/sbin/bareos-sd -t -f |
272 |
+ExecStart=/usr/sbin/bareos-sd |
273 |
+# enable this for scsicrypto-sd |
274 |
+# CapabilityBoundingSet=cap_sys_rawio+ep |
275 |
+SuccessExitStatus=0 15 |
276 |
+#Restart=on-failure |
277 |
+ |
278 |
+[Install] |
279 |
+Alias=bareos-storage.service |
280 |
+WantedBy=multi-user.target |