Coding a new BitTorrent tracker?
The BitTorrent protocol works with trackers, that track the clients or peers that share a given file. This is one specific design of a peer-to-peer protocol, very appropriate for official distribution: for instance, Debian runs a tracker for distributing the installation images.
Wrapper to use su as sudo (or sudo as su)
Classified in : Homepage, Debian, Command line
The problem
Some programs require root privileges for part of their work: most notably Debian building tools such as dpkg-buildpackage or pdebuild. So, several command can be used to obtain real or fake root privileges: su, sudo, fakeroot, etc. Among them, su is quite distinct, because it only takes a quoted command to pass it to a shell. That is why its interface is completely incompatible with the others':
$ su -c "pbuilder --build package.dsc" $ sudo pbuild --build package.dsc
This is annoying when real root privileges are needed, for instance by pbuilder, a tool to build Debian packages inside a minimal chroot. Indeed, in such a case I only know one command to obtain the root privileges, sudo, and some people (read: me) prefer using su.
PGP signatures with trust and verification level
Classified in : Homepage, Debian, To remember
Identity checks and trust
The OpenPGP web of trust is composed of keys linked to each other by two things:
- identity checks: signing a key means that you verified the link between a key with user IDs, an official identity document with a photograph, and a person with a face;
- trust: on your public key ring, you manually decide who you trust to correctly check other people's identity.
With these two pieces of information, GnuPG is able to determine whether or not the key of someone you never met can trusted to belong to its alleged owner.
Signatures
Signing a key is usually a binary action: either you sign it or you do not sign it. Thus your signature on a key will give other people a rough identity check information and no trust information at all.
In fact, the OpenPGP standard does allow to publish precise identity check and trust information on signatures, but unfortunately this is now enabled with GnuPG by default. These features are called certification level and trust signatures.
Uninstalling a single component of a meta-package
Classified in : Homepage, Debian, Command line, To remember
Or how to get rid of Evolution without removing your whole system
There is a complain I have heard several times from people after they installed Debian: “I use Icedove/Thunderbird so I do not need Evolution: I tried to remove it but this would remove my whole system, that sucks!”
cpio > tar
Classified in : Homepage, Debian, Miscellaneous
tar and cpio
tar(5) and cpio(5) are two competing archive formats, that provide almost identical features. Both are streamed formats, originally designed to be used on tapes. Their major practical difference is the style of their standard command line utilities:
cpio(1)
takes the list of files to archive on its standard input, allowing a very high control but requiring to use another utility such asfind(1)
to archive an entire tree;tar(1)
usually takes the list of file to archive on its command line, and browses directories recursively be default.