source: ProjectBuilder/devel/pb-doc/pb-demo@ 1942

Last change on this file since 1942 was 1942, checked in by Bruno Cornec, 9 years ago
  • pb works again with VMs (pbaccount is now a ENV var and the script executed is now without a full path name and the port used is now correct again)
File size: 3.9 KB
Line 
1demo of project-builder.org
2===========================
3
4# First demonstrate the way of working for pb itself
5cd ~/local/pb|~/pb|~/svn-git/pb
6# Show the various versions available in this SVK exported dir
7ls
8# get the current tag of the SVK repository
9svk info|svn info|git svn info
10
11# get the current version of project-builder
12rpm -q project-builder
13pb --help
14pb
15
16# Decide to build a package for project-builder based on that devel version
17# to replace the one currently installed
18pb -p pb -r devel sbx2build|cms2build
19
20# Show the upstream part
21ls -altg /home/bruno/svn-git/pb/delivery/
22tar tvfz /home/bruno/svn-git/pb/delivery/project-builder-develXXX.tar.gz
23
24# Show the pb specific part
25tar tvfz /home/bruno/svn-git/pb/delivery/project-builder-develXXX.pbconf.tar.gz
26
27# Now make the packages
28pb -p pb build2pkg
29
30# Look at the latest pckges created
31ls -altrg /home/bruno/svn-git/pb/build/RPMS/noarch
32
33# Install the generated packages
34sudo urpmi /home/bruno/svn-git/pb/build/RPMS/noarch/*.rpm
35
36# Check that it's the right one
37rpm -q project-builder
38pb --version
39git svn info
40
41# Now show how easy it's to build for another distro in a VM
42ls /home/qemu
43-> pb -p pb -m debian-7-x86_64 sbx2vm
44ls -al /var/ftp/pub/pb/test/debian/7/
45ls -al /var/ftp/pub/pb/test/debian/dists/7/
46
47pb -p pb -m mageia-3-i386 sbx2vm
48# Now show how easy it's to build for another distro in a VE
49ls /home/rpmbootstrap
50pb -p pb -m centos-6-x86_64 build2ve
51pb -p pb -m ubuntu-11.10-x86_64 build2ve
52-> pb -p pb -m debian-6.0-x86_64 sbx2ve
53ls -al /var/ftp/pub/pb/test/debian/6.0/
54ls -al /var/ftp/pub/pb/test/debian/dists/6.0/
55
56# Now show how easy it's to build for another distro in a Docker VE
57# Create Docker container
58docker images
59#pb -p pb -m mageia-4-x86_64 -T docker newve
60docker images
61docker run -ti <imgid> /bin/bash
62$ urpmi tar
63pb -p pb -m mageia-4-x86_64 -T docker sbx2setupve
64docker images
65docker run -ti <imgid> /bin/bash
66pb --version
67pb -p pb -m mageia-4-x86_64 -T docker prepve
68docker images
69docker run -ti <imgid> /bin/bash
70pb -p pb -m mageia-4-x86_64 -T docker sbx2ve
71ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
72# On another project
73pb -p mondorescue -m mageia-4-x86_64 -T docker prepve
74docker images
75ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
76ssh bruno@www.mondorescue.org ls -altrg /prj/ftp/test/mageia/4/x86_64
77
78# Look at what was created
79docker images
80docker history localhost:5000/pb:mageia-4-x86_64-pb-pb
81
82# Now show how easy it's to build for another project for which I'm upstream
83-> pb -p mondorescue -m debian-6.0-x86_64 sbx2ve
84
85# Now show how easy it's to build for another project for which I'm not upstream with patches
86-> pb -p afio -r 2.5 -m debian-6.0-x86_64 sbx2ve
87
88# Look at conf files
89cat ~/.pbrc
90cat /home/rpmbootstrap/.pbrc
91cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio.pb
92cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/rpm/afio.spec
93cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/deb/control
94ls -R ~/svn-git/pb/projects/afio/pbconf/2.5/
95
96# Short Lab
97# in pblab account
98# prepa
99# As root
100rm -rf /prj/svn
101svnadmin create /prj/svn
102cat >> /prj/svn/conf/authz << EOF
103[/]
104pblab = rw
105* = r
106EOF
107cat >> /prj/svn/conf/passwd << EOF
108pblab = pblab
109EOF
110cat > /prj/svn/conf/svnserve.conf << EOF
111[general]
112password-db = passwd
113authz-db = authz
114[sasl]
115EOF
116killall svnserve
117~pblab/bin/rc.local
118
119# as pblab
120rm -rf pb .pbrc
121cat > afio.pb.add << EOF
122defpkgdir afio = dummy
123pbpackager default = Big Chief <bigchief@hp.com>
124projver afio = 2.5
125projtag afio = 1
126pburl afio = ftp://localhost/src/afio-2.5.tar.gz
127pbrepo afio = ftp://localhost
128EOF
129
130pb -p afio clean
131cat ~/.pbrc
132cat >> ~/.pbrc << EOF
133pbconfurl afio = svn://localhost/pb/afio/pbconf
134EOF
135echo "pbdefdir default = \$ENV{'HOME'}/pb" >> ~/.pbrc
136mkdir pb
137svn import pb svn://localhost/pb -m "Initial creation of pb repo"
138# passwd asked here
139
140cd pb
141svn co svn://localhost/pb .
142pb -p afio newproj afio
143# passwd asked here
144
145cat ~/afio.pb.add >> afio/pbconf/afio.pb
146pb -p afio sbx2build
147
148# with Ubuntu CD
149cat >> ~/.pbrc << EOF
150vmpath default = /home/qemu
151EOF
152
Note: See TracBrowser for help on using the repository browser.