This cycle, some things land in GNOME land that will require minor adjustments of scriptlets:
1) GIO modules. GIO now uses a caching approach to its modules. If a package installs a loadable module in %{_libdir}/gio/modules, you need to run gio-querymodules to update %{_libdir}/gio/modules/giomodule.cache. There's the usual multilib pain; glib2 installs the binary as gio-querymodules-32/64. I propose to recommend the following scriptlets for this:
%posttrans gio-querymodules-%{__isa_bits} || :
%postun gio-querymodules-%{__isa_bits} || :
2) GSettings. GConf is on the way out, we will start seeing applications that are ported to GSettings (which is part of libgio in the glib2 package). GSettings uses schemas as well, and has a cache of those that needs updating if schemas are added/removed. The tool for this is glib-compile-schemas (schemas and their cache are arch-neutral, so no multilib pain here). Proposed scriptlets:
%posttrans glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
%postun glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
3) GTK3. gtk3 will be parallel installable with gtk2, which means it keeps its loadable modules separate. I took the occasion to rework things a bit to reduce the multilib pain. gdk-pixbuf loaders, theme engines and im modules get installed to %{_libdir}/gtk-3.0/3.0.0/{loaders,engines,immodules}, and the cache files for loaders and immodules have been relocated to %{_libdir}/gtk-3.0/3.0.0/{loaders,immodules}.cache. Suitable scriptlets to update these caches look as follows:
%posttrans gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || : gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
%postun gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || : gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
I guess all the %postun scriptlets could be optimized with a if $1 -eq 0
Comments ?
Matthias
On Thu, May 27, 2010 at 10:17:10AM -0400, Matthias Clasen wrote:
This cycle, some things land in GNOME land that will require minor adjustments of scriptlets:
- GIO modules. GIO now uses a caching approach to its modules. If a
package installs a loadable module in %{_libdir}/gio/modules, you need to run gio-querymodules to update %{_libdir}/gio/modules/giomodule.cache. There's the usual multilib pain; glib2 installs the binary as gio-querymodules-32/64. I propose to recommend the following scriptlets for this:
%posttrans gio-querymodules-%{__isa_bits} || :
%postun gio-querymodules-%{__isa_bits} || :
- GSettings. GConf is on the way out, we will start seeing applications
that are ported to GSettings (which is part of libgio in the glib2 package). GSettings uses schemas as well, and has a cache of those that needs updating if schemas are added/removed. The tool for this is glib-compile-schemas (schemas and their cache are arch-neutral, so no multilib pain here). Proposed scriptlets:
%posttrans glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
%postun glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
- GTK3. gtk3 will be parallel installable with gtk2, which means it
keeps its loadable modules separate. I took the occasion to rework things a bit to reduce the multilib pain. gdk-pixbuf loaders, theme engines and im modules get installed to %{_libdir}/gtk-3.0/3.0.0/{loaders,engines,immodules}, and the cache files for loaders and immodules have been relocated to %{_libdir}/gtk-3.0/3.0.0/{loaders,immodules}.cache. Suitable scriptlets to update these caches look as follows:
%posttrans gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || : gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
%postun gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || : gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
I guess all the %postun scriptlets could be optimized with a if $1 -eq 0
#2 was passed yesterday by FPC based on a combination of your messade to devel list and rhughes message here. I need to write it into draft form before handing it over to fesco.
If you could write up #1 and #3 in draft form (basically, something that we can drop in verbatim into the ScriptletSnippets page) that would help out a lot as I'm able to keep up otherwise.
I need to write up a bit about the pitfalls to watch out for with using %posttrans in these transactions which makes writing up the initial %GSettings one a tad more difficult.
Some things that should be made clear: * What package is the relevant command line tool provided in? Is a package that invokes the command line tool ever lkely to not require the package that provides the command line tool implicitly? * What happens if the command line tool is not available at scriptlet time? Does it break? Does the command line tool get run by the %posttrans script of the package that provides it? * Are there any command line tools that depend on another one of these "services". As a hypothetical: if gtk-query-immodules-3.0-%{__isa_bits} required a GSettings schema, we'd want to note something like: "GSettings cannot always be run in %posttrans. For instance, package Foo that provides gtk-query-immodules-3.0-%{__isa_bits} must run it in %post to prevent stale schemas from potentially breaking gtk-query-immodules-3.0-%{__isa_bits} when that package is run from another %post script"
Thanks, -Toshio
On Thu, 2010-05-27 at 13:37 -0400, Toshio Kuratomi wrote:
#2 was passed yesterday by FPC based on a combination of your messade to devel list and rhughes message here. I need to write it into draft form before handing it over to fesco.
Toshio, has that ever happened ? I can't find anything gsettings-related in ScriptletSnippets on the wiki.
If you could write up #1 and #3 in draft form (basically, something that we can drop in verbatim into the ScriptletSnippets page) that would help out a lot as I'm able to keep up otherwise.
Let me give it a try now:
https://fedoraproject.org/wiki/User:Mclasen/giomodules https://fedoraproject.org/wiki/User:Mclasen/gdkpixbufloaders https://fedoraproject.org/wiki/User:Mclasen/gtkmodules
On Tue, Nov 16, 2010 at 12:41:53PM -0500, Matthias Clasen wrote:
On Thu, 2010-05-27 at 13:37 -0400, Toshio Kuratomi wrote:
#2 was passed yesterday by FPC based on a combination of your messade to devel list and rhughes message here. I need to write it into draft form before handing it over to fesco.
Toshio, has that ever happened ? I can't find anything gsettings-related in ScriptletSnippets on the wiki.
If you could write up #1 and #3 in draft form (basically, something that we can drop in verbatim into the ScriptletSnippets page) that would help out a lot as I'm able to keep up otherwise.
Let me give it a try now:
https://fedoraproject.org/wiki/User:Mclasen/giomodules https://fedoraproject.org/wiki/User:Mclasen/gdkpixbufloaders https://fedoraproject.org/wiki/User:Mclasen/gtkmodules
Apologies, I got really busy and put the ticket up for others to take but no one did. Your pages are much nicer than what I could have come up with though :-)
The one thing that I notice in them is the Requires(post)/Requires(postun) section. If I'm reading how those scripts work correctly we shouldn't need those as long as 1) glib2, gdk-pixbuf2, and gtk3 also invoke those helper programs in their scriptlets and 2) the modules and loaders generate an automatic dependency on glib2, gtk3, or gdk-pixbuf2.
For GSettings, I don't have the information to write up a nice paragraph like you did for the other three. Would you be willing to finish this page? https://fedoraproject.org/wiki/GSettings_Draft
I've added all of the pages to the ticket: https://fedorahosted.org/fpc/ticket/3
the next FPC meeting is tomorrow morning 16:00 UTC. If we get updates on the things here, I think these will pass pretty quickly.
-Toshio
On Tue, 2010-11-16 at 12:41 -0500, Matthias Clasen wrote:
On Thu, 2010-05-27 at 13:37 -0400, Toshio Kuratomi wrote:
#2 was passed yesterday by FPC based on a combination of your messade to devel list and rhughes message here. I need to write it into draft form before handing it over to fesco.
Toshio, has that ever happened ? I can't find anything gsettings-related in ScriptletSnippets on the wiki.
If you could write up #1 and #3 in draft form (basically, something that we can drop in verbatim into the ScriptletSnippets page) that would help out a lot as I'm able to keep up otherwise.
Let me give it a try now:
https://fedoraproject.org/wiki/User:Mclasen/giomodules https://fedoraproject.org/wiki/User:Mclasen/gdkpixbufloaders https://fedoraproject.org/wiki/User:Mclasen/gtkmodules
A couple of points:
1. Requires(posttrans) is not legal ... I'm also not sure why you'd want %posttrans instead of %post, is that a typo?
2. Given the use of %{__isa_bits) we almost certainly want the requires to use %{_isa}.
On Wed, 17 Nov 2010, James Antill wrote:
On Tue, 2010-11-16 at 12:41 -0500, Matthias Clasen wrote:
On Thu, 2010-05-27 at 13:37 -0400, Toshio Kuratomi wrote:
#2 was passed yesterday by FPC based on a combination of your messade to devel list and rhughes message here. I need to write it into draft form before handing it over to fesco.
Toshio, has that ever happened ? I can't find anything gsettings-related in ScriptletSnippets on the wiki.
If you could write up #1 and #3 in draft form (basically, something that we can drop in verbatim into the ScriptletSnippets page) that would help out a lot as I'm able to keep up otherwise.
Let me give it a try now:
https://fedoraproject.org/wiki/User:Mclasen/giomodules https://fedoraproject.org/wiki/User:Mclasen/gdkpixbufloaders https://fedoraproject.org/wiki/User:Mclasen/gtkmodules
A couple of points:
- Requires(posttrans) is not legal
Indeed. It's an ancient bug in rpm that it doesn't spot illegal requires qualifiers in all cases. For example Requires(posttrans) and Requires(pre,posttrans) pass (incorrectly) in current rpm versions but Requires(posttrans,pre) spits out an error message like it should. Fixed upstream though...
... I'm also not sure why you'd want %posttrans instead of %post, is that a typo?
- Given the use of %{__isa_bits) we almost certainly want the requires
to use %{_isa}.
Indeed. No if's and but's, the dependency MUST either have %{_isa}, or be changed to a file dependency. Ie the require(s) need to be on either "glib2%{_isa}" or "%{_bindir}/gio-querymodules-%{__isa_bits}", whichever is preferred.
- Panu -
On Fri, 19 Nov 2010, Panu Matilainen wrote:
On Wed, 17 Nov 2010, James Antill wrote:
- Given the use of %{__isa_bits) we almost certainly want the requires
to use %{_isa}.
Indeed. No if's and but's, the dependency MUST either have %{_isa}, or be changed to a file dependency. Ie the require(s) need to be on either "glib2%{_isa}" or "%{_bindir}/gio-querymodules-%{__isa_bits}", whichever is preferred.
Oh, all three guidelines had similar constructs... so more generally: the requires MUST be on either the main package with %{_isa}, or on the full path to the binary.
- Panu -
packaging@lists.fedoraproject.org