fedora: Move fedora_* configuration into Config module.
[goaljobs-goals.git] / config.ml
1 (* This contains lots of configuration specifics which are
2  * unlikely to be useful unless you are me ...
3  *)
4
5 open Goaljobs
6 open Printf
7
8 (* General. *)
9 let buildtmp = sprintf "%s/tmp/builds" (Sys.getenv "HOME")
10
11 (* Fedora *)
12 let fedora_dir = Sys.getenv "HOME" // "d/fedora"
13 let fedora_repo pkg branch = fedora_dir // pkg // branch
14 let fedora_specfile pkg branch =
15   sprintf "%s/%s.spec" (fedora_repo pkg branch) pkg
16
17 (* libguestfs *)
18 let libguestfs_query_mins = 60
19
20 let libguestfs_website_repo =
21   sprintf "%s/d/websites/libguestfs" (Sys.getenv "HOME")
22
23 let libguestfs_localconfigure source =
24   let configure =
25     match source with
26       `Git -> "./autogen.sh"
27     | `Tarball -> "./configure" in
28   sprintf "\
29 #!/bin/bash -
30 . localenv
31
32 # NB: --enable-valgrind-daemon is disabled because we
33 # should be checking production builds.
34
35 %s \\
36   --prefix /usr \\
37   --disable-static \\
38   --with-default-backend=libvirt \\
39   --enable-werror \\
40   --enable-gtk-doc \\
41   --disable-golang \\
42   -C \\
43   \"$@\"
44 " configure
45
46 let libguestfs_localenv supermin =
47   "\
48 # Parallel test runs out of resources starting qemu, unclear why.
49 export SKIP_TEST_PARALLEL_MOUNT_LOCAL=1
50
51 # Fails under valgrind because cpio subprocess has a memory leak.
52 export SKIP_TEST_FILE_ARCHITECTURE_11=1
53
54 " ^
55     match supermin with
56     | None -> ""
57     | Some (supermin, supermin_helper) ->
58       sprintf "\
59 # Needs a modified path to supermin binaries:
60 export SUPERMIN=%s
61 export SUPERMIN_HELPER=%s
62
63 " supermin supermin_helper