diff options
author | Tom Keller | 2015-11-02 00:59:58 -0500 |
---|---|---|
committer | Tom Keller | 2015-11-02 00:59:58 -0500 |
commit | 01ccc3999b947c20cfbb06362c20f797a36363ee (patch) | |
tree | 7ee9ba6b07352989015aedaa62e16ebdc7435f18 | |
parent | be932d9512e85764c2874b0e31e79225a9a74c19 (diff) | |
download | aur-01ccc3999b947c20cfbb06362c20f797a36363ee.tar.gz |
Push to version 7.2, add postinst script
-rw-r--r-- | 01-basename.patch | 199 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rwxr-xr-x | bacula.install | 4 |
3 files changed, 222 insertions, 7 deletions
diff --git a/01-basename.patch b/01-basename.patch new file mode 100644 index 000000000000..e2695d564e88 --- /dev/null +++ b/01-basename.patch @@ -0,0 +1,199 @@ +diff -ru a/bacula-7.2.0/src/console/bconsole.conf.in b/bacula-7.2.0/src/console/bconsole.conf.in +--- a/bacula-7.2.0/src/console/bconsole.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/console/bconsole.conf.in 2015-11-01 17:10:50.385441109 -0500 +@@ -6,7 +6,7 @@ + # + + Director { +- Name = @basename@-dir ++ Name = __BASENAME__-dir + DIRport = @dir_port@ + address = @hostname@ + Password = "@dir_password@" +diff -ru a/bacula-7.2.0/src/dird/bacula-dir.conf.in b/bacula-7.2.0/src/dird/bacula-dir.conf.in +--- a/bacula-7.2.0/src/dird/bacula-dir.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/dird/bacula-dir.conf.in 2015-11-01 17:11:05.367931570 -0500 +@@ -13,7 +13,7 @@ + # + + Director { # define myself +- Name = @basename@-dir ++ Name = __BASENAME__-dir + DIRport = @dir_port@ # where we listen for UA connections + QueryFile = "@scriptdir@/query.sql" + WorkingDirectory = "@working_dir@" +@@ -27,7 +27,7 @@ + Name = "DefaultJob" + Type = Backup + Level = Incremental +- Client = @basename@-fd ++ Client = __BASENAME__-fd + FileSet = "Full Set" + Schedule = "WeeklyCycle" + Storage = File1 +@@ -49,7 +49,7 @@ + + #Job { + # Name = "BackupClient2" +-# Client = @basename@2-fd ++# Client = __BASENAME__2-fd + # JobDefs = "DefaultJob" + #} + +@@ -87,7 +87,7 @@ + Job { + Name = "RestoreFiles" + Type = Restore +- Client=@basename@-fd ++ Client=__BASENAME__-fd + FileSet="Full Set" + Storage = File1 + Pool = File +@@ -165,7 +165,7 @@ + + # Client (File Services) to backup + Client { +- Name = @basename@-fd ++ Name = __BASENAME__-fd + Address = @hostname@ + FDPort = @fd_port@ + Catalog = MyCatalog +@@ -180,7 +180,7 @@ + # You should change Name, Address, and Password before using + # + #Client { +-# Name = @basename@2-fd ++# Name = __BASENAME__2-fd + # Address = @hostname@2 + # FDPort = @fd_port@ + # Catalog = MyCatalog +@@ -309,7 +309,7 @@ + # Restricted console used by tray-monitor to get the status of the director + # + Console { +- Name = @basename@-mon ++ Name = __BASENAME__-mon + Password = "@mon_dir_password@" + CommandACL = status, .status + } +diff -ru a/bacula-7.2.0/src/filed/bacula-fd.conf.in b/bacula-7.2.0/src/filed/bacula-fd.conf.in +--- a/bacula-7.2.0/src/filed/bacula-fd.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/filed/bacula-fd.conf.in 2015-11-01 17:11:11.380926629 -0500 +@@ -15,7 +15,7 @@ + # List Directors who are permitted to contact this File daemon + # + Director { +- Name = @basename@-dir ++ Name = __BASENAME__-dir + Password = "@fd_password@" + } + +@@ -24,7 +24,7 @@ + # status of the file daemon + # + Director { +- Name = @basename@-mon ++ Name = __BASENAME__-mon + Password = "@mon_fd_password@" + Monitor = yes + } +@@ -33,7 +33,7 @@ + # "Global" File daemon configuration specifications + # + FileDaemon { # this is me +- Name = @basename@-fd ++ Name = __BASENAME__-fd + FDport = @fd_port@ # where we listen for the director + WorkingDirectory = @working_dir@ + Pid Directory = @piddir@ +@@ -44,5 +44,5 @@ + # Send all messages except skipped files back to Director + Messages { + Name = Standard +- director = @basename@-dir = all, !skipped, !restored ++ director = __BASENAME__-dir = all, !skipped, !restored + } +diff -ru a/bacula-7.2.0/src/qt-console/bat.conf.in b/bacula-7.2.0/src/qt-console/bat.conf.in +--- a/bacula-7.2.0/src/qt-console/bat.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/qt-console/bat.conf.in 2015-11-01 17:11:25.040158200 -0500 +@@ -3,7 +3,7 @@ + # + + Director { +- Name = @basename@-dir ++ Name = __BASENAME__-dir + DIRport = @dir_port@ + address = @hostname@ + Password = "@dir_password@" +diff -ru a/bacula-7.2.0/src/qt-console/tray-monitor/tray-monitor.conf.in b/bacula-7.2.0/src/qt-console/tray-monitor/tray-monitor.conf.in +--- a/bacula-7.2.0/src/qt-console/tray-monitor/tray-monitor.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/qt-console/tray-monitor/tray-monitor.conf.in 2015-11-01 17:11:31.926437464 -0500 +@@ -3,27 +3,27 @@ + # + + Monitor { +- Name = @basename@-mon ++ Name = __BASENAME__-mon + Password = "@mon_dir_password@" # password for the Directors + RefreshInterval = 30 seconds + } + + Client { +- Name = @basename@-fd ++ Name = __BASENAME__-fd + Address = @hostname@ + FDPort = @fd_port@ + Password = "@mon_fd_password@" # password for FileDaemon + } + + Storage { +- Name = @basename@-sd ++ Name = __BASENAME__-sd + Address = @hostname@ + SDPort = @sd_port@ + Password = "@mon_sd_password@" # password for StorageDaemon + } + + Director { +- Name = @basename@-dir ++ Name = __BASENAME__-dir + DIRport = @dir_port@ + address = @hostname@ + } +diff -ru a/bacula-7.2.0/src/stored/bacula-sd.conf.in b/bacula-7.2.0/src/stored/bacula-sd.conf.in +--- a/bacula-7.2.0/src/stored/bacula-sd.conf.in 2015-08-13 09:52:24.000000000 -0400 ++++ b/bacula-7.2.0/src/stored/bacula-sd.conf.in 2015-11-01 17:11:38.186085314 -0500 +@@ -15,7 +15,7 @@ + # + + Storage { # definition of myself +- Name = @basename@-sd ++ Name = __BASENAME__-sd + SDPort = @sd_port@ # Director's port + WorkingDirectory = "@working_dir@" + Pid Directory = "@piddir@" +@@ -26,7 +26,7 @@ + # List Directors who are permitted to contact Storage daemon + # + Director { +- Name = @basename@-dir ++ Name = __BASENAME__-dir + Password = "@sd_password@" + } + +@@ -35,7 +35,7 @@ + # status of the storage daemon + # + Director { +- Name = @basename@-mon ++ Name = __BASENAME__-mon + Password = "@mon_sd_password@" + Monitor = yes + } +@@ -284,5 +284,5 @@ + # + Messages { + Name = Standard +- director = @basename@-dir = all ++ director = __BASENAME__-dir = all + } @@ -6,8 +6,8 @@ pkgbase='bacula' _dir_backends=("${pkgbase}-dir-sqlite3" "${pkgbase}-dir-mariadb" "${pkgbase}-dir-postgresql") pkgname=("${pkgbase}-common" "${pkgbase}-console" "${pkgbase}-fd" "${pkgbase}-bat" "${pkgbase}-sd" "${pkgbase}-dir" ${_dir_backends[@]} "${pkgbase}-dir-mysql") -pkgver=7.0.5 -pkgrel=3 +pkgver=7.2.0 +pkgrel=2 arch=(i686 x86_64) pkgdesc="${pkgbase^} - A Network Backup Tool" url="http://www.${pkgbase}.org" @@ -16,12 +16,15 @@ optdepends=('openssl: network encryption between daemons') makedepends=('sqlite' 'libmariadbclient' 'postgresql-libs' 'qt4') source=("http://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}-${pkgver}.tar.gz" '00-qmake4.patch' + '01-basename.patch' ) -md5sums=('b4a99d673f5e1eaae8b257ccc610241f' - '9ac88867a9ad3a4fe0486a26d0cdb542') -sha1sums=('3c4b2430960daf2607e824f0c0641f65023e43ce' - '58a60e8af9b4735c564c7223c2bf0c25803927f3') +md5sums=('8381b6523dab31648a0bae417e60832b' + '9ac88867a9ad3a4fe0486a26d0cdb542' + '1b58f9bf9bfd047b15e8057e2028a96a') +sha1sums=('5863afe6f438a03a70b02ee59446cb4e44359229' + '58a60e8af9b4735c564c7223c2bf0c25803927f3' + 'ff9549b8ea326654bad5987c820f6dfd629fce54') _instdir="${startdir}/install" _workdir="/var/lib/${pkgbase}" @@ -100,6 +103,7 @@ _genfiles() { prepare() { pushd "${srcdir}/${pkgbase}-${pkgver}" patch -Np3 -i ${srcdir}/00-qmake4.patch || true + patch -Np2 -i ${srcdir}/01-basename.patch || true _genfiles popd } @@ -119,7 +123,6 @@ build() { --with-postgresql \ --with-pid-dir=/run \ --with-systemd=/usr/lib/systemd/system \ - --with-tcp-wrappers \ --with-logdir=/var/log/${pkgbase} \ --with-working-dir=${_workdir} \ --with-x @@ -132,6 +135,7 @@ package_bacula-bat() { pkgdesc="${pkgdesc} (management GUI)" backup=("etc/${pkgbase}/bat.conf") depends=("${pkgbase}-common=${pkgver}" 'qt4') + install=("bacula.install") pushd "${_instdir}" cp --parents -a usr/bin/bat ${pkgdir} @@ -151,6 +155,7 @@ package_bacula-bat() { package_bacula-fd() { pkgdesc="${pkgdesc} (file daemon)" backup=("etc/${pkgbase}/${pkgname}.conf") + install=("bacula.install") optdepends=( 'openssl: network encryption between daemons' 'lzo: LZO compression for Storage Daemon' @@ -191,6 +196,7 @@ package_bacula-common() { package_bacula-console() { pkgdesc="${pkgdesc} (management CLI)" backup=("etc/${pkgbase}/bconsole.conf") + install=("bacula.install") depends=("${pkgbase}-common=${pkgver}") pushd "${_instdir}" @@ -207,6 +213,7 @@ package_bacula-console() { package_bacula-dir() { pkgdesc="${pkgdesc} (Director)" depends=("${pkgbase}-common=${pkgver}") + install=("bacula.install") optdepends=( "${pkgname}-sqlite3: SQLite support" "${pkgname}-mariadb: MariaDB support" @@ -237,6 +244,7 @@ package_bacula-dir() { cp --parents -a usr/lib/libbacsql-${pkgver}.so ${pkgdir} mkdir -p ${pkgdir}${_workdir} + mkdir -p ${pkgdir}/var/log/${pkgbase} mkdir -p ${pkgdir}/usr/lib/systemd/system/ cp -f ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/ @@ -258,6 +266,7 @@ package_bacula-dir-mariadb() { pkgdesc="${pkgdesc} (Director - MariaDB support)" depends=("${pkgbase}-dir" 'libmariadbclient') conflicts=(${_dir_backends[@]/${pkgname}}) + install=("bacula.install") replaces="${pkgbase}-dir-mysql" provides="${pkgbase}-dir-mysql" pushd "${_instdir}" @@ -279,6 +288,7 @@ package_bacula-dir-mysql() { package_bacula-dir-postgresql() { pkgdesc="${pkgdesc} (Director - PostgreSQL support)" depends=("${pkgbase}-dir" 'postgresql-libs') + install=("bacula.install") conflicts=(${_dir_backends[@]/${pkgname}}) pushd "${_instdir}" @@ -294,6 +304,7 @@ package_bacula-dir-sqlite3() { pkgdesc="${pkgdesc} (Director - SQLite3 support)" depends=("${pkgbase}-dir" 'sqlite') conflicts=(${_dir_backends[@]/${pkgname}}) + install=("bacula.install") pushd "${_instdir}" cp --parents -a usr/lib/libbaccats-sqlite3-${pkgver}.so ${pkgdir} @@ -307,6 +318,7 @@ package_bacula-dir-sqlite3() { package_bacula-sd() { pkgdesc="${pkgdesc} (Storage Daemon)" backup=("etc/${pkgbase}/${pkgname}.conf") + install=("bacula.install") depends=("${pkgbase}-common") optdepends=( 'openssl: network encryption between daemons' diff --git a/bacula.install b/bacula.install new file mode 100755 index 000000000000..bcc3cd9a4977 --- /dev/null +++ b/bacula.install @@ -0,0 +1,4 @@ +post_install() { + SERVERNAME=$(hostname -s) + sed -i "s/__BASENAME__/${SERVERNAME}/g" /etc/bacula/*.conf +} |