From 829f4e9b59b917fa71c762363311909d7f287bec Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Tue, 8 Oct 2024 15:31:05 +0000 Subject: [PATCH] twoliter: avoid duplicate macro declaration Processes that run as root need the target's macros in order to parse spec files. Copy the macros to root's home directory rather than to the system-wide `/etc/rpm` location, to avoid defining macros twice for other users, such as the unprivileged builder user. Otherwise, the redundant definition forces macros to be undefined twice to clear them from the per-user and the system-level scopes. Signed-off-by: Ben Cressey --- twoliter/embedded/build.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twoliter/embedded/build.Dockerfile b/twoliter/embedded/build.Dockerfile index 1c85bbdc..a9e2af69 100644 --- a/twoliter/embedded/build.Dockerfile +++ b/twoliter/embedded/build.Dockerfile @@ -75,7 +75,7 @@ RUN --mount=target=/host \ -x '*-debugsource-*.rpm' \ --no-database \ ./rpmbuild/RPMS && \ - cp .rpmmacros /etc/rpm/macros && \ + cp .rpmmacros /root/.rpmmacros && \ declare -a KIT_REPOS && \ for kit in ${KIT_DEPENDENCIES} ; do \ KIT_REPOS+=("--repofrompath=${kit},/bypass/build/kits/${kit}/${ARCH}" --enablerepo "${kit}") ; \