Apparently I forgot to put my initial call
for release parties on planet.debian.org. Sorry, so much
things to do, so little time...
As Debian Squeezewill be released next weekend, it's a good time to start preparing a release party in your city. Be it in a pub, a pizzeria, or your living room: Organizing and hosting a release party is an ideal opportunity to meet, exchange GPG fingerprints, exchange knowledge and of course be merry and celebrate :) If there's going to be an event in your city, please add it to our wiki page so others can find it and join you :) Oh, and the publicity got the idea to do some live commenting of the release process via Debian's official identi.ca account. Might become interesting to watch that, too, as we also plan to fill boring waiting parts with funny and interesting facts :) Oh, and if you should know / or would be interested in an interesting facts (e.g. the the 150'000 closed bugs since Lenny got released please contact us, as we are still preparing them ;)
$ sudo aptitude install libconfig-model-perl libfuse-perlOn other systems, you can use CPAN to install the Perl modules
$ cpanp i FuseHopefully, fuse library will be available through a package on your favorite repository. Let s start from an empty ssh configuration file. First you need to create a directory that will be used by Fuse as a mount point:
$ cpanp i Config::Model
$ mkdir my_fuse_dirThen run config-edit-ssh (which will be changed later to config-edit -applit ssh ):
$ config-edit-ssh -ui fuse -fuse_dir my_fuse_dirNow, all parameters that can be configured in /.ssh/config are shown as files and directories in the fuse directory (the list was reduced to save electrons):
Mounting config on my_fuse_dir in background.
Use command fusermount -u my_fuse_dir to unmount
$ tree my_fuse_dir/Let s say that we want to configure specific settings for 2 hosts:
my_fuse_dir/
AddressFamily
BatchMode
BindAddress
ForwardX11
ForwardX11Trusted
[snip]
HashKnownHosts
Host
*
ConnectionAttempts
[snip]
User
UserKnownHostsFile
VerifyHostKeyDNS
VisualHostKey
XAuthLocation
HostbasedAuthentication
HostKeyAlgorithms
[snip] 14 directories, 119 files
$ mkdir my_fuse_dir/Host/repomanA ls command in that new directory will show a lot of files:
$ ls my_fuse_dir/Host/repomanLo and behold, one of them is ForwardX11 ! Let s check what s in there:
IdentityFile Protocol Tunnel
CheckHostIP ForwardX11 KbdInteractiveAuthentication ProxyCommand TunnelDevice
$ cat my_fuse_dir/Host/repoman/ForwardX11Since the entry is new, it s still empty. Enabling X11Forward for repoman is quite easy:
$ echo 1 > my_fuse_dir/Host/repoman/ForwardX11Let s check:
$ cat my_fuse_dir/Host/repoman/ForwardX11Now, unmount the fuse directory:
1
$ fusermount -u my_fuse_dirAnd see the modified .ssh/config file:
$ cat ~/.ssh/configYou can see that ForwardX11 is indeed set to yes for host repoman. Last but not least, you may consider that handling files and directories through shell commands is not very easy for the end user. You re right. But that s not the point. The idea is to enable programmers to access and edit configuration data with any language (not only Perl). Just like a lot of program can access kernel data through /proc and /sys, configuration data can now be accessed in a unified way through this virtual file system. May be, one day, exploring /config will be as common as exploring /sys All the best
Host repoman
ForwardX11 yes
I've just pushed out version 0.16.2 of my
Python B-tree library. This should fix
all remaining problems of B-tree nodes being modified in place
while in the upload queue. This is done by never modifying nodes
after they have been put into the node store.
Performance suffers, but it's worth it for correctness.
If anyone would like take a stab at making it faster again,
there's instructions in the README
file for getting started with hacking the code, or you can ask
me. Profiling indicates
that it might be quite helpful to keep the root node of a tree
out of the store until the forest-of-trees gets committed.
On the other hand, the performance of obnam has not been greatly
affected by these changes, since it spends most of its time reading
and writing the contents of files being backed up.
Since my NAS at home also acts as DHCP server, the obvious idea was to back up my PC and my laptop whenever they're switched on. Sadly, the documentation on how to do this from dhcpd.conf (instead of watching log files and reacting to log messages) is quite hidden, so here it is: I found the "execute" keyword (see the dhcp-eval manpage), and I found Tim Gustafson, which allowed me to pull it off (although, since I only have the two computers, I opted for a execute statement each and hardcoded the client IP in the call to the backup script. So I don't know if the address parsing stuff he does is correct.)
So the host statements for me look just like this:
host laeggerli-wifi
hardware ethernet 00:22:69:aa:bb:cc;
fixed-address 172.23.5.19;
on commit
execute("/usr/local/sbin/dhcp-run-backup", "commit", "laeggerli");
And the script to start dirvish is similarly simple, except that it needs to fork to the background to make sure dhcpd is not blocked. The sleep 600 is based on the theory that if I'm on my way out in the morning and need to check mail quickly, that will be less than 10 min, whereas when I'm still online after 10 min, there's a good chance that the back up will go through. Obviously, this could be improved...
#! /bin/bash
# called by dhcpd.conf
# arguments:
# $1 -> "commit" if called from dhcpd.conf, fork into background
# -> "run" if called internall from first instance
# $2 -> client host
if [ "$1" == "commit" ]; then
# fork to background
$0 run "$2" >> /var/log/dhcpbackup.log 2>&1 &
exit 0
fi
if [ "$1" != "run" ]; then
echo error
exit 1
fi
# figure out which host:
host="$2"
if [ "$host" != "laeggerli" -a "$host" != "faehrimaa" ]; then
echo "Unknown host: $2"
exit 1
fi
# did backup already run today?
d= date +%Y%m%d
if [ -d "/srv/backup/$ host _home/$d" ]; then
exit 0
fi
# wait 10min before actually running the backup
# (if computer still runs after 10min, it'll likely run for longer...
sleep 600
ping -n -w 3 $host >/dev/null 2>&1 exit 0
agentpid="/var/run/dirvish/ssh-agent-$host.pid"
[ -f "$agentpid" ] && \
kill $(< "$agentpid") 2>/dev/null
mkdir /var/run/dirvish >/dev/null 2>&1
eval ssh-agent >/dev/null 2>&1
echo $SSH_AGENT_PID > "$agentpid"
ssh-add /etc/dirvish/ssh-key >/dev/null 2>&1
/usr/sbin/dirvish --vault $ host _home
/usr/sbin/dirvish --vault $ host _root
/usr/sbin/dirvish-expire --quiet --vault $ host _home
/usr/sbin/dirvish-expire --quiet --vault $ host _root
kill $SSH_AGENT_PID
rm "$agentpid"
(I don't claim any rights on any of it, it's trivial enough.)
Since my NAS at home also acts as DHCP server, the obvious idea was to back up my PC and my laptop whenever they're switched on. Sadly, the documentation on how to do this from dhcpd.conf (instead of watching log files and reacting to log messages) is quite hidden, so here it is: I found the "execute" keyword (see the dhcp-eval manpage), and I found Tim Gustafson, which allowed me to pull it off (although, since I only have the two computers, I opted for a execute statement each and hardcoded the client IP in the call to the backup script. So I don't know if the address parsing stuff he does is correct.)
So the host statements for me look just like this:
host laeggerli-wifi
hardware ethernet 00:22:69:aa:bb:cc;
fixed-address 172.23.5.19;
on commit
execute("/usr/local/sbin/dhcp-run-backup", "commit", "laeggerli");
And the script to start dirvish is similarly simple, except that it needs to fork to the background to make sure dhcpd is not blocked. The sleep 600 is based on the theory that if I'm on my way out in the morning and need to check mail quickly, that will be less than 10 min, whereas when I'm still online after 10 min, there's a good chance that the back up will go through. Obviously, this could be improved...
#! /bin/bash
# called by dhcpd.conf
# arguments:
# $1 -> "commit" if called from dhcpd.conf, fork into background
# -> "run" if called internall from first instance
# $2 -> client host
if [ "$1" == "commit" ]; then
# fork to background
$0 run "$2" >> /var/log/dhcpbackup.log 2>&1 &
exit 0
fi
if [ "$1" != "run" ]; then
echo error
exit 1
fi
# figure out which host:
host="$2"
if [ "$host" != "laeggerli" -a "$host" != "faehrimaa" ]; then
echo "Unknown host: $2"
exit 1
fi
# did backup already run today?
d= date +%Y%m%d
if [ -d "/srv/backup/$ host _home/$d" ]; then
exit 0
fi
# wait 10min before actually running the backup
# (if computer still runs after 10min, it'll likely run for longer...
sleep 600
ping -n -w 3 $host >/dev/null 2>&1 exit 0
agentpid="/var/run/dirvish/ssh-agent-$host.pid"
[ -f "$agentpid" ] && \
kill $(< "$agentpid") 2>/dev/null
mkdir /var/run/dirvish >/dev/null 2>&1
eval ssh-agent >/dev/null 2>&1
echo $SSH_AGENT_PID > "$agentpid"
ssh-add /etc/dirvish/ssh-key >/dev/null 2>&1
/usr/sbin/dirvish --vault $ host _home
/usr/sbin/dirvish --vault $ host _root
/usr/sbin/dirvish-expire --quiet --vault $ host _home
/usr/sbin/dirvish-expire --quiet --vault $ host _root
kill $SSH_AGENT_PID
rm "$agentpid"
(I don't claim any rights on any of it, it's trivial enough.)
After implementing the screenshot functionality for S60 phones, I wanted to add same thing for other phones as well. As there were some basics of the code for Nokia DCT4 phones, it was obvious place where to start.
After little of hacking, screenshots are working, for example this is screenshot of my Nokia 6234 I use for testing:
Support for Sony-Ericsson phones should follow soon, N meth M rton is working on it.
Filed under: English Gammu 1 comments Flattr this!
This summer I'll be a full time student (again) to finish my computer science bachelor. So I thought it would be a nice occasion to apply for the Google Summer of Code. Would anybody like to recommend me a project? Something around Debian, Java, decentralized social software, quality assurance or developer tools?
If There is any sort of food for thought worth reading, this is it.

It s quite common that the upstream build system generates/updates some files but does not clean them up properly when you call make clean. In that case, when you rebuild the package a second time in the same tree, the generated Debian source package will contain those changes.
You usually don t want those changes. They make your package harder to review because they contain unneeded modifications (either directly in the .diff.gz with the old source format, or in a new patch in debian/patches/debian-changes-<ver> with the 3.0 (quilt) source format).
I ll show you 3 ways to avoid this problem. They are all workarounds, the proper fix would be to improve the upstream build system to really clean up the generated files. This is usually possible for files that are created , but it s much more cumbersome for files that are updated (you would have to keep a backup of the original file so that you can restore it).
The traditional fix
Instead of relying on the upstream build system to do the work, we modify the clean target in debian/rules to remove the files that are left-over. Since debian/rules clean is always called before a source package is built, those generated files are not included as changes compared to what upstream provided.
A common work-around: always build from a clean state
As you have noted, the problem only happens when you build (source and binaries) twice in a row in the same tree. Some VCS-helper tools always build the Debian package in a temporary tree which is exported from the VCS. This is the case of svn-buildpackage by default and of git-buildpackage if you use its --git-export-dir option.
I don t like this solution because it solves the problem only for the maintainer. Anyone else who is working on top of the package without using the same VCS-helper tool would be affected by the problem.
A new way to avoid the problem
Since it s now possible to store dpkg-source options in the source package itself, we can conveniently have everybody use the --extend-diff-ignore option. It tells dpkg-source to ignore some files when checking whether we have made changes to upstream files.
For example if you want to ignore changes made on the files config.sub , config.guess and Makefile you could put this in debian/source/options:
# Don't store changes on autogenerated files extend-diff-ignore = "(^ /)(config\.sub config\.guess Makefile)$"You need to know a bit about Perl regular expressions since that s what is used by dpkg-source to match the filenames to exclude. Note that this approach always works, even when you can t remove the file. So it saves you having to make a backup of the unmodified file just to be able to restore it before the next build.
Found it useful? Be sure to not miss other packaging tips (or lessons), click here to subscribe to my free newsletter and get new articles by email.
No comment Liked this article? Click here. My blog is Flattr-enabled.
Just a few days after OpenSSH 5.7 was released upstream, our (Debian s as
well as Ubuntu s) tireless OpenSSH and GRUB maintainer Colin Watson
uploaded a first package of OpenSSH 5.7 to Ubuntu
Natty and to
Debian Experimental.
Besides the obvious new thing, the implementation of Elliptic Curve Cryptography which promises better speed and
shorter keys while staying at the same level of security, one other
item of his changelog entry stuck out and caught my attention:
scp(1): Add a new -3 option to scp: Copies between two remote hosts are transferred through the local host.
sftp(1)/sftp-server(8): add a protocol extension to support a hard link operation. It is available through the ln command in the client. The old ln behaviour of creating a symlink is available using its -s option or through the preexisting symlink command.
Egypt has been fighting for freedom already for 3 days now.
The whole country has experienced a large number of street demonstrations and protests within the last 3 days to be continued also on Friday, the 28th of January and afterwards.
The protests' main goal is to oust dictator Hosni Mubarak's regime, which has been in power for almost 30 years.
We want him out.
A massacre has happened in Suez. Police used live ammunition and tear gas. There are unconfirmed rumors that the army might interfere.
Even a bigger protest is supposed to take place a few hours from now. After the Prayer on Friday.
The internet has been shutdown completely. Egypt is no longer online since Friday, the 28th of January 00:45 AM.
Text messages to cell phones have been cut off too and all cell phones services will be following. No one knows exactly the intentions of the regime but it doesn't sound good.
Please help us.
Please blog about it in English and in all languages.
Please spread the news everywhere.
Please talk to media.
Please petition your government if that will help.
If there's anything that you can do, please do it and help us save the country and the people.
More news from twitter #jan25. read more
(Update: Link to Tomeu s blog post, repost for planet.gnome.org)
Last week I was in Prague to attend the GNOME/Python 2011 Hackfest for gobject-introspection, to which Tomeu Vizoso kindly invited me after I started working with PyGI some months ago. It happened at a place called brmlab which was quite the right environment for a bunch of 9 hackers: Some comfy couches and chairs, soldering irons, lots of old TV tubes, chips, and other electronics, a big Pirate flag, really good Wifi, plenty of Club Mate and Coke supplies, and not putting unnecessary effort into mundane things like wallpapers.
It was really nice to get to know the upstream experts John (J5) Palmieri and Tomeu Vizoso (check out Tomeu s blog post for his summary and some really nice photos). When sitting together in a room, fully focussing on this area for a full week, it s so much easier to just ask them about something and getting things done and into upstream than on IRC or bugzilla, where you don t know each other personally. I certainly learned a lot this week (and not only how great Czech beer tastes export GI_TYPELIB_PATH=$HOME/projects/gtk/gtk:$HOME/projects/gtk/gdk export PYTHONPATH=$HOME/projects/pygobjectBetter GVariant/GDBus support The GNOME world is moving from the old dbus-glib python bindings to GDBus, which is integrated into GLib. However, dbus-python exposed a really nice and convenient way of doing D-Bus calls, while using GDBus from Python was hideously complicated, especially for nontrivial arguments with empty or nested arrays:
from gi.repository import Gio, GLib
from gi._gi import variant_type_from_string
d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
'/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)
vb = GLib.VariantBuilder()
vb.init(variant_type_from_string('r'))
vb.add_value(GLib.Variant('s', 'test'))
vb.add_value(GLib.Variant('u', 1))
vb.add_value(GLib.Variant('s', 'gtk-ok'))
vb.add_value(GLib.Variant('s', 'Hello World!'))
vb.add_value(GLib.Variant('s', 'Subtext'))
# add an empty array
eavb = GLib.VariantBuilder()
eavb.init(variant_type_from_string('as'))
vb.add_value(eavb.end())
# add an empty dict
eavb = GLib.VariantBuilder()
eavb.init(variant_type_from_string('a sv '))
vb.add_value(eavb.end())
vb.add_value(GLib.Variant('i', 10000))
args = vb.end()
result = notify.call_sync('Notify', args, 0, -1, None)
id = result.get_child_value(0).get_uint32()
print id
So I went to making the GLib.Variant constructor work properly with nested types and boxed variants, adding Pythonic GVariant iterators and indexing (so that you can treat GVariant dictionaries/arrays/tuples just like their Python equivalents), and finally a Variant.unpack() method for converting the return value of a D-Bus call back into a native Python data type. This looks a lot friendlier now:
from gi.repository import Gio, GLib
d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
'/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)
args = GLib.Variant('(susssasa sv i)', ('test', 1, 'gtk-ok', 'Hello World!',
'Subtext', [], , 10000))
result = notify.call_sync('Notify', args, 0, -1, None)
id = result.unpack()[0]
print id
I also prepared another patch in GNOME#640181 which will provide the icing on the cake, i. e. handle the variant building/unpacking transparently and make the explicit call_sync() unnecessary:
from gi.repository import Gio, GLib
d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
'/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)
result = notify.Notify('(susssasa sv i)', 'test', 1, 'gtk-ok', 'Hello World!',
'Subtext', [], , 10000)
print result[0]
I hope that I can get this reviewed and land this soon.
Thanks to our sponsors!
Many thanks to the GNOME Foundation and Collabora for sponsoring this event!
Like last year, here s a list of Debian related projects that I d like to tackle this year. I might not do them all, but I like to write them down, I am more productive when I have concrete objectives.
6 comments Liked this article? Click here. My blog is Flattr-enabled.
The easiest way to compress the data that is being served to the visitors of your web application is to make use of mod_deflate. Once you have enabled that module and provided it with a suitable configuration file, it will compress all releant files on the fly as it is serving them.all: build
build:
find static/css -type f -name "[^.]*.css" -execdir yui-compressor -o .css \;
find static/js -type f -name "[^.]*.js" -execdir yui-compressor -o .js \;
cd static/css && for f in *.css.css ; do gzip -c $$f > basename $$f .css .gz ; done
cd static/js && for f in *.js.js ; do gzip -c $$f > basename $$f .js .gz ; done
clean:
find static/css -name "*.css.css" -delete
find static/js -name "*.js.js" -delete
find static/css -name "*.css.gz" -delete
find static/js -name "*.js.gz" -delete
find -name "*.pyc" -delete
Accept-Encoding = gzip,deflate(Incidently, if you want to test what non-gzipped enable browsers see, just browse to about:config and remove what's in the network.http.accept-encoding variable.)<Directory /var/www/static/css>
AddEncoding gzip gz
ForceType text/css
Options +Multiviews
SetEnv force-no-vary
Header set Cache-Control "private"
</Directory>
<Directory /var/www/static/js>
AddEncoding gzip gz
ForceType text/javascript
Options +Multiviews
SetEnv force-no-vary
Header set Cache-Control "private"
</Directory>
When my wife bought her HP 2605dn color laser, she had also ordered a set of
replacement cartridges because the originals would supposedly not last very
long. It turned out that they would last over two years, though.
Now, the black cartridge was empty. The replacements are original HP
components, but recycled/refilled second hand from a different source. I put in
the black one, and the trouble started with the new drum having a big scratch
that would appear in every print. After two years, returning the cartridge was
not an option. As the old drum was still good, the idea was
to put the new toner into the old cartridge. A bit of googling (and visual
inspection) quickly revealed that you are not supposed to do this, the device
doesn't have any facilities to access anything.
Some post did indicate though that the cartridge actually consists of two parts
that are only held together by two pivot pins and two small springs. If you
pull the two parts apart a bit, you can feel the axis the parts are moving
around. So, I would try to use the old drum part with the new toner container
part.
Removing the springs is easy (also removing the flap covering the drum, along
with a tiny third spring). The two pivot pins are pretty inaccessible, but I
managed to pull out both using a pointy tong. One pin is made of metal, if you
need more space you can drill a small hole right next to it. The other pin is
made of plastic with a small hole in it, in one case I succeeded by screwing in
a little screw and pulling at it.
Reassembling the parts is not so hard. I put the "new" cartridge into the
printer, waited for the initialization to finish, only to find out the printer
would still think the cartridge was empty and should be replaced. Duh.
I then discovered a small chip attached to one corner of the drum unit,
probably carrying product ID and some serial number. Luckily, it was easy to
be removed and exchanged with the other drum unit. Still, the printer thought
the cartridge was empty. Some (windows) driver re-installations later it was
clear that there is no "ignore fill level and print anyway" option. (Cups
didn't print either.)
The HP Support Forum has a long
Ink cartridge empty but it's not
thread with lots of complaints but few answers. (Their problem is mostly with
new HP cartridges becoming "empty" after a few days.) Someone suggests trying
to cold reset the printer. For the 2605dn, that's holding the left and right
buttons while powering on. I removed the cartridges for doing so. When I had
put them back in, the printer asked me to confirm that non-HP material was
installed, and subsequently didn't display any fill level for the black
cartridge anymore, just " ? " in the display.
Printing works now. Yay.
(Lesson learned: I still hate dealing with printers.)
I've spent second day of Hackweek 6 on more different tasks.
First I tried to add some improvements to Series60 applet. First things to fix were crashes on requesting non existing contact or calendar entry. After that I started to improve user experience a bit, for example by making the menu work and contain some useful things. After that I've added new functionality to capture screenshots of the device. So you can see how the applet actually looks like:
On the Gammu side, I've implemented reading of contacts and todos. No write support yet, that will be done tomorrow. And of course counterpart for the screenshot function.
I've also spent some time on writing documentation, so now there is some documentation on setting up the S60 connection or the new gammu screenshot command.
All code is is available in our Git repository.
Filed under: English Gammu Suse 0 comments Flattr this!
Next.