diff --git a/meson.changes b/meson.changes index d0a937a..ed3da27 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Aug 29 19:08:13 UTC 2020 - Callum Farmer + +- Add pr7648-fix-lchmod-check-for-glibc-2.32.patch: + fixes meson-test with glibc 2.32 (gh#mesonbuild/meson#7648) + ------------------------------------------------------------------- Mon Aug 17 09:45:41 UTC 2020 - Dominique Leuenberger diff --git a/meson.spec b/meson.spec index 53219e2..699aa5e 100644 --- a/meson.spec +++ b/meson.spec @@ -43,6 +43,8 @@ Patch0: meson-suse-ify-macros.patch Patch1: meson-test-installed-bin.patch # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools Patch2: meson-distutils.patch +# PATCH-FIX-UPSTREAM pr7648-fix-lchmod-check-for-glibc-2.32.patch gh#mesonbuild/meson#7648 +Patch3: pr7648-fix-lchmod-check-for-glibc-2.32.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -162,6 +164,7 @@ This package provides support for meson.build files in Vim. %if !%{with setuptools} %patch2 -p1 %endif +%patch3 -p1 # We do not have gmock available at this moment - can't run the test suite for it rm -r "test cases/frameworks/3 gmock" \ diff --git a/pr7648-fix-lchmod-check-for-glibc-2.32.patch b/pr7648-fix-lchmod-check-for-glibc-2.32.patch new file mode 100644 index 0000000..5c76940 --- /dev/null +++ b/pr7648-fix-lchmod-check-for-glibc-2.32.patch @@ -0,0 +1,70 @@ +From 4182ba04775b460ab5a7404f7eaeebe7af0573c9 Mon Sep 17 00:00:00 2001 +From: Daniel Mensinger +Date: Wed, 26 Aug 2020 17:46:35 +0200 +Subject: [PATCH 1/2] tests: fix lchmod check for glibc >= 2.32 (fixes #6784) + +--- + test cases/common/39 has function/meson.build | 20 +++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/test cases/common/39 has function/meson.build b/test cases/common/39 has function/meson.build +index 16f43c4975..26f13d6faa 100644 +--- a/test cases/common/39 has function/meson.build ++++ b/test cases/common/39 has function/meson.build +@@ -54,15 +54,23 @@ foreach cc : compilers + args : unit_test_args), + 'couldn\'t detect "poll" when defined by a header') + lchmod_prefix = '#include \n#include ' ++ has_lchmod = cc.has_function('lchmod', prefix : lchmod_prefix, args : unit_test_args) ++ + if host_system == 'linux' +- assert (not cc.has_function('lchmod', prefix : lchmod_prefix, +- args : unit_test_args), +- '"lchmod" check should have failed') ++ glibc_major = cc.get_define('__GLIBC__', prefix: '#include ', args: unit_test_args) ++ glibc_minor = cc.get_define('__GLIBC_MINOR__', prefix: '#include ', args: unit_test_args) ++ glibc_vers = '@0@.@1@'.format(glibc_major, glibc_minor) ++ message('GLIBC vetsion:', glibc_vers) ++ ++ # lchmod was implemented in glibc 2.32 (https://sourceware.org/pipermail/libc-announce/2020/000029.html) ++ if glibc_vers.version_compare('<2.32') ++ assert (not has_lchmod, '"lchmod" check should have failed') ++ else ++ assert (has_lchmod, '"lchmod" check should have succeeded') ++ endif + else + # macOS and *BSD have lchmod +- assert (cc.has_function('lchmod', prefix : lchmod_prefix, +- args : unit_test_args), +- '"lchmod" check should have succeeded') ++ assert (has_lchmod, '"lchmod" check should have succeeded') + endif + # Check that built-ins are found properly both with and without headers + assert(cc.has_function('alloca', args : unit_test_args), + +From 3062fc4251acb440870ba5199780d65a81a5b658 Mon Sep 17 00:00:00 2001 +From: Daniel Mensinger +Date: Wed, 26 Aug 2020 17:47:16 +0200 +Subject: [PATCH 2/2] tests: update .gitignore + +--- + .../157 wrap file should not failed/subprojects/.gitignore | 1 + + test cases/unit/79 user options for subproject/.gitignore | 1 + + 2 files changed, 2 insertions(+) + create mode 100644 test cases/unit/79 user options for subproject/.gitignore + +diff --git a/test cases/common/157 wrap file should not failed/subprojects/.gitignore b/test cases/common/157 wrap file should not failed/subprojects/.gitignore +index 5550e2e0da..aabded6b26 100644 +--- a/test cases/common/157 wrap file should not failed/subprojects/.gitignore ++++ b/test cases/common/157 wrap file should not failed/subprojects/.gitignore +@@ -1,2 +1,3 @@ + /foo-1.0 + /bar-1.0 ++/foo-1.0-patchdir +diff --git a/test cases/unit/79 user options for subproject/.gitignore b/test cases/unit/79 user options for subproject/.gitignore +new file mode 100644 +index 0000000000..0bec5eac13 +--- /dev/null ++++ b/test cases/unit/79 user options for subproject/.gitignore +@@ -0,0 +1 @@ ++/subprojects