Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated the setting up build system

  • Loading branch information...
commit 814daf1a24294853691088167859b3c29b967bf4 1 parent 32bb4d6
Jozef Kutej authored July 16, 2010

Showing 1 changed file with 94 additions and 17 deletions. Show diff stats Hide diff stats

  1. 111  lib/Debian/Apt/PM/SettingUpBuildSystem.pod
111  lib/Debian/Apt/PM/SettingUpBuildSystem.pod
Source Rendered
@@ -4,20 +4,26 @@ SettingUpBuildSystem - How to set-up a chrooted build system
4 4
 
5 5
 =head1 create lenny base
6 6
 
7  
-	debootstrap lenny /var/tmp/let64 http://ftp.at.debian.org/debian/
8  
-	mount -o bind /proc /var/tmp/let64/proc
9  
-	chroot /var/tmp/let64 su -
10  
-	echo let64 > /etc/debian_chroot
  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
11 13
 	adduser b &&echo 'b ALL=(ALL)NOPASSWD: ALL' >> /etc/sudoers
12 14
 	exit
13  
-	chroot /var/tmp/let64 su - b
  15
+	chroot /var/tmp/let32 su - b
14 16
 	sudo apt-get install build-essential cowdancer dpkg-dev libapt-pkg-perl
15 17
 	sudo apt-get install libyaml-perl libyaml-syck-perl libtext-diff-perl liblist-moreutils-perl
16 18
 	sudo apt-get install libfile-slurp-perl libtest-exception-perl libtest-differences-perl
17 19
 	sudo apt-get install libjson-xs-perl libmoose-perl libfile-chdir-perl
18 20
 	sudo apt-get install libpath-class-perl libtest-deep-perl libreadonly-perl
19 21
 	sudo apt-get install libfile-find-rule-perl libfile-homedir-perl libio-compress-bzip2-perl
20  
-	sudo apt-get install xvfb
  22
+	sudo apt-get install xvfb po4a quilt dpatch
  23
+	
  24
+	sudo cpan
  25
+	# o conf connect_to_internet_ok yes
  26
+	# o conf commit
21 27
 	
22 28
 	sudo cpan -i CPAN::Patches::Plugin::Debian Debian::Apt::PM
23 29
 	
@@ -27,35 +33,39 @@ SettingUpBuildSystem - How to set-up a chrooted build system
27 33
 	sudo bash -c 'echo "deb http://pkg-perl.alioth.debian.org/~jozef-guest/pmindex/ lenny main contrib non-free" >> /etc/apt/sources.list'
28 34
 	apt-pm update
29 35
 
30  
-	sudo chown b /var/lib/dh-make-pm
  36
+	sudo chown b /var/lib/dh-make-pm /var/lib/cpan-patches/
31 37
 	
32 38
 	cd /var/lib/cpan-patches/
  39
+	rmdir debian-set
33 40
 	sudo git clone git://github.com/jozef/CPAN-Patches-Debian-Set.git debian-set
34 41
 
35  
-	sudo bash -c 'echo "deb-src http://ftp.at.debian.org/debian testing main" >> /etc/apt/sources.list'
  42
+	sudo bash -c 'echo "deb     http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
  43
+	sudo bash -c 'echo "deb-src http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
  44
+	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'
36 45
 	sudo apt-get update
  46
+	sudo apt-get install -t testing dh-make-perl debhelper
37 47
 	
  48
+	######
  49
+	# probably not, backport those
38 50
 	cd /tmp
39 51
 	svn co svn://cvs.alioth.debian.org/svn/pkg-perl/trunk/dh-make-perl
40 52
 	cd dh-make-perl
41 53
 	perl Build.PL && ./Build manifest && ./Build distmeta
42  
-	mkdir tmp
43  
-	git clone git://github.com/jozef/CPAN-Patches-Example-Set.git tmp/set
44  
-	cpan-patches --patch-set tmp/set/ patch
45 54
 	sudo apt-get install libmodule-depends-perl libwww-mechanize-perl libfile-touch-perl
46 55
 	sudo cpan -i Array::Unique Email::Date::Format autodie Module::CoreList File::DirCompare Text::Diff
47 56
 	perl Build.PL && ./Build test && sudo ./Build install
48 57
 
49  
-=head2 create cowbuilder for sid
  58
+=head2 create cowbuilder for lenny
50 59
 
51  
-	sudo debootstrap squeeze /var/cache/pbuilder/base.cow
  60
+	sudo debootstrap lenny /var/cache/pbuilder/base.cow
52 61
 	sudo bash -c 'echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /var/cache/pbuilder/base.cow/etc/apt/sources.list'
53 62
 	sudo bash -c 'echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /etc/apt/sources.list'
54 63
 	cd /var/cache/pbuilder/result/
55 64
 	sudo chown b .
56 65
 	wget http://github.com/jozef/Debian-Apt-PM/raw/master/examples/repo/Makefile
57 66
 	wget http://github.com/jozef/Debian-Apt-PM/raw/master/examples/repo/Release.conf
58  
-	mkdir unstable
  67
+	mkdir -p unstable/unsorted
  68
+	vim Release.conf
59 69
 	# generate a key without passphrase
60 70
 	gpg --gen-key
61 71
 	gpg --export --armor | sudo apt-key add -
@@ -65,14 +75,81 @@ SettingUpBuildSystem - How to set-up a chrooted build system
65 75
 	
66 76
 	sudo chroot /var/cache/pbuilder/base.cow su -
67 77
 	echo build > /etc/debian_choot
68  
-	echo "deb http://ftp.cz.debian.org/debian/ squeeze main non-free contrib" >> /etc/apt/sources.list
69  
-	echo "deb http://ftp.cz.debian.org/debian/ sid main non-free contrib" >> /etc/apt/sources.list
70 78
 	apt-get update
71 79
 	apt-get install cowdancer
72 80
 	exit
73 81
 	
74 82
 	sudo bash -c 'echo "BINDMOUNTS=/var/cache/pbuilder/result" >> /etc/pbuilderrc'
75 83
 	sudo bash -c 'echo "PDEBUILD_PBUILDER=cowbuilder" >> /etc/pbuilderrc'
76  
-	sudo cowbuilder --update	
  84
+	sudo cowbuilder --update
  85
+
  86
+=head2 backport for packaging
  87
+
  88
+	sudo chroot /var/cache/pbuilder/base.cow/
  89
+	bash -c 'echo "deb     http://ftp.at.debian.org/debian testing main contrib" >> /etc/apt/sources.list'
  90
+	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'
  91
+	apt-get update
  92
+	exit
  93
+
  94
+	cd /tmp
  95
+	apt-get source dpkg
  96
+	cd dpkg-*
  97
+	pdebuild
  98
+	cd /var/cache/pbuilder/result/; make new-package all
  99
+	
  100
+	cd /tmp
  101
+	cd apt-get source debhelper
  102
+	cd dh-make-perl-*
  103
+	pdebuild
  104
+	cd /var/cache/pbuilder/result/; make new-package all
  105
+	
  106
+	libtool
  107
+	gettext
  108
+	autoconf
  109
+	m4
  110
+	libdb4.7-dev
  111
+	
  112
+	cd /tmp
  113
+	cd apt-get source xz-utils
  114
+	cd xz-utils-*
  115
+	# needs autoconf >= 2.64
  116
+	vim debian/control
  117
+	pdebuild
  118
+	cd /var/cache/pbuilder/result/; make new-package all
  119
+	
  120
+	cd /var/cache/pbuilder/result/
  121
+	mv unstable/unsorted unstable/for-build
  122
+	mkdir unstable/unsorted
  123
+	make all
  124
+	
  125
+	base-files
  126
+	
  127
+	# remove testing
  128
+	vim /var/cache/pbuilder/base.cow/etc/apt/sources.list
  129
+	mv /var/cache/pbuilder/base.cow/etc/apt/preferences /var/cache/pbuilder/base.cow/etc/apt/preferences.old
  130
+	
  131
+	sudo cowbuilder --update
  132
+	
  133
+	
  134
+=head2 backport perl
  135
+
  136
+	coreutils
  137
+	libdb4.7-dev    # Build-Depends: coreutils (>= 8.5)
  138
+	perl
  139
+
  140
+=head2 dh-make-pm
  141
+
  142
+	# not needed?  sudo apt-get install apt-file
  143
+	#              sudo apt-file update
  144
+	
  145
+	cd && mkdir src && cd src
  146
+	svn co svn://cvs.alioth.debian.org/svn/pkg-perl/trunk/dh-make-perl
  147
+	cd dh-make-perl
  148
+	wget http://github.com/jozef/Debian-Apt-PM/raw/master/patches/FromCPAN.pm.patch
  149
+	patch -p1 < FromCPAN.pm.patch
  150
+	perl Build.PL && ./Build test && sudo ./Build install
  151
+
  152
+	Test::Simple
  153
+	Module::Build
77 154
 
78 155
 =cut

0 notes on commit 814daf1

Please sign in to comment.
Something went wrong with that request. Please try again.