Skip to content

Commit

Permalink
twoliter: avoid duplicate macro declaration
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bcressey committed Oct 9, 2024
1 parent 3a625a4 commit 829f4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twoliter/embedded/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}") ; \
Expand Down

0 comments on commit 829f4e9

Please sign in to comment.