pax_global_header00006660000000000000000000000064113376044330014516gustar00rootroot0000000000000052 comment=4e7a9f8beeffb54e1aff7228f24f983013e3f70d repocop-unittest-altlinux-policy-0.18/000075500000000000000000000000001133760443300201235ustar00rootroot00000000000000repocop-unittest-altlinux-policy-0.18/.gear/000075500000000000000000000000001133760443300211175ustar00rootroot00000000000000repocop-unittest-altlinux-policy-0.18/.gear/rules000064400000000000000000000000071133760443300221710ustar00rootroot00000000000000tar: . repocop-unittest-altlinux-policy-0.18/altlinux-policy-perl-noarch-pkg-has-dirs-in-arch.pl000064400000000000000000000004441133760443300316350ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { my ($spec, $pkgname) = @_; my $section=$spec->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.18/altlinux-policy-perl-noarch-pkg-has-dirs-in-arch.posttest000064400000000000000000000012271133760443300331070ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',"-n rpm-macros-%{name}"); if ($sec) { print STDERR "Oops! fool protection activated: It looks like $pkgname already has rpm-macros-%name\n"; return; } $sec=$spec->add_section('package',"-n rpm-macros-%{name}"); 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-%{name} 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(qr'\%{?_sysconfdir}?/rpm/macros.d','%_rpmmacrosdir'); $sec->subst(qr'/etc/rpm/macros.d','%_rpmmacrosdir'); $spec->add_section('files',"-n rpm-macros-%{name}")->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(q"Requires: rpm-macros-%{name} = %{version}-%{release} "); $sec=$spec->get_section('files',"-n $pkgname"); unless ($sec) { print STDERR "Oops! %files -n $pkgname not found!\n"; return; } $sec->subst(qr'^(?:\%config(?:\s*\(.+\))?)?\s*\%{?_sysconfdir}?/rpm/macros.d','#%_rpmmacrosdir'); $sec->subst(qr'^(?:\%config(?:\s*\(.+\))?)?\s*/etc/rpm/macros.d','#%_rpmmacrosdir'); $sec->subst(qr'^(?:\%config(?:\s*\(.+\))?)?\s*\%{?_rpmmacrosdir}?','#%_rpmmacrosdir'); $sec->push_body(q"%exclude %_rpmmacrosdir/* "); }; 1; repocop-unittest-altlinux-policy-0.18/altlinux-policy-rpm-macros-packaging.posttest000064400000000000000000000014371133760443300310740ustar00rootroot00000000000000#!/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.18/altlinux-policy-tex-buildreq-tetex.posttest000064400000000000000000000010711133760443300306200ustar00rootroot00000000000000#!/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.18/altlinux-policy-tex-obsolete-tetex.posttest000064400000000000000000000010311133760443300306210ustar00rootroot00000000000000#!/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"; return; } if ($section->get_body()->[0]=~m!^\s*\%post(?:un)?\s+.*-p\s+.*texhash!) { $spec->del_section($section->get_type(),$section->get_package()); } else { $section->exclude(qr'texhash'); $section->exclude(qr'TEXHASH'); $section->exclude(qr'/usr/bin/updmap'); if ($section->is_empty()) { $spec->del_section($secname,'-n '.$pkgname); } } } 1; repocop-unittest-altlinux-policy-0.18/altlinux-policy-tex-obsolete-util-calls-in-post.posttest000064400000000000000000000011571133760443300331410ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_sections()) { my $type = $section->get_type(); next if $type ne 'install' and $type ne 'files'; $section->subst(qr'(%{?_iconsdir}?|(/usr/share|%{?_datadir}?)/icons)/mini/','%_miconsdir/'); $section->subst(qr'(%{?_iconsdir}?|(/usr/share|%{?_datadir}?)/icons)/large/','%_liconsdir/'); $section->subst(qr'(%{?_iconsdir}?|(/usr/share|%{?_datadir}?)/icons)/(?!hicolor|.+/)','%_niconsdir/'); $section->subst(qr'mkdir -p \$RPM_BUILD_ROOT\/?\%_iconsdir$','mkdir -p $RPM_BUILD_ROOT%_niconsdir'); $section->subst(qr'mkdir -p %buildroot\/?\%_iconsdir','mkdir -p %buildroot%_niconsdir'); $section->subst_if(qr'\%_iconsdir','%_niconsdir',qr'\%__mkdir'); $section->subst(qr'mkdir -p \%buildroot{\%_liconsdir,\%_miconsdir}','mkdir -p %buildroot{%_liconsdir,%_niconsdir,%_miconsdir}'); } }; 1; repocop-unittest-altlinux-policy-0.18/pixmap-in-deprecated-location.posttest000064400000000000000000000021501133760443300275360ustar00rootroot00000000000000#!/bin/sh #pcregrep -rl '^([^#][^#].*)?%{?_iconsdir}?/(mini/|large/)?(?!hicolor|.+/).+(\.(?!kde)|xpm|png)' #pcregrep -rl '^([^#][^#].*)?(/share|%{?_datadir}?)/icons/(mini/|large/)?(?!hicolor|.+/).+(\.(?!kde)|xpm|png)' pushd "$REPOCOP_STATEDIR/specfile" >/dev/null # shame to: ical-* xemacs-* # skip manual glest-* claws-mail-* for i in `pcregrep -rl '^([^#][^#].*)?(%{?_iconsdir}?|(/share|%{?_datadir}?)/icons)/(mini/|large/)?(?!hicolor|.+/).+(\.(?!kde)|xpm|png)' abiword-* liquidwar-* samba-* sven-* xiphos-* xlockmore-* xpilot-* zsnes-*` ; do case $i in *theme*|*style*|*artwork*) : # theme ? ;; *) key=`echo $i | sed -e 's,^./,,' | sed -e 's,\.spec$,,'` case $key in # known exceptions bibletime-*|qmpdclient-*|manedit-*|AutoScan-*|warzone2100-*|rawstudio-*|qsampler-*|qtrainer-*|weechat-*|gnome-session-*|gnome-panel-*|zaz-*) true;; *) repocop-test-warn -k $key "A pixmap is installed to a deprecated location (/usr/share/icons(|/mini|/large)). Pixmaps should be installed into hicolor icons theme (to %_miconsdir,%_niconsdir,%_liconsdir)." ;; esac ;; esac done popd >/dev/null repocop-unittest-altlinux-policy-0.18/pseudouser-added-as-real-user.posttest000064400000000000000000000012041133760443300274620ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" < 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.19 %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 * 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.18/requires-microsoft-fonts-ttf.posttest000064400000000000000000000007561133760443300275260ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <