Search Results: "dpk"

26 March 2010

Jan Hauke Rahm: I got to get a life, I guess

I just had a nice talk with dpkg, yeah right, the bot The cracy thing is, that conversation made the most sense of my day. So, here it goes: 23:50 <jhr> hi!
23:50 <dpkg> hi
23:50 <jhr> how are you?
23:50 <dpkg> pretty good. how about you?
23:50 <jhr> I suppose it s going well
23:51 <dpkg> i haven t a clue
23:51 <jhr> how would you? it s my life!
23:51 <dpkg> I give up, what is it?
23:51 <jhr> oh, busy? I m sorry, didn t wanna annoy you
23:51 <dpkg> I don t know, could you explain it?
23:52 <jhr> uhh annoyance well, that s like when you have a girl friend that always just talks about makeup, you know?
23:52 <dpkg> You are person #2 to send an unparseable request
23:52 <jhr> oh, you already know my girl friend?
23:52 <dpkg> I resemble that remark!
23:52 <jhr> fuck yeah
23:52 <dpkg> wish i knew
23:52 <jhr> oh well, let s cut to the chase
23:53 <dpkg> no idea
23:53 <jhr> but I do
23:53 <dpkg> no idea
23:53 <jhr> why aptitude?
23:53 <dpkg> aptitude has more advanced conflict/dependency resolution and will often find a solution where apt-get gives up. It can be used from the command line like apt-get plus an interactive resolver makes it much easier to recover from broken dependencies. It has advanced search capabilities (see <aptitude search>).
23:53 <jhr> I see
23:53 <dpkg> I see, said the blind man.
23:53 <jhr> haha
23:53 * dpkg laughs!! that s funny jhr!
23:53 <jhr> you re weird
23:53 <dpkg> wish i knew
23:54 <jhr> thanks a lot!
23:54 <dpkg> my pleasure

Colin Watson: Thoughts on 3.0 (quilt) format

Note: I wrote most of this before Neil Williams' recent comments on the 3.0 family of formats, so despite the timing this isn't really a reaction to that although I do have a couple of responses. On the whole I think I agree that the Lintian message is a bit heavy-handed and I'm not sure I'm thrilled about the idea of the default source format being changed (though I can see why the dpkg maintainers are interested in that). That said, as far as I personally am concerned, there is a vast cognitive benefit to me in having as much as possible be common to all my packages. Once I have more than a couple of packages that require patching and benefit from the 3.0 (quilt) format as a result, I find it in my interest to use it for all my non-native packages even if they're patchless right now, so that for instance if they need patches in the future I can handle them the same way. It's not unheard of for me to apply temporary patches even to packages I actively maintain upstream, so I don't discount those either. I haven't decided what to do with my native packages yet; unless they're big enough for bzip2 compression to be worthwhile, there doesn't seem to be much immediate advantage to 3.0 (native). Anyway, on to the main body of this post: I've been one of the holdouts resisting use of patch systems for a long time, on the basis that I felt strongly that dpkg-source -x ought to give you the source that's actually built, rather than having to mess around with debian/rules targets in order to see it. Now that the 3.0 (quilt) format is available to fix this bug, I felt that I ought to revisit my resistance and start trying to use it. Migrating to it from monolithic diffs is of course a bit more work than migrating to it from other patch systems, so it's taken me a little while to get round to it. I'd been thinking about holding off until there was better integration with revision control (e.g. bzr looms), as I feel that patch files really ought to be an export format, but I eventually decided that I shouldn't let the perfect be the enemy of the good. I have enough experience with co-maintaining packages that use build-time patch systems to be able to compare my reactions. After experimenting with a couple of small packages, I moved over to the deep end and converted openssh a few weekends ago, since quite a few people have requested over the years that the Debian changes to openssh be easier to audit. This was a substantial job - over 6000 lines of upstream patches - but not actually as much work as I expected. I took a fairly simplistic approach: first, I unapplied all the upstream patches from my tree; then I ran bzr di interdiff -q /dev/stdin /dev/null >x, reduced it to a single logically-discrete patch, applied it to a new quilt patch using quilt fold, and repeated until x was empty. This was maybe an hour or two of work, and then I went through and tagged all the patches according to DEP-3, which took another few hours. After the first pass, I ended up with 38 patches and a much clearer idea of what has been forwarded upstream and what hasn't; I currently have 5 patches to forward or eliminate, down from 18. Good things: Bad things: On the whole I'm satisfied with this, and the benefits definitely outweigh the costs. Thanks to the dpkg team for all their work on this!

25 March 2010

Colin Watson: Thoughts on 3.0 (quilt) format

Note: I wrote most of this before Neil Williams' recent comments on the 3.0 family of formats, so despite the timing this isn't really a reaction to that although I do have a couple of responses. On the whole I think I agree that the Lintian message is a bit heavy-handed and I'm not sure I'm thrilled about the idea of the default source format being changed (though I can see why the dpkg maintainers are interested in that). That said, as far as I personally am concerned, there is a vast cognitive benefit to me in having as much as possible be common to all my packages. Once I have more than a couple of packages that require patching and benefit from the 3.0 (quilt) format as a result, I find it in my interest to use it for all my non-native packages even if they're patchless right now, so that for instance if they need patches in the future I can handle them the same way. It's not unheard of for me to apply temporary patches even to packages I actively maintain upstream, so I don't discount those either. I haven't decided what to do with my native packages yet; unless they're big enough for bzip2 compression to be worthwhile, there doesn't seem to be much immediate advantage to 3.0 (native). Anyway, on to the main body of this post: I've been one of the holdouts resisting use of patch systems for a long time, on the basis that I felt strongly that dpkg-source -x ought to give you the source that's actually built, rather than having to mess around with debian/rules targets in order to see it. Now that the 3.0 (quilt) format is available to fix this bug, I felt that I ought to revisit my resistance and start trying to use it. Migrating to it from monolithic diffs is of course a bit more work than migrating to it from other patch systems, so it's taken me a little while to get round to it. I'd been thinking about holding off until there was better integration with revision control (e.g. bzr looms), as I feel that patch files really ought to be an export format, but I eventually decided that I shouldn't let the perfect be the enemy of the good. I have enough experience with co-maintaining packages that use build-time patch systems to be able to compare my reactions. After experimenting with a couple of small packages, I moved over to the deep end and converted openssh a few weekends ago, since quite a few people have requested over the years that the Debian changes to openssh be easier to audit. This was a substantial job - over 6000 lines of upstream patches - but not actually as much work as I expected. I took a fairly simplistic approach: first, I unapplied all the upstream patches from my tree; then I ran bzr di interdiff -q /dev/stdin /dev/null >x, reduced it to a single logically-discrete patch, applied it to a new quilt patch using quilt fold, and repeated until x was empty. This was maybe an hour or two of work, and then I went through and tagged all the patches according to DEP-3, which took another few hours. After the first pass, I ended up with 38 patches and a much clearer idea of what has been forwarded upstream and what hasn't; I currently have 5 patches to forward or eliminate, down from 18. Good things: Bad things: On the whole I'm satisfied with this, and the benefits definitely outweigh the costs. Thanks to the dpkg team for all their work on this!

Neil Williams: lintian, source format 3.0 and blog comments

Regarding my previous post on source format 3.0, I think it came across that I was blaming lintian entirely which would be unfair.

(As a side-note, a bug in serendipity XMLRPC resulting in all entries having comments disabled has led to a welcome effect of spreading the discussion more widely than a series of comments on my own site could have achieved. I'm happy with this state of affairs, so it you want to comment, either contact me by private email or put your comments on your own blog. I won't be enabling comments any time soon.)

The extended information behind the lintian warning is one thing (I've explained my position on that to Russ privately) - my main objection is to how such a warning was pushed into lintian and the entire use 3.0 or be damned approach that seems to be being adopted.

IMHO, source format 3.0 is not good enough to be the standard dpkg source format for a simple reason: It offers nothing to well maintained packages. Not all packages need NMU's - ever. Not all packages have patches - ever. Native packages and packages with the Debian maintainer upstream gain nothing from 3.0, as far as I can see.

I have 67 source packages - after much very careful consideration, I have found that a handful of those (less than 10) actually benefit from 3.0 and the rest are all unaffected. None of the packages that I will keep on 1.0 have ever had an NMU since I've been maintainer, most are either native or entirely under my sole upstream control. I will decide whether Debian gets a .tar.gz or a .tar.bz2 and although I generally offer both for download where I can, I see no reason to adopt .tar.bz2 as my default for Debian packaging.

Adding a redundant directory and file is obnoxious. I fail to see why debian/source-format would not have been perfectly suitable. Nevertheless, I will do what is necessary to avoid 3.0 until there is a compelling technical reason to adopt it.

The imperative for those in favour of 3.0 is to convince me that there is a reason TO change, not to make it difficult for me NOT to change. I do not need any reason to avoid 3.0 other than I do not have a good enough reason to move from 1.0. Making developers feel like luddites or incompetent merely because the proponents of 3.0 have failed to convince others to move to 3.0 is just insulting. You want me to use 3.0? Explain why I should bother - the current "reasons" on the Wiki page are simply not good enough and any rehash of those will be ignored. Come up with something new or respect my decision and let me get on with more important stuff.

Gerfried Fuchs: dpkg source format 3.0

Ben Hutchings writes:
You are missing the point - debian/source/format allows you to make it explicit that the source format is 1.0, if you want to stick with that.
You are missing the point - the planned switch of the default format isn't considered a good approach by quite some people. If something new gets introduced, switching to it should be done in wake manner. Other tools do that too, so why can't a central package as dpkg use that approach? I especially want to mention that a point release update for stable was required to get it working in stable like it should.

24 March 2010

Neil Williams: Ignoring lintian nagging

The new lintian addition "missing-debian-source-format" is starting to remind me of a pestering nanny.

I use source format 3.0 only where I see a technical benefit and that - so far - is restricted to packages that use a .tar.bz2 upstream and one or two with really tricky patching requirements. It is literally one or two as well - out of 67 source packages which I maintain (more than some of those nagging me to change).

Packages for which I am upstream and all my native packages will stick with source format 1.0 - because there is no technical reason to migrate. Packages where I'm not upstream but which continue to use .tar.gz and have minimal or absent patching needs will also stay with 1.0 indefinitely. (I can't see how dpkg can drop 1.0 support, even after multiple stable releases after Squeeze.)

I've no interest in being side-tracked into a pointless "discussion" with those who have already made up their minds that nobody could possibly think that 3.0 is unwelcome or uninteresting. Nagging me won't help - I don't consider 3.0 worth using and I see no technical reasons to adopt it blindly.

22 March 2010

Wouter Verhelst: N900 back!

So, a short while ago, the battery of my N900 had run flat. As in, completely, utterly flat. In itself, that's no big deal -- you connect it to a power outlet, wait until it's gone past the low-battery charging bits, then boot and use as usual. Except that it wouldn't. I'd recently installed a firmware update from Nokia (which contained some bug fix that I really was waiting for), and now the bloody thing wouldn't boot. Rather than do the low-battery charging dance, it thought the battery had enough power that it could just go ahead and boot. Of course it was wrong, so whenever I powered it on, it would sit there fore 30 seconds, try to boot, fail, power off for about a second, and start over. I left it like that for a night, but it didn't recharge. Needless to say, that was quite annoying. So I sent it in for repair, and today there was a package in the mail, containing my (repaired) N900. They'd reflashed it. A reasonable course of action, I guess, but of course that meant all data was gone. Good thing it has a backup application, and good thing I stored those backups on an external micro-SD card. Restoring those back-ups was a breeze; they'd also stored the contents of sources.list and have done something akin to "dpkg --get-selections", since now the application manager kindly asks me whether I wish to reinstall the applications that I had installed. Cute. At any rate, I'm very happy I finally got rid of this awful Samsung "cellphone". It's a SGH-C140 that I had as a replacement until my N900 got back, but there was something very very wrong with it; I don't know whether it's a design flaw or just a wear-and-tear issue (these replacement phones aren't usually handled in the best possible way), but it managed to lose connection to the network every once in a while. So people who would call me would immediately get my voicemail, and then they'd be angry with me later because I was unavailable. Well, duh. Anyway, that's over now. Whee.

16 March 2010

Russell Coker: Starting with KVM

I ve just bought a new Thinkpad that has hardware virtualisation support and I ve got KVM running. HugePages The Linux-KVM site has some information on using hugetlbfs to allow the use of 2MB pages for KVM [1]. I put vm.nr_hugepages = 1024 in /etc/sysctl.conf to reserve 2G of RAM for KVM use. The web page notes that it may be impossible to allocate enough pages if you set it some time after boot (the kernel can allocate memory that can t be paged and it s possible for RAM to become too fragmented to allow allocation). As a test I reduced my allocation to 296 pages and then increased it again to 1024, I was surprised to note that my system ran extremely slow while reserving the pages it seems that allocating such pages is efficient when done at boot time but not so efficient when done later. hugetlbfs /hugepages hugetlbfs mode=1770,gid=121 0 0 I put the above line in /etc/fstab to mount the hugetlbfs filesystem. The mode of 1770 allows anyone in the group to create files but not unlink or rename each other s files. The gid of 121 is for the kvm group. I m not sure how hugepages are used, they aren t used in the most obvious way. I expected that allocating 1024 huge pages would allow allocating 2G of RAM to the virtual machine, that s not the case as -m 2048 caused kvm to fail. I also expected that the number of HugePages free according to /proc/meminfo would reliably drop by an amount that approximately matches the size of the virtual machine which doesn t seem to be the case. I have no idea why KVM with Hugepages would be significantly slower for user and system CPU time but still slightly faster for the overall build time (see the performance section below). I ve been unable to find any documents explaining in which situations huge pages provide advantages and disadvantages or how they work with KVM virtualisation the virtual machine allocates memory in 4K pages so how does that work with 2M pages provided to it by the OS? But Hugepages does provide a slight benefit in performance and if you have plenty of RAM (I have 5G and can afford to buy more if I need it) you should just install it as soon as you start. I have filed Debian bug report #574073 about KVM displaying an error you normally can t see when it can t access the hugepages filesystem [6]. Permissions open /dev/kvm: Permission denied
Could not initialize KVM, will disable KVM support One thing that annoyed me about KVM is that the Debian/Lenny version will run QEMU instead if it can t run KVM. I discovered this when a routine rebuild of the SE Linux Policy packages in a Debian/Unstable virtual machine took an unreasonable amount of time. When I halted the virtual machine I noticed that it had displayed the above message on stderr before changing into curses mode (I m not sure the correct term for this) such that the message was obscured until the xterm was returned to the non-curses mode at program exit. I had to add the user in question to the kvm group. I ve filed Debian bug report #574063 about this [2]. Performance Below is a table showing the time taken for building the SE Linux reference policy on Debian/Unstable. It compares running QEMU emulation (using the kvm command but without permission to access /dev/kvm), KVM with and without hugepages, Xen, and a chroot. Xen is run on an Opteron 1212 Dell server system with 2*1TB SATA disks in a RAID-1 while the KVM/QEMU tests are on an Intel T7500 CPU in a Thinkpad T61 with a 100G SATA disk [4]. All virtual machines had 512M of RAM and 2 CPU cores. The Opteron 1212 system is running Debian/Lenny and the Thinkpad is running Debian/Lenny with a 2.6.32 kernel from Testing.
Elapsed User System
QEMU on Opteron 1212 with Xen installed 126m54 39m36 8m1
QEMU on T7500 95m42 42m57 8m29
KVM on Opteron 1212 7m54 4m47 2m26
Xen on Opteron 1212 6m54 3m5 1m5
KVM on T7500 6m3 2m3 1m9
KVM Hugepages on T7500 with NCurses console 5m58 3m32 2m16
KVM Hugepages on T7500 5m50 3m31 1m54
KVM Hugepages on T7500 with 1800M of RAM 5m39 3m30 1m48
KVM Hugepages on T7500 with 1800M and file output 5m7 3m28 1m38
Chroot on T7500 3m43 3m11 29
I was surprised to see how inefficient it is when compared with a chroot on the same hardware. It seems that the system time is the issue. Most of the tests were done with 512M of RAM for the virtual machine, I tried 1800M which improved performance slightly (less IO means less context switches to access the real block device) and redirecting the output of dpkg-buildpackage to /tmp/out and /tmp/err reduced the built time by 32 seconds it seems that the context switches for networking or console output really hurt performance. But for the default build it seems that it will take about 50% longer in a virtual machine than in a chroot, this is bearable for the things I do (of which building the SE Linux policy is the most time consuming), but if I was to start compiling KDE then I would be compelled to use a chroot. I was also surprised to see how slow it was when compared to Xen, for the tests on the Opteron 1212 system I used a later version of KVM (qemu-kvm 0.11.0+dfsg-1~bpo50+1 from Debian/Unstable) but could only use 2.6.26 as the virtualised kernel (the Debian 2.6.32 kernels gave a kernel Oops on boot). I doubt that the lower kernel version is responsible for any significant portion of the extra minute of build time. Storage One way of managing storage for a virtual machine is to use files on a large filesystem for it s block devices, this can work OK if you use a filesystem that is well designed for large files (such as XKS). I prefer to use LVM, one thing I have not yet discovered is how to make udev assign the KVM group to all devices that match /dev/V0/kvm-*. Startup KVM seems to be basically designed to run from a session, unlike Xen which can be started with xm create and then run in the background until you feel like running xm console to gain access to the console. One way of dealing with this is to use screen. The command screen -S kvm-foo -d -m kvm WHATEVER will start a screen session named kvm-foo that will be detached and will start by running kvm with WHATEVER as the command-line options. When screen is used for managing virtual machines you can use the command screen -ls to list the running sessions and then commands such as screen -r kvm-unstable to reattach to screen sessions. To detach from a running screen session you type ^A^D. The problem with this is that screen will exit when the process ends and that loses the shutdown messages from the virtual machine. To solve this you can put exec bash or sleep 200 at the end of the script that runs kvm. start-stop-daemon -S -c USERNAME --exec /usr/bin/screen -- -S kvm-unstable -d -m /usr/local/sbin/kvm-unstable On a Debian system the above command in a system boot script (maybe /etc/rc.local) could be used to start a KVM virtual machine on boot. In this example USERNAME would be replaced by the name of the account used to run kvm, and /usr/local/sbin/kvm-unstable is a shell script to run kvm with the correct parameters. Then as user USERNAME you can attach to the session later with the command screen -x kvm-unstable . Thanks to Jason White for the tip on using screen. I ve filed Debian bug report #574069 [3] requesting that kvm change it s argv[0] so that top(1) and similar programs can be used to distinguish different virtual machines. Currently when you have a few entries named kvm in top s output it is annoying to match the CPU hogging process to the virtual machine it s running. It is possible to use KVM with X or VNC for a graphical display by the virtual machine. I don t like these options, I believe that Xephyr provides better isolation, I ve previously documented how to use Xephyr [5]. kvm -kernel /boot/vmlinuz-2.6.32-2-amd64 -initrd /boot/initrd.img-2.6.32-2-amd64 -hda /dev/V0/unstable -hdb /dev/V0/unstable-swap -m 512 -mem-path /hugepages -append "selinux=1 audit=1 root=/dev/hda ro rootfstype=ext4" -smp 2 -curses -redir tcp:2022::22 The above is the current kvm command-line that I m using for my Debian/Unstable test environment. Networking I m using KVM options such as -redir tcp:2022::22 to redirect unprivileged ports (in this case 2022) to the ssh port. This works for a basic test virtual machine but is not suitable for production use. I want to run virtual machines with minimal access to the environment, this means not starting them as root. One thing I haven t yet investigated is the vde2 networking system which allows a private virtual network over multiple physical hosts and which should allow kvm to be run without root privs. It seems that all the other networking options for kvm which have appealing feature sets require that the kvm process be started with root privs. Is KVM worth using? It seems that KVM is significantly slower than a chroot, so for a basic build environment a secure chroot environment would probably be a better option. I had hoped that KVM would be more reliable than Xen which would offset the performance loss however as KVM and Debian kernel 2.6.32 don t work together on my Opteron system it seems that I will have some reliability issues with KVM that compare with the Xen issues. There are currently no Xen kernels in Debian/Testing so KVM is usable now with the latest bleeding edge stuff (on my Thinkpad at least) while Xen isn t. Qemu is really slow, so Xen is the only option for 32bit hardware. Therefore all my 32bit Xen servers need to keep running Xen. I don t plan to switch my 64bit production servers to KVM any time soon. When Debian/Squeeze is released I will consider whether to use KVM or Xen after upgrading my 64bit Debian server. I probably won t upgrade my 64bit RHEL-5 server any time soon maybe when RHEL-7 is released. My 64bit Debian test and development server will probably end up running KVM very soon, I need to upgrade the kernel for Ext4 support and that makes KVM more desirable. So it seems that for me KVM is only going to be seriously used on my laptop for a while. Generally I am disappointed with KVM. I had hoped that it would give almost the performance of Xen (admittedly it was only 14.5% slower). I had also hoped that it would be really reliable and work with the latest kernels (unlike Xen) but it is giving me problems with 2.6.32 on Opteron. Also it has some new issues such as deciding to quietly do something I don t want when it s unable to do what I want it to do.

15 March 2010

Brett Parker: Getting twirssi working in Debian Lenny

So, I finally gave in and got my self a twitter account, it is (as one would guess) http://twitter.com/sommitrealweird, me, being me, I hate having to have lots of browser tabs open for things that I should be able to access in my IRC client, with twitter this is even more obvious that an IRC client is better for reading it, lots of short messages that are text, why would you need a browser tab for that? Also it means that I've got a log of the twitter messages and can look when I feel like it. All of my IRC is done from my main virtual machine, which is also my e-mail server and web server, and thus, it's running Debian stable (currently lenny), unfortunately this does not include the Net::Twitter library that twirssi relies on. So, first step first, how much of a PITA would backporting Net::Twitter be... well, I took a look at the dependencies and went "Well, that looks like rather more effort than I want to put in right now", however I then found Net::Twitter::Lite, which you can satisfy the dependencies (well, sortof) in Lenny... they're a few versions out, but they're close... First part was doing :
dh-make-perl --cpan Net::Twitter::Lite
Once that's finished you'll have a Net-Twitter-Lite-blah directory, which in turn contains a debian/ directory, so you can go in there and do:
dpkg-buildpackage -rfakeroot
That should tell you roughly what you're missing etc, from there you can check for the debian packages providing the missing libraries, and what versions they are. Install them and edit Makefile.PL to have the version numbers of the debian packages, you might also need to update debian/control to change some of it's restrictions. Once all that is done, you should have a libnet-twitter-lite-perl package, install that and you're most of the way there. I then cloned the twirssi source, and edited it to use Net::Twitter::Lite rather than Net::Twitter, my source is available via gitweb at http://git.sommitrealweird.co.uk/gitweb?p=twirssi-net-twitter-lite.git;a=summary. To clone do:
git clone git://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/
or
git clone http://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/
Hope that helps someone else out there! If you want my Net::Twitter::Lite package, let me know!

9 March 2010

Martin-&#201;ric Racine: gThumb: thank you for breaking my workflow!

Just a kind thank you note to the gThumb authors for completely breaking my workflow by re-inventing the paradigm used to save imported pictures. Until now, all my pictures landed in a predictable location, using a predictable filename pattern that was easily searchable. Not anymore. Now, files land into my home directory, according to some recursive folder pattern that further complicates searching for files and requires a few more clicks to accomplish. Dammit! Couldn't you at least make this configurable, so that those of us who prefer to retain the old paradigm can?! Note: re-inventing an application's paradigms is always a very bad idea. If you're a software developer who is reading this, please keep it in mind and go scratch your itch to change the world somewhere else. Thank you. Post Scriptum Many thanks to Damon Lynch for pointing me to his own professional picture importer called Rapid. This is an extremely configurable importing tool and, lo and behold, Damon even offers builds for Ubuntu via his PPA! Still, the consequence of this mess is that migrating to Rapid means that I'll be loosing gThumb's simple but extremely efficient editing tools. To me, one strength of gTthumb was this unique combination of picture importing with basic editing tools. Now, I'm forced to split these interconnected tasks, simply because someone chose to completely rethink gThumb's paradigms. I'm of course aware of Gimp's existence, but repeated attempts at mastering it made me conclude that it's entirely the wrong software for my needs and essentially overkill. By contrast, gThumb offers just enough tools to enable someone to crop images to useful sizes and to adjust color balances in easy steps; it does the job without hassle, which is not the case with Gimp. Thinking out loud, it is precisely on days like these that the urge to create my own Linux distribution keeps on coming to mind. Retaining consistent paradigms in the desktop environment and applications that I use, not to mention maintaining the number of duplicate libraries to a bare minimal, has been a constant struggle and, noticing how some developers' urge to re-invent the wheel every other day, using whatever new programming language of the day, persistently takes precedence over keeping system resource consumption to a bare minimum and over preserving user sanity, I'm slowly coming to the conclusion that Free Software has veered way too far into the bazaar and urgently needs a copious amount of cathedral to make it usable for mere mortals again. Some dpkg-based distribution where the only scripting language allowed is Bourne shell and the only programming languages C or C++ comes to mind. Of course, this would also require porting popular application from e.g. Java, Python, etc. which would be a colossal amount of work. Still, I think that the time has come for this to happen. As an added bonus, this would make applications usable again on embedded devices with spartan CPU, RAM and storage resources, so this project could generate huge benefits to the embedded Linux industry. Based on my experience at my previous jobs, I have a rather clear picture (pun intended) of what needs to be done and of who I would hire to make it happen. What I'm missing are investors. Who's with me?

3 March 2010

Wouter Verhelst: dpkg vs RPM

Thomas blogs about some issues he had with his N900's facebook plugin. This post isn't about that, as I don't use facebook. But as part of his blog post, he mentions the following:
This reminded me of a pet peeve I have with those people who claim Debian s packaging system to be far superior to rpm apparently dpkg doesn t have any equivalent of rpm -qv which allows you to verify that the files that should be installed by a package are indeed on disk
True, probably because the script would be so trivial:
for i in $(cat /var/lib/dpkg/info/nbd-client.list)
do
	[ -f "$i" -o -d "$i" ]   echo "$i missing"
done
There, that wasn't hard, was it? Now I'm not sure whether rpm's -qv option actually checks the checksum of the files, too. If it does that, then the semantically similar way would be:
(cd / && md5sum -c var/lib/dpkg/info/nbd-client.md5sums)
... except that MD5 is totally and utterly useless these days, and that we should be changing to something else. And that md5sums is an optional feature, provided by some, but not all, packages. And it may also be that maemo packages don't have md5sums (which would make sense). But, anyway.

2 March 2010

C.J. Adams-Collier: Locale configuration post-Intrepid

I was reminded this morning after a bit of chatter on #debian-cli that my previous write-up on setting one s locale on Ubuntu is out-of-date. Instead of running dpkg-reconfigure locales and selecting your locale, the new incantation is as follows: Magic
$ sudo locale-gen en_US.UTF-8
Environment Variables You ll also want to set some environment variables. Put something like the following in your ~/.bashrc:
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_ALL=en_US.UTF-8
export LANG LANGUAGE LC_CTYPE LC_MESSAGES LC_ALL
You would of course replace en_US.UTF-8 with whichever locale you want to generate.

27 February 2010

Clint Adams: Exposure

With 9cdcabb0a7f7a38b8cd2292a48a98eb4eb5e458d, we are one step closer to having Lua dpkg bindings in the archive.

25 February 2010

Jon Dowland: iPhone Doom

Id Software have released a port of Doom for the iPhone. What makes this exciting for me is the lineage of this code. the iPhone port is derived from prboom. Peeking around in the source code, there's some of my code in there (p_checksum.[ch]) as well as some code I borrowed from dpkg (md5.[ch], thanks to Colin Plumb and Ian Jackson). This stuff is unlikely to actually be run on the iPhone, mind (although I think I have some patches against p_enemy.c which will). John Carmack has some interesting words about developing the app.

18 February 2010

Martin-&#201;ric Racine: Ubuntu/Lucid: recovering from yesterday's messy update

Yesterday a silly oversight in the packaging of udev in Ubuntu/Lucid produced a breakage that consistently makes dpkg barf. Here's a simple command line recipe to recover from it. In your terminal application, type: sudo sed -i 's#copy_exec /lib/udev/firmware.sh#copy_exec /lib/udev/firmware#' /usr/share/initramfs-tools/hooks/udev && sudo dpkg -a --configure && sudo aptitude update && sudo aptitude safe-upgrade ...then press enter. You should be able to resume normal operation right after. PS: as suggested by others, I revised the above snippet to use sed locally, since not everyone has patch installed.

15 February 2010

Julian Andres Klode: Maemo + Moblin = MeeGo = Failure


Today, Nokia and Intel announced the merge of Maemo and Moblin into the MeeGo project. This is sad, because it will end the era of the Debian-based mobile operating system Maemo and replace it with a system using RPM and probably some other evil stuff as well. In fact, dpkg & apt-get where two of my main reasons to buy the N900. And another question is why yet another name. Moblin was already a well-known name and they shouldn t have changed the name just because they switch the servers and add some Nokia developers. Furthermore, does this all mean that there will be no Maemo 6? What will happen to the Maemo users on the N900, will it be possible for them to use MeeGo? Maybe this is the time to start a new project, Debian Mobile. Debian Mobile would take the MeeGo experience and apply it to a Debian system. This would probably the best mobile operating system ever, being backed by Debian s large repositories with thousands of software packages. Filed under: Debian

8 February 2010

Nico Golde: Two weeks with the n900

Two weeks ago I got myself a nokia n900 phone which is running maemo 5. So far I am quite happy with it, given that my previous phone was a sony erricsson p1i which is pretty crappy.
I've taken some notes about my experiences:

Those are the things I came up with while using the phone. The calling functionality and everything which is only phone related really works fine and the sound quality while talking to someone on the phone is also really good. So far I am really happy with the phone and I can only recommend it. I hope I'll have some time to port some applications to maemo soon.

3 February 2010

Cyril Brulebois: G-I, part 2

Getting to X After having prepared a bunch of libraries, the idea was to get X in shape. I d like to thank Julien Cristau very much for his support all along the way, since I knew nothing about X. Basically the plan was to get: Not much to say about the former, it only pulled two additional libraries compared to what was previously udeb-ified: libaudit0 and libselinux1. Since security modules aren t the primary concerns in this exercise, --enable-xselinux quickly became --disable-xselinux and those dependencies went away. Both drivers were trivial to tweak, nothing really worth noting there. Once those 3 additional packages added to localudebs/ and to pkg-lists/local, the mklibs tool really wasn t happy with them during the rebuild of the netboot image, since the drivers are X plugins, meaning they need symbols which aren t defined in other libraries. Example:
No library provides non-weak EventSwapVector
Since the idea is to get something working rather than getting something perfect at once, d-i s packages/mklibs/src/mklibs.py (installed as /usr/bin/mklibs) was told to stop raising an exception, and to print a warning message instead. Rebuilding an image was then working again. It took some time, but finally it got noticed those packages were actually all installed in the initramfs, so there was no need to try and load/install them manually during the installation process, everything was there already, and it was sufficient to switch to VT2 to see the /usr/bin/Xorg binary. Some packages were still needed: xkb-data, and x11-xkb-utils. The latter also pulled libxkbfile1, but well, an additional library doesn t sound very scary. At this point, one has to try and run Xorg. The result was a black screen, and no means of getting back to another terminal, be it inside Qemu or VirtualBox. Troubleshooting X First idea: adding the openssh-server-udeb package to the image, and start sshd from there. But then one has to go through the missing config file, tweaking privilege separation, generating a host key, setting a password, etc. And for whatever reasons, it wasn t possible to access it. That s where the DebianInstaller/NetworkConsole page on the Debian Wiki came into play: it includes a few steps to get a working sshd within d-i, painlessly. So, X was actually starting properly, but getting a black screen is now the default. One wants X -retro to get the well-known old behaviour. From udevadm info --export-db, it looked like input stuff were missing, and indeed, udev-udeb doesn t include /lib/dev/input_id and /lib/udev/rules.d/60-persistent-input.rules. Since scp seems broken, wget from the host did the trick followed by chmod +x for the input_id file, otherwise that doesn t work so well. But still, there were some missing evdev stuff. And indeed evdev wasn t to be seen in lsmod, nor available to be modprobe d. That s where it became a little dirtier: wget and udpkg on mouse-modules-2.6.30-2-amd64-di, followed by depmod to make sure, and then modprobe was OK. A little udevadm trigger run to ensure udev was fully aware of the new situation, and restarting X led to a moving cursor there, as well as a working keyboard, since it was possible to switch between terminals! Prove it! Alright, I m proudly providing you with a screenshot: (Really, I ve never been so happy to see this fracking black-and-grey-grid screen. I kid you not!) If we forget about the very few network-console-related questions answered to get an sshd running, please note that the installation process is still just starting, the very first debconf question is still unanswered. Now, patching udev again so that udev-udeb includes the two mentioned files was almost easy (details aren t important anyway), while pulling evdev.ko module automatically was trivial, just a matter of adding such a line to a packages list (I picked pkg-lists/netboot/amd64.cfg):
mouse-modules-$ kernel:Version 
Which means one can now, out of the box: Next step Rework the Pango/Cairo/Gtk stack to use X11 instead of DirectFB.

1 February 2010

Cyril Brulebois: G-I, part 1

Producing udebs How to patch That s actually quite trivial. Most packages from Josselin s 1st and 2nd lists are libraries, and generating udebs for libraries is easy. Basically it boils down to declaring a new binary package: Now, populating it might depend on the considered source package, but thankfully, pkg-x11 packages are quite sane, using debhelper s dh_install. So duplicating debian/libfooN.install into debian/libfooN-udeb.install is usually sufficient. It s a bit trickier when dh_movefiles is used, but calling install and cp -r after the dh_movefiles call should be sufficient. Next step, tweak shlibs for libfooN. Without that step, a libbarM package built against libfooN would get libfooN in Depends, which is not appropriate. The idea is to get libfooN-udeb instead. Trivial: add --add-udeb=libfooN-udeb to the dh_makeshlibs call. Possible issues at that step: Various checks to perform: Results (These files might be moved around during the following steps, but this post shall be kept up-to-date and point to them at all time.) Legend: Graphs are scaled down to 75%, click for full size. Step 1: Step 2: Adding udebs to a d-i image Basic d-i image General guidelines (see d-i documentation for detailed installation, needed packages, etc.):
svn co svn://svn.debian.org/svn/d-i/trunk/ debian-installer-trunk
cd debian-installer-trunk/installer/build
make build_netboot
If that breaks (e.g. due to missing packages), make sure there s a similar entry in sources.list.udeb:
deb http://yourmirror/debian squeeze main/debian-installer
If everything goes well, the generated image should be available as dest/netboot/mini.iso, and tmp/netboot/udeb.list should contain the list of embedded udebs. To give it a try:
qemu-system-x86_64 -cdrom dest/netboot/mini.iso
Actually adding udebs Drop all additional udebs under localudebs/. Needed Packages and Packages.gz should be generated on the fly (but beware, secure apt is then disabled, even for non-local udebs). Now, tell d-i we want some more packages. If all of them are wanted, one can do that:
for i in localudebs/*.udeb; do \
  dpkg-deb --showformat='$ Package \n' -W $i; \
done > pkg-lists/local
(Update: Thanks to Guillem for pointing out a better and cleaner way than dpkg --info $i grep Package: awk ' print $2 ') Generate a new image (note the rebuild part of the target):
make rebuild_netboot
Make sure they got added by looking in tmp/netboot/udeb.list and profit! What s next Future steps include: Stay tuned.

9 January 2010

Rapha&#235;l Hertzog: Debian related goals for 2010

Here s stuff that I d like to do this year, more or less by decreasing order of importance: All of this probably doesn t fit in my free time (being a father since last month does not help increasing my free time :-) ), so if you re interested in seeing one or more of those projects completed, and if you know some person/company that could sponsor them, get in touch with me! Partagez cet article / Share This

Next.

Previous.