Pavol Rusnak #cypherpunk #hacker #openhw #privacy #bitcoin #newmediaart

Why is pkg-config the best thing since sliced bread

For those of you who haven’t met pkg-config yet a short introduction from its project page:

“pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.c pkg-config --libs --cflags glib-2.0 for instance, rather than hard-coding values on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance.”


More and more projects are using pkg-config already, but there is still a very high number of projects that don’t. This post tries to describe why using pkg-config is a good idea.

We try to build software packages for all major Linux distributions in the Build Service. Unfortunately there are lots differences in package names. Let’s take a look at KDE 4 development library for example:

  • libkde4-devel (openSUSE)
  • kdelibs-devel (Fedora)
  • kdelibs4-devel (Mandriva)
  • kdelibs5-dev (Debian/Ubuntu)

Confusing, right? When I want to build a KDE application in the Build Service for all these distributions I have to use conditionals, which clutters the spec file. What’s even worse is that I have to actually find out these names, which is not always an easy task.

RPM has a nice feature: if a file /usr/lib/pkgconfig/foo.pc or /usr/share/pkgconfig/foo.pc exists in the package, rpmbuild adds a pkgconfig(foo) provides symbol. But what does that mean effectively?

We don’t have to require a particular package name in the list of build requirements. We just specify pkgconfig symbol instead. Once we have replaced all of these … Crash, boom, bang - cross-distro packaging made easy! What’s even more great is that it would be possible to write tools that are able to auto-generate build requirements in the spec files by simple detection of pkgconfig symbols in configure, qmake, cmake, whatever build scripts.

The most packaging headaches are caused by libraries, but often we use some utilities during the build as well. Fortunately, they tend to have the same name across distributions - e.g. desktop-file-utils, so it probably does not make sense to use pkgconfig everywhere.

I talked with lots of people at the openSUSE Conference and all are in favor of pkg-config usage. I would like to encourage everyone in the FOSS community to include pkgconfig files in their releases and even help others doing so! For example, the distribution package maintainers could create these files and send them to upstream. I will try to push a new rpmlint check into openSUSE, which will print warning (if the package contains a library without pkgconfig file) and a link how to add a proper one to the package.

FrOSCamp, FUDCon Zurich and CERN

After a very long journey home I’m finally back in Prague from Switzerland. The whole trip was just awesome! Michal and I left Prague on Thursday around 11 PM, shortly after our Fedora friends from Brno arrived. To book a shared van for 9 people proved to be a great idea! Btw, motto for the upcoming openSUSE Conference is “Collaboration across Borders” so we definitively stick to that! :-)


We arrived to Zurich the following morning around 7 AM and went directly to conference venue at ETH Zurich. The whole place was still empty with the exception of two booths - Fedora one occupied by Bert and FreeBSD one with Salvatore (who turned out to be a very funny guy and his trolls like “1, 1, 1, 1, 1, Debian random number generator” or “Bugs, bugs, bugs, that’s you!” to Debian people sitting next to him became unforgetabble :-) ). Together with Michal we set our HP touchscreen up and shortly after that Bruno, Gnokii and Alexander appeared. Our openSUSE booth was now complete! Wait, I should write openSUSE/GNOME booth, because GNOME had no presence at FrOSCamp, but Gnokii saved the day and offered help to Stormy. She was more than happy to accept the offer and we run a mixed booth. Bruno even made a really nice GNOME poster and because Michal is using GNOME 3 since LinuxTag, he was able to answer most of the tricky questions. (I started to use GNOME 3 on one of my notebooks after the event as well. :-)) The venue started to fill up with other projects as well and soon it was full by presenters. Sadly, this could not be said about visitors - their count was rather low, but this was just the first year of this conference, so I hope it will get better and better in time. At least people from various FOSS projects had more time to talk among each other which is a good thing. :-)

You can look at photos by Bruno to get the idea how the event looked like.


Parallel to FrOSCamp there was FUDCon happening. It is Fedora conference, which is almost never standalone, but attached to some other FOSS Conference. They had a separate talk track, so visitors could choose those talks as well. The most interesting for me was the 3rd day of FUDCon, which was organized as “unconference” or BarCamp and it offered a lots of opportunities to talk about openSUSE and Fedora relationship. Also meeting new people (for example, the new Fedora Project Leader - Jared Smith and crazy Romanians Nicu and Adrian) was very nice.

Nicu has a good set of photos mapping FUDCon.


A very good thing about the conference was the accommodation. We were allowed to enter the premises of atomic bunker under the university and stay there during the nights. It offered a great post-apocalyptic atmosphere. There was even an internet connection so we were able to organize a small hackathon :-)

During the last night Zurich was attacked by aliens, but fortunately our CTJB Emergency Team from the van was present in the bunker and we were able to repel the invasion and save the world from the disaster! Meet the heroes:










Photos by xyzz


The last day of the event was dedicated to CERN visit. Journey to Geneve was long and extended our way back home to more than 10 hours, but it was totally worth it! Let the pictures speak for themselves:


















I would like to thank Marcus Moeller and the whole ETH staff for driving both conferences and things related to that and I am already looking forward for the next year’s edition!

openSUSE 11.3 & KDE SC 4.5 Launch Party


This article is about openSUSE 11.3 & KDE SC 4.5 Launch Party in Prague, Czech Republic and is probably not very interesting for people living abroad. :-)

Tak ako minulý rok, sme si aj tento rok pri príležitosti vydania openSUSE 11.3 (sťahujte odtiaľto) a KDE SC 4.5 pre vás pripravili Launch Party v Prahe.

Nové vydanie oslávime priamo v centre diania - našej pobočke SUSE Linux, s.r.o na Lihovarskej 12, Praha 9 (konkrétne 4. poschodie). Tu budeme k dispozícii v piatok 6.8.2010 od 14:00 do 19:00. Naša budova sa nachádza v trojuholníku medzi zastávkami tramvají “Balabenka”, “Ocelářská” a “Divadlo Gong” (mapa).

K dispozícii budú CD či DVD openSUSE 11.3, formou prednášok vám predstavíme novinky v openSUSE, KDE a GNOME, pomôžeme s inštaláciou na notebooky a v neposlednom rade budete mať možnosť porozprávať sa s openSUSE vývojármi.

Fotoreportáž z minulej Launch Party od Petra

Udalosť na Facebook-u.

Tešíme sa na vašu účasť v hojnom počte!

PS: Thanks gnokii for the great poster!

OSSConf 2010

Last week Michal and I went boosting to an event called OSSConf which took place in Žilina, Slovakia. We didn’t know what to expect, because it was only second year of this conference, but it turned out to be a really great one!

We left our Prague SUSE offices early in the morning, so we could reach Žilina shortly after noon and not miss a lot from the conference. During our journey we stopped in Brno to pick up our rivals^Wfriends Marek and Mifo from Red Hat. The trip was rather long, but it was quite funny and soon we were able to admire the great architecture of Žilinská Univerzita.



The first two talks we saw were about Graphics software in schools from Petra Talandová and about Generating font books by Pavel Stříž.



After these, the winners of Best student’s opensource projects awards were announced. First and second place projects were led by Red Hat employees, so hats off to them (pun intended). Novell should definitively try to engage more at universities. The rest of attendees didn’t walk away with empty hands neither, because they could win a nice openSUSE T-shirt or mugs and pens from Red Hat in a raffle shortly after.

Second day started with a talk from Michal about openSUSE 11.3, followed by lots of interesting talks including Mifo’s about Deltacloud, mine about openSUSE Build Service and Michal’s about SUSE Studio, …




Juraj’s about projects and Pavol’s about (Lack of) Security in publicly used technologies.



Third day was full of talks about concrete usage of open-source tools in university environment and ended with a SOIT (Society for Open Source Information Technologies) meeting. We became a members of this non-profit organization and discussed various topics how to make Slovakia more aware about open-source technologies. I was also very surprised to find a book where author describes how to create your own Linux distribution and also mentions both openSUSE Build Service and SUSE Studio. Way to go, SUSE!



We concluded this great conference with a nice trip to close Lietava Castle and the best Slovak beer Šariš - more particularly its so called “cut beer” version - half dark, half light.





I’m already looking for next year edition, see you there!

Related posts:

Photos shamelessly stolen from Marek and Michal.