Menu

#3858 [FVT]‘Package build methods’ in buildkit and buildkit.conf needs enhancements,

2.8.4
pending
BaiYuan
kits (43)
kits
5
2014-01-20
2013-10-25
BaiYuan
No

In buildkit.conf template,there are following description for ‘Package build methods’;

Package build methods (optional)

Define how to build the packages.

If you don't specify a build method, the default behavior is

to assume the package is pre-built under

<kit build="" directory="">/source_packages</kit>

All files in this section are relative to

<kit build="" directory="">/source_packages</kit>

There are four methods to build packages.

1. Use pre-built RPM package

The filename may contain wildcards to avoid needing to

specify an explicit package version-release filename.

isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')

Indicates whether the RPM package will be added to the

the kit tar file now as part of the kit build process,

or whether the customer will need to separately

obtain the RPM pacakage and add it to the kit tar file

using 'buildkit addpkgs'

rpm_prebuiltdir: If isexternalpkg=no, path to directory

containing pre-built RPM package

2. Build RPM from spec + src dir

rpm_spec: Path to spec file.

rpm_srcdir: Path to source directory.

3. Build RPM from spec + src tarball

rpm_spec: Path to spec file.

rpm_srctarball: Path to source tarball.

4. Build RPM from source RPM

rpm_srpm: Path to source RPM package.

issue:
a, buildkit just support 1.,it does not support 2.3.4 now.
b, Package build methods is optional,but we just has one method,and isexternalpkg is mandatory,if there is no isexternnalpkg,buildkit buildrepo all or else exit with waring.
That is to say,Use pre-built RPM package is the only mandatory method now.
c, if isexternalpkg=no,rpm_prebuiltdir is mandatory,or else, return warning and exit.
d, isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no'), it confused me. In many situation,default no means deleting isexternalpkg from buildkit.conf,and the default value of isexternalpkg is no. Actually,isexternalpkg is mandatory, default:no means: after buildkit create kit, isexternalpkg=no is in buildkit.conf;

Discussion

  • Norm Nott

    Norm Nott - 2013-10-29
    • status: open --> accepted
     
  • Norm Nott

    Norm Nott - 2013-10-29

    You are correct, option 2-4 are not supported.

    I'll update the template.

    I'll also look into a new warning message.

     
  • Norm Nott

    Norm Nott - 2013-11-04
    • Milestones: 2.8.3 --> 2.8.4
     
  • Norm Nott

    Norm Nott - 2013-11-04

    I don't think it will do much harm if we fix this in 2.8.4. I'd rather not take any chances checking code into 2.8.3 at this point.

     
  • BaiYuan

    BaiYuan - 2013-12-16
    • summary: [FVT]‘Package build methods’ in buildkit.conf template needs update --> [FVT]‘Package build methods’ in buildkit and buildkit.conf needs enhancements,
    • Priority: 4 --> 5
     
  • BaiYuan

    BaiYuan - 2013-12-16

    Package build methods need to be enhanced.I discussed with Huazhong about it , we got agreements as follows in xcat2.8.4.

    a,If isexternalpkg is not set and rpm_prebuiltdir is not set, give error or warning and exit.
    b,If isexternalpkg is 'yes'|'1', rpm_prebuiltdir is not needed, buildkit can build partial kit.
    c,If isexternalpkg is 'no'|'0', rpm_prebuiltdir is mandatory, or else,return warning and exit.
    rpm_prebuiltdir format is like rpm_prebuiltdir=<subdir> or rpm_prebuiltdir=<subdir>/.../<subdir>, buildkit can find rpm in <Kit Build Directory>/source_packages/<subdir> or <Kit Build Directory>/source_packages/<subdir>/.../<subdir>
    d,If isexternalpkg is not set, but rpm_prebuiltdir is set with correct subdir,give error or warning?
    now all three buildkit commands work well and search rpm from subdir correctly.

    The current testing results are as follows,some scenarios needs enhancements;
    1, The same result with above a.
    in buildkit.conf,

    isexternalpkg=no

    rpm_prebuiltdir=pperte1.3.0.7

    command result:
    [root@rhmn pekit]# buildkit chkconfig
    Cannot determine build method for Kit Package pperte-.x86_64.rpm. Verify that your Kit Build File is correct.
    [root@rhmn pekit]# buildkit buildrepo all
    Cannot determine build method for Kit Package pperte-
    .x86_64.rpm. Verify that your Kit Build File is correct.
    [root@rhmn pekit]# buildkit buildtar
    Cannot determine build method for Kit Package pperte-*.x86_64.rpm. Verify that your Kit Build File is correct.
    [root@rhmn pekit]#

    2, The same results with above c;
    In buildkit.conf:
    isexternalpkg=no
    rpm_prebuiltdir=pperte1.3.0.7

    3,The same results with above b;
    isexternalpkg=yes

    isexternalpkg=no

    4,The same results with above c execpt buildkit chkconfig;
    isexternalpkg=no

    rpm_prebuiltdir=

    command result:
    [root@rhmn pekit]# buildkit chkconfig
    No errors were found in Kit Build File /baiyuan/1024/pekit/buildkit.conf.
    [root@rhmn pekit]# buildkit buildrepo all
    Cannot determine build method for Kit Package pperte-.x86_64.rpm. Verify that your Kit Build File is correct.
    t]#buildkit chkconfig
    No errors were found in Kit Build File /baiyuan/1024/pekit/buildkit.conf.
    t]# buildkit buildrepo rhels6_x86_64
    Cannot determine build method for Kit Package pperte-
    .x86_64.rpm. Verify that your Kit Build File is correct.

    5, The same results with above c;
    isexternalpkg=no
    rpm_prebuiltdir=ppe/pperte1.3.0.7

    result:
    The following commands work well.
    buildkit chkconfig
    buildkit buildrepo all
    buildkit buildtar

    6, Test scenario for above d, the result is that all three commands can work and generate complete kit;

    rpm_prebuiltdir=ppe/pperte1.3.0.7

    isexternalpkg=no

     

    Last edit: BaiYuan 2013-12-16
  • Norm Nott

    Norm Nott - 2014-01-09
    • status: accepted --> open
    • assigned_to: Norm Nott --> BaiYuan
     
  • BaiYuan

    BaiYuan - 2014-01-20
    • status: open --> pending
    • component: --> general
     
  • BaiYuan

    BaiYuan - 2014-01-20

    Make buildkit.conf in accord with buildkit command results;
    2.8 1afea00f0864c079179dc65975f39440555fa95e
    2.9 b12771ab5475e87cedef186120a65f1f2a47cd5f

     
  • BaiYuan

    BaiYuan - 2014-01-20
    • component: general --> kits
     
MongoDB Logo MongoDB