This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 454416 - (mingw32-zlib) Review Request: mingw32-zlib - MinGW Windows zlib compression library
Review Request: mingw32-zlib - MinGW Windows zlib compression library
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
:
Depends On: mingw32-binutils mingw32-gcc mingw32-runtime mingw32-w32api
Blocks: mingw32-openssl mingw32-freetype mingw32-libpng mingw32-libjpeg mingw32-libxml2 mingw32-gnutls mingw32-cairo mingw32-postgresql
  Show dependency treegraph
 
Reported: 2008-07-08 07:54 EDT by Richard W.M. Jones
Modified: 2013-04-30 19:40 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-21 06:29:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
atkac: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2008-07-08 07:54:48 EDT
Spec URL: http://www.annexia.org/tmp/mingw/mingw-zlib.spec
SRPM URL: http://www.annexia.org/tmp/mingw/mingw-zlib-1.2.3-1.fc10.src.rpm
Description: MinGW Windows zlib compression library

Incomplete packaging guidelines:
https://fedoraproject.org/wiki/PackagingDrafts/MinGW

This is zlib cross-compiled for Windows.  We have packaged quite a few
libraries for Fedora so far, but not submitted them yet in case there
are problems with the packaging guidelines.  ZLib was chosen as a typical
library, simple and with no dependencies.
Comment 2 Adam Tkac 2008-12-10 09:07:04 EST
SRPM and SPEC links seem incorrect. Could you please update them? I will take care about review.
Comment 3 Richard W.M. Jones 2008-12-10 11:17:39 EST
Thanks for looking at this.  Here are the correct URLs for this package:

Spec URL: http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/zlib/mingw32-zlib.spec
SRPM URL: http://www.annexia.org/tmp/mingw/fedora-10/src/SRPMS/mingw32-zlib-1.2.3-10.fc10.src.rpm
Comment 4 Peter Robinson 2008-12-16 10:01:37 EST
Adam are you still reviewing this?
Comment 5 Adam Tkac 2008-12-17 08:20:18 EST
Sorry for late response.

Formal review:

source files match upstream: YES
package meets naming and versioning guidelines: YES
specfile is properly named, is cleanly written and uses macros consistently: YES
dist tag is present: YES
build root is correct: YES
license field matches the actual license: YES
latest version is being packaged: YES
BuildRequires are proper: YES
compiler flags are appropriate: NO
%clean is present: YES
package builds in mock (Rawhide/x86_64): YES
-------
rpmlint is silent: NO:

$ rpmlint mingw32-zlib-1.2.3-10.fc11.src.rpm
mingw32-zlib.src:46: W: configure-without-libdir-spec
- wouldn't be better to add "--libdir=%{_mingw32_libdir}" configure parameter?

$ rpmlint mingw32-zlib-1.2.3-10.fc11.noarch.rpm
mingw32-zlib.noarch: W: no-documentation
mingw32-zlib.noarch: W: devel-file-in-non-devel-package
/usr/i686-pc-mingw32/sys-root/mingw/include/zlib.h
mingw32-zlib.noarch: W: devel-file-in-non-devel-package
/usr/i686-pc-mingw32/sys-root/mingw/lib/libz.dll.a
mingw32-zlib.noarch: W: devel-file-in-non-devel-package
/usr/i686-pc-mingw32/sys-root/mingw/include/zconf.h
mingw32-zlib.noarch: E: arch-independent-package-contains-binary-or-object /usr/i686-pc-mingw32/sys-root/mingw/lib/libz.dll.a
mingw32-zlib.noarch: W: non-standard-dir-in-usr i686-pc-mingw32
- OK (there is no reason to separate headers to -devel - noone will use
  mingw32-zlib-libs package without -devel on Fedora)
------
final provides and requires look sane: YES
doesn't own any directories it shouldn't: YES
no duplicates in %files: YES
file permissions are appropriate: YES
code, not content: YES
documentation is small, so no -docs subpackage is necessary: YES
----------------------------------------------------------------

Currently I see two problems:
- compiler flags are not correct, it seems you have to add "CFLAGS=%{_mingw32_cflags}" parameter to make

- static version of library is packaged:
$ file /usr/i686-pc-mingw32/sys-root/mingw/lib/libz.dll.a
/usr/i686-pc-mingw32/sys-root/mingw/lib/libz.dll.a: current ar archive

MinGW packaging guidelines says that static libraries should be packaged in -static subpackage (http://fedoraproject.org/wiki/Packaging/MinGW, "Static libraries" statement). Yes, it is pedantry but guidelines should be honoured.
Comment 6 Richard W.M. Jones 2008-12-18 05:19:43 EST
Just a quick note that libz.dll.a isn't a static library, in
the sense meant by the guidelines.

Under Windows, DLLs are split into two parts:  The foo-1.dll
which is the shared library needed at runtime.  But if you
want to link with the shared library, you need a library of
stub routines, called foo.dll.a (for cross-compilation)
or more normally foo.lib if this was a real Windows machine.

We actually remove the real static libraries from all of
the mingw32-* packages.

I'll take a look at the rest in an hour or two.
Comment 7 Richard W.M. Jones 2008-12-18 06:28:33 EST
Thanks for looking at this package.  Here is an updated package
that sets CFLAGS correctly (and I've verified that they are passed
to gcc).

Spec URL: http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/zlib/mingw32-zlib.spec
SRPM URL: http://www.annexia.org/tmp/mingw/fedora-10/src/SRPMS/mingw32-zlib-1.2.3-11.fc10.src.rpm

* Thu Dec 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-11
- Pass correct CFLAGS to build.
Comment 8 Adam Tkac 2008-12-18 07:02:08 EST
(In reply to comment #6)
> Just a quick note that libz.dll.a isn't a static library, in
> the sense meant by the guidelines.
> 
> Under Windows, DLLs are split into two parts:  The foo-1.dll
> which is the shared library needed at runtime.  But if you
> want to link with the shared library, you need a library of
> stub routines, called foo.dll.a (for cross-compilation)
> or more normally foo.lib if this was a real Windows machine.

Ah, I didn't know how things work. Thanks for your explanation.

With correct CFLAGS package is OK => reviewed (formal review is in comment #5)
Comment 9 Richard W.M. Jones 2008-12-18 07:07:31 EST
New Package CVS Request
=======================
Package Name: mingw32-zlib
Short Description: MinGW Windows zlib compression library
Owners: rjones berrange lfarkas
Branches: EL-5 F-10
InitialCC:
Comment 10 Kevin Fenzi 2008-12-20 22:56:14 EST
cvs done.
Comment 11 Richard W.M. Jones 2008-12-21 06:29:48 EST
Thanks Adam and Kevin.

Imported and built.
Comment 12 Thomas Sailer 2009-04-30 12:02:51 EDT
The native zlib package also generates the minizip and minizip-devel packages. These are also libraries and thus eligible for mingw32. Why have they been dropped?

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