diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-backup/bareos |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-backup/bareos')
-rw-r--r-- | app-backup/bareos/Manifest | 21 | ||||
-rw-r--r-- | app-backup/bareos/bareos-13.2.4-r1.ebuild | 403 | ||||
-rw-r--r-- | app-backup/bareos/bareos-14.2.2.ebuild | 414 | ||||
-rw-r--r-- | app-backup/bareos/bareos-14.2.5.ebuild | 414 | ||||
-rw-r--r-- | app-backup/bareos/bareos-15.2.2.ebuild | 428 | ||||
-rw-r--r-- | app-backup/bareos/bareos-16.2.4.ebuild | 428 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-12.4.5-Makefile.patch | 27 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-12.4.5-bat-ldflags.patch | 11 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-dir.confd | 17 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-dir.initd | 21 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-fd.confd | 7 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-fd.initd | 21 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.confd | 10 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.initd | 21 | ||||
-rw-r--r-- | app-backup/bareos/metadata.xml | 28 |
15 files changed, 2271 insertions, 0 deletions
diff --git a/app-backup/bareos/Manifest b/app-backup/bareos/Manifest new file mode 100644 index 000000000000..362d4df52a43 --- /dev/null +++ b/app-backup/bareos/Manifest @@ -0,0 +1,21 @@ +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 672 SHA256 51db5b4757bef72123224b3101f2ca48016d8f2c360842be09711bfa93014009 SHA512 24e01b4baddaedce2a667c1d9f5422c3134a742fd8a4ddad9502a6b7a62a080e9133472e791cdea7ac2bb4a1737be9798405fc61b01096cc179f50139bcf7a24 WHIRLPOOL 83aa4aa728d31ba0d925501ee7d4b63c3ca317c08659e509676aa9d88a019092264f61aab5bb4b7316245fe76810138334ffe30058a64f4fb0ab14bd4bb68c8c +AUX bareos-dir.initd 491 SHA256 bc97d667402ef863ff012c81b709915b01a8bae2497a5a359cc2534ac4bd5408 SHA512 044136eb9260001943d377f977ab913b7999374d9389c275744087cbd18d0a7311c87d96d05551e83a179dc82ab2d5151bf2c5945082eae4f9e6bf44cb5bf060 WHIRLPOOL c735bf497f76a1a2530c4b64103143f8825abf650fdf2513437c3132068c9023a535ff0e413a1b3f671bf34d84591a9c79845a9ccbed1e79b775be923ae12b0d +AUX bareos-fd.confd 241 SHA256 0822f8b92036ff0150a85471d5f93e640049455ed548101242b8f79790e7e217 SHA512 e646adbd06765172da6f4af749b617c49cf57f072402a44dcb1eb4a289337c20c7677701489e5fe8991729097b55fe57d09a6573a7b4af4005435fd03ab39de5 WHIRLPOOL 23e43c3922b0be06b57003392e54b7162df75c9d115b64cdcad85e5d9c8e97742fb04f202281cbb700b549cbbb9cc998e6eaece42dd5706efee79b805b50e5eb +AUX bareos-fd.initd 457 SHA256 8e24a895b776cb2a6f34637cfebec610e9d4bd1a50d610c2b3faf650e04760e4 SHA512 444802b07cff09feb931795869e7cb50f3406a9f895c3baf69a16607ea7ae2da6553d6f819f7fca2ec4c7c86ebffbc9ba925513325b547fb12aab411ac4d68eb WHIRLPOOL 9e054b091e94288f9343faad0f6c46cfcea1af41043d00447eb880d9337c4d33132b71754f1750695a864e05588c6faaebc4585d4b02b193d32363e3e4439b98 +AUX bareos-sd.confd 391 SHA256 f8e4d28ccd79af3067152acb2c6612ba34da8f7ca3f20c5bccee4eb988e1f411 SHA512 4db591d0818e0d53b663e1e96371713269fddeac2a46ca5938f8b69185578b61ba530d4357f0cc9f9232834c66692a77708b70140fb856635e7cb2e16870b28d WHIRLPOOL b28d3551fc4c8bfd03b3b586e6a87cc385730fee3b4281a24bcd1c71fed7f0138c3ebc58b5b6ec1ee4a37a392f604507b1e8dc36096316a9b32ede76ba2e133d +AUX bareos-sd.initd 481 SHA256 b4ba83df0d1e0b6d8a9f7f9ebe0982c1c65826dbf19c90333c2812cead288f21 SHA512 e094df3f44ed39207129bb86020b223037acc7bda408a69711b68376d1044dbe67001370395dd4442df6b4e78e92dc5125dd14dad6c4826716df2084fbd45916 WHIRLPOOL 274ffc9783aba77c828052d5e31acc8170a2aa2e46c051f2c83e18cc7e73d0b17e94437a1c55c718c8c0475a02d85a2acf46d8138cef1c5977656ce70199f565 +DIST bareos-13.2.4.tar.gz 3467542 SHA256 def68891d074438e55d7a3e570cfaae1c1a8c9479d089815ba0f8f31e1d6eefc SHA512 d7e4bc016993f68521f4438b56adf51e88685195693d00d34103259c3c24d1d7c03cc2b7aecbb55ff88a00d5f169e9e42accd23b17bcd3c837ca78079a9f394f WHIRLPOOL 54b5ee5094be6569c1a7857ebcc98f1e24ee272485327397f1ab0833433a6b46e8b7e3f2cd927668600ba63f2d36a920dc64cb9dfc2f0dd69adb57a70b862848 +DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470 +DIST bareos-14.2.5.tar.gz 3820963 SHA256 f42bc34afa913cfb4d6b7ef8856c7195d8b13b21c987da1039d46e6c60f06720 SHA512 600cdf8175b1199b73ddcf8a32df7bca446c294c4c830038f93fe3f053482916745675df3a51bc494cdab00b362d57657a34a94e78bac4bae3acced06347023d WHIRLPOOL 361c0edb411c824f128ccb5e27f4d637ecfdf4f2de7a428a8c4eace6d5c23a33a3868cc1b380dcbf6e06d6c7bb71ff222abad923ea9a0bfb74e78f0445c4058b +DIST bareos-15.2.2.tar.gz 3928036 SHA256 f314e7d3e99e92b4261af97888ddcdaaedf513b638745b07270db3e6930e9008 SHA512 07b11c51695a6ff348317965625e5cdb8e296d4f3a4037718a98e266d94650ed1fb905c220ac791123d8ed92d0aed24854a6ab52887249849dbc00697d3300c3 WHIRLPOOL e43141e1ba670cd13da716739f4e3ed2a5f63e4dd43efbeed0a781429ff3b7cc6ddcb67d8f6ec47508b036f1da4ffc5cdbd4d49887e428de55969250817d529b +DIST bareos-16.2.4.tar.gz 4275141 SHA256 9a96d9220150f1db643c932ac529b1e3ad179978ef6b06a2504c06db43b4ff3c SHA512 91f7f2b3d9889f4faa9834dc414e2250015d3d26bf8bd0c04c1f3fd882a50a4066ced145f7c8609c070e8f74b53574953e3fef344726c6863cd7bbc73c76a88c WHIRLPOOL 7c3192a80680240246b0fa342799fcc4bc4b71ee8255badd950ffbd570b246129e9a68340e2972e0f0e4746f537330d4ebccc3358cc840f5278562d8b97641b1 +EBUILD bareos-13.2.4-r1.ebuild 11271 SHA256 b921c8df48d4506212f531ee632045e514c531063394a9301b2651343e934784 SHA512 c21ff041810eb4672260dbbff621b67c14120e52b2f7cc961c6b9dfb5fc2866b126c380f67eaea2b7a97bd1e9f4c57405fd4182c0c3dc1d00bf2ce4f73c609b3 WHIRLPOOL e6c8fc536d61c496bc5da0e2b803d0c23b273a0d35cee0ea37b4d1f1dbe9fc03bfcf23b42279a58deb339c5c05fccff8b1ea4dcac98a26ec7ef1020babbc341f +EBUILD bareos-14.2.2.ebuild 11625 SHA256 107e3643804a35de96bf72986141aff7455ca5a698fbac00d40a88c2e0bbb63d SHA512 946d2f66d2334b2f077604395a80bf28e72b939d1569d88a0d865f941b430735b9da59f604821cbdf890c27f7702774d78d3607e516f6329426d8d55bff581b1 WHIRLPOOL c8085068d0e2d3fde1eade3081233c2051cb126caff77f0fa00c8c66c472ff869ededffb3a8366550624430f15e0ff54aac39ade99cb3dd1fc735fd2c1706db5 +EBUILD bareos-14.2.5.ebuild 11625 SHA256 107e3643804a35de96bf72986141aff7455ca5a698fbac00d40a88c2e0bbb63d SHA512 946d2f66d2334b2f077604395a80bf28e72b939d1569d88a0d865f941b430735b9da59f604821cbdf890c27f7702774d78d3607e516f6329426d8d55bff581b1 WHIRLPOOL c8085068d0e2d3fde1eade3081233c2051cb126caff77f0fa00c8c66c472ff869ededffb3a8366550624430f15e0ff54aac39ade99cb3dd1fc735fd2c1706db5 +EBUILD bareos-15.2.2.ebuild 12003 SHA256 b0a51ab6c7f31d630a70d74931608782f9b362c04e6e8dfcd256a7afe36d4179 SHA512 52cecb0c65a4c1ed7cb7d15190c5edc0c9827c8ed306d789c02d9df6d963487b3b1327802c6de85e12b3b39856c1f5e7a83852b754210078fab889641d3f152c WHIRLPOOL dc3c51c7618c514f9450a1125719907cbcb538d578856c96b1c6a4d62895a5892307b33a8e32f9171d5c1cf00bb2dc50dc317de4c557bf5820eeb75a72925959 +EBUILD bareos-16.2.4.ebuild 12003 SHA256 b0a51ab6c7f31d630a70d74931608782f9b362c04e6e8dfcd256a7afe36d4179 SHA512 52cecb0c65a4c1ed7cb7d15190c5edc0c9827c8ed306d789c02d9df6d963487b3b1327802c6de85e12b3b39856c1f5e7a83852b754210078fab889641d3f152c WHIRLPOOL dc3c51c7618c514f9450a1125719907cbcb538d578856c96b1c6a4d62895a5892307b33a8e32f9171d5c1cf00bb2dc50dc317de4c557bf5820eeb75a72925959 +MISC ChangeLog 5095 SHA256 05b27308d15e2742ff1cf67491f6d0b66a8cf246aa7a5ba636f848fc499ecd8b SHA512 c888ccd1b7b47bb06066c5a68aa13814a8e92a3da26e8bc43a66f9d3b865ca89be07bcd29c0bf6e43fafdbb39fd7e98b88705fe4ff6849cdecf85ae42c7fd49d WHIRLPOOL c088e25cccfb7fef58b1f03d9096259a123059306fa3e393bddfe0dae4eb09bcb3744735440844dbbea4192ea77fcb42c7413857a8f4ff432e3c569dae926603 +MISC ChangeLog-2015 4195 SHA256 9ea205bb234b9362121d761d6bae2857833f5d52727a02258a1ca2dd96d68ae6 SHA512 90ac61578ab3ba85f428ed4cb71b8f24bfb4bdecd2feeb5fdd8757ea5ddca69ae7ccf879643aaec6c1e03544dcdca55062adf26493e771b02c48794bb25faf53 WHIRLPOOL 6b1686e87617013a2c0067391d625266a24e5adc0dc4641501b0d5f6658b1c1696f8764f718b6e019685fee84c824eac71a666903e5ed63398a4554f9db4e97e +MISC metadata.xml 1440 SHA256 e4f510b28cb70fc9ef58bc590f67e0eae4c8ad47f6c645e670d5e788a5ab2966 SHA512 b76bc10f031dc5ab0abd71980706a3beebfb50a8e7d273bdfbf85124309ba98ab4542d6e273691a8105c8c5a078b3886d891131a79c587ab62f361e7bba7b5b7 WHIRLPOOL 1c27947c74f3114e9829724eb4491dc5d70e044b32e7b53a63bedd41cc3dcaad2500c5c6627b4dc21a8eed92af670b2e9eaade8851ff937217c5edfa13ea5536 diff --git a/app-backup/bareos/bareos-13.2.4-r1.ebuild b/app-backup/bareos/bareos-13.2.4-r1.ebuild new file mode 100644 index 000000000000..1890fd8e3bd8 --- /dev/null +++ b/app-backup/bareos/bareos-13.2.4-r1.ebuild @@ -0,0 +1,403 @@ +# 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="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres + python qt4 readline scsi-crypto sql-pooling +sqlite ssl static +storage-daemon + tcpd vim-syntax X" + +DEPEND=" + !app-backup/bacula + dev-libs/gmp:0 + !clientonly? ( + postgres? ( dev-db/postgresql:*[threads] ) + mysql? ( virtual/mysql ) + sqlite? ( 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? ( + !libressl? ( dev-libs/openssl:0=[static-libs] ) + libressl? ( dev-libs/libressl:0=[static-libs] ) + ) + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl: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 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='' + + 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) \ + " + + 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-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 + + # 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-14.2.2.ebuild b/app-backup/bareos/bareos-14.2.2.ebuild new file mode 100644 index 000000000000..e9e440269f51 --- /dev/null +++ b/app-backup/bareos/bareos-14.2.2.ebuild @@ -0,0 +1,414 @@ +# 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="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres + python qt4 readline scsi-crypto sql-pooling +sqlite 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 ) + sqlite? ( 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? ( + !libressl? ( dev-libs/openssl:0=[static-libs] ) + libressl? ( dev-libs/libressl:0=[static-libs] ) + ) + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl: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 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='' + + 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 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 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-14.2.5.ebuild b/app-backup/bareos/bareos-14.2.5.ebuild new file mode 100644 index 000000000000..e9e440269f51 --- /dev/null +++ b/app-backup/bareos/bareos-14.2.5.ebuild @@ -0,0 +1,414 @@ +# 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="acl clientonly +director fastlz ipv6 libressl logwatch mysql ndmp postgres + python qt4 readline scsi-crypto sql-pooling +sqlite 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 ) + sqlite? ( 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? ( + !libressl? ( dev-libs/openssl:0=[static-libs] ) + libressl? ( dev-libs/libressl:0=[static-libs] ) + ) + ) + !static? ( + acl? ( virtual/acl ) + dev-libs/lzo + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl: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 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='' + + 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 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 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-15.2.2.ebuild b/app-backup/bareos/bareos-15.2.2.ebuild new file mode 100644 index 000000000000..a90878f44490 --- /dev/null +++ b/app-backup/bareos/bareos-15.2.2.ebuild @@ -0,0 +1,428 @@ +# 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 new file mode 100644 index 000000000000..a90878f44490 --- /dev/null +++ b/app-backup/bareos/bareos-16.2.4.ebuild @@ -0,0 +1,428 @@ +# 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/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..5503131f8f3a --- /dev/null +++ b/app-backup/bareos/files/bareos-dir.confd @@ -0,0 +1,17 @@ +# 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-dir.initd b/app-backup/bareos/files/bareos-dir.initd new file mode 100644 index 000000000000..826d27a829c9 --- /dev/null +++ b/app-backup/bareos/files/bareos-dir.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use dns bareos-fd bareos-sd +} + +start() { + ebegin "Starting bareos director" + checkpath -d -m 0750 -o bareos:bareos /run/bareos + 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/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..cd7ac02c50df --- /dev/null +++ b/app-backup/bareos/files/bareos-fd.confd @@ -0,0 +1,7 @@ +# 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-fd.initd b/app-backup/bareos/files/bareos-fd.initd new file mode 100644 index 000000000000..e272daa88ecd --- /dev/null +++ b/app-backup/bareos/files/bareos-fd.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use dns +} + +start() { + ebegin "Starting bareos file daemon" + checkpath -d -m 0750 /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 $? +} diff --git a/app-backup/bareos/files/bareos-sd.confd b/app-backup/bareos/files/bareos-sd.confd new file mode 100644 index 000000000000..017c80bafdfa --- /dev/null +++ b/app-backup/bareos/files/bareos-sd.confd @@ -0,0 +1,10 @@ +# 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" diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd new file mode 100644 index 000000000000..f20be4ecf56e --- /dev/null +++ b/app-backup/bareos/files/bareos-sd.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# 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 bareos:bareos /run/bareos + 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/bareos-sd.*.pid + eend $? +} diff --git a/app-backup/bareos/metadata.xml b/app-backup/bareos/metadata.xml new file mode 100644 index 000000000000..4f7694434a3e --- /dev/null +++ b/app-backup/bareos/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <use> + <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> + </use> + <upstream> + <remote-id type="github">bareos/bareos</remote-id> + </upstream> +</pkgmetadata> |