From 99abbc5e5a6ecd3fc981b45646fd8cb5d320377b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 24 Feb 2018 19:58:07 +0000 Subject: gentoo resync : 24.02.2018 --- app-backup/bacula/Manifest | 2 + app-backup/bacula/bacula-9.0.6-r2.ebuild | 427 +++++++++++++++++++++ .../bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch | 21 + 3 files changed, 450 insertions(+) create mode 100644 app-backup/bacula/bacula-9.0.6-r2.ebuild create mode 100644 app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch (limited to 'app-backup/bacula') diff --git a/app-backup/bacula/Manifest b/app-backup/bacula/Manifest index c3910236371a..c14f7f55d462 100644 --- a/app-backup/bacula/Manifest +++ b/app-backup/bacula/Manifest @@ -11,6 +11,7 @@ AUX 7.2.0/bacula-7.2.0-doc.patch 435 BLAKE2B 65d528b337f9a3e2eaf456b6dad37ddc59b AUX 7.2.0/bacula-7.2.0-fix-static.patch 2599 BLAKE2B 8b9119b0d6f47cace3e77a93434bec735276ddc8295157aaca67778dad1bbd62603201c011d5457f36b92b0ba9e7975fc4d0d7ca06d33decf510dd805759d210 SHA512 12b241ca20e7d3eff3c4fdf495c3f4f2074e41196379ae3bf5d655299413c0dec263200644745d081e77253fe20b07845d567de71dedb7564a6f64f134c3c905 AUX 9.0.2/bacula-9.0.2-fix-static.patch 3637 BLAKE2B 4119db6091fdaf7d8d103a166ce672c405da8093e2a04eef5e9bda1cc0e0cde997fef378d92e0fa1531c39281e877aa10f8dd939377924fc7252d6c228722c86 SHA512 218febc3ccbfeccea4a5b05f6086aeff7f4e0e88e3a6670a8a0406101e7276c35d254f4bfa6b6782ea5bdcd1ad8fc5080cff80bb9befcf4d7f968075eb850360 AUX 9.0.2/bacula-9.0.2-lib-search-path.patch 1431 BLAKE2B f04bbf695a926424092dd974994967eefcd48407f2de43b9e94bff25403e66f4a49cde08d667e3b5fc4fb9f8d273a786c3422325db3f589278d16f136d4a9a0c SHA512 3863102d2f8db4158dede306b07297da6550bbad1c77aea49a75de412a7f4630216ef2ae28fc51ffa8d8f9c373510e58982f28e32fdbb142a3551eef7f112b7d +AUX 9.0.6/bacula-9.0.6-bat-pro.patch 667 BLAKE2B b8987c244025f029a182d6b44f30e0e0a6835b9f6cadb6b43b2b55ea33113e20c20b6a367d965ea12358597e9807c79846e45571b31f9b66dc3ad83265fed4e7 SHA512 d521759cad65ef73fb674cd6b58f9540ef6e86842bcd45ece4730f71a408076b38faea2088bf6f2993fed9a88d727ff2ff8c3e3619e27fcaa1d5afe4506640cf AUX 9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch 306 BLAKE2B a6bca03d7e61051046083f1773ce65035f695dd8d5de45d58e0488eb5047580db444cbb52ae5e93068ff60028220a9286da9d1323d141335be31ebfb9c9acb44 SHA512 86a869f10e512eac6aa4500f73ace1cfe3883cc4d176c26d275f6dc51320763cb55c2d139a7a0230c57c40f4996651a0de71788e3a7ef343a4290e56f9585a22 AUX bacula-dir.confd 629 BLAKE2B 85eb7131fe1735ea3af0075b26c88408a11ce7653b92e27198d6bbfdbe2bf4d4e157eb6685f2cac79a8de1e4d24d9c4eb25f9d64b1b956162718fe09633018c4 SHA512 85ed5317313721a7b3776a257c204e0ac45a5221c6bd0b5886944cbd1e4829fe146e7af52cdc604cbf5e3d8722c955da40cbf989dc9ea7466653c98bf8c7cfdf AUX bacula-dir.initd 505 BLAKE2B 385c24291c0a0108baf441d078054f70fd0346dfe4b6de7a236f9c1e7a4416b895c73075509dfcc03d1b58760668ca1fc5415033188f9dcb3acceea7f5e1044a SHA512 de0003d6c873ecf9609a6e1838772a29555b4e5e251369035746ede296f4b0f1c85dcbe8822d526d6a5489ba0921a8566f7f2b963682fddb3560f6f7e817c40a @@ -34,5 +35,6 @@ EBUILD bacula-7.4.6.ebuild 11866 BLAKE2B 92e8f89091d44ce6ca67a36cc01d13c5462f681 EBUILD bacula-7.4.7.ebuild 11866 BLAKE2B 92e8f89091d44ce6ca67a36cc01d13c5462f681446cee52250db08d4f4921eb6bb70558b0bed27c44bd3eadb3e24e1f472cfa1072a4f8075717cb9ae56da7473 SHA512 f84a1f04067ece6f9666a111a14be2013a992bfb4aef5f450f065899a06f61a74100732461f8a9a94b1e9b9ae075164bd9564886ec1b20de6ede9fcff6cbfd26 EBUILD bacula-9.0.3.ebuild 11951 BLAKE2B 55d8dae509ee19c19f6c4e0dfa7b75d55f5f76ca74dd07b89991e431289dd2833e83da9b2367e663d2c4817d69a3b53d356c2ad8d837d472d3d95d37dab797cc SHA512 5d1ce8edf72b57a290ce991cc54c672c45d4e35588bb81963faace7d63f8211296afe2aab85b6c7d86ab6659bec6a03b14d063159bbbae19195910bc2f862c7e EBUILD bacula-9.0.6-r1.ebuild 12207 BLAKE2B 5bf1269ca69b0207c86af611e24d6117008c9170c2fb1807e877352f29686e3cdf6c1b485b3d6b6f106a60553bfcc64dbd75ccb04465de2ba4332da23e5cccef SHA512 27b66052ca76d4338fc05604252fd4f43a61771d5e5f5dfb4910d8da4bd6fbd654200167322d5b9de339060d97773bcf9e474ea73129ea3ce064057fcce1c7b2 +EBUILD bacula-9.0.6-r2.ebuild 12453 BLAKE2B 3c28c7fcf1221624813f6dd852ddc100abbcf33e96879acd26ecbe4392db7d3f78eafb21b0d9df7fa6e63bc642b7470434801d43429bb29fdae8e8b4fcbe7f16 SHA512 7cf0c87a376ef50381b8e4f3a872a2bc91a6dd08ea528fb7e9e31535703c7d61b5e7e39812f936ea2cf6aa10d349a52cc6f9b7b603296be6763b221160be84dd EBUILD bacula-9.0.6.ebuild 11975 BLAKE2B a6583a0b62fdcda8eed514e52947abf61e2b3f14d5e662500749a584fe6a67b2b04f10a48a5d9f84a23b43b52247b9a867308e5c269531bf423f273c18b48228 SHA512 7f79eb42b9d48f2073bcb4c43333d26c64fb2a43bddcf398483a5b98a025291d037854eec80965e86e1054e6341cdb03184a7ec297bd017a8284a53c302686ca MISC metadata.xml 626 BLAKE2B 5794ff725aacf865d2f20f402d057e6358a2c68be16f760f1446b2de5292c9582247ab86417131063e181168f003e1d6f5d200ac0dc3d47da24a3bca688dd93c SHA512 69d63f22a63a53daada5561d751f9903932c9a4596c164894a9aa6465a0f4ac90af99548439545fff1cfbcac9a1eb266a91119cbf73cb13edebd16b440613e55 diff --git a/app-backup/bacula/bacula-9.0.6-r2.ebuild b/app-backup/bacula/bacula-9.0.6-r2.ebuild new file mode 100644 index 000000000000..79f747f6e183 --- /dev/null +++ b/app-backup/bacula/bacula-9.0.6-r2.ebuild @@ -0,0 +1,427 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit qmake-utils desktop systemd user libtool + +MY_PV=${PV/_beta/-b} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Featureful client/server network backup suite" +HOMEPAGE="http://www.bacula.org/" +SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X" + +DEPEND=" + dev-libs/gmp:0 + !bacula-clientonly? ( + postgres? ( dev-db/postgresql:=[threads] ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + !bacula-nodir? ( virtual/mta ) + ) + qt5? ( + dev-qt/qtsvg:5 + x11-libs/qwt:6 + ) + logwatch? ( sys-apps/logwatch ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + 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 ) + sys-libs/zlib + dev-libs/lzo + sys-libs/ncurses:= + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + )" +RDEPEND="${DEPEND} + !bacula-clientonly? ( + !bacula-nosd? ( + sys-block/mtx + app-arch/mt-st + ) + ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" + +REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) ) + static? ( bacula-clientonly )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + #XOR and !bacula-clientonly controlled by REQUIRED_USE + use mysql && export mydbtype="mysql" + use postgres && export mydbtype="postgresql" + use sqlite && export mydbtype="sqlite3" + + # create the daemon group and user + if [ -z "$(egetent group bacula 2>/dev/null)" ]; then + enewgroup bacula + einfo + einfo "The group 'bacula' has been created. Any users you add to this" + einfo "group have access to files created by the daemons." + einfo + fi + + if use bacula-clientonly && use static && use qt5; then + ewarn + ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag." + ewarn + fi + + if ! use bacula-clientonly; then + if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then + enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw + einfo + einfo "The user 'bacula' has been created. Please see the bacula manual" + einfo "for information about running bacula as a non-root user." + einfo + fi + fi +} + +src_prepare() { + # adjusts default configuration files for several binaries + # to /etc/bacula/ 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/bacula/|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;//' scripts/bat.desktop.in || die + + # bug 466690 Use CXXFLAGS instead of CFLAGS + sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die + + # drop automatic install of unneeded documentation (for bug 356499) + eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch + + # bug #310087 + eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch + + # bug #311161 + eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch + + # bat needs to respect LDFLAGS and CFLAGS + eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-bat-pro.patch + + # bug #328701 + eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch + + eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch + + # fix soname in libbaccat.so bug #602952 + eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch" + + # do not strip binaries + sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die + sed -i -e "s/strip /# strip /" src/console/Makefile.in || die + + # fix file not found error during make depend + eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch + + # fix missing QtGlobal include in src/qt-console/pages.h for Qt5 + eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch + eapply_user + + # Fix systemd unit files: + # bug 497748 + sed -i -e '/Requires/d' platforms/systemd/*.service.in || die + sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die + # bug 504370 + sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die + # bug 584442 and 504368 + sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die + + # build 'bat' for Qt5 + export QMAKE="$(qt5_get_bindir)"/qmake + + # adapt to >=Qt-5.9 (see bug #644566) + # qmake needs an existing target file to generate install instructions + sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \ + src/qt-console/bat.pro.in || die + mkdir src/qt-console/.libs || die + touch src/qt-console/.libs/bat || die + chmod 755 src/qt-console/.libs/bat || die + + # fix bundled libtool (bug 466696) + # But first move directory with M4 macros out of the way. + # It is only needed by autoconf and gives errors during elibtoolize. + mv autoconf/libtool autoconf/libtool1 || die + elibtoolize +} + +src_configure() { + local myconf='' + + if use bacula-clientonly; then + myconf="${myconf} \ + $(use_enable bacula-clientonly client-only) \ + $(use_enable !static libtool) \ + $(use_enable static static-cons) \ + $(use_enable static static-fd)" + else + myconf="${myconf} \ + $(use_enable !bacula-nodir build-dird) \ + $(use_enable !bacula-nosd 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}" + if use mysql; then + myconf="${myconf} \ + --disable-batch-insert" + else + myconf="${myconf} \ + --enable-batch-insert" + fi + fi + + # do not build bat if 'static' clientonly + if ! use bacula-clientonly || ! use static; then + myconf="${myconf} \ + $(use_enable qt5 bat)" + fi + + myconf="${myconf} \ + $(use_with X x) \ + $(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)" + + econf \ + --libdir=/usr/$(get_libdir) \ + --docdir=/usr/share/doc/${PF} \ + --htmldir=/usr/share/doc/${PF}/html \ + --with-pid-dir=/var/run \ + --sysconfdir=/etc/bacula \ + --with-subsys-dir=/var/lock/subsys \ + --with-working-dir=/var/lib/bacula \ + --with-logdir=/var/lib/bacula \ + --with-scriptdir=/usr/libexec/bacula \ + --with-systemd=$(systemd_get_systemunitdir) \ + --with-dir-user=bacula \ + --with-dir-group=bacula \ + --with-sd-user=root \ + --with-sd-group=bacula \ + --with-fd-user=root \ + --with-fd-group=bacula \ + --enable-smartalloc \ + --disable-afs \ + --host=${CHOST} \ + ${myconf} +} + +src_compile() { + # Make build log verbose (bug #447806) + emake NO_ECHO="" +} + +src_install() { + emake DESTDIR="${D}" install + doicon scripts/bacula.png + + # install bat icon and desktop file when enabled + # (for some reason ./configure doesn't pick this up) + if use qt5 && ! use static ; then + doicon src/qt-console/images/bat_icon.png + domenu scripts/bat.desktop + fi + + # remove some scripts we don't need at all + rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql} + + # rename statically linked apps + if use bacula-clientonly && use static ; then + pushd "${D}"/usr/sbin || die + mv static-bacula-fd bacula-fd || die + mv static-bconsole bconsole || die + popd || die + fi + + # extra files which 'make install' doesn't cover + if ! use bacula-clientonly; then + # the database update scripts + diropts -m0750 + insinto /usr/libexec/bacula/updatedb + insopts -m0754 + doins "${S}"/updatedb/* + fperms 0640 /usr/libexec/bacula/updatedb/README + + # the logrotate configuration + # (now unconditional wrt bug #258187) + diropts -m0755 + insinto /etc/logrotate.d + insopts -m0644 + newins "${S}"/scripts/logrotate bacula + + # the logwatch scripts + if use logwatch; then + diropts -m0750 + dodir /usr/share/logwatch/scripts/services + dodir /usr/share/logwatch/scripts/shared + dodir /etc/logwatch/conf/logfiles + dodir /etc/logwatch/conf/services + pushd "${S}"/scripts/logwatch >&/dev/null || die + emake DESTDIR="${D}" install + popd >&/dev/null || die + fi + fi + + if ! use qt5; then + rm -vf "${D}"/usr/share/man/man1/bat.1* + fi + rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* + if use bacula-clientonly || use bacula-nodir; then + rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* + rm -vf "${D}"/usr/share/man/man8/dbcheck.8* + rm -vf "${D}"/usr/share/man/man1/bsmtp.1* + rm -vf "${D}"/usr/libexec/bacula/create_*_database + rm -vf "${D}"/usr/libexec/bacula/drop_*_database + rm -vf "${D}"/usr/libexec/bacula/make_*_tables + rm -vf "${D}"/usr/libexec/bacula/update_*_tables + rm -vf "${D}"/usr/libexec/bacula/drop_*_tables + rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges + rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup + fi + if use bacula-clientonly || use bacula-nosd; then + rm -vf "${D}"/usr/share/man/man8/bacula-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/bacula/disk-changer + rm -vf "${D}"/usr/libexec/bacula/mtx-changer + rm -vf "${D}"/usr/libexec/bacula/dvd-handler + fi + + # documentation + dodoc ChangeLog ReleaseNotes SUPPORT + + # 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/bacula.vim + insinto /usr/share/vim/vimfiles/ftdetect + newins scripts/filetype.vim bacula_ft.vim + fi + + # setup init scripts + myscripts="bacula-fd" + if ! use bacula-clientonly; then + if ! use bacula-nodir; then + myscripts="${myscripts} bacula-dir" + fi + if ! use bacula-nosd; then + myscripts="${myscripts} bacula-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}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd" + + # now set the database dependancy for the director init script + case "${script}" in + bacula-dir) + case "${mydbtype}" in + sqlite3) + # sqlite 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 + + systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service + + # make sure the working directory exists + diropts -m0750 + keepdir /var/lib/bacula + + # make sure bacula group can execute bacula libexec scripts + fowners -R root:bacula /usr/libexec/bacula +} + +pkg_postinst() { + if use bacula-clientonly; then + fowners root:bacula /var/lib/bacula + else + fowners bacula:bacula /var/lib/bacula + fi + + if ! use bacula-clientonly && ! use bacula-nodir; then + einfo + einfo "If this is a new install, you must create the ${mydbtype} databases with:" + einfo " /usr/libexec/bacula/create_${mydbtype}_database" + einfo " /usr/libexec/bacula/make_${mydbtype}_tables" + einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges" + einfo + + ewarn "ATTENTION!" + ewarn "The format of the database may have changed." + ewarn "If you just upgraded from a version below 9.0.0 you must run" + ewarn "'update_bacula_tables' now." + ewarn "Make sure to have a backup of your catalog before." + ewarn + fi + + if use sqlite; then + einfo + einfo "Be aware that Bacula 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=qt5'." + einfo +} diff --git a/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch b/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch new file mode 100644 index 000000000000..3d055b8c3077 --- /dev/null +++ b/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch @@ -0,0 +1,21 @@ +--- src/qt-console/bat.pro.in.orig 2018-02-18 16:17:21.027921363 +0100 ++++ src/qt-console/bat.pro.in 2018-02-18 16:18:12.554137528 +0100 +@@ -12,7 +12,7 @@ + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + + bins.path = /$(DESTDIR)@sbindir@ +-bins.files = bat ++bins.files = .libs/bat + confs.path = /$(DESTDIR)@sysconfdir@ + confs.commands = ./install_conf_file + help.path = /$(DESTDIR)@docdir@ +@@ -29,6 +29,9 @@ + QMAKE_LINK = $${LIBTOOL_LINK} $(CXX) + QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p + QMAKE_CLEAN += .libs/* bat ++QMAKE_LFLAGS += @LDFLAGS@ ++QMAKE_CFLAGS += @CFLAGS@ ++QMAKE_CXXFLAGS += @CXXFLAGS@ + + qwt { + INCLUDEPATH += @QWT_INC@ -- cgit v1.2.3