]>
Commit | Line | Data |
---|---|---|
496de956 MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
ff0dbeb6 | 4 | |
00a19bf8 | 5 | %define pdir Test |
6 | %define pnam Taint | |
ff0dbeb6 | 7 | %include /usr/lib/rpm/macros.perl |
f856bb2d | 8 | Summary: Test::Taint - tools to test taintedness |
edc84c6f | 9 | Summary(pl.UTF-8): Test::Taint - narzędzia do sprawdzania napiętnowania |
496de956 | 10 | Name: perl-Test-Taint |
c22d9e4c | 11 | Version: 1.06 |
ff0dbeb6 | 12 | Release: 11 |
f856bb2d JB |
13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
496de956 | 15 | Group: Development/Languages/Perl |
fcbbcc1e | 16 | Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz |
c22d9e4c | 17 | # Source0-md5: cb639c250f2030262a562ce3376219b0 |
fcbbcc1e | 18 | URL: http://search.cpan.org/dist/Test-Taint/ |
496de956 MP |
19 | BuildRequires: perl-devel >= 1:5.8.0 |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
496de956 MP |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
f856bb2d JB |
24 | Tainted data is data that comes from an unsafe source, such as the |
25 | command line, or, in the case of web apps, any GET or POST | |
26 | transactions (see perlsec(1) man page for details on why tainted data | |
27 | is bad, and how to untaint the data). | |
28 | ||
29 | When you're writing unit tests for code that deals with tainted data, | |
30 | you'll want to have a way to provide tainted data for your routines to | |
31 | handle, and easy ways to check and report on the taintedness of your | |
32 | data, in standard Test::More style. | |
33 | ||
caf1224b JR |
34 | %description -l pl.UTF-8 |
35 | Dane napiętnowane to dane pochodzące z niebezpiecznego źródła, takiego | |
36 | jak linia poleceń, lub, w przypadku aplikacji WWW, wszelkie transakcje | |
37 | GET i POST (na stronie podręcznika perlsec(1) można znaleźć | |
38 | dokładniejsze informacje dlaczego dane napiętnowane są złe i jak | |
39 | pozbyć się z nich piętna). | |
f856bb2d | 40 | |
caf1224b JR |
41 | Przy pisaniu testów jednostkowych dla kodu przetwarzającego dane |
42 | napiętnowane zwykle chcemy móc dostarczyć napiętnowane dane do | |
43 | własnych funkcji i w łatwy sposób sprawdzić napiętnowanie naszych | |
f856bb2d | 44 | danych w standardowym stylu Test::More. |
496de956 MP |
45 | |
46 | %prep | |
47 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
48 | ||
49 | %build | |
50 | %{__perl} Makefile.PL \ | |
51 | INSTALLDIRS=vendor | |
496de956 | 52 | %{__make} \ |
729412be | 53 | CC="%{__cc}" \ |
496de956 MP |
54 | OPTIMIZE="%{rpmcflags}" |
55 | ||
56 | %{?with_tests:%{__make} test} | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %{__make} install \ | |
62 | DESTDIR=$RPM_BUILD_ROOT | |
63 | ||
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc Changes | |
70 | %{perl_vendorarch}/Test/Taint.pm | |
f856bb2d | 71 | %dir %{perl_vendorarch}/auto/Test/Taint |
496de956 | 72 | %attr(755,root,root) %{perl_vendorarch}/auto/Test/Taint/Taint.so |
c22d9e4c | 73 | %{_mandir}/man3/Test::Taint.3pm* |