437 Commits

Author SHA1 Message Date
Daniil Baturin
72c7c7ff99 build: T3664: add a sanity check for image_format
and normalize it to a list if only one format is specified
2024-04-13 20:06:53 +00:00
Daniil Baturin
c07268987c build: T3664: filter out non-TOML files from the build flavor dir
to avoid mistakenly listing auixilliary files like README
as flavors
2024-04-13 19:49:59 +00:00
John Estabrook
7fa66c77f1 Account for the working dir below the root in git invocation
Signed-off-by: Daniil Baturin <daniil@vyos.io>
2024-04-13 12:55:29 +00:00
Daniil Baturin
a896176ad8 build: T3664: add support for building non-ISO flavors 2024-04-10 16:36:10 +00:00
khramshinr
046ddd7dfa T5124: Python3 deprecation distutils 2024-04-05 14:37:28 +08:00
Daniil Baturin
750819bfec build scripts: T3664: move image build scripts to a dedicated directory
to avoid a mix of image build scripts and ancilliary scripts in the same directory
2024-03-23 21:02:44 +00:00
Daniil Baturin
65b0321a8b build script: T3664: fix handling of missing or malformed flavor files 2024-03-21 13:58:48 +00:00
Daniil Baturin
5dcb6b7711 chore: T671: remove unused scripts and references to them 2024-03-20 17:50:51 +00:00
Christian Breunig
50bdf2367f
Merge pull request #526 from sfinke0/fix-tagged-build
T6115: Fix tagged builds from detached Git HEAD
2024-03-16 09:45:23 +01:00
sfinke0
3494ab3e0a T6115: fix failing builds from detached HEAD (e.g. git tags) 2024-03-14 13:33:58 +01:00
Daniil Baturin
11f4d356f6 build: T1449: add default_config field support in flavor files
to allow people to easily include a custom default config
2024-03-13 17:35:01 +00:00
Daniil Baturin
bbddf9d0a3 docker, build: T6119: use python3-tomli instead of python3-toml
for a compliant implementation ot TOML
2024-03-12 20:59:46 +00:00
Christian Breunig
330ee19eeb
Merge pull request #524 from sarthurdev/tpm_luks
build: T4919: Fix error due to variable not found
2024-03-08 06:59:58 +01:00
sarthurdev
d8313d2c2c build: T4919: Fix error due to variable not found 2024-03-08 01:48:05 +01:00
Daniil Baturin
089b595605
Merge pull request #297 from sarthurdev/tpm_luks
config: T4919: Add emulated TPM encryption test
2024-03-07 16:37:11 +01:00
Christian Breunig
7b89f74c31 T6077: add bugtrcker, documentation and new URL to version file
Use single source for project related URLs that will later be consumed by the
MOTD template used.
2024-03-01 21:44:53 +01:00
Christian Breunig
195c13022d T3664: remove leading whitespaces from generated /usr/lib/os-release 2024-03-01 21:43:55 +01:00
Christian Breunig
8a49912cee T3664: remove obsolete make-version-file
Commit 3979b25dcf ("T3664: initial implementation of the build flavor system")
removed the call to make-version-file, thus we can also drop the file itself.
2024-03-01 21:39:49 +01:00
Christian Breunig
7c27657c79 T6064: add build error if branch information from Git repository is missing
This was discussed in slack, where a user was missing the Git commit ID in his
custom build

Reason is/was:
  git clone --single-branch -b 1.4.0-epa1 https://github.com/vyos/vyos-build

Checks out the 1.4.0-epa1 tag as HEAD and does not clone any branch information.
This results in:

>>> import git
>>> repo = git.Repo('.')
>>> repo.head.object.hexsha[:14]
'bcac2eb1f9b49c'
>>> git_branch = repo.active_branch.name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/git/repo/base.py", line 881, in active_branch
    return self.head.reference
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/refs/symbolic.py", line 311, in _get_reference
    raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to 'bcac2eb1f9b49cc15ebda65838e5465543dbb9c6'
during the build. The exception handler resets the branch and commit name to an empty string: a3e60a00b4/scripts/build-vyos-image (L281-L296)

This now adds a proper error message during build so it fails early.

(07:46) vyos_bld 08278c5a1172:/vyos/vyos-build # isobuild -test
Building custom VyOS version: 1.5-test-202402250746
I: Checking if packages required for VyOS image build are installed
build/config
Could not retrieve information from git: HEAD is a detached symbolic reference as it points to '39612f541e55bea19868f50f16d7a6c6e0034ed2'
2024-02-25 08:49:11 +01:00
sarthurdev
63a8f9d3c6 config: T4919: Add emulated TPM encryption test 2024-02-20 10:46:01 +01:00
Daniil Baturin
a45a1b3927 build: T3664: fix the chroot includes path
to account for the current working dir
2024-02-19 13:28:07 +00:00
Daniil Baturin
c803de47b4
Merge pull request #327 from sskaje/T5121
T5121: Fix, make architecture and build-type loaded from build flavor and cli arguments
2024-02-09 09:44:45 +00:00
Christian Breunig
499e8e1cbb Makefile: T2640: add helper to convert ISO to OCI image to start a container
Use either "make oci" or call the script manually:

$ scripts/iso-to-oci build/live-image-amd64.hybrid.iso

I: mount ISO build/live-image-amd64.hybrid.iso
I: extracting squashfs content
I: generate OCI container image vyos-1.5-strongswan-202311241125.tar
I: to import the previously generated OCI image to your local images run:

   docker import vyos-1.5-strongswan-202311241125.tar vyos:1.5-strongswan-202311241125 --change 'CMD [/sbin/init]'
2023-11-26 20:13:28 +01:00
Christian Breunig
b3d0ebaf1d Makefile: add new target qemu-live
Simply boot a live qemu version from the latest ISO build

(10:18) cpo lnx01:~/vyos-build [current] # sudo make qemu-live
if [ ! -f build/live-image-amd64.hybrid.iso ]; then
echo "Could not find build/live-image-amd64.hybrid.iso"
exit 1
fi
scripts/check-qemu-install --qemu-cmd build/live-image-amd64.hybrid.iso
 INFO - Creating Disk image testinstall-20231119-101823-4483.img
SeaBIOS (version 1.16.2-debian-1.16.2-1)
Machine UUID f48b60b2-e6ad-49ef-9d09-4245d0585e52
Booting from DVD/CD...

ISOLINUX 6.04 20200816 ETCD Copyright (C) 1994-2015 H. Peter Anvin et al
2023-11-19 10:18:49 +01:00
John Estabrook
64796852a4 image: T4516: update test script for changes in prompts/partition id 2023-11-15 15:33:42 -06:00
Daniil Baturin
f31701f1b4 build script: T5711: copy version.json to the ISO image
in addition to the SquashFS image
2023-11-03 17:14:58 +00:00
John Estabrook
ecd3727d63 smoketest: T5607: adjust for non-deterministic scsi device probing 2023-09-20 15:22:32 -05:00
sarthurdev
4727dc1756 smoketest: Allow selection of smoketests to run
Example:
`make test MATCH="interfaces|policy"` will only run interfaces and policy tests
2023-09-14 20:04:54 +02:00
Apachez
fa1462aa6d T5562: Fix -smp syntax for qemu-system-x86_64 2023-09-09 12:24:55 +02:00
Christian Breunig
a863fe0b03 Testsuite: fix qemu SMP configuration 2023-09-09 07:33:44 +02:00
Christian Breunig
9403274bf2 live-build: add missing quotes on chroot-squashfs-compression 2023-09-02 19:02:03 +02:00
Apachez
e472fcbf31 T5538: Change order within variable lb_config_tmpl to fit order of manpage and fix some typos 2023-09-02 12:53:03 +02:00
Apachez
b1425b1f37 T5510: Shrink imagesize and improve read performance by changing mksquashfs syntax 2023-09-02 03:23:17 +02:00
Apachez
baee59d26a T5510: Shrink imagesize and improve read performance by changing mksquashfs syntax 2023-09-01 21:42:37 +02:00
sskaje
8fcd043483 T5121: Remove code of T5120 2023-03-30 11:58:45 +08:00
sskaje
4995bcb5b8 T5121: Fix, make architecture and build-type loaded from build flavor and cli arguments 2023-03-29 19:05:30 +08:00
sskaje
bf66214dad T5122: Move archive-areas to defaults.toml to support non-free-firmware repository 2023-03-29 16:49:32 +08:00
Viacheslav Hletenko
84fba9f897 T5024: Try to shutdown several times for qemu install script
The first shutdown for qemu doesn't work
Try to shutdown several times
2023-02-22 09:03:28 +00:00
sarthurdev
52073f8ee6 debian: T5003: Increase VM memory - tests failed due to OOM condition 2023-02-13 11:20:49 +01:00
sarthurdev
1e116e0254 debian: T5003: Update to to Debian 12 "Bookworm"
* Remove obsolete packages and dependencies
2023-02-13 11:20:49 +01:00
Daniil Baturin
b55bf1b1c5
Merge pull request #285 from jsimpso/bootloaders
T4796: Allow configuration of 'bootloader' param
2022-11-12 17:02:36 +00:00
James Simpson
2ade1d9e66 T4796: Allow configuration of 'bootloader' param
Remove hard-coded values for "bootloader" when creating the live-build,
replaced with the value of `bootloaders`.

Set the current value to the default value if not specified, via
`defaults.toml`.

Add the default for arm64 as `grub-efi`.
2022-11-12 17:34:50 +08:00
James Simpson
95620ef20f T4796: Honor additional_repositories
Currently, additional_repositories in the effective build_config are
ignored due to a bug wherein all values end up under
`args['custom_apt_entry']` rather than
`build_config['custom_apt_entry']`.

This change fixes that, ensuring that the content of
`build_config['additional_repositories]` is added to
`build_config['custom_apt_entry']` alongside the command-line arguments.
2022-11-12 15:56:14 +08:00
Christian Poessinger
62417d5b47
Merge pull request #280 from jsimpso/additional_repositories
T4796: Check more cautiously for presence of keys
2022-11-09 20:47:46 +01:00
Christian Poessinger
5203d31fa2
Merge pull request #281 from jsimpso/current
T4796: Default args to list where list is expected
2022-11-09 20:47:32 +01:00
Christian Poessinger
404791353f
Merge pull request #282 from jsimpso/merge_order
T4796: Prefer mix-in config over default config
2022-11-09 20:47:08 +01:00
Christian Poessinger
77f4ba82f2
Merge pull request #276 from ssasso/fix_T4800
Fix T4800: wrong chroot_includes_dir var reference
2022-11-09 20:46:43 +01:00
James Simpson
f4bc652b3a T4796: Prefer mix-in config over default config 2022-11-09 14:33:19 +08:00
James Simpson
71b8a3e159 T4796: Check more cautiously for presence of keys 2022-11-09 14:08:21 +08:00
James Simpson
2251cf0ad0 T4796: Default args to list where list is expected
custom_apt_entry, custom_apt_key, and custom_package are expected to
be lists, but when a value is not provided they default to None. This
prevents lists provided in mix-in or flavor configurations from being
merged as expected.

https://docs.python.org/3/library/argparse.html#default
2022-11-09 13:57:29 +08:00