Skip to content

Commit

Permalink
FIXME: don't drop pam binaries during image build
Browse files Browse the repository at this point in the history
  • Loading branch information
M4rtinK committed Apr 26, 2024
1 parent d494199 commit 528561f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions dockerfile/anaconda-iso-creator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ RUN set -ex; \
COPY ["lorax-build", "/"]
COPY ["lorax-build-webui", "/"]
COPY ["adjust-templates-for-webui.patch", "/"]
COPY ["do-not-cleanup-pam-binaries-in-usr-sbin.patch", "/"]

RUN mkdir /lorax /anaconda-rpms /images

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 9000cafa125b15dd8b3659f112726b62cc67e5ab Mon Sep 17 00:00:00 2001
From: Martin Kolman <[email protected]>
Date: Tue, 5 Mar 2024 17:40:39 +0100
Subject: [PATCH] Do not cleanup pam binaries in /usr/sbin

They are needed for correct Wayland compositor startup.
---
share/templates.d/99-generic/runtime-cleanup.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl
index aad31f77..2b042932 100644
--- a/share/templates.d/99-generic/runtime-cleanup.tmpl
+++ b/share/templates.d/99-generic/runtime-cleanup.tmpl
@@ -289,7 +289,7 @@ removefrom openssh /usr/libexec/*
removefrom openssh-clients /etc/ssh/* /usr/bin/ssh-*
removefrom openssh-clients /usr/libexec/*
removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server
-removefrom pam /usr/sbin/* /usr/share/locale/*
+removefrom pam /usr/share/locale/*
removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/*
removefrom polkit /usr/bin/*
removefrom popt /usr/share/locale/*
--
2.43.2

4 changes: 4 additions & 0 deletions dockerfile/anaconda-iso-creator/lorax-build
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,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 /do-not-cleanup-pam-binaries-in-usr-sbin.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
Expand All @@ -47,6 +50,7 @@ MINOR_VERSION=${VERSION_ID#*.}
lorax -p RHEL -v "$MAJOR_VERSION" -r "$MINOR_VERSION" \
--volid "RHEL-$MAJOR_VERSION-$MINOR_VERSION-BaseOS-x86_64" \
--nomacboot \
--sharedir ./templates.d/99-generic/ \
-s http://download.devel.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10/compose/BaseOS/x86_64/os/ \
-s http://download.devel.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10/compose/AppStream/x86_64/os/ \
-s https://download.copr.fedorainfracloud.org/results/m4rtink/python-pam-rebuild/centos-stream-10-x86_64/ \
Expand Down

0 comments on commit 528561f

Please sign in to comment.