* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2017-12-10 22:37 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2017-12-10 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 20df458e46b2c26c7e2a6bdc47ceac4af8f1818c
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 22:36:54 2017 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 22:37:11 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20df458e
app-backup/bareos: bump version, fix #633800
Package-Manager: Portage-2.3.17, Repoman-2.3.6
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-16.2.7.ebuild | 428 ++++++++++++++++++++++++++++
app-backup/bareos/files/bareos-dir.confd-16 | 17 ++
app-backup/bareos/files/bareos-fd.confd-16 | 7 +
app-backup/bareos/files/bareos-sd.confd-16 | 10 +
5 files changed, 463 insertions(+)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index edf1c9d4c42..70de9426eea 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -3,3 +3,4 @@ DIST bareos-14.2.2.tar.gz 3811787 BLAKE2B ace5a3d25c98df852308cef0ff603e416aff2f
DIST bareos-14.2.5.tar.gz 3820963 BLAKE2B 7f9736be72fbf03f277e8d8460e4343e9340c7c9fb50722566f16a09e97dcf921f54eee528e0b453e4f0251a4e91ec983006cbda027597ae98beb70265b1f22b SHA512 600cdf8175b1199b73ddcf8a32df7bca446c294c4c830038f93fe3f053482916745675df3a51bc494cdab00b362d57657a34a94e78bac4bae3acced06347023d
DIST bareos-15.2.2.tar.gz 3928036 BLAKE2B ac331008e45c029bb3320a9a40264d350aedbb5550d65a606a95372241f5ec9c8a7e73f365f8b0c3972e59fa907764995b0173dcd762971cd2fdce1e025c75e2 SHA512 07b11c51695a6ff348317965625e5cdb8e296d4f3a4037718a98e266d94650ed1fb905c220ac791123d8ed92d0aed24854a6ab52887249849dbc00697d3300c3
DIST bareos-16.2.4.tar.gz 4275141 BLAKE2B e7b8a5658a697436401659ecd24148f4f1ad982cbd6dd46c39f3d29ba461b54737950d6fe6ec2c36e7892d414306c7038af5221c28652109e047f66f2d9daa2e SHA512 91f7f2b3d9889f4faa9834dc414e2250015d3d26bf8bd0c04c1f3fd882a50a4066ced145f7c8609c070e8f74b53574953e3fef344726c6863cd7bbc73c76a88c
+DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00
diff --git a/app-backup/bareos/bareos-16.2.7.ebuild b/app-backup/bareos/bareos-16.2.7.ebuild
new file mode 100644
index 00000000000..099882b6e3d
--- /dev/null
+++ b/app-backup/bareos/bareos-16.2.7.ebuild
@@ -0,0 +1,428 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit eutils multilib python-single-r1 qt4-r2 user
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bareos.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
+ logwatch mysql ndmp postgres python qt4 rados rados-striper readline scsi-crypto
+ sql-pooling +sqlite ssl static +storage-daemon tcpd vim-syntax"
+REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
+
+DEPEND="
+ !app-backup/bacula
+ cephfs? ( sys-cluster/ceph )
+ rados? ( sys-cluster/ceph )
+ rados-striper? ( >=sys-cluster/ceph-0.94.2 )
+ glusterfs? ( sys-cluster/glusterfs )
+ lmdb? ( dev-db/lmdb )
+ dev-libs/gmp:0
+ !clientonly? (
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson )
+ )
+ )
+ qt4? (
+ dev-qt/qtsvg:4
+ x11-libs/qwt:5
+ )
+ fastlz? ( dev-libs/bareos-fastlzlib )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ gnutls? ( net-libs/gnutls[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ dev-libs/lzo
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ gnutls? ( net-libs/gnutls )
+ )
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ )
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}
+ !clientonly? (
+ storage-daemon? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="static? ( clientonly )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+pkg_setup() {
+ use mysql && export mydbtypes+="mysql"
+ use postgres && export mydbtypes+=" postgresql"
+ use sqlite && export mydbtypes+=" sqlite"
+
+ # create the daemon group and user
+ if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
+ enewgroup bareos
+ einfo
+ einfo "The group 'bareos' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if use clientonly && use static && use qt4; then
+ ewarn
+ ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
+ ewarn
+ fi
+
+ if ! use clientonly; then
+ if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
+ enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bareos' has been created. Please see the bareos manual"
+ einfo "for information about running bareos as a non-root user."
+ einfo
+ fi
+ fi
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # adjusts default configuration files for several binaries
+ # to /etc/bareos/<config> instead of ./<config>
+ pushd src >&/dev/null || die
+ for f in console/console.c dird/dird.c filed/filed.c \
+ stored/bcopy.c stored/bextract.c stored/bls.c \
+ stored/bscan.c stored/btape.c stored/stored.c \
+ qt-console/main.cpp; do
+ sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
+ || die "sed on ${f} failed"
+ done
+ popd >&/dev/null || die
+
+ # bug 466690 Use CXXFLAGS instead of CFLAGS
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+
+ # stop build for errors in subdirs
+ epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
+
+ # bat needs to respect LDFLAGS
+ epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
+
+ # do not strip binaries
+ for d in filed console dird stored; do
+ sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
+ done
+}
+
+src_configure() {
+ local myconf=''
+
+ addpredict /var/lib/logrotate.status
+
+ if use clientonly; then
+ myconf="${myconf} \
+ $(use_enable clientonly client-only) \
+ $(use_enable !static libtool) \
+ $(use_enable static static-cons) \
+ $(use_enable static static-fd)"
+ fi
+
+ # do not build bat and traymonitor if 'static' clientonly
+ if ! use clientonly || ! use static; then
+ myconf="${myconf} \
+ $(use_enable qt4 bat) \
+ $(use_enable qt4 traymonitor)"
+ fi
+
+ myconf="${myconf} \
+ $(use_with X x) \
+ $(use_enable acl) \
+ $(use_enable ipv6) \
+ $(use_enable ndmp) \
+ $(use_enable readline) \
+ $(use_enable !readline conio) \
+ $(use_enable scsi-crypto) \
+ $(use_enable sql-pooling) \
+ $(use_with fastlz) \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with sqlite sqlite3) \
+ $(use sqlite || echo "--without-sqlite3") \
+ $(use_with ssl openssl) \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_enable lmdb) \
+ $(use_with glusterfs) \
+ $(use_with rados) \
+ $(use_with rados-striper) \
+ $(use_with cephfs) \
+ $(use_with jansson) \
+ "
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/run/bareos \
+ --sysconfdir=/etc \
+ --with-subsys-dir=/run/lock/subsys \
+ --with-working-dir=/var/lib/bareos \
+ --with-logdir=/var/log/bareos \
+ --with-scriptdir=/usr/libexec/bareos \
+ --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
+ --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
+ --with-dir-user=bareos \
+ --with-dir-group=bareos \
+ --with-sd-user=root \
+ --with-sd-group=bareos \
+ --with-fd-user=root \
+ --with-fd-group=bareos \
+ --with-sbin-perm=0755 \
+ --with-systemd \
+ --enable-dynamic-cats-backends \
+ --enable-dynamic-storage-backends \
+ --enable-batch-insert \
+ --disable-afs \
+ --host=${CHOST} \
+ ${myconf}
+ # correct configuration for QT based bat
+ if use qt4 ; then
+ pushd src/qt-console
+ eqmake4
+ popd
+ pushd src/qt-tray-monitor
+ eqmake4
+ popd
+ fi
+}
+
+src_compile() {
+ # workaround for build failing with high -j values
+ # if ndmp is enabled
+ use ndmp && MAKEOPTS="$MAKEOPTS -j1"
+
+ # Make build log verbose (bug #447806)
+ emake NO_ECHO=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newicon src/images/bareos_logo_shadow.png bareos.png
+
+ # install bat icon and desktop file when enabled
+ # (for some reason ./configure doesn't pick this up)
+ if use qt4 && ! use static ; then
+ doicon src/images/bat.png
+ domenu scripts/bat.desktop
+ fi
+
+ # 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,startmysql,stopmysql}
+ rm -f "${D}"/usr/sbin/bareos
+
+ # remove upstream init scripts
+ rm -f "${D}"/etc/init.d/bareos-*
+
+ # 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}"/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}"/scripts/logwatch >&/dev/null || die
+ emake DESTDIR="${D}" install
+ popd >&/dev/null || die
+ fi
+ fi
+
+ rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
+ if ! use qt4; then
+ rm -vf "${D}"/usr/share/man/man1/bat.1*
+ fi
+ 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
+ if ! use qt4; then
+ rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
+ fi
+
+ # documentation
+ dodoc README.md
+ use ndmp && dodoc README.NDMP
+ use scsi-crypto && dodoc README.scsicrypto
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/bareos.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins scripts/filetype.vim bareos_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bareos-fd"
+ if ! use clientonly; then
+ if use director; then
+ myscripts="${myscripts} bareos-dir"
+ fi
+ if use storage-daemon; then
+ myscripts="${myscripts} bareos-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bareos
+
+ # make sure bareos group can execute bareos libexec scripts
+ fowners -R root:bareos /usr/libexec/bareos
+}
+
+pkg_postinst() {
+ 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 databases with:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ einfo
+ fi
+
+ einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
+ einfo "you have to enable 'USE=qt4'."
+ einfo
+}
diff --git a/app-backup/bareos/files/bareos-dir.confd-16 b/app-backup/bareos/files/bareos-dir.confd-16
new file mode 100644
index 00000000000..a11eba90a75
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.confd-16
@@ -0,0 +1,17 @@
+# 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-fd.confd-16 b/app-backup/bareos/files/bareos-fd.confd-16
new file mode 100644
index 00000000000..e3b8a1f576f
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.confd-16
@@ -0,0 +1,7 @@
+# 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-sd.confd-16 b/app-backup/bareos/files/bareos-sd.confd-16
new file mode 100644
index 00000000000..5d377b978dd
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.confd-16
@@ -0,0 +1,10 @@
+# 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"
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2018-05-13 6:56 Andreas Sturmlechner
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2018-05-13 6:56 UTC (permalink / raw
To: gentoo-commits
commit: ded9d68ffacb9892262e5bc324141dcecfbfb825
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 10 19:51:24 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May 13 06:56:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded9d68f
app-backup/bareos: Drop Qt4-based
Closes: https://bugs.gentoo.org/644568
Package-Manager: Portage-2.3.36, Repoman-2.3.9
app-backup/bareos/Manifest | 2 -
app-backup/bareos/bareos-15.2.2.ebuild | 428 -------------------------------
app-backup/bareos/bareos-16.2.4.ebuild | 428 -------------------------------
app-backup/bareos/bareos-16.2.7.ebuild | 428 -------------------------------
app-backup/bareos/files/bareos-dir.confd | 17 --
app-backup/bareos/files/bareos-fd.confd | 7 -
app-backup/bareos/files/bareos-sd.confd | 10 -
7 files changed, 1320 deletions(-)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 4cabd451436..3805dbf289d 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,3 +1 @@
-DIST bareos-15.2.2.tar.gz 3928036 BLAKE2B ac331008e45c029bb3320a9a40264d350aedbb5550d65a606a95372241f5ec9c8a7e73f365f8b0c3972e59fa907764995b0173dcd762971cd2fdce1e025c75e2 SHA512 07b11c51695a6ff348317965625e5cdb8e296d4f3a4037718a98e266d94650ed1fb905c220ac791123d8ed92d0aed24854a6ab52887249849dbc00697d3300c3
-DIST bareos-16.2.4.tar.gz 4275141 BLAKE2B e7b8a5658a697436401659ecd24148f4f1ad982cbd6dd46c39f3d29ba461b54737950d6fe6ec2c36e7892d414306c7038af5221c28652109e047f66f2d9daa2e SHA512 91f7f2b3d9889f4faa9834dc414e2250015d3d26bf8bd0c04c1f3fd882a50a4066ced145f7c8609c070e8f74b53574953e3fef344726c6863cd7bbc73c76a88c
DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00
diff --git a/app-backup/bareos/bareos-15.2.2.ebuild b/app-backup/bareos/bareos-15.2.2.ebuild
deleted file mode 100644
index a90878f4449..00000000000
--- a/app-backup/bareos/bareos-15.2.2.ebuild
+++ /dev/null
@@ -1,428 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads"
-
-inherit eutils multilib python-single-r1 qt4-r2 user
-
-DESCRIPTION="Featureful client/server network backup suite"
-HOMEPAGE="http://www.bareos.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="mirror"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
- logwatch mysql ndmp postgres python qt4 rados rados-striper readline scsi-crypto
- sql-pooling +sqlite ssl static +storage-daemon tcpd vim-syntax"
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
-
-DEPEND="
- !app-backup/bacula
- cephfs? ( sys-cluster/ceph )
- rados? ( sys-cluster/ceph )
- rados-striper? ( >=sys-cluster/ceph-0.94.2 )
- glusterfs? ( sys-cluster/glusterfs )
- lmdb? ( dev-db/lmdb )
- dev-libs/gmp:0
- !clientonly? (
- postgres? ( dev-db/postgresql:*[threads] )
- mysql? ( virtual/mysql )
- sqlite? ( dev-db/sqlite:3 )
- director? (
- virtual/mta
- jansson? ( dev-libs/jansson )
- )
- )
- qt4? (
- dev-qt/qtsvg:4
- x11-libs/qwt:5
- )
- fastlz? ( dev-libs/bareos-fastlzlib )
- logwatch? ( sys-apps/logwatch )
- tcpd? ( sys-apps/tcp-wrappers )
- readline? ( sys-libs/readline:0 )
- static? (
- acl? ( virtual/acl[static-libs] )
- sys-libs/zlib[static-libs]
- dev-libs/lzo[static-libs]
- sys-libs/ncurses:=[static-libs]
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0=[static-libs] )
- libressl? ( dev-libs/libressl:0=[static-libs] )
- )
- gnutls? ( net-libs/gnutls[static-libs] )
- )
- )
- !static? (
- acl? ( virtual/acl )
- dev-libs/lzo
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- gnutls? ( net-libs/gnutls )
- )
- sys-libs/ncurses:=
- sys-libs/zlib
- )
- python? ( ${PYTHON_DEPS} )
- "
-RDEPEND="${DEPEND}
- !clientonly? (
- storage-daemon? (
- sys-block/mtx
- app-arch/mt-st
- )
- )
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
-
-REQUIRED_USE="static? ( clientonly )
- python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${PN}-Release-${PV}
-
-pkg_setup() {
- use mysql && export mydbtypes+="mysql"
- use postgres && export mydbtypes+=" postgresql"
- use sqlite && export mydbtypes+=" sqlite"
-
- # create the daemon group and user
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
- enewgroup bareos
- einfo
- einfo "The group 'bareos' has been created. Any users you add to this"
- einfo "group have access to files created by the daemons."
- einfo
- fi
-
- if use clientonly && use static && use qt4; then
- ewarn
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
- ewarn
- fi
-
- if ! use clientonly; then
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
- einfo
- einfo "The user 'bareos' has been created. Please see the bareos manual"
- einfo "for information about running bareos as a non-root user."
- einfo
- fi
- fi
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # adjusts default configuration files for several binaries
- # to /etc/bareos/<config> instead of ./<config>
- pushd src >&/dev/null || die
- for f in console/console.c dird/dird.c filed/filed.c \
- stored/bcopy.c stored/bextract.c stored/bls.c \
- stored/bscan.c stored/btape.c stored/stored.c \
- qt-console/main.cpp; do
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
- || die "sed on ${f} failed"
- done
- popd >&/dev/null || die
-
- # bug 466690 Use CXXFLAGS instead of CFLAGS
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
-
- # stop build for errors in subdirs
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
-
- # bat needs to respect LDFLAGS
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
-
- # do not strip binaries
- for d in filed console dird stored; do
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
- done
-}
-
-src_configure() {
- local myconf=''
-
- addpredict /var/lib/logrotate.status
-
- if use clientonly; then
- myconf="${myconf} \
- $(use_enable clientonly client-only) \
- $(use_enable !static libtool) \
- $(use_enable static static-cons) \
- $(use_enable static static-fd)"
- fi
-
- # do not build bat and traymonitor if 'static' clientonly
- if ! use clientonly || ! use static; then
- myconf="${myconf} \
- $(use_enable qt4 bat) \
- $(use_enable qt4 traymonitor)"
- fi
-
- myconf="${myconf} \
- $(use_with X x) \
- $(use_enable acl) \
- $(use_enable ipv6) \
- $(use_enable ndmp) \
- $(use_enable readline) \
- $(use_enable !readline conio) \
- $(use_enable scsi-crypto) \
- $(use_enable sql-pooling) \
- $(use_with fastlz) \
- $(use_with mysql) \
- $(use_with postgres postgresql) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with sqlite sqlite3) \
- $(use sqlite || echo "--without-sqlite3") \
- $(use_with ssl openssl) \
- $(use_with tcpd tcp-wrappers) \
- $(use_enable lmdb) \
- $(use_with glusterfs) \
- $(use_with rados) \
- $(use_with rados-striper) \
- $(use_with cephfs) \
- $(use_with jansson) \
- "
-
- econf \
- --libdir=/usr/$(get_libdir) \
- --docdir=/usr/share/doc/${PF} \
- --htmldir=/usr/share/doc/${PF}/html \
- --with-pid-dir=/run/bareos \
- --sysconfdir=/etc \
- --with-subsys-dir=/run/lock/subsys \
- --with-working-dir=/var/lib/bareos \
- --with-logdir=/var/log/bareos \
- --with-scriptdir=/usr/libexec/bareos \
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
- --with-dir-user=bareos \
- --with-dir-group=bareos \
- --with-sd-user=root \
- --with-sd-group=bareos \
- --with-fd-user=root \
- --with-fd-group=bareos \
- --with-sbin-perm=0755 \
- --with-systemd \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --enable-batch-insert \
- --disable-afs \
- --host=${CHOST} \
- ${myconf}
- # correct configuration for QT based bat
- if use qt4 ; then
- pushd src/qt-console
- eqmake4
- popd
- pushd src/qt-tray-monitor
- eqmake4
- popd
- fi
-}
-
-src_compile() {
- # workaround for build failing with high -j values
- # if ndmp is enabled
- use ndmp && MAKEOPTS="$MAKEOPTS -j1"
-
- # Make build log verbose (bug #447806)
- emake NO_ECHO=""
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- newicon src/images/bareos_logo_shadow.png bareos.png
-
- # install bat icon and desktop file when enabled
- # (for some reason ./configure doesn't pick this up)
- if use qt4 && ! use static ; then
- doicon src/images/bat.png
- domenu scripts/bat.desktop
- fi
-
- # 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,startmysql,stopmysql}
- rm -f "${D}"/usr/sbin/bareos
-
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
-
- # 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}"/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}"/scripts/logwatch >&/dev/null || die
- emake DESTDIR="${D}" install
- popd >&/dev/null || die
- fi
- fi
-
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bat.1*
- fi
- 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
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
- fi
-
- # documentation
- dodoc README.md
- use ndmp && dodoc README.NDMP
- use scsi-crypto && dodoc README.scsicrypto
-
- # vim-files
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins scripts/bareos.vim
- insinto /usr/share/vim/vimfiles/ftdetect
- newins scripts/filetype.vim bareos_ft.vim
- fi
-
- # setup init scripts
- myscripts="bareos-fd"
- if ! use clientonly; then
- if use director; then
- myscripts="${myscripts} bareos-dir"
- fi
- if use storage-daemon; then
- myscripts="${myscripts} bareos-sd"
- fi
- fi
- for script in ${myscripts}; do
- # copy over init script and config to a temporary location
- # so we can modify them as needed
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
-
- # now set the database dependency for the director init script
- case "${script}" in
- bareos-dir)
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
- ;;
- *)
- ;;
- esac
-
- # install init script and config
- newinitd "${T}/${script}".initd "${script}"
- newconfd "${T}/${script}".confd "${script}"
- done
-
- # make sure the working directory exists
- diropts -m0750
- keepdir /var/lib/bareos
-
- # make sure bareos group can execute bareos libexec scripts
- fowners -R root:bareos /usr/libexec/bareos
-}
-
-pkg_postinst() {
- 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 databases with:"
- if use postgres; then
- einfo
- einfo "For postgresql:"
- 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'"
- fi
- if use mysql; then
- einfo
- einfo "For mysql:"
- einfo
- einfo " Make sure root has direct access to your mysql server. You may want to"
- einfo " create a /root/.my.cnf file with"
- einfo " [client]"
- einfo " user=root"
- einfo " password=YourPasswordForAccessingMysqlAsRoot"
- einfo " before running:"
- einfo " /usr/libexec/bareos/create_bareos_database mysql"
- einfo " /usr/libexec/bareos/make_bareos_tables mysql"
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
- fi
- einfo
- fi
-
- if use sqlite; then
- einfo
- einfo "Be aware that Bareos does not officially support SQLite database."
- einfo "Best use it only for a client-only installation. See Bug #445540."
- einfo
- einfo "It is strongly recommended to use either postgresql or mysql as"
- einfo "catalog database backend."
- einfo
- fi
-
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
- einfo "you have to enable 'USE=qt4'."
- einfo
-}
diff --git a/app-backup/bareos/bareos-16.2.4.ebuild b/app-backup/bareos/bareos-16.2.4.ebuild
deleted file mode 100644
index a90878f4449..00000000000
--- a/app-backup/bareos/bareos-16.2.4.ebuild
+++ /dev/null
@@ -1,428 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads"
-
-inherit eutils multilib python-single-r1 qt4-r2 user
-
-DESCRIPTION="Featureful client/server network backup suite"
-HOMEPAGE="http://www.bareos.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="mirror"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
- logwatch mysql ndmp postgres python qt4 rados rados-striper readline scsi-crypto
- sql-pooling +sqlite ssl static +storage-daemon tcpd vim-syntax"
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
-
-DEPEND="
- !app-backup/bacula
- cephfs? ( sys-cluster/ceph )
- rados? ( sys-cluster/ceph )
- rados-striper? ( >=sys-cluster/ceph-0.94.2 )
- glusterfs? ( sys-cluster/glusterfs )
- lmdb? ( dev-db/lmdb )
- dev-libs/gmp:0
- !clientonly? (
- postgres? ( dev-db/postgresql:*[threads] )
- mysql? ( virtual/mysql )
- sqlite? ( dev-db/sqlite:3 )
- director? (
- virtual/mta
- jansson? ( dev-libs/jansson )
- )
- )
- qt4? (
- dev-qt/qtsvg:4
- x11-libs/qwt:5
- )
- fastlz? ( dev-libs/bareos-fastlzlib )
- logwatch? ( sys-apps/logwatch )
- tcpd? ( sys-apps/tcp-wrappers )
- readline? ( sys-libs/readline:0 )
- static? (
- acl? ( virtual/acl[static-libs] )
- sys-libs/zlib[static-libs]
- dev-libs/lzo[static-libs]
- sys-libs/ncurses:=[static-libs]
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0=[static-libs] )
- libressl? ( dev-libs/libressl:0=[static-libs] )
- )
- gnutls? ( net-libs/gnutls[static-libs] )
- )
- )
- !static? (
- acl? ( virtual/acl )
- dev-libs/lzo
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- gnutls? ( net-libs/gnutls )
- )
- sys-libs/ncurses:=
- sys-libs/zlib
- )
- python? ( ${PYTHON_DEPS} )
- "
-RDEPEND="${DEPEND}
- !clientonly? (
- storage-daemon? (
- sys-block/mtx
- app-arch/mt-st
- )
- )
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
-
-REQUIRED_USE="static? ( clientonly )
- python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${PN}-Release-${PV}
-
-pkg_setup() {
- use mysql && export mydbtypes+="mysql"
- use postgres && export mydbtypes+=" postgresql"
- use sqlite && export mydbtypes+=" sqlite"
-
- # create the daemon group and user
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
- enewgroup bareos
- einfo
- einfo "The group 'bareos' has been created. Any users you add to this"
- einfo "group have access to files created by the daemons."
- einfo
- fi
-
- if use clientonly && use static && use qt4; then
- ewarn
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
- ewarn
- fi
-
- if ! use clientonly; then
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
- einfo
- einfo "The user 'bareos' has been created. Please see the bareos manual"
- einfo "for information about running bareos as a non-root user."
- einfo
- fi
- fi
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # adjusts default configuration files for several binaries
- # to /etc/bareos/<config> instead of ./<config>
- pushd src >&/dev/null || die
- for f in console/console.c dird/dird.c filed/filed.c \
- stored/bcopy.c stored/bextract.c stored/bls.c \
- stored/bscan.c stored/btape.c stored/stored.c \
- qt-console/main.cpp; do
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
- || die "sed on ${f} failed"
- done
- popd >&/dev/null || die
-
- # bug 466690 Use CXXFLAGS instead of CFLAGS
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
-
- # stop build for errors in subdirs
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
-
- # bat needs to respect LDFLAGS
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
-
- # do not strip binaries
- for d in filed console dird stored; do
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
- done
-}
-
-src_configure() {
- local myconf=''
-
- addpredict /var/lib/logrotate.status
-
- if use clientonly; then
- myconf="${myconf} \
- $(use_enable clientonly client-only) \
- $(use_enable !static libtool) \
- $(use_enable static static-cons) \
- $(use_enable static static-fd)"
- fi
-
- # do not build bat and traymonitor if 'static' clientonly
- if ! use clientonly || ! use static; then
- myconf="${myconf} \
- $(use_enable qt4 bat) \
- $(use_enable qt4 traymonitor)"
- fi
-
- myconf="${myconf} \
- $(use_with X x) \
- $(use_enable acl) \
- $(use_enable ipv6) \
- $(use_enable ndmp) \
- $(use_enable readline) \
- $(use_enable !readline conio) \
- $(use_enable scsi-crypto) \
- $(use_enable sql-pooling) \
- $(use_with fastlz) \
- $(use_with mysql) \
- $(use_with postgres postgresql) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with sqlite sqlite3) \
- $(use sqlite || echo "--without-sqlite3") \
- $(use_with ssl openssl) \
- $(use_with tcpd tcp-wrappers) \
- $(use_enable lmdb) \
- $(use_with glusterfs) \
- $(use_with rados) \
- $(use_with rados-striper) \
- $(use_with cephfs) \
- $(use_with jansson) \
- "
-
- econf \
- --libdir=/usr/$(get_libdir) \
- --docdir=/usr/share/doc/${PF} \
- --htmldir=/usr/share/doc/${PF}/html \
- --with-pid-dir=/run/bareos \
- --sysconfdir=/etc \
- --with-subsys-dir=/run/lock/subsys \
- --with-working-dir=/var/lib/bareos \
- --with-logdir=/var/log/bareos \
- --with-scriptdir=/usr/libexec/bareos \
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
- --with-dir-user=bareos \
- --with-dir-group=bareos \
- --with-sd-user=root \
- --with-sd-group=bareos \
- --with-fd-user=root \
- --with-fd-group=bareos \
- --with-sbin-perm=0755 \
- --with-systemd \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --enable-batch-insert \
- --disable-afs \
- --host=${CHOST} \
- ${myconf}
- # correct configuration for QT based bat
- if use qt4 ; then
- pushd src/qt-console
- eqmake4
- popd
- pushd src/qt-tray-monitor
- eqmake4
- popd
- fi
-}
-
-src_compile() {
- # workaround for build failing with high -j values
- # if ndmp is enabled
- use ndmp && MAKEOPTS="$MAKEOPTS -j1"
-
- # Make build log verbose (bug #447806)
- emake NO_ECHO=""
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- newicon src/images/bareos_logo_shadow.png bareos.png
-
- # install bat icon and desktop file when enabled
- # (for some reason ./configure doesn't pick this up)
- if use qt4 && ! use static ; then
- doicon src/images/bat.png
- domenu scripts/bat.desktop
- fi
-
- # 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,startmysql,stopmysql}
- rm -f "${D}"/usr/sbin/bareos
-
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
-
- # 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}"/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}"/scripts/logwatch >&/dev/null || die
- emake DESTDIR="${D}" install
- popd >&/dev/null || die
- fi
- fi
-
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bat.1*
- fi
- 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
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
- fi
-
- # documentation
- dodoc README.md
- use ndmp && dodoc README.NDMP
- use scsi-crypto && dodoc README.scsicrypto
-
- # vim-files
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins scripts/bareos.vim
- insinto /usr/share/vim/vimfiles/ftdetect
- newins scripts/filetype.vim bareos_ft.vim
- fi
-
- # setup init scripts
- myscripts="bareos-fd"
- if ! use clientonly; then
- if use director; then
- myscripts="${myscripts} bareos-dir"
- fi
- if use storage-daemon; then
- myscripts="${myscripts} bareos-sd"
- fi
- fi
- for script in ${myscripts}; do
- # copy over init script and config to a temporary location
- # so we can modify them as needed
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
-
- # now set the database dependency for the director init script
- case "${script}" in
- bareos-dir)
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
- ;;
- *)
- ;;
- esac
-
- # install init script and config
- newinitd "${T}/${script}".initd "${script}"
- newconfd "${T}/${script}".confd "${script}"
- done
-
- # make sure the working directory exists
- diropts -m0750
- keepdir /var/lib/bareos
-
- # make sure bareos group can execute bareos libexec scripts
- fowners -R root:bareos /usr/libexec/bareos
-}
-
-pkg_postinst() {
- 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 databases with:"
- if use postgres; then
- einfo
- einfo "For postgresql:"
- 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'"
- fi
- if use mysql; then
- einfo
- einfo "For mysql:"
- einfo
- einfo " Make sure root has direct access to your mysql server. You may want to"
- einfo " create a /root/.my.cnf file with"
- einfo " [client]"
- einfo " user=root"
- einfo " password=YourPasswordForAccessingMysqlAsRoot"
- einfo " before running:"
- einfo " /usr/libexec/bareos/create_bareos_database mysql"
- einfo " /usr/libexec/bareos/make_bareos_tables mysql"
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
- fi
- einfo
- fi
-
- if use sqlite; then
- einfo
- einfo "Be aware that Bareos does not officially support SQLite database."
- einfo "Best use it only for a client-only installation. See Bug #445540."
- einfo
- einfo "It is strongly recommended to use either postgresql or mysql as"
- einfo "catalog database backend."
- einfo
- fi
-
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
- einfo "you have to enable 'USE=qt4'."
- einfo
-}
diff --git a/app-backup/bareos/bareos-16.2.7.ebuild b/app-backup/bareos/bareos-16.2.7.ebuild
deleted file mode 100644
index 099882b6e3d..00000000000
--- a/app-backup/bareos/bareos-16.2.7.ebuild
+++ /dev/null
@@ -1,428 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads"
-
-inherit eutils multilib python-single-r1 qt4-r2 user
-
-DESCRIPTION="Featureful client/server network backup suite"
-HOMEPAGE="http://www.bareos.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="mirror"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
- logwatch mysql ndmp postgres python qt4 rados rados-striper readline scsi-crypto
- sql-pooling +sqlite ssl static +storage-daemon tcpd vim-syntax"
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
-
-DEPEND="
- !app-backup/bacula
- cephfs? ( sys-cluster/ceph )
- rados? ( sys-cluster/ceph )
- rados-striper? ( >=sys-cluster/ceph-0.94.2 )
- glusterfs? ( sys-cluster/glusterfs )
- lmdb? ( dev-db/lmdb )
- dev-libs/gmp:0
- !clientonly? (
- postgres? ( dev-db/postgresql:*[threads] )
- mysql? ( virtual/mysql )
- sqlite? ( dev-db/sqlite:3 )
- director? (
- virtual/mta
- jansson? ( dev-libs/jansson )
- )
- )
- qt4? (
- dev-qt/qtsvg:4
- x11-libs/qwt:5
- )
- fastlz? ( dev-libs/bareos-fastlzlib )
- logwatch? ( sys-apps/logwatch )
- tcpd? ( sys-apps/tcp-wrappers )
- readline? ( sys-libs/readline:0 )
- static? (
- acl? ( virtual/acl[static-libs] )
- sys-libs/zlib[static-libs]
- dev-libs/lzo[static-libs]
- sys-libs/ncurses:=[static-libs]
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0=[static-libs] )
- libressl? ( dev-libs/libressl:0=[static-libs] )
- )
- gnutls? ( net-libs/gnutls[static-libs] )
- )
- )
- !static? (
- acl? ( virtual/acl )
- dev-libs/lzo
- ssl? (
- !gnutls? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- gnutls? ( net-libs/gnutls )
- )
- sys-libs/ncurses:=
- sys-libs/zlib
- )
- python? ( ${PYTHON_DEPS} )
- "
-RDEPEND="${DEPEND}
- !clientonly? (
- storage-daemon? (
- sys-block/mtx
- app-arch/mt-st
- )
- )
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
-
-REQUIRED_USE="static? ( clientonly )
- python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${PN}-Release-${PV}
-
-pkg_setup() {
- use mysql && export mydbtypes+="mysql"
- use postgres && export mydbtypes+=" postgresql"
- use sqlite && export mydbtypes+=" sqlite"
-
- # create the daemon group and user
- if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
- enewgroup bareos
- einfo
- einfo "The group 'bareos' has been created. Any users you add to this"
- einfo "group have access to files created by the daemons."
- einfo
- fi
-
- if use clientonly && use static && use qt4; then
- ewarn
- ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
- ewarn
- fi
-
- if ! use clientonly; then
- if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
- enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
- einfo
- einfo "The user 'bareos' has been created. Please see the bareos manual"
- einfo "for information about running bareos as a non-root user."
- einfo
- fi
- fi
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # adjusts default configuration files for several binaries
- # to /etc/bareos/<config> instead of ./<config>
- pushd src >&/dev/null || die
- for f in console/console.c dird/dird.c filed/filed.c \
- stored/bcopy.c stored/bextract.c stored/bls.c \
- stored/bscan.c stored/btape.c stored/stored.c \
- qt-console/main.cpp; do
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
- || die "sed on ${f} failed"
- done
- popd >&/dev/null || die
-
- # bug 466690 Use CXXFLAGS instead of CFLAGS
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
-
- # stop build for errors in subdirs
- epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
-
- # bat needs to respect LDFLAGS
- epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
-
- # do not strip binaries
- for d in filed console dird stored; do
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
- done
-}
-
-src_configure() {
- local myconf=''
-
- addpredict /var/lib/logrotate.status
-
- if use clientonly; then
- myconf="${myconf} \
- $(use_enable clientonly client-only) \
- $(use_enable !static libtool) \
- $(use_enable static static-cons) \
- $(use_enable static static-fd)"
- fi
-
- # do not build bat and traymonitor if 'static' clientonly
- if ! use clientonly || ! use static; then
- myconf="${myconf} \
- $(use_enable qt4 bat) \
- $(use_enable qt4 traymonitor)"
- fi
-
- myconf="${myconf} \
- $(use_with X x) \
- $(use_enable acl) \
- $(use_enable ipv6) \
- $(use_enable ndmp) \
- $(use_enable readline) \
- $(use_enable !readline conio) \
- $(use_enable scsi-crypto) \
- $(use_enable sql-pooling) \
- $(use_with fastlz) \
- $(use_with mysql) \
- $(use_with postgres postgresql) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with sqlite sqlite3) \
- $(use sqlite || echo "--without-sqlite3") \
- $(use_with ssl openssl) \
- $(use_with tcpd tcp-wrappers) \
- $(use_enable lmdb) \
- $(use_with glusterfs) \
- $(use_with rados) \
- $(use_with rados-striper) \
- $(use_with cephfs) \
- $(use_with jansson) \
- "
-
- econf \
- --libdir=/usr/$(get_libdir) \
- --docdir=/usr/share/doc/${PF} \
- --htmldir=/usr/share/doc/${PF}/html \
- --with-pid-dir=/run/bareos \
- --sysconfdir=/etc \
- --with-subsys-dir=/run/lock/subsys \
- --with-working-dir=/var/lib/bareos \
- --with-logdir=/var/log/bareos \
- --with-scriptdir=/usr/libexec/bareos \
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
- --with-dir-user=bareos \
- --with-dir-group=bareos \
- --with-sd-user=root \
- --with-sd-group=bareos \
- --with-fd-user=root \
- --with-fd-group=bareos \
- --with-sbin-perm=0755 \
- --with-systemd \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --enable-batch-insert \
- --disable-afs \
- --host=${CHOST} \
- ${myconf}
- # correct configuration for QT based bat
- if use qt4 ; then
- pushd src/qt-console
- eqmake4
- popd
- pushd src/qt-tray-monitor
- eqmake4
- popd
- fi
-}
-
-src_compile() {
- # workaround for build failing with high -j values
- # if ndmp is enabled
- use ndmp && MAKEOPTS="$MAKEOPTS -j1"
-
- # Make build log verbose (bug #447806)
- emake NO_ECHO=""
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- newicon src/images/bareos_logo_shadow.png bareos.png
-
- # install bat icon and desktop file when enabled
- # (for some reason ./configure doesn't pick this up)
- if use qt4 && ! use static ; then
- doicon src/images/bat.png
- domenu scripts/bat.desktop
- fi
-
- # 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,startmysql,stopmysql}
- rm -f "${D}"/usr/sbin/bareos
-
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
-
- # 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}"/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}"/scripts/logwatch >&/dev/null || die
- emake DESTDIR="${D}" install
- popd >&/dev/null || die
- fi
- fi
-
- rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bat.1*
- fi
- 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
- if ! use qt4; then
- rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
- fi
-
- # documentation
- dodoc README.md
- use ndmp && dodoc README.NDMP
- use scsi-crypto && dodoc README.scsicrypto
-
- # vim-files
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins scripts/bareos.vim
- insinto /usr/share/vim/vimfiles/ftdetect
- newins scripts/filetype.vim bareos_ft.vim
- fi
-
- # setup init scripts
- myscripts="bareos-fd"
- if ! use clientonly; then
- if use director; then
- myscripts="${myscripts} bareos-dir"
- fi
- if use storage-daemon; then
- myscripts="${myscripts} bareos-sd"
- fi
- fi
- for script in ${myscripts}; do
- # copy over init script and config to a temporary location
- # so we can modify them as needed
- cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd"
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
-
- # now set the database dependency for the director init script
- case "${script}" in
- bareos-dir)
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
- ;;
- *)
- ;;
- esac
-
- # install init script and config
- newinitd "${T}/${script}".initd "${script}"
- newconfd "${T}/${script}".confd "${script}"
- done
-
- # make sure the working directory exists
- diropts -m0750
- keepdir /var/lib/bareos
-
- # make sure bareos group can execute bareos libexec scripts
- fowners -R root:bareos /usr/libexec/bareos
-}
-
-pkg_postinst() {
- 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 databases with:"
- if use postgres; then
- einfo
- einfo "For postgresql:"
- 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'"
- fi
- if use mysql; then
- einfo
- einfo "For mysql:"
- einfo
- einfo " Make sure root has direct access to your mysql server. You may want to"
- einfo " create a /root/.my.cnf file with"
- einfo " [client]"
- einfo " user=root"
- einfo " password=YourPasswordForAccessingMysqlAsRoot"
- einfo " before running:"
- einfo " /usr/libexec/bareos/create_bareos_database mysql"
- einfo " /usr/libexec/bareos/make_bareos_tables mysql"
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
- fi
- einfo
- fi
-
- if use sqlite; then
- einfo
- einfo "Be aware that Bareos does not officially support SQLite database."
- einfo "Best use it only for a client-only installation. See Bug #445540."
- einfo
- einfo "It is strongly recommended to use either postgresql or mysql as"
- einfo "catalog database backend."
- einfo
- fi
-
- einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
- einfo "you have to enable 'USE=qt4'."
- einfo
-}
diff --git a/app-backup/bareos/files/bareos-dir.confd b/app-backup/bareos/files/bareos-dir.confd
deleted file mode 100644
index 5503131f8f3..00000000000
--- a/app-backup/bareos/files/bareos-dir.confd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2013 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 -c /etc/bareos/bareos-dir.conf"
diff --git a/app-backup/bareos/files/bareos-fd.confd b/app-backup/bareos/files/bareos-fd.confd
deleted file mode 100644
index cd7ac02c50d..00000000000
--- a/app-backup/bareos/files/bareos-fd.confd
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 1999-2013 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 -c /etc/bareos/bareos-fd.conf"
diff --git a/app-backup/bareos/files/bareos-sd.confd b/app-backup/bareos/files/bareos-sd.confd
deleted file mode 100644
index 017c80bafdf..00000000000
--- a/app-backup/bareos/files/bareos-sd.confd
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2013 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 -c /etc/bareos/bareos-sd.conf"
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2018-10-27 21:01 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2018-10-27 21:01 UTC (permalink / raw
To: gentoo-commits
commit: e8fb9eb76185b0f7d6d8484e1417f5a5a4ea0af3
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 26 21:48:11 2018 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 21:01:04 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8fb9eb7
app-backup/bareos: added version 17.2.6
Fixes: 642658
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.10
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-17.2.6.ebuild | 388 +++++++++++++++++++++++++++++
app-backup/bareos/files/bareos-dir.service | 13 +
app-backup/bareos/files/bareos-fd.service | 12 +
app-backup/bareos/files/bareos-sd.service | 12 +
5 files changed, 426 insertions(+)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 3805dbf289d..5943022b495 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1 +1,2 @@
DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00
+DIST bareos-17.2.6.tar.gz 4181984 BLAKE2B a1666b38626228ebf00f6a42f1a5b74c78c26a7178fa5333c9c8fb24ccfda146d20c35d35cbe43b6f53ba1b0ce1dd9b8ad30309997689c39493b51a0db9f5c9b SHA512 5f5ac8cfe028c97fa3120e149f1eb029406b74530517bf6e21574bd726e26c6b78740977635b45cbc2232fda0ee28f1b4338d91a8fa0a86ba05209cce82cd0b2
diff --git a/app-backup/bareos/bareos-17.2.6.ebuild b/app-backup/bareos/bareos-17.2.6.ebuild
new file mode 100644
index 00000000000..25469bc0f10
--- /dev/null
+++ b/app-backup/bareos/bareos-17.2.6.ebuild
@@ -0,0 +1,388 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit eutils multilib python-single-r1 systemd user
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bareos.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
+ logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto
+ sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax"
+REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
+
+DEPEND="
+ !app-backup/bacula
+ cephfs? ( sys-cluster/ceph )
+ rados? ( sys-cluster/ceph )
+ rados-striper? ( >=sys-cluster/ceph-0.94.2 )
+ glusterfs? ( sys-cluster/glusterfs )
+ lmdb? ( dev-db/lmdb )
+ dev-libs/gmp:0
+ !clientonly? (
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson )
+ )
+ )
+ fastlz? ( dev-libs/bareos-fastlzlib )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ gnutls? ( net-libs/gnutls[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ dev-libs/lzo
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ gnutls? ( net-libs/gnutls )
+ )
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ )
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}
+ !clientonly? (
+ storage-daemon? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="static? ( clientonly )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+pkg_setup() {
+ use mysql && export mydbtypes+="mysql"
+ use postgres && export mydbtypes+=" postgresql"
+ use sqlite && export mydbtypes+=" sqlite"
+
+ # create the daemon group and user
+ if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
+ enewgroup bareos
+ einfo
+ einfo "The group 'bareos' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if ! use clientonly; then
+ if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
+ enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bareos' has been created. Please see the bareos manual"
+ einfo "for information about running bareos as a non-root user."
+ einfo
+ fi
+ fi
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # adjusts default configuration files for several binaries
+ # to /etc/bareos/<config> instead of ./<config>
+ pushd src >&/dev/null || die
+ for f in console/console.c dird/dird.c filed/filed.c \
+ stored/bcopy.c stored/bextract.c stored/bls.c \
+ stored/bscan.c stored/btape.c stored/stored.c; do
+ sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
+ || die "sed on ${f} failed"
+ done
+ popd >&/dev/null || die
+
+ # enables default database driver in catalog
+ pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \
+ || die "sed on MyCatalog.conf.in failed"
+ popd >&/dev/null || die
+
+ # bug 466690 Use CXXFLAGS instead of CFLAGS
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+
+ # do not strip binaries
+ for d in filed console dird stored; do
+ sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
+ done
+
+ eapply_user
+}
+
+src_configure() {
+ local myconf=''
+
+ addpredict /var/lib/logrotate.status
+
+ if use clientonly; then
+ myconf="${myconf} \
+ $(use_enable clientonly client-only) \
+ $(use_enable !static libtool) \
+ $(use_enable static static-cons) \
+ $(use_enable static static-fd)"
+ fi
+
+ myconf="${myconf} \
+ $(use_with X x) \
+ $(use_enable acl) \
+ $(use_enable ipv6) \
+ $(use_enable ndmp) \
+ $(use_enable readline) \
+ $(use_enable !readline conio) \
+ $(use_enable scsi-crypto) \
+ $(use_enable sql-pooling) \
+ $(use_with fastlz) \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with sqlite sqlite3) \
+ $(use sqlite || echo "--without-sqlite3") \
+ $(use_with ssl openssl) \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_enable lmdb) \
+ $(use_with glusterfs) \
+ $(use_with rados) \
+ $(use_with rados-striper) \
+ $(use_with cephfs) \
+ $(use_with jansson) \
+ "
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/run/bareos \
+ --sysconfdir=/etc \
+ --with-subsys-dir=/run/lock/subsys \
+ --with-working-dir=/var/lib/bareos \
+ --with-logdir=/var/log/bareos \
+ --with-scriptdir=/usr/libexec/bareos \
+ --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
+ --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
+ --with-dir-user=bareos \
+ --with-dir-group=bareos \
+ --with-sd-user=root \
+ --with-sd-group=bareos \
+ --with-fd-user=root \
+ --with-fd-group=bareos \
+ --with-sbin-perm=0755 \
+ --with-systemd \
+ --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \
+ --enable-dynamic-cats-backends \
+ --enable-dynamic-storage-backends \
+ --enable-batch-insert \
+ --disable-afs \
+ --host=${CHOST} \
+ ${myconf}
+}
+
+src_compile() {
+ # Make build log verbose (bug #447806)
+ emake NO_ECHO=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newicon src/images/bareos_logo_shadow.png bareos.png
+
+ # 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,startmysql,stopmysql}
+ rm -f "${D}"/usr/sbin/bareos
+
+ # remove upstream init scripts
+ rm -f "${D}"/etc/init.d/bareos-*
+
+ # 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}"/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}"/scripts/logwatch >&/dev/null || die
+ emake DESTDIR="${D}" install
+ 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
+ use ndmp && dodoc README.NDMP
+ use scsi-crypto && dodoc README.scsicrypto
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/bareos.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins scripts/filetype.vim bareos_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bareos-fd"
+ if ! use clientonly; then
+ if use director; then
+ myscripts="${myscripts} bareos-dir"
+ fi
+ if use storage-daemon; then
+ myscripts="${myscripts} bareos-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # install systemd unit files
+ use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
+ use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
+ systemd_dounit "${FILESDIR}"/bareos-fd.service
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bareos
+
+ # make sure bareos group can execute bareos libexec scripts
+ fowners -R root:bareos /usr/libexec/bareos
+}
+
+pkg_postinst() {
+ 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:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ einfo
+ fi
+}
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service
new file mode 100644
index 00000000000..440d3c3be98
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.service
@@ -0,0 +1,13 @@
+[Unit]
+ Description=Bareos Director
+ After=syslog.target network.target
+ Requires=bareos-sd.service bareos-fd.service
+
+[Install]
+ WantedBy=multi-user.target
+
+[Service]
+ Type=forking
+ User=root
+ ExecStartPre=-/bin/mkdir /run/bareos
+ ExecStart=/usr/sbin/bareos-dir
diff --git a/app-backup/bareos/files/bareos-fd.service b/app-backup/bareos/files/bareos-fd.service
new file mode 100644
index 00000000000..10328609425
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.service
@@ -0,0 +1,12 @@
+[Unit]
+ Description=Bareos File Daemon
+ After=syslog.target network.target
+
+[Install]
+ WantedBy=multi-user.target
+
+[Service]
+ Type=forking
+ User=root
+ ExecStartPre=-/bin/mkdir /run/bareos
+ ExecStart=/usr/sbin/bareos-fd
diff --git a/app-backup/bareos/files/bareos-sd.service b/app-backup/bareos/files/bareos-sd.service
new file mode 100644
index 00000000000..6c617ec6a37
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.service
@@ -0,0 +1,12 @@
+[Unit]
+ Description=Bareos Storage Daemon
+ After=syslog.target network-online.target
+
+[Install]
+ WantedBy=multi-user.target
+
+[Service]
+ Type=forking
+ User=root
+ ExecStartPre=-/bin/mkdir /run/bareos
+ ExecStart=/usr/sbin/bareos-sd
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2019-02-14 22:17 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2019-02-14 22:17 UTC (permalink / raw
To: gentoo-commits
commit: 44d1f62a4b2d7bdf2a06c814f9696cdf941943a1
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 22:17:08 2019 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 22:17:45 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d1f62a
app-backup/bareos: add new version 18.2.6
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-18.2.6.ebuild | 409 +++++++++++++++++++++
app-backup/bareos/files/bareos-cmake-gentoo.patch | 11 +
app-backup/bareos/files/bareos-cmake-rados.patch | 21 ++
.../bareos-cmake-symlink-default-db-backend.patch | 9 +
app-backup/bareos/files/bareos-dir.confd | 17 +
app-backup/bareos/files/bareos-fd.confd | 7 +
app-backup/bareos/files/bareos-sd.confd | 10 +
8 files changed, 485 insertions(+)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 74dba976b02..c57ee6ad7ec 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,3 +1,4 @@
DIST bareos-16.2.7.tar.gz 4282998 BLAKE2B 9101a49d1178e0bcc4843cc4472a2082827a7bd7595389c0fa3699d36651ca70fce674509eeaddc8f806a5df1dba6afc89c05be183e7561e013d23bd157ef294 SHA512 028f38dd77fed5e3af6ee50aa44cb2f82349bd38e40eadebc552a95100166291ae0c68073daa2513919da330c66bb54a3050f1d99cbf3b5354f2450a789f6c00
DIST bareos-17.2.6.tar.gz 4181984 BLAKE2B a1666b38626228ebf00f6a42f1a5b74c78c26a7178fa5333c9c8fb24ccfda146d20c35d35cbe43b6f53ba1b0ce1dd9b8ad30309997689c39493b51a0db9f5c9b SHA512 5f5ac8cfe028c97fa3120e149f1eb029406b74530517bf6e21574bd726e26c6b78740977635b45cbc2232fda0ee28f1b4338d91a8fa0a86ba05209cce82cd0b2
DIST bareos-17.2.7.tar.gz 4184028 BLAKE2B dc817ca3b21ea13d9dbd1e3c5691e09bc3adff535e0032e1fbcfff8d07b96b2bf21976f020d778dd16137e51283c2a3dcab78dbe28f7fb6f3a60d43938f6b770 SHA512 254eddacb067ef7e82b7a54bdfcbffd5cfa033fa045f697c7e5b5c28dd064b5e1ce9f6aa946282c60f59972beae0b1b7901882b77c3f71cf16efdd73934135cc
+DIST bareos-18.2.6.tar.gz 9991951 BLAKE2B 9fdaf852e748f0c01d06e2fd72351e7b9bf18e8fea92307fb85437441b4ce504f9c6ddbd42cd2185b6dc08158502a7db581bef662c2bd84c86c885d6b89eebba SHA512 b6618173a803db4cfc3fe7edfe8c9e4e4128195f44383cd7df5b9866da4290686ed7cb42499edec957a5d9ab8bbd92d26258ce58f13fba84fb569167956768c3
diff --git a/app-backup/bareos/bareos-18.2.6.ebuild b/app-backup/bareos/bareos-18.2.6.ebuild
new file mode 100644
index 00000000000..6a140c54f77
--- /dev/null
+++ b/app-backup/bareos/bareos-18.2.6.ebuild
@@ -0,0 +1,409 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+CMAKE_WARN_UNUSED_CLI=yes
+#CMAKE_REMOVE_MODULES=yes
+
+inherit eutils multilib python-single-r1 systemd user cmake-utils
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bareos.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb libressl
+ logwatch mysql ndmp +postgres python rados rados-striper readline scsi-crypto
+ sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax"
+REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
+
+DEPEND="
+ !app-backup/bacula
+ cephfs? ( sys-cluster/ceph )
+ rados? ( sys-cluster/ceph )
+ rados-striper? ( >=sys-cluster/ceph-0.94.2 )
+ glusterfs? ( sys-cluster/glusterfs )
+ lmdb? ( dev-db/lmdb )
+ dev-libs/gmp:0
+ !clientonly? (
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson )
+ )
+ )
+ fastlz? ( dev-libs/bareos-fastlzlib )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ gnutls? ( net-libs/gnutls[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ dev-libs/lzo
+ ssl? (
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ gnutls? ( net-libs/gnutls )
+ )
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ )
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}
+ !clientonly? (
+ storage-daemon? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="static? ( clientonly )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+pkg_setup() {
+ # create the daemon group and user
+ if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
+ enewgroup bareos
+ einfo
+ einfo "The group 'bareos' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if ! use clientonly; then
+ if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
+ enewuser bareos -1 -1 /var/lib/bareos bareos,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bareos' has been created. Please see the bareos manual"
+ einfo "for information about running bareos as a non-root user."
+ einfo
+ fi
+ fi
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ use mysql && export mydbtypes+=( mysql )
+ use postgres && export mydbtypes+=( postgresql )
+ use sqlite && export mydbtypes+=( sqlite )
+
+ # enables default database driver in catalog
+ pushd core/src/defaultconfigs >&/dev/null || die
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \
+ || die "sed on MyCatalog.conf.in failed"
+ popd >&/dev/null || die
+
+ epatch "${FILESDIR}/bareos-cmake-rados.patch"
+
+ # fix gentoo version detection
+ epatch "${FILESDIR}/bareos-cmake-gentoo.patch"
+
+ # fix missing DESTDIR in symlink creation
+ epatch "${FILESDIR}/bareos-cmake-symlink-default-db-backend.patch"
+
+ eapply_user
+
+ CMAKE_USE_DIR="$S/core"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=()
+
+ CMAKE_USE_DIR="$S/core"
+
+ pushd core/platforms >&/dev/null || die
+ cmake_comment_add_subdirectory '${DISTNAME}'
+ popd >&/dev/null || die
+
+ if use clientonly; then
+ mycmakeargs+=(
+ -Dclient-only=YES
+ -Dstatic-cons=$(usex static)
+ -Dstatic-fd=$(usex static)
+ )
+ fi
+
+ for useflag in acl ipv6 ndmp readline scsi-crypto sql-pooling \
+ fastlz mysql python lmdb glusterfs rados \
+ rados-striper cephfs jansson; do
+
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
+
+ mycmakeargs+=(
+ -DDEFAULT_DB_TYPE=${mydbtypes[0]}
+ -Dx=$(usex X)
+ -Dpostgresql=$(usex postgres)
+ -Dmysql=$(usex mysql)
+ -Dsqlite3=$(usex sqlite)
+ -Dopenssl=$(usex ssl)
+ -Dtcp-wrapper=$(usex tcpd)
+ -Dlibdir=/usr/$(get_libdir)
+ -Dsbindir=/usr/sbin
+ -Dmandir=/usr/share/man
+ -Ddocdir=/usr/share/doc/${PF}
+ -Dhtmldir=/usr/share/doc/${PF}/html
+ -Darchivedir=/var/lib/bareos/storage
+ -Dbsrdir=/var/lib/bareos/bsr
+ -Dpiddir=/run/bareos
+ -Dsysconfdir=/etc
+ -Dconfdir=/etc/bareos
+ -Dsubsys-dir=/run/lock/subsys
+ -Dworkingdir=/var/lib/bareos
+ -Dlogdir=/var/log/bareos
+ -Dscriptdir=/usr/libexec/bareos
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
+ -Dbackenddir=/usr/$(get_libdir)/${PN}/backend
+ -Ddir-user=bareos
+ -Ddir-group=bareos
+ -Dsd-user=root
+ -Dsd-group=bareos
+ -Dfd-user=root
+ -Dfd-group=bareos
+ -Dsbin-perm=0755
+ -Dsystemd=yes
+ -Ddb_password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1`
+ -Ddynamic-cats-backends=yes
+ -Ddynamic-storage-backends=yes
+ -Dbatch-insert=yes
+ -Dhost=${CHOST}
+ -Dcoverage=yes
+ -Dpython=yes
+ -Dsmartalloc=yes
+ -Ddir-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dfd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -Dsd-password="`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`"
+ -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`"
+ -Dbasename="`hostname -s`"
+ -Dhostname="`hostname -s`"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ #emake DESTDIR="${D}" install
+ cmake-utils_src_install
+ newicon core/src/images/bareos_logo_shadow.png bareos.png
+
+ # 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,startmysql,stopmysql}
+ rm -f "${D}"/usr/sbin/bareos
+
+ # remove upstream init scripts
+ rm -f "${D}"/etc/init.d/bareos-*
+
+ # 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}"/lib/systemd/system/bareos-dir.service
+ 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}"/lib/systemd/system/bareos-sd.service
+ 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
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # install systemd unit files
+ 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
+ fi
+ systemd_dounit core/platforms/systemd/bareos-fd.service
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bareos
+ keepdir /var/lib/bareos/storage
+
+ diropts -m0755
+ keepdir /var/log/bareos
+
+ # make sure bareos group can execute bareos libexec scripts
+ fowners -R root:bareos /usr/libexec/bareos
+}
+
+pkg_postinst() {
+ 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:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ einfo
+ fi
+}
diff --git a/app-backup/bareos/files/bareos-cmake-gentoo.patch b/app-backup/bareos/files/bareos-cmake-gentoo.patch
new file mode 100644
index 00000000000..0f67a9e5d9d
--- /dev/null
+++ b/app-backup/bareos/files/bareos-cmake-gentoo.patch
@@ -0,0 +1,11 @@
+--- 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-cmake-rados.patch b/app-backup/bareos/files/bareos-cmake-rados.patch
new file mode 100644
index 00000000000..c9a0c176692
--- /dev/null
+++ b/app-backup/bareos/files/bareos-cmake-rados.patch
@@ -0,0 +1,21 @@
+--- core/cmake/BareosCheckSymbols.cmake.orig 2018-12-05 23:39:37.307627387 +0100
++++ core/cmake/BareosCheckSymbols.cmake 2018-12-05 23:40:00.999464771 +0100
+@@ -21,7 +21,7 @@
+
+
+ CHECK_SYMBOL_EXISTS(__stub_lchmod features.h LCHMOD_IS_A_STUB1)
+-CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
++#CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
+
+
+
+@@ -43,7 +43,9 @@
+
+ cmake_push_check_state()
+ SET(CMAKE_REQUIRED_LIBRARIES ${RADOS_LIBRARIES})
++if ("${HAVE_RADOS}")
+ CHECK_SYMBOL_EXISTS(rados_ioctx_set_namespace rados/librados.h HAVE_RADOS_NAMESPACES)
+ CHECK_SYMBOL_EXISTS(rados_nobjects_list_open rados/librados.h HAVE_RADOS_NOBJECTS_LIST)
++endif()
+ cmake_pop_check_state()
+
diff --git a/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch b/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
new file mode 100644
index 00000000000..8c46fdf0dc8
--- /dev/null
+++ b/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
@@ -0,0 +1,9 @@
+--- work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake.orig 2019-01-31 12:39:26.000000000 +0100
++++ work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake 2019-02-05 11:00:24.559983661 +0100
+@@ -19,5 +19,5 @@
+ MESSAGE(STATUS "${CMAKE_COMMAND} -E create_symlink ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX} ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}
+- ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
++ $ENV{DESTDIR}/${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
+ )
diff --git a/app-backup/bareos/files/bareos-dir.confd b/app-backup/bareos/files/bareos-dir.confd
new file mode 100644
index 00000000000..6d755bf9334
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.confd
@@ -0,0 +1,17 @@
+# 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-fd.confd b/app-backup/bareos/files/bareos-fd.confd
new file mode 100644
index 00000000000..5e429a6bd31
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.confd
@@ -0,0 +1,7 @@
+# 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-sd.confd b/app-backup/bareos/files/bareos-sd.confd
new file mode 100644
index 00000000000..d0153b2b30b
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.confd
@@ -0,0 +1,10 @@
+# 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"
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2021-08-20 11:23 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2021-08-20 11:23 UTC (permalink / raw
To: gentoo-commits
commit: 1e641adb3f6db73b42ac26cb45dcfb64e4ddb07b
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 11:20:15 2021 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 11:20:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e641adb
app-backup/bareos: add new version
Closes: https://bugs.gentoo.org/761667
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-20.0.2.ebuild | 396 +++++++++++++++++++++
.../bareos/files/bareos-20.0.2-cmake-gentoo.patch | 24 ++
app-backup/bareos/metadata.xml | 3 +-
4 files changed, 423 insertions(+), 1 deletion(-)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index ec3c6292096..54825eab2ce 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,3 +1,4 @@
DIST bareos-17.2.10.tar.gz 4190783 BLAKE2B d2deb9368438b5281ea36768b80cc15840135a77a19952daa895c4e30ee6ad231d9ecf28a6d860bd372eb08c1c34f9f827843745c87f465d3a59ab048aecc001 SHA512 3e145627a08927790deb8f75e5167e6e69710733eb1866a93adb34617c274c2b51145a6b1253388784f67bc4886fec7fbb423893a36d377bb96334a2dc7768f2
DIST bareos-18.2.10.tar.gz 10558902 BLAKE2B ffeac4169131dfc28ec0c9cd9816962492a920b3309ba41a48eec37641fc35027e5f1d1f7d9bf3a7fc2ce2982899e991f4d846f42852e7fbf0643090cccf7096 SHA512 2c31029fdcabe26d36d5aab5ed91686bb0b497eef707ca8fbf82a72a62259651aae4a7516a8812141f6a8e0e2de97e16e5f008d11bb1e483f176f67397e5f69e
DIST bareos-19.2.9.tar.gz 12886739 BLAKE2B 93b01a71e0824efc8a82c62107de03a0e6df23f600e005c9a98f5f0e541b13c4181dbb11b79fdd2a6f144e1cdbc25a95b1b310576bd3b79721f757c652881626 SHA512 b480a9a8dd459b8af3ab353bc5de2f8d1498d5754416972990add8cc6c8ea40462f6bde01ae92ca23f91c96d8ac2e6daf1dae085de80f021d52c5c87dc9a103e
+DIST bareos-20.0.2.tar.gz 13333946 BLAKE2B f035fc8b98bf176bd675895b459ac78fa43575a686af11d5c43ff6b86451894d9aaa53600f87253da29dac06271c01bb269777284d903001821918405499e536 SHA512 f3a0f481a2c9b3a422f4db3e094587c97fe10e2ea5e7a8ba44e9971b0a11746ae4ad598ea469d5c8ec0dfb962e4104c00931397905aebbf3e22af49834043994
diff --git a/app-backup/bareos/bareos-20.0.2.ebuild b/app-backup/bareos/bareos-20.0.2.ebuild
new file mode 100644
index 00000000000..ac4113bf49b
--- /dev/null
+++ b/app-backup/bareos/bareos-20.0.2.ebuild
@@ -0,0 +1,396 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+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"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb
+ logwatch mysql ndmp +postgres readline scsi-crypto
+ sqlite static +storage-daemon systemd tcpd 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}
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson )
+ )
+ )
+ 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] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ acl? ( virtual/acl )
+ dev-libs/lzo
+ dev-libs/openssl:0=
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ )
+ vmware? ( dev-lang/python:2.7 )
+ "
+RDEPEND="${DEPEND}
+ !clientonly? (
+ storage-daemon? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ "
+BDEPEND="${PYTHON_DEPS}"
+
+REQUIRED_USE="
+ !clientonly? ( || ( mysql postgres sqlite ) )
+ static? ( clientonly )
+ x86? ( !ceph )
+"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+src_prepare() {
+ use mysql && export mydbtypes+=( mysql )
+ use postgres && export mydbtypes+=( postgresql )
+ use sqlite && export mydbtypes+=( sqlite )
+
+ # enables default database driver in catalog
+ pushd core/src/defaultconfigs >&/dev/null || die
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \
+ || die "sed on MyCatalog.conf.in failed"
+ popd >&/dev/null || die
+
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${P}-cmake-gentoo.patch"
+
+ # fix missing DESTDIR in symlink creation
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
+
+ # disable dird and stored plugins, because of
+ # py2 dependency
+ cd "${S}/core/src/plugins"
+ cmake_comment_add_subdirectory dird
+ cmake_comment_add_subdirectory stored
+ cd -
+
+ CMAKE_USE_DIR="$S/core"
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=()
+
+ CMAKE_USE_DIR="$S/core"
+
+ pushd core/platforms >&/dev/null || die
+ cmake_comment_add_subdirectory '${DISTNAME}'
+ popd >&/dev/null || die
+
+ 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 mysql lmdb; do
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
+
+ mycmakeargs+=(
+ -DHAVE_PYTHON=0
+ -DDEFAULT_DB_TYPE=${mydbtypes[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=yes
+ -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`"
+ -Dmysql=$(usex mysql)
+ -Dopenssl=yes
+ -Dpiddir=/run/bareos
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
+ -Dpostgresql=$(usex postgres)
+ -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
+ -Dsqlite3=$(usex sqlite)
+ -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,startmysql,stopmysql}
+ rm -f "${D}"/usr/sbin/bareos
+
+ # remove upstream init scripts
+ rm -f "${D}"/etc/init.d/bareos-*
+
+ # get rid of py2 stuff if USE=-vmware
+ if ! use vmware; then
+ rm -f "$D"/usr/lib64/bareos/plugin/{BareosFdPluginVMware.py,bareos-fd-vmware.py,python-fd.so}
+ rm -rf "$D"/usr/lib64/python2.7
+ 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
+ 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*
+ 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
+ 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*
+ 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
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # 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
+ fi
+ systemd_dounit core/platforms/systemd/bareos-fd.service
+ fi
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bareos
+ keepdir /var/lib/bareos/storage
+
+ diropts -m0755
+ 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:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ einfo
+ fi
+}
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 00000000000..9d3cf8092e1
--- /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/metadata.xml b/app-backup/bareos/metadata.xml
index bc44d44732b..6723a102a3a 100644
--- a/app-backup/bareos/metadata.xml
+++ b/app-backup/bareos/metadata.xml
@@ -6,8 +6,8 @@
<name>Marc Schiffbauer</name>
</maintainer>
<use>
- <flag name="cephfs">Enable cephfs storage backend</flag>
<flag name="ceph">Enable ceph support</flag>
+ <flag name="cephfs">Enable cephfs storage backend</flag>
<flag name="clientonly">Only install file-daemon (client)</flag>
<flag name="director">Install director</flag>
<flag name="fastlz">Enable support vor lz4, lz4hc and lzfast using dev-libs/bareos-fastlzlib</flag>
@@ -22,6 +22,7 @@
<flag name="scsi-crypto">Enable low level SCSI crypto support</flag>
<flag name="sql-pooling">Enable SQL pooling support</flag>
<flag name="storage-daemon">Install storage daemon (bareos-sd)</flag>
+ <flag name="vmware">Enable bareos-fd VMware plugin</flag>
</use>
<upstream>
<remote-id type="github">bareos/bareos</remote-id>
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2021-08-20 12:36 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2021-08-20 12:36 UTC (permalink / raw
To: gentoo-commits
commit: 4f9b633db556b1e0eec81fb835b0ea9c07001b0e
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 12:35:14 2021 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 12:35:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f9b633d
app-backup/bareos: cleanup 17.2 (EOL)
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/Manifest | 1 -
app-backup/bareos/bareos-17.2.10.ebuild | 358 ----------------------------
app-backup/bareos/files/bareos-dir.confd-16 | 17 --
app-backup/bareos/files/bareos-dir.service | 13 -
app-backup/bareos/files/bareos-fd.confd-16 | 7 -
app-backup/bareos/files/bareos-fd.service | 12 -
app-backup/bareos/files/bareos-sd.confd-16 | 10 -
app-backup/bareos/files/bareos-sd.service | 12 -
8 files changed, 430 deletions(-)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 54825eab2ce..4fc2c693c6b 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,4 +1,3 @@
-DIST bareos-17.2.10.tar.gz 4190783 BLAKE2B d2deb9368438b5281ea36768b80cc15840135a77a19952daa895c4e30ee6ad231d9ecf28a6d860bd372eb08c1c34f9f827843745c87f465d3a59ab048aecc001 SHA512 3e145627a08927790deb8f75e5167e6e69710733eb1866a93adb34617c274c2b51145a6b1253388784f67bc4886fec7fbb423893a36d377bb96334a2dc7768f2
DIST bareos-18.2.10.tar.gz 10558902 BLAKE2B ffeac4169131dfc28ec0c9cd9816962492a920b3309ba41a48eec37641fc35027e5f1d1f7d9bf3a7fc2ce2982899e991f4d846f42852e7fbf0643090cccf7096 SHA512 2c31029fdcabe26d36d5aab5ed91686bb0b497eef707ca8fbf82a72a62259651aae4a7516a8812141f6a8e0e2de97e16e5f008d11bb1e483f176f67397e5f69e
DIST bareos-19.2.9.tar.gz 12886739 BLAKE2B 93b01a71e0824efc8a82c62107de03a0e6df23f600e005c9a98f5f0e541b13c4181dbb11b79fdd2a6f144e1cdbc25a95b1b310576bd3b79721f757c652881626 SHA512 b480a9a8dd459b8af3ab353bc5de2f8d1498d5754416972990add8cc6c8ea40462f6bde01ae92ca23f91c96d8ac2e6daf1dae085de80f021d52c5c87dc9a103e
DIST bareos-20.0.2.tar.gz 13333946 BLAKE2B f035fc8b98bf176bd675895b459ac78fa43575a686af11d5c43ff6b86451894d9aaa53600f87253da29dac06271c01bb269777284d903001821918405499e536 SHA512 f3a0f481a2c9b3a422f4db3e094587c97fe10e2ea5e7a8ba44e9971b0a11746ae4ad598ea469d5c8ec0dfb962e4104c00931397905aebbf3e22af49834043994
diff --git a/app-backup/bareos/bareos-17.2.10.ebuild b/app-backup/bareos/bareos-17.2.10.ebuild
deleted file mode 100644
index bcf92fecb1c..00000000000
--- a/app-backup/bareos/bareos-17.2.10.ebuild
+++ /dev/null
@@ -1,358 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit desktop systemd
-
-DESCRIPTION="Featureful client/server network backup suite"
-HOMEPAGE="http://www.bareos.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="mirror"
-
-LICENSE="AGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="X acl cephfs clientonly +director fastlz glusterfs gnutls ipv6 jansson lmdb
- logwatch mysql ndmp +postgres rados rados-striper readline scsi-crypto
- sql-pooling sqlite ssl static +storage-daemon tcpd vim-syntax"
-REQUIRED_USE="!clientonly? ( || ( mysql postgres sqlite ) )"
-
-DEPEND="
- !app-backup/bacula
- acct-group/${PN}
- cephfs? ( sys-cluster/ceph )
- rados? ( sys-cluster/ceph )
- rados-striper? ( >=sys-cluster/ceph-0.94.2 )
- glusterfs? ( sys-cluster/glusterfs )
- lmdb? ( dev-db/lmdb )
- dev-libs/gmp:0
- !clientonly? (
- acct-user/${PN}
- postgres? ( dev-db/postgresql:*[threads] )
- mysql? ( dev-db/mysql-connector-c:0= )
- sqlite? ( dev-db/sqlite:3 )
- director? (
- virtual/mta
- jansson? ( dev-libs/jansson )
- )
- )
- fastlz? ( dev-libs/bareos-fastlzlib )
- logwatch? ( sys-apps/logwatch )
- tcpd? ( sys-apps/tcp-wrappers )
- readline? ( sys-libs/readline:0 )
- static? (
- acl? ( virtual/acl[static-libs] )
- sys-libs/zlib[static-libs]
- dev-libs/lzo[static-libs]
- sys-libs/ncurses:=[static-libs]
- ssl? (
- !gnutls? (
- dev-libs/openssl:0=[static-libs]
- )
- gnutls? ( net-libs/gnutls[static-libs] )
- )
- )
- !static? (
- acl? ( virtual/acl )
- dev-libs/lzo
- ssl? (
- !gnutls? (
- dev-libs/openssl:0=
- )
- gnutls? ( net-libs/gnutls )
- )
- 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 ) )"
-
-REQUIRED_USE="static? ( clientonly )"
-
-S=${WORKDIR}/${PN}-Release-${PV}
-
-pkg_setup() {
- use mysql && export mydbtypes+="mysql"
- use postgres && export mydbtypes+=" postgresql"
- use sqlite && export mydbtypes+=" sqlite"
-}
-
-src_prepare() {
- # adjusts default configuration files for several binaries
- # to /etc/bareos/<config> instead of ./<config>
- pushd src >&/dev/null || die
- for f in console/console.c dird/dird.c filed/filed.c \
- stored/bcopy.c stored/bextract.c stored/bls.c \
- stored/bscan.c stored/btape.c stored/stored.c; do
- sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
- || die "sed on ${f} failed"
- done
- popd >&/dev/null || die
-
- # enables default database driver in catalog
- pushd src/defaultconfigs/bareos-dir.d/catalog >&/dev/null || die
- sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE/d' MyCatalog.conf.in \
- || die "sed on MyCatalog.conf.in failed"
- popd >&/dev/null || die
-
- # bug 466690 Use CXXFLAGS instead of CFLAGS
- sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
-
- # do not strip binaries
- for d in filed console dird stored; do
- sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
- done
-
- eapply_user
-}
-
-src_configure() {
- local myconf=''
-
- addpredict /var/lib/logrotate.status
-
- if use clientonly; then
- myconf="${myconf} \
- $(use_enable clientonly client-only) \
- $(use_enable !static libtool) \
- $(use_enable static static-cons) \
- $(use_enable static static-fd)"
- fi
-
- myconf="${myconf} \
- $(use_with X x) \
- $(use_enable acl) \
- $(use_enable ipv6) \
- $(use_enable ndmp) \
- $(use_enable readline) \
- $(use_enable !readline conio) \
- $(use_enable scsi-crypto) \
- $(use_enable sql-pooling) \
- $(use_with fastlz) \
- $(use_with mysql) \
- $(use_with postgres postgresql) \
- $(use_with readline) \
- $(use_with sqlite sqlite3) \
- $(use sqlite || echo "--without-sqlite3") \
- $(use_with ssl openssl) \
- $(use_with tcpd tcp-wrappers) \
- $(use_enable lmdb) \
- $(use_with glusterfs) \
- $(use_with rados) \
- $(use_with rados-striper) \
- $(use_with cephfs) \
- $(use_with jansson) \
- "
-
- econf \
- --without-python \
- --with-pid-dir=/run/bareos \
- --with-subsys-dir=/run/lock/subsys \
- --with-working-dir=/var/lib/bareos \
- --with-logdir=/var/log/bareos \
- --with-scriptdir=/usr/libexec/bareos \
- --with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
- --with-backenddir=/usr/$(get_libdir)/${PN}/backend \
- --with-dir-user=bareos \
- --with-dir-group=bareos \
- --with-sd-user=root \
- --with-sd-group=bareos \
- --with-fd-user=root \
- --with-fd-group=bareos \
- --with-sbin-perm=0755 \
- --with-systemd \
- --with-db-password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` \
- --enable-dynamic-cats-backends \
- --enable-dynamic-storage-backends \
- --enable-batch-insert \
- --disable-afs \
- --host=${CHOST} \
- ${myconf}
-}
-
-src_compile() {
- # Make build log verbose (bug #447806)
- emake NO_ECHO=""
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- newicon src/images/bareos_logo_shadow.png bareos.png
-
- # 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,startmysql,stopmysql}
- rm -f "${D}"/usr/sbin/bareos
-
- # remove upstream init scripts
- rm -f "${D}"/etc/init.d/bareos-*
-
- # 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}"/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}"/scripts/logwatch >&/dev/null || die
- emake DESTDIR="${D}" install
- 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
- use ndmp && dodoc README.NDMP
- use scsi-crypto && dodoc README.scsicrypto
-
- # vim-files
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins scripts/bareos.vim
- insinto /usr/share/vim/vimfiles/ftdetect
- newins scripts/filetype.vim bareos_ft.vim
- fi
-
- # setup init scripts
- myscripts="bareos-fd"
- if ! use clientonly; then
- if use director; then
- myscripts="${myscripts} bareos-dir"
- fi
- if use storage-daemon; then
- myscripts="${myscripts} bareos-sd"
- fi
- fi
- for script in ${myscripts}; do
- # copy over init script and config to a temporary location
- # so we can modify them as needed
- cp "${FILESDIR}/${script}".confd-16 "${T}/${script}".confd || die "failed to copy ${script}.confd"
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
-
- # now set the database dependency for the director init script
- case "${script}" in
- bareos-dir)
- sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
- ;;
- *)
- ;;
- esac
-
- # install init script and config
- newinitd "${T}/${script}".initd "${script}"
- newconfd "${T}/${script}".confd "${script}"
- done
-
- # install systemd unit files
- use director && systemd_dounit "${FILESDIR}"/bareos-dir.service
- use storage-daemon && systemd_dounit "${FILESDIR}"/bareos-sd.service
- systemd_dounit "${FILESDIR}"/bareos-fd.service
-
- # make sure the working directory exists
- diropts -m0750
- keepdir /var/lib/bareos
-
- # make sure bareos group can execute bareos libexec scripts
- fowners -R root:bareos /usr/libexec/bareos
-}
-
-pkg_postinst() {
- 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:"
- if use postgres; then
- einfo
- einfo "For postgresql:"
- 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'"
- fi
- if use mysql; then
- einfo
- einfo "For mysql:"
- einfo
- einfo " Make sure root has direct access to your mysql server. You may want to"
- einfo " create a /root/.my.cnf file with"
- einfo " [client]"
- einfo " user=root"
- einfo " password=YourPasswordForAccessingMysqlAsRoot"
- einfo " before running:"
- einfo " /usr/libexec/bareos/create_bareos_database mysql"
- einfo " /usr/libexec/bareos/make_bareos_tables mysql"
- einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
- fi
- einfo
- fi
-
- if use sqlite; then
- einfo
- einfo "Be aware that Bareos does not officially support SQLite database."
- einfo "Best use it only for a client-only installation. See Bug #445540."
- einfo
- einfo "It is strongly recommended to use either postgresql or mysql as"
- einfo "catalog database backend."
- einfo
- fi
-}
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 a11eba90a75..00000000000
--- 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.service b/app-backup/bareos/files/bareos-dir.service
deleted file mode 100644
index 440d3c3be98..00000000000
--- a/app-backup/bareos/files/bareos-dir.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
- Description=Bareos Director
- After=syslog.target network.target
- Requires=bareos-sd.service bareos-fd.service
-
-[Install]
- WantedBy=multi-user.target
-
-[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-dir
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 e3b8a1f576f..00000000000
--- 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.service b/app-backup/bareos/files/bareos-fd.service
deleted file mode 100644
index 10328609425..00000000000
--- a/app-backup/bareos/files/bareos-fd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
- Description=Bareos File Daemon
- After=syslog.target network.target
-
-[Install]
- WantedBy=multi-user.target
-
-[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-fd
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 5d377b978dd..00000000000
--- 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.service b/app-backup/bareos/files/bareos-sd.service
deleted file mode 100644
index 6c617ec6a37..00000000000
--- a/app-backup/bareos/files/bareos-sd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
- Description=Bareos Storage Daemon
- After=syslog.target network-online.target
-
-[Install]
- WantedBy=multi-user.target
-
-[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-sd
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2022-02-01 10:02 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2022-02-01 10:02 UTC (permalink / raw
To: gentoo-commits
commit: bb4196df66ab885e344a752b394142c11ae7ea67
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 1 10:01:53 2022 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Tue Feb 1 10:02:18 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb4196df
app-backup/bareos: add 21.0.0
Closes: https://bugs.gentoo.org/830682
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-21.0.0.ebuild | 358 +++++++++++++++++++++
.../bareos/files/bareos-21-cmake-gentoo.patch | 12 +
app-backup/bareos/files/bareos-dir-21.confd | 10 +
app-backup/bareos/files/bareos-dir-21.initd | 31 ++
app-backup/bareos/files/bareos-dir-21.service | 32 ++
6 files changed, 444 insertions(+)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 406a45ba107a..b10d1c65a297 100644
--- a/app-backup/bareos/Manifest
+++ b/app-backup/bareos/Manifest
@@ -1,3 +1,4 @@
DIST bareos-18.2.12.tar.gz 10566403 BLAKE2B 765a5430c495b21edc0c22d6903e23d312b1dc2b94e0d2a4227c10a38be8fe638636cf32a58e8aaf83b389581bf1348b4d27be6886f61180c20496acbd0eb015 SHA512 1d308d3021e8277832ce933fbafdf514bc194a1a2a2d761e66fb26ec2af419d19ae38894a7cb56e036c5af003bf640117b5a11954d478b35e13a02007f99f4de
DIST bareos-19.2.11.tar.gz 12890679 BLAKE2B 2872e4eed8186f024211faeefcb5b38448f38d90a2c7c73ef8fa1e51d3a917344a7acbe09a01d0205ad312ec136161eb1b0aa28dcceabbf71d78206a724602b0 SHA512 46769f6e26068669c2656ed8afc73dbd6f07a88d65cf557193684c130bdb93567f3ab06374484be499e5edb7bdd32013edecb05ff19843d3d806a38ca1892749
DIST bareos-20.0.3.tar.gz 13335390 BLAKE2B c35ab9fd290377fc56ae8ff87f54b1cde5d1b7caa89b9c97e259da48da4e07fa85cba38c5a4d461b7ce170f9b14a69f78ad217584abb77ee15d3e85080cbe49b SHA512 3f9bf020e0d519da75221ebd200634713c791e2fdc90a13482ffb3294912d5e2ee28f8338dbef06ba6c98727bae447f6f8bb8d4a06520001f7cefa3614769082
+DIST bareos-21.0.0.tar.gz 11306618 BLAKE2B 0363465c40a8053bb5ec772c18ac0dc852f379979e3afc45dd29c79f8187238363c1f07e2f39d25613404b1b6e253700b33b274389ca2dc4655d201bc4888166 SHA512 0a57bccca0589f3ce8a5664afbeb1eb1b17ec7142722e2d0bb2a0bbd9007688725b39c6db59646c180ce096e55451c09934e6479a2b4deeb4d3ee738ab2c32cd
diff --git a/app-backup/bareos/bareos-21.0.0.ebuild b/app-backup/bareos/bareos-21.0.0.ebuild
new file mode 100644
index 000000000000..3a2b763a61dd
--- /dev/null
+++ b/app-backup/bareos/bareos-21.0.0.ebuild
@@ -0,0 +1,358 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+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"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb
+ logwatch ndmp readline scsi-crypto
+ static +storage-daemon systemd tcpd 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
+ jansson? ( dev-libs/jansson:= )
+ )
+ )
+ 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] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ acl? ( virtual/acl )
+ 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}"
+
+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_prepare() {
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${PN}-21-cmake-gentoo.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
+
+ # 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-21"
+ fi
+ if use storage-daemon; then
+ myscripts+=" bareos-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script/-21/}"
+ newconfd "${T}/${script}".confd "${script/-21/}"
+ done
+
+ # install systemd unit files
+ if use systemd; then
+ if ! use clientonly; then
+ use director && systemd_dounit "${FILESDIR}"/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
+
+ diropts -m0755
+ 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 postgresql'"
+ einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
+ einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
+ einfo
+ fi
+}
diff --git a/app-backup/bareos/files/bareos-21-cmake-gentoo.patch b/app-backup/bareos/files/bareos-21-cmake-gentoo.patch
new file mode 100644
index 000000000000..e42bf91a91fd
--- /dev/null
+++ b/app-backup/bareos/files/bareos-21-cmake-gentoo.patch
@@ -0,0 +1,12 @@
+diff -ur bareos-Release-21.0.0.orig/core/platforms/CMakeLists.txt bareos-Release-21.0.0/core/platforms/CMakeLists.txt
+--- bareos-Release-21.0.0.orig/core/platforms/CMakeLists.txt 2021-12-21 01:00:49.000000000 -1000
++++ bareos-Release-21.0.0/core/platforms/CMakeLists.txt 2022-01-30 15:09:41.949529813 -1000
+@@ -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(${BAREOS_PLATFORM} STREQUAL hpux)
+ message(STATUS "BAREOS_PLATFORM: " ${BAREOS_PLATFORM})
+ elseif(${BAREOS_PLATFORM} STREQUAL archlinux)
diff --git a/app-backup/bareos/files/bareos-dir-21.confd b/app-backup/bareos/files/bareos-dir-21.confd
new file mode 100644
index 000000000000..3ad4b7482f93
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir-21.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/bareos-dir
+
+# 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-21.initd b/app-backup/bareos/files/bareos-dir-21.initd
new file mode 100644
index 000000000000..7100b615105c
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir-21.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 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"
+ # 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-21.service b/app-backup/bareos/files/bareos-dir-21.service
new file mode 100644
index 000000000000..2f156cf8aecc
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir-21.service
@@ -0,0 +1,32 @@
+# 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
+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
+ExecReload=/usr/sbin/bareos-dir -t -f
+ExecReload=/bin/kill -HUP $MAINPID
+#Restart=on-failure
+
+[Install]
+Alias=bareos-director.service
+WantedBy=multi-user.target
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2022-02-07 7:30 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2022-02-07 7:30 UTC (permalink / raw
To: gentoo-commits
commit: f9aa2491329e3b770bfa24a8139c8fde245f1867
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 7 07:23:25 2022 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Mon Feb 7 07:30:14 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9aa2491
app-backup/bareos: fix pid file creation
Closes: https://bugs.gentoo.org/832805
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
...eos-21.0.0-r1.ebuild => bareos-21.0.0-r2.ebuild} | 11 +++--------
app-backup/bareos/files/bareos-dir-21.confd | 2 +-
app-backup/bareos/files/bareos-dir-21.initd | 17 ++++-------------
app-backup/bareos/files/bareos-fd-21.confd | 7 +++++++
app-backup/bareos/files/bareos-fd-21.initd | 21 +++++++++++++++++++++
app-backup/bareos/files/bareos-sd-21.confd | 10 ++++++++++
app-backup/bareos/files/bareos-sd-21.initd | 21 +++++++++++++++++++++
7 files changed, 67 insertions(+), 22 deletions(-)
diff --git a/app-backup/bareos/bareos-21.0.0-r1.ebuild b/app-backup/bareos/bareos-21.0.0-r2.ebuild
similarity index 96%
rename from app-backup/bareos/bareos-21.0.0-r1.ebuild
rename to app-backup/bareos/bareos-21.0.0-r2.ebuild
index 787a7074b9fc..4baeaaf6c0ec 100644
--- a/app-backup/bareos/bareos-21.0.0-r1.ebuild
+++ b/app-backup/bareos/bareos-21.0.0-r2.ebuild
@@ -332,21 +332,16 @@ src_install() {
myscripts="bareos-fd"
if ! use clientonly; then
if use director; then
- myscripts+=" bareos-dir-21"
+ myscripts+=" bareos-dir"
fi
if use storage-daemon; then
myscripts+=" bareos-sd"
fi
fi
for script in ${myscripts}; do
- # copy over init script and config to a temporary location
- # so we can modify them as needed
- cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
- cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
-
# install init script and config
- newinitd "${T}/${script}".initd "${script/-21/}"
- newconfd "${T}/${script}".confd "${script/-21/}"
+ newinitd "${FILESDIR}/${script}-21".initd "${script}"
+ newconfd "${FILESDIR}/${script}-21".confd "${script}"
done
# install systemd unit files
diff --git a/app-backup/bareos/files/bareos-dir-21.confd b/app-backup/bareos/files/bareos-dir-21.confd
index 3ad4b7482f93..4e2ee55d8924 100644
--- a/app-backup/bareos/files/bareos-dir-21.confd
+++ b/app-backup/bareos/files/bareos-dir-21.confd
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/bareos-dir
diff --git a/app-backup/bareos/files/bareos-dir-21.initd b/app-backup/bareos/files/bareos-dir-21.initd
index 7100b615105c..916ee13b36ce 100644
--- a/app-backup/bareos/files/bareos-dir-21.initd
+++ b/app-backup/bareos/files/bareos-dir-21.initd
@@ -1,5 +1,5 @@
#!/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() {
@@ -9,23 +9,14 @@ depend() {
start() {
ebegin "Starting bareos director"
- # g+w until #631598 is resolved
- checkpath -d -m 0770 -o root:bareos /run/bareos
+ checkpath -d -m 0750 -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
+ -- -p /run/bareos/bareos-dir.9101.pid ${DIR_OPTIONS}
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
+ start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid
eend $?
}
diff --git a/app-backup/bareos/files/bareos-fd-21.confd b/app-backup/bareos/files/bareos-fd-21.confd
new file mode 100644
index 000000000000..407f2a8828eb
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2022 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-21.initd b/app-backup/bareos/files/bareos-fd-21.initd
new file mode 100644
index 000000000000..f0632261a0c5
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd-21.initd
@@ -0,0 +1,21 @@
+#!/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-sd-21.confd b/app-backup/bareos/files/bareos-sd-21.confd
new file mode 100644
index 000000000000..2a67ae2b5523
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2022 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-21.initd b/app-backup/bareos/files/bareos-sd-21.initd
new file mode 100644
index 000000000000..07091dbd74c5
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd-21.initd
@@ -0,0 +1,21 @@
+#!/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 $?
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2022-03-25 7:30 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2022-03-25 7:30 UTC (permalink / raw
To: gentoo-commits
commit: 30f8233e70e490096f9412e42eb55af66159ae97
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 25 07:29:35 2022 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Fri Mar 25 07:30:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30f8233e
app-backup/bareos: rm old USE flags and patches
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/files/bareos-cmake-rados.patch | 21 ---------------------
.../bareos-cmake-symlink-default-db-backend.patch | 9 ---------
app-backup/bareos/metadata.xml | 6 ------
3 files changed, 36 deletions(-)
diff --git a/app-backup/bareos/files/bareos-cmake-rados.patch b/app-backup/bareos/files/bareos-cmake-rados.patch
deleted file mode 100644
index c9a0c176692e..000000000000
--- a/app-backup/bareos/files/bareos-cmake-rados.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- core/cmake/BareosCheckSymbols.cmake.orig 2018-12-05 23:39:37.307627387 +0100
-+++ core/cmake/BareosCheckSymbols.cmake 2018-12-05 23:40:00.999464771 +0100
-@@ -21,7 +21,7 @@
-
-
- CHECK_SYMBOL_EXISTS(__stub_lchmod features.h LCHMOD_IS_A_STUB1)
--CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
-+#CHECK_SYMBOL_EXISTS(__stub___lchmod features_h LCHMOD_IS_A_STUB2)
-
-
-
-@@ -43,7 +43,9 @@
-
- cmake_push_check_state()
- SET(CMAKE_REQUIRED_LIBRARIES ${RADOS_LIBRARIES})
-+if ("${HAVE_RADOS}")
- CHECK_SYMBOL_EXISTS(rados_ioctx_set_namespace rados/librados.h HAVE_RADOS_NAMESPACES)
- CHECK_SYMBOL_EXISTS(rados_nobjects_list_open rados/librados.h HAVE_RADOS_NOBJECTS_LIST)
-+endif()
- cmake_pop_check_state()
-
diff --git a/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch b/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
deleted file mode 100644
index 8c46fdf0dc86..000000000000
--- a/app-backup/bareos/files/bareos-cmake-symlink-default-db-backend.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake.orig 2019-01-31 12:39:26.000000000 +0100
-+++ work/bareos-Release-18.2.5/core/cmake/bareos-symlink-default-db-backend.cmake 2019-02-05 11:00:24.559983661 +0100
-@@ -19,5 +19,5 @@
- MESSAGE(STATUS "${CMAKE_COMMAND} -E create_symlink ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX} ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}")
- execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
- ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
-+ $ENV{DESTDIR}/${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION}
- )
diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml
index a2d98845f1a5..74fcd0331c3a 100644
--- a/app-backup/bareos/metadata.xml
+++ b/app-backup/bareos/metadata.xml
@@ -7,20 +7,14 @@
</maintainer>
<use>
<flag name="ceph">Enable ceph support</flag>
- <flag name="cephfs">Enable cephfs storage backend</flag>
<flag name="clientonly">Only install file-daemon (client)</flag>
<flag name="director">Install director</flag>
- <flag name="fastlz">Enable support vor lz4, lz4hc and lzfast using dev-libs/bareos-fastlzlib</flag>
<flag name="glusterfs">Enable glusterfs storage backend</flag>
- <flag name="gnutls">When ssl is enabled, use GnuTLS instead of OpenSSL</flag>
<flag name="jansson">JSON API support using JANSSON for director</flag>
<flag name="lmdb">enable build of LMDB support for faster accurate backup</flag>
<flag name="logwatch">Install support files for logwatch</flag>
<flag name="ndmp">Enable support for NDMP (Network Data Management Protocol)</flag>
- <flag name="rados">Enable rados storage backend</flag>
- <flag name="rados-striper">Enable use of rados-striper</flag>
<flag name="scsi-crypto">Enable low level SCSI crypto support</flag>
- <flag name="sql-pooling">Enable SQL pooling support</flag>
<flag name="storage-daemon">Install storage daemon (bareos-sd)</flag>
<flag name="vmware">Enable bareos-fd VMware plugin</flag>
</use>
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2022-12-10 18:10 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2022-12-10 18:10 UTC (permalink / raw
To: gentoo-commits
commit: 664fb6333ce395cd075283c7b975af3ae128d5d3
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 18:02:40 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=664fb633
app-backup/bareos: add 20.0.8
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/Manifest | 1 +
app-backup/bareos/bareos-20.0.8.ebuild | 393 +++++++++++++++++++++
.../bareos/files/bareos-20.0.2-cmake-gentoo.patch | 24 ++
app-backup/bareos/files/bareos-dir.initd | 30 +-
app-backup/bareos/files/bareos-fd.initd | 16 +-
app-backup/bareos/files/bareos-sd.initd | 30 +-
app-backup/bareos/metadata.xml | 1 +
7 files changed, 442 insertions(+), 53 deletions(-)
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
index 0325b45696fd..e9d91ab26b15 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.2.tar.gz 11582588 BLAKE2B e7e02b3897d7e377cc79d9d0880da821f1b81d1f54891d89e704e78f51471cdf94b5a02ffe2f4ed54dec38bf37ccc757bf1641c3b678a04e401f48484ed3c941 SHA512 acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1
DIST bareos-21.1.5.tar.gz 11655244 BLAKE2B 18ef42669cfdd7a663910fa1ce9b46f12eab0aa3a2106e9877dc3d341e9a7b309c21bc1768d4873d626938fcbb2084884a85d6dcef0aa2834b117aef1034d28f SHA512 637c6c0500ff31bb2c87f27d87f908d49836191afb880de4b636432b9c20433ec6f32f5805aaa7fb57f2f99a0201c51802c8d213ee5573642698f74da4cb06b7
diff --git a/app-backup/bareos/bareos-20.0.8.ebuild b/app-backup/bareos/bareos-20.0.8.ebuild
new file mode 100644
index 000000000000..df9da51888cc
--- /dev/null
+++ b/app-backup/bareos/bareos-20.0.8.ebuild
@@ -0,0 +1,393 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+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"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb
+ logwatch mysql ndmp +postgres readline scsi-crypto
+ sqlite static +storage-daemon systemd tcpd 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}
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson:= )
+ )
+ )
+ 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] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ acl? ( virtual/acl )
+ 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}"
+
+REQUIRED_USE="
+ !clientonly? ( || ( mysql postgres sqlite ) )
+ static? ( clientonly )
+ x86? ( !ceph )
+"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+src_prepare() {
+ use mysql && export mydbtypes+=( mysql )
+ use postgres && export mydbtypes+=( postgresql )
+ use sqlite && export mydbtypes+=( sqlite )
+
+ # enables default database driver in catalog
+ pushd core/src/defaultconfigs >&/dev/null || die
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) \
+ || die "sed on MyCatalog.conf.in failed"
+ popd >&/dev/null || die
+
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch"
+
+ # fix missing DESTDIR in symlink creation
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
+
+ # disable dird and stored plugins, because of
+ # py2 dependency
+ cd "${S}/core/src/plugins"
+ cmake_comment_add_subdirectory dird
+ cmake_comment_add_subdirectory stored
+ cd -
+
+ CMAKE_USE_DIR="$S/core"
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=()
+
+ CMAKE_USE_DIR="$S/core"
+
+ pushd core/platforms >&/dev/null || die
+ cmake_comment_add_subdirectory '${DISTNAME}'
+ popd >&/dev/null || die
+
+ 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 mysql lmdb; do
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
+
+ mycmakeargs+=(
+ -DHAVE_PYTHON=0
+ -DDEFAULT_DB_TYPE=${mydbtypes[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`"
+ -Dmysql=$(usex mysql)
+ -Dopenssl=yes
+ -Dpiddir=/run/bareos
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
+ -Dpostgresql=$(usex postgres)
+ -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
+ -Dsqlite3=$(usex sqlite)
+ -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,startmysql,stopmysql}
+ 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
+
+ # get rid of py2 stuff
+ rm -rf "$D"/usr/lib64/python2.7
+ rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so
+ 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
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # install systemd unit files
+ if use systemd; then
+ if ! use clientonly; then
+ use director && systemd_dounit "${FILESDIR}"/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
+
+ diropts -m0755 -o bareos -g bareos
+ 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:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ fi
+}
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.initd b/app-backup/bareos/files/bareos-dir.initd
index 462ff07843a2..0bb566582f4c 100644
--- a/app-backup/bareos/files/bareos-dir.initd
+++ b/app-backup/bareos/files/bareos-dir.initd
@@ -1,30 +1,20 @@
#!/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
}
-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.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.initd b/app-backup/bareos/files/bareos-sd.initd
index 97b9ccdc92f1..222dc95f47d5 100644
--- a/app-backup/bareos/files/bareos-sd.initd
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -1,30 +1,20 @@
#!/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
}
-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"
diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml
index b86860aeb86a..74fcd0331c3a 100644
--- a/app-backup/bareos/metadata.xml
+++ b/app-backup/bareos/metadata.xml
@@ -10,6 +10,7 @@
<flag name="clientonly">Only install file-daemon (client)</flag>
<flag name="director">Install director</flag>
<flag name="glusterfs">Enable glusterfs storage backend</flag>
+ <flag name="jansson">JSON API support using JANSSON for director</flag>
<flag name="lmdb">enable build of LMDB support for faster accurate backup</flag>
<flag name="logwatch">Install support files for logwatch</flag>
<flag name="ndmp">Enable support for NDMP (Network Data Management Protocol)</flag>
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/
@ 2023-04-20 20:22 Marc Schiffbauer
0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2023-04-20 20:22 UTC (permalink / raw
To: gentoo-commits
commit: 6727fea1fac8cf7523aa734a047c25b70fb710b9
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 16:44:17 2023 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 20:22:17 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6727fea1
app-backup/bareos: fix gcc13 compile error in 20.0.8
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
app-backup/bareos/bareos-20.0.8-r1.ebuild | 394 +++++++++++++++++++++++
app-backup/bareos/files/bareos-gcc13-fixes.patch | 124 +++++++
2 files changed, 518 insertions(+)
diff --git a/app-backup/bareos/bareos-20.0.8-r1.ebuild b/app-backup/bareos/bareos-20.0.8-r1.ebuild
new file mode 100644
index 000000000000..7261e6e6745f
--- /dev/null
+++ b/app-backup/bareos/bareos-20.0.8-r1.ebuild
@@ -0,0 +1,394 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..10} )
+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"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X acl ceph clientonly +director glusterfs ipv6 jansson lmdb
+ logwatch mysql ndmp +postgres readline scsi-crypto
+ sqlite static +storage-daemon systemd tcpd 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}
+ postgres? ( dev-db/postgresql:*[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ director? (
+ virtual/mta
+ jansson? ( dev-libs/jansson:= )
+ )
+ )
+ 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] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ acl? ( virtual/acl )
+ 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}"
+
+REQUIRED_USE="
+ !clientonly? ( || ( mysql postgres sqlite ) )
+ static? ( clientonly )
+ x86? ( !ceph )
+"
+
+S=${WORKDIR}/${PN}-Release-${PV}
+
+src_prepare() {
+ use mysql && export mydbtypes+=( mysql )
+ use postgres && export mydbtypes+=( postgresql )
+ use sqlite && export mydbtypes+=( sqlite )
+
+ # enables default database driver in catalog
+ pushd core/src/defaultconfigs >&/dev/null || die
+ sed -i -e 's/#dbdriver/dbdriver/' -e '/XXX_REPLACE_WITH_DATABASE_DRIVER_XXX/d' \
+ $(grep -rl XXX_REPLACE_WITH_DATABASE_DRIVER_XXX) || die "sed on MyCatalog.conf.in failed"
+ popd >&/dev/null || die
+
+ # fix gentoo platform support
+ eapply -p1 "${FILESDIR}/${PN}-20.0.2-cmake-gentoo.patch"
+ eapply "${FILESDIR}/${PN}-gcc13-fixes.patch"
+
+ # fix missing DESTDIR in symlink creation
+ sed -i '/bareos-symlink-default-db-backend.cmake/d' "${S}/core/src/cats/CMakeLists.txt"
+
+ # disable dird and stored plugins, because of
+ # py2 dependency
+ cd "${S}/core/src/plugins"
+ cmake_comment_add_subdirectory dird
+ cmake_comment_add_subdirectory stored
+ cd -
+
+ CMAKE_USE_DIR="$S/core"
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=()
+
+ CMAKE_USE_DIR="$S/core"
+
+ pushd core/platforms >&/dev/null || die
+ cmake_comment_add_subdirectory '${DISTNAME}'
+ popd >&/dev/null || die
+
+ 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 mysql lmdb; do
+ mycmakeargs+=( -D$useflag=$(usex $useflag) )
+ done
+
+ mycmakeargs+=(
+ -DHAVE_PYTHON=0
+ -DDEFAULT_DB_TYPE=${mydbtypes[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`"
+ -Dmysql=$(usex mysql)
+ -Dopenssl=yes
+ -Dpiddir=/run/bareos
+ -Dplugindir=/usr/$(get_libdir)/${PN}/plugin
+ -Dpostgresql=$(usex postgres)
+ -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
+ -Dsqlite3=$(usex sqlite)
+ -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,startmysql,stopmysql}
+ 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
+
+ # get rid of py2 stuff
+ rm -rf "$D"/usr/lib64/python2.7
+ rm -f "$D"/usr/lib64/bareos/plugin/python-fd.so
+ 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
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependency for the director init script
+ case "${script}" in
+ bareos-dir)
+ sed -i -e "s:%databasetypes%:${mydbtypes[*]}:" "${T}/${script}".confd || die
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ # install systemd unit files
+ if use systemd; then
+ if ! use clientonly; then
+ use director && systemd_dounit "${FILESDIR}"/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
+
+ diropts -m0755 -o bareos -g bareos
+ 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:"
+ if use postgres; then
+ einfo
+ einfo "For postgresql:"
+ 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'"
+ fi
+ if use mysql; then
+ einfo
+ einfo "For mysql:"
+ einfo
+ einfo " Make sure root has direct access to your mysql server. You may want to"
+ einfo " create a /root/.my.cnf file with"
+ einfo " [client]"
+ einfo " user=root"
+ einfo " password=YourPasswordForAccessingMysqlAsRoot"
+ einfo " before running:"
+ einfo " /usr/libexec/bareos/create_bareos_database mysql"
+ einfo " /usr/libexec/bareos/make_bareos_tables mysql"
+ einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
+ fi
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bareos does not officially support SQLite database."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ einfo "It is strongly recommended to use either postgresql or mysql as"
+ einfo "catalog database backend."
+ fi
+}
diff --git a/app-backup/bareos/files/bareos-gcc13-fixes.patch b/app-backup/bareos/files/bareos-gcc13-fixes.patch
new file mode 100644
index 000000000000..1cd12621b4e4
--- /dev/null
+++ b/app-backup/bareos/files/bareos-gcc13-fixes.patch
@@ -0,0 +1,124 @@
+From 2bb7d74215bf6ae4f350de11bff04b68cf3c82b3 Mon Sep 17 00:00:00 2001
+From: Bruno Friedmann <bruno.friedmann@bareos.com>
+Date: Mon, 27 Mar 2023 13:22:11 +0200
+Subject: [PATCH 1/3] core: fixes for gcc-13 support
+
+- add explicit system_error and stdexcept
+- console_conf.cc fix std::move warning
+
+Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
+---
+ core/src/cats/cats.h | 2 ++
+ core/src/console/console_conf.cc | 4 ++--
+ core/src/lib/thread_list.cc | 3 ++-
+ core/src/lib/thread_specific_data.cc | 3 ++-
+ core/src/lib/thread_specific_data.h | 3 ++-
+ core/src/lib/thread_specific_data_key.h | 4 +++-
+ 6 files changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/core/src/cats/cats.h b/core/src/cats/cats.h
+index 7a6641b3f72..edb5ecbe38b 100644
+--- a/core/src/cats/cats.h
++++ b/core/src/cats/cats.h
+@@ -41,6 +41,8 @@
+ #include "lib/output_formatter.h"
+
+ #include <string>
++#include <stdexcept>
++#include <system_error>
+ #include <vector>
+ template <typename T> class dlist;
+
+diff --git a/core/src/console/console_conf.cc b/core/src/console/console_conf.cc
+index 9d3aecead2b..f0c0402744e 100644
+--- a/core/src/console/console_conf.cc
++++ b/core/src/console/console_conf.cc
+@@ -203,7 +203,7 @@ static bool SaveResource(int type, ResourceItem* items, int pass)
+ res_dir->resource_name_);
+ } else {
+ p->tls_cert_.allowed_certificate_common_names_
+- = std::move(p->tls_cert_.allowed_certificate_common_names_);
++ = std::move(res_dir->tls_cert_.allowed_certificate_common_names_);
+ }
+ break;
+ }
+diff --git a/core/src/lib/thread_list.cc b/core/src/lib/thread_list.cc
+index 50aefb8ee2d..05607124a55 100644
+--- a/core/src/lib/thread_list.cc
++++ b/core/src/lib/thread_list.cc
+@@ -32,6 +32,7 @@
+ #include <memory>
+ #include <mutex>
+ #include <set>
++#include <system_error>
+ #include <thread>
+
+ static constexpr int debuglevel{800};
+diff --git a/core/src/lib/thread_specific_data.cc b/core/src/lib/thread_specific_data.cc
+index 0953f5c125a..22a98c4a759 100644
+--- a/core/src/lib/thread_specific_data.cc
++++ b/core/src/lib/thread_specific_data.cc
+@@ -25,6 +25,7 @@
+ #include "lib/thread_specific_data.h"
+ #include "lib/thread_specific_data_key.h"
+ #include "include/jcr.h"
++#include <system_error>
+
+ JobControlRecord* GetJcrFromThreadSpecificData()
+ {
+diff --git a/core/src/lib/thread_specific_data.h b/core/src/lib/thread_specific_data.h
+index 4bd4dedafae..4c427d171c0 100644
+--- a/core/src/lib/thread_specific_data.h
++++ b/core/src/lib/thread_specific_data.h
+@@ -24,6 +24,7 @@
+ #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_H_
+ #define BAREOS_LIB_THREAD_SPECIFIC_DATA_H_
+
++
+ class JobControlRecord;
+
+ JobControlRecord* GetJcrFromThreadSpecificData();
+diff --git a/core/src/lib/thread_specific_data_key.h b/core/src/lib/thread_specific_data_key.h
+index 9c02c07f47e..c8c63c757fe 100644
+--- a/core/src/lib/thread_specific_data_key.h
++++ b/core/src/lib/thread_specific_data_key.h
+@@ -22,6 +22,8 @@
+ #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_
+ #define BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_
+
++
++#include <system_error>
+ #include "lib/berrno.h"
+
+ #include <mutex>
+
+From cc208707f6f4ad8c24e8ad670f10c076a27b69e4 Mon Sep 17 00:00:00 2001
+From: Philipp Storz <philipp.storz@bareos.com>
+Date: Mon, 3 Apr 2023 12:11:57 +0200
+Subject: [PATCH 2/3] pull_request_template.md: add checkmark for backport PRs
+
+---
+From 55ee275873b7c2d663d280847fd517374394e43d Mon Sep 17 00:00:00 2001
+From: Marc Schiffbauer <mschiff@gentoo.org>
+Date: Thu, 20 Apr 2023 19:01:16 +0300
+Subject: [PATCH] add missing include required by gcc 13
+
+---
+ core/src/stored/dev.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/core/src/stored/dev.cc b/core/src/stored/dev.cc
+index 287a323a5..7fd0c437e 100644
+--- a/core/src/stored/dev.cc
++++ b/core/src/stored/dev.cc
+@@ -81,6 +81,7 @@
+ #include "lib/btimers.h"
+ #include "include/jcr.h"
+ #include "lib/berrno.h"
++#include <stdexcept>
+
+ #ifndef HAVE_DYNAMIC_SD_BACKENDS
+ # ifdef HAVE_GFAPI
+--
+2.39.2
+
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-04-20 20:22 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-07 7:30 [gentoo-commits] repo/gentoo:master commit in: app-backup/bareos/files/, app-backup/bareos/ Marc Schiffbauer
-- strict thread matches above, loose matches on Subject: below --
2023-04-20 20:22 Marc Schiffbauer
2022-12-10 18:10 Marc Schiffbauer
2022-03-25 7:30 Marc Schiffbauer
2022-02-01 10:02 Marc Schiffbauer
2021-08-20 12:36 Marc Schiffbauer
2021-08-20 11:23 Marc Schiffbauer
2019-02-14 22:17 Marc Schiffbauer
2018-10-27 21:01 Marc Schiffbauer
2018-05-13 6:56 Andreas Sturmlechner
2017-12-10 22:37 Marc Schiffbauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox