Forum archive
Cannot build core as written in tutorial
Hello,
I've been trying to build an appliance according to TKLDev Tutorial , but I always get errors. I'm using TKLDev 15.0, since the 16.0 version cannot be downloaded (404 - not found).
Appliance is connected to the internet and bootstrap/cdroots/common are downloaded. I tried the following commands with both updating the appliance first and not updating it. After running:
cd /turnkey/fab/products/turnkey/core make
I get this:
deck /turnkey/fab/bootstraps/stretch build/bootstrap fab-apply-overlay /turnkey/fab/common/overlays/bootstrap_apt build/bootstrap; fab-chroot build/bootstrap "echo nameserver 8.8.8.8 > /etc/resolv.conf"; fab-chroot build/bootstrap "echo nameserver 8.8.4.4 >> /etc/resolv.conf"; fab-chroot build/bootstrap --script /turnkey/fab/common/conf/bootstrap_apt; tmp/chroot-script.lmzzPC/bootstrap_apt: line 34: gpg: command not found /usr/share/fab/product.mk:535: recipe for target 'build/stamps/bootstrap' failed make: *** [build/stamps/bootstrap] Error 127
I managed to build the iso using
/turnkey/buildtasks/bt-iso core
Iso image is built in /mnt/isos and can be booted from. Why does the first option not work?
I also tried building other formats, such as vm (./bt-vm after installing OVFTool) and openstack (./bt-openstack and ./bt-openstack-ami) using the iso I built previously, but they all fail with
WARNING [bt-vm]: --publish was not specified INFO [iso-download]: turnkey-core-16.0rc2-buster-amd64.iso already exists, skipping download... INFO [iso-verify]: turnkey-core-16.0rc2-buster-amd64.iso.hash already exists, skipping download... INFO [signature-verify]: Verifying GPG signature WARNING [signature-verify]: /mnt/isos/turnkey-core-16.0rc2-buster-amd64.iso.hash is not signed by GPG - this is expected if building locally and/or the hash file is unsigned. INFO [signature-verify]: Verifying checksum. INFO [signature-verify]: Checksum verification success. # extracting root filesystem and isolinux from ISO mount: /dev/loop0 is write-protected, mounting read-only Could not open turnkey-core-16.0rc2-buster-amd64.mount/casper/*root.squashfs, because No such file or directory
I checked contents of the iso file and indeed, casper directory is not there:
root@tkldev /turnkey/buildtasks# ls -la /mnt/my-iso/ dr-xr-xr-x 4 root root 2048 Apr 28 12:20 . drwxr-xr-x 5 root root 4096 Apr 28 11:08 .. dr-xr-xr-x 2 root root 2048 Apr 28 12:27 isolinux dr-xr-xr-x 2 root root 2048 Apr 28 12:27 live
However, if I use a downloaded iso with bt-vm, casper directory exists and I get as far as
WARNING [bt-vm]: --publish was not specified INFO [iso-download]: turnkey-core-15.0-stretch-amd64.iso already exists, skipping download... INFO [iso-verify]: turnkey-core-15.0-stretch-amd64.iso.hash already exists, skipping download... INFO [signature-verify]: Verifying GPG signature gpg: Signature made Mon Jul 16 12:53:13 2018 UTC gpg: using RSA key 694CFF26795A29BAE07B4EB585C25E95A16EB94D gpg: Good signature from "Turnkey Linux Release Key <release@turnkeylinux.com>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 694C FF26 795A 29BA E07B 4EB5 85C2 5E95 A16E B94D INFO [signature-verify]: GPG verification success. INFO [signature-verify]: Verifying checksum. INFO [signature-verify]: Checksum verification success. # extracting root filesystem and isolinux from ISO mount: /dev/loop0 is write-protected, mounting read-only Parallel unsquashfs: Using 1 processor 37997 inodes (40426 blocks) to write [===================================================================================================|] 40426/40426 100% [===================================================================================================/] 40426/40426 100% created 34009 files created 3824 directories created 3970 symlinks created 10 devices created 0 fifos INFO [purge-pkgs]: Purging packages: di-live live-boot live-tools live-boot-initramfs-tools Reading package lists... Done Building dependency tree Reading state information... Done Package 'live-tools' is not installed, so not removed E: Unable to locate package live-boot E: Unable to locate package live-boot-initramfs-tools
Some files are produced before the error, but I can't find any .vmdk or .ovf files, as I would expect.
Is there anything I'm doing wrong? I'd love to get the build process working for both iso and other formats so I can focus on further developing.
Thanks in advance
Great to hear that you now have working builds. Hopefully we'll have the stable v16.0 published real soon.
Re a game server, yes that's a great idea! So long as your server only includes open source software and meets our requirements regarding build code, then we'd be happy to add it to the library (including the Hub).
Regarding contributing, there is a basic run through of our desired git workflow on GitHub (someone started updating/improving that ages ago but it never got completed - find that here). The TKLDev docs also include some more detailed info regarding new appliances. I have updated some of the TKLDev docs, but some still need work. Please feel free to ask and/or point out anything more that you hit that isn't right and/or doesn't work. If you have a workaround you'd like to document and/or you would like to assist with improving the docs, it'd be awesome if you opened a PR (pull request) against the TKLDev repo! :)
Re your experience with building the alternate builds, if you build your ISO with buildtasks/bt-iso then this shouldn't be an issue (you should only get a warning, not an error). If you already have your ISO and don't want to rebuild it with buildtasks, then you'll need to rename it appropriately (using our naming convention) and put it where the buildtasks scripts expect it to be (/mnt/isos). Then generate a hash file via the buildtasks/bin/generate-signature script. Alternatively, you could just tweak the specific script to not do the verification.
Please be aware, that the primary purpose of buildtasks is for our internal building purposes. Beyond just being good open source citizens, we provide it publicly so users can assist to improve the alternate builds that we provide and/or add new buildtypes to the existing builds that we provide. Obviously it also allows users such as yourself to build the alternate builds too, but that's more of a bonus than the primary purpose of having it publicly available.