33 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
James Simpson
f4bfaa9b97 T4796: Move and update custom_apt_entry logic
Rather than only looking at the default config, look at the merged
 build_config.

Check wether additional_repositories is actually defined before trying
 to reference it.
2022-11-07 14:26:49 +08:00
James Simpson
048aa40655 T4796: Fix ARCHIVES_DIR reference 2022-11-07 14:26:43 +08:00
James Simpson
509d4500da T4796: Correct function name from dict_merge 2022-11-07 14:26:40 +08:00
Stefano Sasso
ca6a82792c Fix T4800: wrong chroot_includes_dir var reference 2022-11-05 13:08:28 +00:00
Daniil Baturin
dbc78d089b T4796: fix argument order in merging default and custom options
in buils-vyos-image
2022-11-03 12:43:51 -04:00
Daniil Baturin
f39f4d1f23 T3664: dehardcode fields of the OS release file 2022-10-30 14:31:04 -04:00
sarthurdev
be065d568b build: T3664: Fix apt pinning file issue and use defaults for paths 2022-10-11 18:37:55 +02:00
sarthurdev
fbe8ee6e19 T3664: Add support for local packages, generate apt release pinning
* APT::Default-Release caused an issue when local packages present
2022-10-09 21:33:44 +02:00
Daniil Baturin
3979b25dcf T3664: initial implementation of the build flavor system 2022-10-06 17:55:01 -04:00