Bug 564613 - Add end of section markers to spec syntax [NEEDINFO]
Add end of section markers to spec syntax
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-13 11:22 EST by Nicolas Mailhot
Modified: 2016-04-05 10:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-05 10:05:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
triage: needinfo? (nicolas.mailhot)


Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2010-02-13 11:22:39 EST
There are no good reasons to include unexpanded macro calls in package descriptions, they include human text, not commands. If rpmbuild thinks a macro call is part of a description (because rpmbuild is naive about those things, and descriptions have no explicit end markers), and can not expand it, it is best to zap the macro call instead of adding it to the srpm description (which is sure n

rpm-build-4.8.0-9.fc13.x86_64
Comment 1 Nicolas Mailhot 2010-02-13 11:23:17 EST
(which is sure not to be what people want)
Comment 2 Panu Matilainen 2010-02-15 07:29:58 EST
The macro expansion is just a text pre-processor which behaves according to its own rules (one of them is that undefined macros get passed through literally) and doesn't have a clue what context it gets called in.

If there's a chance a macro might not be defined, the spec needs to written to take that into account (use conditionals as appropriate) - that's the way it's always been. If mock re-created the src.rpm when buildrequires are installed this particular problem (which is far more general than just %descriptions) wouldn't exist but the mock developers dont want to do that...

One possibility would be moving the %_font_pkg macro into redhat-rpm-config.
Comment 3 Nicolas Mailhot 2010-02-15 12:03:16 EST
Moving it in redhat-rpm-config will make it Fedora-specific and negate all the efforts that were made to keep this distro-neutral and avoid NIH rejection.

Anyway, you do not want to fix this, mock people do not want to fix this, and I didn't spend the effort I did to simplify font packaging just to see it undone step by step because tool people are unwilling to fix their problems.

So, deadlock. Except FESCO is forcing the issue now. And we all know who they feel will be safer to sacrifice so save face. However, if it comes to that, I don't have to play. I (not them) paid the price for their meddling last year. Never again. 

But I'd rather it didn't come to that and you changed your mind.
Comment 4 Panu Matilainen 2010-02-16 04:06:48 EST
Look, I do see the problem. But "zap the macro call instead of adding it to the srpm description" is not how rpmbuild works, and I'm not adding treat-the-symptom-and-not-the-disease special-case kludgery to paper over politics.

The average use of macros in %description and the like can be easily conditionalized to avoid this issue, but %_font_pkg() is quite different as the expansion was never intended to end up in %description. As has been mentioned elsewhere (including by yourself), section end markers in spec (even if optional) would allow solving this for %_font_pkg(). And it would solve a much more generic issue, benefitting everybody. That is the kind of fix I want and have no problem with.

Support for section-end markers is unlikely to happen "yesterday already", so for an immediate "fix"... well if you dont want to move the %_font_pkg macro to redhat-rpm-config, another possibility is to stick a dummy in there that expands to %{nil} when fontpackages-devel is not installed.
Comment 5 Nicolas Mailhot 2010-02-16 07:07:11 EST
Sorry I was not clear. I don't want this problem solved by kludges either. So far we've all been discussing kludges (moving the macro call, moving the macro in another package, making it conditional, etc)

If you feel the correct long-term solution rpm-side is section end markers I am 200% in agreement with you.

I have no objection to the dummy either as it won't require changes in existing packages, won't block use in other distributions, and can be removed easily when it's no longer useful.

I apologize for burdening you with my problems, there was no one else interested in discussing long term solutions.
Comment 6 Bug Zapper 2010-03-15 10:34:06 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2011-06-02 12:35:10 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 WONTFIX if it remains open with a Fedora 
'version' of '13'.

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 prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Fedora Admin XMLRPC Client 2012-04-13 19:10:06 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Fedora Admin XMLRPC Client 2012-04-13 19:12:29 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 10 Ľuboš Kardoš 2016-04-05 10:05:38 EDT
Optional end markers added upstream [1]. I don't plan to push this feature into current fedora, it will get to fedora with new release of rpm. So closing as upstream. 

[1] https://github.com/rpm-software-management/rpm/commit/16c658f1833f5cf9f244cb9f3465587e3bce2491

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