summaryrefslogtreecommitdiffstats
path: root/main/bacula
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-09-20 14:42:53 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-09-20 14:43:12 +0000
commit0673f1f7d1c96df35f74a141e32712921dbec45c (patch)
treee72d233cce9764baa91b66d559563796848e01df /main/bacula
parentf40ec382aa642921d4332b3a766b4a5bf09574ac (diff)
downloadaports-0673f1f7d1c96df35f74a141e32712921dbec45c.tar.bz2
aports-0673f1f7d1c96df35f74a141e32712921dbec45c.tar.xz
main/bacula*: remove/add patches
Diffstat (limited to 'main/bacula')
-rw-r--r--main/bacula/APKBUILD23
-rw-r--r--main/bacula/bacula-5.0.1-dsolink.patch11
-rw-r--r--main/bacula/bacula-5.0.3-as-needed.patch33
-rw-r--r--main/bacula/bacula-5.0.3-dsolink.patch165
-rw-r--r--main/bacula/bacula-5.0.3-log-path.patch13
-rw-r--r--main/bacula/bacula-5.2.3-as-needed.patch14
-rw-r--r--main/bacula/bacula-5.2.3-ldflags.patch11
-rw-r--r--main/bacula/bacula-5.2.3-lib-search-path.patch12
-rw-r--r--main/bacula/bacula.post-install11
9 files changed, 71 insertions, 222 deletions
diff --git a/main/bacula/APKBUILD b/main/bacula/APKBUILD
index 964bad6ee..321de9dbf 100644
--- a/main/bacula/APKBUILD
+++ b/main/bacula/APKBUILD
@@ -11,8 +11,10 @@ depends=""
depends_dev="autoconf mysql-dev ncurses-dev openssl-dev postgresql-dev sqlite-dev
zlib-dev"
makedepends="$depends_dev"
-install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
+install="$pkgname.pre-install $pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-sqlite"
+pkgusers="bacula"
+pkggroups="bacula"
source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
bacula-dir-init
bacula-dir-conf
@@ -23,6 +25,9 @@ source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgn
bacula-5.0.2-config.patch
bacula-5.0.2-openssl.patch
bacula-5.0.3-sqlite-priv.patch
+ bacula-5.2.3-as-needed.patch
+ bacula-5.2.3-ldflags.patch
+ bacula-5.2.3-lib-search-path.patch
bacula-config.patch
configure.in.patch
bacula-5.0.3-Makefile.patch
@@ -62,7 +67,7 @@ build() {
--with-mysql \
--with-sqlite3 \
--with-scriptdir=/etc/bacula/scripts \
- --with-working-dir=/var/bacula \
+ --with-working-dir=/var/lib/bacula \
--with-dir-user=bacula \
--with-dir-group=bacula \
--with-sd-user=bacula \
@@ -96,6 +101,11 @@ package() {
# Use shell script for catalog backup instead of perl
sed -i -e 's/make_catalog_backup.pl/make_catalog_backup/' \
"$pkgdir"/etc/bacula/bacula-dir.conf
+ for dir in /var/lib/bacula /etc/bacula/scripts/make_catalog_backup* \
+ /etc/bacula/scripts/mtx-changer*
+ do
+ chown bacula.bacula "$pkgdir"$dir || return 1
+ done
find "$pkgdir" -iname *.la -delete
# Backend is dinamically linked when subpackage is installed
#rm "$pkgdir"/usr/lib/libbaccats.so
@@ -124,7 +134,13 @@ pgsql() {
pkgdesc="Bacula PGSQL backend"
depends="bacula"
install="$pkgname.post-install"
+ pkgusers="postgres"
_mv_backend postgresql
+ for file in create_postgresql_database make_postgresql_tables \
+ grant_postgresql_privileges
+ do
+ chown postgres "$subpkgdir"/etc/bacula/scripts/$file
+ done
}
sqlite() {
@@ -144,6 +160,9 @@ afe2f9a4d79d7d96eb9372d003d10f86 bacula-sd-conf
71f7f9c041eff045b2e97d141316c059 bacula-5.0.2-config.patch
4e310e84c7aba5b8d043758e0fa0088f bacula-5.0.2-openssl.patch
9def0e68e3eb2f5f8b4c34108a248efd bacula-5.0.3-sqlite-priv.patch
+5fb1ef3f9fae381b64aa3226351f91a5 bacula-5.2.3-as-needed.patch
+5ff321fee690e6a3b48ae41f9860558c bacula-5.2.3-ldflags.patch
+fe1fe1df51c3e57343e2e7794447a763 bacula-5.2.3-lib-search-path.patch
5d3c1bf25d50996e0c0c344dc2444014 bacula-config.patch
ebc9c2bbc9be95c920723a3f142d8e19 configure.in.patch
0ec20df57bb632ed729cfaf5d0a3ee33 bacula-5.0.3-Makefile.patch
diff --git a/main/bacula/bacula-5.0.1-dsolink.patch b/main/bacula/bacula-5.0.1-dsolink.patch
deleted file mode 100644
index 1669cecb6..000000000
--- a/main/bacula/bacula-5.0.1-dsolink.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- bacula-5.0.1/src/qt-console/bat.pro.in~ 2010-02-24 09:33:48.000000000 -0600
-+++ bacula-5.0.1/src/qt-console/bat.pro.in 2010-03-11 17:12:44.645296544 -0600
-@@ -20,7 +20,7 @@
- TARGET = bat
- DEPENDPATH += .
- INCLUDEPATH += .. . ./console ./restore ./select
--LIBS += -L../lib -lbaccfg -lbac @OPENSSL_LIBS@
-+LIBS += -L../lib -lbaccfg -lbac -ldl @OPENSSL_LIBS@
- LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
- LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
- QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
diff --git a/main/bacula/bacula-5.0.3-as-needed.patch b/main/bacula/bacula-5.0.3-as-needed.patch
deleted file mode 100644
index 3603e936b..000000000
--- a/main/bacula/bacula-5.0.3-as-needed.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -urN bacula-5.0.3.orig/src/findlib/Makefile.in bacula-5.0.3/src/findlib/Makefile.in
---- bacula-5.0.3.orig/src/findlib/Makefile.in 2010-02-24 16:33:48.000000000 +0100
-+++ bacula-5.0.3/src/findlib/Makefile.in 2010-03-22 17:37:43.772805754 +0100
-@@ -59,7 +59,7 @@
-
- libbacfind.la: Makefile $(LIBBACFIND_LOBJS)
- @echo "Making $@ ..."
-- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE)
-+ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE) -L../lib -lbac $(LIBS) $(OPENSSL_LIBS)
-
- Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
- cd $(topdir) \
-diff -urN bacula-5.0.1.orig/src/lib/Makefile.in bacula-5.0.1/src/lib/Makefile.in
---- bacula-5.0.1.orig/src/lib/Makefile.in 2010-02-24 16:33:48.000000000 +0100
-+++ bacula-5.0.1/src/lib/Makefile.in 2010-03-22 17:37:05.352226188 +0100
-@@ -126,7 +126,7 @@
-
- libbac.la: Makefile $(LIBBAC_LOBJS)
- @echo "Making $@ ..."
-- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS)
-+ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(LIBS) $(OPENSSL_LIBS)
-
- libbaccfg.a: $(LIBBACCFG_OBJS)
- @echo "Making $@ ..."
-@@ -135,7 +135,7 @@
-
- libbaccfg.la: Makefile $(LIBBACCFG_LOBJS)
- @echo "Making $@ ..."
-- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACCFG_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACCFG_LT_RELEASE)
-+ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACCFG_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACCFG_LT_RELEASE) $(LIBS) $(OPENSSL_LIBS)
-
- libbacpy.a: $(LIBBACPY_OBJS)
- @echo "Making $@ ..."
diff --git a/main/bacula/bacula-5.0.3-dsolink.patch b/main/bacula/bacula-5.0.3-dsolink.patch
deleted file mode 100644
index 44309dad8..000000000
--- a/main/bacula/bacula-5.0.3-dsolink.patch
+++ /dev/null
@@ -1,165 +0,0 @@
---- bacula-5.0.3/src/qt-console/bat.pro.in~ 2010-08-10 11:27:17.000000000 -0500
-+++ bacula-5.0.3/src/qt-console/bat.pro.in 2010-08-10 12:32:00.312182153 -0500
-@@ -20,7 +20,7 @@
- TARGET = bat
- DEPENDPATH += .
- INCLUDEPATH += .. . ./console ./restore ./select
--LIBS += -L../lib -lbaccfg -lbac -ldl @OPENSSL_LIBS@
-+LIBS += -L../lib -lbaccfg -lbac -ldl -lz @OPENSSL_LIBS@
- LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
- LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
- QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
---- bacula-5.0.3/src/tools/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/tools/Makefile.in 2010-08-11 12:54:02.028450916 -0500
-@@ -57,7 +57,7 @@
- @echo " "
-
- bsmtp: Makefile bsmtp.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
-- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm -lz $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bregtest: Makefile bregtest.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bregtest.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
---- bacula-5.0.3/src/tools/Makefile.in~ 2010-08-11 12:57:29.000000000 -0500
-+++ bacula-5.0.3/src/tools/Makefile.in 2010-08-11 14:10:52.998447849 -0500
-@@ -64,7 +64,7 @@
-
- dbcheck: Makefile dbcheck.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) $(DIRCONFOBJS)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) \
-- -lbacsql -lbaccfg -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbacsql -lbaccfg -lbac -lm -lz $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- fstype: Makefile fstype.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lbacfind -lbac -lm \
---- bacula-5.0.3/src/tools/Makefile.in~ 2010-08-11 14:13:51.000000000 -0500
-+++ bacula-5.0.3/src/tools/Makefile.in 2010-08-11 15:11:00.309447155 -0500
-@@ -97,7 +97,7 @@
-
- bwild: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bwild.o
- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bwild.o \
-- $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ $(DLIB) -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bbatch: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) bbatch.o
- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -o $@ bbatch.o \
---- bacula-5.0.3/src/tools/Makefile.in~ 2010-08-12 06:57:25.000000000 -0500
-+++ bacula-5.0.3/src/tools/Makefile.in 2010-08-12 07:58:13.545781384 -0500
-@@ -93,7 +93,7 @@
-
- bregex: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bregex.o
- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bregex.o \
-- $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ $(DLIB) -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bwild: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bwild.o
- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bwild.o \
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-12 08:56:11.053777811 -0500
-@@ -91,7 +91,7 @@
- bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- @echo "Linking $@ ..."
- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(SDOBJS) $(FDLIBS) \
-- -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
-+ -lbacpy -lbaccfg -lbac -lm -lz $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
- $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
-
- static-bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-12 08:59:17.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-12 10:24:42.478529732 -0500
-@@ -117,7 +117,7 @@
- bls: Makefile $(BLSOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- @echo "Compiling $<"
- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) \
-- -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbacfind -lbaccfg -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bextract.o: bextract.c
- @echo "Compiling $<"
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-12 10:27:36.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-12 11:45:39.904529074 -0500
-@@ -127,7 +127,7 @@
- bextract: Makefile $(BEXTOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- @echo "Compiling $<"
- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(FDLIBS) \
-- -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbacfind -lbaccfg -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bscan.o: bscan.c
- @echo "Compiling $<"
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-12 11:48:22.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-12 13:21:02.246528324 -0500
-@@ -136,7 +136,7 @@
-
- bscan: Makefile $(SCNOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) \
-- -lbacsql $(DB_LIBS) $(FDLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbacsql $(DB_LIBS) $(FDLIBS) -lbacfind -lbaccfg -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bcopy.o: bcopy.c
- @echo "Compiling $<"
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-12 13:23:58.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-12 14:31:11.204777284 -0500
-@@ -107,7 +107,7 @@
-
- btape: Makefile $(TAPEOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) \
-- -lbacsql -lbaccfg -lbac $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbacsql -lbaccfg -lbac $(DLIB) -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- bls.o: bls.c
- @echo "Compiling $<"
---- bacula-5.0.3/src/stored/Makefile.in~ 2010-08-13 07:02:47.000000000 -0500
-+++ bacula-5.0.3/src/stored/Makefile.in 2010-08-13 08:25:50.830920608 -0500
-@@ -145,7 +145,7 @@
-
- bcopy: Makefile $(COPYOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -o $@ $(COPYOBJS) \
-- -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+ -lbaccfg -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-
- Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
- cd $(topdir) \
---- bacula-5.0.3/src/dird/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/dird/Makefile.in 2010-08-13 09:25:38.855168511 -0500
-@@ -64,7 +64,7 @@
- bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
- @echo "Linking $@ ..."
- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
-- -lbacfind -lbacsql -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
-+ -lbacfind -lbacsql -lbacpy -lbaccfg -lbac -lm -lz $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
- $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
-
- static-bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
---- bacula-5.0.3/src/console/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/console/Makefile.in 2010-08-13 10:26:18.001169569 -0500
-@@ -48,7 +48,7 @@
-
- bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
-- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
-+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm -lz $(LIBS) $(GETTEXT_LIBS) \
- $(OPENSSL_LIBS)
-
- static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
---- bacula-5.0.3/src/wx-console/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/wx-console/Makefile.in 2010-08-13 11:28:43.829917394 -0500
-@@ -83,7 +83,7 @@
-
- bwx-console: Makefile $(CONSOBJS) @WIN32@ ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ -L../lib $(CONS_LDFLAGS) \
-- -lbaccfg -lbac $(LIBS) $(OPENSSL_LIBS)
-+ -lbaccfg -lbac -lz $(LIBS) $(OPENSSL_LIBS)
-
- win32: bwx-console_private.res
-
---- bacula-5.0.3/src/tray-monitor/Makefile.in~ 2010-08-05 09:29:51.000000000 -0500
-+++ bacula-5.0.3/src/tray-monitor/Makefile.in 2010-08-13 12:34:18.573918720 -0500
-@@ -45,7 +45,7 @@
-
- bacula-tray-monitor: Makefile $(MONITOROBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(MONITOR_LDFLAGS) -L../lib -o $@ \
-- $(MONITOROBJS) $(DLIB) -lbaccfg -lbac -lm $(LIBS) $(OPENSSL_LIBS)
-+ $(MONITOROBJS) $(DLIB) -lbaccfg -lbac -lm -lz $(LIBS) $(OPENSSL_LIBS)
-
- Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
- cd $(topdir) \
diff --git a/main/bacula/bacula-5.0.3-log-path.patch b/main/bacula/bacula-5.0.3-log-path.patch
new file mode 100644
index 000000000..15a2fecb5
--- /dev/null
+++ b/main/bacula/bacula-5.0.3-log-path.patch
@@ -0,0 +1,13 @@
+diff --git bacula-5.0.3/src/dird/bacula-dir.conf.in b/bacula-5.0.3/src/dird/bacula-dir.conf.in
+index 922be44..54cca3f 100644
+--- bacula-5.0.3/src/dird/bacula-dir.conf.in
++++ bacula-5.0.3/src/dird/bacula-dir.conf.in
+@@ -273,7 +273,7 @@ Messages {
+ mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
+ mail = @job_email@ = all, !skipped
+ console = all, !skipped, !saved
+- append = "@working_dir@/log" = all, !skipped
++ append = "/var/log/bacula/bacula.log" = all, !skipped
+ }
+
+ # Default pool definition
diff --git a/main/bacula/bacula-5.2.3-as-needed.patch b/main/bacula/bacula-5.2.3-as-needed.patch
new file mode 100644
index 000000000..4b52d214c
--- /dev/null
+++ b/main/bacula/bacula-5.2.3-as-needed.patch
@@ -0,0 +1,14 @@
+# see bug #310087
+diff -urN bacula-5.2.1.orig/src/findlib/Makefile.in bacula-5.2.1/src/findlib/Makefile.in
+--- bacula-5.2.1.orig/src/findlib/Makefile.in 2010-02-24 16:33:48.000000000 +0100
++++ bacula-5.2.1/src/findlib/Makefile.in 2010-03-22 17:37:43.772805754 +0100
+@@ -59,7 +59,7 @@
+
+ libbacfind.la: Makefile $(LIBBACFIND_LOBJS)
+ @echo "Making $@ ..."
+- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE)
++ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE) -L../lib -lbac $(LIBS) $(OPENSSL_LIBS)
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+ cd $(topdir) \
+
diff --git a/main/bacula/bacula-5.2.3-ldflags.patch b/main/bacula/bacula-5.2.3-ldflags.patch
new file mode 100644
index 000000000..611c0683a
--- /dev/null
+++ b/main/bacula/bacula-5.2.3-ldflags.patch
@@ -0,0 +1,11 @@
+# bat needs to respect LDFLAGS
+--- a/src/qt-console/bat.pro.in.orig 2010-07-20 18:28:50.000000000 +0000
++++ b/src/qt-console/bat.pro.in 2010-07-20 18:29:25.000000000 +0000
+@@ -26,6 +26,7 @@
+ QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
+ QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
+ QMAKE_CLEAN += .libs/* bat
++QMAKE_LFLAGS += @LDFLAGS@
+
+ qwt {
+ INCLUDEPATH += @QWT_INC@
diff --git a/main/bacula/bacula-5.2.3-lib-search-path.patch b/main/bacula/bacula-5.2.3-lib-search-path.patch
new file mode 100644
index 000000000..f33964e74
--- /dev/null
+++ b/main/bacula/bacula-5.2.3-lib-search-path.patch
@@ -0,0 +1,12 @@
+# If upgrading the old libraries gets linked first. So fix order of lib search path.
+--- a/src/console/Makefile.in.orig 2010-03-29 11:35:00.000000000 +0000
++++ b/src/console/Makefile.in 2010-03-29 11:45:14.000000000 +0000
+@@ -47,7 +47,7 @@
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+
diff --git a/main/bacula/bacula.post-install b/main/bacula/bacula.post-install
deleted file mode 100644
index caeda8993..000000000
--- a/main/bacula/bacula.post-install
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-mkdir /var/lib/bacula /var/log/bacula &>/dev/null
-for dir in /var/bacula /var/log/bacula /var/run/bacula /var/lib/bacula /etc/bacula/scripts/make_catalog_backup* /etc/bacula/scripts/mtx-changer*
-do
- chown bacula.bacula $dir
-done
-
-for file in create_postgresql_database make_postgresql_tables grant_postgresql_privileges
-do
- chown postgres /etc/bacula/scripts/$file
-done