Bug 807662 - Review Request: gnome-font-viewer - Utility for previewing fonts for GNOME
Summary: Review Request: gnome-font-viewer - Utility for previewing fonts for GNOME
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mohamed El Morabity
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 755054 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-28 12:36 UTC by Rui Matos
Modified: 2012-04-12 02:07 UTC (History)
5 users (show)

Fixed In Version: gnome-font-viewer-3.4.0-3.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-12 02:07:40 UTC
Type: ---
Embargoed:
pikachu.2014: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Comment 1 Rui Matos 2012-03-28 12:47:59 UTC
We should wait for the original review request submitter. Closing.

Comment 2 Mohamed El Morabity 2012-03-28 14:09:42 UTC
*** Bug 755054 has been marked as a duplicate of this bug. ***

Comment 3 Mohamed El Morabity 2012-03-28 14:24:18 UTC
The package looks very good. Just two suggestions:
* you should enable the --disable-silent-rules option in %configure: even if the build process used in GNOME projects is usually safe, I'd be more confident if the compilation lines are explicitely displayed in the build logs
* To make future updates of this package easier, you could define a %major_version macro, set to "3.4" here,, that you could use in the Source0 tag, and even in Version. I use such a trick in my GNOME packages. But it's not mandatory ;)

Comment 4 Rui Matos 2012-03-28 15:39:13 UTC
Ok, those sounds like good ideas, here's the new version:

spec: http://glua.ua.pt/~rmatos/gnome-font-viewer.spec
srpm: http://glua.ua.pt/~rmatos/gnome-font-viewer-3.4.0-2.fc17.src.rpm
http://koji.fedoraproject.org/koji/taskinfo?taskID=3940243

Thanks for the review!

Comment 5 Mohamed El Morabity 2012-03-28 16:09:56 UTC
Many thanks for taking care of this useful package. Here is the review :


Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated



==== C/C++ ====
[x]: MUST Header files in -devel subpackage, if present.
[x]: MUST Package does not contain any libtool archives (.la)
[ ]: MUST Package does not contain kernel modules.
[ ]: MUST Package contains no static executables.
[ ]: MUST Rpath absent or only used for internal libs.
[ ]: MUST Package is not relocatable.


==== Generic ====
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL is required
[x]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package contains a properly installed %{name}.desktop using desktop-
     file-install file if it is a GUI application.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[x]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: 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 is included in %doc.
[x]: MUST License field in the package spec file matches the actual license.
[x]: MUST The spec file handles locales properly.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[x]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

rpmlint gnome-font-viewer-3.4.0-2.fc18.src.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint gnome-font-viewer-3.4.0-2.fc18.i686.rpm

gnome-font-viewer.i686: E: incorrect-fsf-address /usr/share/doc/gnome-font-viewer-3.4.0/COPYING
gnome-font-viewer.i686: W: no-manual-page-for-binary gnome-font-viewer
gnome-font-viewer.i686: W: no-manual-page-for-binary gnome-thumbnail-font
1 packages and 0 specfiles checked; 1 errors, 2 warnings.


rpmlint gnome-font-viewer-debuginfo-3.4.0-2.fc18.i686.rpm

gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/font-thumbnailer.c
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/ftstream-vfs.h
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/ftstream-vfs.c
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/font-view.c
1 packages and 0 specfiles checked; 4 errors, 0 warnings.


[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/home/mohamed/807662/gnome-font-viewer-3.4.0.tar.xz :
  MD5SUM this package     : f21c9174c263bf0928d82ddf01d4e6a5
  MD5SUM upstream package : f21c9174c263bf0928d82ddf01d4e6a5

[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[x]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[x]: SHOULD If the source package does not include license text(s) as a
     separate file from upstream, the packager SHOULD query upstream to
     include it.
[x]: SHOULD Dist tag is present.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[x]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD Scriptlets must be sane, if used.
[x]: SHOULD SourceX is a working URL.
[x]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[ ]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[!]: SHOULD Spec use %global instead of %define.
     Note: %define major 3 %define minor 4 %define micro 0

Issues:
[!]: MUST Rpmlint output is silent.

rpmlint gnome-font-viewer-3.4.0-2.fc18.src.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint gnome-font-viewer-3.4.0-2.fc18.i686.rpm

gnome-font-viewer.i686: E: incorrect-fsf-address /usr/share/doc/gnome-font-viewer-3.4.0/COPYING
gnome-font-viewer.i686: W: no-manual-page-for-binary gnome-font-viewer
gnome-font-viewer.i686: W: no-manual-page-for-binary gnome-thumbnail-font
1 packages and 0 specfiles checked; 1 errors, 2 warnings.


rpmlint gnome-font-viewer-debuginfo-3.4.0-2.fc18.i686.rpm

gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/font-thumbnailer.c
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/ftstream-vfs.h
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/ftstream-vfs.c
gnome-font-viewer-debuginfo.i686: E: incorrect-fsf-address /usr/src/debug/gnome-font-viewer-3.4.0/src/font-view.c
1 packages and 0 specfiles checked; 4 errors, 0 warnings.
----------------

The rpmlint issues can be safely ignored. The  incorrect-fsf-address issues with rpmlint is an upstream problem, but absolutely not a blocker for this package. A bug report about it should be a plus ;).

You'd better replace %define by %global in your macro definitions, as suggested here:
   http://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define
Once this single issue fixed, I will approve this package.

Comment 6 Kalev Lember 2012-03-28 16:22:41 UTC
> %define         major   3
> %define         minor   4
> %define         micro   0
> Version:        %{major}.%{minor}.%{micro}

I'd rather not define Version like this, mostly because Fedora packagers (and automatic tools) expect to be able change the Version tag directly when needed. I'm not trying to say it's in any way bad to split it up; it's just that Fedora packagers aren't used to doing that. For instance, hughsie's mclazy script will get into trouble editing this.
https://gitorious.org/mclazy/mclazy/trees/master

If you want to automate the download URL construction, I'd rather create a macro that takes apart the version string in the Version tag:
# first two digits of version
%define release_version %(echo %{version} | awk -F. '{print $1"."$2}')
(name it to your liking)

... and then uses it in Source0:
Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-font-viewer/%{release_version}/%{name}-%{version}.tar.xz

Comment 8 Mohamed El Morabity 2012-03-28 17:01:43 UTC
Thanks Kaleb for your comment :)

This package is APPROVED!

Comment 9 Kalev Lember 2012-03-28 17:08:22 UTC
Just mentioning something I noticed, not saying anything should be changed:

You've placed the release_version macro definition right after the Version tag, presumably to make rpmlint happy. However, this macro can also work when placed at the top of the spec file, but then it needs to:
a) be a %define
b) use lazy expansion if you want to use a %global:
%global release_version %%(echo %{version} | awk -F. '{print $1"."$2}')

Note the two %% in (b). One of the differences between %define and %global is that the former does lazy expansion by default, whereas %global does not.

(Again, I have no preference where the macro definition should be, just mentioning it in case you wanted to place it at the top of the file but couldn't because of rpmlint.)

Comment 10 Rui Matos 2012-03-28 17:24:40 UTC
New Package SCM Request
=======================
Package Name: gnome-font-viewer
Short Description: Utility for previewing fonts for GNOME
Owners: rtcm
Branches: f17
InitialCC:

Comment 11 Gwyn Ciesla 2012-03-28 18:21:47 UTC
Git done (by process-git-requests).

Comment 12 Fedora Update System 2012-03-29 16:00:07 UTC
gnome-font-viewer-3.4.0-3.fc17,seahorse-nautilus-3.4.0-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/gnome-font-viewer-3.4.0-3.fc17,seahorse-nautilus-3.4.0-2.fc17

Comment 13 Fedora Update System 2012-03-30 02:59:56 UTC
gnome-font-viewer-3.4.0-3.fc17, seahorse-nautilus-3.4.0-2.fc17 has been pushed to the Fedora 17 testing repository.

Comment 14 Fedora Update System 2012-04-12 02:07:40 UTC
gnome-font-viewer-3.4.0-3.fc17, seahorse-nautilus-3.4.0-2.fc17 has been pushed to the Fedora 17 stable repository.


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