Bug 852898 - Review Request: CImg - C++ Template Image Processing Toolkit
Summary: Review Request: CImg - C++ Template Image Processing Toolkit
Keywords:
Status: CLOSED DUPLICATE of bug 1001008
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Thibault North
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 22:19 UTC by Gerd v. Egidy
Modified: 2013-10-26 04:41 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-10-26 04:41:11 UTC
Type: ---
Embargoed:
thibault.north: fedora-review+


Attachments (Terms of Use)

Description Gerd v. Egidy 2012-08-29 22:19:25 UTC
Spec URL: https://github.com/gvegidy/photivo-rpm/raw/master/CImg/CImg.spec
SRPM URL: http://www.egidy.de/fedora/CImg-1.5.0-4.fc17.src.rpm
Description:
The CImg Library is a small, open source, C++ toolkit for image processing.

CImg defines classes and methods to manage images in your own C++ code. 
You can use it to load/save various file formats, access pixel values, 
display/transform/filter images, draw primitives (text, faces, curves, 
3d objects, ...), compute statistics, manage user interactions on images,
and so on...

Fedora Account System Username: gvegidy

The history of this package can be seen at https://github.com/gvegidy/photivo-rpm/tree/master/CImg

This is the first package I want to maintain, so I also need a sponsor.

I want to maintain this package because it is a dependency of two other programs I'm interested to also maintain in the near future: photivo (raw photo editor) and gmic (graphics filter pipeline system & plugin for gimp).

I have contacted the upstream author David Tschumperlé. He included a patch from me.

Comment 1 Gerd v. Egidy 2012-08-29 22:29:56 UTC
Some additional info for review:

rpmlint output:
# rpmlint /home/gerd/rpmbuild/RPMS/noarch/CImg-devel-1.5.0-4.fc17.noarch.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# rpmlint /home/gerd/rpmbuild/SRPMS/CImg-1.5.0-4.fc17.src.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# rpmlint CImg.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

I also did koji scratch builds for f16 to f18 which succeeded:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4436135
http://koji.fedoraproject.org/koji/taskinfo?taskID=4436149
http://koji.fedoraproject.org/koji/taskinfo?taskID=4436182

The only thing I'm not 100% sure is the naming of the package: this is a C++ template library which consists only of a header file and documentation. There is no .so or .a created or needed.

I was shown the package "eigen2" which is exactly the same kind. I modeled my package exactly like that:

- the .spec is called CImg.spec
- it contains a %package devel
- all files are in %files devel
- there is no %files, so there is no CImg-%{version}...rpm created, just the -devel one

Comment 2 Thibault North 2012-08-29 22:53:22 UTC
I'll review this one.

Comment 3 Thibault North 2012-08-29 23:00:20 UTC
Oops forgot the FE-NEEDSPONSOR. Looking for a sponsor...

Comment 4 Ralf Corsepius 2012-08-30 03:35:37 UTC
Some remarks:

* The directory /usr/include/CImg is unowned and needs to be owned by this package (MUSTFIX):

# rpm -qlp CImg-devel-1.5.0-4.fc17.noarch.rpm  | grep include
/usr/include/CImg/CImg.h
/usr/include/CImg/plugins
/usr/include/CImg/plugins/add_fileformat.h
/usr/include/CImg/plugins/cimgIPL.h
/usr/include/CImg/plugins/cimg_ipl.h
/usr/include/CImg/plugins/cimgmatlab.h
/usr/include/CImg/plugins/draw_gradient.h
/usr/include/CImg/plugins/jpeg_buffer.h
/usr/include/CImg/plugins/loop_macros.h
/usr/include/CImg/plugins/nlmeans.h
/usr/include/CImg/plugins/skeleton.h
/usr/include/CImg/plugins/vrml.h
/usr/include/CImg/plugins/vtk.h

* [SHOULD] CImg.h includes a lot of headers from other packages. Rule of thumb is to add those packages owning unconditionally included headers, as "Requires:" to the "*-devel" packages.

 However, due to the "cpp magic" being applied in CImg.h, I am having difficulties in figuring out which of them are mandatory and which are optional ;)

From what I can gather, at least libstdc++-devel needs to be BR:'ed, but I am not sure about the other headers (eg. X11 headers).


* [SUGGESTION] The package contains an "examples" subdirectory. AFAIS, this directory could be utilized as "minimal" compilation test. I therefore would suggest to build it (e.g. "make linux" or "make mlinux") in %check.

Comment 5 Gerd v. Egidy 2012-08-30 20:50:56 UTC
Hi Ralf,

thank you very much for looking into this.

> * The directory /usr/include/CImg is unowned and needs to be owned by this
> package (MUSTFIX):

done
 
> * [SHOULD] CImg.h includes a lot of headers from other packages. Rule of
> thumb is to add those packages owning unconditionally included headers, as
> "Requires:" to the "*-devel" packages.

good idea, done.
 
> From what I can gather, at least libstdc++-devel needs to be BR:'ed, but I
> am not sure about the other headers (eg. X11 headers).

yeah, libstdc++-devel and glibc-headers are always needed. But from what I could see X11 (and the other stuff) is optional. You need to set defines before they are included.
 
> * [SUGGESTION] The package contains an "examples" subdirectory. AFAIS, this
> directory could be utilized as "minimal" compilation test. I therefore would
> suggest to build it (e.g. "make linux" or "make mlinux") in %check.

done.

New package:

Spec URL: https://github.com/gvegidy/photivo-rpm/raw/master/CImg/CImg.spec
SRPM URL: http://www.egidy.de/fedora/CImg-1.5.1-1.fc17.src.rpm

# rpmlint CImg-1.5.1-1.fc17.src.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# rpmlint CImg-devel-1.5.1-1.fc17.noarch.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# rpmlint CImg.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

Scratch builds ok:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4439538
http://koji.fedoraproject.org/koji/taskinfo?taskID=4439563
http://koji.fedoraproject.org/koji/taskinfo?taskID=4439565

Comment 6 Gerd v. Egidy 2012-09-03 09:23:25 UTC
Ralf kindly agreed to sponsor me, so no sponsor needed anymore.

Comment 7 Thibault North 2012-09-10 16:20:57 UTC
Ralf, were you about to review this package ?
If so, I'll step back from the review and the following can be considered informal.

MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review. OK
MUST: The package must be named according to the Package Naming Guidelines OK
MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption. OK
MUST: The package must meet the Packaging Guidelines OK
MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines OK
MUST: The License field in the package spec file must match the actual license. OK
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 %doc. OK
MUST: The spec file must be written in American English. OK
MUST: The spec file for the package MUST be legible. OK
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. OK
MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. OK
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. N/A
MUST: 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. OK
MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden. N/A
MUST: 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. N/A
MUST: Packages must NOT bundle copies of system libraries. OK
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. N/A
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. OK
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) OK
MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. OK
MUST: Each package must consistently use macros. OK
MUST: The package must contain code, or permissable content. OK
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). Doc can be considered small at this point.
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. OK
MUST: Static libraries must be in a -static package. N/A
MUST: Development files must be in a -devel package. Headers only, OK
MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release} N/A
MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built. OK
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. 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. OK
MUST: All filenames in rpm packages must be valid UTF-8. OK

Comment 8 Thibault North 2012-10-02 14:44:01 UTC
It looks like we can go forwards and finalize this review.

According to the previous review, the package is good and therefore APPROVED.

Comment 9 Ralf Corsepius 2012-10-02 15:14:03 UTC
(In reply to comment #8)
> It looks like we can go forwards and finalize this review.
> 
> According to the previous review, the package is good and therefore APPROVED.

Would you please be so kind and not rush it overly hasty. Sending a private mail off-list asking me to look back into this package and then to approve the package 1/2 hour later is not necessarily nice.

Therefore, I am going to reiterate what I answered a couple of : 

Did you check this package works on all Fedora architectures?

Last time I checked, running testsuite on different architectures exposed arch-dependent bugs of this package.

Therefore, I am considering to propose to make the srpm  "arch'ed" (BuildArch != noarch) and to make the binary package a "noarched" subpackage (Arch: noarch).

I know this diverges from Fedora's "common rules", however this would assure the testsuite is being run as part of building on all Fedora architectures, while the final binary rpm would still be "noarched".

Comment 10 Thibault North 2012-10-02 16:40:02 UTC
>Would you please be so kind and not rush it overly hasty. Sending a private mail
>off-list asking me to look back into this package and then to approve the 
>package 1/2 hour later is not necessarily nice.

The private mail you refer to wasn't originally mine and was sent two days ago.

> Therefore, I am going to reiterate what I answered a couple of : 

As mentioned off-list, we'll look into that. In the meantime, feel free to take over this if you want to.

Comment 11 Gerd v. Egidy 2012-10-10 23:27:53 UTC
Hi Ralf,

(In reply to comment #9)
> Did you check this package works on all Fedora architectures?
> 
> Last time I checked, running testsuite on different architectures exposed
> arch-dependent bugs of this package.

Thanks for letting us know about that. Do you remember which arch was affected?

I just tried:
arm-koji build --scratch f17 CImg-1.5.1-1.fc17.src.rpm
-> http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1189131

arm-koji build --scratch f18 CImg-1.5.1-1.fc17.src.rpm
-> http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1189170

ppc-koji build --scratch f17 CImg-1.5.1-1.fc17.src.rpm
-> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=735359

ppc-koji build --scratch f18 CImg-1.5.1-1.fc17.src.rpm
-> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=735408

s390-koji build --scratch f17 CImg-1.5.1-1.fc17.src.rpm
-> http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=830500

s390-koji build --scratch f18 CImg-1.5.1-1.fc17.src.rpm
-> http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=830502

All these builds completed successfully. As per your suggestion, the rpm contains a check section to build the examples dir. If there are any arch-dependant problems I think they should have shown up.

So before I change anything with the .spec, it would be nice to know what should be fixed ;)

Are you aware of any other problems with this package that should be adressed?

Comment 12 tosca 2013-03-06 15:55:19 UTC
Just discovered the existence of Photivo and would like to install it under Fedora 17, but yum reported no package with this name.
Do you intend to provide it quite soon?
Thanks.

Comment 13 Michael Schwendt 2013-10-22 17:20:56 UTC
Normally, the sponsor must be the reviewer of a new contributor's first package review request. [ https://fedoraproject.org/wiki/Package_Review_Process#Reviewer ]

The practical experience, however, is that there is room for negotiatons and handling it differently. That is, the sponsor may agree to letting somebody else taking over the review, but observing the process and adding guidance where necessary.

In this ticket, the package has been approved on 2012-10-02, but there seems to be disagreement about the packaging, and a SCM request has not been filed yet. No surprise it hasn't been built officially.

[...]

Running "fedora-review -b 852898" for this ticket fails building for Rawhide:

  …
  pdflatex refman
  make: pdflatex: Command not found
  …

[...]

I suggest withdrawing the approval and taking another look, or letting the sponsor perform the review.

Comment 14 Christopher Meng 2013-10-22 23:31:55 UTC
This package needs many patches to be built, not so simple IMO here on my machine.

(In reply to tosca from comment #12)
> Just discovered the existence of Photivo and would like to install it under
> Fedora 17, but yum reported no package with this name.
> Do you intend to provide it quite soon?
> Thanks.

I will post a review later.

Comment 15 tosca 2013-10-22 23:33:53 UTC
Thanks for the message.
In case you intend to do something about this, I'm now in Fedora 19.

Comment 16 Christopher Meng 2013-10-26 04:41:11 UTC

*** This bug has been marked as a duplicate of bug 1001008 ***


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