-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for openSUSE style detached changelogs #444
base: main
Are you sure you want to change the base?
Conversation
These changelog entries are created using the vc utility part of of obs-build (https://github.com/openSUSE/obs-build/blob/master/vc) and are saved in a separate .changes file. This commit creates an abstract base class ChangelogEntryBase with all properties & methods of the ChangelogEntry class and adds the child classes ChangelogEntry and SUSEChangelogEntry which implement it.
Split Changelog class into a generic abstract base class and an implementation using the ChangelogEntry list element. Implement another Child class for detached changelogs using SUSEChangelogEntry as the list element.
Build failed. ✔️ pre-commit SUCCESS in 1m 50s |
I appreciate the effort, but I don't think this should be part of |
Yes, I understand that, the problem is that in openSUSE land it has been the convention for ever and ever to have the changelog in a secondary file and not be it part of the
Yes, the openSUSE changes files follow a different format. A typical changes file entry looks like this:
In contrast to the typical rpm changelog, it always contains a time in UTC, but lacks the EVR (for practical reasons as the build service auto-rebuilds bumping the release). The build service or obs-build or rpmbuild add the changes file into the built rpm, but that happens on a binary rpm level. This doesn't really help in the context of packit. |
I would argue it should be part of packit codebase, there is literally a class called ChangelogHelper.
I see.
That shouldn't be a problem, even some Fedora/RHEL spec files don't have EVR in changelog entries. AFAICT the only difference is the line of dashes instead of an asterisk denoting the start of an entry. IMHO it would make sense to add support for that into |
To be a bit more specific, |
Ok, I'll see how far I get then. How would you recommend to handle the parsing/creation of |
Well, packit should do something similar to what Lines 479 to 551 in c0a98a8
I mean, we could also add an argument to |
Fedora packages can use changelog files too BTW (example), but they exist for preserving changelog history and are not meant to be updated. |
This PR adds some hacky support for detached/openSUSE style changes files that are inserted into the %changelog section by the open build service.
The tests are not yet all passing, as there is a discrepancy between
str(DetachedChangelog)
and respective section instr(spec)
. I'm not sure if this is caused by my (probably rather odd) approach here or whether this is even required?TODO:
packit/packit.dev
.Fixes
Related to packit/packit#2399
Merge before/after
RELEASE NOTES BEGIN
Add support for detached (open)SUSE style changelogs
RELEASE NOTES END