Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2012-07-17 15:41:55
Size: 6
Editor: ?Alexander Pashaliyski
Comment:
Revision 5 as of 2012-07-18 06:15:27
Size: 4954
Editor: ?Alexander Pashaliyski
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
test #language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~||<style="text-align: right;border: 0px hidden"> (!) [[/DebianWannaBuildInfrastructureDiscussion|Discussion]]||
----

## If your page gets really long, uncomment this Table of Contents
<<TableOfContents(2)>>

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

== Setting up a Buildd ==

INSTALL buildd

http://kmuto.jp/open.cgi?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
}}}
The schroot's configuration file:
{{{
[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
{{{
  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



---- Note ----
this file:
/var/lib/buildd/build/SBUILD-GIVEN-BACK
contains packages that will be skipped because the've already failed

---- 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
root@debian:~# cat buildd
INSTALL buildd

http://kmuto.jp/open.cgi?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>

  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

  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. apt-get install buildd sudo

3. Patching buildd
# patch buildd.patch



---- Note ----
this file:
/var/lib/buildd/build/SBUILD-GIVEN-BACK
contains packages that will be skipped because the've already failed

---- 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

Translation(s): none

(!) ?Discussion


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

Setting up a Buildd

INSTALL buildd

http://kmuto.jp/open.cgi?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

The schroot's configuration file:

[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

                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


Note


this file: /var/lib/buildd/build/SBUILD-GIVEN-BACK contains packages that will be skipped because the've already failed


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 root@debian:~# cat buildd INSTALL buildd

http://kmuto.jp/open.cgi?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> 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
    • 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. apt-get install buildd sudo

3. Patching buildd # patch buildd.patch


Note


this file: /var/lib/buildd/build/SBUILD-GIVEN-BACK contains packages that will be skipped because the've already failed


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