00a3f57c456f76b94850c679beb43c11ebbab2fe
[fedora-ocaml-rebuild.git] / Goalfile
1 # See README.
2
3 include "fedora.gl"
4
5 let fedora-dir = "%HOME/d/fedora"
6
7 let fedora-branch = "rawhide"
8 #let fedora-branch = "f34"
9 let fedora-tag = "f40-build-side-79788"
10
11 # The magic string that must appear in %changelog when the
12 # package has been rebuilt.
13 let fedora-rebuild-name = "OCaml 5.1.1 + s390x code gen fix for Fedora 40"
14
15 # %fedora-retry-failed:
16 # If set to 1 then failed builds are retried automatically.
17 # If set to 0 then failed builds must be manually restarted.
18 # Normally you want this to be 0.
19 let fedora-retry-failed = "0"
20
21 # Packages that are ignored, which means they are treated as if
22 # they have been rebuilt.
23 let fedora-ignored = [
24     "ocaml-srpm-macros", "ocaml",
25 ]
26
27 # Include the full list of packages for either Fedora or ELN.
28 include "./fedora-packages.gl"
29 #include "./eln-packages.gl"
30
31 # Get the list of source packages.
32 pure function get-source-packages () returning strings = {
33     cd %fedora-dir
34     for pkg in %packages; do
35         spec=$pkg/%fedora-branch/$pkg.spec
36         if [ -f $spec ]; then
37             # Check that the spec file excludes i686.
38             # Only implement this check for ocaml-* packages, as the
39             # other packages are more complicated.
40             if [[ "$spec" =~ ^ocaml ]] &&
41                ! rpmspec -P $spec | grep -sq 'ExcludeArch:.*i386' ; then
42                 echo "ERROR: $pkg does not ExcludeArch: %%{ix86}" >&2
43                 exit 1
44             fi
45             # OK to rebuild this package.
46             echo "$pkg"
47         elif [ -f $pkg/%fedora-branch/dead.package ]; then
48             echo "WARNING: $pkg: is a dead package, ignored" >&2
49         else
50             echo "ERROR: $pkg: package is not checked out locally" >&2
51             # This does NOT exit the script, why???
52             exit 1
53         fi
54     done
55 }
56 let fedora-source-packages = get-source-packages ()
57
58 # Main goal: Rebuild all packages in Koji.
59 goal all = : wrap ("is-koji-built", fedora-source-packages)