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

Last change on this file since 1968 was 1968, checked in by Bruno Cornec, 9 years ago

Use pb -h instead of pb --version

File size: 4.2 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 -h
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# Docker part
57# Now show how easy it's to build for another distro in a Docker VE
58# Create Docker container
59docker images
60#pb -p pb -m mageia-4-x86_64 -T docker newve
61docker images
62docker run -ti <imgid> /bin/bash
63$ urpmi tar
64pb -p pb -m mageia-4-x86_64 -T docker sbx2setupve
65docker ps -a
66docker attach <ctnid>
67docker images
68docker run -ti <imgid> /bin/bash
69pb -h
70pb -p pb -m mageia-4-x86_64 -T docker prepve
71docker images
72docker run -ti <imgid> /bin/bash
73pb -p pb -m mageia-4-x86_64 -T docker sbx2ve
74ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
75#
76# On another distro already preped
77pb -p pb -m ubuntu-13.10-x86_64 -T docker build2ve
78ls -al /var/ftp/pub/pb/test/ubuntu/13.10
79
80# On another project
81pb -p mondorescue -m mageia-4-x86_64 -T docker prepve
82docker images
83ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
84ssh bruno@www.mondorescue.org ls -altrg /prj/ftp/test/mageia/4/x86_64
85
86
87# Look at what was created
88docker images
89docker history localhost:5000/pb:mageia-4-x86_64-pb-pb
90
91# Another container Ubuntu 13.10
92#
93# If docker issue withnet, restart docker
94ip link delete docker0
95systemctl restart docker.service
96
97# Now show how easy it's to build for another project for which I'm upstream
98-> pb -p mondorescue -m debian-6.0-x86_64 sbx2ve
99
100# Now show how easy it's to build for another project for which I'm not upstream with patches
101-> pb -p afio -r 2.5 -m debian-6.0-x86_64 sbx2ve
102
103# Look at conf files
104cat ~/.pbrc
105cat /home/rpmbootstrap/.pbrc
106cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio.pb
107cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/rpm/afio.spec
108cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/deb/control
109ls -R ~/svn-git/pb/projects/afio/pbconf/2.5/
110
111# Short Lab
112# in pblab account
113# prepa
114# As root
115rm -rf /prj/svn
116svnadmin create /prj/svn
117cat >> /prj/svn/conf/authz << EOF
118[/]
119pblab = rw
120* = r
121EOF
122cat >> /prj/svn/conf/passwd << EOF
123pblab = pblab
124EOF
125cat > /prj/svn/conf/svnserve.conf << EOF
126[general]
127password-db = passwd
128authz-db = authz
129[sasl]
130EOF
131killall svnserve
132~pblab/bin/rc.local
133
134# as pblab
135rm -rf pb .pbrc
136cat > afio.pb.add << EOF
137defpkgdir afio = dummy
138pbpackager default = Big Chief <bigchief@hp.com>
139projver afio = 2.5
140projtag afio = 1
141pburl afio = ftp://localhost/src/afio-2.5.tar.gz
142pbrepo afio = ftp://localhost
143EOF
144
145pb -p afio clean
146cat ~/.pbrc
147cat >> ~/.pbrc << EOF
148pbconfurl afio = svn://localhost/pb/afio/pbconf
149EOF
150echo "pbdefdir default = \$ENV{'HOME'}/pb" >> ~/.pbrc
151mkdir pb
152svn import pb svn://localhost/pb -m "Initial creation of pb repo"
153# passwd asked here
154
155cd pb
156svn co svn://localhost/pb .
157pb -p afio newproj afio
158# passwd asked here
159
160cat ~/afio.pb.add >> afio/pbconf/afio.pb
161pb -p afio sbx2build
162
163# with Ubuntu CD
164cat >> ~/.pbrc << EOF
165vmpath default = /home/qemu
166EOF
167
Note: See TracBrowser for help on using the repository browser.