Send error message to stderr
[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 = "f38-build-side-62208"
10
11 # The magic string that must appear in %changelog when the
12 # package has been rebuilt.
13 let fedora-rebuild-name = "Rebuild OCaml packages for F38"
14
15 # Packages that are ignored, which means they are treated as if
16 # they have been rebuilt.
17 let fedora-ignored = [
18     "ocaml-srpm-macros", "ocaml",
19
20     # These use rpmautospec and must be rebuilt by hand for now.
21     # XXX eventually need to fix stdlib/fedora.gl to deal with these
22     "ocaml-base64",
23     "ocaml-dose3",
24     "ocaml-opam-file-format",
25     "opam",
26 ]
27
28 # All OCaml-related source package names
29 let packages = [
30     "ocaml-alcotest",
31     "ocaml-ancient",
32     "ocaml-astring",
33     "ocaml-atd",
34     "ocaml-augeas",
35     "ocaml-autoconf",
36     "ocaml-base",
37     "ocaml-base64",
38     "ocaml-benchmark",
39     "ocaml-bigarray-compat",
40     "ocaml-biniou",
41     "ocaml-bin-prot",
42     "ocaml-bisect-ppx",
43     "ocaml-bos",
44     "ocaml-cairo",
45     "ocaml-calendar",
46     "ocaml-camlbz2",
47     "ocaml-camlidl",
48     "ocaml-camlimages",
49     "ocaml-camlp-streams",
50     "ocaml-camlp5",
51     "ocaml-camomile",
52     "ocaml-charinfo-width",
53     "ocaml-cil",
54     "ocaml-cinaps",
55     "ocaml-cmdliner",
56     "ocaml-compiler-libs-janestreet",
57     "ocaml-cppo",
58     "ocaml-cryptokit",
59     "ocaml-csexp",
60     "ocaml-csv",
61     "ocaml-ctypes",
62     "ocaml-cudf",
63     "ocaml-curl",
64     "ocaml-curses",
65     "ocaml-dbus",
66     "ocaml-dose3",
67     # Cyclic dependency ocaml-dune -> ocaml-pp -> ocaml-dune
68     #"ocaml-dune",
69     "ocaml-easy-format",
70     "ocaml-expat",
71     "ocaml-extlib",
72     "ocaml-facile",
73     "ocaml-fieldslib",
74     "ocaml-fileutils",
75     "ocaml-findlib",
76     "ocaml-fmt",
77     "ocaml-fpath",
78     "ocaml-gen",
79     "ocaml-gettext",
80     "ocaml-graphics",
81     "ocaml-gsl",
82     "ocamlify",
83     "ocaml-integers",
84     "ocaml-jane-street-headers",
85 #   "ocaml-jsonm", https://bugzilla.redhat.com/show_bug.cgi?id=1183825
86     "ocaml-jst-config",
87     "ocaml-lablgl",
88     "ocaml-lablgtk",
89     "ocaml-lablgtk3",
90     "ocaml-labltk",
91     "ocaml-lacaml",
92     "ocaml-lambda-term",
93     "ocaml-libvirt",
94     "ocaml-logs",
95     "ocaml-luv",
96     "ocaml-lwt",
97     "ocaml-lwt-log",
98     "ocaml-markup",
99     "ocaml-mccs",
100     "ocaml-mdx",
101     "ocaml-menhir",
102     "ocaml-merlin",
103     "ocaml-mew",
104     "ocaml-mew-vi",
105     "ocaml-migrate-parsetree",
106     "ocaml-mlgmpidl",
107     "ocaml-mlmpfr",
108     "ocaml-mmap",
109     "ocaml-mtime",
110     "ocamlmod",
111     "ocaml-mysql",
112     "ocaml-newt",
113     "ocaml-num",
114     "ocaml-obuild",
115     "ocaml-ocamlbuild",
116     "ocaml-ocamlgraph",
117     "ocaml-ocamlnet",
118     "ocaml-ocp-indent",
119     "ocaml-ocplib-endian",
120     "ocaml-ocplib-simplex",
121     "ocaml-octavius",
122     "ocaml-odoc",
123     "ocaml-odoc-parser",
124     "ocaml-omake",
125     "ocaml-opam-file-format",
126     "ocaml-ounit",
127     "ocaml-parmap",
128     "ocaml-parsexp",
129     "ocaml-pcre",
130     "ocaml-perl4caml",
131     "ocaml-postgresql",
132     "ocaml-pp",
133     "ocaml-ppx-assert",
134     "ocaml-ppx-base",
135     "ocaml-ppx-cold",
136     "ocaml-ppx-compare",
137     "ocaml-ppx-custom-printf",
138     "ocaml-ppx-derivers",
139     "ocaml-ppx-deriving",
140     "ocaml-ppx-deriving-yojson",
141     "ocaml-ppx-enumerate",
142     "ocaml-ppx-expect",
143     "ocaml-ppx-fields-conv",
144     "ocaml-ppx-hash",
145     "ocaml-ppx-here",
146     "ocaml-ppx-inline-test",
147     "ocaml-ppx-js-style",
148     "ocaml-ppx-let",
149     "ocaml-ppxlib",
150     "ocaml-ppx-optcomp",
151     "ocaml-ppx-sexp-conv",
152     "ocaml-ppx-variants-conv",
153     "ocaml-psmt2-frontend",
154     "ocaml-ptmap",
155     "ocaml-pyml",
156     "ocaml-qcheck",
157     "ocaml-qtest",
158     "ocaml-re",
159     "ocaml-react",
160     "ocaml-res",
161     "ocaml-result",
162     "ocaml-rresult",
163     "ocaml-SDL",
164     "ocaml-sedlex",
165     "ocaml-seq",
166     "ocaml-sexplib",
167     "ocaml-sexplib0",
168     "ocaml-sha",
169     "ocaml-sqlite",
170     "ocaml-ssl",
171     "ocaml-stdcompat",
172     "ocaml-stdint",
173     "ocaml-stdio",
174     "ocaml-time-now",
175     "ocaml-topkg",
176     "ocaml-tplib",
177     "ocaml-trie",
178     "ocaml-tyxml",
179     "ocaml-uutf",
180     "ocaml-variantslib",
181     "ocaml-version",
182     "ocaml-xml-light",
183     "ocaml-xmlm",
184     "ocaml-xmlrpc-light",
185     "ocaml-yojson",
186     "ocaml-zarith",
187     "ocaml-zed",
188     "ocaml-zip",
189     "ocaml-zmq",
190
191     "alt-ergo",
192     "apron",
193     "brltty",
194     "coccinelle",
195     "coq",
196     "flocq",
197     "frama-c",
198     "gappalib-coq",
199     "graphviz",
200     "haxe",
201     "hevea",
202     "hivex",
203     "laby",
204     "libguestfs",
205     "libnbd",
206     "opam",
207     "plplot",
208     "prooftree",
209     "supermin",
210     "utop",
211     "virt-top",
212     "virt-v2v",
213     "why3",
214     "z3",
215     "zenon",
216
217     # Causes a cyclic dependency between libnbd <-> nbdkit.  We need
218     # to fix this in goals itself, but in the meantime disable nbdkit
219     # and build it by hand.
220     #"nbdkit",
221 ]
222
223 # Get the list of source packages.
224 pure function get-source-packages () returning strings = {
225     cd %fedora-dir
226     for pkg in %packages; do
227         spec=$pkg/%fedora-branch/$pkg.spec
228         if [ -f $spec ]; then
229             # Check that all spec files have disabled the broken
230             # "package notes" misfeature.
231             if ! grep -sq "%%undefine _package_note_flags" $spec ; then
232                 echo "ERROR: $pkg does not %%undefine _package_note_flags" >&2
233                 exit 1
234             fi
235             # OK to rebuild this package.
236             echo "$pkg"
237         elif [ -f $pkg/%fedora-branch/dead.package ]; then
238             echo "WARNING: $pkg: is a dead package, ignored" >&2
239         else
240             echo "$pkg: package is not checked out locally" >&2
241             exit 1
242         fi
243     done
244 }
245 let fedora-source-packages = get-source-packages ()
246
247 # Main goal: Rebuild all packages in Koji.
248 goal all = : wrap ("is-koji-built", fedora-source-packages)