Restore soname patch, clean SPEC file
This commit is contained in:
parent
2f281e396e
commit
6e2fc90b5b
35
bacula-7.0.4-autoconf.patch
Normal file
35
bacula-7.0.4-autoconf.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -Naur bacula-7.0.4.old/autoconf/ltmain.sh bacula-7.0.4/autoconf/ltmain.sh
|
||||
--- bacula-7.0.4.old/autoconf/ltmain.sh 2014-07-24 17:43:23.085243360 +0200
|
||||
+++ bacula-7.0.4/autoconf/ltmain.sh 2014-07-24 17:45:12.505330842 +0200
|
||||
@@ -2429,6 +2429,7 @@
|
||||
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
|
||||
-shared only do dynamic linking of libtool libraries
|
||||
-shrext SUFFIX override the standard shared library file extension
|
||||
+ -soname SONAME override the standard shared object name
|
||||
-static do not do any dynamic linking of uninstalled libtool libraries
|
||||
-static-libtool-libs
|
||||
do not do any dynamic linking of libtool libraries
|
||||
@@ -5434,6 +5435,11 @@
|
||||
prev=
|
||||
continue
|
||||
;;
|
||||
+ soname)
|
||||
+ soname_spec="$arg"
|
||||
+ prev=
|
||||
+ continue
|
||||
+ ;;
|
||||
weak)
|
||||
func_append weak_libs " $arg"
|
||||
prev=
|
||||
@@ -5754,6 +5760,11 @@
|
||||
continue
|
||||
;;
|
||||
|
||||
+ -soname)
|
||||
+ prev=soname
|
||||
+ continue
|
||||
+ ;;
|
||||
+
|
||||
-static | -static-libtool-libs)
|
||||
# The effects of -static are defined in a previous loop.
|
||||
# We used to do the same as -all-static on platforms that
|
149
bacula.spec
149
bacula.spec
@ -1,12 +1,9 @@
|
||||
%global uid 133
|
||||
%global username bacula
|
||||
|
||||
%global __requires_exclude ^(libbaccats.*\\.so.*)$
|
||||
%global __provides_exclude ^(libbaccats.*\\.so.*)$
|
||||
|
||||
Name: bacula
|
||||
Version: 9.0.7
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
|
||||
# See LICENSE for details
|
||||
License: AGPLv3 with exceptions
|
||||
@ -44,6 +41,13 @@ Patch8: %{name}-9.0.2-desktop.patch
|
||||
Patch9: %{name}-9.0.6-tray-monitor-task.patch
|
||||
Patch10: %{name}-9.0.7-g++-options.patch
|
||||
|
||||
# Original patch removed by mistake, upstream is not willing to add it again:
|
||||
# http://www.bacula.org/git/cgit.cgi/bacula/commit/?h=Branch-7.0&id=51b3b98fb77ab3c0decee455cc6c4d2eb3c5303a
|
||||
# Without this, there is no library providing the correct shared object name
|
||||
# required by the daemons.
|
||||
# http://bugs.bacula.org/view.php?id=2084
|
||||
Patch11: %{name}-7.0.4-autoconf.patch
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: sed
|
||||
@ -310,17 +314,7 @@ Requires: nagios-common%{?_isa}
|
||||
Provides check_bacula support for Nagios.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%autosetup -p1
|
||||
|
||||
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
|
||||
|
||||
@ -336,42 +330,42 @@ export PATH="$PATH:%{_qt5_bindir}"
|
||||
export PATH="$PATH:%{_qt4_bindir}"
|
||||
%endif
|
||||
%configure \
|
||||
--disable-conio \
|
||||
--disable-rpath \
|
||||
--docdir=%{_datadir}/bacula \
|
||||
--enable-bat \
|
||||
--enable-batch-insert \
|
||||
--enable-build-dird \
|
||||
--enable-build-stored \
|
||||
--enable-includes \
|
||||
--enable-largefile \
|
||||
--enable-readline \
|
||||
--enable-smartalloc \
|
||||
--sysconfdir=%{_sysconfdir}/bacula \
|
||||
--with-basename=bacula \
|
||||
--with-bsrdir=%{_localstatedir}/spool/bacula \
|
||||
--with-dir-password=@@DIR_PASSWORD@@ \
|
||||
--with-fd-password=@@FD_PASSWORD@@ \
|
||||
--with-hostname=localhost \
|
||||
--with-logdir=%{_localstatedir}/log/bacula \
|
||||
--with-mon-dir-password=@@MON_DIR_PASSWORD@@ \
|
||||
--with-mon-fd-password=@@MON_FD_PASSWORD@@ \
|
||||
--with-mon-sd-password=@@MON_SD_PASSWORD@@ \
|
||||
--with-mysql \
|
||||
--with-openssl \
|
||||
--with-pid-dir=%{_localstatedir}/run \
|
||||
--with-plugindir=%{_libdir}/bacula \
|
||||
--with-postgresql \
|
||||
--with-scriptdir=%{_libexecdir}/bacula \
|
||||
--with-sd-password=@@SD_PASSWORD@@ \
|
||||
--with-smtp-host=localhost \
|
||||
--with-sqlite3 \
|
||||
--with-subsys-dir=%{_localstatedir}/lock/subsys \
|
||||
--disable-conio \
|
||||
--disable-rpath \
|
||||
--docdir=%{_datadir}/bacula \
|
||||
--enable-bat \
|
||||
--enable-batch-insert \
|
||||
--enable-build-dird \
|
||||
--enable-build-stored \
|
||||
--enable-includes \
|
||||
--enable-largefile \
|
||||
--enable-readline \
|
||||
--enable-smartalloc \
|
||||
--sysconfdir=%{_sysconfdir}/bacula \
|
||||
--with-basename=bacula \
|
||||
--with-bsrdir=%{_localstatedir}/spool/bacula \
|
||||
--with-dir-password=@@DIR_PASSWORD@@ \
|
||||
--with-fd-password=@@FD_PASSWORD@@ \
|
||||
--with-hostname=localhost \
|
||||
--with-logdir=%{_localstatedir}/log/bacula \
|
||||
--with-mon-dir-password=@@MON_DIR_PASSWORD@@ \
|
||||
--with-mon-fd-password=@@MON_FD_PASSWORD@@ \
|
||||
--with-mon-sd-password=@@MON_SD_PASSWORD@@ \
|
||||
--with-mysql \
|
||||
--with-openssl \
|
||||
--with-pid-dir=%{_localstatedir}/run \
|
||||
--with-plugindir=%{_libdir}/bacula \
|
||||
--with-postgresql \
|
||||
--with-scriptdir=%{_libexecdir}/bacula \
|
||||
--with-sd-password=@@SD_PASSWORD@@ \
|
||||
--with-smtp-host=localhost \
|
||||
--with-sqlite3 \
|
||||
--with-subsys-dir=%{_localstatedir}/lock/subsys \
|
||||
%if 0%{!?fedora} >= 28 || 0%{!?rhel} > 7
|
||||
--with-tcp-wrappers \
|
||||
--with-tcp-wrappers \
|
||||
%endif
|
||||
--with-working-dir=%{_localstatedir}/spool/bacula \
|
||||
--with-x
|
||||
--with-working-dir=%{_localstatedir}/spool/bacula \
|
||||
--with-x
|
||||
|
||||
# Remove RPATH
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
@ -462,10 +456,7 @@ chmod 755 %{buildroot}%{_libdir}/bacula/*
|
||||
chmod 755 %{buildroot}%{_libexecdir}/bacula/*
|
||||
chmod 644 %{buildroot}%{_libexecdir}/bacula/btraceback.*
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
exit 0
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%post libs-sql
|
||||
/usr/sbin/alternatives --install %{_libdir}/libbaccats.so libbaccats.so %{_libdir}/libbaccats-mysql.so 50
|
||||
@ -474,28 +465,26 @@ exit 0
|
||||
|
||||
# Fix for automatic selection of backends during upgrades
|
||||
if readlink /etc/alternatives/libbaccats.so | grep --silent mysql || \
|
||||
readlink /etc/alternatives/bacula-dir | grep --silent mysql || \
|
||||
readlink /etc/alternatives/bacula-sd | grep --silent mysql; then
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-mysql.so
|
||||
readlink /etc/alternatives/bacula-dir | grep --silent mysql || \
|
||||
readlink /etc/alternatives/bacula-sd | grep --silent mysql; then
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-mysql.so
|
||||
elif readlink /etc/alternatives/libbaccats.so | grep --silent sqlite || \
|
||||
readlink /etc/alternatives/bacula-dir | grep --silent sqlite || \
|
||||
readlink /etc/alternatives/bacula-sd | grep --silent sqlite; then
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-sqlite3.so
|
||||
readlink /etc/alternatives/bacula-dir | grep --silent sqlite || \
|
||||
readlink /etc/alternatives/bacula-sd | grep --silent sqlite; then
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-sqlite3.so
|
||||
else
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-postgresql.so
|
||||
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-postgresql.so
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
%{?ldconfig}
|
||||
|
||||
%preun libs-sql
|
||||
if [ "$1" = 0 ]; then
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-mysql.so
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-sqlite3.so
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-postgresql.so
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-mysql.so
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-sqlite3.so
|
||||
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-postgresql.so
|
||||
fi
|
||||
|
||||
%postun libs-sql
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
%ldconfig_postun libs-sql
|
||||
|
||||
%pre common
|
||||
getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || :
|
||||
@ -541,13 +530,13 @@ exit 0
|
||||
|
||||
%preun client
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-fd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-fd
|
||||
/sbin/service bacula-fd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-fd
|
||||
fi
|
||||
|
||||
%postun client
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-fd condrestart >/dev/null 2>&1 || :
|
||||
/sbin/service bacula-fd condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post director
|
||||
@ -555,13 +544,13 @@ fi
|
||||
|
||||
%preun director
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-dir stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-dir
|
||||
/sbin/service bacula-dir stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-dir
|
||||
fi
|
||||
|
||||
%postun director
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-dir condrestart >/dev/null 2>&1 || :
|
||||
/sbin/service bacula-dir condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post storage
|
||||
@ -569,13 +558,13 @@ fi
|
||||
|
||||
%preun storage
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-sd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-sd
|
||||
/sbin/service bacula-sd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-sd
|
||||
fi
|
||||
|
||||
%postun storage
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-sd condrestart >/dev/null 2>&1 || :
|
||||
/sbin/service bacula-sd condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%endif
|
||||
@ -589,6 +578,9 @@ fi
|
||||
%{_libdir}/libbacsd-%{version}.so
|
||||
|
||||
%files libs-sql
|
||||
# On Fedora 28 this gets recreated automatically even if the library is
|
||||
# deleted in the install section.
|
||||
%exclude %{_libdir}/libbacsql-%{version}.so
|
||||
%{_libdir}/libbaccats-mysql-%{version}.so
|
||||
%{_libdir}/libbaccats-mysql.so
|
||||
%{_libdir}/libbaccats-postgresql-%{version}.so
|
||||
@ -739,6 +731,11 @@ fi
|
||||
%{_libdir}/nagios/plugins/check_bacula
|
||||
|
||||
%changelog
|
||||
* Wed Jun 13 2018 Simone Caronni <negativo17@gmail.com> - 9.0.7-5
|
||||
- Restore soname patch and exclude versioned symlink in the files section
|
||||
to fix Fedora 28.
|
||||
- Update SPEC file for recent RPM macros.
|
||||
|
||||
* Mon Jun 11 2018 Simone Caronni <negativo17@gmail.com> - 9.0.7-4
|
||||
- Filter out libbaccats from requirements.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user