Changeset 1517


Ignore:
Timestamp:
May 10, 2012, 6:07:28 PM (7 years ago)
Author:
bruno
Message:

r4765@localhost: bruno | 2012-05-10 17:08:00 +0200

  • pb.conf: centos-5.6 moved python-libs into a separate package. List it or otherwise we can't run yum. Fix the mirror servers for centos-4,5 to just get the latest, and add mirror servers for 6.
  • pb.conf.pod: document addrepo, looked here and didn't find it, accidentally found it in code before adding it myself. Fix pod glitch at the end (missing =over/=back)
  • Distribution.pm: move the code to apply ftp_proxy/http_proxy from the conf files to a sub function since it's now needed in two places. Log the proxy and verify that everything we tried to install succeeded since yum will silently tolerate failing to install things, but rpmbuild will complain about missing dependencies. Tolerate an error from testing install of an rpm in pb_distro_setuprepo_gen.
  • Env.pm: Give an example of multi-line filters and an example of a transform.
  • VE.pm: If the verpmtype isn't defined, error out cleanly. Otherwise we're just going to fail later with lots of noisy output.
Location:
devel/pb-modules
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf

    r1515 r1517  
    307307rbsmindep rhel-4 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,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,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-sqlite,python-urlgrabber,readline,redhat-release,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib
    308308#
    309 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-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
    310 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-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
    311 #
    312 rbsmindep rhel-5 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,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-sqlite,python-urlgrabber,readline,redhat-release,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib
     309# CentOS-5.6 moved python-libs into a separate package.  List it or otherwise we can't run yum.
     310#
     311rbsmindep 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
     312rbsmindep 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
     313#
     314rbsmindep rhel-5 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,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,redhat-release,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib
    313315rbsmindep oel-5 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,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-sqlite,python-urlgrabber,readline,redhat-release,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib
    314316#
     
    365367#rbsmirrorsrv fedora = http://download.fedora.redhat.com/pub/fedora/linux/releases/$pbos->{'version'}/Everything/$pbos->{'arch'}/os/Packages/
    366368rbsmirrorsrv fedora = http://mirrors.kernel.org/fedora/releases/$pbos->{'version'}/Fedora/$pbos->{'arch'}/os/Packages
    367 rbsmirrorsrv centos-4 = http://mirrors.kernel.org/centos/4.8/os/$pbos->{'arch'}/CentOS/RPMS
    368 rbsmirrorsrv centos-5 = http://mirrors.kernel.org/centos/5.5/os/$pbos->{'arch'}/CentOS
     369rbsmirrorsrv centos-4 = http://mirrors.kernel.org/centos/$pbos->{'version'}/os/$pbos->{'arch'}/CentOS/RPMS
     370rbsmirrorsrv centos-5 = http://mirrors.kernel.org/centos/$pbos->{'version'}/os/$pbos->{'arch'}/CentOS
    369371rbsmirrorsrv centos-5-ia64 = http://dev.centos.org/~z00dax/ia64/c5-wip/ia64/RPMS/
     372rbsmirrorsrv centos-6 = http://mirrors.kernel.org/centos/$pbos->{'version'}/os/$pbos->{'arch'}/CentOS
    370373#rbsmirrorsrv rhel =
    371374# pbos->{'arch'} == i586 for i386 repo
  • devel/pb-modules/etc/pb.conf.pod

    r1508 r1517  
    2222
    2323=over 4
     24
     25=item B<addrepo>
     26
     27 Nature: Optional
     28Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here.
     29 Value: comma separated list of URLs that point to repository files, or packages to install. The values may not include substitutions.
     30 Conffile: project
     31 Example: addrepo centos-5-x86_64 = file:///prj/extras.repo,http://mirror.centos.org/centos/5.8/extras/x86_64/RPMS/chrpath-0.13-3.el5.centos.x86_64.rpm
    2432
    2533=item B<checkexclude>
     
    10061014
    10071015=head1 OTHER PARAMETERS
     1016
     1017=over 4
     1018
    10081019=item B<pb_URL>
     1020
    10091021=item B<pb_directory_desc>
     1022
    10101023=item B<pb_environment_variables>
     1024
     1025=back
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1516 r1517  
    290290}
    291291
     292# Internal function
     293
     294sub pb_apply_conf_proxy ($) {
     295my ($pbos) = @_;
     296
     297my $ftp_proxy = pb_distro_get_param($pbos,pb_conf_get_if("ftp_proxy"));
     298my $http_proxy = pb_distro_get_param($pbos,pb_conf_get_if("http_proxy"));
     299
     300# We do not overwrite shell settings
     301$ENV{ftp_proxy} ||= $ftp_proxy;
     302$ENV{http_proxy} ||= $http_proxy;
     303}
     304
    292305=item B<pb_distro_installdeps>
    293306
     
    304317my $deps = shift || undef;
    305318
    306 my $ftp_proxy = pb_distro_get_param($pbos,pb_conf_get_if("ftp_proxy"));
    307 my $http_proxy = pb_distro_get_param($pbos,pb_conf_get_if("http_proxy"));
    308 
    309 # We do not overwrite shell settings
    310 $ENV{ftp_proxy} ||= $ftp_proxy;
    311 $ENV{http_proxy} ||= $http_proxy;
    312 
     319pb_apply_conf_proxy($pbos);
    313320# Protection
    314321return if (not defined $pbos->{'install'});
     
    316323# Get dependencies in the build file if not forced
    317324$deps = pb_distro_getdeps($f,$pbos) if (not defined $deps);
     325pb_log(1, "ftp_proxy=$ENV{ftp_proxy} http_proxy=$ENV{http_proxy}\n");
    318326pb_log(2,"deps: $deps\n");
    319327return if ((not defined $deps) || ($deps =~ /^\s*$/));
     
    326334    pb_system($cmd, "Re-trying installing dependencies ($cmd)");
    327335}
     336# Check that all deps have been installed correctly
     337$deps = pb_distro_getdeps($f, $pbos);
     338die "Some dependencies did not install ($deps)" if ((defined $deps) && ($deps =~ /\S/));
    328339}
    329340
     
    520531return if ($param eq "");
    521532
     533pb_apply_conf_proxy($pbos);
     534
    522535# Loop on the list of additional repo
    523536foreach my $i (split(/,/,$param)) {
     
    538551            my $pn = $bn;
    539552            $pn =~ s/\.rpm//;
    540             if (pb_system("rpm -q --quiet $pn","","quiet") != 0) {
     553            if (pb_system("rpm -q --quiet $pn","","quiet",1) != 0) {
    541554                pb_system("sudo rpm -Uvh $ENV{'PBTMP'}/$bn","Adding package to setup repository");
    542555            }
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r1506 r1517  
    611611
    612612# PBDESC contains the description of the package
    613 #filter PBDESC = Bla-Bla
     613#filter PBDESC = Bla-Bla                                                 \
     614# with a trailing \, the variable can be multi-line.                     \
     615# only the trailing \'s will be removed, the leading spaces,             \
     616# trailing spaces, and newlines will remain except on the                \
     617# last line.  You can use dollar slash as a way to introduce carraige    \
     618# return (perl syntax).                                                  \
     619# You can use transform e.g. in rpm.pbf to adjust spaces
    614620
    615621# PBSUMMARY contains a short single line description of the package
     
    647653# PBOBS is replaced by the Obsolete line
    648654#filter PBOBS =
     655
     656# transform a variable from the key on the right to the key on the left using the perl expression
     657# after the input key name.  Useful for taking multi-line documentation and removing trailing spaces
     658# or leading spaces.
     659#transform PBDESC = PBDESC_raw s/\s+\n/\n/go;
    649660
    650661EOF
  • devel/pb-modules/lib/ProjectBuilder/VE.pm

    r1506 r1517  
    104104            # Which tool is used
    105105            my $verpmstyle = $verpmtype->{$ENV{'PBPROJ'}};
     106            die "No verpmtype defined for $ENV{PBPROJ}" unless (defined $verpmstyle);
    106107   
    107108            # Get potential rbs option
Note: See TracChangeset for help on using the changeset viewer.