ta/build-tools.git
4 years agoAArch64 (arm64) support for image building, mock 83/1483/10
Alexandru Avadanii [Wed, 7 Aug 2019 14:57:59 +0000 (14:57 +0000)]
AArch64 (arm64) support for image building, mock

- mock:
  * extend config_opts['legal_host_arches'] to include 'aarch64';
  * parameterize RPM target architecture based on the output of
    $(uname -m) in create_mock_config.sh;
- Dockerfile-dib:
  * Bump base to centos:7.6.1810, but since centos:7.x.y tags are
    broken on arm64 [1], apply an arch-specific patch to the DIB
    Dockerfile which pins the FROM image to a specific sha256;
  * Use AArch64 altsig repository for openstack-queens packages;
  * Bump diskimage-builder to 2.26.1 to include arm64 critical fixes;
  * Add tools required for UEFI partition handling and other AArch64
    specific requirements to the arm64 container image (gdisk,
    dosfstools, util-linux, qemu-img);
- dib elements:
  * finalise.d/99-collect-rpm-info: AArch64 workaround for packages
    initially installed from 'updates' repo residing in 'base' repo
    after all distro/repo handling take place;
- create_golden_image.sh:
  * dib: Add additional element block-device-efi on AArch64 (only);
- build_step_create_install_cd.sh:
  * parameterize CentOS artifacts URI based on machine architecture;
  * skip isolinux artifacts download/handling for AArch64, since
    PC BIOS is x86 specific;
  * ISO(s) build: AArch64 only supports UEFI booting, skip isolinux;
  * AArch64: use legacy method of copying out the contents of "/boot"
    from the golden image since the AArch64 image has a more complex
    partition layout and would require mounting both "/boot" and ESP;
- create_rpmdata_in_docker.sh:
  * fix bash shebang since script uses bash-isms;
- tools/buildconfig.py:
  * add support for replacing the magic string '#ARCH#' with current
    platform architecture in option names;

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Co-authored-by: Valentin Radulescu <Valentin.Radulescu@enea.com>
Change-Id: I32cfdc2adc43fb703843383a1e94a807919f4e8c

4 years agoReplace hanging virt-copy-out commands 48/1548/5
amin m [Fri, 6 Sep 2019 12:18:45 +0000 (17:48 +0530)]
Replace hanging virt-copy-out commands

Most often virt-copy-out just hangs on the LinuxFoundation Jenkins build
slaves until timeout exceeds and Jenkins interrupts the build. Nested
virtualization required by virt-copy-out (via qemu-kvm) seems not
stable. This is purely a workaround for LF Jenkins.

Example trace of the issue with virt-copy-out:

        /usr/libexec/qemu-kvm \
                -global virtio-blk-pci.scsi=off \
                -nodefconfig \
                -enable-fips \
        [...some output omitted...]
        KVM: entry failed, hardware error 0x0
        EAX=00000000 EBX=00000000 ECX=00000000 EDX=000306a9
        ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
        EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
        ES =0000 00000000 0000ffff 00009300
        CS =f000 ffff0000 0000ffff 00009b00
        SS =0000 00000000 0000ffff 00009300
        DS =0000 00000000 0000ffff 00009300
        FS =0000 00000000 0000ffff 00009300
        GS =0000 00000000 0000ffff 00009300
        LDT=0000 00000000 0000ffff 00008200
        TR =0000 00000000 0000ffff 00008b00
        GDT=     00000000 0000ffff
        IDT=     00000000 0000ffff
        CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
        DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
        DR6=00000000ffff0ff0 DR7=0000000000000400
        EFER=0000000000000000
        Code=00 66 89 d8 66 e8 14 a4 ff ff 66 83 c4 0c 66 5b 66 5e 66 c3 <ea> 5b e0 00 f0 30 36 2f 32 33 2f 39 39 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        Build timed out (after 120 minutes). Marking the build as failed.

Change-Id: I0346abc3f28f0bf2687d0c2538c50dfd71e1d32c
Signed-off-by: Tamas Lendvay <tamas.lendvay@nokia.com>
4 years agoAdd DANM CRD path to mock macros 05/1205/1
Krisztian Lengyel [Tue, 16 Jul 2019 12:53:13 +0000 (14:53 +0200)]
Add DANM CRD path to mock macros

Change-Id: I7ea6fbc44396f3fe19f151a9d4912143d1a6969c
Signed-off-by: Krisztian Lengyel <krisztian.lengyel@nokia.com>
4 years agoNew build time variable for caas_lcm path 55/1155/1
Balint Varga [Wed, 10 Jul 2019 06:54:41 +0000 (08:54 +0200)]
New build time variable for caas_lcm path

Signed-off-by: Balint Varga <balint.varga@nokia.com>
Change-Id: I20deb3bc045efa8f6a8b61755d50cc699269127b

4 years agoFix DIB in SELinux permissive hosts 13/813/6
Ossi Koivistoinen [Thu, 23 May 2019 22:21:52 +0000 (01:21 +0300)]
Fix DIB in SELinux permissive hosts

Remove the DIB element that tries to fix SELinux labels in the build
host after the disk image has been built.

The script fails for many reason when run inside container. We should
not need it because running SELinux in permissive mode and the host
that is being cleaned up is a container.

Exporting LIBGUESTFS_BACKEND=direct is required to execute virt-copy-out
in LF Jenkins slaves.

Change-Id: Iaa3d01b17524a08ee5d2f14e591dcef0dabd3a89
Signed-off-by: Ossi Koivistoinen <ossi.koivistoinen@nokia.com>
4 years agoAlign build scripts to LF 50/750/6
Saku Chydenius [Mon, 20 May 2019 11:03:31 +0000 (14:03 +0300)]
Align build scripts to LF

 - In LF we shall build docker containers on every build. Improvement to
   this process would be to separate these two docker environments from the
   build-tools repo. They could publish images to LF Nexus3 from where
   build-tools could directly utilize then.

 - There is not need to download ISO image dependencies from the Nexus3
   thus this code is removed. Now they will be downloaded directly from the
   internet with wget.

Change-Id: I8cbc89a1c25a5dedc0ce0556d00e80c09995c976
Signed-off-by: Saku Chydenius <saku.chydenius@nokia.com>
4 years agoSupport RPM create when ISO image is built 92/692/1
Saku Chydenius [Tue, 14 May 2019 09:35:59 +0000 (12:35 +0300)]
Support RPM create when ISO image is built

Optionally before the ISO image is created, a list of local REC
components can be packaged into RPMs. All RPMs built this way will have
higher priority over the latest RPMs in Nexus when ISO image is created.

Change-Id: I8f7fc38718e10a1858e50089991f7a92df1efe7d
Signed-off-by: Saku Chydenius <saku.chydenius@nokia.com>
4 years agoRemove unused code 91/691/1
Saku Chydenius [Tue, 14 May 2019 08:22:03 +0000 (11:22 +0300)]
Remove unused code

Change-Id: I4d6f533ec2cb5a8483686a5c63078262978c9d6e
Signed-off-by: Saku Chydenius <saku.chydenius@nokia.com>
4 years agoAdd a script to build REC images 78/678/1
Saku Chydenius [Sat, 11 May 2019 13:53:13 +0000 (16:53 +0300)]
Add a script to build REC images

This can be executed locally as well as in Jenkins to create REC images.

To create REC image also manifest RPM must be built to get build
information included to the REC runtime environment. This information
can be then used within the REC to indentify which build has been
installed.

The "rpmbuilder" tool (that uses "mock") is way too heavy for manifest
RPM creation thus Alpine based build environment was chosen. Manifest
RPM has no dependencies thus this should be ok although experimental.

Change-Id: Ic2ca3115bbfbbac89bf3139c47f8467a76ebd0b6
Signed-off-by: Saku Chydenius <saku.chydenius@nokia.com>
4 years agoAdd mock variables 77/677/1
Krisztian Lengyel [Mon, 29 Apr 2019 12:38:48 +0000 (14:38 +0200)]
Add mock variables

Change-Id: If5b964299590cea877e5546eb518e0b3521c929a
Signed-off-by: Krisztian Lengyel <krisztian.lengyel@nokia.com>
4 years agoAdd initial code 65/665/2
Saku Chydenius [Mon, 18 Mar 2019 07:08:45 +0000 (09:08 +0200)]
Add initial code

Change-Id: I72d87e74c74defc97bd956c3b23de9a4e01acb28
Signed-off-by: Saku Chydenius <saku.chydenius@nokia.com>
5 years agoInitial empty repository
Eric Ball [Wed, 1 May 2019 00:25:10 +0000 (00:25 +0000)]
Initial empty repository