Search Results: "ana"

26 September 2009

Gunnar Wolf: The bad and the worse; Representative democracies' minimums

Martin rants about the German electoral system. From his rant, I'll pick up only two points And I'll try to connect with Toxicore's excelent (Spanish) blog post, where he quotes political analist Denise Dresser. Dresser has made a great point: Our probably-imposed, legitimacy-impaired president Felipe Calder n has requested the society to talk good about Mexico, to project a positive image of the country. Dresser says, yes, there is a lot of good to talk about the country, and we should emphasize on its richness and beauty, invite people to come and visit, to know what the country is really like. But at the same time, it is our duty to talk bad about the bad areas and decisions of our government, as that is the best (if not the only) thing many of us can do to really get things to happen That is what we can do to push our country's good things forward, to make the country sustainable, to pull attention towards what needs (such as the very very deplorable cases of censorship, human rights violation, ecosystem predation we have seen in the last years). Anyway... What did I want to comment about Martin's post? He criticizes Germany's law requiring a 5% quota for a party to have parliamentary representation. In Mexico, the minimum is 2%. Most people agree, though, that it is too low, and that we should push to increase it. Why? Because the money that is spent in supporting the party system. In Mexico, when a political party fails to get 2% of the vote, it is basically disbanded and it is very hard for it to regroup, to compete again. Many people believe we should aim to a political system with as few political parties as possible (such as the semi-democratic system they have in the USA). I strongly prefer the system found in most European (and even many South American) countries where there is a real wealth of ideological positions represented, and where governments have to be formed by agreeing to form coalitions, as it is almost impossible for them to get full majority. I would much rather see Mexico march towards a parliamentary-based political system, away from the presidential one. Of course, that is almost impossible to expect. With the current political system, we are bound to have forever few monolithic, meaningless political parties. We will likely converge on three blocks, following the current three major blocks (leftoid PRD, centroid PRI, rightoid PAN). They are different in some important senses, yes, but in general they are much the same. I don't hold any hopes to ever see something like the Pirate Party appearing in our system...

Ana Beatriz Guerrero Lopez: How to get your bugs solved in Debian+KDE

Imagine you have found a bug in your Debian running KDE, a nasty one, and you want to get it resolved. What you should do? This is centered on KDE and Debian but most of it is useful in general. First Case: You have a problem and you have no idea whether it is a bug or not. Even worse, you don t know which package to report it to. This happens more often than you might believe; it even happens to experienced people. Your first step should be to checking user forums and mailing lists [0] to see if someone else has encountered the same issue. You might find that your problem is already known (and maybe easy to solve). In the case that you do not find your problem there, then you can ask for help and post a mail or message explaining your problem. Pick one mailing list or forum board, the one you think is more appropriate, then post your issue there. The most detailed you are about your problem, the bigger is the likelihood of you obtaining help. It could happen that: If you do not get any answer it might be that nobody got into the same problem and they do not how to help you. But it is also possible you were not clear about your problem. Also, you need to be patient; it is unlikely someone will answer your question 2 minutes after you posted it.
If you find out more about your problem, it is a good idea to send another email or post updating your first message. If after 5-7 days you do not get any answer, you can try asking for help in another forum or mailing list. If you are given pointers to what software is causing the problem you can go to the second case. [0]
Mailing lists: Forums: Second case: You know where the problem is. Where you should report your bug? First, you should check in both the Debian and the KDE bug tracking systems [1] to see if the bug is already reported. If that is the case, and you are able to give more information about it, update the bug report. If the bug is not reported, then report it in the KDE bug tracking system if you think it is a problem in the application or in the Debian BTS if it is a packaging problem. If you re not sure what kind of bug it is, you can go to the first case (in the beginning of this post) and ask in the users forums and mailing lists [0]. However, you won t always get it right, and in some cases you will be pointed to the other bug tracking system. Do not take it personally; KDE developers can not help you with packaging problems and Debian packagers can t always help you with the application bugs. It might be that your problem is solved in the development version, so if possible check what is going on in the development version before report. When reporting the problem, give all the details you can about your problem. If you can detail the steps to reproduce the bug, even better. Also, if you are asked for more information, reply the best you can. Somebody is trying to help you. Be nice !:) Also, remember to be patient when reporting bugs or being asked for more information: both KDE and Debian are big projects with a lot of traffic on their respective bug reporting systems (esp. KDE), so sometimes there is not a quick reply from the developers. [1] In Debian, a lot of people report upstream issues in the bug tracking system and they think it is good and what they have to do. The truth is that in a very few cases, such as security bugs or data loss bugs, this is a good idea. But most of the time it is not useful to report problems to the people who can not solve them. Do not expect Debian/KDE maintainers to forward your problem upstream (a problem which they may well not be able to reproduce), then back to you when upstream ask for more information, then back with the information to upstream it is time consuming and we have big (wo)manpower problems. In any case, if you think the bug is very important and should be in the Debian BTS, you can report it in Debian as well as reporting it to KDE. Make sure you mention the KDE bug in the Debian bug. Third case: your problem is not a bug, just a feature request. Until now, I have talked about bugs, when you find something that is clearly not working right in your system. But what about when you want to ask for a new feature in a piece of software? In very few cases this belongs in a Debian wish list. Most feature requests apply upstream and you should tell the about your idea. If you do not tell them, it is unlikely they will implement it. Still, after reporting, you should accept it if upstream thinks it is not a good idea or it is not interested enough to implement it. Post updated on the 30th September, thanks to Rupert Swarbrick for grammar fixes.

Christoph Haas: This should work fine nowadays (about vino, Compiz and wrong optimism)

I ve been back from KDE (4.2!) to Gnome and with the mighty powers of Compiz my desktop is the envy of my Windows coworkers and still geeky functional. Well, somehow functional. For a while I wondered why I can t properly use VNC to remote-control my desktop from home. The connection works and I see the desktop but nothing seems to happen when I click or type. Now I figured out the desktop in the VNC client window is just not refreshed while my mouse and keyboard actions really do what they were supposed to on the VNC server. This is my sad tale of how I learned that a regression may mean driving the motorcycle to work in the middle of the night after cursing VNC. :) After a little searching through the lazyweb I found out that it s a bug reported on Ubuntu already. Apparently Compiz doesn t use the XDAMAGE extension properly. Somehow when using the graphics adapter s magic 3D powers X11 loses control of what sections are changed I m not an X11 guru. At least the client doesn t know when to redraw areas of the screen that have changed. The suggested workarounds were pretty ridiculous. Start another x11vnc session without compiz and connect to that. Very funny. I want to control my running desktop not create a new one. So I switched off compiz at work and voila VNC works again. Some eye-candy and shortcuts are gone but remote controlling the desktop is far more important while im on call. But I quickly missed Compiz. The missing eye-candy wasn t that bad. But metacity s window placement algorithm sucks as badly as back in 2002. As if I can hear it whisper: I have no idea where to put that stupid window. You tell me. I researched a little further and somehow the bug is known to Gnome, too. And other users suffering from the problem are pointed to the VirtualGL page of Wikipedia. Apparently the problem was fixed for several people until a regression was reported where things failed again. Seems like the vino developers removed the piece of code that detected the use of 3D window managers as a 2008 christmas present. Their reason: This should work fine nowadays. Hell, no, it doesn t! Somehow I downgraded vino to version 2.24.1-3 and ran the vino server manually (/usr/lib/vino/vino-server sm-disable) to see if it prints any error message. Indeed it does:
Composite detected, disabling XDamage extension.
This is a workaround while XDamage extension does not work correctly with 3d desktops.
Hopefully it will work at next vino release.
This time it worked well, too . I upgraded to the current version 2.28.0-1 (as in unstable by today) and suddenly my VNC connection had the same problems again. Aha! Let s try the Lenny version 2.22.2-1. Works, too. This has taken me hours to debug. Finally I know I can report a bug against the vino package. I wonder how long it would have taken a mortal to figure that out. :( [Sorry to my sponsorees who's package sponsoring requests were delayed again due to this mess.]

25 September 2009

Julian Andres Klode: cupt and how to write package managers


cupt is a new package manager written in Perl by Eugene V. Lyubimkin, who previously contributed to APT. And more than all, the project makes no sense at all. First of all, there is a language issue. Implementing a package manager in Perl has some major drawbacks. One of the features of APT was it being written in a lower-level language (i.e. C++ which really is below Perl), making it possible to write applications like synaptic and python bindings which in turn lead to applications like gnome-app-install or Ubuntu s new Software Store. Furthermore, writing a package manager in Perl means that Distributions such as Emdebian might not be able to use it since they have excluded Perl due to its space requirements. This becomes even more important considering that cupt depends on even more perl libraries. This means that cupt will never be able to replace APT. Secondly, a package manager should not be designed specifically for one distribution. This is another major drawback of cupt and other package managers such as yum or zypper. The smart package manager, written in Python and funded by Canonical Ltd. is an example for a distribution-neutral package manager. Now let s take a look at package management in modern distributions. Usually we have two levels of package managers, the first being tools like dpkg and rpm which take care of installing and removing the packages and level-2 package managers implementing dependency resolvers and package retrieval from remote locations. Recently, distributions started to add a third layer named PackageKit, which shall provide distribution-independent package management user interfaces. The project was well-received by RPM-based distributions, but failed in Debian-based distributions due to not supporting debconf. Furthermore, adding a third layer just increases the possibility of problems. The right way to do package management is a distribution-independent level-2 package manager written in C. The smart project shows us that this is possible although itself fails to meet the lower-level language (C) requirement. That s why I decided to write a package manager in Vala, a GObject-based language which gets converted to C and then compiled. If successful, this project will be able to replace most of the current level-2 package managers and will also provide the same distribution-independence as provided by a level-3 package manager such as PackageKit. It is also easy to create binding for other programming language such as Python or Perl thus enabling application developers to choose the language they like most. The core of this project is a vendor-neutral library, temporarily called libapt (as the project is called APT2 for now). This library contains all the code which is not specific to a vendor i.e. file retrieval, dependency resolver, caches, etc and is then enhanced by several vendor-specific plugins, each implementing a PackageManager (interface to the distribution s level-1 package manager) and a Repository (well, repositories from which you can download packages) interface. We could even enhance the vendor-independent interface to include more details of a repository. Most repositories nowadays consist of 4 components: A meta index (Release files for Debian, repomd.xml for Fedora/openSUSE/etc.), a package index (e.g. Packages files for Debian, *primary.xml.gz on Fedora, etc. ), a source index (e.g Sources files in Debian) and a files index (e.g. Contents-*.gz for Debian). I took a look at the repository formats of Slackware, openSUSE and Fedora and it seems that this concept can be applied to all of them. So maybe all we need are distribution dependent parsers for those files. One of the most important issues with APT is its use of mmap() for the cache. Using mmap() makes it hard to grow the cache, which is sometimes needed. We see a lot of bug reports from people with too small cache sizes. We can circumvent this problem by utilizing an embedded database like SQLite for this, but we would probably loose some speed and it may be harder to maintain a flexible API. We should see what the best option is here, both ways are possible since Vala 0.7.6 includes my patches for adding mmap(), ftruncate(), mremap() and some other functions. An idea to circumvent the mmap() issue is gathering statistics about the relation between the number of repositories and the size of the cache and then using a value which is slightly above the average statistical value. The project is not very mature yet, it only includes basic library functions for downloading files and parsing configuration files, etc. You can find the (MIT licensed) code at http://git.debian.org/?p=users/jak/apt2.git. I also have some local code for repository management and multi-threaded file fetching, but it s just not ready to be merged yet. Posted in APT2, Debian

Julian Andres Klode: The APT2 project


I just started working on a replacement for APT written in Vala and called APT2 (I know, the name could be better). The main idea behind the project is to create a library for working with Debian repositories and packages, and on top of this library a few applications. This is different from APT because the project focuses on the library part, whereas APT is primarily focused on the application part. I chose Vala for this task because it has an easy syntax and allows me to use the features provided by GLib and Co. really easily. GLib provides many functions needed for APT like file access, unicode handling, hashsums creation. It also provides us with signals which are useful for implementing progress reporting. Another project, called cupt tries to provide an APT replacement in Perl. Apart from the fact that I don t like Perl, it also has the disadvantage of being too big to ship on embedded devices and is not useable from other languages such as Python or C/C++. Yet another project, smart provides a different package manager written in Python. While I like Python, it can t be used from languages such as Perl or C/C++ and is too large. APT2 will only require GLib, Gee and libarchive, which require about 2MB of space; about 1/10 of Perl s size. The core of APT2 is a library called libapt . At the moment, this library provides classes for reading tag files (TagFile&TagSection) and an incomplete configuration class based on libgee s HashMap (to ease coding, it will probably be changed to a special data structure like those in apt-pkg). The next step will be implementing a parser for configuration files (currently we only support in-memory objects) and writing the Acquire system. The planned Acquire system uses GModule to modularize the support for different URI schemes. Each module provides a worker class which implements one or more URI schemes. The first of these modules will provide a worker using GIO, which deals with local file access, samba shares, FTP, SFTP, WebDAV and various other protocols, including HTTP until a replacement has been written (since we don t want to force gvfs-backends). The workers communicate with the parent Acquire object using signals and can cause the whole acquisition to be aborted by emiting an abort signal (or similar). The whole project has just been started and may take some months until it becomes useful (if it becomes useful at all). The code can be found at http://git.debian.org/?p=users/jak/apt2.git and is licensed under the MIT license (see http://www.opensource.org/licenses/mit-license.php). It is a secondary project and will not affect my work on apt (not much yet) and python-apt (0.8 series). Posted in APT2, Debian

Michal Čihař: Enca 1.11

After month of collecting little fixes flying around, I release Enca 1.11. If you don't know Enca, it is an Extremely Naive Charset Analyser. It detects character set and encoding of text files and can also convert them to other encodings using either a built-in converter or external libraries and tools like libiconv, librecode, or cstocs. The full changes are short: You can download from http://dl.cihar.com/enca/.

Ryan Niebur: Padre 0.47 released!

Version 0.47 of Padre, a Perl IDE, has been released! Thanks to everybody who contributed! The majority of the changes for this release are lots of bug fixes, as well as improvements and refactoring of Padre s code. Among the bug fixes are many fixes for Windows-specific problems. There s also improvements to the beginner mode, and improvements to the included Perl documentation, making Padre even better for people who are learning Perl! This release had the biggest Changes entry of all of the Padre releases, with 41 Changes entries in 12 days, so I m not going to list all of the changes. But here are some of the most important ones: The complete list of changes can be found here.

24 September 2009

Wouter Verhelst: RedHat is so medieval

So there's three systems. One of them runs CentOS 4, the other two run RedHat EL 4. One of the RedHats has been in use for quite a while, but the other two are freshly installed, and would need to have the same functionality as the first, but don't yet, mainly because they miss a number of packages. So we do this.
[wouter@working-host ~]$ rpm -qa --qf "% NAME "   sort -u > working-host
[wouter@CentOS ~]$ rpm -qa --qf "% NAME "   sort -u > CentOS
Next, we compare the two:
diff -u working-host CentOS   grep '^-'   tail -n +2   sed -e 's/^-//' > CentOS-missing
At this point, the file CentOS-missing contains some 403 lines. So how does one install packages on CentOS4?
[root@CentOS ~]# yum install $(cat CentOS-missing)
It starts thinking about it, then after several minutes comes back to me with "foo is already installed in an older version. I can't do what you're asking me"
[root@CentOS ~]# grep foo CentOS-missing
[root@CentOS ~]#
In other words, it decided that, to satisfy one of the dependencies of one of the packages I'm asking it to install, it needs to have some other package installed, too, so adds it to the set. Then figures out that it's already installed, at an older version than what it was trying to install. Then bombs. Okay Wouter, what were you thinking? Surely you can't expect a package manager to suddenly update packages when you ask it to install something else? That would mean upgrading and installing in the same command execution! Oh, the horror. So, okay, we run yum update first. Do you think that fixes it? Of course not! It now comes back with... a message saying that a newer version of what we're trying to install is already installed. Sigh. So I'm now running 'for i in $(cat CentOS-missing); yum -y install $i; done' on this host. Since it takes yum several minutes to resolve dependencies, that means it's going to take a while to have it install 403 packages. The not-yet-working RedHat 4 installation seems to have the exact same problem, except that up2date takes even longer to resolve dependencies, so we're not beyond the 'upgrade' step there yet. I'm sure it will come up with all kinds of other interesting failure modes. Luckily the RedHat-missing file is much smaller (83 packages). How do RedHat users not eat their keyboard in frustration? Note: yes, I'm aware of apt-rpm. Unfortunately, that is not supported on 64bit installations, because apt (in neither its dpkg nor its rpm variant) understands the notion of multiarch. At this time.

Daniel Stone: all the cool kids are doing it

Since all the cool kids are doing it, here are some of the more interesting stats from the Google analysis tools. The third most popular search term used to hit my site has been 'jdub' of late, which is a bit worrying. Number five is 'scandinavian window systems' (?), number fifteen is 'abortions', number seventeen is 'word up for hilltop hoods' (okay, I share the sentiment, but will Googling for it really be that useful?), and number eighteen is 'bluetooth beatbox', which really defies explanation beyond being a googlewhack, but it's not even that.

The mind boggles. At least it's not quite as odd as when I maintained a very large, Google-indexed, IRC quotes file.

Paul Wise: Adobe CMap and AGLFN data now free software!

In March 2009 I contacted Adobe about the self-contradictory nature of the license for the Adobe Glyph List For New Fonts (AGLFN) data. I did so because one of the upstreams I am involved in (fonttools) embeds a copy of aglfn.txt and I noticed the license was a bit strange. An Adobe employee by the name of David Lemon replied to say that the license would become less free than it was. I then asked him to consider using a free software license for both the Adobe CMap and AGLFN data. We discussed the benefits and drawbacks of doing this for both Adobe and the free software community. David was initially skeptical about the balance between benefits and drawbacks for Adobe and I was feeling pessimistic about the situation. The conversation ended and several months passed, with me sending the occasional ping and David being busy. Then in June he told me a new license was coming in a month. So I sent another ping on September 20th to find out what the status of that was. A couple of days later I received a mail saying that the Adobe CMap data has now been released under the BSD license and that the Adobe AGLFN data will soon follow! Please note that while this means that modifications are technically allowed, they are still strongly discouraged for compatibility reasons. Adobe has assigned an emailable maintainer (currently Ken Lunde) for these files so there is no reason that modifications should not be done upstream. You can also edit the wiki to document things or post in the forum. If you happen to meet David, Ken or Dave McAllister (who manages the Open@Adobe program) somewhere, please thank them and offer beverages. So, what does this mean for free software projects? Debian CJK users will be able to read many more PDFs with CJK characters without using any non-free packages once the new CMap files reach main. I will need to package the new AGLFN data for Debian. I will need to remove the embedded AGLFN from fonttools upstream and adapt it to use the packaged one if available or suggest the user download it if not. GNU Classpath and the other software projects using AGLFN data might like to do the same. I may consider writing a library for loading the AGLFN data, mainly as an exercise in learning how to write a good library though. Oh, and perhaps I can convince (Kenshi MUTO) my minimal level of involvement in this is worth a beer if I ever meet him :D

23 September 2009

Jon Dowland: win7 window management

Since I've started today writing about UI issues, I might as well continue. I stumbled across a satirical review of Windows7 on kuro5hin (who knew kuro5hin was still being updated?) which highlighted one or two new window management features:
You can drag a window to the top to maximize it, which is surprisingly useful. Dragging it to the side maximizes it to use half the screen, which is great for two Explorer windows for moving stuff around.
I've always found old-windows' right-click-on-taskbar menu items for auto-arranging windows very useful and wished that stock GNOME was as useable (you can get a bit closer with Devil's Pie. I might still one day resurrect my own window manager idea). This is probably no more discoverable than the old way, but useful none-the-less.

22 September 2009

Julien Danjou: Various news: what happend durring summer

It's been a while since I blogged about something. So here's a bunch of things I've done the last month. Holidays Well, I've been in holidays one week. :-P awesome There have been a huge number of changes between 3.3 (released in June) and 3.4 (almost relesed). I wrote a small but very useful object layer on top of Lua, which adds a class/object system a bit like gobject. I've also replaced all the hooks by per-class/object signals. Finally, the awesome Lua basement are cleaner than they were before, and the extendability is improved. How nice. We're trying to release 3.4 (rc2 should be out soon), but the development pace is a bit slower than a year before. We're basically almost 2 months late on what was our previous release rate. Not a big deal however. I've started working on 3.5 slowly. It gonna get amazing new features too. :-) Google Summer Of Code 2009 I've mentored Mariusz Ceier on XCB GSoC. He worked on adding Xinput2 and XKB extensions. And he managed to do this. His work should be imported ASAP, the discussion has started on XCB maling list last week. In exchange, Google offered me (and to every mentor) an awful blue t-shirt! Thanks Google! :-P

Martin-Éric Racine: mailx implementation that won't barf on UTF-8 encoded GECOS information?

Dear Lazyweb, I've been having problems with cron jobs that mail their output, because they always manage to garble non-ASCII characters into some unreadable crap. Upon closer inspection, the real culprit seems to be mailx: no single mailx implementation out there seems to have come to terms with the fact that most contemporary operating systems have their GECOS information encoded in UTF-8, rather than in ASCII. I had very high hopes for the Heirloom implementation of mailx, except that it, too, fails at encoding mail headers in UTF-8. I'm thus wondering if there's anything I might have overlooked, perhaps a mailx setting that would enforce encoding of the From, To and Subject lines to UTF-8, or otherwise another mailx implementation that in fact does acknowledge the fact that most operating systems these days have their GECOS information encoded in UTF-8?

Fabio Tranchitella: Distro Summit 2010: Call for Papers

The Call for Papers for the Distro Summit 2010 is still open!

Distro Summit 2010 is a one-day technical conference with a strong focus on collaboration between Free Software distributions hosted at the linux.conf.au 2010.

We are looking for proposals from any Free Software distribution, from the typical full distributions (both linux and non-linux) to the niche market derivatives.

In spite of the strong focus on collaboration between Free Software distributions, topics may include packaging, maintenance, relationship with upstream developers, release management and QA.

To submit a proposal, or get more information, please write to cfp@distrosummit.org.

20 September 2009

Stefano Zacchiroli: gdebi needs you

please help out with gdebi - a history of why Short summary: if you are looking for a way to help Debian become a bit more user friendly, please take care of gdebi in Debian. I'm rather upset. So beware, rant ahead. The reason dates back to the beginning of this afternoon, when a friend of mine, GNU/Linux newbie, mailed me asking for help with his brand new (to my astonishment) Debian Lenny installation running the GNOME desktop environment. The request was simple and common to a lot of our users: "how can I see videos on YouTube and use Skype"? Surely, the first (brief) explanation I gave was why those pieces of software are not in Debian, because they are pieces of evil proprietary software. Fair enough, usual song and dance, that gets the message through. But than, given that I personally care about releasing a completely free operating system, but not necessarily in inhibiting the usage of any non-free bits of software, I wanted to actually solve my friend's problem. Regarding flashplugin-nonfree, unfortunately it is not in Lenny. Two solutions to that: either point him to http://www.backports.org and explain how to use them from synaptic (not particularly hard). Or give him a direct download link of the .deb coming from backports.org. It turns out that for Skype there is no such choice. Once there used to be an APT-gettable repository for their debs, but it seems to have vanished (or else I can't find it). Still, there is a page from which you can download Lenny .debs. Given that for Skype the choice is forced, I was tempted to simply reply to him with a couple of link to .debs and solve his problem rather easily. But wait. Once he has the two debs, how can he install them? First attempt: "just click on them in Nautilus" (my hope: "synaptic will do the right thing ). No way, it will fire up file-roller. Second attempt: "install gdebi (using synaptic), right-click on the deb, and choose ;open with gdebi'". Seems to work, but no, you will be hit by bug #493352. (BTW, the reason why you need the right click is bug #421096). What makes me upset is that both bugs were there way before the Lenny release and slipped through our QA knots. Nobody's fault, the maintainer apparently lost interest (or time) package and stopped caring about it. Happens all the time. But damn!, we will lose a user the moment I tell him "you know, you need to open up a root terminal". A few remarks: this rant is not about "we should invite user to use non-free software"; it is not even about "we should be more attractive to newbies"; it is just about the pity of losing users like this, dumbly. Concluding:
  1. dear lazyweb, any idea of what can I suggest to my friend to install the debs I'll point him to, without needing the knowledge of a terminal?
  2. gdebi in Ubuntu is ahead of lots of version wrt Debian, I'm convinced that it fixes most outstanding issues (given that upstream author is a Canonical employee). If you have some free Debian-time slots (I currently don't) and you care about newbie-accessibility, please consider helping out with gdebi. He needs you.
EOR (end of rant)

Clint Adams: Riddle

Why would all the presenters at a Software Freedom event be using MacOS X?

19 September 2009

Sean Finney: dpkg triggers, the lost how-to document

this weekend while giving a bit of TLC to the php packages, i thought i'd finally get around to tackling #490023 and similar bugs, which meant learning about how to use the triggers feature provided by dpkg. unfortunately documentation for this feature was in fairly short supply, and after extensive searching (and by extensive searching i mean typing "dpkg triggers howto" into a google search) i had a couple short manpages (dpkg-trigger(1) and deb-triggers(5)) and an overly verbose and possibly out of date /usr/share/doc/dpkg/triggers.txt.gz. none of these documents really gave a clear "big-picture" for how to get going either. so, as is often the case, i got distracted from my intended task and ended up on a little side-project putting together a nice howto/tutorial for how to integrate dpkg triggers into a package. note that there may be misunderstandings or inaccuracies in the document, as it's based on an afternoon's worth of hacking and q&a directed at #debian-dpkg (thanks to Guillem and Rapha l for fielding those questions). so if i'm off on anything, please feel free to let me know! to get started:
git clone http://git.debian.org/git/users/seanius/dpkg-triggers-example.git

and for those who are too lazy even for that, the README follows: The debian package triggertest This package is a dead-simple "triggers in a nutshell". It shows a few different ways that triggers can be used in practice, to hopefully cover most of the general use cases for triggers. The purpose of triggers Triggers are used to ensure that during the standard package-management process certain operations always run, but not more than necessary. For example: How triggers work in a nutshell Trigger-using packages can be classified in two behavioral categories: When a consumer is triggered, its postinst script is run with the arguments:
postinst triggered "<trigger1> ... <triggerN>"

i.e. $2 contains an iterable list of activated triggers. Note that if a consumer is going to be normally configured (i.e. it is also being updated), then no triggering may occur and thus the standard control flow of the maintainer scripts should still take care to handle this. A "trigger" is declared for the consumer by shipping a file in DEBIAN/triggers (in the case of debhelper based packages, ./debian/consumer-package.triggers will JDTRT). Useful RTFM: deb-triggers(5). Example:
interest /path/to/a/directory
interest my-second-trigger

This declares that the package in question is interested in two triggers. The first trigger has a leading path separator in its name, which instructs dpkg that any filesystem modifications underneath this directory by other packages should cause the respective consumer(s) to be triggered. The second name is completely arbitrary (and also global, so you should probably pick something reasonably specific and identifiable), and will only cause a trigger to be activated when a producer
  1. ships its own triggers file with a corresponding "activate my-second-trigger", or
  2. invokes the trigger explicitly in a maintainer script by calling "dpkg-trigger my-second-trigger".
Another perhaps useful RTFM: dpkg-trigger(1). Examples contained in this source package This source package produces a single "consumer" package and a number of different "producer" packages. The consumer is triggered in various ways, such as: In this case the triggers correspond to an "update-foo" and "update-bar" command, which do nothing other than echo to the console that they are being run. In practice they'd correspond to updating some kind of database or restarting a daemon. More information For more information about triggers, see /usr/share/doc/dpkg/triggers.txt.gz, which will make a lot more sense having a working example like this package as reference. Especially useful is "Transition hints for existing packages", which can be used if you need to gracefully handle migrating in support for triggers across other packages not directly under your control. Corrections, suggestions, etc Are appreciated and should be sent to the author, below. -- Sean Finney seanius@debian.org Sat, 19 Sep 2009 15:57:48 +0200

Christoph Haas: Tired of Nagios and Cacti? Try Zabbix.

One of my professional duties in my past ten years was monitoring systems. Even my diploma thesis was dedicated to distributed monitoring (altough my professor sucked badly). Apart from a few custom-programmed scripts to analyze special situations (e.g. proxy clusters) I used tools that fellow administrators will find familiar: Nagios and Cacti. And another less famous text-configuration-based monitoring tool called Cricket. That worked well somehow but Cricket was hard to learn for my coworkers and Cacti seems unreliable and fundamentally broken in terms of SNMP checking. Besides why do I have to set up availability checking in Nagios and set up checking of the same parameters in another software to draw graphs? Just recently I came across an open-source software I hadn t heard of before: Zabbix. And although it has a few rough edges it seems way more professional than other common tools (the commercial tools I saw are even worse than the open-source variants). I tried it and after a lot of reading and trying it looks like it has a good potential to replace Nagios and Cacti. So I thought I d sum up my personal experiences with all of these tools. Nagios. Their makers claim that it s the industry-standard in IT infrastructure monitoring . Honestly it s a great tool but considering how many years it has been existing it barely evolved. During my diploma thesis I wrote an alternative software that I called MrNetwork that dealt with flaws that Nagios hasn t even fixed today. Still Nagios is a tool I have used for many years and it is very reliable.Nagios service detail screen Advantages: Annoyances: Cricket. As Nagios does not support plotting graphs of the monitored values I was in need of another piece of software. Basically Cricket is a frontend to RRD (which stores data in a rotating/round-robin file that keeps data of the last X minutes/hours/days). It has a textual configuration that takes a lot of getting used to. It s main principle is inheritance of settings they call it configuration tree . Which means you have a master DEFAULTS file that contains general settings like how to query SNMP. In a subdirectory you define a certain class of devices that you want to monitor e.g. routers (the DEFAULTS are inherited to this level). Within the routers directory you can just define a list of routers you want to monitor. All settings are inherited from above (parent directories). It s more a geek tool for shell lovers. Cricket screenshotAdvantages: Annoyances: Cacti. Another frontend to RRD and a pretty sophisticated one. Nearly everything is configured through its web interface. And the result is beautiful. It s not entirely reliable though and SNMP support (at least in version 0.8.7b) is a big fail. I like Cacti for its user interface is much better than Cactis but it s less reliable and flexible. Cacti screenshotAdvantages: Disadvantages: Zenoss. People pointed me to Zenoss which is supposed to offer the same functionality as other monitoring systems but is much more integrated. So this short list is more a quick one-day-experimental expression than a thorough analysis. But in the end much of the fuss is just marketing. Advantages: Annoyances: Zabbix. This is the tool I have been evaluating for the past two weeks and currently I m moving all checks away from Nagios and Cacti and put it into Zabbix. So the following list is more a first impression instead of a year-long experience. (I m using Zabbix 1.6.5 here. Debian Lenny s 1.4 version lacked some interesting features like proper SNMP handling so I backported the newer version to Lenny.) Zabbix seems very close to the perfect monitoring system I had always dreamt of. I would have designed it differently in some aspects though. Zabbix screenshotAdvantages: Annoyances: See also: Ben Rockwood s blog Further similar software I didn test thoroughly: Hyperic and Opsview (I ll surely update this blog post while I learn more about Zabbix.) All of the above tools are great. I m not meaning to say that Zenoss is total crap for example. The differences are subtle. And whether a piece of software suits your needs really depends on your expectations. I love that all this software is available as open-source. And a totally unscientific but fun analysis of the community is counting the number of active people in the respective channels on the Freenode IRC network: Either Nagios has the largest fanbase or perhaps that means that the majority of people needs help with it. :)
http://en.wikipedia.org/wiki/Network_monitoring

18 September 2009

Wouter Verhelst: Announcement

I was really happy a few years back, when Martin announced he'd start working on netconf. Not just because I agreed with his assessment that ifupdown needed replacement; also because I had been thinking about a good way to implement such a thing, and had been planning to start writing 'soon'. With Martin's announcement, I made a few suggestions to give him some input, and then put my plans away I had more important things to take care of, anyway. Unfortunately, netconf did not manage to reach the ambitious goals that Martin set out, mainly due to lack of contributors. I wanted to help out; I really did. But Martin's choice of python to implement a 'prototype' which then had to be reimplemented in C or C++ didn't get me very thrilled. Not just because I have a severe dislike of python; also because implementing something twice is, in my humble opinion, not quite the best way to do something like this. But hey, who am I, if I don't put my code out there. Never the less, I tried helping. I really did. During debconf8 at Mar del Plata, I approached Martin with the suggestion that I start reimplementing those bits that were unlikely to change anymore in C, as a first step toward something that could be in the base system. Unfortunately, that didn't happen. After trying for about two weeks, I just gave up. I thought I could read python code and reimplement that so that it would work the same way, but I couldn't. I thought I could implement python modules in C without knowing python, but as it turns out that's a laughable idea. For several months then, I didn't think about it anymore. In March of this year, however, I got a little bored. And what does one do when they get bored? Right, you find something to do. I my case, that was 'figure out how bison works'. I'd of course known about parser generators for quite a while, but just never had the time to dive in deep and figure out how they work. When I needed to do a config file for nbd, I instead hand-wrote my parser and used a lexer from libglib. But I wanted to learn how to do things properly, so I sat down. Long story short, when I had to choose something somewhat more complex to implement, I thought 'how about a hypothetical config file for a network configuration utility', and I started implementing that. It turned out to be fun, so I didn't stop after I knew enough about bison. And just last week, for the first time I successfully used it to bring up my wired interface using DHCP -- and bring it down again. It can also already manage static interfaces through netlink, though it isn't quite able to the equivalent of 'ip addr flush' yet. Fun. The system is quite flexible. It has a plugin interface (which needed some refinement that I did using some help on IRC just today), which should allow developers to implement extra functionality by just dropping a shared object in the right directory. In fact, I'm working on the wireless support (hence my blog post of last week) as a plugin. Obviously the code isn't remotely ready yet. The wireless code has a long way to go. The firewall module needs to be started. It will probably crash and burn if put to the test. But even so, it already has one feature that ifupdown, in its 10 years of existence, never acquired: it will not try to DHCP off an interface if it finds out that there is no cable connected to it unless you wrote a configuration that asks you to do so. I wanted things to be as simple as possible, and therefore the minimal valid configuration file that will do something useful is the following:

That's right, it's empty. This will cause the system to bring up the
'lo' interface at bootup, and do nothing else. If you say 'ifup eth0',
where eth0 is a valid and existing interface, it will first check
whether there is a link, and if so, DHCP off of it.
There's much to do still, but I have now reached a point where I feel
the system is ready to meet all challenges it should be able to meet (or
so I hope), and where it might be nice if interested people check it
out.
The code is in a git repository that's mirrored on git.debian.org,
github.com, and my own git.grep.be. The latter
is my --mirror repository, but is not available for cloning to anyone
else. If you're interested in checking it out, you may want to start
with doc/tech.txt, and/or examples/ipcfg.cfg. I updated the former just
yesterday, so it's quite up-to-date. On the other hand, while the latter
shows the direction I would like the system to take, the code is a far
cry from implementing everything shown there, and it has been a while
since I last checked that file out, so the comments in there are, in
some cases, somewhat outdated. But that's good, because I want to keep
the file as a reference of the goals that I originally had, before I'd
written this whole corpus of code, so that I can go back at some
undefined point in the future and fix things.
Comments are (more than) welcome. 
 

Daniel Kahn Gillmor: Tools should be distinct from Services

Modern daemon implementations can be run in a variety of ways, in a range of contexts. The daemon software itself can be a useful tool in environments where the associated traditional system service is neither needed nor desired. Unfortunately, common debian packaging practice has a tendency to conflate the two ideas, leading to some potentially nasty problems where only the tool itself is needed, but the system service is set up anyway. How would i fix it? i'd suggest that we make a distinction between packages that provide tools and packages that provide system services. A package that provides the system service foo would need to depend on a package that provides the tool foo. But the tool foo should be available through the package manager without setting up a system service automatically. Bad Examples Here are some examples of this class of problem i've seen recently:
akonadi-server depends on mysql-server
akonadi is a project to provide extensible, cross-desktop storage for PIM data. It is a dependency of many pieces of the modern KDE4 desktop. Its current implementation relies on a private instantiation of mysqld, executed directly by the end user whose desktop is running. This means that a sysadmin who installs a graphical calendar application suddenly now has (in addition to the user-instantiated local mysqld running as the akonadi backend) a full-blown system RDBMS service running and potentially consuming resources on her machine.Wouldn't it be better if the /usr/sbin/mysqld tool itself was distinct from the system service?
puppetmaster depends on puppet
Puppet is a powerful framework for configuration management. A managed host installs the puppet package, which invokes a puppetd service to reconfigure the managed host by talking to a centralized server on the network. The central host installs the the puppetmaster package, which sets up a system puppetmasterd service. puppetmaster depends on puppet to make use of some of the functionality available in the package. But this means that the central host now has puppetd running, and is being configured through the system itself! While some people may prefer to configure their all-powerful central host through the same configuration management system, this presents a nasty potential failure mode: if the configuration management goes awry and makes the managed nodes inaccessible, it could potentially take itself out too. Shouldn't the puppet tools be distinct from the puppetd system service?
monkeysphere Build-Depends: openssh-server
The Monkeysphere is a framework for managing SSH authentication through the OpenPGP Web-of-Trust (i'm one of the authors). To ensure that the package interacts properly with the OpenSSH implementation, the monkeysphere source ships with a series of test suites that exercise both sshd and ssh.This means that anyone trying to build the monkeysphere package must pull in openssh-server to satisfy the build-depends, thereby inadvertently starting up a potentially powerful network service on their build machine and maybe exposing it to remote access that they didn't intend. Wouldn't it be better if the /usr/sbin/sshd tool was available without starting up the ssh system service?
Good ExamplesHere are some examples of debian packaging that already understand and implement this distinction in some way:
apache2.2-bin is distinct from apache2-mpm-foo
Debian's apache packaging recently transitioned to split the apache tool into a separate package (apache2.2-bin) from the packages that provide an apache system service (apache2-mpm-foo). So apache can now be run by a regular user, for example as part of gnome-user-share.
git-core is distinct from git-daemon-run
git-core provides the git daemon subcommand, which is a tool capable of providing network access to a git repo. However, it does not set up a system service by default. The git-daemon-run package provides a way for an admin to quickly set up a "typical" system service to offer networked git access.
vblade is distinct from vblade-persist
vblade offers a simple, powerful utility to export a single file or block device as an AoE device. vblade-persist (disclosure: i wrote vblade-persist) provides a system service to configure exported devices, supervise them, keep them in service across system reboots, etc.
Tools are not Services: a ProposalLet's consider an existing foo package which currently provides: I suggest that this should be split into two packages. foo-bin would contain the tool itself, and foo (which Depends: foo-bin) would contain the service configuration information, postinst scripts to set it up and start it, etc. This would mean that every instance of apt-get install foo in someone's notes would retain identical semantics to the past, but packages which need the tool (but not the service) can now depend on foo-bin instead, leaving the system with fewer resources consumed, and fewer unmanaged services running. For brand new packages (which don't have to account for a legacy of documentation which says apt-get install foo), i prefer the naming convention that the foo package includes the tool itself (after all, it does provide /usr/sbin/foo), and foo-service sets up a standard system service configured and running (and depends on foo). Side Effects This proposal would fix the problems noted above, but it would also offer some nice additional benefits. For example, it would make it easier to introduce an alternate system initialization process by creating alternate service packages (while leaving the tool package alone). Things like runit-services could become actual contenders for managing the running services, without colliding with the "stock" services installed by the bundled tool+service package. The ability to create alternate service packages would also mean that maintainers who prefer radically different configuration defaults could offer their service instantiations as distinct packages. For example, one system-wide foo daemon (foo-service) versus a separate instance of the foo daemon per user (foo-peruser-service) or triggering a daemon via inetd (foo-inetd-service). One negative side effect is that it adds some level of increased load on the package maintainers if the service package and the tool package both come from the same source package, then some work needs to be done to figure out how to split them. If the tool and service packages have separate sources (like vblade and vblade-persist) then some coordinating footwork needs to be done between the two packages when any incompatible changes happen. Questions? Disagreements? Next Steps? Do you disagree with this proposal? If so, why? Unfortunately (to my mind), Debian has a long history of packages which conflate tools with services. Policy section 9.3.2 can even be read as deliberately blurring the line (though i'd argue that a cautious reading suggests that my proposal is not in opposition to policy):
Packages that include daemons for system services should place scripts in /etc/init.d to start or stop services at boot time or during a change of runlevel.
I feel like this particular conflict must have been hashed out before at some level are there links to definitive discussion that i'm missing? Is there any reason we shouldn't push in general for this kind of distinction in debian daemon packages? Tags: daemons, packaging, policy

Next.

Previous.