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"

Reply via email to