Bug 1152653

Summary: Review Request: miniz - Compression library implementing the zlib and Deflate
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: Package ReviewAssignee: Scott Talbert <swt>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, swt
Target Milestone: ---Flags: swt: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: miniz-1.15-1.r4.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:43:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1085059, 1153074, 1153636    

Description Petr Pisar 2014-10-14 15:41:29 UTC
Spec URL: https://ppisar.fedorapeople.org/miniz/miniz.spec
SRPM URL: https://ppisar.fedorapeople.org/miniz/miniz-1.15-0.1.r4.fc22.src.rpm
Description:
Miniz is a lossless, high performance data compression library in a single
source file that implements the zlib (RFC 1950) and Deflate (RFC 1951)
compressed data format specification standards. It supports the most commonly
used functions exported by the zlib library, but is a completely independent
implementation so zlib's licensing requirements do not apply. It also
contains simple to use functions for writing PNG format image files and
reading/writing/appending ZIP format archives. Miniz's compression speed has
been tuned to be comparable to zlib's, and it also has a specialized real-time
compressor function designed to compare well against fastlz/minilzo.

Fedora Account System Username: ppisar

Comment 1 Scott Talbert 2014-10-15 12:41:07 UTC
*** Bug 1152804 has been marked as a duplicate of this bug. ***

Comment 2 Scott Talbert 2014-10-15 21:46:46 UTC
I was working on packaging the same package, so I'll take this review.

Comment 3 Scott Talbert 2014-10-15 22:23:13 UTC
A few initial comments.

> Release:    0.1.%{miniz_rc}%{?dist}

I'm thinking this should just be 1.%{miniz_rc}%{?dist} since this is a post-release (ie, 1.15r4 came after 1.15) rather than a pre-release.  See here:
http://fedoraproject.org/wiki/Packaging:NamingGuidelines#NonNumericRelease

> gcc %{?__global_ldflags} -fPIC -shared %{name}.o -o lib%{name}.so

I'm wondering if we should be adding soname versioning?  It doesn't seem like upstream is changing much but it seems like it might be good to have.

Comment 4 Scott Talbert 2014-10-16 03:14:19 UTC
Package Review
==============

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


Issues:
=======
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages
- Pre-compiled binaries included in source package.  According to guidelines,
  "Remove all pre-built program binaries and program libraries in %prep prior
  to the building of the package"
  See http://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries


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

C/C++:
[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.

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.
[-]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.
[-]: 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
[-]: 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.
[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]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Scriptlets must be sane, if 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: Fully versioned dependency in subpackages if applicable.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[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: miniz-1.15-0.1.r4.fc20.x86_64.rpm
          miniz-devel-1.15-0.1.r4.fc20.x86_64.rpm
          miniz-1.15-0.1.r4.fc20.src.rpm
miniz.x86_64: W: spelling-error Summary(en_US) zlib -> lib, glib, z lib
miniz.x86_64: W: spelling-error %description -l en_US lossless -> loss less, loss-less, loveless
miniz.x86_64: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
miniz.x86_64: W: spelling-error %description -l en_US zlib's -> lib's, z lib's, libel's
miniz.x86_64: W: spelling-error %description -l en_US fastlz -> fastball
miniz.x86_64: W: spelling-error %description -l en_US minilzo -> minion
miniz.x86_64: W: invalid-license Unlicense
miniz.x86_64: W: no-soname /usr/lib64/libminiz.so
miniz.x86_64: W: no-documentation
miniz-devel.x86_64: W: invalid-license Unlicense
miniz-devel.x86_64: W: no-documentation
miniz.src: W: spelling-error Summary(en_US) zlib -> lib, glib, z lib
miniz.src: W: spelling-error %description -l en_US lossless -> loss less, loss-less, loveless
miniz.src: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
miniz.src: W: spelling-error %description -l en_US zlib's -> lib's, z lib's, libel's
miniz.src: W: spelling-error %description -l en_US fastlz -> fastball
miniz.src: W: spelling-error %description -l en_US minilzo -> minion
miniz.src: W: invalid-license Unlicense
miniz.src: W: invalid-url Source0: https://miniz.googlecode.com/files/miniz_v115_r4.7z HTTP Error 404: Not Found
3 packages and 0 specfiles checked; 0 errors, 19 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint miniz miniz-devel
miniz.x86_64: W: spelling-error Summary(en_US) zlib -> lib, glib, z lib
miniz.x86_64: W: spelling-error %description -l en_US lossless -> loss less, loss-less, loveless
miniz.x86_64: W: spelling-error %description -l en_US zlib -> lib, glib, z lib
miniz.x86_64: W: spelling-error %description -l en_US zlib's -> lib's, z lib's, libel's
miniz.x86_64: W: spelling-error %description -l en_US fastlz -> fastball
miniz.x86_64: W: spelling-error %description -l en_US minilzo -> minion
miniz.x86_64: W: invalid-license Unlicense
miniz.x86_64: W: no-soname /usr/lib64/libminiz.so
miniz.x86_64: W: no-documentation
miniz-devel.x86_64: W: invalid-license Unlicense
miniz-devel.x86_64: W: no-documentation
2 packages and 0 specfiles checked; 0 errors, 11 warnings.
# echo 'rpmlint-done:'



Requires
--------
miniz (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    libc.so.6()(64bit)
    rtld(GNU_HASH)

miniz-devel (rpmlib, GLIBC filtered):
    glibc-headers(x86-64)
    miniz(x86-64)



Provides
--------
miniz:
    libminiz.so()(64bit)
    miniz
    miniz(x86-64)

miniz-devel:
    miniz-devel
    miniz-devel(x86-64)



Unversioned so-files
--------------------
miniz: /usr/lib64/libminiz.so

Source checksums
----------------
https://miniz.googlecode.com/files/miniz_v115_r4.7z :
  CHECKSUM(SHA256) this package     : 3398ba4c4462011f27133092525dd34c96fd3ea7f6c497f528b602fc1d0b34ec
  CHECKSUM(SHA256) upstream package : 3398ba4c4462011f27133092525dd34c96fd3ea7f6c497f528b602fc1d0b34ec


Generated by fedora-review 0.5.2 (63c24cb) last change: 2014-07-14
Command line :/usr/bin/fedora-review -b 1152653
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

Comment 5 Petr Pisar 2014-10-16 08:16:36 UTC
(In reply to Scott Talbert from comment #3)
> A few initial comments.
> 
> > Release:    0.1.%{miniz_rc}%{?dist}
> 
> I'm thinking this should just be 1.%{miniz_rc}%{?dist} since this is a
> post-release (ie, 1.15r4 came after 1.15) rather than a pre-release.  See
> here:
> http://fedoraproject.org/wiki/Packaging:NamingGuidelines#NonNumericRelease
> 
I thought this is a release-candidate, i.e. a pre-release. There is no 1.15 listed on the download page. And the changelog in the header file lists 1.15 after 1.15r4.

> > gcc %{?__global_ldflags} -fPIC -shared %{name}.o -o lib%{name}.so
> 
> I'm wondering if we should be adding soname versioning?  It doesn't seem
> like upstream is changing much but it seems like it might be good to have.

I do not think this is good idea because SONAME is part of ABI. Having Fedora specific ABI is not good. I know this code is a library nowhere now, but that could change in the future. I want to keep the differences as little as possible.

Comment 6 Scott Talbert 2014-10-16 13:26:03 UTC
(In reply to Petr Pisar from comment #5)
> > > Release:    0.1.%{miniz_rc}%{?dist}
> > 
> > I'm thinking this should just be 1.%{miniz_rc}%{?dist} since this is a
> > post-release (ie, 1.15r4 came after 1.15) rather than a pre-release.  See
> > here:
> > http://fedoraproject.org/wiki/Packaging:NamingGuidelines#NonNumericRelease
> > 
> I thought this is a release-candidate, i.e. a pre-release. There is no 1.15
> listed on the download page. And the changelog in the header file lists 1.15
> after 1.15r4.

I am pretty sure it is a post-release.  If you go look at the SVN revision history, in r61 he originally had 1.15 but then he changes it to r3.  So I think the r's are post-release.

> > > gcc %{?__global_ldflags} -fPIC -shared %{name}.o -o lib%{name}.so
> > 
> > I'm wondering if we should be adding soname versioning?  It doesn't seem
> > like upstream is changing much but it seems like it might be good to have.
> 
> I do not think this is good idea because SONAME is part of ABI. Having
> Fedora specific ABI is not good. I know this code is a library nowhere now,
> but that could change in the future. I want to keep the differences as
> little as possible.

I had thought FPC had put something out on this but it looks like it is still draft:
https://fedorahosted.org/fpc/ticket/405
https://fedoraproject.org/wiki/User:Jstanek/Draft_-_Downstream_.so_name_versioning

So at the very least we should probably try to convince upstream to start versioning.

Comment 7 Petr Pisar 2014-10-16 14:08:54 UTC
I will change the release value to the post-release schema.

I asked upstream to version the library when he decides to support building a shared library. <https://code.google.com/p/miniz/issues/detail?id=7#c5>. Provided the request for shared library is two years old, Fedora can go on a insert it's own SONAME. I will add one.

Comment 9 Scott Talbert 2014-10-16 15:09:18 UTC
> gcc %{?__global_ldflags} -fPIC -shared -Wl,-soname,%{soname} \
>    %{name}.o -o lib%{name}.so.0.1

One nit, I think you could use your soname global on the 2nd line here.

The only other issue from the package review is the precompiled binaries in the source bundle.  I'm not sure why it matters, since it is clear they aren't going into the RPM, but the guidelines state they must be removed in %prep.

Comment 10 Petr Pisar 2014-10-16 15:21:05 UTC
Updated package is on the same URL. I kept the soname definition at the place to make it clear it's used not only in %build section.

Comment 11 Scott Talbert 2014-10-16 15:42:17 UTC
My suggestion was to replace:
> %{name}.o -o lib%{name}.so.0.1
with
> %{name}.o -o %{soname}

But that is a nit.

Package looks good to me, approved.

Comment 12 Petr Pisar 2014-10-17 06:54:59 UTC
New Package SCM Request
=======================
Package Name: miniz
Short Description: Compression library implementing the zlib and Deflate
Upstream URL: https://code.google.com/p/miniz/
Owners: ppisar
Branches: 
InitialCC:

Comment 13 Gwyn Ciesla 2014-10-17 12:03:46 UTC
Git done (by process-git-requests).

Comment 14 Petr Pisar 2014-10-17 12:43:35 UTC
Thank you for the review and the repository.

Comment 15 Petr Pisar 2014-10-20 07:54:36 UTC
Package Change Request
======================
Package Name: miniz
New Branches: f20 f21
Owners: ppisar
InitialCC:

Comment 16 Gwyn Ciesla 2014-10-20 11:59:05 UTC
Git done (by process-git-requests).

Comment 17 Fedora Update System 2014-10-20 12:20:15 UTC
miniz-1.15-1.r4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/miniz-1.15-1.r4.fc21

Comment 18 Fedora Update System 2014-10-20 12:20:48 UTC
miniz-1.15-1.r4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/miniz-1.15-1.r4.fc20

Comment 19 Fedora Update System 2014-11-01 01:45:11 UTC
miniz-1.15-1.r4.fc20 has been pushed to the Fedora 20 stable repository.

Comment 20 Fedora Update System 2014-11-01 16:33:22 UTC
miniz-1.15-1.r4.fc21 has been pushed to the Fedora 21 stable repository.