Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 195 lines (149 sloc) 5.654 kb
aab5928 @jozef chroot set-up
authored
1 =head1 NAME
2
3 SettingUpBuildSystem - How to set-up a chrooted build system
4
5 =head1 create lenny base
6
814daf1 @jozef updated the setting up build system
authored
7 debootstrap lenny /var/tmp/let32 http://ftp.at.debian.org/debian/
8 mount -o bind /proc /var/tmp/let32/proc
9 chroot /var/tmp/let32 su -
10 echo let32 > /etc/debian_chroot
11 apt-get update
12 apt-get install sudo
aab5928 @jozef chroot set-up
authored
13 adduser b &&echo 'b ALL=(ALL)NOPASSWD: ALL' >> /etc/sudoers
14 exit
814daf1 @jozef updated the setting up build system
authored
15 chroot /var/tmp/let32 su - b
66f5e28 @jozef more build notes, added mass-build script
authored
16 sudo apt-get install libapt-pkg-perl
aab5928 @jozef chroot set-up
authored
17 sudo apt-get install libyaml-perl libyaml-syck-perl libtext-diff-perl liblist-moreutils-perl
18 sudo apt-get install libfile-slurp-perl libtest-exception-perl libtest-differences-perl
19 sudo apt-get install libjson-xs-perl libmoose-perl libfile-chdir-perl
20 sudo apt-get install libpath-class-perl libtest-deep-perl libreadonly-perl
21 sudo apt-get install libfile-find-rule-perl libfile-homedir-perl libio-compress-bzip2-perl
66f5e28 @jozef more build notes, added mass-build script
authored
22
814daf1 @jozef updated the setting up build system
authored
23 sudo cpan
24 # o conf connect_to_internet_ok yes
25 # o conf commit
aab5928 @jozef chroot set-up
authored
26
27 sudo cpan -i CPAN::Patches::Plugin::Debian Debian::Apt::PM
28
29 sudo apt-get install debootstrap
30
31 sudo chown b /var/cache/apt/apt-pm/*
17b30f3 @jozef using two patch-set folders
authored
32 sudo bash -c 'echo "deb http://pkg-perl.alioth.debian.org/~jozef-guest/pmindex/ lenny main contrib non-free" >> /etc/apt/sources.list'
aab5928 @jozef chroot set-up
authored
33 apt-pm update
34
814daf1 @jozef updated the setting up build system
authored
35 sudo chown b /var/lib/dh-make-pm /var/lib/cpan-patches/
aab5928 @jozef chroot set-up
authored
36
37 cd /var/lib/cpan-patches/
814daf1 @jozef updated the setting up build system
authored
38 rmdir debian-set
17b30f3 @jozef using two patch-set folders
authored
39 sudo git clone git://github.com/jozef/CPAN-Patches-Debian-Set.git debian-set
aab5928 @jozef chroot set-up
authored
40
814daf1 @jozef updated the setting up build system
authored
41 sudo bash -c 'echo "deb http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
42 sudo bash -c 'echo "deb-src http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
43 sudo bash -c 'echo -e "Package: *\nPin: release a=stable\nPin-Priority: 700\n\nPackage: *\nPin: release a=testing\nPin-Priority: 600\n" >> /etc/apt/preferences'
aab5928 @jozef chroot set-up
authored
44 sudo apt-get update
814daf1 @jozef updated the setting up build system
authored
45 sudo apt-get install -t testing dh-make-perl debhelper
66f5e28 @jozef more build notes, added mass-build script
authored
46 sudo apt-get install -t testing xvfb po4a quilt dpatch cdbs build-essential cowdancer dpkg-dev
aab5928 @jozef chroot set-up
authored
47
814daf1 @jozef updated the setting up build system
authored
48 ######
49 # probably not, backport those
aab5928 @jozef chroot set-up
authored
50 cd /tmp
51 svn co svn://cvs.alioth.debian.org/svn/pkg-perl/trunk/dh-make-perl
52 cd dh-make-perl
53 perl Build.PL && ./Build manifest && ./Build distmeta
54 sudo apt-get install libmodule-depends-perl libwww-mechanize-perl libfile-touch-perl
55 sudo cpan -i Array::Unique Email::Date::Format autodie Module::CoreList File::DirCompare Text::Diff
56 perl Build.PL && ./Build test && sudo ./Build install
57
814daf1 @jozef updated the setting up build system
authored
58 =head2 create cowbuilder for lenny
aab5928 @jozef chroot set-up
authored
59
814daf1 @jozef updated the setting up build system
authored
60 sudo debootstrap lenny /var/cache/pbuilder/base.cow
66f5e28 @jozef more build notes, added mass-build script
authored
61 sudo bash -c 'echo "127.0.0.1"' > /var/cache/pbuilder/base.cow/etc/hosts'
aab5928 @jozef chroot set-up
authored
62 sudo bash -c 'echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /var/cache/pbuilder/base.cow/etc/apt/sources.list'
63 sudo bash -c 'echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /etc/apt/sources.list'
64 cd /var/cache/pbuilder/result/
65 sudo chown b .
66 wget http://github.com/jozef/Debian-Apt-PM/raw/master/examples/repo/Makefile
67 wget http://github.com/jozef/Debian-Apt-PM/raw/master/examples/repo/Release.conf
814daf1 @jozef updated the setting up build system
authored
68 mkdir -p unstable/unsorted
69 vim Release.conf
aab5928 @jozef chroot set-up
authored
70 # generate a key without passphrase
71 gpg --gen-key
72 gpg --export --armor | sudo apt-key add -
73 gpg --export --armor | sudo chroot /var/cache/pbuilder/base.cow/ apt-key add -
74 make
75 sudo apt-get update
76
77 sudo chroot /var/cache/pbuilder/base.cow su -
78 echo build > /etc/debian_choot
79 apt-get update
80 apt-get install cowdancer
81 exit
82
83 sudo bash -c 'echo "BINDMOUNTS=/var/cache/pbuilder/result" >> /etc/pbuilderrc'
84 sudo bash -c 'echo "PDEBUILD_PBUILDER=cowbuilder" >> /etc/pbuilderrc'
814daf1 @jozef updated the setting up build system
authored
85 sudo cowbuilder --update
86
87 =head2 backport for packaging
88
89 sudo chroot /var/cache/pbuilder/base.cow/
90 bash -c 'echo "deb http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
91 bash -c 'echo -e "Package: *\nPin: release a=stable\nPin-Priority: 700\n\nPackage: *\nPin: release a=testing\nPin-Priority: 600\n" >> /etc/apt/preferences'
92 apt-get update
93 exit
94
95 cd /tmp
96 apt-get source dpkg
97 cd dpkg-*
98 pdebuild
99 cd /var/cache/pbuilder/result/; make new-package all
100
101 cd /tmp
102 cd apt-get source debhelper
103 cd dh-make-perl-*
104 pdebuild
105 cd /var/cache/pbuilder/result/; make new-package all
106
107 libtool
108 gettext
109 autoconf
110 m4
111 libdb4.7-dev
112
113 cd /tmp
114 cd apt-get source xz-utils
115 cd xz-utils-*
116 # needs autoconf >= 2.64
117 vim debian/control
118 pdebuild
119 cd /var/cache/pbuilder/result/; make new-package all
120
121 cd /var/cache/pbuilder/result/
122 mv unstable/unsorted unstable/for-build
123 mkdir unstable/unsorted
124 make all
125
126 base-files
127
128 # remove testing
129 vim /var/cache/pbuilder/base.cow/etc/apt/sources.list
130 mv /var/cache/pbuilder/base.cow/etc/apt/preferences /var/cache/pbuilder/base.cow/etc/apt/preferences.old
131
132 sudo cowbuilder --update
133
134
135 =head2 backport perl
136
137 coreutils
138 libdb4.7-dev # Build-Depends: coreutils (>= 8.5)
139 perl
140
66f5e28 @jozef more build notes, added mass-build script
authored
141 =head2 backport libs/utilites
142
143 quilt
144 libxml2
145 libxslt1.1 # vim debian/control and add ^^^ version of libxml2
146 libxml-libxml-perl
147 libxml-libxslt-perl
148
149 # apache
150 apr
151 libdb4.8
152 apr-util
153 openssl
154 apache2
155 libapache2-mod-perl2
156
814daf1 @jozef updated the setting up build system
authored
157 =head2 dh-make-pm
158
159 # not needed? sudo apt-get install apt-file
160 # sudo apt-file update
161
162 cd && mkdir src && cd src
163 svn co svn://cvs.alioth.debian.org/svn/pkg-perl/trunk/dh-make-perl
164 cd dh-make-perl
165 wget http://github.com/jozef/Debian-Apt-PM/raw/master/patches/FromCPAN.pm.patch
166 patch -p1 < FromCPAN.pm.patch
167 perl Build.PL && ./Build test && sudo ./Build install
168
66f5e28 @jozef more build notes, added mass-build script
authored
169 =head2 start building
170
171 =head3 build first
172
814daf1 @jozef updated the setting up build system
authored
173 Test::Simple
174 Module::Build
66f5e28 @jozef more build notes, added mass-build script
authored
175 Module::CoreList
176
177
178 # for Class::MOP
179 Test::Output
180 Test::LeakTrace
181 SUPER
182
183 # for POE
184 POE::Test::Loops
185
186 # misc
187 Test::Kwalitee
188 Test::Portability::Files
189
190 =head3 then mass build
191
192
aab5928 @jozef chroot set-up
authored
193
194 =cut
Something went wrong with that request. Please try again.