Search Results: "will"

8 February 2012

Ian Wienand: Python and --prefix

Something interesting I discovered about Python and --prefix that I can't see a lot of documentation on... When you build Python you can use the standard --prefix flag to configure to home the installation as you require. You might expect that this would hard-code the location to look for the support libraries to the value you gave; however in reality it doesn't quite work like that. Python will only look in the directory specified by prefix after it first searches relative to the path of the executing binary. Specifically, it looks at argv[0] and works through a few steps is argv[0] a symlink? then dereference it. Does argv[0] have any slashes in it? if not, then search the $PATH for the binary. After this, it starts searching for dirname(argv[0])/lib/pythonX.Y/os.py, then dirname(argv[0])/../lib and so on, until it reaches the root. Only after these searches fail does the interpreter then fall back to the hard-coded path specified in the --prefix when configured. What is the practical implications? It means you can move around a python installation tree and have it all "just work", which is nice. In my situation, I noticed this because we have a completely self-encapsulated build toolchain, but we wish to ship the same interpreter on the thing that we're building (during the build, we run the interpreter to create .pyc files for distribution, and we need to be sure that when we did this we didn't accidentally pick up any of the build hosts python; only the toolchain python). The PYTHONHOME environment variable does override this behaviour; if it is set then the search stops there. Another interesting thing is that sys.prefix is therefore not the value passed in by --prefix during configure, but the value of the current dynamically determined prefix value. If you run an strace, you can see this in operation.
readlink("/usr/bin/python", "python2.7", 4096) = 9
readlink("/usr/bin/python2.7", 0xbf8b014c, 4096) = -1 EINVAL (Invalid argument)
stat64("/usr/bin/Modules/Setup", 0xbf8af0a0) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python2.7/os.py", 0xbf8af090) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python2.7/os.pyc", 0xbf8af090) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python2.7/os.py",  st_mode=S_IFREG 0644, st_size=26300, ... ) = 0
stat64("/usr/bin/Modules/Setup", 0xbf8af0a0) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lib/python2.7/lib-dynload", 0xbf8af0a0) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python2.7/lib-dynload",  st_mode=S_IFDIR 0755, st_size=4096, ... ) = 0
Firstly it dereferences symlinks. Then it looks for Modules/Setup to see if it is running out of the build tree. Then it starts looking for os.py, walking its way upwards. One interesting thing that may either be a bug or a feature, I haven't decided, is that if you set the prefix to / then the interpreter will not go back to the root and then look in /lib. This is probably pretty obscure usage though! All this is implemented in Modules/getpath.c which has a nice big comment at the top explaining the rules in detail.

7 February 2012

Martin Pitt: fatrace: report system wide file access events

Part of our efforts to reduce power consumption is to identify processes which keep waking up the disk even when the computer is idle. This already resulted in a few bug reports (and some fixes, too), but we only really just began with this. Unfortunately there is no really good tool to trace file access events system-wide. powertop claims to, but its output is both very incomplete, and also wrong (e. g. it claims that read accesses are writes). strace gives you everything you do and don t want to know about what s going on, but is per-process, and attaching strace to all running and new processes is cumbersome. blktrace is system-wide, but operates at a way too low level for this task: its output has nothing to do any more with files or even inodes, just raw block numbers which are impossible to convert back to an inode and file path. So I created a little tool called fatrace ( file access trace , not fat race :-) ) which uses fanotify, a couple of /proc lookups and some glue to provide this. By default it monitors the whole system, i. e. all mounts (except the virtual ones like /proc, tmpfs, etc.), but you can also tell it to just consider the mount of the current directory. You can write the log into a file (stdout by default), and run it for a specified number of seconds. Optional time stamps and PID filters are also provided.
$ sudo fatrace
rsyslogd(967): W /var/log/auth.log
notify-osd(2264): O /usr/share/pixmaps/weechat.xpm
compiz(2001): R device 8:2 inode 658203
[...]
It shows the process name and pid, the event type (Rread, Write, Open, or Close), and the path. Sometimes its not possible to determine a path (usually because it s a temporary file which already got deleted, and I suspect mmaps as well), in that case it shows the device and inode number; such programs then need closer inspection with strace. If you run this in gnome-terminal, there is an annoying feedback loop, as gnome-terminal causes a disk access with each output line, which then causes another output line, ad infinitum. To fix this, you can either redirect output to a file (-o /tmp/trace) or ignore the PID of gnome-terminal (-p pidof gnome-terminal ). So to investigate which programs are keeping your disk spinning, run something like
  $ sudo fatrace -o /tmp/trace -s 60
and then do nothing until it finishes. My next task will be to write an integration program which calls fatrace and powertop, and creates a nice little report out of that raw data, sorted by number of accesses and process name, and all that. But it might already help some folks as it is right now. The code lives in bzr branch lp:fatrace (web view), you can just run make and sudo ./fatrace. I also uploaded a package to Ubuntu Precise, but it still needs to go through the NEW queue. I also made a 0.1 release, so you can just grab the release tarball if you prefer. Have a look at the manpage and --help, it should be pretty self-explanatory.

Gerfried Fuchs: Games Screenshot Party

The following announce is lazily copied from Paul Wise's announce. There is only one thing I like to add: the screenshots that are submitted and collected on screenshots.debian.net are visible on the packages websites (both Debian and Ubuntu) and are also used by the software-center package, so they help people to get a first impression of the package they might want to install. Have you ever wondered how to start getting involved in Debian/Ubuntu? Do you enjoy discovering new games and playing them? You might want to come to the games screenshot party! We hope that the party will be a fun, easy, low-commitment way to get involved. The Debian/Ubuntu Games Team is organizing a half-day screenshots party on the weekend of 25th-26th February for creating screenshots for all the games that are available in Debian/Ubuntu. If you are interested in attending, please add your availability to the poll linked from the announcement so that we can get some idea of attendance and when is a good time for the people who are interested. Look forward to lots of game playing, screenshots and merry time, hope to see you all there!

/debian permanent link Comments: 0 Flattr this

Raphaël Hertzog: Dpkg with multiarch support available in Debian experimental

As I announced on debian-devel, Guillem Jover uploaded a snapshot of dpkg s multiarch branch to experimental (version 1.16.2~wipmultiarch). Beware: There will
likely be some small interface changes between this version and the version that will be released later in unstable (possibly in the output of dpkg --get-selections, dpkg --list, maybe other commands). multiarch allows you to install packages from different architectures on the same machine. This can be useful if your computer can run programs from 2 architectures (eg. x86 CPU supporting i386 and amd64), or if you often need to cross-compile software and thus need the libraries of your target architecture. Test dpkg with multiarch support If you want to test multiarch support in dpkg, install the package from experimental (apt-get install dpkg/experimental assuming you have experimental in your sources.list). Then you can add a supplementary architecture to your system by doing sudo dpkg --add-architecture <arch> (e.g. i386 if you are on amd64, and vice-versa). APT will automatically pick up the new architecture and start downloading the Packages file for the new architecture (it uses dpkg --print-foreign-architectures to know about them). From there on you can install packages from the foreign architectures with apt-get install foo:<arch> . Many packages will not be installable because some of their dependencies have not yet been updated to work with in a multiarch world (libraries must be installed in a multiarch-compliant path so as to be co-installable, and then marked Multi-Arch: same ). Other dependencies might need to be marked Multi-Arch: foreign . See wiki.debian.org/Multiarch/Implementation for more HOWTO-like explanations. Now is a good time to see if you can install the foreign packages that you could need in such a setup and to help to convert the required libraries. You can also read Cyril Brulebois article which quickly shows how to hunt for the problematic packages which have not been converted to multiarch (in his sample, ucf is not ready. Since it s an Architecture: all package which can run on any architecture, it means that it s lacking a Multi-Arch: foreign field). Report bugs If you discover any bug in dpkg s multiarch implementation, please report it to the Bug Tracking System (against dpkg with the version 1.16.2~wipmultiarch ). If you notice important libraries or packages which are not yet multiarch ready, please open wishlist bug reports requesting the conversion and point the maintainers towards the wiki page linked above. Even better, prepare patches and submit those with your bug reports. Again, you can follow the lead of Cyril Brulebois who filed 6 bugs! Review the multiarch implementation If you re a C programmer and have some good knowledge of dpkg (or are willing to learn more of it), we would certainly benefit from more eyes reviewing the multiarch branch. If you want to discuss some design issues of the multiarch implementation in dpkg (or have questions related to your review), please get in touch via debian-dpkg@lists.debian.org. The latest version of the branch is pu/multiarch/master in Guillem s personal repository. I have my own version of the branch (pu/multiarch/full) which is usually a snapshot of Guillem s branch with my own submitted fixes.
$ git clone git://git.debian.org/dpkg/dpkg.git
$ cd dpkg
$ git remote add guillem git://git.hadrons.org/git/debian/dpkg/dpkg.git
$ git remote add buxy git://git.debian.org/~hertzog/dpkg.git
$ git fetch guillem && git fetch buxy
If you followed the instructions above, the relevant branches are thus guillem/pu/multiarch/master and buxy/pu/multiarch/full. Both branches are regularly rebased on top of master where Guillem merges progressively the commits from the multi-arch branch as his review progresses. Thank you in advance for your help bringing multiarch in shape for Debian Wheezy,

6 comments Liked this article? Click here. My blog is Flattr-enabled.

Russell Coker: 5 Principles of Backup Software

Everyone agrees that backups are generally a good thing. But it seems that there is a lot less agreement about how backups should work. Here is a list of 5 principles of backup software that seem to get ignored most of the time: (1/5) Backups should not be Application Specific It s quite reasonable for people to want to extract data from a backup on a different platform. Maybe someone will want to extract data a few decades after the platform becomes obsolete. I believe that vendors of backup software have an ethical obligation to make it possible for customers to get their data out with minimal effort regardless of the circumstances. Often when writing a backup application there will be good reasons for not using the existing formats for data storage (tar, cpio, zip, etc). But ideally any data store which involves something conceptually similar to a collection of files in one larger file will use one of those formats. There have been backward compatible extensions to tar and zip for SE Linux contexts and for OS/2 EAs the possibility of extending archive file formats with no consequence other than warnings on extraction with an unpatched utility has been demonstrated. For a backup which doesn t involve source files (EG the contents of some sort of database) then it should be in a format that can be easily understood and parsed. Well designed XML is generally a reasonable option. Generally the format should involve plain text that is readable and easy to understand which is optionally compressed with a common compression utility (pkzip is a reasonable choice). (2/5) Data Store Formats should be Published For every data store there should be public documentation about it s format to allow future developers to write support for it. It really isn t difficult to release some commented header files so that people can easily determine the data structures. This includes all data stores including databases and filesystems. If I suddenly find myself with a 15yo image of a NTFS filesystem containing a proprietary database I should be able to find official header files for the version of NTFS and the database server in question so I can decode the data if it s important enough. When an application vendor hides the data formats it gives the risk of substantial data loss at some future time. Imposing such risk on customers to try and prevent them from migrating to a rival product is unethical. (3/5) Backups should be forward and backward compatible It is entirely unreasonable for a vendor to demand that all their users install the latest versions of their software. There are lots of good reasons for not upgrading which includes hardware not supporting new versions of the OS, lack of Internet access to perform the upgrade, application compatibility, and just liking the way the old version works. Even for the case of a critical security fix it should be possible to restore data without applying the fix. For any pair of versions of software that are only separated by a few versions it should be possible to backup data from one and restore to the other. Even if the data can t be used directly (EG a backup of AMD64 programs that is restored on an i386 system) it should still be accessible. If a new version of the software doesn t support the ancient file formats then it should be possible for the users to get a slightly older version which talks to both the old and new versions. Backups made on 64bit systems running the latest development version of Linux and on 10yo 32bit proprietary Unix systems are interchangeable. Admittedly Unix is really good at preserving file format compatibility, but there is no technical reason why other systems can t do the same. Source code to cpio, tar, and gnuzip, is freely available! Apple TimeMachine fails badly in this regard, even a slightly older version of Mac OS can t do a restore. It is however nice that most of the TimeMachine data is a tree of files which could be just copied to another system. (4/5) Backup Software should not be Dropped Sony Ericsson has made me hate them even more by putting the following message on their update web site: The Backup and Restore app will be overwritten and cannot be used to restore data. Check out Android Market for alternative apps to back up and restore your data, such as MyBackup. So if you own a Sony Ericsson phone and it is lost, stolen, or completely destroyed and all you have is a backup made by the Sony Ericsson tool then the one thing you absolutely can t do is to buy a new Sony Ericsson phone to restore the data. I believe that anyone who releases backup software has an ethical obligation to support restoring to all equivalent systems. How difficult would it be to put a new free app in the Google Market that has as it s sole purpose recovering old Sony Ericsson backups onto newer phones? It really can t be that difficult, so even if they don t want to waste critical ROM space by putting the feature in all new phones they can make it available to everyone who needs it. When compared to the cost of developing a new Android release for a series of phones the cost of writing such a restore program would be almost nothing. It is simply mind-boggling that Sony Ericsson go against their own commercial interests in this regard. Surely it would make good business sense to be able to sell replacements for all the lost and broken Sony Ericsson phones, but instead customers who get burned by broken backups are given an incentive to buy a product from any other vendor. (5/5) The greater the control over data the greater the obligation for protecting it If you have data stored in a simple and standard manner (EG the /DCIM directory containing MP4 and JPEG files that is on the USB accessible storage in every modern phone) then IMHO it s quite OK to leave customers to their own devices in terms of backups. Typical users can work out that if they don t backup their pictures then they risk losing them, and they can work out how to do it. My Sony Ericsson phones have data stored under /data (settings for Android applications) which is apparently only accessible as root. Sony Ericsson have denied me root access which prevents me running backup programs such as Titanium Backup, therefore I believe that they have a great obligation to provide a way of making a backup of this data and restoring it on a new phone or a phone that has been updated. To just provide phone upgrade instructions which tell me that my phone will be entirely wiped and that I should search the App Market for backup programs is unacceptable. I believe that there are two ethical options available to Sony Ericsson at this time, one is to make it easy to root phones so that Titanium Backup and similar programs can be used, and the other option is to release a suitable backup program for older phones. Based on experience I don t expect Sony Ericsson to choose either option. Now it is also a bad thing for the Android application developers to make it difficult or impossible to backup their data. For example the Wiki for one Android game gives instructions for moving the saved game files to a new phone which starts with root your phone . The developers of that game should have read the Wiki, realised that rooting a phone for the mundane task of transferring saved game files is totally unreasonable, and developed a better alternative. The best thing for developers to do is to allow the users to access their own data in the most convenient manner. Then it becomes the user s responsibility to manage it and they can concentrate on improving their application. Why Freedom is Important Installing CyanogenMod on my Galaxy S was painful, but having root access so I can do anything I want is a great benefit. If phone vendors would do the right thing then I could recommend that other people use the vendor release, but it seems that vendors can be expected to act unethically. So I can t recommend that anyone use an un-modded Android phone at any time. I also can t recommend ever buying a Sony Ericsson product, not even when it s really cheap. Google have done a great thing with their Data Liberation Front [1]. Not only are they providing access to the data they store on our behalf (which is a good thing) but they have a mission statement that demands the same behavior from other companies they make it an issue of competitive advantage! So while Sony Ericsson and other companies might not see a benefit in making people like me stop hating them, failing to be as effective in marketing as Google is a real issue. Data Liberation is something that should be discussed at board elections of IT companies. Keep in mind the fact that ethics are not just about doing nice things, they are about establishing expectations of conduct that will be used by people who deal with you in future. Sony Ericsson has shown that I should expect that they will treat the integrity of my data with contempt and I will keep this in mind every time I decline an opportunity to purchase their products. Google has shown that they consider the protection of my data as an important issue and therefore I can be confident when using and recommending their services that I won t get stuck with data that is locked away. While Google has demonstrated that corporations can do the right thing, the vast majority of evidence suggests that we should never trust a corporation with anything that we might want to retrieve when it s not immediately profitable for the corporation. Therefore avoiding commercial services for storing important data is the sensible thing to do. Related posts:
  1. Galaxy S vs Xperia X10 and Android Network Access Galaxy S Review I ve just been given an indefinite loan...
  2. Standardising Android Don Marti wrote an amusing post about the lack of...
  3. On Burning Platforms Nokia is in the news for it s CEO announcing that...

6 February 2012

Jon Dowland: Rip it Up and Start Again

I've just finally finished reading Simon Reynold's dense "Rip it Up and Start Again": a history of post-punk music from 1978-1984. I often think of music journalism in the terms that Zappa famously phrased as (roughly) "people who can't write, writing for people who can't read". This book sometimes suffers from that syndrome, of attempting to describe audio in terms of other senses, which sometimes wanders deep into synesthesia territory, but for the most part the book is coherent and enjoyable. It's also very "dense": you leave each page with another half-dozen songs or bands of music genres to go and investigate. I'm surprised that there isn't a commercially-released anthology counterpart to the book. There are, however, several playlists, many of which are locked away on Spotify, but via this review I found these two which are web-based (powered by opentape, an interesting piece of AGPL software). The book has helped me to discover a lot of music that I hadn't heard of before and now love, which I will probably write about in different contexts over the next few months.

David Welton: BikeChatter.com for sale

What with two kids, a new house, and LiberWriter getting some good traction, I've been looking around for things to give to a good home so as to have less stuff to deal with. So, on the auction block goes BikeChatter.com : https://flippa.com/2696023-professional-cyclists-on-twitter-plus-2-years-of-history

BikeChatter.com is the place to go on the web to follow professional cyclists on twitter. With 500+ racers, and nearly half a million status updates from racers like Lance Armstrong, Alberto Contador, Mark Cavendish, and many, many more, this site is the best place to find out what's going on in the world of professional cycling, directly from the participants. Since I like following the site myself, I really want to see it go to people who will take it and make it even better.

Cyril Brulebois: dpkg with multiarch, a new hope

dpkg was uploaded to experimental a few times lately, let s sum it up quickly:
  1. It started with my NMU on 2012-01-31, since I hadn t received any reasons not to upload (except NACK , which doesn t count as such in my book).
  2. It got reverted a few minutes after that.
  3. Since this was getting nowhere, the Debian Technical Committee finally got involved, and voted in a few days only (wow, thanks!) for an it s time to experiment decision.
  4. A new dpkg upload to experimental finally happened. One shall note the prominent This is a WIP release, command line interfaces will change. notice.
I ve updated my previous dpkg with multiarch page accordingly, only keeping the interesting bits. Playing around with grep-aptavail -F Multi-Arch $i -sPackage (with $i being same or foreign), I found some bugs: Also, some wishlist bugs (keeping the prominent notice in mind): Finally, one dpkg improvement and one possible dpkg bug:

5 February 2012

Russell Coker: Reliability of RAID

ZDNet has an insightful article by Robin Harris predicting the demise of RAID-6 due to the probability of read errors [1]. Basically as drives get larger the probability of hitting a read error during reconstruction increases and therefore you need to have more redundancy to deal with this. He suggests that as of 2009 drives were too big for a reasonable person to rely on correct reads from all remaining drives after one drive failed (in the case of RAID-5) and that in 2019 there will be a similar issue with RAID-6. Of course most systems in the field aren t using even RAID-6. All the most economical hosting options involve just RAID-1 and RAID-5 is still fairly popular with small servers. With RAID-1 and RAID-5 you have a serious problem when (not if) a disk returns random or outdated data and says that it is correct, you have no way of knowing which of the disks in the set has good data and which has bad data. For RAID-5 it will be theoretically possible to reconstruct the data in some situations by determining which disk should have it s data discarded to give a result that passes higher level checks (EG fsck or application data consistency), but this is probably only viable in extreme cases (EG one disk returns only corrupt data for all reads). For the common case of a RAID-1 array if one disk returns a few bad sectors then probably most people will just hope that it doesn t hit something important. The case of Linux software RAID-1 is of interest to me because that is used by many of my servers. Robin has also written about some NetApp research into the incidence of read errors which indicates that 8.5% of consumer disks had such errors during the 32 month study period [2]. This is a concern as I run enough RAID-1 systems with consumer disks that it is very improbable that I m not getting such errors. So the question is, how can I discover such errors and fix them? In Debian the mdadm package does a monthly scan of all software RAID devices to try and find such inconsistencies, but it doesn t send an email to alert the sysadmin! I have filed Debian bug #658701 with a patch to make mdadm send email about this. But this really isn t going to help a lot as the email will be sent AFTER the kernel has synchronised the data with a 50% chance of overwriting the last copy of good data with the bad data! Also the kernel code doesn t seem to tell userspace which disk had the wrong data in a 3-disk mirror (and presumably a RAID-6 works in the same way) so even if the data can be corrected I won t know which disk is failing. Another problem with RAID checking is the fact that it will inherently take a long time and in practice can take a lot longer than necessary. For example I run some systems with LVM on RAID-1 on which only a fraction of the VG capacity is used, in one case the kernel will check 2.7TB of RAID even when there s only 470G in use! The BTRFS Filesystem The btrfs Wiki is currently at btrfs.ipv5.de as the kernel.org wikis are apparently still read-only since the compromise [3]. BTRFS is noteworthy for doing checksums on data and metadata and for having internal support for RAID. So if two disks in a BTRFS RAID-1 disagree then the one with valid checksums will be taken as correct! I ve just done a quick test of this. I created a filesystem with the command mkfs.btrfs -m raid1 -d raid1 /dev/vg0/raid? and copied /dev/urandom to it until it was full. I then used dd to copy /dev/urandom to some parts of /dev/vg0/raidb while reading files from the mounted filesystem that worked correctly although I was disappointed that it didn t report any errors, I had hoped that it would read half the data from each device and fix some errors on the fly. Then I ran the command btrfs scrub start . and it gave lots of verbose errors in the kernel message log telling me which device had errors and where the errors are. I was a little disappointed that the command btrfs scrub status . just gave me a count of the corrected errors and didn t mention which device had the errors. It seems to me that BTRFS is going to be a much better option than Linux software RAID once it is stable enough to use in production. I am considering upgrading one of my less important servers to Debian/Unstable to test out BTRFS in this configuration. BTRFS is rumored to have performance problems, I will test this but don t have time to do so right now. Anyway I m not always particularly concerned about performance, I have some systems where reliability is important enough to justify a performance loss. BTRFS and Xen The system with the 2.7TB RAID-1 is a Xen server and LVM volumes on that RAID are used for the block devices of the Xen DomUs. It seems obvious that I could create a single BTRFS filesystem for such a machine that uses both disks in a RAID-1 configuration and then use files on the BTRFS filesystem for Xen block devices. But that would give a lot of overhead of having a filesystem within a filesystem. So I am considering using two LVM volume groups, one for each disk. Then for each DomU which does anything disk intensive I can export two LVs, one from each physical disk and then run BTRFS inside the DomU. The down-side of this is that each DomU will need to scrub the devices and monitor the kernel log for checksum errors. Among other things I will have to back-port the BTRFS tools to CentOS 4. This will be more difficult to manage than just having an LVM VG running on a RAID-1 array and giving each DomU a couple of LVs for storage. BTRFS and DRBD The combination of BTRFS RAID-1 and DRBD is going to be a difficult one. The obvious way of doing it would be to run DRBD over loopback devices that use large files on a BTRFS filesystem. That gives the overhead of a filesystem in a filesystem as well as the DRBD overhead. It would be nice if BTRFS supported more than two copies of mirrored data. Then instead of DRBD over RAID-1 I could have two servers that each have two devices exported via NBD and BTRFS could store the data on all four devices. With that configuration I could lose an entire server and get a read error without losing any data! Comparing Risks I don t want to use BTRFS in production now because of the risk of bugs. While it s unlikely to have really serious bugs it s theoretically possible that as bug could deny access to data until kernel code is fixed and it s also possible (although less likely) that a bug could result in data being overwritten such that it can never be recovered. But for the current configuration (Ext4 on Linux software RAID-1) it s almost certain that I will lose small amounts of data and it s most probable that I have silently lost data on many occasions without realising. Related posts:
  1. Some RAID Issues I just read an interesting paper titled An Analysis of...
  2. ECC RAM is more useful than RAID A common myth in the computer industry seems to be...
  3. Software vs Hardware RAID Should you use software or hardware RAID? Many people claim...

Michal &#268;iha&#345;: phpMyAdmin goes github

Yesterday we did held phpMyAdmin team meeting and we discussed several things for project future. One of discussed things was to move our repositories to github for easier collaboration and management of private repositories. After some discussions we've decided to go for it. As I write this blog, all repositories are being pushed there and once all developers will get their access rights there, we will move completely. But even right now, you can fork us on github, the code is already there and will be updated obsessionally until we fully move there.

Filed under: English Phpmyadmin 0 comments Flattr this!

Petter Reinholdtsen: Saving power with Debian Edu / Skolelinux using shutdown-at-night

Since the Lenny version of Debian Edu / Skolelinux, a feature to save power have been included. It is as simple as it is practical: Shut down unused clients at night, and turn them on again in the morning. This is done using the shutdown-at-night Debian package. To enable this feature on a client, the machine need to be added to the netgroup shutdown-at-night-hosts. For Debian Edu, this is done in LDAP, and once this is in place, the machine in question will check every hour from 16:00 until 06:00 to see if the machine is unused, and shut it down if it is. If the hardware in question is supported by the nvram-wakeup package, the BIOS is told to turn the machine back on around 07:00 +- 10 minutes. If this isn't working, one can configure wake-on-lan to try to turn on the client. The wake-on-lan option is only documented and not enabled by default in Debian Edu. It is important to not turn all machines on at once, as this can blow a fuse if several computers are connected to the same fuse like the common setup for a classroom. The nvram-wakeup method only work for machines with a functioning hardware/BIOS clock. I've seen old machines where the BIOS battery were dead and the hardware clock were starting from 0 (or was it 1990?) every boot. If you have one of those, you have to turn on the computer manually. The shutdown-at-night package is completely self contained, and can also be used outside the Debian Edu environment. For those without a central LDAP server with netgroups, one can instead touch the file /etc/shutdown-at-night/shutdown-at-night to enable it. Perhaps you too can use it to save some power?

John Goerzen: Rain, A Funeral, and Excitement

Rain Friday was something of a rare day for February in Kansas. Starting at about 2AM, the wind picked up, blowing so hard that our windows rattled. That part isn t so rare. Then the cold rain started, dropping almost 2.5 throughout the day. As I worked, I had the blinds on the windows open, but they didn t let in very much light. Still, the wind had calmed down, so the intermittent rain outside was peaceful. Jacob went out to play for a little while, so every so often I saw a warmly-dressed and excited-looking 5-year-old run past my window. A little while after he came in, I told Jacob, I saw you playing outside. His response: Oh good! I got wet! Which, despite the fact that it was about 50 degrees, seemed to excite him. After the blustery start, the calm, slow, and peaceful rain was a pleasant thing to see throughout the day. Funeral My great aunt Alice Goerzen passed away last Sunday. So today, for the third time in a little over a year, I was at the funeral of a Goerzen relative and neighbor. Alice s husband, Milt, passed away in late 2010, and it was while I was at his funeral that Jacob got run over by a tractor. That memory certainly came back to me today. But I think I should set the stage and explain what funerals are like in this small, rural Kansas community. At the church, while people file in, family and close friends generally defined as loosely as desired meet in some other room before the funeral. Memories may be shared, or songs sung, or maybe just a brief meditation or prayer. Then the man from the funeral home there s only one in town will step in. Ivan Miller owned the business for decades, and although he s now retired, his replacement seems pretty similar. Kindly, respectful, and pretty much unchanging. This group then files into the church sanctuary to sit up front, while the rest of the congregation is standing and music is played. We typically sing some hymns, hear memories from the family, a message from a pastor, and then do downstairs for faspa: an light meal with coffee, zwieback, funeral cheese , and some relishes and dessert. You can, by the way, go to the local grocery store and find a product labeled funeral cheese . It s a sharp cheddar, sliced thick and cut into pie piece-shaped wedges. After everyone has picked up their food, microphones are passed around, and anybody that wants to can share memories and stories. These are often hilarious, or touching, and can be more random than anyone could expect. Today we heard a lot about how Aunt Alice loved her flowers and garden. We even saw a video of her giving a tour of her garden, with Milt s mower in the background occasionally accidentally causing a distraction (or maybe it wasn t so accidental; he d never miss an opportunity to cause some mischief ) I tend to think of attending funerals around here as a good time. Sadness is inevitable, but there are so many amazing stories that it is hard to leave feeling sad. Excitement This afternoon, Jacob found me in the office and as he often does, said, Dad, I want to do something with you. Usually I ask him what he d like to do, but his first instinct is usually to ask for watching train videos on Youtube. So sometimes I make other suggestions. Today we played hide and seek with radios, in which the person that is counting is supposed to radio to the other person when they are done. Today was the first time that Jacob came up with the trick of talking into the radio while I was hiding so he could hear where I was. I was sort of proud of him, and he failed to completely hide his smile when I told him I had to turn off my radio or else he d find me too fast. Then later, we played with Jacob s computer, a Linux-based command-line-only machine. I have set up a few shell scripts and aliases for him. Since it doesn t play videos, he doesn t use it as much as he does mine, but it is really fun to watch how his interaction with it changes as he gets older. He can now read amazingly well for a 5-year-old, and is starting to learn how to spell. He loves word games, writing, and typing. I thought I would install an ASCII art program for him. I told Jacob I had some ideas for a new game, and he was irresistibly intrigued. I offered him a choice between figlet and toilet. And, as is probably no surprise to anyone with a 5-year-old, he chose toilet based on its name, Jacob and Oliver both loved typing things and seeing them displayed bigger. I showed Jacob how I could make a freight train by typing ,<@-[]-(*)-@> (that s the comma-shaped snowplow, engine, boxcar [], tank car (*), and caboose @>). Then toilet drew them big, and though abstract, caused great excitement. I hooked up one of the speech synthesizers in Debian to a simple shell script named talk , which is a huge hit with the boys. They enjoy typing in nonsense and hearing the funny result, or in typing in real words and hearing how the computer says them right (or doesn t). All told, we had a good hour s worth of excitement up there.

4 February 2012

Stefano Zacchiroli: bits from the DPL for January 2012

Fresh from the oven, monthly report of what I've been working on as DPL during January 2012.
Dear Developers,
here is another monthly report of what happened in DPL-land, this time for January 2012. There's quite a bit to report about --- including an insane amount of legal-ish stuff --- so please bear with me. Or not. Legal stuff Most of the above wouldn't have been possible without the precious help of folks at SFLC working for SPI and Debian. Be sure to thank SFLC for what they're doing for us and many other Free Software projects. Coordination Nobody stepped up to coordinate the artwork collection for Wheezy I've mentioned last month, so I've tried to do a little bit of that myself. The -publicity team is now preparing the call for artwork and hopefully we'll send it out RSN. In case you want to help, there is still a lot of room for that; just show up on the debian-desktop mailing list. Sprints A Debian Med sprint has happened in January, and Andreas Tille has provided a nice and detailed report about it. Some more sprints are forthcoming this spring, how about yours? Money Important stuff going on Other important stuff has been going on in various area of the project in January. I'd like to point your attention to a couple of things: Miscellanea In the unlikely case you've read thus far, thanks for your attention! Happy Debian hacking.
PS as usual, the boring day-to-day activity log is available at master:/srv/leader/news/bits-from-the-DPL.*

Petter Reinholdtsen: Third beta version of Debian Edu / Skolelinux based on Squeeze

I am happy to announce that finally we managed today to wrap up and publish the third beta version of Debian Edu / Skolelinux based on Squeeze. If you want to test a LDAP backed Kerberos server with out of the box PXE configuration for running diskless machines and installing new machines, check it out. If you need a software solution for your school, check it out too. The full announcement is available on the project announcement list. I am very happy to report these changes and improvements since beta2 (there are more, see announcement for full list): The new main server seem to work so well that I am testing it as my private DNS/LDAP/Kerberos/PXE/LTSP server at home. I will use it look for issues we could fix to polish Debian Edu even further before the final Squeeze release is published. Next weekend the project organise a developer gathering in Oslo. We will continue the work on the Squeeze version, and start initial planning for the Wheezy version. Perhaps I will see you there?

Bartosz Fe&#324;ski: Quick howto for the most stable Linux kernel with Zenbook

Quick howto for everyone having Asus UX31e aka Zenbook and wants the most stable vanilla kernel with long-time battery life and working touchpad made by Sentelic.
This should work for every Debian based distro, but has been tested only on the latest Linux Mint 12 (aka Lisa).
Tutorial is aimed mainly at beginners and should work in a copy&paste manner. Of course you have to change every occurence of linux-3.2.4 to whichever version you re going to install.
Just make sure that all commands are entered in the correct directories, prompts should look similar to these from examples.
You will need about 10GB of free disk space. Let s install some dependencies first:
fenio@zenbook ~ $ sudo apt-get install build-essential kernel-package fakeroot libncurses5-dev git iasl
Now let s download and unpack the latest kernel (3.2.4 at the time it was written):
fenio@fenio ~ $ mkdir kernel
fenio@fenio ~ $ cd kernel
fenio@fenio ~/kernel $ wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.4.tar.bz2
fenio@fenio ~/kernel $ tar jxvf linux-3.2.4.tar.bz2
Now we take current kernel configuration and put in the kernel tree:
fenio@fenio ~/kernel $ cp /boot/config- uname -r  linux-3.2.4/.config
Now we have to download the latest driver for Sentelic touchpad (this is why we needed git as a dependency):
fenio@fenio ~/kernel $ git clone git://github.com/saaros/sentelic.git
fenio@fenio ~/kernel $ cp sentelic/src/sentelic.* linux-3.2.4/drivers/input/mouse/
It s time to fix broken DSDT table (part of ACPI). This is why we had iasl in dependencies.
fenio@fenio ~/kernel $ wget http://files.benesovi.eu/ux31e/ux31e_dsdt.dsl
fenio@fenio ~/kernel $ iasl -tc ux31e_dsdt.dsl
And include it in our kernel configuration:
fenio@fenio ~/kernel $ sed -ie 's/# CONFIG_ACPI_CUSTOM_DSDT is not set/CONFIG_ACPI_CUSTOM_DSDT=y/g' linux-3.2.4/.config 
fenio@fenio ~/kernel $ sed -ie "s@CONFIG_ACPI_CUSTOM_DSDT_FILE.*@CONFIG_ACPI_CUSTOM_DSDT_FILE=\" pwd /ux31e_dsdt.hex\"@g" linux-3.2.4/.config
Now ensure that all our options are set up correctly (you can change some other options if you want).
If you don t want to change anything then simply exit saving configuration.
fenio@fenio ~/kernel $ cd linux-3.2.4/
fenio@fenio ~/kernel/linux-3.2.4 $ make menuconfig
We re ready to start compilation now!
fenio@fenio ~/kernel/linux-3.2.4 $ fakeroot make-kpkg clean
fenio@fenio ~/kernel/linux-3.2.4 $ fakeroot make-kpkg --jobs=4 --initrd --append-to-version=-fenio --revision=20120204 kernel_image kernel_headers modules_image
Of course you can change append-to-version option for something own. In the meantime (kernel compilations takes about one hour) you can modify Grub options to enable powersaving features RC6:
fenio@zenbook ~ $ sudo sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="i915.powersave=1 i915.semaphores=1 i915.i915_enable_rc6=1"/g' /etc/default/grub
Be sure to do that before installation of kernel, otherwise you will have to run update-grub. After compilation you can finally install your new kernel:
fenio@zenbook ~/kernel/linux-3.2.4 $ sudo dpkg -i ../*.deb
Reboot and you re done! Feel free to comment this tutorial if something went wrong.

3 February 2012

Andrew Pollock: [life] Zoe at 21 months

Wow, a lot happens in 3 months. I'm sure I've missed something... I think the biggest achievement would be toilet training. Zoe's been using the toilet for some time now, but still wearing diapers, and just after Christmas (when she was sick and vomited on the carpet) we figured we had nothing to lose, so we ditched the diapers. I can count on the fingers of one hand the number of accidents she's had since then. I'm really happy to have this out of the way so early. Using a toilet away from home is still more of a challenge, but she seems to have very good bladder control, and fairly predictable bowel movements. Speaking of sick, she was the sickest she's ever been around Christmas time. It coincided with her top canines finally coming through. She had a cold, which progressed into an ear infection, and she had this dreadful persistent dry cough, which then progressed into a dreadful productive wet cough. You knew she was really sick because she was extremely cuddly and lethargic. Since around that time, her sleep has gone completely to hell. We've had some really bad nights where she'll wake up after a couple of hours of going down for bed, or for a while, she was reliably waking up at 4am and taking a good couple of hours to settle back down. Lately she's been sleeping through again, but waking up at 6am instead of the usual 7-7:30am. We bought a clock that changes colour at programmable times, so we're trying to train her that if she wakes up and the clock isn't green yet, she should try and go back to sleep. Not a huge amount of success there yet. Christmas itself was good, but fairly quiet because Zoe was sick. Sarah managed to get a fabulous photo with Santa, which just fills me joy every time I look at it. We had some friends around for Christmas dinner, and Zoe vomited all over her new Cabbage Patch Kid doll and I think she threw up a couple more times between that day and the day after, so that wasn't much fun. She's becoming more and more independent. "Zoe do it" is the most frequent thing out of her mouth, but fortunately she still accepts help as well. We've also been getting plenty of sneak previews of the Terrible Twos. Fortunately they're pretty short-lived, but it's definitely going to be a challenge to my patience. We'd been intending to keep Zoe rear-facing in the car until she was 2, which is the current recommendation over here, but I caved in recently when she was getting in the car and refusing the sit down (she'd stand up facing forwards and it was next to impossible to rectify the situation). After she did this to me a few times when I took her out in the car, I had enough and turned the car seat around. It's improved things a bit, but she still has her moments. We also changed her day care, from the one day a week at a home day care, to two days a week at a commercial place. We were becoming more and more unhappy with the existing day care, and so decided to move her. It's a lot more money, but after just a week, we were seeing a noticeable change (for the better) in Zoe's response to going to day care, and she seemed to have picked up a bunch of new skills as well (sitting crossing her legs, holding a crayon like a pencil). The place she's in now is pretty new and very shiny. There's a couple of kids in her class that she knows from the local park, so overall it's looking like money well spent and definitely a change for the better. Zoe had her first hair cut last weekend, and it was fairly uneventful. We went to this cute place in Palo Alto called Snipits, which was ludicrously expensive and I'd only ever take Zoe there for her first haircut. There was another kid there who was screaming bloody murder, and I think that unsettled Zoe more than anything else, so she was a bit uncomfortable to start with, but once the hairdresser put an Elmo DVD on, it was all good. Sarah's Mum is coming over to visit for a couple of weeks in a couple of weeks time, so Zoe will be very happy to see her Nana. They're going to go on a cruise out of New Orleans down to Mexico and part of the Caribbean. Unfortunately I'm too busy at work at the moment to burn a week, so I'll just take a four-day weekend and check out New Orleans with them when they get back from the cruise.

Lisandro Dami&aacute;n Nicanor P&eacute;rez Meyer: The license mess with serial port Qt-based libs

I am currently working on a Qt-based app that needs to communicate through the serial port. Apart from all the benefits that a normal lib with a serial port implementation will bring in this case, having a Qt-based serial port lib would make even more sense, as it should be as multiplatform as possible and use the signal/slot mechanism. Also it should have a DFSG-compatible license, so I can package it for Debian, of course :-)

So I have found two libs which seemed to have the above mentioned features: QExtSerialPort and QSerialPort.

QExtSerialPort seems to be the most recommended lib in the web. It features polled and signal-based functionality; it uses Qt's standard types inheriting QIODevice. But it does not states the license in any file within the source code. The original project page at SourceForge says it's in public domain. And the newer project page at Google code says it's under the new BSD license. I have asked in the mailing list for a clarification. So far nothing has changed (although in further threads the authors showed some willing to change this). And then I got to the point of finding a bug, but I don't want to spend time to track it down and make a patch without a clear license.

QSerialPort it's another lib with more or less the same features as QExtSerialPort. It's main LICENSE file says it's under the LGPL2, but licensecheck will say that the present files are LGPL3. Also, on reviewing the code, I found some minor stuff that could be improved. Well, I could contact the author and see if [s]he would receive the patches... but his site seems down. And I could not find a real-person's name in the code so far :-/

So I made a last attempt to try to get QExtSerialPort in a suitable license. If it doesn't suceed, I think I'll have to start writing one myself. The downside: I only use Linux, so there will be no multiplatform features unless someone else contributes it. Of course, if you have another option or any idea to share, I'll be happy to know it :-)

By the way, this should be my first post on Planet Debian in english, so hello planet!

Joey Hess: more on ghc filename encodings

My last post missed an important thing about GHC 7.4's handling of encodings for FileName. It can in fact be safe to use FilePath to write a command like rm. This is because GHC internally uses a special encoding for FilePath data, that is documented to allow "arbitrary undecodable bytes to be round-tripped through it". (It seems to do this by encoding the undecodable bytes as very high unicode code points.) So, when presented with a filename that cannot be decoded using utf-8 (or whatever the system encoding is), it still handles it, and using the resulting FilePath will in fact operate on the right file. Whew! Moral of the story is that if you're going to be using GHC 7.4 to read or write filenames from a pipe, or a file, you need to arrange for the Handle you're reading or writing to use this special encoding too. I use this to set up my Handles:
import System.IO
import GHC.IO.Encoding
import GHC.IO.Handle
fileEncoding :: Handle -> IO ()
fileEncoding h = hSetEncoding h =<< getFileSystemEncoding
Even if you're only going to write a FilePath to stdout, you need to do this. Otherwise, your program will crash on some filenames! This doesn't seem quite right to me, but I hesitate to file a bug report. (And this is not a new problem in GHC anyway.) If I did, it would have this testcase:
# touch "me "
# LANG=C ghc
Prelude> :m System.Directory
Prelude System.Directory> mapM_ putStrLn =<< getDirectoryContents "."
me*** Exception: <stdout>: hPutChar: invalid argument (invalid character)
Since git-annex reads lots of filenames from git commands and other places, I had to deal with this extensively. Unfortunatly I have not found a way to read Text from a Handle using the fileSystemEncoding. So I'm stuck with slow Strings. But, it does seem to work now.
PS: I found a bug in GHC 7.4 today where one of those famous Haskell immutable values seems to get well, mutated. Specifically a [FilePath] that is non-empty at the top of a function ends up empty at the bottom. Unless IO is done involving it at the top. Really. Hope to develop a test case soon. Happily, the code that triggered it did so while working around a bug in GHC that is fixed in 7.4. Language bugs.. gotta love em.

Stefano Zacchiroli: fosdem 2012

In less then 2 hours I'll leave for the Paris Nord station to catch a train headed to Bruxelles Midi. Plan of the week-end: attend and enjoy FOSDEM 2012!. I haven't submitted any talk for this year FOSDEM edition, but I've been invited (and gladly accepted) to join the round table on working with contributor communities on Sunday. I'm positive it will be a nice occasion to share ideas on how to structure local user groups around the world. Beside that, I plan to attend several talks of the cross-distribution, legal issues devrooms, hang around the Debian booth, as well as discuss many topics with people and friends from all over the Free Software multiverse. Too bad I'm still recovering from a recent minor health issue; I won't be able to get the most out of today's beer event. But I'll attend nonetheless, see you there?

Russell Coker: A Computer Conference on a Cruise Ship

After LCA [1] there was a discussion about possible locations for future conferences, most of the messages in the discussion were jokes or suggestions that don t seriously apply to LCA. So I ll add my suggestion for conferences other than LCA. I ve previously written generally about the issue of conferences at sea [2]. I don t think that LCA would be suitable for running at sea because delegates have specific expectations for LCA which are quite different to what a cruise ship can offer, so I don t think it makes sense to change LCA which is working well as it is. However there are lots of other possible computer conferences which could suite a cruise ship. Price Price is a major factor in running a conference, so obviously getting a cheap cruise price is very important. Here is a link for Vacations To Go which shows cruises from the Australia/NZ region which are of at least 5 nights and cost no more than $800 [3]. The cheapest entry at this moment is $609 for 5 nights and the cheapest on a per-night basis is an 8 night cruise for $779. The cheapest cruise currently on offer which allows a conference similar to LCA is 7 nights for $699. The prices should be regarded as rough approximations as some cruises have some mandatory extra fees and the prices are quoted in US dollars and subject to currency fluctuations. Note that those prices are for dual-occupancy cabins, this can be a double or a twin configuration. Some cruise ships have cabins for 3 or 4 people that are cheaper, but if you have a cabin for a single person then the rate is almost the same as for having two people. The price for LCA accommodation including breakfast was $78 per night for a single room or $92 for a double room. Then lunch cost a minimum of $10 and for dinner there was $80 for the penguin dinner and probably about $20 for dinner every other night. That gave an overall cost for a 6 night stay (which is probably the minimum for someone who lives further away than Melbourne) in Ballarat of 6*78+6*10+5*20+80==$708. For a double room that would be 6*92+6*10+5*20+2*80==$872. Even if we don t count the fact that the Australian dollar is worth more than the US dollar it is obvious that on the basis of accommodation and food two people sharing a twin cabin on a cruise ship could pay LESS than two people in single rooms at the Ballarat University dorms! Now sharing a cabin isn t so great, but the upside is that cruise ships have excellent food and lots of other entertainment options. I previously reviewed the food on the Dawn Princess and determined that it s better than the food I would expect to get if I spent the cost of the cruise on dinner at land based restaurants [4]. I have been led to believe that the use of ship conference facilities is typically free for any organisation that books a sufficient number of cabins. So there s no reason why the conference admission fees should be any greater than for a land based conference. Advantages A common problem with conferences is finding suitable dining options. Most people want to eat with other delegates but finding restaurants that have sufficient space and which are conveniently located is difficult at best and often impossible. On a cruise ship everything is within a short walk and the restaurants are big, usually be at least one restaurant will hold 500 people. The fact that you have to reserve times for the Main Dining Room makes it more difficult to miss one s colleagues. Everything on a cruise ship is luxurious. There are lots of good locations for BoFs, pools, cafes, restaurants, and bars. Basically the ship is filled with comfortable places for groups of people to sit down. A cruise ship typically has a main theater with more than 700 seats more than large enough for most conferences I ve attended. It s common for the size of a conference to be limited to the size of the main theater that is used, for a cruise ship this will probably be less of a problem than for most other conference venues. Disadvantages The first disadvantage of running a computer conference on a cruise ship is the almost total lack of net access. The costs for net access are more expensive than most delegates will pay. Probably many delegates would check their email but it wouldn t be practical for people to download source code, browse Wikipedia, and use the Internet in other ways related to the conference. It would be practical to have mirrors of Wikipedia, the source of several distributions of Linux, and other big things of common interest. Another possible problem is the fact that you need to book it well in advance to avoid the risk of selling out (there is no option to stay at a different hotel). An established conference with financial backing could just pay to reserve the cabins. But when starting a new conference this could be a problem. Alcohol is rather expensive on cruise ships. But getting really drunk isn t compatible with learning about computer science anyway. Finally the requirement to have at least two people in a cabin for good rates is a serious issue. The upside of this is that people travelling with their SO would find that it works really well (regardless of whether the SO is a delegate or not). But anyone who s not travelling with their SO and doesn t want to share with a friend will have to either pay a lot more or skip the conference. Conclusion I think that there is a good potential for running a computer conference around the Australia/NZ region on a cruise ship. It won t be overly expensive for delegates and the facilities that are provided are good. The trade-off for solitary travelers of having to share a cabin (or pay more) for getting much better food and leisure facilities will be appreciated by many people (and admittedly hated by some). Some people won t appreciate the option of swimming, but even if you consider the cruise ship to be just a floating collection of restaurants and cabins it s still fairly luxurious and beats the heck out of most conferences I ve attended. If you are considering the possibility of running a conference then I think that a cruise ship should be considered. VacationsToGo.com is the best site I ve found for cheap cruise prices, their large group department has experience handling groups of more than 500 people so I think that anyone who wants to run a new conference in/around Australia should give them a call. Also cruise ships travel around the world, so the same thing can be done in other countries but at a different time of year. The economic factors will differ by country though. Cruise ships probably aren t a cheap option for a conference in some other countries. Related posts:
  1. My First Cruise A few weeks ago I went on my first cruise,...
  2. Cruises It seems that in theory cruises can make for quite...
  3. Creating a Micro Conference The TEDxVolcano The TED conference franchise has been extended to...

Next.

Previous.