]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script/build-with-container: add CONFIGURE_ARGS env var to configure step 67783/head
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 13 Mar 2026 17:42:09 +0000 (13:42 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 13 Mar 2026 17:42:09 +0000 (13:42 -0400)
Add a new optional CONFIGURE_ARGS environment variable to the configure
step so that there's a mechanism to pass custom cmake options that
aren't handled elsewhere in the run-make.sh script.

Because configure is a rather fundamental build step it's probably
preferable to set this via an env file so that it persists across
rebuilds. Using an environment var here also avoids both needing to
change run-make.sh or add another CLI option to BWC which already has
too many.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/script/build-with-container.py

index c9fc99fe342911907666ba294623a4d3f310c8d6..1c23ce71d471e1648e04a88944cb6ec9f3a9ba47 100755 (executable)
@@ -813,7 +813,11 @@ def get_container(ctx):
 
 @Builder.set(Steps.CONFIGURE)
 def bc_configure(ctx):
-    """Configure the build"""
+    """Configure the build.
+
+    Use the environment variable CONFIGURE_ARGS to pass custom arguments
+    for cmake configuration if needed.
+    """
     ctx.build.wants(Steps.CONTAINER, ctx)
     ctx.build.wants(Steps.NPM_CACHE, ctx)
     cmd = _container_cmd(
@@ -821,7 +825,7 @@ def bc_configure(ctx):
         [
             "bash",
             "-c",
-            f"cd {ctx.cli.homedir} && source ./src/script/run-make.sh && has_build_dir || configure",
+            f"cd {ctx.cli.homedir} && source ./src/script/run-make.sh && has_build_dir || configure ${{CONFIGURE_ARGS}}",
         ],
     )
     with ctx.user_command():