Skip to content

Next version of Config::Model will use asynchronous check

Hello

To check the validity of Debian dependencies in Debian package, Config::Model queries a remote web server to get the list of package version known to Debian.

The first version of this check did sequential requests: when the cache was not very fresh, I had to wait more than 60s before getting results for complex package like padre. That was very frustrating (but less frustrating than checking package names manually)

For the following version, I addedhacked AnyEvent in Dpkg model to run parrallel queries. This went much faster but gaves weird results: before getting a response from Debian server, the packages were flagged as unknown. To get consistent results, running twice cme check dpkg was required.

So, at new year, I’ve decided to bite the bullet and implement correctly value checks with asynchronous queries to remote server. This new feature is now ready and will be delivered in Config::Model 2.030. cme will now return consistent results.

This new release is mostly backward compatible. You may notice some quirks with some other modules based on Config::Model:

  • Current Config::Model::Dpkg will returns unconsistent results as usual
  • Tk UI will not show correct package status (i.e. packages may be wrongly shown as unknown)
  • config-model-edit process must be killed if it refuses to exit.
  • Tk UI non-regression tests will block

These quirks will disappear once these modules are updated. This should not be long since all the updates are ready in github.

All the best

Be wary of “optimised for …” devices

Hello

This story began with linphone having a weird behavior: every now and then, the mouse pointer would become stuck: the pointer moves, but clikcking on it always activate the same widget. Since this always happened in the middle of phone conference done for work, this was infuriating.

Long story short, I finally found that my plantronics USB headset was responsible for this weird behavior. This headset is connected to the USB bus and is seen by the computer as a USB sound card. The bug was triggered by pressing the “mute” button provided by the headset.

Suspicious of this usb device, I used lsusb to find the features provided by the heaset:

$ lsusb -v -s 1:3 2>&1 |grep InterfaceClass
bInterfaceClass 1 Audio
bInterfaceClass 1 Audio
bInterfaceClass 1 Audio
bInterfaceClass 1 Audio
bInterfaceClass 1 Audio
bInterfaceClass 3 Human Interface Device

Audio devices were expected, but why a HID device ? This device is a headset, not a keyboard or a mouse… Testing further, I also saw some number poping up on my screen whenever I pressed the the mute button. The only way to get the mouse back was to unplug the headset.

A quick google search gave a solution to setup X11 to ignore the headset. Problem solved.

But this did not answer the question regarding the HID device. Then I got a hint in the form of a sticker glued on the headset USB plug: “Optimized for Microsoft Lync”. This page gave the answer: an “optimised for Lync” device provides “mute/unmute across PC and device”.

I can only guess that when the mute button is pressed, some data is sent from the HID interface. Unfortunately, the window manager does not like to be on the receiving end of this data.

The moral of this story is: “optimized for something” actually means “not standard“.

ok. There’s a bug somewhere. The comments of this blog have convinced me that I went too far with the moral of this story. It’s now overstriked instead of plainly remvoed so the comments still make sense.

Thanks everybody for the constructive comments.

All the best

How to fix a configuration model

Hello

I’ve written a tutorial to show how a configuration model can be updated to cope with new features provided by new software release.

This tutorial shows how to add a new parameter provided by OpenSsh 5.9 into Ssh model. This example can be applied to other models (like Dpkg model).

I hope that people will be able now to perform simple enhancements to current models.

Feedback are welcome

Dpkg source editor/checker is going native

Hello

As Config::Model was becoming too big with too many dependencies, I’ve moved all Debian stuff from Config::Model repository into a separate Debian repository.

If you install only libconfig-model-perl 2.026-1 (from experimental), the command ‘cme check dpkg’ will not work. You must also install libconfig-model-dpkg-perl to get it back. libconfig-model-dpkg-perl is currently in experimental.

libconfig-model-dpkg-perl repository is hosted on Alioth in debian perl-packaging team and is a Debian native package. Nevertheless, it will be uploaded to CPAN. (just like dh-make-perl).
All people involved in packaging are welcome to hack it or suggest improvements

I’ll upload both packages into unstable once the dust settles.

All the best

Kerberos configuration editor looking for a maintainer

Hello

A while ago, Peter Knowles wrote a configuration model for Kerberos. Unfortunately, his priorities shifted before he completed this work. He was kind enough to send me the prototype in hope someone could take over.

Although I do not know Kerberos, I believe the model is rather complete. Just click on the image below to judge for yourself:

Class diagram of Kerberos configuration model

This work was released under a LGPL-2+ license.

There are some tasks left to get a Kerberos configuration editor. These are mentioned in config-model-kerberos readme file.

To look at the code, just clone config-model-kerberos with

git://github.com/dod38fr/config-model-kerberos.git

If you need more information on Config::Model, see:

If you are interested in adopting Kerberos model, please keep us informed on config-model-users at lists.sourceforge.net. This will avoid duplicated work. On my side, I’ll gladly answer questions related to Config::Model to help you get started.

All the best

cme fix dpkg now track and display changes

Hello

I’ve released Config::Model 2.018 which is now able to track the changes done with cme to your configuration data.

Thw GUI now features a new menu entry File -> show unsaved change that will give you a list of the changes done since running the command or since the last save (whichever occured last). For instance:

This feature is also available in non-graphic mode.

As an example, let’s refresh the lcdproc package:

$ cme fix dpkg
Fixing...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Warning in 'control source Standards-Version' value '3.9.2': Current standards version is 3.9.3
Warning in 'copyright Format' value 'http://dep.debian.net/deps/dep5/': Format does not match the recommended URL for DEP-5

Changes:
- control source Standards-Version: '3.9.2' -> '3.9.3' # applied fix
- copyright Format: 'http://dep.debian.net/deps/dep5/' -> 'http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/' # applied fix

The Changes list can be reused to update the changelog, but the author does not dare injecting this directly in debian/changelog…

Let’s check the resulting changes:

$ git diff
diff --git a/debian/control b/debian/control
index 11a5b8a..2b81192 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Build-Depends: autoconf,
                libxosd-dev,
                pkg-config,
                texinfo
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
 Vcs-Browser: http://git.debian.org/?p=collab-maint/lcdproc.git;a=summary
 Vcs-Git: git://git.debian.org/collab-maint/lcdproc.git
 Homepage: http://www.lcdproc.org/
diff --git a/debian/copyright b/debian/copyright
index 6cea444..4b48619 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://dep.debian.net/deps/dep5/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: lcdproc
 Upstream-Contact: William W. Ferrell 
 Source: http://www.lcdproc.org/
domi@ylum:~/debian-dev/lcdproc-stuff/lcdproc$ 

Last but not least, this track and display changes features is also available for other models, like OpenSsh, lcdproc, multistrap

All the best

A success story for Config::Model

Hello

Here’s a mail telling how the Config::Model Perl module was used to refactor existing configuration tools in Perl. Some punctuation and blank lines were added to improve the flow of this text. The full name and mail address of gkr is withheld on his request.

I took over a perl script that was responsible to pull data from several sources and push it after validation and re-packaging including some meta data into one of our production systems.

The script was never intended to be used for more then a few month. But as things go, we were still using it after a few years. Only now for a lot more sources. Since all the configuration of sources and meta data were contained as a single hash in this script, it became very unwieldy. Although the configuration seldom changed, once it got added it was not an option to keep it like this especially as we decided to prepare a Debian package for faster installation and version tracking. So I had to re-work it and was looking for some library that was allowing me to define how the configuration has to look like, providing sensible hard coded and computed defaults for some of the values.

This was when I found Config::Model on Cpan. It was, after some digging into the documentation, quite simple to define a rough first version of the complete config, including global default values as ini file and very simple to read in and write out. A more advanced version was not working because the Config::Model in Debian squeeze did not provide needed features.

Switching to yaml as configuration file format not only increased readability but also worked with the standard Squeeze package. Consistency is checked automatically inside the model so broken configurations are more unlikely in the future.

Of course I had some work re-factoring the original source but Config::Model allowed an easy addition of a value-checked and documented configuration file. To access the Config::Model::Instance I added small wrapper packages that allowed an easy access of the config elements by name to make the source easier to understand. The re-factoring needed for creating a Debian package for the Script – which is now a set of modules and a small executable – was simple once I had Config::Model working, since I was able to add new configuration items effortlessly and remove a lot of hard coded parameters.

I don’t use the cli tool yet for configuration editing but that’s going to be the next step.

Many thanks to gkr for this feedback. Let’s hope he will continue to give feedback on his usage of Config::Model.

All the best

Follow

Get every new post delivered to your Inbox.