let fedora-dir = "%HOME/d/fedora"
let branch = "master"
-let side-tag = "f32-build-side-999999"
+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"
# The magic string that must appear in %changelog when the
# package has been rebuilt.
-let rebuild-name = "OCaml 4.10.0 (beta 1)"
+let rebuild-name = "OCaml 4.09.0 for riscv64"
# Packages that are blocked. Any dependent packages are also blocked
# automatically.
# 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", "ocaml" ]
+let ignored = [ "ocaml-srpm-macros" ]
# All OCaml-related source package names
let other-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.
grep -sq %rebuild-name $specfile || exit 99
# Else we must check Koji itself.
+ # Koji sends some messages to stderr.
nvr=$(fedpkg verrel)
- buildinfo=$(koji buildinfo $nvr)
+ buildinfo=$($koji buildinfo $nvr 2>&1)
# No build at all, needs rebuild.
echo "$buildinfo" | grep -sq "No such build" && exit 99
exit 1 ;;
BUILDING)
# Cancel the build, we will resubmit it.
- koji cancel $taskid
+ $koji cancel $taskid
exit 99 ;;
CANCELED|DELETED)
# Do a rebuild.
goal rebuild (pkg) =
*built-in-koji ("%pkg") : source-dependencies (pkg) {
cd %fedora-dir/%pkg/%branch
+ fedpkg=%fedpkg
+ 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
+ done
+
# If the specfile doesn't have the magic string then add
# that now.
if ! grep -sq %rebuild-name $specfile; then
else
rpmdev-bumpspec -c "- Bump release and rebuild." *.spec
fi
- fedpkg commit -c
- fedpkg push
- fedpkg build
+ $fedpkg commit -c
+ $fedpkg push
+ $fedpkg build
}
# Get the source package names for a particular package.