- Timestamp:
- Oct 25, 2017, 12:01:59 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r2333 r2334 891 891 } elsif ($action =~ /^sbx2build$/) { 892 892 pb_cms2build("SandBox"); 893 } elsif ($action =~ /^build2prep /) {893 } elsif ($action =~ /^build2prep$/) { 894 894 pb_build2prep(); 895 } elsif ($action =~ /^sbx2prep /) {895 } elsif ($action =~ /^sbx2prep$/) { 896 896 pb_cms2build("SandBox"); 897 897 pb_build2prep(); … … 1701 1701 # TODO: HP-UX 1702 1702 } elsif ($pbos->{'type'} eq "apk") { 1703 # TODO: Alpine1703 $ftype = "\/APKBUILD\$"; 1704 1704 } else { 1705 1705 die "Unknown OS type format $pbos->{'type'}"; … … 1971 1971 } 1972 1972 } 1973 1974 } elsif ($pbos->{'type'} eq "apk") { 1975 pb_mkdir_p("$ENV{'PBBUILDDIR'}/tmp"); 1976 1977 # We need to first extract the APKBUILD file 1978 my @apkfile = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$ENV{'PBBUILDDIR'}/tmp","build"); 1979 1980 chdir "$ENV{'PBBUILDDIR'}/ || die "Unable to chdir to $ENV{'PBBUILDDIR'}/$pb->{'realpkg'}"; 1981 1982 # Build 1983 foreach my $f (@apkfile) { 1984 if ($f =~ /^APKBUILD$/) { 1985 pb_system("abuild unpack ; abuild checksum ; abuild -r -P $ENV{'PBBUILDDIR'}/tmp build ; abuild -r -P .. root-pkg ; abuild -P pkg index","verbose"); 1986 } 1987 # Get the name of the generated packages 1988 open(LOG,"$ENV{'PBTMP'}/system.$$.log") || die "Unable to open $ENV{'PBTMP'}/system.$$.log"; 1989 while (<LOG>) { 1990 chomp($_); 1991 next if ($_ !~ /: Create /); 1992 s|.*: Create (.*.apk)|$1|; 1993 $made .= " $_"; 1994 } 1995 close(LOG); 1996 1997 } 1973 1998 1974 1999 } elsif ($pbos->{'type'} eq "tgz") { … … 2346 2371 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}"; 2347 2372 } elsif ($cmt eq "Packages") { 2348 if (($pbos->{'type'} eq "rpm") || ($pbos->{'type'} eq "pkg") || ($pbos->{'type'} eq "hpux") || ($pbos->{'type'} eq "tgz") ) {2373 if (($pbos->{'type'} eq "rpm") || ($pbos->{'type'} eq "pkg") || ($pbos->{'type'} eq "hpux") || ($pbos->{'type'} eq "tgz") || ($pbos->{'type'} eq "apk")) { 2349 2374 # put packages under an arch subdir 2350 2375 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"; … … 2573 2598 done 2574 2599 EOF 2600 } elsif ($pbos->{'type'} eq "apk") { 2601 # TODO 2575 2602 } 2576 2603 close(PBS); … … 3064 3091 } 3065 3092 3093 $vetype = pb_ve_get_type($vetype); 3094 if ((($vtype =~ /vm/) || (($vtype =~ /ve/) && ($vetype eq "docker"))) && (((not defined $pbimage) || ($pbimage eq "")) && ($pbstep == 0))) { 3095 confess "-i image parameter needed"; 3096 } 3097 3066 3098 my $counter = 0; 3067 3099 foreach my $v (@$vm) { … … 3134 3166 # Launch the VMs/VEs 3135 3167 if ($vtype eq "vm") { 3136 confess "-i image parameter needed" if (((not defined $pbimage) || ($pbimage eq "")) && ($pbstep == 0));3137 3138 3168 my ($ptr,$ptr2,$vmpath,$vmport,$vms) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize"); 3139 3169 my ($vmopt,$vmmm,$vmtmout,$vmsnap,$vmbuildtm,$vmmonport) = pb_conf_get_if("vmopt","vmmem","vmtmout","vmsnap","vmbuildtm","vmmonport"); … … 3832 3862 } elsif ( -x "/usr/sbin/addgroup" ) { 3833 3863 pb_system("/usr/sbin/addgroup $pbac->{$ENV{'PBPROJ'}}","Adding group $pbac->{$ENV{'PBPROJ'}}"); 3864 pb_system("/usr/sbin/addgroup $pbac->{$ENV{'PBPROJ'}} abuild","Adding $pbac->{$ENV{'PBPROJ'}} to group abuild"); 3834 3865 } else { 3835 3866 die "Unable to find a command to add a group on this distribution"; … … 4308 4339 my $ntag = "[2-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"; 4309 4340 $pbver .= $ntag; 4341 # TODO add apk 4310 4342 $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgrpm-debug-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag"."_*\.deb\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.dsc\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.tar.gz\' -o -name \'$pbrealpkg-$nver"."_p$ntag\.ebuild\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.pkg\.gz\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.sd\' "; 4311 4343 $srcstr .= "src/$pbrealpkg-$pbver.tar.gz src/$pbrealpkg-$pbver.pbconf.tar.gz "; … … 4366 4398 $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver$prefix$pbtag.ebuild"} = 0; 4367 4399 $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver$prefix$pbtag.ebuild"} = "$pbos->{'arch'}"; 4400 } elsif ($pbos->{'type'} eq "apk") { 4401 # TODO 4368 4402 } elsif ($pbos->{'type'} eq "pkg") { 4369 4403 $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/$pbrealpkg-$pbver-$pbtag.pkg.gz"} = 0; … … 4446 4480 $p =~ s/(-0\.[0-9]{8})[0-9]{6}/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)); 4447 4481 $p =~ s/(-r|_p[0-9]+)\.ebuild/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)); 4482 # TODO apk 4448 4483 $theorlist{$p} = -2 if (not defined $theorlist{$p}); 4449 4484 $theorlist{$p} = $theorlist{$p} + 1;
Note:
See TracChangeset
for help on using the changeset viewer.