Spec URL: http://smani.fedorapeople.org/review/openjpeg2.spec SRPM URL: http://smani.fedorapeople.org/review/openjpeg2-2.0.0-1.svn20140403.fc21.src.rpm Description: C-Library for JPEG 2000 Fedora Account System Username: smani
*** Bug 1001399 has been marked as a duplicate of this bug. ***
Hi, I have made review for you. Here is filled review form. There were few problems.(ldconf,...) My comment starts with "JC:". Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues: ======= ===== MUST items ===== C/C++: [-]: Provides: bundled(gnulib) in place as required. [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [x]: Header files in -devel subpackage, if present. [x]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. [x]: Development (unversioned) .so files in -devel subpackage, if present. 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. [!]: License field in the package spec file matches the actual license. JC: includes thirdparty libs sources under different licences (zlib,libpng,libtiff) See further winditrent.h are under MIT, are they used in build? Please check it. [x]: License file installed when any subpackage combination is installed. [!]: Package requires other packages for directories it uses. Note: No known owner of /usr/lib64/openjpeg-2.0 JC: Owns just Cmake files for devel, not the dir. Is it right place? [!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/lib64/openjpeg-2.0 JC: Same as above. [x]: %build honors applicable compiler flags or justifies otherwise. [!]: Package contains no bundled libraries without FPC exception. JC: Can you remove thirdparty libs from package ?(delete all except Cmake file or ...) [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [x]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [!]: Requires correct, justified where necessary. JC: SubPackages Require: bad format %{name}-libs%{?_isa} = %{version}-%{release} redundant '-libs'(should be like %{name}%{?_isa} = ...) [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Useful -debuginfo package or justification otherwise. [x]: Package is not known to require an ExcludeArch tag. [!]: Package complies to the Packaging Guidelines JC: Library is not registered with ldconf. http://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [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]: Package does not own files or directories owned by other packages. [x]: All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package do not use a name that already exist [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local ===== SHOULD items ===== Generic: [!]: Sources can be downloaded from URI in Source: tag Note: Could not download Source0: http://sourceforge.net/projects/openjpeg.mirror/files/openjpeg-2.0.0-svn20140403.tar.gz See: http://fedoraproject.org/wiki/Packaging:Guidelines#Tags [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [!]: Final provides and requires are sane (see attachments). JC: as in MUST ( Requires: ) [!]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in openjpeg2-devel , openjpeg2-devel-docs , openjpeg2-tools JC: as in MUST [x]: Package does not include license text files separate from upstream. [-]: %check is present and all tests pass. JC: Is it possible to run build-in test-suit in %check phase? [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [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) [x]: Dist tag is present (not strictly required in GL). [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Uses parallel make %{?_smp_mflags} macro. [x]: The placement of pkgconfig(.pc) files are correct. [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [!]: Rpmlint is run on all installed packages. Note: Mock build failed See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint [x]: Large data in /usr/share should live in a noarch subpackage if package is arched. [x]: Spec file according to URL is the same as in SRPM. Installation errors ------------------- INFO: mock.py version 1.1.36 starting... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run Mock Version: 1.1.36 INFO: Mock Version: 1.1.36 Start: lock buildroot INFO: installing package(s): /home/jcajka/1084021-openjpeg2/results/openjpeg2-2.0.0-1.svn20140403.fc20.x86_64.rpm /home/jcajka/1084021-openjpeg2/results/openjpeg2-devel-2.0.0-1.svn20140403.fc20.x86_64.rpm /home/jcajka/1084021-openjpeg2/results/openjpeg2-devel-docs-2.0.0-1.svn20140403.fc20.noarch.rpm /home/jcajka/1084021-openjpeg2/results/openjpeg2-tools-2.0.0-1.svn20140403.fc20.x86_64.rpm ERROR: Command failed: # ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-20-x86_64/root/', '--releasever', '20', 'install', '/home/jcajka/1084021-openjpeg2/results/openjpeg2-2.0.0-1.svn20140403.fc20.x86_64.rpm', '/home/jcajka/1084021-openjpeg2/results/openjpeg2-devel-2.0.0-1.svn20140403.fc20.x86_64.rpm', '/home/jcajka/1084021-openjpeg2/results/openjpeg2-devel-docs-2.0.0-1.svn20140403.fc20.noarch.rpm', '/home/jcajka/1084021-openjpeg2/results/openjpeg2-tools-2.0.0-1.svn20140403.fc20.x86_64.rpm', '--setopt=tsflags=nocontexts'] Error: Package: openjpeg2-devel-2.0.0-1.svn20140403.fc20.x86_64 (/openjpeg2-devel-2.0.0-1.svn20140403.fc20.x86_64) Requires: openjpeg2-libs(x86-64) = 2.0.0-1.svn20140403.fc20 You could try using --skip-broken to work around the problem Error: Package: openjpeg2-tools-2.0.0-1.svn20140403.fc20.x86_64 (/openjpeg2-tools-2.0.0-1.svn20140403.fc20.x86_64) Requires: openjpeg2-libs(x86-64) = 2.0.0-1.svn20140403.fc20 You could try running: rpm -Va --nofiles --nodigest Rpmlint ------- Checking: openjpeg2-2.0.0-1.svn20140403.fc20.x86_64.rpm openjpeg2-devel-2.0.0-1.svn20140403.fc20.x86_64.rpm openjpeg2-devel-docs-2.0.0-1.svn20140403.fc20.noarch.rpm openjpeg2-tools-2.0.0-1.svn20140403.fc20.x86_64.rpm openjpeg2-2.0.0-1.svn20140403.fc20.src.rpm openjpeg2.x86_64: W: spelling-error %description -l en_US codec -> codex, code, codes openjpeg2.x86_64: W: spelling-error %description -l en_US multispectral -> multiculturalism openjpeg2.x86_64: W: spelling-error %description -l en_US hyperspectral -> hyper spectral, hyper-spectral, hyperspace openjpeg2.x86_64: W: manual-page-warning /usr/share/man/man3/libopenjp2.3.gz 127: warning: macro `p' not defined openjpeg2.x86_64: W: file-not-utf8 /usr/share/doc/openjpeg2/AUTHORS openjpeg2.x86_64: E: library-without-ldconfig-postin /usr/lib64/libopenjp2.so.2.0.1 openjpeg2.x86_64: E: library-without-ldconfig-postun /usr/lib64/libopenjp2.so.2.0.1 openjpeg2-devel.x86_64: W: no-documentation openjpeg2.src: W: spelling-error %description -l en_US codec -> codex, code, codes openjpeg2.src: W: spelling-error %description -l en_US multispectral -> multiculturalism openjpeg2.src: W: spelling-error %description -l en_US hyperspectral -> hyper spectral, hyper-spectral, hyperspace openjpeg2.src: W: invalid-url Source0: http://sourceforge.net/projects/openjpeg.mirror/files/openjpeg-2.0.0-svn20140403.tar.gz HTTP Error 404: Not Found 5 packages and 0 specfiles checked; 2 errors, 10 warnings. Requires -------- openjpeg2-tools (rpmlib, GLIBC filtered): libc.so.6()(64bit) liblcms2.so.2()(64bit) libm.so.6()(64bit) libopenjp2.so.7()(64bit) libpng16.so.16()(64bit) libpng16.so.16(PNG16_0)(64bit) libtiff.so.5()(64bit) libtiff.so.5(LIBTIFF_4.0)(64bit) libz.so.1()(64bit) openjpeg2-libs(x86-64) rtld(GNU_HASH) openjpeg2-devel-docs (rpmlib, GLIBC filtered): openjpeg2 (rpmlib, GLIBC filtered): libc.so.6()(64bit) libm.so.6()(64bit) rtld(GNU_HASH) openjpeg2-devel (rpmlib, GLIBC filtered): /usr/bin/pkg-config libopenjp2.so.7()(64bit) openjpeg2-libs(x86-64) Provides -------- openjpeg2-tools: openjpeg2-tools openjpeg2-tools(x86-64) openjpeg2-devel-docs: openjpeg2-devel-docs openjpeg2: libopenjp2.so.7()(64bit) openjpeg2 openjpeg2(x86-64) openjpeg2-devel: openjpeg2-devel openjpeg2-devel(x86-64) pkgconfig(libopenjp2) Generated by fedora-review 0.5.1 (bb9bf27) last change: 2013-12-13 Command line :/usr/bin/fedora-review -b 1084021 Buildroot used: fedora-20-x86_64 Active plugins: Generic, Shell-api, C/C++ Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby Disabled flags: EXARCH, EPEL5, BATCH, DISTTAG
Issues: - library not registred with ldconf - winditrent.h with MIT licence please check if it is used in build - can you remove thirdparty libs - incorrect Require: package name in subpackages - package doesnt own all created dirs Minor: - can you enable build-in tests ? - invalid source URI (sourceforge.net)
Re: tests : not practical, it requires a relatively large data set (though we can leave in hooks to do it offline occasionally, see openjpeg.spec for how it does it).
Thanks for the review, I've fixed all the issues you pointed out, but while doing so I came across some additional points: - cmake does not seem to pick up the CFLAGS exported by %cmake: If I build with -DCMAKE_BUILD_TYPE=Release, the compile flags are "-ffast-math -O3 -DNDEBUG -fPIC" where "-ffast-math" is explicitly added in the openjpeg CMakeLists.txt. What is the best way to get cmake to honour the CFLAGS env? - Rex, do you have any suggestions as to whether the optional components should be built? (MJ2, JPWL, JPIP, JPIP_SERVER, JP3D, Java bindings). I see you didn't build them in the 1.x package.
Hi Sandro. I see the -ffast-math and -O3 switches reasonable here. It's an image decoder and therefore it needs to be really fast. So, I believe this is a good reason for not honouring the env CFLAGS in this case. Of course you could inject the other missing flags with some scripting. Regards, Jaromir.
Note: I just tested the build with the -DCMAKE_BUILD_TYPE=Release option and it produces -O2 in my case. Please, recheck ...
FWIW the CMAKE_BUILD_TYPE is usually set to RelWithDebInfo for cmake based projects
cflags are respected here too, the only thing CMakeLists.txt contains that is relevant, is the addition of -ffast-math in Release mode, set(CMAKE_C_FLAGS_RELEASE "-ffast-math ${CMAKE_C_FLAGS_RELEASE}")
(In reply to Rex Dieter from comment #4) > Re: tests : not practical, it requires a relatively large data set (though > we can leave in hooks to do it offline occasionally, see openjpeg.spec for > how it does it). Yes. This way is acceptable.
Re: optional components Since upstream doesn't enable them by default (yet), I'd say the packaging should follow suit. I'm sure we may end up enabling some portions as needed by other packages, but let's cross that bridge when/if it comes up.
Spec URL: http://smani.fedorapeople.org/review/openjpeg2.spec SRPM URL: http://smani.fedorapeople.org/review/openjpeg2-2.0.0-2.svn20140403.fc21.src.rpm %changelog * Wed Apr 09 2014 Sandro Mani <manisandro> - 2.0.0-2.svn20140403 - Remove thirdparty libraries folder in prep - Own %%{_libdir}/openjpeg-2.0/ - Fix Requires - Add missing ldconfig - Add possibility to run conformance tests if desired Note: it indeed works with the CFLAGS, I somehow managed to pollute my environment (doing too many things at the same time...) As for the URL: it does not work because I'm using a snapshot (the reason being I wanted pkgconfig support). Possibly I should just backport that patch to the official 2.0.0 release though.
(In reply to Sandro Mani from comment #12) > As for the URL: it does not work because I'm using a snapshot (the reason > being I wanted pkgconfig support). Possibly I should just backport that > patch to the official 2.0.0 release though. Well, the link seems to be invalid anyway ... if you keep just the filename part there, then the checker could be satisfied.
Spec URL: http://smani.fedorapeople.org/review/openjpeg2.spec SRPM URL: http://smani.fedorapeople.org/review/openjpeg2-2.0.0-3.svn20140403.fc21.src.rpm %changelog * Wed Apr 09 2014 Sandro Mani <manisandro> - 2.0.0-3.svn20140403 - Fix source url - Fix mixed tabs and spaces - Fix description too long
Maybe one of the last notes: https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define Even when the defines are commented out, it would be probably better to replace them with globals as stated in the guidelines ... but it's up to you.
The testsuite doesn't work correctly with the data cloned using the command in the comment. Only 11% of tests pass regardless of the data presence. But I suggest to fix that after the initial import so that we don't block the upgrades.
#define optional_components 1S When i uncomment this the S on end breaks optional components build And one file from optional components is not packaged RPM build errors: Installed (but unpackaged) file(s) found: /usr/share/opj_jpip_viewer.jar
Spec URL: http://smani.fedorapeople.org/review/openjpeg2.spec SRPM URL: http://smani.fedorapeople.org/review/openjpeg2-2.0.0-4.svn20140403.fc21.src.rpm * Thu Apr 10 2014 Sandro Mani <manisandro> - 2.0.0-4.svn20140403 - Replace define with global - Fix #define optional_components 1S typo - Fix %%(pwd) -> $PWD for test data - Added some BR for optional components - Include opj2_jpip_viewer.jar in %%files Regarding /usr/share/opj_jpip_viewer.jar: This only gets built if a JDK is detected. I've now added the java-devel BR, though for completeness I should also look at packaging the jpip server and provide an appropriate systemd service file. But I'd say lets leave that for when a use case comes up. Regarding the tests: there are still failing tests, which is not because of the data which cannot be found this time though.
All problems solved. APPROVED
Thanks! Does anyone see any need for this for F20/F19? If not, I'll push it to rawhide only.
I recall at least one request for F20
New Package SCM Request ======================= Package Name: openjpeg2 Short Description: C-Library for JPEG 2000 Owners: smani Branches: f20 InitialCC:
Git done (by process-git-requests).
(In reply to Sandro Mani from comment #20) > Does anyone see any need for this for F20/F19? If not, I'll push it to > rawhide only. Please, make it available for F20. Updating mupdf (#848904) was delayed because of the lack of the openjpeg2 package. Many thanks for your help, Pablo
openjpeg2-2.0.0-4.svn20140403.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/openjpeg2-2.0.0-4.svn20140403.fc20
openjpeg2-2.0.0-4.svn20140403.fc20 has been pushed to the Fedora 20 testing repository.
openjpeg2-2.0.0-5.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/openjpeg2-2.0.0-5.fc20
openjpeg2-2.0.0-5.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.