diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2021-05-09 09:20:07 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2021-05-09 09:20:07 +0000 |
commit | 8442979200a49066ad88a8c7bbc7917da6366893 (patch) | |
tree | 44cc3a263c650d4ca7f9b795cbebd08b42378ff9 | |
parent | 2021-05-09 08:50:17 UTC (diff) | |
parent | dev-util/pkgcheck: Fix PythonCompatUpdate handling of py3.10 (diff) | |
download | gentoo-8442979200a49066ad88a8c7bbc7917da6366893.tar.gz gentoo-8442979200a49066ad88a8c7bbc7917da6366893.tar.bz2 gentoo-8442979200a49066ad88a8c7bbc7917da6366893.zip |
Merge updates from master
-rw-r--r-- | dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch | 170 | ||||
-rw-r--r-- | dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild | 63 | ||||
-rw-r--r-- | sys-fs/lvm2/Manifest | 2 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch (renamed from sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch) | 35 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch | 25 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch | 117 | ||||
-rw-r--r-- | sys-fs/lvm2/lvm2-2.03.12.ebuild (renamed from sys-fs/lvm2/lvm2-2.03.11.ebuild) | 6 |
7 files changed, 397 insertions, 21 deletions
diff --git a/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch b/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch new file mode 100644 index 000000000000..8bee592b228e --- /dev/null +++ b/dev-util/pkgcheck/files/pkgcheck-0.9.7-py310-update.patch @@ -0,0 +1,170 @@ +From 443c0aab158e34196399073e801ae19ae0dce4dc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sun, 9 May 2021 10:59:18 +0200 +Subject: [PATCH] python: Fix treating python3.10 as newer than python3.9 + +Fix the sorting logic to use a combined lexical-numerical sort, in order +to sort python3.10 as newer than python3.9. This fixes +PythonCompatUpdate check. +--- + src/pkgcheck/checks/python.py | 25 +++++++++++++++---- + .../PythonCompatUpdate/expected.json | 6 ++--- + .../PythonCompatUpdate/fix.patch | 6 ++--- + .../profiles/desc/python_single_target.desc | 1 + + .../python/profiles/desc/python_targets.desc | 1 + + .../stub/python-dep1/python-dep1-0.ebuild | 2 +- + .../stub/python-dep2/python-dep2-0.ebuild | 2 +- + 7 files changed, 30 insertions(+), 13 deletions(-) + +diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py +index ed922215..7f0e9be4 100644 +--- a/src/pkgcheck/checks/python.py ++++ b/src/pkgcheck/checks/python.py +@@ -1,4 +1,5 @@ + import itertools ++import re + + from pkgcore.ebuild.atom import atom + from pkgcore.restrictions import packages, values +@@ -28,6 +29,18 @@ CHECK_EXCLUDE = frozenset(['virtual/pypy', 'virtual/pypy3']) + IUSE_PREFIX = 'python_targets_' + IUSE_PREFIX_S = 'python_single_target_' + ++TARGET_SPLIT_RE = re.compile(r'([0-9]+)') ++ ++ ++def target_sort_key(target): ++ def iter(): ++ for x in TARGET_SPLIT_RE.split(target): ++ try: ++ yield int(x) ++ except ValueError: ++ yield x ++ return tuple(iter()) ++ + + def get_python_eclass(pkg): + eclasses = ECLASSES.intersection(pkg.inherited) +@@ -281,14 +294,14 @@ class PythonCompatCheck(Check): + for target, _desc in repo.config.use_expand_desc.get(IUSE_PREFIX[:-1], ()): + if target[len(IUSE_PREFIX):].startswith('python'): + targets.append(target[len(IUSE_PREFIX):]) +- multi_targets = tuple(sorted(targets)) ++ multi_targets = tuple(sorted(targets, key=target_sort_key)) + + # determine available PYTHON_SINGLE_TARGET use flags + targets = [] + for target, _desc in repo.config.use_expand_desc.get(IUSE_PREFIX_S[:-1], ()): + if target[len(IUSE_PREFIX_S):].startswith('python'): + targets.append(target[len(IUSE_PREFIX_S):]) +- single_targets = tuple(sorted(targets)) ++ single_targets = tuple(sorted(targets, key=target_sort_key)) + + self.params = { + 'python-r1': (multi_targets, IUSE_PREFIX, None), +@@ -327,8 +340,9 @@ class PythonCompatCheck(Check): + try: + # determine the latest supported python version + latest_target = sorted( +- f"python{x.slot.replace('.', '_')}" for x in deps +- if x.key == 'dev-lang/python' and x.slot is not None)[-1] ++ (f"python{x.slot.replace('.', '_')}" for x in deps ++ if x.key == 'dev-lang/python' and x.slot is not None), ++ key=target_sort_key)[-1] + except IndexError: + # should be flagged by PythonMissingDeps + return +@@ -355,4 +369,5 @@ class PythonCompatCheck(Check): + except IndexError: + return + +- yield PythonCompatUpdate(sorted(targets), pkg=pkg) ++ yield PythonCompatUpdate(sorted(targets, key=target_sort_key), ++ pkg=pkg) +diff --git a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json +index ab7d9b01..f3476eac 100644 +--- a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json ++++ b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/expected.json +@@ -1,3 +1,3 @@ +-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "0", "updates": ["python3_8", "python3_9"]} +-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "1", "updates": ["python3_9"]} +-{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "2", "updates": ["python3_9"]} ++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "0", "updates": ["python3_8", "python3_9", "python3_10"]} ++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "1", "updates": ["python3_9", "python3_10"]} ++{"__class__": "PythonCompatUpdate", "category": "PythonCompatCheck", "package": "PythonCompatUpdate", "version": "2", "updates": ["python3_9", "python3_10"]} +diff --git a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch +index c63184e9..9be4952a 100644 +--- a/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch ++++ b/testdata/data/repos/python/PythonCompatCheck/PythonCompatUpdate/fix.patch +@@ -4,7 +4,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-0.ebui + @@ -1,5 +1,5 @@ + EAPI=7 + -PYTHON_COMPAT=( python3_7 ) +-+PYTHON_COMPAT=( python3_{7..9} ) +++PYTHON_COMPAT=( python3_{7..10} ) + + inherit python-r1 + +@@ -14,7 +14,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-1.ebui + @@ -1,5 +1,5 @@ + EAPI=7 + -PYTHON_COMPAT=( python3_{7,8} ) +-+PYTHON_COMPAT=( python3_{7..9} ) +++PYTHON_COMPAT=( python3_{7..10} ) + + inherit python-single-r1 + +@@ -24,7 +24,7 @@ diff -Naur python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-2.ebui + @@ -1,5 +1,5 @@ + EAPI=7 + -PYTHON_COMPAT=( python3_{7,8} ) +-+PYTHON_COMPAT=( python3_{7..9} ) +++PYTHON_COMPAT=( python3_{7..10} ) + + inherit python-any-r1 + +diff --git a/testdata/repos/python/profiles/desc/python_single_target.desc b/testdata/repos/python/profiles/desc/python_single_target.desc +index da5be2fd..3c39a224 100644 +--- a/testdata/repos/python/profiles/desc/python_single_target.desc ++++ b/testdata/repos/python/profiles/desc/python_single_target.desc +@@ -3,4 +3,5 @@ python2_7 - Build with Python 2.7 + python3_7 - Build with Python 3.7 + python3_8 - Build with Python 3.8 + python3_9 - Build with Python 3.9 ++python3_10 - Build with Python 3.10 + pypy3 - Build for PyPy3 only +diff --git a/testdata/repos/python/profiles/desc/python_targets.desc b/testdata/repos/python/profiles/desc/python_targets.desc +index b2be59ca..8e55f2da 100644 +--- a/testdata/repos/python/profiles/desc/python_targets.desc ++++ b/testdata/repos/python/profiles/desc/python_targets.desc +@@ -3,4 +3,5 @@ python2_7 - Build with Python 2.7 + python3_7 - Build with Python 3.7 + python3_8 - Build with Python 3.8 + python3_9 - Build with Python 3.9 ++python3_10 - Build with Python 3.10 + pypy3 - Build for PyPy3 only +diff --git a/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild b/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild +index 9eebedfd..55c455d9 100644 +--- a/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild ++++ b/testdata/repos/python/stub/python-dep1/python-dep1-0.ebuild +@@ -1,5 +1,5 @@ + EAPI=7 +-PYTHON_COMPAT=( python2_7 python3_{7,8,9} ) ++PYTHON_COMPAT=( python2_7 python3_{7,8,9,10} ) + + inherit python-r1 + +diff --git a/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild b/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild +index 9eebedfd..55c455d9 100644 +--- a/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild ++++ b/testdata/repos/python/stub/python-dep2/python-dep2-0.ebuild +@@ -1,5 +1,5 @@ + EAPI=7 +-PYTHON_COMPAT=( python2_7 python3_{7,8,9} ) ++PYTHON_COMPAT=( python2_7 python3_{7,8,9,10} ) + + inherit python-r1 + +-- +2.31.1 + diff --git a/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild b/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild new file mode 100644 index 000000000000..1859af4de531 --- /dev/null +++ b/dev-util/pkgcheck/pkgcheck-0.9.7-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8..9} ) +DISTUTILS_IN_SOURCE_BUILD=1 +inherit distutils-r1 optfeature + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/pkgcore/pkgcheck.git" + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos" + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +fi + +DESCRIPTION="pkgcore-based QA utility for ebuild repos" +HOMEPAGE="https://github.com/pkgcore/pkgcheck" + +LICENSE="BSD MIT" +SLOT="0" + +if [[ ${PV} == *9999 ]]; then + RDEPEND=" + ~dev-python/snakeoil-9999[${PYTHON_USEDEP}] + ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]" +else + RDEPEND=" + >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}] + >=sys-apps/pkgcore-0.11.6[${PYTHON_USEDEP}]" +fi +RDEPEND+=" + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/lazy-object-proxy[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/pathspec[${PYTHON_USEDEP}] + >=dev-python/tree-sitter-0.19.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) +" + +distutils_enable_tests setup.py + +PATCHES=( + "${FILESDIR}"/${P}-py310-update.patch +) + +src_test() { + local -x PYTHONDONTWRITEBYTECODE= + distutils-r1_src_test +} + +python_install_all() { + local DOCS=( NEWS.rst ) + [[ ${PV} == *9999 ]] || doman man/* + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Network check support" dev-python/requests + optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version +} diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest index eacbc2c1aad3..03bce3f05e0f 100644 --- a/sys-fs/lvm2/Manifest +++ b/sys-fs/lvm2/Manifest @@ -1,3 +1,3 @@ DIST LVM2.2.02.187.tgz 2405544 BLAKE2B be804be3c64927a8848e8ea8de228fb563b6f8c22628b785aabb33fc993629e5370788216bd814246aeb3a5546fd5446383ce24342e716579887556edf2bbed2 SHA512 3ce56f0c0d2e7dbcdae5be263199f73ee5c4c052599d53cde9b16500a326d0340893344f4671839be06b5b4225d592175d01c9974db14f2dc220d6e9a1d47e91 DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca -DIST LVM2.2.03.11.tgz 2528527 BLAKE2B 4c02e630e033f9bfed44468b5b8dff4af52c943cb9d6385bfe568ba50463dfc97cd968d79c34eb2528d66930d6c2895de17fe546a34d80fd17a5892560bcb670 SHA512 50f21337e397fc5b4692bb08e5d48409b907b96b39168343bab2d40bb74fd84ff466e15f3d664305bc044f3f6be4369fa7378399d5a838793632e74706f17653 +DIST LVM2.2.03.12.tgz 2594040 BLAKE2B 4e5630f27c818b79a1241b96a9d58d7078ece4a061b9bb4f26fddf77036fa2a319cc4f23835a6c784b025b3ddd07a18ce0a7ad3038fc90e90c2990d309a5d64a SHA512 e4d3bfb38b346251a2ea2cee7b79f2e12ed407652b659b35b65f58c8bb252943cee1c511713aeec8ff3400790e0e99ea6b83e8740050defe5cbb118f18bf7700 diff --git a/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch index 2b9a5dd945c5..80b6bc7a023f 100644 --- a/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch +++ b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch @@ -1,9 +1,10 @@ -From 93101699f5e1190184c00c99ab7b6e9717e5019a Mon Sep 17 00:00:00 2001 +From 4bdd215fd84e83a8119d0b971904221743a87a23 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" <robbat2@gentoo.org> Date: Wed, 24 Jul 2019 11:11:35 +0200 Subject: [PATCH] Add dynamic static ldflags Forward-ported from 2.02.178 to 2.03.05 +Forward-ported from 2.03.05 to 2.03.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> --- configure.ac | 2 ++ @@ -13,18 +14,18 @@ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 1e45c0edcb..cc2625294a 100644 +index 1a49e7fe7e..354b53b5ec 100644 --- a/configure.ac +++ b/configure.ac -@@ -33,6 +33,7 @@ case "$host_os" in - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym" +@@ -32,6 +32,7 @@ case "$host_os" in + linux*) # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" + STATIC_LDFLAGS="-Wl,--no-export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" -@@ -1758,6 +1759,7 @@ AC_SUBST(SYSCONFDIR) +@@ -1860,6 +1861,7 @@ AC_SUBST(SYSCONFDIR) AC_SUBST(SYSTEMD_LIBS) AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) @@ -33,23 +34,23 @@ index 1e45c0edcb..cc2625294a 100644 AC_SUBST(TESTSUITE_DATA) AC_SUBST(THIN) diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in -index 6bd36d0325..a3c30ec1a0 100644 +index af51198aae..f7896e581e 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in -@@ -66,7 +66,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o +@@ -76,7 +76,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o dmeventd.static: $(LIB_STATIC) dmeventd.o @echo " [CC] $@" -- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ -+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static dmeventd.o \ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) ifeq ("@PKGCONFIG@", "yes") diff --git a/make.tmpl.in b/make.tmpl.in -index f3332e91c1..1489c2afad 100644 +index 200ea2e05f..99f02e8b77 100644 --- a/make.tmpl.in +++ b/make.tmpl.in -@@ -68,6 +68,7 @@ DEFS += @DEFS@ +@@ -69,6 +69,7 @@ DEFS += @DEFS@ # FIXME set this only where it's needed, not globally? CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ LDFLAGS ?= @LDFLAGS@ @@ -58,18 +59,18 @@ index f3332e91c1..1489c2afad 100644 ELDFLAGS += @ELDFLAGS@ LDDEPS += @LDDEPS@ diff --git a/tools/Makefile.in b/tools/Makefile.in -index 2620daa17c..e5fc9c4ae4 100644 +index ec546ca632..cdede2a058 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in -@@ -136,7 +136,7 @@ man-generator: man-generator.o +@@ -137,7 +137,7 @@ man-generator: man-generator.o lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS) @echo " [CC] $@" -- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \ -+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \ - $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS) +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ + -o $@ $+ $(LVMLIBS) $(STATIC_LIBS) liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o -- -2.22.0 +2.31.1 diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch new file mode 100644 index 000000000000..5bb776c9b5ed --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch @@ -0,0 +1,25 @@ +From 4917d9c8b6227256a4a83ff937119d6aa53d654e Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" <robbat2@gentoo.org> +Date: Sun, 9 May 2021 11:02:54 +0200 +Subject: [PATCH] Add libm to static libs + +--- + make.tmpl.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/make.tmpl.in b/make.tmpl.in +index ae189546d0..8ee00bd9e8 100644 +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -64,7 +64,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile + LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) + LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) + # Extra libraries always linked with static binaries +-STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) ++STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS) + DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ +-- +2.31.1 + diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch new file mode 100644 index 000000000000..083a7327c6a6 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch @@ -0,0 +1,117 @@ +From 88aeb306dfd1e0174bf02cc208d46f0d722204dc Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" <robbat2@gentoo.org> +Date: Sun, 9 May 2021 11:00:22 +0200 +Subject: [PATCH] Use pkgconfig to detect static libs + +--- + configure.ac | 20 ++++++++++++++++++-- + make.tmpl.in | 5 ++++- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 354b53b5ec..e872d70256 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1097,6 +1097,7 @@ if test "$BLKID_WIPING" != no; then + PKG_CHECK_MODULES(BLKID, blkid >= 2.24, + [ BLKID_WIPING=yes + BLKID_PC="blkid" ++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC` + DEFAULT_USE_BLKID_WIPING=1 + AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.]) + ], [if test "$BLKID_WIPING" = maybe; then +@@ -1145,6 +1146,7 @@ AC_MSG_RESULT($UDEV_SYNC) + if test "$UDEV_SYNC" = yes; then + pkg_config_init + PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) ++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev` + AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) + + AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1, +@@ -1369,19 +1371,30 @@ dnl -- Check for selinux + if test "$SELINUX" = yes; then + AC_CHECK_LIB([sepol], [sepol_check_context], [ + AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) +- SELINUX_LIBS="-lsepol"]) ++ SEPOL_LIBS="-lsepol"]) ++ ++ dnl -- init pkgconfig if required ++ AS_IF([test x$PKGCONFIG_INIT != x1], [pkg_config_init]) ++ PKG_CHECK_MODULES(SELINUX, libselinux, [ ++ SELINUX_PC="libselinux" ++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux` ++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS" ++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) ++ ], [ ++ dnl -- old non-pkgconfig method, is buggy with static builds + + AC_CHECK_LIB([selinux], [is_selinux_enabled], [ + AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) + AC_CHECK_HEADERS([selinux/label.h]) + AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) +- SELINUX_LIBS="-lselinux $SELINUX_LIBS" ++ SELINUX_LIBS="-lselinux $SEPOL_LIBS" + SELINUX_PC="libselinux" + HAVE_SELINUX=yes ], [ + AC_MSG_WARN(Disabling selinux) + SELINUX_LIBS= + SELINUX_PC= + HAVE_SELINUX=no ]) ++ ]) + fi + + ################################################################################ +@@ -1755,6 +1768,7 @@ AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command lin + ################################################################################ + AC_SUBST(AWK) + AC_SUBST(BLKID_PC) ++AC_SUBST(BLKID_STATIC_LIBS) + AC_SUBST(BUILD_CMIRRORD) + AC_SUBST(BUILD_DMEVENTD) + AC_SUBST(BUILD_LVMDBUSD) +@@ -1857,6 +1871,7 @@ AC_SUBST(SALCK_LIBS) + AC_SUBST(SBINDIR) + AC_SUBST(SELINUX_LIBS) + AC_SUBST(SELINUX_PC) ++AC_SUBST(SELINUX_STATIC_LIBS) + AC_SUBST(SYSCONFDIR) + AC_SUBST(SYSTEMD_LIBS) + AC_SUBST(SNAPSHOTS) +@@ -1875,6 +1890,7 @@ AC_SUBST(CACHE_REPAIR_CMD) + AC_SUBST(CACHE_RESTORE_CMD) + AC_SUBST(UDEV_PC) + AC_SUBST(UDEV_RULES) ++AC_SUBST(UDEV_STATIC_LIBS) + AC_SUBST(UDEV_SYNC) + AC_SUBST(UDEV_SYSTEMD_BACKGROUND_JOBS) + AC_SUBST(UDEV_RULE_EXEC_DETECTION) +diff --git a/make.tmpl.in b/make.tmpl.in +index 99f02e8b77..ae189546d0 100644 +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -64,7 +64,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile + LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) + LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) + # Extra libraries always linked with static binaries +-STATIC_LIBS = $(PTHREAD_LIBS) ++STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) + DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ +@@ -83,10 +83,13 @@ PTHREAD_LIBS = @PTHREAD_LIBS@ + READLINE_LIBS = @READLINE_LIBS@ + EDITLINE_LIBS = @EDITLINE_LIBS@ + SELINUX_LIBS = @SELINUX_LIBS@ ++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@ + UDEV_CFLAGS = @UDEV_CFLAGS@ + UDEV_LIBS = @UDEV_LIBS@ ++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@ + BLKID_CFLAGS = @BLKID_CFLAGS@ + BLKID_LIBS = @BLKID_LIBS@ ++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@ + SYSTEMD_LIBS = @SYSTEMD_LIBS@ + VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ + USE_TRACKING = @USE_TRACKING@ +-- +2.31.1 + diff --git a/sys-fs/lvm2/lvm2-2.03.11.ebuild b/sys-fs/lvm2/lvm2-2.03.12.ebuild index d8d945f5a7d3..5a5bd509c37a 100644 --- a/sys-fs/lvm2/lvm2-2.03.11.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.12.ebuild @@ -58,10 +58,10 @@ PATCHES=( "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 #"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed - "${FILESDIR}"/${PN}-2.03.05-dynamic-static-ldflags.patch #332905 - "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid + "${FILESDIR}"/${PN}-2.03.12-dynamic-static-ldflags.patch #332905 + "${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs.patch #370217, #439414 + blkid "${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756 + "${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756 "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446 #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream "${FILESDIR}"/${PN}-2.03.05-dmeventd-no-idle-exit.patch |