summaryrefslogtreecommitdiff
path: root/app-backup/bareos/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-10 21:21:18 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-10 21:21:18 +0000
commitb118032096b3380de251b5de2466f5198fd2930a (patch)
tree992376912dd2522e0078f8350735c14bd0b77149 /app-backup/bareos/files
parent177349fb1459039cc30cb8e3936af4117d038c16 (diff)
gentoo auto-resync : 10:12:2022 - 21:21:18
Diffstat (limited to 'app-backup/bareos/files')
-rw-r--r--app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch24
-rw-r--r--app-backup/bareos/files/bareos-dir-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-dir.initd34
-rw-r--r--app-backup/bareos/files/bareos-fd-21-r1.initd12
-rw-r--r--app-backup/bareos/files/bareos-fd.initd16
-rw-r--r--app-backup/bareos/files/bareos-sd-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-sd.initd34
7 files changed, 99 insertions, 53 deletions
diff --git a/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch b/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch
new file mode 100644
index 000000000000..9d3cf8092e1c
--- /dev/null
+++ b/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch
@@ -0,0 +1,24 @@
+diff -urw bareos-Release-20.0.2.orig/core/cmake/distname.sh bareos-Release-20.0.2/core/cmake/distname.sh
+--- bareos-Release-20.0.2.orig/core/cmake/distname.sh 2021-06-10 06:07:18.000000000 -0930
++++ bareos-Release-20.0.2/core/cmake/distname.sh 2021-08-15 17:07:37.168216517 -0930
+@@ -153,7 +153,7 @@
+ elif test -f /etc/gentoo-release
+ then
+ PLATFORM=gentoo
+- DISTVER=`awk '/version / { print $5 }' < /etc/gentoo-release`
++ DISTVER=`awk '/release / { print $5 }' < /etc/gentoo-release`
+ elif test -f /etc/debian_version
+ then
+ if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
+diff -urw bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt bareos-Release-20.0.2/core/platforms/CMakeLists.txt
+--- bareos-Release-20.0.2.orig/core/platforms/CMakeLists.txt 2021-06-10 06:07:18.000000000 -0930
++++ bareos-Release-20.0.2/core/platforms/CMakeLists.txt 2021-08-15 17:07:37.549226558 -0930
+@@ -30,6 +30,8 @@
+ message(STATUS "adding subdirectories debian and univention")
+ add_subdirectory(debian)
+ add_subdirectory(univention)
++ elseif(${PLATFORM} STREQUAL gentoo)
++ message(STATUS "PLATFORM: " ${PLATFORM})
+ elseif(${PLATFORM} STREQUAL hpux)
+ message(STATUS "PLATFORM: " ${PLATFORM})
+ elseif(${PLATFORM} STREQUAL archlinux)
diff --git a/app-backup/bareos/files/bareos-dir-21-r1.initd b/app-backup/bareos/files/bareos-dir-21-r1.initd
new file mode 100644
index 000000000000..1363833e8962
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir-21-r1.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ checkpath --directory --owner root:root --mode 00755 /run/bareos
+}
+
+command="/usr/sbin/bareos-dir"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-dir.9101.pid"
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd
index 462ff07843a2..a2986d133cc3 100644
--- a/app-backup/bareos/files/bareos-dir.initd
+++ b/app-backup/bareos/files/bareos-dir.initd
@@ -1,30 +1,24 @@
#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
use dns bareos-fd bareos-sd
}
-start() {
- ebegin "Starting bareos director"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
- -- ${DIR_OPTIONS}
- # harden pid file until #631598 is resolved
- ewaitfile 10 /run/bareos/bareos-dir.9101.pid
- chown root:bareos /run/bareos/bareos-dir.9101.pid
- eend $?
+start_pre() {
+ checkpath --directory --owner root:bareos --mode 01775 /run/bareos
+ if [[ -e /run/bareos/bareos-dir.9101.pid && $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then
+ eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)"
+ exit 1
+ fi
}
-stop() {
- ebegin "Stopping bareos director"
- # check pid file until #631598 is resolved
- if [[ $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then
- eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)"
- else
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid
- fi
- eend $?
+start_post() {
+ ewaitfile 10 /run/bareos/bareos-dir.9101.pid
+ checkpath --file --owner root:bareos /run/bareos/bareos-dir.9101.pid
}
+
+command="/usr/sbin/bareos-dir"
+command_args="${DIR_OPTIONS}"
+pidfile="/run/bareos/bareos-dir.9101.pid"
diff --git a/app-backup/bareos/files/bareos-fd-21-r1.initd b/app-backup/bareos/files/bareos-fd-21-r1.initd
new file mode 100644
index 000000000000..2b752085c764
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21-r1.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+command="/usr/sbin/bareos-fd"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-fd.9102.pid"
diff --git a/app-backup/bareos/files/bareos-fd.initd b/app-backup/bareos/files/bareos-fd.initd
index e65e6c80f32b..31d9342c1f0e 100644
--- a/app-backup/bareos/files/bareos-fd.initd
+++ b/app-backup/bareos/files/bareos-fd.initd
@@ -6,16 +6,6 @@ depend() {
use dns
}
-start() {
- ebegin "Starting bareos file daemon"
- checkpath -d -m 0750 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
- -- ${FD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos file daemon"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.*.pid
- eend $?
-}
+command="/usr/sbin/bareos-fd"
+command_args="${FD_OPTIONS}"
+pidfile="/run/bareos/bareos-fd.9102.pid"
diff --git a/app-backup/bareos/files/bareos-sd-21-r1.initd b/app-backup/bareos/files/bareos-sd-21-r1.initd
new file mode 100644
index 000000000000..9eaed8025d0a
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21-r1.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ checkpath --directory --owner root:root --mode 00755 /run/bareos
+}
+
+command="/usr/sbin/bareos-sd"
+command_args="-f ${DIR_OPTIONS}"
+command_background="true"
+pidfile="/run/bareos/bareos-dir.9103.pid"
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
index 97b9ccdc92f1..a4a45343d137 100644
--- a/app-backup/bareos/files/bareos-sd.initd
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -1,30 +1,24 @@
#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
use dns
}
-start() {
- ebegin "Starting bareos storage daemon"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
- -- ${SD_OPTIONS}
- # harden pid file until #631598 is resolved
- ewaitfile 10 /run/bareos/bareos-sd.9103.pid
- chown root:bareos /run/bareos/bareos-sd.9103.pid
- eend $?
+start_pre() {
+ checkpath --directory --owner root:bareos --mode 01775 /run/bareos
+ if [[ -e /run/bareos/bareos-sd.9103.pid && $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then
+ eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)"
+ exit 1
+ fi
}
-stop() {
- ebegin "Stopping bareos storage daemon"
- # check pid file until #631598 is resolved
- if [[ $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then
- eerror "SECURITY ALERT: pid file is not root owned anymore?! (see #631598)"
- else
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.9103.pid
- fi
- eend $?
+start_post() {
+ ewaitfile 10 /run/bareos/bareos-sd.9103.pid
+ checkpath --file --owner root:bareos /run/bareos/bareos-sd.9103.pid
}
+
+command="/usr/sbin/bareos-sd"
+command_args="${SD_OPTIONS}"
+pidfile="/run/bareos/bareos-sd.9103.pid"