Bug 602279 - Review Request: LibRaw - Library for reading RAW files obtained from digital photo cameras
Summary: Review Request: LibRaw - Library for reading RAW files obtained from digital ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Chen Lei
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-09 14:14 UTC by Siddhesh Poyarekar
Modified: 2015-09-14 00:21 UTC (History)
9 users (show)

Fixed In Version: LibRaw-0.9.1-8.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-15 21:07:01 UTC
Type: ---
Embargoed:
supercyper1: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Siddhesh Poyarekar 2010-06-09 14:14:26 UTC
SPEC: http://siddhesh.fedorapeople.org/libraw/0.9.1-1/libraw.spec
SRPM: http://siddhesh.fedorapeople.org/libraw/0.9.1-1/libraw-0.9.1-1.fc14.src.rpm

Description:

LibRaw is based on the source codes of the dcraw utility, where part of
drawbacks have already been eliminated and part will be fixed in future.

http://www.libraw.org

Additional Notes:

* The latest release of shotwell requires libraw to build against

* This is a static libs only package. Upstream does not want to include dynamic libraries because they're not interested in maintaining binary compatibility across releases

* The one patch on top of the package is for configuration before the make, so that we can customise the install location, compiler, etc. I have sent it upstream but have not got a confirmation of acceptance yet. In any case, I intend to keep the patch even if it is rejected by upstream till the time similar functionality is made available by upstream. Upstream has rejected autotools support.

* There is no debuginfo since the current tools are not capable of getting debug information from static libraries

Comment 1 Siddhesh Poyarekar 2010-06-10 11:41:10 UTC
Modified build to disable lcms and openmp support. Upstream does not enable them by default and this can break applications building against libraw, since they need extra linker flags then. Updated spec and srpm:

http://siddhesh.fedorapeople.org/libraw/0.9.1-2/libraw.spec
http://siddhesh.fedorapeople.org/libraw/0.9.1-2/libraw-0.9.1-2.fc14.src.rpm

And a correction to the above comment: shotwell git trunk (future 0.6 release) requires libraw, not the 0.5 release.

Comment 2 Matthias Clasen 2010-06-19 15:58:27 UTC
Some preliminary comments:

- rm -rf %{buildroot} in %install is no longer required

- %clean is not required anymore either

- the way you handle the docs is wierd. Typically, these are just included in
  the file list without installing them in the tree, which makes them show up
  in %{_docdir} automatically.

Comment 3 Chen Lei 2010-06-21 12:41:12 UTC
Refer to the lastest guideline:
When a package only provides static libraries you can place all the static library files in the *-devel subpackage. When doing this you also must have a virtual Provide for the *-static package

http://fedoraproject.org/wiki/PackagingGuidelines#Packaging_Static_Libraries_2

Comment 4 Siddhesh Poyarekar 2010-06-21 13:44:21 UTC
(In reply to comment #2)
> Some preliminary comments:
> 
> - rm -rf %{buildroot} in %install is no longer required
> 
> - %clean is not required anymore either

Thanks, I'll make this change.
 
> - the way you handle the docs is wierd. Typically, these are just included in
>   the file list without installing them in the tree, which makes them show up
>   in %{_docdir} automatically.    

The reason I'm manually copying files over rather than using the %doc is that I want to build a directory tree under the doc dir to separate the manual files (*.html, *.png) from the license files. I also intend to include the sample program source code in the future. 

I referred a document that told me to avoid the %doc directive if I'm going to install a directory tree under the docdir. Unfortunately I cannot find the document anymore :(

(In reply to comment #3)
> Refer to the lastest guideline:
> When a package only provides static libraries you can place all the static
> library files in the *-devel subpackage. When doing this you also must have a
> virtual Provide for the *-static package
> 
> http://fedoraproject.org/wiki/PackagingGuidelines#Packaging_Static_Libraries_2    

That is exactly what I have tried to do. The libraw package does not get built at all since it does not have any files in it, so the only output from the build is a libraw-devel, which also provides libraw-static. Am I missing something in it?

Comment 5 Siddhesh Poyarekar 2010-06-29 05:31:17 UTC
Updated spec and srpm:

http://siddhesh.fedorapeople.org/libraw/0.9.1-3/libraw.spec
http://siddhesh.fedorapeople.org/libraw/0.9.1-3/libraw-0.9.1-3.fc14.src.rpm

Changes:

* Removed %clean section as per suggestion in comment 2
* Updated the doc installation to use %defaultdocdir instead of %docdir. The doc installation process is still the same weird one since I found the link I was referring to:

https://fedoraproject.org/wiki/How_to_create_an_RPM_package#.25files_prefixes

Comment 6 Ralf Corsepius 2010-06-29 06:06:38 UTC
You spec contains this:
%global upstream_name	LibRaw

It's Fedora convention to name packages strictly after the name upstream uses for their tarballs.
=> This package needs to be named LibRaw.

Comment 7 Siddhesh Poyarekar 2010-06-29 07:26:18 UTC
My original intention to name this libraw instead of LibRaw was to maintain consistency with other libraries being named lib* instead of Lib*. But I guess I pretty much invented my own packaging guideline there. But now this:

http://fedoraproject.org/wiki/Packaging:NamingGuidelines#General_Naming

says that it should match the upstream tarball name, but also that I should maintain consistency with other distributions if it has already been packaged elsewhere. The Debian one is already out:

http://packages.debian.org/unstable/main/libraw-dev

Do I still go ahead and try to match the upstream name?

Comment 8 Ralf Corsepius 2010-06-29 07:48:09 UTC
(In reply to comment #7)
> My original intention to name this libraw instead of LibRaw was to maintain
> consistency with other libraries being named lib* instead of Lib*. But I guess
> I pretty much invented my own packaging guideline there.
Correct, your package naming does not comply to the FPG.

> http://fedoraproject.org/wiki/Packaging:NamingGuidelines#General_Naming
> 
> says that it should match the upstream tarball name, but also that I should
> maintain consistency with other distributions if it has already been packaged
> elsewhere. The Debian one is already out:

You are misreading the FPB. Debian is irrelevant. Their naming is lower case only and in general is entirely different from Fedora's.

> http://packages.debian.org/unstable/main/libraw-dev
Note: libraw-dev - Entirely different from Fedora.

> Do I still go ahead and try to match the upstream name?    
Yes, I consider this to be a MUST FIX.

If you really want to support "libraw-*" you can add artificial Provides:.

But be warned: There are reasons why we use "the tarballs' name". You find yourselves in trouble should some other project release "libraw" packages.

Comment 9 Siddhesh Poyarekar 2010-06-29 08:38:57 UTC
Thanks. Updated SPEC and SRPM based on feedback in comment 8. The SPEC file name is also changed as a result.

http://siddhesh.fedorapeople.org/LibRaw/0.9.1-4/LibRaw.spec
http://siddhesh.fedorapeople.org/LibRaw/0.9.1-4/LibRaw-0.9.1-4.fc14.src.rpm

Comment 10 Chen Lei 2010-06-29 09:24:37 UTC
> 
> > - the way you handle the docs is wierd. Typically, these are just included in
> >   the file list without installing them in the tree, which makes them show up
> >   in %{_docdir} automatically.    
> 
> The reason I'm manually copying files over rather than using the %doc is that I
> want to build a directory tree under the doc dir to separate the manual files
> (*.html, *.png) from the license files. I also intend to include the sample
> program source code in the future. 
> 
> I referred a document that told me to avoid the %doc directive if I'm going to
> install a directory tree under the docdir. Unfortunately I cannot find the
> document anymore :(
> 

You can still use %doc.

%install
cp -pr doc manual

%file devel
%doc LICENSE.CDDL LICENSE.LibRaw.pdf LICENSE.LGPL COPYRIGHT Changelog.txt Changelog.rus
%doc manual sample
See http://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
http://fedoraproject.org/wiki/Packaging_tricks#Examples

Comment 11 Chen Lei 2010-06-29 09:36:43 UTC
The current SRPM don't honor %{optflags} correctly, this should be fixed.

From rpmbuild log:

g++ -c -DLIBRAW_NOTHREADS -O4 -I. -w -o object/dcraw_fileio.o internal/dcraw_fileio.cpp


See https://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags

Comment 12 Siddhesh Poyarekar 2010-06-30 05:23:29 UTC
Thanks, updated SPEC and SRPM based on feedback in comment 10 and comment 11:

http://siddhesh.fedorapeople.org/LibRaw/0.9.1-5/LibRaw.spec
http://siddhesh.fedorapeople.org/LibRaw/0.9.1-5/LibRaw-0.9.1-5.fc14.src.rpm

* Cleaned up the doc installation to use %doc
* Use optflags

Comment 13 Chen Lei 2010-07-03 17:05:50 UTC
1.For rpmbuild log:
g++ -DLIBRAW_NOTHREADS -O4 -I. -w -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o bin/4channels samples/4channels.cpp -L./lib -lraw  -lm  


Please remove -O4 and -w from CFLAGS.

2. rpmlint LibRaw-0.9.1-5.fc14.src.rpm 
LibRaw.src: W: spelling-error %description -l en_US dcraw -> draw, craw, d craw
LibRaw.src: W: no-cleaning-of-buildroot %clean
LibRaw.src: W: no-%clean-section
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

%clean-section is still needed for F12 and below.

3. Patch name:

It'll be better to add %{name}-%{version} into patch name.

e.g. 
Patch0: LibRaw-0.9.1-configure.patch

Patch1: LibRaw-0.9.1-configure-optflags.patch


4. Group: Amusements/Graphics -> Development/Libraries


5.%setup -q -n %{name}-%{version} can be shorted to %setup -q

6. License: LGPLv2+ with exceptions
Please explain why you use this license for LibRaw.
From website, I see the license is LGPLv2+ or CDDL or LibRaw

Please try to contact fedora-legal to add LibRaw license for fedora

See http://fedoraproject.org/wiki/Licensing#Software_License_List

Comment 14 Rex Dieter 2010-07-03 17:09:58 UTC
fwiw, 1. is mostly harmless, the last flag wins, so -O4 -O2 ends up -O2

Comment 15 Siddhesh Poyarekar 2010-07-04 05:05:20 UTC
Updated:

http://siddhesh.fedorapeople.org/LibRaw/0.9.1-6/LibRaw.spec
http://siddhesh.fedorapeople.org/LibRaw/0.9.1-6/LibRaw-0.9.1-6.fc14.src.rpm

(In reply to comment #13)
> 1.For rpmbuild log:
> g++ -DLIBRAW_NOTHREADS -O4 -I. -w -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o
> bin/4channels samples/4channels.cpp -L./lib -lraw  -lm  
> 
> 
> Please remove -O4 and -w from CFLAGS.

Fixed.
 
> 2. rpmlint LibRaw-0.9.1-5.fc14.src.rpm 
> LibRaw.src: W: spelling-error %description -l en_US dcraw -> draw, craw, d craw
> LibRaw.src: W: no-cleaning-of-buildroot %clean
> LibRaw.src: W: no-%clean-section
> 1 packages and 0 specfiles checked; 0 errors, 3 warnings.
> 
> %clean-section is still needed for F12 and below.

I intend to package for F-13 or later, so I followed the suggestion in comment 2

> 3. Patch name:
> 
> It'll be better to add %{name}-%{version} into patch name.
> 
> e.g. 
> Patch0: LibRaw-0.9.1-configure.patch
> 
> Patch1: LibRaw-0.9.1-configure-optflags.patch
> 

I've fixed this to add %{name} and hard-coded the version number (0.9.1) since I expect to be using this patch across releases and want to avoid renaming patches on rebase. Upstream acknowledged receipt of the patch but has not reverted with comments on whether it will be included in the next release.
 
> 4. Group: Amusements/Graphics -> Development/Libraries
> 

Fixed.

> 5.%setup -q -n %{name}-%{version} can be shorted to %setup -q

Fixed
 
> 6. License: LGPLv2+ with exceptions
> Please explain why you use this license for LibRaw.
> From website, I see the license is LGPLv2+ or CDDL or LibRaw
> 
> Please try to contact fedora-legal to add LibRaw license for fedora
> 
> See http://fedoraproject.org/wiki/Licensing#Software_License_List    

Fixed this to LGPLv2. I had misread the license table in http://fedoraproject.org/wiki/Licensing

The library is distributed under all those licenses, but the website also mentions that "You may choose license you like more from these three.". I chose to go with LGPLv2.1 as a result.

Comment 16 Chen Lei 2010-07-05 02:43:30 UTC
(In reply to comment #14)
> fwiw, 1. is mostly harmless, the last flag wins, so -O4 -O2 ends up -O2    

Thanks for clarification :), since shotwell 0.6.1 is released, I'll review this package.

Comment 17 Chen Lei 2010-07-05 02:53:13 UTC
(In reply to comment #15)
> Updated:
> 
> http://siddhesh.fedorapeople.org/LibRaw/0.9.1-6/LibRaw.spec
> http://siddhesh.fedorapeople.org/LibRaw/0.9.1-6/LibRaw-0.9.1-6.fc14.src.rpm
> 
> (In reply to comment #13)
> 
> > 2. rpmlint LibRaw-0.9.1-5.fc14.src.rpm 
> > LibRaw.src: W: spelling-error %description -l en_US dcraw -> draw, craw, d craw
> > LibRaw.src: W: no-cleaning-of-buildroot %clean
> > LibRaw.src: W: no-%clean-section
> > 1 packages and 0 specfiles checked; 0 errors, 3 warnings.
> > 
> > %clean-section is still needed for F12 and below.
> 
> I intend to package for F-13 or later, so I followed the suggestion in comment
> 2
OK, if you intend to package for Fedora, you can remove BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root and rm -rf %{buildroot} as well.

> > 6. License: LGPLv2+ with exceptions
> > Please explain why you use this license for LibRaw.
> > From website, I see the license is LGPLv2+ or CDDL or LibRaw
> > 
> > Please try to contact fedora-legal to add LibRaw license for fedora
> > 
> > See http://fedoraproject.org/wiki/Licensing#Software_License_List    
> 
> Fixed this to LGPLv2. I had misread the license table in
> http://fedoraproject.org/wiki/Licensing
> 
> The library is distributed under all those licenses, but the website also
> mentions that "You may choose license you like more from these three.". I chose
> to go with LGPLv2.1 as a result.    

LGPLv2.1 is not enough for LibRaw.
See http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#Dual_Licensing_Scenarios

Comment 18 Siddhesh Poyarekar 2010-07-05 06:12:53 UTC
(In reply to comment #17)
> OK, if you intend to package for Fedora, you can remove BuildRoot:
> %{_tmppath}/%{name}-%{version}-%{release}-root and rm -rf %{buildroot} as well.

Ok thanks, I'll do this in the next revision once the license details are sorted out..
 
> LGPLv2.1 is not enough for LibRaw.
> See
> http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#Dual_Licensing_Scenarios    

Thanks for clarifying. I've sent an email to legal list asking for direction on this:

http://lists.fedoraproject.org/pipermail/legal/2010-July/001313.html

Comment 19 Siddhesh Poyarekar 2010-07-07 14:42:38 UTC
Got a response for the query to legal-list:

http://lists.fedoraproject.org/pipermail/legal/2010-July/001319.html

I've modified the spec to now include GPLv2 or CDDL based on the above. Also removed buildroot stuff as mentioned in comment 17.

Updated spec and srpm:

http://siddhesh.fedorapeople.org/LibRaw/0.9.1-7/LibRaw.spec
http://siddhesh.fedorapeople.org/LibRaw/0.9.1-7/LibRaw-0.9.1-7.fc14.src.rpm

Comment 20 Chen Lei 2010-07-08 09:16:05 UTC
formal review here:
+:ok, =:needs attention, -:needs fixing

MUST Items:
[+] MUST: rpmlint must be run on every package.
[+] MUST: The package must be named according to the Package Naming Guidelines.
[+] MUST: The spec file name must match the base package %{name}
[+] MUST: The package must meet the Packaging Guidelines. [FIXME?: covers this
list and more]
[+] MUST: The package must be licensed with a Fedora approved license and meet
the Licensing Guidelines.
[+] MUST: The License field in the package spec file must match the actual
license.
[=] 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.
[+] MUST: The spec file must be written in American English.
[+] MUST: The spec file for the package MUST be legible.
[+] MUST: The sources used to build the package must match the upstream source,
as provided in the spec URL.
<<md5sum checksum>>51931411fb4e060effe78420e754312c
[+] MUST: The package must successfully compile and build into binary rpms on
at least one supported architecture.
[+] MUST: All build dependencies must be listed in BuildRequires
[+] MUST: The spec file MUST handle locales properly. This is done by using the
%find_lang macro.
[+] MUST: Every binary RPM package which stores shared library files (not just
symlinks) in any of the dynamic linker's default paths, must call ldconfig in
%post and %postun.
[+] 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.
[+] MUST: A package must not contain any duplicate files in the %files listing.
[+] MUST: Permissions on files must be set properly. Executables should be set
with executable permissions, for example. Every %files section must include a
%defattr(...) line.
[+] MUST: Each package must have a %clean section, which contains rm -rf
%{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: Each package must consistently use macros, as described in the macros
section of Packaging Guidelines.
[+] MUST: The package must contain code, or permissible content. This is
described in detail in the code vs. content section of Packaging Guidelines.
[+] MUST: If a package includes something as %doc, it must not affect the
runtime of the application.
[+] MUST: Packages must NOT contain any .la libtool archives, these should be
removed in the spec.
[+] 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.
[+] MUST: Packages must not own files or directories already owned by other
packages.
[+] MUST: All filenames in rpm packages must be valid UTF-8.   


Okay, this package is approved, you can remove LICENSE.LibRaw.pdf from %doc before importing LibRaw to cvs.

Comment 21 Siddhesh Poyarekar 2010-07-08 11:05:49 UTC
Thanks, will request cvs module now.

Comment 22 Siddhesh Poyarekar 2010-07-08 11:07:02 UTC
New Package CVS Request
=======================
Package Name: LibRaw
Short Description: Library for reading RAW files obtained from digital photo cameras
Owners: siddhesh
Branches: F-13
InitialCC:

Comment 23 Kevin Fenzi 2010-07-09 18:17:05 UTC
CVS done (by process-cvs-requests.py).

Comment 24 Fedora Update System 2010-07-09 19:45:59 UTC
LibRaw-0.9.1-8.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/LibRaw-0.9.1-8.fc13

Comment 25 Fedora Update System 2010-07-13 07:50:03 UTC
LibRaw-0.9.1-8.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update LibRaw'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/LibRaw-0.9.1-8.fc13

Comment 26 Fedora Update System 2010-07-15 21:06:55 UTC
LibRaw-0.9.1-8.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Gwyn Ciesla 2014-09-26 12:03:43 UTC
Package Change Request
======================
Package Name: LibRaw
New Branches: epel7
Owners: limb

Comment 28 Gwyn Ciesla 2014-09-26 12:14:33 UTC
Git done (by process-git-requests).


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