Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…5948.

The PATH used by rpm scriptlets is defined in /usr/lib/rpm/macros to
	PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

With https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin there is
now no difference among the first four locations:

	$ for i in /sbin /bin /usr/sbin /usr/bin ; do ls -dl $i ; done
	lrwxrwxrwx. 1 root root 8 Jan 16 00:00 /sbin -> usr/sbin
	lrwxrwxrwx. 1 root root 7 Jan 16 00:00 /bin -> usr/bin
	lrwxrwxrwx. 1 root root 3 Feb  6 06:32 /usr/sbin -> bin
	dr-xr-xr-x. 2 root root 12288 Feb  6 06:32 /usr/bin

That means that we have no way of putting the systemd-machine-id-setup
override to a location earlier in the PATH unless we specifically configure
the path (/usr/local/bin in this case) for the transaction.

Addressing
STEP 15/19: RUN test -f /etc/machine-id && ! test -s /etc/machine-id
Error: building at STEP "RUN test -f /etc/machine-id && ! test -s /etc/machine-id": while running runtime: exit status 1
  • Loading branch information
adelton committed Feb 7, 2025
1 parent be95bfc commit a6760bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile.fedora-rawhide
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ RUN groupadd -g 289 ipaapi; useradd -u 289 -g 289 -c 'IPA Framework User' -r -d
RUN groupadd -g 285 sssd; useradd -u 285 -g 285 -c 'User for sssd' -r -d /run/sssd/ -s '/sbin/nologin' sssd

# Workaround 1615948
RUN ln -s /bin/false /usr/sbin/systemd-machine-id-setup
RUN ln -s /bin/false /usr/local/bin/systemd-machine-id-setup
RUN rpm --eval '%_install_script_path' | sed 's#^#%_install_script_path /usr/local/bin:# ' > /usr/lib/rpm/macros.d/macros.usr-local-bin
RUN sed -i 's!%_install_langs.*!%_install_langs all!' /etc/rpm/macros.image-language-conf
RUN dnf upgrade -y --setopt=install_weak_deps=False \
&& dnf install --allowerasing -y --setopt=install_weak_deps=False freeipa-server freeipa-server-dns freeipa-server-trust-ad freeipa-healthcheck freeipa-client-epn patch \
&& dnf clean all
RUN rm -f /usr/lib/rpm/macros.d/macros.usr-local-bin

# debug: RUN test $( getent passwd | grep -E "^(dirsrv:x:389|ipaapi:x:289|kdcproxy:x:288|pkiuser:x:17|sssd:x:285):" | wc -l ) -eq 5

Expand Down

0 comments on commit a6760bd

Please sign in to comment.