[bacula/f17: 1/2] Fix console build on RHEL 5
Simone Caronni
slaanesh at fedoraproject.org
Mon Jun 11 12:54:32 UTC 2012
commit cd32a5c042dd8e997c83d11df54dcf23c7ca74bb
Author: Simone Caronni <negativo17 at gmail.com>
Date: Mon Jun 11 14:51:16 2012 +0200
Fix console build on RHEL 5
bacula-5.2.8-restore-termlib.patch | 80 ++++++++++++++++++++++++++++++++++++
bacula.spec | 7 +++-
2 files changed, 86 insertions(+), 1 deletions(-)
---
diff --git a/bacula-5.2.8-restore-termlib.patch b/bacula-5.2.8-restore-termlib.patch
new file mode 100644
index 0000000..a1ae163
--- /dev/null
+++ b/bacula-5.2.8-restore-termlib.patch
@@ -0,0 +1,80 @@
+diff -Naur bacula-5.2.8.old/autoconf/configure.in bacula-5.2.8/autoconf/configure.in
+--- bacula-5.2.8.old/autoconf/configure.in 2012-06-10 12:00:42.000000000 +0200
++++ bacula-5.2.8/autoconf/configure.in 2012-06-11 14:34:41.612673957 +0200
+@@ -854,6 +854,9 @@
+ fi
+ ]
+ )
++if test x$TERM_LIB = x ; then
++ support_readline=no
++fi
+
+ got_readline="no"
+ READLINE_SRC=
+@@ -880,7 +883,7 @@
+ AC_CHECK_HEADER(${with_readline}/readline.h,
+ [
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+- CONS_LIBS="-lreadline -lhistory"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ got_readline="yes"
+ ], [
+ echo " "
+@@ -897,7 +900,7 @@
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I/usr/include/readline"
+- CONS_LIBS="-lreadline"
++ CONS_LIBS="-lreadline $TERM_LIB"
+ ], [
+ dnl Did not find standard library, so try Bacula's default
+ AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
+@@ -905,7 +908,7 @@
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I${TOP_DIR}/depkgs/readline"
+- CONS_LIBS="-lreadline -lhistory"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
+ PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
+ ], [
+diff -Naur bacula-5.2.8.old/configure bacula-5.2.8/configure
+--- bacula-5.2.8.old/configure 2012-06-10 12:00:42.000000000 +0200
++++ bacula-5.2.8/configure 2012-06-11 14:47:45.700775708 +0200
+@@ -22352,6 +22352,9 @@
+
+ fi
+
++if test x$TERM_LIB = x ; then
++ support_readline=no
++fi
+
+ got_readline="no"
+ READLINE_SRC=
+@@ -22383,7 +22386,7 @@
+
+ $as_echo "#define HAVE_READLINE 1" >>confdefs.h
+
+- CONS_LIBS="-lreadline -lhistory"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ got_readline="yes"
+
+ else
+@@ -22409,7 +22412,7 @@
+
+ got_readline="yes"
+ CONS_INC="-I/usr/include/readline"
+- CONS_LIBS="-lreadline"
++ CONS_LIBS="-lreadline $TERM_LIB"
+
+ else
+
+@@ -22422,7 +22425,7 @@
+
+ got_readline="yes"
+ CONS_INC="-I${TOP_DIR}/depkgs/readline"
+- CONS_LIBS="-lreadline -lhistory"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
+ PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
+
diff --git a/bacula.spec b/bacula.spec
index ffa23d2..71a80b6 100644
--- a/bacula.spec
+++ b/bacula.spec
@@ -3,7 +3,7 @@
Name: bacula
Version: 5.2.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details
License: AGPLv3 with exceptions
@@ -33,6 +33,7 @@ Patch2: bacula-5.2.2-queryfile.patch
Patch3: bacula-5.2.4-log-path.patch
Patch4: bacula-5.0.3-sqlite-priv.patch
Patch5: bacula-5.2.7-bat-build.patch
+Patch6: bacula-5.2.8-restore-termlib.patch
BuildRequires: desktop-file-utils
BuildRequires: perl
@@ -291,6 +292,7 @@ Provides check_bacula support for Nagios.
%patch3 -p1 -b .log-path
%patch4 -p0 -b .priv
%patch5 -p1 -b .bat-build
+%patch6 -p1 -b .restore-termlib
# Remove execution permissions from files we're packaging as docs later on
find updatedb -type f | xargs chmod -x
@@ -843,6 +845,9 @@ fi
%changelog
+* Mon Jun 11 2012 Simone Caronni <negativo17 at gmail.com> - 5.2.8-2
+- Fix console build on RHEL 5.
+
* Mon Jun 11 2012 Simone Caronni <negativo17 at gmail.com> - 5.2.8-1
- Update to 5.2.8.
- Removed upstram xattr patch.
More information about the scm-commits
mailing list