ensure no buildroot macro left in /usr/bin/docker

A new change soon to be merged upstream will leave the buildroot macro
in /usr/bin/docker in the rpmbuild process.

This commit will sanitize the buildroot macro from /usr/bin/docker.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2023-03-24 12:46:47 +05:30
parent bf8062ab84
commit 839d942373

View File

@ -416,6 +416,9 @@ install -dp %{buildroot}%{_libexecdir}/%{name}
install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name} install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name}
cd .. cd ..
# Sanitize paths in %%{_bindir}/docker
sed -i 's;%{buildroot}%{_sysconfdir};%{_sysconfdir}/containers;g' %{buildroot}%{_bindir}/docker
# do not include docker and podman-remote man pages in main package # do not include docker and podman-remote man pages in main package
for file in `find %{buildroot}%{_mandir}/man[15] -type f | sed "s,%{buildroot},," | grep -v -e remote -e docker`; do for file in `find %{buildroot}%{_mandir}/man[15] -type f | sed "s,%{buildroot},," | grep -v -e remote -e docker`; do
echo "$file*" >> podman.file-list echo "$file*" >> podman.file-list