aboutsummaryrefslogtreecommitdiffstats
path: root/main/bacula-client
diff options
context:
space:
mode:
Diffstat (limited to 'main/bacula-client')
-rw-r--r--main/bacula-client/APKBUILD97
-rw-r--r--main/bacula-client/bacula-5.0.1-dsolink.patch11
-rw-r--r--main/bacula-client/bacula-5.0.2-config.patch12
-rw-r--r--main/bacula-client/bacula-5.0.2-openssl.patch24
-rw-r--r--main/bacula-client/bacula-5.0.2-python27.patch22
-rw-r--r--main/bacula-client/bacula-5.0.3-Makefile.patch26
-rw-r--r--main/bacula-client/bacula-5.0.3-as-needed.patch33
-rw-r--r--main/bacula-client/bacula-5.0.3-dsolink.patch165
-rw-r--r--main/bacula-client/bacula-5.0.3-log-path.patch13
-rw-r--r--main/bacula-client/bacula-5.0.3-mysql55.patch11
-rw-r--r--main/bacula-client/bacula-5.0.3-sqlite-priv.patch9
-rw-r--r--main/bacula-client/bacula-client.post-install2
-rw-r--r--main/bacula-client/bacula-client.pre-install4
-rw-r--r--main/bacula-client/bacula-config.patch115
-rw-r--r--main/bacula-client/bacula-fd-conf4
-rw-r--r--main/bacula-client/bacula-fd-init22
-rw-r--r--main/bacula-client/configure.in.patch23
-rw-r--r--main/bacula-client/cxx.patch13
-rw-r--r--main/bacula-client/os.m4.patch12
19 files changed, 618 insertions, 0 deletions
diff --git a/main/bacula-client/APKBUILD b/main/bacula-client/APKBUILD
new file mode 100644
index 0000000000..55a747db39
--- /dev/null
+++ b/main/bacula-client/APKBUILD
@@ -0,0 +1,97 @@
+# Contributor: Leonardo Arena <rnalrd@gmail.com>
+# Maintainer: Leonardo Arena <rnalrd@gmail.com>
+pkgname="bacula-client"
+_realname="bacula"
+pkgver=5.0.3
+pkgrel=7
+pkgdesc="Client (File Daemon) of Bacula, a network based backup program"
+url="http://www.bacula.org"
+arch="all"
+license="GPL2"
+depends=""
+makedepends="autoconf automake libstdc++ openssl-dev ncurses-dev zlib-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/$_realname/$_realname/$pkgver/$_realname-$pkgver.tar.gz
+ bacula-fd-init
+ bacula-fd-conf
+ bacula-5.0.1-dsolink.patch
+ bacula-5.0.2-config.patch
+ bacula-5.0.2-openssl.patch
+ bacula-5.0.2-python27.patch
+ bacula-5.0.3-Makefile.patch
+ bacula-5.0.3-as-needed.patch
+ bacula-5.0.3-dsolink.patch
+ bacula-5.0.3-log-path.patch
+ bacula-5.0.3-mysql55.patch
+ bacula-5.0.3-sqlite-priv.patch
+ configure.in.patch
+ cxx.patch
+ os.m4.patch"
+
+_builddir="$srcdir/$_realname-$pkgver"
+
+prepare () {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ cd "$_builddir"/autoconf
+ autoconf && cp configure ../
+}
+
+build() {
+ cd "$_builddir"
+ export LDFLAGS=
+ # in order to do not go into an infinite loop
+ aclocal && autoconf && automake
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/bacula \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --docdir=/usr/share/doc \
+ --infodir=/usr/share/info \
+ --with-pid-dir=/var/run \
+ --with-subsys-dir=/var/lock/subsys \
+ --enable-largefile \
+ --enable-client-only \
+ --enable-smartalloc \
+ --disable-nls \
+ --with-openssl=/usr/include/openssl \
+ --with-scriptdir=/etc/bacula/scripts \
+ --with-working-dir=/var/bacula \
+ --with-fd-user=root \
+ --with-fd-group=root
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 $srcdir/bacula-fd-init \
+ $pkgdir/etc/init.d/bacula-fd
+ install -Dm644 $srcdir/bacula-fd-conf \
+ $pkgdir/etc/conf.d/bacula-fd
+}
+
+md5sums="9de254ae39cab0587fdb2f5d8d90b03b bacula-5.0.3.tar.gz
+38b0fe78acdc5e65aec3a59578e98a20 bacula-fd-init
+4500ce2d62bf9df33c07f70dc40f7b85 bacula-fd-conf
+eee101f1b7b6b4f2c140898db5f8123b bacula-5.0.1-dsolink.patch
+71f7f9c041eff045b2e97d141316c059 bacula-5.0.2-config.patch
+4e310e84c7aba5b8d043758e0fa0088f bacula-5.0.2-openssl.patch
+13e511698b5dc376e673c963a848d364 bacula-5.0.2-python27.patch
+0ec20df57bb632ed729cfaf5d0a3ee33 bacula-5.0.3-Makefile.patch
+76267747f4d2e85e033cc6793ccb6afa bacula-5.0.3-as-needed.patch
+82d3a5c113c633bf0bd86ac3590baaff bacula-5.0.3-dsolink.patch
+9bde1e9d43146af8985ff62d491d7218 bacula-5.0.3-log-path.patch
+def9da0c090141dcef817d80c1a29fd1 bacula-5.0.3-mysql55.patch
+9def0e68e3eb2f5f8b4c34108a248efd bacula-5.0.3-sqlite-priv.patch
+ebc9c2bbc9be95c920723a3f142d8e19 configure.in.patch
+1bfdbfea7a36d5503753414dffb953eb cxx.patch
+cf7a2a4e972697f54364654c4e282b8b os.m4.patch"
diff --git a/main/bacula-client/bacula-5.0.1-dsolink.patch b/main/bacula-client/bacula-5.0.1-dsolink.patch
new file mode 100644
index 0000000000..1669cecb68
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.1-dsolink.patch
@@ -0,0 +1,11 @@
+--- 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-client/bacula-5.0.2-config.patch b/main/bacula-client/bacula-5.0.2-config.patch
new file mode 100644
index 0000000000..f78c665b70
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.2-config.patch
@@ -0,0 +1,12 @@
+diff -up bacula-5.0.2/bacula-5.0.2/src/dird/bacula-dir.conf.in.config bacula-5.0.2/bacula-5.0.2/src/dird/bacula-dir.conf.in
+--- bacula-5.0.2/src/dird/bacula-dir.conf.in.config 2010-06-03 11:05:07.000000000 +0200
++++ bacula-5.0.2/src/dird/bacula-dir.conf.in 2010-06-03 11:28:26.556782993 +0200
+@@ -15,7 +15,7 @@
+ Director { # define myself
+ Name = bacula-dir
+ DIRport = @dir_port@ # where we listen for UA connections
+- QueryFile = "@scriptdir@/query.sql"
++ QueryFile = "/etc/bacula/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ Maximum Concurrent Jobs = 1
diff --git a/main/bacula-client/bacula-5.0.2-openssl.patch b/main/bacula-client/bacula-5.0.2-openssl.patch
new file mode 100644
index 0000000000..a71d8d5467
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.2-openssl.patch
@@ -0,0 +1,24 @@
+diff -up bacula-5.0.2/src/lib/crypto.c.openssl bacula-5.0.2/bacula-5.0.2/src/lib/crypto.c
+--- bacula-5.0.2/src/lib/crypto.c.openssl 2010-04-27 21:58:29.000000000 +0200
++++ bacula-5.0.2/src/lib/crypto.c 2010-06-01 17:51:52.846894465 +0200
+@@ -51,7 +51,7 @@
+ * For OpenSSL version 1.x, EVP_PKEY_encrypt no longer
+ * exists. It was not an official API.
+ */
+-#ifdef HAVE_OPENSSLv1
++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ #define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
+ #define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
+ #endif
+diff -up bacula-5.0.2/bacula-5.0.2/src/lib/tls.c.openssl bacula-5.0.2/bacula-5.0.2/src/lib/tls.c
+--- bacula-5.0.2/src/lib/tls.c.openssl 2010-04-27 21:58:29.000000000 +0200
++++ bacula-5.0.2/src/lib/tls.c 2010-06-01 17:52:15.535769446 +0200
+@@ -315,7 +315,7 @@ bool tls_postconnect_verify_host(JCR *jc
+ extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
+
+ if (strcmp(extname, "subjectAltName") == 0) {
+-#ifdef HAVE_OPENSSLv1
++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ const X509V3_EXT_METHOD *method;
+ #else
+ X509V3_EXT_METHOD *method;
diff --git a/main/bacula-client/bacula-5.0.2-python27.patch b/main/bacula-client/bacula-5.0.2-python27.patch
new file mode 100644
index 0000000000..36543872e8
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.2-python27.patch
@@ -0,0 +1,22 @@
+--- ./configure~ 2010-04-27 14:58:29.000000000 -0500
++++ ./configure 2010-07-30 11:28:47.494178663 -0500
+@@ -26255,7 +26255,7 @@
+ PYTHON_LIBS=`/usr/bin/python-config --libs`
+ else
+ for python_root in /usr /usr/local /usr/sfw; do
+- for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
++ for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python2.7 python3; do
+ if test -f $python_root/include/${ver}/Python.h; then
+ PYTHON_INCDIR=-I$python_root/include/${ver}
+ if test -d $python_root/lib64/${ver}/config; then
+--- ./autoconf/configure.in~ 2010-04-27 14:58:29.000000000 -0500
++++ ./autoconf/configure.in 2010-07-30 11:30:22.837182092 -0500
+@@ -963,7 +963,7 @@
+ PYTHON_LIBS=`/usr/bin/python-config --libs`
+ else
+ for python_root in /usr /usr/local /usr/sfw; do
+- for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
++ for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python2.7 python3; do
+ if test -f $python_root/include/${ver}/Python.h; then
+ PYTHON_INCDIR=-I$python_root/include/${ver}
+ if test -d $python_root/lib64/${ver}/config; then
diff --git a/main/bacula-client/bacula-5.0.3-Makefile.patch b/main/bacula-client/bacula-5.0.3-Makefile.patch
new file mode 100644
index 0000000000..a3f32729d7
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.3-Makefile.patch
@@ -0,0 +1,26 @@
+--- ./Makefile.in.orig 2010-07-20 16:53:44.000000000 +0000
++++ ./Makefile.in 2010-07-20 16:55:50.000000000 +0000
+@@ -44,9 +44,8 @@
+
+ all: Makefile
+ @for I in ${all_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I $@ || exit 1; \
+ done
+
+ depend:
+@@ -55,9 +54,8 @@
+
+ bacula-fd: Makefile
+ @for I in ${fd_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I all || exit 1; \
+ done
+
+ #-------------------------------------------------------------------------
diff --git a/main/bacula-client/bacula-5.0.3-as-needed.patch b/main/bacula-client/bacula-5.0.3-as-needed.patch
new file mode 100644
index 0000000000..3603e936bb
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.3-as-needed.patch
@@ -0,0 +1,33 @@
+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-client/bacula-5.0.3-dsolink.patch b/main/bacula-client/bacula-5.0.3-dsolink.patch
new file mode 100644
index 0000000000..44309dad86
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.3-dsolink.patch
@@ -0,0 +1,165 @@
+--- 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-client/bacula-5.0.3-log-path.patch b/main/bacula-client/bacula-5.0.3-log-path.patch
new file mode 100644
index 0000000000..15a2fecb5e
--- /dev/null
+++ b/main/bacula-client/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-client/bacula-5.0.3-mysql55.patch b/main/bacula-client/bacula-5.0.3-mysql55.patch
new file mode 100644
index 0000000000..910ea02302
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.3-mysql55.patch
@@ -0,0 +1,11 @@
+--- ./src/cats/mysql.c~ 2010-08-05 09:29:51.000000000 -0500
++++ ./src/cats/mysql.c 2011-01-06 11:28:59.907306001 -0600
+@@ -292,7 +292,7 @@
+ void db_thread_cleanup()
+ {
+ #ifndef HAVE_WIN32
+- my_thread_end();
++ mysql_thread_end();
+ #endif
+ }
+
diff --git a/main/bacula-client/bacula-5.0.3-sqlite-priv.patch b/main/bacula-client/bacula-5.0.3-sqlite-priv.patch
new file mode 100644
index 0000000000..2738349fcd
--- /dev/null
+++ b/main/bacula-client/bacula-5.0.3-sqlite-priv.patch
@@ -0,0 +1,9 @@
+diff -up src/cats/make_sqlite3_tables.in~ src/cats/make_sqlite3_tables.in
+--- ./src/cats/make_sqlite3_tables.in~ 2010-11-16 17:57:12.705837000 +0100
++++ ./src/cats/make_sqlite3_tables.in 2010-11-16 17:57:12.715837000 +0100
+@@ -426,4 +426,5 @@ PRAGMA synchronous = NORMAL;
+ END-OF-DATA
+
+ chmod 640 ${db_name}.db
++chown bacula:bacula ${db_name}.db
+ exit 0
diff --git a/main/bacula-client/bacula-client.post-install b/main/bacula-client/bacula-client.post-install
new file mode 100644
index 0000000000..51274b5c3f
--- /dev/null
+++ b/main/bacula-client/bacula-client.post-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+chown bacula.bacula /var/bacula
diff --git a/main/bacula-client/bacula-client.pre-install b/main/bacula-client/bacula-client.pre-install
new file mode 100644
index 0000000000..1eba271914
--- /dev/null
+++ b/main/bacula-client/bacula-client.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+addgroup -S bacula 2>/dev/null
+adduser -h /var/lib/bacula/ -s /bin/false -G bacula -S -D bacula 2>/dev/null
+exit 0
diff --git a/main/bacula-client/bacula-config.patch b/main/bacula-client/bacula-config.patch
new file mode 100644
index 0000000000..b6ab5037b4
--- /dev/null
+++ b/main/bacula-client/bacula-config.patch
@@ -0,0 +1,115 @@
+--- bacula-2.4.3/src/dird/bacula-dir.conf.in.orig 2008-12-10 10:17:27.000000000 -0600
++++ bacula-2.4.3/src/dird/bacula-dir.conf.in 2008-12-10 10:17:27.000000000 -0600
+@@ -16 +16 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -30 +30 @@
+- Client = @basename@-fd
++ Client = bacula-fd
+@@ -51 +51 @@
+-# Client = @basename@2-fd
++# Client = bacula2-fd
+@@ -82 +82 @@
+- Client=@basename@-fd
++ Client=bacula-fd
+@@ -157,2 +157,2 @@
+- Name = @basename@-fd
+- Address = @hostname@
++ Name = bacula-fd
++ Address = client.example.com
+@@ -172,2 +172,2 @@
+-# Name = @basename@2-fd
+-# Address = @hostname@2
++# Name = bacula2-fd
++# Address = client2.example.com
+@@ -187 +187 @@
+- Address = @hostname@ # N.B. Use a fully qualified name here
++ Address = storage.example.com # N.B. Use a fully qualified name here
+@@ -200 +200 @@
+-# Address = @hostname@ # N.B. Use a fully qualified name here
++# Address = storage.example.com # N.B. Use a fully qualified name here
+@@ -212 +212 @@
+-# Address = @hostname@ # N.B. Use a fully qualified name here
++# Address = storage.example.com # N.B. Use a fully qualified name here
+@@ -223 +223 @@
+-# Address = @hostname@ # N.B. Use a fully qualified name here
++# Address = storage.example.com # N.B. Use a fully qualified name here
+@@ -299 +299 @@
+- Name = @basename@-mon
++ Name = bacula-mon
+--- bacula-2.4.3/src/filed/bacula-fd.conf.in.orig 2008-12-10 10:19:12.000000000 -0600
++++ bacula-2.4.3/src/filed/bacula-fd.conf.in 2008-12-10 10:19:12.000000000 -0600
+@@ -14 +14 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -23 +23 @@
+- Name = @basename@-mon
++ Name = bacula-mon
+@@ -32 +32 @@
+- Name = @basename@-fd
++ Name = bacula-fd
+@@ -42 +42 @@
+- director = @basename@-dir = all, !skipped, !restored
++ director = bacula-dir = all, !skipped, !restored
+--- bacula-2.4.3/src/stored/bacula-sd.conf.in.orig 2008-12-10 10:21:45.000000000 -0600
++++ bacula-2.4.3/src/stored/bacula-sd.conf.in 2008-12-10 10:21:45.000000000 -0600
+@@ -14 +14 @@
+- Name = @basename@-sd
++ Name = bacula-sd
+@@ -25 +25 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -34 +34 @@
+- Name = @basename@-mon
++ Name = bacula-mon
+@@ -228 +228 @@
+- director = @basename@-dir = all
++ director = bacula-dir = all
+--- bacula-2.4.3/src/wx-console/bwx-console.conf.in.orig 2008-12-10 10:22:23.000000000 -0600
++++ bacula-2.4.3/src/wx-console/bwx-console.conf.in 2008-12-10 10:22:23.000000000 -0600
+@@ -6 +6 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -8 +8 @@
+- address = @hostname@
++ address = server.example.com
+--- bacula-2.4.3/src/tray-monitor/tray-monitor.conf.in.orig 2008-12-10 10:28:02.000000000 -0600
++++ bacula-2.4.3/src/tray-monitor/tray-monitor.conf.in 2008-12-10 10:28:02.000000000 -0600
+@@ -6 +6 @@
+- Name = @basename@-mon
++ Name = bacula-mon
+@@ -12,2 +12,2 @@
+- Name = @basename@-fd
+- Address = @hostname@
++ Name = bacula-fd
++ Address = client.example.com
+@@ -19,2 +19,2 @@
+- Name = @basename@-sd
+- Address = @hostname@
++ Name = bacula-sd
++ Address = storage.example.com
+@@ -26 +26 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -28 +28 @@
+- address = @hostname@
++ Address = director.example.com
+--- bacula-2.4.3/src/qt-console/bat.conf.in.orig 2008-12-10 10:27:02.000000000 -0600
++++ bacula-2.4.3/src/qt-console/bat.conf.in 2008-12-10 10:27:02.000000000 -0600
+@@ -6 +6 @@
+- Name = @basename@-dir
++ Name = bacula-dir
+@@ -8 +8 @@
+- address = @hostname@
++ address = server.example.com
+--- bacula-2.4.3/src/stored/stored.conf.in.orig 2008-12-10 10:27:44.000000000 -0600
++++ bacula-2.4.3/src/stored/stored.conf.in 2008-12-10 10:27:44.000000000 -0600
+@@ -11 +11 @@
+- Address = @hostname@
++ Address = storage.example.com
+@@ -22 +22 @@
+- Name = @hostname@-dir
++ Name = bacula-dir
+@@ -54 +54 @@
+- director = @hostname@-dir = all
++ director = bacula-dir = all
diff --git a/main/bacula-client/bacula-fd-conf b/main/bacula-client/bacula-fd-conf
new file mode 100644
index 0000000000..033ef74b4b
--- /dev/null
+++ b/main/bacula-client/bacula-fd-conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/bacula-fd
+
+# Options for the file daemon.
+FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf"
diff --git a/main/bacula-client/bacula-fd-init b/main/bacula-client/bacula-fd-init
new file mode 100644
index 0000000000..618b3508c7
--- /dev/null
+++ b/main/bacula-client/bacula-fd-init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-fd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bacula file daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \
+ -- ${FD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bacula file daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bacula-fd.*.pid
+ eend $?
+}
diff --git a/main/bacula-client/configure.in.patch b/main/bacula-client/configure.in.patch
new file mode 100644
index 0000000000..cfe2a0b7cf
--- /dev/null
+++ b/main/bacula-client/configure.in.patch
@@ -0,0 +1,23 @@
+--- bacula-3.0.3-orig/autoconf/configure.in Sun Oct 18 09:10:16 2009
++++ bacula-3.0.3/autoconf/configure.in Wed Dec 2 14:13:44 2009
+@@ -2576,6 +2576,20 @@
+ fi
+ TAPEDRIVE="/dev/nrmt0"
+ ;;
++alpine)
++ dnl Make sure hostname is resolved
++ ping -c 1 $hostname 2>&1 1>/dev/null
++ if test ! $? = 0; then
++ hostname="localhost"
++ fi
++ if `test -f /etc/alpine-release && grep -q alpine /etc/alpine-release`; then
++ DISTNAME="alpine"
++ fi
++ DISTVER=`cat /etc/alpine-release`
++ TAPEDRIVE="/dev/nst0"
++ PSCMD="ps -e -o pid,comm"
++ largefile_support="yes"
++ ;;
+ bsdi)
+ DISTVER=`uname -a |awk '{print $3}'`
+ TAPEDRIVE="/dev/nrmt0"
diff --git a/main/bacula-client/cxx.patch b/main/bacula-client/cxx.patch
new file mode 100644
index 0000000000..0af4937ea1
--- /dev/null
+++ b/main/bacula-client/cxx.patch
@@ -0,0 +1,13 @@
+--- ./autoconf/configure.in.orig
++++ ./autoconf/configure.in
+@@ -92,10 +92,6 @@
+ AC_DEFINE(HAVE_GCC)
+ have_gcc=yes
+ fi
+-AC_PATH_PROG(CXX, $CXX, $CXX)
+-if test ! -e $CXX; then
+- AC_MSG_ERROR(Unable to find C++ compiler)
+-fi
+
+ dnl -------------------------------------------------------
+ dnl Check for programs.
diff --git a/main/bacula-client/os.m4.patch b/main/bacula-client/os.m4.patch
new file mode 100644
index 0000000000..95dc5666ad
--- /dev/null
+++ b/main/bacula-client/os.m4.patch
@@ -0,0 +1,12 @@
+--- bacula-3.0.3-orig/autoconf/bacula-macros/os.m4 Sun Oct 18 09:10:16 2009
++++ bacula-3.0.3/autoconf/bacula-macros/os.m4 Wed Dec 2 13:48:30 2009
+@@ -201,6 +201,9 @@
+ elif test -f /etc/gentoo-release
+ then
+ DISTNAME=gentoo
++elif test -f /etc/alpine-release
++then
++ DISTNAME=alpine
+ elif test -f /etc/debian_version
+ then
+ DISTNAME=debian