diff --git a/yum-utils.spec b/yum-utils.spec index 261d09f..45f08f6 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -353,8 +353,8 @@ This plugin touches rpmdb files to work around overlayfs issues. %patch4 -p1 %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install %find_lang %name @@ -393,26 +393,26 @@ plugins="$plugins \ " %endif -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/%pluginhome -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/post-actions +mkdir -p %{buildroot}%{_sysconfdir}/yum/pluginconf.d/ %{buildroot}%pluginhome +mkdir -p %{buildroot}%{_sysconfdir}/yum/post-actions cd plugins for plug in $plugins; do - install -m 644 $plug/*.conf $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ - install -m 644 $plug/*.py $RPM_BUILD_ROOT/%pluginhome + install -m 644 $plug/*.conf %{buildroot}%{_sysconfdir}/yum/pluginconf.d/ + install -m 644 $plug/*.py %{buildroot}%pluginhome done -install -m 644 aliases/aliases $RPM_BUILD_ROOT/%{_sysconfdir}/yum/aliases.conf -install -m 644 versionlock/versionlock.list $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ +install -m 644 aliases/aliases %{buildroot}%{_sysconfdir}/yum/aliases.conf +install -m 644 versionlock/versionlock.list %{buildroot}%{_sysconfdir}/yum/pluginconf.d/ # need for for the ghost in files section of yum-plugin-local -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d -touch $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/_local.repo +mkdir -p %{buildroot}%{_sysconfdir}/yum.repos.d +touch %{buildroot}%{_sysconfdir}/yum.repos.d/_local.repo # use explicit python2 shebang. -grep -Rl '#!.*/usr/bin/python' $RPM_BUILD_ROOT | \ +grep -Rl '#!.*/usr/bin/python' %{buildroot} | \ xargs sed -i -e 's~#!.*/usr/bin/python~#!%{__python2}~g' # Python byte compilation for %%pluginhome. -%py_byte_compile %{__python2} $RPM_BUILD_ROOT/%pluginhome +%py_byte_compile %{__python2} %{buildroot}%pluginhome %check # To execute: ./test/test-all @@ -634,6 +634,7 @@ xargs sed -i -e 's~#!.*/usr/bin/python~#!%{__python2}~g' - Use %%py_byte_compile for %%pluginhome - Clean trailing white-space - Remove obsolete Group tag +- Replace $RPM_BUILD_ROOT with %%{buildroot} * Fri Aug 31 2018 Michal Domonkos - 1.1.31-517 - Use explicit python2 executable at build time