Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fedpkg, not rhpkg, is used when on custom git branches #4

Closed
tserlin opened this issue Jan 28, 2020 · 8 comments
Closed

fedpkg, not rhpkg, is used when on custom git branches #4

tserlin opened this issue Jan 28, 2020 · 8 comments

Comments

@tserlin
Copy link
Collaborator

tserlin commented Jan 28, 2020

I ran into a subtle error when running the "tar-changes" script for a ceph testfix.

If you're not on a regular ceph branch (e.g.: ceph-4.0-rhel-8), and using a testfix branch (e.g.: private-tserlin-ceph-4.0-rhel-8-*), the script assumes you want "fedpkg" and not "rhpkg":

https://github.com/ktdreyer/rdopkg-tar/blob/master/tar-changes#L157

When running it on RHEL 7, the "fedpkg upload" part failed because even though I did have fedpkg installed, it was trying to use a non-existent git option: git remote get-url.
Fedora's git has this option, but RHEL 7's git doesn't.

That said, the "tar-changes" did finish, and did create a dist-git commit OK, but it did not upload the *-changes tarball, nor did it update the "sources" file.

If you have an unconventional branch name, then the "osdist" function in rdopkg/guess.py will return "RDO".

tserlin added a commit that referenced this issue Mar 5, 2020
tserlin added a commit that referenced this issue Mar 5, 2020
This is a workaround to handle private git branch names like
 "private-tserlin-ceph-4.0-*".

See: #4
@tserlin
Copy link
Collaborator Author

tserlin commented Mar 6, 2020

I created a separate branch as a workaround:

https://github.com/ktdreyer/rdopkg-tar/tree/private-tserlin-rhpkg-issue-4

@ktdreyer
Copy link
Member

ktdreyer commented Mar 9, 2020

Looking at the definition for osdist() upstream, I think that we want to drop the "private-foo-" suffix before the branch name, like re.sub(r'^private-[^-]+-'). What do you think @tserlin? Would that regex match all the branches that you use?

Looks like there's no test coverage for rdopkg.guess.osdist() upstream in test_guess.py, so we should write a bunch of branch names to exercise all the cases we expect to use.

@tserlin
Copy link
Collaborator Author

tserlin commented Mar 9, 2020

Yes, "private-tserlin-" is pretty much what I only use for testfixes and hotfixes.

@ktdreyer
Copy link
Member

I've refactored the rdopkg guess.py tests, added tests for osdist(), and added this feature.

https://softwarefactory-project.io/r/#/q/status:open+project:rdopkg+branch:master+topic:guess-improvements

@ktdreyer
Copy link
Member

ktdreyer commented Jun 3, 2020

I've asked in #rdo (freenode) for someone to merge my changes above.

In the meantime, let's merge your changes that avoid guess.osdist() and guess.new_sources().

@ktdreyer
Copy link
Member

The fix is in rdopkg's master branch now, https://softwarefactory-project.io/r/18391

We need a new rdopkg release. I've requested this at softwarefactory-project/rdopkg#186 and the rdo dev list.

@ktdreyer
Copy link
Member

rdopkg 1.3.0 is in updates-testing for Fedora 33 and epel-testing for epel 8: https://bodhi.fedoraproject.org/updates/?search=rdopkg

@ktdreyer
Copy link
Member

rdopkg 1.3.0 is in Fedora and EPEL 8. I think that means that we can close this.

@ktdreyer ktdreyer closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants