1 # rpmbuild.at: test rpmbuild
3 # Copyright (C) 2007 Ralf Corsépius <corsepiu@fedoraproject.org>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 AT_BANNER([RPM build])
21 # ------------------------------
22 # Check if rpmbuild -ba *.spec works
23 AT_SETUP([rpmbuild -ba *.spec])
27 AS_MKDIR_P(${TOPDIR}/SOURCES)
29 cp "${abs_srcdir}"/data/SOURCES/hello-1.0.tar.gz "${abs_srcdir}"/data/SOURCES/hello-1.0-modernize.patch ${TOPDIR}/SOURCES
32 -ba "${abs_srcdir}"/data/SPECS/hello.spec
39 # ------------------------------
40 # Check if rpmbuild -ba *.spec
41 # honours a relative topdir with --root
42 #AT_SETUP([rpmbuild --root=... -ba *.spec])
44 #AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
47 #AS_MKDIR_P(${TOPDIR}/SOURCES)
49 #cp "${abs_srcdir}"/data/SOURCES/hello-1.0.tar.gz ${TOPDIR}/SOURCES
52 # --root="${abs_builddir}"/testing \
53 # -ba "${abs_srcdir}"/data/SPECS/hello.spec
60 # ------------------------------
61 # Check if rpmbuild --rebuild *.src.rpm works
62 AT_SETUP([rpmbuild --rebuild])
68 --rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
75 # ------------------------------
76 # Check if rpmbuild --rebuild *.src.rpm
77 # honours a relative topdir with --root
78 #AT_SETUP([rpmbuild --root=... --rebuild])
80 #AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
85 # --root="${abs_builddir}"/testing \
86 # --rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
93 # ------------------------------
94 # Check if tar unpacking works
95 AT_SETUP([rpmbuild -tb <tar with bad spec>])
101 -tb "${RPMDATA}/SOURCES/hello-1.0.tar.gz"
105 [error: line 5: Unknown tag: Serial: 1
109 # ------------------------------
110 # Check if tar build works
111 # TODO: test that the rpms are actually created...
112 AT_SETUP([rpmbuild -tb])
118 -ta "${RPMDATA}/SOURCES/hello-2.0.tar.gz"