Medicine for bogus test-suite failures in buildsys/mock
- Dump out test-suite log in case of failures again - Don't assume per-user groups in test-suite
This commit is contained in:
parent
9c3c353fc6
commit
7f79c17b8e
70
0001-Don-t-assume-per-user-groups-in-test-suite.patch
Normal file
70
0001-Don-t-assume-per-user-groups-in-test-suite.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 92b718bb0e98ecaea6d4229eab9ef3bc0220d9c2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <92b718bb0e98ecaea6d4229eab9ef3bc0220d9c2.1507815046.git.pmatilai@redhat.com>
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu, 12 Oct 2017 15:51:26 +0300
|
||||
Subject: [PATCH] Don't assume per-user groups in test-suite
|
||||
|
||||
The tests from commits f2d3be2a8741234faaa96f5fd05fdfdc75779a79 and
|
||||
c815822c8bdb138066ff58c624ae83e3a12ebfa9 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)
|
||||
---
|
||||
tests/data/SPECS/replacetest.spec | 3 ++-
|
||||
tests/rpmreplace.at | 2 ++
|
||||
tests/rpmverify.at | 1 +
|
||||
3 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/data/SPECS/replacetest.spec b/tests/data/SPECS/replacetest.spec
|
||||
index c764adc27..54974567b 100644
|
||||
--- a/tests/data/SPECS/replacetest.spec
|
||||
+++ b/tests/data/SPECS/replacetest.spec
|
||||
@@ -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/*
|
||||
diff --git a/tests/rpmreplace.at b/tests/rpmreplace.at
|
||||
index 11e6221d7..6f0444bb7 100644
|
||||
--- a/tests/rpmreplace.at
|
||||
+++ b/tests/rpmreplace.at
|
||||
@@ -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
|
||||
diff --git a/tests/rpmverify.at b/tests/rpmverify.at
|
||||
index c5530de69..78f50fd33 100644
|
||||
--- a/tests/rpmverify.at
|
||||
+++ b/tests/rpmverify.at
|
||||
@@ -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
|
||||
--
|
||||
2.13.6
|
||||
|
10
rpm.spec
10
rpm.spec
@ -31,7 +31,7 @@
|
||||
|
||||
%global rpmver 4.14.0
|
||||
#global snapver rc2
|
||||
%global rel 1
|
||||
%global rel 2
|
||||
|
||||
%global srcver %{version}%{?snapver:-%{snapver}}
|
||||
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
|
||||
@ -66,6 +66,7 @@ Patch4: rpm-4.8.1-use-gpg2.patch
|
||||
Patch5: rpm-4.12.0-rpm2cpio-hack.patch
|
||||
|
||||
# Patches already upstream:
|
||||
Patch100: 0001-Don-t-assume-per-user-groups-in-test-suite.patch
|
||||
|
||||
# These are not yet upstream
|
||||
Patch906: rpm-4.7.1-geode-i686.patch
|
||||
@ -495,8 +496,7 @@ rm -f $RPM_BUILD_ROOT/%{rpmhome}/{tcl.req,osgideps.pl}
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
make check
|
||||
[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log
|
||||
make check || cat tests/rpmtests.log
|
||||
%endif
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
@ -646,6 +646,10 @@ make check
|
||||
%doc doc/librpm/html/*
|
||||
|
||||
%changelog
|
||||
* Thu Oct 12 2017 Panu Matilainen <pmatilai@redhat.com> - 4.14.0-2
|
||||
- Dump out test-suite log in case of failures again
|
||||
- Don't assume per-user groups in test-suite
|
||||
|
||||
* Thu Oct 12 2017 Panu Matilainen <pmatilai@redhat.com> - 4.14.0-1
|
||||
- Rebase to rpm 4.14.0 final (http://rpm.org/wiki/Releases/4.14.0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user