Bug 1290878 - macros.fonts uses %define instead of %global
macros.fonts uses %define instead of %global
Product: Fedora
Classification: Fedora
Component: fontpackages (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nicolas Mailhot
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-12-11 13:39 EST by Jason Tibbitts
Modified: 2017-08-08 08:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-08 08:30:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jason Tibbitts 2015-12-11 13:39:19 EST
While working on some compatibility macros for EPEL (to let the older branches use some of the new RPM functionality without ifdefs) I found my macros broke nothing except the font packages.  After some bugging I found that use of %define in the %_font_pkg() macro will expand itself recursively when expanded in certain contexts.  It seems to work currently by luck.

Changing that one %define to %global appears to work and generates RPMs which differ from the current packages by nothing other than timestamps.

Is there a specific reason that %define is used there?  As I understand it, the general rule is that you should use %global unless you know that you really need the special and difficult to explain behavior of %define.  There's no comment in the macros file about this, so I suspect that the use of %define is not intentional.

Unfortunately this is holding up some work I'm doing so I'd like to get this pushed out at least for EL6 and EL5 as soon as is reasonable.  I'll do a complete rebuild of all font packages and rpmdiff against current rawhide as well as EPEL5 and 6 and post it here to make sure there's no breakage, and I'm happy to push a package with that one line patched to any branches you desire.  Just let me know.
Comment 1 Jason Tibbitts 2015-12-11 14:12:04 EST
Oh, hey, it appears that on EPEL6 (and 7, though that doesn't block my work) the fontpackages macros are actually part of EPEL.  Which means I can pretty much never expect to be able to use a fix.

I'll see if I can't just override the macros in my own macro package and be done with it.  Might be worth fixing the bug in the branches you actually control, but I guess it's not such a big deal.
Comment 2 Nicolas Mailhot 2015-12-14 06:05:18 EST
(In reply to Jason Tibbitts from comment #0)

> Is there a specific reason that %define is used there?

I don't think so, it's just old and working and antedates the great define purging. And since changing it implies rebuilding all font packages and updating the Fedora wiki, it's pretty much only done at the start of a Fedora cycle
Comment 3 Jason Tibbitts 2015-12-14 14:11:53 EST
It's not a huge deal except when it doesn't work (which really only happens when you do fancy things with RPM macros as I'm doing).  In the specific case of EL6, we can't fix it anyway because it's a Red Hat package, but I can just override the one macro I need to change.

I haven't made it to EL5 but I believe the same change will be needed there as well.  I can of course just do the same override, but since I've the ability to actually fix it properly I'd prefer to do that if you wouldn't mind me doing so.

And changing it to fix this issue actually doesn't imply a rebuild of anything except the fontpackages package, since the actual font packages are unchanged after this change it made.  I don't think anything has a direct version dependency on any of the fontpackages subpackages.
Comment 4 Nicolas Mailhot 2015-12-14 17:07:29 EST
Sure, you don't *need* to rebuild. But if you don't, anyone trying to rebuild from the repo won't be able to reproduce exactly the packages. Some people suspect three-letter agencies when that happens
Comment 5 Jason Tibbitts 2015-12-14 17:30:48 EST
Actually, the packages are identical save for timestamps.  I can provide you with rpmdiffs of the packages built with and without the single macro change if this would help you.
Comment 6 Nicolas Mailhot 2015-12-15 06:16:07 EST
No need I was just explaining why changes to this root package are few and take a long time to percolate in epel.
Comment 7 Jan Kurik 2016-02-24 09:07:53 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
Comment 8 Fedora End Of Life 2017-07-25 15:37:41 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 9 Jason Tibbitts 2017-07-25 15:47:04 EDT
FYI, this no longer matters to me because EPEL5 is long gone.  However, the bug does still exist, even in rawhide.
Comment 10 Fedora End Of Life 2017-08-08 08:30:55 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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

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.