fedora: Move fedora_* configuration into Config module.
[goaljobs-goals.git] / config.ml
index 6b44dc9..e5550e4 100644 (file)
--- a/config.ml
+++ b/config.ml
@@ -8,6 +8,12 @@ open Printf
 (* General. *)
 let buildtmp = sprintf "%s/tmp/builds" (Sys.getenv "HOME")
 
+(* Fedora *)
+let fedora_dir = Sys.getenv "HOME" // "d/fedora"
+let fedora_repo pkg branch = fedora_dir // pkg // branch
+let fedora_specfile pkg branch =
+  sprintf "%s/%s.spec" (fedora_repo pkg branch) pkg
+
 (* libguestfs *)
 let libguestfs_query_mins = 60
 
@@ -23,21 +29,35 @@ let libguestfs_localconfigure source =
 #!/bin/bash -
 . localenv
 
+# NB: --enable-valgrind-daemon is disabled because we
+# should be checking production builds.
+
 %s \\
   --prefix /usr \\
   --disable-static \\
   --with-default-backend=libvirt \\
-  --enable-gcc-warnings \\
+  --enable-werror \\
   --enable-gtk-doc \\
-  --enable-valgrind-daemon \\
+  --disable-golang \\
   -C \\
   \"$@\"
 " configure
 
-let libguestfs_localenv = "\
+let libguestfs_localenv supermin =
+  "\
 # Parallel test runs out of resources starting qemu, unclear why.
 export SKIP_TEST_PARALLEL_MOUNT_LOCAL=1
 
 # Fails under valgrind because cpio subprocess has a memory leak.
 export SKIP_TEST_FILE_ARCHITECTURE_11=1
-"
+
+" ^
+    match supermin with
+    | None -> ""
+    | Some (supermin, supermin_helper) ->
+      sprintf "\
+# Needs a modified path to supermin binaries:
+export SUPERMIN=%s
+export SUPERMIN_HELPER=%s
+
+" supermin supermin_helper