Don't assume per-user groups in test-suite

The tests from commits f2d3be2a87 and
c815822c8b assume per-user groups,
but this is not a generally valid assumption and causes unnecessary
bogus failures in the test-suite in some setups (eg mock)
This commit is contained in:
Panu Matilainen 2017-10-12 15:51:26 +03:00
parent ff5e2874f8
commit 92b718bb0e
3 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
%{!?filetype: %global filetype file}
%{?fixit: %global havepretrans 1}
%{!?user: %global user root}
%{!?grp: %global grp root}
Name: replacetest%{?sub:-%{sub}}
Version: %{ver}
@ -44,5 +45,5 @@ rm -rf $RPM_BUILD_ROOT
%endif
%files
%defattr(-,%{user},%{user},-)
%defattr(-,%{user},%{grp},-)
/opt/*

View File

@ -403,6 +403,7 @@ runroot rpmbuild --quiet -bb \
--define "filetype datadir" \
--define "filedata README1" \
--define "user $(id -u -n)" \
--define "grp $(id -g -n)" \
/data/SPECS/replacetest.spec
runroot rpmbuild --quiet -bb \
@ -410,6 +411,7 @@ runroot rpmbuild --quiet -bb \
--define "filetype datadir" \
--define "filedata README2" \
--define "user $(id -u -n)" \
--define "grp $(id -g -n)" \
/data/SPECS/replacetest.spec
mkdir "${RPMTEST}"/opt/f00f

View File

@ -78,6 +78,7 @@ runroot rpmbuild --quiet -bb \
--define "filetype datadir" \
--define "filedata README1" \
--define "user $(id -u -n)" \
--define "grp $(id -g -n)" \
/data/SPECS/replacetest.spec
runroot rpm -U /build/RPMS/noarch/replacetest-1.0-1.noarch.rpm