Bug 901872 - Review Request: python-gd - Python GD module
Summary: Review Request: python-gd - Python GD module
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael J Gruber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-19 18:14 UTC by Paulo Andrade
Modified: 2013-02-10 04:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-10 04:30:39 UTC
Type: ---
Embargoed:
mjg: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)
python-gd-mail.txt (5.55 KB, text/plain)
2013-01-27 11:33 UTC, Paulo Andrade
no flags Details

Description Paulo Andrade 2013-01-19 18:14:59 UTC
Spec URL: http://pcpa.fedorapeople.org/python-gd.spec
SRPM URL: http://pcpa.fedorapeople.org/python-gd-0.56-1.fc19.src.rpm
Description: The GDmodule is an interface to the GD library written by Thomas Boutell.

    'gd is a graphics library. It allows your code to quickly draw images
     complete with lines, arcs, text, multiple colors, cut and paste from
     other images, and flood fills, and write out the result as a PNG or
     JPEG file. This is particularly useful in World Wide Web applications,
     where PNG and JPEG are two of the formats accepted for inline images
     by most browsers.'
Fedora Account System Username: pcpa

Comment 1 Paulo Andrade 2013-01-19 18:17:18 UTC
This module is required by my sagemath work in progress package.

Without it:
-%<-
$ sage -t /usr/lib64/sagemath/devel/sage/sage/matrix/matrix2.pyx
sage -t  "devel/sage/sage/matrix/matrix2.pyx"               
**********************************************************************
File "/usr/lib64/sagemath/devel/sage/sage/matrix/matrix2.pyx", line 7336:
    sage: M.visualize_structure(os.path.join(SAGE_TMP, "matrix.png"))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/sagemath/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/usr/lib64/sagemath/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/usr/lib64/sagemath/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_91[3]>", line 1, in <module>
        M.visualize_structure(os.path.join(SAGE_TMP, "matrix.png"))###line 7336:
    sage: M.visualize_structure(os.path.join(SAGE_TMP, "matrix.png"))
      File "matrix2.pyx", line 7338, in sage.matrix.matrix2.Matrix.visualize_structure (sage/matrix/matrix2.c:38883)
    ImportError: No module named gd
**********************************************************************
1 items had failures:
   1 of   5 in __main__.example_91
***Test Failed*** 1 failures.
For whitespace errors, see the file /home/pcpa/.sage/tmp/matrix2_4456.py
         [16.4 s]
 
----------------------------------------------------------------------
The following tests failed:


        sage -t  "devel/sage/sage/matrix/matrix2.pyx"
Total time for all tests: 16.4 seconds
-%<-

With it:
-%<-
$ sage -t /usr/lib64/sagemath/devel/sage/sage/matrix/matrix2.pyx
sage -t  "devel/sage/sage/matrix/matrix2.pyx"               
         [35.1 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 35.1 seconds
-%<-

Comment 2 Michael J Gruber 2013-01-21 16:57:52 UTC
On a first glance, this looks OK except for the permissions:

python-gd.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/_gd.so 0775L

This should not be group writeable.

Full review to come.

Comment 3 Paulo Andrade 2013-01-22 23:03:33 UTC
Many thanks for the initial look at it. I made
some minor changes to it:

- Do not provide a private shared object.
- Correct permissions of the installed shared object.

Spec URL: http://pcpa.fedorapeople.org/python-gd.spec
SRPM URL: http://pcpa.fedorapeople.org/python-gd-0.56-2.fc19.src.rpm

Comment 4 Michael J Gruber 2013-01-25 16:17:20 UTC
Thanks for the fixes.

While combing through the review items I noticed one potential problem:

How did you determine the license? It could be that it's a non-issue because its just a module binding, but upstream contains nothing but the copyright notice. Please comment on the license situation.

Comment 5 Paulo Andrade 2013-01-25 22:56:14 UTC
I had packaged it for Mandriva some years ago and
forgot about it.
I just sent an email to the current maintainer
asking for information.
BTW, verbatim Debian copyright file is:
---%<---
This work was packaged for Debian by:
	Ben Pfaff <pfaffben> on Sunday, Feb. 10, 2002

It was downloaded from http://newcenturycomputers.net/projects/gdmodule.html

Upstream Author:

	Jones <richard.au>

Copyright:

	Copyright (c) 1995 Richard Jones

License:

    Redistribution and use in source and binary forms, with or without
    modification, are permitted under the terms of the BSD License.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.

On Debian systems, the complete text of the BSD License can be
found in `/usr/share/common-licenses/BSD'.

The Debian packaging is:

	Copyright (C) 2009 Julián Moreno Patiño <darkjunix>
	Copyright (C) 2002 Ben Pfaff <pfaffben>

# Please chose a license for your packaging work. If the program you package
# uses a mainstream license, using the same license is the safest choice.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
# If you just want it to be GPL version 3, leave the following lines in.

and is licensed under the GPL version 2, 
see `/usr/share/common-licenses/GPL-2'.
---%<---

I see it is also a good idea to remake the tarball, Debian remakes
it due to the adventure.ttf file in the tarball, not used, but of
unknown license.

README.debian from the debian python-gd package:
---%<---
python-gd for Debian
-------------------

Mantainer: The original source was renamed from gdmodule to python-gd to fit debian package name on repository. 

Also, the file adventure.ttf was removed for copyright issues and upstream tarball was repackaged adding +dfsg suffix.

 -- Julián Moreno Patiño <darkjunix>  Mon, 23 Nov 2009 15:31:27 -0500
---%<---

Comment 6 Paulo Andrade 2013-01-27 11:33:34 UTC
Created attachment 688388 [details]
python-gd-mail.txt

I will also remake the tarball to remove the ttf font as done by Debian.

Comment 7 Paulo Andrade 2013-01-27 11:49:08 UTC
Update:

- Add LICENSE file given by upstream (#901872).
- Repackage the tarball to remove a bundlled ttf file (reported upstream).

Spec URL: http://pcpa.fedorapeople.org/python-gd.spec
SRPM URL: http://pcpa.fedorapeople.org/python-gd-0.56-3.fc19.src.rpm

Comment 8 Paulo Andrade 2013-01-30 23:12:09 UTC
Update:

- Preserve timestamp of the LICENSE file.

Spec URL: http://pcpa.fedorapeople.org/python-gd.spec
SRPM URL: http://pcpa.fedorapeople.org/python-gd-0.56-4.fc19.src.rpm

Comment 9 Michael J Gruber 2013-01-31 16:23:16 UTC
So, you're good to go provided you add one minor item so that the compiler flags are obeyed: 

CFLAGS="%{optflags}" %{__python} Setup.py build

(Unless there's some magic that I've overlooked.)

All other things are OK, all exceptions (such as seemingly missing source) are according to to the guidelines.

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

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



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

C/C++:
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.

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 successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[!]: %build honors applicable compiler flags or justifies otherwise.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package contains no bundled libraries.
[x]: Changelog in prescribed format.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Sources contain only permissible code or content.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[-]: 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.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package complies to the Packaging Guidelines
[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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated". 1 files have unknown license. Detailed output of
     licensecheck in /home/mjg/fedora-review/901872-python-gd/licensecheck.txt
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named using only allowed ASCII characters.
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
     Note: Package contains no Conflicts: tag(s)
[x]: Package do not use a name that already exist
[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]: Package installs properly.
[x]: Package is not relocatable.
[x]: Requires correct, justified where necessary.
[x]: CheckResultdir
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file is legible and written in American English.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[-]: Package contains systemd file(s) if in need.
[x]: File names are valid UTF-8.
[x]: Useful -debuginfo package or justification otherwise.
[-]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 10240 bytes in 2 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Package contains BR: python2-devel or python3-devel
[-]: Binary eggs must be removed in %prep
     Note: Cannot find sources under BUILD (using prebuilt sources?)
[-]: Python eggs must not download any dependencies during the build process.
[-]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python

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

Generic:
[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)
[ ]: 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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[!]: SourceX / PatchY prefixed with %{name}.
     Note: Source0 (gdmodule-0.56-clean.tar.gz) Source1 (LICENSE)
[x]: SourceX is a working URL.
[-]: 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.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Spec use %global instead of %define.

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

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


Rpmlint
-------
Checking: python-gd-0.56-4.fc18.src.rpm
          python-gd-debuginfo-0.56-4.fc18.x86_64.rpm
          python-gd-0.56-4.fc18.x86_64.rpm
python-gd.src: W: invalid-url Source0: gdmodule-0.56-clean.tar.gz
3 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint python-gd python-gd-debuginfo
2 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'



Requires
--------
python-gd-debuginfo-0.56-4.fc18.x86_64.rpm (rpmlib, GLIBC filtered):
    

python-gd-0.56-4.fc18.x86_64.rpm (rpmlib, GLIBC filtered):
    
    gd >= 2.0.23
    libX11.so.6()(64bit)
    libXpm.so.4()(64bit)
    libc.so.6()(64bit)
    libfreetype.so.6()(64bit)
    libgd.so.2()(64bit)
    libgif.so.4()(64bit)
    libjpeg.so.62()(64bit)
    libpng15.so.15()(64bit)
    libpthread.so.0()(64bit)
    libpython2.7.so.1.0()(64bit)
    libz.so.1()(64bit)
    python(abi) = 2.7
    rtld(GNU_HASH)



Provides
--------
python-gd-debuginfo-0.56-4.fc18.x86_64.rpm:
    
    python-gd-debuginfo = 0.56-4.fc18
    python-gd-debuginfo(x86-64) = 0.56-4.fc18

python-gd-0.56-4.fc18.x86_64.rpm:
    
    python-gd = 0.56-4.fc18
    python-gd(x86-64) = 0.56-4.fc18



Unversioned so-files
--------------------
python-gd-0.56-4.fc18.x86_64.rpm: /usr/lib64/python2.7/site-packages/_gd.so

MD5-sum check
-------------


Generated by fedora-review 0.3.1 (b71abc1) last change: 2012-10-16
Buildroot used: fedora-18-x86_64
Command line :/usr/bin/fedora-review -b 901872

Comment 10 Paulo Andrade 2013-01-31 23:49:39 UTC
(In reply to comment #9)

  Many thanks for the review!

> So, you're good to go provided you add one minor item so that the compiler
> flags are obeyed: 
> 
> CFLAGS="%{optflags}" %{__python} Setup.py build
> 
> (Unless there's some magic that I've overlooked.)

  I added it for the sake of completeness, but it should
not be required, but I cannot properly explain how python
distutils, can basically tell that looking at the build
log it gets the proper/expected values for CFLAGS, LD, etc.

> All other things are OK, all exceptions (such as seemingly missing source)
> are according to to the guidelines.

Update:

- Explicitly set CFLAGS (#901872).

Spec URL: http://pcpa.fedorapeople.org/python-gd.spec
SRPM URL: http://pcpa.fedorapeople.org/python-gd-0.56-5.fc19.src.rpm

Comment 11 Michael J Gruber 2013-02-01 07:57:04 UTC
Thanks for the addition, it makes it clearer that flags go through.

Review complete and successful (+ flag).

Feel free to fire an scm request.

Comment 12 Paulo Andrade 2013-02-01 12:32:14 UTC
New Package SCM Request
=======================
Package Name: python-gd
Short Description: Python GD module
Owners: pcpa
Branches: f18
InitialCC:

Comment 13 Gwyn Ciesla 2013-02-01 13:44:44 UTC
Git done (by process-git-requests).

Comment 14 Fedora Update System 2013-02-01 14:28:39 UTC
python-gd-0.56-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-gd-0.56-5.fc18

Comment 15 Fedora Update System 2013-02-02 04:29:37 UTC
python-gd-0.56-5.fc18 has been pushed to the Fedora 18 testing repository.

Comment 16 Fedora Update System 2013-02-10 04:30:41 UTC
python-gd-0.56-5.fc18 has been pushed to the Fedora 18 stable repository.


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