• @stormi @r1 Started a separate thread so that this discussion will be easier for others to find and benefit from.

    Here's what I've done thus far --

    • Created a Ubuntu 20.4 VM
    • Installed Docker

    Then I've done the following --

    sudo bash
    git clone https://github.com/xcp-ng/xcp-ng-build-env.git
    cd xcp-ng-build-env
    ./build.sh 8.1
    
    cd ..
    git clone https://github.com/xcp-ng-rpms/kernel.git
    chown 1000 ./kernel/ -R
    cd kernel
    git checkout 8.1
    
    ../xcp-ng-build-env/run.py -b 8.1 --build-local kernel/ --rm
    

    This runs for a while before finally producing this error --

    Complete!
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wu3135
    + umask 022
    + cd /home/builder/rpmbuild/BUILD
    + cd /home/builder/rpmbuild/BUILD
    + rm -rf kernel-4.19.19
    + /usr/bin/tar -xf /home/builder/rpmbuild/SOURCES/kernel-4.19.19.tar.gz
    /usr/bin/tar: This does not look like a tar archive
    
    gzip: stdin: not in gzip format
    /usr/bin/tar: Child returned status 1
    /usr/bin/tar: Error is not recoverable: exiting now
    error: Bad exit status from /var/tmp/rpm-tmp.wu3135 (%prep)
    
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.wu3135 (%prep)
    

    Thoughts / suggestions?

  • XCP-ng Team

    Yes, you need git-lfs before cloning the kernel repo, as described on https://github.com/xcp-ng-rpms/kernel

    Delete the cloned repo, install git-lfs and clone it again.


  • @stormi Actually, I thought I had already done this --

     rm -rf kernel
     curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
    

    Went ahead and ran the command apt install git-lfs and it appears to have installed it. Rerunning the other commands now.

    Appears to be working, although I had to run the command from the parent directory instead of the kernel subdirectory, so the modified command was --

    ./xcp-ng-build-env/run.py -b 8.1 --build-local kernel/ --rm


  • Question: Will the build process run faster if I allocate more vCPUs or memory to the VM? Right now, it's running with 2 cores and 2GB.

  • XCP-ng Team

    @danp yes, this will likely use all the available vCPUs.


  • @stormi Ok... I'll throw some more vCPUs at it. Still failed in the end ☹ --

    Processing files: python2-perf-4.19.19-6.0.12.1.xcpng8.1.x86_64
    Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.5zgN24
    + umask 022
    + cd /home/builder/rpmbuild/BUILD
    + cd kernel-4.19.19
    + LICENSEDIR=/home/builder/rpmbuild/BUILDROOT/kernel-4.19.19-6.0.12.1.xcpng8.1.x86_64/usr/share/licenses/python2-perf-4.19.19
    + export LICENSEDIR
    + /usr/bin/mkdir -p /home/builder/rpmbuild/BUILDROOT/kernel-4.19.19-6.0.12.1.xcpng8.1.x86_64/usr/share/licenses/python2-perf-4.19.19
    + cp -pr COPYING /home/builder/rpmbuild/BUILDROOT/kernel-4.19.19-6.0.12.1.xcpng8.1.x86_64/usr/share/licenses/python2-perf-4.19.19
    + exit 0
    Provides: gitsha(https://code.citrite.net/rest/archive/latest/projects/XSU/repos/linux-stable/archive?at=refs%2Ftags%2Fv4.19.19&format=tar.gz&prefix=kl-4.19.19#/kernel-4.19.19.tar.gz) = dffbba4348e9686d6bf42d54eb0f2cd1c4fb3520 gitsha(ssh://git@code.citrite.net/xs/linux.pg.git) = 97c6d6430b54cb1ca99a1e55e6ae4516c893 python2-perf python2-perf = 4.19.19-6.0.12.1.xcpng8.1 python2-perf(x86-64) = 4.19.19-6.0.12.1.xcpng8.1
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.7)(64bit) libc.so.6(GLIBC_2.8)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpython2.7..0()(64bit) python(abi) = 2.7 rtld(GNU_HASH)
    Processing files: kernel-debuginfo-4.19.19-6.0.12.1.xcpng8.1.x86_64
    Provides: kernel-debuginfo = 4.19.19-6.0.12.1.xcpng8.1 kernel-debuginfo(x86-64) = 4.19.19-6.0.12.1.xcpng8.1
    Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
    Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/builder/rpmbuild/BUILDROOT/kernel-4.19.19-6.0.12.1.xcpng8.1.x86_64
    error: Unable to write payload to /var/tmp/rpm-tmp.bW70Ww:
    ~
    
  • XCP-ng Team

    Looks like a permission or a space issue.


  • @stormi Thanks. I expanded the disk and now the build completed. I'll report back if I come up with any meaningful results.

  • XCP-ng Team

    Good 🙂 Thanks @Danp feel free to update the doc with the things that unclear, so more people can do that kind of build!

XCP-ng Pro Support

XCP-ng Pro Support