OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Matthias Kurz Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 24-Aug-2005 09:08:10 Branch: HEAD Handle: 2005082408081000 Added files: openpkg-src/bacula bexec.sh Modified files: openpkg-src/bacula bacula.patch bacula.spec rc.bacula Removed files: openpkg-src/bacula bconsole.sh Log: - Upgrade to latest release - various improvements Summary: Revision Changes Path 1.3 +64 -111 openpkg-src/bacula/bacula.patch 1.7 +97 -26 openpkg-src/bacula/bacula.spec 1.3 +0 -10 openpkg-src/bacula/bconsole.sh 1.1 +22 -0 openpkg-src/bacula/bexec.sh 1.4 +9 -0 openpkg-src/bacula/rc.bacula ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/bacula/bacula.patch ============================================================================ $ cvs diff -u -r1.2 -r1.3 bacula.patch --- openpkg-src/bacula/bacula.patch 20 Jul 2005 19:45:16 -0000 1.2 +++ openpkg-src/bacula/bacula.patch 24 Aug 2005 07:08:10 -0000 1.3 @@ -1,98 +1,21 @@ -Index: configure ---- configure.orig 2005-06-18 15:34:19.000000000 +0200 -+++ configure 2005-07-20 09:26:54.328806000 +0200 -@@ -5942,15 +5943,15 @@ - no) : ;; - yes|*) - if test "$with_readline" != "yes"; then -- CONS_INC="-I${with_readline}" -- CONS_LDFLAGS="-L$with_readline" -+ CONS_INC="-I${with_readline}/include/readline" -+ CONS_LDFLAGS="-L$with_readline/lib" - else - with_readline="/usr/include/readline" - fi -- as_ac_Header=`echo "ac_cv_header_${with_readline}/readline.h" | $as_tr_sh` -+ as_ac_Header=`echo "ac_cv_header_${with_readline}/include/readline/readline.h" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then -- echo "$as_me:$LINENO: checking for ${with_readline}/readline.h" >&5 --echo $ECHO_N "checking for ${with_readline}/readline.h... $ECHO_C" >&6 -+ echo "$as_me:$LINENO: checking for ${with_readline}/include/readline/readline.h" >&5 -+echo $ECHO_N "checking for ${with_readline}/include/readline/readline.h... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi -@@ -5958,8 +5959,8 @@ - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - else - # Is the header compilable? --echo "$as_me:$LINENO: checking ${with_readline}/readline.h usability" >&5 --echo $ECHO_N "checking ${with_readline}/readline.h usability... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking ${with_readline}/include/readline/readline.h usability" >&5 -+echo $ECHO_N "checking ${with_readline}/include/readline/readline.h usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -5967,7 +5968,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default --#include <${with_readline}/readline.h> -+#include <${with_readline}/include/readline/readline.h> - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -@@ -6003,15 +6004,15 @@ - echo "${ECHO_T}$ac_header_compiler" >&6 - - # Is the header present? --echo "$as_me:$LINENO: checking ${with_readline}/readline.h presence" >&5 --echo $ECHO_N "checking ${with_readline}/readline.h presence... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking ${with_readline}/include/readline/readline.h presence" >&5 -+echo $ECHO_N "checking ${with_readline}/include/readline/readline.h presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include <${with_readline}/readline.h> -+#include <${with_readline}/include/readline/readline.h> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -6074,8 +6075,8 @@ - sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac --echo "$as_me:$LINENO: checking for ${with_readline}/readline.h" >&5 --echo $ECHO_N "checking for ${with_readline}/readline.h... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for ${with_readline}/include/readline/readline.h" >&5 -+echo $ECHO_N "checking for ${with_readline}/include/readline/readline.h... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -@@ -6090,7 +6091,7 @@ - #define HAVE_READLINE 1 - _ACEOF - -- CONS_LIBS="-lreadline -ltermcap" -+ CONS_LIBS="-lreadline -lhistory -ltermcap" - got_readline="yes" - - else -@@ -22032,7 +22033,7 @@ - s,@WCFLAGS@,$WCFLAGS,;t t - s,@WLDFLAGS@,$WLDFLAGS,;t t - s,@OBJLIST@,$OBJLIST,;t t --s,@hostname@,$hostname,;t t -+s,@hostname@,localhost,;t t - s,@TAPEDRIVE@,$TAPEDRIVE,;t t - s,@PSCMD@,$PSCMD,;t t - s,@WIN32@,$WIN32,;t t Index: scripts/bacula.in --- scripts/bacula.in.orig 2005-07-04 21:57:31.000000000 +0200 -+++ scripts/bacula.in 2005-07-20 09:26:30.410660000 +0200 ++++ scripts/bacula.in 2005-08-20 13:22:03.830778000 +0200 +@@ -21,11 +21,11 @@ + # easier to "steal" this code for the development + # environment where they are different. + # [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ @@ -203,9 +203,15 @@ export LD_ASSUME_KERNEL=2.4.19 fi @@ -186,26 +109,22 @@ ;; *) -Index: src/bacula.h ---- src/bacula.h.orig 2005-04-22 10:09:08.000000000 +0200 -+++ src/bacula.h 2005-07-20 09:26:30.424894000 +0200 -@@ -113,10 +113,13 @@ - #include <pthread.h> - - #ifdef HAVE_OPENSSL -+/* fight OpenSSL namespace pollution */ -+#define STORE OSSL_STORE - #include <openssl/ssl.h> - #include <openssl/x509v3.h> - #include <openssl/rand.h> - #include <openssl/err.h> -+#undef STORE - #endif - - /* Local Bacula includes. Be sure to put all the system +Index: scripts/btraceback.in +--- scripts/btraceback.in.orig 2005-05-08 11:18:21.000000000 +0200 ++++ scripts/btraceback.in 2005-08-20 20:06:37.084652000 +0200 +@@ -11,6 +11,9 @@ + PNAME=`basename $1` + if test `uname -s` = SunOS ; then + gcore -o @working_dir@/${PNAME} $2 ++fi ++if test `uname -s` = SunOS && ++ test -n `which dbx 2>/dev/null` ; then + dbx $1 $2 <@scriptdir@/btraceback.dbx 2>&1 \ + | @sbindir@/bsmtp -h @smtp_host@ -f @dump_email@ -s "Bacula DBX traceback of ${PNAME}" @dump_email@ + else Index: src/lib/tls.c --- src/lib/tls.c.orig 2005-06-04 21:20:35.000000000 +0200 -+++ src/lib/tls.c 2005-07-20 09:26:30.426826000 +0200 ++++ src/lib/tls.c 2005-08-06 18:58:21.163568000 +0200 @@ -331,7 +331,7 @@ X509V3_EXT_METHOD *method; STACK_OF(CONF_VALUE) *val; @@ -215,3 +134,37 @@ void *extstr = NULL; /* Get x509 extension method structure */ +Index: src/dird/bacula-dir.conf.in +--- src/dird/bacula-dir.conf.in.orig 2005-07-04 21:57:32.000000000 +0200 ++++ src/dird/bacula-dir.conf.in 2005-08-24 08:09:43.569070000 +0200 +@@ -29,7 +29,8 @@ + Level = Incremental + Client = @[EMAIL PROTECTED] + FileSet = "Full Set" +- Schedule = "WeeklyCycle" ++ #Schedule = "WeeklyCycle" ++ Schedule = "NEVER" + Storage = File + Messages = Standard + Pool = Default +@@ -105,7 +106,7 @@ + # directory to give a reasonable FileSet to backup to + # disk storage during initial testing. + # +- File = @BUILD_DIR@ ++ File = @scriptdir@ + } + + # +@@ -120,6 +121,11 @@ + } + } + ++# This schedule can be used to disable automatic scheduling ++Schedule { ++ Name = NEVER ++} ++ + # + # When to do the backups, full backup on first sunday of the month, + # differential (i.e. incremental since full) every other sunday, @@ . patch -p0 <<'@@ .' Index: openpkg-src/bacula/bacula.spec ============================================================================ $ cvs diff -u -r1.6 -r1.7 bacula.spec --- openpkg-src/bacula/bacula.spec 21 Jul 2005 12:09:51 -0000 1.6 +++ openpkg-src/bacula/bacula.spec 24 Aug 2005 07:08:10 -0000 1.7 @@ -25,8 +25,8 @@ # FIXME: rse: "odoc" support still not in final shape # package component versions -%define V_bacula 1.37.30 -%define V_doc 20050717 +%define V_bacula 1.37.36 +%define V_doc 20050823 # package information Name: bacula @@ -39,23 +39,26 @@ Group: System License: GPL Version: %{V_bacula} -Release: 20050721 +Release: 20050824 # package options -%option with_server yes -%option with_user %{l_musr} -%option with_group %{l_mgrp} -%option with_ssl yes -%option with_db sqlite -%option with_dvd no -%option with_mtx no -%option with_x11 no +%option with_server yes +%option with_user %{l_rusr} +%option with_group %{l_rgrp} +%option with_ssl yes +%option with_wrap no +%option with_db sqlite +%option with_dvd no +%option with_mtx no +%option with_python no +%option with_wxconsole no +%option with_traymonitor no # list of sources Source0: http://prdownloads.sourceforge.net/bacula/bacula-%{version}.tar.gz -Source1: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/bacula-doc-%{V_doc}.tar.gz +Source1: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/bacula/bacula-doc-%{V_doc}.tar.gz Source2: rc.bacula -Source3: bconsole.sh +Source3: bexec.sh Patch0: bacula.patch # build information @@ -69,6 +72,10 @@ BuildPreReq: openssl >= 0.9.8 PreReq: openssl >= 0.9.8 %endif +%if "%{with_wrap}" == "yes" +BuildPreReq: tcpwrappers +PreReq: tcpwrappers +%endif %if "%{with_db}" == "sqlite" BuildPreReq: sqlite PreReq: sqlite @@ -82,11 +89,25 @@ PreReq: postgresql %endif %if "%{with_dvd}" == "yes" +BuildPreReq: dvdrw-tools PreReq: dvdrw-tools %endif %if "%{with_mtx}" == "yes" +BuildPreReq: mtx PreReq: mtx %endif +%if "%{with_python}" == "yes" || "%{with_dvd}" == "yes" +BuildPreReq: python +PreReq: python +%endif +%if "%{with_wxconsole}" == "yes" +BuildPreReq: wx +PreReq: wx +%endif +%if "%{with_traymonitor}" == "yes" +BuildPreReq: gtk2 +PreReq: gtk2 +%endif AutoReq: no AutoReqProv: no @@ -110,8 +131,19 @@ %setup -q %setup -q -D -T -b 1 %patch -p0 + rm src/lib/tcpd.h %build + # delay generation of default passwords until installation, else + # the config files change on every install leading _always_ to + # the generation of .rpmnew files which prevent rc start/stop/restart + for pwd in dir_password fd_password sd_password \ + mon_dir_password mon_fd_password mon_sd_password; do + %{l_shtool} subst \ + -e "s;^s,@$pwd@,;s,@-$pwd-@,;" \ + configure + done + # configure case "%{with_db}" in sqlite ) cfg_db="--with-sqlite=%{l_prefix}" ;; @@ -140,16 +172,23 @@ %if "%{with_ssl}" == "yes" --with-openssl=%{l_prefix} \ %endif +%if "%{with_wrap}" == "yes" + --with-tcp-wrappers=yes \ +%endif $cfg_db \ -%if "%{with_x11}" == "yes" - --with-x \ +%if "%{with_python}" == "yes" || "%{with_dvd}" == "yes" + --with-python=%{l_prefix} \ +%endif +%if "%{with_wxconsole}" == "yes" + --enable-wx-console=yes \ %endif --sysconfdir=%{l_prefix}/etc/bacula \ --mandir=%{l_prefix}/man \ --with-scriptdir=%{l_prefix}/libexec/bacula \ --with-working-dir=%{l_prefix}/var/bacula \ --with-pid-dir=%{l_prefix}/var/bacula/run \ - --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys + --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ + --disable-nls # build %{l_make} %{l_mflags -O} @@ -163,6 +202,7 @@ $RPM_BUILD_ROOT%{l_prefix}/sbin \ $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula \ $RPM_BUILD_ROOT%{l_prefix}/etc/bacula \ + $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/clients \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ $RPM_BUILD_ROOT%{l_prefix}/var/bacula \ $RPM_BUILD_ROOT%{l_prefix}/var/bacula/run \ @@ -177,7 +217,8 @@ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # strip down installation - strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true + # do not strip binaries, to make it easier to diagnose problems + # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && for unwanted in bconsole startmysql stopmysql; do rm -f $unwanted @@ -186,20 +227,30 @@ rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/bacula.8.gz # install additional files - %{l_shtool} install -c -m 755 %{l_value -s -a} \ - %{SOURCE bconsole.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/bconsole + %{l_shtool} install -c -m 754 %{l_value -s -a} \ + %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec + + # wrap binaries to avoid to specify "-c" for each run + ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin + for bin in bacula-dir bacula-fd bacula-sd \ + bconsole bcopy bextract bls bscan dbcheck \ + tray-monitor wx-console; do + if [ -x $bin ]; then + mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula + ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin + fi + done + ) || exit $? # install run-command script %{l_shtool} install -c -m 644 %{l_value -s -a} \ -e 's,@with_server@,%{with_server},g' \ %{SOURCE rc.bacula} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ - # documentation/examples + # install documentation/examples %{l_shtool} install -c -m 644 \ -e 's,/usr/share/doc/bacula-<version>,%{l_prefix}/doc/bacula,' \ scripts/bacula.man $RPM_BUILD_ROOT%{l_prefix}/man/man8/bacula.8 - - # install documentation if %{l_odoc} -F; then echo "WARNING: will not package auxiliary documentation" 1>&2 else @@ -213,10 +264,21 @@ '%attr(750,%{with_user},%{with_group}) %{l_prefix}/var/bacula' \ '%attr(750,%{with_user},%{with_group}) %{l_prefix}/var/bacula/run' \ '%attr(750,%{with_user},%{with_group}) %{l_prefix}/var/bacula/run/subsys' \ - '%config %{l_prefix}/etc/bacula/bconsole.conf' \ - '%config %{l_prefix}/etc/bacula/bacula-sd.conf' \ - '%config %{l_prefix}/etc/bacula/bacula-fd.conf' \ - '%config %{l_prefix}/etc/bacula/bacula-dir.conf' + '%attr(-,-,%{with_group}) %{l_prefix}/libexec/bacula/dvd-freespace' \ + '%attr(-,-,%{with_group}) %{l_prefix}/libexec/bacula/dvd-writepart' \ + '%attr(-,-,%{with_group}) %{l_prefix}/libexec/bacula/mtx-changer' \ + '%attr(-,-,%{with_group}) %{l_prefix}/libexec/bacula/make_catalog_backup' \ + '%attr(-,-,%{with_group}) %{l_prefix}/libexec/bacula/delete_catalog_backup'\ + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-sd.conf' \ + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-fd.conf' \ + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-dir.conf' \ +%if "%{with_wxconsole}" == "yes" + '%config(noreplace) %{l_prefix}/etc/bacula/wx-console.conf' \ +%endif +%if "%{with_traymonitor}" == "yes" + '%config(noreplace) %{l_prefix}/etc/bacula/tray-monitor.conf' \ +%endif + '%config(noreplace) %{l_prefix}/etc/bacula/bconsole.conf' %files -f files %docdir %{l_docdir} @@ -232,6 +294,15 @@ chown %{with_user}:%{with_group} $RPM_INSTALL_PREFIX/var/bacula/bacula.db fi + # generate default passwords + for pwd in dir_password fd_password sd_password \ + mon_dir_password mon_fd_password mon_sd_password; do + %{l_shtool} subst \ + -e "s;@$pwd@;`openssl rand -base64 33`;" \ + $RPM_INSTALL_PREFIX/etc/bacula/*.conf \ + $RPM_INSTALL_PREFIX/etc/bacula/*.conf.rpmnew 2>/dev/null + done + # after upgrade, restart service [ $1 -eq 2 ] || exit 0 eval `%{l_rc} bacula status 2>/dev/null` @@ . rm -f openpkg-src/bacula/bconsole.sh <<'@@ .' Index: openpkg-src/bacula/bconsole.sh ============================================================================ [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED] @@ . patch -p0 <<'@@ .' Index: openpkg-src/bacula/bexec.sh ============================================================================ $ cvs diff -u -r0 -r1.1 bexec.sh --- /dev/null 2005-08-24 09:07:47 +0200 +++ bexec.sh 2005-08-24 09:08:10 +0200 @@ -0,0 +1,22 @@ +#!/bin/sh +myName=`basename $0` +cfgPath="@l_prefix@/etc/bacula" +case "$myName" in + bacula-dir ) cfg="bacula-dir.conf" ;; + bacula-fd ) cfg="bacula-fd.conf" ;; + bacula-sd ) cfg="bacula-sd.conf" ;; + bconsole ) cfg="bconsole.conf" ;; + bcopy ) cfg="bacula-sd.conf" ;; + bextract ) cfg="bacula-sd.conf" ;; + bls ) cfg="bacula-sd.conf" ;; + bscan ) cfg="bacula-sd.conf" ;; + dbcheck ) cfg="bacula-dir.conf" ;; + tray-monitor ) cfg="tray-monitor.conf" ;; + wx-console ) cfg="wx-console.conf" ;; + * ) echo "bexec: illegal link to '$0'" + exit 1 ;; +esac +cfg="$cfgPath/$cfg" +# The user is still able to specify own config files, because +# bconsole accepts multiple '-c' options. The last '-c' wins. +exec @l_prefix@/libexec/bacula/$myName -c $cfg "$@" @@ . patch -p0 <<'@@ .' Index: openpkg-src/bacula/rc.bacula ============================================================================ $ cvs diff -u -r1.3 -r1.4 rc.bacula --- openpkg-src/bacula/rc.bacula 20 Jul 2005 20:02:01 -0000 1.3 +++ openpkg-src/bacula/rc.bacula 24 Aug 2005 07:08:10 -0000 1.4 @@ -9,6 +9,8 @@ [EMAIL PROTECTED]@ bacula_fd_enable=yes bacula_debug="" + bacula_log_files="@l_prefix@/var/bacula/log" + bacula_log_numfiles=4 %status -u @l_susr@ -o bacula_usable="no" @@ -35,3 +37,10 @@ sleep 5 rc bacula start +%weekly -u @l_susr@ + rcService bacula enable yes || exit 0 + if [ ".$bacula_log_files" != . ]; then + shtool rotate -f \ + -n ${bacula_log_numfiles} -z 9 -m 640 -r $bacula_log_files + fi + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org