diff --git a/SOURCES/bacula-multilib.patch b/SOURCES/bacula-multilib.patch index f11c042..9320224 100644 --- a/SOURCES/bacula-multilib.patch +++ b/SOURCES/bacula-multilib.patch @@ -2,7 +2,7 @@ diff --git a/src/host.h.in b/src/host.h.in index 3fdbb05..1b3e684 100644 --- a/src/host.h.in +++ b/src/host.h.in -@@ -30,7 +30,23 @@ +@@ -30,7 +30,25 @@ * */ @@ -23,6 +23,8 @@ index 3fdbb05..1b3e684 100644 +#define HOST_OS "x86_64-redhat-linux-gnu" +#elif defined(__sparc__) +#define HOST_OS "i386-redhat-linux-gnu" ++#elif defined(__aarch64__) ++#define HOST_OS "aarch64-redhat-linux-gnu" +#endif #define BACULA "@BACULA@" #define DISTNAME "@DISTNAME@" diff --git a/SOURCES/bacula-name-length.patch b/SOURCES/bacula-name-length.patch new file mode 100644 index 0000000..6ba8c2e --- /dev/null +++ b/SOURCES/bacula-name-length.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/message.c b/src/lib/message.c +index c4b1b90..0851da8 100644 +--- a/src/lib/message.c ++++ b/src/lib/message.c +@@ -60,7 +60,7 @@ utime_t daemon_start_time = 0; /* Daemon start time */ + const char *version = VERSION " (" BDATE ")"; + const char *dist_name = DISTNAME " " DISTVER; + int beef = BEEF; +-char my_name[30] = {0}; /* daemon name is stored here */ ++char my_name[64] = {0}; /* daemon name is stored here */ + char host_name[50] = {0}; /* host machine name */ + char *exepath = (char *)NULL; + char *exename = (char *)NULL; diff --git a/SPECS/bacula.spec b/SPECS/bacula.spec index d450797..1653442 100644 --- a/SPECS/bacula.spec +++ b/SPECS/bacula.spec @@ -1,9 +1,12 @@ %global uid 133 %global username bacula +%global _hardened_build 1 + +%global aarchrev .1 Name: bacula Version: 5.2.13 -Release: 18%{?dist} +Release: 23%{aarchrev}%{?dist} Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details License: AGPLv3 with exceptions @@ -41,6 +44,7 @@ Patch7: %{name}-help-update.patch Patch8: %{name}-aarch64.patch Patch9: %{name}-non-free-code.patch Patch10: %{name}-multilib.patch +Patch11: %{name}-name-length.patch BuildRequires: desktop-file-utils BuildRequires: perl @@ -326,6 +330,7 @@ Provides check_bacula support for Nagios. %patch8 -p1 -b .aarch64 %patch9 -p1 -b .non-free-code %patch10 -p1 -b .multilib +%patch11 -p1 -b .name-length cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} . # Remove execution permissions from files we're packaging as docs later on @@ -333,7 +338,7 @@ find updatedb -type f | xargs chmod -x %build build() { -export CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses" +export CFLAGS="$RPM_OPT_FLAGS -fPIE -Wl,-z,relro,-z,now -I%{_includedir}/ncurses" export CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses" %configure \ --sysconfdir=%{_sysconfdir}/bacula \ @@ -390,8 +395,9 @@ popd %if 0%{?fedora} || 0%{?rhel} >= 6 pushd src/qt-console/tray-monitor - /usr/bin/qmake-qt4 + /usr/bin/qmake-qt4 tray-monitor.pro make %{?_smp_mflags} + cp -f .libs/bacula-tray-monitor . popd %endif @@ -419,7 +425,7 @@ install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE13} # QT Tray monitor -install -p -m 755 -D src/qt-console/tray-monitor/.libs/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor +install -p -m 755 -D src/qt-console/tray-monitor/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor install -p -m 644 -D src/qt-console/tray-monitor/tray-monitor.conf %{buildroot}%{_sysconfdir}/bacula/tray-monitor.conf install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.png desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE14} @@ -485,14 +491,8 @@ for dir in src src/cats src/console src/dird src/filed src/findlib src/lib src/p done # fix multilib issues -%ifarch x86_64 s390x ia64 ppc64 -%define wordsize 64 -%else -%define wordsize 32 -%endif - mv $RPM_BUILD_ROOT%{_includedir}/bacula/src/config.h \ - $RPM_BUILD_ROOT%{_includedir}/bacula/src/config-%{wordsize}.h + $RPM_BUILD_ROOT%{_includedir}/bacula/src/config-%{__isa_bits}.h cat >$RPM_BUILD_ROOT%{_includedir}/bacula/src/config.h < - 5.2.13-18 -- Resolves: #881146 Multilib issue +* Fri Aug 07 2015 Petr Hracek - 5.2.13-23.1 +- Update SPEC file + Related: #1195625 + +* Mon May 11 2015 Petr Hracek - 5.2.13-22.1 +- Update SPEC file + Related: #1195625 + +* Mon May 11 2015 Petr Hracek - 5.2.13-21.1 +- Increase bacula daemon name to 64 characters +Resolves: #1195625 + +* Wed May 06 2015 Petr Hracek - 5.2.13-20.1 +- PIE and RELRO check +Resolves: #1092525 + +* Thu Jul 31 2014 Petr Hracek - 5.2.13-19.1 +- Bump version +Resolves: #1059611 + +* Tue Mar 18 2014 Petr Hracek - 5.2.13-18.1 +- Add aarch64 support +Resolves: #1059611 + +* Tue Feb 4 2014 Brendan Conoboy - 5.2.13-17.1 +- Per Marcin, add aarch64 to bacula-multilib.patch. * Fri Jan 24 2014 Daniel Mach - 5.2.13-17 - Mass rebuild 2014-01-24 @@ -1337,4 +1361,3 @@ fi * Mon Jan 25 2010 Jon Ciesla