diff options
Diffstat (limited to 'tests/data/SPECS')
-rw-r--r-- | tests/data/SPECS/configtest.spec | 23 | ||||
-rw-r--r-- | tests/data/SPECS/conflicttest.spec | 23 | ||||
-rw-r--r-- | tests/data/SPECS/deptest.spec | 17 | ||||
-rw-r--r-- | tests/data/SPECS/flangtest.spec | 29 | ||||
-rw-r--r-- | tests/data/SPECS/foo.spec | 26 | ||||
-rw-r--r-- | tests/data/SPECS/hello.spec | 56 | ||||
-rw-r--r-- | tests/data/SPECS/symlinktest.spec | 34 | ||||
-rw-r--r-- | tests/data/SPECS/verifyscript.spec | 19 | ||||
-rw-r--r-- | tests/data/SPECS/versiontest.spec | 17 |
9 files changed, 244 insertions, 0 deletions
diff --git a/tests/data/SPECS/configtest.spec b/tests/data/SPECS/configtest.spec new file mode 100644 index 0000000..5ea7cae --- /dev/null +++ b/tests/data/SPECS/configtest.spec @@ -0,0 +1,23 @@ +Name: configtest +Version: %{ver} +Release: 1 +Summary: Testing config file behavior + +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir} +echo "%{filedata}" > $RPM_BUILD_ROOT/%{_sysconfdir}/my.conf + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%config %{_sysconfdir}/my.conf diff --git a/tests/data/SPECS/conflicttest.spec b/tests/data/SPECS/conflicttest.spec new file mode 100644 index 0000000..894b632 --- /dev/null +++ b/tests/data/SPECS/conflicttest.spec @@ -0,0 +1,23 @@ +Name: conflict%{pkg} +Version: 1.0 +Release: 1 +Summary: Testing file conflict behavior + +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/%{_datadir} +echo "%{filedata}" > $RPM_BUILD_ROOT/%{_datadir}/my.version + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_datadir}/my.version diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec new file mode 100644 index 0000000..3435325 --- /dev/null +++ b/tests/data/SPECS/deptest.spec @@ -0,0 +1,17 @@ +Name: deptest-%{pkg} +Version: 1.0 +Release: 1 +Summary: Testing dependency behavior + +Group: Testing +License: GPL +BuildArch: noarch +%{?reqs:Requires: %{reqs}} +%{?provs:Provides: %{provs}} +%{?cfls:Conflicts: %{cfls}} + +%description +%{summary} + +%files +%defattr(-,root,root,-) diff --git a/tests/data/SPECS/flangtest.spec b/tests/data/SPECS/flangtest.spec new file mode 100644 index 0000000..3f36795 --- /dev/null +++ b/tests/data/SPECS/flangtest.spec @@ -0,0 +1,29 @@ +Name: flangtest +Version: 1.0 +Release: 1 +Summary: Testing file lang behavior +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name} +for f in fi de en pl none; do + echo "This is $f language" > $RPM_BUILD_ROOT/%{_datadir}/%{name}/$f.txt +done + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%lang(fi) %{_datadir}/%{name}/fi.txt +%lang(de) %{_datadir}/%{name}/de.txt +%lang(en) %{_datadir}/%{name}/en.txt +%lang(pl) %{_datadir}/%{name}/pl.txt +%{_datadir}/%{name}/none.txt diff --git a/tests/data/SPECS/foo.spec b/tests/data/SPECS/foo.spec new file mode 100644 index 0000000..986e6da --- /dev/null +++ b/tests/data/SPECS/foo.spec @@ -0,0 +1,26 @@ +Summary: foo +Name: foo +Version: 1.0 +Release: 1 +Group: Utilities +License: GPLv2+ +Distribution: RPM test suite. +Provides: hi +Conflicts: goodbye +Obsoletes: howdy +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Simple rpm demonstration. + +%prep + +%build + +%install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files diff --git a/tests/data/SPECS/hello.spec b/tests/data/SPECS/hello.spec new file mode 100644 index 0000000..066388f --- /dev/null +++ b/tests/data/SPECS/hello.spec @@ -0,0 +1,56 @@ +Summary: hello -- hello, world rpm +Name: hello +Version: 1.0 +Release: 1 +Group: Utilities +License: GPL +Distribution: RPM test suite. +Vendor: Red Hat Software +Packager: Red Hat Software <bugs@redhat.com> +URL: http://www.redhat.com +Source0: hello-1.0.tar.gz +Patch0: hello-1.0-modernize.patch +Excludearch: lsi +Excludeos: cpm +Provides: hi +Conflicts: goodbye +Obsoletes: howdy +Prefix: /usr +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Simple rpm demonstration. + +%prep +%setup -q +%patch0 -p1 -b .modernize + +%build +make + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre + +%post + +%preun + +%postun + +%files +%defattr(-,root,root) +%doc FAQ +#%readme README +#%license COPYING +%attr(0751,root,root) /usr/local/bin/hello + +%changelog +* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com> +- create. diff --git a/tests/data/SPECS/symlinktest.spec b/tests/data/SPECS/symlinktest.spec new file mode 100644 index 0000000..708ae85 --- /dev/null +++ b/tests/data/SPECS/symlinktest.spec @@ -0,0 +1,34 @@ +%bcond_with symlink + +Name: symlinktest +Version: 1.0 +Release: %{rel} +Summary: Testing symlink behavior +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/share +%if %{with symlink} +mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name} +echo %{name} > $RPM_BUILD_ROOT/usr/lib/%{name}/README +ln -s ../lib/%{name} $RPM_BUILD_ROOT/usr/share/%{name} +%else +mkdir -p $RPM_BUILD_ROOT/usr/share/%{name} +echo %{name} > $RPM_BUILD_ROOT/usr/share/%{name}/README +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%if %{with symlink} +/usr/lib/%{name} +%endif +/usr/share/%{name} diff --git a/tests/data/SPECS/verifyscript.spec b/tests/data/SPECS/verifyscript.spec new file mode 100644 index 0000000..cc7a124 --- /dev/null +++ b/tests/data/SPECS/verifyscript.spec @@ -0,0 +1,19 @@ +Name: verifyscript +Version: 1.0 +Release: 1 +Summary: Testing verifyscript behavior + +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%verifyscript -p <lua> +if not posix.access("/var/checkme", "f") then + error("bad") +end + +%files +%defattr(-,root,root) diff --git a/tests/data/SPECS/versiontest.spec b/tests/data/SPECS/versiontest.spec new file mode 100644 index 0000000..e241c83 --- /dev/null +++ b/tests/data/SPECS/versiontest.spec @@ -0,0 +1,17 @@ +Name: versiontest +Version: %{ver} +Release: 1 +Summary: Testing version behavior + +Group: Testing +License: GPL +BuildArch: noarch + +%description +%{summary} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) |