diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-21 23:14:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-21 23:14:26 +0100 |
commit | 7c59acba5699c9c58090a7a738669669a7307023 (patch) | |
tree | d51d27d020895a6b7a3298d9d1b9846c1fcb59a0 /app-backup/bareos/files | |
parent | e2db47eaae00ec33f8971db44b68645c5d3b9590 (diff) |
gentoo resync : 21.08.2021
Diffstat (limited to 'app-backup/bareos/files')
-rw-r--r-- | app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch | 24 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-dir.confd-16 | 17 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-dir.initd | 2 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-dir.service | 34 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-fd.confd-16 | 7 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-fd.initd | 2 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-fd.service | 32 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.confd-16 | 10 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.initd | 2 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.service | 34 | ||||
-rw-r--r-- | app-backup/bareos/files/tmpfiles.d-bareos.conf | 2 |
11 files changed, 100 insertions, 66 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.confd-16 b/app-backup/bareos/files/bareos-dir.confd-16 deleted file mode 100644 index a11eba90a755..000000000000 --- a/app-backup/bareos/files/bareos-dir.confd-16 +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Config file for /etc/init.d/bareos-dir - -# Bareos can use more than one catalog database and each one can -# be of any supported type. -# If a database server where you store a bareos catalog -# is on a different machine, you might want to remove the corresponding -# type from the rc_need variable. -rc_need="%databasetypes%" - -# Options for the director daemon. -# The director can be run as a non-root user, however -# please ensure that this user has proper permissions to -# access your backup devices. -DIR_OPTIONS="-u root -g bareos" diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd index 826d27a829c9..9f17f212e4a4 100644 --- a/app-backup/bareos/files/bareos-dir.initd +++ b/app-backup/bareos/files/bareos-dir.initd @@ -8,7 +8,7 @@ depend() { start() { ebegin "Starting bareos director" - checkpath -d -m 0750 -o bareos:bareos /run/bareos + checkpath -d -m 0750 -o root:bareos /run/bareos start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \ -- ${DIR_OPTIONS} eend $? diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service index 440d3c3be98d..a342671d0d00 100644 --- a/app-backup/bareos/files/bareos-dir.service +++ b/app-backup/bareos/files/bareos-dir.service @@ -1,13 +1,27 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Bareos Director Daemon +# [Unit] - Description=Bareos Director - After=syslog.target network.target - Requires=bareos-sd.service bareos-fd.service - -[Install] - WantedBy=multi-user.target +Description=Bareos Director Daemon +Documentation=man:bareos-dir(8) +Requires=nss-lookup.target network.target remote-fs.target time-sync.target +After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service +ConditionPathIsDirectory=/var/lib/bareos [Service] - Type=forking - User=root - ExecStartPre=-/bin/mkdir /run/bareos - ExecStart=/usr/sbin/bareos-dir +Type=forking +User=bareos +Group=bareos +WorkingDirectory=/var/lib/bareos +PIDFile=/run/bareos/bareos-dir.9101.pid +StandardError=journal +ExecStartPre=/usr/sbin/bareos-dir -t -f +ExecStart=/usr/sbin/bareos-dir +SuccessExitStatus=0 1 15 +#Restart=on-failure + +[Install] +Alias=bareos-director.service +WantedBy=multi-user.target diff --git a/app-backup/bareos/files/bareos-fd.confd-16 b/app-backup/bareos/files/bareos-fd.confd-16 deleted file mode 100644 index e3b8a1f576fd..000000000000 --- a/app-backup/bareos/files/bareos-fd.confd-16 +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Config file for /etc/init.d/bareos-fd - -# Options for the file daemon. -FD_OPTIONS="-u root -g bareos" diff --git a/app-backup/bareos/files/bareos-fd.initd b/app-backup/bareos/files/bareos-fd.initd index e272daa88ecd..e65e6c80f32b 100644 --- a/app-backup/bareos/files/bareos-fd.initd +++ b/app-backup/bareos/files/bareos-fd.initd @@ -8,7 +8,7 @@ depend() { start() { ebegin "Starting bareos file daemon" - checkpath -d -m 0750 /run/bareos + checkpath -d -m 0750 -o root:bareos /run/bareos start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \ -- ${FD_OPTIONS} eend $? diff --git a/app-backup/bareos/files/bareos-fd.service b/app-backup/bareos/files/bareos-fd.service index 103286094250..e9b4b832afb1 100644 --- a/app-backup/bareos/files/bareos-fd.service +++ b/app-backup/bareos/files/bareos-fd.service @@ -1,12 +1,26 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Bareos File Daemon +# [Unit] - Description=Bareos File Daemon - After=syslog.target network.target - -[Install] - WantedBy=multi-user.target +Description=Bareos File Daemon +Documentation=man:bareos-fd(8) +Requires=nss-lookup.target network.target remote-fs.target time-sync.target +After=nss-lookup.target network.target remote-fs.target time-sync.target [Service] - Type=forking - User=root - ExecStartPre=-/bin/mkdir /run/bareos - ExecStart=/usr/sbin/bareos-fd +Type=forking +User=root +Group=bareos +WorkingDirectory=/var/lib/bareos +PIDFile=/run/bareos/bareos-fd.9102.pid +StandardError=journal +ExecStartPre=/usr/sbin/bareos-fd -f -t +ExecStart=/usr/sbin/bareos-fd +SuccessExitStatus=0 15 +#Restart=on-failure + +[Install] +Alias=bareos-filedaemon.service +WantedBy=multi-user.target diff --git a/app-backup/bareos/files/bareos-sd.confd-16 b/app-backup/bareos/files/bareos-sd.confd-16 deleted file mode 100644 index 5d377b978dd5..000000000000 --- a/app-backup/bareos/files/bareos-sd.confd-16 +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Config file for /etc/init.d/bareos-sd - -# Options for the storage daemon. -# The storage daemon can be run as a non-root user, however -# please ensure that this user has proper permissions to -# access your backup devices. -SD_OPTIONS="-u root -g bareos" diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd index f20be4ecf56e..4f7fbcb52bf2 100644 --- a/app-backup/bareos/files/bareos-sd.initd +++ b/app-backup/bareos/files/bareos-sd.initd @@ -8,7 +8,7 @@ depend() { start() { ebegin "Starting bareos storage daemon" - checkpath -d -m 0750 -o bareos:bareos /run/bareos + checkpath -d -m 0750 -o root:bareos /run/bareos start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \ -- ${SD_OPTIONS} eend $? diff --git a/app-backup/bareos/files/bareos-sd.service b/app-backup/bareos/files/bareos-sd.service index 6c617ec6a37f..80d9edbc9734 100644 --- a/app-backup/bareos/files/bareos-sd.service +++ b/app-backup/bareos/files/bareos-sd.service @@ -1,12 +1,28 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Bareos Storage Daemon +# [Unit] - Description=Bareos Storage Daemon - After=syslog.target network-online.target - -[Install] - WantedBy=multi-user.target +Description=Bareos Storage Daemon +Documentation=man:bareos-sd(8) +Requires=nss-lookup.target network.target remote-fs.target time-sync.target +After=nss-lookup.target network.target remote-fs.target time-sync.target [Service] - Type=forking - User=root - ExecStartPre=-/bin/mkdir /run/bareos - ExecStart=/usr/sbin/bareos-sd +Type=forking +User=root +Group=bareos +WorkingDirectory=/var/lib/bareos +PIDFile=/run/bareos/bareos-sd.9103.pid +StandardError=journal +ExecStartPre=/usr/sbin/bareos-sd -t -f +ExecStart=/usr/sbin/bareos-sd +# enable this for scsicrypto-sd +# CapabilityBoundingSet=cap_sys_rawio+ep +SuccessExitStatus=0 15 +#Restart=on-failure + +[Install] +Alias=bareos-storage.service +WantedBy=multi-user.target diff --git a/app-backup/bareos/files/tmpfiles.d-bareos.conf b/app-backup/bareos/files/tmpfiles.d-bareos.conf index 6e2dacc41ad3..81c57569c455 100644 --- a/app-backup/bareos/files/tmpfiles.d-bareos.conf +++ b/app-backup/bareos/files/tmpfiles.d-bareos.conf @@ -1 +1 @@ -d /run/bareos 0770 bareos bareos - +d /run/bareos 0750 root bareos - |