- Added ASystemBus and ASessionBus, non-singletons useful in tests and threads.
- Fixed handling of multibyte strings (Issue#8, by Takayuki YAMAGUCHI).
- Allow reopening of a dbus_interface declaration (Issue#9, by T. YAMAGUCHI).
- Fixed ruby-1.9.2 compatibility again (Issue#12).
- Fixed authentication on BSD (Issue#11, by Jonathan Walker).
- Fixed exiting a nested event loop for synchronous calls (reported by Timo Warns).
- Fixed introspection calls leaking reply handlers.
- "rake test" now works, doing what was called "rake env:test"
Jul 26, 2011
ruby-dbus 0.7.0 works with 1.9.2 again
May 16, 2011
LinuxTag 2011 Pictures

"Rule 1: Stay calm." Ralph Angenendt talks about problem solving.

Party!
Dec 22, 2010
network-autoconfig: Find a connected eth interface and create an ifcfg for it
network-autoconfig helps setting up machines with multiple network interfaces. At the first boot, all available Ethernet interfaces are cycled until one is successfully configured with DHCP.
I have submitted it to openSUSE:Factory now. Enjoy it in the upcoming openSUSE 11.4!
It is referenced as Feature#311012. You are welcome to improve it on Gitorious.
Nov 16, 2010
dbus-dump
dbus-dump is a tool to capture D-Bus messages in a libpcap capture file.
It takes an idea from dbus-scrape, which processes a strace output of dbus-monitor, and takes it further by stracing dbus-daemon, thus not relying on any eavesdropping (mis)configuration.
The intended purpose is to establish the libpcap capture format as a base for debugging tools like
- dbus-monitor
- DBusMessageBox
- Bustle
- dbus-spy
Thanks to Will Thompson for mentioning the pcap idea.
Usage
$ sudo strace -p `pgrep -f 'dbus-daemon --system'` \
-s 3000 -ttt -xx -o foo.strace
$ ./dbus-dump foo.strace foo.pcap
$ ./dbus-pcap-parse foo.pcap
Tue Nov 16 12:56:47 +0100 2010 #<DBus::Message:0xb741f340
@body_length=0,
@destination="fi.epitest.hostap.WPASupplicant",
@error_name=nil,
@flags=0,
@interface="fi.epitest.hostap.WPASupplicant.Interface",
@member="scan",
@message_type=1,
@params=[],
@path="/fi/epitest/hostap/WPASupplicant/Interfaces/180",
@protocol=1,
@reply_serial=nil,
@sender=":1.7132",
@serial=88639,
@signature="">
Tue Nov 16 12:56:47 +0100 2010 #<DBus::Message:0xb741b060
@body_length=4,
@destination=":1.7132",
[...]>
Dependencies
It is written in Ruby. The pcap format is handled by a small bundled module. dbus-dump has no other dependencies. dbus-pcap-parse uses ruby-dbus.
Bugs
This is an early proof-of-concept release, serving to introduce the libpcap format.
The main problem of dbus-dump is duplicating the messages, seeing them both when the daemon receives them and when it sends them (multiple times, for the signals).
The other tools haven't caught up yet:
$ /usr/sbin/tcpdump -r foo.pcap
reading from file foo.pcap, link-type 231
tcpdump: unknown data link type 231
Nov 9, 2010
ruby-dbus 0.5.0 is a Gem with Errors
The main feature is a better binding of Ruby Exceptions to D-Bus Errors. See below for an excerpt of the documentation.
Perhaps more importantly, the library is now primarily packaged as a RubyGem (Issue#6). Also I converted the tutorial from Webgen to Markdown.
Bug fixes:
- Don't pass file descriptors to subprocesses, they would not let go of the service name.
- Fixed InterfaceElement::validate_name (Ticket#38, by Herwin Weststrate).
- Fixed a typo in InvalidDestinationName description (Ticket#40).
Errors
D-Bus calls can reply with an error instead of a return value. An error is translated to a Ruby exception.begin
network_manager.sleep
rescue DBus::Error => e
puts e unless e.name == "org.freedesktop.NetworkManager.AlreadyAsleepOrAwake"
end
Replying with an error
To reply to a dbus_method with a D-Bus error, raise aDBus::Error,
as constructed by the error convenience function:raise DBus.error("org.example.Error.SeatOccupied"), "Seat #{seat} is occupied"
If the error name is not specified, the generic
org.freedesktop.DBus.Error.Failed is used.raise DBus.error, "Seat #{seat} is occupied"
raise DBus.error
Aug 29, 2010
n2n package improved
Thanks to happyman_eric and Grief, openSUSE Build Service already contained a package. I have made an improved version, adding an init script and a sysconfig file. Get the sources in my home project, or the binaries.
Aug 20, 2010
ruby-dbus 0.4.0 with TCP Transport
- TCP transport which pangdudu coded a year ago. At that time I did not feel familiar enough with the library, and the test suite was much smaller too, so that's why it took me so long.
- Enabled test code coverage report (rcov)
- Classes should not share all interfaces (Ticket#36/Issue#5)
- Ruby 1.9 compatibility (Ticket#37, by Myra Nelson)
Aug 10, 2010
Who does not want such a gift
This post is showing naked women packaged as a present (for openSUSE's 5th birthday) and asks Ah... who does not want such a gift, eh
.
I believe that the female users and contributors of openSUSE don't. It reduces them to pretty things, judged on their looks instead of their contribution.
Raul, please stop such sexist postings. Your blog is your own, but keep it out from Planet openSUSE.
Just in case common sense is not enough, let me quote for reference the relevant section of the openSUSE Guiding Principles:
We value... respect for other persons and their contributions, for other opinions and beliefs. We listen to arguments and address problems in a constructive and open way. We believe that a diverse community based on mutual respect is the base for a creative and productive environment enabling the project to be truly successful. We don't tolerate social discrimination and aim at creating an environment where people feel accepted and safe from offense.and the activities in order to excel in our goals:
Emphasize the value of communication and recognize cultural diversity within our community.
Aug 5, 2010
Upgraded to openSUSE 11.3
I went via the command line and ventured to keep all additional repos enabled. So switching the repos was done simply by
sed -i "s/11\.2/11.3/g" /etc/zypp/repos.d/*The KDE session crashed after kdelibs4-core had been updated. No big deal, so I ran
zypper dup again. The /home directory is mounted via NFS, so filesystem.rpm failed when it wanted to reset the permissions of /home. Updating it explicitly after unmounting /home was easy, only unmounting it was harder because the crashed session left processes still accessing the home.
fuser -v /home found them.The NFS mount is also authenticated by Kerberos and there is a bug so I got
mount.nfs: access denied by server while mounting nfs.example.com:/homeI had to rebuild and update a package and tweak a config file. See bnc#614293 for the details (thanks to mcaj for the reference).
Jul 22, 2010
ruby-dbus 0.3.1
- Many on_signal could cause DBus.Error.LimitsExceeded (bnc#617350).
Don't add a match rule that already exists, enable removing match rules. Now only one handler for a rule is called (but it is possible for one signal to match more rules). This reverts the half-fix done to fix Issue#3. - Re-added InterfaceElement#add_param for compatibility.
- Handle more ways which tell us that a bus connection has died.
Jul 2, 2010
Helping Newcomers
I think one good way is to make sure that new people feel welcome when they join a conversation, be it on the forums, on IRC or on the mailing lists. Now this would be easier if we all had infinite time to read and answer all questions, but as we don't, I decided to focus somehow.
The forums provide a handy shortcut for the focus, labeling a user who made few posts as a "Puzzled Penguin". So I've made a simple service, a feed of http://forums.opensuse.org showing only the posts by newcomer users: http://vidner.net/martin/software/rss-creator-blacklist
(Actually right now it does not show Puzzled Penguins only but instead excludes the 100 most-posting users until I learn how to optimize the PHP code.)
Jun 30, 2010
kiwi2puppet
The goal is to recycle the data that went into the building of an image and use it for managing a deployed appliance.
So far it is a prototype that can write these resources
- package
- yumrepo
- user
- group
Source at GitHub: http://github.com/mvidner/kiwi2puppet
RPMs: http://software.opensuse.org/search?q=kiwi2puppet&baseproject=ALL (currently it is a single Ruby script, so at the moment RPMs are not worth any trouble)
Novell Reference: FATE#309497
Get in touch if you're interested.
In case you didn't know:
"The openSUSE KIWI Image System provides a complete operating system image solution for Linux supported hardware platforms as well as for virtualisation systems like Xen Qemu or VMware."
"Puppet is an open source data center automation and configuration management framework. Puppet provides system administrators with a simplified platform that allows for consistent, transparent, and flexible systems management."
Mar 28, 2010
ruby-dbus 0.3.0 Works on Ubuntu
NEWS:
Bug fixes:RPMs can be found via Webpin.
These are by Klaus Kaempf:
- Fixed "undefined method `get_node' for nil:NilClass" on Ubuntu Karmic (Ticket#34).
- Get the session bus address even if unset in ENV (Issue#4).
- Improved exceptions a bit: UndefinedInterface, InvalidMethodName, NoMethodError, no RuntimeException
Features:
- Make the signal dispatcher call all handlers (Issue#3).
- Run on Ruby < 1.8.7 (Issue#2).
- Avoid needless DBus::IncompleteBufferException (Ticket#33).
- Don't ignore DBus Errors in request_service, raise them (Ticket#32).
- Automatic signature inference for variants.
- Introduced FormalParameter where a plain pair had been used.
Feb 18, 2010
Reinventing
[S]ometimes, when you are designing systems it is hard to realize that the circular friction reduction device with a central axis that you have just built is, in fact, a wheel.
-- Russ Olsen, Design Patterns in Ruby, p.4
Jan 24, 2010
Service Activation Fixed in ruby-dbus 0.2.12
RPMs can be found via Webpin.
Nov 9, 2009
Live upgrade from openSUSE 11.0 to 11.2
Article update: it turns out many people come here hoping to find a solution and are disappointed to find only problems that I encountered.. Sorry, that's too bad. Until someone figures out a way to do it online, your best option is to boot off the Network installation CD (100MB).
On Saturday I upgraded my wife's laptop from openSUSE 11.0 to 11.2 RC. I did it using zypper dup, and there were some problems so here I describe them for the benefit of others who might try the same.
- Edited /etc/zypp/repos.d/* to replace all 11.0 occurences with 11.2. It worked also for Packman and Videolan.
- zypper in zypper offered a suspiciously large update. It turned out it wanted to switch from x86_64 to i586, boo! The fix was zypper in zypper.x86_64\>1
- That did not go well. It installed the new rpm.rpm and then repo2solv failed, terminating the transaction. After that, I had the old libzypp and the new zypper, not working. So I manually downloaded the libraries and installed them using rpm, ignoring the broken dependencies for the yast2-* packages.
- Changed commit.downloadMode to DownloadInHeaps in /etc/zypp/zypp.conf, which exists primarily to avoid the previous problem. But Murphy does know when to strike.
- zypper dup
Nov 2, 2009
The suse-ncc User
Answer: It comes from yast2-registration.rpm and is used to switch away from root when we spawn the web browser and let you register your SUSE Linux Enterprise product.
Thanks, mc.
Oct 15, 2009
resolv.conf empty, resolv.conf.netconfig ate the data
Work-around:
I wonder if this is a bug. Anyway, hopefully this will help someone. openSUSE 11.2 RC1.rcnetwork stop
rm /etc/resolv.conf.netconfig
: > /etc/resolv.conf
rcnetwork start
Oct 9, 2009
WebYaST Beta 1
Download links are in the 0.0.13 status mail, see also the module status and the replies.
Oct 2, 2009
I Will Write the Tests Later
I need to try this out in WebYaST (this, or Shoulda).
Sep 24, 2009
openSUSE Conference 2009 Notes: Thursday
Thanks to all who stood up to talk about their work! Not only code matters.
Thu 10:30 - Weekly News (Sascha 'saigkill' Manns)
slides: odp pdfThe slides have all the info.
how to contribute:
- add a section, fill it with news
- blog about stuff, to get picked up
- translate or coordinate a translation
A major part of slides shows how to help with translation.
There are tools to help with that:
- a script in home:dl9pf:newsletter
- Gobby, a collaborative editor
irc channel
About Sascha: he is geeky-quiet, reads the slides.
But he goes forward and is not put back by imperfections in his English.
(And you may remember his tireless packaging enterprises from
opensuse-packaging@).
Thu 10:30 - Apport (did not attend)
Uploads crash reports to a database. Already in 11.1 but not by default.Thu 11:30 - Ambassador Program (Zonker)
web (no slides)To be an ambassador:
- sign up
- have a plan
- membership is not required
- organize a party, booth, launch party (11.2 on Nov 12)
- participate in a Linux User Group
- ambassadors will decide, wanting cost effective impact
- it comes from their travel budget, not from the Ambassador budget
Q: can ambassadors take feedback about barriers to oS adoption?
A: there is no process for that, give feedback directly to developers [ :-( ]
Thu 13:30 - libyui (Bubli)
Q (R Max): can its main loop integrate with a select on FDs?A: no [ but not hard? ]
Thu 14:30 - openSUSE Infrastructure (Klaas Freitag)
[see slides]Lists a cloud of existing services
Lists ideas for future services
Wants "more structure and integration" - for 3 target groups:
- newbies
- users
- geeks (developers)
Proposal for web navigation [photo of slide]. See it!
Demoes Tom's Dashboard: plugins for Studio, Bugzilla, RSS (-> OBS via Hermes)
Thu 15:30 - Software Portal (Benjamin benJIman Weber, Pascal yaloki Bleser)
blogAug 31, 2009
Printing Out Ruby Code
Try 1: a2ps. openSUSE has 4.13 which does not support Ruby (although 4.14 was released on 28-Dec-2007).
Try 2: enscript. No support for Ruby even in upstream (but there exists a patch for that on the Net).
Try 3: emacs. I was not able to produce a highlighted printout from Emacs :-(
Try 4: vim. :hardcopy does it, but it printed the keywords in light yellow on white.
Try 5: kwrite. Success. Yay!
Aug 26, 2009
ruby-dbus 0.2.9
From NEWS: Ruby D-Bus "I'm not dead" 0.2.9 - 2009-08-26
Thank you to Paul and Arnaud for starting the project. I, Martin Vidner, am continuing with it on GitHub.
- Fixed passing an array through a variant (no ticket).
- Fixed marshalling "av" (Ticket #30).
- Fixed variant alignment (Ticket #27).
- Added DBus::Main.quit.
- Mention the DBus interface in a NameError for an unknown method.
- Fixed ruby-1.9 "warning: default `to_a' will be obsolete".
- Added Rakefile and gemspec.
Aug 24, 2009
Git Aliases for Subversion Users
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.st status
git config --global alias.di diff
git config --global alias.dic diff\ --cached
Aug 11, 2009
cnetworkmanager 0.21
v0.21, User visible changes
- Added screenshots.html.
- Output in a tabular form (like Tambet's nmcli); --terse/-t to disable.
- Added --wireless-enabled/--we.
- Added --con-info.
- For unimplemented device types, return "unknown", crash not (Kevin Fenzi).
- Ignore AlreadyAsleepOrAwake error (-o).
- Flags with zero value now output its name (NONE) instead of nothing.
- Major rewrite:
- Created a library wrapping the NM DBus API.
- Created a generic library wrapping python-dbus.
(both libraries are still quite messy) - Dropped support for NM 0.6.
(the last trace is in the 'breakup' branch) - Connection setting:
--activate-connection for system settings or another applet
--connect for exporting a transient connection - knetworkmanager (KDE3) config reading dropped
- Added a (basic) testsuite.
- Switched to distutils.
Jul 21, 2009
HackWeek: NetworkManager Python library
It is because I am doing a complete rewrite, based on an easy-to-use library that hides some rough edges in dbus-python. If you ever thought NM needed some programmatic prodding but were put off by the tedious details, the library might be just the thing for you. For me, it is also an opportunity to learn more Python.
Compare how you get the interface names.
Before:
After:#! /usr/bin/python
import dbus
bus = dbus.SystemBus()
NM = 'org.freedesktop.NetworkManager'
nm = bus.get_object(NM, '/org/freedesktop/NetworkManager')
for dev_opath in nm.GetDevices(dbus_interface = NM):
dev = bus.get_object(NM, dev_opath)
print dev.Get(NM + '.Device', 'Interface',
dbus_interface='org.freedesktop.DBus.Properties')
It is in the librarize branch of the git repo. Beware, the code is still messy. Getting it:#! /usr/bin/python
from networkmanager.networkmanager import NetworkManager
nm = NetworkManager()
for d in nm.GetDevices():
print d["Interface"]
git clone git://repo.or.cz/cnetworkmanager.git cnetworkmanager.librarize
cd cnetworkmanager.librarize
git checkout -b librarize origin/librarize
./cnetworkmanager -h
Jul 8, 2009
D-Bus and Ruby
First, the two losers:
* dbus-ruby: It wraps the C bindings. It is dead (last release in January 2005).
* pr-dbus: No releases, last SVN commit in April 2007, entirely in Ruby.
Now for the contenders. Both are packaged as RPMs in the OBS YaST:Web project.
The developers know about each other but in 2007 they did not want to merge the projects. The developers are not active but patches do appear.
* ruby-dbus
- LGPL
- no test suite (but I've started one together with bug fixes: Github clone)
- can export services
- cumbersome API (explicit introspection calls needed, explicit types for variants needed, return value must be an array)
* rbus
- GPL
- test suite (RSpec, needs a patch)
- cannot export services
Jun 18, 2009
Perl DBus Library
Jun 4, 2009
Cool Features in Automake 1.11
The parallel execution is enabled by the environment variable AUTOMAKE_JOBS=n. It reduced the run time for yast2-core from 18s to 7s for me.
As for compilation, how's this (kernel people may yawn now):
make[4]: Entering directory `/home/mvidner/svn/yast/trunk/core/wfm/testsuite'
CXX runwfm.o
CXX runc.o
CXXLD runwfm
runc.cc:54: warning: unused parameter ‘name’
CXXLD runc
compared to:g++ -DHAVE_CONFIG_H -I. -I../.. -I../../libycp/src/include -I../../liby2/src/include -I../../libscr/src/include -I./../src -I../../liby2util-r/src/include -DY2LOG=\"wfm\" -O0 -g3 -W -std=gnu++0x -DHAVE_CXX0X -Wall -Wformat=2 -MT runwfm.o -MD -MP -MF .deps/runwfm.Tpo -c -o runwfm.o runwfm.cc
mv -f .deps/runwfm.Tpo .deps/runwfm.Po
/bin/sh ../../libtool --tag=CXX --mode=link g++ -DY2LOG=\"wfm\" -O0 -g3 -W -std=gnu++0x -DHAVE_CXX0X -Wall -Wformat=2 -o runwfm runwfm.o ../src/libpy2wfm.la ../../scr/src/libpy2scr.la ../../libscr/src/libscr.la ../../libycp/src/libycp.la ../../libycp/src/libycpvalues.la ../../liby2/src/liby2.la ../../liby2util-r/src/liby2util.laIt is enabled by putting this to
configure.in:m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])(The ifdef makes for graceful degradation with older automake.)Use Webpin or the Software Portal to find a package built for your release.
Jun 2, 2009
A Minimal Build Service OSC Plugin
$ mkdir ~/.osc-plugins
$ cd $_
$ cat > releasecheck.py <<EOF
def do_releasecheck(self, subcmd):
print "Release early, release often."
EOF
$ osc releasecheck
Release early, release often.*) They are not released, bad me; but they rely on the internal directory layout anyway.
May 18, 2009
Bugzilla Fables: Serving Two Masters
For certain tasks, YaST uses external helpers (agents) communicating via pipes. One of them was causing YaST to hang when cleaning up. Actually no, it was two of them. Either one was not enough, but if two of them had been used, they would both keep on running and YaST would not exit.
It turns out the bug is in YaST not closing unnecessary file descriptors before spawning the agents. So the second child inherits a copy of the pipe that controls the first child. Then YaST closes the first child's commands pipe, expecting it to see EOF and exit. But the pipe is still open in the second child, uselessly. And they all wait. And wait...(*)
Moral: close unnecessary FDs before exec.
If you wonder why we did not see the problem earlier, it is because both agents contained another bug, a banal one of not responding to an explicit Exit message.
*) Actually, only YaST wait(2)s. The other two read(2) ;-)
Feb 26, 2009
Reducing Unprioritized Bugs
Thanks to Milan VanĨura for showing us how b.n.c can be improved (check out also the local time script) and for even implementing this one as I stood behind his back!