Search Results: "dpk"

5 June 2008

Adrian von Bidder: Irony ...

Errors were encountered while processing:
 debian-policy
E: Sub-process /usr/bin/dpkg returned an error code (1)
(I haven't looked closer yet, but I had to laugh.)

4 June 2008

Juan Luis Belmonte: update-nsswitch issues to fix. never things are as quick as we think they will


Yesterday, excited, I’ve packed up libnss-ldap with the tool and a “quick & dirty” postinst script. I’ve packaged it not as a final version, even I’m not brave enough to check it with Linitan :) , But It doesn’t really matter, now I’m not worrying about the correction of the package. This is just a quick solution to test how the tool update-nsswitch works in a real environment. well… dpkg -i libpam-libnss-260.deb YEAH, It doesn’t work!!! Why? some Troubles have been found on our update-nsswitch.pl
  • - Cannot recognize and manage, when you try to use a DB that it doesn’t exist in the local nsswitch.conf
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Here is a really common nsswitch.conf. If you use the tool calling it for updating the database (e.g sendmailvars) with the source (ldap) in the last position. The database doesn’t exist as seen above. Finish with non result without errors.
  • When using an “after” or “before” source to determine the position of our new source, the pattern “match too much”. What’s that? If we have two sources with the pattern as part of its name, we have a trouble.
This is just an example, files3 and filesauth, are not a valid or real sources
hosts: files dns files3 filesauth
If we try to update the hosts database positioning ldap before files
update-nsswitch –database=hosts –before=files –add ldap
The result is.
hosts: ldap files dns ldap files3 ldap filesauth
  • If we use an “after” or “before” source that it doesn’t exist at the line, it doesn’t do anything.
This condition will include that source in a default action that will be to be the last source on the line. After this propably the tool will be 99.9% working. Except if any of my fixes make something buggy, this afternoon will be finished and tested, into the package we were talking about before. Probably some issues have to be fixed with the other tool update-pam.d but now the work is to have a polite nsswitch updater and good postinst scripts.

27 May 2008

Stefano Zacchiroli: on maintainer script sizes

Measurnig maintainer scripts LOCs After some discussions which touched them in various (Debian and non-Debian) mailing lists, I got interested in having a closer look to maintainer scripts. The first question I was asking myself is how big they are? . As an absolutely empirical, non-scientific test, I hacked a couple of scripts to graph the distribution of maintainer script lengths (measured as LOCs). I just run them on /var/lib/dpkg/info/*. post,pre inst,rm on my laptop, which contains ATM 3612 scripts. Here is the result: maintscripts.png The obvious (though, I repeat, absolutely empirically obtained) point is that, as expected, most of the scripts are really short, with 1/3 of them being just 7 LOCs. And I guess you can guess (sorry) what the 7 lines are about:
    #!/bin/sh
    set -e
    # Automatically added by dh_makeshlibs
    if [ "$1" = "configure" ]; then
            ldconfig
    fi
    # End automatically added section

dear old debhelper boilerplate. The longest script, not shown properly in the graph due to my low gnuplot karma, is 1905 LOCs (and the winner is: /var/lib/dpkg/info/xserver-xorg.postinst). The shortest scripts are 5 LOCs, but they are structurally equivalent to the 7 LOCs above, sometimes invoking some other idempotent update-bla tool, and sporting less newlines.

17 May 2008

Simon Richter: Solutions

(tl;dr: if you have a few minutes, please add information here) Joss, the problem with the new package formats is that there is nothing that actually uses the additional information in a way that adds significant new functionality, so the net result of the change was that we throw away the information at a different layer in our software stack, and one of the interfaces got a lot more complicated in the process. One possible application would be a "poor man's patch tracking" inside the BTS, perhaps with a new state "fixed in patch". I can see two ways of implementing that:
  1. by extending the interface of the "new" package formats that Debian,Ubuntu bug numbers are attached to the actual patch files and having the archive maintenance software extract and process that information (reject packages that add a patch for a bug without closing it in the changelog, notify the BTS), or
  2. by leaving the package format untouched and simply adding a regex matching "Fixes: #nnnnnn" that is reported to the BTS as "we have added a patch", so the submitter is notified that the bug is gone for him/her; the bug is then closed in the changelog of the upload removing the patch.
The former approach also allows us to link to patches from BTS pages, which the latter doesn't, so there could be actual benefit here if we believe it is worth the additional complexity. (Update: Rapha l thinks it is. I like the idea of a package format with separate patches a lot more in this context than I did without it, but still my fear that it will actually be perceived as sanctioning large patchsets still remains.) About mandatory co-maintenance: the problem isn't "helping". We have plenty of people with commit access to packages they don't even remotely understand who are really helpful (not). The problem is that someone needs to actually read all the commit logs and understand what the changes do in this context. In most cases, that person or group would be upstream, not a DD. My first impression after reading the patch was "adding uninitialized data to the entropy pool is pointless/harmful as it is not random, so this patch makes sense", because the loop around it was not contained in the patch. Obviously I'm not an OpenSSL developer. There is nothing Debian could have done internally to verify the correctness of this patch that would properly scale to the entire archive, even if we put "more emphasis on security". The only solution I see is reporting every patch to upstream immediately and getting affirmation that it is correct. This, however means that we need to produce patches that upstream can accept. For obvious code bugs, that is simple, but for integration patches like paths it is not sufficient to replace one string with another, but rather make it configurable in some place that can be reached from debian/rules. In an ideal world, we end up with very few Debian specific patches, so essentially we are talking about adding functionality to dpkg that we don't want to use. I've started a page in the Debian Wiki, Getting Packaged with an outline of a possible document aimed at upstream developers that should list the typical problems we run into and how to avoid them.

Josselin Mouette: Some lessons to learn

There are obviously some things we need to remind if we don t want something like the OpenSSL debacle to happen again. It doesn t mean we need to throw stones nor to rush into changing our processes without thinking. However, there are already some things that should be obvious but unfortunately are not.
  1. Shipping a giant diff.gz that contains all changes in one, putting security fixes, policy fixes, bug fixes, cosmetic changes and autotools files at the same level, is not something we should accept anymore. Improvements in the dpkg-source format are much welcome in this direction, but they are useless if maintainers don t use them. Neither a VCS nor a build tool will be able to know which line of the changes is related to which bug. Only the maintainer can.
  2. Core packages should all have co-maintainers. This is pretty much stating the obvious, and is much easier said than done. The OpenSSL case is one of the best examples here: Kurt is not one of those who refuses help, but frankly, would you want to maintain that package? Having already maintained packages with messy code, upstreams not understanding at all the needs of a distributor, avalanches of security alerts and randomly-changing ABIs, I can tell you this is no fun like it can be to hack on a desktop environment or a device driver. The only sane reason to do this is that you need the package to work. The only visible result you get from your work is that programs are not randomly crashing.
    I have no magic recipe to propose so that more people help with such packages, and that s where we need to be really innovative. Cross-distribution teams, mandatory co-maintainership on a core package for each DD these (and all ideas I have not heard of) are the experiments we should start now.
  3. Patching bad code leads to unpredictable results. What maintainer of a complex package has not introduced a new bug while trying to fix another one? Even when a piece of code is maintained by uncooperative developers, is not commented, uses arcane variable names or is impossible to understand without having contributed 3 winning entries to the IOCCC, it needs to evolve. And in these cases, it is only a matter of time until such things happen.
    Don t get me wrong: I m not trying to put the blame on upstream here. They have contributed very valuable code to the community and their work helped in the considerable widespread of cryptography. It s just that their code is not enough for our needs. If we can t patch it safely (and I m now convinced we can t), maybe we need to focus on alternatives and help them getting used by crypto-related packages. The code in GnuTLS and NSS is not necessarily better, but most (if not all) patches Debian needs to apply to them are build and portability fixes.
  4. Unless Debian-specific, 1 patch = 1 bug in the upstream tracker. This should be obvious, but given the number of patches that are never forwarded, it doesn t seem so. You should not only give a chance for upstreams to review the patch, but you need them to track it, and you must give them the chance to review it anytime someone else stomps on a similar issue. If upstream does not have a bug tracker, they probably think their software has no bugs. Which means they are not trustworthy, and we go back to point 3.
  5. We need to give more priority to security. Issues in the security team seem now fixed for good and they have been doing an awesome work. There isn t much left to do so that packages are all built with security-hardening features, but it still needs to be done. And there is much more to do so that we can provide out of the box a decent SELinux setup, or, if it turns out unrealistic to do, a decent system hardening setup using another framework. I know the SELinux zealots will jump on their high horses to explain that their framework is better, but the current situation where it is impossible for the average system engineer to setup a Debian-based MAC system is much worse than having a suboptimal setup that already works.
All in all, this incident has a great impact on Debian s image. If we don t react accordingly, adapting our processes and our system to match what our users expect from us and they expect the best they will turn away from us. With very good reasons to do so. Update : It seems OpenSSL does have a bug tracker. Thanks Kurt for pointing me to it.

Patrick Winnertz: cowdancer in unstable - no longer support for stable release?!

Cowdancer is activly developed in debian, that's very nice. it's really a cool tool to build packages for unstable but also for backporting efforts. I'm using it on a daily basis to build debian etch packages of lustre. However three days ago cowdancer stopped working with my etch chroot after an upgrade of my unstable system:
dpkg-source: info: building lustre in lustre_1.6.5~rc3-1.dsc
dpkg-genchanges -S >../lustre_1.6.5~rc3-1_source.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: source only upload (original source is included)
chroot: cannot run command  cowdancer-ilistcreate': No such file or directory
W: cowdancer-ilistcreate failed to run within chroot, falling back to old method
 -> Running in no-targz mode
I: using fakeroot in build.
Current time: Sat May 17 12:18:30 CEST 2008
pbuilder-time-stamp: 1211019510
 -> copying local configuration
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
 -> policy-rc.d already exists
Obtaining the cached apt archive contents
Installing the build-deps
cowdancer: .ilist size unexpected
cowdancer: .ilist size unexpected
Can't open perl script "/usr/bin/dpkg-architecture": Cannot allocate memory
 -> Attempting to satisfy build-dependencies
 -> Creating pbuilder-satisfydepends-dummy package
cowdancer: .ilist size unexpected
cowdancer: .ilist size unexpected
cowdancer: .ilist size unexpected
cowdancer: .ilist size unexpected
cowdancer: .ilist size unexpected
sh: /tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy/DEBIAN/control: Cannot allocate memory
E: pbuilder-satisfydepends failed.
Copying back the cached apt archive contents
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> Copying COW directory
 -> Invoking pbuilder
 -> Cleaning COW directory
Command /bin/sh -c pdebuild "--pbuilder" "cowbuilder" "--" "--basepath" "/var/cache/pbuilder/etch.cow" failed

After some research I found that a change of cowdancer (something related to .ilist) is responible for this issue. After that I asked on #debian-devel if someone else had this problem and were told that removing an re-creating the chroot will help. But that results in the same error msg. After that I decided to wrote a bugreport against cowdancer, since this is in my eyes a major defect in this software to do not support the latest stable release. I filled this report as RC Bug and got very fast a answer:
severity 481344 wishlist
retitle 481344  provide cowdancer etch backport
[ ... ]

I think this is the wrong way to fix a problem in unstable with a backport of a software. Providing a fallback for older debian releases would be the better way. Is anybody else having this problems?

16 May 2008

Daniel Leidert: /usr/lib/python2.3 garbage

Yesterday I stumbled about files and dead symlinks left in /usr/lib/python2.3/site-packages/ on my Sid box. These files/symlinks seem to have been shipped/created(?) by:
python-ldap python-cairo python-crypto kiki python-foomatic python-mysqldb
python-logilab-common python-egenix-mxtools python-numarray python-pygresql
python-imaging-sane python-imaging python-xml python-reportlab
Deleting /usr/lib/python2.3 (dpkg -S didn’t show any package relationship nor did I find something in /var/lib/dpkg/info/) and reinstalling the above mentioned packages did not recreate the files/symlinks. So it seems the directory can be safely removed. Maybe I missed some announcement or one (or more) packages need to be fixed. No time to examine it atm. Update This is known as Debian bug #409390. Thanks to Josselin Mouette for the information.

13 May 2008

Zak B. Elep: OpenSSL Ouch

I won't repeat it here, but there's DSA-1571-1 waiting for your attention, especially if you made some material out of openssl over the last couple of years or so. Yes, you read it right: COUPLE. Upgrading to the new OpenSSL is easy. Generating new keys is another story. To save (or add to, depending on how you handle this) your pain, there is a simple checker that can currently see if your OpenSSH or OpenVPN public keys are weak enough to warrant replacement. I await a version that can handle X.509 certificates too (though I only just generated a new one today, before the announcement, so that means I have to do it again (and get its CSR to CACert for signing, etc.) And yeah, if you're running openssh-server, consider regenerating your host RSA and DSA keys, e.g.:
# mv /etc/ssh/ssh_host_ dsa,rsa _key* /some/place/else
# dpkg-reconfigure -plow openssh-server
That should regenerate your keys and restart openssh-server once the new keys are installed to /etc/ssh. The hard part (of making sure all the keys of your systems are updated and tested) is still up to you, however. UPDATE: The Debian wiki has up-to-date information regarding other packages that generate SSH/SSL keys at postinst. Please refer to that while the key-rollover page isn't up yet. UPDATE 2: openssh-server is updated (with corresponding DSA-1576-1) that is linked to the updated OpenSSL library. Be sure to upgrade! The new package also pulls in openssh-blacklist, a new package that contains the database needed by the new ssh-vulnkey for checking SSH public keys.

10 May 2008

Joerg Jaspert: The annoyance continues: Ftpmaster, yet again

Lalala, it’s me again. Don’t shout, it’s not a long post! :) What did we do since I last dared to post with my Ftpmaster head on? (Yes, I should put a summary of all my blog posts into a Bits from mail sometime.) Comments: 2

9 May 2008

Jose Luis Rivas Contreras: libtorrent 0.12.2 and rtorrent 0.8.2 available in debs

They're not yet available in the official debian mirror but at least in mine they are. You can download the i386 debs from my repo, my deb-repo (using experimental suite!) for apt-get install or make you own using the apt-get repo with apt-get source. Another easy way is to do:
dget --build http://debian.ghostbar.ath.cx/libtorrent/0.12.2-1/libtorrent_0.12.2-1.dsc
dpkg -i libtorrent*.deb
dget --build http://debian.ghostbar.ath.cx/rtorrent/0.8.2-1/rtorrent_0.8.2-1.dsc
dpkg -i rtorrent*.deb
Enjoy them! :)

27 April 2008

Lior Kaplan: Why does Ubuntu puts Firefox transalation in gnome s language pack ?


The other day, Tomer from Mozilla Israel contacted me to update me that the Israeli Ubuntu community changes the Firefox translation and doesn’t contribute the changes back. We sorted out the translation process with the Ubuntu people who were very open for comments. After that, Tomer mentioned he sees the changed translation in Hardy. I searched for the mozilla-firefox-locale-he-il with the right version, but it seems that package is still for Firefox 2. I checked the firefox-3.0 package itself to make sure the translations aren’t there, and indeed it only contains the en_US locale. Tomer told me he still sees the Hebrew translation but “dpkg -l grep firefox” doesn’t give up any other related packages. Tomer started to search his file system for the missing files, and I started to check out packages’ contents trough packages.ubuntu.com (well, I don’t run Ubuntu…). The files were found, and it seems they are part of the language-pack-gnome-he-base package. This sound very odd to me:
  1. Why link between GNOME and Firefox? (and while doing so, leaving out Tunderbird)
  2. What about people running Kubuntu? They probably won’t have GNOME installed.
  3. The package description says that it doesn’t include the Mozilla translations:
    Please note that you should install language-support-he to get full support for this language (spell checkers, OpenOffice and Mozilla locale packages, etc.).
  4. This change creates an broken upgrade path so it doesn’t support people upgrading from Firefox 2 to Firefox 3 in Ubuntu keeping their locale, as the firefox locale package doesn’t get updated, and doesn’t pull the new package.
  5. These packages were introduced about 1 week before the Hardy release. I would expect such a change be done in an earlier stage of the release…
I thought about starting to report bugs about a few of these issues, but it would be better to first hear what other people think about this.

Jose Luis Rivas Contreras: Now libtorrent works in NSLU2!

I hope someone will upload it to experimental by the moment and see how works, in the meanwhile you can find it here. Goes to experimental because is the unstable branch of libtorrent/rtorrent.Want the debs? Then do:
$ dget http://debian.ghostbar.ath.cx/libtorrent/0.12.1-1/libtorrent_0.12.1-1.dsc
$ dpkg-source -x libtorrent_0.12.1-1.dsc
$ cd libtorrent-0.12.1; dpkg-buildpackage -rfakeroot
You'll end with two debs, enjoy them :)

26 April 2008

Craig Sanders: Keeping apt archives empty or not.

In this post, Steven Hanley wonders how to keep /var/cache/apt/archives empty on a machine that has a full mirror of debian on it. That’s actually the wrong question. The right question is ‘Why is /var/cache/apt/archives even relevant on a machine with a full mirror of debian?’ /etc/apt/sources.list has always supported file:/ URLs. for example, sources.list on my local debian mirror looks like this:
deb file:/home/ftp/debian unstable main contrib non-free
deb file:/home/ftp/debian-multimedia/ unstable main
With a file URL, apt-get doesn’t need to download any packages, and thus doesn’t need to cache anything in /var/cache/apt/archives. No need to keep it empty, it just is empty. In a related post, Andrew Pollock suggests adding DPkg::Post-Invoke “apt-get clean”; ; to /etc/apt/apt.conf. That would be fine if you ONLY ever ran “apt-get update ; apt-get dist-upgrade”. It’s not fine if you run “apt-get -d” to download packages first, then install a few packages with “apt-get install package”, and then run “apt-get dist-upgrade”. If you try that, then the DPKG::Post-Invoke rule will clean out /var/cache/apt/archives when you install the individual package(s). When you then run the dist-upgrade, apt-get will have to download all the packages again. Better just to get into the habit of running apt-get clean or autoclean occasionally when you want to reclaim some disk space. Syndicated from Craig Sanders' Errata: Miscellaneous Thoughts Keeping apt archives empty…or not.

22 April 2008

Andrew Pollock: [debian] On keeping /var/cache/apt/archives empty

Steven Hanley was pondering how to keep /var/cache/apt/archives empty on the mirror that I help administer. This sounds vaguely similar to mounting the /usr filesystem read-write at the start of an APT run and read-only again at the end. (A practice I used to believe in, but due to various package upgrades making /usr busy for no good reason, and it artificially inflating the maximal mount-count and prematurely causing a fsck at boot, I've discontinued) So, putting
DPkg::Post-Invoke   "apt-get clean";  ;
in /etc/apt/apt.conf (or in a file in /etc/apt/apt.conf.d) ought to do the trick.

Joerg Jaspert: FTPMaster

[Warning, long post ahead. If you aren’t interested in Debian or it’s internals or my work - skip it. :) ] So as you might have read here, I got the delegation of the debadmin AKA FTPMaster group lately. I’ve got some pressure to not accept this delegation, but the response to my blog post about it had been extremely positive, everyone said I should not deny it. Knowing to have such a support within Debian is something I really appreciate, making it worth to spent time on my various jobs. Now, lets take this and write a little about what happened since I gained that extra group: Work I did since then: The above should nicely sum up my work in the past few days. Most of it pretty trivial, but still things that have to be done. I plan to keep doing things, slowly going from the trivial stuff to more complicated ones, but there is lots of stuff ahead. Some ideas, and this is a very incomplete list just from my head, there are tons of things that one could do, include Now, do you have any time to kill? Do you want to help? Some things you could do:

18 April 2008

Wouter Verhelst: Dep-wait parser

One thing that's been bothering me since quite a while is the fact that apt and friends are not very verbose when things go wrong. Usually that's just fine; if a package can't be installed, there isn't much you can do about it anyway. However, for those of us who have to maintain buildd machines, a message like the following is not very helpful:
ome packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
  kdelibs4-dev: Depends: kdelibs4c2a (= 4:3.5.9.dfsg.1-2) but it is not going tobe installed
                Depends: libarts1-dev (>= 1.5.0) but it is not going to be installed
                Depends: libavahi-qt3-dev (>= 0.4) but it is not going to be installed
                Depends: libopenexr-dev (>= 1.2.2-3) but it is not going to be installed
                Depends: libqt3-mt-dev (>= 3:3.3.5) but it is not going to be installed
E: Broken packages
If you're not convinced, let me tell you that the culprit is libopenexr2ldbl. If you've noticed that libopenexr2 is not mentioned anywhere in the above output, you understand why I hate this. Usually, figuring out this stuff requires you to manually walk the dependency tree, which is silly. So today, I finally spent some time to sit down and write a couple of perl scripts to help me with that:
wouter@country:~/code/perl$ ./cache-packages Packages 
Reading data... done (20492 packages). Closing cache... ready. Have a nice day!
wouter@country:~/code/perl$ ./check-dep-waits 
kdelibs4-dev
checking dependencies of kdelibs4-dev
 checking dependencies of kdelibs4c2a (= 4:3.5.9.dfsg.1-2)
   checking dependencies of kdelibs-data (>> 4:3.5.9.dfsg.1)
[... copious output snipped ...]
  checking dependencies of  libopenexr2ldbl (>= 1.2.2)
libopenexr2ldbl is not available in any version
So, there. Obviously the "Packages" file in the first command line above came from a Debian mirror. The "cache-packages" script writes a file "~/.packages-dbm", which contains an MLDBM tiehash of all the packages, indexed on package name. If you have no clue what that means, just remember that it parses the Packages file into something my laptop can load in a split-second rather than requiring 45 seconds to open and parse the Packages file. Once you've ran that, you can call 'check-dep-waits' as many times as you want, that is, until the Packages file is outdated and you need to download a new one. The second command will just sit and wait. On the first line, you give it a piece of Depends: information, and it will parse that and see whether the dependency can be resolved. There's a lot of output; but given how I want to verify dependencies, I thought I'd rather have too much than too little information. If there are version numbers involved, this script will call dpkg --compare-versions to do the actual verification, so I don't have to watch policy for any possible changes, which is helpful; but it does mean that it'll only work on a Debian machine. The code is available for download at http://comp.uter.be/perl-Packages, FTWCA buildds. Update: While on the train, I realized that I'd totally forgotten about virtual packages. That's now been fixed; if you downloaded the code before, you may want to re-fetch it...

15 April 2008

William Pitcock: How NOT to switch from x86 to amd64 Debian

The following script, or any script like it will not work. Do not waste your time and end up hosing your box like I did today:
#!/bin/bash
echo "==> installing cdebootstrap"
apt-get install cdebootstrap
echo "==> reticulating splines"
dpkg -l   cut -f3 -d' ' >> /tmp/packages.installed
pkg= cat /tmp/packages.installed   xargs 
pkg= echo $pkg   sed -e 's#bunch of crap elided here##g' 
echo "==> installing libc6-amd64"
apt-get install libc6-amd64
echo "==> installing base system"
cdebootstrap -a amd64 lenny /
for pkg in $pkg; do
echo "==> reinstalling $pkg"
apt-get install --reinstall --force-yes $pkg
done
Don’t let this happen to you. I had the pleasure of discovering that Bacula was not properly backing up my MySQL databases. What an excellent way of finding out.

9 April 2008

Neil Williams: emdebian-tools 0.9.4 uploaded to Emdebian

Where, oh, where do I start with this one??
$ parsechangelog   wc
97 644 4793

97 lines, 644 words just for the changes in this version and some quite important and far-reaching. I have to try and summarise somewhere, so:
  1. dpkg-dev (>1.14.17) support

  2. New debconf question to identify the targetsuite

  3. Drop-in lintian support for cross-built Emdebian packages

  4. emchain support for a uClibc toolchain built on a glibc/gcc toolchain

  5. Require a genuine Debian environment for building

Some detail from the changelog
emdebian-tools (0.9.4) unstable; urgency=low

For the full list, see the changelog and emdebian manpages.

6 April 2008

Neil Williams: Installing packages just built with svn-buildpackage

CVS has a nice cvs-debi so I've now got a shell one-liner that can do the same for SVN:
$ dcmd ls $(eval find ../build-area/ -name '*.changes' grep $(eval parsechangelog grep Version cut -d' ' -f2)) grep '.deb$' xargs sudo dpkg -i
Run from the working directory of the package (usually trunk/), it ensures that you get the version-you-just-built, gets just the .debs and installs all of them.
I can feel a shell alias coming along...

5 April 2008

Francois Marier: Encrypted swap partition on Debian/Ubuntu

The swap partition can hold a lot of unencrypted confidential information and the fact that it persists after shutting down the computer can be a problem.

Encrypting a swap partition however is slightly tricky if one wants to also support suspend-to-disk (also called hibernation). Here's a procedure that worked for me on both Debian Lenny and Ubuntu 7.10 (Gutsy Gibbon):

0- Install the cryptsetup package:
apt-get install cryptsetup
1- Setup the encrypted partition as root:
swapoff -a
cryptsetup -h sha256 -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/hda2
cryptsetup luksOpen /dev/hda2 cswap
mkswap /dev/mapper/cswap
2- Add this line to /etc/crypttab:
cswap /dev/hda2 none swap,luks,timeout=30
3- Set the swap partition to be this in /etc/fstab:
/dev/mapper/cswap none swap sw 0 0
4- Configure uswsusp to use /dev/mapper/cswap and write unencrypted data
dpkg-reconfigure -plow uswsusp
You will of course want to replace /dev/hda2 with the partition that currently holds your unencrypted swap.

(This is loosely based on a similar procedure for Ubuntu 6.10.)

Next.

Previous.