Changeset 1555


Ignore:
Timestamp:
May 21, 2012, 3:35:23 AM (7 years ago)
Author:
bruno
Message:
  • pb: improve documentation on the project.pb entries. Use new projcomponent value to specify which component we are building for -- most things probably aren't contrib (for deb based distros) (Eric Anderson)
Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r1543 r1555  
    432432#pbsmtp $ENV{'PBPROJ'} = localhost
    433433#pbgpgcheck $ENV{'PBPROJ'} = 1
     434# For distro supporting it, which area is used
    434435#projcomponent $ENV{'PBPROJ'} = main
    435436
  • devel/pb/bin/pb

    r1554 r1555  
    491491=item Update your $project.pb configuration file.
    492492
    493 You need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, delivery, and defpkgdir lines as described in the configuration file.  For example:
     493You need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, delivery, and defpkgdir lines as described in the configuration file. The pburl entry is used to find the source for your package. The pbrepo entry is used to build the .repo or .sources.list files for use by downloaders of the package. The pbwf entry indicates that the source tar file is named by I<package-name>-I<version>. The pbpackager entry will be stored in the packages and should be you or your team. The projver/projtag entries indicate the version of the software and the version of the packaging scripts. The testver entry when true indicates that the package is in a test version, so no log file is computed (can be long), and version is made up using a timstamp. The delivery entry gives the subdirectory under which the packages will be delivered on the repository, and the defpkgdir entry corresponds to the local subdirectory hosting the package content.
     494
     495For example:
    494496
    495497 pburl Lintel = file:///home/anderse/projects/Lintel-0.2012.02.28.tar.gz
     
    21412143            # Remove extra . in path to fix #522
    21422144            $rpd =~ s|/./|/|g;
     2145            my ($projcomponent_map) = pb_conf_get_if("projcomponent");
     2146            pb_log(2,"projcomponent = ".Dumper($projcomponent_map);
     2147            my $projcomponent = $projcomponent_map->{$ENV{PBPROJ}};
     2148            $projcomponent ||= 'contrib';
    21432149            print PBS << "EOF";
    21442150#!/bin/bash
    21452151# Prepare a script to ease apt setup
    21462152cat > $ENV{'PBPROJ'}.sources.list << EOT
    2147 deb $rpd $pbos->{'version'} contrib
    2148 deb-src $rpd $pbos->{'version'} contrib
     2153deb $rpd $pbos->{'version'} $projcomponent
     2154deb-src $rpd $pbos->{'version'} $projcomponent
    21492155EOT
    21502156chmod 644 $ENV{'PBPROJ'}.sources.list
     
    21522158# Up two levels to deal with the dist dir cross versions
    21532159cd ..
    2154 mkdir -p dists/$pbos->{'version'}/contrib/binary-$debarch dists/$pbos->{'version'}/contrib/source
     2160mkdir -p dists/$pbos->{'version'}/$projcomponent/binary-$debarch dists/$pbos->{'version'}/$projcomponent/source
    21552161
    21562162# Prepare a script to create apt info file
     
    21602166cat > \$TMPD/Release << EOT
    21612167Archive: unstable
    2162 Component: contrib
     2168Component: $projcomponent
    21632169Origin: $ENV{'PBPROJ'}
    21642170Label: $ENV{'PBPROJ'} dev repository $pbrepo->{$ENV{'PBPROJ'}}
     
    21662172
    21672173echo "Creating Packages metadata ($pbos->{'arch'} aka $debarch)"
    2168 dpkg-scanpackages -a$debarch $pbos->{'version'} /dev/null | gzip -c9 > dists/$pbos->{'version'}/contrib/binary-$debarch/Packages.gz
    2169 dpkg-scanpackages -a$debarch $pbos->{'version'} /dev/null | bzip2 -c9 > dists/$pbos->{'version'}/contrib/binary-$debarch/Packages.bz2
     2174dpkg-scanpackages -a$debarch $pbos->{'version'} /dev/null | gzip -c9 > dists/$pbos->{'version'}/$projcomponent/binary-$debarch/Packages.gz
     2175dpkg-scanpackages -a$debarch $pbos->{'version'} /dev/null | bzip2 -c9 > dists/$pbos->{'version'}/$projcomponent/binary-$debarch/Packages.bz2
    21702176echo "Creating Contents metadata"
    21712177apt-ftparchive contents $pbos->{'version'} | gzip -c9 > dists/$pbos->{'version'}/Contents.gz
    21722178echo "Creating Release metadata ($pbos->{'arch'} aka $debarch)"
    2173 cat \$TMPD/Release > dists/$pbos->{'version'}/contrib/binary-$debarch/Release
    2174 echo "Architecture: $debarch" >> dists/$pbos->{'version'}/contrib/binary-$debarch/Release
     2179cat \$TMPD/Release > dists/$pbos->{'version'}/$projcomponent/binary-$debarch/Release
     2180echo "Architecture: $debarch" >> dists/$pbos->{'version'}/$projcomponent/binary-$debarch/Release
    21752181echo "Creating Source metadata"
    2176 dpkg-scansources $pbos->{'version'} /dev/null | gzip -c9 > dists/$pbos->{'version'}/contrib/source/Sources.gz
    2177 cat \$TMPD/Release > dists/$pbos->{'version'}/contrib/source/Release
    2178 echo "Architecture: Source" >> dists/$pbos->{'version'}/contrib/source/Release
     2182dpkg-scansources $pbos->{'version'} /dev/null | gzip -c9 > dists/$pbos->{'version'}/$projcomponent/source/Sources.gz
     2183cat \$TMPD/Release > dists/$pbos->{'version'}/$projcomponent/source/Release
     2184echo "Architecture: Source" >> dists/$pbos->{'version'}/$projcomponent/source/Release
    21792185echo "Creating Release metadata"
    21802186# Signing that file would be useful but uneasy as gpg keys are not there
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r1554 r1555  
    9292#
    9393my $turl = "$pburl->{$ENV{'PBPROJ'}}/$tmp";
    94 $turl = $pburl->{$ENV{'PBPROJ'}} if ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     94$turl = $pburl->{$ENV{'PBPROJ'}} if ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o);
    9595pb_cms_compliant(undef,'PBDIR',"$ENV{'PBPROJDIR'}/$tmp",$turl,$pbinit);
    9696
     
    108108    $ENV{'PBREVISION'}=$tmp;
    109109    $ENV{'PBCMSLOGFILE'}="git.log";
    110 } elsif (($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     110} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
    111111    $ENV{'PBREVISION'}="flat";
    112112    $ENV{'PBCMSLOGFILE'}="flat.log";
     
    432432        close(CL);
    433433        pb_system("$vcscmd log -v $pkgdir > $dest/$ENV{'PBCMSLOGFILE'}","Extracting log info from GIT");
    434     } elsif (($scheme =~ /^(flat)|(ftp)|(http)|(file)|(dir)\b/o) {
     434    } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)|(dir)\b/o) {
    435435        pb_system("echo ChangeLog for $pkgdir > $dest/ChangeLog","Empty ChangeLog file created");
    436436    } elsif ($scheme =~ /^cvs/) {
Note: See TracChangeset for help on using the changeset viewer.