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
+++ 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
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:30:02.993111136 +0100
+++ bacula-5.2.2/src/dird/bacula-dir.conf.in 2011-12-05 13:37:34.149637004 +0100
@@ -154,7 +154,7 @@
# Client (File Services) to backup
Client {
Name = @basename@-fd
- Address = @hostname@
+ Name = bacula-fd
+ Address = client.example.com
@@ -172,2 +172,2 @@
-# Name = @basename@2-fd
FDPort = @fd_port@
Catalog = MyCatalog
Password = "@fd_password@" # password for FileDaemon
@@ -169,7 +169,7 @@
#
#Client {
# Name = @basename@2-fd
-# Address = @hostname@2
+# Name = bacula2-fd
+# Address = client2.example.com
@@ -187 +187 @@
+# Address = client.example.com2
# FDPort = @fd_port@
# 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 = 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 = 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 = 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 = 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 @@
# SDPort = @sd_port@
# Password = "@sd_password@"
# Device = "DVD Writer"
diff -Naur bacula-5.2.2.old/src/qt-console/bat.conf.in bacula-5.2.2/src/qt-console/bat.conf.in
--- bacula-5.2.2.old/src/qt-console/bat.conf.in 2011-12-05 13:30:03.128113691 +0100
+++ bacula-5.2.2/src/qt-console/bat.conf.in 2011-12-05 13:39:38.359990302 +0100
@@ -5,6 +5,6 @@
Director {
Name = @basename@-dir
DIRport = @dir_port@
- 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 = director.example.com
Password = "@dir_password@"
}
diff -Naur bacula-5.2.2.old/src/stored/stored.conf.in bacula-5.2.2/src/stored/stored.conf.in
--- bacula-5.2.2.old/src/stored/stored.conf.in 2011-12-05 13:30:03.112113391 +0100
+++ bacula-5.2.2/src/stored/stored.conf.in 2011-12-05 13:40:04.777491664 +0100
@@ -8,7 +8,7 @@
#
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@
+ 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 @@
FDPort = @fd_port@
Password = "@mon_fd_password@" # password for FileDaemon
}
Storage {
Name = @basename@-sd
- Address = @hostname@
+ Address = storage.example.com
@@ -22 +22 @@
- Name = @hostname@-dir
+ Name = bacula-dir
@@ -54 +54 @@
- director = @hostname@-dir = all
+ director = bacula-dir = all
SDPort = @sd_port@
Password = "@mon_sd_password@" # password for StorageDaemon
}
Director {
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
Version: 5.2.2
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details
License: GPLv2 with exceptions
@ -24,7 +24,7 @@ Source17: bacula-sd.sysconfig
Source18: bacula-checkconf
Patch1: bacula-5.2.2-config.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
Patch5: bacula-5.0.3-log-path.patch
Patch6: bacula-5.0.3-sqlite-priv.patch
@ -275,9 +275,9 @@ Provides check_bacula support for Nagios.
%prep
%setup -q
%setup -q -a 1 -D -T
%patch1 -p1
%patch1 -p1 -b .config
%patch2 -p2 -b .openssl
%patch3 -p2 -b .config
%patch3 -p1 -b .queryfile
%patch4 -p1 -b .dsolink
%patch5 -p2 -b .log-path
%patch6 -p0 -b .priv
@ -307,6 +307,7 @@ export CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses"
--with-sd-group=disk \
--with-fd-user=root \
--with-fd-group=root \
--with-basename=bacula \
--with-dir-password=@@DIR_PASSWORD@@ \
--with-fd-password=@@FD_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-sd-password=@@MON_SD_PASSWORD@@ \
--with-working-dir=%{_localstatedir}/spool/bacula \
--with-logdir=%{_localstatedir}/log/bacula \
--with-scriptdir=%{_libexecdir}/bacula \
--with-plugindir=%{_libdir}/bacula \
--with-smtp-host=localhost \
@ -820,6 +822,7 @@ fi
%changelog
* Mon Dec 05 2011 Simone Caronni <negativo17@gmail.com> - 5.2.2-5
- 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
- Rename storage-common to storage and make it provide storage-common.