47 #
'ubuntu-11.10-i386',
48 #
'ubuntu-11.10-x86_64',
49 #
'ubuntu-11.04-i386',
50 #
'ubuntu-11.04-x86_64',
51 #
'ubuntu-10.04-i386',
52 #
'ubuntu-10.04-x86_64',
56 'ubuntu-12.04-x86_64',
58 'ubuntu-12.10-x86_64',
63 $Usage =
"Usage: " . basename($argv[0]) .
" [options] 65 -h = this help message 66 -v = enable verbose debugging 67 -V = version to create packages for 68 -t = create packages from trunk 72 for ($i = 1;$i < $argc;$i++) {
89 if (substr($argv[$i], 0, 1) ==
'-') {
90 print
"Unknown parameter: '" . $argv[$i] .
"'\n";
98 if (empty($Version)) {
103 $Cmd =
"pb -p fossology -r $Version newproj fossology";
110 $Cmd =
"rm -rf /home/build/pb/projects/fossology/pbconf/$Version/*";
115 system(
"rm -rf /home/build/pb/projects/fossology/pbconf/$Version/.svn");
116 system(
"cd /home/build/pb/projects/fossology/pbconf/$Version/");
118 $Cmd =
"svn co http://svn.code.sf.net/p/fossology/code/trunk/fossology/packaging/ /home/build/pb/projects/fossology/pbconf/$Version/";
120 $Cmd =
"svn co http://svn.code.sf.net/p/fossology/code/tags/2.2.0/packaging/ /home/build/pb/projects/fossology/pbconf/$Version/";
126 system(
"mkdir /home/build/pb/projects/fossology/pbconf/$Version/fossology");
127 system(
"mv /home/build/pb/projects/fossology/pbconf/$Version/deb /home/build/pb/projects/fossology/pbconf/$Version/rpm /home/build/pb/projects/fossology/pbconf/$Version/pbcl /home/build/pb/projects/fossology/pbconf/$Version/fossology");
130 $Cmd =
"pb -p fossology -r $Version sbx2build";
136 if (file_exists(
"/home/build/pb/projects/fossology/$Version/")){
137 system(
"rm /home/build/pb/projects/fossology/$Version/Makefile.conf");
138 system(
"svn update /home/build/pb/projects/fossology/$Version/");
143 date_default_timezone_set(
'America/Denver');
144 $showtime = date(
"Ymd");
147 system(
"perl -pi -e 's/\/var\/ftp\/pub\/fossology/\/var\/ftp\/pub\/fossology\/$Version\/testing\/$showtime/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
148 system(
"perl -pi -e 's/code\/trunk\/fossology\//code\/trunk\/fossology/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
149 system(
"perl -pi -e 's/projver fossology = trunk/projver fossology = $Version/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
150 system(
"perl -pi -e 's/trunk/$Version~$showtime/' /home/build/pb/projects/fossology/pbconf/$Version/fossology/deb/changelog");
152 system(
"perl -pi -e 's/$Version\//$Version/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
153 system(
"perl -pi -e 's/\/var\/ftp\/pub\/fossology/\/var\/ftp\/pub\/fossology\/$Version/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
154 system(
"perl -pi -e 's/projver fossology = trunk/projver fossology = $Version/' /home/build/pb/projects/fossology/pbconf/$Version/fossology.pb");
160 foreach ($VMS as $VM) {
161 $Cmd =
"pb -p fossology -r $Version -m $VM build2vm";
171 system(
"perl -pi -e 's/^(deb.*debian\/)/deb = \"deb http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/testing\/$showtime\/debian\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/debian.ini");
172 system(
"perl -pi -e 's/^(deb.*ubuntu\/)/deb = \"deb http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/testing\/$showtime\/ubuntu\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/ubuntu.ini");
173 system(
"perl -pi -e 's/^(yum.*rhel\/)/yum = \"http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/testing\/$showtime\/rhel\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/redhat.ini");
174 system(
"perl -pi -e 's/^(yum.*fedora\/15\/)/yum = \"http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/testing\/$showtime\/fedora\/15\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/fedora.ini");
176 system(
"perl -pi -e 's/^(deb.*debian\/)/deb = \"deb http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/debian\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/debian.ini");
177 system(
"perl -pi -e 's/^(deb.*ubuntu\/)/deb = \"deb http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/ubuntu\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/ubuntu.ini");
178 system(
"perl -pi -e 's/^(yum.*rhel\/)/yum = \"http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/rhel\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/redhat.ini");
179 system(
"perl -pi -e 's/^(yum.*fedora\/15\/)/yum = \"http:\/\/fossbuild.usa.hp.com\/fossology\/$Version\/fedora\/15\//' /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/fedora.ini");
187 $ftp_base =
"/var/ftp/pub/fossology/$Version/testing";
189 $command =
"sudo rm -rf $ftp_base/current";
193 $command =
"sudo cp -R $ftp_base/$showtime/ $ftp_base/current";
197 # temporarily disable this commit since we should really not be 198 # making svn commits from within test code (not a good practice) 199 # but I don't fully grok why it's doing this; might someday be 200 # useful but let's skip it for now 201 # system("svn commit /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/debian.ini /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/ubuntu.ini /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/redhat.ini /home/build/pb/fossology/trunk/fossology/src/testing/dataFiles/pkginstall/fedora.ini -m 'New $Version changes to conf files for package testing'");