Changeset 916


Ignore:
Timestamp:
Nov 29, 2009, 3:12:56 AM (10 years ago)
Author:
bruno
Message:
  • Improves Debian support by a/ allowing PBDESC to be used in control file with space prepended. b/ prepend 0 to non digit versions such as devel. c/ creating debian pbfilter files for PBDEBSTD and PBDEBCOMP macros used in control.
  • Uses pbtag for ebuild and pkg packages
  • Improves pb Solaris pkgs
  • Improves pb Debian pkgs (only some warnings remaining for lintian)
  • Adds a PBSUMMARY macro and use it. Now also generated for newproj.
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r914 r916  
    10111011                    # Now move it where pb expects it
    10121012                    pb_mkdir_p("$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg");
    1013                     move("$tmpd/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg");
     1013                    move("$tmpd/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-$pbtag.ebuild");
    10141014                }
    10151015            }
    10161016
    1017             $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver.ebuild";
     1017            $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-$pbtag.ebuild";
    10181018        } elsif ($dtype eq "tgz") {
    10191019            # Slackware family
     
    10321032        } elsif ($dtype eq "pkg") {
    10331033            # Solaris
    1034             $made="$made $pbpkg-$pbver.pkg.gz";
     1034            $made="$made $pbpkg-$pbver-$pbtag.pkg.gz";
    10351035            my $pkgdestdir="$ENV{'PBBUILDDIR'}/install";
    10361036
     
    10621062                copy("pbconf/$ddir-$dver-$arch/pkginfo", $pkgdestdir);
    10631063                pb_system("cd $pkgdestdir/delivery ; pkgmk -o -f ../prototype -r $pkgdestdir/delivery -d $ENV{'PBBUILDDIR'}/$dtype","Packaging $pbpkg","verbose");
    1064                 pb_system("cd $ENV{'PBBUILDDIR'}/$dtype ;  echo \"\" | pkgtrans -o -n -s $ENV{'PBBUILDDIR'}/$dtype $ENV{'PBBUILDDIR'}/$pbpkg-$pbver.pkg all","Transforming $pbpkg","verbose");
    1065                 pb_system("cd $ENV{'PBBUILDDIR'} ;  gzip -9f $pbpkg-$pbver.pkg","Compressing $pbpkg-$pbver.pkg","verbose");
     1064                pb_system("cd $ENV{'PBBUILDDIR'}/$dtype ;  echo \"\" | pkgtrans -o -n -s $ENV{'PBBUILDDIR'}/$dtype $ENV{'PBBUILDDIR'}/$pbpkg-$pbver-$pbtag.pkg all","Transforming $pbpkg","verbose");
     1065                pb_system("cd $ENV{'PBBUILDDIR'} ;  gzip -9f $pbpkg-$pbver-$pbtag.pkg","Compressing $pbpkg-$pbver-$pbtag.pkg","verbose");
    10661066            } else {
    10671067                pb_log(0,"No pbconf/$ddir-$dver-$arch/pbbuild file found for $pbpkg-$pbver in \n");
  • devel/pb/lib/ProjectBuilder/Changelog.pm

    r642 r916  
    4848Function that generates the changelog used in build files, or for announcements (web, mailing-list, ...)
    4949
    50 It takes up to 9 parameters:
    51 The first parameter is the type of the distribution.
    52 The second parameter is the package name generated.
    53 The third parameter is the version of the package.
    54 The fourth parameter is the tag of the package.
    55 The fifth parameter is the suffix of the package.
    56 The sixth parameter is now unused.
    57 The seventh parameter is the file descriptor on which to write the changelog content.
    58 The eighth parameter is a flag in the configuration file indicating whether we want changelog expansion or not.
    59 The nineth parameter is the potential changelog file pbcl.
     50It takes 3 parameters:
     51The first parameter is the %pb hash containing packge info
     52The second parameter is the file descriptor on which to write the changelog content.
     53The third parameter is a flag in the configuration file indicating whether we want changelog expansion or not.
    6054
    6155=cut
     
    119113    if ($dtype eq "deb") {
    120114        if ($pbver !~ /^[0-9]/) {
    121             # dpkg-deb doesn't accept non digit versions. Prepending date
    122             my $ldate = strftime("%Y%m%d", @date);
    123             $pbver =~ s/^/$ldate/;
    124         }
    125         print $OUTPUT "$pbrealpkg ($pbver) unstable; urgency=low\n";
    126         print $OUTPUT "\n";
     115            # dpkg-deb doesn't accept non digit versions.
     116            # Prepending 0 in order to make updates easy hopefully
     117            $pbver =~ s/^/0/;
     118        }
     119        print $OUTPUT "$pbrealpkg ($pbver-$pbtag) unstable; urgency=low\n";
     120        print $OUTPUT "  * Updated to $pbver\n";
    127121        print $OUTPUT " -- $pbpackager->{$ENV{'PBPROJ'}}  $n2date\n\n\n";
    128122        }
     
    154148    chomp($date);
    155149    $date =~ s/\(([0-9-]+)\)/$1/;
    156     #pb_log(2,"**$date**\n";
     150    pb_log(3,"**Date:$date**\n");
    157151    $ndate = UnixDate($date,"%a", "%b", "%d", "%Y");
    158152    $n2date = UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
    159     #pb_log(2,"**$ndate**\n";
     153    pb_log(3,"**nDate:$ndate**\n");
     154
     155    pb_log(3,"**Ver:$ver**\n");
     156    if ($ver !~ /-/) {
     157        if ($first eq 1) {
     158            $ver2 = "$ver-$pbtag";
     159            $first = 0;
     160        } else {
     161            $ver2 = "$ver-1";
     162        }
     163    } else {
     164        $ver2 = $ver;
     165    }
     166    pb_log(3,"**Ver2:$ver2**\n");
    160167
    161168    if (($dtype eq "rpm") || ($dtype eq "fc")) {
    162         if ($ver !~ /-/) {
    163             if ($first eq 1) {
    164                 $ver2 = "$ver-$pbtag";
    165                 $first=0;
    166             } else {
    167                 $ver2 = "$ver-1";
    168             }
    169         } else {
    170             $ver2 = "$ver";
    171         }
    172169        print $OUTPUT "* $ndate $pbpackager->{$ENV{'PBPROJ'}} $ver2\n";
    173170        print $OUTPUT "- Updated to $ver\n";
    174171        }
    175172    if ($dtype eq "deb") {
    176         if ($ver !~ /^[0-9]/) {
    177             # dpkg-deb doesn't accept non digit versions. Prepending date
    178             my $ldate = strftime("%Y%m%d", @date);
    179             $ver =~ s/^/$ldate/;
    180         }
    181         print $OUTPUT "$pbrealpkg ($ver) unstable; urgency=low\n";
     173        if ($ver2 !~ /^[0-9]/) {
     174            # dpkg-deb doesn't accept non digit versions.
     175            # Prepending 0 in order to make updates easy hopefully
     176            $ver2 =~ s/^/0/;
     177        }
     178        print $OUTPUT "$pbrealpkg ($ver2) unstable; urgency=low\n";
    182179        print $OUTPUT "\n";
    183180        }
  • devel/pb/lib/ProjectBuilder/Env.pm

    r904 r916  
    533533filter PBDATE = \$pb->{'date'}
    534534
    535 # PBLOG is replaced by the changelog if value is yes
    536 #filter PBLOG = yes
    537 
    538535# PBPATCHSRC is replaced by the patches names if value is yes
    539536#filter PBPATCHSRC = yes
     
    563560#filter PBDESC = "Bla-Bla"
    564561
     562# PBSUMMARY contains a short single line description of the package
     563#filter PBSUMMARY = "Bla"
     564
    565565# PBURL contains the URL of the Web site of the project
    566566#filter PBURL = http://www.$ENV{'PBPROJ'}.org
     567
     568# PBLOG is replaced by the changelog if value is yes
     569# and should be last as when used we need the %pb hash filled
     570#filter PBLOG = yes
     571
    567572EOF
    568573            close(CONF);
     
    656661# PBREC is replaced by the list of recommandations
    657662#filter PBREC =
     663
     664EOF
     665            close(CONF);
     666            open(CONF,"> $ENV{'PBROOTDIR'}/pbfilter/debian-4.0.pbf") || die "Unable to create $ENV{'PBROOTDIR'}/pbfilter/debian-4.0.pbf";
     667            print CONF << "EOF";
     668#
     669# \$Id\$
     670#
     671# Filter for debian build
     672#
     673# PBDEBSTD is replaced by the Debian standard version
     674filter PBDEBSTD = 3.6.1
     675
     676# PBDEBCOMP is replaced by the Debian Compatibility value
     677filter PBDEBCOMP = 5
     678
     679EOF
     680            close(CONF);
     681            open(CONF,"> $ENV{'PBROOTDIR'}/pbfilter/debian-5.0.pbf") || die "Unable to create $ENV{'PBROOTDIR'}/pbfilter/debian-5.0.pbf";
     682            print CONF << "EOF";
     683#
     684# \$Id\$
     685#
     686# Filter for debian build
     687#
     688# PBDEBSTD is replaced by the Debian standard version
     689filter PBDEBSTD = 3.8.0
     690
     691# PBDEBCOMP is replaced by the Debian Compatibility value
     692filter PBDEBCOMP = 7
    658693
    659694EOF
     
    688723                print CONF << "EOF";
    689724Source: PBPKG
     725# http://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
    690726Section: PBGRP
    691727Priority: optional
    692728Maintainer: PBPACKAGER
    693729Build-Depends: debhelper (>= 4.2.20), PBDEP
    694 Standards-Version: 3.6.1
     730Standards-Version: PBDEBSTD
     731Vcs-Svn: svn://svn.PBPROJ.org/svn/PBVER/PBPKG
     732Vcs-Browser: http://trac.PBPROJ.org/browser/PBVER/PBPKG
     733Homepage: PBURL
    695734
    696735Package: PBPKG
    697736Architecture: amd64 i386 ia64
     737# http://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
    698738Section: PBGRP
    699739Priority: optional
     
    701741Recommends: PBREC
    702742Suggests: PBSUG
    703 Description:
     743Description: PBSUMMARY
    704744 PBDESC
    705745 .
    706  Homepage: PBURL
    707746
    708747EOF
     
    746785                open(CONF,"> $ENV{'PBROOTDIR'}/$pp/deb/compat") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/deb/compat";
    747786                print CONF << "EOF";
    748 4
     787DBDEBCOMP
    749788EOF
    750789                close(CONF);
     
    908947#%define srcname    PBPKG
    909948
    910 Summary:        bla-bla
     949Summary:        PBSUMMARY
    911950Summary(fr):    french bla-bla
    912951
  • devel/pb/lib/ProjectBuilder/Filter.pm

    r585 r916  
    156156            eval { $tmp =~ s/(\$\w+-\>\{\'\w+\'\})/$1/eeg };
    157157            eval { $tmp =~ s/(\$\w+)/$1/eeg };
     158            if (($s =~ /^PBDESC$/) && ($line =~ /^ PBDESC/)) {
     159                # if on debian, we need to preserve the space before each desc line
     160                pb_log(3,"*** DEBIAN CASE ADDING SPACE ***\n");
     161                $tmp =~ s/\$\//\$\/ /g;
     162                pb_log(3,"*** tmp:$tmp ***\n");
     163            }
    158164            eval { $tmp =~ s/(\$\/)/$1/eeg };
    159         # special case for ChangeLog only for pb
    160165        } elsif (($s =~ /^PBLOG$/) && ($line =~ /^PBLOG$/)) {
     166            # special case for ChangeLog only for pb
    161167            pb_log(3,"DEBUG filtering PBLOG\n");
    162168            pb_changelog($pb, \*DEST, $tmp);
  • pbconf/devel/ProjectBuilder/deb/compat

    r238 r916  
    1 4
     1PBDEBCOMP
  • pbconf/devel/ProjectBuilder/deb/control

    r889 r916  
    33Priority: optional
    44Maintainer: PBPACKAGER
    5 Build-Depends: debhelper (>= 4.2.20)
    6 Standards-Version: 3.6.1
     5Build-Depends: debhelper (>= 4.2.20), fakeroot, dpkg-dev (>= 1.13)
     6Standards-Version: PBDEBSTD
     7Vcs-Svn: svn://svn.project-builder.org/mondo/svn/pb/PBVER/PBPKG
     8Vcs-Browser: http://trac.project-builder.org/browser/PBVER/PBPKG
     9Homepage: PBURL
    710
    811Package: PBREALPKG
     
    1316Recommends:
    1417Suggests:
    15 Description:
    16  Reusable perl function from the project-builder.org project
     18Description: PBSUMMARY
     19 PBDESC
    1720 .
    18  Homepage: PBURL
    1921
  • pbconf/devel/ProjectBuilder/deb/rules

    r867 r916  
    3535
    3636        # Add here commands to compile the package.
    37         perl Makefile.PL CONFDIR=/etc/pb
     37        perl Makefile.PL CONFDIR=/etc/pb INSTALLDIRS=vendor
    3838        $(MAKE)
    3939        touch $@
  • pbconf/devel/ProjectBuilder/pbcl

    r886 r916  
    44
    55devel (2030-01-01)
     6- TBD
    67
    780.9.8 (2009-10-24)
     
    1112
    12130.9.7.1 (2009-07-05)
    13 - Fix a critical bug on pb, where a module was loaded optionaly with use instead of require (prevents update of VMs) (Bruno C
    14 ornec)
     14- Fix a critical bug on pb, where a module was loaded optionaly with use instead of require (prevents update of VMs) (Bruno Cornec)
    1515
    16160.9.7 (2009-07-04)
  • pbconf/devel/ProjectBuilder/pbfilter/all.pbf

    r871 r916  
    1 filter PBDESC = ProjectBuilder is a perl module providing set of functions$/to help develop perl projects and deal with different Operating systems (Linux distributions, Solaris, ...).
     1filter PBDESC = ProjectBuilder is a perl module providing set of functions$/to help develop packages for projects and deal$/with different Operating systems (Linux distributions, Solaris, ...).$/It implements a Continuous Packaging approach.
    22# Summary of package
    3 filter PBSUMMARY = Perl module providing support and deal with OSes (Linux/Solaris/...)
     3filter PBSUMMARY = Perl module providing multi-OSes (Linux/Solaris/...) Continuous Packaging
  • pbconf/devel/ProjectBuilder/pbfilter/deb.pbf

    r301 r916  
    66
    77# PBGRP is replaced by the RPM group of apps
    8 filter PBGRP = Admin
     8filter PBGRP = perl
    99
  • pbconf/devel/ProjectBuilder/pkg/pkginfo

    r912 r916  
    22# $Id$
    33#
    4 PKG="PBREALPKG"
     4PKG="PBPKG"
    55NAME="PBSUMMARY"
    66VERSION="PBVER"
     
    1111VENDOR="PBPACKAGER"
    1212HOTLINE="PBURL"
    13 BASEDIR="/"
     13BASEDIR=/
  • pbconf/devel/ProjectBuilder/rpm/perl-ProjectBuilder.spec

    r889 r916  
    33#
    44%define perlvendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
    5 %define srcname PBPKG
     5%define srcname PBPKG
    66
    77Summary:    PBSUMMARY
     
    1717BuildRoot:  %{_tmppath}/%{srcname}-%{version}-%{release}-root-%(id -u -n)
    1818BuildArch:  noarch
    19 Requires:   perl >= 5.8.4, PBDEP
     19Requires:   perl >= 5.8.4,PBDEP
    2020
    2121%description
  • pbconf/devel/pbfilter/all.pbf

    r889 r916  
    1616filter PBDATE = $pb->{'date'}
    1717
    18 # PBLOG is replaced by the changelog if value is yes
    19 filter PBLOG = yes
    20 
    2118# PBTAG is replaced by the tag ($pb->{'tag'} in code)
    2219filter PBTAG = $pb->{'tag'}
     
    3431filter PBPACKAGER = $pb->{'packager'}
    3532
     33# PBLOG is replaced by the changelog if value is yes and should be last
     34# as when used we need the %pb hash filled
     35filter PBLOG = yes
     36
    3637filter PBURL = http://trac.project-builder.org
  • pbconf/devel/project-builder/deb/compat

    r238 r916  
    1 4
     1PBDEBCOMP
  • pbconf/devel/project-builder/deb/control

    r889 r916  
    33Priority: optional
    44Maintainer: PBPACKAGER
    5 Build-Depends: debhelper (>= 4.2.20)
    6 Standards-Version: 3.6.1
     5Build-Depends: debhelper (>= 4.2.20), fakeroot, dpkg-dev (>= 1.13)
     6Standards-Version: PBDEBSTD
     7Vcs-Svn: svn://svn.project-builder.org/mondo/svn/pb/PBVER/PBPKG
     8Vcs-Browser: http://trac.project-builder.org/browser/PBVER/PBPKG
     9Homepage: PBURL
    710
    811Package: PBPKG
     
    1013Section: PBGRP
    1114Priority: optional
    12 Depends: ${shlibs:Depends}, ${misc:Depends}, libdate-manip-perl, libfile-mimeinfo-perl, libmail-sendmail-perl, fakeroot, dpkg-dev, libprojectbuilder-perl
     15Depends: ${shlibs:Depends}, ${misc:Depends}, libdate-manip-perl, libfile-mimeinfo-perl, libmail-sendmail-perl, libprojectbuilder-perl
    1316Recommends:
    1417Suggests: libdbi-perl
    15 Description:
    16  Project Builder aka pb is a tool to produce packages for multiple
    17  distributions.
    18  It does that by minimizing the duplication of information required
    19  and a set a very simple configuration files.
     18Description: PBSUMMARY
     19 PBDESC
    2020 .
    21  Homepage: PBURL
    2221
  • pbconf/devel/project-builder/deb/rules

    r244 r916  
    3535
    3636        # Add here commands to compile the package.
    37         perl Makefile.PL
     37        perl Makefile.PL INSTALLDIRS=vendor
    3838        $(MAKE)
    3939        touch $@
  • pbconf/devel/project-builder/pbcl

    r886 r916  
    44
    55devel (2030-01-01)
     6- TBD
    67
    780.9.8 (2009-10-24)
     
    1213
    13140.9.7.1 (2009-07-05)
    14 - Fix a critical bug on pb, where a module was loaded optionaly with use instead of require (prevents update of VMs) (Bruno C
    15 ornec)
     15- Fix a critical bug on pb, where a module was loaded optionaly with use instead of require (prevents update of VMs) (Bruno Cornec)
    1616
    17170.9.7 (2009-07-04)
  • pbconf/devel/project-builder/pbfilter/all.pbf

    r884 r916  
    1 filter PBDESC = Project Builder aka pb helps producing packages$/for multiple distributions. It does that by minimizing$/the duplication of information required and$/a set a very simple configuration files.
    2 filter PBSUMMARY = Project Builder aka pb helps producing packages for multiple distributions.
     1filter PBDESC = ProjectBuilder aka pb helps producing packages$/for multiple OSes (Linux distributions, Solaris, ...).$/It does that by minimizing$/the duplication of information required and$/a set a very simple configuration files.$/It implements a Continuous Packaging approach.
     2# Summary of package
     3filter PBSUMMARY = Project Builder helps providing multi-OSes Continuous Packaging
  • pbconf/devel/project-builder/pbfilter/deb.pbf

    r301 r916  
    66
    77# PBGRP is replaced by the RPM group of apps
    8 filter PBGRP = Admin
     8filter PBGRP = admin
    99
  • pbconf/devel/project-builder/pkg/pkginfo

    r889 r916  
    22# $Id$
    33#
    4 PKG="PBREALPKG"
     4PKG="PBPKG"
    55NAME="PBSUMMARY"
    66VERSION="PBVER"
    77ARCH="all"
    8 CATEGORY="utility"
     8CATEGORY="application"
    99DESC="PBDESC"
    1010EMAIL="PBPACKAGER"
    1111VENDOR="PBPACKAGER"
    1212HOTLINE="PBURL"
     13BASEDIR=/
  • pbconf/devel/project-builder/rpm/project-builder.spec

    r889 r916  
    55%define srcname PBPKG
    66
    7 Summary:    Project Builder aka pb is a tool to produce packages for multiple distributions
     7Summary:    PBSUMMARY
    88Summary(fr):    Project Builder ou pb produit des paquets pour diverses distributions
    99
     
    1717BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    1818BuildArch:  noarch
    19 Requires:   perl >= 5.8.4, perl-DateManip, perl-ProjectBuilder, rpm-build, PBDEP
     19Requires:   perl >= 5.8.4,perl-DateManip,perl-ProjectBuilder,rpm-build,PBDEP
    2020
    2121%description
Note: See TracChangeset for help on using the changeset viewer.