Author Archive for Michal Marek
Accessing the Build Service from Eclipse
Wednesday, August 13th, 2008 by Michal MarekOne of this year’s Google Summer of Code projects is a an Eclipse plugin to access the Build Service, developed by Long Hong from Beijing. If you are interested, read on.
While there are still issues to be solved, I think it’s in a state that everybody can try it out. Grab a package from my home project, launch eclipse and open the Build Service perspective. Please note that the package itself is a bit experimental and was only tested to work on openSUSE 11.0. Enjoy!
Trick of the Day: Reboot as User
Friday, July 18th, 2008 by Michal Marek$ reboot -bash: reboot: command not found $ /sbin/reboot reboot: must be superuser.
In KDE / GNOME, you can just click reboot in the menu and your session sends a message to display manager, which runs as root and does the dirty job of rebooting or shutting down your machine. Unfortunately, things are not that easy if you are using a simpler window manager or want to shutdown from a script. Sure, there is sudo, but that has to be configured first to work without password. Luckily, after a couple of hours of googling (only to find helpful advice as “this can be done easily with ConsoleKit or hal”), reading documentation of dbus, {Console,Policy}Kit and hal and clicking in qdbusviewer, I finally found a way with hal+dbus:
$ dbus-send --system --dest=org.freedesktop.Hal \ --type=method_call --print-reply \ /org/freedesktop/Hal/devices/computer \ org.freedesktop.Hal.Device.SystemPowerManagement.Reboot
To shutdown, just replace Reboot with Shutdown. I’m going to add this to the default icewm configuration, so that the logout menu finally works.
learning ruby…
Monday, May 26th, 2008 by Michal MarekRecently, I wanted to show how the buildservice makes packaging easier by creating a specfile template for you (just click the “Create RPM SPEC file templat” checkbox when creating a new package). Unfortunatelly, the template it creates is not really useful for someone not skilled in writing spec files. Also, it’s just a static template, so you have to write the summary and description even though you have just entered both in the web form. Definitely nothing to show off to newbies
. But knowing that the buildservice developers have more important stuff to do, and wanting to learn something new, I decided give it a try and fix it myself.
My idea is: The buildservice api asks a set of questions, which are presented by the client (webclient, osc, …) to the user, and creates a specfile based on these questions. Also, the api tries to suggest good defaults where possible. After spending some time learning ruby, rails and the api code, I have an ugly 200 line patch to the api that generates a working specfile for GNU hello
.
The user interface part is not yet done, but should be easy. What’s more chalenging is adding heuristics to “do the right thing”: detecting the build system (autotools, cmake, Makefile.PL, etc), detecting build dependencies, and so on. Right now, it only extracts the version number from the tar name.








