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