Bug 1761576 - Review Request: zmat - A portable and easy-to-use data compression library
Summary: Review Request: zmat - A portable and easy-to-use data compression library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-neuro, NeuroFedora
TreeView+ depends on / blocked
 
Reported: 2019-10-14 18:50 UTC by Qianqian Fang
Modified: 2019-10-31 00:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-21 14:20:10 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Qianqian Fang 2019-10-14 18:50:39 UTC
Spec URL: https://raw.githubusercontent.com/fangq/fedorapkg/zmat-devel/zmat.spec
SRPM URL: http://kwafoo.coe.neu.edu/~fangq/share/temp/zmat-0.9.2-1.fc30.src.rpm
Description: 

ZMat is a portable C library to enable easy-to-use data compression
and decompression (such as zlib/gzip/lzma/lzip/lz4/lz4hc algorithms)
and base64 encoding/decoding in an application. 
It is fast and compact, can process a large array within a fraction 
of a second. Among the supported compression methods, lz4 is the 
fastest for compression/decompression; lzma is the slowest but has 
the highest compression ratio; zlib/gzip have the best balance 
between speed and compression time.

Fedora Account System Username: fangq

Comment 1 Qianqian Fang 2019-10-14 18:57:01 UTC
rpmlint outputs

fangq@localhost:~/space/git/fedorapkg$ rpmlint /home/fangq/rpmbuild/SRPMS/zmat-0.9.2-1.fc30.src.rpm
zmat.src: W: spelling-error Summary(en_US) eazy -> easy, lazy, hazy
zmat.src: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
zmat.src: W: spelling-error %description -l en_US gzip -> zip, grip, g zip
zmat.src: W: spelling-error %description -l en_US lzma -> lama
zmat.src: W: spelling-error %description -l en_US lzip -> lip, zip, l zip
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

fangq@localhost:~/space/git/fedorapkg$ rpmlint /home/fangq/rpmbuild/RPMS/x86_64/zmat-0.9.2-1.fc30.x86_64.rpm 
zmat.x86_64: W: spelling-error Summary(en_US) eazy -> easy, lazy, hazy
zmat.x86_64: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
zmat.x86_64: W: spelling-error %description -l en_US gzip -> zip, grip, g zip
zmat.x86_64: W: spelling-error %description -l en_US lzma -> lama
zmat.x86_64: W: spelling-error %description -l en_US lzip -> lip, zip, l zip
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

fangq@localhost:~/space/git/fedorapkg$ rpmlint /home/fangq/rpmbuild/RPMS/x86_64/zmat-devel-0.9.2-1.fc30.x86_64.rpm
zmat-devel.x86_64: W: no-version-dependency-on zmat/zmat-libs/libzmat 0.9.2
zmat-devel.x86_64: W: spelling-error Summary(en_US) eazy -> easy, lazy, hazy
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

Comment 2 Robert-André Mauchin 🐧 2019-10-15 16:43:32 UTC
 - Do you really need to provide static libraries? There are usually not provided in Fedora.

 - Use install -p to keep timestamps

 - To avoid unintentional soname bump, we forbid globbing the major soname version, be more specific instead:

%{_libdir}/lib%{name}.so.*

 - Probably need to delete that:

pwd
ls easylzma-0.0.8/include/

 - I see the GPL license file, but where does the or BSD come from?

Comment 3 Qianqian Fang 2019-10-15 17:13:29 UTC
> - Do you really need to provide static libraries? There are usually not
provided in Fedora.


I personally like linking with static libraries because it makes the software more portable. So, if possible, I would like to provide the .a


>- Use install -p to keep timestamps

Got it


>- To avoid unintentional soname bump, we forbid globbing the major soname
version, be more specific instead:

>%{_libdir}/lib%{name}.so.*


Can you clarify this a little bit? Did you mean I should replace 
lib%{name}.so with libzmat.so? Or I must name this library to something else? Does this also apply to the .a file as well?

Let me know, I can update the spec file.


>- Probably need to delete that:

pwd
ls easylzma-0.0.8/include/

Yes, those were for debugging purposes


> - I see the GPL license file, but where does the or BSD come from?

I placed the code under dual license of gpl and bsd.

Comment 4 Robert-André Mauchin 🐧 2019-10-15 17:38:54 UTC
(In reply to Qianqian Fang from comment #3)
> > - Do you really need to provide static libraries? There are usually not
> provided in Fedora.
> 
> 
> I personally like linking with static libraries because it makes the
> software more portable. So, if possible, I would like to provide the .a
> 
Read that part then: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_static_libraries

Static libraries and shared libraries. In this case, the static libraries MUST be placed in a *-static subpackage. Separating the static libraries from the other development files in *-devel allow us to track this usage by checking which packages BuildRequire the *-static package. The intent is that whenever possible, packages will move away from using these static libraries, to the shared libraries. If the *-static subpackage requires headers or other files from *-devel in order to be useful it MUST require the *-devel subpackage.

tl;dr: create a static subpackage for your static library

> 
> >- Use install -p to keep timestamps
> 
> Got it
> 
> 
> >- To avoid unintentional soname bump, we forbid globbing the major soname
> version, be more specific instead:
> 
> >%{_libdir}/lib%{name}.so.*
> 
> 
> Can you clarify this a little bit? Did you mean I should replace 
> lib%{name}.so with libzmat.so? Or I must name this library to something
> else? Does this also apply to the .a file as well?
> 

The major soname must not be globbed, so replace %{_libdir}/lib%{name}.so.* with %{_libdir}/lib%{name}.so.0* 
or whatever number is the major soversion.

> Let me know, I can update the spec file.
> 
> 
> >- Probably need to delete that:
> 
> pwd
> ls easylzma-0.0.8/include/
> 
> Yes, those were for debugging purposes
> 
> 
> > - I see the GPL license file, but where does the or BSD come from?
> 
> I placed the code under dual license of gpl and bsd.

This doesn't appeas in the license file or the github repo.

Comment 5 Qianqian Fang 2019-10-15 21:24:31 UTC
@Rob, thanks, my bad, the license is GPL only.

both the spec and srpm files are updated. the suggested -p flag, soname issue and the static packages are updated. the static package also set the devel package as dependency, as required. 

let me know if this looks ok to you, thanks!

Comment 6 Qianqian Fang 2019-10-15 21:41:52 UTC
also, rpmbuild asked for libzmat.so.1 when making the package, my software version is 0.9.2. I just want to make sure so.1 is the right soname for this package.

Comment 7 Robert-André Mauchin 🐧 2019-10-16 14:12:21 UTC
- Build fails:

+ pushd src
~/build/BUILD/zmat-0.9.2/src ~/build/BUILD/zmat-0.9.2
+ /usr/bin/make -O -j8 V=1 VERBOSE=1 clean
rm -f zmatlib.o lz4/lz4.o lz4/lz4hc.o ../zipmat.mex*
+ /usr/bin/make -O -j8 V=1 VERBOSE=1 lib BINARY=libzmat.a
Building zmatlib.o
cc -Ieasylzma/easylzma-0.0.8/include -g -Wall -O3    -c -o zmatlib.o zmatlib.c
zmatlib.c:8:10: fatal error: zlib.h: No such file or directory
    8 | #include "zlib.h"
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:136: zmatlib.o] Error 1
make: *** Waiting for unfinished jobs....
Building lz4/lz4hc.o
cc -Ieasylzma/easylzma-0.0.8/include -g -Wall -O3    -c -o lz4/lz4hc.o lz4/lz4hc.c
Building lz4/lz4.o
cc -Ieasylzma/easylzma-0.0.8/include -g -Wall -O3    -c -o lz4/lz4.o lz4/lz4.c
error: Bad exit status from /var/tmp/rpm-tmp.taM1fu (%build)

 - Remove from -devel:

Provides:       %{name}-static = %{version}-%{release}

 - The devel has no proper Requires:

Requires:       %{name}%{?_isa} = %{version}-%{release}

 - Remove from devel:

%license LICENSE.txt
%doc README.rst
%doc AUTHORS.txt

since it depends on the main package this is not needed.

Comment 8 Robert-André Mauchin 🐧 2019-10-16 14:16:05 UTC
Also the builds you do in src/ do not seem to repect Fedora CFLAGS/CXXFLAGS, you need to fix that.

Comment 9 Robert-André Mauchin 🐧 2019-10-16 14:47:20 UTC
 - Add BR zlib-devl

 - This seems to work for build flags:

pushd src
%make_build clean
%make_build lib BINARY=lib%{name}.a CPPOPT="%{optflags} -fPIC"
cp ../lib%{name}.a ../lib/
cp zmatlib.h ../include
%make_build clean
%make_build dll BINARY=lib%{name}.so CPPOPT="%{optflags} -fPIC"
mv ../lib%{name}.so ../lib/lib%{name}.so.%{version}
popd

Comment 10 Qianqian Fang 2019-10-16 18:19:51 UTC
thanks, I updated the spec file according to your above review 

https://github.com/fangq/fedorapkg/commit/079c4aa8182cd99993e4f1357446b905bede4c72

both the spec file and the srpm files are updated (url unchanged)

> Also the builds you do in src/ do not seem to repect Fedora CFLAGS/CXXFLAGS, you need to fix that.

I looked at my Makefile, and see that I did not use those standard flags. I will change this from upstream in the future releases, but will leave the spec file as you suggested in this initial package.

let me know if this looks ok to you, thanks

Comment 11 Qianqian Fang 2019-10-18 15:05:54 UTC
@Rob, let me know if the spec file is acceptable. thanks

Comment 12 Robert-André Mauchin 🐧 2019-10-18 16:43:55 UTC
Package approved.


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

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



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

C/C++:
[x]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[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.
[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". 54 files have unknown license. Detailed
     output of licensecheck in /home/bob/packaging/review/zmat/review-
     zmat/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[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.
[x]: Requires correct, justified where necessary.
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[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 %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[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]: Dist tag is present.
[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 does not use a name that already exists.
[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]: Static libraries in -static or -devel subpackage, providing -devel if
     present.
     Note: Package has .a files: zmat-static.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[-]: 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]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in zmat-
     devel , zmat-static
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[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]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[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.


Rpmlint
-------
Checking: zmat-0.9.2-1.fc32.x86_64.rpm
          zmat-devel-0.9.2-1.fc32.x86_64.rpm
          zmat-static-0.9.2-1.fc32.x86_64.rpm
          zmat-debuginfo-0.9.2-1.fc32.x86_64.rpm
          zmat-debugsource-0.9.2-1.fc32.x86_64.rpm
          zmat-0.9.2-1.fc32.src.rpm
zmat.x86_64: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
zmat.x86_64: W: spelling-error %description -l en_US gzip -> zip, grip, g zip
zmat.x86_64: W: spelling-error %description -l en_US lzma -> lama
zmat.x86_64: W: spelling-error %description -l en_US lzip -> lip, zip, l zip
zmat-devel.x86_64: W: no-documentation
zmat-static.x86_64: W: no-documentation
zmat.src: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
zmat.src: W: spelling-error %description -l en_US gzip -> zip, grip, g zip
zmat.src: W: spelling-error %description -l en_US lzma -> lama
zmat.src: W: spelling-error %description -l en_US lzip -> lip, zip, l zip
6 packages and 0 specfiles checked; 0 errors, 10 warnings.

Comment 13 Igor Raits 2019-10-21 10:43:04 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/zmat

Comment 14 Fedora Update System 2019-10-21 14:16:28 UTC
FEDORA-2019-b022167fef has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b022167fef

Comment 15 Fedora Update System 2019-10-21 14:16:52 UTC
FEDORA-2019-ae700ea630 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ae700ea630

Comment 16 Fedora Update System 2019-10-21 14:17:16 UTC
FEDORA-2019-6658c6a026 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6658c6a026

Comment 17 Qianqian Fang 2019-10-21 14:20:10 UTC
thank you @Rob. 

Package successfully built and pushed to Update for f29-rawhide. closing this ticket now.

Comment 18 Fedora Update System 2019-10-21 17:00:32 UTC
zmat-0.9.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ae700ea630

Comment 19 Fedora Update System 2019-10-21 17:48:40 UTC
zmat-0.9.2-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b022167fef

Comment 20 Fedora Update System 2019-10-23 15:43:55 UTC
zmat-0.9.2-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6658c6a026

Comment 21 Fedora Update System 2019-10-29 01:08:02 UTC
zmat-0.9.2-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2019-10-29 03:35:07 UTC
zmat-0.9.2-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2019-10-31 00:57:21 UTC
zmat-0.9.2-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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