#104 Local rpmautospec-rpm-macros put locale specific dates o %changelog
Closed: Fixed 2 years ago by nphilipp. Opened 4 years ago by churchyard.

My auotomatic changelog is evaluated to:

%changelog
* Pá dub 10 2020 John Doe <packager@example.com> - 0.2.2-1.fc32
- local build

The date would better be in English.


This still happens with fedpkg:

[rust-ammonia (rawhide)]$ export LANG=C.utf-8
[rust-ammonia (rawhide)]$ fedpkg srpm


setting SOURCE_DATE_EPOCH=1626652800
Wrote: /home/churchyard/rpmbuild/fedora-scm/rust-ammonia/rust-ammonia-3.1.2-2.fc35.src.rpm
[rust-ammonia (rawhide)]$ rpm -q --changelog rust-ammonia-3.1.2-2.fc35.src.rpm
* Mon Jul 19 2021 Miro Hrončok <miro@hroncok.cz> 3.1.2-2
- test

* Thu Jul 08 2021 Fabio Valentini <decathorpe@gmail.com> 3.1.2-1
- Update to version 3.1.2; Fixes RHBZ#1980546
...

[rust-ammonia (rawhide)]$ export LANG=cs_CZ.utf-8
[rust-ammonia (rawhide)]$ fedpkg srpm


chyba: špatný datum v %changelog: Po čec 19 2021 Miro Hrončok <miro@hroncok.cz> 3.1.2-2
Zapsáno: /home/churchyard/rpmbuild/fedora-scm/rust-ammonia/rust-ammonia-3.1.2-2.fc35.src.rpm
[rust-ammonia (rawhide)]$ rpm -q --changelog rust-ammonia-3.1.2-2.fc35.src.rpm
(empty)

"chyba: špatný datum" means "error: wrong date".

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

2 years ago

Could you please take a look at this? It is a very annoying thing.

Sorry, didn't get around to working on rpmautospec much lately…

Considering that fedpkg srpm doesn't use the locally installed macro, the previous fix won't help here – this needs to be done in the Python code which preprocesses the spec file.

Metadata Update from @nphilipp:
- Issue assigned to nphilipp

2 years ago

Metadata Update from @nphilipp:
- Issue set to the milestone: So you call this production ready?

2 years ago

alias fedpkg="LANG=C fedpkg" works, of course. But fedpkg should distinguish between (localized) user facing output and hopefully invariant srpms and such which it produces.

rpmlint complains about these non-existing dates.

To add to the confusion, rpm --changelog apparantly converts the dates to LANG (or rather the resulting LC_TIME) when it produces user facing output, which is arguably "correct" but not the verbatim content of the changelog in the rpm/spec. I.e., spec dates are really "date data" used as a locale-independent base for formatting locale-dependent output.

Heh, it looks like rpmautospec generate-changelog on its own does "the right thing by accident", because it doesn't set the locale at all, i.e. masking this bug by not having a feature. :grinning:

Any update on this? I fought for hours trying to figure out why SOURCE_DATE_EPOCH was not set.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #106 Merged 4 years ago