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 May 27, 2024
1 parent 9da0d5f commit fe46c37
Show file tree
Hide file tree
Showing 3 changed files with 32 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 0a81fbb66c136439b19ab5cfb371e2f460efb2c9 Mon Sep 17 00:00:00 2001
From: Martin Kolman <mkolman@redhat.com>
Date: Tue, 30 Apr 2024 13:55:33 +0200
Subject: [PATCH] Do not cleanup pam binaries in /usr/sbin

They are needed for correct Wayland compositor startup.
---
80-rhel/runtime-cleanup.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/80-rhel/runtime-cleanup.tmpl b/80-rhel/runtime-cleanup.tmpl
index 92a9934..45940dc 100644
--- a/80-rhel/runtime-cleanup.tmpl
+++ b/80-rhel/runtime-cleanup.tmpl
@@ -293,7 +293,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.44.0

5 changes: 5 additions & 0 deletions dockerfile/anaconda-iso-creator/lorax-build
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ 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 -d ./templates.d/80-rhel/

# 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 +51,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/80-rhel/ \
-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 fe46c37

Please sign in to comment.