On 2013-08-22 12:49, Nicolas Mailhot wrote:
Le Jeu 22 août 2013 12:20, Alec Leamas a écrit :
There is a bug for fedora review [1] to add some basic support for font packages. It shouldn't be that hard, but time is limited.
Thank you for looking at font packages in fedora review.
Thanks for reply. BTW: are there anything else besides running repo-font-audit which should be done w font packages? More specifically, things to check?
One concern is that font specfiles are hard to parse because of the %_font_pkg macro. The problem is that it "hides" the %files directive which is what we use to locate the section (that we have to parse ourselves instead of using rpm's parser is a long story).
Now, anything is possible. But according to the discussion in [2], fpc nowadays seems very firm about that macros should not include any section parts like %files, so %_font_pkg should most likely not have been approved as-is today (?)
The objection you reference does not apply to the macros in font packages, the way they are written it is not difficult to complete the files sections (for example it is common to add documentation files)
By construction many font packages have multiple subpackages with specific files sections and lots of repeated boilerplate. Before the macroization spec files were hard to read, errors common and packagers tried to put font files all over the filesystem where fontconfig could not use them. The macros force everyone to respect Fedora guidelines even if they don't understand the font system. They don't get a choice with file placement and permissions and we do not want to give them this choice. (likewise they get little choice over package naming and FPC wishes are enforced by the macros)
Now I won't argue they are perfect, far from that, they were the best compromise that could be found at the time. Please do feel free to propose something better. But better can not be a return to massive boilerplate cut and pasting. Better must keep abstracting all the bits we do not wish font packagers to worry about because choices are locked by fontconfig requirements and FPC decisions.
[cut]
The need for abstraction is obvious, and personally I would like to see more of it in fedora specfiles e. g., by using some more of the suse macros.
That said, the core question is if the complete subpackage and scriptlet structure should be hidden. Without diving into this stuff, complete w lua, my first thought is keeping %files, %post and %postun while using specific macros in each section. It's actually the same discussion as in the fpc ticket, isn't it?
The basic argument here is that this exposes the subpackage structure with the different subpackages. I read your post as hiding this within %_font_pkg makes it easier to read. I actually disagree here,. Simple explanation is that when you're used to it, the macro easier. If not, it's harder.
Now, actually changing this is probably beyond what I can achieve. For the moment, I just wanted to discuss the issue to see where it goes...
--alec