Patch automake crap.

This commit is contained in:
Richard W.M. Jones 2014-02-21 13:07:52 +00:00
parent fe5a3ca24a
commit 0bd3ff770e
2 changed files with 156 additions and 2 deletions

151
autotools.patch Normal file
View File

@ -0,0 +1,151 @@
--- nbdkit-1.1.6.old/tests/Makefile.in 2014-02-16 10:48:53.000000000 +0000
+++ nbdkit-1.1.6/tests/Makefile.in 2014-02-21 13:05:58.276307978 +0000
@@ -109,34 +109,36 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+TESTS = test-help.sh test-help-plugin.sh test-dump-config.sh \
+ test-start.sh test-foreground.sh test-single.sh \
+ test-captive.sh $(am__EXEEXT_5) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4)
@HAVE_LIBGUESTFS_TRUE@check_PROGRAMS = test-connect$(EXEEXT) \
@HAVE_LIBGUESTFS_TRUE@ test-file$(EXEEXT) $(am__EXEEXT_1) \
@HAVE_LIBGUESTFS_TRUE@ $(am__EXEEXT_2) $(am__EXEEXT_3) \
@HAVE_LIBGUESTFS_TRUE@ $(am__EXEEXT_4)
-@HAVE_LIBGUESTFS_TRUE@TESTS = test-connect$(EXEEXT) test-file$(EXEEXT) \
-@HAVE_LIBGUESTFS_TRUE@ $(am__EXEEXT_1) $(am__EXEEXT_2) \
-@HAVE_LIBGUESTFS_TRUE@ $(am__EXEEXT_3) $(am__EXEEXT_4)
-@HAVE_LIBGUESTFS_TRUE@am__append_1 = file-data
+@HAVE_LIBGUESTFS_TRUE@am__append_1 = test-connect test-file
+@HAVE_LIBGUESTFS_TRUE@am__append_2 = file-data
# gzip plugin test.
-@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_2 = test-gzip
@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_3 = test-gzip
-@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_4 = disk disk.gz
+@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_4 = test-gzip
@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_5 = disk disk.gz
+@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_ZLIB_TRUE@am__append_6 = disk disk.gz
# xz plugin test.
-@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_6 = test-xz
@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_7 = test-xz
-@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_8 = disk.xz
+@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_8 = test-xz
@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_9 = disk.xz
+@HAVE_GUESTFISH_TRUE@@HAVE_LIBGUESTFS_TRUE@@HAVE_LIBLZMA_TRUE@am__append_10 = disk.xz
# perl plugin test.
-@HAVE_LIBGUESTFS_TRUE@@HAVE_PERL_TRUE@am__append_10 = test-perl
@HAVE_LIBGUESTFS_TRUE@@HAVE_PERL_TRUE@am__append_11 = test-perl
+@HAVE_LIBGUESTFS_TRUE@@HAVE_PERL_TRUE@am__append_12 = test-perl
# python plugin test.
-@HAVE_LIBGUESTFS_TRUE@@HAVE_PYTHON_TRUE@am__append_12 = test-python
@HAVE_LIBGUESTFS_TRUE@@HAVE_PYTHON_TRUE@am__append_13 = test-python
+@HAVE_LIBGUESTFS_TRUE@@HAVE_PYTHON_TRUE@am__append_14 = test-python
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp $(top_srcdir)/test-driver
@@ -471,6 +473,8 @@
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
+@HAVE_LIBGUESTFS_TRUE@am__EXEEXT_5 = test-connect$(EXEEXT) \
+@HAVE_LIBGUESTFS_TRUE@ test-file$(EXEEXT)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
@@ -632,10 +636,22 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
CLEANFILES = *~
-MAINTAINERCLEANFILES = $(am__append_1) $(am__append_5) $(am__append_9)
-EXTRA_DIST = test.pl test.py
+MAINTAINERCLEANFILES = $(am__append_2) $(am__append_6) \
+ $(am__append_10)
+EXTRA_DIST = \
+ test-captive.sh \
+ test-dump-config.sh \
+ test-foreground.sh \
+ test-help.sh \
+ test-help-plugin.sh \
+ test.pl \
+ test.py \
+ test-single.sh \
+ test-start.sh
-# Tests need libguestfs, since that is a convenient way to drive qemu.
+
+# In-depth tests need libguestfs, since that is a convenient way to
+# drive qemu.
# Use the 'direct' backend, and ensure maximum libguestfs debugging is
# written to the *.log files in case there is a problem.
@@ -649,8 +665,8 @@
@HAVE_LIBGUESTFS_TRUE@check_LTLIBRARIES = libtest.la
@HAVE_LIBGUESTFS_TRUE@libtest_la_SOURCES = test.c test.h
@HAVE_LIBGUESTFS_TRUE@libtest_la_CFLAGS = $(WARNINGS_CFLAGS)
-@HAVE_LIBGUESTFS_TRUE@check_DATA = file-data $(am__append_4) \
-@HAVE_LIBGUESTFS_TRUE@ $(am__append_8)
+@HAVE_LIBGUESTFS_TRUE@check_DATA = file-data $(am__append_5) \
+@HAVE_LIBGUESTFS_TRUE@ $(am__append_9)
@HAVE_LIBGUESTFS_TRUE@test_connect_SOURCES = test-connect.c test.h
@HAVE_LIBGUESTFS_TRUE@test_connect_CFLAGS = $(WARNINGS_CFLAGS) $(LIBGUESTFS_CFLAGS)
@HAVE_LIBGUESTFS_TRUE@test_connect_LDADD = libtest.la $(LIBGUESTFS_LIBS)
@@ -1082,6 +1098,55 @@
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
+test-help.sh.log: test-help.sh
+ @p='test-help.sh'; \
+ b='test-help.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-help-plugin.sh.log: test-help-plugin.sh
+ @p='test-help-plugin.sh'; \
+ b='test-help-plugin.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dump-config.sh.log: test-dump-config.sh
+ @p='test-dump-config.sh'; \
+ b='test-dump-config.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-start.sh.log: test-start.sh
+ @p='test-start.sh'; \
+ b='test-start.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-foreground.sh.log: test-foreground.sh
+ @p='test-foreground.sh'; \
+ b='test-foreground.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-single.sh.log: test-single.sh
+ @p='test-single.sh'; \
+ b='test-single.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-captive.sh.log: test-captive.sh
+ @p='test-captive.sh'; \
+ b='test-captive.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-connect.log: test-connect$(EXEEXT)
@p='test-connect$(EXEEXT)'; \
b='test-connect'; \

View File

@ -2,7 +2,7 @@
Name: nbdkit
Version: 1.1.6
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NBD server
License: BSD
@ -12,6 +12,8 @@ Source0: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
# Upstream patches, fixing a minor bug and adding more tests.
Patch1: 0001-Don-t-pass-NULL-pointer-to-asprintf-when-generating-.patch
Patch2: 0002-tests-Test-the-nbdkit-command-line-more-thoroughly.patch
# Patch automake crap resulting from changes above.
Patch3: autotools.patch
BuildRequires: /usr/bin/pod2man
BuildRequires: libguestfs-devel
@ -153,6 +155,7 @@ plugins for %{name}.
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Grrr 'patch' doesn't restore permissions:
chmod +x tests/*.sh
@ -247,7 +250,7 @@ make check
%changelog
* Fri Feb 21 2014 Richard W.M. Jones <rjones@redhat.com> - 1.1.6-2
* Fri Feb 21 2014 Richard W.M. Jones <rjones@redhat.com> - 1.1.6-3
- Backport some upstream patches, fixing a minor bug and adding more tests.
- Enable the tests since kernel bug is fixed.