Skip to content

Commit

Permalink
sys-apps/systemd: backport lz4 version check fix
Browse files Browse the repository at this point in the history
226 does not check the version at all, so skip it.

Bug: https://bugs.gentoo.org/595210
Package-Manager: Portage-2.3.3_p13, Repoman-2.3.1_p6
  • Loading branch information
floppym committed Jan 3, 2017
1 parent 701339c commit d8a4eca
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
44 changes: 44 additions & 0 deletions sys-apps/systemd/files/232-lz4-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 3d4cf7de48a74726694abbaa09f9804b845ff3ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
Date: Wed, 23 Nov 2016 10:18:30 -0500
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.
---
configure.ac | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 65eaae1ae..5979de4dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -621,10 +621,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.11.0

3 changes: 2 additions & 1 deletion sys-apps/systemd/systemd-231.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand Down Expand Up @@ -162,6 +162,7 @@ src_prepare() {
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die

local PATCHES=(
"${FILESDIR}/232-lz4-version.patch"
"${FILESDIR}/218-Dont-enable-audit-by-default.patch"
"${FILESDIR}/228-noclean-tmp.patch"
)
Expand Down
3 changes: 2 additions & 1 deletion sys-apps/systemd/systemd-232.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand Down Expand Up @@ -150,6 +150,7 @@ src_prepare() {
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die

local PATCHES=(
"${FILESDIR}/232-lz4-version.patch"
)

if ! use vanilla; then
Expand Down

0 comments on commit d8a4eca

Please sign in to comment.