Bug 883437

Summary: Review Request: rubygem-prawn - A fast and nimble PDF generator for Ruby
Product: [Fedora] Fedora Reporter: Josef Stribny <jstribny>
Component: Package ReviewAssignee: Miroslav Suchý <msuchy>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hhorak, msuchy, notting, package-review
Target Milestone: ---Flags: msuchy: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-17 12:30:35 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: 951004    
Bug Blocks:    

Description Josef Stribny 2012-12-04 15:41:34 UTC
Spec URL: http://data-strzibny.rhcloud.com/rubygem-prawn.spec
SRPM URL: http://data-strzibny.rhcloud.com/rubygem-prawn-0.12.0-1.fc19.src.rpm
Description: Prawn is a fast, tiny, and nimble PDF generator for Ruby
Fedora Account System Username: jstribny
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=4755767

Comment 1 Miroslav Suchý 2013-03-15 08:53:14 UTC
Version 0.12.0 does not support ruby 1.9 (afaik) and is very outdated. Can you package
http://rubygems.org/gems/prawn/versions/1.0.0.rc2
instead?

My comments to spec itself:
* the description is too short. Do not hesitate to put there full description from
https://github.com/prawnpdf/prawn#prawn-fast-nimble-pdf-generation-for-ruby
including that bullet list

And again. You have to update it to reflect recent rebase to in rawhide to ruby 2.0.

Comment 2 Josef Stribny 2013-04-11 10:39:33 UTC
Miroslav: 1.0.0.rc2 depends on rubygem-afm which I have already packaged [1]. If you can, please do the review as well. Thank you.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=951004

Comment 3 Josef Stribny 2013-04-15 11:47:36 UTC
afm is done, so lets continue with prawn:

- upgraded to 1.0.0.rc2
- adjusted description

SPEC: http://data-strzibny.rhcloud.com/rubygem-prawn.spec
SRPM: http://data-strzibny.rhcloud.com/rubygem-prawn-1.0.0.rc2-1.fc20.src.rpm
Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=5253021

Comment 5 Miroslav Suchý 2013-04-15 16:29:30 UTC
It seems to me that 
%{gem_instdir}/data
is used in 
lib/prawn/core.rb:
  DATADIR = File.expand_path(File.join(dir, '..', '..', 'data'))

So it should be in main package and not in -doc.

Comment 7 Miroslav Suchý 2013-04-17 10:02:00 UTC
Package Review
==============

Key:
[x] = Pass
[!] = Fail
[-] = Not applicable
[?] = Not evaluated


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[-]: Fully versioned dependency in subpackages, if present.
[x]: Package complies to the Packaging Guidelines
[x]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[-]: If the package is under multiple licenses, the licensing breakdown must
     be documented in the spec.
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[x]: 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]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).

Ruby:
[x]: Platform dependent files must all go under %{gem_extdir}, platform
     independent under %{gem_dir}.
[x]: Gem package must not define a non-gem subpackage
[x]: Gem package is named rubygem-%{gem_name}
[x]: Package contains BuildRequires: rubygems-devel.
[x]: Gem package must define %{gem_name} macro.
[x]: Pure Ruby package must be built as noarch

===== SHOULD items =====

Generic:
[!]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[x]: 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]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

Ruby:
[x]: Gem package should exclude cached Gem.

===== EXTRA items =====

Generic:
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.

=== Issues ===
[!]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
The package contains lots of *.afm fonts. I just take one random: Courier.afm.
It is not packagen in Fedora. But is bundled in packages htmldoc, php-pear-PhpDocumentor and PyX.
According http://fedoraproject.org/wiki/Shipping_fonts_in_Fedora_%28FAQ%29#What_is_a_font_file.3F afm is not font.
You should probably ask on fedora-packaging mailing list.
Additionally the question is what license have those fonts, because I doubt the creator of prawn created those fonts.
Can you please investigate it?

Comment 8 Josef Stribny 2013-04-22 06:59:04 UTC
I tried to recognize some of them and I opened an upstream issue [1] regarding the rest [1]

[1] https://github.com/prawnpdf/prawn/issues/474

Comment 9 Josef Stribny 2013-05-16 10:24:18 UTC
I talked to upstream and we successfully removed .ttf and .dfont files from the final distribution[1] as well as rails.png logotype[2]. However, I bundled the .afm metrics files, because they are essential to Prawn and upstream doesn't want to separate them right now. Plus there is no clear guideline nor a place where these files could go. The feedback I got from the mailing list was to convert them to true fonts, but then, it does loose the purpose. Until there is a better general approach in Fedora, I think it's the best to bundle them.


This change is represented in the next release:
SPEC: http://data-strzibny.rhcloud.com/rubygem-prawn.spec
SRPM: http://kojipkgs.fedoraproject.org//work/tasks/7462/5387462/rubygem-prawn-1.0.0-0.3.rc2.fc20.src.rpm
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=5387461


[1] https://github.com/prawnpdf/prawn/pull/490
[2] https://github.com/prawnpdf/prawn/issues/481

Comment 10 Miroslav Suchý 2013-05-16 11:03:54 UTC
I'm afraid that this is not enough.
E.g: https://github.com/prawnpdf/prawn/blob/master/data/fonts/Symbol.afm
State:
Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved.

If I look on afm already in Fedora - e.g: /usr/share/fonts/default/Type1/s050000l.afm
It has:
Comment See the file COPYING (GNU General Public License) for license conditions.

After some searching I find that there exist license (and is in fact included in prawn as MustRead.html), which is already listed as good license - APAFML.

So if you change the license to (including that comment):
# afm files are licensed by APAFML, the rest of package is GPLv2 or GPLv3 or Ruby
License: (GPLv2 or GPLv3 or Ruby) and APAFML

then it will be ok.

Oh and mark 
 %{gem_instdir}/data/fonts/MustRead.html
as %doc.

Comment 11 Josef Stribny 2013-05-16 12:16:25 UTC
Yes, I know, it's what we have discussed with upstream and what @bradediger pointed out. I forgot to update the license field though, so good catch on that!

Thanks.

SPEC: http://data-strzibny.rhcloud.com/rubygem-prawn.spec
SRPM: http://kojipkgs.fedoraproject.org//work/tasks/7822/5387822/rubygem-prawn-1.0.0-0.4.rc2.fc20.src.rpm
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=5387821

Comment 12 Miroslav Suchý 2013-05-16 12:29:46 UTC
Thanks for all the work.

APPROVED

Comment 13 Josef Stribny 2013-05-16 14:01:59 UTC
Thanks.


New Package SCM Request
=======================
Package Name: rubygem-prawn
Short Description: A fast and nimble PDF generator for Ruby
Owners: jstribny
Branches:
InitialCC:

Comment 14 Gwyn Ciesla 2013-05-16 15:27:27 UTC
Git done (by process-git-requests).