Bug 700815

Summary: Review Request: mingw-gtk3 - MinGW Windows GTK+ library
Product: [Fedora] Fedora Reporter: Kalev Lember <kalevlember>
Component: Package ReviewAssignee: Erik van Pienbroek <erik-fedora>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: erik-fedora, fedora-mingw, fedora-package-review, fedora, notting
Target Milestone: ---Flags: erik-fedora: fedora-review+
j: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mingw-gtk3-3.0.10-1.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-29 15:58:19 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: 701347    

Description Kalev Lember 2011-04-29 13:37:00 UTC
Spec URL: http://kalev.fedorapeople.org/mingw32-gtk3.spec
SRPM URL: http://kalev.fedorapeople.org/mingw32-gtk3-3.0.9-1.fc15.src.rpm
Description:
GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

This package contains the MinGW Windows cross compiled GTK+ 3 library.

Comment 1 Kalev Lember 2011-04-29 13:38:37 UTC
Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3035677

Comment 2 Kalev Lember 2011-04-29 14:36:56 UTC
Both of the patches are now in upstream gtk+ git.

Comment 3 Erik van Pienbroek 2011-04-29 18:08:29 UTC
Looks like you beat me to it in putting this package up for review :)

In your spec you're using a libtool hack to make this package build. In my attempt I've used a different approach for this issue which is a more generic solution to this problem and also is upstreamable: http://svn.openftd.org/svn/fedora_cross/mingw-gtk3/gtk3-win32-libtool-fix.patch Please consider using this patch

Is the PATH override really necessary to get this package build?

There's one file being placed in %{_mingw32_datadir}/glib-2.0/schemas/. This folder should be owned by the mingw32-glib2 package but I suspect this ain't the case at this moment. I'll look into this and push a new update if necessary

The other directory ownerships look good

Comment 4 Erik van Pienbroek 2011-04-29 18:13:38 UTC
Okay, the folder %{_mingw32_datadir}/glib-2.0/schemas is already correctly owned by mingw32-glib2, so we don't have worry anymore about that

Comment 5 Kalev Lember 2011-04-29 18:47:53 UTC
Thanks for taking the review, Erik!

(In reply to comment #3)
> In your spec you're using a libtool hack to make this package build. In my
> attempt I've used a different approach for this issue which is a more generic
> solution to this problem and also is upstreamable:
> http://svn.openftd.org/svn/fedora_cross/mingw-gtk3/gtk3-win32-libtool-fix.patch
> Please consider using this patch

Sounds like a good approach. Can you submit it upstream?

Anyway, for now I think it's easier to maintain the lt_cv_deplibs_check_method override than patching both Makefile.am and and Makefile.in and worrying about rebasing the patch with each new upstream release. It would all change of course if you managed to get the patch upstreamed, which I fully support :-)


> Is the PATH override really necessary to get this package build?

Good catch, I don't think the override is really needed.

* Fri Apr 29 2011 Kalev Lember <kalev> - 3.0.9-2
- Removed an unneeded PATH override (#700815)

Spec URL: http://kalev.fedorapeople.org/mingw32-gtk3.spec
SRPM URL: http://kalev.fedorapeople.org/mingw32-gtk3-3.0.9-2.fc15.src.rpm

Comment 6 Kalev Lember 2011-05-02 15:04:38 UTC
The patch in https://bugzilla.gnome.org/show_bug.cgi?id=642214 is now upstreamed so I've replaced the lt_cv_deplibs_check_method override with the upstream patch.

* Mon May 02 2011 Kalev Lember <kalev> - 3.0.9-3
- Backported an upstream patch for linking with libuuid

Spec URL: http://kalev.fedorapeople.org/mingw32-gtk3.spec
SRPM URL: http://kalev.fedorapeople.org/mingw32-gtk3-3.0.9-3.fc15.src.rpm

Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3044896

Comment 7 Erik van Pienbroek 2011-05-05 14:35:08 UTC
$ rpmlint mingw32-gtk3.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint mingw32-gtk3-3.0.9-3.fc15.src.rpm 
mingw32-gtk3.src: W: spelling-error %description -l en_US multi -> mulch, mufti
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint mingw32-gtk3-3.0.9-3.fc15.noarch.rpm 
mingw32-gtk3.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkactiongroup.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkcolorbutton.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkappchooserwidget.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkaboutdialog.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtktoggleaction.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkaction.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkradioaction.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/share/doc/mingw32-gtk3-3.0.9/COPYING
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkappchooserdialog.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtknumerableicon.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkappchooser.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkappchooserbutton.h
mingw32-gtk3.noarch: E: incorrect-fsf-address /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0/gtk/gtkuimanager.h
1 packages and 0 specfiles checked; 14 errors, 1 warnings.

$ rpm --query --requires mingw32-gtk3
pkgconfig  
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
mingw32(gdi32.dll)  
mingw32(kernel32.dll)  
mingw32(libatk-1.0-0.dll)  
mingw32(libcairo-2.dll)  
mingw32(libcairo-gobject-2.dll)  
mingw32(libgailutil-3-0.dll)  
mingw32(libgdk-3-0.dll)  
mingw32(libgdk_pixbuf-2.0-0.dll)  
mingw32(libgio-2.0-0.dll)  
mingw32(libglib-2.0-0.dll)  
mingw32(libgmodule-2.0-0.dll)  
mingw32(libgobject-2.0-0.dll)  
mingw32(libgtk-3-0.dll)  
mingw32(libintl-8.dll)  
mingw32(libpango-1.0-0.dll)  
mingw32(libpangocairo-1.0-0.dll)  
mingw32(libpangowin32-1.0-0.dll)  
mingw32(msvcrt.dll)  
mingw32(ole32.dll)  
mingw32(user32.dll)  
rpmlib(PayloadIsXz) <= 5.2-1

$ rpm --query --provides mingw32-gtk3
mingw32(libgailutil-3-0.dll)  
mingw32(libgdk-3-0.dll)  
mingw32(libgtk-3-0.dll)  
mingw32(libwimp.dll)  
mingw32(im-am-et.dll)  
mingw32(im-cedilla.dll)  
mingw32(im-cyrillic-translit.dll)  
mingw32(im-ime.dll)  
mingw32(im-inuktitut.dll)  
mingw32(im-ipa.dll)  
mingw32(im-multipress.dll)  
mingw32(im-thai.dll)  
mingw32(im-ti-er.dll)  
mingw32(im-ti-et.dll)  
mingw32(im-viqr.dll)  
mingw32(libgail.dll)  
mingw32-gtk3 = 3.0.9-3.fc15

$ curl -s ftp://ftp.gnome.org/pub/gnome/sources/gtk+/3.0/gtk+-3.0.9.tar.bz2 | md5sum
ff6be6e773dce2853d9ff98a52ae6e76  -
$ md5sum gtk+-3.0.9.tar.bz2 
ff6be6e773dce2853d9ff98a52ae6e76  gtk+-3.0.9.tar.bz2


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


There's a rpmlint warning about the usage of an incorrect FSF address in some files. You might want to report this upstream, but it isn't blocking for the approval of this package. The spelling error can also be ignored


====================================================
 The package mingw32-gtk3 is APPROVED by epienbro
====================================================

Comment 8 Kalev Lember 2011-05-05 15:11:08 UTC
Thanks for the review, Erik!

New Package SCM Request
=======================
Package Name: mingw32-gtk3
Short Description: MinGW Windows GTK+ library
Owners: kalev epienbro
Branches: f15
InitialCC:

Comment 9 Kalev Lember 2011-05-23 11:49:17 UTC
I renamed the base package to mingw-gtk3 as per the newly updated Fedora MinGW guidelines. Erik, can you quickly doublecheck that my changes look OK? Thanks!


* Mon May 23 2011 Kalev Lember <kalev> - 3.0.10-1
- Update to 3.0.10
- Renamed the base package to mingw-gtk3
- Use the automatic dep extraction available in mingw32-filesystem 68

Spec URL: http://kalev.fedorapeople.org/mingw-gtk3.spec
SRPM URL: http://kalev.fedorapeople.org/mingw-gtk3-3.0.10-1.fc15.src.rpm

Comment 10 Thomas Sailer 2011-05-23 15:26:21 UTC
I had a quick look and it looks fine to me. You don't want to use the %{mingw_pkg_name} macro?

Also, the new package naming scheme causes the debuginfo package to be named mingw-gtk3-debuginfo versus the old mingw32-gtk3-debuginfo. I don't think this is an issue, but I may be overlooking something.

Comment 11 Kalev Lember 2011-05-23 15:58:22 UTC
Thanks Tom.

(In reply to comment #10)
> I had a quick look and it looks fine to me. You don't want to use the
> %{mingw_pkg_name} macro?

Yes, that's right, I don't particularly like the %{mingw_pkg_name} macro name, it's just way too long and verbose. %{pkg_name} or %{name1} (like you've used in many places) would be much more readable.

Besides, the current ("old") example spec file uses the literal name everywhere and not the %{mingw_pkg_name} macro.

Compare yourself:
%files -n mingw32-gtk3
%files -n mingw32-%{mingw_pkg_name}


> Also, the new package naming scheme causes the debuginfo package to be named
> mingw-gtk3-debuginfo versus the old mingw32-gtk3-debuginfo. I don't think this
> is an issue, but I may be overlooking something.

Yeah, that's my concern too. 

I'm planning to take a look at the -debuginfo subpackage generating macros soon to see if it's possible to make them nicer. I'm pretty confident that I can get rid of the need to manually insert %{?_mingw32_debug_package} in every spec file. I'm thinking of having per-arch subpackages (mingw32-debuginfo and mingw64-debuginfo) which are controlled by magical defines ('%define mingw32_debug_package 1' and '%define mingw64_debug_package 1').

Comment 12 Kalev Lember 2011-05-23 17:04:44 UTC
I looked at the -debuginfo macros and it would appear that there's currently a way to specify the subpackage name with -n switch:

%{_mingw32_debug_package -n mingw32-gtk3}

However, it's currently broken and doesn't work the way that the original author intended to. It would be possible to easily fix it up; however we need to first figure out how we want to name the subpackages.

Erik, any opinions whether to go for mingw-$pkg-debuginfo or mingw32-$pkg-debuginfo with the current "old" toolchain?


--- a/macros.mingw32
+++ b/macros.mingw32
@@ -67,7 +67,7 @@ Group: Development/Debug \
 This package provides debug information for package %{name}.\
 Debug information is useful when developing applications that use this\
 package or when debugging this package.\
-%files debuginfo -f debugfiles.list\
+%files %{-n:-n %{-n*}-}debuginfo -f debugfiles.list\
 %defattr(-,root,root,-)\
 %{nil}

Comment 13 Erik van Pienbroek 2011-05-28 13:59:01 UTC
The mingw32-$pkg-debuginfo is more in line with all current packages so I'm a bit more tempted to use that method

Comment 14 Kalev Lember 2011-05-28 18:53:18 UTC
New Package SCM Request
=======================
Package Name: mingw-gtk3
Short Description: MinGW Windows GTK+ library
Owners: kalev epienbro
Branches: f15
InitialCC:

Comment 15 Jason Tibbitts 2011-05-29 04:04:05 UTC
Git done (by process-git-requests).

Comment 16 Kalev Lember 2011-05-29 15:58:19 UTC
As discussed on the mailing list [1], I fixed mingw32-filesystem macros to produce mingw32- prefixed debuginfo subpackages. It's a transparent change and spec files don't need any modifications.
[1] http://lists.fedoraproject.org/pipermail/mingw/2011-May/003708.html

mingw-gtk3-3.0.10-1.fc16 imported and built for rawhide, closing the ticket.