# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231284682 -3600 # Node ID 5ba5c2911c128cd64f8f1e3427f411d81ffc8ea1 # Parent 8adc5213fd5572e3686815838528efbbb901253f Complete package spec and correct various build problems. diff -r 8adc5213fd55 -r 5ba5c2911c12 bacula/bacula.patch --- a/bacula/bacula.patch Wed Jan 07 00:25:41 2009 +0100 +++ b/bacula/bacula.patch Wed Jan 07 00:31:22 2009 +0100 @@ -1,6 +1,7 @@ Index: manpages/Makefile.in ---- manpages/Makefile.in.orig 2007-04-24 17:47:01 +0200 -+++ manpages/Makefile.in 2008-07-09 07:45:59 +0200 +diff -Nau manpages/Makefile.in.orig manpages/Makefile.in +--- manpages/Makefile.in.orig 2007-04-24 17:47:01.000000000 +0200 ++++ manpages/Makefile.in 2008-11-19 22:55:01.066689027 +0100 @@ -20,23 +20,21 @@ install: $(MKDIR) $(DESTDIR)/$(mandir)/man8 @@ -32,25 +33,30 @@ clean: dummy Index: scripts/bacula.in ---- scripts/bacula.in.orig 2008-07-06 15:06:15 +0200 -+++ scripts/bacula.in 2008-07-09 07:53:22 +0200 -@@ -15,30 +15,36 @@ +diff -Nau scripts/bacula.in.orig scripts/bacula.in +--- scripts/bacula.in.orig 2008-07-06 15:06:15.000000000 +0200 ++++ scripts/bacula.in 2008-11-19 23:08:15.438347068 +0100 +@@ -13,32 +13,38 @@ + # easier to "steal" this code for the development + # environment where they are different. # - SCRIPTDIR=@scriptdir@ +-SCRIPTDIR=@scriptdir@ ++SCRIPTDIR=@libexecdir@ +-case "$1" in +action=$1 +debug=$2 +[ -n "$3" ] && enable_dir=$3 || enable_dir=yes +[ -n "$4" ] && enable_sd=$4 || enable_sd=yes +[ -n "$5" ] && enable_fd=$5 || enable_fd=yes -+ - case "$1" in ++ ++case "$action" in start) - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 ;; @@ -59,8 +65,8 @@ - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 ;; @@ -76,15 +82,16 @@ - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status ;; *) Index: scripts/btraceback.in ---- scripts/btraceback.in.orig 2008-06-01 10:49:00 +0200 -+++ scripts/btraceback.in 2008-07-09 07:45:59 +0200 +diff -Nau scripts/btraceback.in.orig scripts/btraceback.in +--- scripts/btraceback.in.orig 2008-06-01 10:49:00.000000000 +0200 ++++ scripts/btraceback.in 2008-11-19 23:09:44.305993544 +0100 @@ -12,6 +12,9 @@ PNAME="${PNAME} on `hostname`" if test `uname -s` = SunOS ; then @@ -96,8 +103,9 @@ | @sbindir@/bsmtp -h @smtp_host@ -f @dump_email@ -s "Bacula DBX traceback of ${PNAME}" @dump_email@ else Index: src/dird/bacula-dir.conf.in ---- src/dird/bacula-dir.conf.in.orig 2008-06-19 21:44:34 +0200 -+++ src/dird/bacula-dir.conf.in 2008-07-09 07:45:59 +0200 +diff -Nau src/dird/bacula-dir.conf.in.orig src/dird/bacula-dir.conf.in +--- src/dird/bacula-dir.conf.in.orig 2008-06-19 21:44:34.000000000 +0200 ++++ src/dird/bacula-dir.conf.in 2008-11-19 23:10:11.001069502 +0100 @@ -29,7 +29,8 @@ Level = Incremental Client = @hostname@-fd diff -r 8adc5213fd55 -r 5ba5c2911c12 bacula/bacula.spec --- a/bacula/bacula.spec Wed Jan 07 00:25:41 2009 +0100 +++ b/bacula/bacula.spec Wed Jan 07 00:31:22 2009 +0100 @@ -32,7 +32,7 @@ Group: System License: GPL Version: 2.4.3 -Release: 20081013 +Release: 20081118 # package options %option with_server yes @@ -62,8 +62,8 @@ BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes PreReq: OpenPKG, openpkg >= 20060823 -BuildPreReq: readline, zlib -PreReq: readline, zlib +BuildPreReq: ncurses, readline, zlib +PreReq: ncurses, readline, zlib %if "%{with_ssl}" == "yes" BuildPreReq: openssl >= 0.9.8 PreReq: openssl >= 0.9.8 @@ -129,9 +129,16 @@ -e "s;For Bacula release @VERSION@ .*;;" \ `find . -name "*.conf.in"` + # help specific platforms find fdatasync(3) + libs="" + case "%{l_platform -t}" in + *-sunos* ) libs="-lrt" ;; + esac + # use localhost as default host %{l_shtool} subst \ -e 's;hostname=.*;hostname=localhost;g' \ + -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ configure # configure @@ -141,8 +148,9 @@ esac CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ + CPPFLAGS="%{l_cppflags ncurses}" \ LDFLAGS="%{l_ldflags} $LIBS" \ + LIBS="$libs" \ ./configure \ --prefix=%{l_prefix} \ --with-dir-user=%{l_rusr} \ @@ -183,11 +191,14 @@ %endif --enable-wx-console=no \ --sysconfdir=%{l_prefix}/etc/bacula \ + --libexecdir=%{l_prefix}/libexec/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-archivedir=/tmp \ + --with-sbin-perm=0755 \ --disable-nls # build @@ -217,10 +228,9 @@ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # strip down installation - # do not strip binaries, to make it easier to diagnose problems - # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true + 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 + for unwanted in startmysql stopmysql; do rm -f $unwanted done ) || exit $? @@ -228,18 +238,20 @@ # install additional files %{l_shtool} install -c -m 754 %{l_value -s -a} \ %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec + %{l_shtool} install -c -m 640 \ + src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ - # 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 $? + ## 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 755 %{l_value -s -a} \