1 ## Process this file with automake to produce Makefile.in.
3 include $(top_srcdir)/rpm.am
4 AM_CFLAGS = @RPMCFLAGS@
10 TESTSUITE = $(srcdir)/rpmtests
11 EXTRA_DIST += local.at $(TESTSUITE)
13 ## testsuite components
14 TESTSUITE_AT = rpmtests.at
15 TESTSUITE_AT += rpmgeneral.at
16 TESTSUITE_AT += rpmquery.at
17 TESTSUITE_AT += rpmverify.at
18 TESTSUITE_AT += rpmdb.at
19 TESTSUITE_AT += rpmbuild.at
20 TESTSUITE_AT += rpmbuildid.at
21 TESTSUITE_AT += rpmi.at
22 TESTSUITE_AT += rpmvercmp.at
23 TESTSUITE_AT += rpmdeps.at
24 TESTSUITE_AT += rpmconflict.at
25 TESTSUITE_AT += rpmconfig.at
26 TESTSUITE_AT += rpmconfig2.at
27 TESTSUITE_AT += rpmconfig3.at
28 TESTSUITE_AT += rpmreplace.at
29 TESTSUITE_AT += rpmmacro.at
30 TESTSUITE_AT += rpmpython.at
31 TESTSUITE_AT += rpmdepmatch.at
32 TESTSUITE_AT += rpmscript.at
33 TESTSUITE_AT += rpmsigdig.at
34 TESTSUITE_AT += rpmio.at
35 TESTSUITE_AT += rpmorder.at
36 EXTRA_DIST += $(TESTSUITE_AT)
39 EXTRA_DIST += data/SPECS/attrtest.spec
40 EXTRA_DIST += data/SPECS/hello.spec
41 EXTRA_DIST += data/SPECS/hello-r2.spec
42 EXTRA_DIST += data/SPECS/hello-script.spec
43 EXTRA_DIST += data/SPECS/hello2.spec
44 EXTRA_DIST += data/SPECS/hello2cp.spec
45 EXTRA_DIST += data/SPECS/hello2ln.spec
46 EXTRA_DIST += data/SPECS/hello2-suid.spec
47 EXTRA_DIST += data/SPECS/foo.spec
48 EXTRA_DIST += data/SPECS/globtest.spec
49 EXTRA_DIST += data/SPECS/versiontest.spec
50 EXTRA_DIST += data/SPECS/conflicttest.spec
51 EXTRA_DIST += data/SPECS/configtest.spec
52 EXTRA_DIST += data/SPECS/filedep.spec
53 EXTRA_DIST += data/SPECS/flangtest.spec
54 EXTRA_DIST += data/SPECS/hlinktest.spec
55 EXTRA_DIST += data/SPECS/symlinktest.spec
56 EXTRA_DIST += data/SPECS/deptest.spec
57 EXTRA_DIST += data/SPECS/verifyscript.spec
58 EXTRA_DIST += data/SPECS/fakeshell.spec
59 EXTRA_DIST += data/SPECS/scripts.spec
60 EXTRA_DIST += data/SPECS/selfconflict.spec
61 EXTRA_DIST += data/SPECS/replacetest.spec
62 EXTRA_DIST += data/SPECS/triggers.spec
63 EXTRA_DIST += data/SPECS/filetriggers.spec
64 EXTRA_DIST += data/SPECS/parallel.spec
65 EXTRA_DIST += data/SPECS/prefixtest.spec
66 EXTRA_DIST += data/SPECS/testdoc.spec
67 EXTRA_DIST += data/SPECS/sigpipe.spec
68 EXTRA_DIST += data/SPECS/test-subpackages.spec
69 EXTRA_DIST += data/SPECS/test-subpackages-exclude.spec
70 EXTRA_DIST += data/SPECS/test-subpackages-pathpostfixes.spec
71 EXTRA_DIST += data/SPECS/vattrtest.spec
72 EXTRA_DIST += data/SOURCES/hello-1.0-modernize.patch
73 EXTRA_DIST += data/SOURCES/hello-1.0.tar.gz
74 EXTRA_DIST += data/SOURCES/hello-2.0.tar.gz
75 EXTRA_DIST += data/RPMS/foo-1.0-1.noarch.rpm
76 EXTRA_DIST += data/RPMS/hello-1.0-1.i386.rpm
77 EXTRA_DIST += data/RPMS/hello-1.0-1.ppc64.rpm
78 EXTRA_DIST += data/RPMS/hello-2.0-1.i686.rpm
79 EXTRA_DIST += data/RPMS/hello-2.0-1.x86_64.rpm
80 EXTRA_DIST += data/RPMS/hello-2.0-1.x86_64-signed.rpm
81 EXTRA_DIST += data/SRPMS/foo-1.0-1.src.rpm
82 EXTRA_DIST += data/SRPMS/hello-1.0-1.src.rpm
83 EXTRA_DIST += data/SOURCES/hello.c
84 EXTRA_DIST += data/SPECS/hello-attr-buildid.spec
85 EXTRA_DIST += data/SPECS/hello-config-buildid.spec
86 EXTRA_DIST += data/SPECS/hello-cd.spec
87 EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.pub
88 EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.secret
89 EXTRA_DIST += data/keys/CVE-2021-3521-badbind.asc
90 EXTRA_DIST += data/keys/CVE-2021-3521-nosubsig.asc
91 EXTRA_DIST += data/keys/CVE-2021-3521-nosubsig-last.asc
94 AUTOTEST = $(AUTOM4TE) --language=autotest
95 $(TESTSUITE): $(srcdir)/package.m4 local.at $(TESTSUITE_AT)
96 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
99 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
101 echo '# Signature of the current package.'; \
102 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
103 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
104 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
105 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
106 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
107 } >'$(srcdir)/package.m4'
108 EXTRA_DIST += package.m4
110 atconfig: ${top_builddir}/config.status
111 (cd ${top_builddir} && ./config.status ${subdir}/atconfig)
112 CLEANFILES += atconfig
115 atlocal: atlocal.in Makefile
117 -e "s,[@]usrbindir[@],$(bindir)," \
118 -e "s,[@]usrlibdir[@],$(libdir)," \
119 -e "s,[@]execprefix[@],$(exec_prefix)," \
120 -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir)," \
121 < $(srcdir)/atlocal.in > atlocal
122 DISTCLEANFILES = atlocal
123 EXTRA_DIST += atlocal.in
125 # Hack: Abusing testing$(bindir)/rpmbuild as stamp file
126 # The chmod is needed when copying from read-only sources (eg in distcheck)
127 testing$(bindir)/rpmbuild: ../rpmbuild
128 HOME=$(abs_builddir)/testing gpg-connect-agent --no-autostart killagent bye ||:
130 mkdir -p testing/$(bindir)
131 ln -s ./$(bindir) testing/bin
133 ln -s ../bin testing/usr/bin
134 (cd ${top_builddir} && \
135 $(MAKE) DESTDIR=`pwd`/${subdir}/testing install)
136 cp -r ${srcdir}/data/ testing/
137 chmod -R u+w testing/data/
138 for d in dev etc magic tmp var; do if [ ! -d testing/$${d} ]; then mkdir testing/$${d}; fi; done
139 for node in urandom stdin stderr stdout null; do ln -s /dev/$${node} testing/dev/$${node}; done
140 for cf in hosts resolv.conf passwd shadow group gshadow mtab ; do [ -f /etc/$${cf} ] && ln -s /etc/$${cf} testing/etc/$${cf}; done
141 for prog in gzip cat patch tar sh ln chmod rm mkdir uname grep sed find file ionice mktemp nice cut sort diff touch install wc; do p=`which $${prog}`; ln -s $${p} testing/$(bindir)/; done
142 for d in /proc /sys /selinux /etc/selinux; do if [ -d $${d} ]; then ln -s $${d} testing/$${d}; fi; done
143 (cd testing/magic && file -C)
144 HOME=$(abs_builddir)/testing gpg2 --import ${abs_srcdir}/data/keys/*.secret || HOME=$(abs_builddir)/testing gpg --import ${abs_srcdir}/data/keys/*.secret
146 check_DATA = atconfig atlocal $(TESTSUITE)
147 check_DATA += testing$(bindir)/rpmbuild
150 check-local: $(check_DATA)
151 $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
154 echo "you need to have fakechroot installed"
156 endif !HAVE_FAKECHROOT
158 installcheck-local: $(check_DATA)
159 $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
160 $(TESTSUITEFLAGS) ||:
163 test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' --clean