From eaf2f302c01ed159d5ed1b591e5289320fe136b1 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Mon, 16 Jan 2017 13:01:41 +0100 Subject: [PATCH] Fix buildsystem to check for lz4 correctly (#1404406) --- ...for-lz4-in-the-old-and-new-numbering.patch | 48 +++++++++++++++++++ systemd.spec | 6 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0004-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch diff --git a/0004-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch b/0004-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch new file mode 100644 index 0000000..aadac4f --- /dev/null +++ b/0004-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch @@ -0,0 +1,48 @@ +From 047be3e733cff7717ccd49d6422ea0002bd0c515 Mon Sep 17 00:00:00 2001 +From: Jan Synacek +Date: Mon, 16 Jan 2017 13:00:03 +0100 +Subject: [PATCH] build-sys: check for lz4 in the old and new numbering scheme + (#4717) + +lz4 upstream decided to switch to an incompatible numbering scheme +(1.7.3 follows 131, to match the so version). PKG_CHECK_MODULES does +not allow two version matches for the same package, so e.g. lz4 < 10 || +lz4 >= 125 cannot be used. Check twice, once for "new" numbers (anything +below 10 is assume to be new), once for the "old" numbers (anything +above >= 125). This assumes that the "new" versioning will not get to 10 +to quickly. I think that's a safe assumption, lz4 is a mature project. + +Fixed #4690. + +Cherry-picked from +https://github.com/systemd/systemd/commit/3d4cf7de48a74726694abbaa09f9804b845ff3ba + +Resolves: #1404406 +--- + configure.ac | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cf595e6..4a0b269 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -602,10 +602,13 @@ AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"]) + have_lz4=no + AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [Disable optional LZ4 support])) + AS_IF([test "x$enable_lz4" != "xno"], [ +- PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ], +- [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) ++ PKG_CHECK_MODULES(LZ4, [ liblz4 < 10 ], ++ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available]) + have_lz4=yes], +- have_lz4=no) ++ [PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ], ++ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available]) ++ have_lz4=yes], ++ have_lz4=no)]) + AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes], + [AC_MSG_ERROR([*** LZ4 support requested but libraries not found])]) + ]) +-- +2.9.3 + diff --git a/systemd.spec b/systemd.spec index 56228d8..95b509d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 232 -Release: 7%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 8%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -42,6 +42,7 @@ Source12: https://raw.githubusercontent.com/systemd/systemd/1000522a60cead Patch0001: 0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch Patch0002: 0002-kernel-install-use-exit-instead-of-return-4565.patch Patch0003: 0003-kernel-install-avoid-process-substitution.patch +Patch0004: 0004-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch @@ -956,6 +957,9 @@ getent passwd systemd-journal-upload &>/dev/null || useradd -r -l -g systemd-jou %{_mandir}/man[1578]/systemd-journal-gateway* %changelog +* Tue Jan 17 2017 Zbigniew Jędrzejewski-Szmek - 232-8 +- Fix buildsystem to check for lz4 correctly (#1404406) + * Wed Jan 11 2017 Zbigniew Jędrzejewski-Szmek - 232-7 - Various small tweaks to scriplets