Reduce some config patching through configure

This commit is contained in:
Simone Caronni 2011-12-05 15:03:01 +01:00
parent 6872dfc864
commit d6447bbfd6
4 changed files with 121 additions and 115 deletions

View File

@ -1,12 +0,0 @@
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/bacula-5.0.2/src/dird/bacula-dir.conf.in.config 2010-06-03 11:05:07.000000000 +0200
+++ bacula-5.0.2/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

View File

@ -1,115 +1,118 @@
--- bacula-2.4.3/src/dird/bacula-dir.conf.in.orig 2008-12-10 10:17:27.000000000 -0600 diff -Naur bacula-5.2.2.old/src/dird/bacula-dir.conf.in bacula-5.2.2/src/dird/bacula-dir.conf.in
+++ bacula-2.4.3/src/dird/bacula-dir.conf.in 2008-12-10 10:17:27.000000000 -0600 --- bacula-5.2.2.old/src/dird/bacula-dir.conf.in 2011-12-05 13:30:02.993111136 +0100
@@ -16 +16 @@ +++ bacula-5.2.2/src/dird/bacula-dir.conf.in 2011-12-05 13:37:34.149637004 +0100
- Name = @basename@-dir @@ -154,7 +154,7 @@
+ Name = bacula-dir # Client (File Services) to backup
@@ -30 +30 @@ Client {
- Client = @basename@-fd Name = @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@ - Address = @hostname@
+ Name = bacula-fd
+ Address = client.example.com + Address = client.example.com
@@ -172,2 +172,2 @@ FDPort = @fd_port@
-# Name = @basename@2-fd Catalog = MyCatalog
Password = "@fd_password@" # password for FileDaemon
@@ -169,7 +169,7 @@
#
#Client {
# Name = @basename@2-fd
-# Address = @hostname@2 -# Address = @hostname@2
+# Name = bacula2-fd +# Address = client.example.com2
+# Address = client2.example.com # FDPort = @fd_port@
@@ -187 +187 @@ # Catalog = MyCatalog
# Password = "@fd_password@2" # password for FileDaemon 2
@@ -183,7 +183,7 @@
Storage {
Name = File
# Do not use "localhost" here
- Address = @hostname@ # N.B. Use a fully qualified name here - Address = @hostname@ # N.B. Use a fully qualified name here
+ Address = storage.example.com # N.B. Use a fully qualified name here + Address = storage.example.com # N.B. Use a fully qualified name here
@@ -200 +200 @@ SDPort = @sd_port@
Password = "@sd_password@"
Device = FileStorage
@@ -196,7 +196,7 @@
#Storage {
# Name = DDS-4
# Do not use "localhost" here
-# Address = @hostname@ # N.B. Use a fully qualified name here -# Address = @hostname@ # N.B. Use a fully qualified name here
+# Address = storage.example.com # N.B. Use a fully qualified name here +# Address = storage.example.com # N.B. Use a fully qualified name here
@@ -212 +212 @@ # SDPort = @sd_port@
# Password = "@sd_password@" # password for Storage daemon
# Device = DDS-4 # must be same as Device in Storage daemon
@@ -208,7 +208,7 @@
#Storage {
# Name = "8mmDrive"
# Do not use "localhost" here
-# Address = @hostname@ # N.B. Use a fully qualified name here -# Address = @hostname@ # N.B. Use a fully qualified name here
+# Address = storage.example.com # N.B. Use a fully qualified name here +# Address = storage.example.com # N.B. Use a fully qualified name here
@@ -223 +223 @@ # SDPort = @sd_port@
# Password = "@sd_password@"
# Device = "Exabyte 8mm"
@@ -219,7 +219,7 @@
#Storage {
# Name = "DVD"
# Do not use "localhost" here
-# Address = @hostname@ # N.B. Use a fully qualified name here -# Address = @hostname@ # N.B. Use a fully qualified name here
+# Address = storage.example.com # N.B. Use a fully qualified name here +# Address = storage.example.com # N.B. Use a fully qualified name here
@@ -299 +299 @@ # SDPort = @sd_port@
- Name = @basename@-mon # Password = "@sd_password@"
+ Name = bacula-mon # Device = "DVD Writer"
--- bacula-2.4.3/src/filed/bacula-fd.conf.in.orig 2008-12-10 10:19:12.000000000 -0600 diff -Naur bacula-5.2.2.old/src/qt-console/bat.conf.in bacula-5.2.2/src/qt-console/bat.conf.in
+++ bacula-2.4.3/src/filed/bacula-fd.conf.in 2008-12-10 10:19:12.000000000 -0600 --- bacula-5.2.2.old/src/qt-console/bat.conf.in 2011-12-05 13:30:03.128113691 +0100
@@ -14 +14 @@ +++ bacula-5.2.2/src/qt-console/bat.conf.in 2011-12-05 13:39:38.359990302 +0100
- Name = @basename@-dir @@ -5,6 +5,6 @@
+ Name = bacula-dir Director {
@@ -23 +23 @@ Name = @basename@-dir
- Name = @basename@-mon DIRport = @dir_port@
+ 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 = @hostname@
+ address = server.example.com + address = director.example.com
--- bacula-2.4.3/src/tray-monitor/tray-monitor.conf.in.orig 2008-12-10 10:28:02.000000000 -0600 Password = "@dir_password@"
+++ bacula-2.4.3/src/tray-monitor/tray-monitor.conf.in 2008-12-10 10:28:02.000000000 -0600 }
@@ -6 +6 @@ diff -Naur bacula-5.2.2.old/src/stored/stored.conf.in bacula-5.2.2/src/stored/stored.conf.in
- Name = @basename@-mon --- bacula-5.2.2.old/src/stored/stored.conf.in 2011-12-05 13:30:03.112113391 +0100
+ Name = bacula-mon +++ bacula-5.2.2/src/stored/stored.conf.in 2011-12-05 13:40:04.777491664 +0100
@@ -12,2 +12,2 @@ @@ -8,7 +8,7 @@
- Name = @basename@-fd #
Storage {
Name = "Storage daemon"
- Address = @hostname@
+ Address = storage.example.com
SDPort = @sd_port@ # Directors port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
diff -Naur bacula-5.2.2.old/src/tray-monitor/tray-monitor.conf.in bacula-5.2.2/src/tray-monitor/tray-monitor.conf.in
--- bacula-5.2.2.old/src/tray-monitor/tray-monitor.conf.in 2011-12-05 13:30:02.984110966 +0100
+++ bacula-5.2.2/src/tray-monitor/tray-monitor.conf.in 2011-12-05 13:39:13.096510765 +0100
@@ -10,20 +10,20 @@
Client {
Name = @basename@-fd
- Address = @hostname@ - Address = @hostname@
+ Name = bacula-fd
+ Address = client.example.com + Address = client.example.com
@@ -19,2 +19,2 @@ FDPort = @fd_port@
- Name = @basename@-sd Password = "@mon_fd_password@" # password for FileDaemon
- Address = @hostname@ }
+ Name = bacula-sd
+ Address = storage.example.com Storage {
@@ -26 +26 @@ Name = @basename@-sd
- 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 = @hostname@
+ Address = storage.example.com + Address = storage.example.com
@@ -22 +22 @@ SDPort = @sd_port@
- Name = @hostname@-dir Password = "@mon_sd_password@" # password for StorageDaemon
+ Name = bacula-dir }
@@ -54 +54 @@
- director = @hostname@-dir = all Director {
+ director = bacula-dir = all Name = @basename@-dir
- DIRport = @dir_port@
+ DIRport = director.example.com
address = @hostname@
}
diff -Naur bacula-5.2.2.old/src/wx-console/bwx-console.conf.in bacula-5.2.2/src/wx-console/bwx-console.conf.in
--- bacula-5.2.2.old/src/wx-console/bwx-console.conf.in 2011-12-05 13:30:03.090112973 +0100
+++ bacula-5.2.2/src/wx-console/bwx-console.conf.in 2011-12-05 13:40:37.193106792 +0100
@@ -5,6 +5,6 @@
Director {
Name = @basename@-dir
DIRport = @dir_port@
- address = @hostname@
+ address = director.example.com
Password = "@dir_password@"
}

View File

@ -0,0 +1,12 @@
diff -Naur bacula-5.2.2.old/src/dird/bacula-dir.conf.in bacula-5.2.2/src/dird/bacula-dir.conf.in
--- bacula-5.2.2.old/src/dird/bacula-dir.conf.in 2011-12-05 13:51:20.375282302 +0100
+++ bacula-5.2.2/src/dird/bacula-dir.conf.in 2011-12-05 13:54:12.809538069 +0100
@@ -15,7 +15,7 @@
Director { # define myself
Name = @basename@-dir
DIRport = @dir_port@ # where we listen for UA connections
- QueryFile = "@scriptdir@/query.sql"
+ QueryFile = "@sysconfdir@/query.sql"
WorkingDirectory = "@working_dir@"
PidDirectory = "@piddir@"
Maximum Concurrent Jobs = 1

View File

@ -1,6 +1,6 @@
Name: bacula Name: bacula
Version: 5.2.2 Version: 5.2.2
Release: 4%{?dist} Release: 5%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details # See LICENSE for details
License: GPLv2 with exceptions License: GPLv2 with exceptions
@ -24,7 +24,7 @@ Source17: bacula-sd.sysconfig
Source18: bacula-checkconf Source18: bacula-checkconf
Patch1: bacula-5.2.2-config.patch Patch1: bacula-5.2.2-config.patch
Patch2: bacula-5.0.2-openssl.patch Patch2: bacula-5.0.2-openssl.patch
Patch3: bacula-5.0.2-config.patch Patch3: bacula-5.2.2-queryfile.patch
Patch4: bacula-5.2.2-dsolink.patch Patch4: bacula-5.2.2-dsolink.patch
Patch5: bacula-5.0.3-log-path.patch Patch5: bacula-5.0.3-log-path.patch
Patch6: bacula-5.0.3-sqlite-priv.patch Patch6: bacula-5.0.3-sqlite-priv.patch
@ -275,9 +275,9 @@ Provides check_bacula support for Nagios.
%prep %prep
%setup -q %setup -q
%setup -q -a 1 -D -T %setup -q -a 1 -D -T
%patch1 -p1 %patch1 -p1 -b .config
%patch2 -p2 -b .openssl %patch2 -p2 -b .openssl
%patch3 -p2 -b .config %patch3 -p1 -b .queryfile
%patch4 -p1 -b .dsolink %patch4 -p1 -b .dsolink
%patch5 -p2 -b .log-path %patch5 -p2 -b .log-path
%patch6 -p0 -b .priv %patch6 -p0 -b .priv
@ -307,6 +307,7 @@ export CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses"
--with-sd-group=disk \ --with-sd-group=disk \
--with-fd-user=root \ --with-fd-user=root \
--with-fd-group=root \ --with-fd-group=root \
--with-basename=bacula \
--with-dir-password=@@DIR_PASSWORD@@ \ --with-dir-password=@@DIR_PASSWORD@@ \
--with-fd-password=@@FD_PASSWORD@@ \ --with-fd-password=@@FD_PASSWORD@@ \
--with-sd-password=@@SD_PASSWORD@@ \ --with-sd-password=@@SD_PASSWORD@@ \
@ -314,6 +315,7 @@ export CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses"
--with-mon-fd-password=@@MON_FD_PASSWORD@@ \ --with-mon-fd-password=@@MON_FD_PASSWORD@@ \
--with-mon-sd-password=@@MON_SD_PASSWORD@@ \ --with-mon-sd-password=@@MON_SD_PASSWORD@@ \
--with-working-dir=%{_localstatedir}/spool/bacula \ --with-working-dir=%{_localstatedir}/spool/bacula \
--with-logdir=%{_localstatedir}/log/bacula \
--with-scriptdir=%{_libexecdir}/bacula \ --with-scriptdir=%{_libexecdir}/bacula \
--with-plugindir=%{_libdir}/bacula \ --with-plugindir=%{_libdir}/bacula \
--with-smtp-host=localhost \ --with-smtp-host=localhost \
@ -820,6 +822,7 @@ fi
%changelog %changelog
* Mon Dec 05 2011 Simone Caronni <negativo17@gmail.com> - 5.2.2-5 * Mon Dec 05 2011 Simone Caronni <negativo17@gmail.com> - 5.2.2-5
- Remove redundant user/group in service files. - Remove redundant user/group in service files.
- Reduce patching for what can be passed through configure.
* Thu Dec 02 2011 Simone Caronni <negativo17@gmail.com> - 5.2.2-4 * Thu Dec 02 2011 Simone Caronni <negativo17@gmail.com> - 5.2.2-4
- Rename storage-common to storage and make it provide storage-common. - Rename storage-common to storage and make it provide storage-common.