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
Allow to keep a minimum number of changelog entries #931
Conversation
because some tools and workflows break when _changelog_trimtime dropped all entries. This also helps reproducible builds because %source_date_epoch_from_changelog can only work when there is an entry left
|
Nothing against the functionality. |
|
EDIT: Ignore me, I'm dumb here, that's not what this patch does. |
|
Yes, we have It is only applied to binary packages, i.e. the source rpm still has the complete changelog. |
|
Okay, there are multiple intertwined things here. %source_date_epoch_from_changelog must work regardless of any trimming options, as long as there is a %changelog in the spec. And then there's the overall sanity need for keeping N changelog entries even if they're older than some cut-off date. I also agree with Suse here in that trimming the changelog in the binary packages is what is interesting, and perhaps src.rpm changelog should simply be left alone at all times. Doing that would actually simplify things somewhat:
|
|
@pmatilai That makes sense to me. Though I could easily see people wanting the source package changelog header being trimmed too, since the full changelog is also present in the spec file. Perhaps a tunable to switch the behavior, and default to only trimming binary package changelogs? |
|
The thing is, there's preciously little saved anything for truncating src.rpm changelogs. Unlike binaries, they aren't getting downloaded over and over on each update people make, and don't occupy space in everytbodys rpmdb, and multiple times at that - with everybody going to smaller and smaller sub-packages, it gets more and more ridiculous. |
|
I guess so... I was mainly thinking of the time it takes to generate repodata, as having long changelogs adds a fair bit to the |
|
A few more lines of text data per package is not going to kill repodata generation speed. Again, this is all different in the land of binaries where it all multiplies through the roof: take rpm package in Fedora, there are 16 sub-packages in total, and with the exception of -apidocs and -cron, all get a -debuginfo package to go with it. Add to that -debugsource package and you have 31 duplicates of the changelog data. THAT will start hurting performance, disk-space consumption and all. |
|
It'd be considerably saner to split changelogs into meta-packages that all the sub-packages depend on... |
|
Fair point. Okay, I'm convinced that we should change that to just affect binary packages... |
|
Addressed in a slightly different way in #1328: always trim using age relative to newest changelog entry (nice idea by @ffesti ). This way we don't need multiple variables to manage the trimming, at least one entry is always preserved, the time doesn't need constant adjustment, and the output is reproducable (when |
|
With #1328 merged I am not sure if we really want to add another feature to control changelog behaviour right now. Closing. |
Allow to keep a minimum number of changelog entries
because some tools and workflows break when
%_changelog_trimtimedropped all entries.
This also helps reproducible builds because
%source_date_epoch_from_changelogcan only work when there is anentry left
Note: test looks good. e.g. mtimes get adjusted again with
%clamp_mtime_to_source_date_epoch Y