Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1722806 - rpmbuild ignores a changelog for certain dates
Summary: rpmbuild ignores a changelog for certain dates
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-21 11:22 UTC by Petr Pisar
Modified: 2021-05-25 15:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 15:01:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Spec file (234 bytes, text/plain)
2019-06-21 11:22 UTC, Petr Pisar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management rpm pull 1328 0 None closed Fix changelog trimming to work relative to newest existing entry (#1301) 2020-12-14 12:58:17 UTC

Description Petr Pisar 2019-06-21 11:22:31 UTC
Created attachment 1583129 [details]
Spec file

Having this chanlog in a spec file:

%changelog
* Fri Apr 21 2017 Petr Pisar <ppisar>
- A

results in a RPM package without a changelog:

$ rpmbuild -bs test.spec && rpm -q --qf '%{CHANGELOGNAME}\n' -p ../SRPMS/test-1-1.src.rpm 
Wrote: /home/petr/rpmbuild/SRPMS/test-1-1.src.rpm
(none)

It also happens for "Tue Dec 06 2016". Other dates are consumed correctly.
I use rpm-build-4.14.2.1-2.fc29.x86_64. An example spec file is attached.

Comment 1 Panu Matilainen 2019-06-24 11:27:36 UTC
That's because of this in redhat-rpm-config:

# Automatically trim changelog entries after 2 years
%_changelog_trimtime    %{lua:print(os.time() - 2 * 365 * 86400)}

It should probably log a note when trimming, silently dropping what's in this case the entire changelog does indeed seem like a bug.

Comment 2 Van de Bugger 2019-07-28 20:54:17 UTC
I faced the same problem in Fedora 30.

1. Yes, it should print a warning that log is trimmed.
2. Also, I think it would be more useful to control changelog size (e. g. keep at least last 10 records) rather than trim all the records older than two years.

Comment 3 Zbigniew Jędrzejewski-Szmek 2019-10-04 09:05:37 UTC
Normally, changelog is bumped when packages are rebuilt in public koji, so there
should be an entry with a very recent date.
But I guess it might be useful to keep always at least one changelog entry, to
avoid empty %changelog if the package is rebuilt without bumping.
But this would make a difference only in rare cases.

Comment 4 Van de Bugger 2019-10-04 21:07:02 UTC
> But this would make a difference only in rare cases.

I have faced such a rare case. I tried to rebuild a package and check built rpm with rpmlint. rpmlint printed error "E: no-changelogname-tag". It was VERY confusing, because there WAS %changelog tag in the spec file. I checked built rpm manually, rpmlint was correct: there was no log in rpm. But there was %changelog in the spec! It was VERY confusing.

I still think it is much better to control log size rather than blindly drop old log entries.

Comment 5 Emmanuel Seyman 2019-10-05 06:59:27 UTC
I ran into it when I realized I had never submitted for review in Fedora a package I had created years prior. Like Van, I was confused and turned to the Perl SIG for help, which led to this bug being filed.

My opinion:

1. Trimming a changelog to 0 entries is a bug
2. rpm should print a warning (notice?) that the log is trimmed

I use the changelog to credit patch authors and people who have suggested packaging improvements. Trimming these entries off seems rude, at the very least.

Comment 6 Panu Matilainen 2019-10-07 07:17:59 UTC
Seems to be one of those rare bugs where everybody agrees...

Chances of getting fixed in F29 at this point are close to zero though, moving to rawhide to avoid timeout.

Comment 7 Ben Cotton 2020-02-11 15:48:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 8 Fedora Update System 2020-08-31 10:36:53 UTC
FEDORA-2020-4b3beb9b1d has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4b3beb9b1d

Comment 9 Fedora Update System 2020-08-31 18:57:42 UTC
FEDORA-2020-4b3beb9b1d has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4b3beb9b1d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4b3beb9b1d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-09-25 16:39:47 UTC
FEDORA-2020-4b3beb9b1d has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Program Management 2021-04-29 15:55:52 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2021-05-25 15:01:36 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.