* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2021-08-21 10:03 Marc Schiffbauer
0 siblings, 0 replies; 6+ messages in thread
From: Marc Schiffbauer @ 2021-08-21 10:03 UTC (permalink / raw
To: gentoo-commits
commit: 3dabba831c4f4ffe807b2731de0930f69facccec
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 21 10:00:55 2021 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Sat Aug 21 10:02:55 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dabba83
app-backup/bareos: revbump for improved systemd units
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
...eos-18.2.10.ebuild => bareos-18.2.10-r1.ebuild} | 16 ++++---------
...eos-19.2.10.ebuild => bareos-19.2.10-r1.ebuild} | 16 ++++---------
...areos-20.0.2.ebuild => bareos-20.0.2-r1.ebuild} | 16 ++++---------
app-backup/bareos/files/bareos-dir.service | 27 +++++++++++++++++++++
app-backup/bareos/files/bareos-fd.service | 26 ++++++++++++++++++++
app-backup/bareos/files/bareos-sd.service | 28 ++++++++++++++++++++++
6 files changed, 96 insertions(+), 33 deletions(-)
diff --git a/app-backup/bareos/bareos-18.2.10.ebuild b/app-backup/bareos/bareos-18.2.10-r1.ebuild
similarity index 96%
rename from app-backup/bareos/bareos-18.2.10.ebuild
rename to app-backup/bareos/bareos-18.2.10-r1.ebuild
index a707bd84416..996c4c35ce1 100644
--- a/app-backup/bareos/bareos-18.2.10.ebuild
+++ b/app-backup/bareos/bareos-18.2.10-r1.ebuild
@@ -200,8 +200,8 @@ src_install() {
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
rm -f "${D}"/usr/sbin/bareos
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
# rename statically linked apps
if use clientonly && use static ; then
@@ -247,9 +247,6 @@ src_install() {
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
if use clientonly || ! use director; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
@@ -265,9 +262,6 @@ src_install() {
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
fi
if use clientonly || ! use storage-daemon; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
rm -vf "${D}"/usr/share/man/man8/bextract.8*
@@ -331,10 +325,10 @@ src_install() {
# install systemd unit files
if use systemd; then
if ! use clientonly; then
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
fi
- systemd_dounit core/platforms/systemd/bareos-fd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
fi
# make sure the working directory exists
diff --git a/app-backup/bareos/bareos-19.2.10.ebuild b/app-backup/bareos/bareos-19.2.10-r1.ebuild
similarity index 95%
rename from app-backup/bareos/bareos-19.2.10.ebuild
rename to app-backup/bareos/bareos-19.2.10-r1.ebuild
index ee87d3e36f9..a9e76afe101 100644
--- a/app-backup/bareos/bareos-19.2.10.ebuild
+++ b/app-backup/bareos/bareos-19.2.10-r1.ebuild
@@ -189,8 +189,8 @@ src_install() {
# remove timelimit to fix #778557
rm -f "${D}"/usr/{,s}bin/timelimit
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
# rename statically linked apps
if use clientonly && use static ; then
@@ -236,9 +236,6 @@ src_install() {
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
if use clientonly || ! use director; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
@@ -254,9 +251,6 @@ src_install() {
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
fi
if use clientonly || ! use storage-daemon; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
rm -vf "${D}"/usr/share/man/man8/bextract.8*
@@ -320,10 +314,10 @@ src_install() {
# install systemd unit files
if use systemd; then
if ! use clientonly; then
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
fi
- systemd_dounit core/platforms/systemd/bareos-fd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
fi
# make sure the working directory exists
diff --git a/app-backup/bareos/bareos-20.0.2.ebuild b/app-backup/bareos/bareos-20.0.2-r1.ebuild
similarity index 96%
rename from app-backup/bareos/bareos-20.0.2.ebuild
rename to app-backup/bareos/bareos-20.0.2-r1.ebuild
index 2b7f4265375..edf65d1c2d9 100644
--- a/app-backup/bareos/bareos-20.0.2.ebuild
+++ b/app-backup/bareos/bareos-20.0.2-r1.ebuild
@@ -191,8 +191,8 @@ src_install() {
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
rm -f "${D}"/usr/sbin/bareos
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
# get rid of py2 stuff if USE=-vmware
if ! use vmware; then
@@ -244,9 +244,6 @@ src_install() {
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
if use clientonly || ! use director; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-dir.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
@@ -262,9 +259,6 @@ src_install() {
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
fi
if use clientonly || ! use storage-daemon; then
- if use systemd; then
- rm -vf "${D}"/lib/systemd/system/bareos-sd.service
- fi
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
rm -vf "${D}"/usr/share/man/man8/bextract.8*
@@ -328,10 +322,10 @@ src_install() {
# install systemd unit files
if use systemd; then
if ! use clientonly; then
- use director && systemd_dounit core/platforms/systemd/bareos-dir.service
- use storage-daemon && systemd_dounit core/platforms/systemd/bareos-sd.service
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
fi
- systemd_dounit core/platforms/systemd/bareos-fd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
fi
# make sure the working directory exists
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service
new file mode 100644
index 00000000000..a342671d0d0
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.service
@@ -0,0 +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 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=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.service b/app-backup/bareos/files/bareos-fd.service
new file mode 100644
index 00000000000..e9b4b832afb
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.service
@@ -0,0 +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
+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
+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.service b/app-backup/bareos/files/bareos-sd.service
new file mode 100644
index 00000000000..80d9edbc973
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.service
@@ -0,0 +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
+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
+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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2021-09-06 12:00 Marc Schiffbauer
0 siblings, 0 replies; 6+ messages in thread
From: Marc Schiffbauer @ 2021-09-06 12:00 UTC (permalink / raw
To: gentoo-commits
commit: cee394d24645d97a6904df90fd0ab960de4367ef
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 6 11:58:41 2021 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Mon Sep 6 11:59:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cee394d2
app-backup/bareos: add workaround for #631598
Bug: https://bugs.gentoo.org/631598
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
...{bareos-18.2.10-r1.ebuild => bareos-18.2.10-r2.ebuild} | 0
...{bareos-19.2.10-r1.ebuild => bareos-19.2.10-r2.ebuild} | 0
.../{bareos-20.0.2-r1.ebuild => bareos-20.0.2-r2.ebuild} | 0
app-backup/bareos/files/bareos-dir.initd | 15 ++++++++++++---
app-backup/bareos/files/bareos-sd.initd | 15 ++++++++++++---
5 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/app-backup/bareos/bareos-18.2.10-r1.ebuild b/app-backup/bareos/bareos-18.2.10-r2.ebuild
similarity index 100%
rename from app-backup/bareos/bareos-18.2.10-r1.ebuild
rename to app-backup/bareos/bareos-18.2.10-r2.ebuild
diff --git a/app-backup/bareos/bareos-19.2.10-r1.ebuild b/app-backup/bareos/bareos-19.2.10-r2.ebuild
similarity index 100%
rename from app-backup/bareos/bareos-19.2.10-r1.ebuild
rename to app-backup/bareos/bareos-19.2.10-r2.ebuild
diff --git a/app-backup/bareos/bareos-20.0.2-r1.ebuild b/app-backup/bareos/bareos-20.0.2-r2.ebuild
similarity index 100%
rename from app-backup/bareos/bareos-20.0.2-r1.ebuild
rename to app-backup/bareos/bareos-20.0.2-r2.ebuild
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd
index 9f17f212e4a..462ff07843a 100644
--- a/app-backup/bareos/files/bareos-dir.initd
+++ b/app-backup/bareos/files/bareos-dir.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
@@ -8,14 +8,23 @@ depend() {
start() {
ebegin "Starting bareos director"
- checkpath -d -m 0750 -o root:bareos /run/bareos
+ # 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"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.*.pid
+ # 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-sd.initd b/app-backup/bareos/files/bareos-sd.initd
index 4f7fbcb52bf..97b9ccdc92f 100644
--- a/app-backup/bareos/files/bareos-sd.initd
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
@@ -8,14 +8,23 @@ depend() {
start() {
ebegin "Starting bareos storage daemon"
- checkpath -d -m 0750 -o root:bareos /run/bareos
+ # 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"
- start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.*.pid
+ # 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 $?
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2022-06-10 11:16 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-06-10 11:16 UTC (permalink / raw
To: gentoo-commits
commit: e7fd214864c67de1c11ecbc39fc726b8aae89b73
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 10 11:14:53 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 11:16:38 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7fd2148
app-backup/bareos: drop -Werror; fix build with GCC 12
Closes: https://bugs.gentoo.org/841734
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-backup/bareos/bareos-21.1.2.ebuild | 2 ++
.../files/bareos-21.1.2-no-automagic-ccache.patch | 25 ++++++++++++++++++++++
app-backup/bareos/files/bareos-21.1.2-werror.patch | 23 ++++++++++++++++++++
3 files changed, 50 insertions(+)
diff --git a/app-backup/bareos/bareos-21.1.2.ebuild b/app-backup/bareos/bareos-21.1.2.ebuild
index 4baeaaf6c0ec..0b224ba4eae8 100644
--- a/app-backup/bareos/bareos-21.1.2.ebuild
+++ b/app-backup/bareos/bareos-21.1.2.ebuild
@@ -143,6 +143,8 @@ src_test() {
src_prepare() {
# fix gentoo platform support
eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
+ eapply "${FILESDIR}/${PN}-21.1.2-werror.patch"
+ eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
# fix missing DESTDIR in symlink creation
sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
diff --git a/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch b/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch
new file mode 100644
index 000000000000..22cdc2a41c36
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21.1.2-no-automagic-ccache.patch
@@ -0,0 +1,25 @@
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -44,12 +44,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME common)
+
+ include(GNUInstallDirs)
+
+-find_program(CCACHE_FOUND ccache)
+-if(CCACHE_FOUND)
+- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+-endif(CCACHE_FOUND)
+-
+ # switch on CXX 17 Support
+ #
+ set(CMAKE_CXX_STANDARD 17)
+@@ -584,9 +578,6 @@ message(STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION})
+ # A simple way to get switches to the compiler is to use ADD_DEFINITIONS(). But
+ # there are also two variables exactly for this purpose:
+
+-# wheter or not
+-message(STATUS "CCACHE_FOUND: " ${CCACHE_FOUND})
+-
+ # Choose the type of build. Example: SET(CMAKE_BUILD_TYPE Debug)
+ message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})
+
diff --git a/app-backup/bareos/files/bareos-21.1.2-werror.patch b/app-backup/bareos/files/bareos-21.1.2-werror.patch
new file mode 100644
index 000000000000..10de9f1415b6
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21.1.2-werror.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/841734
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -96,7 +96,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ -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()
+
+@@ -353,8 +353,8 @@ if(developer)
+ add_definitions("-DDEVELOPER=1")
+ endif()
+
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+
+ include(BareosSetVariableDefaults)
+ option(ENABLE_BCONSOLE "Build bconsole binary" ON)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2022-12-10 18:10 Marc Schiffbauer
0 siblings, 0 replies; 6+ messages in thread
From: Marc Schiffbauer @ 2022-12-10 18:10 UTC (permalink / raw
To: gentoo-commits
commit: 8c5bc856f43bb3718495a08f9fff31ad3f6cb752
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 17:48:29 2022 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 18:09:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c5bc856
app-backup/bareos: revbump 21.1.5
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
...bareos-21.1.5.ebuild => bareos-21.1.5-r1.ebuild} | 21 ++++++++++++++++-----
app-backup/bareos/files/bareos-dir-21-r1.initd | 16 ++++++++++++++++
app-backup/bareos/files/bareos-fd-21-r1.initd | 12 ++++++++++++
app-backup/bareos/files/bareos-sd-21-r1.initd | 16 ++++++++++++++++
4 files changed, 60 insertions(+), 5 deletions(-)
diff --git a/app-backup/bareos/bareos-21.1.5.ebuild b/app-backup/bareos/bareos-21.1.5-r1.ebuild
similarity index 95%
rename from app-backup/bareos/bareos-21.1.5.ebuild
rename to app-backup/bareos/bareos-21.1.5-r1.ebuild
index 19bc1b11ce54..1652a021f7bc 100644
--- a/app-backup/bareos/bareos-21.1.5.ebuild
+++ b/app-backup/bareos/bareos-21.1.5-r1.ebuild
@@ -342,7 +342,7 @@ src_install() {
fi
for script in ${myscripts}; do
# install init script and config
- newinitd "${FILESDIR}/${script}-21".initd "${script}"
+ newinitd "${FILESDIR}/${script}-21-r1".initd "${script}"
newconfd "${FILESDIR}/${script}-21".confd "${script}"
done
@@ -360,7 +360,7 @@ src_install() {
keepdir /var/lib/bareos
keepdir /var/lib/bareos/storage
- diropts -m0755
+ diropts -m0755 -o bareos -g bareos
keepdir /var/log/bareos
newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf
@@ -382,9 +382,20 @@ pkg_postinst() {
einfo
einfo "If this is a new install, you must create the database:"
einfo
- einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
- einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
- einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
+ einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database'"
+ einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'"
+ einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'"
einfo
+ einfo "or run"
+ einfo
+ einfo " emerge --config app-backup/bareos"
+ einfo
+ einfo "to do this"
fi
}
+
+pkg_config() {
+ su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database"
+ su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables"
+ su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges"
+}
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-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-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"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2023-03-01 17:43 Marc Schiffbauer
0 siblings, 0 replies; 6+ messages in thread
From: Marc Schiffbauer @ 2023-03-01 17:43 UTC (permalink / raw
To: gentoo-commits
commit: 58eefb77789fdd35d34a68cea77b0e509c183209
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 1 17:42:56 2023 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Wed Mar 1 17:43:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58eefb77
app-backup/bareos: add 22.0.2
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-22.0.2.ebuild | 413 +++++++++++++++++++++
app-backup/bareos/files/bareos-22.0.2-werror.patch | 23 ++
3 files changed, 437 insertions(+)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index b05f4c5d56fd..0cfdf2ea695c 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,2 +1,3 @@
DIST bareos-20.0.8.tar.gz 13429247 BLAKE2B 5576cf738fccad0ac39f7c92e8da01f4925d58e4373c8bc19f68ddb8cc8d6a07bf73dfd39bd2111766ccd20ce2da224680b8ab9adf7b84421874ae916e633f75 SHA512 1da30d0ff2f1fda2c4a41ec6d41ec60e3212b1bdb153c7f397931580894f31e36ab84f655d263aed47b9eb21e68ef7e59ec3b7bbd4f2c8981ae04b84733ffb68
DIST bareos-21.1.6.tar.gz 11654525 BLAKE2B 9b023a07e28098fd93aca57aead5b2bf993b85c52dc8f76870dc53ee88ec5995bcc908397173c7d3504c78214e37311442dd96bb563fa4382ae35904fef69e0a SHA512 e9ccafd379ea2a7ede2b6852fa544e7d4b63b23e9d91e8b747c1aecf5d764b06991a57f658842d48fbbe49335a92f29eea90e56b613a3123246a9cd9e8273f36
+DIST bareos-22.0.2.tar.gz 14442217 BLAKE2B 34b8a506b608765f803cb788a203b7556dda67ae8bdd2cb82e1c8ea1ea8a07759f381c33b25e743d296417bef1072ccfcfecf536096cc1babdf20c57767cc369 SHA512 924e07aafa44829730f367a29f0a17356d06d5e44bcbe511936ebfe582912439010d8376370530982dfdfe54d8a722ff257648634cea429cbfbd566d2c25e464
diff --git a/app-backup/bareos/bareos-22.0.2.ebuild b/app-backup/bareos/bareos-22.0.2.ebuild
new file mode 100644
index 000000000000..4e4745015088
--- /dev/null
+++ b/app-backup/bareos/bareos-22.0.2.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+CMAKE_WARN_UNUSED_CLI=no
+#CMAKE_REMOVE_MODULES=yes
+
+inherit python-any-r1 systemd cmake tmpfiles
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="https://www.bareos.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
+
+# some tests still fail propably due to missing bits in src_test -> TODO
+RESTRICT="mirror test"
+#RESTRICT="
+# mirror
+# !test? ( test )
+#"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl ceph clientonly +director glusterfs ipv6 lmdb
+ logwatch ndmp readline scsi-crypto split-usr
+ static +storage-daemon systemd tcpd test vim-syntax vmware xattr"
+
+# get cmake variables from core/cmake/BareosSetVariableDefaults.cmake
+DEPEND="
+ !app-backup/bacula
+ acct-group/${PN}
+ !x86? (
+ ceph? ( sys-cluster/ceph )
+ )
+ glusterfs? ( sys-cluster/glusterfs )
+ lmdb? ( dev-db/lmdb )
+ dev-libs/gmp:0
+ !clientonly? (
+ acct-user/${PN}
+ dev-db/postgresql:*[threads]
+ director? (
+ virtual/mta
+ )
+ )
+ logwatch? ( sys-apps/logwatch )
+ ndmp? ( net-libs/rpcsvc-proto )
+ tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ dev-libs/jansson:=[static-libs]
+ dev-libs/lzo[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ sys-libs/zlib[static-libs]
+ )
+ !static? (
+ acl? ( virtual/acl )
+ dev-libs/jansson:=
+ dev-libs/lzo
+ dev-libs/openssl:0=
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ )
+ "
+RDEPEND="${DEPEND}
+ !clientonly? (
+ storage-daemon? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ "
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? (
+ dev-cpp/gtest
+ dev-db/postgresql:*[server,threads]
+ dev-db/mariadb:*[server]
+ )
+"
+
+REQUIRED_USE="
+ static? ( clientonly )
+ x86? ( !ceph )
+"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+pkg_pretend() {
+ local active_removed_backend=""
+ if has_version "<app-backup/bareos-21[director,mysql]"; then
+ if grep -qhriE "dbdriver.*=.*mysql" /etc/bareos/; then
+ active_removed_backend=MySQL
+ fi
+ elif has_version "<app-backup/bareos-21[director,sqlite]"; then
+ if grep -qhriE "dbdriver.*=.*sqlite" /etc/bareos/; then
+ active_removed_backend=SQLite
+ fi
+ fi
+ if [[ -n $active_removed_backend ]]; then
+ ewarn
+ ewarn "You are currently using bareos with the $active_removed_backend"
+ ewarn "catalog backend."
+ ewarn
+ ewarn "THIS IS NOT SUPPORTED ANYMORE"
+ ewarn
+ ewarn "Beginning with version 21.0.0 bareos has dropped support for"
+ ewarn "MySQL and SQLite catalog backends."
+ ewarn
+ ewarn "To upgrade to bareos >=21.0.0 you need to migrate to PostgreSQL"
+ ewarn "catalog backend using the 'bareos-dbcopy' tool of your current"
+ ewarn "installation first."
+ ewarn
+ die "current catalog backend not supported anymore"
+ fi
+}
+
+src_test() {
+ # initialze catalog test database
+ initdb -D "${T}"/pgsql || die
+ pg_ctl -w -D "${T}"/pgsql start \
+ -o "-h '' -k '${T}'" || die
+ createuser -h "${T}" bareos || die
+ createdb -h "${T}" --owner bareos bareos || die
+ export PGHOST="${T}"
+
+ # initiale mariadb database for backup tests
+ # $USER must be set and != root
+ export USER=portage
+
+ default
+ cmake_src_test
+
+ pg_ctl -w -D "${T}"/pgsql stop || die
+ rm -rvf "${T}"/pgsql
+}
+
+src_prepare() {
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
+ eapply "${FILESDIR}/${PN}-22.0.2-werror.patch"
+ eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
+
+ # fix missing DESTDIR in symlink creation
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=()
+
+ cmake_comment_add_subdirectory webui
+
+ if use clientonly; then
+ mycmakeargs+=(
+ -Dclient-only=ON
+ -Dstatic-cons=$(usex static)
+ -Dstatic-fd=$(usex static)
+ )
+ fi
+
+ for useflag in acl ipv6 ndmp scsi-crypto \
+ systemd lmdb; do
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
+
+ mycmakeargs+=(
+ -DHAVE_PYTHON=0
+ -Darchivedir=/var/lib/bareos/storage
+ -Dbackenddir=/usr/$(get_libdir)/${PN}/backend
+ -Dbasename="`hostname -s`"
+ -Dbatch-insert=yes
+ -Dbsrdir=/var/lib/bareos/bsr
+ -Dconfdir=/etc/bareos
+ -Dcoverage=no
+ -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1`
+ -Ddir-group=bareos
+ -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Ddir-user=bareos
+ -Ddocdir=/usr/share/doc/${PF}
+ -Ddynamic-cats-backends=yes
+ -Ddynamic-storage-backends=yes
+ -Dfd-group=bareos
+ -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dfd-user=root
+ -Dhost=${CHOST}
+ -Dhostname="`hostname -s`"
+ -Dhtmldir=/usr/share/doc/${PF}/html
+ -Dlibdir=/usr/$(get_libdir)
+ -Dlogdir=/var/log/bareos
+ -Dmandir=/usr/share/man
+ -Dmon-dir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dmon-fd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dmon-sd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dopenssl=yes
+ -Dpiddir=/run/bareos
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
+ -Dsbin-perm=0755
+ -Dsbindir=/usr/sbin
+ -Dscriptdir=/usr/libexec/bareos
+ -Dsd-group=bareos
+ -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dsd-user=root
+ -Dsubsysdir=/run/lock/subsys
+ -Dsysconfdir=/etc
+ -Dworkingdir=/var/lib/bareos
+ -Dx=$(usex X)
+ )
+
+ # disable droplet support for now as it does not build with gcc 10
+ # ... and this is a bundled lib, which should have its own package
+ cd core && cmake_comment_add_subdirectory "src/droplet"
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # remove some scripts we don't need at all
+ rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd}
+ rm -f "${D}"/usr/sbin/bareos
+
+ # remove upstream init scripts and systemd units
+ rm -f "${D}"/etc/init.d/bareos-* "${D}"/lib/systemd/system/bareos-*.service
+
+ # remove misc stuff we do not need in production
+ rm -f "${D}"/etc/bareos/bareos-regress.conf
+ rm -f "${D}"/etc/logrotate.d/bareos-dir
+
+ # remove duplicate binaries being installed in /usr/sbin and replace
+ # them by symlinks to not break systems that still use split-usr
+ if use split-usr; then
+ for f in bwild bregex bsmtp bconsole; do
+ rm -f "${D}/usr/sbin/$f" || die
+ ln -s "../bin/$f" "${D}/usr/sbin/$f" || die
+ done
+ fi
+
+ # get rid of py2 stuff
+ rm -rf "$D"/usr/lib64/python2.7 || die
+ rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so || die
+ if ! use vmware; then
+ rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py}
+ fi
+
+ # rename statically linked apps
+ if use clientonly && use static ; then
+ pushd "${D}"/usr/sbin || die
+ mv static-bareos-fd bareos-fd || die
+ mv static-bconsole bconsole || die
+ popd || die
+ fi
+
+ # extra files which 'make install' doesn't cover
+ if ! use clientonly; then
+ # the logrotate configuration
+ # (now unconditional wrt bug #258187)
+ diropts -m0755
+ insinto /etc/logrotate.d
+ insopts -m0644
+ newins "${S}"/core/scripts/logrotate bareos
+
+ # the logwatch scripts
+ if use logwatch; then
+ diropts -m0750
+ dodir /etc/log.d/scripts/services
+ dodir /etc/log.d/scripts/shared
+ dodir /etc/log.d/conf/logfiles
+ dodir /etc/log.d/conf/services
+ pushd "${S}"/core/scripts/logwatch >&/dev/null || die
+
+ into /etc/log.d/scripts/services
+ dobin bareos
+
+ into /etc/log.d/scripts/shared
+ dobin applybareosdate
+
+ insinto /etc/log.d/conf/logfiles
+ newins logfile.bareos.conf bareos.conf
+
+ insinto /etc/log.d/conf/services
+ newins services.bareos.conf bareos.conf
+
+ popd >&/dev/null || die
+ fi
+ fi
+
+ rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
+ if use clientonly || ! use director; then
+ rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
+ rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
+ rm -vf "${D}"/usr/share/man/man8/bwild.8*
+ rm -vf "${D}"/usr/share/man/man8/bregex.8*
+ rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
+ rm -vf "${D}"/usr/libexec/bareos/create_*_database
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_database
+ rm -vf "${D}"/usr/libexec/bareos/make_*_tables
+ rm -vf "${D}"/usr/libexec/bareos/update_*_tables
+ rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
+ rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
+ rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
+ fi
+ if use clientonly || ! use storage-daemon; then
+ rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8*
+ rm -vf "${D}"/usr/share/man/man8/bextract.8*
+ rm -vf "${D}"/usr/share/man/man8/bls.8*
+ rm -vf "${D}"/usr/share/man/man8/bscan.8*
+ rm -vf "${D}"/usr/share/man/man8/btape.8*
+ rm -vf "${D}"/usr/libexec/bareos/disk-changer
+ rm -vf "${D}"/usr/libexec/bareos/mtx-changer
+ rm -vf "${D}"/usr/libexec/bareos/dvd-handler
+ rm -vf "${D}"/etc/bareos/mtx-changer.conf
+ fi
+ if ! use scsi-crypto; then
+ rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
+ fi
+
+ # documentation
+ dodoc README.md
+ dodoc core/README.configsubdirectories
+ use glusterfs dodoc core/README.glusterfs
+ use ndmp && dodoc core/README.NDMP
+ use scsi-crypto && dodoc core/README.scsicrypto
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins core/scripts/bareos.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins core/scripts/filetype.vim bareos_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bareos-fd"
+ if ! use clientonly; then
+ if use director; then
+ myscripts+=" bareos-dir"
+ fi
+ if use storage-daemon; then
+ myscripts+=" bareos-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # install init script and config
+ newinitd "${FILESDIR}/${script}-21-r1".initd "${script}"
+ newconfd "${FILESDIR}/${script}-21".confd "${script}"
+ done
+
+ # install systemd unit files
+ if use systemd; then
+ if ! use clientonly; then
+ use director && systemd_newunit "${FILESDIR}"/bareos-dir-21.service bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
+ fi
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
+ fi
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bareos
+ keepdir /var/lib/bareos/storage
+
+ # set log directory ownership
+ if ! use clientonly; then
+ diropts -m0755 -o bareos -g bareos
+ fi
+ keepdir /var/log/bareos
+
+ newtmpfiles "${FILESDIR}"/tmpfiles.d-bareos.conf bareos.conf
+
+ # make sure bareos group can execute bareos libexec scripts
+ fowners -R root:bareos /usr/libexec/bareos
+}
+
+pkg_postinst() {
+ tmpfiles_process bareos.conf
+
+ if use clientonly; then
+ fowners root:bareos /var/lib/bareos
+ else
+ fowners bareos:bareos /var/lib/bareos
+ fi
+
+ if ! use clientonly && use director; then
+ einfo
+ einfo "If this is a new install, you must create the database:"
+ einfo
+ einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database'"
+ einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables'"
+ einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges'"
+ einfo
+ einfo "or run"
+ einfo
+ einfo " emerge --config app-backup/bareos"
+ einfo
+ einfo "to do this"
+ fi
+}
+
+pkg_config() {
+ su postgres -c '/usr/libexec/bareos/create_bareos_database' || die "could not create bareos database"
+ su postgres -c '/usr/libexec/bareos/make_bareos_tables' || die "could not create bareos database tables"
+ su postgres -c '/usr/libexec/bareos/grant_bareos_privileges' || die "could not grant bareos database privileges"
+}
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/
@ 2024-01-29 9:50 Marc Schiffbauer
0 siblings, 0 replies; 6+ messages in thread
From: Marc Schiffbauer @ 2024-01-29 9:50 UTC (permalink / raw
To: gentoo-commits
commit: accb96ccd7e9fb4acc0710eec5abba7a3b0e3c7f
Author: Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Sat Jan 27 21:52:18 2024 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Mon Jan 29 09:50:46 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=accb96cc
app-backup/bareos: Include <algorithm> for GCC 14
Also moved eapply's to a PATCHES array for app-backup/bareos.
https://gcc.gnu.org/gcc-14/porting_to.html
Closes: https://bugs.gentoo.org/920489
Signed-off-by: Christopher Fore <csfore <AT> posteo.net>
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/bareos-22.1.2-r1.ebuild | 15 ++++----
.../files/bareos-22.1.2-include-algorithm.patch | 41 ++++++++++++++++++++++
2 files changed, 50 insertions(+), 6 deletions(-)
diff --git a/app-backup/bareos/bareos-22.1.2-r1.ebuild b/app-backup/bareos/bareos-22.1.2-r1.ebuild
index 3ec758c53539..d61de65c0fc7 100644
--- a/app-backup/bareos/bareos-22.1.2-r1.ebuild
+++ b/app-backup/bareos/bareos-22.1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -99,6 +99,14 @@ REQUIRED_USE="
x86? ( !ceph )
"
+PATCHES=(
+ # fix gentoo platform support
+ "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
+ "${FILESDIR}/${PN}-22.0.2-werror.patch"
+ "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
+ "${FILESDIR}/${PN}-22.1.2-include-algorithm.patch"
+)
+
pkg_pretend() {
local active_removed_backend=""
if has_version "<app-backup/bareos-21[director,mysql]"; then
@@ -149,11 +157,6 @@ src_test() {
}
src_prepare() {
- # fix gentoo platform support
- eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.patch"
- eapply "${FILESDIR}/${PN}-22.0.2-werror.patch"
- eapply "${FILESDIR}/${PN}-21.1.2-no-automagic-ccache.patch"
-
# fix missing DESTDIR in symlink creation
sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
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 */
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-29 9:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-06 12:00 [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/, app-backup/bareos/files/ Marc Schiffbauer
-- strict thread matches above, loose matches on Subject: below --
2024-01-29 9:50 Marc Schiffbauer
2023-03-01 17:43 Marc Schiffbauer
2022-12-10 18:10 Marc Schiffbauer
2022-06-10 11:16 Sam James
2021-08-21 10:03 Marc Schiffbauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox