Bug 407781

Summary: Add fonts SPEC template
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-19 13:02:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 235705    
Attachments:
Description Flags
Disttagify -f none

Description Nicolas Mailhot 2007-12-02 11:43:20 UTC
Now that FPC & FESCO approved the fonts spec template,
http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/SpecTemplate

please add it to rpmdevtools.

(F-7 & F-8 need fc-cache -f, Behdad swears F-9 will be fine without the -f part)

Comment 1 Ville Skyttä 2007-12-02 11:52:49 UTC
Is there a minimized (no need to include all that documentation) plain text
version of the template available?  What package names should it be hooked to in
rpmdev-newspec (I guess *-fonts)?

Comment 2 Nicolas Mailhot 2007-12-02 12:03:31 UTC
(In reply to comment #1)
> Is there a minimized (no need to include all that documentation) plain text
> version of the template available?

Unfortunately, no. I've thought several times of doing one but always refrained
since I was not sure what level of comment was appropriate to keep.

The table pastes fine in gedit though, then you only need to remove all the
comments and empty lines you don't want. It's pretty fast I've done it several
times for my packages

> What package names should it be hooked to in rpmdev-newspec (I guess *-fonts)?

Right, the template is applicable to *-fonts.
It will probably evolve with more stuff such as core fonts support whenever the
users of those backends bother to formalise and document their prectices.

Comment 3 Nicolas Mailhot 2007-12-08 10:15:45 UTC
Are my explanations sufficient or do you need a text template version ?

Comment 4 Ville Skyttä 2007-12-08 15:44:51 UTC
They're sufficient, thanks, I'm on it.

Comment 5 Ville Skyttä 2007-12-08 16:26:36 UTC
Ok, done, please go through it and let me know what you think, check out
fedora-rpmdevtools in CVS (/cvs/fedora root).  Note that I made some stylistic
changes to make it consistent with rest of the rpmdevtools spec templates. 
Also, I dropped %{archivename} because I think making it a macro isn't really
useful in many cases.

You can drop the template to /etc/rpmdevtools and the new rpmdev-newspec to
/usr/bin to test it.

http://cvs.fedoraproject.org/viewcvs/*checkout*/fedora-rpmdevtools/spectemplate-fonts.spec?root=fedora&rev=.
http://cvs.fedoraproject.org/viewcvs/*checkout*/fedora-rpmdevtools/rpmdev-newspec?root=fedora&rev=.

Comment 6 Nicolas Mailhot 2007-12-08 17:00:52 UTC
(In reply to comment #5)
> Note that I made some stylistic
> changes to make it consistent with rest of the rpmdevtools spec templates.

Hey, I liked my style and neither FPC nor FESCO objected to it :p
You wouldn't want to kill RPM_BUILD_ROOT in your other templates instead?

The only problem-inducing change I see (apart from the less-than-ideal styling)
is your removal of the install line for ttf fonts. A lot of packagers will just
put a cp back in, or forget to preserve timestamps (and fontconfig uses
timestamps to detect if it needs to refresh caches), so keeping an example is
very much needed

I don't know any font-only upstream that bundles a make install anyway.

Please have the wiki page changed to say there is an rpmdevtools template when
you're done. It's supposed to be ACL-protected against non FPC/FESCO members
like me now

Comment 7 Nicolas Mailhot 2007-12-08 17:03:20 UTC
Also the -f argument to fc-cache should only be given in rpmdevtools versions
targetting releases < F9, as Behdad got the bug that necessitated it fixed in
rawhide fontconfig

Comment 8 Ville Skyttä 2007-12-08 18:07:01 UTC
(In reply to comment #6)

> You wouldn't want to kill RPM_BUILD_ROOT in your other templates instead?

No.

> so keeping an example is very much needed

Better?
http://cvs.fedoraproject.org/viewcvs/fedora-rpmdevtools/spectemplate-fonts.spec?root=fedora&r1=1.1&r2=1.2&makepatch=1&diff_format=h

> Please have the wiki page changed to say there is an rpmdevtools template when
> you're done.

Done.  BTW, it's still in the PackagingDrafts area so I suppose there are no
ACLs guarding it.

(In reply to comment #7)
> Also the -f argument to fc-cache should only be given in rpmdevtools versions
> targetting releases < F9, as Behdad got the bug that necessitated it fixed in
> rawhide fontconfig

Is the -f a problem for >= F9 font packages?  If not, I say we keep it in the
template at the very least until F8 goes EOL.  rpmdevtools versions targetting <
F9 is not very meaningful because we really want people to not need to fork
specfiles for cosmetic reasons and to be able to use whatever distro version
suits them best and to be able to use the tools in that distro's rpmdevtools to
build packages for all active distro versions (eg. use rawhide rpmdevtools to do
EPEL-4 packages (dunno if that's applicable to fonts, but to illustrate)).

Comment 9 Ville Skyttä 2007-12-08 18:46:30 UTC
(In reply to comment #8)
> (In reply to comment #6)
> 
> > You wouldn't want to kill RPM_BUILD_ROOT in your other templates instead?
> 
> No.

...but I've added an option for users to get it to emit macro style variables
instead of shell style ones to rpmdev-newspec in CVS.

Comment 10 Nicolas Mailhot 2007-12-08 19:08:14 UTC
(In reply to comment #8)
> (In reply to comment #6)

> > so keeping an example is very much needed
> 
> Better?
>
http://cvs.fedoraproject.org/viewcvs/fedora-rpmdevtools/spectemplate-fonts.spec?root=fedora&r1=1.1&r2=1.2&makepatch=1&diff_format=h

Good enough I guess

> > Please have the wiki page changed to say there is an rpmdevtools template when
> > you're done.
> 
> Done.  BTW, it's still in the PackagingDrafts area so I suppose there are no
> ACLs guarding it.

Damn, I probably need to nag f13 and spot again then :(

> (In reply to comment #7)
> > Also the -f argument to fc-cache should only be given in rpmdevtools versions
> > targetting releases < F9, as Behdad got the bug that necessitated it fixed in
> > rawhide fontconfig
> 
> Is the -f a problem for >= F9 font packages?

I will only cause unecessary processing on updates, and some people object to
it, and asked to remove it ASAP. I don't particularly care myself

Thanks for your work!

Comment 11 Ville Skyttä 2007-12-13 16:31:16 UTC
Created attachment 287561 [details]
Disttagify -f

Do you think something like this patch would be worth it?

Comment 12 Nicolas Mailhot 2007-12-13 18:44:39 UTC
(In reply to comment #11)
> Created an attachment (id=287561) [edit]
> Disttagify -f
> 
> Do you think something like this patch would be worth it?

No :) If there is no way to do it without macros and disttags, I'd rather have
everyone use -f than complexify the template that much

Comment 13 Ville Skyttä 2007-12-13 19:54:50 UTC
Ok, no problem.

Comment 14 Nicolas Mailhot 2008-04-19 13:02:53 UTC
Seems good now