debian

Introduction

Some times, I'm not happy with the Debian's default configuration for some packages, like sudo. That's why I need to rebuild some packages, and put them in a Debian Repository.

TODO

Repository

At the moment I write this document, debpool is only available in experimental, that's why you need to add the following line to sources.list :

deb http://ftp.uk.debian.org/debian/ ../project/experimental main

Then, do :

# apt-get update
# apt-get install install debpool devscripts dupload

Debpool

Now, it's time to configure Debpool.

/etc/debpool/Config.pm

package DebPool::Config;
$Options{'archive_dir'} = '/mnt/debian';
$Options{'db_dir'} = "$Options{'archive_dir'}/db";
$Options{'db_dir_mode'} = 0770;
$Options{'db_file_mode'} = 0660;
$Options{'dists_dir'} = "$Options{'archive_dir'}/dists";
$Options{'dists_dir_mode'} = 0775;
$Options{'dists_file_mode'} = 0664;
$Options{'incoming_dir'} = "$Options{'archive_dir'}/incoming";
$Options{'incoming_dir_mode'} = 01775;
$Options{'installed_dir'} = "$Options{'archive_dir'}/installed";
$Options{'installed_dir_mode'} = 0755;
$Options{'installed_file_mode'} = 0644;
$Options{'pool_dir'} = "$Options{'archive_dir'}/pool";
$Options{'pool_dir_mode'} = 0755;
$Options{'pool_file_mode'} = 0644;
$Options{'reject_dir'} = "$Options{'archive_dir'}/reject";
$Options{'reject_dir_mode'} = 0750;
$Options{'reject_file_mode'} = 0640;
$Options{'lock_file'} = "$Options{'archive_dir'}/.lock";
$Options{'compress_dists'} = 0;
$Options{'dists'} = {
    'stable' => 'sarge',
    'testing' => 'etch',
    'unstable' => 'sid',
    'experimental' => 'experimental'
};
$Options{'sections'} = [ 'main', 'contrib', 'non-free' ];
$Options{'archs'} = [ 'i386', 'sparc' ];
$Options{'gpg_bin'} = '/usr/bin/gpg';
$Options{'gpg_home'} = '/home/asyd/.gnupg';
$Options{'gpg_keyrings'} = [ 'uploaders.gpg' ];
$Options{'gpg_sign_key'} = undef;
$Options{'gpg_passfile'} = '/home/asyd/.gnupg/passphrase';
$Options{'log_file'} = '/home/asyd/.debpool/DebPool.log';
1;

As you can see, I just edit few lines, and uncomment lot of others. Now, just run debpool in order to create the skeleton directories. I just modified the umask.

dupload

dupload is a small script to upload packages to the repository's server, its configuration is very simple as you can see :

package config;
$cfg{'asyd'} = {
        fqdn => 'debian.asyd.net',
        method => "ftp",
        incoming => '/incoming',
        login => 'debian',
        dinstall_runs => 1,
};
        # The dinstall on ftp-master sends emails itself
        # files pass on to dinstall on ftp-master which sends emails itself
$delay = ($ENV{DEBDELAY} || 7);
1;

Building packages

debuild

I use the following line to build my packages :

# debuild -rfakeroot -sa -uc -us

Finally, I just do :

# cd ..
# dupload --to asyd

Resume