From 8c3bf0c5774e4bef62ed63292e9f92712287561a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 18 Feb 2009 11:40:09 +0000 Subject: [PATCH] Ensure that libtool directory always cleaned + reduce unnecessary output during make clean. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8464 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/manpages/Makefile.in | 2 +- bacula/patches/2.4.4-sd-deadlock.patch | 67 ++++++++++++++++++++++++++ bacula/platforms/Makefile.in | 2 +- bacula/src/cats/Makefile.in | 10 ++-- bacula/src/console/Makefile.in | 4 +- bacula/src/dird/Makefile.in | 4 +- bacula/src/filed/Makefile.in | 4 +- bacula/src/findlib/Makefile.in | 2 +- bacula/src/gnome2-console/Makefile.in | 4 +- bacula/src/lib/Makefile.in | 2 +- bacula/src/plugins/fd/Makefile.in | 12 ++--- bacula/src/stored/Makefile.in | 4 +- bacula/src/tools/Makefile.in | 4 +- bacula/src/wx-console/Makefile.in | 4 +- bacula/technotes-2.5 | 3 ++ 15 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 bacula/patches/2.4.4-sd-deadlock.patch diff --git a/bacula/manpages/Makefile.in b/bacula/manpages/Makefile.in index daaecf5986..5f9b4c96dc 100644 --- a/bacula/manpages/Makefile.in +++ b/bacula/manpages/Makefile.in @@ -40,7 +40,7 @@ uninstall: done clean: - $(RMF) *~ 1 2 3 *.bak + @$(RMF) *~ 1 2 3 *.bak @find . -name .#* -exec $(RMF) {} \; depend: diff --git a/bacula/patches/2.4.4-sd-deadlock.patch b/bacula/patches/2.4.4-sd-deadlock.patch new file mode 100644 index 0000000000..ed60e6874b --- /dev/null +++ b/bacula/patches/2.4.4-sd-deadlock.patch @@ -0,0 +1,67 @@ + + This patch is backported from the development SVN and should fix + bug #1213, which is a deadlock in the SD when a volume is on the + wrong drive. + + Apply it to version 2.4.4 with: + + cd + patch -p0 <2.4.4-sd-deadlock.patch + ./configure + make + ... + make install + + +Index: src/stored/reserve.c +=================================================================== +--- src/stored/reserve.c (revision 8426) ++++ src/stored/reserve.c (working copy) +@@ -1,7 +1,7 @@ + /* + Bacula® - The Network Backup Solution + +- Copyright (C) 2000-2008 Free Software Foundation Europe e.V. ++ Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + + The main author of Bacula is Kern Sibbald, with contributions from + many others, a complete list can be found in the file AUTHORS. +@@ -498,7 +498,6 @@ + void DCR::unreserve_device() + { + lock_volumes(); +- dev->dlock(); + if (is_reserved()) { + clear_reserved(); + reserved_volume = false; +@@ -514,7 +513,6 @@ + volume_unused(this); + } + } +- dev->dunlock(); + unlock_volumes(); + } + +Index: src/stored/acquire.c +=================================================================== +--- src/stored/acquire.c (revision 8426) ++++ src/stored/acquire.c (working copy) +@@ -1,7 +1,7 @@ + /* + Bacula® - The Network Backup Solution + +- Copyright (C) 2002-2008 Free Software Foundation Europe e.V. ++ Copyright (C) 2002-2009 Free Software Foundation Europe e.V. + + The main author of Bacula is Kern Sibbald, with contributions from + many others, a complete list can be found in the file AUTHORS. +@@ -647,8 +647,8 @@ + + /* Detach this dcr only if attached */ + if (dcr->attached_to_dev && dev) { ++ dev->dlock(); + dcr->unreserve_device(); +- dev->dlock(); + dcr->dev->attached_dcrs->remove(dcr); /* detach dcr from device */ + dcr->attached_to_dev = false; + // remove_dcr_from_dcrs(dcr); /* remove dcr from jcr list */ diff --git a/bacula/platforms/Makefile.in b/bacula/platforms/Makefile.in index 103cd034d0..1a7b89408b 100644 --- a/bacula/platforms/Makefile.in +++ b/bacula/platforms/Makefile.in @@ -87,7 +87,7 @@ clean: (cd $${subdir}; $(MAKE) clean) \ fi; \ done - rm -f 1 2 3 + @rm -f 1 2 3 distclean: @rm -f Makefile diff --git a/bacula/src/cats/Makefile.in b/bacula/src/cats/Makefile.in index 204b2e3d90..221648698e 100644 --- a/bacula/src/cats/Makefile.in +++ b/bacula/src/cats/Makefile.in @@ -67,12 +67,12 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) - $(RMF) *.la - $(RMF) -r .libs _libs + @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) + @$(RMF) *.la + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ - $(RMF) core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 +clean: libtool-clean + @$(RMF) core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 realclean: clean $(RMF) tags diff --git a/bacula/src/console/Makefile.in b/bacula/src/console/Makefile.in index bdc77244d8..04117c049e 100644 --- a/bacula/src/console/Makefile.in +++ b/bacula/src/console/Makefile.in @@ -63,9 +63,9 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-console static-bconsole gmon.out diff --git a/bacula/src/dird/Makefile.in b/bacula/src/dird/Makefile.in index 3bf5d6c9ab..076dea1ac8 100644 --- a/bacula/src/dird/Makefile.in +++ b/bacula/src/dird/Makefile.in @@ -77,9 +77,9 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-bacula-dir diff --git a/bacula/src/filed/Makefile.in b/bacula/src/filed/Makefile.in index 27bb660a48..e19a727702 100644 --- a/bacula/src/filed/Makefile.in +++ b/bacula/src/filed/Makefile.in @@ -100,9 +100,9 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-bacula-fd @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ diff --git a/bacula/src/findlib/Makefile.in b/bacula/src/findlib/Makefile.in index 59e027bba6..a4e3a59362 100644 --- a/bacula/src/findlib/Makefile.in +++ b/bacula/src/findlib/Makefile.in @@ -91,7 +91,7 @@ libtool-clean: @$(RMF) *.la @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 realclean: clean diff --git a/bacula/src/gnome2-console/Makefile.in b/bacula/src/gnome2-console/Makefile.in index 3c4a771680..ba737939c4 100644 --- a/bacula/src/gnome2-console/Makefile.in +++ b/bacula/src/gnome2-console/Makefile.in @@ -78,9 +78,9 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) bgnome-console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-bgnome-console gmon.out Makefile.am diff --git a/bacula/src/lib/Makefile.in b/bacula/src/lib/Makefile.in index 68009e8d82..b699900a28 100644 --- a/bacula/src/lib/Makefile.in +++ b/bacula/src/lib/Makefile.in @@ -206,7 +206,7 @@ libtool-clean: @$(RMF) *.la @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3 @$(RMF) rwlock_test md5sum sha1sum diff --git a/bacula/src/plugins/fd/Makefile.in b/bacula/src/plugins/fd/Makefile.in index f23d3b6881..eccbc7e770 100644 --- a/bacula/src/plugins/fd/Makefile.in +++ b/bacula/src/plugins/fd/Makefile.in @@ -54,15 +54,15 @@ install: all $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la libtool-clean: - find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) - $(RMF) *.la - $(RMF) -r .libs _libs + @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) + @$(RMF) *.la + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ - rm -f main *.so *.o 1 2 3 +clean: libtool-clean + @rm -f main *.so *.o 1 2 3 distclean: clean - rm -f Makefile + @rm -f Makefile uninstall: $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so diff --git a/bacula/src/stored/Makefile.in b/bacula/src/stored/Makefile.in index d9a74e41d1..80ccf46145 100644 --- a/bacula/src/stored/Makefile.in +++ b/bacula/src/stored/Makefile.in @@ -180,9 +180,9 @@ uninstall: (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf bacula-sd.conf.new) libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) bscan bcopy static-bacula-sd diff --git a/bacula/src/tools/Makefile.in b/bacula/src/tools/Makefile.in index b1572ddc83..d7b3139e86 100644 --- a/bacula/src/tools/Makefile.in +++ b/bacula/src/tools/Makefile.in @@ -117,9 +117,9 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) bsmtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) $(DIRTOOLS) diff --git a/bacula/src/wx-console/Makefile.in b/bacula/src/wx-console/Makefile.in index 03c8d6e6f5..7f832b9eb2 100644 --- a/bacula/src/wx-console/Makefile.in +++ b/bacula/src/wx-console/Makefile.in @@ -92,9 +92,9 @@ bwx-console_private.res: bwx-console_private.rc windres.exe -i bwx-console_private.rc -I rc -o bwx-console_private.res -O coff libtool-clean: - $(RMF) -r .libs _libs + @$(RMF) -r .libs _libs -clean: @LIBTOOL_CLEAN_TARGET@ +clean: libtool-clean @$(RMF) $(CONSOBJS) bwx-console $(WIN32RES) distclean: clean diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 36115c5090..45aa8b931a 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -25,6 +25,9 @@ filepattern (restore with regex in bsr) mixed priorities General: +18Feb09 +kes Ensure that libtool directory always cleaned + reduce + unnecessary output during make clean. 15Feb09 ebl Check postgresql database encoding that should be SQL_ASCII and print a warning if it's something else. -- 2.39.5