Allow fedpkg to be overridden, for building into different Koji profiles.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 7 Jan 2020 13:17:44 +0000 (13:17 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 7 Jan 2020 13:17:44 +0000 (13:17 +0000)
Goalfile
fedpkg-user-config [new file with mode: 0644]

index 993f087..de5d406 100644 (file)
--- a/Goalfile
+++ b/Goalfile
@@ -6,6 +6,8 @@ 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"
 
 # The magic string that must appear in %changelog when the
 # package has been rebuilt.
@@ -89,6 +91,7 @@ tactic *built-in-koji (pkg) = {
 goal rebuild (pkg) =
 *built-in-koji ("%pkg") : source-dependencies (pkg) {
     cd %fedora-dir/%pkg/%branch
+    fedpkg=%fedpkg
     koji=%koji
     specfile=%pkg.spec
 
@@ -105,15 +108,9 @@ goal rebuild (pkg) =
     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
+    $fedpkg commit -c
+    $fedpkg push
+    $fedpkg build
 }
 
 # Get the source package names for a particular package.
diff --git a/fedpkg-user-config b/fedpkg-user-config
new file mode 100644 (file)
index 0000000..6160a06
--- /dev/null
@@ -0,0 +1,2 @@
+[fedpkg]
+kojiprofile=riscv64