#48 Use anonymous fedpkg clone
Closed 2 years ago by decathorpe. Opened 2 years ago by cipherboy.
cipherboy/stewardship-sig anonymous-fedpkg-clone  into  master

file modified
+1 -1
@@ -96,7 +96,7 @@ 

  def build_package(copr: str, package: str, branch: str = "master", wait: bool = False):

      def clone():

          result = sp.run(

-             ["fedpkg", "clone", package],

+             ["fedpkg", "clone", "--anonymous", package],

              stdout=sp.PIPE,

              stderr=sp.STDOUT)

  

When the local username doesn't match the individual's FAS ID, fedpkg clone will fail. However, we don't really need to clone with permissions, since we're not modifying these packages and we're going to end up deleting the cloned copy anyways. Use an anonymous checkout instead.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>

I've changed the code to download the last .src.rpm file from the fedora rawhide repos instead of regenerating it on-the-fly. This makes fedpkg clone unnecessary. Thanks for the suggestion though :)

Pull-Request has been closed by decathorpe

2 years ago

I've changed the code to download the last .src.rpm file from the fedora rawhide repos instead of regenerating it on-the-fly.

That has other implications. We should care if what's in git builds, not if latest build builds.

However, I've learnt that you don't have to download/generate and upload SRPM at all. Try this:

$ copr add-package-scm --clone-url https://src.fedoraproject.org/rpms/<pkgname>.git --name <pkgname> --webhook-rebuild off --commit master <copr>
$ copr build-package --nowait --name <pkgname> <copr>

@churchyard actually, doing it this way solves more issues that I've had to work around previously:

  • packages that were retired since the last compose don't mess things up
  • committed but unbuilt changes don't screw things up
  • packages with broken dist-git repos don't break the script

We can introduce building things from git back as an optional mode of operation, but I think using the last known SRPM is a more sane default.

Metadata