Commit graph

26 commits

Author SHA1 Message Date
nl6720
2932a9def3
Makefile: build and install the mkarchiso(1) man page
rst2man from python-docutils is required to convert the man page from
reStructuredText.
2024-02-17 11:27:19 +02:00
David Runge
ddda63ba09
Remove qemu-headless from list of dependencies in GitLab CI
Remove qemu-headless since it is no longer needed to build the project
and is also no longer provided by qemu-base.
2023-08-21 15:55:06 +02:00
Kristian Klausen
a2e886b4b9
Use VM runners[1] for building
Building inside a TCG accelerated qemu VM is slow and painful, but it is
the only option when running in a non-privileged container.

arch-boxes has been built inside a KVM accelerated VMs ("VM runner") for
over 11 months[2] and recently the MR[1] was merged into the
infrastructure repo. With it now being a official part of arch's
infrastructure we should switch to it and get much faster builds.

Doing some quick testing, the whole pipeline is now roughly ~29-84
minutes faster (taking between 7-9 minutes, instead of 36-93 minutes).

[1] https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/385
[2] 3bda5b26a6

Fix #161
2022-08-21 19:24:47 +02:00
plainlinen
b8957f0fa0 Add implicit package dependencies to PACKAGE_LIST in .gitlab-ci.yml
CI was working before because these dependencies were already in
the official ISO but include them explicitly to be safe.
2022-06-17 21:03:39 -07:00
David Runge
5b950589ac
Limit CI pipelines on default branch and merge requests
.gitlab-ci.yml:
Only run build pipelines on default branch and merge requests if they change code or profile files.
2022-01-31 17:28:36 +01:00
David Runge
549ce5bc4b
Set all build steps to be interruptable
.gitlab-ci.yml:
Set all build steps to be interruptable, so they will be interrupted if a newer commit is pushed on the same branch,
which also triggers CI.
2022-01-30 21:56:23 +01:00
David Runge
21ca345720
Limit triggering a CI build to change of non-code files
.gitlab-ci.yml:
Only trigger builds in CI when changing code files or profiles.
2022-01-30 21:56:20 +01:00
David Runge
6c1b4663d9
Add the installation of latest archlinux-keyring to CI
.gitlab-ci.yml:
Install the latest archlinux-keyring before installing anything else.
This is to make sure to not run into outdated keys upon updating, which
is a problem because we can currently not even ensure a keyring that is
valid longer than one month...
https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/4
2022-01-29 18:42:48 +01:00
David Runge
e58910165f
gitlab-ci: Call renamed check target
.gitlab-ci.yml:
Change the called make target in the gitlab CI check target to `check` (it has been renamed from `lint`).
2021-07-31 17:38:41 +02:00
David Runge
d56cbd9537
gitlab-ci: Include from ci-scripts
.gitlab-ci.yml:
Include a gitlab CI yaml file from the ci-scripts repository, that replaces the build-host.sh script and abstracts the
.build target.
Move all variables to top-level as they are useful in all build targets.
Remove unnecessary before_script definitions because they are abstracted away by ci-scripts.
2021-07-01 15:08:17 +02:00
David Runge
a44310b220
Rename build script
.gitlab/ci/build_archiso.sh:
Rename .gitlab/ci/build-inside-vm.sh to .gitlab/ci/build_archiso.sh.

.gitlab-ci.yml:
Rename BUILD_SCRIPT to build_archiso.sh.
2021-07-01 15:07:04 +02:00
David Runge
97b7aebab8
gitlab-ci: Also build a baseline netboot target
.gitlab-ci.yml:
With #132 being fixed, it is possible to properly build the baseline netboot target without failure.
2021-06-30 14:36:34 +02:00
David Runge
9827cb19bb
ci: Use environment variables to override build settings
.gitlab-ci.yml:
Use environment variables to override the build settings offered by the build-host.sh script.
Lower the RAM usage of the builds to 3072.
Lower the COW space used by archiso to 2GiB.
Remove dependency on libisoburn in the `before_script` section of the build target (libarchive and util-linux have
replaced this requirement).
Use size units in accordance with upstream documentation.
Use the new name of the build's metrics file.

Fixes #134
2021-05-13 18:32:22 +02:00
David Runge
f86cb0faa2
ci: Expand parallel matrix with build modes
.gitlab-ci.yml:
Expand the parallel matrix with build modes per profile.
Do not run netboot with the baseline profile, as codesigning is not supported yet (#132).
Remove tagging secure, as archiso builds will only ever be used for testing the project.
Build ISOs using fast-single-thread (they take very long otherwise and hit the job time limit) and use any available
runner for anything else.
2021-05-11 18:09:50 +02:00
nl6720
0ed1c61f1f
Add package count, El Torito EFI image size and initramfs image sizes to GitLab metrics
Metrics are now collected in build-inside-vm.sh since the files in question are in the work directory.

Implements #101 and #111.
2021-04-30 19:44:37 +03:00
nl6720
702026e124
.gitlab-ci.yml: do not use build:secure on forks
Forks may not have access to secure runners. Restrict build:secure to https://gitlab.archlinux.org/archlinux/archiso/ only.

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/106 .
2021-03-14 21:27:04 +02:00
nl6720
97f510df81
.gitlab-ci.yml: use correct units for image size description
`du --block-size=MiB` (and `du -m`) returns mebibytes not megabytes.

Additionally, shorten the du command. `du --block-size=MiB` is the same as `du -m`.
2021-02-06 15:35:55 +02:00
David Runge
428bf47370
Add build stage for continuous integration
.gitlab-ci.yml:
Add a build stage to the gitlab CI, that facilitates the scripts below .gitlab/ci/, building the baseline and releng
profiles in parallel.
Distinguish the use-case in which builds are done for master, schedules and tags in a secure environment and any other
where builds just have to be fast (for ensuring nothing is broken).

Use MiB as block size for the du call when generating data for the metrics file.
2021-01-31 23:25:22 +01:00
Sven-Hendrik Haase
6c397136fd Use official archlinux Docker image
archlinux/base is being deprecated anyway.
2020-11-17 11:35:46 +00:00
nl6720
d7fc56e006
Move shell script linting into a separate make target
Makefile:
Move shellcheck to a "lint" target and change "check" so that it runs "lint".
This provides a more finer grained control and allows to extend "check" with things beyond just linting.

.gitlab-ci.yml:
Run `make lint` in the lint job.
2020-07-30 13:09:53 +03:00
David Runge
e264b44682
Add license and basic documentation
LICENSE:
Add GPL-3.0 license.

{{archiso,configs}/*,.editorconfig,.gitlab-ci.yml}:
Add SPDX license identifier.

Makefile:
Add SPDX license identifier.
Install the `run_archiso.sh` script as global executable `run_archiso`.
Use -D and -t flags to install to install files more generically (without a previous call to install the directory).

README.rst:
Add README outlining the project's scope, how to build images from the profiles and how to test.

AUTHORS.rst:
Add list of all direct contributors to the repository.

CONTRIBUTING.rst:
Add basic contribution guidelines, explaining the linter and the license in use.

Closes #7
Closes #3
2020-07-29 14:27:48 +02:00
nl6720
ecd339278d
Add check target to Makefile
Makefile:
Move shellcheck commands from .gitlab-ci.yml.

.gitlab-ci.yml:
Run `make check`.
Prevent partial upgrades, i.e. use '-Syu'.
Prevent reinstalling already installed packages by using pacman's '--needed' option.
Don't force-download the package database.
2020-07-17 10:42:14 +03:00
David Runge
e2032db4e7
Adding linting for initcpio scripts
archiso/initcpio/install/*:
Setting bash shebang for all scripts and making them comform with shellcheck.

archiso/initcpio/{hooks,script}/*:
Setting ash shebang for all scripts and making them comform with shellcheck (for dash, as shellcheck has no ash specific
ruleset). Essentially the ash based scripts should be POSIX compliant as much as possible to have an easier time
writing, debugging and maintaining them.
Ensuring that variables are not treated as options and introducing variable quoting.

.gitlab-ci.yml:
Integrating shellcheck for initcpio scripts.

Closes #32
2020-07-11 20:58:01 +02:00
David Runge
d835419b36
Adding script to run archiso in qemu
scripts/run_archiso.sh:
A script to run a built archiso image using qemu.
It can run the image on an emulated BIOS (using seabios) or UEFI (using edk2-ovmf) system.

.gitlab-ci.yml:
Adding scripts/run_archiso.sh to shellcheck call.

Closes #28
2020-07-10 23:13:27 +02:00
nl6720
511ca9d95d
Move choose-mirror script to /usr/local/bin/
/etc/systemd/scripts/ is not a standard directory.

Run shellchek on the choose-mirror script.
2020-06-30 18:10:55 +03:00
David Runge
47533fd974
Introducing shellcheck in gitlab CI
archiso/mkarchiso:
Quoting all variables.
Changing pkg_list to be an array instead of a string for easier
handling. Using read to properly populate pkg_list from OPTARG with
stripped whitespaces.
Not exporting iso_label anymore as there seems to be no reason to do so.
Introducing line breaks.

.editorconfig:
Setting max_line_length to 120.
Adding a section for YAML files (e.g. .gitlab-ci.yml).

configs/releng/build.sh
Quting nearly all variables.
Introducing line breaks.

configs/baseline/build.sh:
Quoting all variables.
Introducing line breaks.

.gitlab-ci.yml:
Adding gitlab CI for shelleck linting of the config build scripts, mkarchiso and startup scripts in releng.

Closes #19
2020-06-29 20:10:23 +02:00