#19 centpkg new-sources doesn't work when running in fork
Closed 2 years ago by carlwgeorge. Opened 3 years ago by opohorel.

I tried to update git-lfs package that is opted out of sync from fedora.

I forked git-lfs project in gitlab, created new branch "2.13.3"[0] and tried to upload new tar source to lookaside cache by running "centpkg new-sources...". Instead of successful upload I've got error message:

"Could not execute new_sources: Branchname: 2.13.3 is not valid"

I'm not sure if my workflow is not supported or it is a bug in centpkg.

[0]https://gitlab.com/opohorel/git-lfs/-/tree/2.13.3


https://git.centos.org/centos/centpkg/c/29dd93721c324eb751911d8c814b5a91a60be61e?branch=develop fixed some issues with the lookaside repo name. Using version 0.6.3 (which contains that commit), I can upload sources as long as I include the --release c9s flag. Without that flag the error message is pretty clear on how to fix it.

$ centpkg new-sources git-lfs-v2.13.3.tar.gz 
Could not execute new_sources: Unable to find remote branch. Use --release
If current branch has to track a remote branch, fix it with command:
    git branch -u origin/2.13.3

I am curious how Fedora works around needing that flag when doing a similar workflow there.

The error also is about strict rules on branch naming, we have the following during branch name validation:

  • c{centosversion}s
  • c{centosversion}-{projectname}
  • c{centosversion}s-sig-{projectname}-{releasename}
  • c{centosversion}-{projectname}-{releasename}

So a correct branch name would be c9s-gitlfs-something or c9s-gitlfs

I just verified in a different package that new-sources works on a fork when the branch name begins with c9s-.

I've sent a PR that ignores those rules if the origin url is not a upstream one: https://git.centos.org/centos/centpkg/pull-request/30

With centpkg-0.6.4-1.fc34.noarch I was able to clone and fork the centos-logo package, made some corrections to the source file and tried to upload a new tar.xz file using centpkg new-sources but it returns a message that cannot resolve the host:

]$ centpkg new-sources centos-logos-85.2.tar.xz 
Could not execute new_sources: (6, 'Could not resolve host: sources.stream.rdu2.redhat.com')

This is under c9s branch. Then tried to checkout to a new branch c9s-sig-artwork. I created in the forked repository on gitlab (by default only one branch named c9s exists):

]$ centpkg new-sources centos-logos-85.2.tar.xz 
Could not execute new_sources: upload() got an unexpected keyword argument 'offline'

Any suggestion?

@areguera sources.stream.rdu2.redhat.com is a Red Hat internal endpoint. Only RHEL and CentOS maintainers can upload to it. We talked outside of this ticket some more about a different workflow for centos-logos.

This issue was resolved by #30 and released in version 0.6.5.

Metadata Update from @carlwgeorge:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #30 Merged 2 years ago