Differences between revisions 13 and 14
Revision 13 as of 2012-07-18 06:45:01
Size: 4367
Editor: ?Alexander Pashaliyski
Comment:
Revision 14 as of 2012-07-18 10:31:23
Size: 4423
Editor: ?Alexander Pashaliyski
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
 In order to build packages, buildd uses sbuild so the first thing we're going to do is install sbuild and its dependencies. In order to build packages, buildd uses sbuild so the first thing we're going to do is install sbuild and its dependencies.
Line 29: Line 29:
The schroot's configuration file:
Line 48: Line 47:
We'll now configure the schroot environment. We'll create two users and edit the sources.list file We'll now configure the schroot environment. We'll create two users and edit the sources.list file (change <distribution> to the name of the distribution you're going to build for).
Line 74: Line 73:


Line 81: Line 77:
contains packages that will be skipped because the've already failed contains packages that will be skipped because the've already failed. There are cases in which you may want to edit or delete it.
Line 89: Line 85:
--------
Line 93: Line 89:
Line 110: Line 105:
Distributions file should content:
Line 121: Line 115:
Create and fill incoming conf file: Create and edit incoming conf file:
Line 125: Line 119:
Incoming file should content:
Line 133: Line 126:
Create and fill options conf file:
Create and edit options conf file:
Line 137: Line 131:
Options file should content:
Line 144: Line 137:
Create and fill uploaders conf file: Create and edit uploaders conf file:
Line 148: Line 141:

Uploaders file should content
Line 154: Line 145:
Then create some other files
Line 166: Line 158:
Line 167: Line 160:
Line 173: Line 165:
To add a package to the repository, use one of these commands: To add a package to the repository, use one of these commands (replace <...> with the name of your package):

This is a step by step tutorial about Build services setup for Wanna-build.

Translation(s): none

(!) ?Discussion


Setup Buildd and Sbuild

INSTALL buildd

0. Installing sbuild In order to build packages, buildd uses sbuild so the first thing we're going to do is install sbuild and its dependencies.

apt-get install sbuild schroot debootstrap

sbuild uses schroot to build packages. We'll create a directory for it and configure sbuild to use it.

mkdir -p /srv/chroot/<distribution>-<architecture>-sbuild
debootstrap wheezy /srv/chroot/<distribution>-<architecture>-sbuild
chown -R buildd:buildd /srv/chroot/<distribution>

Lets configure the chroot:

vim /etc/schroot/schroot.conf

[wheezy]
description=Debian wheezy (testing)
directory=/srv/chroot/wheezy-amd64-sbuild
users=buildd
groups=buildd
root-groups=buildd
aliases=testing,default

Configuring sbuild is explained here: http://wiki.debian.org/sbuild

vim /etc/sbuild/sbuild.conf
sbuild-update --keygen
sbuild-createchroot --keyring=/etc/apt/trusted.gpg --arch=$arch $dist /srv/chroot/$dist-$arch-sbuild $mirror

vim /etc/fstab
mount -a

We'll now configure the schroot environment. We'll create two users and edit the sources.list file (change <distribution> to the name of the distribution you're going to build for).

usersfile=/srv/chroot/<distribution>/root/users
echo "#!/bin/sh" > "$usersfile"
echo "groupadd -g $(id -g buildd) buildd" >> "$usersfile"
echo "useradd -u $(id -u buildd) -g $(id -g buildd) buildd" >> "$usersfile"
echo "groupadd -g $(id -g sbuild) sbuild" >> "$usersfile"
echo "useradd -u $(id -u sbuild) -g $(id -g sbuild) sbuild" >> "$usersfile"
chmod a+x "$usersfile"

chroot /srv/chroot/<distribution>
/root/users
vim /etc/apt/sources.list

1. Disabling sbuild environment filters

vim /usr/share/perl5/Sbuild/Chroot.pm 

2. Install buildd and sudo

apt-get install buildd sudo

3. Patching buildd # patch buildd.patch

This file:

/var/lib/buildd/build/SBUILD-GIVEN-BACK

contains packages that will be skipped because the've already failed. There are cases in which you may want to edit or delete it.


Entropy tip


If while generating gpg-key there's not enough entropy, here's a command that can be useful for generating entropy:

find /usr /var /tmp /opt -type f -print0 | xargs -0 cat > /dev/null


Setup reprepro for local repository

0. Installing reprepro

apt-get install reprepro

1. Creating directories for the repository

mkdir -p /org/ftp.debian.org/ftp/apt/
cd /org/ftp.debian.org/ftp/apt/
mkdir conf dists incoming indices logs pool project

2. Configuring reprepro

cd /org/ftp.debian.org/ftp/apt/conf/
vim distributions

Origin: Alexander Pashaliyski
Label: Alexander Pashaliyski
Codename: wheezy
Architectures: i386 amd64 source
Components: main
Description: Alexander Pashaliyski APT Repository
SignWith: yes

Create and edit incoming conf file:

vim incoming

Name: default
IncomingDir: incoming
TempDir: /tmp
Allow: wheezy wheezy-backports
Cleanup: on_deny on_error

Create and edit options conf file:

vim options

verbose
ask-passphrase
basedir .

Create and edit uploaders conf file:

vim uploaders

allow * by unsigned

Then create some other files

cd ../indices
touch override.wheezy.main
touch override.wheezy.main.debian-installer
touch override.wheezy.main.src
cd ..

3. Generating gpg key

gpg --gen-key

4. Export the repository

reprepro -vb /org/ftp.debian.org/ftp/apt export

5. Adding packages to the repository To add a package to the repository, use one of these commands (replace <...> with the name of your package):

reprepro includedeb wheezy <deb filename>
reprepro includedsc wheezy <dsc filename>

Example:

reprepro includedeb wheezy openssh-client_5.9p1-5_amd64.deb
reprepro includedsc wheezy eglibc_2.13-32.dsc