Changeset 986


Ignore:
Timestamp:
Feb 21, 2010, 7:16:55 PM (10 years ago)
Author:
bruno
Message:

r3700@localhost: bruno | 2010-02-20 16:35:59 +0100

  • Continue to improve pb.conf documentation
  • veconf renamed as rbsconf
  • ve4pi renamed rbs4pi
  • new pb_get_postinstall generic function for rinse and rpmbootstrap
  • ventp/vmntp is now optional
  • licom_err needed by fedora 12
  • make rpmbootstrap work for i386 distros
Location:
devel
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-doc/pb.conf.pod

    r985 r986  
    1717The key could be also default, in which case it will be used as a default value if no more precise content is given for the key.
    1818
    19 Each value is detailed below giving the nature of its use (Mandatory or Optional - only used for certain feature), the value of the key (could be the project, a distribution name, default, ...), the value of the parameter field and its format, the default configuration file in which it should be defined and an example of use.
     19Each value is detailed below giving the nature of its use (Mandatory or Optional - only used for certain feature), the value of the key (could be the project, an OS name, default, ...), the value of the parameter field and its format, the default configuration file in which it should be defined (home $HOME/.pbrc, conf /etc/pb/pb.conf or /usr/local/etc/pb/pb.conf, VE vepath/.pbrc, VM vmpath/.pbrc,  or project project.pb) and an example of use.
    2020
    2121=head1 OPTIONS
     
    261261Nature: Optional
    262262Key: package (as provided in defpkgdir or extpkgdir)
    263 Value: Tag that needs to be used in package name (on rpm: name-ver-tag.arch.rpm). Useful when republishing a package due to package build modification (not code).
     263Value: Tag that needs to be used in package name (on rpm: name-ver-tag.arch.rpm).  Useful when different from the project version B<projtag> and when republishing a package due to package build modification (not code).
    264264Conffile: project
    265265Example: pkgtag mindi-busybox = 2
     
    269269Nature: Optional
    270270Key: package (as provided in defpkgdir or extpkgdir)
    271 Value: Version that needs to be used in package name (on rpm: name-ver-tag.arch.rpm).
    272 Conffile: project
    273 Example:
     271Value: Version that needs to be used in package name (on rpm: name-ver-tag.arch.rpm). Useful when different from the project version B<projver>.
     272Conffile: project
     273Example: pkgver mindi-busybox = 1.7.3
    274274
    275275=item B<projtag>
     276
     277Nature: Mandatory
     278Key: project (as defined in the -p option or PBPROJ environment variable)
     279Value: tag that will be used for all packages names (on rpm: name-ver-tag.arch.rpm) in the project. Each package can overwrite it using B<pkgtag>.
     280Conffile: project
     281Example: projtag mondorescue = 1
     282
    276283=item B<projver>
     284
     285Nature: Mandatory
     286Key: project (as defined in the -p option or PBPROJ environment variable)
     287Value: version that will be used for all packages names (on rpm: name-ver-tag.arch.rpm) in the project. Each package can overwrite it using B<pkgver>.
     288Conffile: project
     289Example: projver mondorescue = 2.2.9
     290
     291=item B<rbsconf>
     292
     293Nature: Optional
     294Key: project (as defined in the -p option or PBPROJ environment variable)
     295Value: for mock it's the configuration directory. For rinse it's its configuration file. For rpmbootstrap it's not used yet.
     296Conffile: ve
     297Example: rbsconf default = /etc/mock, rbsconf default = /etc/pb/pb-rinse.conf
     298
     299=item B<rbsb4pi>
     300
     301Nature: Optional
     302Key: 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.
     303Value: for mock it's not used. For rinse it's the script to call before doing installation (in order change the mirror location). For rpmbootstrap it's not used yet.
     304Conffile: ve
     305Example: rbsb4pi centos = /home/rinse/bin/before-post-install.sh
     306
    277307=item B<supfiles>
     308
     309Not used yet.
     310
    278311=item B<testver>
    279 =item B<veb4pi>
    280 =item B<veconf>
     312
     313Nature: Optional
     314Key: project (as defined in the -p option or PBPROJ environment variable)
     315Value: true (meaning this is a test version, whose tag will be generated automatically, based on 0+date in order to allow regular updates, and still be inferior to tag 1 of the official version, and delivered under the test subdirectory of the ftp server). By default false.
     316Conffile: project
     317Example: testver mondorescue = true
     318
    281319=item B<vedebtype>
     320
     321Nature: Mandatory
     322Key: project (as defined in the -p option or PBPROJ environment variable)
     323Value: debootstrap (no other tool to create deb distro based chroot)
     324Conffile: ve
     325Example: vedebtype default = debootstrap
     326
    282327=item B<velist>
     328
     329Nature: Mandatory
     330Key: project (as defined in the -p option or PBPROJ environment variable)
     331Value: list of coma separated OS (under the form of os-ver-arch).
     332Conffile: ve
     333Example: velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64,debian-5.0-i386,debian-5.0-x86_64,lsb-4.0.1-i386,lsb-4.0.1-x86_64
     334
    283335=item B<velogin>
     336
     337Nature: Mandatory
     338Key: project (as defined in the -p option or PBPROJ environment variable)
     339Value: account name to use in the VE to build packages.
     340Conffile: ve
     341Example: velogin default = pb
     342
    284343=item B<ventp>
     344
     345Nature: Optional
     346Key: project (as defined in the -p option or PBPROJ environment variable)
     347Value: NTP server to contact for time accuracy with B<ventpcmd> before building.
     348Conffile: ve
     349Example: ventp default = 1.pool.ntp.org
     350
    285351=item B<ventpcmd>
     352
     353Nature: Optional
     354Key: project (as defined in the -p option or PBPROJ environment variable)
     355Value: NTP command to use to perform time synchronization with the B<ventp> server.
     356Conffile: ve
     357Example: ventpcmd default = /usr/sbin/ntpdate
     358
    286359=item B<vepath>
     360
     361Nature: Optional
     362Key: project (as defined in the -p option or PBPROJ environment variable)
     363Value: path where to find VEs. Ve will be created and used under that path. For each VE os-ver-arch, it will create a subdirectory tree os/ver/arch below that point.
     364Conffile: ve
     365Example: vepath default = /home/rpmbootstrap
     366
    287367=item B<vepi>
    288368=item B<vepkglist>
    289369=item B<verebuild>
    290370=item B<verpmtype>
    291 =item B<version>
    292371=item B<vesnap>
    293372=item B<vetmout>
    294373=item B<vetype>
     374
    295375=item B<vmhost>
    296376=item B<vmlist>
     377
     378Nature: Mandatory
     379Key: project (as defined in the -p option or PBPROJ environment variable)
     380Value: list of coma separated OS (under the form of os-ver-arch).
     381Conffile: vm
     382Example: vmlist default = asianux-2-i386,asianux-3-i386,mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,mandriva-2008.1-i386,mandriva-2009.0-i386,mandriva-2009.1-i386,mandriva-2010.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,fedora-9-i386,fedora-10-i386,fedora-11-i386,fedora-12-i386,rhel-2.1-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,opensuse-10.3-i386,opensuse-11.0-i386,opensuse-11.1-i386,opensuse-11.2-i386,sles-9-i386,sles-10-i386,sles-11-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,debian-5.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,ubuntu-8.04-i386,ubuntu-8.10-i386,ubuntu-9.04-i386,ubuntu-9.10-i386,solaris-10-i386,asianux-2-x86_64,asianux-3-x86_64,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,mandriva-2008.1-x86_64,mandriva-2009.0-x86_64,mandriva-2009.1-x86_64,mandriva-2010.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,fedora-9-x86_64,fedora-10-x86_64,fedora-11-x86_64,fedora-12-x86_64,rhel-3-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,opensuse-10.3-x86_64,opensuse-11.0-x86_64,opensuse-11.1-x86_64,opensuse-11.2-x86_64,sles-10-x86_64,sles-11-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,debian-5.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64,ubuntu-8.04-x86_64,ubuntu-8.10-x86_64,ubuntu-9.04-x86_64,ubuntu-9.10-x86_64,solaris-10-x86_64
     383
    297384=item B<vmlogin>
    298385=item B<vmmonport>
  • devel/pb-modules/etc/pb.conf

    r984 r986  
    246246rbsmindep fedora-11 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,beecrypt,bzip2-libs,chkconfig,compat-db45,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,dirmngr,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,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,libblkid,libcap,libcom_err,libcurl,libgcc,libgcrypt,libgpg-error,libidn,libksba,libselinux,libsepol,libstdc++,libusb,libvolume_id,libxml2,linux-atm-libs,logrotate,lua,mingetty,module-init-tools,ncurses,ncurses-base,ncurses-libs,net-tools,nspr,nss,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
    247247#
    248 rbsmindep fedora-12 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,bzip2-libs,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,dirmngr,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,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,libcurl,libgcc,libgcrypt,libgpg-error,libidn,libksba,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
     248rbsmindep fedora-12 = MAKEDEV,ConsoleKit-libs,audit-libs,basesystem,bash,bzip2-libs,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,cyrus-sasl-lib,db4,dbus,dbus-libs,device-mapper,device-mapper-libs,dhclient,dirmngr,e2fsprogs,e2fsprogs-libs,elfutils-libelf,ethtool,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,libksba,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
    249249#
    250250rbsmindep centos-4 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,centos-release,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,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,yum-metadata-parser,zlib
  • devel/pb/bin/pb

    r982 r986  
    11741174        # Specific VE
    11751175        $path = "vepath";
    1176         $conf = "veconf";
     1176        $conf = "rbsconf";
    11771177        $rebuild = "verebuild";
    11781178    } elsif ($cmt eq "Web") {
     
    12521252    my ($sshhost,$sshlogin,$sshdir,$sshport) = pb_conf_get($host,$login,$dir,$port);
    12531253    # Not mandatory...
    1254     my ($vrebuild,$veconf,$testver) = pb_conf_get_if($rebuild,$conf,"testver");
     1254    my ($vrebuild,$rbsconf,$testver) = pb_conf_get_if($rebuild,$conf,"testver");
    12551255    my ($vtmout,$vepath);
    12561256    # ...Except those in virtual context
     
    12611261        ($vtmout) = pb_conf_get($tmout);
    12621262    }
    1263     pb_log(2,"ssh: ".Dumper(($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vrebuild,$vepath,$veconf))."\n");
     1263    pb_log(2,"ssh: ".Dumper(($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vrebuild,$vepath,$rbsconf))."\n");
    12641264
    12651265    my $mac;
     
    17421742
    17431743        # Get VE context
    1744         my ($ptr,$vetmout,$vepath,$verebuild,$veconf) = pb_conf_get("vetype","vetmout","vepath","verebuild","veconf");
     1744        my ($ptr,$vetmout,$vepath,$verebuild,$rbsconf) = pb_conf_get("vetype","vetmout","vepath","verebuild","rbsconf");
    17451745        my $vetype = $ptr->{$ENV{'PBPROJ'}};
    17461746
    17471747        # We can probably only get those params now we have the distro context
    1748         my ($veb4pi,$vepi,$vesnap,$oscodename,$vepkglist,$osmindep) = pb_conf_get_if("veb4pi","vepi","vesnap","oscodename","vepkglist","osmindep");
     1748        my ($rbsb4pi,$rbspi,$vesnap,$oscodename,$vepkglist,$osmindep) = pb_conf_get_if("rbsb4pi","rbspi","vesnap","oscodename","vepkglist","osmindep");
    17491749
    17501750        if (($vetype eq "chroot") || ($vetype eq "schroot")) {
     
    17601760
    17611761                    my $verpmstyle = $verpmtype->{$ENV{'PBPROJ'}};
     1762                    my $postinstall = pb_get_postinstall($ddir,$dver,$darch,$rbspi,$verpmstyle);
    17621763                    if ($verpmstyle eq "rinse") {
    17631764                        # Need to reshape the mirrors generated with local before-post-install script
    17641765                        my $b4post = "--before-post-install ";
    1765                         my $postparam = pb_distro_get_param($ddir,$dver,$darch,$veb4pi);
     1766                        my $postparam = pb_distro_get_param($ddir,$dver,$darch,$rbsb4pi);
    17661767                        if ($postparam eq "") {
    17671768                            $b4post = "";
    17681769                        } else {
    17691770                            $b4post .= $postparam;
    1770                         }
    1771                         # Do we have a local post-install script
    1772                         my $post = "--post-install ";
    1773                         $postparam = pb_distro_get_param($ddir,$dver,$darch,$vepi);
    1774                         if ($postparam eq "") {
    1775                             $post = "";
    1776                         } else {
    1777                             $post .= $postparam;
    17781771                        }
    17791772
     
    17991792                        $rinseverb = "--verbose" if ($pbdebug gt 0);
    18001793
    1801                         pb_system("sudo /usr/sbin/rinse --directory \"$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch\" --arch \"$darch\" --distribution \"$ddir-$dver\" --config \"$veconf->{$ENV{'PBPROJ'}}\" $b4post $post $addpkgs $rinseverb","Creating the rinse VE for $ddir-$dver ($darch)", "verbose");
     1794                        pb_system("sudo /usr/sbin/rinse --directory \"$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch\" --arch \"$darch\" --distribution \"$ddir-$dver\" --config \"$rbsconf->{$ENV{'PBPROJ'}}\" $b4post $postinstall $addpkgs $rinseverb","Creating the rinse VE for $ddir-$dver ($darch)", "verbose");
    18021795                    } elsif ($verpmstyle eq "rpmbootstrap") {
    18031796                        my $rbsverb = "";
    18041797                        $rbsverb = "--verbose" if ($pbdebug gt 0);
    1805                         pb_system("sudo /usr/bin/rpmbootstrap $ddir-$dver-$darch $rbsverb","Creating the rpmbootstrap VE for $ddir-$dver ($darch)", "verbose");
     1798                        pb_system("sudo /usr/bin/rpmbootstrap $postinstall $ddir-$dver-$darch $rbsverb","Creating the rpmbootstrap VE for $ddir-$dver ($darch)", "verbose");
    18061799                    } elsif ($verpmstyle eq "mock") {
    1807                         pb_system("sudo /usr/sbin/mock --init --resultdir=\"/tmp\" --configdir=\"$veconf->{$ENV{'PBPROJ'}}\" -r $v","Creating the mock VE for $ddir-$dver ($darch)");
     1800                        pb_system("sudo /usr/sbin/mock --init --resultdir=\"/tmp\" --configdir=\"$rbsconf->{$ENV{'PBPROJ'}}\" -r $v","Creating the mock VE for $ddir-$dver ($darch)");
    18081801                        # Once setup we need to install some packages, the pb account, ...
    1809                         pb_system("sudo /usr/sbin/mock --install --configdir=\"$veconf->{$ENV{'PBPROJ'}}\" -r $v su","Configuring the mock VE");
     1802                        pb_system("sudo /usr/sbin/mock --install --configdir=\"$rbsconf->{$ENV{'PBPROJ'}}\" -r $v su","Configuring the mock VE");
    18101803                    } else {
    18111804                        die "Unknown verpmtype type $verpmstyle. Report to dev team";
     
    18681861my $v = shift;
    18691862
    1870 my ($ntp) = pb_conf_get($vtype."ntp");
    1871 my $vntp = $ntp->{$ENV{'PBPROJ'}};
     1863my ($ntp) = pb_conf_get_if($vtype."ntp");
     1864my $vntp = $ntp->{$ENV{'PBPROJ'}} if (defined $ntp);
    18721865my $ntpline;
    18731866
     
    29392932}
    29402933
     2934#
     2935# Return the postinstall line if needed
     2936#
     2937
     2938sub pb_get_postinstall {
     2939
     2940my $ddir = shift
     2941my $dver = shift
     2942my $darch = shift
     2943my $rbspi = shift
     2944my $vestyle = shift
     2945my $post = "";
     2946
     2947# Do we have a local post-install script
     2948if ($vestyle eq "rinse") {
     2949    $post = "--post-install ";
     2950} elsif ($vestyle eq "rpmbootstrap") {
     2951    $post = "-s ";
     2952}
     2953
     2954$postparam = pb_distro_get_param($ddir,$dver,$darch,$rbspi);
     2955if ($postparam eq "") {
     2956    $post = "";
     2957} else {
     2958    $post .= $postparam;
     2959}
     2960return($post);
     2961}
     2962
    294129631;
  • devel/pb/lib/ProjectBuilder/Env.pm

    r973 r986  
    465465#ventp default = pool.ntp.org
    466466#velogin $ENV{'PBPROJ'} = pb
    467 #vepath $ENV{'PBPROJ'} = /var/lib/mock
    468 #veconf $ENV{'PBPROJ'} = /etc/mock
     467#vepath $ENV{'PBPROJ'} = /var/cache/rpmbootstrap
     468#rbsconf $ENV{'PBPROJ'} = /etc/mock
    469469#verebuild $ENV{'PBPROJ'} = false
    470470
  • devel/rpmbootstrap/bin/rpmbootstrap

    r984 r986  
    251251# Manages architectures specificities
    252252my $parch = $darch;
    253 $parch = "i?86" if ($darch eq "i386");
     253$parch = "i[3456]86" if ($darch eq "i386");
    254254
    255255# Get the list of packages and their URL in this hash
     
    313313            if ($pbupd =~ /yum/) {
    314314                pb_log(1,"Link package into $vepath/var/cache/yum/core/packages\n");
    315                 link("$cachedir/$p1","$vepath/var/cache/yum/core/packages/");
    316                 link("$cachedir/$p1","$vepath/var/cache/yum/$darch/$dver/");
    317                 symlink("$vepath/var/cache/yum/core/packages/$p1","$vepath/var/cache/yum/updates-released/packages/");
     315                #link("$cachedir/$p1","$vepath/var/cache/yum/core/packages/");
     316                copy("$cachedir/$p1","$vepath/var/cache/yum/$darch/$dver/fedora/packages");
     317                symlink("$vepath/var/cache/yum/$darch/$dver/fedora/packages","$vepath/var/cache/yum/$darch/$dver/updates/packages");
    318318            }
    319319
Note: See TracChangeset for help on using the changeset viewer.