bacula/bacula.patch

Tue, 28 Aug 2012 18:36:35 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:36:35 +0200
changeset 579
6b18bb69901e
parent 578
ac1eb2cd38a8
child 649
c44c510c1c7f
permissions
-rw-r--r--

Correct the paths of patched scripts, refine password generation,
mitigate fdatasync(2) detection problems, correct dependencies, remove
outdated autoconf components, correct conf file paths and attributes,
complete and correct log file rotation handing, and note warnings
useful for diagnosing builds.

michael@20 1 Index: manpages/Makefile.in
michael@579 2 diff -Nau manpages/Makefile.in.orig manpages/Makefile.in
michael@577 3 --- manpages/Makefile.in.orig 2010-08-05 16:29:51.000000000 +0200
michael@578 4 +++ manpages/Makefile.in 2010-12-19 19:30:06.000000000 +0100
michael@578 5 @@ -21,23 +21,21 @@
michael@20 6 install:
michael@20 7 $(MKDIR) $(DESTDIR)/$(mandir)/man8
michael@20 8 for I in ${MAN8}; \
michael@20 9 - do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
michael@20 10 - $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man8/$$I.gz; \
michael@20 11 - rm -f $$I.gz); \
michael@20 12 + do \
michael@20 13 + $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man8/$$I; \
michael@20 14 done
michael@20 15 $(MKDIR) $(DESTDIR)/$(mandir)/man1
michael@20 16 for I in ${MAN1}; \
michael@20 17 - do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
michael@20 18 - $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man1/$$I.gz; \
michael@20 19 - rm -f $$I.gz); \
michael@20 20 + do \
michael@20 21 + $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man1/$$I; \
michael@20 22 done
michael@20 23
michael@20 24 uninstall:
michael@20 25 for I in ${MAN8}; \
michael@20 26 - do (rm -f $(DESTDIR)$(mandir)/man8/$$I.gz); \
michael@20 27 + do (rm -f $(DESTDIR)$(mandir)/man8/$$I); \
michael@20 28 done
michael@20 29 for I in ${MAN1}; \
michael@20 30 - do (rm -f $(DESTDIR)$(mandir)/man1/$$I.gz); \
michael@20 31 + do (rm -f $(DESTDIR)$(mandir)/man1/$$I); \
michael@20 32 done
michael@20 33
michael@220 34 clean:
michael@20 35 Index: scripts/bacula.in
michael@579 36 diff -Nau scripts/bacula.in.orig scripts/bacula.in
michael@577 37 --- scripts/bacula.in.orig 2010-08-05 16:29:51.000000000 +0200
michael@578 38 +++ scripts/bacula.in 2010-12-19 19:30:06.000000000 +0100
michael@579 39 @@ -13,37 +13,43 @@
michael@579 40 # easier to "steal" this code for the development
michael@579 41 # environment where they are different.
michael@579 42 #
michael@579 43 -SCRIPTDIR=@scriptdir@
michael@579 44 +SCRIPTDIR=@libexecdir@
michael@579 45 #
michael@579 46 # Disable Glibc malloc checks, it doesn't help and it keeps from getting
michael@579 47 # good dumps
michael@220 48 MALLOC_CHECK_=0
michael@220 49 export MALLOC_CHECK_
michael@20 50
michael@579 51 -case "$1" in
michael@20 52 +action=$1
michael@20 53 +debug=$2
michael@20 54 +[ -n "$3" ] && enable_dir=$3 || enable_dir=yes
michael@20 55 +[ -n "$4" ] && enable_sd=$4 || enable_sd=yes
michael@20 56 +[ -n "$5" ] && enable_fd=$5 || enable_fd=yes
michael@579 57 +
michael@579 58 +case "$action" in
michael@20 59 start)
michael@20 60 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
michael@20 61 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
michael@20 62 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
michael@579 63 + [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
michael@579 64 + [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
michael@20 65 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
michael@20 66 ;;
michael@20 67
michael@20 68 stop)
michael@20 69 # Stop the FD first so that SD will fail jobs and update catalog
michael@20 70 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
michael@20 71 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
michael@20 72 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
michael@579 73 + [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
michael@579 74 + [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
michael@20 75 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
michael@20 76 ;;
michael@20 77
michael@20 78 restart)
michael@20 79 - $0 stop
michael@579 80 + $0 stop $debug $enable_dir $enable_sd $enable_fd
michael@20 81 sleep 2
michael@20 82 - $0 start
michael@20 83 + $0 start $debug $enable_dir $enable_sd $enable_fd
michael@20 84 ;;
michael@20 85
michael@20 86 status)
michael@20 87 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
michael@20 88 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
michael@20 89 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
michael@579 90 + [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
michael@579 91 + [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
michael@20 92 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
michael@20 93 ;;
michael@20 94
michael@20 95 *)
michael@20 96 Index: src/dird/bacula-dir.conf.in
michael@579 97 diff -Nau src/dird/bacula-dir.conf.in.orig src/dird/bacula-dir.conf.in
michael@577 98 --- src/dird/bacula-dir.conf.in.orig 2010-08-05 16:29:51.000000000 +0200
michael@578 99 +++ src/dird/bacula-dir.conf.in 2010-12-19 19:30:06.000000000 +0100
michael@20 100 Level = Incremental
michael@220 101 Client = @basename@-fd
michael@20 102 FileSet = "Full Set"
michael@20 103 - Schedule = "WeeklyCycle"
michael@20 104 + #Schedule = "WeeklyCycle"
michael@20 105 + Schedule = "NEVER"
michael@20 106 Storage = File
michael@20 107 Messages = Standard
michael@578 108 Pool = File
michael@579 109 @@ -106,7 +107,7 @@
michael@579 110 # directory to give a reasonable FileSet to backup to
michael@579 111 # disk storage during initial testing.
michael@579 112 #
michael@579 113 - File = @sbindir@
michael@579 114 + File = @scriptdir@
michael@579 115 }
michael@579 116
michael@579 117 #
michael@578 118 @@ -123,6 +124,11 @@
michael@20 119 }
michael@20 120 }
michael@20 121
michael@20 122 +# This schedule can be used to disable automatic scheduling
michael@20 123 +Schedule {
michael@20 124 + Name = NEVER
michael@20 125 +}
michael@20 126 +
michael@20 127 #
michael@20 128 # When to do the backups, full backup on first sunday of the month,
michael@20 129 # differential (i.e. incremental since full) every other sunday,

mercurial