systemd-analyze is pretty useful, but while all systemd handy tools are in C or Vala, it is in Python (and use dbus-python and pycairo). Since it is pretty easy to port it to Vala (even without Genie), I though it is a good idea to get rid of the python/dbus-python/pycairo dependencies.
Created attachment 47413 [details] [review] A little DBus interface name fix It's pretty weird that systemadm works whatever you use here
Created attachment 47414 [details] [review] Split systemd-interfaces from systemadm as a compile-time library It fails to compile in a multi-jobs make, I couldn't find out why
Created attachment 47415 [details] [review] sytemd-analyze: Vala implementation The python script is just renamed here The 'time' and 'blame' actions work exactly the same way as in the python script The 'plot' action is still buggy (it draws the red boxes only while the code is pretty the same as in the python version)
A further step may be to get rid of the cairo code to write a clean minimal SVG (I would open a new bug then submit patches for this one too)
Could this have a review? Currently python-glib depends on dbus-glib, wich is deprecated.
Actually, they need a rebase since the Vala code moved to systemd-ui. Maybe should they move to systemd-ui too.
Hmm, we moved the Vala bits to systemd-ui. I'd be OK with converting systemd-analyze to pure C, but I am not sure it would be a good thing to readd the Vala dep to systemd proper...
I’m ok with it. I may even submit it to systemd-ui if that’s (more) relevant. Is GLib an acceptable dependency (using a configure switch maybe)? I may write the SVG by hand, without using Cairo to avoid this dep.
(In reply to comment #8) > I’m ok with it. I may even submit it to systemd-ui if that’s (more) relevant. But it isn't really a UI app, is it? So I'd prefer to have it in C and in systemd proper, so that it is available everywhere, including all embedded devices. > Is GLib an acceptable dependency (using a configure switch maybe)? Well, I am not sure why you'd need that. We do have a lot of functionality, such as hashtables or linked lists and so on in systemd anyway. Of course, GlIb does cover a lot more ground, but I don't think you'd need that (i.e. no need for GObject, or for GMainloop or anything). So, I am not entirely against GLib, but I think it would be cool to save the dep here, and just use what we have anyway... (though admitedly, using dbus with raw dbus is a lot less fun than with gdbus...) > I may write the SVG by hand, without using Cairo to avoid this dep. I'd keep the cairo dep, simply because this makes us independent of the output (for example, we could make this write PNG too, with a trivial patch). But that's up to you. Raw SVG is OK too.
A proposal has been made to port systemd-analyze to C. The progress is tracked in https://bugs.freedesktop.org/show_bug.cgi?id=60112, and will be merged shortly. I therefore consider this bug closed (rejected) as we're moving ahead with the C implementation and rejecting the vala implementation.
We're moving ahead with the C implementation instead.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.