Bug 549590 - Review Request: php-pChart - A PHP class to build charts.
Summary: Review Request: php-pChart - A PHP class to build charts.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Nalley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 508817
TreeView+ depends on / blocked
 
Reported: 2009-12-22 02:28 UTC by eric
Modified: 2012-02-10 05:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-10 05:19:32 UTC
Type: ---
Embargoed:
david: fedora-review?


Attachments (Terms of Use)

Description eric 2009-12-22 02:28:13 UTC
Spec URL: http://sparks.fedorapeople.org/Packages/pChart/pChart.spec
SRPM URL: http://sparks.fedorapeople.org/Packages/pChart/pChart-1.27d-1.fc12.src.rpm
Description: A PHP class to build charts.

rpmlint is clean EXCEPT for a no-documentation error.  This is a lib from limesurvey and does not have any associated documentation.

Comment 1 Pavel Alexeev 2010-01-03 17:43:13 UTC
Source must be URL, not only filename.

Comment 2 eric 2010-01-04 04:43:18 UTC
(In reply to comment #1)
> Source must be URL, not only filename.  

Should this point back to limesurvey's source URL?  This was an embedded library that is being removed from limesurvey's source code.

Comment 3 Pavel Alexeev 2010-01-04 10:37:57 UTC
If it hosted on sourceforge it is case described in guidelines:
http://fedoraproject.org/wiki/Packaging/SourceURL#Sourceforge.net

Comment 4 David Nalley 2010-01-30 05:30:07 UTC
Package name doesn't meet the naming guidelines:
http://fedoraproject.org/wiki/Packaging/PHP#Naming_scheme

Comment 5 David Nalley 2010-06-20 02:39:32 UTC
Sparks: 
Any movement on this package??

Comment 6 eric 2010-06-21 21:46:31 UTC
Spec URL: http://sparks.fedorapeople.org/Packages/pChart/php-pChart.spec
SRPM URL: http://sparks.fedorapeople.org/Packages/pChart/php-pChart-1.27d-3.fc13.src.rpm

rpmlint issues:
SPECS/php-pChart.spec: W: invalid-url Source0: pChart.tar.gz

RPM: php-pChart.noarch: W: no-documentation

In regards to the warning shown for the SOURCE 0, I had to rebuild the SOURCE archive from rar to tar.gz.  The original URL is shown in the SPEC, however.

In regards to the "no-documentation" warning, there really isn't any documentation.

Comment 7 David Nalley 2010-06-24 02:05:33 UTC
OK: rpmlint must be run on every package. The output should be posted in the review.
[ke4qqq@nalleyx60 SPECS]$ rpmlint php-pChart.spec 
php-pChart.spec: W: invalid-url Source0: pChart.tar.gz
0 packages and 1 specfiles checked; 0 errors, 1 warnings.
[ke4qqq@nalleyx60 SPECS]$ rpmlint ../SRPMS/php-pChart-1.27d-3.fc13.src.rpm  ../RPMS/noarch/php-pChart-1.27d-3.fc13.noarch.rpm 
php-pChart.src: W: invalid-url Source0: pChart.tar.gz
php-pChart.noarch: W: no-documentation
2 packages and 0 specfiles checked; 0 errors, 2 warnings.


OK: The package must be named according to the Package Naming Guidelines .
OK: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
MUST: The package must meet the Packaging Guidelines
CHECK: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .

While the php code is under a license that's acceptable I am not sure about the fonts. 

FIX: The License field in the package spec file must match the actual license.
Source code indicates the following: 
This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 1,2,3 of the License, or
     (at your option) any later version.

Which would be GPL+ instead of GPLv2+ 

NA: 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 %doc.
OK: The spec file must be written in American English. 
OK: The spec file for the package MUST be legible. 
FIX: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.

I know what you did (repackaged as a tarball from the rar) but you need to tell us how to recreate what you did so we can compare sources 
http://fedoraproject.org/wiki/Packaging:SourceURL#When_Upstream_uses_Prohibited_Code
While that isn't exactly the situation here - it's pretty close. 


OK: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
NA: 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.
OK: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
NA: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
NA: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. 
FIX: Packages must NOT bundle copies of system libraries.

I am saying fix here because it bundles fonts. 
http://fedoraproject.org/wiki/Shipping_fonts_in_Fedora_%28FAQ%29

NA: 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. 
OK: 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. 
OK: A Fedora package must not list a file more than once in the spec file's %files listings. 
OK: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line. 
OK: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT). 
OK: Each package must consistently use macros. 
OK: The package must contain code, or permissable content. 
NA: 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).
OK: 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. 
NA: Header files must be in a -devel package. 
NA: Static libraries must be in a -static package. 
NA: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). 
NA: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package. 
NA: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release} 
NA: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
NA: 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. 
OK: 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. 
OK: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT). 
OK: All filenames in rpm packages must be valid UTF-8. 


All of the example*.php, *.php,  buildall.cmd, Sample/* belongs in %doc 

Fonts should exist, but symlink in system fonts (or some other means of handling them) 
The presence of Cache and tmp subdirectories worries me a bit, but I don't know that there are guidelines against them.

Comment 8 David Nalley 2010-09-05 04:20:34 UTC
Eric: 

Just wanted to see where we stand on this? 

Have you had an opportunity to talk to Nicholas Mailhot re the fonts? 


tnx

Comment 9 eric 2010-09-05 13:31:36 UTC
I'm going to close this request.  Since Fedora isn't going to use Zikula then this package is moot.

Comment 10 Kevin Fenzi 2010-09-05 18:00:11 UTC
This is also a blocker for limesurvey according to the bugzilla dependencies. ;(

Comment 11 eric 2010-09-05 18:09:43 UTC
Shoot, wrong package!

Thanks for the poke.  I'll see if I can work on it this weekend.

Comment 12 Jeffrey Ness 2010-11-12 14:07:10 UTC
Any movement on packaging this software? I am in the process of getting an rpm approved that requires pChart.

Jeffrey-

Comment 13 eric 2010-11-13 16:08:36 UTC
(In reply to comment #7)
> FIX: The License field in the package spec file must match the actual license.
> Source code indicates the following: 
> This program is free software: you can redistribute it and/or modify
>      it under the terms of the GNU General Public License as published by
>      the Free Software Foundation, either version 1,2,3 of the License, or
>      (at your option) any later version.
> 
> Which would be GPL+ instead of GPLv2+ 

Fixed.

> FIX: The sources used to build the package must match the upstream source, as
> provided in the spec URL. Reviewers should use md5sum for this task. If no
> upstream URL can be specified for this package, please see the Source URL
> Guidelines for how to deal with this.
> 
> I know what you did (repackaged as a tarball from the rar) but you need to tell
> us how to recreate what you did so we can compare sources 
> http://fedoraproject.org/wiki/Packaging:SourceURL#When_Upstream_uses_Prohibited_Code
> While that isn't exactly the situation here - it's pretty close.

Yep, that makes sense.  Done.

> FIX: Packages must NOT bundle copies of system libraries.
> 
> I am saying fix here because it bundles fonts. 
> http://fedoraproject.org/wiki/Shipping_fonts_in_Fedora_%28FAQ%29

Yep.  ONE of those fonts is already in the repositories.  I wonder if the rest of them should be.  I've removed the fonts completely.

> All of the example*.php, *.php,  buildall.cmd, Sample/* belongs in %doc 

FIXED
> 
> Fonts should exist, but symlink in system fonts (or some other means of
> handling them) 

I wonder if a symlink even needs to be there.  I've compiled without the symlink and I think we need to test to see where the fonts are being pulled.

SRPM: http://sparks.fedorapeople.org/Packages/pChart/php-pChart-1.27d-4.fc14.src.rpm

SPEC: http://sparks.fedorapeople.org/Packages/pChart/php-pChart.spec

Comment 14 David Nalley 2010-11-16 14:48:34 UTC
Eric: 

The package is starting to look good. I don't see any blockers from a SPEC file standpoint now, but am concerned about the font issue and whether that breaks things. You mentioned you had someone who wanted to use it?? I'll try and see if I can use it as well and hopefully get this package approved.

Comment 15 Jeffrey Ness 2010-11-16 16:01:05 UTC
Sounds great! Can't wait to see this approved.

Jeffrey-

Comment 16 David Nalley 2010-11-21 02:57:12 UTC
Hi Eric: 

So I have come across one concern with stripping the fonts. In pChart.class I see the two following lines. 

var $ErrorFontName  = "Fonts/pf_arma_five.ttf";
$this->setFontProperties("tahoma.ttf",8);

Those files of course won't be there if they are stripped out, but it looks to be 'hardcoding' (albeit with a relative path) the font location. 

I see the solution as doing one of two things: 
1. symlink the appropriate .ttf files from packages (and require those packages) 
2. patch the .class file to refer to to the fonts in question. (or different fonts altogether) 

Also I think php-common is necessary at a minimum as a require.  (don't know how I missed that earlier.

Comment 17 eric 2010-11-21 15:29:03 UTC
Okay, I've added php-common to be required.

I believe one of the fonts is already in Fedora but the others are not.  I don't feel that I'm qualified to recommend alternate fonts.

Comment 18 Jeffrey Ness 2010-11-21 16:59:46 UTC
Hey Eric,

The Development RPM I have been using for pChart requires "liberation-fonts", maybe you can remove the Fonts from you package and rely on it?

Just a thought.

Jeffrey-

Comment 19 David Nalley 2010-11-21 17:50:35 UTC
(In reply to comment #17)
> Okay, I've added php-common to be required.
> 
> I believe one of the fonts is already in Fedora but the others are not.  I
> don't feel that I'm qualified to recommend alternate fonts.

I don't know that you have to recommend alternate fonts, but the package won't work properly has it has fonts coded. 

Jeffrey: Care to share the spec for the development RPM, perhaps someone else has seen this and come up with a novel solution (such as using liberation fonts)

Comment 20 Jeffrey Ness 2010-11-21 21:17:23 UTC
Sure. 

My RPM isn't close to Redhat standard for approval, but it gets the job done for testing:

http://flip-edesign.com/source/php-pChart/php-pChart.spec

Jeffrey-

Comment 21 Jeffrey Ness 2010-12-06 20:04:20 UTC
Any progress on this package? My package is at a standstill waiting on it.. 

Jeffrey-

Comment 22 eric 2010-12-08 14:08:15 UTC
(In reply to comment #21)
> Any progress on this package? My package is at a standstill waiting on it.. 
> 
> Jeffrey-

Unfortunately I don't really have the time to work on this right now.  If you would like to work on this package please do.

Comment 23 Jeffrey Ness 2010-12-08 15:45:32 UTC
Not a problem Eric, I'll be happy to take over this package.

SPEC: http://flip-edesign.com/source/php-pChart/php-pChart.spec
SRPM: http://flip-edesign.com/source/php-pChart/php-pChart-1.27-4.src.rpm

=== SRPM rpmlint ===
$ rpmlint ../SRPMS/php-pChart-1.27-4.src.rpm 
php-pChart.src: W: summary-not-capitalized a PHP class oriented framework
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

=== RPM rpmlint ===
$ rpmlint ../RPMS/noarch/php-pChart-1.27-4.noarch.rpm 
php-pChart.noarch: W: summary-not-capitalized a PHP class oriented framework
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
==

As Eric mentioned above upstream packages are in .rar format, we need to re-package in .tar.gz format using guidelines "http://fedoraproject.org/wiki/Packaging:SourceURL#When_Upstream_uses_Prohibited_Code"

I have confirmed the fonts are not required and truetype font can be used (verified by includes 'liberation-fonts' in my package https://bugzilla.redhat.com/show_bug.cgi?id=651123)


Jeffrey-

Comment 24 Jeffrey Ness 2010-12-08 15:53:34 UTC
Corrected capitalization issue:

$ rpmlint ../RPMS/noarch/php-pChart-1.27-4.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

rpmlint ../SRPMS/php-pChart-1.27-4.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
--

Jeffrey-

Comment 25 Jeffrey Ness 2010-12-08 16:44:33 UTC
Added Patch to RPM Spec file rather than generate.sh

$ rpmlint ../SRPMS/php-pChart-1.27-4.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint ../RPMS/noarch/php-pChart-1.27-4.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
---

SPEC: http://flip-edesign.com/source/php-pChart/php-pChart.spec
SRPM: http://flip-edesign.com/source/php-pChart/php-pChart-1.27-4.src.rpm
--

Jeffrey-

Comment 26 David Nalley 2011-01-09 18:03:26 UTC
Hi Jeffrey - sorry for the lag on this. 
I'd prefer you open a new review request for this (requestor is changing, and you are starting from bascially a clean spec file instead of picking up Eric's. Feel free to 'assign' the new ticket to me, and I'll be happy to complete the review. 

Thanks

Comment 27 Jeffrey Ness 2011-01-09 19:59:26 UTC
Thanks David,

I created Bugzilla #668287 (https://bugzilla.redhat.com/show_bug.cgi?id=668287), but having trouble assigning it to you, it may be because this is my first package and I'm not sponsored.

If you wouldn't mind picking up the new ticket (and closing out this one if you could).

Thanks :)
Jeffrey-


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