Bug 1803281 - Review Request: fonts-rpm-macros - rpm automation for fonts packages
Summary: Review Request: fonts-rpm-macros - rpm automation for fonts packages
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-14 23:01 UTC by Nicolas Mailhot
Modified: 2020-02-20 22:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-20 22:17:39 UTC
Type: ---
Embargoed:
gwync: fedora-review+


Attachments (Terms of Use)

Description Nicolas Mailhot 2020-02-14 23:01:45 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/nim/fonts-rpm-macros/fedora-rawhide-x86_64/01240322-fonts-rpm-macros/fonts-rpm-macros.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/nim/fonts-rpm-macros/fedora-rawhide-x86_64/01240322-fonts-rpm-macros/fonts-rpm-macros-2.0.1-2.fc33.src.rpm

Description:

rpm macros, templates and documentation for the packaging of fonts in Fedora
Technical core of Fedora’s fonts packaging guidelines

Fedora Account System Username: nim

It is the technical core of the new fonts packaging guidelines approved by FPC the 2020-02-13:
https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2020-02-13/fpc.2020-02-13-17.00.txt
https://pagure.io/packaging-committee/issue/935

They will be published on:
https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/

The current guidelines PR is here:
https://pagure.io/packaging-committee/pull-request/934

The whole https://copr.fedorainfracloud.org/coprs/nim/fonts-rpm-macros/ copr showcases how the macro work, with updates to existing Font packages and brand new packages.

It is a descendant of the previous canonical Fedora font packaging support package, fontpackages, which will be replaced (that’s why its initial version is 2.0.0). Most of it has been rewritten except the fontconfig templates.

Constrains:
— the fonts-srpm-macros subpackage  will need to be included in the default buildroot
— it relies on redhat-rpm-config ≥ 137

That restricts the applicability of the new guidelines to fedora ≥ 31 (less if we only change the buildroot for Fedora 32 and 33).


Legacy fontpackages macros are grandfathered for now to avoid breaking existing packages. However, they are much more limited than the new macros, and require more packager manual work, which is often ignored or poorly done. Therefore they will be retired after one or two releases to force a level (and complete) packaging field.

Comment 1 Gwyn Ciesla 2020-02-20 18:06:26 UTC

? MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.

  Most of rpmlint's output can be ignored for this case. %build section is missing, and description is too long.

+ MUST: The package must be named according to the Package Naming Guidelines

+ MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption. [2] .

+ MUST: The package must meet the Packaging Guidelines .

+ MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .

+ MUST: The License field in the package spec file must match the actual license. [3]

+ MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %license.[4]

+ MUST: The spec file must be written in American English. [5]

? MUST: The spec file for the package MUST be legible. [6]

  Changelog lacks versions, and includes emoji.

+ MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use sha256sum for this task as it is used by the sources file once imported into git. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.

+ MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. [7]

N/A MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line. [8]

+ MUST: All build dependencies must be listed in BuildRequires. [9]

+ MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.[10]

+ MUST: Packages must NOT bundle copies of system libraries.[11]

N/A MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker. [12]

+ MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. [13]

+ MUST: A Fedora package must not list a file more than once in the spec file’s %files listings. (Notable exception: license texts in specific situations)[14]

+ MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. [15]

+ MUST: Each package must consistently use macros. [16]

+ MUST: The package must contain code, or permissible content. [17]

N/A MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager’s best judgement, but is not restricted to size. Large can refer to either size or quantity). [18]

+ MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present. [19]

N/A MUST: Static libraries must be in a -static package. [20]

N/A MUST: Development files must be in a -devel package. [21]

N/A MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release} [22]

+ MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.[23]

N/A MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation. [24]

N/A MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time. [25]

+ MUST: All filenames in rpm packages must be valid UTF-8. [26]

+ MUST: Packages being added to the distribution MUST NOT depend on any packages which have been marked as being deprecated. [27]


So it's just cosmetic things, really.

Comment 2 Nicolas Mailhot 2020-02-20 20:37:36 UTC
Thanks for the review!

So, to answer:

1. no %build section → this is normal, the package is not transforming source files, only ventilating them on the filesystem.

   Do you want me to add an empty %build section? I prefer avoiding those, we’ve had cases when buggy debuginfo (or other) macros assumed %build presence meant something happened in build, and specs with empty build sections failed in koji. But, in the absence of such bugs empty build sections are generally harmless

2. description is too long → what would be the correct description length for you? It does not seem especially long to me (way shorter than the description of glibc or systemd, for example)

3. Changelog lacks versions

   But it does include versions (it was one of the approved changelog formats, back when FPC cared about such things, and rpmbuild & friends have no difficulty parsing it)

4. and includes emoji.

   It’s valid UTF-8 and I like to make use of the fonts I package for Fedora;).
   https://docs.fedoraproject.org/en-US/packaging-guidelines/#_spec_file_encoding

   I can remove it if you feel strongly about it

Comment 3 Gwyn Ciesla 2020-02-20 20:53:06 UTC
1. Leave it then. :)
2. Less than 80 chars per line.
3. Ok.
4. No, that's cool.

I trust you to correct these things prior to import.

APPROVED.

Comment 4 Nicolas Mailhot 2020-02-20 21:19:10 UTC
Thanks, I fixed the improperly wrapped lines here

https://copr.fedorainfracloud.org/coprs/nim/fonts-rpm-macros/build/1246667/

now I will proceed to fedpkg import

Comment 5 Gwyn Ciesla 2020-02-20 21:48:53 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/fonts-rpm-macros

Comment 7 Nicolas Mailhot 2020-02-20 22:18:10 UTC
Thanks a lot for the admin work!

Comment 8 Gwyn Ciesla 2020-02-20 22:21:29 UTC
Anytime. :)


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