This is my Debian page.

Since March 2009, I'm running Debian squeeze on my main workstation.

Since March 2010, I'm running Debian squeeze on my Dell Latitude 2100 netbook.

6to4 init script

Here is a script I wrote for a Debian-style /etc/init.d that configures a 6to4 IPv6 tunnel.

Dependencies:

irssi-notify

This script is based on http://extern.tribut.de/irssi-notify (linked from http://thorstenl.blogspot.com/2007/01/thls-irssi-notification-script.html?showComment=1174835100000#c1681311296903415398). It makes notifications on your desktop when you get messages in irssi. I fixed the link handling, added comments to the sed script, and used portable character classes in the regular expressions. Put fnotify.pl in ~/.irssi/scripts/ and do /script load fnotify. Now all hilights in irssi will be logged to ~/.irssi/fnotify.

#!/bin/bash
# Run this script in the background from the machine you want
# notifications to appear on: irssi-notify &
# Load the script fnotify.pl in irssi.

ssh -f irssi-server "tail --lines=10 $HOME/.irssi/fnotify; > $HOME/.irssi/fnotify; tail --follow $HOME/.irssi/fnotify" |
    sed --regexp-extended --unbuffered "
        s/(.)&/\1\&/g; # replace characters with HTML entities
        s/</\&lt;/g;
        s/>/\&gt;/g;
        s%(#?:alpha:+ )&lt;([^>]{0,10})&gt;%\1<b>\2</b> %g # bold the channel
        s%(https?://[^ ]+)%<a href=\"\1\">\1</a>%g; # make clickable links
        s%([\w+-]+@[^ ]+\.?:alpha:{1,3})%<a href=\"mailto:\1\">\1</a>%g;" |
    while read heading message
    do
        notify-send --hint=int:transient:1 --category=im.received --expire-time 5000 --icon /usr/share/openclipart/png/computer/icons/flat-theme/applications/ksirc.png -- "${heading}" "${message}"
    done

Dependencies:

debconf

Make it so all questions are asked: sudo dpkg-reconfigure debconf and answer lowest priority.

disable console beep

modprobe -r pcspkr
echo blacklist pcspkr >> /etc/modprobe.d/blacklist.conf

Set 'bell-style' to 'none' in /etc/inputrc.

setterm -blength 0

See also

Rebuilding Debian packages

This is just my local, condensed version of Raphaël Hertzog's article Howto to rebuild Debian packages.

  1. apt-get source ntp
  2. sudo apt-get build-dep ntp
  3. Make changes to package (or not). If changes were made, use dch --local foo to record a changelog entry and increase the version.
  4. debuild
  5. dput local whatever.changes or just install the resulting deb with gdebi.

Local Debian package repository

Here is how I created a local Debian package repository, also called an archive, using mini-dinstall.

~/.mini-dinstall.conf

[DEFAULT]
architectures = all, amd64
archivedir = ~/repo
archive_style = flat
generate_release = 1
release_signscript = ~/bin/sign-release.sh
[squeeze]
alias = stable

Run mini-dinstall --batch to initialize the repository.

~/bin/sign-release.sh

#!/bin/bash
# -*- coding: utf-8 -*-
# Based on Sample script to GPG sign Release files
# Copyright © 2002 Colin Walters <walters@debian.org>
# License: GPLv2
set -e
KEYID=0xc9b912d5
rm -f Release.gpg.tmp
gpg --default-key "$KEYID" --detach-sign -o Release.gpg.tmp "$1"
mv Release.gpg.tmp Release.gpg

Now gpg --armor --export 0xc9b912d5 | sudo apt-key add - to get APT to trust the local repository.

~/.dput.cf

[local]
method = local
run_dinstall = 0
post_upload_command = mini-dinstall --batch
incoming = ~/repo/mini-dinstall/incoming

Run dput local pkg.changes to upload the package to the repository.

~/.devscripts

DEBUILD_DPKG_BUILDPACKAGE_OPTS="-k0xC9B912D5 -sa"
DSCVERIFY_KEYRINGS="~/.gnupg/pubring.gpg"

sources.list entries

deb file:///home/kenyon/repo squeeze/
deb-src file:///home/kenyon/repo squeeze/

Now after a sudo aptitude update you should be able to install packages from the local repository.

References

External links