- Timestamp:
- May 12, 2012, 2:22:11 AM (13 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf
r1522 r1523 119 119 osambiguous debian = debian,ubuntu 120 120 osambiguous suse = suse,sles,opensuse 121 osambiguous redhat = redhat,rhel,centos,mandrake,mandriva,vmware,oel 121 osambiguous redhat = redhat,rhel,centos,mandrake,mandriva,vmware,oel,scilinux 122 122 osambiguous lsb = ubuntu,lsb 123 123 osambiguous os-release = opensuse,fedora,arch … … 138 138 #osrelexpr rhel = Red Hat (?:Enterprise Linux|Linux Advanced Server) .*release ([0-9.]+).* \( 139 139 osrelexpr rhel = Red Hat (?:Enterprise Linux|Linux Advanced Server) .*release ([0-9]+).* \( 140 # If you want to differentiate .release for CentOS 141 #osrelexpr centos = .*CentOS .*release ([0-9.]+) 140 142 osrelexpr centos = .*CentOS .*release ([0-9]).* 141 osrelexpr oel = Oracle Linux Server ).*release ([0-9]+).* \(143 osrelexpr oel = Oracle Linux Server .*release ([0-9]+).* \( 142 144 osrelexpr redhat = Red Hat Linux release (.+) \( 145 # If you want to differentiate .release for Scientific 146 #osrelexpr scilinux = Scientific Linux release ([0-9\.]+)\b 147 osrelexpr scilinux = Scientific Linux release ([0-9]+).* 143 148 osrelexpr sles = SUSE .* Enterprise Server (\d+) \( 144 149 osrelexpr suse = SUSE LINUX (\d.+) \( … … 181 186 osfamily asianux = rh 182 187 osfamily centos = rh 188 osfamily scilinux = rh 183 189 osfamily mandrake = md 184 190 osfamily mandriva = md … … 274 280 osremovedotinver redhat = true 275 281 282 # For that OS, we want to consider all previous minor versions 283 # for configuration items and not just the precise version. 284 # E.g. with t for rhel when dealing with 6.2 we will also look at 6.1 and 6.0 285 # Should be in sync wirh regular expressions from osrelexpr upper 286 #osuseminorrel rhel = true 287 276 288 # These deps are needed before setupvm|ve can be run. 277 289 # Install them with your distribution in VM or automatically in VE … … 311 323 # 312 324 # CentOS-5.6 moved python-libs into a separate package. List it or otherwise we can't run yum. 313 #314 325 rbsmindep centos-5 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,centos-release,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,expat,filesystem,findutils,gawk,gdbm,glib2,glibc,glibc-common,grep,info,initscripts,iproute,iputils,krb5-libs,libacl,libattr,libcap,libgcc,libidn,libselinux,libsepol,libstdc++,libsysfs,libtermcap,libxml2,libxml2-python,mcstrans,mingetty,mktemp,module-init-tools,ncurses,neon,net-tools,nss,nspr,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-iniparse,python-libs,python-sqlite,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib 326 # If you distinguish versions use the previous one for 5.6+ and that next one for previous 327 #rbsmindep centos-5.2 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,centos-release,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,expat,filesystem,findutils,gawk,gdbm,glib2,glibc,glibc-common,grep,info,initscripts,iproute,iputils,keyutils-libs,krb5-libs,libacl,libattr,libcap,libgcc,libidn,libselinux,libsepol,libstdc++,libsysfs,libtermcap,libxml2,libxml2-python,mcstrans,mingetty,mktemp,module-init-tools,ncurses,neon,net-tools,nss,nspr,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-iniparse,python-sqlite,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib 315 328 rbsmindep centos-5-ia64 = MAKEDEV,SysVinit,audit-libs,bash,beecrypt,bzip2-libs,centos-release,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,expat,filesystem,findutils,gawk,gdbm,glib2,glibc,glibc-common,grep,info,initscripts,iproute,iputils,krb5-libs,libacl,libattr,libcap,libgcc,libidn,libselinux,libsepol,libstdc++,libsysfs,libtermcap,libxml2,libxml2-python,mcstrans,mingetty,mktemp,module-init-tools,ncurses,neon,net-tools,nss,nspr,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-libs,python-sqlite,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib 316 329 # … … 321 334 # 322 335 rbsmindep rhel-6 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,bzip2-libs,c-ares,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,e2fsprogs,e2fsprogs-libs,elfutils-libelf,expat,fedora-release,fedora-release-notes,file,file-libs,filesystem,findutils,gamin,gawk,gdbm,glib2,glibc,glibc-common,gnupg2,gpgme,grep,info,initscripts,iproute,iputils,keyutils-libs,krb5-libs,libacl,libattr,libcap,libcom_err,libcurl,libgcc,libgcrypt,libgpg-error,libidn,libselinux,libsepol,libssh2,libstdc++,libusb,libxml2,linux-atm-libs,logrotate,lua,mingetty,module-init-tools,ncurses,ncurses-base,ncurses-libs,net-tools,nspr,nss,nss-softokn,nss-softokn-freebl,nss-util,openldap,openssl,pam,passwd,pcre,pinentry,popt,procps,psmisc,pth,pygpgme,python,python-iniparse,python-libs,python-pycurl,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,rsyslog,sed,setup,shadow-utils,sqlite,sysvinit-tools,tzdata,udev,upstart,util-linux-ng,vim-minimal,xz-libs,yum,yum-metadata-parser,zlib 336 # 323 337 rbsmindep oel-6 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,bzip2-libs,c-ares,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,e2fsprogs,e2fsprogs-libs,elfutils-libelf,expat,fedora-release,fedora-release-notes,file,file-libs,filesystem,findutils,gamin,gawk,gdbm,glib2,glibc,glibc-common,gnupg2,gpgme,grep,info,initscripts,iproute,iputils,keyutils-libs,krb5-libs,libacl,libattr,libcap,libcom_err,libcurl,libgcc,libgcrypt,libgpg-error,libidn,libselinux,libsepol,libssh2,libstdc++,libusb,libxml2,linux-atm-libs,logrotate,lua,mingetty,module-init-tools,ncurses,ncurses-base,ncurses-libs,net-tools,nspr,nss,nss-softokn,nss-softokn-freebl,nss-util,openldap,openssl,pam,passwd,pcre,pinentry,popt,procps,psmisc,pth,pygpgme,python,python-iniparse,python-libs,python-pycurl,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,rsyslog,sed,setup,shadow-utils,sqlite,sysvinit-tools,tzdata,udev,upstart,util-linux-ng,vim-minimal,xz-libs,yum,yum-metadata-parser,zlib 338 # 339 rbsmindep scilinux-6.0 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,bzip2-libs,c-ares,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,e2fsprogs,e2fsprogs-libs,elfutils-libelf,expat,file,file-libs,filesystem,findutils,gamin,gawk,gdbm,glib2,glibc,glibc-common,gnupg2,gpgme,grep,info,initscripts,iproute,iputils,keyutils-libs,krb5-libs,libacl,libattr,libcap,libcom_err,libcurl,libgcc,libgcrypt,libgpg-error,libidn,libselinux,libsepol,libssh2,libstdc++,libusb,libxml2,logrotate,lua,mingetty,module-init-tools,ncurses,ncurses-base,ncurses-libs,net-tools,nspr,nss,nss-softokn,nss-softokn-freebl,nss-util,openldap,openssl,pam,passwd,pcre,pinentry,popt,procps,psmisc,pth,pygpgme,python,python-iniparse,python-libs,python-pycurl,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,rsyslog,sed,setup,shadow-utils,sl-release,sqlite,sysvinit-tools,tzdata,udev,upstart,util-linux-ng,vim-minimal,xz-libs,yum,yum-metadata-parser,zlib 324 340 # 325 341 rbsmindep opensuse-10.1 = aaa_base,audit-libs,bash,boost,bzip2,coreutils,cpio,cracklib,curl,cyrus-sasl,db,dbus-1,dbus-1-glib,device-mapper,diffutils,dirmngr,e2fsprogs,ethtool,expat,filesystem,fillup,findutils,gawk,gdbm,glib2,glibc,gpg2,grep,gzip,hal,info,insserv,krb5,libacl,libattr,libcom_err,libicu,libgcc,libgcrypt,libgpg-error,libidn,libksba,libnscd,libreiserfs,libstdc++,libusb,libxcrypt,libxml2,libxml2-python,libzio,libzypp,mingetty,module-init-tools,ncurses,neon,net-tools,openldap2-client,openslp,pam,pam-modules,parted,pciutils,pcre,perl,permissions,pinentry,pmtools,popt,procps,psmisc,pwdutils,python,python-elementtree,python-sqlite,python-urlgrabber,rpm,rpm-python,sed,setserial,sqlite,suse-release,sysvinit,termcap,udev,util-linux,yum,zlib … … 378 394 rbsmirrorsrv centos-5-ia64 = http://dev.centos.org/~z00dax/ia64/c5-wip/ia64/RPMS/ 379 395 rbsmirrorsrv centos-6 = http://mirrors.kernel.org/centos/$pbos->{'version'}/os/$pbos->{'arch'}/Packages 396 rbsmirrorsrv scilinux = http://ftp.scientificlinux.org/linux/scientific/$pbos->{'version'}/$pbos->{'arch'}/os/Packages 380 397 #rbsmirrorsrv rhel = 381 398 # pbos->{'arch'} == i586 for i386 repo … … 561 578 oscodename ubuntu-11.04 = natty 562 579 oscodename ubuntu-11.10 = oneiric 580 oscodename ubuntu-12.04 = precise 563 581 564 582 # Commands needed on the underlying system -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1521 r1523 132 132 $pbos->{'family'} = pb_distro_get_param($pbos,pb_conf_get("osfamily")); 133 133 $pbos->{'type'} = pb_distro_get_param($pbos,pb_conf_get("ostype")); 134 ($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'} ) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd"));134 ($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'},$pbos->{'useminor'}) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd","osuseminorrel")); 135 135 #($pbos->{'family'},$pbos->{'type'},$pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'}) = pb_distro_get_param($pbos,pb_conf_get("osfamily","ostype","os","osins","ossuffix","osnover","osremovedotinver","osupd")); 136 136 … … 594 594 } 595 595 596 =item B<pb_pbos_to_keylist> 597 598 Given a pbos object and the generic key, get the list of possible keys for looking up variable for 599 filter names. The list will be sorted most-specific to least specific. 600 601 =cut 602 603 sub pb_pbos_to_keylist ($$) { 604 605 my ($pbos, $generic) = @_; 606 607 foreach my $key (qw/name version arch family type os/) { 608 confess "missing pbos key $key" unless defined $pbos->{$key}; 609 } 610 611 my @keylist = ("$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}", "$pbos->{'name'}-$pbos->{'version'}"); 612 613 # Loop to include also previous minor versions 614 # if configured so 615 if (($pbos{'useminor'} eq "true") && ($pbos->{version} =~ /^(\d+)\.(\d+)$/o)) { 616 my ($major, $minor) = ($1, $2); 617 while ($minor > 0) { 618 $minor--; 619 push (@keylist, "$pbos->{name}-${major}.$minor"); 620 } 621 push (@keylist, "$pbos->{name}-$major"); 622 } 623 624 push (@keylist, $pbos->{name}, $pbos->{family}, $pbos->{type}, $pbos->{os}, $generic); 625 return @keylist; 626 } 627 596 628 =item B<pb_distro_get_param> 597 629 … … 603 635 604 636 my @param; 605 my $param;606 637 my $pbos = shift; 607 638 639 my @keylist = pb_pbos_to_keylist($pbos,"default"); 608 640 pb_log(2,"DEBUG: pb_distro_get_param on $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} for ".Dumper(@_)."\n"); 609 641 foreach my $opt (@_) { 610 if (defined $opt->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) { 611 $param = $opt->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}; 612 } elsif (defined $opt->{"$pbos->{'name'}-$pbos->{'version'}"}) { 613 $param = $opt->{"$pbos->{'name'}-$pbos->{'version'}"}; 614 } elsif (defined $opt->{"$pbos->{'name'}"}) { 615 $param = $opt->{"$pbos->{'name'}"}; 616 } elsif (defined $opt->{$pbos->{'family'}}) { 617 $param = $opt->{$pbos->{'family'}}; 618 } elsif (defined $opt->{$pbos->{'type'}}) { 619 $param = $opt->{$pbos->{'type'}}; 620 } elsif (defined $opt->{$pbos->{'os'}}) { 621 $param = $opt->{$pbos->{'os'}}; 622 } elsif (defined $opt->{"default"}) { 623 $param = $opt->{"default"}; 624 } else { 625 $param = ""; 626 } 627 642 my $param = ""; 643 foreach my $key (@keylist) { 644 if (defined $opt->{$key}) { 645 $param = $opt->{$key}; 646 last; 647 } 648 } 628 649 # Allow replacement of variables inside the parameter such as name, version, arch for rpmbootstrap 629 650 # but not shell variable which are backslashed … … 637 658 pb_log(2,"DEBUG: pb_distro_get_param on $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} returns ==".Dumper(@param)."==\n"); 638 659 639 # Return one param i n scalar context, an array if not.660 # Return one param if user only asked for one lookup, an array if not. 640 661 my $nb = @param; 641 662 if ($nb eq 1) { 642 return($param );663 return($param[0]); 643 664 } else { 644 665 return(@param);
Note:
See TracChangeset
for help on using the changeset viewer.