pax_global_header00006660000000000000000000000064121350630660014514gustar00rootroot0000000000000052 comment=98b5bb3851d75ab53d1b9dd4708e73c3718369a9 repocop-unittest-altlinux-policy-0.30/000075500000000000000000000000001213506306600201135ustar00rootroot00000000000000repocop-unittest-altlinux-policy-0.30/.gear/000075500000000000000000000000001213506306600211075ustar00rootroot00000000000000repocop-unittest-altlinux-policy-0.30/.gear/rules000064400000000000000000000000071213506306600221610ustar00rootroot00000000000000tar: . repocop-unittest-altlinux-policy-0.30/altlinux-policy-debian-menu-is-deprecated.posttest000064400000000000000000000015711213506306600317540ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',''); $mainsec->exclude_body(qr'^Build(Pre)?Req(uires)?:\s+menu-devel\s*$'); $mainsec->subst_body_if('(?<=[\s,])menu-devel(?=(?:\s|,|$))','',qr'^Build(Pre)?Req(uires)?:'); }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-obsolete-buildreq.posttest000064400000000000000000000007321213506306600305000ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',"-n $pkgname"); $mainsec->exclude_body(qr'^(Pre)?Req(uires)?:\s+menu-devel\s*$'); $mainsec->subst_body_if('(?<=[\s,])menu-devel(?=(?:\s|,|$))','',qr'^(Pre)?Req(uires)?:'); }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-obsolete-requires.posttest000064400000000000000000000007051213506306600305300ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('files',"-n $pkgname"); unless ($section) { print STDERR "Oops! %files -n $pkgname not found!\n"; return; } $section->push_body(q"%exclude %perl_vendor_archlib "); }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-perl-noarch-pkg-has-dirs-in-arch.posttest000064400000000000000000000012271213506306600330770ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',"-n $pkgname"); if ($section) { $section->set_tag('Group','Text tools'); } else { warn "Oops: altlinux-policy-rpm-group-should-be-text-tools: no section $pkgname" unless $section; } }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-group-should-be-text-tools.posttest000064400000000000000000000011751213506306600330110ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" < 'Text tools'; DELETE FROM t1 WHERE PKGID glob 'hunspell-util*' or PKGID glob '*-debuginfo-*'; .output $REPOCOP_TEST_TMPDIR/msg select pkgid from t1; EOSQL for i in `cat $REPOCOP_TEST_TMPDIR/msg`; do repocop-test-info -k $i "RPM group should be 'Text tools'." ; done rm $REPOCOP_TEST_TMPDIR/* repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-group-should-be-ttf.pl000064400000000000000000000005201213506306600302030ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { my ($spec, $parent, $pkgname) = @_; my $section=$spec->get_section('package',"-n $pkgname"); if ($section) { $section->set_tag('Group','System/Fonts/True type'); } else { warn "Oops: altlinux-policy-rpm-group-should-be-ttf: no section $pkgname" unless $section; } }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-group-should-be-ttf.posttest000064400000000000000000000006341213506306600314630ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" < 'System/Fonts/True type'; EOSQL for i in `cat $REPOCOP_TEST_TMPDIR/msg`; do repocop-test-info -k $i "RPM group should be 'System/Fonts/True type'." ; done rm $REPOCOP_TEST_TMPDIR/* repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-macros-packaging-rpm4.pl000064400000000000000000000037461213506306600304770ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { my ($spec, $parent, $pkgname) = @_; $pkgname||='%{name}'; my $macrosname='%{name}'; $macrosname='ggz' if $spec->macros->get_raw('name') eq 'ggz-base-libs'; my $sec=$spec->get_section('package','-n rpm-macros-'.$macrosname); if ($sec) { print STDERR "Oops! fool protection activated: It looks like $pkgname already has rpm-macros-$macrosname\n"; return; } $sec=$spec->add_section('package',"-n rpm-macros-$macrosname"); my $main_section=$spec->get_section('package',''); $sec->push_body(q!Summary: Set of RPM macros for packaging %name-based applications Group: Development/Other # uncomment if macroses are platform-neutral #BuildArch: noarch # helps old apt to resolve file conflict at dist-upgrade (thanks to Stanislav Ievlev) Conflicts: !.$pkgname.' <= '.$main_section->get_tag('Version').'-'.$main_section->get_tag('Release').q! %description -n rpm-macros-!.$macrosname.q! Set of RPM macros for packaging %name-based applications for ALT Linux. Install this package if you want to create RPM packages that use %name. !); $sec=$spec->get_section('install'); $sec->subst_body(qr'\%{?_sysconfdir}?/rpm/macros.','%_rpmmacrosdir/'); $sec->subst_body(qr'/etc/rpm/macros.','%_rpmmacrosdir/'); $spec->add_section('files',"-n rpm-macros-$macrosname")->push_body(q!%_rpmmacrosdir/* !); $sec=$spec->get_section('package',"-n $pkgname"); unless ($sec) { print STDERR "Oops! %package -n $pkgname not found!\n"; return; } $sec->push_body('Requires: rpm-macros-'.$macrosname.' = %{version}-%{release}'."\n"); $sec=$spec->get_section('files',"-n $pkgname"); unless ($sec) { print STDERR "Oops! %files -n $pkgname not found!\n"; return; } $sec->subst_body(qr'^(?:\%config(?:\s*\(.+\))?)?\s*\%{?_sysconfdir}?/rpm/macros.','#%_rpmmacrosdir/'); $sec->subst_body(qr'^(?:\%config(?:\s*\(.+\))?)?\s*/etc/rpm/macros.','#%_rpmmacrosdir/'); $sec->push_body(q"%exclude %_rpmmacrosdir/* "); }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-macros-packaging-rpm4.posttest000064400000000000000000000020761213506306600317440ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <macros->get_raw('name'); return if $name eq 'browser-plugins-npapi'; if ($name eq 'xemacsen') { $macrosname='xemacs'; } elsif ($name eq 'xorg-server') { $macrosname='xorg-sdk'; } my $sec=$spec->get_section('package','-n rpm-macros-'.$macrosname); if ($sec) { print STDERR "Oops! fool protection activated: It looks like $pkgname already has rpm-macros-$macrosname\n"; return; } $sec=$spec->add_section('package',"-n rpm-macros-$macrosname"); my $main_section=$spec->get_section('package',''); $sec->push_body(q!Summary: Set of RPM macros for packaging %name-based applications Group: Development/Other # uncomment if macroses are platform-neutral #BuildArch: noarch # helps old apt to resolve file conflict at dist-upgrade (thanks to Stanislav Ievlev) Conflicts: !.$pkgname.' <= '.$main_section->get_tag('Version').'-'.$main_section->get_tag('Release').q! %description -n rpm-macros-!.$macrosname.q! Set of RPM macros for packaging %name-based applications for ALT Linux. Install this package if you want to create RPM packages that use %name. !); $sec=$spec->get_section('install'); $sec->subst_body(qr'\%{?_sysconfdir}?/rpm/macros.d','%_rpmmacrosdir'); $sec->subst_body(qr'/etc/rpm/macros.d','%_rpmmacrosdir'); $spec->add_section('files',"-n rpm-macros-$macrosname")->push_body(q!%_rpmmacrosdir/* !); $sec=$spec->get_section('package',"-n $pkgname"); unless ($sec) { print STDERR "Oops! %package -n $pkgname not found!\n"; return; } $sec->push_body('Requires: rpm-macros-'.$macrosname.' = %{version}-%{release}'."\n"); $sec=$spec->get_section('files',"-n $pkgname"); unless ($sec) { print STDERR "Oops! %files -n $pkgname not found!\n"; return; } $sec->subst_body(qr'^(?:\%config(?:\s*\(.+\))?)?\s*\%{?_sysconfdir}?/rpm/macros.d','#%_rpmmacrosdir'); $sec->subst_body(qr'^(?:\%config(?:\s*\(.+\))?)?\s*/etc/rpm/macros.d','#%_rpmmacrosdir'); $sec->subst_body(qr'^(?:\%config(?:\s*\(.+\))?)?\s*\%{?_rpmmacrosdir}?','#%_rpmmacrosdir'); $sec->push_body(q"%exclude %_rpmmacrosdir/* "); }; 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-rpm-macros-packaging.posttest000064400000000000000000000015121213506306600310560ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <-devel. If you have already packaged this symlink in lib-devel, just append \\%exclude $a[1] to \\%files of $a[0]. Otherwise, move the symlink into the subpackage lib-devel. There is a known exception for case the .so file is not a shared lib but a plugin that is never directly linked with. Please report such a case to repocop test.")' $REPOCOP_TEST_TMPDIR/msg rm $REPOCOP_TEST_TMPDIR/* repocop-unittest-altlinux-policy-0.30/altlinux-policy-tex-buildreq-tetex.posttest000064400000000000000000000010711213506306600306100ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" < $REPOCOP_TEST_TMPDIR/msg1 perl -ne 'chomp;@a=split /\t/;system(qw/repocop-test-info -k/,$a[0], "TeX policy (http://www.altlinux.org/TeXPolicy) recommends that packages that install files into texmf tree should have prefix texmf-, not tetex-. Please, rename them.")' $REPOCOP_TEST_TMPDIR/msg1 rm $REPOCOP_TEST_TMPDIR/* repocop-unittest-altlinux-policy-0.30/altlinux-policy-tex-obsolete-tetex.posttest000064400000000000000000000010311213506306600306110ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section($secname,'-n '.$pkgname); unless ($section) { print STDERR "Oops! (altlinux-policy-tex-obsolete-util-calls-in-post): $secname not found for $pkgname\n" unless $silent; return; } if ($section->get_bodyref()->[0]=~m!^\s*\%post(?:un)?\s+.*-p\s+.*texhash!) { $section->delete; } else { $section->exclude_body(qr'texhash'); $section->exclude_body(qr'TEXHASH'); $section->exclude_body(qr'/usr/bin/updmap'); if ($section->is_empty()) { $section->delete; } } } 1; repocop-unittest-altlinux-policy-0.30/altlinux-policy-tex-obsolete-util-calls-in-post.posttest000064400000000000000000000011571213506306600331310ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',''); $section->subst_body(qr'packages-info-i18n-common',''); $section->exclude_body(qr'^BuildRequires:\s*$'); $section->exclude_body(qr'^BuildPreReq:\s*$'); }; 1; repocop-unittest-altlinux-policy-0.30/deprecated-packages-info-i18n-common.posttest000064400000000000000000000007101213506306600305700ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <) { chomp; my @line=split /\t+/; push @subst_table, @line[0,1] if $line[1]; } push @SPECHOOKS, sub { my ($spec, $parent, $pkgname) = @_; my %shellsec=map {$_=>1} qw/prep build install/; foreach my $section ($spec->get_sections()) { my $secname=$section->get_type(); next unless $shellsec{$secname}; $section->subst_body(qr'=\%__perl','=/usr/bin/perl'); for (my $i=0;$i<@subst_table and $subst_table[$i+1];$i=$i+2) { my $from = $subst_table[$i]; my $to=$subst_table[$i+1]; $section->subst_body(qr"(?get_sections()) { my $type = $section->get_type(); next if $type ne 'package'; my @body; foreach my $line (@{$section->get_bodyref()}) { $line=~s/\%{get_dep\s+([\w\d_-]+)\s*}/$1/g if $line=~/^Requires/; $line=~s/\s*\>=\s+\%{get_version\s+[\w\d_-]+\s*}//g if $line=~/^Requires/; push @body, $line; } $section->get_bodyref(\@body); } }; 1; repocop-unittest-altlinux-policy-0.30/repocop-unittest-altlinux-policy.spec000064400000000000000000000172321213506306600274530ustar00rootroot00000000000000Name: repocop-unittest-altlinux-policy Version: 0.30 Release: alt4 BuildArch: noarch Packager: Igor Vlasenko Url: http://repocop.altlinux.org Summary: altlinux-policy integration tests for repocop test platform. Group: Development/Other License: GPLv2+ Source: %name-%version.tar Provides: repocop-unittest-altlinux-policy-rpm-macros-packaging = 0.04 Obsoletes: repocop-unittest-altlinux-policy-rpm-macros-packaging # for pixmap-in-deprecated-location # Requires: pcregrep Requires: repocop-collector-specfile Requires: repocop > 0.55 %description The test warns packages that contain rpm macros, but are not named appropriately. %prep %setup %build %install for i in *.posttest; do testname=`echo $i | sed -e s,.posttest\$,,` install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest done for i in *.pl; do install -pD -m 644 $i %buildroot%_datadir/repocop/fixscripts/$i done %files %_datadir/repocop/pkgtests/* %_datadir/repocop/fixscripts/* %changelog * Mon Apr 22 2013 Igor Vlasenko 0.30-alt4 - bugfix release * Sun Apr 21 2013 Igor Vlasenko 0.30-alt3 - bugfix release * Thu Jan 24 2013 Igor Vlasenko 0.30-alt2 - bugfix release * Sat Dec 08 2012 Igor Vlasenko 0.30-alt1 - bugfix release * Sat Dec 08 2012 Igor Vlasenko 0.29-alt11 - bugfix release * Tue Nov 06 2012 Igor Vlasenko 0.29-alt10 - added requires-ImageMagick.posttest * Thu Oct 25 2012 Igor Vlasenko 0.29-alt9 - added altlinux-policy-rpm-group-should-be-ttf * Tue Oct 23 2012 Igor Vlasenko 0.29-alt8 - added tests: + altlinux-policy-obsolete-httpd2-reload + altlinux-policy-rpm-group-should-be-text-tools * Tue Sep 04 2012 Igor Vlasenko 0.29-alt7 - custom names for rpm-macros-* subpoackages * Thu Aug 30 2012 Igor Vlasenko 0.29-alt6 - bugfix in altlinux-policy-rpm-macros-packaging* * Wed Aug 29 2012 Igor Vlasenko 0.29-alt5 - restored specfile-macros-get_dep-is-deprecated.posttest as experimental w/o patch generator. * Wed Aug 22 2012 Igor Vlasenko 0.29-alt4 - removed specfile-macros-get_dep-is-deprecated * Tue Aug 21 2012 Igor Vlasenko 0.29-alt3 - added rpm built-ins to altlinux-policy-rpm-macros-packaging-rpm4 * Tue Aug 21 2012 Igor Vlasenko 0.29-alt2 - bugfix in altlinux-policy-rpm-macros-packaging-rpm4 * Mon Aug 06 2012 Igor Vlasenko 0.29-alt1 - added altlinux-policy-rpm-macros-packaging-rpm4 * Thu Nov 10 2011 Igor Vlasenko 0.28-alt1 - adapted for new fixscript syntax * Fri Aug 26 2011 Igor Vlasenko 0.27-alt1 - fixscripts adopted for new R::S::E * Thu Aug 18 2011 Igor Vlasenko 0.26-alt1 - added files-in-deprecated-iconsdir-mini-large.posttest * Tue Jun 07 2011 Igor Vlasenko 0.25-alt1 - bugfix release * Wed May 18 2011 Igor Vlasenko 0.24-alt1 - altlinux-policy-obsolete-buildreq * Tue May 17 2011 Igor Vlasenko 0.23-alt1 - added postclean for private rpm macros * Sat Apr 16 2011 Igor Vlasenko 0.22-alt4 - altlinux-policy-debian-menu-is-deprecated.posttest: * exception for wm-specific menus (todo: debian menu test) * Mon Mar 28 2011 Igor Vlasenko 0.22-alt3 - altlinux-policy-debian-menu-is-deprecated.posttest: * exception for sessions * Sun Mar 27 2011 Igor Vlasenko 0.22-alt2 - altlinux-policy-debian-menu-is-deprecated.posttest: exception for wm* * Sat Mar 26 2011 Igor Vlasenko 0.22-alt1 - added altlinux-policy-debian-menu-is-deprecated.posttest * Wed Feb 02 2011 Igor Vlasenko 0.21-alt3 - fixed check for get_version * Mon Jan 31 2011 Igor Vlasenko 0.21-alt2 - bugfixes in patch generator * Sun Jan 30 2011 Igor Vlasenko 0.21-alt1 - added check for get_version * Fri Jan 28 2011 Igor Vlasenko 0.20-alt1 - added specfile-macros-get_dep-is-deprecated - removed deprecated pixmap-in-deprecated-location * Fri Aug 20 2010 Igor Vlasenko 0.19-alt1 - added deprecated-packages-info-i18n-common.posttest * Fri Feb 19 2010 Igor Vlasenko 0.18-alt8 - pixmap-in-deprecated-location: use explicit list. * Sat Feb 06 2010 Igor Vlasenko 0.18-alt7 - added exception for rpm-macros-packaging/prelink * Fri Jan 15 2010 Igor Vlasenko 0.18-alt6 - pixmap-in-deprecated-location: added exception * Tue Jan 12 2010 Igor Vlasenko 0.18-alt5 - added exception for rawstudio & warzone2100 (thanks to force@) * Sat Jan 09 2010 Igor Vlasenko 0.18-alt4 - added exception for control (thanks to ldv@). * Sun Jan 03 2010 Igor Vlasenko 0.18-alt3 - added noarch support for -macros-* * Wed Nov 18 2009 Igor Vlasenko 0.18-alt2 - pixmap-in-deprecated-location: added exception * Fri Nov 13 2009 Igor Vlasenko 0.18-alt1 - tex policy br: rpm-build-texmf test: warning level * Thu Nov 12 2009 Igor Vlasenko 0.17-alt1 - tex policy br: rpm-build-texmf test * Mon Nov 09 2009 Igor Vlasenko 0.16-alt4 - fixed pixmap-in-deprecated-location thanks to wrar@. * Sat Nov 07 2009 Igor Vlasenko 0.16-alt3 - fixed pixmap-in-deprecated-location thanks to Artem Zolochevskiy. * Fri Oct 23 2009 Igor Vlasenko 0.16-alt2 - fixes in *-tex-obsolete-util-calls-in-post patchgen. * Fri Oct 23 2009 Igor Vlasenko 0.16-alt1 - added altlinux-policy-tex-obsolete-tetex-prefix.posttest altlinux-policy-tex-obsolete-util-calls-in-post.posttest * Tue Sep 29 2009 Igor Vlasenko 0.15-alt1 - use posttests * Thu Sep 24 2009 Igor Vlasenko 0.14-alt2 - added altlinux-policy-tex-buildreq-tetex.posttest * Tue Sep 22 2009 Igor Vlasenko 0.14-alt1 - added altlinux-policy-tex-obsolete-tetex.posttest * Tue Apr 14 2009 Igor Vlasenko 0.13-alt2 - added missing requires: repocop-collector-specfile * Thu Mar 12 2009 Igor Vlasenko 0.13-alt1 - pixmap-in-deprecated-location fixscript tuning * Thu Mar 12 2009 Igor Vlasenko 0.12-alt1 - added pixmap-in-deprecated-location test * Fri Jan 02 2009 Igor Vlasenko 0.11-alt1 - added exception for known plugins in libdir. * Thu Dec 25 2008 Igor Vlasenko 0.10-alt1 - added tests for R:/BR: microsoft-fonts-ttf * Tue Dec 16 2008 Igor Vlasenko 0.09-alt1 - fix in test altlinux-policy-shared-lib-contains-devel-so: added test that sonamed lib is a real file. (thanks to mithraen@ for report) * Sat Dec 13 2008 Igor Vlasenko 0.08-alt1 - added test altlinux-policy-shared-lib-contains-devel-so * Fri Dec 05 2008 Igor Vlasenko 0.07-alt1 - fixes in test pseudouser-added-as-real-user * Sun Nov 30 2008 Igor Vlasenko 0.06-alt1 - added test pseudouser-added-as-real-user * Sun Nov 23 2008 Igor Vlasenko 0.05-alt1 - _rpmmacrosdir support added * Fri Nov 21 2008 Igor Vlasenko 0.04-alt1 - renamed to repocop-unittest-altlinux-policy - added check and fixscript for %%perl_vendor_archlib packaging * Mon Sep 08 2008 Igor Vlasenko 0.03-alt1 - refs to wiki.altlinux.org (#16724) * Thu Jul 10 2008 Igor Vlasenko 0.02-alt1 - more verbose description in generated patch * Thu Jul 10 2008 Igor Vlasenko 0.01-alt1 - initial version; note: added patch generator repocop-unittest-altlinux-policy-0.30/requires-ImageMagick.posttest000064400000000000000000000011411213506306600257120ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" </dev/null for i in `egrep -rl '^Requires:.*(>=[[:space:]]*%{get_version[[:space:]].*}|%{get_dep[[:space:]].*})' .` ; do case $i in future_list_of_exceptions) : # skip ;; *) key=`echo $i | sed -e 's,^./,,' | sed -e 's,\.spec$,,'` repocop-test-experimental -k $key "Versioned Requires: foo >= %{get_dep something} using %get_dep and %get_version macros on a library are deprecated by set:versions. You probably should drop %get_dep/%get_version Requires: to avoid RPM database pollution." # see generated patch. But if you know what you are doing, please, report an exeption. ;; esac done popd >/dev/null