Hello,
As many of you are probably well aware, thanks to Jason Tibbitts of the
FPC, the current Fedora MinGW packaging guidelines [1] were recently
amended [2] to also allow the source packages be named mingw- (as
opposed to mingw32-, what we've used so far) but keep the binary package
names the same: mingw32-. Such a change would make it easier to
transition to the mingw-w64 toolchain in the future.
The new guidelines were put to test by Thomas Sailer's two new packages.
When importing the new packages, he noticed that the new naming scheme
causes the debuginfo package to be named
mingw-libfoo-debuginfo versus the old mingw32-libfoo-debuginfo.
This is what we had before:
mingw32-libfoo-...src.rpm
mingw32-libfoo-...noarch.rpm
mingw32-libfoo-debuginfo-...noarch.rpm
This is currently happening:
mingw-libfoo-...src.rpm
mingw32-libfoo-...noarch.rpm
mingw-libfoo-debuginfo-...noarch.rpm
Would it be better like this?
mingw-libfoo-...src.rpm
mingw32-libfoo-...noarch.rpm
mingw32-libfoo-debuginfo-...noarch.rpm
Does anyone have opinions whether it would be better to name the
-debuginfo subpackage mingw-libfoo-debuginfo or mingw32-libfoo-debuginfo?
I have a small patch [4] to the macros in mingw32-filesystem package
which could change it back to mingw32-libfoo-debuginfo. It works by
introducing a new %{_mingw32_pkg_name} macro, which holds the mingw32-
prefixed name. And later, the debuginfo subpackage would be generated
using the mingw32- prefixed name. The change would be transparent to any
existing packages and also new packages, only the macros in
mingw32-filesystem would have to change.
As a plus, it would make it possible to use the %{_mingw32_pkg_name}
macro in spec files in case people want to do that, replacing:
%files -n mingw32-libfoo-static (what we have in current guidelines)
%files -n mingw32-%{_mingw_pkg_name}-static (this is in the "future"
mingw-w64 guidelines)
with this:
%files -n %{_mingw32_pkg_name}-static
Any comments?
Thanks,
Kalev
[1]
https://fedoraproject.org/wiki/Packaging/MinGW
[2]
https://fedorahosted.org/fpc/ticket/83
[3]
https://bugzilla.redhat.com/show_bug.cgi?id=700815#c10
[4] Possible change to mingw32-filesystem macros:
--- a/macros.mingw32
+++ b/macros.mingw32
@@ -1,5 +1,7 @@
# RPM macros for Fedora MinGW.
+%_mingw32_pkg_name %(echo %{name} | sed 's/^mingw-/mingw32-/')
+
%_mingw32_target i686-pc-mingw32
# Paths.
@@ -60,14 +62,15 @@
# Template for debug sub-package.
%_mingw32_debug_package(n:) \
-%package %{-n:-n %{-n*}-}debuginfo \
+%define __mingw32_debug_pkg_name
%{-n*}%{!-n:%{_mingw32_pkg_name}}-debuginfo \
+%package -n %{__mingw32_debug_pkg_name} \
Summary: Debug information for package %{name} \
Group: Development/Debug \
-%description %{-n:-n %{-n*}-}debuginfo \
-This package provides debug information for package %{name}.\
+%description -n %{__mingw32_debug_pkg_name} \
+This package provides debug information for package %{_mingw32_pkg_name}.\
Debug information is useful when developing applications that use this\
package or when debugging this package.\
-%files %{-n:-n %{-n*}-}debuginfo -f debugfiles.list\
+%files -n %{__mingw32_debug_pkg_name} -f debugfiles.list\
%defattr(-,root,root,-)\
%{nil}