summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2013-10-21 21:52:51 +0000
committerMarc Schiffbauer <mschiff@gentoo.org>2013-10-21 21:52:51 +0000
commitef4f582706295b8ba0805573a7b62014171a9724 (patch)
treec9c2a18299c74a7fc36230be76bf62d4c427ad88 /app-backup
parentRevbump to back-port bug fix for kde bug 286481, cannot open attachments in e... (diff)
downloadgentoo-2-ef4f582706295b8ba0805573a7b62014171a9724.tar.gz
gentoo-2-ef4f582706295b8ba0805573a7b62014171a9724.tar.bz2
gentoo-2-ef4f582706295b8ba0805573a7b62014171a9724.zip
Initial commit of bareos.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x296C6CCA35A64134)
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/bareos/ChangeLog13
-rw-r--r--app-backup/bareos/Manifest12
-rw-r--r--app-backup/bareos/bareos-12.4.5.ebuild400
-rw-r--r--app-backup/bareos/files/bareos-12.4.5-Makefile.patch27
-rw-r--r--app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch11
-rw-r--r--app-backup/bareos/files/bareos-dir.confd18
-rw-r--r--app-backup/bareos/files/bareos-dir.initd22
-rw-r--r--app-backup/bareos/files/bareos-fd.confd8
-rw-r--r--app-backup/bareos/files/bareos-fd.initd22
-rw-r--r--app-backup/bareos/files/bareos-sd.confd11
-rw-r--r--app-backup/bareos/files/bareos-sd.initd22
-rw-r--r--app-backup/bareos/metadata.xml17
12 files changed, 583 insertions, 0 deletions
diff --git a/app-backup/bareos/ChangeLog b/app-backup/bareos/ChangeLog
new file mode 100644
index 000000000000..ff2851b23043
--- /dev/null
+++ b/app-backup/bareos/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for app-backup/bareos
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/ChangeLog,v 1.1 2013/10/21 21:52:51 mschiff Exp $
+
+*bareos-12.4.5 (21 Oct 2013)
+
+ 21 Oct 2013; Marc Schiffbauer <mschiff@gentoo.org> +bareos-12.4.5.ebuild,
+ +files/bareos-12.4.5-Makefile.patch, +files/bareos-12.4.5-bat-ldflags.patch,
+ +files/bareos-dir.confd, +files/bareos-dir.initd, +files/bareos-fd.confd,
+ +files/bareos-fd.initd, +files/bareos-sd.confd, +files/bareos-sd.initd,
+ +metadata.xml:
+ Initial commit of bareos.
+
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest
new file mode 100644
index 000000000000..2a68a3a0fb7b
--- /dev/null
+++ b/app-backup/bareos/Manifest
@@ -0,0 +1,12 @@
+AUX bareos-12.4.5-Makefile.patch 924 SHA256 0b2428d3ee7ea5ceae4e02d3c315cc6f6b59d21d44749967dd121e29c060942d SHA512 f1b5da39d01f6b00851810c6a0cbcda9ac0561fb165054f6f2c4540943b41af9d524a6a8aca1ae87d55fa8624aecf44c3c0db03c2d7c22690a84c16994289eed WHIRLPOOL 0aeddbe01415260fce862dfa0b387bb5a443b29ed1367ea0fb0c2350c2af24f4f1934497d1590612fa3a3e62e929e5811caa9591e99e5a76fcfc6d73769baa1a
+AUX bareos-12.4.5-bat-ldflags.patch 389 SHA256 b4b569fecdecbef0b5e0c1bcafddd61a48893ee1e33b52289a455a4773adc9ca SHA512 811fd6ffc2a1c4aeef3afd9001fd2bf01c70ef3f75ed6949ec6b064a9e6ce7a4893ffe464e5c9c67e33fdf92e00b0601500930165891b70d403d31a2ee347434 WHIRLPOOL 488a764b303c3ed077d55bf04ae91e33d24c69c71476d8ad3416608f60a8071471a96f2a539266509b20133d5cf0e0f66ac284aee99f5378030b7a6c394a1987
+AUX bareos-dir.confd 685 SHA256 897a693bc897b8055f922b7754490f3c2ad3968954fdcf01129a4bf20d96ca6d SHA512 42320e2d186d8b7b5ef02a73b4e527e848c05b6d42e791d95b19eac7a6037a0c3e262ad98b769eee7b3e536aac1c9d5802d173a4d95833ecfef496d6c634013d WHIRLPOOL 4741d7dd632620804b1d257dc2323bd473350554f9fd7489bf93d81b63758718ed13ba1f5384b509a0bda90f34ae7a56ed2ff65ac0cf0e0055edda11278a0977
+AUX bareos-dir.initd 455 SHA256 660824ab28a0b758586ec2cf8f27ae92919911faea1c80efbce784175688c45d SHA512 6ababfb7bd9543224d1272bd2b44c1df45aaf481fb0b4f10879efc6464c60039aa22170a0f1ec1a399dbfbe0b54f2f2b1544c42b5e9ffa47ce1ac18a915b80fc WHIRLPOOL 5ce413c6b35d8efb2b01ae3b09dd421006a4e5d8f0950ccb228f3b1a6917602cca6392696206a4202a55b577e2b2870b57f9201a9b9b9dcd6501715297b9efd1
+AUX bareos-fd.confd 255 SHA256 d79876cffef836d145cf1861c88235e90fe8c35cb16a2cbd65ec74adde91c563 SHA512 7fa4a7e6f506170c43f85472d24d9dd1618b7577ea27d3fc0b5481354edad705a011dc09881cb99bd91c49982b3c6f29779f0e21f25470d815e82aa2759a357f WHIRLPOOL 634ebaec07844653c975612d8405ab76575f2fba168095aa046b3bb06399831e12702af8cf29679b432c2b2648b4cc65cadf53f138191e00b4348d5704dcb9f1
+AUX bareos-fd.initd 438 SHA256 d25ff5c1370f0086b5ca29cf76c89f764d5c974f55ea4224f3ca07c00ce64308 SHA512 6f4de84c990774f0c71a8c90a98d479817cf0c4990bee9b75e625a37fa63106b551ed974166e5b1f633783f967072d40cef4eab18b7de3ac7d01a2df167f6b1c WHIRLPOOL 0c4d70e43b9dec71f5ce9cd42ad7cd70038928bbd9cf589c007c4a0d40ea90f44afce95b49c96bd3a41a02072efca4789e6ac62ee4cfcf251f618cb0fea00d94
+AUX bareos-sd.confd 404 SHA256 b451ac15247d93423f8ef7d01a0787b69d37121f1ac991f6c882c9b8ba11519a SHA512 faa0b942bca55c0815a9597173ee7e71a8f24bedc4d9f2a4260effbb25b7b0aa0fc0a9f0b1584182b17ae95b459cebbb5e8cd3dd9fbc4b6356c56d40c66381a3 WHIRLPOOL ee9c85172a441c4f93e3d9271160b799a2830c73d6c4d813bc6536169a494e861173976971db45fe6b59414b4572414b3cbb01b5698a52e195a0b18de191b31a
+AUX bareos-sd.initd 445 SHA256 49c1b4d257a4b052a03f4de3573b55004afabecb0991c1a5fc77ec6b930ccb62 SHA512 a8086ba6c5e9fc254855f8ef3648a5f2a88ce8fc5bebdafb11f640ba2f39085bbb95e99b7147bfca7df362bd2e11c33beb18cabc4bc1eb1b6f189412bcf7c516 WHIRLPOOL 1592456cc286526ac616f58205923cbd9442bf3626c712af456c2603024943ee9903e2f105339f495193c23d2c595a6d0dbe838531e43768372d1f69235c37f8
+DIST bareos-12.4.5.tar.gz 3496879 SHA256 2defc15ed4fb6483e1d45ea63bb9cb8ba009e2b31c7755544984f1813bf4e017 SHA512 a59e95bc9b4a5147d8254e6b802c411956d324571ac084f5cb11629ddad59d605cdad2ab7b86f001af8c32faf15070833f233a44cbefaf71d13cad05faaba5cf WHIRLPOOL c95492acb57729e45a6ff5d2ae1894de4ebdb9e416d9f8a5beeef89ccf563a12ea8d5cdb943c2b6ec5681fb2bf0d348fb5e089ecac571256a835b4fd1a4459c8
+EBUILD bareos-12.4.5.ebuild 11124 SHA256 eef0d0648dfaf925af1d4525e57ff4053254d64fe1789981f057ac80c2390a38 SHA512 b6830807dac0c2c7bb260915334a9d22a2db7d7aa6ca61eee3212467856554bafee47ad634b10b2b71ab96de00f1067540ad78c91afc2a163c8f533c56c42002 WHIRLPOOL 56f01d424fd79ea2cfe9b341634229ba14ca4f39ec3f17fe0af4faeeae28363575756e76388a95ab63719b169365fa145bafb933ce65b31d648755a4feee3dd5
+MISC ChangeLog 499 SHA256 0a93c7c7d1850421b6512acbec061440370f4199dd0d2ac4830ca4826481f2e3 SHA512 b5efd2651671006ff8e667bc666f7069cf514de4b267d5f73439e55c998051d144d82faea5321fabb8e50057795d1333f0e2ec94f9a385f723b7775e90cadae0 WHIRLPOOL 51f7b3a167ac887c0f5f59e2c5d2161801882b20e0208acb02c5a2aabcd4d0d3c0a3aacdcd2aaebeaf2516d9f141e44b66e84b5ea2d8ed09a136323ffaa5aa66
+MISC metadata.xml 722 SHA256 805245709ddd3e39e78cadb5b8a05ada22f547e66a89742bbb0cbd127205a3a7 SHA512 11f66c555f15c0a03a358a0de24b45ba02d9aebfb8760f6161ab8157d0d2bb22fd97ff101170be2f55cdbf25f23fe342070a1857eeb475e87827477b4592a6ad WHIRLPOOL 20246a4528d065ac1b6d3c3abaac7db1ff51553c7a7689f0d05c66069d67b9b9e465d5f0b252ecd416bc090d6d6d1e143e80f0df14cfbd7736e8a36b494c1fdc
diff --git a/app-backup/bareos/bareos-12.4.5.ebuild b/app-backup/bareos/bareos-12.4.5.ebuild
new file mode 100644
index 000000000000..3968e1a061df
--- /dev/null
+++ b/app-backup/bareos/bareos-12.4.5.ebuild
@@ -0,0 +1,400 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/bareos-12.4.5.ebuild,v 1.1 2013/10/21 21:52:51 mschiff Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_{6,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"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl clientonly +director examples ipv6 logwatch mysql ndmp postgres python qt4
+ readline scsi-crypto sql-pooling +sqlite3 ssl static +storage-daemon tcpd
+ vim-syntax X"
+
+DEPEND="
+ !app-backup/bacula
+ dev-libs/gmp
+ !clientonly? (
+ postgres? ( dev-db/postgresql-base[threads] )
+ mysql? ( virtual/mysql )
+ sqlite3? ( dev-db/sqlite:3 )
+ director? ( virtual/mta )
+ )
+ qt4? (
+ dev-qt/qtsvg:4
+ x11-libs/qwt:5
+ )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses[static-libs]
+ ssl? ( dev-libs/openssl[static-libs] )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ sys-libs/zlib
+ dev-libs/lzo
+ sys-libs/ncurses
+ ssl? ( dev-libs/openssl )
+ )
+ 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 sqlite3 && export mydbtypes+=" sqlite3"
+
+ # 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=''
+
+ 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 mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with python) \
+ $(use_with readline readline /usr) \
+ $(use_with sqlite3) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd tcp-wrappers) \
+ "
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/run \
+ --sysconfdir=/etc/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-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 \
+ --enable-smartalloc \
+ --enable-dynamic-cats-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
+ doicon scripts/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
+
+ # install examples (bug #457504)
+ if use examples; then
+ docinto examples/
+ dodoc -r examples/*
+ fi
+
+ # 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 sqlite3; 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-12.4.5-Makefile.patch b/app-backup/bareos/files/bareos-12.4.5-Makefile.patch
new file mode 100644
index 000000000000..3cdee15d4db7
--- /dev/null
+++ b/app-backup/bareos/files/bareos-12.4.5-Makefile.patch
@@ -0,0 +1,27 @@
+# stop build if there are errors in subdirs
+--- Makefile.in.orig 2010-07-20 16:53:44.000000000 +0000
++++ Makefile.in 2010-07-20 16:55:50.000000000 +0000
+@@ -44,9 +44,8 @@
+
+ all: Makefile
+ @for I in ${all_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I $@ || exit 1; \
+ done
+
+ depend:
+@@ -55,9 +54,8 @@
+
+ bacula-fd: Makefile
+ @for I in ${fd_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I all || exit 1; \
+ done
+
+ #-------------------------------------------------------------------------
diff --git a/app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch b/app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch
new file mode 100644
index 000000000000..94d8fb60120e
--- /dev/null
+++ b/app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch
@@ -0,0 +1,11 @@
+# bat needs to respect LDFLAGS
+--- src/qt-console/bat.pro.in.orig 2010-07-20 18:28:50.000000000 +0000
++++ src/qt-console/bat.pro.in 2010-07-20 18:29:25.000000000 +0000
+@@ -26,6 +26,7 @@
+ QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
+ QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
+ QMAKE_CLEAN += .libs/* bat
++QMAKE_LFLAGS += @LDFLAGS@
+
+ qwt {
+ INCLUDEPATH += @QWT_INC@
diff --git a/app-backup/bareos/files/bareos-dir.confd b/app-backup/bareos/files/bareos-dir.confd
new file mode 100644
index 000000000000..5013291edfa2
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.confd
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-dir.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+# 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-dir.initd b/app-backup/bareos/files/bareos-dir.initd
new file mode 100644
index 000000000000..6e8ace2252cf
--- /dev/null
+++ b/app-backup/bareos/files/bareos-dir.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-dir.initd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+depend() {
+ need net
+ use dns bareos-fd bareos-sd
+}
+
+start() {
+ ebegin "Starting bareos director"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
+ -- ${DIR_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bareos director"
+ start-stop-daemon --stop --quiet --pidfile /run/bareos-dir.*.pid
+ eend $?
+}
diff --git a/app-backup/bareos/files/bareos-fd.confd b/app-backup/bareos/files/bareos-fd.confd
new file mode 100644
index 000000000000..e6e1fc5aeb76
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.confd
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-fd.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+# 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-fd.initd b/app-backup/bareos/files/bareos-fd.initd
new file mode 100644
index 000000000000..f63f7ab6c62e
--- /dev/null
+++ b/app-backup/bareos/files/bareos-fd.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-fd.initd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bareos file daemon"
+ 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-fd.*.pid
+ eend $?
+}
diff --git a/app-backup/bareos/files/bareos-sd.confd b/app-backup/bareos/files/bareos-sd.confd
new file mode 100644
index 000000000000..a0219bf2b05f
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-sd.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+# 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"
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
new file mode 100644
index 000000000000..dfb8a5697345
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-sd.initd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bareos storage daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
+ -- ${SD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bareos storage daemon"
+ start-stop-daemon --stop --quiet --pidfile /run/bareos-sd.*.pid
+ eend $?
+}
diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml
new file mode 100644
index 000000000000..96d4f74d9376
--- /dev/null
+++ b/app-backup/bareos/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <use>
+ <flag name='clientonly'>Only install file-daemon (client)</flag>
+ <flag name='director'>Install director</flag>
+ <flag name='storage-daemon'>Install storage daemon (bareos-sd)</flag>
+ <flag name='logwatch'>Install support files for logwatch</flag>
+ <flag name='ndmp'>Enable support for NDMP (Network Data Management Protocol)</flag>
+ <flag name='sql-pooling'>Enable SQL pooling support</flag>
+ <flag name='scsi-crypto'>Enable low level SCSI crypto support</flag>
+ </use>
+</pkgmetadata>