diff --git a/dockerfile/anaconda-iso-creator/Dockerfile b/dockerfile/anaconda-iso-creator/Dockerfile index 98e32b9b7a0..2bd84f577ae 100644 --- a/dockerfile/anaconda-iso-creator/Dockerfile +++ b/dockerfile/anaconda-iso-creator/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex; \ COPY ["lorax-build", "/"] COPY ["lorax-build-webui", "/"] COPY ["adjust-templates-for-webui.patch", "/"] +COPY ["pkexec-command.patch", "/"] RUN mkdir /lorax /anaconda-rpms /images diff --git a/dockerfile/anaconda-iso-creator/lorax-build b/dockerfile/anaconda-iso-creator/lorax-build index 8deb0affb86..59b87397e83 100755 --- a/dockerfile/anaconda-iso-creator/lorax-build +++ b/dockerfile/anaconda-iso-creator/lorax-build @@ -36,12 +36,16 @@ mkdir -p $REPO_DIR cp -a $INPUT_RPMS/* $REPO_DIR || echo "RPM files can't be copied!" # We could just do the build with official repositories only createrepo_c $REPO_DIR +cp -r /usr/share/lorax/templates.d/ /lorax/ +patch -p2 -i /pkexec-command.patch + # build boot.iso with our rpms . /etc/os-release # The download.fedoraproject.org automatic redirector often selects download-ib01.f.o. for GitHub's cloud, which is too unreliable; use a mirror # The --volid argument can cause different network interface naming: https://github.com/rhinstaller/kickstart-tests/issues/448 lorax -p Fedora -v "$VERSION_ID" -r "$VERSION_ID" \ --volid Fedora-S-dvd-x86_64-rawh \ + --sharedir ./templates.d/99-generic/ \ -s http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/ \ -s file://$REPO_DIR/ \ "$@" \ diff --git a/dockerfile/anaconda-iso-creator/lorax-build.j2 b/dockerfile/anaconda-iso-creator/lorax-build.j2 index b568c8468ce..a576d6f355a 100755 --- a/dockerfile/anaconda-iso-creator/lorax-build.j2 +++ b/dockerfile/anaconda-iso-creator/lorax-build.j2 @@ -29,6 +29,9 @@ mkdir -p $REPO_DIR cp -a $INPUT_RPMS/* $REPO_DIR || echo "RPM files can't be copied!" # We could just do the build with official repositories only createrepo_c $REPO_DIR +cp -r /usr/share/lorax/templates.d/ /lorax/ +patch -p2 -i /pkexec-command.patch + # build boot.iso with our rpms . /etc/os-release # The download.fedoraproject.org automatic redirector often selects download-ib01.f.o. for GitHub's cloud, which is too unreliable; use a mirror @@ -37,6 +40,7 @@ createrepo_c $REPO_DIR lorax -p Fedora -v "$VERSION_ID" -r "$VERSION_ID" \ {% if distro_release == "rawhide" %} --volid Fedora-S-dvd-x86_64-rawh \ + --sharedir ./templates.d/99-generic/ \ {% else %} --volid Fedora-S-dvd-x86_64-f{$ distro_release $} \ {% endif %} diff --git a/dockerfile/anaconda-iso-creator/pkexec-command.patch b/dockerfile/anaconda-iso-creator/pkexec-command.patch new file mode 100755 index 00000000000..d03f7083cf5 --- /dev/null +++ b/dockerfile/anaconda-iso-creator/pkexec-command.patch @@ -0,0 +1,39 @@ +From ed493f55462a0a8528f554e1f884bfa77f700520 Mon Sep 17 00:00:00 2001 +From: Adam Kankovsky +Date: Thu, 3 Oct 2024 09:52:26 +0200 +Subject: [PATCH] Update cleanup for pkexec command + +--- + share/templates.d/99-generic/runtime-cleanup.tmpl | 1 - + share/templates.d/99-generic/runtime-postinstall.tmpl | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl +index 12c45189..200e3bed 100644 +--- a/share/templates.d/99-generic/runtime-cleanup.tmpl ++++ b/share/templates.d/99-generic/runtime-cleanup.tmpl +@@ -291,7 +291,6 @@ removefrom openssh-clients /usr/libexec/* + removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server + removefrom pam /usr/share/locale/* + removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/* +-removefrom polkit /usr/bin/* + removefrom popt /usr/share/locale/* + removefrom procps-ng /usr/bin/free /usr/bin/pgrep /usr/bin/pkill + removefrom procps-ng /usr/bin/pmap /usr/bin/pwdx /usr/bin/skill /usr/bin/slabtop +diff --git a/share/templates.d/99-generic/runtime-postinstall.tmpl b/share/templates.d/99-generic/runtime-postinstall.tmpl +index 93069746..d5193c9b 100644 +--- a/share/templates.d/99-generic/runtime-postinstall.tmpl ++++ b/share/templates.d/99-generic/runtime-postinstall.tmpl +@@ -85,6 +85,9 @@ symlink /etc/systemd/system/inst.rngd.service etc/systemd/system/basic.target.wa + ## set up "install" user account + append etc/passwd "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda" + append etc/shadow "install::14438:0:99999:7:::" ++## set up "install-user" user account ++append etc/passwd "install-user:x:1001:1001::/home/install-user:/usr/bin/bash" ++append etc/shadow "install-user::14438:0:99999:7:::" + ## remove root password + replace "root:\*:" "root::" etc/shadow + +-- +2.46.2 +