[libguestfs/el5] Add patch to define O_CLOEXEC in tests.

Richard W.M. Jones rjones at fedoraproject.org
Sun Mar 10 20:19:12 UTC 2013


commit f360950123acb90a6730c92bcc302bb9a5b753fa
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sun Mar 10 20:18:51 2013 +0000

    Add patch to define O_CLOEXEC in tests.

 0001-RHEL-5-tests-Use-gnulib.patch |   66 ++++++++++++++++++++++++++++++++++++
 libguestfs.spec                    |    7 +++-
 2 files changed, 72 insertions(+), 1 deletions(-)
---
diff --git a/0001-RHEL-5-tests-Use-gnulib.patch b/0001-RHEL-5-tests-Use-gnulib.patch
new file mode 100644
index 0000000..8e62061
--- /dev/null
+++ b/0001-RHEL-5-tests-Use-gnulib.patch
@@ -0,0 +1,66 @@
+From d75fb430169050f781d1772b88495d398022c6b2 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Sun, 10 Mar 2013 20:08:06 +0000
+Subject: [PATCH] RHEL 5: tests: Use gnulib.
+
+Gnulib defines O_CLOEXEC which is missing on RHEL 5.
+---
+ tests/c-api/Makefile.am |   13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/tests/c-api/Makefile.am b/tests/c-api/Makefile.am
+index fe2c05d..5eb33b8 100644
+--- a/tests/c-api/Makefile.am
++++ b/tests/c-api/Makefile.am
+@@ -70,11 +70,14 @@ TESTS_ENVIRONMENT = \
+ tests_SOURCES = tests.c
+ tests_CPPFLAGS = \
+ 	-DGUESTFS_PRIVATE=1 \
++	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
+ 	-I$(top_srcdir)/src -I$(top_builddir)/src
+ tests_CFLAGS = \
+ 	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ 	$(GPROF_CFLAGS) $(GCOV_CFLAGS)
+-tests_LDADD = $(top_builddir)/src/libguestfs.la
++tests_LDADD = \
++	$(top_builddir)/src/libguestfs.la \
++	$(top_builddir)/gnulib/lib/libgnu.la
+ 
+ # This binary must be statically linked.  It is used for testing
+ # the "guestfs_command" and "guestfs_command_lines" functions.
+@@ -133,12 +136,14 @@ test_add_drive_opts_LDADD = \
+ 
+ test_last_errno_SOURCES = test-last-errno.c
+ test_last_errno_CPPFLAGS = \
++	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
+ 	-I$(top_srcdir)/src -I$(top_builddir)/src
+ test_last_errno_CFLAGS = \
+ 	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ 	$(GPROF_CFLAGS) $(GCOV_CFLAGS)
+ test_last_errno_LDADD = \
+-	$(top_builddir)/src/libguestfs.la
++	$(top_builddir)/src/libguestfs.la \
++	$(top_builddir)/gnulib/lib/libgnu.la
+ 
+ test_private_data_SOURCES = test-private-data.c
+ test_private_data_CPPFLAGS = \
+@@ -151,13 +156,15 @@ test_private_data_LDADD = \
+ 
+ test_user_cancel_SOURCES = test-user-cancel.c
+ test_user_cancel_CPPFLAGS = \
++	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
+ 	-I$(top_srcdir)/src -I$(top_builddir)/src
+ test_user_cancel_CFLAGS = \
+ 	-pthread \
+ 	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ 	$(GPROF_CFLAGS) $(GCOV_CFLAGS)
+ test_user_cancel_LDADD = \
+-	$(top_builddir)/src/libguestfs.la -lm
++	$(top_builddir)/src/libguestfs.la -lm \
++	$(top_builddir)/gnulib/lib/libgnu.la
+ 
+ test_debug_to_file_SOURCES = test-debug-to-file.c
+ test_debug_to_file_CPPFLAGS = \
+-- 
+1.7.4.1
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 768cbd8..2eccb44 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -22,7 +22,7 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.20.3
-Release:       1%{?dist}
+Release:       2%{?dist}
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -78,6 +78,8 @@ Patch0034:     0034-EPEL-5-Remove-Linux-capabilities.patch
 Patch0035:     0035-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch
 Patch0036:     0036-EPEL-5-Custom-replacement-for-Unix.isatty-stdout.patch
 
+Patch1001:     0001-RHEL-5-tests-Use-gnulib.patch
+
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
 BuildRequires: /usr/bin/pod2text
@@ -902,6 +904,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Mar 10 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.20.3-2
+- Add patch to define O_CLOEXEC in tests.
+
 * Sat Mar  9 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.20.3-1
 - Rebase to upstream stable branch version 1.20.3.
 


More information about the scm-commits mailing list