From 9d2e4ceee5bf891354754775fd98c6792e672af8 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 10 Jan 2023 12:04:10 +0100 Subject: [PATCH 1/3] ci: Update mkosi action to latest commit Let's make sure we're testing with the latest changes in mkosi. This includes both the switch to systemd-repart and ukify, making sure we get extra testing coverage for those components. This also drops options from the centos config that have been removed in the newer mkosi. For some reason idmapping runs into some issues so we disable it for now. --- .github/workflows/mkosi.yml | 18 ++++-------------- .../10-mkosi.centos} | 7 ++----- 2 files changed, 6 insertions(+), 19 deletions(-) rename mkosi.conf.d/{centos_epel/10-mkosi.centos_epel => centos/10-mkosi.centos} (97%) diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 0e3cfae7b8..357b4f4205 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -72,24 +72,14 @@ jobs: release: rawhide - distro: opensuse release: tumbleweed - - distro: centos_epel + - distro: centos release: 9-stream - - distro: centos_epel + - distro: centos release: 8-stream steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: systemd/mkosi@c9772ec920f1cd03181ba14e6fe2c3d35ccb4f92 - - # FIXME: temporary workaround for a file conflict between systemd (C9S) and - # systemd-boot (EPEL9). Drop this once systemd in C9S is updated to v252 - # (should be done by the end of 2022). - - name: Fix C9S/EPEL9 - if: ${{ matrix.release == '9-stream' }} - run: sudo sed -i '/add_packages/s/systemd-boot/systemd/g' /usr/local/lib/python3.10/dist-packages/mkosi/__init__.py - - - name: Install - run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2 + - uses: systemd/mkosi@ab2aff830096e681da1950a7d29f277caa89516c - name: Configure run: | @@ -106,7 +96,7 @@ jobs: EOF - name: Build ${{ matrix.distro }} - run: sudo mkosi build + run: sudo mkosi --idmap no - name: Show ${{ matrix.distro }} image summary run: sudo mkosi summary diff --git a/mkosi.conf.d/centos_epel/10-mkosi.centos_epel b/mkosi.conf.d/centos/10-mkosi.centos similarity index 97% rename from mkosi.conf.d/centos_epel/10-mkosi.centos_epel rename to mkosi.conf.d/centos/10-mkosi.centos index 768403f7cf..a950cbd4d2 100644 --- a/mkosi.conf.d/centos_epel/10-mkosi.centos_epel +++ b/mkosi.conf.d/centos/10-mkosi.centos @@ -4,11 +4,8 @@ # Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image. [Distribution] -Distribution=centos_epel - -[Output] -Format=gpt_xfs -HostonlyInitrd=no +Distribution=centos +Repositories=epel [Content] Packages= From 1a01473065e37bd362227d58309b3d5c20590ddf Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 15 Jan 2023 20:35:52 +0100 Subject: [PATCH 2/3] boot: Remove -O1 workaround Now that we have ukify and mkosi has been updated to use it, we have a solution in place to make sure that PE sections don't overlap in a UKI so let's drop the workaround to avoid overlapping PE sections. --- src/boot/efi/meson.build | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index fb8ec26564..10ab5ce5ce 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -198,15 +198,6 @@ efi_cflags = [ ] ) -# Our code size has increased enough to possibly create overlapping PE sections -# at sd-stub runtime, which will often enough prevent the image from booting. -# This only happens because the usual instructions for assembling a unified -# kernel image contain hardcoded addresses for section VMAs added in. Until a -# proper solution is in place, we can at least compile with as least -O1 to -# reduce the likelihood of this happening. -# https://github.com/systemd/systemd/issues/24202 -efi_cflags += '-O1' - efi_cflags += cc.get_supported_arguments({ 'ia32': ['-mno-sse', '-mno-mmx'], 'x86_64': ['-mno-red-zone', '-mno-sse', '-mno-mmx'], From 8c21a0c9ee7077b310be3901cdf5f063f28df04f Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 15 Jan 2023 20:41:33 +0100 Subject: [PATCH 3/3] mkosi: Use meson setup --- mkosi.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi.build b/mkosi.build index c1435fd0fc..372711c607 100755 --- a/mkosi.build +++ b/mkosi.build @@ -83,7 +83,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then rootprefix=/${rootprefix#/} fi - meson "$BUILDDIR" \ + meson setup "$BUILDDIR" \ -D "sysvinit-path=$sysvinit_path" \ -D "rootprefix=$rootprefix" \ -D man=false \