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

Last change on this file since 1915 was 1915, checked in by Bruno Cornec, 10 years ago
  • Review demo script for docker
File size: 3.8 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
59pb -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
79# Now show how easy it's to build for another project for which I'm upstream
80-> pb -p mondorescue -m debian-6.0-x86_64 sbx2ve
81
82# Now show how easy it's to build for another project for which I'm not upstream with patches
83-> pb -p afio -r 2.5 -m debian-6.0-x86_64 sbx2ve
84
85# Look at conf files
86cat ~/.pbrc
87cat /home/rpmbootstrap/.pbrc
88cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio.pb
89cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/rpm/afio.spec
90cat ~/svn-git/pb/projects/afio/pbconf/2.5/afio/deb/control
91ls -R ~/svn-git/pb/projects/afio/pbconf/2.5/
92
93# Short Lab
94# in pblab account
95# prepa
96# As root
97rm -rf /prj/svn
98svnadmin create /prj/svn
99cat >> /prj/svn/conf/authz << EOF
100[/]
101pblab = rw
102* = r
103EOF
104cat >> /prj/svn/conf/passwd << EOF
105pblab = pblab
106EOF
107cat > /prj/svn/conf/svnserve.conf << EOF
108[general]
109password-db = passwd
110authz-db = authz
111[sasl]
112EOF
113killall svnserve
114~pblab/bin/rc.local
115
116# as pblab
117rm -rf pb .pbrc
118cat > afio.pb.add << EOF
119defpkgdir afio = dummy
120pbpackager default = Big Chief <bigchief@hp.com>
121projver afio = 2.5
122projtag afio = 1
123pburl afio = ftp://localhost/src/afio-2.5.tar.gz
124pbrepo afio = ftp://localhost
125EOF
126
127pb -p afio clean
128cat ~/.pbrc
129cat >> ~/.pbrc << EOF
130pbconfurl afio = svn://localhost/pb/afio/pbconf
131EOF
132echo "pbdefdir default = \$ENV{'HOME'}/pb" >> ~/.pbrc
133mkdir pb
134svn import pb svn://localhost/pb -m "Initial creation of pb repo"
135# passwd asked here
136
137cd pb
138svn co svn://localhost/pb .
139pb -p afio newproj afio
140# passwd asked here
141
142cat ~/afio.pb.add >> afio/pbconf/afio.pb
143pb -p afio sbx2build
144
145# with Ubuntu CD
146cat >> ~/.pbrc << EOF
147vmpath default = /home/qemu
148EOF
149
Note: See TracBrowser for help on using the repository browser.