Patrick Schoenfeld: Extending Debian with customizable packages
In my previous post I drafted a rough idea how to add a feature to Debian that would bridge the gap between Debian as a Binary Distribution and any Source Distribution. The feature in question is giving users the chance to build customized Debian packages for specific feature sets. The possible use cases are simple:
Lets say Anthony User needs super-duper-tool with postgresql support. However this is a not so common use case and so the archive only has postgresql support. If he now wants to build a custom package, the process is "as simple" as:
apt-get source super-duper-tool
cd super-duper-tool-*
apt-get build-dep super-duper-tool OR sudo mk-build-deps -r -i
(possibly try out which ./configure options are supported by super-duper-tool)
vi debian/rules
edit debian/rules
dpkg-buildpackage -us -uc
sudo debi
That is, to be honest lot of work. And the biggest problem about it is that you need to know all this, which is not really user knowledge.
The basic idea is that Anthony can do something like
export DEB_BUILD_OPTIONS=nomysql,postgresql
deb-build-tool build super-duper-tool
and is done.
So the question is how could this be achieved?
Lets say Anthony User needs super-duper-tool with postgresql support. However this is a not so common use case and so the archive only has postgresql support. If he now wants to build a custom package, the process is "as simple" as:
apt-get source super-duper-tool
cd super-duper-tool-*
apt-get build-dep super-duper-tool OR sudo mk-build-deps -r -i
(possibly try out which ./configure options are supported by super-duper-tool)
vi debian/rules
edit debian/rules
dpkg-buildpackage -us -uc
sudo debi
That is, to be honest lot of work. And the biggest problem about it is that you need to know all this, which is not really user knowledge.
The basic idea is that Anthony can do something like
export DEB_BUILD_OPTIONS=nomysql,postgresql
deb-build-tool build super-duper-tool
and is done.
So the question is how could this be achieved?
- Define a set of common options (options should be consistent through all source packages, otherwise it makes not that much sense) that every package should support, if it is a supported feature by the package in question. This includes flags like mysql, postgresql, ldap and its no-equivalents (nomysql, nopostgresql) to negate it.
- Enable use of this common options in the package build process and that is really the hardest part. Defining a lot of ifneq..findstring constructs for 2-10 options per source package in any available source package is.... not.... a good approach. Luckily a lot of packages uses autoconf where enabling and disabling features is as easy as adding a --with-foo or --enable-foo option to the ./configure parameters. So we could write a wrapper that would handle these options. The debhelper scripts already have dh_auto_configure: Maybe this could get enhanced.
- If it does not exist: Write a tool to auto-build packages with DEB_BUILD_OPTIONS set by the user. Should automatically get the source, (optional: setup/update a pbuilder environment) and build it and optional install/upload it (to a user repository for example) .
- How to handle these feature flags in packages that don't use autoconf
- How to enable these feature flags for packages that don't use debhelpers
- Shall a central place for setting DEB_BUILD_OPTIONS exist (like it does for Gentoo, FreeBSD etc.) and if so: Where?
- How should packages define new build options, if those defined Debian-wide, aren't enough?
- What about support? Do we support such custom builds of packages or will this be a support-on-good-will thing
Conceptronic kindly sent me a CH3SNAS for my Debian porting efforts. The
Conceptronic CH3SNAS is reported to be basically the same hardware as the
D-Link DNS-323 but it costs slightly less. There were some reports that
the CH3SNAS uses a 88F5182 chip whereas the D-Link DNS-323 uses a 88F5181
but nobody was able to confirm this for sure. As it turns out, there are
two revisions of the DNS-323. Revision A1 uses a 88F5181 chip along with a
separate SATA chip. Revision B2 on the other hand uses a 88F5182 which
integrates SATA into the SoC itself. The CH3SNAS is equivalent to a D-Link
DNS-323 revision B1. In fact, the mainboard of the CH3SNAS even says
DNS-323 rev B1.
The Linux kernel from mainline only works on the DNS-323 revision A1 at the
moment. Adding support for revision B1 should be trivial since you
basically just need to initialize the SATA chip on the SoC and possibly
adapt some other values. Unfortunately, the DNS-323 uses a very small
serial connector so none of my serial cables work. If I can find someone
who will make a serial cable for me, I'll fix up the kernel.
Answer to anybody asking about the Lenny release.
It’s really funny to see how popular things can get, and then totally disappear. Some time ago, there was a TV show on the french TV called “Un an de +”, that talked about what was in the news one year before. It was really interesting to see how quickly everybody can forget stuff that looks so important now.
For example, who remembers Second Life? Apparently, it has been on the decline for some time already, according to Google Trends:
Will Facebook be the next Second Life?

Dear Nokia,
Just stumbled over 
Today, the rampant racism slightly instilled by the beloved
ultra-right zealots we have for a few years at the head of my country
reached the limits of my nerves.
While exiting my daily train in the Meudon Val Fleury station of C
line, two police guys were standing at the exit, just as this happens
at least once a week.
And, of course, in the crowd that was exiting, they asked for his ID to the guy walking just before me who, surprise, was "looking" as a foreigner (he's French, for the record....we take the same bus every day...but he's of Tamil origin).
I was probably in the mood of being schocked today so I couldn't supprot doing nothing and be a silent witness of this.
So, I just stopped, grabbed my wallet and showed *my* ID to the two policemen, politely explaining them that I was puzzled of not being controlled myself and, therefore I was volunteering for being controlled. I also grabbed my passport which I still had with me.
No more incident, indeed: they had nothing to annoy me and I was very polite, not even arguing with them. Just voluntarily showing my ID. Actually, they probably didn't even look at it..:-)
Maybe, it just grabbed their attention enough for a few Arab-looking
guys to pass without being "controlled". Half of the crowd in the Paris public transport meets the definition of "potential illegal immigrant" for the average French policeman.
I wonder what would happen if everybody in the crowd does the same. That could be an interesting passive resistance action, indeed.
Still, such rampant racism is more than a concern. Mostly because it
looks innocent and noone even notices. So, think about it next time
you see an "innocent" police control action. Just stop for two seconds
and show your ID.
A common trait of virtually all of the media in Mexico -and, as far as I have been able to see, in Latin America- is the push for society to be afraid. The government and the media (which go hand-in-hand, mainly due to a series of favors owed to each other - currently stemming from the government's illegitimacy and lack of trust from the general population) wants us all to think the country is as violent and as dangerous as it has never been before.