Changeset 1156 in ProjectBuilder
- Timestamp:
- Jan 13, 2011, 1:18:37 PM (14 years ago)
- Location:
- devel
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/bin/pbdistrocheck
r1111 r1156 144 144 $pbsuf = "Suffix:\t$pbsuf"; 145 145 $pbupd = "Update:\t$pbupd"; 146 $pbins = "Install:\t$pb upd";146 $pbins = "Install:\t$pbins"; 147 147 $arch = "Arch:\t$arch"; 148 148 print "Project-Builder tuple:\n"; -
devel/pb-modules/etc/pb.conf
r1155 r1156 33 33 osrelfile mandriva = /etc/mandriva-release 34 34 35 # Ma ndrake = 10.1,10.236 osrelfile ma ndrake = /etc/mandrakelinux-release35 # Mageia TBC 36 osrelfile mageia = /etc/mageia-release 37 37 38 38 # Fedora >= 4 … … 83 83 # Here are the ambiguous file association 84 84 # E.g. the file /etc/redhat-release is found on multiple distro such as redhat, rhel, centos, mandrake, vmware 85 # 86 87 # Mandrake <= 10.1 88 osrelambfile mandrake = /etc/mandrake-release 85 # These files should no be links 86 # 87 88 # Mandrake >= 10.1 89 osrelambfile mandrake = /etc/mandrakelinux-release 89 90 90 91 # Debian >= 3.1 … … 117 118 osrelexpr slackware = S[^ ]* (.+)$ 118 119 osrelexpr mandriva = Mandr[^ ]* [^ ]* release (.+) \( 119 osrelexpr mandrake = Mandr akelinuxrelease (.+) \(120 osrelexpr mandrake = Mandr[^ ]* release (.+) \( 120 121 osrelexpr fedora = Fedora .*release (\d+) \( 121 122 osrelexpr vmware = VMware ESX Server (\d+) \( … … 394 395 osperldep mandrake-10.1 = Date-Manip 395 396 ospkgdep mandrake-10.1 = rpm-build,wget,patch,make,ntp-client,perl-File-MimeInfo,diffutils 397 ospkgdep mandrake-10.2 = rpm-build,wget,patch,make,ntp-client,perl-File-MimeInfo,diffutils,perl-DateManip 396 398 osperldep md = 397 399 ospkgdep md = rpm-build,wget,patch,make,ntp-client,perl-File-MimeInfo,perl-File-BaseDir,perl-Date-Manip,diffutils -
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1148 r1156 25 25 # Inherit from the "Exporter" module which handles exporting functions. 26 26 27 use vars qw($VERSION @ISA @EXPORT);27 use vars qw($VERSION $REVISION @ISA @EXPORT); 28 28 use Exporter; 29 29 … … 40 40 our @ISA = qw(Exporter); 41 41 our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init pb_get_arch pb_check_requirements pb_check_req $pbdebug $pbLOG $pbdisplaytype $pblocale); 42 $VERSION = "$ProjectBuilder::Version::VERSION";42 ($VERSION,$REVISION) = pb_version_init(); 43 43 44 44 =pod -
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r1148 r1156 17 17 # Inherit from the "Exporter" module which handles exporting functions. 18 18 19 use vars qw($VERSION @ISA @EXPORT);19 use vars qw($VERSION $REVISION @ISA @EXPORT); 20 20 use Exporter; 21 21 … … 25 25 our @ISA = qw(Exporter); 26 26 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_get pb_conf_get_if); 27 $VERSION = "$ProjectBuilder::Version::VERSION";27 ($VERSION,$REVISION) = pb_version_init(); 28 28 29 29 # Global hash of conf files -
devel/pb-modules/lib/ProjectBuilder/Display.pm
r1148 r1156 23 23 # Inherit from the "Exporter" module which handles exporting functions. 24 24 25 use vars qw($VERSION @ISA @EXPORT);25 use vars qw($VERSION $REVISION @ISA @EXPORT); 26 26 use Exporter; 27 27 … … 35 35 our @ISA = qw(Exporter); 36 36 our @EXPORT = qw(pb_display pb_display_init $pbdisplaytype $pblocale); 37 $VERSION = "$ProjectBuilder::Version::VERSION";37 ($VERSION,$REVISION) = pb_version_init(); 38 38 39 39 =pod -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1148 r1156 19 19 # Inherit from the "Exporter" module which handles exporting functions. 20 20 21 use vars qw($VERSION @ISA @EXPORT);21 use vars qw($VERSION $REVISION @ISA @EXPORT); 22 22 use Exporter; 23 23 … … 27 27 our @ISA = qw(Exporter); 28 28 our @EXPORT = qw(pb_distro_conffile pb_distro_init pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_get_param); 29 $VERSION = "$ProjectBuilder::Version::VERSION";29 ($VERSION,$REVISION) = pb_version_init(); 30 30 31 31 =pod … … 156 156 This function returns a list of 2 parameters indicating the distribution name and version of the underlying Linux distribution. The value of those 2 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 157 157 158 On my home machine it would currently report ("mandriva","20 09.0").158 On my home machine it would currently report ("mandriva","2010.2"). 159 159 160 160 =cut -
devel/pb-modules/lib/ProjectBuilder/Version.pm
r1148 r1156 11 11 # Inherit from the "Exporter" module which handles exporting functions. 12 12 13 use vars qw($VERSION @ISA @EXPORT);13 use vars qw($VERSION $REVISION @ISA @EXPORT); 14 14 use Exporter; 15 15 … … 19 19 our @EXPORT = qw(pb_version_init); 20 20 21 $VERSION = 'PBVER'; 21 $VERSION = "PBVER"; 22 $REVISION = "PBREV"; 22 23 23 24 sub pb_version_init { 24 25 25 my $projectbuilderver = "PBVER";26 my $projectbuilderrev = "PBREV";26 my $projectbuilderver = $VERSION; 27 my $projectbuilderrev = $REVISION; 27 28 28 29 return($projectbuilderver,$projectbuilderrev); -
devel/pb/bin/pb
r1155 r1156 1751 1751 pb_system("sudo chown $UID $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$","Adapt owner in $tdir to $UID"); 1752 1752 } 1753 # return here to avoid breaking the load on VMs/VEs in case of a bad one1754 1753 if (not -f "$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$") { 1755 1754 pb_log(0,"Problem with VM $v on $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"); 1756 return; 1757 } 1758 open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"; 1759 my $src = <KEEP>; 1760 chomp($src); 1761 close(KEEP); 1762 unlink("$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"); 1763 1764 $src =~ s/^ *//; 1765 pb_mkdir_p("$ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1766 # Change pgben to make the next send2target happy 1767 my $made = ""; 1768 1769 # For VM we don't want shell expansion to hapen locally but remotely 1770 my $delim = '\''; 1771 if ($cmt =~ /^VEbuild/) { 1772 # For VE we need to support shell expansion locally 1773 $delim = ""; 1774 } 1775 1776 open(KEEP,"> $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}") || die "Unable to write $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}"; 1777 foreach my $p (split(/ +/,$src)) { 1778 my $j = basename($p); 1779 pb_system("$cpcmd $cp2target/$delim$p$delim $ENV{'PBBUILDDIR'}/$odir/$over/$oarch 2> /dev/null","Recovery of package $j in $ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1780 $made="$made $odir/$over/$oarch/$j"; # if (($dtype ne "rpm") || ($j !~ /.src.rpm$/)); 1781 } 1782 print KEEP "$made\n"; 1783 close(KEEP); 1784 pb_system("$shcmd \"rm -rf $tdir $bdir\"","$cmt cleanup"); 1785 1786 # Sign packages locally 1787 if ($dtype eq "rpm") { 1755 } else { 1756 open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"; 1757 my $src = <KEEP>; 1758 chomp($src); 1759 close(KEEP); 1760 unlink("$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"); 1761 1762 $src =~ s/^ *//; 1763 pb_mkdir_p("$ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1764 # Change pgben to make the next send2target happy 1765 my $made = ""; 1766 1767 # For VM we don't want shell expansion to hapen locally but remotely 1768 my $delim = '\''; 1769 if ($cmt =~ /^VEbuild/) { 1770 # For VE we need to support shell expansion locally 1771 $delim = ""; 1772 } 1773 1774 open(KEEP,"> $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}") || die "Unable to write $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}"; 1775 foreach my $p (split(/ +/,$src)) { 1776 my $j = basename($p); 1777 pb_system("$cpcmd $cp2target/$delim$p$delim $ENV{'PBBUILDDIR'}/$odir/$over/$oarch 2> /dev/null","Recovery of package $j in $ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1778 $made="$made $odir/$over/$oarch/$j"; # if (($dtype ne "rpm") || ($j !~ /.src.rpm$/)); 1779 } 1780 print KEEP "$made\n"; 1781 close(KEEP); 1782 pb_system("$shcmd \"rm -rf $tdir $bdir\"","$cmt cleanup"); 1783 1784 # Sign packages locally 1785 if ($dtype eq "rpm") { 1788 1786 #pb_system("rpm --addsign --define \"_signature gpg\" --define \"_gpg_name $ENV{'PBPACKAGER'}\" --define \"__gpg_sign_cmd /usr/bin/gpg --batch --no-verbose --no-armor --no-tty --no-secmem-warning -sbo %{__signature_filename} %{__plaintext_filename} --use-agent\" $made","Signing RPM packages packages"); 1789 } elsif ($dtype eq "deb") {1787 } elsif ($dtype eq "deb") { 1790 1788 #pb_system("debsign $made","Signing DEB packages"); 1791 } else { 1792 pb_log(0,"I don't know yet how to sign packages for type $dtype.\nPlease give feedback to dev team\n"); 1793 } 1794 1795 # We want to send them to the ssh account so overwrite what has been done before 1796 undef $pbaccount; 1797 pb_log(2,"Before sending pkgs, vmexist: $vmexist, vmpid: $vmpid\n"); 1798 pb_send2target("Packages",$odir."-".$over."-".$oarch,$vmexist,$vmpid); 1799 pb_rm_rf("$ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1789 } else { 1790 pb_log(0,"I don't know yet how to sign packages for type $dtype.\nPlease give feedback to dev team\n"); 1791 } 1792 1793 # We want to send them to the ssh account so overwrite what has been done before 1794 undef $pbaccount; 1795 pb_log(2,"Before sending pkgs, vmexist: $vmexist, vmpid: $vmpid\n"); 1796 pb_send2target("Packages",$odir."-".$over."-".$oarch,$vmexist,$vmpid); 1797 pb_rm_rf("$ENV{'PBBUILDDIR'}/$odir/$over/$oarch"); 1798 } 1800 1799 } 1801 1800 unlink("$ENV{'PBDESTDIR'}/pbscript.$$") if ($cmt =~ /^V[ME]/); … … 2584 2583 # They are appended at the end. 2585 2584 2585 # Define mandatory global vars 2586 2586 our $pbdebug; 2587 2587 our $pbLOG; … … 2597 2597 ($vmexist,$vmpid) = pb_launchv($vtype,$v,0,0,0); 2598 2598 2599 my $keyfile; 2600 my $nport; 2601 my $vmhost; 2602 2599 2603 if ($vtype eq "vm") { 2600 2604 # Prepare the key to be used and transfered remotely 2601 my$keyfile = pb_ssh_get(1);2605 $keyfile = pb_ssh_get(1); 2602 2606 2603 my ($vmhost,$vmport,$vmntp) = pb_conf_get("vmhost","vmport","vmntp"); 2604 my $nport = pb_get_port($vmport->{$ENV{'PBPROJ'}}); 2607 my ($vmport,$vmntp); 2608 ($vmhost,$vmport,$vmntp) = pb_conf_get("vmhost","vmport","vmntp"); 2609 $nport = pb_get_port($vmport->{$ENV{'PBPROJ'}}); 2605 2610 2606 2611 # Skip that VM if something went wrong … … 2837 2842 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 2838 2843 die "Unable to get package list" if (not defined $pkg); 2839 my ($vepath) = pb_conf_get("vepath");2840 2844 2841 2845 # We consider 2 specific packages … … 2845 2849 my ($pbver1,$tmp1) = split(/-/,$vertag1); 2846 2850 my ($pbver2,$tmp2) = split(/-/,$vertag2); 2847 # Copy inside the VM 2848 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch/tmp"); 2849 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch/tmp"); 2851 # Copy inside the VE 2852 if ($vtype eq "ve") { 2853 my ($vepath) = pb_conf_get("vepath"); 2854 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch/tmp"); 2855 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch/tmp"); 2856 } else { 2857 pb_system("scp -i $keyfile -p -o UserKnownHostsFile=/dev/null -P $nport $ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1.tar.gz $ENV{'PBDESTDIR'}/project-builder-$pbver2.tar.gz root\@$vmhost->{$ENV{'PBPROJ'}}:/tmp","Copying local project files to $vtype."); 2858 } 2850 2859 $cmdget = "mv /tmp/ProjectBuilder-$pbver1.tar.gz ProjectBuilder-latest.tar.gz ; mv /tmp/project-builder-$pbver2.tar.gz project-builder-latest.tar.gz"; 2851 2860 } else { … … 2904 2913 } 2905 2914 2906 # Adds pb_distro_init and all functions needed from ProjectBuilder::Distribution and Base2915 # Adds pb_distro_init and all functions needed from ProjectBuilder::Distribution, Conf and Base 2907 2916 foreach my $d (@INC) { 2908 2917 my @f = ("$d/ProjectBuilder/Base.pm","$d/ProjectBuilder/Distribution.pm","$d/ProjectBuilder/Conf.pm"); … … 2921 2930 } 2922 2931 } 2932 # Use a fake pb_version_init version here 2933 print SCRIPT << "EOF"; 2934 sub pb_version_init { 2935 2936 return("$projectbuilderver","$projectbuilderrev"); 2937 } 2938 1; 2939 EOF 2923 2940 close(SCRIPT); 2924 2941 chmod 0755,"$pbscript"; -
devel/pb/lib/ProjectBuilder/CMS.pm
r1153 r1156 25 25 # Inherit from the "Exporter" module which handles exporting functions. 26 26 27 use vars qw($VERSION @ISA @EXPORT);27 use vars qw($VERSION $REVISION @ISA @EXPORT); 28 28 use Exporter; 29 29 … … 33 33 our @ISA = qw(Exporter); 34 34 our @EXPORT = qw(pb_cms_init pb_cms_export pb_cms_get_uri pb_cms_copy pb_cms_checkout pb_cms_up pb_cms_checkin pb_cms_isdiff pb_cms_get_pkg pb_cms_get_real_pkg pb_cms_compliant pb_cms_log pb_cms_add); 35 $VERSION = "$ProjectBuilder::Version::VERSION";35 ($VERSION,$REVISION) = pb_version_init(); 36 36 37 37 =pod -
devel/pb/lib/ProjectBuilder/Changelog.pm
r1148 r1156 23 23 # Inherit from the "Exporter" module which handles exporting functions. 24 24 25 use vars qw($VERSION @ISA @EXPORT);25 use vars qw($VERSION $REVISION @ISA @EXPORT); 26 26 use Exporter; 27 27 … … 31 31 our @ISA = qw(Exporter); 32 32 our @EXPORT = qw(pb_changelog); 33 $VERSION = "$ProjectBuilder::Version::VERSION";33 ($VERSION,$REVISION) = pb_version_init(); 34 34 35 35 =pod -
devel/pb/lib/ProjectBuilder/Env.pm
r1148 r1156 26 26 # Inherit from the "Exporter" module which handles exporting functions. 27 27 28 use vars qw($VERSION @ISA @EXPORT);28 use vars qw($VERSION $REVISION @ISA @EXPORT); 29 29 use Exporter; 30 30 … … 34 34 our @ISA = qw(Exporter); 35 35 our @EXPORT = qw(pb_env_init pb_env_init_pbrc); 36 $VERSION = "$ProjectBuilder::Version::VERSION";36 ($VERSION,$REVISION) = pb_version_init(); 37 37 38 38 =pod -
devel/pb/lib/ProjectBuilder/Filter.pm
r1148 r1156 24 24 # Inherit from the "Exporter" module which handles exporting functions. 25 25 26 use vars qw($VERSION @ISA @EXPORT);26 use vars qw($VERSION $REVISION @ISA @EXPORT); 27 27 use Exporter; 28 28 … … 32 32 our @ISA = qw(Exporter); 33 33 our @EXPORT = qw(pb_get_filters pb_filter_file_pb pb_filter_file_inplace pb_filter_file); 34 $VERSION = "$ProjectBuilder::Version::VERSION";34 ($VERSION,$REVISION) = pb_version_init(); 35 35 36 36 =pod
Note:
See TracChangeset
for help on using the changeset viewer.