From 9bd64288e35644951636ec90557723f2fa52061d Mon Sep 17 00:00:00 2001 From: Hadi Chokr Date: Sun, 12 Apr 2026 09:37:59 +0200 Subject: [PATCH] Revert hotfix series --- build.sh | 3 --- .../{99-kde-linux.preset => 50-kde-linux.preset} | 5 ----- mkosi.extra/usr/lib/tmpfiles.d/etc.conf | 1 + mkosi.finalize.d/40-core.sh.chroot | 15 ++++----------- mkosi.finalize.d/99-etc.sh.chroot | 2 +- 5 files changed, 6 insertions(+), 20 deletions(-) rename mkosi.extra/usr/lib/systemd/system-preset/{99-kde-linux.preset => 50-kde-linux.preset} (95%) diff --git a/build.sh b/build.sh index e6d5fa4..d0c390d 100755 --- a/build.sh +++ b/build.sh @@ -102,9 +102,6 @@ rm --recursive --force etc-factory git clone https://invent.kde.org/kde-linux/etc-factory DESTDIR=$PWD/mkosi.extra make --directory=etc-factory install -mkdir -p mkosi.output mkosi.cache -chown root:root mkosi.output mkosi.cache - mkosi \ --environment="CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA:-unknownSHA}" \ --environment="CI_COMMIT_SHA=${CI_COMMIT_SHA:-unknownSHA}" \ diff --git a/mkosi.extra/usr/lib/systemd/system-preset/99-kde-linux.preset b/mkosi.extra/usr/lib/systemd/system-preset/50-kde-linux.preset similarity index 95% rename from mkosi.extra/usr/lib/systemd/system-preset/99-kde-linux.preset rename to mkosi.extra/usr/lib/systemd/system-preset/50-kde-linux.preset index e0de477..619d32d 100644 --- a/mkosi.extra/usr/lib/systemd/system-preset/99-kde-linux.preset +++ b/mkosi.extra/usr/lib/systemd/system-preset/50-kde-linux.preset @@ -54,11 +54,6 @@ enable kmsconvt@tty1.service # Disable stuff we don't want # =========================== -# getty - we use kmscon -disable autovt@.service -disable getty@.service -disable getty@tty1.service - # networkd - we use networkmanager disable systemd-networkd.service disable systemd-networkd-wait-online.service diff --git a/mkosi.extra/usr/lib/tmpfiles.d/etc.conf b/mkosi.extra/usr/lib/tmpfiles.d/etc.conf index 58cf71f..bb5ac9a 100644 --- a/mkosi.extra/usr/lib/tmpfiles.d/etc.conf +++ b/mkosi.extra/usr/lib/tmpfiles.d/etc.conf @@ -8,6 +8,7 @@ L /etc/os-release - - - - ../usr/lib/os-release L+ /etc/mtab - - - - ../proc/self/mounts # KMSCON +L+ /etc/systemd/system/getty@tty1.service - - - - /dev/null L+ /etc/systemd/system/autovt@.service - - - - /usr/lib/systemd/system/kmsconvt@.service L+ /etc/systemd/system/autovt@tty1.service - - - - /usr/lib/systemd/system/kmsconvt@.service L+ /etc/systemd/system/getty.target.wants/kmsconvt@tty1.service - - - - /usr/lib/systemd/system/kmsconvt@.service diff --git a/mkosi.finalize.d/40-core.sh.chroot b/mkosi.finalize.d/40-core.sh.chroot index a1b2dfd..1e5c765 100755 --- a/mkosi.finalize.d/40-core.sh.chroot +++ b/mkosi.finalize.d/40-core.sh.chroot @@ -9,23 +9,16 @@ passwd --delete root passwd --lock root if [ -f "$SRCDIR/.secure_files/gpg.public.key" ]; then # only useful and available for publishing branches - # Create a temporary, writable GNUPGHOME - GNUPGHOME=$(mktemp -d) # Put our key into the systemd keyring - export GNUPGHOME + export GNUPGHOME="$SRCDIR/.secure_files/gpg" KEYRING=/usr/lib/systemd/import-pubring.pgp - + rm -rf "$GNUPGHOME" + mkdir "$GNUPGHOME" rm -f "$KEYRING" - gpg --no-options --no-default-keyring \ - --keyring="$KEYRING" \ - --homedir="$GNUPGHOME" \ - --import "$SRCDIR/.secure_files/gpg.public.key" + gpg --no-options --no-default-keyring --keyring="$KEYRING" --homedir="$GNUPGHOME" --import "$SRCDIR/.secure_files/gpg.public.key" # TODO: Make sure the keyring is actually used. This notably broke in the past because of an upstream change. # https://invent.kde.org/kde-linux/kde-linux/-/issues/199 - - # Clean up the temporary directory - rm -rf "$GNUPGHOME" fi # Uninstall solaar and sane, but keep their udev rules. diff --git a/mkosi.finalize.d/99-etc.sh.chroot b/mkosi.finalize.d/99-etc.sh.chroot index 62e5b20..7ff8ad5 100755 --- a/mkosi.finalize.d/99-etc.sh.chroot +++ b/mkosi.finalize.d/99-etc.sh.chroot @@ -24,7 +24,7 @@ rm --recursive --force /usr/share/factory/etc/pam.d # Copy all of etc into factory dir for tmpfiles.d (see tmpfiles.d docs). [ -d /usr/share/factory ] || mkdir /usr/share/factory -cp -r --preserve=mode,timestamps,links --no-target-directory --update=all /etc /usr/share/factory/etc +cp --archive --no-target-directory --update=all /etc /usr/share/factory/etc # Clean up factory content that we absolutely do not want because it is machine/installation dependent. cd /usr/share/factory/etc