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
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.
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.
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
(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?
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
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.
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?
(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.
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
> > > - 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
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
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
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
fwiw, 1. is mostly harmless, the last flag wins, so -O4 -O2 ends up -O2
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.
(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.
(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
(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
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
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.
Thanks, will request cvs module now.
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:
CVS done (by process-cvs-requests.py).
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
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
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.
Package Change Request ====================== Package Name: LibRaw New Branches: epel7 Owners: limb
Git done (by process-git-requests).