X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Goalfile;h=2961971ffb4e77eb3e31f2c798099500189c4495;hb=63839acb139d5381ee4615a7f467db9521e4305a;hp=16e63e15da00d1d99a6c93a0402cfbf2592d89bf;hpb=0548903372eb2dfdc9a38835a8c8fac1a24a25e3;p=fedora-ocaml-rebuild.git diff --git a/Goalfile b/Goalfile index 16e63e1..2961971 100644 --- a/Goalfile +++ b/Goalfile @@ -3,15 +3,15 @@ let fedora-dir = "%HOME/d/fedora" let branch = "master" -let side-tag = "f32-ocaml" -#let koji = "koji" -let koji = "koji -p riscv64" -#let fedpkg = "fedpkg" -let fedpkg = "fedpkg --user-config %HOME/d/fedora-ocaml-rebuild/fedpkg-user-config" +let side-tag = "f32-build-side-18015" +let koji = "koji" +#let koji = "koji -p riscv64" +let fedpkg = "fedpkg" +#let fedpkg = "fedpkg --user-config %HOME/d/fedora-ocaml-rebuild/fedpkg-user-config" # The magic string that must appear in %changelog when the # package has been rebuilt. -let rebuild-name = "OCaml 4.09.0 for riscv64" +let rebuild-name = "OCaml 4.10.0+beta1 rebuild." # Packages that are blocked. Any dependent packages are also blocked # automatically. @@ -43,25 +43,24 @@ let ignored = [ "ocaml-srpm-macros", "ocaml", 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 + "libguestfs", "libnbd", "nbdkit", "opam", "plplot", + "virt-top", "virt-v2v", "why3", "z3", + # no OCaml code, but needs to be rebuilt after Coq + "flocq" ] -pure function get-source-packages () = { +pure function get-source-packages () returning strings = { cd %fedora-dir - echo '[' for f in ocaml* %other-packages; do - [ -f $f/%branch/$f.spec ] && echo "*built-in-koji(\"$f\")," + [ -f $f/%branch/$f.spec ] && echo "$f" done - echo ']' } -let source-packages = get-source-packages () +let source-packages = wrap ("*koji-built", 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) = { +tactic *koji-built (pkg) = { cd %fedora-dir/%pkg/%branch koji=%koji specfile=%pkg.spec @@ -107,7 +106,7 @@ tactic *built-in-koji (pkg) = { } goal rebuild (pkg) = -*built-in-koji ("%pkg") : source-dependencies (pkg) { +*koji-built ("%pkg") : wrap ("*koji-built", source-dependencies (pkg)) { cd %fedora-dir/%pkg/%branch fedpkg=%fedpkg koji=%koji @@ -120,6 +119,11 @@ goal rebuild (pkg) = $koji wait-repo %side-tag --build=$nvr done + # Make sure the local directory is up to date. + # This should also fail if there are local changes, which + # would need to be corrected/integrated by hand. + git pull + # If the specfile doesn't have the magic string then add # that now. if ! grep -sq %rebuild-name $specfile; then @@ -136,12 +140,11 @@ goal rebuild (pkg) = # 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) = @{ +pure function source-dependencies (pkg) returning strings = @{ specfile=%fedora-dir/%pkg/%branch/%pkg.spec - echo -n Dependencies of %pkg: >&2 + echo Calculating 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 @@ -152,11 +155,8 @@ pure function source-dependencies (pkg) = @{ awk '{print $1}' | grep -sq "^$r\$" then - echo "*built-in-koji(\"$p\")," - echo -n '' $p >&2 + echo "$p" fi done done - echo ']' - echo >&2 }