Bug 564613 - Add end of section markers to spec syntax
Summary: Add end of section markers to spec syntax
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-13 16:22 UTC by Nicolas Mailhot
Modified: 2018-10-14 16:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-05 14:05:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Nicolas Mailhot 2010-02-13 16:22:39 UTC
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 16:23:17 UTC
(which is sure not to be what people want)

Comment 2 Panu Matilainen 2010-02-15 12:29:58 UTC
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 17:03:16 UTC
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 09:06:48 UTC
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 12:07:11 UTC
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 14:34:06 UTC
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 16:35:10 UTC
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 23:10:06 UTC
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 23:12:29 UTC
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 14:05:38 UTC
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

Comment 11 Nicolas Mailhot 2018-10-14 16:30:56 UTC
And that has finally hit Fedora so I can make use of it in Fedora macros now

Thank you very much


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