[opensuse-packaging] New rpm macros in 11.4 for GTK+ IM modules, GIO modules, gdk-pixbuf loaders, GSettings schemas
Hi, In 11.4, we're introducing a new set of rpm macros (shipped in the devel packages of gtk2, gtk3, gdk-pixbuf and glib) to make it easy to register GTK+ IM modules, GIO modules, gdk-pixbuf loaders and GSettings schemas. At the moment, not all of this is in Factory, but it will reach Factory in the next few days, so if you're aware of a package that needs to be fixed, be ready to fix it. Note that some of this replaces the old SuSEconfig way of doing things (for gtk2 IM modules and for gdk-pixbuf loaders). I grepped for run-gtk in Factory, and as far as I can tell, at least those packages need to be fixed for this change: ibus imhangul scim-bridge scim tamil-gtk2im uim If help is needed for those packages, please tell me. The macros for GIO modules and GSettings schemas are actually new: nothing was registering GIO modules correctly earlier (as far as I know) and GSettings schemas are new in 11.4. Here's the documentation from the macros.* files shipped in the packages. Don't hesitate to ask if you have any question. ### # # When a package installs a GSettings schemas, it should use all # three macros: # # - %glib2_gsettings_schema_requires in the preamble # - %glib2_gsettings_schema_post in %post # - %glib2_gsettings_schema_postun in %postun # ### # # When a package installs a GIO module, it should use all # three macros: # # - %glib2_gio_module_requires in the preamble # - %glib2_gio_module_post in %post # - %glib2_gio_module_postun in %postun # # Note that %glib2_gio_module_post and %glib2_gio_module_postun can # optionally take the path to the directory where modules live. This # is useful for applications using the GIO module system on their own, # since they will install modules in their own directory. If no # argument is passed, the path for the modules for GIO itself is used. # ### ### # # When a package installs a gdk-pixbuf loader, it should use all # three macros: # # - %gdk_pixbuf_loader_requires in the preamble # - %gdk_pixbuf_loader_post in %post # - %gdk_pixbuf_loader_postun in %postun # ### ### # # When a package installs a GTK+ IM module, it should use all # three macros: # # - %gtk2_immodule_requires in the preamble # - %gtk2_immodule_post in %post # - %gtk2_immodule_postun in %postun # ### ### # # When a package installs a GTK+ IM module, it should use all # three macros: # # - %gtk3_immodule_requires in the preamble # - %gtk3_immodule_post in %post # - %gtk3_immodule_postun in %postun # ### Thanks, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mercredi 25 août 2010, à 12:28 +0200, Vincent Untz a écrit :
Hi,
In 11.4, we're introducing a new set of rpm macros (shipped in the devel packages of gtk2, gtk3, gdk-pixbuf and glib) to make it easy to register GTK+ IM modules, GIO modules, gdk-pixbuf loaders and GSettings schemas. At the moment, not all of this is in Factory, but it will reach Factory in the next few days, so if you're aware of a package that needs to be fixed, be ready to fix it.
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet. I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications. What do people think? Vincent -- Les gens heureux ne sont pas pressés.
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks If the macros are suse specific I wonder how other distros solve the problem? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mercredi 25 août 2010, à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
Ah, thanks, didn't know about that. Will look at it.
If the macros are suse specific I wonder how other distros solve the problem?
I just looked at ibus in Fedora, and they directly call the binaries in %post/%postun. We considered doing that, but decided that the macros are easier (avoid errors, and makes it really simple to change things later on if needed). Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mercredi 25 août 2010 à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
If the macros are suse specific I wonder how other distros solve the problem?
With my "previous" Mandriva hat :
macros were used, similar to Vincent proposal, until file triggers were
added to Mandriva RPM (I think there is work to add them to upstream RPM
too), which was doing the work in the background ;)
While adding macros for gtk/glib, shouldn't we also add a macro for icon
cache regeneration (like in Mandriva) ?
--
Frederic Crozat
Le mercredi 25 août 2010, à 13:31 +0200, Frederic Crozat a écrit :
Le mercredi 25 août 2010 à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
If the macros are suse specific I wonder how other distros solve the problem?
With my "previous" Mandriva hat :
macros were used, similar to Vincent proposal, until file triggers were added to Mandriva RPM (I think there is work to add them to upstream RPM too), which was doing the work in the background ;)
Yep, I've kept that in mind: later on, when this will be available, we can make the macros do nothing ;-)
While adding macros for gtk/glib, shouldn't we also add a macro for icon cache regeneration (like in Mandriva) ?
I have macros ready for this. I just don't know where they should live, since gtk2/gtk3 is wrong (you don't want to have all packages with icons depending on gtk2 at build time). Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mercredi 25 août 2010 à 13:33 +0200, Vincent Untz a écrit :
Le mercredi 25 août 2010, à 13:31 +0200, Frederic Crozat a écrit :
Le mercredi 25 août 2010 à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
If the macros are suse specific I wonder how other distros solve the problem?
With my "previous" Mandriva hat :
macros were used, similar to Vincent proposal, until file triggers were added to Mandriva RPM (I think there is work to add them to upstream RPM too), which was doing the work in the background ;)
Yep, I've kept that in mind: later on, when this will be available, we can make the macros do nothing ;-)
While adding macros for gtk/glib, shouldn't we also add a macro for icon cache regeneration (like in Mandriva) ?
I have macros ready for this. I just don't know where they should live, since gtk2/gtk3 is wrong (you don't want to have all packages with icons depending on gtk2 at build time).
I'd suggest hicolor-icon-theme and ensuring the macro only does
something if gtk-update-icon-cache is installed.
--
Frederic Crozat
On Wednesday 25 August 2010 13:31:16 Frederic Crozat wrote:
Le mercredi 25 août 2010 à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
If the macros are suse specific I wonder how other distros solve the problem?
With my "previous" Mandriva hat :
macros were used, similar to Vincent proposal, until file triggers were added to Mandriva RPM (I think there is work to add them to upstream RPM too), which was doing the work in the background ;)
We try to avoid trigger scripts, because it can lead to the situation that package X is not installable or de-instable, because package Y has a broken script. This is highly confusing and can make debugging a nightmare. bye adrian
While adding macros for gtk/glib, shouldn't we also add a macro for icon cache regeneration (like in Mandriva) ?
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mercredi 25 août 2010 à 13:34 +0200, Adrian Schröter a écrit :
On Wednesday 25 August 2010 13:31:16 Frederic Crozat wrote:
Le mercredi 25 août 2010 à 13:22 +0200, Ludwig Nussel a écrit :
Vincent Untz wrote:
I'm considering patching rpmlint to add errors when those macros are not used. See the attached patch, which I haven't tested yet.
I'm a bit worried that adding tons of checks like this will be expensive in the long term. On the other hand, missing those calls is really bad since it will result in non-working packages or even crashing applications.
There are more expensive tests than those anyways so don't worry. The rpmlint package already carries way too much patches though. If your tests are SUSE specific anyways it would probably make sense to have it in a separate file here: http://gitorious.org/opensuse/rpmlint-checks
If the macros are suse specific I wonder how other distros solve the problem?
With my "previous" Mandriva hat :
macros were used, similar to Vincent proposal, until file triggers were added to Mandriva RPM (I think there is work to add them to upstream RPM too), which was doing the work in the background ;)
We try to avoid trigger scripts, because it can lead to the situation that package X is not installable or de-instable, because package Y has a broken script.
file triggers (http://wiki.mandriva.com/en/Rpm_filetriggers ) are
different than traditional triggers (which should be avoided as much as
possible), IIRC they don't influence packages installation status.
--
Frederic Crozat
participants (4)
-
Adrian Schröter
-
Frederic Crozat
-
Ludwig Nussel
-
Vincent Untz