Accepting request 1178327 from devel:tools:building

OBS-URL: https://build.opensuse.org/request/show/1178327
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/meson?expand=0&rev=111
This commit is contained in:
Ana Guerrero 2024-06-04 10:49:30 +00:00 committed by Git OBS Bridge
commit 4987679dcb
8 changed files with 32 additions and 181 deletions

View File

@ -1,139 +0,0 @@
From a3b53e3df041c5394e4fbecafc1ba5a2c2bc571b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Thu, 2 May 2024 19:20:10 +0200
Subject: [PATCH] Fix builds with Ninja 12 and remove a 5 year old workaround.
---
run_project_tests.py | 3 +--
run_tests.py | 35 ++++++++++------------------------
unittests/baseplatformtests.py | 5 +----
3 files changed, 12 insertions(+), 31 deletions(-)
diff --git a/run_project_tests.py b/run_project_tests.py
index a14741364..222e12f74 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -45,7 +45,7 @@ from mesonbuild.coredata import backendlist, version as meson_version
from mesonbuild.modules.python import PythonExternalProgram
from run_tests import (
get_fake_options, run_configure, get_meson_script, get_backend_commands,
- get_backend_args_for_dir, Backend, ensure_backend_detects_changes,
+ get_backend_args_for_dir, Backend,
guess_backend, handle_meson_skip_test,
)
@@ -720,7 +720,6 @@ def _run_test(test: TestDef,
# Touch the meson.build file to force a regenerate
def force_regenerate() -> None:
- ensure_backend_detects_changes(backend)
os.utime(str(test.path / 'meson.build'))
# just test building
diff --git a/run_tests.py b/run_tests.py
index 207653219..0b528ea22 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -39,29 +39,27 @@ from mesonbuild.mesonlib import OptionKey, setup_vsenv
if T.TYPE_CHECKING:
from mesonbuild.coredata import SharedCMDOptions
-NINJA_1_9_OR_NEWER = False
+NINJA_1_12_OR_NEWER = False
NINJA_CMD = None
# If we're on CI, detecting ninja for every subprocess unit test that we run is slow
# Optimize this by respecting $NINJA and skipping detection, then exporting it on
# first run.
try:
- NINJA_1_9_OR_NEWER = bool(int(os.environ['NINJA_1_9_OR_NEWER']))
+ NINJA_1_12_OR_NEWER = bool(int(os.environ['NINJA_1_12_OR_NEWER']))
NINJA_CMD = [os.environ['NINJA']]
except (KeyError, ValueError):
- # Look for 1.9 to see if https://github.com/ninja-build/ninja/issues/1219
- # is fixed
- NINJA_CMD = detect_ninja('1.9')
+ # Look for 1.12, which removes -w dupbuild=err
+ NINJA_CMD = detect_ninja('1.12')
if NINJA_CMD is not None:
- NINJA_1_9_OR_NEWER = True
+ NINJA_1_12_OR_NEWER = True
else:
- mlog.warning('Found ninja <1.9, tests will run slower', once=True)
NINJA_CMD = detect_ninja()
if NINJA_CMD is not None:
- os.environ['NINJA_1_9_OR_NEWER'] = str(int(NINJA_1_9_OR_NEWER))
+ os.environ['NINJA_1_12_OR_NEWER'] = str(int(NINJA_1_12_OR_NEWER))
os.environ['NINJA'] = NINJA_CMD[0]
else:
- raise RuntimeError('Could not find Ninja v1.7 or newer')
+ raise RuntimeError('Could not find Ninja')
# Emulate running meson with -X utf8 by making sure all open() calls have a
# sane encoding. This should be a python default, but PEP 540 considered it not
@@ -271,7 +269,9 @@ def get_backend_commands(backend: Backend, debug: bool = False) -> \
test_cmd = cmd + ['-target', 'RUN_TESTS']
elif backend is Backend.ninja:
global NINJA_CMD
- cmd = NINJA_CMD + ['-w', 'dupbuild=err', '-d', 'explain']
+ cmd = NINJA_CMD + ['-d', 'explain']
+ if not NINJA_1_12_OR_NEWER:
+ cmd += ['-w', 'dupbuild=err']
if debug:
cmd += ['-v']
clean_cmd = cmd + ['clean']
@@ -282,21 +282,6 @@ def get_backend_commands(backend: Backend, debug: bool = False) -> \
raise AssertionError(f'Unknown backend: {backend!r}')
return cmd, clean_cmd, test_cmd, install_cmd, uninstall_cmd
-def ensure_backend_detects_changes(backend: Backend) -> None:
- global NINJA_1_9_OR_NEWER
- if backend is not Backend.ninja:
- return
- need_workaround = False
- # We're using ninja >= 1.9 which has QuLogic's patch for sub-1s resolution
- # timestamps
- if not NINJA_1_9_OR_NEWER:
- mlog.warning('Don\'t have ninja >= 1.9, enabling timestamp resolution workaround', once=True)
- need_workaround = True
- # Increase the difference between build.ninja's timestamp and the timestamp
- # of whatever you changed: https://github.com/ninja-build/ninja/issues/371
- if need_workaround:
- time.sleep(1)
-
def run_mtest_inprocess(commandlist: T.List[str]) -> T.Tuple[int, str, str]:
out = StringIO()
with mock.patch.object(sys, 'stdout', out), mock.patch.object(sys, 'stderr', out):
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
index 6125ed933..10881abc6 100644
--- a/unittests/baseplatformtests.py
+++ b/unittests/baseplatformtests.py
@@ -28,7 +28,7 @@ import mesonbuild.modules.pkgconfig
from run_tests import (
- Backend, ensure_backend_detects_changes, get_backend_commands,
+ Backend, get_backend_commands,
get_builddir_target_args, get_meson_script, run_configure_inprocess,
run_mtest_inprocess, handle_meson_skip_test,
)
@@ -289,8 +289,6 @@ class BasePlatformTests(TestCase):
def setconf(self, arg, will_build=True):
if not isinstance(arg, list):
arg = [arg]
- if will_build:
- ensure_backend_detects_changes(self.backend)
self._run(self.mconf_command + arg + [self.builddir])
def getconf(self, optname: str):
@@ -304,7 +302,6 @@ class BasePlatformTests(TestCase):
windows_proof_rmtree(self.builddir)
def utime(self, f):
- ensure_backend_detects_changes(self.backend)
os.utime(f)
def get_compdb(self):
--
2.44.0

View File

@ -1,16 +0,0 @@
Similar to commit 67afddbf431140c1ee064bf79a2fa5a95575488e with title
"environment: Add LLVM 18 support to get_llvm_tool_names()", but with
minor version following the upstream versioning change.
Index: meson-1.4.0rc2/mesonbuild/environment.py
===================================================================
--- meson-1.4.0rc2.orig/mesonbuild/environment.py
+++ meson-1.4.0rc2/mesonbuild/environment.py
@@ -188,6 +188,7 @@ def get_llvm_tool_names(tool: str) -> T.
# unless it becomes a stable release.
suffixes = [
'', # base (no suffix)
+ '-18.1', '181',
'-18', '18',
'-17', '17',
'-16', '16',

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fd6630c25c27f1489a8a0392b311a60481a3c161aa699b330e25935b750138d
size 2224663

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmXwn5YACgkQwk5jG6ux
/nAw+w//SNYVxgDQr3fQc/my+8Dy/YE/Wtm91lLrBUkuxCqKTp282ALn9s9YrkIa
Si1qYqtx9SnfSAvquvIh0r8vF/f73s7Hs7sH87kBOq/UpwEXKnqw3m9UQgcuFuww
gbGTM4HJyN9YGKcrFLEd3Rl2ssjPrV1zdsAiBmgniak71NaBbslRCuYIw775t7X5
A134323fY+DWbU9KmhlaMQNknoMNDb6PYWl8xVjKC8lPESeFcOcKLhNntC6W3Ke0
k2wNi9vrUhqVgJgiXqD9WZ5YZO0uc43esmoVDcnNqp2cgSp60NLfd0blUk2FSa6G
XCI/HDXANcSR9P1+WIZtLXKLCUnnNiFSsuHtUZcrDwyvzU6l3yrzFn/4uXN0bUOi
E/6EYlgV695XhUHm9VbH3KxQas+0frE7D47ZkMzyTtujx+apxaLyZX2IDxOetnte
QDmdfn7IaZV7+p5Kn5Nf6m2YYng7Sr1q6BeJTZsvxIeGNd7E9iCPCxNABGQ8EE3z
wzanXEQqAr21/DiD8brjsk4+/QF7PYxIowNFR4mtak1aC/gOe2jORTZ+4JOgip9a
SPJEUd2B4TnDLapZTH2N8C/mfmTtw3cEcl0UWT/exwi1bKjPe3DkzeLtYH8qL4Up
YIlUYm5fgT/tk4MxJlhSZwU8gbPf1hGqsF8IC0r1ZU1TI+P8hDo=
=m61P
-----END PGP SIGNATURE-----

3
meson-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b8aad738a5f6ae64294cc8eaba9a82988c1c420204484ac02ef782e5bba5f49
size 2235558

16
meson-1.4.1.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEGeLW2bRtjapiiPh3wk5jG6ux/nAFAmZYwdYACgkQwk5jG6ux
/nBx1g/8Ded08Exn9jq6VTJ6z+O5ruR2776YSKpNKB9VO1uA8FSNMsQLvvTFM9Ee
vLbbOsCP+85JtqGwtHLdFELyWrhIUIX7AljMteyiq1jVqDpbksLny7W38VCtocHd
8HbWVTqHp9OrlgKW5eCVibPyUJTcvp/Tb4t7/pDcHxaLfFe2do5mR+VmootUOleM
YxCDpA7aE1H8W0ao6/bpnIzHHyU8aVcan/5vv5pZ8C1eM1IZvrK7rz2Um6lUoP+L
yj2c07oa+jqvCeWeaYJxy4g0ipiXD4jtCg3mTbhS1YtusqCh3tUJjdrte4kyOpRh
PoA2H6fci++Y1Fr+dD2DKauOLE72dZhxzIELTOTzHs08UR42kSDPXatCCMD9nqQZ
tbxCSHoC5kkXcZEazY5e3Oj7GAIMBGjukVG7dBrruhjd7uT2o9dU9yi45gY0c73e
clY4fgn3KWv3ss9WqdRwHqbgRRNeurVANMlxnLYK/bvBPEYgvlFjWihGDuMAEQ8t
lNgqpSk50ftuogLyIrqiZwfprpxeZC2/hrNahF/4QeNbHH9CVbJ/YYEmdxg9to9p
cuXku4AwsTNM+JmQBEVcfmp0lb0ANFuapFcciVw7BCFJNrTorhbL4i9IuGo5Mps/
gqfhNW791XwZHuCiNSfkLG6PJ0uwVHRHC4a6vrC4fUIPxcWEgiA=
=jyaR
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Jun 3 11:16:52 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.4.1:
+ compilers: cpp: improve libc++ vs libstdc++ detection (again).
+ compilers: cpp: reduce macro pollution for stdlib macros.
+ Fix builds with Ninja 12 and remove a 5 year old workaround.
+ rust: Fix warning_level=everything case.
+ environment: fix LLVM 18 support in get_llvm_tool_names().
- Drop get_llvm_tool_names-llvm18.patch and
compatibility-ninja-1.12.patch: fixed upstream.
-------------------------------------------------------------------
Thu May 2 16:53:21 UTC 2024 - Christoph G <foss@grueninger.de>

View File

@ -35,7 +35,7 @@
%bcond_with setuptools
%bcond_without mono
Name: meson%{name_ext}
Version: 1.4.0
Version: 1.4.1
Release: 0
Summary: Python-based build system
License: Apache-2.0
@ -50,10 +50,6 @@ Patch0: meson-test-installed-bin.patch
Patch1: extend-test-timeout-on-qemu-builds.patch
# PATCH-FIX-OPENSUSE meson-distutils.patch -- meson is ring0 and therefor setuptools is not available
Patch2: meson-distutils.patch
# PATCH-FIX-UPSTREAM get_llvm_tool_names-llvm18.patch -- Accept LLVM 18.1.
Patch3: get_llvm_tool_names-llvm18.patch
# PATCH-FIX-UPSTREAM compatibility-ninja-1.12.patch -- compatibility with Ninja 1.12, tagged for Meson 1.4.1
Patch4: compatibility-ninja-1.12.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: fdupes
@ -189,8 +185,6 @@ Vim/NeoVim.
%if !%{with setuptools}
%patch -P 2 -p1
%endif
%patch -P 3 -p1
%patch -P 4 -p1
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000
# AddressSanitizer fails here because of ulimit.