[libguestfs] New development version 1.21.7.
Richard W.M. Jones
rjones at fedoraproject.org
Mon Feb 4 13:22:07 UTC 2013
commit c438bc71b29d00cbc41a571cf5b9478c0413c494
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Feb 4 13:11:17 2013 +0000
New development version 1.21.7.
...rc-guestfs-internal-all-frontend-.h-to-EX.patch | 27 +++++
guestfs-internal-all.h | 65 ++++++++++++
guestfs-internal-frontend.h | 111 ++++++++++++++++++++
libguestfs.spec | 14 +++-
sources | 2 +-
5 files changed, 217 insertions(+), 2 deletions(-)
---
diff --git a/0001-build-Add-src-guestfs-internal-all-frontend-.h-to-EX.patch b/0001-build-Add-src-guestfs-internal-all-frontend-.h-to-EX.patch
new file mode 100644
index 0000000..cfe4bf3
--- /dev/null
+++ b/0001-build-Add-src-guestfs-internal-all-frontend-.h-to-EX.patch
@@ -0,0 +1,27 @@
+From 4075ed9247ad1061efe5438373b7d82230639c77 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Mon, 4 Feb 2013 13:12:28 +0000
+Subject: [PATCH] build: Add src/guestfs-internal-{all,frontend}.h to
+ EXTRA_DIST.
+
+This fixes commit ec3b75e5ffd1abea1400f6609ae9c61eab0dfa71.
+---
+ src/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index acdbe74..e344190 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -128,6 +128,8 @@ libguestfs_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms
+ libguestfs_la_SOURCES = \
+ guestfs.h \
+ guestfs-internal.h \
++ guestfs-internal-all.h \
++ guestfs-internal-frontend.h \
+ guestfs_protocol.h \
+ actions-0.c \
+ actions-1.c \
+--
+1.8.1
+
diff --git a/guestfs-internal-all.h b/guestfs-internal-all.h
new file mode 100644
index 0000000..3b28f4c
--- /dev/null
+++ b/guestfs-internal-all.h
@@ -0,0 +1,65 @@
+/* libguestfs
+ * Copyright (C) 2013 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* NB: This contains ONLY definitions which are shared by libguestfs
+ * daemon, library, bindings and tools (ie. ALL C code).
+ */
+
+#ifndef GUESTFS_INTERNAL_ALL_H_
+#define GUESTFS_INTERNAL_ALL_H_
+
+#define STREQ(a,b) (strcmp((a),(b)) == 0)
+#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0)
+#define STRNEQ(a,b) (strcmp((a),(b)) != 0)
+#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0)
+#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0)
+#define STRCASEEQLEN(a,b,n) (strncasecmp((a),(b),(n)) == 0)
+#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0)
+#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0)
+#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0)
+#define STRSUFFIX(a,b) (strlen((a)) >= strlen((b)) && STREQ((a)+strlen((a))-strlen((b)),(b)))
+
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
+#ifdef __APPLE__
+#define UNIX_PATH_MAX 104
+#else
+#define UNIX_PATH_MAX 108
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifdef __APPLE__
+#define xdr_uint32_t xdr_u_int32_t
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x) /* empty */
+# endif
+#endif
+
+#ifndef ATTRIBUTE_UNUSED
+# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif
+
+#endif /* GUESTFS_INTERNAL_ALL_H_ */
diff --git a/guestfs-internal-frontend.h b/guestfs-internal-frontend.h
new file mode 100644
index 0000000..7d41806
--- /dev/null
+++ b/guestfs-internal-frontend.h
@@ -0,0 +1,111 @@
+/* libguestfs
+ * Copyright (C) 2013 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* NB: This contains ONLY definitions which are shared by libguestfs
+ * library, bindings and tools (NOT the daemon).
+ *
+ * If a definition is only needed by a single component of libguestfs,
+ * then it should NOT be here!
+ *
+ * The daemon does NOT use this header. If you need a place to put
+ * something shared with absolutely everything including the daemon,
+ * put it in 'src/guestfs-internal-all.h'.
+ */
+
+#ifndef GUESTFS_INTERNAL_FRONTEND_H_
+#define GUESTFS_INTERNAL_FRONTEND_H_
+
+#include "guestfs-internal-all.h"
+
+#define _(str) dgettext(PACKAGE, (str))
+#define N_(str) dgettext(PACKAGE, (str))
+
+#ifdef HAVE_ATTRIBUTE_CLEANUP
+#define CLEANUP_FREE __attribute__((cleanup(guestfs___cleanup_free)))
+#define CLEANUP_FREE_STRING_LIST \
+ __attribute__((cleanup(guestfs___cleanup_free_string_list)))
+#define CLEANUP_HASH_FREE \
+ __attribute__((cleanup(guestfs___cleanup_hash_free)))
+#define CLEANUP_UNLINK_FREE \
+ __attribute__((cleanup(guestfs___cleanup_unlink_free)))
+#ifdef HAVE_LIBXML2
+#define CLEANUP_XMLBUFFERFREE \
+ __attribute__((cleanup(guestfs___cleanup_xmlBufferFree)))
+#define CLEANUP_XMLFREEDOC \
+ __attribute__((cleanup(guestfs___cleanup_xmlFreeDoc)))
+#define CLEANUP_XMLFREETEXTWRITER \
+ __attribute__((cleanup(guestfs___cleanup_xmlFreeTextWriter)))
+#define CLEANUP_XMLXPATHFREECONTEXT \
+ __attribute__((cleanup(guestfs___cleanup_xmlXPathFreeContext)))
+#define CLEANUP_XMLXPATHFREEOBJECT \
+ __attribute__((cleanup(guestfs___cleanup_xmlXPathFreeObject)))
+#endif
+#else
+#define CLEANUP_FREE
+#define CLEANUP_FREE_STRING_LIST
+#define CLEANUP_HASH_FREE
+#define CLEANUP_UNLINK_FREE
+#ifdef HAVE_LIBXML2
+#define CLEANUP_XMLBUFFERFREE
+#define CLEANUP_XMLFREEDOC
+#define CLEANUP_XMLFREETEXTWRITER
+#define CLEANUP_XMLXPATHFREECONTEXT
+#define CLEANUP_XMLXPATHFREEOBJECT
+#endif
+#endif
+
+/* NB: At some point we will stop exporting these safe_* allocation
+ * functions outside the library, so don't use them in new tools or
+ * bindings code.
+ */
+extern GUESTFS_DLL_PUBLIC void *guestfs___safe_malloc (guestfs_h *g, size_t nbytes);
+extern GUESTFS_DLL_PUBLIC void *guestfs___safe_calloc (guestfs_h *g, size_t n, size_t s);
+extern GUESTFS_DLL_PUBLIC char *guestfs___safe_strdup (guestfs_h *g, const char *str);
+extern GUESTFS_DLL_PUBLIC void *guestfs___safe_memdup (guestfs_h *g, const void *ptr, size_t size);
+extern void *guestfs___safe_realloc (guestfs_h *g, void *ptr, size_t nbytes);
+extern char *guestfs___safe_strdup (guestfs_h *g, const char *str);
+extern char *guestfs___safe_strndup (guestfs_h *g, const char *str, size_t n);
+extern void *guestfs___safe_memdup (guestfs_h *g, const void *ptr, size_t size);
+extern char *guestfs___safe_asprintf (guestfs_h *g, const char *fs, ...)
+ __attribute__((format (printf,2,3)));
+
+#define safe_calloc guestfs___safe_calloc
+#define safe_malloc guestfs___safe_malloc
+#define safe_realloc guestfs___safe_realloc
+#define safe_strdup guestfs___safe_strdup
+#define safe_strndup guestfs___safe_strndup
+#define safe_memdup guestfs___safe_memdup
+#define safe_asprintf guestfs___safe_asprintf
+
+/* These functions are used internally by the CLEANUP_* macros.
+ * Don't call them directly.
+ */
+extern GUESTFS_DLL_PUBLIC void guestfs___cleanup_free (void *ptr);
+extern GUESTFS_DLL_PUBLIC void guestfs___cleanup_free_string_list (void *ptr);
+extern GUESTFS_DLL_PUBLIC void guestfs___cleanup_hash_free (void *ptr);
+extern GUESTFS_DLL_PUBLIC void guestfs___cleanup_unlink_free (void *ptr);
+
+#ifdef HAVE_LIBXML2
+extern void guestfs___cleanup_xmlBufferFree (void *ptr);
+extern void guestfs___cleanup_xmlFreeDoc (void *ptr);
+extern void guestfs___cleanup_xmlFreeTextWriter (void *ptr);
+extern void guestfs___cleanup_xmlXPathFreeContext (void *ptr);
+extern void guestfs___cleanup_xmlXPathFreeObject (void *ptr);
+#endif
+
+#endif /* GUESTFS_INTERNAL_FRONTEND_H_ */
diff --git a/libguestfs.spec b/libguestfs.spec
index b4ce69f..c52c248 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -21,7 +21,7 @@
Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
-Version: 1.21.6
+Version: 1.21.7
Release: 1%{?dist}
License: LGPLv2+
Group: Development/Libraries
@@ -33,6 +33,11 @@ Patch1: ruby-1.9-vendor-not-site.patch
BuildRequires: autoconf, automake, libtool, gettext-devel
%endif
+# 1.21.7 missed out some files from EXTRA_DIST.
+Source5: guestfs-internal-all.h
+Source6: guestfs-internal-frontend.h
+Patch2: 0001-build-Add-src-guestfs-internal-all-frontend-.h-to-EX.patch
+
# Basic build requirements:
BuildRequires: perl(Pod::Simple)
BuildRequires: perl(Pod::Man)
@@ -675,6 +680,10 @@ if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
chcon --reference=/tmp tmp
fi
+# 1.21.7 missed out some files from EXTRA_DIST.
+cp %{SOURCE5} %{SOURCE6} src/
+%patch2 -p1
+
%if 0%{?fedora} >= 17
%patch1 -p1
autoreconf -i
@@ -1022,6 +1031,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog
+* Mon Feb 4 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.21.7-1
+- New development version 1.21.7.
+
* Mon Jan 28 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.21.6-1
- New development version 1.21.6.
diff --git a/sources b/sources
index d3a03a5..d246b70 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-eaee366290e5c4dae8d7679e01a65267 libguestfs-1.21.6.tar.gz
+0286e39c5cbb5e6caf24afafcf9b997c libguestfs-1.21.7.tar.gz
More information about the scm-commits
mailing list