Bug 467416 - (mingw32-cairo) Review Request: mingw32-cairo - MinGW Windows Cairo library
Review Request: mingw32-cairo - MinGW Windows Cairo library
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik van Pienbroek
Fedora Extras Quality Assurance
:
Depends On: mingw32-gcc mingw32-zlib mingw32-iconv mingw32-pixman mingw32-libpng mingw32-libxml2 mingw32-dlfcn
Blocks: mingw32-pango mingw32-gtk2
  Show dependency treegraph
 
Reported: 2008-10-17 07:29 EDT by Richard W.M. Jones
Modified: 2009-02-07 17:19 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-06 07:58:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
erik-fedora: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Comment 1 Richard W.M. Jones 2008-10-24 07:51:47 EDT
Spec URL:
http://hg.et.redhat.com/misc/fedora-mingw--devel/?cmd=manifest;manifest=61ed5375fc06e8f0e5ec89100f59cd46024c4a8a;path=/cairo/
SRPM URL:
http://www.annexia.org/tmp/mingw/fedora-9/src/SRPMS/mingw32-cairo-1.8.0-1.fc9.src.rpm

New upstream version 1.8.0.  This is quite an important update
because it fixes a number of related segfaults in client programs.
Comment 3 Erik van Pienbroek 2009-01-17 09:18:58 EST
I see you've used these commands in the %install phase:

rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/charset.alias 
rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/libcairo.a

Why is the charset.alias file removed?

Why haven't you used %configure --disable-static to prevent building the static library?

Do we really want to pull in freetype and fontconfig as a dependency? Cairo provides a native Win32 implementation for font rendering, so I guess adding a dependency on freetype and fontconfig only introduces unnecessary bloat.
Comment 4 Richard W.M. Jones 2009-01-17 09:53:59 EST
Dan Berrange is probably in a better position to comment on
these questions since he did the original packaging.

> Why haven't you used %configure --disable-static to prevent building the static
> library?

Yes, that's a bug.
Comment 5 Erik van Pienbroek 2009-01-17 11:20:32 EST
Do you know if he's reading along this review ticket or should he be CC'ed?
Comment 6 Daniel Berrange 2009-01-18 13:15:28 EST
The reason I let it pull in Freetype/fontconfig is that this matches the deps from the Linux native specfile & I was trying to keep as closely aligned as possible. Likewise for removing the charset.alias this is just matching native.
Comment 7 Erik van Pienbroek 2009-01-18 13:34:46 EST
As I see it, fontconfig and freetype are really required for Cairo on Linux enviroments (as they are considered 'native' for Linux). However, for Windows environments there's a Cairo font backend available which uses the native font rendering functions from the Win32 API. To me it looks like adding dependencies on freetype and fontconfig only introduces unncessary bloat for a Win32 build of Cairo.

Are there any specific reasons why you want to add dependencies on fontconfig and freetype? Applications (like GTK+) shouldn't really care about the font backend used by Cairo.
Comment 8 Richard W.M. Jones 2009-01-19 05:14:55 EST
I can have a look at this one today unless Dan jumps in before me.
Comment 9 Richard W.M. Jones 2009-01-19 14:44:24 EST
Spec URL: http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/cairo/mingw32-cairo.spec
SRPM URL: http://www.annexia.org/tmp/mingw/fedora-10/src/SRPMS/mingw32-cairo-1.8.0-3.fc10.src.rpm

* Mon Jan 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.8.0-3
- Include license file in documentation section.
- Disable building static library to save time.
- Remove BRs on mingw32-fontconfig and mingw32-freetype which are
  not needed on Win32.
- Use _smp_mflags.
- Added BRs mingw32-dlfcn, mingw32-iconv, mingw32-zlib.
Comment 10 Erik van Pienbroek 2009-01-23 13:14:16 EST
The compilation of this package fails when the Linux version of fontconfig and freetype are installed:

i686-pc-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I/usr/i686-pc-mingw32/sys-root/mingw/include/pixman-1 -I/usr/include/freetype2 -I/usr/i686-pc-mingw32/sys-root/mingw/include/libpng12 -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations -Wdeclaration-after-statement -Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -fno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT cairo-type1-subset.lo -MD -MP -MF .deps/cairo-type1-subset.Tpo -c cairo-type1-subset.c  -DDLL_EXPORT -DPIC -o .libs/cairo-type1-subset.o
In file included from cairo-ft-private.h:40,
                 from cairo-type1-subset.c:54:
cairo-ft.h:46:35: error: fontconfig/fontconfig.h: No such file or directory
cairo-ft.h:47:22: error: ft2build.h: No such file or directory

To fix this, the option '--disable-ft' needs to the added to the %configure

With this change, the %install command to remove the cairo-freetype pkgconfig file can also be removed.
Comment 11 Richard W.M. Jones 2009-01-26 10:00:34 EST
Spec URL: http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/cairo/mingw32-cairo.spec
SRPM URL: http://www.annexia.org/tmp/mingw/fedora-rawhide/src/SRPMS/mingw32-cairo-1.8.0-4.fc11.src.rpm

* Mon Jan 26 2009 Richard W.M. Jones <rjones@redhat.com> - 1.8.0-4
- Disable freetype in configure so it doesn't break if freetype
  or fontconfig are actually installed. (Erik van Pienbroek).
Comment 12 Richard W.M. Jones 2009-01-26 10:17:37 EST
This is just updated to remove the unused
rm -f in the install section:
http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/cairo/mingw32-cairo.spec
Comment 13 Erik van Pienbroek 2009-01-26 14:14:20 EST
On with the final checklist :)

$ rpmlint mingw32-cairo.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint mingw32-cairo-1.8.0-4.fc11.noarch.rpm 
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-win32.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-ps.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-deprecated.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/libcairo.dll.a
mingw32-cairo.noarch: W: spurious-executable-perm /usr/i686-pc-mingw32/sys-root/mingw/lib/libcairo.dll.a
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-version.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-win32-font.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-win32.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-png.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-features.h
mingw32-cairo.noarch: E: script-without-shebang /usr/i686-pc-mingw32/sys-root/mingw/lib/libcairo.la
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-pdf.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/include/cairo/cairo-svg.h
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-svg.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-ps.pc
mingw32-cairo.noarch: W: devel-file-in-non-devel-package /usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/cairo-pdf.pc
mingw32-cairo.noarch: E: arch-independent-package-contains-binary-or-object /usr/i686-pc-mingw32/sys-root/mingw/lib/libcairo.dll.a
mingw32-cairo.noarch: W: non-standard-dir-in-usr i686-pc-mingw32
1 packages and 0 specfiles checked; 2 errors, 18 warnings.

All these rpmlint warnings and errors can be ignored.
You might want to fix the spurious-executable-perm warning, but this isn't a blocker for the review

------

$ curl http://cairographics.org/releases/cairo-1.8.0.tar.gz | md5sum
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5529k  100 5529k    0     0   329k      0  0:00:16  0:00:16 --:--:--  391k
4ea70ea87b47e92d318d4e7f5b940f47  -

$ md5sum ../SOURCES/cairo-1.8.0.tar.gz 
4ea70ea87b47e92d318d4e7f5b940f47  ../SOURCES/cairo-1.8.0.tar.gz

------

$ rpmquery --requires mingw32-cairo
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
mingw32-filesystem >= 43
mingw32-runtime  
mingw32(gdi32.dll)  
mingw32(kernel32.dll)  
mingw32(libpixman-1-0.dll)  
mingw32(libpng12-0.dll)  
mingw32(msvcrt.dll)  
mingw32(user32.dll)  
mingw32(zlib1.dll)  

-----

+ OK
- Needs to be looked into
/ Not applicable
* Overridden by MinGW guidelines

[+] Files are installed in /usr/i686-pc-mingw32/sys-root/mingw
[+] BuildRequires: mingw32-filesystem >= xx is in the .spec file
[+] Requires are OK
[+] BuildArch: noarch
[+] No man pages or info files
[+] No static libs
[+] default strip and objdump commands are overridden with mingw32 specific ones

[+] rpmlint must be run on every package. The output should be posted in the review.
[+] MUST: The package must be named according to the Package Naming Guidelines
[+] MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption on Package Naming Guidelines
[+] MUST: The package must meet the Packaging Guidelines
[+] 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.
[+] MUST: The package must successfully compile and build into binary rpms on at least one supported architecture.
[/] MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch.
[+] MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines; inclusion of those as BuildRequires is optional.
[/] MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
[*] 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: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package.
[+] MUST: A package must own all directories that it creates. 
[+] MUST: A package must not contain any duplicate files in the %files listing.
[+] MUST: Permissions on files must be set properly.
[+] 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 permissable content.
[/] MUST: Large documentation files should go in a -doc subpackage.
[/] MUST: If a package includes something as %doc, it must not affect the runtime of the application.
[*] MUST: Header files must be in a -devel package.
[/] MUST: Static libraries must be in a -static package.
[-] MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
[*] MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
[*] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
[*] 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: At the beginning of %install, each package MUST run rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ). See Prepping BuildRoot For %i install for details.
[+] MUST: All filenames in rpm packages must be valid UTF-8.
[/] SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
[/] SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
[+] SHOULD: The reviewer should test that the package builds in mock. See MockTricks for details on how to do this.
[+] SHOULD: The package should compile and build into binary rpms on all supported architectures.
[/] SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
[/] SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
[/] SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
[*] SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg.
[/] SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.

Almost good, just a missing Requires: pkgconfig

I trust you in fixing the Requires: pkgconfig before pushing this package in Fedora, so let's finish this review:

===================================================

 The package mingw32-cairo is approved by epienbro

===================================================
Comment 14 Richard W.M. Jones 2009-01-26 15:03:28 EST
Thanks Erik.  I've added the 'Requires: pkgconfig' to
my local copy.
Comment 15 Richard W.M. Jones 2009-01-26 15:04:54 EST
New Package CVS Request
=======================
Package Name: mingw32-cairo
Short Description: MinGW Windows Cairo library
Owners: rjones berrange lfarkas
Branches: F-10 EL-5
InitialCC:
Comment 16 Kevin Fenzi 2009-01-26 17:15:35 EST
cvs done.
Comment 17 Richard W.M. Jones 2009-01-28 07:05:00 EST
Waiting for bug 467376 (mingw32-pixman).
Comment 18 Richard W.M. Jones 2009-02-06 07:58:03 EST
This has now been built in Rawhide, F-10 and EL-5.  Thanks
for everybody's help.
Comment 19 Fedora Update System 2009-02-07 17:19:30 EST
mingw32-cairo-1.8.0-6.fc10 has been pushed to the Fedora 10 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.