Tag Archives: Debian

WordPress “upgrades”

I have been a long time WordPress user and not very happy with it from time to time, but sometimes you just have to accept certain things. Using WordPress is one of them as it slow became the industry standard for weblogs. It also became the standard for trouble, quick updates and hacked weblogs. As I have to live with it, it became time to take a closer look at WordPress.

While WordPress has a lot of coding errors and that is something that can’t be fixed overnight, but what can be solved is the ability to install additional code. While it sounds a smart move to offers users a way to upgrade WordPress with one click in their browser or to install new plugins or themes, it is also a hazard. If a webserver is allowed to update the application it is running without any trouble, then it simply means anyone who can trick the application to write code to disk and execute it also can host anything he or she wants. A lot of phishing and spam sites do this trick to host their code in some directory of a broken plugin. And the PHP-interpreter always happy to execute any PHP-code it finds, this is a mayor flaw.

For Debian Squeeze there is a backport of WordPress 3.3.2 which matched my version already running. So installing the packages and switching the webservers documentroot to the one supplied by the packages resolved the first issue. Now only the user root can modify the WordPress installation which also include all plugins and themes for WordPress. The base of WordPress now has been secured as remote users can’t modify or install any code. Right? Both yes and no as people still are able to upload content for WordPress and this is something for further review. Most ideally the content will be hosted in an image gallery for example, but it is a risk to accept for now.

Switching to packages also showed something else as most WordPress users just install plugins and themes by using the webinterface. As only root can install new plugins and themes this reduces the choice people have to what the system administrator puts in a package and installs it. Sadly enough now script currently exist for building packages from plugin/theme files and a quick look it appears that this isn’t an issue for themes. But it appears to be an issue for plugins as some developers include an extract from PHP Pear to make sure the plugin always works.

So the coming week I have to spend some time in creating packages and do some coding to make packages work with system provided and updated PHP Pear code. But I still wonder why people write plugins and just copy code to make it “work”. I also wonder how many plugins have outdated code with some funny features or is it something I don’t want to know?

PAM bug hit Debian and others

It has been years since PAM was hit by a serious bug in PAM, but people who upgrade to libpam-systemd version 44-1 can find that sudo stops working. Reading the bugreport on Debian and FreeDesktop.org it doesn’t look promising as it also effects other distributions. For now it may be wise put systemd on hold in case the package transfers from unstable to testing.

No smooth transition in Debian

Bugreport 638019 appears to be very straight forward, until the code finally hit Debian Testing last weekend. A simple relocation of a FIFO-buffer from /dev to /run caused direct trouble for machines with systemd and a normal shutdown wasn’t possible anymore. Both bugs 657979 and 657990 are a results of the modification. Seeing the overview of effected files and made me go back to the previous working release of source package sysvinit with the following commands

$ cd `xdg-user-dir DOWNLOAD`
$ wget http://snapshot.debian.org/archive/debian/20111223T034013Z/pool/main/s/sysvinit/bootlogd_2.88dsf-18_amd64.deb
$ wget http://snapshot.debian.org/archive/debian/20111223T034013Z/pool/main/s/sysvinit/initscripts_2.88dsf-18_amd64.deb
$ wget http://snapshot.debian.org/archive/debian/20111223T034013Z/pool/main/s/sysvinit/sysv-rc_2.88dsf-18_all.deb
$ wget http://snapshot.debian.org/archive/debian/20111223T034013Z/pool/main/s/sysvinit/sysvinit-utils_2.88dsf-18_amd64.deb
$ wget http://snapshot.debian.org/archive/debian/20111223T034013Z/pool/main/s/sysvinit/sysvinit_2.88dsf-18_amd64.deb
$ dpkg -i bootlogd_2.88dsf-18_amd64.deb initscripts_2.88dsf-18_amd64.deb sysvinit_2.88dsf-18_amd64.deb sysvinit-utils_2.88dsf-18_amd64.deb sysv-rc_2.88dsf-18_all.deb

And as there is no solution for now except a dependency change for systemd the package are being placed on hold like the last time they broke systemd.

$ echo "bootlogd hold" | sudo dpkg --set-selections
$ echo "initscripts hold" | sudo dpkg --set-selections
$ echo "sysvinit hold" | sudo dpkg --set-selections
$ echo "sysvinit-utils hold" | sudo dpkg --set-selections
$ echo "sysv-rc hold" | sudo dpkg --set-selections

It sounds strange for Linux-people, but I really wished I had an alternative boot environment like Solaris has. Maybe this is the reason for me to invest more time in read-write within BtrFS.

Debian Wheezy and GNOME 3.2

The migration of GNOME toward version 3.0 in Debian earlier this year wasn’t very successful in the beginning, but a lot of bugs where solved during the summer. GNOME 3.0 made it into Wheezy during the release of 3.2 and maybe for the better. Now only a few months after the release of GNOME 3.2 almost all packages have been uploaded to experimental or unstable, and most of them even already migrated to testing.

But what brings GNOME 3.2? A lot of people are unhappy and some of these points are valid and need to be fixed. Others can be discussed if they are true. One thing that changed in 3.2 is how GNOME interacts with your address book and your instant messaging accounts. Connections to instant messaging networks are automatically being started when you log in. This also reflects in the search screen when you type in a friends name and you direct see his connection status.

GNOME Online Accounts is another example of making things simpler for the user. Currently it only works for Google, but I really hope current proposals with querying the right SRV-records in DNS are also going to be part of GNOME in a future release. For now GNOME Online Accounts setups up multiple Google services up like Mail, Calendar, Chat, Documents and Contacts with a single authentication token. Different services don’t have to maintain and store the credentials in GNOME Keyring or in still in there own way. Hopefully there will come a solution for Liferea which still stores te users password plain-text in the configuration file.

Other third-party applications like Simple Scan, Shotwell and Deja-Dup are slowly making there way into becoming part of GNOME. I can’t wait to see what is going to happen with the GNOME 3.4 release as both Epiphany and Evolution are going to have some major work done to them. A switch to Webkit 2 and ending the usage of GtkHTML in Evolution. Hopefully after this Epiphany can replace Firefox completely on my desktop.

It is good to see the progress GNOME is making into becoming an interface for cloud services by simplifying the configuration for users, but also separating data from applications more and more. I can’t wait to see how GNOME Document is going to evolve, but two other things still open is a good solution for RSS-feeds and chat-logs as Empathy is still storing them on disk and isn’t able to use logs stored by Google for example.

In the end I’m happy with GNOME 3.2 in Debian Testing right now and Debian on my workstation is back to it’s weekly testing upgrade schedule as most parts are working. I even think that I will continue to do this during the 3.4 release as most of the GNOME dust has settled. Maybe I make an exception for both AbiWord and Gnumeric when they switch to GTK3 and hopefully also better OpenDocument support.

The hunt for /etc/.pwd.lock

After upgrade Debian to kernel 3.0.0, I saw a hidden file called .pwd.lock in /etc which I didn’t noticed before. Checking other machines gave the same result as shown below, but both without a matching Debian-package or manpage.

$ ls -l /etc/.pwd.lock
-rw-------. 1 root root 0 feb 27  2009 /etc/.pwd.lock
$ ls -l --time=atime /etc/.pwd.lock
-rw-------. 1 root root 0 apr 10  2010 /etc/.pwd.lock
$ ls -l --time=ctime /etc/.pwd.lock
-rw-------. 1 root root 0 aug 14  2010 /etc/.pwd.lock

As time match at least the installation date of the machine and exists on other machines it appears to be a valid file, but with what purpose? After reading the Linux Programmer’s Manual two functions called lckpwdf and ulckpwdf where candidates for using this file. Checking the source code at Sourceware confirmed that both lckpwdf and ulckpwdf are using the file. And reading the manpage about these functions also confirms it’s purpose, a lock file the commands like passwd.

The lckpwdf() function is intended to protect against multiple simulta‐
neous accesses of the shadow password database. It tries to acquire a
lock, and returns 0 on success, or -1 on failure (lock not obtained
within 15 seconds). The ulckpwdf() function releases the lock again.
Note that there is no protection against direct access of the shadow
password file. Only programs that use lckpwdf() will notice the lock.
 
These were the functions that formed the original shadow API. They are
widely available.

This is another example why open source matters. You can get the evidence when you want and/or need instead of trusting some manual to explain things. Verification will become more important as systems get more complex. It was/is also a big advantage when OpenSolaris was created with it’s web accessible source repository.

Transitie naar /run

In een vorige posting gaf ik al een hint naar de transitie naar /run en voor ongeveer een week geleden zijn de packages geüpload naar Debian Unstable. Maar wat brengt deze transitie? Eigenlijk het gebruik van tmpfs voor oa /var/run, /var/lock en /tmp, maar ook uiteindelijk /etc/mtab te verhuizen naar /proc/mounts.

Na het upgraden van alle sysvinit-packages en een paar kleine aanpassingen aan /etc/default/rcS zag df er als volgend eruit.

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg00-root  19G  9.3G  8.2G  54% /
tmpfs                 5.0M     0  5.0M   0% /lib/init/rw
tmpfs                 788M  744K  788M   1% /run
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                 1.6G  152K  1.6G   1% /tmp
udev                   10M  4.0K   10M   1% /dev
tmpfs                 1.6G  516K  1.6G   1% /run/shm
/dev/sda1             236M   47M  178M  21% /boot
/dev/mapper/vg00-home 854G  707G  104G  88% /home
/dev/sr0              6.6G  6.6G     0 100% /media/cdrom0

Nu worden /var/run en /var/lock ook met een symlink omgeleid naar /run en hiermee komt ook een einde eigenlijk dat packages directories kunnen aanmaken in /var/run bijvoorbeeld of een directory bestaat.

$ ls -ld /var/run /var/lock /tmp
drwxrwxrwt. 11 root root 280 mei 25 01:15 /tmp
lrwxrwxrwx.  1 root root   9 mei 23 22:51 /var/lock -> /run/lock
lrwxrwxrwx.  1 root root   4 mei 23 22:51 /var/run -> /run

Hiermee is eigenlijk de weg vrijgemaakt om de transitie van SysV init-style naar systemd v25 te beginnen, maar eerst is het wachten totdat alle packages Debian Testing bereiken zodat er enige vastigheid is. Met systemd v25 alleen nog in experimental kan dat nog wel even duren, maar aan de andere kant de freeze periode voor Wheezy is voorlopig nog niet gestart.

GNOME 3.0 op Wheezy

GNOME 3.0 op mijn Wheezy workstation is niet meer helaas door stabiliteits problemen. In iedergeval niet totdat GNOME 3.0 in Debian Testing is geland en hoe snel het daar komt blijft nog even de vraag. Afgelopen weekend werd er wel gesproken op IRC om de transitie van experimental naar unstable voor te bereiden. Zeker nu 3.0.1 al enige tijd beschikbaar is en 3.0.2 voor de laatste week van mei op de planning staat.

Nu terug op mix van GNOME 2.30 en 2.32 wordt wel langzaam duidelijk dat ik GNOME 3.0 toch een beetje mis. Er zijn nog voldoende dingen die niet af zijn of verbetering behoeven, maar het idee van interactie met je systeem, je data en je communicatie spreekt me wel aan. Hopelijk komt die transitie snel, maar of deze soepel zal verlopen? Zeker gezien problemen met GCC 4.6, Glibc 2.13 en de transitie naar /run. Ik kan al wel vast zeggen dat de testen met systemd als vervanger voor de traditionale init en SysV-scripts zeer goed zijn bevallen.

GNOME 3.0 op Wheezy

Ubuntu is bezig om Unity te introduceren als nieuwe standaard desktop voor Ubuntu en dit brengt wat onrust bij sommige mensen. Zo kwam recentelijk de popup van een andere Hans of GNOME 3 op Debian al geland is, want de live images deden het wel redelijk op zijn systeem. Dus wat is de status van GNOME 3 op Debian en is het echt zo erg als deze posting doet geloven?

En ik zal maar gelijk beginnen met het oordeel. Is het wat of niet? Ja en nee, maar dat hangt van je doel af. Voor veel gebruikers is GNOME 2.32 voorlopig een betere optie en dat zal hoogstwaarschijnlijk zo blijven tot GNOME 3.2 en misschien wel tot 3.4. Releases die voor 6 en 12 maanden gepland staan. Voor ontwikkelaars van software en distributies is 3.0 beter geschikt. Ik zou GNOME 3.0 dan ook willen bestempelen als een developer preview.

Maar waarom is dat zo? De huidige transitie voor Debian is in volle gang, maar wordt wel eerst gedaan in Debian Experimental. Er zijn voldoende punten die moeten worden opgelost om de rest van de FOSS-wereld niet in de problemen te brengen. Zoals ook al te zien is zijn er sommige packages ook al in Debian Unstable geland, maar of de Debian Testing gaan halen binnen afzienbare tijd is de vraag. GTK+3.0 is in iedergeval al geland.

De installatie van GNOME 3.0 vanuit de experimental-sectie is wat problematisch, maar niet ondoenlijk en sinds gnome-session is geland kom je ook automatisch in de GNOME 3 desktopomgeving. En het ziet er allemaal netjes uit moet ik zeggen, maar dan besef je dat dit pas het begin van een grote veranderingsronde gaat zijn. Waar vroeger het draaide om applicaties zie je nu een verschuiving naar data en communicatie. Een verschuiving waarbij simpel een belangrijk kernwoord is.

Een verschuiving die ik alleen maar kan omarmen, maar ook voor voldoende beroering gaat zorgen in de FOSS-wereld gok ik. Het wordt nu langzaam duidelijk wat de rol van Empathy en Telepathy is en waarom Pidgin langzaam buiten de boot zal vallen. Dit geeft ook te denken wat de rol gaat worden van oa LibreOffice, maar ook Firefox en Thunderbird. Ook zie je nu langzaam de rol van Tracker duidelijk worden en wie de demos van Zeitgeist ziet zal zien dat monitoren van gebruikers ook zijn voordelen heeft.

Ik kan niet anders zeggen dat ik uit kijk naar GNOME 3.0 in Debian Testing en zeer zeker naar toekomstige releases. Voorlopig moeten verschillende dependency problemen en cruciale regelmatige crashes in verschillende onderdelen worden opgelost. De vraag die overblijft is alleen hoe GNOME 3 op een Intel Atom gaat presteren bijvoorbeeld, maar dat zal de toekomst ons moeten leren. De komende tijd is er dus weer voldoende om naar uit te kijken en bloggen gok ik.

En nogmaals als waarschuwing, gebruik GNOME 3 alleen als deze netjes in Debian Testing is geland. Een weg terug is er bijna niet en het is gewoon nog niet in een vorm voor dagelijks gebruik.

Ubuntu 10.10

Zondag 10 oktober 2010 is het weer zover, dan ziet Ubuntu 10.10 het daglicht. Enkele weken voor de gebruikelijke datum in de releasecycle, maar de vreugde zal er misschien niet minder om zijn. De release candidate is afgelopen week beschikbaar gekomen dus werd het tijd om te kijken hoe Ubuntu er voor staat. Ik kan al wel vast verklappen dat ik gemengde gevoelens heb, maar toch mogelijkheden zie voor Ubuntu.

Jarenlang heeft Canonical getracht om Ubuntu op een CD te persen en out of te box alles aan de praat te hebben voor de gebruiker. Dit lukte al jaren redelijk goed door oa opties te beperken, maar nu is de installatiemethode nog verder te zijn versimpelt. De vraag blijft alleen waarom Ubuntu niet standaard voor /home een apart volume aanmaakt en machines standaard niet laat synchroniseren via NTP.

Verder zie lijkt Canonical met Ubuntu goed te hebben gekeken naar Google en Apple, want Ubuntu lijkt langzaam het appliancemodel te volgen waarbij data wordt opgeslagen bij bv Ubuntu One. Muziek is daar een voorbeeld van, maar ook contactgegevens uit oa Evolution. Dit is wel een punt wat mij doet twijfelen of dat wel een goed idee is. Zeker met de speeches over de freedom-box nog in het achterhoofd.

Het andere punt is dat Ubuntu prettige verschijning moet worden. Het nieuwe Ubuntu font is tegenwoordig standaard actief en hoewel er toch iets mis mee lijkt te zijn geeft het wel een prettig beeld om naar te kijken. Maar dit geldt ook voor het standaard thema welke bij de vorige release de standaard is geworden. Veel punten zijn aangepakt waardoor het geen donkere brei meer lijkt te zijn en meer contrast heeft. Helaas is er nog veel te verbeteren op zowel het gebied van de interface als de interactie met gebruiker, maar hier in een latere posting meer over.

De technische verbeteringen bij deze release zijn een update naar GNOME 2.32 en Linux 2.6.35. Ook wordt bij deze release een applicatie ingeruild voor een andere applicatie en dat is deze keer F-Spot die wordt vervangen door Shotwell. Het is te hopen dat bij de volgende release van Ubuntu Tomboy wordt ingeruild voor Gnote zodat er ruimte vrij komt op de installatie CD doordat dan de noodzaak voor Mono op de installatie CD ontbreekt. Hopelijk worden de plannen voor 11.04 in de komende maanden definitief en kunnen we zien wat de toekomst gaat brengen.

Toch ben ik wel te spreken over deze Ubuntu release en doet me mogelijk Debian Testing toch inruilen voor Ubuntu op de desktop. Het is een redelijke balans tussen recente software, weinig wijzigingen, maar ook goed bruikbaar voor iedereen op vele hardware combinaties. Dit is misschien ook het sterke punt van Ubuntu, elke zes maanden een release met duidelijke plannen vooraf waar de gemeenschap aan kan meewerken. We zullen zien hoe de release volgende week zondag verloopt.

RFC 5006 ondersteuning

Sinds enige tijd doe ik mee aan de IPv6-pilot van XS4ALL om gebruik te kunnen maken van IPv6 zonder dit via een extra tunnel te doen. In een recente update, versie 54.04.81-17599, voor oa de Fritz!Box 7270 van AVM is de ondersteuning voor RFC 5006 goed aangepakt. Helaas staat deze optie standaard uit, maar wel begrijpelijk om potentiële problemen te voorkomen met minder goed werkende netwerk hardware. Gelukkig zijn zowel MacOS X als vele Linux distributies klaar voor RFC 5006.

De vraag alleen is wat heb je aan RFC 5006? Het ligt eigenlijk in de provisioning van de nameservers die kunnen worden gebruikt als resolver. Met de komst van IPv6 is een DHCP-server eigenlijk niet meer nodig en blijft de vraag over hoe je sommige configuratie-items gaat zetten. En hoewel RFC 5006 een smerige hack lijkt is het eigenlijk wel netjes, want er zijn voorzieningen om bepaalde uitgiften te laten ondertekenen in IPv6. Hiermee gebruikt de client alleen gegevens met het juiste signature en is het eigenlijk veiliger dan vele DHCP-oplossingen die nu binnen bedrijven staan, maar een daadwerkelijke bruikbare oplossing laat nog op zich wachten.

Het aan de praat krijgen op bv Debian of Ubuntu is vrij simpel met de volgende opdracht.

$ sudo apt-get install rdnssd resolvconf

Als je nu reboot en kijkt in /etc/resolv.conf krijg je bv het volgende te zien:

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver fd00::21f:3fff:fe30:4ff0
nameserver 192.168.178.1
search fritz.box

Wat nu nog overblijft is NTP wat met behulp van NTP-broadcasting gedaan zou kunnen worden, maar hier kleven wel nadelen aan. Want hoe kan je de broadcaster vertrouwen dat hij de juiste tijd geeft? Hoor ik hier een oplossing in DNSSEC?