]> TLD Linux GIT Repositories - tld-builder.git/blob - doc/README.bin-builder
- from https://github.com/pld-linux/pld-builder.new
[tld-builder.git] / doc / README.bin-builder
1 new bin builder setup
2
3 packages and chroot
4 ~~~~~~~~~~~~~~~~~~~
5 1. install pld-builder from th repoeistory on target host
6
7 2. create chroot /srv/chroot
8 (you can symlink to real dest for the sake of copy-paste from here)
9 mkdir -p /srv/chroot
10
11 - if you're using rpm < 4.5-29, make system rpmdb linked to target rpmdb, as
12   rpm gets it all very messy. see LP#395177.
13 mv /var/lib/rpm{,-host}
14 ln -s /srv/chroot/var/lib/rpm /var/lib/rpm
15 install -d /srv/chroot/var/lib/rpm
16 rpm -r /srv/chroot --initdb
17
18 therwise it's just:
19 rpm -r /srv/chroot --initdb
20
21 - install distro gpg key as default th config packages are signed and sign verify enabled in config:
22 rpm -r /srv/chroot --import /etc/pki/rpm-gpg/PLD-*.asc
23
24 - setup minimal /dev
25 install -d /srv/chroot/dev
26 cp -a /dev/{full,null,random,urandom,zero} /srv/chroot/dev
27
28 - install vserver-packages, but as it is usually hidden, so you must unhide it
29   with --noignore:
30 poldek -r /srv/chroot -u vserver-packages -Q --noignore
31
32 - install pld-builder-chroot from th repos
33 poldek -r /srv/chroot -u pld-builder-chroot -Q --sn th --sn th-ready
34
35 - make rpmdb readable for builder user
36 chmod -R a+rX /srv/chroot/var/lib/rpm
37
38 - setup /srv/chroot/etc/resolv.conf so if you enter manually you can work with poldek
39 cat /etc/resolv.conf > /srv/chroot/etc/resolv.conf
40
41 - restore rpmdb hack
42 rm -f /var/lib/rpm
43 mv /var/lib/rpm{-host,}
44
45 gpg keys
46 ~~~~~~~~
47 1. import src builder key to bin builder so it can download queue.gz
48
49 src-builder$ gpg --export builder-th-src@pld-linux.org --armor > th-src.asc
50 bin-builder$ gpg --import < th-src.asc
51
52 2. generate new key for bin builder and import it to src builder so it can
53    accept spool/notify messages
54
55 3. import that public key to src builder keyring
56 bin-builder$ gpg --gen-key
57 bin-builder$ gpg --export KEYID --armor > th-i686.asc
58 src-builder$ gpg --import < th-i686.asc
59  
60 ssh keys
61 ~~~~~~~~
62
63 generate key on bin builder and add it to authorized_keys of ftp account
64
65 i.e account where you push your uploads:
66 [th-i686]
67 ftp_url = scp://fpldth@ep09.pld-linux.org:ftp/.tree/.incoming/i686/
68
69 bin-builder$ ssh-keygen
70 bin-builder$ ssh-copy-id -i .ssh/id_rsa.pub fpldth@ep09.pld-linux.org
71
72 buildlogs
73 ~~~~~~~~~
74 buildlogs are copied with rsync. ask buildlogs.pld-linux.org admin to allow your ip
75 also you need to setup password that is used to authenticate in rsync-passwords
76
77 sudo access
78 ~~~~~~~~~~~
79 make sure builder user (who runs crons) can sudo chroot to the chroots:
80 builder ALL=(ALL) NOPASSWD: /usr/sbin/chroot /home/users/builder/chroot-th *
81
82 testing
83 ~~~~~~~
84
85 keep /var/lib/pld-builder/spool/log running with tail -f
86 run the cronjobs under builder account.