diff --git a/.cvsignore b/.cvsignore index e69de29..442f843 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +bacula-2.4.4.tar.gz diff --git a/bacula2-2.4.4-utf8.patch b/bacula2-2.4.4-utf8.patch new file mode 100644 index 0000000..82de041 --- /dev/null +++ b/bacula2-2.4.4-utf8.patch @@ -0,0 +1,24 @@ +--- bacula-2.4.4/examples/conf/m4.email 2004-09-06 21:57:39.000000000 +0100 ++++ bacula-2.4.4/examples/conf/m4.email.utf8 2010-02-05 16:17:22.475047364 +0000 +@@ -20,8 +20,8 @@ + -- + Peter Eriksson Phone: +46 13 28 2786 + Computer Systems Manager/BOFH Cell/GSM: +46 705 18 2786 +-Physics Department, Link�ping University Room: Building F, F203 +-SE-581 83 Link�ping, Sweden http://www.ifm.liu.se/~peter ++Physics Department, Linköping University Room: Building F, F203 ++SE-581 83 Linköping, Sweden http://www.ifm.liu.se/~peter + + See the files bacula-defs.m4 m4.bacula-dir.conf m4.bacula-fd.conf and + m4.bacula-sd.conf in this directory for the attachments to this +--- bacula-2.4.4/examples/nagios/nagios.txt 2006-09-06 19:40:39.000000000 +0100 ++++ bacula-2.4.4/examples/nagios/nagios.txt.utf8 2010-02-05 16:18:32.396112106 +0000 +@@ -199,7 +199,7 @@ + -- + Julian Hein NETWAYS GmbH + Managing Director Deutschherrnstr. 47a +-Fon.0911/92885-0 D-90429 N�rnberg ++Fon.0911/92885-0 D-90429 Nürnberg + Fax.0911/92885-31 + jhein@netways.de www.netways.de + diff --git a/bacula2-3.0.2-openssl.patch b/bacula2-3.0.2-openssl.patch new file mode 100644 index 0000000..d7cfe14 --- /dev/null +++ b/bacula2-3.0.2-openssl.patch @@ -0,0 +1,41 @@ +diff -up bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c +--- bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl 2008-11-06 20:10:08.000000000 +0100 ++++ bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c 2009-08-22 12:48:20.000000000 +0200 +@@ -309,7 +309,11 @@ typedef struct PEM_CB_Context { + */ + static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) { + X509_EXTENSION *ext; ++#if (OPENSSL_VERSION_NUMBER < 0x10000000L) + X509V3_EXT_METHOD *method; ++#else ++ const X509V3_EXT_METHOD *method; ++#endif + ASN1_OCTET_STRING *keyid; + int i; + #if (OPENSSL_VERSION_NUMBER >= 0x0090800FL) +@@ -973,6 +977,10 @@ void crypto_sign_free(SIGNATURE *sig) + free (sig); + } + ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#define EVP_PKEY_decrypt EVP_PKEY_decrypt_old ++#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old ++#endif + /* + * Create a new encryption session. + * Returns: A pointer to a CRYPTO_SESSION object on success. +diff -up bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/tls.c +--- bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl 2008-11-22 19:36:12.000000000 +0100 ++++ bacula-3.0.2/bacula-3.0.2/src/lib/tls.c 2009-08-22 15:24:30.000000000 +0200 +@@ -315,7 +315,11 @@ bool tls_postconnect_verify_host(JCR *jc + extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext))); + + if (strcmp(extname, "subjectAltName") == 0) { ++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L) ++ const X509V3_EXT_METHOD *method; ++#else + X509V3_EXT_METHOD *method; ++#endif + STACK_OF(CONF_VALUE) *val; + CONF_VALUE *nval; + void *extstr = NULL; diff --git a/bacula2-config.patch b/bacula2-config.patch new file mode 100644 index 0000000..f60dc7c --- /dev/null +++ b/bacula2-config.patch @@ -0,0 +1,122 @@ +--- bacula-2.4.3/src/gnome2-console/bgnome-console.conf.in.orig 2008-12-10 10:12:18.000000000 -0600 ++++ bacula-2.4.3/src/gnome2-console/bgnome-console.conf.in 2008-12-10 10:12:18.000000000 -0600 +@@ -6 +6 @@ +- Name = @hostname@-dir ++ Name = bacula-dir +@@ -8 +8 @@ +- address = @hostname@ ++ address = server.example.com +--- 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 = @hostname@-dir ++ Name = bacula-dir +@@ -30 +30 @@ +- Client = @hostname@-fd ++ Client = bacula-fd +@@ -51 +51 @@ +-# Client = @hostname@2-fd ++# Client = bacula2-fd +@@ -82 +82 @@ +- Client=@hostname@-fd ++ Client=bacula-fd +@@ -157,2 +157,2 @@ +- Name = @hostname@-fd +- Address = @hostname@ ++ Name = bacula-fd ++ Address = client.example.com +@@ -172,2 +172,2 @@ +-# Name = @hostname@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 = @hostname@-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 = @hostname@-dir ++ Name = bacula-dir +@@ -23 +23 @@ +- Name = @hostname@-mon ++ Name = bacula-mon +@@ -32 +32 @@ +- Name = @hostname@-fd ++ Name = bacula-fd +@@ -42 +42 @@ +- director = @hostname@-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 = @hostname@-sd ++ Name = bacula-sd +@@ -25 +25 @@ +- Name = @hostname@-dir ++ Name = bacula-dir +@@ -34 +34 @@ +- Name = @hostname@-mon ++ Name = bacula-mon +@@ -228 +228 @@ +- director = @hostname@-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 = @hostname@-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 = @hostname@-mon ++ Name = bacula-mon +@@ -12,2 +12,2 @@ +- Name = @hostname@-fd +- Address = @hostname@ ++ Name = bacula-fd ++ Address = client.example.com +@@ -19,2 +19,2 @@ +- Name = @hostname@-sd +- Address = @hostname@ ++ Name = bacula-sd ++ Address = storage.example.com +@@ -26 +26 @@ +- Name = @hostname@-dir ++ Name = bacula-dir +@@ -28 +27,0 @@ +- address = @hostname@ +--- 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 = @hostname@-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/bacula2-fd.init b/bacula2-fd.init new file mode 100644 index 0000000..e31ab84 --- /dev/null +++ b/bacula2-fd.init @@ -0,0 +1,89 @@ +#!/bin/bash +# +# bacula2-fd This shell script takes care of starting and stopping +# the bacula2-fd daemon, the backup client enabling bacula +# to backup the local machine. +# +# chkconfig: - 80 20 +# description: bacula2-fd is a Backup-client, which is the program \ +# that enables the bacula-server to backup the local \ +# machine. +# processname: bacula2-fd +# config: /etc/bacula2/bacula-fd.conf +# pidfile: /var/run/bacula2-fd.9102.pid + +# Source function library. +. /etc/init.d/functions + +# Source configuration. +if [ -f /etc/sysconfig/bacula2-fd ] ; then + . /etc/sysconfig/bacula2-fd +fi + +RETVAL=0 +prog="bacula2-fd" +CONFIG="/etc/bacula2/bacula-fd.conf" +OPTS="-c $CONFIG" + +checkconf() { + # Check if we still have our @@PLACEHOLDERS@@ in the config. + # If yes, refuse to start, the user has never touched the config. + grep -q '_PASSWORD@@' $CONFIG + if [ $? -eq 0 ]; then + echo -n "Error: Not been configured" + echo_failure + echo + exit 1 + fi +} + + +start() { + echo -n "Starting $prog: " + checkconf + daemon $prog $OPTS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog + return $RETVAL +} + +stop() { + echo -n "Shutting down $prog: " + killproc $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $prog + ;; + restart) + stop + start + RETVAL=$? + ;; + reload) + ;; + condrestart) + if [ -f /var/lock/subsys/$prog ]; then + stop + start + RETVAL=$? + fi + ;; + *) + echo "Usage: $prog {start|stop|status|reload|restart}" + exit 1 + ;; +esac +exit $? diff --git a/bacula2.spec b/bacula2.spec new file mode 100644 index 0000000..63e07e8 --- /dev/null +++ b/bacula2.spec @@ -0,0 +1,250 @@ +%define working_dir /var/spool/bacula2 +%define script_dir /usr/libexec/bacula2 + +Summary: Backup client for bacula version 2 server +Name: bacula2 +Version: 2.4.4 +Release: 4%{?dist} +# See LICENSE for details +License: GPLv2 with exceptions +Group: System Environment/Daemons +Source0: http://downloads.sf.net/bacula/bacula-%{version}.tar.gz +Source7: bacula2-fd.init +Patch0: bacula2-2.4.4-utf8.patch +Patch1: bacula2-config.patch +Patch2: bacula2-3.0.2-openssl.patch +URL: http://www.bacula.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: openssl-devel, perl +BuildRequires: libacl-devel, zlib-devel, python-devel, +BuildRequires: libstdc++-devel, libxml2-devel, pkgconfig +BuildRequires: glibc-devel, sed +# This is actually tcp_wrappers-devel but I don't want to deviate from the main +# Fedora/EPEL packages without good reason. +BuildRequires: /usr/include/tcpd.h + +%description +Bacula is a set of programs that allow you to manage the backup, recovery, +and verification of computer data across a network of different computers. +It is based on a client/server architecture and is efficient and relatively +easy to use, while offering many advanced storage management features that +make it easy to find and recover lost or damaged files. + +The bacula2 packages are clients suitable for use with a bacula version +2.x server (director), since later clients are incompatible. + +%package client +Summary: Bacula backup client +Group: System Environment/Daemons +Requires: bacula2-common = %{version}-%{release} +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service + +%description client +Bacula is a set of programs that allow you to manage the backup, recovery, +and verification of computer data across a network of different computers. +It is based on a client/server architecture. + +This package contains the bacula version 2 client, the daemon running on +the system to be backed up to a bacula version 2 server (director). + +%package common +Summary: Common Bacula utilities +Group: System Environment/Daemons +Requires(pre): shadow-utils + +%description common +Bacula is a set of programs that allow you to manage the backup, recovery, +and verification of computer data across a network of different computers. +It is based on a client/server architecture. + +The bacula2 packages are clients suitable for use with a bacula version +2.x server (director), since later clients are incompatible. + +%prep +%setup -q -n bacula-%{version} + +# Patching and other source preparation +%patch0 -p1 +%patch1 -p1 +%patch2 -p2 + +# Remove execution permissions from files we're packaging as docs later on +find examples -type f | xargs chmod -x +find updatedb -type f | xargs chmod -x + +# Fix perms of c files to silent rpmlint for debuginfo +chmod -x src/console/conio.c + +%build + +# GCC 4.3+/glibc detects a false positive buffer overflow in bacula 2.4 so we +# need to disable FORTIFY_SOURCE: +# - http://www.mail-archive.com/bacula-devel@lists.sourceforge.net/msg01786.html +# - http://bugs.bacula.org/view.php?id=1220 +# - http://bugs.bacula.org/view.php?id=1042 +CFLAGS="$(echo %{optflags}|sed s/-D_FORTIFY_SOURCE=./-U_FORTIFY_SOURCE/)" \ + %configure \ + --sysconfdir=%{_sysconfdir}/bacula2 \ + --with-fd-user=root \ + --with-fd-group=root \ + --with-fd-password=@@FD_PASSWORD@@ \ + --with-mon-dir-password=@@MON_DIR_PASSWORD@@ \ + --with-mon-fd-password=@@MON_FD_PASSWORD@@ \ + --with-mon-sd-password=@@MON_SD_PASSWORD@@ \ + --with-working-dir=%{working_dir} \ + --with-scriptdir=%{script_dir} \ + --with-smtp-host=localhost \ + --with-subsys-dir=%{_localstatedir}/lock/subsys \ + --with-pid-dir=%{_localstatedir}/run \ + --enable-client-only \ + --enable-largefile \ + --with-openssl \ + --with-tcp-wrappers \ + --with-python \ + --enable-smartalloc + +%{__make} %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} + +# Desktop Integration for the console apps and the traymonitor +mkdir -p %{buildroot}%{_bindir} + +# Initscript +install -m 755 -D %{SOURCE7} %{buildroot}%{_initrddir}/bacula2-fd + +# Create the spool directory (bacula user's home directory) +mkdir -p %{buildroot}%{_localstatedir}/spool/bacula2 + +# rename files so that they don't interfer with the main bacula package +mv %{buildroot}%{_sbindir}/bacula-fd %{buildroot}%{_sbindir}/bacula2-fd +mv %{buildroot}%{_mandir}/man8/bacula-fd.8.gz %{buildroot}%{_mandir}/man8/bacula2-fd.8.gz + +# Nuke commands we do not need +rm -vf %{buildroot}%{_sbindir}/{bconsole,btraceback} + +# Nuke the scripts we do not need +rm -rvf %{buildroot}%{_libexecdir}/ + +# Nuke manpages for commands we do not ship +rm -vf %{buildroot}%{_mandir}/man1/{bat,bsmtp,bacula-bgnome-console,bacula-bwxconsole,bacula-tray-monitor}.1.gz +rm -vf %{buildroot}%{_mandir}/man8/{bacula,bacula-*,bconsole,bcopy,bextract,bls,bscan,btape,btraceback,dbcheck}.8.gz + +# Nuke config files +rm -vf %{buildroot}%{_sysconfdir}/bacula2/bconsole.conf + +# Fix up some perms so rpmlint does not complain too much +chmod 755 %{buildroot}%{_sbindir}/* + +%clean +rm -rf %{buildroot} + +%pre common +getent group bacula >/dev/null || groupadd -r bacula +getent passwd bacula >/dev/null || \ + useradd -r -s /sbin/nologin -d %{_localstatedir}/spool/bacula2 -M \ + -c 'Bacula Backup System' -g bacula bacula +exit 0 + +%post client +/sbin/chkconfig --add bacula2-fd + +%preun client +if [ $1 = 0 ]; then + /sbin/service bacula2-fd stop &>/dev/null || : + /sbin/chkconfig --del bacula2-fd +fi + +%postun client +if [ "$1" -ge "1" ]; then + /sbin/service bacula2-fd condrestart &>/dev/null || : +fi + +%files common +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING LICENSE README SUPPORT VERIFYING examples/ +%dir %{_sysconfdir}/bacula2/ +%dir %attr(750, bacula, bacula) %{_localstatedir}/spool/bacula2/ + +%files client +%defattr(-,root,root,-) +%{_sbindir}/bacula2-fd +%{_initrddir}/bacula2-fd +%config(noreplace) %{_sysconfdir}/bacula2/bacula-fd.conf +%dir %{_localstatedir}/spool/bacula2/ +%{_mandir}/man8/bacula2-fd.8* + +%changelog +* Mon Mar 22 2010 Jon Ciesla 2.4.4-4 +- Renamed sources and patches to avoid clobering Bacula SRPM. + +* Sat Feb 6 2010 Felix Schwarz 2.4.4-3 +- Changed all names to bacula2 so that the package can be installed in parallel + to a modern bacula package +- Disabled FORTIFY_SOURCE due - GCC 4.3+ detects false positive + +* Fri Feb 5 2010 Paul Howarth 2.4.4-2 +- Fork to bacula2, a client-only package to support use of bacula version 2 + servers on more recent distributions + +* Wed Jan 14 2009 Jon Ciesla 2.4.4-1 +- Update to 2.4.4, fix alternatives. + +* Thu Sep 13 2007 Andreas Thienemann 2.0.3-10 +- Applied restore fix to sd. #288981 + +* Wed Jul 25 2007 Andreas Thienemann 2.0.3-9 +- Corrected the %%post alternatives calls. Fixing #249560. + +* Wed Jul 19 2007 Andreas Thienemann 2.0.3-8 +- Moved some files around in the %%files section and refactored + spec parts a bit +- Fixed up the catalog-backup scripts by including them in the + alternatives system +- Applied tls patch fixing some tls disconnection issues. + +* Thu Jul 18 2007 Andreas Thienemann 2.0.3-7 +- Minor specchanges, mostly typos in the comments +- Incorporated minor changes from dgilmore's review. + +* Fri Jul 13 2007 Andreas Thienemann 2.0.3-6 +- Fixing %%preun scripts. Thx to Dan for spotting this + +* Fri Jul 13 2007 Andreas Thienemann 2.0.3-5 +- Fixed provides and requires + +* Wed Jul 11 2007 Andreas Thienemann 2.0.3-4 +- Fixed many rpmlint issues + +* Thu Apr 26 2007 Andreas Thienemann 2.0.3-3 +- Final cleanups for fedora +- Removed webgui for now. It will be back in a future release +- Added LANG=C calls to the initscripts + +* Thu Apr 26 2007 Andreas Thienemann 2.0.3-2 +- Added logdir +- Fixed up doc-creation to actually work +- Fixed up web interface +- Included docs sub-package +- Included README et al as docs where appropriate + +* Sat Mar 10 2007 Andreas Thienemann 2.0.3-1 +- Updated to 2.0.3 +- Reverted the database-check as we're not sure the db is running on the + local machine. A later revision might parse the bacula-dir.conf file + and just connect to the db to see if it's running. + +* Sat Feb 28 2007 Andreas Thienemann 2.0.2-1 +- Further updates on the spec + +* Sat Feb 18 2007 Andreas Thienemann 2.0.2-1 +- Much work on the spec +- Updated to 2.0.2 + +* Sat Feb 18 2006 Andreas Thienemann 1.38.11-1 +- Initial spec. diff --git a/import.log b/import.log new file mode 100644 index 0000000..ff98869 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +bacula2-2_4_4-4_fc12:HEAD:bacula2-2.4.4-4.fc12.src.rpm:1270733027 diff --git a/sources b/sources index e69de29..6218218 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4eb6155b45611018af03002d37a2ffde bacula-2.4.4.tar.gz