From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6EB341381F3 for ; Mon, 21 Oct 2013 13:39:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F63EE0B0E; Mon, 21 Oct 2013 13:39:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2250BE0B0E for ; Mon, 21 Oct 2013 13:39:20 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DE27833F180 for ; Mon, 21 Oct 2013 13:39:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 87A1FE5308 for ; Mon, 21 Oct 2013 13:39:17 +0000 (UTC) From: "Marc Schiffbauer" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marc Schiffbauer" Message-ID: <1382362729.b09ca8fe92a320830656fee03c353d665e60543f.mschiff@gentoo> Subject: [gentoo-commits] dev/mschiff:master commit in: app-backup/bareos/, app-backup/bareos/files/ X-VCS-Repository: dev/mschiff X-VCS-Files: app-backup/bareos/Manifest app-backup/bareos/bareos-12.4.5.ebuild app-backup/bareos/files/bareos-12.4.5-Makefile.patch app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch app-backup/bareos/files/bareos-dir.confd app-backup/bareos/files/bareos-dir.initd app-backup/bareos/files/bareos-fd.confd app-backup/bareos/files/bareos-fd.initd app-backup/bareos/files/bareos-sd.confd app-backup/bareos/files/bareos-sd.initd app-backup/bareos/metadata.xml X-VCS-Directories: app-backup/bareos/ app-backup/bareos/files/ X-VCS-Committer: mschiff X-VCS-Committer-Name: Marc Schiffbauer X-VCS-Revision: b09ca8fe92a320830656fee03c353d665e60543f X-VCS-Branch: master Date: Mon, 21 Oct 2013 13:39:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 76c06164-c2ba-4e4e-8bc1-22855ed5dc62 X-Archives-Hash: fc511daf7389140e46798f2bf84e7772 commit: b09ca8fe92a320830656fee03c353d665e60543f Author: Marc Schiffbauer gentoo org> AuthorDate: Mon Oct 21 13:38:49 2013 +0000 Commit: Marc Schiffbauer gentoo org> CommitDate: Mon Oct 21 13:38:49 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mschiff.git;a=commit;h=b09ca8fe added initial bareos ebuild --- app-backup/bareos/Manifest | 12 + app-backup/bareos/bareos-12.4.5.ebuild | 412 +++++++++++++++++++++ .../bareos/files/bareos-12.4.5-Makefile.patch | 27 ++ .../bareos/files/bareos-12.4.5-bat-ldflags.patch | 11 + app-backup/bareos/files/bareos-dir.confd | 17 + app-backup/bareos/files/bareos-dir.initd | 25 ++ app-backup/bareos/files/bareos-fd.confd | 8 + app-backup/bareos/files/bareos-fd.initd | 22 ++ app-backup/bareos/files/bareos-sd.confd | 11 + app-backup/bareos/files/bareos-sd.initd | 22 ++ app-backup/bareos/metadata.xml | 19 + 11 files changed, 586 insertions(+) diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest new file mode 100644 index 0000000..7019f2e --- /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 744 SHA256 ebf91d07511843935a4c3f324ba195691d610c320988a157913fbda4f2110126 SHA512 04897c9fae56e87e0c4cf4ae747534271f4b7ddc6ba6c9fa400ea6741d598e9f2851e06c5c478b99ad2054efd2ad4d5cdd79c63df16f5321fed49aaa812c442b WHIRLPOOL 7ed264c28e46d70007bf4c37d5d31f2c543a69f938c2971156de6128ce84f9be0c5905c6e01aa187070e5e47bcb707674484bd8c7faa5d75839c1928a67f3b2d +AUX bareos-dir.initd 619 SHA256 797ba78396c65ebfd943481d8aec81223138167f856e30d1871cd3879b3ecfbf SHA512 34bf8ae1b75d1a677e96f0f11e3613b60f3060a9358e5c2c9e82eecf80fe7d2f9b7894a8acef86e12755179e14d4a2cd862227e76e6f884d462ca4dfdcb1f069 WHIRLPOOL 9c26c98d6dc121c867b4d19e4d2fe083bd2f4009039997fca3b1ebe8d4339472faba9b3cc6d0797687cda6454cabea093860f544ca35b55dac4ea5c99d127d58 +AUX bareos-fd.confd 355 SHA256 adf75da467cafd961a73c3d286afc8e998226f7e504ed513161c1a7a6196fb1c SHA512 1f6b17c9c92f60eb3fe43c111517fd48bb9fdcd31c8485d3573da0ce60b11b0dc7de7d5f6c09dd2ea1bed12fc81dca87911a1da8b9c95099be190ef080c8f5db WHIRLPOOL 5629e0273d99cab6bd4706ef3cc4a65fd63baf740736c6432b5fbe3ab0f7d80bc130271133046717a1878c0b5b8ef33402463e91e719cdd070b531c1d9848742 +AUX bareos-fd.initd 543 SHA256 45e71d920dea9e116ed81d0223d3279cbdc21e88bda1c3f094c922775a4d1f20 SHA512 4140b22bb0b965899954e8092adae3f51c90cd6211313b1e13c6760bb228eb48bbf988eeb48431fe9171d4b4aa349a6b6dd637b6376230bd82ee99eb173ee9c6 WHIRLPOOL 962890fc45718ce77e1c09254d968012465a5316dc9e8e79a977ba4518153b2577e7c7650cf4058b578f5de995314d9e8b3b5f93385598a7352518755817a640 +AUX bareos-sd.confd 505 SHA256 ef5ad6cc2d66d9ea2a90b3ee6dae508e923f7d2ce6c90f708647eea60f8039f8 SHA512 18392ef1cb491fe65ecfb4e6bff4adc1c4eeda71e06a5678a779b8e3c42f082cdb30bd36f648a45f80dfe9b19ce08dcc4e4e4744f392eaafaac36d1a9f00e6f6 WHIRLPOOL 465f452bd344b5a8dbec0887c8438a847133344fc30fb2d922c95a4a201a2ef771e344a8fbe4a6ee155bcfbfb271db5ca6c7320b2511b7ddcd7b293832ec4393 +AUX bareos-sd.initd 550 SHA256 8186f4b1c4ade41c8219c5181c4c37ab2a51402520b706770ff0f5431f70adcb SHA512 659dd0ae767005b1f1d65e6bb62a28a7dc7f8bbb0f092716fd6740e6092758e4fdcd9b285ed98b304464d7ebab2c7a7ae1c46ea326be436fe9e4b12c6f754a52 WHIRLPOOL ab50154d79682418431beed0a3cb1bfff28d95dbaae96733de6d401fa077b231f72321abbec10532714c9a80628de605eea5f8b3322e29a1357d8727129febe3 +DIST bareos-12.4.5.tar.gz 3496879 SHA256 2defc15ed4fb6483e1d45ea63bb9cb8ba009e2b31c7755544984f1813bf4e017 SHA512 a59e95bc9b4a5147d8254e6b802c411956d324571ac084f5cb11629ddad59d605cdad2ab7b86f001af8c32faf15070833f233a44cbefaf71d13cad05faaba5cf WHIRLPOOL c95492acb57729e45a6ff5d2ae1894de4ebdb9e416d9f8a5beeef89ccf563a12ea8d5cdb943c2b6ec5681fb2bf0d348fb5e089ecac571256a835b4fd1a4459c8 +EBUILD bareos-12.4.5.ebuild 11564 SHA256 2a2043fcb29d19e47d7183d1b0752100d951df98cb76d8900b3317d97c43a1cb SHA512 f7a8cfbed7746c4a5c8f1e0dcf6dbbc2aac8c625c6b967c3c13679a26db4db23ae5ff7fe399f9da33a15f8e4b4984dc5ef04b994d638f55ce6333c3bfeadf69d WHIRLPOOL e32fa000d007cb2b3459838b8bf7669044d90e292106c557feeb7e70b51c54534e335dbf42a762af6b3e04c76433bda356ad6eec7c5c4f5e287c3d62f865fbd0 +MISC TODO 71 SHA256 321410731e5588759260d420a94fc1bcd1f9eb1a2f7ec2a01734d0cdebf020f3 SHA512 cf6a318db53cbe18bf9bc0c138c7a6b8386f1f0a776ee318028422b09340bc9c2ae24f5615a331e363dd8456cc3acf444d17cdd435c2610775174252722464e6 WHIRLPOOL 4dcb8f8682579cc234b35ebeab005359d77415cbbcb48738bc298be1b41f1c40b80a9a72c3c8a52c69ddcccc78b89cd51abbf092e3aa22b393b7f85e17c36a58 +MISC metadata.xml 835 SHA256 d56d43bab17d98b05de2400c1ee935d12dc4fcdaa053b6b5fe363ee1d4428626 SHA512 2dc1cb1185fa7d7645ee221f5f8a8b7df1db9015902bf714e3d91c8282daaa35f25d2b3445d7cf42f04ba796a3eff88fef48c9caf2ffd94190f434db8af2b2ad WHIRLPOOL a4523fe5d67cd89f200cd0a9a8c974c206d80fff246352c8ba9285c3b980682d8330b2bf894cfea58ade840685890ba2872f2320e4c9c558a21e2e946a708b29 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 0000000..ac8e458 --- /dev/null +++ b/app-backup/bareos/bareos-12.4.5.ebuild @@ -0,0 +1,412 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +PYTHON_COMPAT=( python2_{6,7} ) +PYTHON_REQ_USE="threads" + +inherit eutils multilib python-single-r1 qt4-r2 user + +#MY_PV=${PV/_beta/-b} +#MY_P=${PN}-${MY_PV} + +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 dynamic-cats-backends 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="|| ( ^^ ( mysql postgres sqlite3 ) clientonly ) + static? ( clientonly ) + python? ( ${PYTHON_REQUIRED_USE} )" + +S=${WORKDIR}/${PN}-Release-${PV} + +pkg_setup() { + #XOR and !clientonly controlled by REQUIRED_USE + use mysql && export mydbtype="mysql" + use postgres && export mydbtype="postgresql" + use sqlite3 && export mydbtype="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/ instead of ./ + 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 466688 drop deprecated categories from Desktop file + sed -i -e 's/Application;//' src/qt-console/bat.desktop.in || 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 + + # fix file not found error during make depend + #epatch "${FILESDIR}"/5.2.12/${PN}-5.2.12-depend.patch +} + +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)" + else + myconf="${myconf} \ + $(use_enable director build-dird) \ + $(use_enable storage-daemon build-stored)" + # bug #311099 + # database support needed by dir-only *and* sd-only + # build as well (for building bscan, btape, etc.) + myconf="${myconf} \ + --with-${mydbtype} \ + --enable-batch-insert" + fi + + # do not build bat 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_with python) \ + $(use_enable !readline conio) \ + $(use_enable readline) \ + $(use_with readline readline /usr) \ + $(use_with ssl openssl) \ + $(use_enable ipv6) \ + $(use_enable acl) \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable dynamic-cats-backends) \ + $(use_enable scsi-crypto) \ + $(use_enable sql-pooling) \ + $(use_enable ndmp)" + + 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 \ + --disable-afs \ + --host=${CHOST} \ + ${myconf} + # correct configuration for QT based bat + if use qt4 ; then + pushd src/qt-console + 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 database update scripts + #diropts -m0750 + #insinto /usr/libexec/bareos/cats + #insopts -m0754 + #doins "${S}"/src/cats/* + #fperms 0640 /usr/libexec/bareos/cats/README + + # 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 + #rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.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 + if ! use qt4; then + rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1* + fi + + # documentation + #dodoc ChangeLog ReleaseNotes SUPPORT technotes + 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) + case "${mydbtype}" in + sqlite3) + # sqlite3 databases don't have a daemon + sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die + ;; + *) + # all other databases have daemons + sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die + ;; + esac + ;; + *) + ;; + 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 + + # make sure bareos group can execute bareos programs + # TBD +} + +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 ${mydbtype} databases with:" + einfo " /usr/libexec/bareos/create_${mydbtype}_database" + einfo " /usr/libexec/bareos/make_${mydbtype}_tables" + einfo " /usr/libexec/bareos/grant_${mydbtype}_privileges" + einfo + fi + + if use sqlite3; then + einfo + einfo "Be aware that Bareos does not officially support SQLite database anymore." + einfo "Best use it only for a client-only installation. See Bug #445540." + 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 0000000..3cdee15 --- /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 0000000..94d8fb6 --- /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 0000000..07f906c --- /dev/null +++ b/app-backup/bareos/files/bareos-dir.confd @@ -0,0 +1,17 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# Config file for /etc/init.d/bareos-dir + +# If the database server where you store your bareos catalog +# is on a different machine, please set this to 0. +# Setting it to 1 makes bareos-dir depend on the corresponding +# database service selected at package compile time. +LOCAL_DB=1 + +# 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 0000000..bbcaed0 --- /dev/null +++ b/app-backup/bareos/files/bareos-dir.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + if [ "${LOCAL_DB}" -eq 1 ]; then + need "%database%" + fi + 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 /var/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 0000000..4bcea49 --- /dev/null +++ b/app-backup/bareos/files/bareos-fd.confd @@ -0,0 +1,8 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# 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 0000000..2fdf4fb --- /dev/null +++ b/app-backup/bareos/files/bareos-fd.initd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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 /var/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 0000000..9e112f7 --- /dev/null +++ b/app-backup/bareos/files/bareos-sd.confd @@ -0,0 +1,11 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# 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 0000000..3fa3112 --- /dev/null +++ b/app-backup/bareos/files/bareos-sd.initd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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 /var/run/bareos-sd.*.pid + eend $? +} diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml new file mode 100644 index 0000000..e022705 --- /dev/null +++ b/app-backup/bareos/metadata.xml @@ -0,0 +1,19 @@ + + + + app-backup + + mschiff@gentoo.org + Marc Schiffbauer + + + Only install file-daemon (client) + Install director + Install storage daemon (bareos-sd) + Install support files for logwatch + Enable support for NDMP (Network Data Management Protocol) + Support dynamic loading of catalog backends + Enable SQL pooling support + Enable low level SCSI crypto support + +