From fde9df947f731faf77fe3517bb6587f4c0d80299 Mon Sep 17 00:00:00 2001 From: Scott Barninger Date: Sun, 6 Mar 2005 16:50:16 +0000 Subject: [PATCH] 1.36.2 release git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1868 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../gentoo/1.36.2-cdrecord-configure.patch | 19 ++ bacula/platforms/gentoo/bacula.ebuild | 164 ++++++++++++------ 2 files changed, 127 insertions(+), 56 deletions(-) create mode 100644 bacula/platforms/gentoo/1.36.2-cdrecord-configure.patch diff --git a/bacula/platforms/gentoo/1.36.2-cdrecord-configure.patch b/bacula/platforms/gentoo/1.36.2-cdrecord-configure.patch new file mode 100644 index 0000000000..6fa8511484 --- /dev/null +++ b/bacula/platforms/gentoo/1.36.2-cdrecord-configure.patch @@ -0,0 +1,19 @@ +diff -uNr bacula-1.36.2/configure bacula-1.36.2-fixed/configure +--- bacula-1.36.2/configure 2005-02-25 04:46:49.000000000 -0500 ++++ bacula-1.36.2-fixed/configure 2005-03-06 10:11:23.905848861 -0500 +@@ -7301,15 +7301,6 @@ + # get scsibus,target,lun + # ------------------------------------------- + CDSTL="3,0,0" +-if test ! x$CDRECORD = x ; then +- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'` +- if test x${CDSTL} = x ; then +- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'` +- fi +- if test x${CDSTL} = x ; then +- CDSTL="3,0,0" +- fi +-fi + + + diff --git a/bacula/platforms/gentoo/bacula.ebuild b/bacula/platforms/gentoo/bacula.ebuild index b98b779ff6..3c2298aef8 100644 --- a/bacula/platforms/gentoo/bacula.ebuild +++ b/bacula/platforms/gentoo/bacula.ebuild @@ -1,5 +1,4 @@ # Copyright 2004 D. Scott Barninger -# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Modified from bacula-1.34.5.ebuild for 1.36.0 release @@ -18,11 +17,18 @@ # more on bug #181 - another user has reported a sandbox violation trying to # write to /dev/sg0 - still can't reproduce this behavior # add an 'addpredict /dev/sg0' -# 08 Dec 2004 D. Scott Barninger +# 08 Dec 2004 D. Scott Barninger # # resolve bug #181 - problem is caused by configure calling cdrecord to scan # the scsi bus. patch configure to remove this. add logrotate script. -# 06 Feb 2005 D. Scott Barninger +# 06 Feb 2005 D. Scott Barninger +# +# fix documentation bug +# 07 Feb 2005 D. Scott Barninger +# +# new USE keywords bacula-clientonly bacula-split +# add new logwatch scripts +# 06 Mar 2005 D. Scott Barninger DESCRIPTION="featureful client/server network backup suite" HOMEPAGE="http://www.bacula.org/" @@ -30,8 +36,8 @@ SRC_URI="mirror://sourceforge/bacula/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="x86 ~ppc ~sparc" -IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows" +KEYWORDS="x86 ~ppc ~sparc ~amd64" +IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows bacula-clientonly bacula-split" inherit eutils @@ -39,54 +45,62 @@ inherit eutils # mysql is the recommended choice ... # may need sys-libs/libtermcap-compat but try without first DEPEND=">=sys-libs/zlib-1.1.4 - sys-apps/mtx readline? ( >=sys-libs/readline-4.1 ) tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) gnome? ( gnome-base/libgnome ) gnome? ( app-admin/gnomesu ) - sqlite? ( =dev-db/sqlite-2* ) - mysql? ( >=dev-db/mysql-3.23 ) - postgres? ( >=dev-db/postgresql-7.4.0 ) + !bacula-clientonly? ( + sqlite? ( =dev-db/sqlite-2* ) + mysql? ( >=dev-db/mysql-3.23 ) + postgres? ( >=dev-db/postgresql-7.4.0 ) + sys-apps/mtx + ) X? ( virtual/x11 ) wxwindows? ( >=x11-libs/wxGTK-2.4.2 ) virtual/mta dev-libs/gmp" RDEPEND="${DEPEND} - sys-apps/mtx - app-arch/mt-st" + !bacula-clientonly? ( + sys-apps/mtx + app-arch/mt-st + )" src_compile() { - epatch ${FILESDIR}/1.36.1-cdrecord-configure.patch + # this resolves bug #181 + epatch ${FILESDIR}/1.36.2-cdrecord-configure.patch local myconf="" - # define this to skip building the other daemons ... - [ -n "$BUILD_CLIENT_ONLY" ] \ - && myconf="${myconf} --enable-client-only" - myconf=" `use_enable readline` `use_enable gnome` `use_enable tcpd tcp-wrappers` `use_enable X x`" - [ -n "$BUILD_CLIENT_ONLY" ] \ - && myconf="${myconf} --enable-client-only" - - # mysql is the recomended choice ... - if use mysql - then - myconf="${myconf} --with-mysql=/usr" - elif use postgres - then - myconf="${myconf} --with-postgresql=/usr" - elif use sqlite + # define this to skip building the other daemons ... + if use bacula-clientonly then - myconf="${myconf} --with-sqlite=/usr" - elif use sqlite && use mysql + myconf="${myconf} --enable-client-only" + fi + + # select database support + if ! use bacula-clientonly then - myconf="${myconf/--with-sqlite/}" + # mysql is the recomended choice ... + if use mysql + then + myconf="${myconf} --with-mysql=/usr" + elif use postgres + then + myconf="${myconf} --with-postgresql=/usr" + elif use sqlite + then + myconf="${myconf} --with-sqlite=/usr" + elif use sqlite && use mysql + then + myconf="${myconf/--with-sqlite/}" + fi fi if use wxwindows @@ -104,10 +118,6 @@ src_compile() { myconf="${myconf} --enable-tray-monitor" fi - # some users report sandbox violations - # should not be needed with above configure patch - #addpredict /dev/sg0 - ./configure \ --enable-smartalloc \ --prefix=/usr \ @@ -193,10 +203,30 @@ src_install() { chmod 644 ${D}/etc/bacula/tray-monitor.conf fi - # the database update scripts - mkdir -p ${D}/etc/bacula/updatedb - cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/ - chmod 754 ${D}/etc/bacula/updatedb/* + if ! use bacula-clientonly + then + # the database update scripts + mkdir -p ${D}/etc/bacula/updatedb + cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/ + chmod 754 ${D}/etc/bacula/updatedb/* + + # the logrotate configuration + mkdir -p ${D}/etc/logrotate.d + cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula + chmod 644 ${D}/etc/logrotate.d/bacula + + # the logwatch scripts + mkdir -p ${D}/etc/log.d/conf/logfiles + mkdir -p ${D}/etc/log.d/conf/services + mkdir -p ${D}/etc/log.d/scripts/services + cp ${S}/scripts/logwatch/bacula ${D}/etc/log.d/scripts/services/bacula + cp ${S}/scripts/logwatch/logfile.bacula.conf ${D}/etc/log.d/conf/logfiles/bacula.conf + cp ${S}/scripts/logwatch/services.bacula.conf ${D}/etc/log.d/conf/services/bacula.conf + chmod 755 ${D}/etc/log.d/scripts/services/bacula + chmod 644 ${D}/etc/log.d/conf/logfiles/bacula.conf + chmod 644 ${D}/etc/log.d/conf/services/bacula.conf + + fi # the cdrom rescue package mkdir -p ${D}/etc/bacula/rescue/cdrom @@ -205,11 +235,6 @@ src_install() { cp ${S}/src/filed/static-bacula-fd ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd chmod 754 ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd - # the logrotate configuration - mkdir -p ${D}/etc/logrotate.d - cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula - chmod 644 ${D}/etc/logrotate.d/bacula - # documentation for a in ${S}/{Changelog,README,ReleaseNotes,kernstodo,LICENSE,doc/bacula.pdf} do @@ -217,8 +242,6 @@ src_install() { done dohtml -r ${S}/doc/html-manual doc/home-page - chown -R root:root ${D}/usr/share/doc/${PF} - chmod -R 644 ${D}/usr/share/doc/${PF}/* # clean up permissions left broken by install chmod o-r ${D}/etc/bacula/query.sql @@ -226,9 +249,21 @@ src_install() { # remove the working dir so we can add it postinst with group rmdir ${D}/var/bacula - # this is now in the source package processed by configure + # init scripts exeinto /etc/init.d - newexe ${S}/platforms/gentoo/bacula-init bacula + if use bacula-clientonly + then + newexe ${S}/platforms/gentoo/bacula-fd bacula-fd + else + if use bacula-split + then + newexe ${S}/platforms/gentoo/bacula-fd bacula-fd + newexe ${S}/platforms/gentoo/bacula-sd bacula-sd + newexe ${S}/platforms/gentoo/bacula-dir bacula-dir + else + newexe ${S}/platforms/gentoo/bacula-init bacula + fi + fi } pkg_postinst() { @@ -245,7 +280,8 @@ pkg_postinst() { install -m0750 -o root -g bacula -d ${ROOT}/var/bacula # link installed bacula-fd.conf into rescue directory - ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf + #ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf + # no longer necessary after 1.36.2 einfo einfo "The CDRom rescue disk package has been installed into the" @@ -256,7 +292,7 @@ pkg_postinst() { einfo "the device information for your CD recorder." einfo - if [ ! $BUILD_CLIENT_ONLY ]; then + if ! use bacula-clientonly; then einfo einfo "Please note either/or nature of database USE flags for" einfo "Bacula. If mysql is set, it will be used, else postgres" @@ -350,15 +386,31 @@ pkg_postinst() { einfo einfo "Review your configuration files in /etc/bacula and" - if [ $BUILD_CLIENT_ONLY ]; then - einfo "since this is a client-only build edit the init" - einfo "script /etc/init.d/bacula and comment out the sections" - einfo "for the director and storage daemons and then" - fi einfo "start the daemons:" - einfo " /etc/init.d/bacula start" + if use bacula-clientonly; then + einfo " /etc/init.d/bacula-fd start" + else + if use bacula-split; then + einfo " /etc/init.d/bacula-sd start" + einfo " /etc/init.d/bacula-dir start" + einfo " /etc/init.d/bacula-fd start" + einfo " or /etc/bacula/bacula will start all three." + else + einfo " /etc/init.d/bacula start" + fi + fi einfo einfo "You may also wish to:" - einfo " rc-update add bacula default" + if use bacula-clientonly; then + einfo " rc-update add bacula-fd default" + else + if use bacula-split; then + einfo " rc-update add bacula-sd default" + einfo " rc-update add bacula-dir default" + einfo " rc-update add bacula-fd default" + else + einfo " rc-update add bacula default" + fi + fi einfo } -- 2.39.5