summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/RPMS/hello-2.0-1.i686.rpmbin4447 -> 9984 bytes
-rw-r--r--tests/data/RPMS/hello-2.0-1.x86_64-signed.rpmbin0 -> 9915 bytes
-rw-r--r--tests/data/RPMS/hello-2.0-1.x86_64.rpmbin4446 -> 9915 bytes
-rw-r--r--tests/data/SOURCES/hello.c8
-rw-r--r--tests/data/SOURCES/poltest-1.0.tar.bz2bin409 -> 0 bytes
-rw-r--r--tests/data/SOURCES/poltest-policy-1.0.tar.bz2bin553 -> 0 bytes
-rw-r--r--tests/data/SPECS/attrtest.spec6
-rw-r--r--tests/data/SPECS/configtest.spec3
-rw-r--r--tests/data/SPECS/conflicttest.spec3
-rw-r--r--tests/data/SPECS/deptest.spec11
-rw-r--r--tests/data/SPECS/filedep.spec49
-rw-r--r--tests/data/SPECS/filetriggers.spec95
-rw-r--r--tests/data/SPECS/flangtest.spec5
-rw-r--r--tests/data/SPECS/hello-attr-buildid.spec27
-rw-r--r--tests/data/SPECS/hello-cd.spec29
-rw-r--r--tests/data/SPECS/hello-config-buildid.spec30
-rw-r--r--tests/data/SPECS/hello-r2.spec58
-rw-r--r--tests/data/SPECS/hello-script.spec2
-rw-r--r--tests/data/SPECS/hello2-suid.spec67
-rw-r--r--tests/data/SPECS/hello2.spec62
-rw-r--r--tests/data/SPECS/hello2cp.spec64
-rw-r--r--tests/data/SPECS/hello2ln.spec63
-rw-r--r--tests/data/SPECS/hlinktest.spec16
-rw-r--r--tests/data/SPECS/parallel.spec50
-rw-r--r--tests/data/SPECS/poltest.spec52
-rw-r--r--tests/data/SPECS/prefixtest.spec42
-rw-r--r--tests/data/SPECS/replacetest.spec4
-rw-r--r--tests/data/SPECS/scripts.spec4
-rw-r--r--tests/data/SPECS/sigpipe.spec47
-rw-r--r--tests/data/SPECS/test-subpackages-exclude.spec42
-rw-r--r--tests/data/SPECS/test-subpackages-pathpostfixes.spec39
-rw-r--r--tests/data/SPECS/test-subpackages.spec47
-rw-r--r--tests/data/SPECS/testdoc.spec32
-rw-r--r--tests/data/SPECS/triggers.spec26
-rw-r--r--tests/data/SPECS/vattrtest.spec29
-rwxr-xr-xtests/data/keys/CVE-2021-3521-badbind.asc25
-rwxr-xr-xtests/data/keys/CVE-2021-3521-nosubsig-last.asc25
-rwxr-xr-xtests/data/keys/CVE-2021-3521-nosubsig.asc37
-rw-r--r--tests/data/keys/rpm.org-rsa-2048-test.pub30
-rw-r--r--tests/data/keys/rpm.org-rsa-2048-test.secret57
40 files changed, 1131 insertions, 55 deletions
diff --git a/tests/data/RPMS/hello-2.0-1.i686.rpm b/tests/data/RPMS/hello-2.0-1.i686.rpm
index 46c60b1f9..ecb7c96d7 100644
--- a/tests/data/RPMS/hello-2.0-1.i686.rpm
+++ b/tests/data/RPMS/hello-2.0-1.i686.rpm
Binary files differ
diff --git a/tests/data/RPMS/hello-2.0-1.x86_64-signed.rpm b/tests/data/RPMS/hello-2.0-1.x86_64-signed.rpm
new file mode 100644
index 000000000..be627a782
--- /dev/null
+++ b/tests/data/RPMS/hello-2.0-1.x86_64-signed.rpm
Binary files differ
diff --git a/tests/data/RPMS/hello-2.0-1.x86_64.rpm b/tests/data/RPMS/hello-2.0-1.x86_64.rpm
index 50e39ddd9..003e93093 100644
--- a/tests/data/RPMS/hello-2.0-1.x86_64.rpm
+++ b/tests/data/RPMS/hello-2.0-1.x86_64.rpm
Binary files differ
diff --git a/tests/data/SOURCES/hello.c b/tests/data/SOURCES/hello.c
new file mode 100644
index 000000000..020484eed
--- /dev/null
+++ b/tests/data/SOURCES/hello.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int
+main (void)
+{
+ printf ("Hello, world!\n");
+ return 0;
+}
diff --git a/tests/data/SOURCES/poltest-1.0.tar.bz2 b/tests/data/SOURCES/poltest-1.0.tar.bz2
deleted file mode 100644
index 37dcc2356..000000000
--- a/tests/data/SOURCES/poltest-1.0.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/tests/data/SOURCES/poltest-policy-1.0.tar.bz2 b/tests/data/SOURCES/poltest-policy-1.0.tar.bz2
deleted file mode 100644
index 76f4e14f8..000000000
--- a/tests/data/SOURCES/poltest-policy-1.0.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/tests/data/SPECS/attrtest.spec b/tests/data/SPECS/attrtest.spec
index 6f787b19e..1d7e4bfe2 100644
--- a/tests/data/SPECS/attrtest.spec
+++ b/tests/data/SPECS/attrtest.spec
@@ -20,7 +20,7 @@ for x in a b c d e f g h i j; do
chmod 400 $RPM_BUILD_ROOT/${x}/file
done
-%files
+%files -n %{name}
/a/dir
/a/file
@@ -56,3 +56,7 @@ done
%defattr(640,zoot,zoot,750)
%attr(777,-,-) /j/dir
%attr(222,-,-) /j/file
+
+%changelog
+* Tue Jun 28 2011 Panu Matilainen <pmatilai@redhat.com>
+- Initial package
diff --git a/tests/data/SPECS/configtest.spec b/tests/data/SPECS/configtest.spec
index 5f15c349f..17dd7c901 100644
--- a/tests/data/SPECS/configtest.spec
+++ b/tests/data/SPECS/configtest.spec
@@ -1,3 +1,6 @@
+# avoid depending on rpm configuration
+%define _sysconfdir /etc
+
%{!?filetype: %global filetype file}
Name: configtest%{?sub:-%{sub}}
diff --git a/tests/data/SPECS/conflicttest.spec b/tests/data/SPECS/conflicttest.spec
index bd1dd1c5f..46fbb29a1 100644
--- a/tests/data/SPECS/conflicttest.spec
+++ b/tests/data/SPECS/conflicttest.spec
@@ -1,3 +1,6 @@
+# avoid depending on rpm configuration
+%define _datadir /usr/share
+
Name: conflict%{pkg}
Version: 1.0
Release: 1
diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec
index 7f2228f11..68b0fcbcc 100644
--- a/tests/data/SPECS/deptest.spec
+++ b/tests/data/SPECS/deptest.spec
@@ -10,9 +10,20 @@ BuildArch: noarch
%{?provs:Provides: %{provs}}
%{?cfls:Conflicts: %{cfls}}
%{?obs:Obsoletes: %{obs}}
+%{?recs:Recommends: %{recs}}
+%{?sugs:Suggests: %{sugs}}
+%{?sups:Supplements: %{sups}}
+%{?ens:Enhances: %{ens}}
+%{?buildreqs:BuildRequires: %{buildreqs}}
+%{?buildcfls:BuildConflicts: %{buildcfls}}
%description
%{summary}
+%install
+mkdir -p %{buildroot}/opt/
+echo FOO > %{buildroot}/opt/bar
+
%files
%defattr(-,root,root,-)
+/opt/bar
diff --git a/tests/data/SPECS/filedep.spec b/tests/data/SPECS/filedep.spec
new file mode 100644
index 000000000..d40305881
--- /dev/null
+++ b/tests/data/SPECS/filedep.spec
@@ -0,0 +1,49 @@
+Name: filedep
+Version: 1.0
+Release: 1
+Summary: Testing file dependencies
+License: GPL
+BuildArch: noarch
+
+%description
+%{summary}
+
+%prep
+%setup -q -T -c %{name}-%{version}
+
+
+%build
+cat << EOF >> foo
+#!/bin/sh
+cat /etc/foo.conf
+EOF
+
+cat << EOF >> bar
+#!/bin/f00f
+echo BUG
+EOF
+
+cat << EOF >> foo.conf
+hello there
+EOF
+
+cat << EOF >> README
+Some stuff, huh?
+EOF
+
+%install
+mkdir -p %{buildroot}/etc
+mkdir -p %{buildroot}/usr/bin
+mkdir -p %{buildroot}/usr/share/doc/filedep
+install -D -m 644 foo.conf %{buildroot}/etc
+install -D -m 755 foo bar %{buildroot}/usr/bin/
+install -D -m 644 README %{buildroot}/usr/share/doc/filedep
+
+%files
+/etc/*
+/usr/bin/*
+/usr/share/doc/filedep/
+
+
+%changelog
+
diff --git a/tests/data/SPECS/filetriggers.spec b/tests/data/SPECS/filetriggers.spec
new file mode 100644
index 000000000..b1dc3d5d9
--- /dev/null
+++ b/tests/data/SPECS/filetriggers.spec
@@ -0,0 +1,95 @@
+Name: filetriggers
+Version: 1.0
+Release: 1
+Summary: Testing file triggers
+
+Group: testing
+License: GPL
+BuildArch: noarch
+
+
+%description
+%{summary}
+
+
+%filetriggerin -- /usr/bin
+echo "filetriggerin(/usr/bin*):"
+cat
+echo
+
+%filetriggerun -- /usr/bin
+echo "filetriggerun(/usr/bin*):"
+cat
+echo
+
+%filetriggerpostun -- /usr/bin
+echo "filetriggerpostun(/usr/bin*):"
+cat
+echo
+
+%transfiletriggerin -- /usr/bin
+echo "transfiletriggerin(/usr/bin*):"
+cat
+echo
+
+%transfiletriggerun -- /usr/bin
+echo "transfiletriggerun(/usr/bin*):"
+cat
+echo
+
+%transfiletriggerpostun -- /usr/bin
+echo "transfiletriggerpostun(/usr/bin*):"
+cat
+echo
+
+%filetriggerin -p <lua> -- /usr/bin
+print("filetriggerin(/usr/bin*)<lua>:")
+a = rpm.next_file()
+while a do
+ print(a)
+ a = rpm.next_file()
+end
+print("")
+io.flush()
+
+%filetriggerin -- /foo
+echo "filetriggerin(/foo*):"
+cat
+echo
+
+%filetriggerun -- /foo
+echo "filetriggerun(/foo*):"
+cat
+echo
+
+%filetriggerpostun -- /foo
+echo "filetriggerpostun(/foo*):"
+cat
+echo
+
+%transfiletriggerin -- /foo
+echo "transfiletriggerin(/foo*):"
+cat
+echo
+
+%transfiletriggerun -- /foo
+echo "transfiletriggerun(/foo*):"
+cat
+echo
+
+%transfiletriggerpostun -- /foo
+echo "transfiletriggerpostun(/foo*):"
+cat
+echo
+
+%filetriggerin -p <lua> -- /foo
+print("filetriggerin(/foo*)<lua>:")
+a = rpm.next_file()
+while a do
+ print(a)
+ a = rpm.next_file()
+end
+print("")
+io.flush()
+
+%files
diff --git a/tests/data/SPECS/flangtest.spec b/tests/data/SPECS/flangtest.spec
index 3f3679588..a361bcdc9 100644
--- a/tests/data/SPECS/flangtest.spec
+++ b/tests/data/SPECS/flangtest.spec
@@ -1,3 +1,6 @@
+# avoid depending on rpm configuration
+%define _datadir /usr/share
+
Name: flangtest
Version: 1.0
Release: 1
@@ -16,6 +19,7 @@ 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
+touch $RPM_BUILD_ROOT/%{_datadir}/%{name}/empty.txt
%clean
rm -rf $RPM_BUILD_ROOT
@@ -27,3 +31,4 @@ rm -rf $RPM_BUILD_ROOT
%lang(en) %{_datadir}/%{name}/en.txt
%lang(pl) %{_datadir}/%{name}/pl.txt
%{_datadir}/%{name}/none.txt
+%{_datadir}/%{name}/empty.txt
diff --git a/tests/data/SPECS/hello-attr-buildid.spec b/tests/data/SPECS/hello-attr-buildid.spec
new file mode 100644
index 000000000..cdab95fff
--- /dev/null
+++ b/tests/data/SPECS/hello-attr-buildid.spec
@@ -0,0 +1,27 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+
+%install
+mkdir -p %{buildroot}%{_bindir}
+install -D -p -m 0755 -t %{buildroot}%{_bindir} hello
+
+%files
+%attr(644,root,root) %{_bindir}/hello
+
+%changelog
diff --git a/tests/data/SPECS/hello-cd.spec b/tests/data/SPECS/hello-cd.spec
new file mode 100644
index 000000000..ab1e3008b
--- /dev/null
+++ b/tests/data/SPECS/hello-cd.spec
@@ -0,0 +1,29 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+
+%install
+mkdir -p %{buildroot}/bin
+install -D -p -m 0755 -t %{buildroot}/bin hello
+# Pretend we need to do something in /tmp
+cd /tmp
+
+%files
+%attr(644,root,root) /bin/hello
+
+%changelog
diff --git a/tests/data/SPECS/hello-config-buildid.spec b/tests/data/SPECS/hello-config-buildid.spec
new file mode 100644
index 000000000..ca2d30db3
--- /dev/null
+++ b/tests/data/SPECS/hello-config-buildid.spec
@@ -0,0 +1,30 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+
+%install
+mkdir -p %{buildroot}/bin
+install -D -p -m 0755 -t %{buildroot}/bin hello
+mkdir -p %{buildroot}/etc
+echo "settings" > %{buildroot}/etc/config.file
+
+%files
+%attr(644,root,root) /bin/hello
+%config(noreplace) /etc/config.file
+
+%changelog
diff --git a/tests/data/SPECS/hello-r2.spec b/tests/data/SPECS/hello-r2.spec
new file mode 100644
index 000000000..ca5091d10
--- /dev/null
+++ b/tests/data/SPECS/hello-r2.spec
@@ -0,0 +1,58 @@
+Summary: hello -- hello, world rpm
+Name: hello
+Version: 1.0
+Release: 2
+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
+
+%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
+* Wed Jun 8 2016 Mark Wielaard <mjw@redhat.com>
+- Update release for unique build-id generation tests.
+
+* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com>
+- create.
diff --git a/tests/data/SPECS/hello-script.spec b/tests/data/SPECS/hello-script.spec
index 567519e33..a28c446f6 100644
--- a/tests/data/SPECS/hello-script.spec
+++ b/tests/data/SPECS/hello-script.spec
@@ -13,6 +13,7 @@ BuildArch: noarch
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
+mkdir -p $RPM_BUILD_ROOT/zoot
cat << EOF > $RPM_BUILD_ROOT/usr/bin/hello
echo "Hello world!"
EOF
@@ -20,3 +21,4 @@ EOF
%files
%defattr(-,root,root,-)
/usr/bin/hello
+/zoot
diff --git a/tests/data/SPECS/hello2-suid.spec b/tests/data/SPECS/hello2-suid.spec
new file mode 100644
index 000000000..32bdce1f9
--- /dev/null
+++ b/tests/data/SPECS/hello2-suid.spec
@@ -0,0 +1,67 @@
+Summary: hello2 -- double hello, world rpm
+Name: hello2
+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
+
+%description
+Simple rpm demonstration.
+
+%prep
+%setup -q -n hello-1.0
+%patch0 -p1 -b .modernize
+
+%build
+make CFLAGS="-g -O1"
+mv hello hello2
+make CFLAGS="-g -O2 -D_FORTIFY_SOURCE=2"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/local/bin
+# Note explicit install hello as suid
+install -m 4755 hello $RPM_BUILD_ROOT/usr/local/bin
+install -m 755 hello2 $RPM_BUILD_ROOT/usr/local/bin
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+
+%post
+
+%preun
+
+%postun
+
+%files
+# Note we don't set any attrs. We expect the suid flag to have been picked up.
+/usr/local/bin/hello
+/usr/local/bin/hello2
+%defattr(-,root,root)
+%doc FAQ
+#%readme README
+#%license COPYING
+
+%changelog
+* Tue Jun 14 2016 Mark Wielaard <mjw@redhat.com>
+- Make hello (implicit) suid
+
+* Wed May 18 2016 Mark Wielaard <mjw@redhat.com>
+- Add hello2 for dwz testing support.
+
+* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com>
+- create.
diff --git a/tests/data/SPECS/hello2.spec b/tests/data/SPECS/hello2.spec
new file mode 100644
index 000000000..01777af5b
--- /dev/null
+++ b/tests/data/SPECS/hello2.spec
@@ -0,0 +1,62 @@
+Summary: hello2 -- double hello, world rpm
+Name: hello2
+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
+
+%description
+Simple rpm demonstration.
+
+%prep
+%setup -q -n hello-1.0
+%patch0 -p1 -b .modernize
+
+%build
+make CFLAGS="-g -O1"
+mv hello hello2
+make CFLAGS="-g -O2 -D_FORTIFY_SOURCE=2"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/local/bin
+make DESTDIR=$RPM_BUILD_ROOT install
+cp hello2 $RPM_BUILD_ROOT/usr/local/bin/
+
+%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
+%attr(0751,root,root) /usr/local/bin/hello2
+
+%changelog
+* Wed May 18 2016 Mark Wielaard <mjw@redhat.com>
+- Add hello2 for dwz testing support.
+
+* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com>
+- create.
diff --git a/tests/data/SPECS/hello2cp.spec b/tests/data/SPECS/hello2cp.spec
new file mode 100644
index 000000000..33d8dc260
--- /dev/null
+++ b/tests/data/SPECS/hello2cp.spec
@@ -0,0 +1,64 @@
+Summary: hello2 -- double hello, world rpm
+Name: hello2
+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
+
+%description
+Simple rpm demonstration.
+
+%prep
+%setup -q -n hello-1.0
+%patch0 -p1 -b .modernize
+
+%build
+make CFLAGS="-g -O1"
+cp hello hello2
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/local/bin
+make DESTDIR=$RPM_BUILD_ROOT install
+cp hello2 $RPM_BUILD_ROOT/usr/local/bin/
+
+%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
+%attr(0751,root,root) /usr/local/bin/hello2
+
+%changelog
+* Mon Jun 6 2016 Mark Wielaard <mjw@redhat.com>
+- Copy hello to hello2 for duplicate build-id testing.
+
+* Wed May 18 2016 Mark Wielaard <mjw@redhat.com>
+- Add hello2 for dwz testing support.
+
+* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com>
+- create.
diff --git a/tests/data/SPECS/hello2ln.spec b/tests/data/SPECS/hello2ln.spec
new file mode 100644
index 000000000..2c40dcc32
--- /dev/null
+++ b/tests/data/SPECS/hello2ln.spec
@@ -0,0 +1,63 @@
+Summary: hello2 -- double hello, world rpm
+Name: hello2
+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
+
+%description
+Simple rpm demonstration.
+
+%prep
+%setup -q -n hello-1.0
+%patch0 -p1 -b .modernize
+
+%build
+make CFLAGS="-g -O1"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/local/bin
+make DESTDIR=$RPM_BUILD_ROOT install
+ln $RPM_BUILD_ROOT/usr/local/bin/hello $RPM_BUILD_ROOT/usr/local/bin/hello2
+
+%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
+%attr(0751,root,root) /usr/local/bin/hello2
+
+%changelog
+* Mon Jun 6 2016 Mark Wielaard <mjw@redhat.com>
+- Hard link hello to hello2 for duplicate build-id testing.
+
+* Wed May 18 2016 Mark Wielaard <mjw@redhat.com>
+- Add hello2 for dwz testing support.
+
+* Tue Oct 20 1998 Jeff Johnson <jbj@redhat.com>
+- create.
diff --git a/tests/data/SPECS/hlinktest.spec b/tests/data/SPECS/hlinktest.spec
index 7c22d29ae..b3b8866fc 100644
--- a/tests/data/SPECS/hlinktest.spec
+++ b/tests/data/SPECS/hlinktest.spec
@@ -1,3 +1,6 @@
+%bcond_with unpackaged_dirs
+%bcond_with unpackaged_files
+
Summary: Testing hard link behavior
Name: hlinktest
Version: 1.0
@@ -5,6 +8,7 @@ Release: 1
License: Testing
Group: Testing
BuildArch: noarch
+Provides: /bin/sh
%description
%install
@@ -12,16 +16,26 @@ rm -rf %{buildroot}
mkdir -p $RPM_BUILD_ROOT/foo
cat << EOF >> $RPM_BUILD_ROOT/foo/hello
#!/bin/sh
-echo $0
+echo %{name}-%{version}
EOF
cd $RPM_BUILD_ROOT/foo
cat hello > copyllo
+cat hello > aaaa
+ln aaaa zzzz
chmod a+x hello copyllo
for f in foo bar world; do
ln hello hello-${f}
done
+%if %{with unpackaged_dirs}
+mkdir -p $RPM_BUILD_ROOT/zoo/
+%endif
+
+%if %{with unpackaged_files}
+touch $RPM_BUILD_ROOT/toot
+%endif
+
%files
%defattr(-,root,root)
/foo/*
diff --git a/tests/data/SPECS/parallel.spec b/tests/data/SPECS/parallel.spec
new file mode 100644
index 000000000..41896726e
--- /dev/null
+++ b/tests/data/SPECS/parallel.spec
@@ -0,0 +1,50 @@
+Name: parallel
+Version: %{ver}
+Release: 1%{?dist}
+Summary: Testing parallel install behavior
+BuildArch: noarch
+License: GPL
+
+%description
+%{summary}
+
+%package trigger
+Summary: %{summary}
+
+%description trigger
+%{summary}
+
+%transfiletriggerin trigger -- /opt/parallel
+echo %transfiletriggerin: $*
+cat | wc -l
+
+%transfiletriggerun trigger -- /opt/parallel
+echo %transfiletriggerun: $*
+cat | wc -l
+
+%transfiletriggerpostun trigger -- /opt/parallel
+echo %transfiletriggerpostun: $*
+cat | wc -l
+
+%filetriggerin trigger -- /opt/parallel
+echo %filetriggerin: $*
+cat | wc -l
+
+%filetriggerpostun trigger -- /opt/parallel
+echo %filetriggerpostun: $*
+cat | wc -l
+
+
+%install
+for d in mydir yourdir; do
+ datadir=%{buildroot}/opt/parallel/%{version}/${d}
+ mkdir -p ${datadir}
+ for f in 1 2 3 4; do
+ echo ${f} > ${datadir}/${f}
+ done
+done
+
+%files
+/opt/%{name}
+
+%files trigger
diff --git a/tests/data/SPECS/poltest.spec b/tests/data/SPECS/poltest.spec
deleted file mode 100644
index 233c33bc3..000000000
--- a/tests/data/SPECS/poltest.spec
+++ /dev/null
@@ -1,52 +0,0 @@
-%define debug_package %{nil}
-
-Summary: Policy in rpm example
-Name: poltest
-Version: 1.0
-Release: 2
-Group: Utilities
-License: GPL
-Requires: poltest-policy
-Source0: poltest-%{version}.tar.bz2
-Source1: poltest-policy-%{version}.tar.bz2
-Buildroot: %{_tmppath}/%{name}-%{version}-root
-%description
-Example for installing policy included in a package header
-
-%prep
-%setup -q
-%setup -q -T -D -a 1
-
-%build
-make CFLAGS="$RPM_OPT_FLAGS"
-make -f /usr/share/selinux/devel/Makefile -C poltest-policy-%{version}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=%{buildroot} prefix=%{_prefix} install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%{_bindir}/foo
-%{_bindir}/bar
-
-
-%package policy
-Summary: Policy for the poltest package
-Group: System/Policy
-Collections: sepolicy
-%description policy
-Policy for the poltest package
-
-%sepolicy policy
-%semodule -n foo -t default poltest-policy-%{version}/foo.pp
-%semodule -n bar -t mls,targeted poltest-policy-%{version}/bar.pp
-
-%files policy
-
-%changelog
-* Wed Jul 1 2009 Steve Lawrence <slawrence@tresys.com>
-- create
diff --git a/tests/data/SPECS/prefixtest.spec b/tests/data/SPECS/prefixtest.spec
new file mode 100644
index 000000000..004e353f7
--- /dev/null
+++ b/tests/data/SPECS/prefixtest.spec
@@ -0,0 +1,42 @@
+Name: prefixtest
+Version: 1.0
+Release: 1
+Summary: Testing file glob behavior
+Group: Testing
+License: GPL
+BuildArch: noarch
+RemovePathPostfixes: g:f
+
+%description
+%{summary}
+
+%define testdir /opt/%{name}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT/%{testdir}
+echo "foo" > $RPM_BUILD_ROOT/%{testdir}/weird%%name
+for f in bif baf zab zeb zib; do
+ echo "$f" > $RPM_BUILD_ROOT/%{testdir}/$f
+done
+for f in bing bang bong; do
+ mkdir -p $RPM_BUILD_ROOT/%{testdir}/$f
+done
+mkdir -p $RPM_BUILD_ROOT/%{testdir}/foo
+for f in one two three; do
+ echo "$f" > $RPM_BUILD_ROOT/%{testdir}/foo/$f
+done
+
+ln -s %{testdir}/zab $RPM_BUILD_ROOT/%{testdir}/linkgood
+ln -s %{testdir}/zub $RPM_BUILD_ROOT/%{testdir}/linkbad
+
+%files
+%defattr(-,root,root,-)
+%{testdir}/b??
+%{testdir}/weird?name
+%{testdir}/z*
+%{testdir}/l*
+%{testdir}/b*g/
+%dir %{testdir}/foo
+%{testdir}/foo/*
diff --git a/tests/data/SPECS/replacetest.spec b/tests/data/SPECS/replacetest.spec
index e8a64e803..54974567b 100644
--- a/tests/data/SPECS/replacetest.spec
+++ b/tests/data/SPECS/replacetest.spec
@@ -1,5 +1,7 @@
%{!?filetype: %global filetype file}
%{?fixit: %global havepretrans 1}
+%{!?user: %global user root}
+%{!?grp: %global grp root}
Name: replacetest%{?sub:-%{sub}}
Version: %{ver}
@@ -43,5 +45,5 @@ rm -rf $RPM_BUILD_ROOT
%endif
%files
-%defattr(-,root,root,-)
+%defattr(-,%{user},%{grp},-)
/opt/*
diff --git a/tests/data/SPECS/scripts.spec b/tests/data/SPECS/scripts.spec
index fbb9bc989..581a56f5c 100644
--- a/tests/data/SPECS/scripts.spec
+++ b/tests/data/SPECS/scripts.spec
@@ -29,3 +29,7 @@ echo %{name}-%{version}-%{release} POSTUN $*
%posttrans
echo %{name}-%{version}-%{release} POSTTRANS $*
+
+%verifyscript
+echo %{name}-%{version}-%{release} VERIFY $*
+
diff --git a/tests/data/SPECS/sigpipe.spec b/tests/data/SPECS/sigpipe.spec
new file mode 100644
index 000000000..c9db67934
--- /dev/null
+++ b/tests/data/SPECS/sigpipe.spec
@@ -0,0 +1,47 @@
+%bcond_with buildpipe
+%bcond_with manyfiles
+
+Name: sigpipe
+Version: 1.0
+Release: 1%{?dist}
+Summary: Testing SIGPIPE behavior
+
+Group: Testing
+License: GPLv2
+BuildArch: noarch
+
+%description
+%{summary}
+%end
+
+%define datadir /opt/%{name}/data
+
+# Reproducer for https://bugzilla.redhat.com/show_bug.cgi?id=651463
+%if %{with buildpipe}
+%prep
+bash -c 's=$SECONDS
+set -o pipefail
+for ((i=0; i < 30; i++))
+do printf hello 2>/dev/null
+ sleep .1
+done | /bin/sleep 1
+(( (SECONDS-s) < 2 )) || exit 1'
+%endif
+
+%install
+mkdir -p %{buildroot}/%{datadir}
+%if %{with manyfiles}
+for i in {1..32}; do
+ mkdir %{buildroot}/%{datadir}/${i}
+ for j in {a..z}; do
+ touch %{buildroot}/%{datadir}/${i}/${j}
+ done
+done
+%endif
+
+# For simulating https://bugzilla.redhat.com/show_bug.cgi?id=1264198
+%post
+kill -PIPE ${PPID}
+
+%files
+%{datadir}
diff --git a/tests/data/SPECS/test-subpackages-exclude.spec b/tests/data/SPECS/test-subpackages-exclude.spec
new file mode 100644
index 000000000..e93b10b70
--- /dev/null
+++ b/tests/data/SPECS/test-subpackages-exclude.spec
@@ -0,0 +1,42 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%package test2
+Summary: Test2.
+%description test2
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+cp hello.c hello2.c
+gcc -g hello2.c -o hello2
+cp hello.c hello3.c
+gcc -g hello3.c -o hello3
+
+%install
+mkdir -p %{buildroot}/bin
+install -D -p -m 0755 -t %{buildroot}/bin hello
+install -D -p -m 0755 -t %{buildroot}/bin hello2
+# Install it, but then exclude it...
+install -D -p -m 0755 -t %{buildroot}/bin hello3
+
+%files
+/bin/hello
+
+%files test2
+/bin/hello2
+%exclude /bin/hello3
+
+%changelog
diff --git a/tests/data/SPECS/test-subpackages-pathpostfixes.spec b/tests/data/SPECS/test-subpackages-pathpostfixes.spec
new file mode 100644
index 000000000..19b3b9e97
--- /dev/null
+++ b/tests/data/SPECS/test-subpackages-pathpostfixes.spec
@@ -0,0 +1,39 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%package test2
+RemovePathPostfixes: .foobar
+Summary: Test2.
+%description test2
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+cp hello.c hello2.c
+gcc -g hello2.c -o hello.foobar
+
+%install
+mkdir -p %{buildroot}/bin
+install -D -p -m 0755 -t %{buildroot}/bin hello
+# Install as hello.foobar, but we want the postfix removed in the package...
+install -D -p -m 0755 -t %{buildroot}/bin hello.foobar
+
+%files
+/bin/hello
+
+%files test2
+/bin/hello.foobar
+
+%changelog
diff --git a/tests/data/SPECS/test-subpackages.spec b/tests/data/SPECS/test-subpackages.spec
new file mode 100644
index 000000000..830660082
--- /dev/null
+++ b/tests/data/SPECS/test-subpackages.spec
@@ -0,0 +1,47 @@
+Name: test
+Version: 1.0
+Release: 1
+Summary: Test
+
+License: Public Domain
+URL: https://fedoraproject.org
+Source: hello.c
+
+%description
+%{summary}.
+
+%package test2
+Summary: Test2.
+%description test2
+
+%package test3
+Summary: Test3.
+%description test3
+
+%prep
+%autosetup -c -D -T
+cp -a %{S:0} .
+
+%build
+gcc -g hello.c -o hello
+cp hello.c hello2.c
+gcc -g hello2.c -o hello2
+cp hello.c hello3.c
+gcc -g hello3.c -o hello3
+
+%install
+mkdir -p %{buildroot}/bin
+install -D -p -m 0755 -t %{buildroot}/bin hello
+install -D -p -m 0755 -t %{buildroot}/bin hello2
+install -D -p -m 0755 -t %{buildroot}/bin hello3
+
+%files
+/bin/hello
+
+%files test2
+/bin/hello2
+
+%files test3
+/bin/hello3
+
+%changelog
diff --git a/tests/data/SPECS/testdoc.spec b/tests/data/SPECS/testdoc.spec
new file mode 100644
index 000000000..7cdfb7433
--- /dev/null
+++ b/tests/data/SPECS/testdoc.spec
@@ -0,0 +1,32 @@
+Summary: testdoc
+Name: testdoc
+Version: 1.0
+Release: 1
+Group: Utilities
+License: GPLv2+
+Distribution: RPM test suite.
+BuildArch: noarch
+
+%description
+Package for testing rpm install option "--excludedocs".
+
+%install
+mkdir -p %{buildroot}%{_datadir}/testdoc
+echo "nodoc" > %{buildroot}%{_datadir}/testdoc/nodoc
+
+mkdir -p %{buildroot}%{_docdir}/testdoc
+echo "doc1" > %{buildroot}%{_docdir}/testdoc/documentation1
+echo "doc2" > %{buildroot}%{_docdir}/testdoc/documentation2
+
+mkdir -p %{buildroot}%{_docdir}/testdoc/examples
+echo "example1" > %{buildroot}%{_docdir}/testdoc/examples/example1
+echo "example2" > %{buildroot}%{_docdir}/testdoc/examples/example2
+
+%files
+%{_datadir}/testdoc/nodoc
+%dir %{_docdir}/testdoc
+%doc %{_docdir}/testdoc/documentation1
+%doc %{_docdir}/testdoc/documentation2
+%dir %{_docdir}/testdoc/examples
+%doc %{_docdir}/testdoc/examples/example1
+%doc %{_docdir}/testdoc/examples/example2
diff --git a/tests/data/SPECS/triggers.spec b/tests/data/SPECS/triggers.spec
new file mode 100644
index 000000000..ae447b60b
--- /dev/null
+++ b/tests/data/SPECS/triggers.spec
@@ -0,0 +1,26 @@
+Name: triggers
+Version: 1.0
+Release: %{rel}
+Summary: Testing trigger behavior
+Group: Testing
+License: GPL
+BuildArch: noarch
+
+%description
+%{summary}
+
+%files
+%defattr(-,root,root,-)
+
+%triggerprein -- %{trigpkg}
+echo %{name}-%{version}-%{release} TRIGGERPREIN $*
+
+%triggerin -- %{trigpkg}
+echo %{name}-%{version}-%{release} TRIGGERIN $*
+
+%triggerun -- %{trigpkg}
+echo %{name}-%{version}-%{release} TRIGGERUN $*
+
+%triggerpostun -- %{trigpkg}
+echo %{name}-%{version}-%{release} TRIGGERPOSTUN $*
+
diff --git a/tests/data/SPECS/vattrtest.spec b/tests/data/SPECS/vattrtest.spec
new file mode 100644
index 000000000..130f0407d
--- /dev/null
+++ b/tests/data/SPECS/vattrtest.spec
@@ -0,0 +1,29 @@
+Name: vattrtest
+Version: 1.0
+Release: 1
+Summary: Testing virtual file attribute behavior
+Group: Testing
+License: GPL
+BuildArch: noarch
+
+%description
+%{summary}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT/opt/%{name}
+for x in a c cn d g l m r; do
+ echo ${x} > $RPM_BUILD_ROOT/opt/%{name}/${x}
+done
+
+%files
+%dir /opt/%{name}
+%artifact /opt/%{name}/a
+%config /opt/%{name}/c
+%config(noreplace) /opt/%{name}/cn
+%doc /opt/%{name}/d
+%ghost /opt/%{name}/g
+%license /opt/%{name}/l
+%missingok /opt/%{name}/m
+%readme /opt/%{name}/r
diff --git a/tests/data/keys/CVE-2021-3521-badbind.asc b/tests/data/keys/CVE-2021-3521-badbind.asc
new file mode 100755
index 000000000..aea00f9d7
--- /dev/null
+++ b/tests/data/keys/CVE-2021-3521-badbind.asc
@@ -0,0 +1,25 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: rpm-4.17.90 (NSS-3)
+
+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE=
+=WCfs
+-----END PGP PUBLIC KEY BLOCK-----
+
diff --git a/tests/data/keys/CVE-2021-3521-nosubsig-last.asc b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc
new file mode 100755
index 000000000..aea00f9d7
--- /dev/null
+++ b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc
@@ -0,0 +1,25 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: rpm-4.17.90 (NSS-3)
+
+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE=
+=WCfs
+-----END PGP PUBLIC KEY BLOCK-----
+
diff --git a/tests/data/keys/CVE-2021-3521-nosubsig.asc b/tests/data/keys/CVE-2021-3521-nosubsig.asc
new file mode 100755
index 000000000..3a2e7417f
--- /dev/null
+++ b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data/keys/rpm.org-rsa-2048-test.pub b/tests/data/keys/rpm.org-rsa-2048-test.pub
new file mode 100644
index 000000000..6e38a5dbb
--- /dev/null
+++ b/tests/data/keys/rpm.org-rsa-2048-test.pub
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v2
+
+mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
+91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
+eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
+7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
+1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
+c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
+CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
+Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
+BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
+XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
+fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
+BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
+zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
+iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
+Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
+KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
+L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAGJAR8EGAEIAAkFAljmORgCGwwA
+CgkQQ0RZHhlkxfzwDQf/Y5on5o+s/xD3tDyRYa6SErfT44lEArdCD7Yi+cygJFox
+3jyM8ovtJAkwRegwyxcaLN7zeG1p1Sk9ZAYWQEJT6qSU4Ppu+CVGHgxgnTcfUiu6
+EZZQE6srvua53IMY1lT50M7vx0T5VicHFRWBFV2C/Mc32p7cEE6nn45nEZgUXQNl
+ySEyvoRlsAJq6gFsfqucVz2vMJDTMVczUtq1CjvUqFbif8JVL36EoZCf1SeRw6d6
+s1Kp3AA33Rjd+Uw87HJ4EIB75zMFQX2H0ggAVdYTQcqGXHP5MZK1jJrHfxJyMi3d
+UNW2iqnN3BA7guhOv6OMiROF1+I7Q5nWT63mQC7IgQ==
+=Z6nu
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/tests/data/keys/rpm.org-rsa-2048-test.secret b/tests/data/keys/rpm.org-rsa-2048-test.secret
new file mode 100644
index 000000000..1d2890e9a
--- /dev/null
+++ b/tests/data/keys/rpm.org-rsa-2048-test.secret
@@ -0,0 +1,57 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v2
+
+lQOYBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
+HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGD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