summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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-22.0.2-werror.patch23
-rw-r--r--app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch41
-rw-r--r--app-backup/bareos/files/bareos-cmake-gentoo.patch11
-rw-r--r--app-backup/bareos/files/bareos-dir-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-dir-21.initd22
-rw-r--r--app-backup/bareos/files/bareos-dir.confd17
-rw-r--r--app-backup/bareos/files/bareos-dir.initd30
-rw-r--r--app-backup/bareos/files/bareos-dir.service30
-rw-r--r--app-backup/bareos/files/bareos-fd-21-r1.initd12
-rw-r--r--app-backup/bareos/files/bareos-fd-21.initd21
-rw-r--r--app-backup/bareos/files/bareos-fd.confd7
-rw-r--r--app-backup/bareos/files/bareos-fd.initd21
-rw-r--r--app-backup/bareos/files/bareos-sd-21-r1.initd16
-rw-r--r--app-backup/bareos/files/bareos-sd-21.initd21
-rw-r--r--app-backup/bareos/files/bareos-sd.confd10
-rw-r--r--app-backup/bareos/files/bareos-sd.initd30
17 files changed, 108 insertions, 244 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
deleted file mode 100644
index 9d3cf8092e1c..000000000000
--- a/app-backup/bareos/files/bareos-20.0.2-cmake-gentoo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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-22.0.2-werror.patch b/app-backup/bareos/files/bareos-22.0.2-werror.patch
new file mode 100644
index 000000000000..43f2aa5ad7d9
--- /dev/null
+++ b/app-backup/bareos/files/bareos-22.0.2-werror.patch
@@ -0,0 +1,23 @@
+diff -urN bareos-Release-22.0.2.orig/core/CMakeLists.txt bareos-Release-22.0.2/core/CMakeLists.txt
+--- bareos-Release-22.0.2.orig/core/CMakeLists.txt 2023-02-07 15:30:01.000000000 +0530
++++ bareos-Release-22.0.2/core/CMakeLists.txt 2023-03-01 23:06:39.577048453 +0530
+@@ -104,7 +104,7 @@
+ -Werror=format-security compiler_error_format_security
+ )
+ if(${compiler_error_format_security})
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format-security")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-security")
+ endif()
+ endif()
+
+@@ -394,8 +394,8 @@
+ add_definitions("-DDEVELOPER=1")
+ endif()
+
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+
+ include(BareosSetVariableDefaults)
+ option(ENABLE_BCONSOLE "Build bconsole binary" ON)
diff --git a/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch
new file mode 100644
index 000000000000..5f71576bc001
--- /dev/null
+++ b/app-backup/bareos/files/bareos-22.1.2-include-algorithm.patch
@@ -0,0 +1,41 @@
+From https://github.com/bareos/bareos/pull/1687/commits/3907be7ff9700d0328198b47c58885f5ec56546c
+https://bugs.gentoo.org/920489
+
+diff --git a/core/src/cats/sql_get.cc b/core/src/cats/sql_get.cc
+index b5d921c..150ebfc 100644
+--- a/core/src/cats/sql_get.cc
++++ b/core/src/cats/sql_get.cc
+@@ -31,6 +31,7 @@
+ */
+
+ #include "include/bareos.h"
++#include <algorithm>
+
+ #if HAVE_SQLITE3 || HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_INGRES || HAVE_DBI
+
+diff --git a/core/src/stored/append.cc b/core/src/stored/append.cc
+index 05f6784..32234d4 100644
+--- a/core/src/stored/append.cc
++++ b/core/src/stored/append.cc
+@@ -41,6 +41,8 @@
+ #include "lib/berrno.h"
+ #include "lib/berrno.h"
+
++#include <algorithm>
++
+ namespace storagedaemon {
+
+ /* Responses sent to the daemon */
+diff --git a/core/src/dird/ua_prune.cc b/core/src/dird/ua_prune.cc
+index 9a0770c..15a0a56 100644
+--- a/core/src/dird/ua_prune.cc
++++ b/core/src/dird/ua_prune.cc
+@@ -40,6 +40,8 @@
+ #include "lib/edit.h"
+ #include "lib/parse_conf.h"
+
++#include <algorithm>
++
+ namespace directordaemon {
+
+ /* Forward referenced functions */
diff --git a/app-backup/bareos/files/bareos-cmake-gentoo.patch b/app-backup/bareos/files/bareos-cmake-gentoo.patch
deleted file mode 100644
index 0f67a9e5d9de..000000000000
--- a/app-backup/bareos/files/bareos-cmake-gentoo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/cmake/distname.sh.orig 2019-01-31 12:39:26.000000000 +0100
-+++ core/cmake/distname.sh 2019-02-05 10:26:43.258936535 +0100
-@@ -134,7 +134,7 @@
- elif test -f /etc/gentoo-release
- then
- DISTNAME=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 --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-21.initd b/app-backup/bareos/files/bareos-dir-21.initd
deleted file mode 100644
index 916ee13b36ce..000000000000
--- a/app-backup/bareos/files/bareos-dir-21.initd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- need postgresql
- use dns bareos-fd bareos-sd
-}
-
-start() {
- ebegin "Starting bareos director"
- checkpath -d -m 0750 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
- -- -p /run/bareos/bareos-dir.9101.pid ${DIR_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos director"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid
- eend $?
-}
diff --git a/app-backup/bareos/files/bareos-dir.confd b/app-backup/bareos/files/bareos-dir.confd
deleted file mode 100644
index 6d755bf93344..000000000000
--- a/app-backup/bareos/files/bareos-dir.confd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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 bareos -g bareos"
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd
deleted file mode 100644
index 462ff07843a2..000000000000
--- a/app-backup/bareos/files/bareos-dir.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 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 $?
-}
-
-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 $?
-}
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service
deleted file mode 100644
index f0a611715487..000000000000
--- a/app-backup/bareos/files/bareos-dir.service
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-#
-# Bareos Director Daemon
-#
-[Unit]
-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]
-# see bug #631598
-#Type=forking
-Type=simple
-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
-ExecStart=/usr/sbin/bareos-dir -f
-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-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-21.initd b/app-backup/bareos/files/bareos-fd-21.initd
deleted file mode 100644
index f0632261a0c5..000000000000
--- a/app-backup/bareos/files/bareos-fd-21.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-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 \
- -- -p /run/bareos/bareos-fd.9102.pid ${FD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos file daemon"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.9102.pid
- eend $?
-}
diff --git a/app-backup/bareos/files/bareos-fd.confd b/app-backup/bareos/files/bareos-fd.confd
deleted file mode 100644
index 5e429a6bd31c..000000000000
--- a/app-backup/bareos/files/bareos-fd.confd
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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
deleted file mode 100644
index e65e6c80f32b..000000000000
--- a/app-backup/bareos/files/bareos-fd.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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 $?
-}
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..d6a5765a74a4
--- /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-sd.9103.pid"
diff --git a/app-backup/bareos/files/bareos-sd-21.initd b/app-backup/bareos/files/bareos-sd-21.initd
deleted file mode 100644
index 07091dbd74c5..000000000000
--- a/app-backup/bareos/files/bareos-sd-21.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# 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"
- checkpath -d -m 0750 -o root:bareos /run/bareos
- start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
- -- -p /run/bareos/bareos-sd.9103.pid ${SD_OPTIONS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping bareos storage daemon"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.9103.pid
- eend $?
-}
diff --git a/app-backup/bareos/files/bareos-sd.confd b/app-backup/bareos/files/bareos-sd.confd
deleted file mode 100644
index d0153b2b30b5..000000000000
--- a/app-backup/bareos/files/bareos-sd.confd
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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 bareos -g bareos"
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
deleted file mode 100644
index 97b9ccdc92f1..000000000000
--- a/app-backup/bareos/files/bareos-sd.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 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 $?
-}
-
-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 $?
-}