Package repocop-unittest-buildreq: Specfile

%define testname buildreq-xorg

Name: repocop-unittest-buildreq
Version: 0.05
Release: alt1
BuildArch: noarch
Packager: Igor Yu. Vlasenko <>

Summary: %testname integration tests for repocop test platform
Group: Development/Other
License: GPL or Artistic
Requires: repocop >= 0.19

%testname integration test for repocop test platform.
The test checks BuildRequires: tags against a list of not
recommended requirements and issues appropriate warnings.


cat > posttest <<'EOF'
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
 select pkgid, buildrequirename from rpm_buildrequires where buildrequirename='XFree86-devel' OR buildrequirename='XFree86-libs' OR buildrequirename='xorg-x11-devel' OR buildrequirename='xorg-x11-libs' OR buildrequirename='xorg-devel' OR buildrequirename='xorg-libs' OR buildrequirename='libmesa-devel';
my %%pkg; while (<>) {
   my ($id,$req)=split(/\t/);
   if ($pkg{$id}) {$pkg{$id}.=' '.$req} else {$pkg{$id}=$req};
while (my ($id, $reqstr)=each (%%pkg)) {
      system('repocop-test-warn', '-k',$id, "Please, refresh your BuildRequires: using buildreq. The following obsolete dependencies blow up the build: ".$reqstr);

mkdir -p $RPM_BUILD_ROOT%_datadir/repocop/srctests/%testname/
%__install -m 755 posttest $RPM_BUILD_ROOT%_datadir/repocop/srctests/%testname/

#doc README ChangeLog

* Mon Aug 15 2011 Igor Vlasenko <> 0.05-alt1
- updated forbidden buildreq list

* Wed Sep 30 2009 Igor Vlasenko <> 0.04-alt1
- posttests migration

* Tue Mar 31 2009 Igor Vlasenko <> 0.03-alt2
- added url

* Tue May 13 2008 Igor Vlasenko <> 0.03-alt1
- added check for xorg-x11-libs

* Fri Mar 21 2008 Igor Vlasenko <> 0.02-alt1
- test renamed to buildreq-xorg to avoid misunderstanding.

* Thu Mar 20 2008 Igor Vlasenko <> 0.01-alt1
- First build for Sisyphus.