[opensuse-packaging] rpmlint-checks: adding new gnome/desktop-related checks
Hi, I've been adding some macros to make life easier when packaging things for GNOME, or desktop applications in general. See [1] for some of those, and I guess I'll send a new mail later for the others -- I just need to figure out where some of them should live. Anyway. The thing is that those macros are all nice, but nobody will think about using them if they don't have rpmlint checks. So I wrote some checks. Can we add this to the rpmlint-checks git repo, and to our rpmlint package? Thanks, Vincent [1] http://lists.opensuse.org/opensuse-packaging/2010-08/msg00059.html -- Les gens heureux ne sont pas pressés.
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Hi,
I've been adding some macros to make life easier when packaging things for GNOME, or desktop applications in general. See [1] for some of those, and I guess I'll send a new mail later for the others -- I just need to figure out where some of them should live.
Anyway. The thing is that those macros are all nice, but nobody will think about using them if they don't have rpmlint checks. So I wrote some checks.
Can we add this to the rpmlint-checks git repo, and to our rpmlint package?
Thanks,
Vincent
[1] http://lists.opensuse.org/opensuse-packaging/2010-08/msg00059.html
As discussed at http://lists.opensuse.org/opensuse-packaging/2010-08/msg00017.html the installer's people don't really like gtk-update-icon-cache, have you talked with Lukas Ocilka? And shouldn't the %desktop_database_* checks check for MimeType entries in the desktop files before complaining? It's my understanding that update-desktop-database does nothing if there are no MimeType entries. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le vendredi 08 octobre 2010, à 18:57 +0200, Cristian Morales Vega a écrit :
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Anyway. The thing is that those macros are all nice, but nobody will think about using them if they don't have rpmlint checks. So I wrote some checks.
[...]
As discussed at http://lists.opensuse.org/opensuse-packaging/2010-08/msg00017.html the installer's people don't really like gtk-update-icon-cache, have you talked with Lukas Ocilka?
I didn't have time yet. FWIW, we can find a better solution later: it's a macro, so we'll be able to change it in one place if we find something better.
And shouldn't the %desktop_database_* checks check for MimeType entries in the desktop files before complaining? It's my understanding that update-desktop-database does nothing if there are no MimeType entries.
Right. I was wondering if it was worth it. But since it's not hard to do... Updated checks attached. Vincent -- Les gens heureux ne sont pas pressés.
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Le vendredi 08 octobre 2010, à 18:57 +0200, Cristian Morales Vega a écrit :
As discussed at http://lists.opensuse.org/opensuse-packaging/2010-08/msg00017.html the installer's people don't really like gtk-update-icon-cache, have you talked with Lukas Ocilka?
I didn't have time yet. FWIW, we can find a better solution later: it's a macro, so we'll be able to change it in one place if we find something better.
This should be really be talked with whoever is the "RPM man" in openSUSE. What's the status of file triggers? Googling "file triggers site:lists.rpm.org" it seems nobody is working in them. But there was that "Collections" thing not too long ago. In fact I would really like a "RPM status report" from time to time. I would be tempted to think RPM development is still slow, nearly dead... until I see the GIT log and see it's actually very active! I'm sure we are not using things provided by new RPM versions only because we don't know about them. I just looked in my 11.3 system... why is ping still using SUID instead of file capabilities? (just saw them in the RPM's GIT log) Mandriva has a file triggers patch, true? I'm sure it isn't in upstream RPM because their implementation has some problems... but are those problems worse than the ones we face when calling gtk-update-icon-cache and some others from every package? If we use that patch, once an official solution is there the spec files will need to be changed?
And shouldn't the %desktop_database_* checks check for MimeType entries in the desktop files before complaining? It's my understanding that update-desktop-database does nothing if there are no MimeType entries.
Right. I was wondering if it was worth it. But since it's not hard to do... Updated checks attached.
It would be nice to comment the MimeType entries thing in the error message. But otherwise, without knowing a thing about all those GTK/GDK/GNOME/GLIB things, the macros seem an improvement to me. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Le vendredi 08 octobre 2010, à 18:57 +0200, Cristian Morales Vega a écrit :
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Anyway. The thing is that those macros are all nice, but nobody will think about using them if they don't have rpmlint checks. So I wrote some checks.
[...]
As discussed at http://lists.opensuse.org/opensuse-packaging/2010-08/msg00017.html the installer's people don't really like gtk-update-icon-cache, have you talked with Lukas Ocilka?
I didn't have time yet. FWIW, we can find a better solution later: it's a macro, so we'll be able to change it in one place if we find something better.
So, what's the final decision? We are at two months from 11.4 release and the status in Factory seems to be: - SuSEconfig.gtk2 has been removed - rpmlint doesn't complain about packages with icons not running %icon_theme_cache_post So nothing is running gtk-update-icon-cache, whatever you install from zypper or YaST. I have not seen the %icon_theme_cache_post macro used even in the GNOME:Factory packages. What should I do with my packages that install icons? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2011/1/16 Cristian Morales Vega <cmorve69@yahoo.es>:
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Le vendredi 08 octobre 2010, à 18:57 +0200, Cristian Morales Vega a écrit :
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
Anyway. The thing is that those macros are all nice, but nobody will think about using them if they don't have rpmlint checks. So I wrote some checks.
[...]
As discussed at http://lists.opensuse.org/opensuse-packaging/2010-08/msg00017.html the installer's people don't really like gtk-update-icon-cache, have you talked with Lukas Ocilka?
I didn't have time yet. FWIW, we can find a better solution later: it's a macro, so we'll be able to change it in one place if we find something better.
So, what's the final decision? We are at two months from 11.4 release and the status in Factory seems to be: - SuSEconfig.gtk2 has been removed - rpmlint doesn't complain about packages with icons not running %icon_theme_cache_post
So nothing is running gtk-update-icon-cache, whatever you install from zypper or YaST. I have not seen the %icon_theme_cache_post macro used even in the GNOME:Factory packages. What should I do with my packages that install icons?
FWIW, if instead of calling gtk-update-icon-cache on each package installation you change the %icon_theme_cache_post(un) macros to use ZYpp's update-scripts (http://lists.opensuse.org/zypp-devel/2010-06/msg00005.html) you have my vote to add those checks today. That should solve any problem with the installer. Michael, are update-scripts still the best way to run something that needs to be done for a lot of packages and it is enough if it's run once after all packages have been installed (ldconfig doesn't applies)? Or there is something new in the RPM version from 11.4 ("Collections", file triggers or whatever upstream has done recently)? There is any good documentation about update-scripts? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
So nothing is running gtk-update-icon-cache, whatever you install from zypper or YaST. I have not seen the %icon_theme_cache_post macro used even in the GNOME:Factory packages.
We do have packages using the macros, but we didn't have time to convert everything, true.
What should I do with my packages that install icons?
Use the macros. There's one issue with the macro, though: they wrongly assume that, on upgrade, %postun of the old package is called before %post of the new package. To be honest, it shouldn't matter in most cases, and the right fix would imply using a %posttrans instead... On the other hand, if we can use a mechanism to delay the call to gtk-update-icon-cache like you suggest in your later mail, that'd work fine. So let's wait for an answer to your second mail, to know if there's something we can use for this before deciding if we need to add more macros. But in general, yes, please use the macros. 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
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
What should I do with my packages that install icons?
Use the macros.
So the problem with the installer is solved? If I understood correctly the problem was of excessive memory usage. This could be a really big problem since it could avoid people with "little" RAM to **install the distro**. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 17 janvier 2011, à 12:10 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
What should I do with my packages that install icons?
Use the macros.
So the problem with the installer is solved? If I understood correctly the problem was of excessive memory usage. This could be a really big problem since it could avoid people with "little" RAM to **install the distro**.
I'm not aware of any such problem. Do you have a link? 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
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le lundi 17 janvier 2011, à 12:10 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
What should I do with my packages that install icons?
Use the macros.
So the problem with the installer is solved? If I understood correctly the problem was of excessive memory usage. This could be a really big problem since it could avoid people with "little" RAM to **install the distro**.
I'm not aware of any such problem. Do you have a link?
bnc#395056 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 17 janvier 2011, à 12:25 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le lundi 17 janvier 2011, à 12:10 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
What should I do with my packages that install icons?
Use the macros.
So the problem with the installer is solved? If I understood correctly the problem was of excessive memory usage. This could be a really big problem since it could avoid people with "little" RAM to **install the distro**.
I'm not aware of any such problem. Do you have a link?
bnc#395056
My understanding is that it only applies when installing openSUSE. But yeah, I don't know if it's still valid. It's not for the live images, where we copy an image, but maybe it is for the DVD. We can change the macros to check for YAST_IS_RUNNING=instsys, though, 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
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le lundi 17 janvier 2011, à 12:25 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le lundi 17 janvier 2011, à 12:10 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
What should I do with my packages that install icons?
Use the macros.
So the problem with the installer is solved? If I understood correctly the problem was of excessive memory usage. This could be a really big problem since it could avoid people with "little" RAM to **install the distro**.
I'm not aware of any such problem. Do you have a link?
bnc#395056
My understanding is that it only applies when installing openSUSE. But yeah, I don't know if it's still valid. It's not for the live images, where we copy an image, but maybe it is for the DVD.
We can change the macros to check for YAST_IS_RUNNING=instsys, though, if needed.
I don't know the details of YAST_IS_RUNNING, but it seems just fine. Since people talked about increases of two hours in installation time (https://bugzilla.novell.com/show_bug.cgi?id=365649#c14) it seems a good idea to add it. I will start to add the macros to my packages this afternoon. But if the rpmlint checks aren't added *yesterday* I expect there will be a lot of packages without the macros for 11.4 release. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
So nothing is running gtk-update-icon-cache, whatever you install from zypper or YaST. I have not seen the %icon_theme_cache_post macro used even in the GNOME:Factory packages.
We do have packages using the macros, but we didn't have time to convert everything, true.
What should I do with my packages that install icons?
Use the macros.
There's one issue with the macro, though: they wrongly assume that, on upgrade, %postun of the old package is called before %post of the new package. To be honest, it shouldn't matter in most cases, and the right fix would imply using a %posttrans instead... On the other hand, if we can use a mechanism to delay the call to gtk-update-icon-cache like you suggest in your later mail, that'd work fine.
True. Notice from http://fedoraproject.org/wiki/Packaging/ScriptletSnippets that Fedora also uses touch, not sure if it's really needed by something. Also, it's my understanding that the %postrans thing applies also to %desktop_database_post* and %mime_database_post*, but Fedora uses %post in this case (and removes the "if [ $1 -eq 0 ]" check from %postun). No idea why... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 17 janvier 2011, à 19:32 +0100, Cristian Morales Vega a écrit :
2011/1/17 Vincent Untz <vuntz@opensuse.org>:
There's one issue with the macro, though: they wrongly assume that, on upgrade, %postun of the old package is called before %post of the new package. To be honest, it shouldn't matter in most cases, and the right fix would imply using a %posttrans instead... On the other hand, if we can use a mechanism to delay the call to gtk-update-icon-cache like you suggest in your later mail, that'd work fine.
True. Notice from http://fedoraproject.org/wiki/Packaging/ScriptletSnippets that Fedora also uses touch, not sure if it's really needed by something. Also, it's my understanding that the %postrans thing applies also to %desktop_database_post* and %mime_database_post*, but Fedora uses %post in this case (and removes the "if [ $1 -eq 0 ]" check from %postun). No idea why...
Yep, I know -- this issue is valid for all those macros. I'd like to hear what people think: are people happy if we add a %posttrans macro (a bit more annoying for developers), knowing that 11.5/12.0 won't need all those macros thanks to the rpm collection stuff? 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 lundi 17 janvier 2011, à 11:30 +0100, Vincent Untz a écrit :
Le dimanche 16 janvier 2011, à 19:21 +0100, Cristian Morales Vega a écrit :
So nothing is running gtk-update-icon-cache, whatever you install from zypper or YaST. I have not seen the %icon_theme_cache_post macro used even in the GNOME:Factory packages.
We do have packages using the macros, but we didn't have time to convert everything, true.
It was not fun, but I've fixed all relevant packages in G:A/G:F. I'm pushing all of them (~200) to Factory right now. 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
2011/1/16 Cristian Morales Vega <cmorve69@yahoo.es>:
- SuSEconfig.gtk2 has been removed
But SuSEconfig.desktop-file-utils hasn't (https://build.opensuse.org/package/view_file?file=SuSEconfig.desktop-file-ut...) ¿¿?? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 17 janvier 2011, à 19:38 +0100, Cristian Morales Vega a écrit :
2011/1/16 Cristian Morales Vega <cmorve69@yahoo.es>:
- SuSEconfig.gtk2 has been removed
But SuSEconfig.desktop-file-utils hasn't (https://build.opensuse.org/package/view_file?file=SuSEconfig.desktop-file-ut...) ¿¿??
You can read .changes entries :-) - Add rpm macros to update the mime database: %desktop_database_post and %desktop_database_postun. This will replace SuSEconfig.desktop-file-utils in the future, once we have converted packages. I can remove it now, though. 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
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
And shouldn't the %desktop_database_* checks check for MimeType entries in the desktop files before complaining? It's my understanding that update-desktop-database does nothing if there are no MimeType entries.
Right. I was wondering if it was worth it. But since it's not hard to do... Updated checks attached.
Another thing I don't understand. In macros.desktop-file-utils and macros.shared-mime-info, what are "${DESKTOP_DIR}" and "${MIME_DIR}" supposed to do?? I didn't find any mention to those in any freedesktop document. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 17 janvier 2011, à 23:21 +0100, Cristian Morales Vega a écrit :
2010/10/8 Vincent Untz <vuntz@opensuse.org>:
And shouldn't the %desktop_database_* checks check for MimeType entries in the desktop files before complaining? It's my understanding that update-desktop-database does nothing if there are no MimeType entries.
Right. I was wondering if it was worth it. But since it's not hard to do... Updated checks attached.
Another thing I don't understand. In macros.desktop-file-utils and macros.shared-mime-info, what are "${DESKTOP_DIR}" and "${MIME_DIR}" supposed to do?? I didn't find any mention to those in any freedesktop document.
Huh. Weird. Not sure what those lines are doing, they should be removed. 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
On 10/08/2010 04:30 PM, Vincent Untz wrote:
I've been adding some macros to make life easier when packaging things for GNOME, or desktop applications in general. See [1] for some of those, and I guess I'll send a new mail later for the others -- I just need to figure out where some of them should live.
It would be nice if you tried to push these macros to RPM upstream, so Fedora will start using them too (which would make GNOME cross-distro packaging easier). -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Cristian Morales Vega
-
Pavol Rusnak
-
Vincent Untz