]> TLD Linux GIT Repositories - tld-builder.git/blob - doc/README.bin-builder
- PLD merge, fully (re)TLDized
[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 repoistory 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$ su - builder
51 bin-builder$ gpg --import < th-src.asc
52
53 2. generate new key for bin builder and import it to src builder so it can
54    accept spool/notify messages
55
56 3. import that public key to src builder keyring
57 bin-builder$ gpg --gen-key
58 bin-builder$ gpg --export KEYID --armor > th-i686.asc
59 src-builder$ gpg --import < th-i686.asc
60  
61 ssh keys
62 ~~~~~~~~
63
64 generate key on bin builder and add it to authorized_keys of ftp account
65
66 i.e account where you push your uploads:
67 [th-i686]
68 ftp_url = scp://fpldth@ep09.pld-linux.org:ftp/.tree/.incoming/i686/
69
70 bin-builder$ ssh-keygen
71 bin-builder$ ssh-copy-id -i .ssh/id_rsa.pub fpldth@ep09.pld-linux.org
72
73 buildlogs
74 ~~~~~~~~~
75 buildlogs are copied with rsync. ask buildlogs.pld-linux.org admin to allow your ip
76 also you need to setup password that is used to authenticate in rsync-passwords
77
78 sudo access
79 ~~~~~~~~~~~
80 make sure builder user (who runs crons) can sudo chroot to the chroots:
81 builder ALL=(ALL) NOPASSWD: /usr/sbin/chroot /home/users/builder/chroot-th *
82
83 testing
84 ~~~~~~~
85
86 keep /var/lib/pld-builder/spool/log running with tail -f
87 run the cronjobs under builder account.