From da7468acafca0521b9f2cabf59f1b8baffb6ca11 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 2 Jul 2026 15:09:55 +0200 Subject: [PATCH 1/2] Add mechanism for specifying configure options per branch --- master/custom/factories.py | 10 +++++++- master/custom/workers.py | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index eb8cb166..3119dab6 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -119,6 +119,7 @@ def setup(self, branch, worker, test_with_PTY=False, **kwargs): oot_kwargs = {} configure_cmd = [configure_cmd, "--prefix", "$(PWD)/target"] configure_cmd += self.configureFlags + configure_cmd += worker.get_configure_flags(branch) self.addStep( Configure(command=configure_cmd, **oot_kwargs) ) @@ -225,6 +226,7 @@ def setup(self, branch, worker, test_with_PTY=False, **kwargs): Configure( command=["./configure", "--prefix", "$(PWD)/target"] + self.configureFlags + + worker.get_configure_flags(branch) ) ) @@ -819,6 +821,7 @@ def setup(self, branch, worker, test_with_PTY=False, **kwargs): configure_cmd = list(self.host_configure_cmd) configure_cmd += ["--prefix", "$(PWD)/target/host"] configure_cmd += self.configureFlags + self.extra_configure_flags + configure_cmd += worker.get_configure_flags(branch) configure_cmd += [util.Interpolate("--build=%(prop:build_triple)s")] configure_cmd += [f"--host={self.host}"] configure_cmd += ["--with-build-python=../build/python"] @@ -1142,6 +1145,7 @@ def py313_setup(self, branch, worker, test_with_PTY=False, **kwargs): configure_cmd = list(self.host_configure_cmd) configure_cmd += self.configureFlags configure_cmd += self.extra_configure_flags + configure_cmd += worker.get_configure_flags(branch) configure_cmd += [ f"--with-openssl={support_path}/openssl", f"--build={self.arch}-apple-darwin", @@ -1365,7 +1369,11 @@ class ValgrindBuild(UnixBuild): def setup(self, branch, worker, **kwargs): self.addStep( Configure( - command=["./configure", "--prefix", "$(PWD)/target"] + self.configureFlags + command=( + ["./configure", "--prefix", "$(PWD)/target"] + + self.configureFlags + + worker.get_configure_flags(branch) + ) ) ) diff --git a/master/custom/workers.py b/master/custom/workers.py index 806cff61..e0ac0a8a 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -26,6 +26,44 @@ KEEPALIVE = 60 +class BranchConfigureFlags: + def __init__( + self, + flags, + *, + branches=None, + min_branch=None, + max_branch=None, + ): + if isinstance(flags, str): + self.flags = (flags,) + else: + self.flags = tuple(flags) + if isinstance(branches, str): + self.branches = (branches,) + elif branches is not None: + self.branches = tuple(branches) + else: + self.branches = None + self.min_branch = min_branch + self.max_branch = max_branch + + def applies_to(self, branch): + if self.branches is not None and branch.name not in self.branches: + return False + + if self.min_branch is None and self.max_branch is None: + return True + + if branch.version_tuple is None: + return False + if self.min_branch is not None and branch.version_tuple < self.min_branch: + return False + if self.max_branch is not None and branch.version_tuple > self.max_branch: + return False + return True + + class CPythonWorker: def __init__( self, @@ -34,6 +72,7 @@ def __init__( tags=None, branches=None, not_branches=None, + configure_flags=(), parallel_builders=1, parallel_tests=None, timeout_factor=1, @@ -45,6 +84,7 @@ def __init__( self.tags = tags or set() self.branches = branches self.not_branches = not_branches + self.configure_flags = tuple(configure_flags) self.parallel_tests = parallel_tests self.timeout_factor = timeout_factor self.exclude_test_resources = exclude_test_resources or [] @@ -68,6 +108,14 @@ def __init__( max_builds=parallel_builders, ) + def get_configure_flags(self, branch): + configure_flags = [] + for configure_flag in self.configure_flags: + if configure_flag.applies_to(branch): + configure_flags.extend(configure_flag.flags) + return configure_flags + + # Some of Itamar's workers are reprovisioned every Wednesday at 9am PT. # Builds scheduled between 8am - 10am PT on Wednesdays will be delayed to # 10am PT. From 547f238df64885e2185a5897665dc621bec3681f Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 2 Jul 2026 15:10:15 +0200 Subject: [PATCH 2/2] Add --with-dtrace to the cstratak workers on 3.15+ --- master/custom/workers.py | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/master/custom/workers.py b/master/custom/workers.py index e0ac0a8a..6f68d035 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -149,11 +149,17 @@ def get_workers(settings): cpw( name="cstratak-fedora-rawhide-x86_64", tags=['linux', 'unix', 'fedora', 'amd64', 'x86-64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, ), cpw( name="cstratak-fedora-stable-x86_64", tags=['linux', 'unix', 'fedora', 'amd64', 'x86-64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, ), cpw( @@ -172,11 +178,17 @@ def get_workers(settings): cpw( name="cstratak-CentOS9-x86_64", tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=6, ), cpw( name="cstratak-CentOS9-fips-x86_64", tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64', 'fips'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=6, # Only 3.12+ for FIPS builder not_branches=["3.10", "3.11"], @@ -184,12 +196,18 @@ def get_workers(settings): cpw( name="cstratak-fedora-rawhide-ppc64le", tags=['linux', 'unix', 'fedora', 'ppc64le'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, timeout_factor=2, # Increase the timeout on this slow worker ), cpw( name="cstratak-fedora-stable-ppc64le", tags=['linux', 'unix', 'fedora', 'ppc64le'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, timeout_factor=2, # Increase the timeout on this slow worker ), @@ -203,17 +221,26 @@ def get_workers(settings): cpw( name="cstratak-CentOS9-ppc64le", tags=['linux', 'unix', 'rhel', 'ppc64le'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, timeout_factor=2, # Increase the timeout on this slow worker ), cpw( name="cstratak-fedora-rawhide-aarch64", tags=['linux', 'unix', 'fedora', 'arm', 'arm64', 'aarch64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=32, ), cpw( name="cstratak-fedora-stable-aarch64", tags=['linux', 'unix', 'fedora', 'arm', 'arm64', 'aarch64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=32, ), cpw( @@ -225,11 +252,17 @@ def get_workers(settings): cpw( name="cstratak-CentOS9-aarch64", tags=['linux', 'unix', 'rhel', 'arm', 'arm64', 'aarch64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=32, ), cpw( name="cstratak-CentOS10-aarch64", tags=['linux', 'unix', 'rhel', 'arm', 'arm64', 'aarch64'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=32, ), cpw( @@ -248,11 +281,17 @@ def get_workers(settings): cpw( name="cstratak-fedora-rawhide-s390x", tags=['linux', 'unix', 'fedora', 's390x'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, ), cpw( name="cstratak-fedora-stable-s390x", tags=['linux', 'unix', 'fedora', 's390x'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, ), cpw( @@ -264,6 +303,9 @@ def get_workers(settings): cpw( name="cstratak-rhel9-s390x", tags=['linux', 'unix', 'rhel', 's390x'], + configure_flags=[ + BranchConfigureFlags("--with-dtrace", min_branch=(3, 15)), + ], parallel_tests=10, ), cpw(