Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37898107
en ru br
Репозитории ALT
S:0.20-alt1
5.1: 0.08-alt1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: repocop-unittest-altlinux-python

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064113451563770014526gustar00rootroot0000000000000052 comment=302f73b725836482c8a4dc676cae0b7d888f8110
repocop-unittest-altlinux-python-0.08/000075500000000000000000000000001134515637700201545ustar00rootroot00000000000000repocop-unittest-altlinux-python-0.08/.gear/000075500000000000000000000000001134515637700211505ustar00rootroot00000000000000repocop-unittest-altlinux-python-0.08/.gear/rules000064400000000000000000000000071134515637700222220ustar00rootroot00000000000000tar: .
repocop-unittest-altlinux-python-0.08/altlinux-python-obsolete-buildreq-python-dev.pl000064400000000000000000000005461134515637700314070ustar00rootroot00000000000000#!/usr/bin/perl -w
push @SPECHOOKS, sub {
## $spec is RPM::Source::Editor object.
## $sec(tion) is RPM::Source::SpecSection object.
my ($spec, $pkgname) = @_;
foreach my $section ($spec->get_sections()) {
next if $section->get_type() ne 'package';
$section->subst_if(qr/python-dev(?=$|\s)/,'python-devel',qr'equires:|PreReq:');
}
};
1;
repocop-unittest-altlinux-python-0.08/altlinux-python-obsolete-buildreq-python-dev.posttest000064400000000000000000000011561134515637700326570ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct rpm_requires.pkgid from rpm_requires where requirename = 'python-dev';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct rpm_buildrequires.pkgid from rpm_buildrequires where buildrequirename = 'python-dev';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i "python-dev is obsolete according to Python Policy (http://www.altlinux.org/Python_Policy). Please, use BuildRequires: python-devel."; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-altlinux-python-0.08/altlinux-python-obsolete-requires-python-version.pl000064400000000000000000000005311134515637700323400ustar00rootroot00000000000000#!/usr/bin/perl -w
push @SPECHOOKS, sub {
## $spec is RPM::Source::Editor object.
## $sec(tion) is RPM::Source::SpecSection object.
my ($spec, $pkgname) = @_;
foreach my $section ($spec->get_sections()) {
next if $section->get_type() ne 'package';
$section->exclude(qr/^Requires: python = \%__python_version\s*$/);
}
};
1;
repocop-unittest-altlinux-python-0.08/altlinux-python-obsolete-requires-python-version.posttest000064400000000000000000000006571134515637700336230ustar00rootroot00000000000000#!/bin/sh

pushd "$REPOCOP_STATEDIR/specfile" >/dev/null
for i in `pcregrep -rl '^Requires:.*\s+python\s*=\s*%__python_version' .` ; do
case $i in
# *some*) : # some ?
# ;;
*)
key=`echo $i | sed -e 's,^./,,' | sed -e 's,\.spec$,,'`
repocop-test-warn -k $key "Requires: python = %__python_version is deprecated according to Python Policy (http://www.altlinux.org/Python_Policy)."
;;
esac
done
popd >/dev/null
repocop-unittest-altlinux-python-0.08/altlinux-python-test-is-packaged.posttest000064400000000000000000000044331134515637700302710ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
CREATE TEMPORARY TABLE pytest (pkgid TEXT, filename TEXT);
CREATE TEMPORARY TABLE pyexample (pkgid TEXT, filename TEXT);
.mode tabs
INSERT INTO pytest SELECT pkgid, filename FROM rpm_files WHERE filemode & 61440 <> 16384 AND filename glob '*/python[0-9].[0-9]*/test*/test_*';
DELETE FROM pytest WHERE pkgid GLOB '*-test-*' OR pkgid GLOB '*-tests-*' OR pkgid GLOB '*-devel-*' OR pkgid GLOB '*.test-*' OR pkgid GLOB '*.tests-*' OR pkgid GLOB '*-examples-*' OR pkgid GLOB '*-testing-*';
-- known pure developr's modules
DELETE FROM pytest WHERE pkgid GLOB 'python-module-PyDSTool-*' OR pkgid GLOB 'python-module-ETSDevTools-*' OR pkgid GLOB 'python-module-petsc-config-*' OR pkgid GLOB 'python-module-test*';

INSERT INTO pyexample SELECT pkgid, filename FROM rpm_files WHERE filemode & 61440 <> 16384 AND filename glob '*/python[0-9].[0-9]*/example*/*';
DELETE FROM pyexample WHERE pkgid GLOB '*-examples-*' OR pkgid GLOB '*-doc-*' OR pkgid GLOB '*-docs-*' OR pkgid GLOB '*-test-*' OR pkgid GLOB '*-tests-*' OR pkgid GLOB '*.tests-*' OR pkgid GLOB '*-testing-*';
DELETE FROM pyexample WHERE pkgid GLOB 'python-module-ETSDevTools-*';
.output $REPOCOP_TEST_TMPDIR/msg
SELECT pkgid, filename FROM pytest;
.output $REPOCOP_TEST_TMPDIR/msg2
SELECT pkgid, filename FROM pyexample;
EOSQL

cat > $REPOCOP_TEST_TMPDIR/repocop.awk <<'EOF'
BEGIN {FS="\t"}
// {system("repocop-test-info -k " $1 " '" $2 ": It is the file in the package whose name matches the format python modules use for test files. It may have been installed by accident. Remove it or move it to the -devel subpackage, if the test is required to build other packages. See http://www.altlinux.org/Python_Policy for details.'")}
EOF
cat $REPOCOP_TEST_TMPDIR/msg | awk -f $REPOCOP_TEST_TMPDIR/repocop.awk

cat > $REPOCOP_TEST_TMPDIR/repocop.awk <<'EOF'
BEGIN {FS="\t"}
// {system("repocop-test-experimental -k " $1 " '" $2 ": It is the file in the package whose location matches the format python modules use for examples. It may have been installed by accident. Move it to the -examples or -doc subpackage. See http://www.altlinux.org/Python_Policy for details.'")}
EOF
cat $REPOCOP_TEST_TMPDIR/msg2 | awk -f $REPOCOP_TEST_TMPDIR/repocop.awk
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-altlinux-python-0.08/repocop-unittest-altlinux-python.spec000064400000000000000000000053631134515637700275400ustar00rootroot00000000000000#define testname spec-has-obsolete-macroses
%define install_all_tests 0

Name: repocop-unittest-altlinux-python
Version: 0.08
Release: alt1
BuildArch: noarch
Packager: Igor Yu. Vlasenko <viy@altlinux.org>
Url: http://repocop.altlinux.org

Summary: repocop package checks for conformance with Python Packaging Policy.
Group: Development/Other
License: GPL or Artistic
Source: %name-%version.tar

Requires: repocop >= 0.10
Requires: repocop-collector-specfile

%description
set of ALTLinux-specific integration tests for repocop test platform.
The tests checks packages for conformance with Python Packaging Policy.

%prep
%setup

%build

%install
%if %install_all_tests
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

install -d -m 755 %buildroot%_datadir/repocop/fixscripts/
install -m 644 *.pl %buildroot%_datadir/repocop/fixscripts/
%else
testname=altlinux-python-test-is-packaged
install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest
%endif

%files
#doc README ChangeLog
%_datadir/repocop/pkgtests/*
%if %install_all_tests
%_datadir/repocop/fixscripts/*
%endif

%changelog
* Mon Mar 08 2010 Igor Vlasenko <viy@altlinux.ru> 0.08-alt1
- test level increased to info (requested by REAL@).

* Sat Mar 06 2010 Igor Vlasenko <viy@altlinux.ru> 0.07-alt2
- added python-module-petsc-config exception (requested by REAL@).

* Sun Jan 24 2010 Igor Vlasenko <viy@altlinux.ru> 0.07-alt1
- added -testing exception (requested by REAL@).

* Thu Jan 21 2010 Igor Vlasenko <viy@altlinux.ru> 0.06-alt6
- added tests/examples exception (requested by REAL@).

* Fri Jan 08 2010 Igor Vlasenko <viy@altlinux.ru> 0.06-alt5
- added .tests exception (requested by REAL@).

* Wed Jan 06 2010 Igor Vlasenko <viy@altlinux.ru> 0.06-alt4
- fixed summary thanks to lav@ and REAL@.

* Thu Nov 26 2009 Igor Vlasenko <viy@altlinux.ru> 0.06-alt3
- added exceptions to test-is-packaged test

* Tue Nov 24 2009 Igor Vlasenko <viy@altlinux.ru> 0.06-alt2
- added exceptions to test-is-packaged test

* Tue Nov 24 2009 Igor Vlasenko <viy@altlinux.ru> 0.06-alt1
- altlinux-python-test-is-packaged changes suggested by REAL@

* Sat Nov 21 2009 Igor Vlasenko <viy@altlinux.ru> 0.05-alt1
- added altlinux-python-test-is-packaged
- all other tests are disabled (no policy is written yet).

* Wed Sep 30 2009 Igor Vlasenko <viy@altlinux.ru> 0.04-alt1
- posttests migration

* Thu Jul 23 2009 Igor Vlasenko <viy@altlinux.ru> 0.03-alt1
- fixed altlinux-python-obsolete-buildreq-python-dev

* Wed Jul 22 2009 Igor Vlasenko <viy@altlinux.ru> 0.02-alt1
- added test for buildrequires

* Wed Jul 22 2009 Igor Vlasenko <viy@altlinux.ru> 0.01-alt1
- First build for Sisyphus.
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin