[iwhd] Initial import of iwhd.

Chris Lalancette clalance at fedoraproject.org
Thu Jul 7 13:50:09 UTC 2011


commit abec334f049aefa2c41c1b16494d62bd6192f9a8
Author: Chris Lalancette <clalance at redhat.com>
Date:   Thu Jul 7 09:49:45 2011 -0400

    Initial import of iwhd.
    
    Signed-off-by: Chris Lalancette <clalance at redhat.com>

 .gitignore                                   |    1 +
 iwhd-workaround-jansson-2.1-api-change.patch |   71 +++++++++++++++++++++++++
 iwhd.spec                                    |   73 ++++++++++++++++++++++++++
 sources                                      |    1 +
 4 files changed, 146 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..384864f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/iwhd-0.96.tar.xz
diff --git a/iwhd-workaround-jansson-2.1-api-change.patch b/iwhd-workaround-jansson-2.1-api-change.patch
new file mode 100644
index 0000000..00cbff1
--- /dev/null
+++ b/iwhd-workaround-jansson-2.1-api-change.patch
@@ -0,0 +1,71 @@
+diff -urp iwhd-0.96.orig/configure.ac iwhd-0.96/configure.ac
+--- iwhd-0.96.orig/configure.ac	2011-04-27 15:37:33.000000000 -0400
++++ iwhd-0.96/configure.ac	2011-07-07 09:31:28.602643329 -0400
+@@ -85,6 +85,18 @@ AC_CHECK_HEADER([mongo/client/dbclient.h
+   [#undef VERSION])
+ AC_LANG_POP
+ 
++# Starting in jansson 2.1, file-loading functions require an
++# additional "flags" argument.  Test for this.
++AC_CACHE_CHECK([whether json_load_file takes 3 arguments],
++  [iw_cv_func_jansson_flag],
++  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++    #include <jansson.h>
++    json_t *f (void) { return json_load_file ("file", 0, NULL); }]])],
++      [iw_cv_func_jansson_flag=0,],
++      [iw_cv_func_jansson_flag=])])
++AC_DEFINE_UNQUOTED([JANSSON_LOAD_FLAG], $iw_cv_func_jansson_flag,
++  [Define to "0," if json_load_file and json_loads require a flags arguments.])
++
+ # from http://www.gnu.org/software/autoconf-archive/
+ AX_BOOST_BASE
+ AX_BOOST_SYSTEM
+diff -urp iwhd-0.96.orig/dc-rhev-image.c iwhd-0.96/dc-rhev-image.c
+--- iwhd-0.96.orig/dc-rhev-image.c	2011-06-15 13:36:39.000000000 -0400
++++ iwhd-0.96/dc-rhev-image.c	2011-07-07 09:31:28.603643433 -0400
+@@ -2329,7 +2329,7 @@ int main(int argc, char **argv, char **e
+ 
+ 	memset(&cfg, 0, sizeof(struct config));
+ 
+-	jcfg = json_load_file(cfgname, &err);
++	jcfg = json_load_file(cfgname, JANSSON_LOAD_FLAG &err);
+ 	if (!jcfg) {
+ 		fprintf(stderr, "ERROR configuration JSON error %s:%d: %s\n",
+ 		    cfgname, err.line, err.text);
+diff -urp iwhd-0.96.orig/NEWS iwhd-0.96/NEWS
+--- iwhd-0.96.orig/NEWS	2011-06-15 14:46:57.000000000 -0400
++++ iwhd-0.96/NEWS	2011-07-07 09:31:28.601643224 -0400
+@@ -22,6 +22,11 @@ iwhd NEWS                               
+   in a cloud with Windows credentials. The backslash was causing an
+   internal error due to improper JSON escaping.
+ 
++** Infrastructure
++
++  Adapt to jansson-1.2's new, incompatible changed API, so we can build
++  both with it and the older API.
++
+ 
+ * Noteworthy changes in release 0.95 (2011-05-17) [stable]
+ 
+Only in iwhd-0.96: NEWS.orig
+diff -urp iwhd-0.96.orig/setup.c iwhd-0.96/setup.c
+--- iwhd-0.96.orig/setup.c	2011-06-01 17:31:00.000000000 -0400
++++ iwhd-0.96/setup.c	2011-07-07 09:31:28.607643848 -0400
+@@ -583,7 +583,7 @@ parse_config (char *cfg_file)
+ 		return NULL;
+ 	}
+ 
+-	config = json_load_file(cfg_file,&err);
++	config = json_load_file(cfg_file, JANSSON_LOAD_FLAG &err);
+ 	if (!config) {
+ 		error(0,0,_("JSON error on line %d: %s"),err.line,err.text);
+ 		return NULL;
+@@ -614,7 +614,7 @@ auto_config(void)
+ 		return NULL;
+ 	}
+ 
+-	config = json_loads(auto_json,&err);
++	config = json_loads(auto_json, JANSSON_LOAD_FLAG &err);
+ 	if (!config) {
+ 		error(0, 0, _("JSON error on line %d: %s"), err.line, err.text);
+ 		return NULL;
diff --git a/iwhd.spec b/iwhd.spec
new file mode 100644
index 0000000..57daff2
--- /dev/null
+++ b/iwhd.spec
@@ -0,0 +1,73 @@
+Name:		iwhd
+Version:	0.96
+Release:	1%{?dist}
+Summary:	Image WareHouse Daemon
+
+Group:		System Environment/Libraries
+License:	GPLv3
+
+URL:		http://git.fedorahosted.org/git/?p=iwhd.git
+
+# pulled from upstream git,
+# to recreate tarball, check out commit, then run "make dist"
+Source0: http://people.redhat.com/meyering/iwhd/%{name}-%{version}.tar.xz
+Patch1: iwhd-workaround-jansson-2.1-api-change.patch
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: boost-devel
+BuildRequires: boost-filesystem
+BuildRequires: gc-devel
+BuildRequires: hail-devel
+BuildRequires: jansson-devel
+BuildRequires: libcurl-devel
+BuildRequires: libmicrohttpd-devel
+BuildRequires: libxml2-devel
+BuildRequires: libuuid-devel
+BuildRequires: mongodb-devel
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: help2man
+
+# mongodb-server is required at build time so make check succeeds
+BuildRequires: mongodb-server
+
+%description
+Deltacloud image-warehouse daemon
+
+%prep
+%setup -q
+%patch1 -p1
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+%check
+make -s check
+
+%clean
+rm -rf %{buildroot}
+
+%post
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING README NEWS
+%{_bindir}/iwhd
+%{_bindir}/dc-rhev-image
+%{_bindir}/dc-vmware-image
+%{_mandir}/man8/iwhd.8*
+%{_sysconfdir}/rc.d/init.d/iwhd
+%{_sysconfdir}/iwhd/conf.js
+%{_localstatedir}/lib/iwhd
+
+%changelog
+* Wed Jun 29 2011 Jim Meyering <meyering at redhat.com> - 0.96.1.9e86
+- see git logs for details
diff --git a/sources b/sources
index e69de29..d11772b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+cfa82d8e8e39a9681ec516014a3eeeb5  iwhd-0.96.tar.xz


More information about the scm-commits mailing list