X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Goalfile;h=df014e160b695a071c6089ce54fefdd43c906499;hb=8b3481d3cb1bd8df2f82b99a8f84950a3d140402;hp=993f087d6406bbd4c32b30cb2ddc79dba47a508e;hpb=e5e3e316687b80d9b5c2ecd49a7093873e5903d4;p=fedora-ocaml-rebuild.git diff --git a/Goalfile b/Goalfile index 993f087..df014e1 100644 --- a/Goalfile +++ b/Goalfile @@ -1,146 +1,218 @@ # See README. +include "fedora.gl" + let fedora-dir = "%HOME/d/fedora" -let branch = "master" -let side-tag = "f32-ocaml" -#let koji = "koji" -let koji = "koji -p riscv64" +#let fedora-branch = "master" +let fedora-branch = "f33" +let fedora-tag = "f33-build-side-29131" # The magic string that must appear in %changelog when the # package has been rebuilt. -let rebuild-name = "OCaml 4.09.0 for riscv64" - -# Packages that are blocked. Any dependent packages are also blocked -# automatically. -let blocked = [ "ocaml-camlp4" ] +let fedora-rebuild-name = "OCaml 4.11.1 rebuild" # Packages that are ignored, which means they are treated as if # they have been rebuilt. -#let ignored = [ "ocaml-srpm-macros", "ocaml" ] -let ignored = [ "ocaml-srpm-macros" ] +let fedora-ignored = [ + "ocaml-srpm-macros", "ocaml", +] # All OCaml-related source package names -let other-packages = [ - "alt-ergo", "apron", "brltty", "coccinelle", "coq", - "frama-c", "gappalib-coq", "graphviz", "hevea", "hivex", - "libguestfs", "opam", "plplot", "virt-top", "virt-v2v", - "why3", "z3", - "flocq" # no OCaml code, but needs to be rebuilt after Coq +let packages = [ + "ocaml-alcotest", + "ocaml-ancient", + "ocaml-astring", + "ocaml-augeas", + "ocaml-autoconf", + "ocaml-base", + "ocaml-base64", + "ocaml-benchmark", + "ocaml-bigarray-compat", + "ocaml-biniou", + "ocaml-bin-prot", + "ocaml-bisect-ppx", + "ocaml-cairo", + "ocaml-calendar", + "ocaml-camlidl", + "ocaml-camlimages", + "ocaml-camlp5", + "ocaml-camomile", + "ocaml-charinfo-width", + "ocaml-cil", + "ocaml-cinaps", + "ocaml-cmdliner", + "ocaml-compiler-libs-janestreet", + "ocaml-cppo", + "ocaml-cryptokit", + "ocaml-csexp", + "ocaml-csv", + "ocaml-ctypes", + "ocaml-cudf", + "ocaml-curl", + "ocaml-curses", + "ocaml-dbus", + "ocaml-dose3", + "ocaml-dune", + "ocaml-easy-format", + "ocaml-expat", + "ocaml-extlib", + "ocaml-facile", + "ocaml-fieldslib", + "ocaml-fileutils", + "ocaml-findlib", + "ocaml-fmt", + "ocaml-fpath", + "ocaml-gen", + "ocaml-gettext", + "ocaml-graphics", + "ocaml-gsl", + "ocamlify", + "ocaml-integers", + "ocaml-jane-street-headers", +# "ocaml-jsonm", https://bugzilla.redhat.com/show_bug.cgi?id=1183825 + "ocaml-jst-config", + "ocaml-lablgl", + "ocaml-lablgtk", + "ocaml-lablgtk3", + "ocaml-labltk", + "ocaml-lacaml", + "ocaml-lambda-term", + "ocaml-libvirt", + "ocaml-luv", + "ocaml-lwt", + "ocaml-lwt-log", + "ocaml-markup", + "ocaml-mccs", + "ocaml-menhir", + "ocaml-merlin", + "ocaml-mew", + "ocaml-mew-vi", + "ocaml-migrate-parsetree", + "ocaml-mlgmpidl", + "ocaml-mlmpfr", + "ocaml-mmap", + "ocamlmod", + "ocaml-mysql", + "ocaml-newt", + "ocaml-num", + "ocaml-oasis", + "ocaml-obuild", + "ocaml-ocamlbuild", + "ocaml-ocamlgraph", + "ocaml-ocamlnet", + "ocaml-ocp-indent", + "ocaml-ocplib-endian", + "ocaml-ocplib-simplex", + "ocaml-octavius", + "ocaml-odoc", + "ocaml-omake", + "ocaml-opam-file-format", + "ocaml-ounit", + "ocaml-parsexp", + "ocaml-pcre", + "ocaml-perl4caml", + "ocaml-postgresql", + "ocaml-ppx-assert", + "ocaml-ppx-base", + "ocaml-ppx-cold", + "ocaml-ppx-compare", + "ocaml-ppx-custom-printf", + "ocaml-ppx-derivers", + "ocaml-ppx-deriving", + "ocaml-ppx-deriving-yojson", + "ocaml-ppx-enumerate", + "ocaml-ppx-fields-conv", + "ocaml-ppxfind", + "ocaml-ppx-hash", + "ocaml-ppx-here", + "ocaml-ppx-inline-test", + "ocaml-ppx-js-style", + "ocaml-ppxlib", + "ocaml-ppx-optcomp", + "ocaml-ppx-sexp-conv", + "ocaml-ppx-tools", + "ocaml-ppx-tools-versioned", + "ocaml-ppx-variants-conv", + "ocaml-psmt2-frontend", + "ocaml-ptmap", + "ocaml-qcheck", + "ocaml-qtest", + "ocaml-re", + "ocaml-react", + "ocaml-res", + "ocaml-result", + "ocaml-rope", + "ocaml-SDL", + "ocaml-sedlex", + "ocaml-seq", + "ocaml-sexplib", + "ocaml-sexplib0", + "ocaml-sha", + "ocaml-sqlite", + "ocaml-ssl", + "ocaml-stdint", + "ocaml-stdio", + "ocaml-time-now", + "ocaml-topkg", + "ocaml-tplib", + "ocaml-trie", + "ocaml-tyxml", + "ocaml-uuidm", + "ocaml-uutf", + "ocaml-variantslib", + "ocaml-xml-light", + "ocaml-xmlm", + "ocaml-xmlrpc-light", + "ocaml-yojson", + "ocaml-zarith", + "ocaml-zed", + "ocaml-zip", + "ocaml-zmq", + + "alt-ergo", + "apron", + "brltty", + "coccinelle", + "coq", + "flocq", + "frama-c", + #"gappalib-coq", + "graphviz", + "haxe", + "hevea", + "hivex", + "laby", + "libguestfs", + "libnbd", + "opam", + "plplot", + "prooftree", + "utop", + "virt-top", + "virt-v2v", + "why3", + "z3", + "zenon", + + # Causes a cyclic dependency between libnbd <-> nbdkit. We need + # to fix this in goals itself, but in the meantime disable nbdkit + # and build it by hand. + #"nbdkit", ] -pure function get-source-packages () = { - cd %fedora-dir - echo '[' - for f in ocaml* %other-packages; do - [ -f $f/%branch/$f.spec ] && echo "*built-in-koji(\"$f\")," - done - echo ']' -} -let source-packages = get-source-packages () - -# Main goal: Rebuild all packages. -goal all = : source-packages ; - -# Check if the source package has been built in Koji. -tactic *built-in-koji (pkg) = { - cd %fedora-dir/%pkg/%branch - koji=%koji - specfile=%pkg.spec - - # Packages which are ignored are treated as if they were rebuilt already. - for p in %ignored; do - if [ %pkg = "$p" ]; then exit 0; fi - done - - # If the specfile doesn't have the magic string then the - # package definitely needs to be rebuilt. - grep -sq %rebuild-name $specfile || exit 99 - - # Else we must check Koji itself. - nvr=$(fedpkg verrel) - buildinfo=$($koji buildinfo $nvr) - # No build at all, needs rebuild. - echo "$buildinfo" | grep -sq "No such build" && exit 99 - - # Exists a build, find out what state it is in. - state=$(echo "$buildinfo" | grep ^State: | awk '{print $2}') - taskid=$(echo "$buildinfo" | grep ^Task: | awk '{print $2}') - - case "$state" in - COMPLETE) - # Complete so we don't need to rebuild. - exit 0 ;; - FAILED) - # Failed builds must be examined and fixed manually. - exit 1 ;; - BUILDING) - # Cancel the build, we will resubmit it. - $koji cancel $taskid - exit 99 ;; - CANCELED|DELETED) - # Do a rebuild. - exit 99 ;; - esac - # Don't know what happened there, so fail. - exit 1 -} - -goal rebuild (pkg) = -*built-in-koji ("%pkg") : source-dependencies (pkg) { - cd %fedora-dir/%pkg/%branch - koji=%koji - specfile=%pkg.spec - - # We have to wait for the dependencies to become available - # before we can start the new build. - for p in $($koji latest-build %< | awk '{print $1}'); do - $koji --quiet wait-repo side-tag +pure function get-source-packages () returning strings = { + cd %fedora-dir + for f in %packages; do + if [ -f $f/%fedora-branch/$f.spec ]; then + echo "$f" + else + echo "$f: package is not checked out locally" >&2 + exit 1 + fi done - - # If the specfile doesn't have the magic string then add - # that now. - if ! grep -sq %rebuild-name $specfile; then - rpmdev-bumpspec -c "- "%rebuild-name *.spec - else - rpmdev-bumpspec -c "- Bump release and rebuild." *.spec - fi - fedpkg commit -c - fedpkg push - if [ "$koji" = "koji" ]; then - fedpkg build - else - hash=$(git rev-parse HEAD) - $koji build "git+https://src.fedoraproject.org/rpms/"%pkg".git#$hash" %side-tag - fi - exit 1 } +let fedora-source-packages = get-source-packages () -# Get the source package names for a particular package. -# Note this is not merely the BuildRequires, since those are -# the binary packages. Also this will only find packages -# which are in the list of source-packages. -pure function source-dependencies (pkg) = @{ - specfile=%fedora-dir/%pkg/%branch/%pkg.spec - - echo -n Dependencies of %pkg: >&2 - - echo '[' - for r in $(rpmspec -q --buildrequires $specfile 2>/dev/null | - awk '{print $1}'); do - # Now we examine each *other* source package to see - # if any will create this dependency when they build. - for p in %source-packages; do - if [ "$p" != %pkg ] && \ - rpmspec -q --provides %fedora-dir/$p/%branch/$p.spec 2>/dev/null | - awk '{print $1}' | - grep -sq "^$r\$" - then - echo "*built-in-koji(\"$p\")," - echo -n '' $p >&2 - fi - done - done - echo ']' - echo >&2 -} +# Main goal: Rebuild all packages in Koji. +goal all = : wrap ("is-koji-built", fedora-source-packages)