Add app-backup/bareos-14.2.4
This commit is contained in:
parent
a36e8e37b9
commit
9f611c8d75
|
@ -9,4 +9,6 @@ AUX bareos-fd.initd 571 SHA256 7ea2ffc24dcb5e6187c65690de3299a0692ec21510ede4d15
|
||||||
AUX bareos-sd.confd 506 SHA256 9842116be1e53c0a592db79cb01d67c36482171bfffba6459c5bfa93a58564b1 SHA512 33e26f6582b08d56936bd75994444fb79a7ee1940ef6e6a1e0ff2194a10e42611404b175330ff77f81ca52215ec8f0a97e05b39e27667560a861cf6b30055f18 WHIRLPOOL bb254d806e40d6e29c5ae284cadcbc7e5cbce0818035ba7c7fb9918970f0d90d85d5bba108d986569e62e7600281faf018253285012b8ee8f5ed0e682f9aff7a
|
AUX bareos-sd.confd 506 SHA256 9842116be1e53c0a592db79cb01d67c36482171bfffba6459c5bfa93a58564b1 SHA512 33e26f6582b08d56936bd75994444fb79a7ee1940ef6e6a1e0ff2194a10e42611404b175330ff77f81ca52215ec8f0a97e05b39e27667560a861cf6b30055f18 WHIRLPOOL bb254d806e40d6e29c5ae284cadcbc7e5cbce0818035ba7c7fb9918970f0d90d85d5bba108d986569e62e7600281faf018253285012b8ee8f5ed0e682f9aff7a
|
||||||
AUX bareos-sd.initd 595 SHA256 60317066caec54c6e4b30255affaec7f741e8a88e4fb5fc8346fb018d5dc82ad SHA512 576a1af894bb28ab49eac580dbfb610372da162d69fb091f30b903735c3274c3420604c2628fd121b642385bcc144c3bac1555de9fab34c709fc30b49c8a8e69 WHIRLPOOL 34098ad67131caf4fdd3bea371869bb093cb9765dd5a1a53d1d746aacad57f2c88b523abd5bb8ba391bf07c422a87de7f9320d11dc65981348620e136cb09ccc
|
AUX bareos-sd.initd 595 SHA256 60317066caec54c6e4b30255affaec7f741e8a88e4fb5fc8346fb018d5dc82ad SHA512 576a1af894bb28ab49eac580dbfb610372da162d69fb091f30b903735c3274c3420604c2628fd121b642385bcc144c3bac1555de9fab34c709fc30b49c8a8e69 WHIRLPOOL 34098ad67131caf4fdd3bea371869bb093cb9765dd5a1a53d1d746aacad57f2c88b523abd5bb8ba391bf07c422a87de7f9320d11dc65981348620e136cb09ccc
|
||||||
DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470
|
DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470
|
||||||
|
DIST bareos-14.2.4.tar.gz 3817284 SHA256 d254a472837c2d468d7f4a8551db59e0fa53c2cb3d5354ae16ddf9842a18e604 SHA512 1038de9be5cf465eac4182478b65e2ef7daac871855c1528025271516fe78f29a612c968e1081a27e940d0f3405809ba65edba6c469c03766806263d8d88d3b0 WHIRLPOOL 0cc13c32c986f1f277c71df423dbbe7e475553109a97312623b443bfa1291a98f828f78053a07a142532e2090533619d8b7dcabc62add2958e5c952040f68386
|
||||||
EBUILD bareos-14.2.2.ebuild 11791 SHA256 c8d6b3b245ad679eed766cd3451a59743fc7c4c96048d87b663bdc4b36e652d6 SHA512 d846349e41d7285270c058f6fc68790e3c90818c3845c99c73bcf779c142cceec506d4ad1c9084fb38c444cedee37353db3b6b9323abe63b750014073830a1ee WHIRLPOOL 3bc44e24208d2661247f4cce4f63f608641c908bfe37975b5e338ea2907275cd6f07e1d913e0ec1695023ac21ff7fa3993c1e7353e8a320aad872bfb9353a655
|
EBUILD bareos-14.2.2.ebuild 11791 SHA256 c8d6b3b245ad679eed766cd3451a59743fc7c4c96048d87b663bdc4b36e652d6 SHA512 d846349e41d7285270c058f6fc68790e3c90818c3845c99c73bcf779c142cceec506d4ad1c9084fb38c444cedee37353db3b6b9323abe63b750014073830a1ee WHIRLPOOL 3bc44e24208d2661247f4cce4f63f608641c908bfe37975b5e338ea2907275cd6f07e1d913e0ec1695023ac21ff7fa3993c1e7353e8a320aad872bfb9353a655
|
||||||
|
EBUILD bareos-14.2.4.ebuild 11582 SHA256 91e96bb47b6c70c127a98cf964c17fffd7e2dd12dfa5b571e6e4f7f64da32f7b SHA512 1e1b9fd0642f0436777f117fd1bd367969683f044a61587378b01baaf6d5dc1049761c80938de41e114ab9c770305afb9c92c67e165412e60297b92980d15b5e WHIRLPOOL f7d0f22ee5ad2709aaca9cd69cb5af945611c91ad697ef9f5927f96ad5e266d168bc7ee79ced9c92642967e048b4c37096c56d40b97862d333c31b610ef4bd1c
|
||||||
|
|
|
@ -0,0 +1,409 @@
|
||||||
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/bareos-14.2.1.ebuild,v 1.6 2015/04/08 07:30:31 mgorny Exp $
|
||||||
|
|
||||||
|
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=""
|
||||||
|
IUSE="acl clientonly +director fastlz ipv6 logwatch mysql ndmp postgres python qt4
|
||||||
|
readline scsi-crypto sql-pooling +sqlite3 ssl static +storage-daemon tcpd
|
||||||
|
vim-syntax X cephfs glusterfs lmdb rados"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
!app-backup/bacula
|
||||||
|
cephfs? ( sys-cluster/ceph )
|
||||||
|
rados? ( sys-cluster/ceph )
|
||||||
|
glusterfs? ( sys-cluster/glusterfs )
|
||||||
|
lmdb? ( dev-db/lmdb )
|
||||||
|
dev-libs/gmp:0
|
||||||
|
!clientonly? (
|
||||||
|
postgres? ( dev-db/postgresql:*[threads] )
|
||||||
|
mysql? ( virtual/mysql )
|
||||||
|
sqlite3? ( dev-db/sqlite:3 )
|
||||||
|
director? ( virtual/mta )
|
||||||
|
)
|
||||||
|
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? ( dev-libs/openssl:0[static-libs] )
|
||||||
|
)
|
||||||
|
!static? (
|
||||||
|
acl? ( virtual/acl )
|
||||||
|
dev-libs/lzo
|
||||||
|
ssl? ( dev-libs/openssl:0 )
|
||||||
|
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 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 fastlz) \
|
||||||
|
$(use_with mysql) \
|
||||||
|
$(use_with postgres postgresql) \
|
||||||
|
$(use_with python) \
|
||||||
|
$(use_with readline) \
|
||||||
|
$(use_with sqlite3) \
|
||||||
|
$(use sqlite3 || echo "--without-sqlite3") \
|
||||||
|
$(use_with ssl openssl) \
|
||||||
|
$(use_with tcpd tcp-wrappers) \
|
||||||
|
$(use_enable lmdb) \
|
||||||
|
$(use_with glusterfs) \
|
||||||
|
$(use_with rados) \
|
||||||
|
$(use_with cephfs) \
|
||||||
|
"
|
||||||
|
|
||||||
|
econf \
|
||||||
|
--libdir=/usr/$(get_libdir) \
|
||||||
|
--docdir=/usr/share/doc/${PF} \
|
||||||
|
--htmldir=/usr/share/doc/${PF}/html \
|
||||||
|
--with-pid-dir=/run/bareos \
|
||||||
|
--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-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-smartalloc \
|
||||||
|
--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
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
}
|
Loading…
Reference in New Issue