From 79a27c4e15972e0786c70b23ee7631f3519faa92 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Wed, 17 Apr 2013 09:15:40 -0700 Subject: [PATCH 0001/1125] Initial commit --- .gitignore | 9 +++++++++ README.md | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fea4c452 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.annot +*.cmo +*.cma +*.cmi +*.a +*.o +*.cmx +*.cmxs +*.cmxa diff --git a/README.md b/README.md new file mode 100644 index 00000000..100031b9 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +xen-api-rpm-buildroot +===================== + +RPM buildroot for xen-api and related packages \ No newline at end of file From 1da5c686d2ef0fd332c61736a2f231f99b4884ef Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 28 May 2013 20:21:25 +0000 Subject: [PATCH 0002/1125] Package cdrom-0.9.1 --- specs/cdrom.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 specs/cdrom.spec diff --git a/specs/cdrom.spec b/specs/cdrom.spec new file mode 100644 index 00000000..98629505 --- /dev/null +++ b/specs/cdrom.spec @@ -0,0 +1,58 @@ +Name: ocaml-cdrom +Version: 0.9.1 +Release: 0 +Summary: Query the state of CDROM devices +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/xen-org/ocaml +Source0: https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Simple C bindings which allow the state of CDROM devices (and discs +inside) to be queried under Linux. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n cdrom-cdrom-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md +%{_libdir}/ocaml/cdrom/cdrom.a +%{_libdir}/ocaml/cdrom/cdrom.cma +%{_libdir}/ocaml/cdrom/cdrom.cmi +%{_libdir}/ocaml/cdrom/cdrom.cmxa +%{_libdir}/ocaml/cdrom/cdrom.mli +%{_libdir}/ocaml/cdrom/dllstubs_cdrom.so +%{_libdir}/ocaml/cdrom/libstubs_cdrom.a +%{_libdir}/ocaml/cdrom/META + +%changelog +* Tue May 28 2013 David Scott +- Initial package + From 27314205fbd859e4ba2b9e3e8c32866f2562597d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 28 May 2013 20:53:10 +0000 Subject: [PATCH 0003/1125] Update installed files list --- specs/cdrom.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specs/cdrom.spec b/specs/cdrom.spec index 98629505..d1257358 100644 --- a/specs/cdrom.spec +++ b/specs/cdrom.spec @@ -48,6 +48,10 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cdrom/cdrom.cmi %{_libdir}/ocaml/cdrom/cdrom.cmxa %{_libdir}/ocaml/cdrom/cdrom.mli +%{_libdir}/ocaml/cdrom/cdrom.cmx +%{_libdir}/ocaml/cdrom/cdrom.cmo +%{_libdir}/ocaml/cdrom/cdrom.o +%{_libdir}/ocaml/cdrom/cdrom_stubs.c.o %{_libdir}/ocaml/cdrom/dllstubs_cdrom.so %{_libdir}/ocaml/cdrom/libstubs_cdrom.a %{_libdir}/ocaml/cdrom/META From f65a770d74cd63b4935168db2fb5812790468b48 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 10:31:41 +0000 Subject: [PATCH 0004/1125] Add oclock-0.3 --- patches/oclock-1-cc-headers | 24 ++++++++++++++ patches/oclock-2-destdir | 40 ++++++++++++++++++++++++ specs/oclock.spec | 62 +++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 patches/oclock-1-cc-headers create mode 100644 patches/oclock-2-destdir create mode 100644 specs/oclock.spec diff --git a/patches/oclock-1-cc-headers b/patches/oclock-1-cc-headers new file mode 100644 index 00000000..c2a89c62 --- /dev/null +++ b/patches/oclock-1-cc-headers @@ -0,0 +1,24 @@ +commit 5ad1e94482756d991e578aabb96d180e108564e7 +Author: David Scott +Date: Wed May 29 10:12:24 2013 +0000 + + When ocaml is installed in an unusual location, help cc find the headers + + The problem is triggered by using an OCaml compiler installed from OPAM + where needs to be looked up relative to something like + + $HOME/.opam/4.00.1/lib/ocaml + +diff --git a/Makefile b/Makefile +index e2a0e14..b6d05c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,7 @@ OCAMLC += $(OCAMLBFLAGS) + OCAMLOPT += $(OCAMLOFLAGS) + OCAMLDEP += $(OCAMLDEPFLAGS) + +-CFLAGS ?= -fPIC ++CFLAGS ?= -fPIC -I$(OCAMLLIBDIR) + CLIBS = rt pthread + # pthread seems necessary with some build of ocaml + diff --git a/patches/oclock-2-destdir b/patches/oclock-2-destdir new file mode 100644 index 00000000..048d7cfb --- /dev/null +++ b/patches/oclock-2-destdir @@ -0,0 +1,40 @@ +commit 1d9cee605159e8479113db781f2e5fcf6d894490 +Author: David Scott +Date: Wed May 29 10:18:26 2013 +0000 + + make install now understands DESTDIR + + This helps make binary packaging (e.g. RPM, deb, ...) easier. + +diff --git a/Makefile b/Makefile +index b6d05c8..89b6ba1 100644 +--- a/Makefile ++++ b/Makefile +@@ -26,6 +26,11 @@ OCAMLLIBDIR ?= $(shell ocamlc -where) + INSTALL_DIR ?= $(OCAMLLIBDIR)/oclock + STUBLIBS_DIR ?= $(OCAMLLIBDIR)/stublibs + ++OCAMLFIND_DESTDIR ?= ++ifneq "$(DESTDIR)" "" ++OCAMLFIND_DESTDIR := -destdir $(DESTDIR) ++endif ++ + ################################################################################ + + OCAMLC += $(OCAMLBFLAGS) +@@ -82,11 +87,11 @@ distclean: clean + # (Un)Install + install: all + ifdef OCAMLFIND +- $(OCAMLFIND) install oclock oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -dll dlloclock.so ++ $(OCAMLFIND) install oclock oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -dll dlloclock.so $(OCAMLFIND_DESTDIR) + else +- install -d $(INSTALL_DIR) +- install -t $(INSTALL_DIR) oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META +- install -t $(STUBLIBS_DIR) dlloclock.so ++ install -d $(DESTDIR)$(INSTALL_DIR) ++ install -t $(DESTDIR)$(INSTALL_DIR) oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META ++ install -t $(DESTDIR)$(STUBLIBS_DIR) dlloclock.so + endif + + uninstall: diff --git a/specs/oclock.spec b/specs/oclock.spec new file mode 100644 index 00000000..c654c289 --- /dev/null +++ b/specs/oclock.spec @@ -0,0 +1,62 @@ +%define debug_package %{nil} + +Name: ocaml-oclock +Version: 0.3 +Release: 0 +Summary: POSIX monotonic clock for OCaml +License: ISC +Group: Development/Other +URL: https://github.com/polazarus/oclock +Source0: oclock-0.3.tar.gz +Patch0: oclock-1-cc-headers +Patch1: oclock-2-destdir +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +A POSIX monotonic clock for OCaml + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n oclock-%{version} +%patch0 -p1 +%patch1 -p1 + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.markdown +%{_libdir}/ocaml/oclock/oclock.a +%{_libdir}/ocaml/oclock/oclock.cma +%{_libdir}/ocaml/oclock/oclock.cmi +%{_libdir}/ocaml/oclock/oclock.cmxa +%{_libdir}/ocaml/oclock/liboclock.a +%{_libdir}/ocaml/oclock/dlloclock.so +%{_libdir}/ocaml/oclock/META + +%changelog +* Wed May 29 2013 David Scott +- Initial package + From 347aa68ceb2ea411b4a100eadb26c1a1342c3337 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 11:08:12 +0000 Subject: [PATCH 0005/1125] Add uuidm --- specs/uuidm.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 specs/uuidm.spec diff --git a/specs/uuidm.spec b/specs/uuidm.spec new file mode 100644 index 00000000..88b1449a --- /dev/null +++ b/specs/uuidm.spec @@ -0,0 +1,59 @@ +Name: ocaml-uuidm +Version: 0.9.5 +Release: 0 +Summary: Universally Unique IDentifiers (UUIDs) for OCaml +License: BSD3 +Group: Development/Other +URL: http://erratique.ch/software/uuidm +Source0: uuidm-0.9.5.tbz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Uuidm is an OCaml module implementing 128 bits universally unique +identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 +(random based) according to RFC 4122. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n uuidm-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install +rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README CHANGES +%{_libdir}/ocaml/uuidm/uuidm.mli +%{_libdir}/ocaml/uuidm/uuidm.cma +%{_libdir}/ocaml/uuidm/uuidm.cmxa +%{_libdir}/ocaml/uuidm/uuidm.a +%{_libdir}/ocaml/uuidm/uuidm.cmxs +%{_libdir}/ocaml/uuidm/uuidm.cmi +%{_libdir}/ocaml/uuidm/uuidm.cmx +%{_libdir}/ocaml/uuidm/META + +%changelog +* Wed May 29 2013 David Scott +- Initial package + From 2edb68929e59bcde0fd878444da0d5d4689db116 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 15:07:36 +0000 Subject: [PATCH 0006/1125] Add nbd This is untested as it depends on both lwt and bitstring, which don't yet exist --- specs/nbd.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 specs/nbd.spec diff --git a/specs/nbd.spec b/specs/nbd.spec new file mode 100644 index 00000000..b88dcfc9 --- /dev/null +++ b/specs/nbd.spec @@ -0,0 +1,84 @@ +Name: ocaml-nbd +Version: 0.9.0 +Release: 0 +Summary: Pure OCaml implementation of the Network Block Device protocol +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/xen-org/nbd +Source0: https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib bitstring lwt +Requires: ocaml ocaml-findlib bitstring lwt + +%description +An implementation of the Network Block Device protocol for both +regular Unix and Lwt in OCaml. This library allows applications to +access remote block devices. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n nbd-nbd-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md + +%{_libdir}/ocaml/nbd/nbd_unix.cmti +%{_libdir}/ocaml/nbd/nbd_unix.cmxa +%{_libdir}/ocaml/nbd/lwt_mux.cmx +%{_libdir}/ocaml/nbd/META +%{_libdir}/ocaml/nbd/nbd.cmx +%{_libdir}/ocaml/nbd/nbd.cmo +%{_libdir}/ocaml/nbd/nbd.o +%{_libdir}/ocaml/nbd/nbd_lwt.cmx +%{_libdir}/ocaml/nbd/nbd_lwt.a +%{_libdir}/ocaml/nbd/nbd_unix.cmo +%{_libdir}/ocaml/nbd/nbd.cmti +%{_libdir}/ocaml/nbd/lwt_mux.cmi +%{_libdir}/ocaml/nbd/nbd.cmi +%{_libdir}/ocaml/nbd/nbd_unix.cma +%{_libdir}/ocaml/nbd/nbd_unix.cmt +%{_libdir}/ocaml/nbd/nbd_lwt.cmxa +%{_libdir}/ocaml/nbd/nbd.cmxa +%{_libdir}/ocaml/nbd/nbd.cmt +%{_libdir}/ocaml/nbd/nbd_unix.cmx +%{_libdir}/ocaml/nbd/lwt_mux.cmo +%{_libdir}/ocaml/nbd/nbd_lwt.o +%{_libdir}/ocaml/nbd/nbd.a +%{_libdir}/ocaml/nbd/nbd_unix.cmi +%{_libdir}/ocaml/nbd/nbd.cma +%{_libdir}/ocaml/nbd/nbd_lwt.cmti +%{_libdir}/ocaml/nbd/lwt_mux.cmt +%{_libdir}/ocaml/nbd/nbd_unix.a +%{_libdir}/ocaml/nbd/nbd_lwt.cma +%{_libdir}/ocaml/nbd/lwt_mux.o +%{_libdir}/ocaml/nbd/nbd_unix.o +%{_libdir}/ocaml/nbd/nbd_lwt.cmo +%{_libdir}/ocaml/nbd/nbd_lwt.cmt + +%changelog +* Wed May 29 2013 David Scott +- Initial package + From a4847d6c8ea96a8137572718c0c8b6d713f6cbf5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 15:16:51 +0000 Subject: [PATCH 0007/1125] nbd: README.markdown, not README.md --- specs/nbd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/nbd.spec b/specs/nbd.spec index b88dcfc9..5ed8d983 100644 --- a/specs/nbd.spec +++ b/specs/nbd.spec @@ -43,7 +43,7 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root) -%doc ChangeLog README.md +%doc ChangeLog README.markdown %{_libdir}/ocaml/nbd/nbd_unix.cmti %{_libdir}/ocaml/nbd/nbd_unix.cmxa From abd3704afb293db320c679a08ccee499a43a8496 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 15:40:51 +0000 Subject: [PATCH 0008/1125] nbd: missing unpackaged file detected --- specs/nbd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/nbd.spec b/specs/nbd.spec index 5ed8d983..5358c1aa 100644 --- a/specs/nbd.spec +++ b/specs/nbd.spec @@ -77,6 +77,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/nbd/nbd_unix.o %{_libdir}/ocaml/nbd/nbd_lwt.cmo %{_libdir}/ocaml/nbd/nbd_lwt.cmt +%{_libdir}/ocaml/nbd/nbd_lwt.cmi %changelog * Wed May 29 2013 David Scott From 2db80a11cffe98f6a28163c0ce1bdfaba7ccbfa7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 17:08:45 +0000 Subject: [PATCH 0009/1125] Add QMP --- specs/qmp.spec | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 specs/qmp.spec diff --git a/specs/qmp.spec b/specs/qmp.spec new file mode 100644 index 00000000..bc45fef3 --- /dev/null +++ b/specs/qmp.spec @@ -0,0 +1,53 @@ +Name: ocaml-qmp +Version: 0.9.0 +Release: 0 +Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/xen-org/ocaml-qmp +Source0: ocaml-qmp-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +An implementation of the Qemu Message Protocol (QMP) that allows +an application to command, and receive events from, a running qemu +process. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-qmp-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md LICENSE + +%{_libdir}/ocaml/qmp/* + +%changelog +* Wed May 29 2013 David Scott +- Initial package + From 796aeae4cd40d564abf45ab1586a334efd9eb0a5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 10:34:30 +0000 Subject: [PATCH 0010/1125] Add obuild.0.0.2 --- specs/obuild.spec | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 specs/obuild.spec diff --git a/specs/obuild.spec b/specs/obuild.spec new file mode 100644 index 00000000..a6d9a9c9 --- /dev/null +++ b/specs/obuild.spec @@ -0,0 +1,51 @@ +Name: ocaml-obuild +Version: 0.0.2 +Release: 0 +Summary: Simple build tool for OCaml programs +License: BSD2 +Group: Development/Other +URL: http://github.com/vincenthz/obuild +Source0: obuild-0.0.2.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +The goal is to make a very simple build system for users and developers +of OCaml library and programs. + +Obuild acts as building black box: user declares only what they want to +build and with which sources, and the build system will consistantly +build it. + +The design is based on cabal, and borrow most of the layout and way of +working, adapting parts where necessary to support OCaml fully. + +%prep +%setup -q -n obuild-%{version} + +%build +./bootstrap + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +install dist/build/obuild/obuild %{buildroot}/%{_bindir} +install dist/build/obuild-simple/obuild-simple %{buildroot}/%{_bindir} +install dist/build/obuild-from-oasis/obuild-from-oasis %{buildroot}/%{_bindir} + +%clean +rm -rf %{buildroot} +rm -rf dist + +%files +%defattr(-,root,root) +%doc README.md TODO.md DESIGN.md LICENSE OBUILD_SPEC.md +%{_bindir}/obuild +%{_bindir}/obuild-simple +%{_bindir}/obuild-from-oasis + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 5872c8ef8d3c29b007fde6042d7c850395676c32 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 10:48:09 +0000 Subject: [PATCH 0011/1125] Add cmdliner --- specs/cmdliner.spec | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 specs/cmdliner.spec diff --git a/specs/cmdliner.spec b/specs/cmdliner.spec new file mode 100644 index 00000000..d612c60d --- /dev/null +++ b/specs/cmdliner.spec @@ -0,0 +1,54 @@ +Name: cmdliner +Version: 0.9.3 +Release: 0 +Summary: Declarative definition of commandline interfaces for OCaml +License: BSD3 +Group: Development/Other +URL: http://erratique.ch/software/cmdliner +Source0: cmdliner-0.9.3.tbz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Cmdliner is an OCaml module for the declraitive definition of command line +interfaces. It provides a simple and compositional mechanism to convert +command line arguments to OCaml values and pass them to your functions. +The module automatically handles syntax errors, help messages and UNIX +man page generation. It supports programs with single or multiple commands +(like darcs or git) and respects most of the POSIX and GNU conventions. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n cmdliner-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README CHANGES +%{_libdir}/ocaml/cmdliner/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From bbaf7326f4ade33f8d90e6ce5685ce1219898582 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 29 May 2013 21:46:40 +0000 Subject: [PATCH 0012/1125] Add libvhd --- specs/libvhd.spec | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 specs/libvhd.spec diff --git a/specs/libvhd.spec b/specs/libvhd.spec new file mode 100644 index 00000000..54804bbd --- /dev/null +++ b/specs/libvhd.spec @@ -0,0 +1,50 @@ +Name: ocaml-libvhd +Version: 0.9.0 +Release: 0 +Summary: vhd manipulation via libvhd +License: BSD3 +Group: Development/Other +URL: http://github.com/xen-org/libvhd +Source0: https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Simple C bindings which allow .vhd files to be manipulated. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n libvhd-libvhd-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md +%{_libdir}/ocaml/libvhd/* + +%changelog +* Wed May 29 2013 David Scott +- Initial package + From b68386e23ae04330e36b55abf34bdb2903d25c44 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 11:00:52 +0000 Subject: [PATCH 0013/1125] Update following hasty retreat to OASIS --- specs/libvhd.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/specs/libvhd.spec b/specs/libvhd.spec index 54804bbd..33a16d38 100644 --- a/specs/libvhd.spec +++ b/specs/libvhd.spec @@ -26,15 +26,14 @@ developing applications that use %{name}. %setup -q -n libvhd-libvhd-%{version} %build -if [ -x ./configure ]; then - ./configure -fi -make +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install %clean rm -rf %{buildroot} From abe5f25437a430807d37b97d1617850209d46ae9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 11:31:12 +0000 Subject: [PATCH 0014/1125] Add re --- specs/re.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 specs/re.spec diff --git a/specs/re.spec b/specs/re.spec new file mode 100644 index 00000000..2f944efb --- /dev/null +++ b/specs/re.spec @@ -0,0 +1,49 @@ +Name: ocaml-re +Version: 1.2.1 +Release: 0 +Summary: A regular expression library for OCaml +License: LGPL +Group: Development/Other +URL: http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1 +Source0: ocaml-re-1.2.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +A regular expression library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-ocaml-re-f572d01 + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README CHANGES +%{_libdir}/ocaml/re/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 4e30b0ebe424652fc755952522aac790db5c2e04 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Thu, 30 May 2013 12:31:37 +0100 Subject: [PATCH 0015/1125] Add *.swp to .gitignore Signed-off-by: Mike McClurg --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fea4c452..a187a7a0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ *.cmx *.cmxs *.cmxa +*.swp From e72d9c141ba5afdce70a3c17df6ec39b3fb082ff Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Thu, 30 May 2013 12:32:36 +0100 Subject: [PATCH 0016/1125] Respect rpmbuild directory name conventions Signed-off-by: Mike McClurg --- {patches => SOURCES}/oclock-1-cc-headers | 0 {patches => SOURCES}/oclock-2-destdir | 0 {specs => SPECS}/cdrom.spec | 0 {specs => SPECS}/oclock.spec | 0 {specs => SPECS}/uuidm.spec | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {patches => SOURCES}/oclock-1-cc-headers (100%) rename {patches => SOURCES}/oclock-2-destdir (100%) rename {specs => SPECS}/cdrom.spec (100%) rename {specs => SPECS}/oclock.spec (100%) rename {specs => SPECS}/uuidm.spec (100%) diff --git a/patches/oclock-1-cc-headers b/SOURCES/oclock-1-cc-headers similarity index 100% rename from patches/oclock-1-cc-headers rename to SOURCES/oclock-1-cc-headers diff --git a/patches/oclock-2-destdir b/SOURCES/oclock-2-destdir similarity index 100% rename from patches/oclock-2-destdir rename to SOURCES/oclock-2-destdir diff --git a/specs/cdrom.spec b/SPECS/cdrom.spec similarity index 100% rename from specs/cdrom.spec rename to SPECS/cdrom.spec diff --git a/specs/oclock.spec b/SPECS/oclock.spec similarity index 100% rename from specs/oclock.spec rename to SPECS/oclock.spec diff --git a/specs/uuidm.spec b/SPECS/uuidm.spec similarity index 100% rename from specs/uuidm.spec rename to SPECS/uuidm.spec From 1c5f5e28db0856bc6c560555a4d1a84f552d65fc Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 11:42:33 +0000 Subject: [PATCH 0017/1125] Add syslog --- specs/syslog.spec | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 specs/syslog.spec diff --git a/specs/syslog.spec b/specs/syslog.spec new file mode 100644 index 00000000..beed8f85 --- /dev/null +++ b/specs/syslog.spec @@ -0,0 +1,48 @@ +Name: ocaml-syslog +Version: 1.4 +Release: 0 +Summary: Syslog bindings for OCaml +License: LGPL +Group: Development/Other +URL: http://opam.ocamlpro.com/pkg/syslog.1.4.html +Source0: syslog-1.4.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Syslog bindings for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n syslog-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc Changelog +%{_libdir}/ocaml/syslog/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 0d46ed5bc376c93f828bdd006941e32519fc95bc Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 11:52:07 +0000 Subject: [PATCH 0018/1125] Add xmlm --- specs/xmlm.spec | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 specs/xmlm.spec diff --git a/specs/xmlm.spec b/specs/xmlm.spec new file mode 100644 index 00000000..40da4e02 --- /dev/null +++ b/specs/xmlm.spec @@ -0,0 +1,56 @@ +Name: xmlm +Version: 1.1.1 +Release: 0 +Summary: Streaming XML input/output for OCaml +License: BSD3 +Group: Development/Other +URL: http://erratique.ch/software/xmlm +Source0: xmlm-1.1.1.tbz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Xmlm is an OCaml module providing streaming XML input/output. It aims at +making XML processing robust and painless. + +The streaming interface can process documents without building an in-memory +representation. It lets the programmer translate its data structures to +XML documents and vice-versa. Functions are provided to easily transform +arborescent data structures to/from XML documents. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xmlm-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install +rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README CHANGES +%{_libdir}/ocaml/xmlm/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From b03a5faef2bf2b41de85df9b2d2ccd6c8a1586dd Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 13:03:29 +0000 Subject: [PATCH 0019/1125] Add URI --- specs/uri.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 specs/uri.spec diff --git a/specs/uri.spec b/specs/uri.spec new file mode 100644 index 00000000..d8e104f4 --- /dev/null +++ b/specs/uri.spec @@ -0,0 +1,49 @@ +Name: ocaml-uri +Version: 1.3.8 +Release: 0 +Summary: A URI library for OCaml +License: ISC +Group: Development/Other +URL: https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz +Source0: ocaml-uri-1.3.8.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +A URI library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-uri-ocaml-uri-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md CHANGES +%{_libdir}/ocaml/uri/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 35abb28d7bb303f8f178bc6489f7dd531e82d1ce Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 13:12:44 +0000 Subject: [PATCH 0020/1125] Add rpc --- specs/rpc.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 specs/rpc.spec diff --git a/specs/rpc.spec b/specs/rpc.spec new file mode 100644 index 00000000..2011811c --- /dev/null +++ b/specs/rpc.spec @@ -0,0 +1,49 @@ +Name: ocaml-rpc +Version: 1.4.1 +Release: 0 +Summary: An RPC library for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz +Source0: ocaml-rpc-1.4.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# type-conv, xmlm, js_of_ocaml +Requires: ocaml ocaml-findlib + +%description +Am RPC library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-rpc-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install DESTDIR=${buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md +%{_libdir}/ocaml/rpclib/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 729e9e758df68ec10943720fb91e125aa6c7fe3a Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 13:38:45 +0000 Subject: [PATCH 0021/1125] Add yojson --- specs/yojson.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 specs/yojson.spec diff --git a/specs/yojson.spec b/specs/yojson.spec new file mode 100644 index 00000000..e613d5b4 --- /dev/null +++ b/specs/yojson.spec @@ -0,0 +1,49 @@ +Name: ocaml-yojson +Version: 1.1.6 +Release: 0 +Summary: A JSON parser and priter for OCaml +License: BSD3 +Group: Development/Other +URL: http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz +Source0: yojson-1.1.6.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# cpp easy-format biniou +Requires: ocaml ocaml-findlib + +%description +A JSON parser and printer for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n yojson-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install DESTDIR=${buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md LICENSE +%{_libdir}/ocaml/yojson/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From e345e4403a9239cc172415273477b32a0ffe6c4b Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 13:48:36 +0000 Subject: [PATCH 0022/1125] Add cstruct --- specs/cstruct.spec | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 specs/cstruct.spec diff --git a/specs/cstruct.spec b/specs/cstruct.spec new file mode 100644 index 00000000..caeb48f5 --- /dev/null +++ b/specs/cstruct.spec @@ -0,0 +1,49 @@ +Name: ocaml-cstruct +Version: 0.7.1 +Release: 0 +Summary: Read and write low-level C-style structures in OCaml +License: ISC +Group: Development/Other +URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz +Source0: ocaml-cstruct-0.7.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Read and write low-level C-style structures in OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-cstruct-ocaml-cstruct-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md CHANGES +%{_libdir}/ocaml/cstruct/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From c160d42a396661aad5f6f1da2f03aa5abce1b1bb Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 14:53:10 +0000 Subject: [PATCH 0023/1125] Add netdev --- specs/netdev.spec | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 specs/netdev.spec diff --git a/specs/netdev.spec b/specs/netdev.spec new file mode 100644 index 00000000..c977db09 --- /dev/null +++ b/specs/netdev.spec @@ -0,0 +1,50 @@ +Name: ocaml-netdev +Version: 0.9.0 +Release: 0 +Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz +Source0: netdev-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# forkexec stdext +Requires: ocaml ocaml-findlib + +%description +Manipulate Linux bridges, network devices and openvswitch instances in OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n netdev-netdev-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/netdev/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From d5deaace104339acbb23687498644e28bd6e013b Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 15:16:58 +0000 Subject: [PATCH 0024/1125] Add tapctl --- specs/tapctl.spec | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 specs/tapctl.spec diff --git a/specs/tapctl.spec b/specs/tapctl.spec new file mode 100644 index 00000000..cea5da56 --- /dev/null +++ b/specs/tapctl.spec @@ -0,0 +1,50 @@ +Name: ocaml-tapctl +Version: 0.9.0 +Release: 0 +Summary: Manipulate running tapdisk instances +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz +Source0: tapctl-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# forkexec stdext +Requires: ocaml ocaml-findlib + +%description +Manipulate running tapdisk instances on a xen host. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n tapctl-tapctl-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/tapctl/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 6720a310278d2ecc62ceb5543d61ab8c9663fd0b Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Thu, 30 May 2013 16:41:07 +0100 Subject: [PATCH 0025/1125] Add xen-api-client.spec Signed-off-by: Mike McClurg --- SPECS/xen-api-client.spec | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 SPECS/xen-api-client.spec diff --git a/SPECS/xen-api-client.spec b/SPECS/xen-api-client.spec new file mode 100644 index 00000000..922410c0 --- /dev/null +++ b/SPECS/xen-api-client.spec @@ -0,0 +1,52 @@ +Name: ocaml-xen-api-client +Version: 0.9.2 +Release: 0 +Summary: XenServer XenAPI Client Library for OCaml +License: LGPLv2 +Group: Development/Libraries +URL: https://github.com/xen-org/xen-api-client +Source0: xen-api-client-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-lwt ocaml-ssl ocaml-ounit ocaml-cohttp ocaml-uri ocaml-xmlm ocaml-rpc +Requires: ocaml ocaml-findlib + +%description +XenAPI Client is an OCaml library implementing XenServer's XenAPI. +It is used for programmatically controlling a pool of XenServer +virtualization hosts. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +XenAPI Client is an OCaml library implementing XenServer's XenAPI. +It is used for programmatically controlling a pool of XenServer +virtualization hosts. + +%prep +%setup -q -n xen-api-client-%{version} + +%build +ocaml setup.ml -configure --disable-tests --enable-lwt +ocaml setup.ml -build +ocaml setup.ml -doc + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md CHANGES +%{_libdir}/ocaml/xen-api-client/* + + +%changelog +* Wed May 29 2013 Mike McClurg +- Initial package From 10d423eb9ddd7fb12239218141b8f9476f8e0680 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 16:08:34 +0000 Subject: [PATCH 0026/1125] Add cohttp --- specs/cohttp.spec | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 specs/cohttp.spec diff --git a/specs/cohttp.spec b/specs/cohttp.spec new file mode 100644 index 00000000..752df316 --- /dev/null +++ b/specs/cohttp.spec @@ -0,0 +1,50 @@ +Name: ocaml-cohttp +Version: 0.9.8 +Release: 0 +Summary: An HTTP library for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz +Source0: ocaml-cohttp-0.9.8.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# re uri cstruct lwt ounit +Requires: ocaml ocaml-findlib + +%description +An HTTP library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-cohttp-ocaml-cohttp-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md CHANGES +%{_libdir}/ocaml/cohttp/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 7b02bd172b7af42922f81057e79ea3a8c1ed35a0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 16:11:37 +0000 Subject: [PATCH 0027/1125] Move the rest of the .spec files to the SPECS/ dir --- {specs => SPECS}/cmdliner.spec | 0 {specs => SPECS}/cohttp.spec | 0 {specs => SPECS}/cstruct.spec | 0 {specs => SPECS}/libvhd.spec | 0 {specs => SPECS}/nbd.spec | 0 {specs => SPECS}/netdev.spec | 0 {specs => SPECS}/obuild.spec | 0 {specs => SPECS}/qmp.spec | 0 {specs => SPECS}/re.spec | 0 {specs => SPECS}/rpc.spec | 0 {specs => SPECS}/syslog.spec | 0 {specs => SPECS}/tapctl.spec | 0 {specs => SPECS}/uri.spec | 0 {specs => SPECS}/xmlm.spec | 0 {specs => SPECS}/yojson.spec | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename {specs => SPECS}/cmdliner.spec (100%) rename {specs => SPECS}/cohttp.spec (100%) rename {specs => SPECS}/cstruct.spec (100%) rename {specs => SPECS}/libvhd.spec (100%) rename {specs => SPECS}/nbd.spec (100%) rename {specs => SPECS}/netdev.spec (100%) rename {specs => SPECS}/obuild.spec (100%) rename {specs => SPECS}/qmp.spec (100%) rename {specs => SPECS}/re.spec (100%) rename {specs => SPECS}/rpc.spec (100%) rename {specs => SPECS}/syslog.spec (100%) rename {specs => SPECS}/tapctl.spec (100%) rename {specs => SPECS}/uri.spec (100%) rename {specs => SPECS}/xmlm.spec (100%) rename {specs => SPECS}/yojson.spec (100%) diff --git a/specs/cmdliner.spec b/SPECS/cmdliner.spec similarity index 100% rename from specs/cmdliner.spec rename to SPECS/cmdliner.spec diff --git a/specs/cohttp.spec b/SPECS/cohttp.spec similarity index 100% rename from specs/cohttp.spec rename to SPECS/cohttp.spec diff --git a/specs/cstruct.spec b/SPECS/cstruct.spec similarity index 100% rename from specs/cstruct.spec rename to SPECS/cstruct.spec diff --git a/specs/libvhd.spec b/SPECS/libvhd.spec similarity index 100% rename from specs/libvhd.spec rename to SPECS/libvhd.spec diff --git a/specs/nbd.spec b/SPECS/nbd.spec similarity index 100% rename from specs/nbd.spec rename to SPECS/nbd.spec diff --git a/specs/netdev.spec b/SPECS/netdev.spec similarity index 100% rename from specs/netdev.spec rename to SPECS/netdev.spec diff --git a/specs/obuild.spec b/SPECS/obuild.spec similarity index 100% rename from specs/obuild.spec rename to SPECS/obuild.spec diff --git a/specs/qmp.spec b/SPECS/qmp.spec similarity index 100% rename from specs/qmp.spec rename to SPECS/qmp.spec diff --git a/specs/re.spec b/SPECS/re.spec similarity index 100% rename from specs/re.spec rename to SPECS/re.spec diff --git a/specs/rpc.spec b/SPECS/rpc.spec similarity index 100% rename from specs/rpc.spec rename to SPECS/rpc.spec diff --git a/specs/syslog.spec b/SPECS/syslog.spec similarity index 100% rename from specs/syslog.spec rename to SPECS/syslog.spec diff --git a/specs/tapctl.spec b/SPECS/tapctl.spec similarity index 100% rename from specs/tapctl.spec rename to SPECS/tapctl.spec diff --git a/specs/uri.spec b/SPECS/uri.spec similarity index 100% rename from specs/uri.spec rename to SPECS/uri.spec diff --git a/specs/xmlm.spec b/SPECS/xmlm.spec similarity index 100% rename from specs/xmlm.spec rename to SPECS/xmlm.spec diff --git a/specs/yojson.spec b/SPECS/yojson.spec similarity index 100% rename from specs/yojson.spec rename to SPECS/yojson.spec From e33c89f4c52d4a1c173c82bc710a1195134bacfd Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 16:41:45 +0000 Subject: [PATCH 0028/1125] Add xcp-idl --- SPECS/xcp-idl.spec | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 SPECS/xcp-idl.spec diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec new file mode 100644 index 00000000..a36e08e6 --- /dev/null +++ b/SPECS/xcp-idl.spec @@ -0,0 +1,57 @@ +Name: ocaml-xcp-idl +Version: 0.9.0 +Release: 0 +Summary: Common interface definitions for XCP services +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz +Source0: xcp-idl-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# "uri" +#"re" +# "cohttp" +# "xmlm" +# "rpc" {> "1.4.0"} +# "ocamlfind" +# "syslog" +# "message_switch" +Requires: ocaml ocaml-findlib + +%description +Common interface definitions for XCP services. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xcp-idl-xcp-idl-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/xcp/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 95a601189ea4fff78cfaa6fd60f312e5c232d605 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 17:21:18 +0000 Subject: [PATCH 0029/1125] Add message-switch devel package, still need to make server. --- SPECS/message-switch.spec | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 SPECS/message-switch.spec diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec new file mode 100644 index 00000000..2906f7b9 --- /dev/null +++ b/SPECS/message-switch.spec @@ -0,0 +1,61 @@ +Name: message-switch +Version: 0.9.0 +Release: 0 +Summary: A store and forward message switch +License: FreeBSD +Group: Development/Other +URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.0.tar.gz +Source0: message-switch-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib +# "ocamlfind" +# "cohttp" {= "0.9.7"} +# "rpc" +# "xenstore" +# "ounit" +# "syslog" +# "uri" +# "re" +# "rpc" +# "cmdliner" +# "ssl" +# "oclock" + +%description +A store and forward message switch for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n message-switch-message-switch-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog +%{_libdir}/ocaml/message_switch/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 8651537f0b81a9cb7a835bec538d86e56655b3a3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 17:37:31 +0000 Subject: [PATCH 0030/1125] Create a message switch RPM with the switch and an init.d script --- SOURCES/message-switch-init | 92 +++++++++++++++++++++++++++++++++++++ SPECS/message-switch.spec | 27 +++++++---- 2 files changed, 110 insertions(+), 9 deletions(-) create mode 100755 SOURCES/message-switch-init diff --git a/SOURCES/message-switch-init b/SOURCES/message-switch-init new file mode 100755 index 00000000..86869162 --- /dev/null +++ b/SOURCES/message-switch-init @@ -0,0 +1,92 @@ +#!/bin/bash +# +# message-switch Startup script for message-switch +# +# chkconfig: 2345 12 88 +# description: The message switch is used by services within the xapi toolstack to +# communicate. +### BEGIN INIT INFO +# Provides: message-switch +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start up the xapi toolstack message switch +# Description: The message switch is used by services within the xapi +# toolstack to communicate with each other. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/message-switch.pid + +prog=message-switch +exec=/sbin/message-switch +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting message switch: " + daemon --pidfile="$PIDFILE" $exec -i "$PIDFILE" $MESSAGE_SWITCH_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down message switch: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 2906f7b9..5119c625 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -25,15 +25,6 @@ Requires: ocaml ocaml-findlib %description A store and forward message switch for OCaml. -%package devel -Summary: Development files for %{name} -Group: Development/Other -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - %prep %setup -q -n message-switch-message-switch-%{version} @@ -46,10 +37,28 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install +mkdir -p %{buildroot}/%{_sbindir} +install switch.native %{buildroot}/%{_sbindir}/message-switch +mkdir -p %{buildroot}/%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch %clean rm -rf %{buildroot} +%files +%defattr(-,root,root) +%{_sbindir}/message-switch +%{_sysconfdir}/init.d/message-switch + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog From fb4adc72e2c24166dcd672e5d41410adaf16d166 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 17:44:19 +0000 Subject: [PATCH 0031/1125] Add chkconfig %post and %preun to message_switch --- SPECS/message-switch.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 5119c625..475f0c8a 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -9,6 +9,10 @@ Source0: message-switch-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts + # "ocamlfind" # "cohttp" {= "0.9.7"} # "rpc" @@ -50,6 +54,15 @@ rm -rf %{buildroot} %{_sbindir}/message-switch %{_sysconfdir}/init.d/message-switch +%post +/sbin/chkconfig --add message-switch + +%preun +if [$1 -eq 0 ]; then + /sbin/service message-switch stop > /dev/null 2>&1 + /sbin/chkconfig --del message-switch +fi + %package devel Summary: Development files for %{name} Group: Development/Other From e5ee1ee5c273f622f5acb515feb0156a06613e91 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 20:15:43 +0000 Subject: [PATCH 0032/1125] Turn the service on by default, update to 0.9.1 --- SOURCES/message-switch-init | 4 ++-- SPECS/message-switch.spec | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SOURCES/message-switch-init b/SOURCES/message-switch-init index 86869162..27aa0045 100755 --- a/SOURCES/message-switch-init +++ b/SOURCES/message-switch-init @@ -25,7 +25,7 @@ RETVAL=0 PIDFILE=/var/run/message-switch.pid prog=message-switch -exec=/sbin/message-switch +exec=/usr/sbin/message-switch lockfile=/var/lock/subsys/$prog # Source config @@ -39,7 +39,7 @@ start() { umask 077 echo -n $"Starting message switch: " - daemon --pidfile="$PIDFILE" $exec -i "$PIDFILE" $MESSAGE_SWITCH_OPTIONS + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $MESSAGE_SWITCH_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 475f0c8a..2c266fb9 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,11 +1,11 @@ Name: message-switch -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.0.tar.gz -Source0: message-switch-0.9.0.tar.gz +URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.1.tar.gz +Source0: message-switch-0.9.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib @@ -58,7 +58,7 @@ rm -rf %{buildroot} /sbin/chkconfig --add message-switch %preun -if [$1 -eq 0 ]; then +if [ $1 -eq 0 ]; then /sbin/service message-switch stop > /dev/null 2>&1 /sbin/chkconfig --del message-switch fi From 70f4bfaefc92b3b30e76cfb16ddd43e1e513a591 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 20:41:06 +0000 Subject: [PATCH 0033/1125] Add xenops-cli --- SPECS/xenops-cli.spec | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 SPECS/xenops-cli.spec diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec new file mode 100644 index 00000000..55378c56 --- /dev/null +++ b/SPECS/xenops-cli.spec @@ -0,0 +1,38 @@ +Name: xenops-cli +Version: 0.9.0 +Release: 0 +Summary: CLI for xenopsd, the xapi toolstack domain manager +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz +Source0: xenops-cli-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Command-line interface for xenopsd, the xapi toolstack domain manager. + +%prep +%setup -q -n xenops-cli-xenops-cli-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install main.native %{buildroot}/%{_sbindir}/xenops-cli + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/xenops-cli + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 223326c76417e3a9a45b3091c739906acd5e858c Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 20:52:55 +0000 Subject: [PATCH 0034/1125] Add sm-cli --- SPECS/sm-cli.spec | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 SPECS/sm-cli.spec diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec new file mode 100644 index 00000000..a667d665 --- /dev/null +++ b/SPECS/sm-cli.spec @@ -0,0 +1,38 @@ +Name: sm-cli +Version: 0.9.0 +Release: 0 +Summary: CLI for xapi toolstack storage managers. +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz +Source0: sm-cli-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Command-line interface for xapi toolstack storage managers. + +%prep +%setup -q -n sm-cli-sm-cli-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install dist/build/sm-cli/sm-cli %{buildroot}/%{_sbindir}/sm-cli + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/sm-cli + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From f646c8abb0773e70f4d0c433f60fa393ec4c2e8b Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 30 May 2013 21:10:01 +0000 Subject: [PATCH 0035/1125] Add ffs --- SOURCES/ffs-init | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ SPECS/ffs.spec | 50 +++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100755 SOURCES/ffs-init create mode 100644 SPECS/ffs.spec diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init new file mode 100755 index 00000000..69dce5be --- /dev/null +++ b/SOURCES/ffs-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# ffs Startup script for flat file storage service +# +# chkconfig: 2345 13 88 +# description: Manages VM disks stored in locally-mounted filesystems. +### BEGIN INIT INFO +# Provides: ffs +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Flat file storage service +# Description: Manages VM disks stored in locally-mounted filesystems. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/ffs.pid + +prog=ffs +exec=/usr/sbin/ffs +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting ffs: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down ffs: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec new file mode 100644 index 00000000..96042216 --- /dev/null +++ b/SPECS/ffs.spec @@ -0,0 +1,50 @@ +Name: ffs +Version: 0.9.0 +Release: 0 +Summary: Simple flat file storage manager for the xapi toolstack +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz +Source0: ffs-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Simple flat file storage manager for the xapi toolstack. + +%prep +%setup -q -n ffs-ffs-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install dist/build/ffs/ffs %{buildroot}/%{_sbindir}/ffs +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/ffs +%{_sysconfdir}/init.d/ffs + +%post +/sbin/chkconfig --add ffs + +%preun +if [ $1 -eq 0 ]; then + /sbin/service ffs stop > /dev/null 2>&1 + /sbin/chkconfig --del ffs +fi + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From 7184471de33893ac1e45b1d237abc2878373fc18 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 10:13:12 +0000 Subject: [PATCH 0036/1125] Add xapi-libvirt-storage --- SOURCES/xapi-libvirt-storage-init | 90 +++++++++++++++++++++++++++++++ SPECS/xapi-libvirt-storage.spec | 50 +++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100755 SOURCES/xapi-libvirt-storage-init create mode 100644 SPECS/xapi-libvirt-storage.spec diff --git a/SOURCES/xapi-libvirt-storage-init b/SOURCES/xapi-libvirt-storage-init new file mode 100755 index 00000000..9c5f7fa1 --- /dev/null +++ b/SOURCES/xapi-libvirt-storage-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xapi-libvirt-storage Startup script for xapi libvirt storage service +# +# chkconfig: 2345 13 88 +# description: Manages VM disks stored in libvirt storage pools +### BEGIN INIT INFO +# Provides: xapi-libvirt-storage +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: xapi libvirt storage service +# Description: Manages VM disks stored in libvirt storage pools +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xapi-libvirt-storage.pid + +prog=xapi-libvirt-storage +exec=/usr/sbin/xapi-libvirt-storage +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xapi-libvirt-storage: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xapi-libvirt-storage: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec new file mode 100644 index 00000000..1923fc3e --- /dev/null +++ b/SPECS/xapi-libvirt-storage.spec @@ -0,0 +1,50 @@ +Name: xapi-libvirt-storage +Version: 0.9.0 +Release: 0 +Summary: Allows the manipulation of libvirt storage pools and volumes via xapi +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz +Source0: xapi-libvirt-storage-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Allows the manipulation of libvirt storage pools and volumes via xapi. + +%prep +%setup -q -n xapi-libvirt-storage-xapi-libvirt-storage-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install dist/build/sm-libvirt/sm-libvirt %{buildroot}/%{_sbindir}/xapi-libvirt-storage +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/xapi-libvirt-storage +%{_sysconfdir}/init.d/xapi-libvirt-storage + +%post +/sbin/chkconfig --add xapi-libvirt-storage + +%preun +if [ $1 -eq 0 ]; then + /sbin/service xapi-libvirt-storage stop > /dev/null 2>&1 + /sbin/chkconfig --del xapi-libvirt-storage +fi + +%changelog +* Fri May 31 2013 David Scott +- Initial package + From 847579f9b1e2e67dd11d260e360ebdb6ebab443f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 12:19:35 +0000 Subject: [PATCH 0037/1125] xapi-libvirt-storage-init: minor typo --- SOURCES/xapi-libvirt-storage-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xapi-libvirt-storage-init b/SOURCES/xapi-libvirt-storage-init index 9c5f7fa1..08382b55 100755 --- a/SOURCES/xapi-libvirt-storage-init +++ b/SOURCES/xapi-libvirt-storage-init @@ -37,7 +37,7 @@ start() { umask 077 echo -n $"Starting xapi-libvirt-storage: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_LIBVIRT_STORAGE_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From f7544776b8a9aba2e1324a133c4570dd399fbbb8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 12:19:58 +0000 Subject: [PATCH 0038/1125] Add forkexec --- SOURCES/forkexecd-init | 90 ++++++++++++++++++++++++++++++++++++++++++ SPECS/forkexecd.spec | 73 ++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100755 SOURCES/forkexecd-init create mode 100644 SPECS/forkexecd.spec diff --git a/SOURCES/forkexecd-init b/SOURCES/forkexecd-init new file mode 100755 index 00000000..7fc87eb5 --- /dev/null +++ b/SOURCES/forkexecd-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# forkexecd Startup script for process management service +# +# chkconfig: 2345 13 88 +# description: Manages subprocesses independently from a multithreaded program. +### BEGIN INIT INFO +# Provides: forkexecd +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manage subprocesses +# Description: Manage subprocesses independently from a multithreaded program. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/forkexecd.pid + +prog=forkexecd +exec=/usr/sbin/forkexecd +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting forkexecd: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $FORKEXEC_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down forkexecd: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec new file mode 100644 index 00000000..420a6404 --- /dev/null +++ b/SPECS/forkexecd.spec @@ -0,0 +1,73 @@ +Name: forkexec +Version: 0.9.0 +Release: 0 +Summary: A subprocess management service +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz +Source0: forkexecd-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts + +%description +A service which starts and manages subprocesses, avoiding the need to manually +fork() and exec() in a multithreaded program. + +%prep +%setup -q -n forkexecd-forkexecd-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install +mkdir -p %{buildroot}/%{_sbindir} +install fe_main.native %{buildroot}/%{_sbindir}/forkexecd +install fe_cli.native %{buildroot}/%{_sbindir}/forkexecd-cli +mkdir -p %{buildroot}/%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_sbindir}/forkexecd +%{_sbindir}/forkexecd-cli +%{_sysconfdir}/init.d/forkexecd + +%post +/sbin/chkconfig --add forkexecd + +%preun +if [ $1 -eq 0 ]; then + /sbin/service forkexecd stop > /dev/null 2>&1 + /sbin/chkconfig --del forkexecd +fi + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/forkexec/* + +%changelog +* Fri May 31 2013 David Scott +- Initial package + From ac082961c993b66c50475a1497bd5c41dfaeb46f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 14:25:06 +0000 Subject: [PATCH 0039/1125] fetch.py: fetches any missing source tarballs into SOURCES/ --- .gitignore | 2 ++ fetch.py | 40 ++++++++++++++++++++++++++++++++++++++++ sources.csv | 28 ++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100755 fetch.py create mode 100644 sources.csv diff --git a/.gitignore b/.gitignore index a187a7a0..7fad6320 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ *.cmxs *.cmxa *.swp +SOURCES/*.tar.gz +SOURCES/*.tbz diff --git a/fetch.py b/fetch.py new file mode 100755 index 00000000..8b1a6fd3 --- /dev/null +++ b/fetch.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +import os.path, sys +from subprocess import call + +SOURCES="./SOURCES" + +number_skipped = 0 +number_fetched = 0 + +def fetch(url, override): + global number_skipped, number_fetched + final_name = url.split("/")[-1] + if override <> "": + final_name = override + final_path = os.path.join(SOURCES, final_name) + if os.path.exists(final_path): + number_skipped = number_skipped + 1 + else: + print "fetching %s -> %s" % (url, final_path) + call(["curl", "-L", "-o", final_path, url]) + number_fetched = number_fetched + 1 + +if __name__ == "__main__": + if not(os.path.exists(SOURCES)): + print >>sys.stderr, "SOURCES dir doesn't exist: %s" % SOURCES + exit(1) + f = open("sources.csv", "r") + lines = f.readlines() + f.close() + for line in lines: + line = line.strip() + if line == "": + continue + if line.startswith('#'): + continue + url, override = line.split(",") + fetch(url, override) + print "number of packages skipped: %d" % number_skipped + print "number of packages fetched: %d" % number_fetched diff --git a/sources.csv b/sources.csv new file mode 100644 index 00000000..cb8f5192 --- /dev/null +++ b/sources.csv @@ -0,0 +1,28 @@ +# Download url, filename override (optional) +# +https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, +http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, +https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, +https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, +https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, +https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, +https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, +https://github.com/xen-org/message-switch/archive/message-switch-0.9.0.tar.gz, +https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, +https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, +https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz +http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.tar.gz +https://github.com/xen-org/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz +http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz +https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz +https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz, +http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, +https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, +https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, +http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, +https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, +https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz, +https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.0.tar.gz, +https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, +http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, +http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, From 13af86229f2f580cd91561d154fca3173d9d63a1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:04:29 +0000 Subject: [PATCH 0040/1125] Add fd-send-recv --- SPECS/fd-send-recv.spec | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 SPECS/fd-send-recv.spec diff --git a/SPECS/fd-send-recv.spec b/SPECS/fd-send-recv.spec new file mode 100644 index 00000000..ffd8e9c5 --- /dev/null +++ b/SPECS/fd-send-recv.spec @@ -0,0 +1,49 @@ +Name: ocaml-fd-send-recv +Version: 1.0.1 +Release: 0 +Summary: Bindings to sendmsg/recvmsg for fd passing under Linux +License: LGPL +Group: Development/Other +URL: http://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz +Source0: ocaml-fd-send-recv-1.0.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Bindings to sendmsg/recvmsg for fd passing under Linux. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-fd-send-recv-ocaml-fd-send-recv-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md LICENSE +%{_libdir}/ocaml/fd-send-recv/* + +%changelog +* Fri May 31 2013 David Scott +- Initial package + From 1e23c0850425e4ca55882d732fc5d917090458b0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:05:17 +0000 Subject: [PATCH 0041/1125] Add ocaml-fd-send-recv to sources.csv --- sources.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/sources.csv b/sources.csv index cb8f5192..cfcd7e60 100644 --- a/sources.csv +++ b/sources.csv @@ -26,3 +26,4 @@ https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.0.tar.gz, https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, +https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, From 7ae361412ebcde7b88f4949b1caaa4322bdc854d Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:17:11 +0000 Subject: [PATCH 0042/1125] Add cppo --- SPECS/cppo.spec | 38 ++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 39 insertions(+) create mode 100644 SPECS/cppo.spec diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec new file mode 100644 index 00000000..4f8d3794 --- /dev/null +++ b/SPECS/cppo.spec @@ -0,0 +1,38 @@ +Name: cppo +Version: 0.9.3 +Release: 0 +Summary: Equivalent of the C preprocessor for OCaml +License: BSD3 +Group: Development/Other +URL: http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz +Source0: cppo-0.9.3.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Equivalent of the C preprocessor for OCaml. + +%prep +%setup -q -n cppo-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +make install BINDIR=%{buildroot}/%{_bindir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE README +%{_bindir}/cppo + +%changelog +* Fri May 31 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index cfcd7e60..4df4a5e0 100644 --- a/sources.csv +++ b/sources.csv @@ -27,3 +27,4 @@ https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, +http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, From 872f8e830dde67c856275bacf126f7d5f8d1737b Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:26:02 +0000 Subject: [PATCH 0043/1125] Add deriving-ocsigen --- SPECS/deriving-ocsigen.spec | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 SPECS/deriving-ocsigen.spec diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec new file mode 100644 index 00000000..9b131df0 --- /dev/null +++ b/SPECS/deriving-ocsigen.spec @@ -0,0 +1,49 @@ +Name: deriving-ocsigen +Version: 0.3c +Release: 0 +Summary: Extension to OCaml for deriving functions from type declarations +License: MIT +Group: Development/Other +URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz +Source0: deriving-ocsigen-0.3c.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +# re uri cstruct lwt ounit +Requires: ocaml ocaml-findlib + +%description +Extension to OCaml for deriving functions from type declarations + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n deriving-ocsigen-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc COPYING README CHANGES +%{_libdir}/ocaml/deriving-ocsigen/* + +%changelog +* Fri May 31 2013 David Scott +- Initial package + From 75144e04c018345966e6cf083cf3eaa82770a42a Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:26:34 +0000 Subject: [PATCH 0044/1125] Add deriving-ocsigen to sources.csv --- sources.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/sources.csv b/sources.csv index 4df4a5e0..22834e39 100644 --- a/sources.csv +++ b/sources.csv @@ -28,3 +28,4 @@ http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, +http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, From 76e698b920c89c97af6bba69e5bf3be9a47f0965 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 19:51:11 +0000 Subject: [PATCH 0045/1125] Add optcopt --- SPECS/optcomp.spec | 45 +++++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 46 insertions(+) create mode 100644 SPECS/optcomp.spec diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec new file mode 100644 index 00000000..287d6f65 --- /dev/null +++ b/SPECS/optcomp.spec @@ -0,0 +1,45 @@ +Name: optcomp +Version: 1.4 +Release: 0 +Summary: Optional compilation with cpp-like directives +License: BSD3 +Group: Development/Other +URL: https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz +Source0: optcomp-1.4.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Optional compilation with cpp-like directives. + +%prep +%setup -q -n optcomp-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install +mkdir -p %{buildroot}/%{_bindir} +mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-r %{buildroot}/%{_bindir}/ +mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-o %{buildroot}/%{_bindir}/ + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE README +%{_libdir}/ocaml/optcomp/* +%{_bindir}/optcomp-r +%{_bindir}/optcomp-o + +%changelog +* Fri May 31 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 22834e39..bee43ff3 100644 --- a/sources.csv +++ b/sources.csv @@ -29,3 +29,4 @@ http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, +https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, From 8a3902baa317154d5af1c071440b817199d95aa5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 20:04:03 +0000 Subject: [PATCH 0046/1125] Add easy-format --- SPECS/easy-format.spec | 39 +++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 40 insertions(+) create mode 100644 SPECS/easy-format.spec diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec new file mode 100644 index 00000000..7c6d4b31 --- /dev/null +++ b/SPECS/easy-format.spec @@ -0,0 +1,39 @@ +Name: easy-format +Version: 1.0.1 +Release: 0 +Summary: Indentation made easy +License: BSD3 +Group: Development/Other +URL: http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz +Source0: easy-format-1.0.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Easy_format: indentation made easy. + +%prep +%setup -q -n easy-format-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE README +%{_libdir}/ocaml/easy-format/* + +%changelog +* Fri May 31 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index bee43ff3..a2f214f4 100644 --- a/sources.csv +++ b/sources.csv @@ -30,3 +30,4 @@ https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.t http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, +http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, From d419b47262969a76957155de4214651a62be8d19 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 20:11:02 +0000 Subject: [PATCH 0047/1125] Add biniou --- SPECS/biniou.spec | 41 +++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 42 insertions(+) create mode 100644 SPECS/biniou.spec diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec new file mode 100644 index 00000000..416cb315 --- /dev/null +++ b/SPECS/biniou.spec @@ -0,0 +1,41 @@ +Name: biniou +Version: 1.0.6 +Release: 0 +Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve +License: BSD3 +Group: Development/Other +URL: http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz +Source0: biniou-1.0.6.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +Requires: ocaml + +%description +Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. + +%prep +%setup -q -n biniou-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_bindir} +make install BINDIR=%{buildroot}/%{_bindir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE README.md +%{_libdir}/ocaml/biniou/* +%{_bindir}/bdump + +%changelog +* Fri May 31 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index a2f214f4..6f430cf3 100644 --- a/sources.csv +++ b/sources.csv @@ -31,3 +31,4 @@ http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, +http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, From 400584aa75e6dfeb00b69485211bc4b26924637e Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 31 May 2013 20:17:19 +0000 Subject: [PATCH 0048/1125] Add ocplib-endian --- SPECS/ocplib-endian.spec | 55 ++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 56 insertions(+) create mode 100644 SPECS/ocplib-endian.spec diff --git a/SPECS/ocplib-endian.spec b/SPECS/ocplib-endian.spec new file mode 100644 index 00000000..07f3384f --- /dev/null +++ b/SPECS/ocplib-endian.spec @@ -0,0 +1,55 @@ +Name: ocaml-ocplib-endian +Version: 0.3 +Release: 0 +Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. +License: LGPL +Group: Development/Other +URL: https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz +Source0: ocplib-endian-0.3.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +Optimised functions to read and write int16/32/64 from strings and +bigarrays, based on new primitives added in version 4.01. + +The library implements two modules: +- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; +- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; + + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocplib-endian-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc COPYING.txt README.md +%{_libdir}/ocaml/ocplib-endian/* + +%changelog +* Fri May 31 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 6f430cf3..88c2acc5 100644 --- a/sources.csv +++ b/sources.csv @@ -32,3 +32,4 @@ http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, +https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz From f1a9f9b185bdb67479f90ad21edf205585bd6244 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 12:03:26 +0000 Subject: [PATCH 0049/1125] After fetching the source tarballs, generate the SRPMs --- fetch.py | 16 ++++++++++--- sources.csv | 68 ++++++++++++++++++++++++++--------------------------- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/fetch.py b/fetch.py index 8b1a6fd3..b2e0dd2f 100755 --- a/fetch.py +++ b/fetch.py @@ -4,12 +4,20 @@ from subprocess import call SOURCES="./SOURCES" +SPECS="./SPECS" number_skipped = 0 number_fetched = 0 -def fetch(url, override): +def fetch(spec, url, override): global number_skipped, number_fetched + + # check the .spec file exists + spec_path = os.path.join(SPECS, spec) + if not(os.path.exists(spec_path)): + print >>sys.stderr, "%s doesn't exist" % spec_path + exit(1) + final_name = url.split("/")[-1] if override <> "": final_name = override @@ -20,6 +28,8 @@ def fetch(url, override): print "fetching %s -> %s" % (url, final_path) call(["curl", "-L", "-o", final_path, url]) number_fetched = number_fetched + 1 + print "generating SRPM from %s" % spec_path + call(["rpmbuild", "-bs", spec_path]) if __name__ == "__main__": if not(os.path.exists(SOURCES)): @@ -34,7 +44,7 @@ def fetch(url, override): continue if line.startswith('#'): continue - url, override = line.split(",") - fetch(url, override) + spec, url, override = line.split(",") + fetch(spec, url, override) print "number of packages skipped: %d" % number_skipped print "number of packages fetched: %d" % number_fetched diff --git a/sources.csv b/sources.csv index 88c2acc5..870de322 100644 --- a/sources.csv +++ b/sources.csv @@ -1,35 +1,35 @@ -# Download url, filename override (optional) +# spec file, Download url, filename override (optional) # -https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, -http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, -https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, -https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, -https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, -https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -https://github.com/xen-org/message-switch/archive/message-switch-0.9.0.tar.gz, -https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, -https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, -https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz -http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.tar.gz -https://github.com/xen-org/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz -http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz -https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz -https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz, -http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, -https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, -https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, -http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, -https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, -https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz, -https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.0.tar.gz, -https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, -http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, -http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, -https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, -http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, -http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, -https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, -http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, -http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, -https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz +cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, +cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, +cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, +cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, +forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, +libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.1.tar.gz, +nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, +netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, +obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz +oclock.spec,http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.tar.gz +qmp.spec,https://github.com/xen-org/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz +re.spec,http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz +rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz +sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz, +syslog.spec,http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, +tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, +uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, +uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, +xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz, +xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.2.tar.gz, +xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, +xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, +yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, +fd-send-recv.spec,https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, +cppo.spec,http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, +deriving-ocsigen.spec,http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, +optcomp.spec,https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, +easy-format.spec,http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, +biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, +ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz From dcdbe24a5278a15bc33c5aca65bf087f43cc6ea7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 12:57:06 +0000 Subject: [PATCH 0050/1125] Start using mock to build RPMS, correct SPECS for biniou, easy-format Still working on yojson and qmp. --- SPECS/biniou.spec | 4 +-- SPECS/easy-format.spec | 4 +-- SPECS/qmp.spec | 2 +- SPECS/yojson.spec | 5 ++- mock.md | 22 ++++++++++++ xenserver.cfg | 77 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 mock.md create mode 100644 xenserver.cfg diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 416cb315..597a128b 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz Source0: biniou-1.0.6.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml -Requires: ocaml +BuildRequires: ocaml ocaml-findlib easy-format +Requires: ocaml ocaml-findlib %description Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 7c6d4b31..783ba962 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz Source0: easy-format-1.0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml -Requires: ocaml +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib %description Easy_format: indentation made easy. diff --git a/SPECS/qmp.spec b/SPECS/qmp.spec index bc45fef3..ac704cbb 100644 --- a/SPECS/qmp.spec +++ b/SPECS/qmp.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/ocaml-qmp Source0: ocaml-qmp-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-obuild Requires: ocaml ocaml-findlib %description diff --git a/SPECS/yojson.spec b/SPECS/yojson.spec index e613d5b4..e0b775eb 100644 --- a/SPECS/yojson.spec +++ b/SPECS/yojson.spec @@ -7,8 +7,7 @@ Group: Development/Other URL: http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz Source0: yojson-1.1.6.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# cpp easy-format biniou +BuildRequires: ocaml ocaml-findlib cppo easy-format biniou Requires: ocaml ocaml-findlib %description @@ -33,7 +32,7 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install DESTDIR=${buildroot} +make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} diff --git a/mock.md b/mock.md new file mode 100644 index 00000000..6469fa81 --- /dev/null +++ b/mock.md @@ -0,0 +1,22 @@ +Using mock to build these RPMs: +============================== + +(tidy this up later) + +useradd djs -G mock +passwd djs + +cp xenserver.cfg /etc/mock/ + +su - djs + +mock -r xenserver --init +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-obuild-0.0.2-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/cppo-0.9.3-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/easy-format-1.0.1-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/biniou-1.0.6-0.src.rpm +createrepo RPMS/x86_64 + diff --git a/xenserver.cfg b/xenserver.cfg new file mode 100644 index 00000000..a91635fa --- /dev/null +++ b/xenserver.cfg @@ -0,0 +1,77 @@ +config_opts['root'] = 'epel-6-x86_64' +config_opts['target_arch'] = 'x86_64' +config_opts['legal_host_arches'] = ('x86_64',) +config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build' +config_opts['dist'] = 'el6' # only useful for --resultdir variable subst + +config_opts['yum.conf'] = """ +[main] +cachedir=/var/cache/yum +debuglevel=1 +reposdir=/dev/null +logfile=/var/log/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 +syslog_ident=mock +syslog_device= + +# repos +[base] +name=BaseOS +enabled=1 +mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os +failovermethod=priority + +[updates] +name=updates +enabled=1 +mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates +failovermethod=priority + +[epel] +name=epel +mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64 +failovermethod=priority + +[testing] +name=epel-testing +enabled=0 +mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel6&arch=x86_64 +failovermethod=priority + +[local] +name=local +baseurl=http://kojipkgs.fedoraproject.org/repos/dist-6E-epel-build/latest/x86_64/ +cost=2000 +enabled=0 + +[epel-debug] +name=epel-debug +mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-6&arch=x86_64 +failovermethod=priority +enabled=0 + +[xen-c6] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 + +[mock] +name=Mock output +baseurl=file:///home/djs/rpmbuild/RPMS/x86_64 +gpgcheck=0 +priority=1 +enabled=1 + +""" From 53a26e370d19621cae5f0a648a06a87338cdf0d7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:10:02 +0000 Subject: [PATCH 0051/1125] Fix yojson --- SPECS/yojson.spec | 4 +++- mock.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/yojson.spec b/SPECS/yojson.spec index e0b775eb..e1605916 100644 --- a/SPECS/yojson.spec +++ b/SPECS/yojson.spec @@ -32,7 +32,8 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}/%{_bindir} +make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} %clean rm -rf %{buildroot} @@ -41,6 +42,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md LICENSE %{_libdir}/ocaml/yojson/* +%{_bindir}/ydump %changelog * Thu May 30 2013 David Scott diff --git a/mock.md b/mock.md index 6469fa81..3fa8daa6 100644 --- a/mock.md +++ b/mock.md @@ -19,4 +19,6 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/easy-format-1.0.1-0. createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/biniou-1.0.6-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-yojson-1.1.6-0.src.rpm +createrepo RPMS/x86_64 From 5ccb765884c02b14c8b11cbf9f523d95c43db621 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:20:11 +0000 Subject: [PATCH 0052/1125] yojson-devel doesn't require yojson --- SPECS/yojson.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/yojson.spec b/SPECS/yojson.spec index e1605916..69a6f9e4 100644 --- a/SPECS/yojson.spec +++ b/SPECS/yojson.spec @@ -16,7 +16,6 @@ A JSON parser and printer for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 571435e0461f28ba315764b00822a688aaaf22ba Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:28:04 +0000 Subject: [PATCH 0053/1125] Fix cmdliner --- SPECS/cmdliner.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index d612c60d..88985bc4 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://erratique.ch/software/cmdliner Source0: cmdliner-0.9.3.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description @@ -21,7 +21,6 @@ man page generation. It supports programs with single or multiple commands %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 39fd85df5f58c67b5fda5c130c9544e2259e045d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:28:18 +0000 Subject: [PATCH 0054/1125] Add cmdliner to build sequence --- mock.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mock.md b/mock.md index 3fa8daa6..ead84ed9 100644 --- a/mock.md +++ b/mock.md @@ -21,4 +21,6 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/biniou-1.0.6-0.src.r createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-yojson-1.1.6-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/cmdliner-0.9.3-0.src.rpm +createrepo RPMS/x86_64 From 07e464b61d0b7c91ff44cd80dec467244432e0cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:28:30 +0000 Subject: [PATCH 0055/1125] Updates to QMP --- SPECS/qmp.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPECS/qmp.spec b/SPECS/qmp.spec index ac704cbb..cc475c62 100644 --- a/SPECS/qmp.spec +++ b/SPECS/qmp.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/ocaml-qmp Source0: ocaml-qmp-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-obuild +BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel Requires: ocaml ocaml-findlib %description @@ -18,7 +18,6 @@ process. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From eb52a080c861a93e5229b5bf97270e13c6840467 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:45:15 +0000 Subject: [PATCH 0056/1125] Add ounit --- SPECS/ounit.spec | 139 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 SPECS/ounit.spec diff --git a/SPECS/ounit.spec b/SPECS/ounit.spec new file mode 100644 index 00000000..57d7a288 --- /dev/null +++ b/SPECS/ounit.spec @@ -0,0 +1,139 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-ounit +Version: 1.1.2 +Release: 3%{?dist} +Summary: Unit test framework for OCaml + +Group: Development/Libraries +License: MIT +URL: http://ounit.forge.ocamlcore.org/ +Source0: https://forge.ocamlcore.org/frs/download.php/495/ounit-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-ocamldoc + +%define _use_internal_dependency_generator 0 + + +%description +OUnit is a unit test framework for OCaml. It allows one to easily +create unit-tests for OCaml code. It is based on HUnit, a unit testing +framework for Haskell. It is similar to JUnit, and other xUnit testing +frameworks. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n ounit-%{version} +sh ./configure --destdir $RPM_BUILD_ROOT + + +%build +make all +make doc + + +%check +make test + + +%install +rm -rf $RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +make install + +# Remove this, reinstall it properly with a %%doc rule below. +rm -rf $RPM_BUILD_ROOT/usr/local/share/doc + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt +%{_libdir}/ocaml/oUnit +%if %opt +%exclude %{_libdir}/ocaml/oUnit/*.a +%exclude %{_libdir}/ocaml/oUnit/*.cmxa +%endif +%exclude %{_libdir}/ocaml/oUnit/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt README.txt +%doc _build/src/api-ounit.docdir/* +%if %opt +%{_libdir}/ocaml/oUnit/*.a +%{_libdir}/ocaml/oUnit/*.cmxa +%endif +%{_libdir}/ocaml/oUnit/*.mli + + +%changelog +* Fri Sep 30 2011 Mike McClurg - 1.1.0-3 +- Repackaged for XenSource build system + +* Tue Feb 08 2011 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jan 5 2011 Richard W.M. Jones - 1.1.0-2 +- New upstream version 1.1.0. +- Project has moved to new upstream URL and Source0. +- Rebuild for OCaml 3.12.0. +- New build system: + + doesn't need 'make allopt' + + DESTDIR logic changed (see OASIS bug 852) + + docdir moved +- LICENSE and README files renamed. +- BR camlp4. + +* Wed Dec 30 2009 Richard W.M. Jones - 1.0.3-7 +- Rebuild for OCaml 3.11.2. + +* Sat Jul 25 2009 Fedora Release Engineering - 1.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 23 2009 Richard W.M. Jones - 1.0.3-5 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Wed Feb 25 2009 Fedora Release Engineering - 1.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Nov 26 2008 Richard W.M. Jones - 1.0.3-3 +- Rebuild for OCaml 3.11.0+rc1. + +* Wed Nov 19 2008 Richard W.M. Jones - 1.0.3-2 +- Rebuild for OCaml 3.11.0 + +* Sun Aug 31 2008 Richard W.M. Jones - 1.0.3-1 +- New upstream version 1.0.3. + +* Mon May 12 2008 Richard W.M. Jones - 1.0.2-2 +- License is MIT. + +* Sat May 3 2008 Richard W.M. Jones - 1.0.2-1 +- Initial RPM release. From cc3e4ad3c0ea1804a5b530069105e263de844cee Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:48:07 +0000 Subject: [PATCH 0057/1125] Add ounit to sources.csv --- sources.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/sources.csv b/sources.csv index 870de322..4d518e43 100644 --- a/sources.csv +++ b/sources.csv @@ -33,3 +33,4 @@ optcomp.spec,https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.g easy-format.spec,http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz +ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, From 1751655d2b63671158f47e1b7274c679e52610c7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:52:00 +0000 Subject: [PATCH 0058/1125] Fix ounit --- SPECS/ounit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ounit.spec b/SPECS/ounit.spec index 57d7a288..2d5d9530 100644 --- a/SPECS/ounit.spec +++ b/SPECS/ounit.spec @@ -15,7 +15,7 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4 ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc %define _use_internal_dependency_generator 0 From 38378ee8898d25473f503c72846265b61cd5bf28 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 13:54:09 +0000 Subject: [PATCH 0059/1125] build qmp --- SPECS/qmp.spec | 2 +- mock.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/qmp.spec b/SPECS/qmp.spec index cc475c62..aec72f1a 100644 --- a/SPECS/qmp.spec +++ b/SPECS/qmp.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/ocaml-qmp Source0: ocaml-qmp-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel +BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib %description diff --git a/mock.md b/mock.md index ead84ed9..0c04de74 100644 --- a/mock.md +++ b/mock.md @@ -23,4 +23,8 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-yojson-1.1.6-0 createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/cmdliner-0.9.3-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ounit-1.1.2-3.el6.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-qmp-0.9.0-0.src.rpm +createrepo RPMS/x86_64 From c92b46eff845899ab0d0ade55b512fdfa02941ed Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:01:48 +0000 Subject: [PATCH 0060/1125] Build optcomp --- SPECS/optcomp.spec | 2 +- mock.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 287d6f65..c993ec63 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz Source0: optcomp-1.4.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml %description diff --git a/mock.md b/mock.md index 0c04de74..55407abd 100644 --- a/mock.md +++ b/mock.md @@ -27,4 +27,6 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ounit-1.1.2-3. createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-qmp-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/optcomp-1.4-0.src.rpm +createrepo RPMS/x86_64 From 416f97771d606519f96a4c002d6e7582ab0eb179 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:04:20 +0000 Subject: [PATCH 0061/1125] ocplib-endian now builds --- SPECS/ocplib-endian.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocplib-endian.spec b/SPECS/ocplib-endian.spec index 07f3384f..05762d07 100644 --- a/SPECS/ocplib-endian.spec +++ b/SPECS/ocplib-endian.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz Source0: ocplib-endian-0.3.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib optcomp ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml ocaml-findlib %description From 2e61f1da3cfab1d3f6b491f73c2020dfc303e5c2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:22:29 +0000 Subject: [PATCH 0062/1125] ocplib-endian-devel requires optcomp (according to the META file) --- SPECS/ocplib-endian.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocplib-endian.spec b/SPECS/ocplib-endian.spec index 05762d07..762f9ca6 100644 --- a/SPECS/ocplib-endian.spec +++ b/SPECS/ocplib-endian.spec @@ -22,7 +22,7 @@ The library implements two modules: %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +Requires: optcomp %description devel The %{name}-devel package contains libraries and signature files for From f045193a6270384b10359abbe2e426146ea4b7e3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:22:58 +0000 Subject: [PATCH 0063/1125] Build cstruct --- SPECS/cstruct.spec | 6 +++--- mock.md | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SPECS/cstruct.spec b/SPECS/cstruct.spec index caeb48f5..50ce2314 100644 --- a/SPECS/cstruct.spec +++ b/SPECS/cstruct.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz Source0: ocaml-cstruct-0.7.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml ocaml-findlib %description @@ -16,7 +16,6 @@ Read and write low-level C-style structures in OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -33,7 +32,8 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install +export OCAMLFIND_LDCONF=ignore +ocaml setup.ml -install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} diff --git a/mock.md b/mock.md index 55407abd..e2ba2faf 100644 --- a/mock.md +++ b/mock.md @@ -29,4 +29,8 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-qmp-0.9.0-0.sr createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/optcomp-1.4-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ocplib-endian-0.3-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cstruct-0.7.1-0.src.rpm +createrepo RPMS/x86_64 From 37de9daaeb86feb5b11919412b586b4f6a1ad208 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:26:49 +0000 Subject: [PATCH 0064/1125] Build cdrom --- SPECS/cdrom.spec | 4 ++-- mock.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SPECS/cdrom.spec b/SPECS/cdrom.spec index d1257358..0f639864 100644 --- a/SPECS/cdrom.spec +++ b/SPECS/cdrom.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/ocaml Source0: https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-obuild Requires: ocaml ocaml-findlib %description @@ -17,7 +17,6 @@ inside) to be queried under Linux. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -35,6 +34,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean diff --git a/mock.md b/mock.md index e2ba2faf..8cb9314a 100644 --- a/mock.md +++ b/mock.md @@ -33,4 +33,5 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ocplib-endian- createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cstruct-0.7.1-0.src.rpm createrepo RPMS/x86_64 - +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cdrom-0.9.1-0.src.rpm +createrepo RPMS/x86_64 From 4e0e8bef614231bca9b631c15f9ef1a81d5680c0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:29:41 +0000 Subject: [PATCH 0065/1125] Build re --- SPECS/re.spec | 3 +-- mock.md | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/re.spec b/SPECS/re.spec index 2f944efb..3ef9b196 100644 --- a/SPECS/re.spec +++ b/SPECS/re.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1 Source0: ocaml-re-1.2.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description @@ -16,7 +16,6 @@ A regular expression library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/mock.md b/mock.md index 8cb9314a..18391542 100644 --- a/mock.md +++ b/mock.md @@ -35,3 +35,5 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cstruct-0.7.1- createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cdrom-0.9.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-re-1.2.1-0.src.rpm +createrepo RPMS/x86_64 From 5d6c1c2d7e49f8b369719bfe4496e9a880efe97a Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:32:22 +0000 Subject: [PATCH 0066/1125] Build uri --- SPECS/uri.spec | 3 +-- mock.md | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/uri.spec b/SPECS/uri.spec index d8e104f4..b2b1c384 100644 --- a/SPECS/uri.spec +++ b/SPECS/uri.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz Source0: ocaml-uri-1.3.8.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-re-devel Requires: ocaml ocaml-findlib %description @@ -16,7 +16,6 @@ A URI library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/mock.md b/mock.md index 18391542..d812bdab 100644 --- a/mock.md +++ b/mock.md @@ -37,3 +37,5 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cdrom-0.9.1-0. createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-re-1.2.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-uri-1.3.8-0.src.rpm +createrepo RPMS/x86_64 From d687dca226b755961af077e076fac0511c553bfc Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:36:35 +0000 Subject: [PATCH 0067/1125] Add lwt 2.4.3 --- SPECS/lwt.spec | 146 +++++++++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 147 insertions(+) create mode 100644 SPECS/lwt.spec diff --git a/SPECS/lwt.spec b/SPECS/lwt.spec new file mode 100644 index 00000000..9f2f5afe --- /dev/null +++ b/SPECS/lwt.spec @@ -0,0 +1,146 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-lwt +Version: 2.4.3 +Release: 0%{?dist} +Summary: OCaml lightweight thread library + +Group: Development/Libraries +License: LGPLv2+ with exceptions +URL: http://ocsigen.org/lwt +Source0: http://ocsigen.org/download/lwt-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +# Location of libev headers on Fedora is in /usr/include/libev/ev.h +# so we need to patch the source accordingly. +#Patch0: lwt-2.2.0-libev.patch + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-react >= 0.9.0 +BuildRequires: libev-devel + +%description +Lwt is a lightweight thread library for Objective Caml. This library +is part of the Ocsigen project. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n lwt-%{version} + +#%patch0 -p1 + +mv README README.old +iconv -f iso-8859-1 -t utf-8 < README.old > README + + +%build +export C_INCLUDE_PATH=/usr/include/libev +./configure --enable-react --enable-text --enable-toplevel +make + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +make install +mkdir -p $RPM_BUILD_ROOT%{_bindir} +install _build/src/top/lwt-toplevel $RPM_BUILD_ROOT%{_bindir}/lwt-toplevel + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE COPYING +%{_libdir}/ocaml/lwt +%if %opt +%exclude %{_libdir}/ocaml/lwt/*.a +%exclude %{_libdir}/ocaml/lwt/*.cmxa +#%exclude %{_libdir}/ocaml/lwt/*.cmx +%endif +%exclude %{_libdir}/ocaml/lwt/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner +%{_bindir}/lwt-toplevel + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE COPYING CHANGES README +%if %opt +%{_libdir}/ocaml/lwt/*.a +%{_libdir}/ocaml/lwt/*.cmxa +#%{_libdir}/ocaml/lwt/*.cmx +%endif +%{_libdir}/ocaml/lwt/*.mli + + +%changelog +* Wed Nov 2 2011 David Scott - 2.2.0-2 +- Rebuilt for XCP + +* Tue Feb 08 2011 Fedora Release Engineering - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 6 2011 Richard W.M. Jones - 2.2.0-1 +- New upstream version 2.2.0. +- Rebuild for OCaml 3.12.0. +- Add BR libev-devel. +- Patch -> +- *.cmx files are no longer being distributed. +- No VERSION file. + +* Wed Dec 30 2009 Richard W.M. Jones - 2.0.0-0.3.rc1 +- Rebuild for OCaml 3.11.2. + +* Mon Oct 12 2009 Richard W.M. Jones - 2.0.0-0.2.rc1.fc13 +- ocaml-react is now in Fedora, so build this package. +- Missing BR on camlp4. + +* Thu Oct 8 2009 Richard W.M. Jones - 2.0.0-0.rc1.fc13 +- New upstream version 2.0.0+rc1. +- NB. This cannot be built as it depends on new package ocaml-react + (RHBZ#527971). + +* Sat Jul 25 2009 Fedora Release Engineering - 1.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 23 2009 Richard W.M. Jones - 1.1.0-5 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Wed Feb 25 2009 Fedora Release Engineering - 1.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Dec 4 2008 Richard W.M. Jones - 1.1.0-3 +- Rebuild. + +* Wed Sep 3 2008 Richard W.M. Jones - 1.1.0-2 +- Rebuild with higher EVR than F-9 branch. + +* Mon Sep 1 2008 Richard W.M. Jones - 1.1.0-1 +- Initial RPM release. diff --git a/sources.csv b/sources.csv index 4d518e43..025b090d 100644 --- a/sources.csv +++ b/sources.csv @@ -34,3 +34,4 @@ easy-format.spec,http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.g biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, +lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, From e16adf4dbb63846449cd8a4a25b0be77de740b40 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:39:31 +0000 Subject: [PATCH 0068/1125] Add react 0.9.4 --- SOURCES/react-LICENSE | 32 ++++++++++++ SPECS/react.spec | 110 ++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 3 files changed, 143 insertions(+) create mode 100644 SOURCES/react-LICENSE create mode 100644 SPECS/react.spec diff --git a/SOURCES/react-LICENSE b/SOURCES/react-LICENSE new file mode 100644 index 00000000..e46e4148 --- /dev/null +++ b/SOURCES/react-LICENSE @@ -0,0 +1,32 @@ +(*---------------------------------------------------------------------------- + Copyright (c) 2009, Daniel C. Bünzli + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + 3. Neither the name of the Daniel C. Bünzli nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ----------------------------------------------------------------------------*) diff --git a/SPECS/react.spec b/SPECS/react.spec new file mode 100644 index 00000000..d23711e8 --- /dev/null +++ b/SPECS/react.spec @@ -0,0 +1,110 @@ +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} + +Name: ocaml-react +Version: 0.9.4 +Release: 0%{?dist} +Summary: OCaml framework for Functional Reactive Programming (FRP) + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Group: Development/Libraries +License: BSD +URL: http://erratique.ch/software/react + +Source0: http://erratique.ch/software/react/releases/react-%{version}.tbz +Source1: react-LICENSE + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-findlib-devel + +%description +React is an OCaml module for functional reactive programming (FRP). It +provides support to program with time varying values : applicative +events and signals. React doesn't define any primitive event or +signal, this lets the client chooses the concrete timeline. + +React is made of a single, independent, module and distributed under +the new BSD license. + +Given an absolute notion of time Rtime helps you to manage a timeline +and provides time stamp events, delayed events and delayed signals. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n react-%{version} +cp %{SOURCE1} LICENSE +chmod +x build + + +%build +./build + + +%install +rm -rf $RPM_BUILD_ROOT +export INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/react +mkdir -p $INSTALLDIR +./build install + + +%check +%if %opt +./build test.native +./_build/test/test.native +./build clock.native +#./_build/test/clock.native +./build breakout.native +#./_build/test/breakout.native +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{_libdir}/ocaml/react +%if %opt +%exclude %{_libdir}/ocaml/react/*.cmx +%endif +%exclude %{_libdir}/ocaml/react/*.mli +%exclude %{_libdir}/ocaml/react/*.ml + + +%files devel +%defattr(-,root,root,-) +%doc CHANGES README +%if %opt +%{_libdir}/ocaml/react/*.cmx +%endif +%{_libdir}/ocaml/react/*.mli +%{_libdir}/ocaml/react/*.ml + + +%changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 6 2011 Richard W.M. Jones - 0.9.2-1 +- Rebuild for OCaml 3.12.0. + +* Wed Dec 30 2009 Richard W.M. Jones - 0.9.0-3 +- Rebuild for OCaml 3.11.2. + +* Thu Oct 8 2009 Richard W.M. Jones - 0.9.0-2 +- Initial RPM release. +- Use global instead of define (Till Maas). diff --git a/sources.csv b/sources.csv index 025b090d..98ef96cd 100644 --- a/sources.csv +++ b/sources.csv @@ -35,3 +35,4 @@ biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, +react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, From 5330e277fe6841f79788671143de68f06f1358b4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:47:30 +0000 Subject: [PATCH 0069/1125] Fix react build --- SPECS/react.spec | 51 ++++++++++++------------------------------------ mock.md | 2 ++ 2 files changed, 14 insertions(+), 39 deletions(-) diff --git a/SPECS/react.spec b/SPECS/react.spec index d23711e8..769208b2 100644 --- a/SPECS/react.spec +++ b/SPECS/react.spec @@ -17,6 +17,7 @@ Source1: react-LICENSE BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ocamldoc %description React is an OCaml module for functional reactive programming (FRP). It @@ -34,7 +35,6 @@ and provides time stamp events, delayed events and delayed signals. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} %description devel @@ -45,57 +45,30 @@ developing applications that use %{name}. %prep %setup -q -n react-%{version} cp %{SOURCE1} LICENSE -chmod +x build - %build -./build - +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build %install -rm -rf $RPM_BUILD_ROOT -export INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/react -mkdir -p $INSTALLDIR -./build install - - -%check -%if %opt -./build test.native -./_build/test/test.native -./build clock.native -#./_build/test/clock.native -./build breakout.native -#./_build/test/breakout.native -%endif - +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install %clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE -%{_libdir}/ocaml/react -%if %opt -%exclude %{_libdir}/ocaml/react/*.cmx -%endif -%exclude %{_libdir}/ocaml/react/*.mli -%exclude %{_libdir}/ocaml/react/*.ml - +rm -rf %{buildroot} %files devel %defattr(-,root,root,-) %doc CHANGES README -%if %opt -%{_libdir}/ocaml/react/*.cmx -%endif -%{_libdir}/ocaml/react/*.mli -%{_libdir}/ocaml/react/*.ml +%{_libdir}/ocaml/react/* %changelog +* Sat Jun 01 2013 David Scott +- Update for 0.9.4 + * Tue Feb 08 2011 Fedora Release Engineering - 0.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/mock.md b/mock.md index d812bdab..fb287d39 100644 --- a/mock.md +++ b/mock.md @@ -39,3 +39,5 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-re-1.2.1-0.src createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-uri-1.3.8-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-react-0.9.4-0.el6.src.rpm +createrepo RPMS/x86_64 From 6ca16d461507d605520c9d8d89f0ff8975a1b3db Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 14:56:36 +0000 Subject: [PATCH 0070/1125] Build ocaml-text 0.6 --- SPECS/text.spec | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ mock.md | 2 ++ sources.csv | 1 + 3 files changed, 68 insertions(+) create mode 100644 SPECS/text.spec diff --git a/SPECS/text.spec b/SPECS/text.spec new file mode 100644 index 00000000..ff86e7a3 --- /dev/null +++ b/SPECS/text.spec @@ -0,0 +1,65 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-text +Version: 0.6 +Release: 0%{?dist} +Summary: OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. + +Group: Development/Libraries +License: BSD +URL: http://forge.ocamlcore.org/projects/ocaml-text +Source0: http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-ocamldoc + +%define _use_internal_dependency_generator 0 + + +%description +OCaml-Text is a library for dealing with ``text'', i.e. sequence of +unicode characters, in a convenient way. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n ocaml-text-%{version} +ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr + +%build +ocaml setup.ml -build +ocaml setup.ml -doc + +%install +rm -rf $RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +# Remove this, reinstall it properly with a %%doc rule below. +rm -rf $RPM_BUILD_ROOT/usr/local/share/doc + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files devel +%defattr(-,root,root,-) +%doc /usr/share/doc/ocaml-text/* +%{_libdir}/ocaml/text/* +%{_libdir}/ocaml/stublibs/* +%changelog diff --git a/mock.md b/mock.md index fb287d39..c058e8a6 100644 --- a/mock.md +++ b/mock.md @@ -41,3 +41,5 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-uri-1.3.8-0.sr createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-react-0.9.4-0.el6.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-text-0.6-0.el6.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index 98ef96cd..a503d346 100644 --- a/sources.csv +++ b/sources.csv @@ -36,3 +36,4 @@ ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz, ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, +text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, From bd40264f61c84132b3478d31bf1e4f10dd5d1141 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 15:09:00 +0000 Subject: [PATCH 0071/1125] Fix lwt build --- SPECS/lwt.spec | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/SPECS/lwt.spec b/SPECS/lwt.spec index 9f2f5afe..2175aacc 100644 --- a/SPECS/lwt.spec +++ b/SPECS/lwt.spec @@ -19,8 +19,11 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-react >= 0.9.0 +BuildRequires: ocaml-react-devel >= 0.9.0 BuildRequires: libev-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-text-devel +BuildRequires: ocaml-camlp4 ocaml-camlp4-devel %description Lwt is a lightweight thread library for Objective Caml. This library @@ -30,7 +33,6 @@ is part of the Ocsigen project. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} %description devel @@ -49,7 +51,7 @@ iconv -f iso-8859-1 -t utf-8 < README.old > README %build export C_INCLUDE_PATH=/usr/include/libev -./configure --enable-react --enable-text --enable-toplevel +./configure --enable-react --enable-text make @@ -60,7 +62,6 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs make install mkdir -p $RPM_BUILD_ROOT%{_bindir} -install _build/src/top/lwt-toplevel $RPM_BUILD_ROOT%{_bindir}/lwt-toplevel strip $OCAMLFIND_DESTDIR/stublibs/dll*.so #chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so @@ -70,33 +71,17 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so rm -rf $RPM_BUILD_ROOT -%files -%defattr(-,root,root,-) -%doc LICENSE COPYING -%{_libdir}/ocaml/lwt -%if %opt -%exclude %{_libdir}/ocaml/lwt/*.a -%exclude %{_libdir}/ocaml/lwt/*.cmxa -#%exclude %{_libdir}/ocaml/lwt/*.cmx -%endif -%exclude %{_libdir}/ocaml/lwt/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner -%{_bindir}/lwt-toplevel - - %files devel %defattr(-,root,root,-) %doc LICENSE COPYING CHANGES README -%if %opt -%{_libdir}/ocaml/lwt/*.a -%{_libdir}/ocaml/lwt/*.cmxa -#%{_libdir}/ocaml/lwt/*.cmx -%endif -%{_libdir}/ocaml/lwt/*.mli - +%{_libdir}/ocaml/lwt/* +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner %changelog +* Sat Jun 1 2013 David Scott +- Update to 2.4.3 + * Wed Nov 2 2011 David Scott - 2.2.0-2 - Rebuilt for XCP From 3ce8047f1fa5ecaffad7c17e08c6e07ada7fe990 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 20:57:59 +0000 Subject: [PATCH 0072/1125] Fix the provides of ocaml-text --- SPECS/text.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/text.spec b/SPECS/text.spec index ff86e7a3..71a21642 100644 --- a/SPECS/text.spec +++ b/SPECS/text.spec @@ -19,6 +19,8 @@ BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc %define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh %description @@ -52,7 +54,6 @@ ocaml setup.ml -install # Remove this, reinstall it properly with a %%doc rule below. rm -rf $RPM_BUILD_ROOT/usr/local/share/doc - %clean rm -rf $RPM_BUILD_ROOT From 0c5fc00389c3f30580cd96c28b7caef3f22978b4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:11:50 +0000 Subject: [PATCH 0073/1125] VBuild cohttp --- SPECS/cohttp.spec | 3 +-- mock.md | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SPECS/cohttp.spec b/SPECS/cohttp.spec index 752df316..79d0a2d0 100644 --- a/SPECS/cohttp.spec +++ b/SPECS/cohttp.spec @@ -7,8 +7,7 @@ Group: Development/Other URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz Source0: ocaml-cohttp-0.9.8.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# re uri cstruct lwt ounit +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc Requires: ocaml ocaml-findlib %description diff --git a/mock.md b/mock.md index c058e8a6..eaf55788 100644 --- a/mock.md +++ b/mock.md @@ -43,3 +43,6 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-react-0.9.4-0. createrepo RPMS/x86_64 mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-text-0.6-0.el6.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-cohttp-0.9.8-0.src.rpm +createrepo RPMS/x86_64 + From a593714957b74d736c5669433e8b1a6c193cb4f9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:14:01 +0000 Subject: [PATCH 0074/1125] Build xmlm --- SPECS/xmlm.spec | 3 +-- mock.md | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 40da4e02..446099da 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://erratique.ch/software/xmlm Source0: xmlm-1.1.1.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description @@ -22,7 +22,6 @@ arborescent data structures to/from XML documents. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/mock.md b/mock.md index eaf55788..bd400a50 100644 --- a/mock.md +++ b/mock.md @@ -45,4 +45,6 @@ mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-text-0.6-0.el6 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-cohttp-0.9.8-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xmlm-1.1.1-0.src.rpm +createrepo RPMS/x86_64 From b14bdaa6149524c65d512543e7dfcca402730cb9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:16:54 +0000 Subject: [PATCH 0075/1125] Build syslog --- SPECS/syslog.spec | 1 - mock.md | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/syslog.spec b/SPECS/syslog.spec index beed8f85..754a2c23 100644 --- a/SPECS/syslog.spec +++ b/SPECS/syslog.spec @@ -16,7 +16,6 @@ Syslog bindings for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/mock.md b/mock.md index bd400a50..d3a8b1c0 100644 --- a/mock.md +++ b/mock.md @@ -47,4 +47,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-cohttp-0.9.8 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xmlm-1.1.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-syslog-1.4-0.src.rpm +createrepo RPMS/x86_64 From 53ed3bca58b282996217ca13d38bec962c6be462 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:28:21 +0000 Subject: [PATCH 0076/1125] Add and build bitstring --- SPECS/bitstring.spec | 297 +++++++++++++++++++++++++++++++++++++++++++ mock.md | 1 + sources.csv | 1 + 3 files changed, 299 insertions(+) create mode 100644 SPECS/bitstring.spec diff --git a/SPECS/bitstring.spec b/SPECS/bitstring.spec new file mode 100644 index 00000000..1ffc6ef6 --- /dev/null +++ b/SPECS/bitstring.spec @@ -0,0 +1,297 @@ +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} + +# CIL tools are deprecated, don't build them on any platform. +%global build_cil_tools 0 + +Name: ocaml-bitstring +Version: 2.0.4 +Release: 0%{?dist} +Summary: OCaml library for matching and constructing bitstrings + +Group: Development/Libraries +License: LGPLv2+ with exceptions and GPLv2+ + +URL: http://code.google.com/p/bitstring/ +Source0: http://bitstring.googlecode.com/files/%{name}-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.10.2 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +%if %build_cil_tools +BuildRequires: ocaml-cil-devel +BuildRequires: ocaml-extlib-devel +%endif + +#BuildRequires: chrpath +BuildRequires: time + +%global __ocaml_requires_opts -i Asttypes -i Parsetree +%global __ocaml_provides_opts -i Pa_bitstring + +# Upstream project used to be called ocaml-bitmatch. +# Keep these until Fedora 12. +Obsoletes: ocaml-bitmatch <= 1.9.5 +Provides: ocaml-bitmatch = %{version}-%{release} + + +%description +Bitstring adds Erlang-style bitstrings and matching over bitstrings as +a syntax extension and library for OCaml. You can use this module to +both parse and generate binary formats, for example, communications +protocols, disk formats and binary files. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +#Requires: %{name} = %{version}-%{release} + +# Upstream project used to be called ocaml-bitmatch. +# Keep these until Fedora 12. +Obsoletes: ocaml-bitmatch-devel <= 1.9.5 +Provides: ocaml-bitmatch-devel = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%if %build_cil_tools +%package c +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +# Upstream project used to be called ocaml-bitmatch. +# Keep these until Fedora 12. +Obsoletes: ocaml-bitmatch-c <= 1.9.5 +Provides: ocaml-bitmatch-c = %{version}-%{release} + + +%description c +The %{name}-c package contains tools for importing structs +from C code and header files into %{name}. +%endif + + +%prep +%setup -q + +# Keep a pristine copy of the examples directory for distribution. +cp -a examples bitstring-examples + + +%build +%configure +make +make doc +make examples + +%if %build_cil_tools +%if %opt +strip cil-tools/bitstring-import-c.opt +%endif +%endif + + +%check +make check + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +make install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + +mkdir -p $RPM_BUILD_ROOT%{_bindir} + +%if %build_cil_tools +# Install bitstring-import-c by hand for now. +%if %opt +install -m 0755 cil-tools/bitstring-import-c.opt $RPM_BUILD_ROOT%{_bindir}/bitstring-import-c +%else +install -m 0755 cil-tools/bitstring-import-c $RPM_BUILD_ROOT%{_bindir}/bitstring-import-c +%endif + +# Install bitstring-import-prefix.h by hand for now. +install -m 0644 cil-tools/bitstring-import-prefix.h $OCAMLFIND_DESTDIR/bitstring/ +%endif + +# Install bitstring-objinfo by hand for now. +install -m 0755 bitstring-objinfo $RPM_BUILD_ROOT%{_bindir} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING.LIB +%{_libdir}/ocaml/bitstring +%if %opt +%exclude %{_libdir}/ocaml/bitstring/*.a +%exclude %{_libdir}/ocaml/bitstring/*.cmxa +%exclude %{_libdir}/ocaml/bitstring/*.cmx +%endif +%exclude %{_libdir}/ocaml/bitstring/*.mli +%if %build_cil_tools +%exclude %{_libdir}/ocaml/bitstring/*.h +%endif +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + + +%files devel +%defattr(-,root,root,-) +%doc COPYING.LIB README TODO html bitstring-examples +%if %opt +%{_libdir}/ocaml/bitstring/*.a +%{_libdir}/ocaml/bitstring/*.cmxa +%{_libdir}/ocaml/bitstring/*.cmx +%endif +%{_libdir}/ocaml/bitstring/*.mli +%{_bindir}/bitstring-objinfo + + +%if %build_cil_tools +%files c +%defattr(-,root,root,-) +%doc COPYING.LIB cil-tools/ext3.c cil-tools/ext3.ml cil-tools/task_struct.c cil-tools/task_struct.ml +%{_bindir}/bitstring-import-c +%{_libdir}/ocaml/bitstring/*.h +%endif + + +%changelog +* Tue Jan 17 2012 Richard W.M. Jones - 2.0.3-1 +- New upstream version 2.0.3. + +* Fri Jan 06 2012 Richard W.M. Jones - 2.0.2-4 +- Rebuild for OCaml 3.12.1. + +* Tue Feb 08 2011 Fedora Release Engineering - 2.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 06 2011 Richard W.M. Jones - 2.0.2-2 +- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). + +* Fri Jan 8 2010 Richard W.M. Jones - 2.0.2-1 +- New upstream version 2.0.2. +- Remove the two patches which are now upstream. +- Replace %%define with %%global. +- Use upstream RPM 4.8 OCaml dependency generator. +- Recheck package with rpmlint. + +* Wed Dec 30 2009 Richard W.M. Jones - 2.0.0-11 +- Rebuild for OCaml 3.11.2. + +* Sat Jul 25 2009 Fedora Release Engineering - 2.0.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 23 2009 Richard W.M. Jones - 2.0.0-9 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Wed Feb 25 2009 Fedora Release Engineering - 2.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Dec 5 2008 Richard W.M. Jones - 2.0.0-7 +- Patch for OCaml 3.11.0 official. + +* Thu Dec 4 2008 Richard W.M. Jones - 2.0.0-6 +- Rebuild. + +* Thu Nov 20 2008 Richard W.M. Jones - 2.0.0-5 +- Disable CIL tools. +- Patch for OCaml 3.11.0. + +* Wed Nov 19 2008 Richard W.M. Jones - 2.0.0-3 +- Rebuild for OCaml 3.11.0 + +* Tue Oct 21 2008 Richard W.M. Jones - 2.0.0-2 +- Fixed incorrect sources file. + +* Mon Oct 20 2008 Richard W.M. Jones - 2.0.0-1 +- Upstream released 2.0.0, requires OCaml 3.10.2 to compile. + +* Tue Aug 26 2008 Richard W.M. Jones - 1.9.8-3 +- +BR time. + +* Tue Aug 26 2008 Richard W.M. Jones - 1.9.8-2 +- New upstream release 1.9.8. +- Add *.so* files. + +* Thu Jul 17 2008 Richard W.M. Jones - 1.9.7-1 +- New upstream release 1.9.7. +- Project renamed from ocaml-bitmatch to ocaml-bitstring. + +* Fri Jul 11 2008 Richard W.M. Jones - 1.9.5-1 +- New upstream release 1.9.5. +- Clarify that the programs have GPL license. +- Ship bitmatch-objinfo program. + +* Fri Jul 4 2008 Richard W.M. Jones - 1.9.4-1 +- New upstream release 1.9.4. + +* Fri Jul 4 2008 Richard W.M. Jones - 1.9.3-2 +- New upstream release 1.9.3. +- Don't build CIL tools unless we have CIL. + +* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-3 +- +BR ocaml-extlib-devel. + +* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-2 +- Force rebuild, forgot sources first time. + +* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-1 +- New upstream release 1.9.2. +- Include C tools (requiring CIL) in a separate subpackage. + +* Wed May 21 2008 Richard W.M. Jones - 1.3-1 +- New upstream release 1.3. + +* Sun May 18 2008 Richard W.M. Jones - 1.2-1 +- New upstream release 1.2. +- Build and distribute the examples. +- Distribute the TODO file. + +* Sun May 18 2008 Richard W.M. Jones - 1.0-3 +- New upstream release 1.0. +- New upstream URL and download location. +- Use RPM percent-configure in build section. + +* Mon May 12 2008 Richard W.M. Jones - 0.9-1 +- New upstream release 0.9. + +* Thu May 8 2008 Richard W.M. Jones - 0.8-1 +- New upstream release 0.8. + +* Wed May 7 2008 Richard W.M. Jones - 0.7-3 +- New upstream release 0.7. + +* Fri Apr 25 2008 Richard W.M. Jones - 0.6-1 +- New upstream release 0.6. + +* Fri Apr 25 2008 Richard W.M. Jones - 0.5-1 +- New upstream release 0.5. + +* Fri Apr 16 2008 Richard W.M. Jones - 0.4-1 +- New upstream release 0.4. + +* Fri Apr 2 2008 Richard W.M. Jones - 0.2-1 +- Initial RPM release. diff --git a/mock.md b/mock.md index d3a8b1c0..65d2d4ce 100644 --- a/mock.md +++ b/mock.md @@ -49,4 +49,5 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xmlm-1.1.1-0.src.r createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-syslog-1.4-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-bitstring-2.0.4-0.el6.src.rpm createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index a503d346..f10942ff 100644 --- a/sources.csv +++ b/sources.csv @@ -37,3 +37,4 @@ ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, +bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz,ocaml-bitstring-2.0.4.tar.gz From 8d86dac3bcf84ae532f7bd59570981a2b1e89546 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:32:52 +0000 Subject: [PATCH 0077/1125] Oclock now builds --- SPECS/oclock.spec | 1 + mock.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/SPECS/oclock.spec b/SPECS/oclock.spec index c654c289..56d7b353 100644 --- a/SPECS/oclock.spec +++ b/SPECS/oclock.spec @@ -40,6 +40,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean diff --git a/mock.md b/mock.md index 65d2d4ce..16920603 100644 --- a/mock.md +++ b/mock.md @@ -50,4 +50,6 @@ createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-syslog-1.4-0.src.rpm createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-bitstring-2.0.4-0.el6.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-oclock-0.3-0.src.rpm +createrepo RPMS/x86_64 From 90dea75af13f0064fb5e7fbc5e25567f3954a5cd Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:54:17 +0000 Subject: [PATCH 0078/1125] Build nbd --- SPECS/nbd.spec | 4 ++-- mock.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SPECS/nbd.spec b/SPECS/nbd.spec index 5358c1aa..6ac68552 100644 --- a/SPECS/nbd.spec +++ b/SPECS/nbd.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: http://github.com/xen-org/nbd Source0: https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib bitstring lwt -Requires: ocaml ocaml-findlib bitstring lwt +BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 +Requires: ocaml ocaml-findlib %description An implementation of the Network Block Device protocol for both diff --git a/mock.md b/mock.md index 16920603..6d0b13f2 100644 --- a/mock.md +++ b/mock.md @@ -52,4 +52,6 @@ createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-bitstring-2.0.4-0.el6.src.rpm createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-oclock-0.3-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-nbd-0.9.0-0.src.rpm +createrepo RPMS/x86_64 From e87f5cce746cf0948324c3811062cde985b2b210 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 1 Jun 2013 21:54:56 +0000 Subject: [PATCH 0079/1125] lwt: disable livev because of nbd failing to link against libev (investigate later) --- SPECS/bitstring.spec | 2 +- SPECS/lwt.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/bitstring.spec b/SPECS/bitstring.spec index 1ffc6ef6..c172f5ba 100644 --- a/SPECS/bitstring.spec +++ b/SPECS/bitstring.spec @@ -49,7 +49,7 @@ protocols, disk formats and binary files. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} # Upstream project used to be called ocaml-bitmatch. # Keep these until Fedora 12. diff --git a/SPECS/lwt.spec b/SPECS/lwt.spec index 2175aacc..71881f92 100644 --- a/SPECS/lwt.spec +++ b/SPECS/lwt.spec @@ -20,7 +20,7 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-react-devel >= 0.9.0 -BuildRequires: libev-devel +#BuildRequires: libev-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-text-devel BuildRequires: ocaml-camlp4 ocaml-camlp4-devel @@ -51,7 +51,7 @@ iconv -f iso-8859-1 -t utf-8 < README.old > README %build export C_INCLUDE_PATH=/usr/include/libev -./configure --enable-react --enable-text +./configure --enable-react --enable-text --disable-libev make From f83c589387624bbb6d53c4dff843dbad38cbc920 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 10:00:49 +0000 Subject: [PATCH 0080/1125] Add and build omake --- SOURCES/omake-1-warnings | 12 ++++++ SPECS/omake.spec | 86 ++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 3 files changed, 99 insertions(+) create mode 100644 SOURCES/omake-1-warnings create mode 100644 SPECS/omake.spec diff --git a/SOURCES/omake-1-warnings b/SOURCES/omake-1-warnings new file mode 100644 index 00000000..fe985ce2 --- /dev/null +++ b/SOURCES/omake-1-warnings @@ -0,0 +1,12 @@ +diff -ru /tmp/opam-12040-1582/omake.0.9.8.6-0.rc1/OMakefile /tmp/opam-12040-2422/omake.0.9.8.6-0.rc1/OMakefile +--- /tmp/opam-12040-1582/omake.0.9.8.6-0.rc1/OMakefile 2010-10-27 02:42:37.000000000 +0200 ++++ /tmp/opam-12040-2422/omake.0.9.8.6-0.rc1/OMakefile 2012-10-05 18:14:52.045652506 +0200 +@@ -57,7 +57,7 @@ + # + # OCaml options + # +-OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z) ++OCAMLFLAGS[] += -w a + if $(THREADS_ENABLED) + OCAMLFLAGS += -thread + export diff --git a/SPECS/omake.spec b/SPECS/omake.spec new file mode 100644 index 00000000..6a6c15ec --- /dev/null +++ b/SPECS/omake.spec @@ -0,0 +1,86 @@ +Version: 0.9.8.6 +Release: 0 +Summary: The omake build system. +Name: omake +URL: http://omake.metaprl.org/ +Source0: %{name}-%{version}.tar.gz +Patch0: omake-1-warnings +License: GPL +Group: Development/Tools +BuildRoot: %{_tmppath}/%{name}-root +BuildRequires: ocaml >= 3.09.2, make, ncurses-devel + +%define debug_package %{nil} + +%description + +OMake is a build system, similar to GNU make, but with many additional +features, including: +- Support for large projects spanning multiple directories; +- Support for commands that produce several targets at once; +- Fast, accurate, automated dependency analysis using MD5 digests; +- Portability: omake provides a consistent interface on Win32 + and on Unix systems including Linux, OSX, and Cygwin; +- Builtin functions that provide the most common features of + programs like grep, sed, and awk; +- Active filesystem monitoring, where the build automatically + restarts whenever you modify a source file. + +%prep +%setup -q +%patch0 -p4 -b ~omake-1-warnings + +%build +INSTALL_ROOT=$RPM_BUILD_ROOT\ + PREFIX=%{_prefix}\ + BINDIR=%{_bindir}\ + LIBDIR=%{_libdir}\ + make all + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/omake + +INSTALL_ROOT=$RPM_BUILD_ROOT\ + PREFIX=%{_prefix}\ + BINDIR=%{_bindir}\ + LIBDIR=%{_libdir}\ + make install + +chmod +w $RPM_BUILD_ROOT/%{_bindir}/* + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc LICENSE LICENSE.OMake doc/txt/omake-doc.txt doc/ps/omake-doc.ps doc/ps/omake-doc.pdf doc/webpage CHANGELOG.txt + +%attr(555,root,root) %{_bindir}/* +%{_libdir}/omake + +%changelog +* Thu Nov 25 2010 Mike McClurg +- Updated to 0.9.8.6 (revision 13252) to support OCaml 3.12.0. + +* Fri May 14 2010 David Scott +- Customise for XCP + +* Thu Dec 11 2006 Aleksey Nogin [0.9.8-1] +- Updated for the new doc file list and the lack of the man pages. + +* Thu Aug 16 2005 Aleksey Nogin +- Updated to account for the new non-autoconf build style. + +* Mon Sep 9 2004 Aleksey Nogin +- Added doc files. + +* Thu May 8 2003 Jason Hickey +- Added cvs_realclean + +* Tue Apr 22 2003 Aleksey Nogin +- Path updates + +* Tue Apr 22 2003 Jason Hickey +- Initial build. diff --git a/sources.csv b/sources.csv index f10942ff..bab63a44 100644 --- a/sources.csv +++ b/sources.csv @@ -38,3 +38,4 @@ lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz,ocaml-bitstring-2.0.4.tar.gz +omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz From b95a44112d7625795e85928297b5999d9a03af9d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 10:13:49 +0000 Subject: [PATCH 0081/1125] Add and build type_conv --- SPECS/type_conv.spec | 63 ++++++++++++++++++++++++++++++++++++++++++++ mock.md | 4 +++ sources.csv | 1 + 3 files changed, 68 insertions(+) create mode 100644 SPECS/type_conv.spec diff --git a/SPECS/type_conv.spec b/SPECS/type_conv.spec new file mode 100644 index 00000000..dba91fef --- /dev/null +++ b/SPECS/type_conv.spec @@ -0,0 +1,63 @@ +Name: ocaml-type-conv +Version: 109.20.00 +Release: 0 +Summary: OCaml base library for type conversion + +Group: Development/Other +License: LGPLv2+ with exceptions and BSD +URL: http://www.ocaml.info/home/ocaml_sources.html#type-conv +Source0: type_conv-%{version}.tar.gz +#Patch0: type-conv-META.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} + +BuildRequires: ocaml >= 4.00.0 +BuildRequires: ocaml-findlib +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel + +%description +The type-conv mini library factors out functionality needed by +different preprocessors that generate code from type specifications, +because this functionality cannot be duplicated without losing the +ability to use these preprocessors simultaneously. + +%prep +%setup -q -n type_conv-%{version} +#%patch0 -p1 +#dos2unix LICENSE.Tywith + +%build +make + +%install +rm -rf %{buildroot} +export DESTDIR=%{buildroot} +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt +%{_libdir}/ocaml/type_conv + +%changelog +* Wed Nov 25 2010 Mike McClurg +- Updated to version 2.0.1 for compatability with OCaml 3.12.0 + +* Fri May 14 2010 David Scott +- Customised for XCP + +* Wed Jan 07 2009 Florent Monnier 1.6.5-1mdv2009.1 ++ Revision: 326698 +- corrected group +- import ocaml-type-conv + + +* Sat Dec 20 2008 Florent Monnier 1.6.5-1mdv +- Initial RPM release made from the fedora rpm .spec file (revision 1.9) by Richard W.M. Jones +# found there: http://cvs.fedoraproject.org/viewvc/devel/ocaml-type-conv/ocaml-type-conv.spec diff --git a/mock.md b/mock.md index 6d0b13f2..b0972eb1 100644 --- a/mock.md +++ b/mock.md @@ -54,4 +54,8 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-oclock-0.3-0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-nbd-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/omake-0.9.8.6-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-type-conv-109.20.00-0.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index bab63a44..1b6bbbaf 100644 --- a/sources.csv +++ b/sources.csv @@ -39,3 +39,4 @@ react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz,ocaml-bitstring-2.0.4.tar.gz omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz +type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, From 08401296610bff5e0ff70575ddf8761ba586d402 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 10:39:45 +0000 Subject: [PATCH 0082/1125] Start adding js_of_ocaml --- SPECS/js_of_ocaml.spec | 49 ++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 50 insertions(+) create mode 100644 SPECS/js_of_ocaml.spec diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec new file mode 100644 index 00000000..11c031b0 --- /dev/null +++ b/SPECS/js_of_ocaml.spec @@ -0,0 +1,49 @@ +Name: js_of_ocaml +Version: 1.3.2 +Release: 0 +Summary: Compile OCaml programs to javascript +License: LGPL and others +Group: Development/Other +URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz +Source0: js_of_ocaml-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-deriving-ocsigen-devell +Requires: ocaml ocaml-findlib + +%description +Compile OCaml programs to Javascript. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n js_of_ocaml-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_bindir} +make install BINDIR=${buildroot}/%{_bindir}/ + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc COPYING README CHANGES +%{_libdir}/ocaml/js_of_ocaml/* + +%changelog +* Sun Jun 2 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 1b6bbbaf..83157fe3 100644 --- a/sources.csv +++ b/sources.csv @@ -40,3 +40,4 @@ text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz,ocaml-bitstring-2.0.4.tar.gz omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, +js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, From 47f6ac1d3e999b6974a7336f36934ef3c910c27f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 10:42:55 +0000 Subject: [PATCH 0083/1125] Build deriving-ocsigen --- SPECS/deriving-ocsigen.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 9b131df0..761c00aa 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -7,8 +7,7 @@ Group: Development/Other URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz Source0: deriving-ocsigen-0.3c.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# re uri cstruct lwt ounit +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires: ocaml ocaml-findlib %description From 121b59be6f67efd13860aaed584d377ef735f2f4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 11:20:57 +0000 Subject: [PATCH 0084/1125] Add and build js_of_ocaml --- SPECS/deriving-ocsigen.spec | 2 +- SPECS/js_of_ocaml.spec | 10 ++++++---- mock.md | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 761c00aa..8196d25e 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -16,7 +16,7 @@ Extension to OCaml for deriving functions from type declarations %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 11c031b0..88cf9398 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz Source0: js_of_ocaml-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-deriving-ocsigen-devell -Requires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel ocaml-ocamldoc +Requires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel %description Compile OCaml programs to Javascript. @@ -32,16 +32,18 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore mkdir -p %{buildroot}/%{_bindir} -make install BINDIR=${buildroot}/%{_bindir}/ +make install BINDIR=%{buildroot}/%{_bindir}/ %clean rm -rf %{buildroot} %files devel %defattr(-,root,root) -%doc COPYING README CHANGES +%doc LICENSE README CHANGES %{_libdir}/ocaml/js_of_ocaml/* +%{_bindir}/js_of_ocaml %changelog * Sun Jun 2 2013 David Scott diff --git a/mock.md b/mock.md index b0972eb1..114cda57 100644 --- a/mock.md +++ b/mock.md @@ -58,4 +58,7 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/omake-0.9.8.6-0.sr createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-type-conv-109.20.00-0.src.rpm createrepo RPMS/x86_64 - +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/deriving-ocsigen-0.3c-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/js_of_ocaml-1.3.2-0.src.rpm +createrepo RPMS/x86_64 From 24391a304742042aafce9eddeecc4d4500522c4a Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 11:56:26 +0000 Subject: [PATCH 0085/1125] rpc now builds --- SPECS/js_of_ocaml.spec | 2 +- SPECS/rpc.spec | 8 ++++---- mock.md | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 88cf9398..e47ad4c2 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -16,7 +16,7 @@ Compile OCaml programs to Javascript. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/rpc.spec b/SPECS/rpc.spec index 2011811c..d200e72d 100644 --- a/SPECS/rpc.spec +++ b/SPECS/rpc.spec @@ -7,9 +7,8 @@ Group: Development/Other URL: https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz Source0: ocaml-rpc-1.4.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# type-conv, xmlm, js_of_ocaml -Requires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-type-conv xmlm-devel js_of_ocaml-devel ocaml-camlp4-devel +Requires: ocaml ocaml-findlib ocaml-type-conv ocaml-camlp4-devel %description Am RPC library for OCaml. @@ -17,7 +16,7 @@ Am RPC library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -33,6 +32,7 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} %clean diff --git a/mock.md b/mock.md index 114cda57..9a74b73d 100644 --- a/mock.md +++ b/mock.md @@ -62,3 +62,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/deriving-ocsigen-0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/js_of_ocaml-1.3.2-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-rpc-1.4.1-0.src.rpm +createrepo RPMS/x86_64 + From 66d11d25fd83f2676a9092e5405806b506a88947 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:09:04 +0000 Subject: [PATCH 0086/1125] Add and build ssl --- SPECS/ssl.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ mock.md | 2 ++ sources.csv | 1 + 3 files changed, 52 insertions(+) create mode 100644 SPECS/ssl.spec diff --git a/SPECS/ssl.spec b/SPECS/ssl.spec new file mode 100644 index 00000000..ca023202 --- /dev/null +++ b/SPECS/ssl.spec @@ -0,0 +1,49 @@ +Name: ocaml-ssl +Version: 0.4.6 +Release: 0 +Summary: Use OpenSSL from OCaml +License: LGPL +Group: Development/Other +URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib openssl-devel +Requires: ocaml ocaml-findlib openssl + +%description +Use OpenSSL from OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ocaml-ssl-%{version} + +%build +./configure --disable-ldconf +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=%{buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc CHANGES COPYING README +%{_libdir}/ocaml/ssl/* + +%changelog +* Sun Jun 2 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index 9a74b73d..9d28dca1 100644 --- a/mock.md +++ b/mock.md @@ -64,4 +64,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/js_of_ocaml-1.3.2- createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-rpc-1.4.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-ssl-0.4.6-0.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index 83157fe3..9b655d2a 100644 --- a/sources.csv +++ b/sources.csv @@ -41,3 +41,4 @@ bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.g omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, +ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, From 1fcfc861e274819f0ec6003e2afc57d9827a929c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:21:16 +0000 Subject: [PATCH 0087/1125] Add and build xenstore library --- SPECS/xenstore.spec | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 SPECS/xenstore.spec diff --git a/SPECS/xenstore.spec b/SPECS/xenstore.spec new file mode 100644 index 00000000..82f93cdb --- /dev/null +++ b/SPECS/xenstore.spec @@ -0,0 +1,48 @@ +Name: ocaml-xenstore +Version: 1.2.1 +Release: 0 +Summary: Xenstore protocol implementation in OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel +Requires: ocaml ocaml-findlib + +%description +An implementation of the xenstore protocol in OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README CHANGES LICENSE +%{_libdir}/ocaml/xenstore/* + +%changelog +* Sun May 2 2013 David Scott +- Initial package + From 09422db5eb0fdea461e9078ce7cba3c521478126 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:52:21 +0000 Subject: [PATCH 0088/1125] oclock: remove dependency on non-devel package (which is currently empty) --- SPECS/oclock.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/oclock.spec b/SPECS/oclock.spec index 56d7b353..ddc5deef 100644 --- a/SPECS/oclock.spec +++ b/SPECS/oclock.spec @@ -20,7 +20,7 @@ A POSIX monotonic clock for OCaml %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 494cf935309b62a0529e27ccb5edd210acce11c4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:52:44 +0000 Subject: [PATCH 0089/1125] lwt: depend on SSL, generate lwt.ssl package --- SPECS/lwt.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/lwt.spec b/SPECS/lwt.spec index 71881f92..ac63a96a 100644 --- a/SPECS/lwt.spec +++ b/SPECS/lwt.spec @@ -24,6 +24,7 @@ BuildRequires: ocaml-react-devel >= 0.9.0 BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-text-devel BuildRequires: ocaml-camlp4 ocaml-camlp4-devel +BuildRequires: ocaml-ssl-devel %description Lwt is a lightweight thread library for Objective Caml. This library @@ -51,7 +52,7 @@ iconv -f iso-8859-1 -t utf-8 < README.old > README %build export C_INCLUDE_PATH=/usr/include/libev -./configure --enable-react --enable-text --disable-libev +./configure --enable-react --enable-text --disable-libev --enable-ssl make From 33673b1d6a71622a7fe6dc45e6efe0d8d6c340da Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:53:03 +0000 Subject: [PATCH 0090/1125] cohttp: build with lwt (needs lwt.ssl in particular) --- SPECS/cohttp.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SPECS/cohttp.spec b/SPECS/cohttp.spec index 79d0a2d0..68588261 100644 --- a/SPECS/cohttp.spec +++ b/SPECS/cohttp.spec @@ -7,7 +7,9 @@ Group: Development/Other URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz Source0: ocaml-cohttp-0.9.8.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +# should these be inherited from ssl.spec somehow? +BuildRequires: openssl openssl-devel Requires: ocaml ocaml-findlib %description @@ -16,7 +18,7 @@ An HTTP library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -26,8 +28,7 @@ developing applications that use %{name}. %setup -q -n ocaml-cohttp-ocaml-cohttp-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +make build %install rm -rf %{buildroot} From 9dd34630f836c7c768239b4c6179d259550aaf11 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:53:28 +0000 Subject: [PATCH 0091/1125] xenstore: add to sources.csv and build log --- mock.md | 2 ++ sources.csv | 1 + 2 files changed, 3 insertions(+) diff --git a/mock.md b/mock.md index 9d28dca1..f2e6619d 100644 --- a/mock.md +++ b/mock.md @@ -66,4 +66,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-rpc-1.4.1-0. createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-ssl-0.4.6-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-1.2.1-0.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index 9b655d2a..98749c14 100644 --- a/sources.csv +++ b/sources.csv @@ -42,3 +42,4 @@ omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0 type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, +xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, From ec82b59e79ae790a81e33fca1b6c62151cf46901 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 12:53:51 +0000 Subject: [PATCH 0092/1125] message-switch: add correct dependencies However the actual code needs to be updated to use cohttp 0.9.8... --- SPECS/message-switch.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 2c266fb9..d9e5ca19 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -7,12 +7,15 @@ Group: Development/Other URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.1.tar.gz Source0: message-switch-0.9.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires: ocaml ocaml-findlib Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts - +BuildRequires: ocaml-cohttp-devel ocaml-rpc-devel ocaml-xenstore-devel +BuildRequires: ocaml-ounit-devel ocaml-syslog-devel ocaml-uri-devel +BuildRequires: ocaml-re-devel ocaml-rpc-devel cmdliner-devel +BuildRequires: ocaml-ssl-devel ocaml-oclock-devel # "ocamlfind" # "cohttp" {= "0.9.7"} # "rpc" From 990f369e7ca2d05bc4fa859cc6ddaa9921077051 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 16:49:44 +0000 Subject: [PATCH 0093/1125] message-switch: 0.9.2 builds --- SPECS/message-switch.spec | 12 ++++++++---- mock.md | 2 ++ sources.csv | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index d9e5ca19..410846f5 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,11 +1,12 @@ Name: message-switch -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.1.tar.gz -Source0: message-switch-0.9.1.tar.gz +URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.2.tar.gz +Source0: message-switch-0.9.2.tar.gz +Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires: ocaml ocaml-findlib @@ -16,6 +17,7 @@ BuildRequires: ocaml-cohttp-devel ocaml-rpc-devel ocaml-xenstore-devel BuildRequires: ocaml-ounit-devel ocaml-syslog-devel ocaml-uri-devel BuildRequires: ocaml-re-devel ocaml-rpc-devel cmdliner-devel BuildRequires: ocaml-ssl-devel ocaml-oclock-devel +BuildRequires: openssl openssl-devel # "ocamlfind" # "cohttp" {= "0.9.7"} # "rpc" @@ -46,6 +48,7 @@ export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install mkdir -p %{buildroot}/%{_sbindir} install switch.native %{buildroot}/%{_sbindir}/message-switch +install main.native %{buildroot}/%{_sbindir}/message-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch @@ -55,6 +58,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %{_sbindir}/message-switch +%{_sbindir}/message-cli %{_sysconfdir}/init.d/message-switch %post @@ -69,7 +73,7 @@ fi %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/mock.md b/mock.md index f2e6619d..bbc51e5f 100644 --- a/mock.md +++ b/mock.md @@ -68,4 +68,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-ssl-0.4.6-0. createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-1.2.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/message-switch-0.9.2-0.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index 98749c14..d4bd0c39 100644 --- a/sources.csv +++ b/sources.csv @@ -7,7 +7,7 @@ cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1 ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.1.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.2.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz From 011dd19eb72c5a214557909514dd13bfb4688341 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:39:12 +0000 Subject: [PATCH 0094/1125] fd-send-recv: don't make -devel dependent on missing parent package --- SPECS/fd-send-recv.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/fd-send-recv.spec b/SPECS/fd-send-recv.spec index ffd8e9c5..6dba11fc 100644 --- a/SPECS/fd-send-recv.spec +++ b/SPECS/fd-send-recv.spec @@ -16,7 +16,7 @@ Bindings to sendmsg/recvmsg for fd passing under Linux. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -33,6 +33,7 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install %clean From d32d3bad686dc766c3c258872d6657f6d2b6eabb Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:39:32 +0000 Subject: [PATCH 0095/1125] syslog: build both bytecode and nativecode --- SPECS/syslog.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/syslog.spec b/SPECS/syslog.spec index 754a2c23..2e479e3b 100644 --- a/SPECS/syslog.spec +++ b/SPECS/syslog.spec @@ -25,7 +25,7 @@ developing applications that use %{name}. %setup -q -n syslog-%{version} %build -make +make reallyall %install rm -rf %{buildroot} From 58373b5d1f39e1407c9808a05bc359d5d27ec0cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:39:54 +0000 Subject: [PATCH 0096/1125] xcp-idl: update to 0.9.1, which uses cohttp 0.9.8 --- sources.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources.csv b/sources.csv index d4bd0c39..67efa92b 100644 --- a/sources.csv +++ b/sources.csv @@ -21,7 +21,7 @@ tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.1.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.2.tar.gz, xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, From 7fb04a1b874905c92c44a584109623e948658de4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:40:15 +0000 Subject: [PATCH 0097/1125] xcp-idl: now builds --- SPECS/xcp-idl.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index a36e08e6..3d7dd7e5 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,13 +1,18 @@ Name: ocaml-xcp-idl -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.0.tar.gz -Source0: xcp-idl-0.9.0.tar.gz +URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.1.tar.gz +Source0: xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel + +# XXX transitive dependencies of message-switch-devel +BuildRequires: ocaml-oclock-devel + # "uri" #"re" # "cohttp" @@ -24,7 +29,7 @@ Common interface definitions for XCP services. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 970291481c13e149a2992c2b170bd76b26d4f695 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:54:35 +0000 Subject: [PATCH 0098/1125] uuidm now builds --- SPECS/uuidm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/uuidm.spec b/SPECS/uuidm.spec index 88b1449a..8b8b98ff 100644 --- a/SPECS/uuidm.spec +++ b/SPECS/uuidm.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://erratique.ch/software/uuidm Source0: uuidm-0.9.5.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description @@ -18,7 +18,7 @@ identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 5bfaff52cbf708159a090f7b29707bc7498d736b Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:54:51 +0000 Subject: [PATCH 0099/1125] xenops-cli: now builds --- SPECS/xenops-cli.spec | 6 +++++- mock.md | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 55378c56..f938b720 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -7,9 +7,13 @@ Group: Development/Other URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz Source0: xenops-cli-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel Requires: ocaml +# XXX transitively required by message_switch +BuildRequires: ocaml-oclock-devel + %description Command-line interface for xenopsd, the xapi toolstack domain manager. diff --git a/mock.md b/mock.md index bbc51e5f..751305b5 100644 --- a/mock.md +++ b/mock.md @@ -70,4 +70,12 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-1.2 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/message-switch-0.9.2-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-fd-send-recv-1.0.1-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-idl-0.9.1-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-uuidm-0.9.5-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenops-cli-0.9.0-0.src.rpm +createrepo RPMS/x86_64 From 1a21b30936bfebb6c8a85e7ac66164c8b59675ec Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 2 Jun 2013 17:57:10 +0000 Subject: [PATCH 0100/1125] sm-cli: now builds --- SPECS/sm-cli.spec | 6 +++++- mock.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index a667d665..55b3ee33 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -7,9 +7,13 @@ Group: Development/Other URL: https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz Source0: sm-cli-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel Requires: ocaml +# XXX transitively required by message_switch +BuildRequires: ocaml-oclock-devel + %description Command-line interface for xapi toolstack storage managers. diff --git a/mock.md b/mock.md index 751305b5..37b85482 100644 --- a/mock.md +++ b/mock.md @@ -78,4 +78,5 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-uuidm-0.9.5- createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenops-cli-0.9.0-0.src.rpm createrepo RPMS/x86_64 - +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/sm-cli-0.9.0-0.src.rpm +createrepo RPMS/x86_64 From a4ded68a7d9609cbb7c218e6ceed035d999b9a67 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Mon, 3 Jun 2013 14:48:01 +0100 Subject: [PATCH 0101/1125] Tidy up mock.md Signed-off-by: Mike McClurg --- mock.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mock.md b/mock.md index 37b85482..52a634fb 100644 --- a/mock.md +++ b/mock.md @@ -3,6 +3,7 @@ Using mock to build these RPMs: (tidy this up later) +``` useradd djs -G mock passwd djs @@ -50,6 +51,7 @@ createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-syslog-1.4-0.src.rpm createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-bitstring-2.0.4-0.el6.src.rpm createrepo RPMS/x86_64 +createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-oclock-0.3-0.src.rpm createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-nbd-0.9.0-0.src.rpm @@ -80,3 +82,4 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenops-cli-0.9.0-0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/sm-cli-0.9.0-0.src.rpm createrepo RPMS/x86_64 +``` From e76333e44216350a082a0aaa80abd0a23baed22d Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 13:54:17 +0000 Subject: [PATCH 0102/1125] Build stdext and forkexecd --- SPECS/forkexecd.spec | 4 +++- SPECS/stdext.spec | 49 ++++++++++++++++++++++++++++++++++++++++++++ mock.md | 5 +++++ sources.csv | 1 + 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 SPECS/stdext.spec diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 420a6404..ae51726b 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -6,8 +6,10 @@ License: LGPL Group: Development/Other URL: https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz Source0: forkexecd-0.9.0.tar.gz +Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-syslog-devel ocaml-uuidm-devel ocaml-stdext-devel Requires: ocaml ocaml-findlib Requires(post): chkconfig Requires(preun): chkconfig diff --git a/SPECS/stdext.spec b/SPECS/stdext.spec new file mode 100644 index 00000000..adbcab43 --- /dev/null +++ b/SPECS/stdext.spec @@ -0,0 +1,49 @@ +Name: ocaml-stdext +Version: 0.9.0 +Release: 0 +Summary: Deprecated misc library functions for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/stdext/archive/stdext-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel +Requires: ocaml ocaml-findlib + +%description +Deprecated misc library functions for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n stdext-stdext-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=${buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md +%{_libdir}/ocaml/stdext/* + +%changelog +* Mon Jun 3 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index 37b85482..e25d69e1 100644 --- a/mock.md +++ b/mock.md @@ -80,3 +80,8 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenops-cli-0.9.0-0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/sm-cli-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-stdext-0.9.0-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/forkexec-0.9.0-0.src.rpm +createrepo RPMS/x86_64 + diff --git a/sources.csv b/sources.csv index 67efa92b..e5d695cb 100644 --- a/sources.csv +++ b/sources.csv @@ -43,3 +43,4 @@ type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, +stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz From f8c83aa9c437e0c6f155d336021d2b0197dbeae7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 16:31:56 +0000 Subject: [PATCH 0103/1125] Add and build ocaml-xen-lowlevel-libs --- SPECS/xen-lowlevel-libs.spec | 49 ++++++++++++++++++++++++++++++++++++ mock.md | 3 ++- sources.csv | 1 + 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 SPECS/xen-lowlevel-libs.spec diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec new file mode 100644 index 00000000..8a21b530 --- /dev/null +++ b/SPECS/xen-lowlevel-libs.spec @@ -0,0 +1,49 @@ +Name: ocaml-xen-lowlevel-libs +Version: 0.9.0 +Release: 0 +Summary: Xen hypercall bindings for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel xen-devel +Requires: ocaml ocaml-findlib + +%description +Xen hypercall bindings for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=${buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md +%{_libdir}/ocaml/xenctrl/* + +%changelog +* Mon Jun 3 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index e25d69e1..d4c69b0a 100644 --- a/mock.md +++ b/mock.md @@ -84,4 +84,5 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-stdext-0.9.0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/forkexec-0.9.0-0.src.rpm createrepo RPMS/x86_64 - +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-lowlevel-libs-0.9.0-0.src.rpm +createrepo RPMS/x86_64 diff --git a/sources.csv b/sources.csv index e5d695cb..a21b7445 100644 --- a/sources.csv +++ b/sources.csv @@ -44,3 +44,4 @@ js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, From 7455cb5f3acc6ac0558cb0a8ef0ec1da233fe86d Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 16:35:52 +0000 Subject: [PATCH 0104/1125] Add libvirt.spec from http://libvirt.org/git/?p=libvirt-ocaml.git;a=blob_plain;f=ocaml-libvirt.spec.in;hb=HEAD --- SPECS/libvirt.spec | 126 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 SPECS/libvirt.spec diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec new file mode 100644 index 00000000..7ba91e6a --- /dev/null +++ b/SPECS/libvirt.spec @@ -0,0 +1,126 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +# Select what subpackages to build. +%define build_mlvirsh 1 + +Name: ocaml-libvirt +Version: @PACKAGE_VERSION@ +Release: 1%{?dist}%{?extra_release} +Summary: OCaml binding for libvirt + +Group: Development/Libraries +License: LGPLv2+ +URL: http://libvirt.org/ocaml/ +Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib-devel + +BuildRequires: libvirt-devel >= 0.2.1 +BuildRequires: perl +BuildRequires: gawk + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + +%description +OCaml binding for libvirt. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%if %build_mlvirsh +%package -n mlvirsh +Summary: OCaml virsh utility +Group: Applications/Emulators +License: GPLv2+ + + +%description -n mlvirsh +OCaml virtualization shell. +%endif + + +%prep +%setup -q + + +%build +CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix} +make all doc +%if %opt +make opt +strip libvirt/dllmllibvirt.so +%endif + + +%install +# These rules work if the library uses 'ocamlfind install' to install itself. +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +mkdir -p $RPM_BUILD_ROOT%{_bindir} +%if %opt +make install-opt +%else +make install-byte +%endif + +%if !%build_mlvirsh +rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING.LIB README ChangeLog +%{_libdir}/ocaml/libvirt +%if %opt +%exclude %{_libdir}/ocaml/libvirt/*.a +%exclude %{_libdir}/ocaml/libvirt/*.cmxa +%exclude %{_libdir}/ocaml/libvirt/*.cmx +%endif +%exclude %{_libdir}/ocaml/libvirt/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + + +%files devel +%defattr(-,root,root,-) +%doc COPYING.LIB README TODO.libvirt ChangeLog html/* +%if %opt +%{_libdir}/ocaml/libvirt/*.a +%{_libdir}/ocaml/libvirt/*.cmxa +%{_libdir}/ocaml/libvirt/*.cmx +%endif +%{_libdir}/ocaml/libvirt/*.mli + + +%if %build_mlvirsh +%files -n mlvirsh +%defattr(-,root,root,-) +%doc COPYING README ChangeLog +%{_bindir}/mlvirsh +%endif + + +%changelog From 82aec737c0a5d103a8916b03d15518f87b829ee3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 16:40:23 +0000 Subject: [PATCH 0105/1125] Build ocaml-libvirt (although without latest patches) --- SPECS/libvirt.spec | 6 +++--- mock.md | 2 ++ sources.csv | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 7ba91e6a..3a441dc0 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -2,17 +2,17 @@ %define debug_package %{nil} # Select what subpackages to build. -%define build_mlvirsh 1 +%define build_mlvirsh 0 Name: ocaml-libvirt -Version: @PACKAGE_VERSION@ +Version: 0.6.1.2 Release: 1%{?dist}%{?extra_release} Summary: OCaml binding for libvirt Group: Development/Libraries License: LGPLv2+ URL: http://libvirt.org/ocaml/ -Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz +Source0: http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x diff --git a/mock.md b/mock.md index a57092df..e075ac72 100644 --- a/mock.md +++ b/mock.md @@ -88,4 +88,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/forkexec-0.9.0-0.s createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-lowlevel-libs-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvirt-0.6.1.2-1.el6.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index a21b7445..186ae6b7 100644 --- a/sources.csv +++ b/sources.csv @@ -45,3 +45,4 @@ ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml- xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, +libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, From a89dcfd4469b8a6e13bd309f8d916cbd386448e8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 17:05:24 +0000 Subject: [PATCH 0106/1125] libvirt: backport all the cool new stuff, and fix the build against old C libvirt --- ...1-252568550f9bf28b07f4e6d116485205e58afe4a | 105 + ...0-0d103e429ddc7942e537a047c8a46ca7ddc58e46 | 1648 +++++++++++ ...1-658970236caa31bbef44562c521d55b9a4689f4d | 214 ++ ...2-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 | 18 + SOURCES/ocaml-libvirt-13-fixbuild | 47 + ...2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 | 263 ++ ...3-34a472800ba1908e910318cc5d5ed9588174c1cf | 67 + ...4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 | 37 + ...5-2360cd228542c6a523f10daacbd631a753d17208 | 61 + ...6-7568d6f77d72a77c527cc282511f7a3f37dc7040 | 40 + ...7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 | 23 + ...8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d | 2479 +++++++++++++++++ ...9-0ec198e7784de1a49672183c961a2498b6c85b90 | 73 + SPECS/libvirt.spec | 28 +- 14 files changed, 5102 insertions(+), 1 deletion(-) create mode 100644 SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a create mode 100644 SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 create mode 100644 SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d create mode 100644 SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 create mode 100644 SOURCES/ocaml-libvirt-13-fixbuild create mode 100644 SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 create mode 100644 SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf create mode 100644 SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 create mode 100644 SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 create mode 100644 SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 create mode 100644 SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 create mode 100644 SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d create mode 100644 SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 diff --git a/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a b/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a new file mode 100644 index 00000000..65eaf379 --- /dev/null +++ b/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a @@ -0,0 +1,105 @@ +commit 252568550f9bf28b07f4e6d116485205e58afe4a +Author: Hu Tao +Date: Wed May 9 16:48:30 2012 +0800 + + remove parameter nr_pcpus of Libvirt.Domain.get_cpu_stats + + remove the value because we can get it from the libvirt API + +diff --git a/examples/.depend b/examples/.depend +index 831adf6..f58db3d 100644 +--- a/examples/.depend ++++ b/examples/.depend +@@ -1,6 +1,6 @@ +-node_info.cmo: ../libvirt/libvirt.cmi +-node_info.cmx: ../libvirt/libvirt.cmx + get_cpu_stats.cmo: ../libvirt/libvirt.cmi + get_cpu_stats.cmx: ../libvirt/libvirt.cmx + list_domains.cmo: ../libvirt/libvirt.cmi + list_domains.cmx: ../libvirt/libvirt.cmx ++node_info.cmo: ../libvirt/libvirt.cmi ++node_info.cmx: ../libvirt/libvirt.cmx +diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml +index 79d5c3c..d7a8d0c 100644 +--- a/examples/get_cpu_stats.ml ++++ b/examples/get_cpu_stats.ml +@@ -25,7 +25,7 @@ let () = + + let stats = + let dom = D.lookup_by_name conn domname in +- D.get_cpu_stats dom nr_pcpus in ++ D.get_cpu_stats dom in + + Array.iteri ( + fun n params -> +diff --git a/libvirt/.depend b/libvirt/.depend +index 43a2367..3f2297e 100644 +--- a/libvirt/.depend ++++ b/libvirt/.depend +@@ -1,6 +1,6 @@ +-libvirt_version.cmi: + libvirt.cmi: +-libvirt_version.cmo: libvirt_version.cmi +-libvirt_version.cmx: libvirt_version.cmi ++libvirt_version.cmi: + libvirt.cmo: libvirt.cmi + libvirt.cmx: libvirt.cmi ++libvirt_version.cmo: libvirt_version.cmi ++libvirt_version.cmx: libvirt_version.cmi +diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml +index 53c5bb4..07542a9 100644 +--- a/libvirt/libvirt.ml ++++ b/libvirt/libvirt.ml +@@ -417,7 +417,7 @@ struct + external set_vcpus : [>`W] t -> int -> unit = "ocaml_libvirt_domain_set_vcpus" + external pin_vcpu : [>`W] t -> int -> string -> unit = "ocaml_libvirt_domain_pin_vcpu" + external get_vcpus : [>`R] t -> int -> int -> int * vcpu_info array * string = "ocaml_libvirt_domain_get_vcpus" +- external get_cpu_stats : [>`R] t -> int -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" ++ external get_cpu_stats : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" + external get_max_vcpus : [>`R] t -> int = "ocaml_libvirt_domain_get_max_vcpus" + external attach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_attach_device" + external detach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_detach_device" +diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli +index 0913a63..5a288c0 100644 +--- a/libvirt/libvirt.mli ++++ b/libvirt/libvirt.mli +@@ -559,8 +559,8 @@ sig + for a domain. See the libvirt documentation for details + of the array and bitmap returned from this function. + *) +- val get_cpu_stats : [>`R] t -> int -> typed_param list array +- (** [get_pcpu_stats dom nr_pcpu] returns the physical CPU stats ++ val get_cpu_stats : [>`R] t -> typed_param list array ++ (** [get_pcpu_stats dom] returns the physical CPU stats + for a domain. See the libvirt documentation for details. + *) + val get_max_vcpus : [>`R] t -> int +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index 3d42b73..70cf96f 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -532,17 +532,21 @@ extern int virDomainGetCPUStats (virDomainPtr domain, + #endif + + CAMLprim value +-ocaml_libvirt_domain_get_cpu_stats (value domv, value nr_pcpusv) ++ocaml_libvirt_domain_get_cpu_stats (value domv) + { + #ifdef HAVE_VIRDOMAINGETCPUSTATS +- CAMLparam2 (domv, nr_pcpusv); ++ CAMLparam1 (domv); + CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); + CAMLlocal1 (v); + virDomainPtr dom = Domain_val (domv); + virConnectPtr conn = Connect_domv (domv); +- int nr_pcpus = Int_val (nr_pcpusv); + virTypedParameterPtr params; + int r, cpu, ncpus, nparams, i, j, pos; ++ int nr_pcpus; ++ ++ /* get number of pcpus */ ++ NONBLOCKING (nr_pcpus = virDomainGetCPUStats(dom, NULL, 0, 0, 0, 0)); ++ CHECK_ERROR (nr_pcpus < 0, conn, "virDomainGetCPUStats"); + + /* get percpu information */ + NONBLOCKING (nparams = virDomainGetCPUStats(dom, NULL, 0, 0, 1, 0)); diff --git a/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 b/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 new file mode 100644 index 00000000..fcb4f451 --- /dev/null +++ b/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 @@ -0,0 +1,1648 @@ +commit 0d103e429ddc7942e537a047c8a46ca7ddc58e46 +Author: David Scott +Date: Wed Apr 24 11:39:05 2013 +0100 + + Add event callback implementation based on virConnectDomainEventRegisterAny + + A client may register a callback as follows: + + E.register_default_impl (); + + let conn = C.connect_readonly ?name () in + + let id = E.register_any conn (E.Lifecycle (fun dom e -> + printd dom "Lifecycle %s" (E.Lifecycle.to_string e) + )) in + + Internally this will: + 1. generate a unique int64 used to identify the specific callback + 2. add the callback to an OCaml hashtable based on the signature + (there is a distinct hashtable per callback signature) + 3. call virConnectDomainEventRegisterAny which registers a + generic C callback in the stubs (one distinct callback per + signature) and supply the int64 as the "opaque" data + + The client must enter the event loop with: + + while true do + E.run_default_impl () + done + + When an event is triggered, the C callback will upcall into an OCaml + function (having re-acquired the heap lock) supplying the int64 value. + The OCaml function can then find the right callback in the Hashtbl + and call it. + + The client can deregister the callback with: + + E.deregister_any conn id; + + Signed-off-by: David Scott + +diff --git a/libvirt/generator.pl b/libvirt/generator.pl +index ab8900e..8229ad1 100755 +--- a/libvirt/generator.pl ++++ b/libvirt/generator.pl +@@ -59,6 +59,8 @@ my @functions = ( + { name => "virConnectListDefinedStoragePools", + sig => "conn, int : string array" }, + { name => "virConnectGetCapabilities", sig => "conn : string" }, ++ { name => "virConnectDomainEventDeregisterAny", ++ sig => "conn, int : unit" }, + + { name => "virDomainCreateLinux", sig => "conn, string, 0U : dom" }, + { name => "virDomainFree", sig => "dom : free" }, +diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml +index 784a2b5..9c9368a 100644 +--- a/libvirt/libvirt.ml ++++ b/libvirt/libvirt.ml +@@ -483,6 +483,771 @@ struct + map_ignore_errors (fun dom -> (dom, get_info dom)) doms + end + ++module Event = ++struct ++ ++ module Defined = struct ++ type t = [ ++ | `Added ++ | `Updated ++ | `Unknown of int ++ ] ++ ++ let to_string = function ++ | `Added -> "Added" ++ | `Updated -> "Updated" ++ | `Unknown x -> Printf.sprintf "Unknown Defined.detail: %d" x ++ ++ let make = function ++ | 0 -> `Added ++ | 1 -> `Updated ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Undefined = struct ++ type t = [ ++ | `Removed ++ | `Unknown of int ++ ] ++ ++ let to_string = function ++ | `Removed -> "UndefinedRemoved" ++ | `Unknown x -> Printf.sprintf "Unknown Undefined.detail: %d" x ++ ++ let make = function ++ | 0 -> `Removed ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Started = struct ++ type t = [ ++ | `Booted ++ | `Migrated ++ | `Restored ++ | `FromSnapshot ++ | `Wakeup ++ | `Unknown of int ++ ] ++ ++ let to_string = function ++ | `Booted -> "Booted" ++ | `Migrated -> "Migrated" ++ | `Restored -> "Restored" ++ | `FromSnapshot -> "FromSnapshot" ++ | `Wakeup -> "Wakeup" ++ | `Unknown x -> Printf.sprintf "Unknown Started.detail: %d" x ++ ++ let make = function ++ | 0 -> `Booted ++ | 1 -> `Migrated ++ | 2 -> `Restored ++ | 3 -> `FromSnapshot ++ | 4 -> `Wakeup ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Suspended = struct ++ type t = [ ++ | `Paused ++ | `Migrated ++ | `IOError ++ | `Watchdog ++ | `Restored ++ | `FromSnapshot ++ | `APIError ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let to_string = function ++ | `Paused -> "Paused" ++ | `Migrated -> "Migrated" ++ | `IOError -> "IOError" ++ | `Watchdog -> "Watchdog" ++ | `Restored -> "Restored" ++ | `FromSnapshot -> "FromSnapshot" ++ | `APIError -> "APIError" ++ | `Unknown x -> Printf.sprintf "Unknown Suspended.detail: %d" x ++ ++ let make = function ++ | 0 -> `Paused ++ | 1 -> `Migrated ++ | 2 -> `IOError ++ | 3 -> `Watchdog ++ | 4 -> `Restored ++ | 5 -> `FromSnapshot ++ | 6 -> `APIError ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Resumed = struct ++ type t = [ ++ | `Unpaused ++ | `Migrated ++ | `FromSnapshot ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let to_string = function ++ | `Unpaused -> "Unpaused" ++ | `Migrated -> "Migrated" ++ | `FromSnapshot -> "FromSnapshot" ++ | `Unknown x -> Printf.sprintf "Unknown Resumed.detail: %d" x ++ ++ let make = function ++ | 0 -> `Unpaused ++ | 1 -> `Migrated ++ | 2 -> `FromSnapshot ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Stopped = struct ++ type t = [ ++ | `Shutdown ++ | `Destroyed ++ | `Crashed ++ | `Migrated ++ | `Saved ++ | `Failed ++ | `FromSnapshot ++ | `Unknown of int ++ ] ++ let to_string = function ++ | `Shutdown -> "Shutdown" ++ | `Destroyed -> "Destroyed" ++ | `Crashed -> "Crashed" ++ | `Migrated -> "Migrated" ++ | `Saved -> "Saved" ++ | `Failed -> "Failed" ++ | `FromSnapshot -> "FromSnapshot" ++ | `Unknown x -> Printf.sprintf "Unknown Stopped.detail: %d" x ++ ++ let make = function ++ | 0 -> `Shutdown ++ | 1 -> `Destroyed ++ | 2 -> `Crashed ++ | 3 -> `Migrated ++ | 4 -> `Saved ++ | 5 -> `Failed ++ | 6 -> `FromSnapshot ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module PM_suspended = struct ++ type t = [ ++ | `Memory ++ | `Disk ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let to_string = function ++ | `Memory -> "Memory" ++ | `Disk -> "Disk" ++ | `Unknown x -> Printf.sprintf "Unknown PM_suspended.detail: %d" x ++ ++ let make = function ++ | 0 -> `Memory ++ | 1 -> `Disk ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ let string_option x = match x with ++ | None -> "None" ++ | Some x' -> "Some " ^ x' ++ ++ module Lifecycle = struct ++ type t = [ ++ | `Defined of Defined.t ++ | `Undefined of Undefined.t ++ | `Started of Started.t ++ | `Suspended of Suspended.t ++ | `Resumed of Resumed.t ++ | `Stopped of Stopped.t ++ | `Shutdown (* no detail defined yet *) ++ | `PMSuspended of PM_suspended.t ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let to_string = function ++ | `Defined x -> "Defined " ^ (Defined.to_string x) ++ | `Undefined x -> "Undefined " ^ (Undefined.to_string x) ++ | `Started x -> "Started " ^ (Started.to_string x) ++ | `Suspended x -> "Suspended " ^ (Suspended.to_string x) ++ | `Resumed x -> "Resumed " ^ (Resumed.to_string x) ++ | `Stopped x -> "Stopped " ^ (Stopped.to_string x) ++ | `Shutdown -> "Shutdown" ++ | `PMSuspended x -> "PMSuspended " ^ (PM_suspended.to_string x) ++ | `Unknown x -> Printf.sprintf "Unknown Lifecycle event: %d" x ++ ++ let make (ty, detail) = match ty with ++ | 0 -> `Defined (Defined.make detail) ++ | 1 -> `Undefined (Undefined.make detail) ++ | 2 -> `Started (Started.make detail) ++ | 3 -> `Suspended (Suspended.make detail) ++ | 4 -> `Resumed (Resumed.make detail) ++ | 5 -> `Stopped (Stopped.make detail) ++ | 6 -> `Shutdown ++ | 7 -> `PMSuspended (PM_suspended.make detail) ++ | x -> `Unknown x ++ end ++ ++ module Reboot = struct ++ type t = unit ++ ++ let to_string _ = "()" ++ ++ let make () = () ++ end ++ ++ module Rtc_change = struct ++ type t = int64 ++ ++ let to_string = Int64.to_string ++ ++ let make x = x ++ end ++ ++ module Watchdog = struct ++ type t = [ ++ | `None ++ | `Pause ++ | `Reset ++ | `Poweroff ++ | `Shutdown ++ | `Debug ++ | `Unknown of int ++ ] ++ ++ let to_string = function ++ | `None -> "None" ++ | `Pause -> "Pause" ++ | `Reset -> "Reset" ++ | `Poweroff -> "Poweroff" ++ | `Shutdown -> "Shutdown" ++ | `Debug -> "Debug" ++ | `Unknown x -> Printf.sprintf "Unknown watchdog_action: %d" x ++ ++ let make = function ++ | 0 -> `None ++ | 1 -> `Pause ++ | 2 -> `Reset ++ | 3 -> `Poweroff ++ | 4 -> `Shutdown ++ | 5 -> `Debug ++ | x -> `Unknown x (* newer libvirt *) ++ end ++ ++ module Io_error = struct ++ type action = [ ++ | `None ++ | `Pause ++ | `Report ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let string_of_action = function ++ | `None -> "None" ++ | `Pause -> "Pause" ++ | `Report -> "Report" ++ | `Unknown x -> Printf.sprintf "Unknown Io_error.action: %d" x ++ ++ let action_of_int = function ++ | 0 -> `None ++ | 1 -> `Pause ++ | 2 -> `Report ++ | x -> `Unknown x ++ ++ type t = { ++ src_path: string option; ++ dev_alias: string option; ++ action: action; ++ reason: string option; ++ } ++ ++ let to_string t = Printf.sprintf ++ "{ Io_error.src_path = %s; dev_alias = %s; action = %s; reason = %s }" ++ (string_option t.src_path) ++ (string_option t.dev_alias) ++ (string_of_action t.action) ++ (string_option t.reason) ++ ++ let make (src_path, dev_alias, action, reason) = { ++ src_path = src_path; ++ dev_alias = dev_alias; ++ action = action_of_int action; ++ reason = reason; ++ } ++ ++ let make_noreason (src_path, dev_alias, action) = ++ make (src_path, dev_alias, action, None) ++ end ++ ++ module Graphics_address = struct ++ type family = [ ++ | `Ipv4 ++ | `Ipv6 ++ | `Unix ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let string_of_family = function ++ | `Ipv4 -> "IPv4" ++ | `Ipv6 -> "IPv6" ++ | `Unix -> "UNIX" ++ | `Unknown x -> Printf.sprintf "Unknown Graphics_address.family: %d" x ++ ++ let family_of_int = function ++ (* no zero *) ++ | 1 -> `Ipv4 ++ | 2 -> `Ipv6 ++ | 3 -> `Unix ++ | x -> `Unknown x ++ ++ type t = { ++ family: family; (** Address family *) ++ node: string option; (** Address of node (eg IP address, or UNIX path *) ++ service: string option; (** Service name/number (eg TCP port, or NULL) *) ++ } ++ ++ let to_string t = Printf.sprintf ++ "{ family = %s; node = %s; service = %s }" ++ (string_of_family t.family) ++ (string_option t.node) ++ (string_option t.service) ++ ++ let make (family, node, service) = { ++ family = family_of_int family; ++ node = node; ++ service = service; ++ } ++ end ++ ++ module Graphics_subject = struct ++ type identity = { ++ ty: string option; ++ name: string option; ++ } ++ ++ let string_of_identity t = Printf.sprintf ++ "{ ty = %s; name = %s }" ++ (string_option t.ty) ++ (string_option t.name) ++ ++ type t = identity list ++ ++ let to_string ts = ++ "[ " ^ (String.concat "; " (List.map string_of_identity ts)) ^ " ]" ++ ++ let make xs = ++ List.map (fun (ty, name) -> { ty = ty; name = name }) ++ (Array.to_list xs) ++ end ++ ++ module Graphics = struct ++ type phase = [ ++ | `Connect ++ | `Initialize ++ | `Disconnect ++ | `Unknown of int (** newer libvirt *) ++ ] ++ ++ let string_of_phase = function ++ | `Connect -> "Connect" ++ | `Initialize -> "Initialize" ++ | `Disconnect -> "Disconnect" ++ | `Unknown x -> Printf.sprintf "Unknown Graphics.phase: %d" x ++ ++ let phase_of_int = function ++ | 0 -> `Connect ++ | 1 -> `Initialize ++ | 2 -> `Disconnect ++ | x -> `Unknown x ++ ++ type t = { ++ phase: phase; (** the phase of the connection *) ++ local: Graphics_address.t; (** the local server address *) ++ remote: Graphics_address.t; (** the remote client address *) ++ auth_scheme: string option; (** the authentication scheme activated *) ++ subject: Graphics_subject.t; (** the authenticated subject (user) *) ++ } ++ ++ let to_string t = ++ let phase = Printf.sprintf "phase = %s" ++ (string_of_phase t.phase) in ++ let local = Printf.sprintf "local = %s" ++ (Graphics_address.to_string t.local) in ++ let remote = Printf.sprintf "remote = %s" ++ (Graphics_address.to_string t.remote) in ++ let auth_scheme = Printf.sprintf "auth_scheme = %s" ++ (string_option t.auth_scheme) in ++ let subject = Printf.sprintf "subject = %s" ++ (Graphics_subject.to_string t.subject) in ++ "{ " ^ (String.concat "; " [ phase; local; remote; auth_scheme; subject ]) ^ " }" ++ ++ let make (phase, local, remote, auth_scheme, subject) = { ++ phase = phase_of_int phase; ++ local = Graphics_address.make local; ++ remote = Graphics_address.make remote; ++ auth_scheme = auth_scheme; ++ subject = Graphics_subject.make subject; ++ } ++ end ++ ++ module Control_error = struct ++ type t = unit ++ ++ let to_string () = "()" ++ ++ let make () = () ++ end ++ ++ module Block_job = struct ++ type ty = [ ++ | `KnownUnknown (* explicitly named UNKNOWN in the spec *) ++ | `Pull ++ | `Copy ++ | `Commit ++ | `Unknown of int (* newer libvirt *) ++ ] ++ ++ let string_of_ty = function ++ | `KnownUnknown -> "KnownUnknown" ++ | `Pull -> "Pull" ++ | `Copy -> "Copy" ++ | `Commit -> "Commit" ++ | `Unknown x -> Printf.sprintf "Unknown Block_job.ty: %d" x ++ ++ let ty_of_int = function ++ | 0 -> `KnownUnknown ++ | 1 -> `Pull ++ | 2 -> `Copy ++ | 3 -> `Commit ++ | x -> `Unknown x (* newer libvirt *) ++ ++ type status = [ ++ | `Completed ++ | `Failed ++ | `Cancelled ++ | `Ready ++ | `Unknown of int ++ ] ++ ++ let string_of_status = function ++ | `Completed -> "Completed" ++ | `Failed -> "Failed" ++ | `Cancelled -> "Cancelled" ++ | `Ready -> "Ready" ++ | `Unknown x -> Printf.sprintf "Unknown Block_job.status: %d" x ++ ++ let status_of_int = function ++ | 0 -> `Completed ++ | 1 -> `Failed ++ | 2 -> `Cancelled ++ | 3 -> `Ready ++ | x -> `Unknown x ++ ++ type t = { ++ disk: string option; ++ ty: ty; ++ status: status; ++ } ++ ++ let to_string t = Printf.sprintf "{ disk = %s; ty = %s; status = %s }" ++ (string_option t.disk) ++ (string_of_ty t.ty) ++ (string_of_status t.status) ++ ++ let make (disk, ty, status) = { ++ disk = disk; ++ ty = ty_of_int ty; ++ status = status_of_int ty; ++ } ++ end ++ ++ module Disk_change = struct ++ type reason = [ ++ | `MissingOnStart ++ | `Unknown of int ++ ] ++ ++ let string_of_reason = function ++ | `MissingOnStart -> "MissingOnStart" ++ | `Unknown x -> Printf.sprintf "Unknown Disk_change.reason: %d" x ++ ++ let reason_of_int = function ++ | 0 -> `MissingOnStart ++ | x -> `Unknown x ++ ++ type t = { ++ old_src_path: string option; ++ new_src_path: string option; ++ dev_alias: string option; ++ reason: reason; ++ } ++ ++ let to_string t = ++ let o = Printf.sprintf "old_src_path = %s" (string_option t.old_src_path) in ++ let n = Printf.sprintf "new_src_path = %s" (string_option t.new_src_path) in ++ let d = Printf.sprintf "dev_alias = %s" (string_option t.dev_alias) in ++ let r = string_of_reason t.reason in ++ "{ " ^ (String.concat "; " [ o; n; d; r ]) ^ " }" ++ ++ let make (o, n, d, r) = { ++ old_src_path = o; ++ new_src_path = n; ++ dev_alias = d; ++ reason = reason_of_int r; ++ } ++ end ++ ++ module Tray_change = struct ++ type reason = [ ++ | `Open ++ | `Close ++ | `Unknown of int ++ ] ++ ++ let string_of_reason = function ++ | `Open -> "Open" ++ | `Close -> "Close" ++ | `Unknown x -> Printf.sprintf "Unknown Tray_change.reason: %d" x ++ ++ let reason_of_int = function ++ | 0 -> `Open ++ | 1 -> `Close ++ | x -> `Unknown x ++ ++ type t = { ++ dev_alias: string option; ++ reason: reason; ++ } ++ ++ let to_string t = Printf.sprintf ++ "{ dev_alias = %s; reason = %s }" ++ (string_option t.dev_alias) ++ (string_of_reason t.reason) ++ ++ let make (dev_alias, reason) = { ++ dev_alias = dev_alias; ++ reason = reason_of_int reason; ++ } ++ end ++ ++ module PM_wakeup = struct ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ let to_string = function ++ | `Unknown x -> Printf.sprintf "Unknown PM_wakeup.reason: %d" x ++ ++ let make x = `Unknown x ++ end ++ ++ module PM_suspend = struct ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ let to_string = function ++ | `Unknown x -> Printf.sprintf "Unknown PM_suspend.reason: %d" x ++ ++ let make x = `Unknown x ++ end ++ ++ module Balloon_change = struct ++ type t = int64 ++ ++ let to_string = Int64.to_string ++ let make x = x ++ end ++ ++ module PM_suspend_disk = struct ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ let to_string = function ++ | `Unknown x -> Printf.sprintf "Unknown PM_suspend_disk.reason: %d" x ++ ++ let make x = `Unknown x ++ end ++ ++ type callback = ++ | Lifecycle of ([`R] Domain.t -> Lifecycle.t -> unit) ++ | Reboot of ([`R] Domain.t -> Reboot.t -> unit) ++ | RtcChange of ([`R] Domain.t -> Rtc_change.t -> unit) ++ | Watchdog of ([`R] Domain.t -> Watchdog.t -> unit) ++ | IOError of ([`R] Domain.t -> Io_error.t -> unit) ++ | Graphics of ([`R] Domain.t -> Graphics.t -> unit) ++ | IOErrorReason of ([`R] Domain.t -> Io_error.t -> unit) ++ | ControlError of ([`R] Domain.t -> Control_error.t -> unit) ++ | BlockJob of ([`R] Domain.t -> Block_job.t -> unit) ++ | DiskChange of ([`R] Domain.t -> Disk_change.t -> unit) ++ | TrayChange of ([`R] Domain.t -> Tray_change.t -> unit) ++ | PMWakeUp of ([`R] Domain.t -> PM_wakeup.t -> unit) ++ | PMSuspend of ([`R] Domain.t -> PM_suspend.t -> unit) ++ | BalloonChange of ([`R] Domain.t -> Balloon_change.t -> unit) ++ | PMSuspendDisk of ([`R] Domain.t -> PM_suspend_disk.t -> unit) ++ ++ type callback_id = int64 ++ ++ let fresh_callback_id = ++ let next = ref 0L in ++ fun () -> ++ let result = !next in ++ next := Int64.succ !next; ++ result ++ ++ let make_table value_name = ++ let table = Hashtbl.create 16 in ++ let callback callback_id generic x = ++ if Hashtbl.mem table callback_id ++ then Hashtbl.find table callback_id generic x in ++ let _ = Callback.register value_name callback in ++ table ++ ++ let u_table = make_table "Libvirt.u_callback" ++ let i_table = make_table "Libvirt.i_callback" ++ let i64_table = make_table "Libvirt.i64_callback" ++ let i_i_table = make_table "Libvirt.i_i_callback" ++ let s_i_table = make_table "Libvirt.s_i_callback" ++ let s_i_i_table = make_table "Libvirt.s_i_i_callback" ++ let s_s_i_table = make_table "Libvirt.s_s_i_callback" ++ let s_s_i_s_table = make_table "Libvirt.s_s_i_s_callback" ++ let s_s_s_i_table = make_table "Libvirt.s_s_s_i_callback" ++ let i_ga_ga_s_gs_table = make_table "Libvirt.i_ga_ga_s_gs_callback" ++ ++ external register_default_impl : unit -> unit = "ocaml_libvirt_event_register_default_impl" ++ ++ external run_default_impl : unit -> unit = "ocaml_libvirt_event_run_default_impl" ++ ++ external register_any' : 'a Connect.t -> 'a Domain.t option -> callback -> callback_id -> int = "ocaml_libvirt_connect_domain_event_register_any" ++ ++ external deregister_any' : 'a Connect.t -> int -> unit = "ocaml_libvirt_connect_domain_event_deregister_any" ++ ++ let our_id_to_libvirt_id = Hashtbl.create 16 ++ ++ let register_any conn ?dom callback = ++ let id = fresh_callback_id () in ++ begin match callback with ++ | Lifecycle f -> ++ Hashtbl.add i_i_table id (fun dom x -> ++ f dom (Lifecycle.make x) ++ ) ++ | Reboot f -> ++ Hashtbl.add u_table id (fun dom x -> ++ f dom (Reboot.make x) ++ ) ++ | RtcChange f -> ++ Hashtbl.add i64_table id (fun dom x -> ++ f dom (Rtc_change.make x) ++ ) ++ | Watchdog f -> ++ Hashtbl.add i_table id (fun dom x -> ++ f dom (Watchdog.make x) ++ ) ++ | IOError f -> ++ Hashtbl.add s_s_i_table id (fun dom x -> ++ f dom (Io_error.make_noreason x) ++ ) ++ | Graphics f -> ++ Hashtbl.add i_ga_ga_s_gs_table id (fun dom x -> ++ f dom (Graphics.make x) ++ ) ++ | IOErrorReason f -> ++ Hashtbl.add s_s_i_s_table id (fun dom x -> ++ f dom (Io_error.make x) ++ ) ++ | ControlError f -> ++ Hashtbl.add u_table id (fun dom x -> ++ f dom (Control_error.make x) ++ ) ++ | BlockJob f -> ++ Hashtbl.add s_i_i_table id (fun dom x -> ++ f dom (Block_job.make x) ++ ) ++ | DiskChange f -> ++ Hashtbl.add s_s_s_i_table id (fun dom x -> ++ f dom (Disk_change.make x) ++ ) ++ | TrayChange f -> ++ Hashtbl.add s_i_table id (fun dom x -> ++ f dom (Tray_change.make x) ++ ) ++ | PMWakeUp f -> ++ Hashtbl.add i_table id (fun dom x -> ++ f dom (PM_wakeup.make x) ++ ) ++ | PMSuspend f -> ++ Hashtbl.add i_table id (fun dom x -> ++ f dom (PM_suspend.make x) ++ ) ++ | BalloonChange f -> ++ Hashtbl.add i64_table id (fun dom x -> ++ f dom (Balloon_change.make x) ++ ) ++ | PMSuspendDisk f -> ++ Hashtbl.add i_table id (fun dom x -> ++ f dom (PM_suspend_disk.make x) ++ ) ++ end; ++ let libvirt_id = register_any' conn dom callback id in ++ Hashtbl.replace our_id_to_libvirt_id id libvirt_id; ++ id ++ ++ let deregister_any conn id = ++ if Hashtbl.mem our_id_to_libvirt_id id then begin ++ let libvirt_id = Hashtbl.find our_id_to_libvirt_id id in ++ deregister_any' conn libvirt_id ++ end; ++ Hashtbl.remove our_id_to_libvirt_id id; ++ Hashtbl.remove u_table id; ++ Hashtbl.remove i_table id; ++ Hashtbl.remove i64_table id; ++ Hashtbl.remove i_i_table id; ++ Hashtbl.remove s_i_table id; ++ Hashtbl.remove s_i_i_table id; ++ Hashtbl.remove s_s_i_table id; ++ Hashtbl.remove s_s_i_s_table id; ++ Hashtbl.remove s_s_s_i_table id; ++ Hashtbl.remove i_ga_ga_s_gs_table id ++ ++ let timeout_table = Hashtbl.create 16 ++ let _ = ++ let callback x = ++ if Hashtbl.mem timeout_table x ++ then Hashtbl.find timeout_table x () in ++ Callback.register "Libvirt.timeout_callback" callback ++ ++ type timer_id = int64 ++ ++ external add_timeout' : 'a Connect.t -> int -> int64 -> int = "ocaml_libvirt_event_add_timeout" ++ ++ external remove_timeout' : 'a Connect.t -> int -> unit = "ocaml_libvirt_event_remove_timeout" ++ ++ let our_id_to_timer_id = Hashtbl.create 16 ++ let add_timeout conn ms fn = ++ let id = fresh_callback_id () in ++ Hashtbl.add timeout_table id fn; ++ let timer_id = add_timeout' conn ms id in ++ Hashtbl.add our_id_to_timer_id id timer_id; ++ id ++ ++ let remove_timeout conn id = ++ if Hashtbl.mem our_id_to_timer_id id then begin ++ let timer_id = Hashtbl.find our_id_to_timer_id id in ++ remove_timeout' conn timer_id ++ end; ++ Hashtbl.remove our_id_to_timer_id id; ++ Hashtbl.remove timeout_table id ++end ++ + module Network = + struct + type 'rw t +diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli +index fa5a0fe..36cd113 100644 +--- a/libvirt/libvirt.mli ++++ b/libvirt/libvirt.mli +@@ -638,6 +638,361 @@ end + (** Module dealing with domains. [Domain.t] is the + domain object. *) + ++module Event : ++sig ++ ++ module Defined : sig ++ type t = [ ++ | `Added (** Newly created config file *) ++ | `Updated (** Changed config file *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Undefined : sig ++ type t = [ ++ | `Removed (** Deleted the config file *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Started : sig ++ type t = [ ++ | `Booted (** Normal startup from boot *) ++ | `Migrated (** Incoming migration from another host *) ++ | `Restored (** Restored from a state file *) ++ | `FromSnapshot (** Restored from snapshot *) ++ | `Wakeup (** Started due to wakeup event *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Suspended : sig ++ type t = [ ++ | `Paused (** Normal suspend due to admin pause *) ++ | `Migrated (** Suspended for offline migration *) ++ | `IOError (** Suspended due to a disk I/O error *) ++ | `Watchdog (** Suspended due to a watchdog firing *) ++ | `Restored (** Restored from paused state file *) ++ | `FromSnapshot (** Restored from paused snapshot *) ++ | `APIError (** suspended after failure during libvirt API call *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Resumed : sig ++ type t = [ ++ | `Unpaused (** Normal resume due to admin unpause *) ++ | `Migrated (** Resumed for completion of migration *) ++ | `FromSnapshot (** Resumed from snapshot *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Stopped : sig ++ type t = [ ++ | `Shutdown (** Normal shutdown *) ++ | `Destroyed (** Forced poweroff from host *) ++ | `Crashed (** Guest crashed *) ++ | `Migrated (** Migrated off to another host *) ++ | `Saved (** Saved to a state file *) ++ | `Failed (** Host emulator/mgmt failed *) ++ | `FromSnapshot (** offline snapshot loaded *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module PM_suspended : sig ++ type t = [ ++ | `Memory (** Guest was PM suspended to memory *) ++ | `Disk (** Guest was PM suspended to disk *) ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Lifecycle : sig ++ type t = [ ++ | `Defined of Defined.t ++ | `Undefined of Undefined.t ++ | `Started of Started.t ++ | `Suspended of Suspended.t ++ | `Resumed of Resumed.t ++ | `Stopped of Stopped.t ++ | `Shutdown (* no detail defined yet *) ++ | `PMSuspended of PM_suspended.t ++ | `Unknown of int ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Reboot : sig ++ type t = unit ++ ++ val to_string: t -> string ++ end ++ ++ module Rtc_change : sig ++ type t = int64 ++ ++ val to_string: t -> string ++ end ++ ++ module Watchdog : sig ++ type t = [ ++ | `None (** No action, watchdog ignored *) ++ | `Pause (** Guest CPUs are paused *) ++ | `Reset (** Guest CPUs are reset *) ++ | `Poweroff (** Guest is forcably powered off *) ++ | `Shutdown (** Guest is requested to gracefully shutdown *) ++ | `Debug (** No action, a debug message logged *) ++ | `Unknown of int (** newer libvirt *) ++ ] ++ ++ val to_string: t -> string ++ end ++ ++ module Io_error : sig ++ (** Represents both IOError and IOErrorReason *) ++ type action = [ ++ | `None (** No action, IO error ignored *) ++ | `Pause (** Guest CPUs are paused *) ++ | `Report (** IO error reported to guest OS *) ++ | `Unknown of int (** newer libvirt *) ++ ] ++ ++ type t = { ++ src_path: string option; (** The host file on which the I/O error occurred *) ++ dev_alias: string option; (** The guest device alias associated with the path *) ++ action: action; (** The action that is to be taken due to the IO error *) ++ reason: string option; (** The cause of the IO error *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module Graphics_address : sig ++ type family = [ ++ | `Ipv4 (** IPv4 address *) ++ | `Ipv6 (** IPv6 address *) ++ | `Unix (** UNIX socket path *) ++ | `Unknown of int (** newer libvirt *) ++ ] ++ ++ type t = { ++ family: family; (** Address family *) ++ node: string option; (** Address of node (eg IP address, or UNIX path *) ++ service: string option; (** Service name/number (eg TCP port, or NULL) *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module Graphics_subject : sig ++ type identity = { ++ ty: string option; (** Type of identity *) ++ name: string option; (** Identity value *) ++ } ++ ++ type t = identity list ++ ++ val to_string: t -> string ++ end ++ ++ module Graphics : sig ++ type phase = [ ++ | `Connect (** Initial socket connection established *) ++ | `Initialize (** Authentication & setup completed *) ++ | `Disconnect (** Final socket disconnection *) ++ | `Unknown of int (** newer libvirt *) ++ ] ++ ++ type t = { ++ phase: phase; (** the phase of the connection *) ++ local: Graphics_address.t; (** the local server address *) ++ remote: Graphics_address.t; (** the remote client address *) ++ auth_scheme: string option; (** the authentication scheme activated *) ++ subject: Graphics_subject.t; (** the authenticated subject (user) *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module Control_error : sig ++ type t = unit ++ ++ val to_string: t -> string ++ end ++ ++ module Block_job : sig ++ type ty = [ ++ | `KnownUnknown (** explicitly named UNKNOWN in the spec *) ++ | `Pull ++ | `Copy ++ | `Commit ++ | `Unknown of int ++ ] ++ ++ type status = [ ++ | `Completed ++ | `Failed ++ | `Cancelled ++ | `Ready ++ | `Unknown of int ++ ] ++ ++ type t = { ++ disk: string option; (** fully-qualified name of the affected disk *) ++ ty: ty; (** type of block job *) ++ status: status; (** final status of the operation *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module Disk_change : sig ++ type reason = [ ++ | `MissingOnStart ++ | `Unknown of int ++ ] ++ ++ type t = { ++ old_src_path: string option; (** old source path *) ++ new_src_path: string option; (** new source path *) ++ dev_alias: string option; (** device alias name *) ++ reason: reason; (** reason why this callback was called *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module Tray_change : sig ++ type reason = [ ++ | `Open ++ | `Close ++ | `Unknown of int ++ ] ++ ++ type t = { ++ dev_alias: string option; (** device alias *) ++ reason: reason; (** why the tray status was changed *) ++ } ++ ++ val to_string: t -> string ++ end ++ ++ module PM_wakeup : sig ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ val to_string: t -> string ++ end ++ ++ module PM_suspend : sig ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ val to_string: t -> string ++ end ++ ++ module Balloon_change : sig ++ type t = int64 ++ ++ val to_string: t -> string ++ end ++ ++ module PM_suspend_disk : sig ++ type reason = [ ++ | `Unknown of int ++ ] ++ ++ type t = reason ++ ++ val to_string: t -> string ++ end ++ ++ ++ type callback = ++ | Lifecycle of ([`R] Domain.t -> Lifecycle.t -> unit) ++ | Reboot of ([`R] Domain.t -> Reboot.t -> unit) ++ | RtcChange of ([`R] Domain.t -> Rtc_change.t -> unit) ++ | Watchdog of ([`R] Domain.t -> Watchdog.t -> unit) ++ | IOError of ([`R] Domain.t -> Io_error.t -> unit) ++ | Graphics of ([`R] Domain.t -> Graphics.t -> unit) ++ | IOErrorReason of ([`R] Domain.t -> Io_error.t -> unit) ++ | ControlError of ([`R] Domain.t -> Control_error.t -> unit) ++ | BlockJob of ([`R] Domain.t -> Block_job.t -> unit) ++ | DiskChange of ([`R] Domain.t -> Disk_change.t -> unit) ++ | TrayChange of ([`R] Domain.t -> Tray_change.t -> unit) ++ | PMWakeUp of ([`R] Domain.t -> PM_wakeup.t -> unit) ++ | PMSuspend of ([`R] Domain.t -> PM_suspend.t -> unit) ++ | BalloonChange of ([`R] Domain.t -> Balloon_change.t -> unit) ++ | PMSuspendDisk of ([`R] Domain.t -> PM_suspend_disk.t -> unit) ++ ++ (** type of a registered call back function *) ++ ++ val register_default_impl : unit -> unit ++ (** Registers the default event loop based on poll(). This ++ must be done before connections are opened. ++ ++ Once registered call run_default_impl in a loop. *) ++ ++ val run_default_impl : unit -> unit ++ (** Runs one iteration of the event loop. Applications will ++ generally want to have a thread which invokes this in an ++ infinite loop. *) ++ ++ type callback_id ++ (** an individual event registration *) ++ ++ val register_any : 'a Connect.t -> ?dom:'a Domain.t -> callback -> callback_id ++ (** [register_any con ?dom callback] registers [callback] ++ to receive notification of arbitrary domain events. Return ++ a registration id which can be used in [deregister_any]. ++ ++ If [?dom] is None then register for this kind of event on ++ all domains. If [dom] is [Some d] then register for this ++ kind of event only on [d]. ++ *) ++ ++ val deregister_any : 'a Connect.t -> callback_id -> unit ++ (** [deregister_any con id] deregisters the previously registered ++ callback with id [id]. *) ++ ++ type timer_id ++ (** an individual timer event *) ++ ++ val add_timeout : 'a Connect.t -> int -> (unit -> unit) -> timer_id ++ (** [add_timeout con ms cb] registers [cb] as a timeout callback ++ which will be called every [ms] milliseconds *) ++ ++ val remove_timeout : 'a Connect.t -> timer_id -> unit ++ (** [remove_timeout con t] deregisters timeout callback [t]. *) ++ ++end ++ (** Module dealing with events generated by domain ++ state changes. *) ++ + (** {3 Networks} *) + + module Network : +diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c +index 00dbbbc..71e6f61 100644 +--- a/libvirt/libvirt_c.c ++++ b/libvirt/libvirt_c.c +@@ -484,6 +484,25 @@ ocaml_libvirt_connect_get_capabilities (value connv) + CAMLreturn (rv); + } + ++/* Automatically generated binding for virConnectDomainEventDeregisterAny. ++ * In generator.pl this function has signature "conn, int : unit". ++ */ ++ ++CAMLprim value ++ocaml_libvirt_connect_domain_event_deregister_any (value connv, value iv) ++{ ++ CAMLparam2 (connv, iv); ++ ++ virConnectPtr conn = Connect_val (connv); ++ int i = Int_val (iv); ++ int r; ++ ++ NONBLOCKING (r = virConnectDomainEventDeregisterAny (conn, i)); ++ CHECK_ERROR (r == -1, conn, "virConnectDomainEventDeregisterAny"); ++ ++ CAMLreturn (Val_unit); ++} ++ + /* Automatically generated binding for virDomainCreateLinux. + * In generator.pl this function has signature "conn, string, 0U : dom". + */ +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index c51aad7..3bb572f 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -740,6 +740,417 @@ ocaml_libvirt_domain_memory_peek_bytecode (value *argv, int argn) + argv[3], argv[4], argv[5]); + } + ++/*----------------------------------------------------------------------*/ ++ ++/* Domain events */ ++ ++CAMLprim value ++ocaml_libvirt_event_register_default_impl (value unitv) ++{ ++ CAMLparam1 (unitv); ++ ++ /* arg is of type unit = void */ ++ int r; ++ ++ NONBLOCKING (r = virEventRegisterDefaultImpl ()); ++ /* must be called before connection, therefore we can't use CHECK_ERROR */ ++ if (r == -1) caml_failwith("virEventRegisterDefaultImpl"); ++ ++ CAMLreturn (Val_unit); ++} ++ ++CAMLprim value ++ocaml_libvirt_event_run_default_impl (value unitv) ++{ ++ CAMLparam1 (unitv); ++ ++ /* arg is of type unit = void */ ++ int r; ++ ++ NONBLOCKING (r = virEventRunDefaultImpl ()); ++ if (r == -1) caml_failwith("virEventRunDefaultImpl"); ++ ++ CAMLreturn (Val_unit); ++} ++ ++/* We register a single C callback function for every distinct ++ callback signature. We encode the signature itself in the function ++ name and also in the name of the assocated OCaml callback ++ e.g.: ++ a C function called ++ i_i64_s_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ int x, ++ long y, ++ char *z, ++ void *opaque) ++ would correspond to an OCaml callback ++ Libvirt.i_i64_s_callback : ++ int64 -> [`R] Domain.t -> int -> int64 -> string option -> unit ++ where the initial int64 is a unique ID used by the OCaml to ++ dispatch to the specific OCaml closure and stored by libvirt ++ as the "opaque" data. */ ++ ++/* Every one of the callbacks starts with a DOMAIN_CALLBACK_BEGIN(NAME) ++ where NAME is the string name of the OCaml callback registered ++ in libvirt.ml. */ ++#define DOMAIN_CALLBACK_BEGIN(NAME) \ ++ value connv, domv, callback_id, result; \ ++ connv = domv = callback_id = result = Val_int(0); \ ++ static value *callback = NULL; \ ++ caml_leave_blocking_section(); \ ++ if (callback == NULL) \ ++ callback = caml_named_value(NAME); \ ++ if (callback == NULL) \ ++ abort(); /* C code out of sync with OCaml code */ \ ++ if ((virDomainRef(dom) == -1) || (virConnectRef(conn) == -1)) \ ++ abort(); /* should never happen in practice? */ \ ++ \ ++ Begin_roots4(connv, domv, callback_id, result); \ ++ connv = Val_connect(conn); \ ++ domv = Val_domain(dom, connv); \ ++ callback_id = caml_copy_int64(*(long *)opaque); ++ ++/* Every one of the callbacks ends with a CALLBACK_END */ ++#define DOMAIN_CALLBACK_END \ ++ (void) caml_callback3(*callback, callback_id, domv, result); \ ++ End_roots(); \ ++ caml_enter_blocking_section(); ++ ++ ++static void ++i_i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ int x, ++ int y, ++ void * opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.i_i_callback") ++ result = caml_alloc_tuple(2); ++ Store_field(result, 0, Val_int(x)); ++ Store_field(result, 1, Val_int(y)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++u_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ void *opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.u_callback") ++ result = Val_int(0); /* () */ ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++i64_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ long long int64, ++ void *opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.i64_callback") ++ result = caml_copy_int64(int64); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ int x, ++ void *opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.i_callback") ++ result = Val_int(x); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++s_i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ char *x, ++ int y, ++ void * opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.s_i_callback") ++ result = caml_alloc_tuple(2); ++ Store_field(result, 0, ++ Val_opt(x, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, Val_int(y)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++s_i_i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ char *x, ++ int y, ++ int z, ++ void * opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.s_i_i_callback") ++ result = caml_alloc_tuple(3); ++ Store_field(result, 0, ++ Val_opt(x, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, Val_int(y)); ++ Store_field(result, 2, Val_int(z)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++s_s_i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ char *x, ++ char *y, ++ int z, ++ void *opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_i_callback") ++ result = caml_alloc_tuple(3); ++ Store_field(result, 0, ++ Val_opt(x, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, ++ Val_opt(y, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 2, Val_int(z)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++s_s_i_s_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ char *x, ++ char *y, ++ int z, ++ char *a, ++ void *opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_i_s_callback") ++ result = caml_alloc_tuple(4); ++ Store_field(result, 0, ++ Val_opt(x, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, ++ Val_opt(y, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 2, Val_int(z)); ++ Store_field(result, 3, ++ Val_opt(a, (Val_ptr_t) caml_copy_string)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++s_s_s_i_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ char * x, ++ char * y, ++ char * z, ++ int a, ++ void * opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_s_i_callback") ++ result = caml_alloc_tuple(4); ++ Store_field(result, 0, ++ Val_opt(x, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, ++ Val_opt(y, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 2, ++ Val_opt(z, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 3, Val_int(a)); ++ DOMAIN_CALLBACK_END ++} ++ ++static value ++Val_event_graphics_address(virDomainEventGraphicsAddressPtr x) ++{ ++ CAMLparam0 (); ++ CAMLlocal1(result); ++ result = caml_alloc_tuple(3); ++ Store_field(result, 0, Val_int(x->family)); ++ Store_field(result, 1, ++ Val_opt((void *) x->node, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 2, ++ Val_opt((void *) x->service, (Val_ptr_t) caml_copy_string)); ++ CAMLreturn(result); ++} ++ ++static value ++Val_event_graphics_subject_identity(virDomainEventGraphicsSubjectIdentityPtr x) ++{ ++ CAMLparam0 (); ++ CAMLlocal1(result); ++ result = caml_alloc_tuple(2); ++ Store_field(result, 0, ++ Val_opt((void *) x->type, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 1, ++ Val_opt((void *) x->name, (Val_ptr_t) caml_copy_string)); ++ CAMLreturn(result); ++ ++} ++ ++static value ++Val_event_graphics_subject(virDomainEventGraphicsSubjectPtr x) ++{ ++ CAMLparam0 (); ++ CAMLlocal1(result); ++ int i; ++ result = caml_alloc_tuple(x->nidentity); ++ for (i = 0; i < x->nidentity; i++ ) ++ Store_field(result, i, ++ Val_event_graphics_subject_identity(x->identities + i)); ++ CAMLreturn(result); ++} ++ ++static void ++i_ga_ga_s_gs_callback(virConnectPtr conn, ++ virDomainPtr dom, ++ int i1, ++ virDomainEventGraphicsAddressPtr ga1, ++ virDomainEventGraphicsAddressPtr ga2, ++ char *s1, ++ virDomainEventGraphicsSubjectPtr gs1, ++ void * opaque) ++{ ++ DOMAIN_CALLBACK_BEGIN("Libvirt.i_ga_ga_s_gs_callback") ++ result = caml_alloc_tuple(5); ++ Store_field(result, 0, Val_int(i1)); ++ Store_field(result, 1, Val_event_graphics_address(ga1)); ++ Store_field(result, 2, Val_event_graphics_address(ga2)); ++ Store_field(result, 3, ++ Val_opt(s1, (Val_ptr_t) caml_copy_string)); ++ Store_field(result, 4, Val_event_graphics_subject(gs1)); ++ DOMAIN_CALLBACK_END ++} ++ ++static void ++timeout_callback(int timer, void *opaque) ++{ ++ value callback_id, result; ++ callback_id = result = Val_int(0); ++ static value *callback = NULL; ++ caml_leave_blocking_section(); ++ if (callback == NULL) ++ callback = caml_named_value("Libvirt.timeout_callback"); ++ if (callback == NULL) ++ abort(); /* C code out of sync with OCaml code */ ++ ++ Begin_roots2(callback_id, result); ++ callback_id = caml_copy_int64(*(long *)opaque); ++ ++ (void)caml_callback_exn(*callback, callback_id); ++ End_roots(); ++ caml_enter_blocking_section(); ++} ++ ++CAMLprim value ++ocaml_libvirt_event_add_timeout (value connv, value ms, value callback_id) ++{ ++ CAMLparam3 (connv, ms, callback_id); ++ virConnectPtr conn = Connect_val (connv); ++ void *opaque; ++ virFreeCallback freecb = free; ++ virEventTimeoutCallback cb = timeout_callback; ++ ++ int r; ++ ++ /* Store the int64 callback_id as the opaque data so the OCaml ++ callback can demultiplex to the correct OCaml handler. */ ++ if ((opaque = malloc(sizeof(long))) == NULL) ++ caml_failwith ("virEventAddTimeout: malloc"); ++ *((long*)opaque) = Int64_val(callback_id); ++ NONBLOCKING(r = virEventAddTimeout(Int_val(ms), cb, opaque, freecb)); ++ CHECK_ERROR(r == -1, conn, "virEventAddTimeout"); ++ ++ CAMLreturn(Val_int(r)); ++} ++ ++CAMLprim value ++ocaml_libvirt_event_remove_timeout (value connv, value timer_id) ++{ ++ CAMLparam2 (connv, timer_id); ++ virConnectPtr conn = Connect_val (connv); ++ int r; ++ ++ NONBLOCKING(r = virEventRemoveTimeout(Int_val(timer_id))); ++ CHECK_ERROR(r == -1, conn, "virEventRemoveTimeout"); ++ ++ CAMLreturn(Val_int(r)); ++} ++ ++CAMLprim value ++ocaml_libvirt_connect_domain_event_register_any(value connv, value domv, value callback, value callback_id) ++{ ++ CAMLparam4(connv, domv, callback, callback_id); ++ ++ virConnectPtr conn = Connect_val (connv); ++ virDomainPtr dom = NULL; ++ int eventID = Tag_val(callback); ++ ++ virConnectDomainEventGenericCallback cb; ++ void *opaque; ++ virFreeCallback freecb = free; ++ int r; ++ ++ if (domv != Val_int(0)) ++ dom = Domain_val (Field(domv, 0)); ++ ++ switch (eventID){ ++ case VIR_DOMAIN_EVENT_ID_LIFECYCLE: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_REBOOT: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(u_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_WATCHDOG: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_IO_ERROR: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_GRAPHICS: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_ga_ga_s_gs_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_i_s_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(u_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_BLOCK_JOB: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(s_i_i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_DISK_CHANGE: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_s_i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_TRAY_CHANGE: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(s_i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_PMWAKEUP: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_PMSUSPEND: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); ++ break; ++ case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: ++ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); ++ break; ++ default: ++ caml_failwith("vifConnectDomainEventRegisterAny: unimplemented eventID"); ++ } ++ ++ /* Store the int64 callback_id as the opaque data so the OCaml ++ callback can demultiplex to the correct OCaml handler. */ ++ if ((opaque = malloc(sizeof(long))) == NULL) ++ caml_failwith ("virConnectDomainEventRegisterAny: malloc"); ++ *((long*)opaque) = Int64_val(callback_id); ++ NONBLOCKING(r = virConnectDomainEventRegisterAny(conn, dom, eventID, cb, opaque, freecb)); ++ CHECK_ERROR(r == -1, conn, "virConnectDomainEventRegisterAny"); ++ ++ CAMLreturn(Val_int(r)); ++} ++ + CAMLprim value + ocaml_libvirt_storage_pool_get_info (value poolv) + { diff --git a/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d b/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d new file mode 100644 index 00000000..59c0c15d --- /dev/null +++ b/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d @@ -0,0 +1,214 @@ +commit 658970236caa31bbef44562c521d55b9a4689f4d +Author: David Scott +Date: Wed Apr 24 11:39:06 2013 +0100 + + Add a simple example to show how to receive event callbacks + + Signed-off-by: David Scott + +diff --git a/.gitignore b/.gitignore +index 2b5e4fd..71a245e 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -26,6 +26,7 @@ core.* + *.exe + *~ + libvirt/libvirt_version.ml ++examples/domain_events + examples/get_cpu_stats + examples/list_domains + examples/node_info +diff --git a/Makefile.in b/Makefile.in +index c0622cc..3b8b7ec 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -40,6 +40,7 @@ clean: + rm -f examples/list_domains + rm -f examples/node_info + rm -f examples/get_cpu_stats ++ rm -f examples/domain_events + + distclean: clean + rm -f config.h config.log config.status configure +diff --git a/examples/Makefile.in b/examples/Makefile.in +index 2eb220a..041e382 100644 +--- a/examples/Makefile.in ++++ b/examples/Makefile.in +@@ -27,7 +27,7 @@ OCAMLOPTLIBS := $(OCAMLCLIBS) + export LIBRARY_PATH=../libvirt + export LD_LIBRARY_PATH=../libvirt + +-BYTE_TARGETS := list_domains node_info get_cpu_stats ++BYTE_TARGETS := list_domains node_info get_cpu_stats domain_events + OPT_TARGETS := $(BYTE_TARGETS:%=%.opt) + + all: $(BYTE_TARGETS) +@@ -64,6 +64,17 @@ get_cpu_stats.opt: get_cpu_stats.cmx + $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ + ../libvirt/mllibvirt.cmxa -o $@ $< + ++domain_events: domain_events.cmo ++ $(OCAMLFIND) ocamlc \ ++ $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \ ++ ../libvirt/mllibvirt.cma -o $@ $< ++ ++domain_events.opt: domain_events.cmx ++ $(OCAMLFIND) ocamlopt \ ++ $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ ++ ../libvirt/mllibvirt.cmxa -o $@ $< ++ ++ + install-opt install-byte: + + include ../Make.rules +diff --git a/examples/domain_events.ml b/examples/domain_events.ml +new file mode 100644 +index 0000000..03cecd9 +--- /dev/null ++++ b/examples/domain_events.ml +@@ -0,0 +1,145 @@ ++(* Simple demo program showing how to receive domain events. ++ Usage: domain_events [URI] ++ (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. ++ (C) Copyright 2013 Citrix Inc ++ http://libvirt.org/ ++ *) ++ ++open Printf ++ ++module C = Libvirt.Connect ++module D = Libvirt.Domain ++module E = Libvirt.Event ++module N = Libvirt.Network ++ ++let string_of_state = function ++ | D.InfoNoState -> "no state" ++ | D.InfoRunning -> "running" ++ | D.InfoBlocked -> "blocked" ++ | D.InfoPaused -> "paused" ++ | D.InfoShutdown -> "shutdown" ++ | D.InfoShutoff -> "shutoff" ++ | D.InfoCrashed -> "crashed" ++ ++let printd dom fmt = ++ let prefix dom = ++ let id = D.get_id dom in ++ try ++ let name = D.get_name dom in ++ let info = D.get_info dom in ++ let state = string_of_state info.D.state in ++ sprintf "%8d %-20s %s " id name state ++ with _ -> ++ sprintf "%8d " id in ++ let write x = ++ output_string stdout (prefix dom); ++ output_string stdout x; ++ output_string stdout "\n"; ++ flush stdout in ++ Printf.ksprintf write fmt ++ ++let string_option = function ++ | None -> "None" ++ | Some x -> "Some " ^ x ++ ++let string_of_graphics_address (family, node, service) = ++ Printf.sprintf "{ family=%d; node=%s; service=%s }" family (string_option node) (string_option service) ++ ++let string_of_graphics_subject_identity (ty, name) = ++ Printf.sprintf "{ type=%s; name=%s }" (string_option ty) (string_option name) ++ ++let string_of_graphics_subject xs = String.concat "; " (List.map string_of_graphics_subject_identity (Array.to_list xs)) ++ ++let map_option f = function ++ | None -> None ++ | Some x -> Some (f x) ++ ++let () = ++ try ++ E.register_default_impl (); ++ let name = ++ if Array.length Sys.argv >= 2 then ++ Some (Sys.argv.(1)) ++ else ++ None in ++ let conn = C.connect_readonly ?name () in ++ ++ let spinner = [| '|'; '/'; '-'; '\\' |] in ++ ++ let timeouts = ref 0 in ++ (* Check add/remove works *) ++ let id = E.add_timeout conn 250 (fun () -> Printf.printf "This callback is immediately deregistered\n%!") in ++ E.remove_timeout conn id; ++ ++ let (_: E.timer_id) = E.add_timeout conn 250 (* ms *) ++ (fun () -> ++ incr timeouts; ++ Printf.printf "\r%c %d timeout callbacks%!" (spinner.(!timeouts mod (Array.length spinner))) !timeouts; ++ (* Check for GC errors: *) ++ Gc.compact () ++ ) in ++ ++ (* Check add/remove works *) ++ let id = E.register_any conn (E.Lifecycle (fun dom e -> ++ printd dom "Removed Lifecycle callback %s" (E.Lifecycle.to_string e) ++ )) in ++ E.deregister_any conn id; ++ ++ let (_: E.callback_id) = E.register_any conn (E.Lifecycle (fun dom e -> ++ printd dom "Lifecycle %s" (E.Lifecycle.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.Reboot (fun dom e -> ++ printd dom "Reboot %s" (E.Reboot.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.RtcChange (fun dom e -> ++ printd dom "RtcChange %s" (E.Rtc_change.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.Watchdog (fun dom e -> ++ printd dom "Watchdog %s" (E.Watchdog.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.IOError (fun dom e -> ++ printd dom "IOError %s" (E.Io_error.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.IOErrorReason (fun dom e -> ++ printd dom "IOErrorReason %s" (E.Io_error.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.Graphics (fun dom e -> ++ printd dom "Graphics %s" (E.Graphics.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.ControlError (fun dom e -> ++ printd dom "ControlError %s" (E.Control_error.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.BlockJob (fun dom e -> ++ printd dom "BlockJob %s" (E.Block_job.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.DiskChange (fun dom e -> ++ printd dom "DiskChange %s" (E.Disk_change.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.TrayChange (fun dom e -> ++ printd dom "TrayChange %s" (E.Tray_change.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.PMWakeUp (fun dom e -> ++ printd dom "PMWakeup %s" (E.PM_wakeup.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.PMSuspend (fun dom e -> ++ printd dom "PMSuspend %s" (E.PM_suspend.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.BalloonChange (fun dom e -> ++ printd dom "BalloonChange %s" (E.Balloon_change.to_string e) ++ )) in ++ let (_: E.callback_id) = E.register_any conn (E.PMSuspendDisk (fun dom x -> ++ printd dom "PMSuspendDisk %s" (E.PM_suspend_disk.to_string x) ++ )) in ++ C.set_keep_alive conn 5 3; ++ while true do ++ E.run_default_impl () ++ done ++ with ++ Libvirt.Virterror err -> ++ eprintf "error: %s\n" (Libvirt.Virterror.to_string err) ++ ++let () = ++ (* Run the garbage collector which is a good way to check for ++ * memory corruption errors and reference counting issues in libvirt. ++ *) ++ Gc.compact () diff --git a/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 b/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 new file mode 100644 index 00000000..ca9cbc4c --- /dev/null +++ b/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 @@ -0,0 +1,18 @@ +commit 31ce6b280a2d987abc484b8f8d1e6cb25a70d737 +Author: Richard W.M. Jones +Date: Wed May 8 12:31:26 2013 +0100 + + Update dependencies. + +diff --git a/examples/.depend b/examples/.depend +index 3d955f9..b305b76 100644 +--- a/examples/.depend ++++ b/examples/.depend +@@ -2,5 +2,7 @@ node_info.cmo : ../libvirt/libvirt.cmi + node_info.cmx : ../libvirt/libvirt.cmx + get_cpu_stats.cmo : ../libvirt/libvirt.cmi + get_cpu_stats.cmx : ../libvirt/libvirt.cmx ++domain_events.cmo : ../libvirt/libvirt.cmi ++domain_events.cmx : ../libvirt/libvirt.cmx + list_domains.cmo : ../libvirt/libvirt.cmi + list_domains.cmx : ../libvirt/libvirt.cmx diff --git a/SOURCES/ocaml-libvirt-13-fixbuild b/SOURCES/ocaml-libvirt-13-fixbuild new file mode 100644 index 00000000..43ab4402 --- /dev/null +++ b/SOURCES/ocaml-libvirt-13-fixbuild @@ -0,0 +1,47 @@ +diff --git a/examples/.depend b/examples/.depend +index b305b76..b5379d8 100644 +--- a/examples/.depend ++++ b/examples/.depend +@@ -1,8 +1,8 @@ +-node_info.cmo : ../libvirt/libvirt.cmi +-node_info.cmx : ../libvirt/libvirt.cmx +-get_cpu_stats.cmo : ../libvirt/libvirt.cmi +-get_cpu_stats.cmx : ../libvirt/libvirt.cmx + domain_events.cmo : ../libvirt/libvirt.cmi + domain_events.cmx : ../libvirt/libvirt.cmx ++get_cpu_stats.cmo : ../libvirt/libvirt.cmi ++get_cpu_stats.cmx : ../libvirt/libvirt.cmx + list_domains.cmo : ../libvirt/libvirt.cmi + list_domains.cmx : ../libvirt/libvirt.cmx ++node_info.cmo : ../libvirt/libvirt.cmi ++node_info.cmx : ../libvirt/libvirt.cmx +diff --git a/libvirt/.depend b/libvirt/.depend +index 7d32e13..97ce8e6 100644 +--- a/libvirt/.depend ++++ b/libvirt/.depend +@@ -1,6 +1,6 @@ +-libvirt_version.cmi : + libvirt.cmi : +-libvirt_version.cmo : libvirt_version.cmi +-libvirt_version.cmx : libvirt_version.cmi ++libvirt_version.cmi : + libvirt.cmo : libvirt.cmi + libvirt.cmx : libvirt.cmi ++libvirt_version.cmo : libvirt_version.cmi ++libvirt_version.cmx : libvirt_version.cmi +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index 3bb572f..7694c74 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -1133,9 +1133,11 @@ ocaml_libvirt_connect_domain_event_register_any(value connv, value domv, value c + case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: + cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); + break; ++#if 0 + case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: + cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); + break; ++#endif + default: + caml_failwith("vifConnectDomainEventRegisterAny: unimplemented eventID"); + } diff --git a/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 b/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 new file mode 100644 index 00000000..24dd472d --- /dev/null +++ b/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 @@ -0,0 +1,263 @@ +commit c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 +Author: Richard W.M. Jones +Date: Fri Oct 12 11:48:17 2012 +0100 + + Add contrib directory, and non-upstream patch to add Domain.get_cpu_stats_total. + + This patch needs more thorough review. + +diff --git a/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch b/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch +new file mode 100644 +index 0000000..d4a496d +--- /dev/null ++++ b/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch +@@ -0,0 +1,249 @@ ++From 99ba7e0eae5ea7567aded458ab63c5984ed43191 Mon Sep 17 00:00:00 2001 ++From: Hu Tao ++Date: Wed, 9 May 2012 16:48:31 +0800 ++Subject: [PATCH] Add Libvirt.Domain.get_cpu_stats_total. ++ ++Original patch by Hu Tao. ++ ++RWMJ modified the patch to split this into two functions ++(old get_cpu_stats and new get_cpu_stats_total). Apart ++from that split, the code is identical. ++--- ++ examples/.depend | 12 +++--- ++ examples/get_cpu_stats.ml | 48 +++++++++++++----------- ++ libvirt/.depend | 12 +++--- ++ libvirt/libvirt.ml | 1 + ++ libvirt/libvirt.mli | 6 ++- ++ libvirt/libvirt_c_oneoffs.c | 89 +++++++++++++++++++++++++++++++++++++++++++++ ++ 6 files changed, 134 insertions(+), 34 deletions(-) ++ ++diff --git a/examples/.depend b/examples/.depend ++index f58db3d..3d955f9 100644 ++--- a/examples/.depend +++++ b/examples/.depend ++@@ -1,6 +1,6 @@ ++-get_cpu_stats.cmo: ../libvirt/libvirt.cmi ++-get_cpu_stats.cmx: ../libvirt/libvirt.cmx ++-list_domains.cmo: ../libvirt/libvirt.cmi ++-list_domains.cmx: ../libvirt/libvirt.cmx ++-node_info.cmo: ../libvirt/libvirt.cmi ++-node_info.cmx: ../libvirt/libvirt.cmx +++node_info.cmo : ../libvirt/libvirt.cmi +++node_info.cmx : ../libvirt/libvirt.cmx +++get_cpu_stats.cmo : ../libvirt/libvirt.cmi +++get_cpu_stats.cmx : ../libvirt/libvirt.cmx +++list_domains.cmo : ../libvirt/libvirt.cmi +++list_domains.cmx : ../libvirt/libvirt.cmx ++diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml ++index d7a8d0c..10b3840 100644 ++--- a/examples/get_cpu_stats.ml +++++ b/examples/get_cpu_stats.ml ++@@ -18,32 +18,38 @@ let () = ++ let domname = Sys.argv.(1) in ++ ++ let conn = C.connect_readonly () in ++- ++- let nr_pcpus = ++- let info = C.get_node_info conn in ++- C.maxcpus_of_node_info info in ++- ++- let stats = ++- let dom = D.lookup_by_name conn domname in ++- D.get_cpu_stats dom in +++ let dom = D.lookup_by_name conn domname in +++ let stats = D.get_cpu_stats dom in +++ let total_stats = D.get_cpu_stats_total dom in +++ +++ let print_params n params = +++ List.iter ( +++ fun (name, value) -> +++ printf " %s=" name; +++ match value with +++ | D.TypedFieldInt32 i -> printf "%ld" i +++ | D.TypedFieldUInt32 i -> printf "%ld" i +++ | D.TypedFieldInt64 i -> printf "%Ld" i +++ | D.TypedFieldUInt64 i -> printf "%Ld" i +++ | D.TypedFieldFloat f -> printf "%g" f +++ | D.TypedFieldBool b -> printf "%b" b +++ | D.TypedFieldString s -> printf "%S" s +++ ) params in ++ ++ Array.iteri ( ++ fun n params -> ++ printf "pCPU %d:" n; ++- List.iter ( ++- fun (name, value) -> ++- printf " %s=" name; ++- match value with ++- | D.TypedFieldInt32 i -> printf "%ld" i ++- | D.TypedFieldUInt32 i -> printf "%ld" i ++- | D.TypedFieldInt64 i -> printf "%Ld" i ++- | D.TypedFieldUInt64 i -> printf "%Ld" i ++- | D.TypedFieldFloat f -> printf "%g" f ++- | D.TypedFieldBool b -> printf "%b" b ++- | D.TypedFieldString s -> printf "%S" s ++- ) params; +++ print_params n params; ++ printf "\n" ++- ) stats +++ ) stats; +++ +++ Array.iteri ( +++ fun n params -> +++ printf "total:"; +++ print_params n params; +++ printf "\n" +++ ) total_stats +++ ++ with ++ Libvirt.Virterror err -> ++ eprintf "error: %s\n" (Libvirt.Virterror.to_string err) ++diff --git a/libvirt/.depend b/libvirt/.depend ++index 3f2297e..7d32e13 100644 ++--- a/libvirt/.depend +++++ b/libvirt/.depend ++@@ -1,6 +1,6 @@ ++-libvirt.cmi: ++-libvirt_version.cmi: ++-libvirt.cmo: libvirt.cmi ++-libvirt.cmx: libvirt.cmi ++-libvirt_version.cmo: libvirt_version.cmi ++-libvirt_version.cmx: libvirt_version.cmi +++libvirt_version.cmi : +++libvirt.cmi : +++libvirt_version.cmo : libvirt_version.cmi +++libvirt_version.cmx : libvirt_version.cmi +++libvirt.cmo : libvirt.cmi +++libvirt.cmx : libvirt.cmi ++diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml ++index 07542a9..2997b0b 100644 ++--- a/libvirt/libvirt.ml +++++ b/libvirt/libvirt.ml ++@@ -418,6 +418,7 @@ struct ++ external pin_vcpu : [>`W] t -> int -> string -> unit = "ocaml_libvirt_domain_pin_vcpu" ++ external get_vcpus : [>`R] t -> int -> int -> int * vcpu_info array * string = "ocaml_libvirt_domain_get_vcpus" ++ external get_cpu_stats : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" +++ external get_cpu_stats_total : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats_total" ++ external get_max_vcpus : [>`R] t -> int = "ocaml_libvirt_domain_get_max_vcpus" ++ external attach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_attach_device" ++ external detach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_detach_device" ++diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli ++index 5a288c0..020be59 100644 ++--- a/libvirt/libvirt.mli +++++ b/libvirt/libvirt.mli ++@@ -560,7 +560,11 @@ sig ++ of the array and bitmap returned from this function. ++ *) ++ val get_cpu_stats : [>`R] t -> typed_param list array ++- (** [get_pcpu_stats dom] returns the physical CPU stats +++ (** [get_cpu_stats dom] returns the per-CPU physical CPU stats +++ for a domain. See the libvirt documentation for details. +++ *) +++ val get_cpu_stats_total : [>`R] t -> typed_param list array +++ (** [get_cpu_stats dom] returns the total physical CPU stats ++ for a domain. See the libvirt documentation for details. ++ *) ++ val get_max_vcpus : [>`R] t -> int ++diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c ++index 70cf96f..2a1850f 100644 ++--- a/libvirt/libvirt_c_oneoffs.c +++++ b/libvirt/libvirt_c_oneoffs.c ++@@ -638,6 +638,95 @@ ocaml_libvirt_domain_get_cpu_stats (value domv) ++ #endif ++ } ++ +++CAMLprim value +++ocaml_libvirt_domain_get_cpu_stats_total (value domv) +++{ +++#ifdef HAVE_VIRDOMAINGETCPUSTATS +++ CAMLparam1 (domv); +++ CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); +++ CAMLlocal1 (v); +++ virDomainPtr dom = Domain_val (domv); +++ virConnectPtr conn = Connect_domv (domv); +++ virTypedParameterPtr params; +++ int r, nparams, j, pos; +++ +++ /* get total information */ +++ NONBLOCKING (nparams = virDomainGetCPUStats(dom, NULL, 0, -1, 1, 0)); +++ CHECK_ERROR (nparams < 0, conn, "virDomainGetCPUStats"); +++ +++ if ((params = malloc(sizeof(*params) * nparams)) == NULL) +++ caml_failwith ("virDomainGetCPUStats: malloc"); +++ +++ cpustats = caml_alloc (1, 0); /* cpustats: array of params(list of typed_param) */ +++ +++ NONBLOCKING (r = virDomainGetCPUStats(dom, params, nparams, -1, 1, 0)); +++ CHECK_ERROR (r < 0, conn, "virDomainGetCPUStats"); +++ +++ param_head = Val_emptylist; +++ if (params[nparams].type != 0) { +++ for (j = r - 1; j >= 0; j--) { +++ pos = j; +++ +++ param_node = caml_alloc(2, 0); /* param_node: typed_param, next param_node */ +++ Store_field(param_node, 1, param_head); +++ param_head = param_node; +++ +++ typed_param = caml_alloc(2, 0); /* typed_param: field name(string), typed_param_value */ +++ Store_field(param_node, 0, typed_param); +++ Store_field(typed_param, 0, caml_copy_string(params[pos].field)); +++ +++ /* typed_param_value: value with the corresponding type tag */ +++ switch(params[pos].type) { +++ case VIR_TYPED_PARAM_INT: +++ typed_param_value = caml_alloc (1, 0); +++ v = caml_copy_int32 (params[pos].value.i); +++ break; +++ case VIR_TYPED_PARAM_UINT: +++ typed_param_value = caml_alloc (1, 1); +++ v = caml_copy_int32 (params[pos].value.ui); +++ break; +++ case VIR_TYPED_PARAM_LLONG: +++ typed_param_value = caml_alloc (1, 2); +++ v = caml_copy_int64 (params[pos].value.l); +++ break; +++ case VIR_TYPED_PARAM_ULLONG: +++ typed_param_value = caml_alloc (1, 3); +++ v = caml_copy_int64 (params[pos].value.ul); +++ break; +++ case VIR_TYPED_PARAM_DOUBLE: +++ typed_param_value = caml_alloc (1, 4); +++ v = caml_copy_double (params[pos].value.d); +++ break; +++ case VIR_TYPED_PARAM_BOOLEAN: +++ typed_param_value = caml_alloc (1, 5); +++ v = Val_bool (params[pos].value.b); +++ break; +++ case VIR_TYPED_PARAM_STRING: +++ typed_param_value = caml_alloc (1, 6); +++ v = caml_copy_string (params[pos].value.s); +++ free (params[pos].value.s); +++ break; +++ default: +++ /* XXX Memory leak on this path, if there are more +++ * VIR_TYPED_PARAM_STRING past this point in the array. +++ */ +++ free (params); +++ caml_failwith ("virDomainGetCPUStats: " +++ "unknown parameter type returned"); +++ } +++ Store_field (typed_param_value, 0, v); +++ Store_field (typed_param, 1, typed_param_value); +++ } +++ } +++ Store_field (cpustats, 0, param_head); +++ +++ free(params); +++ CAMLreturn (cpustats); +++#else +++ not_supported ("virDomainGetCPUStats"); +++#endif +++} +++ ++ #ifdef HAVE_WEAK_SYMBOLS ++ #ifdef HAVE_VIRDOMAINMIGRATE ++ extern virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, ++-- ++1.7.11.4 ++ diff --git a/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf b/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf new file mode 100644 index 00000000..e3e6f662 --- /dev/null +++ b/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf @@ -0,0 +1,67 @@ +commit 34a472800ba1908e910318cc5d5ed9588174c1cf +Author: David Scott +Date: Wed Mar 6 16:18:03 2013 +0000 + + Correct typos in the storage interface's phantom types + + A connection is either read/write (type rw = [`R|`W]) or read/only + (type ro = [`R]). A function which requires the ability to write + needs to take a parameter [> `W] rather than [`W] (which would + correspond to a write-only connection). + + We can now use a read/write connection to call: + Pool.set_autostart + Volume.create_xml + Volume.delete + + Signed-off-by: David Scott + +diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml +index 07542a9..443b22b 100644 +--- a/libvirt/libvirt.ml ++++ b/libvirt/libvirt.ml +@@ -536,7 +536,7 @@ struct + external get_info : [`R] t -> pool_info = "ocaml_libvirt_storage_pool_get_info" + external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_pool_get_xml_desc" + external get_autostart : [`R] t -> bool = "ocaml_libvirt_storage_pool_get_autostart" +- external set_autostart : [`W] t -> bool -> unit = "ocaml_libvirt_storage_pool_set_autostart" ++ external set_autostart : [>`W] t -> bool -> unit = "ocaml_libvirt_storage_pool_set_autostart" + external num_of_volumes : [`R] t -> int = "ocaml_libvirt_storage_pool_num_of_volumes" + external list_volumes : [`R] t -> int -> string array = "ocaml_libvirt_storage_pool_list_volumes" + external const : [>`R] t -> ro t = "%identity" +@@ -562,8 +562,8 @@ struct + external get_path : [`R] t -> string = "ocaml_libvirt_storage_vol_get_path" + external get_info : [`R] t -> vol_info = "ocaml_libvirt_storage_vol_get_info" + external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_vol_get_xml_desc" +- external create_xml : [`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" +- external delete : [`W] t -> unit = "ocaml_libvirt_storage_vol_delete" ++ external create_xml : [>`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" ++ external delete : [>`W] t -> unit = "ocaml_libvirt_storage_vol_delete" + external free : [>`R] t -> unit = "ocaml_libvirt_storage_vol_free" + external const : [>`R] t -> ro t = "%identity" + end +diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli +index 5a288c0..70cc2c7 100644 +--- a/libvirt/libvirt.mli ++++ b/libvirt/libvirt.mli +@@ -757,7 +757,7 @@ sig + (** Get the XML description. *) + val get_autostart : [`R] t -> bool + (** Get the autostart flag for the storage pool. *) +- val set_autostart : [`W] t -> bool -> unit ++ val set_autostart : [>`W] t -> bool -> unit + (** Set the autostart flag for the storage pool. *) + + val num_of_volumes : [`R] t -> int +@@ -810,9 +810,9 @@ sig + val get_xml_desc : [`R] t -> xml + (** Get the XML description. *) + +- val create_xml : [`W] Pool.t -> xml -> unit ++ val create_xml : [>`W] Pool.t -> xml -> unit + (** Create a storage volume. *) +- val delete : [`W] t -> unit ++ val delete : [>`W] t -> unit + (** Delete a storage volume. *) + val free : [>`R] t -> unit + (** Free a storage volume object in memory. diff --git a/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 b/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 new file mode 100644 index 00000000..5d41c742 --- /dev/null +++ b/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 @@ -0,0 +1,37 @@ +commit 9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 +Author: David Scott +Date: Wed Mar 6 16:18:04 2013 +0000 + + Volume.delete takes a flags parameter + + This corrects a mismatch between the generated C stubs and the .ml + interface. + + Signed-off-by: David Scott + +diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml +index 443b22b..1fbb8ca 100644 +--- a/libvirt/libvirt.ml ++++ b/libvirt/libvirt.ml +@@ -563,7 +563,7 @@ struct + external get_info : [`R] t -> vol_info = "ocaml_libvirt_storage_vol_get_info" + external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_vol_get_xml_desc" + external create_xml : [>`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" +- external delete : [>`W] t -> unit = "ocaml_libvirt_storage_vol_delete" ++ external delete : [>`W] t -> vol_delete_flags -> unit = "ocaml_libvirt_storage_vol_delete" + external free : [>`R] t -> unit = "ocaml_libvirt_storage_vol_free" + external const : [>`R] t -> ro t = "%identity" + end +diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli +index 70cc2c7..bf95fa2 100644 +--- a/libvirt/libvirt.mli ++++ b/libvirt/libvirt.mli +@@ -812,7 +812,7 @@ sig + + val create_xml : [>`W] Pool.t -> xml -> unit + (** Create a storage volume. *) +- val delete : [>`W] t -> unit ++ val delete : [>`W] t -> vol_delete_flags -> unit + (** Delete a storage volume. *) + val free : [>`R] t -> unit + (** Free a storage volume object in memory. diff --git a/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 b/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 new file mode 100644 index 00000000..cc7cdabb --- /dev/null +++ b/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 @@ -0,0 +1,61 @@ +commit 2360cd228542c6a523f10daacbd631a753d17208 +Author: David Scott +Date: Wed Mar 6 16:18:05 2013 +0000 + + Functions returning "unit" correspond to C fns which use -1 for failure + + This affects the following functions: + virStoragePoolBuild + virStoragePoolDelete + virStorageVolDelete + + Previously a call to virStorageVolDelete would succeed returning 0, which + was interpreted as false, causing us to raise an exception with + VIR_ERR_NONE. + + Signed-off-by: David Scott + +diff --git a/libvirt/generator.pl b/libvirt/generator.pl +index 8590ea7..abebfff 100755 +--- a/libvirt/generator.pl ++++ b/libvirt/generator.pl +@@ -749,7 +749,7 @@ sub gen_c_code + int r; + + NONBLOCKING (r = $c_name ($1, i)); +- CHECK_ERROR (!r, conn, \"$c_name\"); ++ CHECK_ERROR (r == -1, conn, \"$c_name\"); + + CAMLreturn (Val_unit); + " +diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c +index b1f084b..d07a55e 100644 +--- a/libvirt/libvirt_c.c ++++ b/libvirt/libvirt_c.c +@@ -1932,7 +1932,7 @@ ocaml_libvirt_storage_pool_build (value poolv, value iv) + int r; + + NONBLOCKING (r = virStoragePoolBuild (pool, i)); +- CHECK_ERROR (!r, conn, "virStoragePoolBuild"); ++ CHECK_ERROR (r == -1, conn, "virStoragePoolBuild"); + + CAMLreturn (Val_unit); + #endif +@@ -2038,7 +2038,7 @@ ocaml_libvirt_storage_pool_delete (value poolv, value iv) + int r; + + NONBLOCKING (r = virStoragePoolDelete (pool, i)); +- CHECK_ERROR (!r, conn, "virStoragePoolDelete"); ++ CHECK_ERROR (r == -1, conn, "virStoragePoolDelete"); + + CAMLreturn (Val_unit); + #endif +@@ -2309,7 +2309,7 @@ ocaml_libvirt_storage_vol_delete (value volv, value iv) + int r; + + NONBLOCKING (r = virStorageVolDelete (vol, i)); +- CHECK_ERROR (!r, conn, "virStorageVolDelete"); ++ CHECK_ERROR (r == -1, conn, "virStorageVolDelete"); + + CAMLreturn (Val_unit); + #endif diff --git a/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 b/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 new file mode 100644 index 00000000..fdd7148c --- /dev/null +++ b/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 @@ -0,0 +1,40 @@ +commit 7568d6f77d72a77c527cc282511f7a3f37dc7040 +Author: Richard W.M. Jones +Date: Wed Mar 6 17:00:43 2013 +0000 + + Update dependencies. + +diff --git a/examples/.depend b/examples/.depend +index f58db3d..3d955f9 100644 +--- a/examples/.depend ++++ b/examples/.depend +@@ -1,6 +1,6 @@ +-get_cpu_stats.cmo: ../libvirt/libvirt.cmi +-get_cpu_stats.cmx: ../libvirt/libvirt.cmx +-list_domains.cmo: ../libvirt/libvirt.cmi +-list_domains.cmx: ../libvirt/libvirt.cmx +-node_info.cmo: ../libvirt/libvirt.cmi +-node_info.cmx: ../libvirt/libvirt.cmx ++node_info.cmo : ../libvirt/libvirt.cmi ++node_info.cmx : ../libvirt/libvirt.cmx ++get_cpu_stats.cmo : ../libvirt/libvirt.cmi ++get_cpu_stats.cmx : ../libvirt/libvirt.cmx ++list_domains.cmo : ../libvirt/libvirt.cmi ++list_domains.cmx : ../libvirt/libvirt.cmx +diff --git a/libvirt/.depend b/libvirt/.depend +index 3f2297e..7d32e13 100644 +--- a/libvirt/.depend ++++ b/libvirt/.depend +@@ -1,6 +1,6 @@ +-libvirt.cmi: +-libvirt_version.cmi: +-libvirt.cmo: libvirt.cmi +-libvirt.cmx: libvirt.cmi +-libvirt_version.cmo: libvirt_version.cmi +-libvirt_version.cmx: libvirt_version.cmi ++libvirt_version.cmi : ++libvirt.cmi : ++libvirt_version.cmo : libvirt_version.cmi ++libvirt_version.cmx : libvirt_version.cmi ++libvirt.cmo : libvirt.cmi ++libvirt.cmx : libvirt.cmi diff --git a/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 b/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 new file mode 100644 index 00000000..9cff55f8 --- /dev/null +++ b/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 @@ -0,0 +1,23 @@ +commit 71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 +Author: David Scott +Date: Wed Apr 17 11:23:00 2013 +0100 + + Fix typo in ocaml_libvirt_storage_vol_get_info + + The info.capacity was being overwritten with the info.allocation. + + Signed-off-by: David Scott + +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index 70cf96f..b1d88cc 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -945,7 +945,7 @@ ocaml_libvirt_storage_vol_get_info (value volv) + rv = caml_alloc (3, 0); + Store_field (rv, 0, Val_int (info.type)); + v = caml_copy_int64 (info.capacity); Store_field (rv, 1, v); +- v = caml_copy_int64 (info.allocation); Store_field (rv, 1, v); ++ v = caml_copy_int64 (info.allocation); Store_field (rv, 2, v); + + CAMLreturn (rv); + #else diff --git a/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d b/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d new file mode 100644 index 00000000..cae842f4 --- /dev/null +++ b/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d @@ -0,0 +1,2479 @@ +commit d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d +Author: David Scott +Date: Wed Apr 24 11:39:03 2013 +0100 + + Remove backwards compatability logic to simplify the bindings + + Rather than compile against old versions of libvirt and resort + to throwing 'not supported' exceptions at runtime, we instead + require all symbols and definitions to be available at compile-time + i.e. we require a much more recent libvirt. + + Signed-off-by: David Scott + +diff --git a/config.h.in b/config.h.in +index fccbbe7..c0bd102 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -30,167 +30,6 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + +-/* Define to 1 if you have the `virConnectGetHostname' function. */ +-#undef HAVE_VIRCONNECTGETHOSTNAME +- +-/* Define to 1 if you have the `virConnectGetURI' function. */ +-#undef HAVE_VIRCONNECTGETURI +- +-/* Define to 1 if you have the `virConnectListDefinedStoragePools' function. +- */ +-#undef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS +- +-/* Define to 1 if you have the `virConnectListStoragePools' function. */ +-#undef HAVE_VIRCONNECTLISTSTORAGEPOOLS +- +-/* Define to 1 if you have the `virConnectNumOfDefinedStoragePools' function. +- */ +-#undef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS +- +-/* Define to 1 if you have the `virConnectNumOfStoragePools' function. */ +-#undef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS +- +-/* Define to 1 if you have the `virDomainBlockPeek' function. */ +-#undef HAVE_VIRDOMAINBLOCKPEEK +- +-/* Define to 1 if you have the `virDomainBlockStats' function. */ +-#undef HAVE_VIRDOMAINBLOCKSTATS +- +-/* Define to 1 if you have the `virDomainGetCPUStats' function. */ +-#undef HAVE_VIRDOMAINGETCPUSTATS +- +-/* Define to 1 if you have the `virDomainGetSchedulerParameters' function. */ +-#undef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS +- +-/* Define to 1 if you have the `virDomainGetSchedulerType' function. */ +-#undef HAVE_VIRDOMAINGETSCHEDULERTYPE +- +-/* Define to 1 if you have the `virDomainInterfaceStats' function. */ +-#undef HAVE_VIRDOMAININTERFACESTATS +- +-/* Define to 1 if you have the `virDomainMemoryPeek' function. */ +-#undef HAVE_VIRDOMAINMEMORYPEEK +- +-/* Define to 1 if you have the `virDomainMigrate' function. */ +-#undef HAVE_VIRDOMAINMIGRATE +- +-/* Define to 1 if you have the `virDomainSetSchedulerParameters' function. */ +-#undef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS +- +-/* Define to 1 if you have the `virNodeGetCellsFreeMemory' function. */ +-#undef HAVE_VIRNODEGETCELLSFREEMEMORY +- +-/* Define to 1 if you have the `virNodeGetFreeMemory' function. */ +-#undef HAVE_VIRNODEGETFREEMEMORY +- +-/* Define to 1 if you have the `virStoragePoolBuild' function. */ +-#undef HAVE_VIRSTORAGEPOOLBUILD +- +-/* Define to 1 if you have the `virStoragePoolCreate' function. */ +-#undef HAVE_VIRSTORAGEPOOLCREATE +- +-/* Define to 1 if you have the `virStoragePoolCreateXML' function. */ +-#undef HAVE_VIRSTORAGEPOOLCREATEXML +- +-/* Define to 1 if you have the `virStoragePoolDefineXML' function. */ +-#undef HAVE_VIRSTORAGEPOOLDEFINEXML +- +-/* Define to 1 if you have the `virStoragePoolDelete' function. */ +-#undef HAVE_VIRSTORAGEPOOLDELETE +- +-/* Define to 1 if you have the `virStoragePoolDestroy' function. */ +-#undef HAVE_VIRSTORAGEPOOLDESTROY +- +-/* Define to 1 if you have the `virStoragePoolFree' function. */ +-#undef HAVE_VIRSTORAGEPOOLFREE +- +-/* Define to 1 if you have the `virStoragePoolGetAutostart' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETAUTOSTART +- +-/* Define to 1 if you have the `virStoragePoolGetConnect' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETCONNECT +- +-/* Define to 1 if you have the `virStoragePoolGetInfo' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETINFO +- +-/* Define to 1 if you have the `virStoragePoolGetName' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETNAME +- +-/* Define to 1 if you have the `virStoragePoolGetUUID' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETUUID +- +-/* Define to 1 if you have the `virStoragePoolGetUUIDString' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETUUIDSTRING +- +-/* Define to 1 if you have the `virStoragePoolGetXMLDesc' function. */ +-#undef HAVE_VIRSTORAGEPOOLGETXMLDESC +- +-/* Define to 1 if you have the `virStoragePoolListVolumes' function. */ +-#undef HAVE_VIRSTORAGEPOOLLISTVOLUMES +- +-/* Define to 1 if you have the `virStoragePoolLookupByName' function. */ +-#undef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME +- +-/* Define to 1 if you have the `virStoragePoolLookupByUUID' function. */ +-#undef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID +- +-/* Define to 1 if you have the `virStoragePoolLookupByUUIDString' function. */ +-#undef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING +- +-/* Define to 1 if you have the `virStoragePoolLookupByVolume' function. */ +-#undef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME +- +-/* Define to 1 if you have the `virStoragePoolNumOfVolumes' function. */ +-#undef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES +- +-/* Define to 1 if the system has the type `virStoragePoolPtr'. */ +-#undef HAVE_VIRSTORAGEPOOLPTR +- +-/* Define to 1 if you have the `virStoragePoolRefresh' function. */ +-#undef HAVE_VIRSTORAGEPOOLREFRESH +- +-/* Define to 1 if you have the `virStoragePoolSetAutostart' function. */ +-#undef HAVE_VIRSTORAGEPOOLSETAUTOSTART +- +-/* Define to 1 if you have the `virStoragePoolUndefine' function. */ +-#undef HAVE_VIRSTORAGEPOOLUNDEFINE +- +-/* Define to 1 if you have the `virStorageVolCreateXML' function. */ +-#undef HAVE_VIRSTORAGEVOLCREATEXML +- +-/* Define to 1 if you have the `virStorageVolDelete' function. */ +-#undef HAVE_VIRSTORAGEVOLDELETE +- +-/* Define to 1 if you have the `virStorageVolFree' function. */ +-#undef HAVE_VIRSTORAGEVOLFREE +- +-/* Define to 1 if you have the `virStorageVolGetInfo' function. */ +-#undef HAVE_VIRSTORAGEVOLGETINFO +- +-/* Define to 1 if you have the `virStorageVolGetKey' function. */ +-#undef HAVE_VIRSTORAGEVOLGETKEY +- +-/* Define to 1 if you have the `virStorageVolGetName' function. */ +-#undef HAVE_VIRSTORAGEVOLGETNAME +- +-/* Define to 1 if you have the `virStorageVolGetPath' function. */ +-#undef HAVE_VIRSTORAGEVOLGETPATH +- +-/* Define to 1 if you have the `virStorageVolGetXMLDesc' function. */ +-#undef HAVE_VIRSTORAGEVOLGETXMLDESC +- +-/* Define to 1 if you have the `virStorageVolLookupByKey' function. */ +-#undef HAVE_VIRSTORAGEVOLLOOKUPBYKEY +- +-/* Define to 1 if you have the `virStorageVolLookupByName' function. */ +-#undef HAVE_VIRSTORAGEVOLLOOKUPBYNAME +- +-/* Define to 1 if you have the `virStorageVolLookupByPath' function. */ +-#undef HAVE_VIRSTORAGEVOLLOOKUPBYPATH +- +-/* Define to 1 if the system has the type `virStorageVolPtr'. */ +-#undef HAVE_VIRSTORAGEVOLPTR +- + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ + #undef NO_MINUS_C_MINUS_O + +diff --git a/configure.ac b/configure.ac +index 63635b6..d40d048 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -67,71 +67,6 @@ AC_CHECK_HEADER([libvirt/virterror.h], + [], + AC_MSG_ERROR([You must install libvirt development package])) + +-dnl Check for libvirt >= 0.2.1 (our minimum supported version). +-dnl See: http://libvirt.org/hvsupport.html +-AC_CHECK_FUNC(virConnectGetCapabilities, +- [], +- AC_MSG_ERROR([You must have libvirt >= 0.2.1])) +- +-dnl Check for optional libvirt functions added since 0.2.1. +-dnl See: http://libvirt.org/hvsupport.html +-AC_CHECK_FUNCS([virConnectGetHostname \ +- virConnectGetURI \ +- virDomainBlockStats \ +- virDomainGetSchedulerParameters \ +- virDomainGetSchedulerType \ +- virDomainInterfaceStats \ +- virDomainMigrate \ +- virDomainSetSchedulerParameters \ +- virNodeGetFreeMemory \ +- virNodeGetCellsFreeMemory \ +- virStoragePoolGetConnect \ +- virConnectNumOfStoragePools \ +- virConnectListStoragePools \ +- virConnectNumOfDefinedStoragePools \ +- virConnectListDefinedStoragePools \ +- virStoragePoolLookupByName \ +- virStoragePoolLookupByUUID \ +- virStoragePoolLookupByUUIDString \ +- virStoragePoolLookupByVolume \ +- virStoragePoolCreateXML \ +- virStoragePoolDefineXML \ +- virStoragePoolBuild \ +- virStoragePoolUndefine \ +- virStoragePoolCreate \ +- virStoragePoolDestroy \ +- virStoragePoolDelete \ +- virStoragePoolFree \ +- virStoragePoolRefresh \ +- virStoragePoolGetName \ +- virStoragePoolGetUUID \ +- virStoragePoolGetUUIDString \ +- virStoragePoolGetInfo \ +- virStoragePoolGetXMLDesc \ +- virStoragePoolGetAutostart \ +- virStoragePoolSetAutostart \ +- virStoragePoolNumOfVolumes \ +- virStoragePoolListVolumes \ +- virStorageVolLookupByName \ +- virStorageVolLookupByKey \ +- virStorageVolLookupByPath \ +- virStorageVolGetName \ +- virStorageVolGetKey \ +- virStorageVolCreateXML \ +- virStorageVolDelete \ +- virStorageVolFree \ +- virStorageVolGetInfo \ +- virStorageVolGetXMLDesc \ +- virStorageVolGetPath \ +- virDomainBlockPeek \ +- virDomainMemoryPeek \ +- virDomainGetCPUStats \ +-]) +- +-dnl Check for optional types added since 0.2.1. +-AC_CHECK_TYPES([virStoragePoolPtr, virStorageVolPtr],,, +- [#include ]) +- + dnl Check for basic OCaml environment & findlib. + AC_PROG_OCAML + AC_PROG_FINDLIB +diff --git a/libvirt/generator.pl b/libvirt/generator.pl +index abebfff..ab8900e 100755 +--- a/libvirt/generator.pl ++++ b/libvirt/generator.pl +@@ -35,13 +35,11 @@ use strict; + # It is interpreted by the generation functions below to indicate what + # "class" the function falls into, and to generate the right class of + # binding. +-# +-# Any function added since libvirt 0.2.1 must be marked weak. + + my @functions = ( + { name => "virConnectClose", sig => "conn : free" }, +- { name => "virConnectGetHostname", sig => "conn : string", weak => 1 }, +- { name => "virConnectGetURI", sig => "conn : string", weak => 1 }, ++ { name => "virConnectGetHostname", sig => "conn : string" }, ++ { name => "virConnectGetURI", sig => "conn : string" }, + { name => "virConnectGetType", sig => "conn : static string" }, + { name => "virConnectNumOfDomains", sig => "conn : int" }, + { name => "virConnectListDomains", sig => "conn, int : int array" }, +@@ -53,13 +51,13 @@ my @functions = ( + { name => "virConnectNumOfDefinedNetworks", sig => "conn : int" }, + { name => "virConnectListDefinedNetworks", + sig => "conn, int : string array" }, +- { name => "virConnectNumOfStoragePools", sig => "conn : int", weak => 1 }, ++ { name => "virConnectNumOfStoragePools", sig => "conn : int" }, + { name => "virConnectListStoragePools", +- sig => "conn, int : string array", weak => 1 }, ++ sig => "conn, int : string array" }, + { name => "virConnectNumOfDefinedStoragePools", +- sig => "conn : int", weak => 1 }, ++ sig => "conn : int" }, + { name => "virConnectListDefinedStoragePools", +- sig => "conn, int : string array", weak => 1 }, ++ sig => "conn, int : string array" }, + { name => "virConnectGetCapabilities", sig => "conn : string" }, + + { name => "virDomainCreateLinux", sig => "conn, string, 0U : dom" }, +@@ -107,66 +105,66 @@ my @functions = ( + { name => "virNetworkGetAutostart", sig => "net : bool" }, + { name => "virNetworkSetAutostart", sig => "net, bool : unit" }, + +- { name => "virStoragePoolFree", sig => "pool : free", weak => 1 }, +- { name => "virStoragePoolDestroy", sig => "pool : free", weak => 1 }, ++ { name => "virStoragePoolFree", sig => "pool : free" }, ++ { name => "virStoragePoolDestroy", sig => "pool : free" }, + { name => "virStoragePoolLookupByName", +- sig => "conn, string : pool", weak => 1 }, ++ sig => "conn, string : pool" }, + { name => "virStoragePoolLookupByUUID", +- sig => "conn, uuid : pool", weak => 1 }, ++ sig => "conn, uuid : pool" }, + { name => "virStoragePoolLookupByUUIDString", +- sig => "conn, string : pool", weak => 1 }, ++ sig => "conn, string : pool" }, + { name => "virStoragePoolGetName", +- sig => "pool : static string", weak => 1 }, ++ sig => "pool : static string" }, + { name => "virStoragePoolGetXMLDesc", +- sig => "pool, 0U : string", weak => 1 }, ++ sig => "pool, 0U : string" }, + { name => "virStoragePoolGetUUID", +- sig => "pool : uuid", weak => 1 }, ++ sig => "pool : uuid" }, + { name => "virStoragePoolGetUUIDString", +- sig => "pool : uuid string", weak => 1 }, ++ sig => "pool : uuid string" }, + { name => "virStoragePoolCreateXML", +- sig => "conn, string, 0U : pool", weak => 1 }, ++ sig => "conn, string, 0U : pool" }, + { name => "virStoragePoolDefineXML", +- sig => "conn, string, 0U : pool", weak => 1 }, ++ sig => "conn, string, 0U : pool" }, + { name => "virStoragePoolBuild", +- sig => "pool, uint : unit", weak => 1 }, ++ sig => "pool, uint : unit" }, + { name => "virStoragePoolUndefine", +- sig => "pool : unit", weak => 1 }, ++ sig => "pool : unit" }, + { name => "virStoragePoolCreate", +- sig => "pool, 0U : unit", weak => 1 }, ++ sig => "pool, 0U : unit" }, + { name => "virStoragePoolDelete", +- sig => "pool, uint : unit", weak => 1 }, ++ sig => "pool, uint : unit" }, + { name => "virStoragePoolRefresh", +- sig => "pool, 0U : unit", weak => 1 }, ++ sig => "pool, 0U : unit" }, + { name => "virStoragePoolGetAutostart", +- sig => "pool : bool", weak => 1 }, ++ sig => "pool : bool" }, + { name => "virStoragePoolSetAutostart", +- sig => "pool, bool : unit", weak => 1 }, ++ sig => "pool, bool : unit" }, + { name => "virStoragePoolNumOfVolumes", +- sig => "pool : int", weak => 1 }, ++ sig => "pool : int" }, + { name => "virStoragePoolListVolumes", +- sig => "pool, int : string array", weak => 1 }, ++ sig => "pool, int : string array" }, + +- { name => "virStorageVolFree", sig => "vol : free", weak => 1 }, ++ { name => "virStorageVolFree", sig => "vol : free" }, + { name => "virStorageVolDelete", +- sig => "vol, uint : unit", weak => 1 }, ++ sig => "vol, uint : unit" }, + { name => "virStorageVolLookupByName", +- sig => "pool, string : vol from pool", weak => 1 }, ++ sig => "pool, string : vol from pool" }, + { name => "virStorageVolLookupByKey", +- sig => "conn, string : vol", weak => 1 }, ++ sig => "conn, string : vol" }, + { name => "virStorageVolLookupByPath", +- sig => "conn, string : vol", weak => 1 }, ++ sig => "conn, string : vol" }, + { name => "virStorageVolCreateXML", +- sig => "pool, string, 0U : vol from pool", weak => 1 }, ++ sig => "pool, string, 0U : vol from pool" }, + { name => "virStorageVolGetXMLDesc", +- sig => "vol, 0U : string", weak => 1 }, ++ sig => "vol, 0U : string" }, + { name => "virStorageVolGetPath", +- sig => "vol : string", weak => 1 }, ++ sig => "vol : string" }, + { name => "virStorageVolGetKey", +- sig => "vol : static string", weak => 1 }, ++ sig => "vol : static string" }, + { name => "virStorageVolGetName", +- sig => "vol : static string", weak => 1 }, ++ sig => "vol : static string" }, + { name => "virStoragePoolLookupByVolume", +- sig => "vol : pool from vol", weak => 1 }, ++ sig => "vol : pool from vol" }, + + ); + +@@ -270,115 +268,6 @@ sub short_name_to_c_type + } + } + +-# Generate a C signature for the original function. Used when building +-# weak bindings. +- +-sub gen_c_signature +-{ +- my $sig = shift; +- my $c_name = shift; +- +- if ($sig =~ /^(\w+) : string$/) { +- my $c_type = short_name_to_c_type ($1); +- "char *$c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+) : static string$/) { +- my $c_type = short_name_to_c_type ($1); +- "const char *$c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+) : int$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+) : uuid$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, unsigned char *)" +- } elsif ($sig =~ /^(\w+) : uuid string$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, char *)" +- } elsif ($sig =~ /^(\w+) : bool$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, int *r)" +- } elsif ($sig =~ /^(\w+), bool : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, int b)" +- } elsif ($sig eq "conn, int : int array") { +- "int $c_name (virConnectPtr conn, int *ids, int maxids)" +- } elsif ($sig =~ /^(\w+), int : string array$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, char **const names, int maxnames)" +- } elsif ($sig =~ /^(\w+), 0(U?) : string$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- "char *$c_name ($c_type $1, $unsigned int flags)" +- } elsif ($sig =~ /^(\w+), 0(U?) : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- "int $c_name ($c_type $1, $unsigned int flags)" +- } elsif ($sig =~ /^(\w+) : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+) : free$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+), string : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- "int $c_name ($c_type $1, const char *str)" +- } elsif ($sig =~ /^(\w+), string, 0(U?) : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- "int $c_name ($c_type $1, const char *str, ${unsigned}int flags)" +- } elsif ($sig =~ /^(\w+), string : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $c_ret_type = short_name_to_c_type ($2); +- "$c_ret_type $c_name ($c_type $1, const char *str)" +- } elsif ($sig =~ /^(\w+), string, 0(U?) : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- my $c_ret_type = short_name_to_c_type ($3); +- "$c_ret_type $c_name ($c_type $1, const char *str, ${unsigned}int flags)" +- } elsif ($sig =~ /^(\w+), (u?)int : unit$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "u" ? "unsigned " : ""; +- "int $c_name ($c_type $1, ${unsigned}int i)" +- } elsif ($sig =~ /^(\w+), (u?)int : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "u" ? "unsigned " : ""; +- my $c_ret_type = short_name_to_c_type ($3); +- "$c_ret_type $c_name ($c_type $1, ${unsigned}int i)" +- } elsif ($sig =~ /^(\w+), uuid : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $c_ret_type = short_name_to_c_type ($2); +- "$c_ret_type $c_name ($c_type $1, const unsigned char *str)" +- } elsif ($sig =~ /^(\w+), 0(U?) : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- my $c_ret_type = short_name_to_c_type ($3); +- "$c_ret_type $c_name ($c_type $1, $unsigned int flags)" +- } elsif ($sig =~ /^(\w+) : (\w+)$/) { +- my $c_type = short_name_to_c_type ($1); +- my $c_ret_type = short_name_to_c_type ($2); +- "$c_ret_type $c_name ($c_type $1)" +- } elsif ($sig =~ /^(\w+), string : (\w+) from \w+$/) { +- my $c_type = short_name_to_c_type ($1); +- my $c_ret_type = short_name_to_c_type ($2); +- "$c_ret_type $c_name ($c_type $1, const char *str)" +- } elsif ($sig =~ /^(\w+), string, 0(U?) : (\w+) from \w+$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- my $c_ret_type = short_name_to_c_type ($3); +- "$c_ret_type $c_name ($c_type $1, const char *str, $unsigned int flags)" +- } elsif ($sig =~ /^(\w+), 0(U?) : (\w+) from \w+$/) { +- my $c_type = short_name_to_c_type ($1); +- my $unsigned = $2 eq "U" ? "unsigned " : ""; +- my $c_ret_type = short_name_to_c_type ($3); +- "$c_ret_type $c_name ($c_type $1, $unsigned int flags)" +- } elsif ($sig =~ /^(\w+) : (\w+) from \w+$/) { +- my $c_type = short_name_to_c_type ($1); +- my $c_ret_type = short_name_to_c_type ($2); +- "$c_ret_type $c_name ($c_type $1)" +- } else { +- die "unknown signature $sig" +- } +-} +- + # OCaml argument names. + + sub gen_arg_names +@@ -883,7 +772,6 @@ sub gen_c_code + + foreach my $function (@functions) { + my $c_name = $function->{name}; +- my $is_weak = $function->{weak}; + my $sig = $function->{sig}; + + #print "generating $c_name with sig \"$sig\" ...\n"; +@@ -911,20 +799,6 @@ foreach my $function (@functions) { + + END + +- # Generate a full function prototype if the function is weak. +- my $have_name = "HAVE_" . uc ($c_name); +- if ($is_weak) { +- my $c_sig = gen_c_signature ($sig, $c_name); +- print F <= 0.2.1. One consequence of this is that +- your program can dynamically link to a {i newer} version of +- libvirt than it was compiled with, and it should still +- work. +- +- When we link to an older version of libvirt.so, there may +- be missing functions. If ocaml-libvirt was compiled with +- gcc, then these are turned into OCaml {!Libvirt.Not_supported} +- exceptions. +- +- We don't support libvirt < 0.2.1, and never will so don't ask us. ++ OCaml-libvirt requires libvirt version 1.0.2 or later. Future ++ releases of OCaml-libvirt will use newer features of libvirt ++ and therefore will require later versions of libvirt. It is always ++ possible to dynamically link your application against a newer ++ libvirt than OCaml-libvirt was originally compiled against. + + {3 Get list of domains and domain infos} + +diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c +index d07a55e..00dbbbc 100644 +--- a/libvirt/libvirt_c.c ++++ b/libvirt/libvirt_c.c +@@ -73,25 +73,10 @@ ocaml_libvirt_connect_close (value connv) + * In generator.pl this function has signature "conn : string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTGETHOSTNAME +-extern char *virConnectGetHostname (virConnectPtr conn) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_get_hostname (value connv) + { + CAMLparam1 (connv); +-#ifndef HAVE_VIRCONNECTGETHOSTNAME +- /* Symbol virConnectGetHostname not found at compile time. */ +- not_supported ("virConnectGetHostname"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectGetHostname +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectGetHostname); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -103,32 +88,16 @@ ocaml_libvirt_connect_get_hostname (value connv) + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virConnectGetURI. + * In generator.pl this function has signature "conn : string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTGETURI +-extern char *virConnectGetURI (virConnectPtr conn) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_get_uri (value connv) + { + CAMLparam1 (connv); +-#ifndef HAVE_VIRCONNECTGETURI +- /* Symbol virConnectGetURI not found at compile time. */ +- not_supported ("virConnectGetURI"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectGetURI +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectGetURI); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -140,7 +109,6 @@ ocaml_libvirt_connect_get_uri (value connv) + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virConnectGetType. +@@ -387,25 +355,10 @@ ocaml_libvirt_connect_list_defined_networks (value connv, value iv) + * In generator.pl this function has signature "conn : int". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS +-extern int virConnectNumOfStoragePools (virConnectPtr conn) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_num_of_storage_pools (value connv) + { + CAMLparam1 (connv); +-#ifndef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS +- /* Symbol virConnectNumOfStoragePools not found at compile time. */ +- not_supported ("virConnectNumOfStoragePools"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectNumOfStoragePools +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectNumOfStoragePools); + + virConnectPtr conn = Connect_val (connv); + int r; +@@ -414,32 +367,16 @@ ocaml_libvirt_connect_num_of_storage_pools (value connv) + CHECK_ERROR (r == -1, conn, "virConnectNumOfStoragePools"); + + CAMLreturn (Val_int (r)); +-#endif + } + + /* Automatically generated binding for virConnectListStoragePools. + * In generator.pl this function has signature "conn, int : string array". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTLISTSTORAGEPOOLS +-extern int virConnectListStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_list_storage_pools (value connv, value iv) + { + CAMLparam2 (connv, iv); +-#ifndef HAVE_VIRCONNECTLISTSTORAGEPOOLS +- /* Symbol virConnectListStoragePools not found at compile time. */ +- not_supported ("virConnectListStoragePools"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectListStoragePools +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectListStoragePools); + + CAMLlocal2 (rv, strv); + virConnectPtr conn = Connect_val (connv); +@@ -468,32 +405,16 @@ ocaml_libvirt_connect_list_storage_pools (value connv, value iv) + } + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virConnectNumOfDefinedStoragePools. + * In generator.pl this function has signature "conn : int". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS +-extern int virConnectNumOfDefinedStoragePools (virConnectPtr conn) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_num_of_defined_storage_pools (value connv) + { + CAMLparam1 (connv); +-#ifndef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS +- /* Symbol virConnectNumOfDefinedStoragePools not found at compile time. */ +- not_supported ("virConnectNumOfDefinedStoragePools"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectNumOfDefinedStoragePools +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectNumOfDefinedStoragePools); + + virConnectPtr conn = Connect_val (connv); + int r; +@@ -502,32 +423,16 @@ ocaml_libvirt_connect_num_of_defined_storage_pools (value connv) + CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedStoragePools"); + + CAMLreturn (Val_int (r)); +-#endif + } + + /* Automatically generated binding for virConnectListDefinedStoragePools. + * In generator.pl this function has signature "conn, int : string array". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS +-extern int virConnectListDefinedStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv) + { + CAMLparam2 (connv, iv); +-#ifndef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS +- /* Symbol virConnectListDefinedStoragePools not found at compile time. */ +- not_supported ("virConnectListDefinedStoragePools"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virConnectListDefinedStoragePools +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virConnectListDefinedStoragePools); + + CAMLlocal2 (rv, strv); + virConnectPtr conn = Connect_val (connv); +@@ -556,7 +461,6 @@ ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv) + } + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virConnectGetCapabilities. +@@ -1487,25 +1391,10 @@ ocaml_libvirt_network_set_autostart (value netv, value bv) + * In generator.pl this function has signature "pool : free". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLFREE +-extern int virStoragePoolFree (virStoragePoolPtr pool) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_free (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLFREE +- /* Symbol virStoragePoolFree not found at compile time. */ +- not_supported ("virStoragePoolFree"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolFree +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolFree); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -1518,32 +1407,16 @@ ocaml_libvirt_storage_pool_free (value poolv) + Pool_val (poolv) = NULL; + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolDestroy. + * In generator.pl this function has signature "pool : free". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLDESTROY +-extern int virStoragePoolDestroy (virStoragePoolPtr pool) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_destroy (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLDESTROY +- /* Symbol virStoragePoolDestroy not found at compile time. */ +- not_supported ("virStoragePoolDestroy"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolDestroy +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolDestroy); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -1556,32 +1429,16 @@ ocaml_libvirt_storage_pool_destroy (value poolv) + Pool_val (poolv) = NULL; + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolLookupByName. + * In generator.pl this function has signature "conn, string : pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME +-extern virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn, const char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_lookup_by_name (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME +- /* Symbol virStoragePoolLookupByName not found at compile time. */ +- not_supported ("virStoragePoolLookupByName"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolLookupByName +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolLookupByName); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -1594,32 +1451,16 @@ ocaml_libvirt_storage_pool_lookup_by_name (value connv, value strv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolLookupByUUID. + * In generator.pl this function has signature "conn, uuid : pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID +-extern virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn, const unsigned char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_lookup_by_uuid (value connv, value uuidv) + { + CAMLparam2 (connv, uuidv); +-#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID +- /* Symbol virStoragePoolLookupByUUID not found at compile time. */ +- not_supported ("virStoragePoolLookupByUUID"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolLookupByUUID +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolLookupByUUID); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -1632,32 +1473,16 @@ ocaml_libvirt_storage_pool_lookup_by_uuid (value connv, value uuidv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolLookupByUUIDString. + * In generator.pl this function has signature "conn, string : pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING +-extern virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn, const char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_lookup_by_uuid_string (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING +- /* Symbol virStoragePoolLookupByUUIDString not found at compile time. */ +- not_supported ("virStoragePoolLookupByUUIDString"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolLookupByUUIDString +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolLookupByUUIDString); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -1670,32 +1495,16 @@ ocaml_libvirt_storage_pool_lookup_by_uuid_string (value connv, value strv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolGetName. + * In generator.pl this function has signature "pool : static string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETNAME +-extern const char *virStoragePoolGetName (virStoragePoolPtr pool) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_name (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLGETNAME +- /* Symbol virStoragePoolGetName not found at compile time. */ +- not_supported ("virStoragePoolGetName"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolGetName +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolGetName); + + CAMLlocal1 (rv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -1707,32 +1516,16 @@ ocaml_libvirt_storage_pool_get_name (value poolv) + + rv = caml_copy_string (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolGetXMLDesc. + * In generator.pl this function has signature "pool, 0U : string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETXMLDESC +-extern char *virStoragePoolGetXMLDesc (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_xml_desc (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLGETXMLDESC +- /* Symbol virStoragePoolGetXMLDesc not found at compile time. */ +- not_supported ("virStoragePoolGetXMLDesc"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolGetXMLDesc +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolGetXMLDesc); + + CAMLlocal1 (rv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -1745,32 +1538,16 @@ ocaml_libvirt_storage_pool_get_xml_desc (value poolv) + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolGetUUID. + * In generator.pl this function has signature "pool : uuid". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETUUID +-extern int virStoragePoolGetUUID (virStoragePoolPtr pool, unsigned char *) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_uuid (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLGETUUID +- /* Symbol virStoragePoolGetUUID not found at compile time. */ +- not_supported ("virStoragePoolGetUUID"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolGetUUID +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolGetUUID); + + CAMLlocal1 (rv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -1785,32 +1562,16 @@ ocaml_libvirt_storage_pool_get_uuid (value poolv) + rv = caml_alloc_string (VIR_UUID_BUFLEN); + memcpy (String_val (rv), uuid, VIR_UUID_BUFLEN); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolGetUUIDString. + * In generator.pl this function has signature "pool : uuid string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETUUIDSTRING +-extern int virStoragePoolGetUUIDString (virStoragePoolPtr pool, char *) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_uuid_string (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLGETUUIDSTRING +- /* Symbol virStoragePoolGetUUIDString not found at compile time. */ +- not_supported ("virStoragePoolGetUUIDString"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolGetUUIDString +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolGetUUIDString); + + CAMLlocal1 (rv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -1823,32 +1584,16 @@ ocaml_libvirt_storage_pool_get_uuid_string (value poolv) + + rv = caml_copy_string (uuid); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolCreateXML. + * In generator.pl this function has signature "conn, string, 0U : pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLCREATEXML +-extern virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_create_xml (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEPOOLCREATEXML +- /* Symbol virStoragePoolCreateXML not found at compile time. */ +- not_supported ("virStoragePoolCreateXML"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolCreateXML +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolCreateXML); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -1861,32 +1606,16 @@ ocaml_libvirt_storage_pool_create_xml (value connv, value strv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolDefineXML. + * In generator.pl this function has signature "conn, string, 0U : pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLDEFINEXML +-extern virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_define_xml (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEPOOLDEFINEXML +- /* Symbol virStoragePoolDefineXML not found at compile time. */ +- not_supported ("virStoragePoolDefineXML"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolDefineXML +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolDefineXML); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -1899,32 +1628,16 @@ ocaml_libvirt_storage_pool_define_xml (value connv, value strv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolBuild. + * In generator.pl this function has signature "pool, uint : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLBUILD +-extern int virStoragePoolBuild (virStoragePoolPtr pool, unsigned int i) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_build (value poolv, value iv) + { + CAMLparam2 (poolv, iv); +-#ifndef HAVE_VIRSTORAGEPOOLBUILD +- /* Symbol virStoragePoolBuild not found at compile time. */ +- not_supported ("virStoragePoolBuild"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolBuild +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolBuild); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -1935,32 +1648,16 @@ ocaml_libvirt_storage_pool_build (value poolv, value iv) + CHECK_ERROR (r == -1, conn, "virStoragePoolBuild"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolUndefine. + * In generator.pl this function has signature "pool : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLUNDEFINE +-extern int virStoragePoolUndefine (virStoragePoolPtr pool) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_undefine (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLUNDEFINE +- /* Symbol virStoragePoolUndefine not found at compile time. */ +- not_supported ("virStoragePoolUndefine"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolUndefine +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolUndefine); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -1970,32 +1667,16 @@ ocaml_libvirt_storage_pool_undefine (value poolv) + CHECK_ERROR (r == -1, conn, "virStoragePoolUndefine"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolCreate. + * In generator.pl this function has signature "pool, 0U : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLCREATE +-extern int virStoragePoolCreate (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_create (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLCREATE +- /* Symbol virStoragePoolCreate not found at compile time. */ +- not_supported ("virStoragePoolCreate"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolCreate +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolCreate); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2005,32 +1686,16 @@ ocaml_libvirt_storage_pool_create (value poolv) + CHECK_ERROR (r == -1, conn, "virStoragePoolCreate"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolDelete. + * In generator.pl this function has signature "pool, uint : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLDELETE +-extern int virStoragePoolDelete (virStoragePoolPtr pool, unsigned int i) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_delete (value poolv, value iv) + { + CAMLparam2 (poolv, iv); +-#ifndef HAVE_VIRSTORAGEPOOLDELETE +- /* Symbol virStoragePoolDelete not found at compile time. */ +- not_supported ("virStoragePoolDelete"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolDelete +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolDelete); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2041,32 +1706,16 @@ ocaml_libvirt_storage_pool_delete (value poolv, value iv) + CHECK_ERROR (r == -1, conn, "virStoragePoolDelete"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolRefresh. + * In generator.pl this function has signature "pool, 0U : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLREFRESH +-extern int virStoragePoolRefresh (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_refresh (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLREFRESH +- /* Symbol virStoragePoolRefresh not found at compile time. */ +- not_supported ("virStoragePoolRefresh"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolRefresh +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolRefresh); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2076,32 +1725,16 @@ ocaml_libvirt_storage_pool_refresh (value poolv) + CHECK_ERROR (r == -1, conn, "virStoragePoolRefresh"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolGetAutostart. + * In generator.pl this function has signature "pool : bool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETAUTOSTART +-extern int virStoragePoolGetAutostart (virStoragePoolPtr pool, int *r) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_autostart (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLGETAUTOSTART +- /* Symbol virStoragePoolGetAutostart not found at compile time. */ +- not_supported ("virStoragePoolGetAutostart"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolGetAutostart +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolGetAutostart); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2111,32 +1744,16 @@ ocaml_libvirt_storage_pool_get_autostart (value poolv) + CHECK_ERROR (r == -1, conn, "virStoragePoolGetAutostart"); + + CAMLreturn (b ? Val_true : Val_false); +-#endif + } + + /* Automatically generated binding for virStoragePoolSetAutostart. + * In generator.pl this function has signature "pool, bool : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLSETAUTOSTART +-extern int virStoragePoolSetAutostart (virStoragePoolPtr pool, int b) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_set_autostart (value poolv, value bv) + { + CAMLparam2 (poolv, bv); +-#ifndef HAVE_VIRSTORAGEPOOLSETAUTOSTART +- /* Symbol virStoragePoolSetAutostart not found at compile time. */ +- not_supported ("virStoragePoolSetAutostart"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolSetAutostart +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolSetAutostart); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2148,32 +1765,16 @@ ocaml_libvirt_storage_pool_set_autostart (value poolv, value bv) + CHECK_ERROR (r == -1, conn, "virStoragePoolSetAutostart"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStoragePoolNumOfVolumes. + * In generator.pl this function has signature "pool : int". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES +-extern int virStoragePoolNumOfVolumes (virStoragePoolPtr pool) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_num_of_volumes (value poolv) + { + CAMLparam1 (poolv); +-#ifndef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES +- /* Symbol virStoragePoolNumOfVolumes not found at compile time. */ +- not_supported ("virStoragePoolNumOfVolumes"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolNumOfVolumes +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolNumOfVolumes); + + virStoragePoolPtr pool = Pool_val (poolv); + virConnectPtr conn = Connect_polv (poolv); +@@ -2183,32 +1784,16 @@ ocaml_libvirt_storage_pool_num_of_volumes (value poolv) + CHECK_ERROR (r == -1, conn, "virStoragePoolNumOfVolumes"); + + CAMLreturn (Val_int (r)); +-#endif + } + + /* Automatically generated binding for virStoragePoolListVolumes. + * In generator.pl this function has signature "pool, int : string array". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLLISTVOLUMES +-extern int virStoragePoolListVolumes (virStoragePoolPtr pool, char **const names, int maxnames) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_list_volumes (value poolv, value iv) + { + CAMLparam2 (poolv, iv); +-#ifndef HAVE_VIRSTORAGEPOOLLISTVOLUMES +- /* Symbol virStoragePoolListVolumes not found at compile time. */ +- not_supported ("virStoragePoolListVolumes"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolListVolumes +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolListVolumes); + + CAMLlocal2 (rv, strv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -2238,32 +1823,16 @@ ocaml_libvirt_storage_pool_list_volumes (value poolv, value iv) + } + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolFree. + * In generator.pl this function has signature "vol : free". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLFREE +-extern int virStorageVolFree (virStorageVolPtr vol) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_free (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEVOLFREE +- /* Symbol virStorageVolFree not found at compile time. */ +- not_supported ("virStorageVolFree"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolFree +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolFree); + + virStorageVolPtr vol = Volume_val (volv); + virConnectPtr conn = Connect_volv (volv); +@@ -2276,32 +1845,16 @@ ocaml_libvirt_storage_vol_free (value volv) + Volume_val (volv) = NULL; + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStorageVolDelete. + * In generator.pl this function has signature "vol, uint : unit". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLDELETE +-extern int virStorageVolDelete (virStorageVolPtr vol, unsigned int i) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_delete (value volv, value iv) + { + CAMLparam2 (volv, iv); +-#ifndef HAVE_VIRSTORAGEVOLDELETE +- /* Symbol virStorageVolDelete not found at compile time. */ +- not_supported ("virStorageVolDelete"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolDelete +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolDelete); + + virStorageVolPtr vol = Volume_val (volv); + virConnectPtr conn = Connect_volv (volv); +@@ -2312,32 +1865,16 @@ ocaml_libvirt_storage_vol_delete (value volv, value iv) + CHECK_ERROR (r == -1, conn, "virStorageVolDelete"); + + CAMLreturn (Val_unit); +-#endif + } + + /* Automatically generated binding for virStorageVolLookupByName. + * In generator.pl this function has signature "pool, string : vol from pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYNAME +-extern virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool, const char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_lookup_by_name (value poolv, value strv) + { + CAMLparam2 (poolv, strv); +-#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYNAME +- /* Symbol virStorageVolLookupByName not found at compile time. */ +- not_supported ("virStorageVolLookupByName"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolLookupByName +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolLookupByName); + + CAMLlocal2 (rv, connv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -2352,32 +1889,16 @@ ocaml_libvirt_storage_vol_lookup_by_name (value poolv, value strv) + rv = Val_volume (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolLookupByKey. + * In generator.pl this function has signature "conn, string : vol". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYKEY +-extern virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn, const char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_lookup_by_key (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYKEY +- /* Symbol virStorageVolLookupByKey not found at compile time. */ +- not_supported ("virStorageVolLookupByKey"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolLookupByKey +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolLookupByKey); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -2390,32 +1911,16 @@ ocaml_libvirt_storage_vol_lookup_by_key (value connv, value strv) + rv = Val_volume (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolLookupByPath. + * In generator.pl this function has signature "conn, string : vol". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYPATH +-extern virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn, const char *str) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_lookup_by_path (value connv, value strv) + { + CAMLparam2 (connv, strv); +-#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYPATH +- /* Symbol virStorageVolLookupByPath not found at compile time. */ +- not_supported ("virStorageVolLookupByPath"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolLookupByPath +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolLookupByPath); + + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); +@@ -2428,32 +1933,16 @@ ocaml_libvirt_storage_vol_lookup_by_path (value connv, value strv) + rv = Val_volume (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolCreateXML. + * In generator.pl this function has signature "pool, string, 0U : vol from pool". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLCREATEXML +-extern virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool, const char *str, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_create_xml (value poolv, value strv) + { + CAMLparam2 (poolv, strv); +-#ifndef HAVE_VIRSTORAGEVOLCREATEXML +- /* Symbol virStorageVolCreateXML not found at compile time. */ +- not_supported ("virStorageVolCreateXML"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolCreateXML +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolCreateXML); + + CAMLlocal2 (rv, connv); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -2468,32 +1957,16 @@ ocaml_libvirt_storage_vol_create_xml (value poolv, value strv) + rv = Val_volume (r, connv); + + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolGetXMLDesc. + * In generator.pl this function has signature "vol, 0U : string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLGETXMLDESC +-extern char *virStorageVolGetXMLDesc (virStorageVolPtr vol, unsigned int flags) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_get_xml_desc (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEVOLGETXMLDESC +- /* Symbol virStorageVolGetXMLDesc not found at compile time. */ +- not_supported ("virStorageVolGetXMLDesc"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolGetXMLDesc +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolGetXMLDesc); + + CAMLlocal1 (rv); + virStorageVolPtr vol = Volume_val (volv); +@@ -2506,32 +1979,16 @@ ocaml_libvirt_storage_vol_get_xml_desc (value volv) + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolGetPath. + * In generator.pl this function has signature "vol : string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLGETPATH +-extern char *virStorageVolGetPath (virStorageVolPtr vol) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_get_path (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEVOLGETPATH +- /* Symbol virStorageVolGetPath not found at compile time. */ +- not_supported ("virStorageVolGetPath"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolGetPath +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolGetPath); + + CAMLlocal1 (rv); + virStorageVolPtr vol = Volume_val (volv); +@@ -2544,32 +2001,16 @@ ocaml_libvirt_storage_vol_get_path (value volv) + rv = caml_copy_string (r); + free (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolGetKey. + * In generator.pl this function has signature "vol : static string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLGETKEY +-extern const char *virStorageVolGetKey (virStorageVolPtr vol) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_get_key (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEVOLGETKEY +- /* Symbol virStorageVolGetKey not found at compile time. */ +- not_supported ("virStorageVolGetKey"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolGetKey +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolGetKey); + + CAMLlocal1 (rv); + virStorageVolPtr vol = Volume_val (volv); +@@ -2581,32 +2022,16 @@ ocaml_libvirt_storage_vol_get_key (value volv) + + rv = caml_copy_string (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStorageVolGetName. + * In generator.pl this function has signature "vol : static string". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLGETNAME +-extern const char *virStorageVolGetName (virStorageVolPtr vol) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_get_name (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEVOLGETNAME +- /* Symbol virStorageVolGetName not found at compile time. */ +- not_supported ("virStorageVolGetName"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStorageVolGetName +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStorageVolGetName); + + CAMLlocal1 (rv); + virStorageVolPtr vol = Volume_val (volv); +@@ -2618,32 +2043,16 @@ ocaml_libvirt_storage_vol_get_name (value volv) + + rv = caml_copy_string (r); + CAMLreturn (rv); +-#endif + } + + /* Automatically generated binding for virStoragePoolLookupByVolume. + * In generator.pl this function has signature "vol : pool from vol". + */ + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME +-extern virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol) __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_lookup_by_volume (value volv) + { + CAMLparam1 (volv); +-#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME +- /* Symbol virStoragePoolLookupByVolume not found at compile time. */ +- not_supported ("virStoragePoolLookupByVolume"); +- CAMLnoreturn; +-#else +- /* Check that the symbol virStoragePoolLookupByVolume +- * is in runtime version of libvirt. +- */ +- WEAK_SYMBOL_CHECK (virStoragePoolLookupByVolume); + + CAMLlocal2 (rv, connv); + virStorageVolPtr vol = Volume_val (volv); +@@ -2657,7 +2066,6 @@ ocaml_libvirt_storage_pool_lookup_by_volume (value volv) + rv = Val_pool (r, connv); + + CAMLreturn (rv); +-#endif + } + + #include "libvirt_c_epilogue.c" +diff --git a/libvirt/libvirt_c_epilogue.c b/libvirt/libvirt_c_epilogue.c +index ac69fce..4649724 100644 +--- a/libvirt/libvirt_c_epilogue.c ++++ b/libvirt/libvirt_c_epilogue.c +@@ -193,12 +193,8 @@ Val_virterror (virErrorPtr err) + static void conn_finalize (value); + static void dom_finalize (value); + static void net_finalize (value); +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static void pol_finalize (value); +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + static void vol_finalize (value); +-#endif + + static struct custom_operations conn_custom_operations = { + "conn_custom_operations", +@@ -228,7 +224,6 @@ static struct custom_operations net_custom_operations = { + custom_deserialize_default + }; + +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static struct custom_operations pol_custom_operations = { + "pol_custom_operations", + pol_finalize, +@@ -237,9 +232,7 @@ static struct custom_operations pol_custom_operations = { + custom_serialize_default, + custom_deserialize_default + }; +-#endif + +-#ifdef HAVE_VIRSTORAGEVOLPTR + static struct custom_operations vol_custom_operations = { + "vol_custom_operations", + vol_finalize, +@@ -248,7 +241,6 @@ static struct custom_operations vol_custom_operations = { + custom_serialize_default, + custom_deserialize_default + }; +-#endif + + static value + Val_connect (virConnectPtr conn) +@@ -283,7 +275,6 @@ Val_net (virNetworkPtr net) + CAMLreturn (rv); + } + +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static value + Val_pol (virStoragePoolPtr pol) + { +@@ -294,9 +285,7 @@ Val_pol (virStoragePoolPtr pol) + Pol_val (rv) = pol; + CAMLreturn (rv); + } +-#endif + +-#ifdef HAVE_VIRSTORAGEVOLPTR + static value + Val_vol (virStorageVolPtr vol) + { +@@ -307,7 +296,6 @@ Val_vol (virStorageVolPtr vol) + Vol_val (rv) = vol; + CAMLreturn (rv); + } +-#endif + + /* This wraps up the (dom, conn) pair (Domain.t). */ + static value +@@ -337,7 +325,6 @@ Val_network (virNetworkPtr net, value connv) + CAMLreturn (rv); + } + +-#ifdef HAVE_VIRSTORAGEPOOLPTR + /* This wraps up the (pol, conn) pair (Pool.t). */ + static value + Val_pool (virStoragePoolPtr pol, value connv) +@@ -351,9 +338,7 @@ Val_pool (virStoragePoolPtr pol, value connv) + Store_field (rv, 1, connv); + CAMLreturn (rv); + } +-#endif + +-#ifdef HAVE_VIRSTORAGEVOLPTR + /* This wraps up the (vol, conn) pair (Volume.t). */ + static value + Val_volume (virStorageVolPtr vol, value connv) +@@ -367,7 +352,6 @@ Val_volume (virStorageVolPtr vol, value connv) + Store_field (rv, 1, connv); + CAMLreturn (rv); + } +-#endif + + static void + conn_finalize (value connv) +@@ -390,20 +374,16 @@ net_finalize (value netv) + if (net) (void) virNetworkFree (net); + } + +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static void + pol_finalize (value polv) + { + virStoragePoolPtr pol = Pol_val (polv); + if (pol) (void) virStoragePoolFree (pol); + } +-#endif + +-#ifdef HAVE_VIRSTORAGEVOLPTR + static void + vol_finalize (value volv) + { + virStorageVolPtr vol = Vol_val (volv); + if (vol) (void) virStorageVolFree (vol); + } +-#endif +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index b1d88cc..42301b7 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -129,47 +129,25 @@ ocaml_libvirt_connect_get_node_info (value connv) + CAMLreturn (rv); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRNODEGETFREEMEMORY +-extern unsigned long long virNodeGetFreeMemory (virConnectPtr conn) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_node_get_free_memory (value connv) + { +-#ifdef HAVE_VIRNODEGETFREEMEMORY + CAMLparam1 (connv); + CAMLlocal1 (rv); + virConnectPtr conn = Connect_val (connv); + unsigned long long r; + +- WEAK_SYMBOL_CHECK (virNodeGetFreeMemory); + NONBLOCKING (r = virNodeGetFreeMemory (conn)); + CHECK_ERROR (r == 0, conn, "virNodeGetFreeMemory"); + + rv = caml_copy_int64 ((int64) r); + CAMLreturn (rv); +-#else +- not_supported ("virNodeGetFreeMemory"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRNODEGETCELLSFREEMEMORY +-extern int virNodeGetCellsFreeMemory (virConnectPtr conn, +- unsigned long long *freeMems, +- int startCell, int maxCells) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_connect_node_get_cells_free_memory (value connv, + value startv, value maxv) + { +-#ifdef HAVE_VIRNODEGETCELLSFREEMEMORY + CAMLparam3 (connv, startv, maxv); + CAMLlocal2 (rv, iv); + virConnectPtr conn = Connect_val (connv); +@@ -178,7 +156,6 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, + int r, i; + unsigned long long freemems[max]; + +- WEAK_SYMBOL_CHECK (virNodeGetCellsFreeMemory); + NONBLOCKING (r = virNodeGetCellsFreeMemory (conn, freemems, start, max)); + CHECK_ERROR (r == -1, conn, "virNodeGetCellsFreeMemory"); + +@@ -189,9 +166,6 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, + } + + CAMLreturn (rv); +-#else +- not_supported ("virNodeGetCellsFreeMemory"); +-#endif + } + + CAMLprim value +@@ -280,18 +254,9 @@ ocaml_libvirt_domain_get_info (value domv) + CAMLreturn (rv); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINGETSCHEDULERTYPE +-extern char *virDomainGetSchedulerType(virDomainPtr domain, +- int *nparams) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_get_scheduler_type (value domv) + { +-#ifdef HAVE_VIRDOMAINGETSCHEDULERTYPE + CAMLparam1 (domv); + CAMLlocal2 (rv, strv); + virDomainPtr dom = Domain_val (domv); +@@ -299,7 +264,6 @@ ocaml_libvirt_domain_get_scheduler_type (value domv) + char *r; + int nparams; + +- WEAK_SYMBOL_CHECK (virDomainGetSchedulerType); + NONBLOCKING (r = virDomainGetSchedulerType (dom, &nparams)); + CHECK_ERROR (!r, conn, "virDomainGetSchedulerType"); + +@@ -308,24 +272,11 @@ ocaml_libvirt_domain_get_scheduler_type (value domv) + free (r); + Store_field (rv, 1, nparams); + CAMLreturn (rv); +-#else +- not_supported ("virDomainGetSchedulerType"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS +-extern int virDomainGetSchedulerParameters (virDomainPtr domain, +- virSchedParameterPtr params, +- int *nparams) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) + { +-#ifdef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS + CAMLparam2 (domv, nparamsv); + CAMLlocal4 (rv, v, v2, v3); + virDomainPtr dom = Domain_val (domv); +@@ -334,7 +285,6 @@ ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) + virSchedParameter params[nparams]; + int r, i; + +- WEAK_SYMBOL_CHECK (virDomainGetSchedulerParameters); + NONBLOCKING (r = virDomainGetSchedulerParameters (dom, params, &nparams)); + CHECK_ERROR (r == -1, conn, "virDomainGetSchedulerParameters"); + +@@ -373,24 +323,11 @@ ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) + Store_field (v, 1, v2); + } + CAMLreturn (rv); +-#else +- not_supported ("virDomainGetSchedulerParameters"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS +-extern int virDomainSetSchedulerParameters (virDomainPtr domain, +- virSchedParameterPtr params, +- int nparams) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_set_scheduler_parameters (value domv, value paramsv) + { +-#ifdef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS + CAMLparam2 (domv, paramsv); + CAMLlocal1 (v); + virDomainPtr dom = Domain_val (domv); +@@ -436,14 +373,10 @@ ocaml_libvirt_domain_set_scheduler_parameters (value domv, value paramsv) + } + } + +- WEAK_SYMBOL_CHECK (virDomainSetSchedulerParameters); + NONBLOCKING (r = virDomainSetSchedulerParameters (dom, params, nparams)); + CHECK_ERROR (r == -1, conn, "virDomainSetSchedulerParameters"); + + CAMLreturn (Val_unit); +-#else +- not_supported ("virDomainSetSchedulerParameters"); +-#endif + } + + CAMLprim value +@@ -519,22 +452,9 @@ ocaml_libvirt_domain_get_vcpus (value domv, value maxinfov, value maplenv) + CAMLreturn (rv); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINGETCPUSTATS +-extern int virDomainGetCPUStats (virDomainPtr domain, +- virTypedParameterPtr params, +- unsigned int nparams, +- int start_cpu, +- unsigned int ncpus, +- unsigned int flags) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_get_cpu_stats (value domv) + { +-#ifdef HAVE_VIRDOMAINGETCPUSTATS + CAMLparam1 (domv); + CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); + CAMLlocal1 (v); +@@ -633,24 +553,11 @@ ocaml_libvirt_domain_get_cpu_stats (value domv) + } + free(params); + CAMLreturn (cpustats); +-#else +- not_supported ("virDomainGetCPUStats"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINMIGRATE +-extern virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, +- unsigned long flags, const char *dname, +- const char *uri, unsigned long bandwidth) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_migrate_native (value domv, value dconnv, value flagsv, value optdnamev, value opturiv, value optbandwidthv, value unitv) + { +-#ifdef HAVE_VIRDOMAINMIGRATE + CAMLparam5 (domv, dconnv, flagsv, optdnamev, opturiv); + CAMLxparam2 (optbandwidthv, unitv); + CAMLlocal2 (flagv, rv); +@@ -676,17 +583,12 @@ ocaml_libvirt_domain_migrate_native (value domv, value dconnv, value flagsv, val + else /* Some bandwidth */ + bandwidth = Int_val (Field (optbandwidthv, 0)); + +- WEAK_SYMBOL_CHECK (virDomainMigrate); + NONBLOCKING (r = virDomainMigrate (dom, dconn, flags, dname, uri, bandwidth)); + CHECK_ERROR (!r, conn, "virDomainMigrate"); + + rv = Val_domain (r, dconnv); + + CAMLreturn (rv); +- +-#else /* virDomainMigrate not supported */ +- not_supported ("virDomainMigrate"); +-#endif + } + + CAMLprim value +@@ -697,20 +599,9 @@ ocaml_libvirt_domain_migrate_bytecode (value *argv, int argn) + argv[6]); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINBLOCKSTATS +-extern int virDomainBlockStats (virDomainPtr dom, +- const char *path, +- virDomainBlockStatsPtr stats, +- size_t size) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_block_stats (value domv, value pathv) + { +-#if HAVE_VIRDOMAINBLOCKSTATS + CAMLparam2 (domv, pathv); + CAMLlocal2 (rv,v); + virDomainPtr dom = Domain_val (domv); +@@ -719,7 +610,6 @@ ocaml_libvirt_domain_block_stats (value domv, value pathv) + struct _virDomainBlockStats stats; + int r; + +- WEAK_SYMBOL_CHECK (virDomainBlockStats); + NONBLOCKING (r = virDomainBlockStats (dom, path, &stats, sizeof stats)); + CHECK_ERROR (r == -1, conn, "virDomainBlockStats"); + +@@ -731,25 +621,11 @@ ocaml_libvirt_domain_block_stats (value domv, value pathv) + v = caml_copy_int64 (stats.errs); Store_field (rv, 4, v); + + CAMLreturn (rv); +-#else +- not_supported ("virDomainBlockStats"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAININTERFACESTATS +-extern int virDomainInterfaceStats (virDomainPtr dom, +- const char *path, +- virDomainInterfaceStatsPtr stats, +- size_t size) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_interface_stats (value domv, value pathv) + { +-#if HAVE_VIRDOMAININTERFACESTATS + CAMLparam2 (domv, pathv); + CAMLlocal2 (rv,v); + virDomainPtr dom = Domain_val (domv); +@@ -758,7 +634,6 @@ ocaml_libvirt_domain_interface_stats (value domv, value pathv) + struct _virDomainInterfaceStats stats; + int r; + +- WEAK_SYMBOL_CHECK (virDomainInterfaceStats); + NONBLOCKING (r = virDomainInterfaceStats (dom, path, &stats, sizeof stats)); + CHECK_ERROR (r == -1, conn, "virDomainInterfaceStats"); + +@@ -773,27 +648,11 @@ ocaml_libvirt_domain_interface_stats (value domv, value pathv) + v = caml_copy_int64 (stats.tx_drop); Store_field (rv, 7, v); + + CAMLreturn (rv); +-#else +- not_supported ("virDomainInterfaceStats"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINBLOCKPEEK +-extern int virDomainBlockPeek (virDomainPtr domain, +- const char *path, +- unsigned long long offset, +- size_t size, +- void *buffer, +- unsigned int flags) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_block_peek_native (value domv, value pathv, value offsetv, value sizev, value bufferv, value boffv) + { +-#ifdef HAVE_VIRDOMAINBLOCKPEEK + CAMLparam5 (domv, pathv, offsetv, sizev, bufferv); + CAMLxparam1 (boffv); + virDomainPtr dom = Domain_val (domv); +@@ -809,16 +668,11 @@ ocaml_libvirt_domain_block_peek_native (value domv, value pathv, value offsetv, + if (caml_string_length (bufferv) < boff + size) + caml_failwith ("virDomainBlockPeek: return buffer too short"); + +- WEAK_SYMBOL_CHECK (virDomainBlockPeek); + /* NB. not NONBLOCKING because buffer might move (XXX) */ + r = virDomainBlockPeek (dom, path, offset, size, buffer+boff, 0); + CHECK_ERROR (r == -1, conn, "virDomainBlockPeek"); + + CAMLreturn (Val_unit); +- +-#else /* virDomainBlockPeek not supported */ +- not_supported ("virDomainBlockPeek"); +-#endif + } + + CAMLprim value +@@ -828,21 +682,9 @@ ocaml_libvirt_domain_block_peek_bytecode (value *argv, int argn) + argv[3], argv[4], argv[5]); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRDOMAINMEMORYPEEK +-extern int virDomainMemoryPeek (virDomainPtr domain, +- unsigned long long start, +- size_t size, +- void *buffer, +- unsigned int flags) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_domain_memory_peek_native (value domv, value flagsv, value offsetv, value sizev, value bufferv, value boffv) + { +-#ifdef HAVE_VIRDOMAINMEMORYPEEK + CAMLparam5 (domv, flagsv, offsetv, sizev, bufferv); + CAMLxparam1 (boffv); + CAMLlocal1 (flagv); +@@ -867,16 +709,11 @@ ocaml_libvirt_domain_memory_peek_native (value domv, value flagsv, value offsetv + flags |= VIR_MEMORY_VIRTUAL; + } + +- WEAK_SYMBOL_CHECK (virDomainMemoryPeek); + /* NB. not NONBLOCKING because buffer might move (XXX) */ + r = virDomainMemoryPeek (dom, offset, size, buffer+boff, flags); + CHECK_ERROR (r == -1, conn, "virDomainMemoryPeek"); + + CAMLreturn (Val_unit); +- +-#else /* virDomainMemoryPeek not supported */ +- not_supported ("virDomainMemoryPeek"); +-#endif + } + + CAMLprim value +@@ -886,17 +723,9 @@ ocaml_libvirt_domain_memory_peek_bytecode (value *argv, int argn) + argv[3], argv[4], argv[5]); + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEPOOLGETINFO +-extern int virStoragePoolGetInfo(virStoragePoolPtr pool, virStoragePoolInfoPtr info) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_pool_get_info (value poolv) + { +-#if HAVE_VIRSTORAGEPOOLGETINFO + CAMLparam1 (poolv); + CAMLlocal2 (rv, v); + virStoragePoolPtr pool = Pool_val (poolv); +@@ -904,7 +733,6 @@ ocaml_libvirt_storage_pool_get_info (value poolv) + virStoragePoolInfo info; + int r; + +- WEAK_SYMBOL_CHECK (virStoragePoolGetInfo); + NONBLOCKING (r = virStoragePoolGetInfo (pool, &info)); + CHECK_ERROR (r == -1, conn, "virStoragePoolGetInfo"); + +@@ -915,22 +743,11 @@ ocaml_libvirt_storage_pool_get_info (value poolv) + v = caml_copy_int64 (info.available); Store_field (rv, 3, v); + + CAMLreturn (rv); +-#else +- not_supported ("virStoragePoolGetInfo"); +-#endif + } + +-#ifdef HAVE_WEAK_SYMBOLS +-#ifdef HAVE_VIRSTORAGEVOLGETINFO +-extern int virStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info) +- __attribute__((weak)); +-#endif +-#endif +- + CAMLprim value + ocaml_libvirt_storage_vol_get_info (value volv) + { +-#if HAVE_VIRSTORAGEVOLGETINFO + CAMLparam1 (volv); + CAMLlocal2 (rv, v); + virStorageVolPtr vol = Volume_val (volv); +@@ -938,7 +755,6 @@ ocaml_libvirt_storage_vol_get_info (value volv) + virStorageVolInfo info; + int r; + +- WEAK_SYMBOL_CHECK (virStorageVolGetInfo); + NONBLOCKING (r = virStorageVolGetInfo (vol, &info)); + CHECK_ERROR (r == -1, conn, "virStorageVolGetInfo"); + +@@ -948,9 +764,6 @@ ocaml_libvirt_storage_vol_get_info (value volv) + v = caml_copy_int64 (info.allocation); Store_field (rv, 2, v); + + CAMLreturn (rv); +-#else +- not_supported ("virStorageVolGetInfo"); +-#endif + } + + /*----------------------------------------------------------------------*/ +diff --git a/libvirt/libvirt_c_prologue.c b/libvirt/libvirt_c_prologue.c +index 2050078..7d9c0f5 100644 +--- a/libvirt/libvirt_c_prologue.c ++++ b/libvirt/libvirt_c_prologue.c +@@ -46,28 +46,6 @@ static value Val_virterror (virErrorPtr err); + #define CHECK_ERROR(cond, conn, fn) \ + do { if (cond) _raise_virterror (conn, fn); } while (0) + +-/* For more about weak symbols, see: +- * http://kolpackov.net/pipermail/notes/2004-March/000006.html +- * We are using this to do runtime detection of library functions +- * so that if we dynamically link with an older version of +- * libvirt than we were compiled against, it won't fail (provided +- * libvirt >= 0.2.1 - we don't support anything older). +- */ +-#ifdef __GNUC__ +-#ifdef linux +-#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) +-#define HAVE_WEAK_SYMBOLS 1 +-#endif +-#endif +-#endif +- +-#ifdef HAVE_WEAK_SYMBOLS +-#define WEAK_SYMBOL_CHECK(sym) \ +- do { if (!sym) not_supported(#sym); } while (0) +-#else +-#define WEAK_SYMBOL_CHECK(sym) +-#endif /* HAVE_WEAK_SYMBOLS */ +- + /*----------------------------------------------------------------------*/ + + /* Some notes about the use of custom blocks to store virConnectPtr, +@@ -113,49 +91,29 @@ static value Val_virterror (virErrorPtr err); + #define Connect_val(rv) (*((virConnectPtr *)Data_custom_val(rv))) + #define Dom_val(rv) (*((virDomainPtr *)Data_custom_val(rv))) + #define Net_val(rv) (*((virNetworkPtr *)Data_custom_val(rv))) +-#ifdef HAVE_VIRSTORAGEPOOLPTR + #define Pol_val(rv) (*((virStoragePoolPtr *)Data_custom_val(rv))) +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + #define Vol_val(rv) (*((virStorageVolPtr *)Data_custom_val(rv))) +-#endif + + /* Wrap up a pointer to something in a custom block. */ + static value Val_connect (virConnectPtr conn); + static value Val_dom (virDomainPtr dom); + static value Val_net (virNetworkPtr net); +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static value Val_pol (virStoragePoolPtr pool); +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + static value Val_vol (virStorageVolPtr vol); +-#endif + + /* Domains and networks are stored as pairs (dom/net, conn), so have + * some convenience functions for unwrapping and wrapping them. + */ + #define Domain_val(rv) (Dom_val(Field((rv),0))) + #define Network_val(rv) (Net_val(Field((rv),0))) +-#ifdef HAVE_VIRSTORAGEPOOLPTR + #define Pool_val(rv) (Pol_val(Field((rv),0))) +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + #define Volume_val(rv) (Vol_val(Field((rv),0))) +-#endif + #define Connect_domv(rv) (Connect_val(Field((rv),1))) + #define Connect_netv(rv) (Connect_val(Field((rv),1))) +-#ifdef HAVE_VIRSTORAGEPOOLPTR + #define Connect_polv(rv) (Connect_val(Field((rv),1))) +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + #define Connect_volv(rv) (Connect_val(Field((rv),1))) +-#endif + + static value Val_domain (virDomainPtr dom, value connv); + static value Val_network (virNetworkPtr net, value connv); +-#ifdef HAVE_VIRSTORAGEPOOLPTR + static value Val_pool (virStoragePoolPtr pol, value connv); +-#endif +-#ifdef HAVE_VIRSTORAGEVOLPTR + static value Val_volume (virStorageVolPtr vol, value connv); +-#endif diff --git a/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 b/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 new file mode 100644 index 00000000..591145a9 --- /dev/null +++ b/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 @@ -0,0 +1,73 @@ +commit 0ec198e7784de1a49672183c961a2498b6c85b90 +Author: David Scott +Date: Wed Apr 24 11:39:04 2013 +0100 + + Add binding for virConnectSetKeepAlive + + This one is a 'one-off' but it ought to be possible to use the generator + to create the function (it has signature 'conn, int, int : int') + + This function first appeared in libvirt version 0.9.8. + + Signed-off-by: David Scott + +diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml +index 1fbb8ca..784a2b5 100644 +--- a/libvirt/libvirt.ml ++++ b/libvirt/libvirt.ml +@@ -100,6 +100,8 @@ struct + let cpu_usable cpumaps maplen vcpu cpu = + Char.code cpumaps.[vcpu*maplen + cpu/8] land (1 lsl (cpu mod 8)) <> 0 + ++ external set_keep_alive : [>`R] t -> int -> int -> unit = "ocaml_libvirt_connect_set_keep_alive" ++ + external const : [>`R] t -> ro t = "%identity" + end + +diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli +index 0185402..fa5a0fe 100644 +--- a/libvirt/libvirt.mli ++++ b/libvirt/libvirt.mli +@@ -384,6 +384,14 @@ sig + (** [cpu_usable cpumaps maplen vcpu cpu] checks returns true iff the + [cpu] is usable by [vcpu]. *) + ++ val set_keep_alive : [>`R] t -> int -> int -> unit ++ (** [set_keep_alive conn interval count] starts sending keepalive ++ messages after [interval] seconds of inactivity and consider the ++ connection to be broken when no response is received after [count] ++ keepalive messages. ++ Note: the client has to implement and run an event loop to ++ be able to use keep-alive messages. *) ++ + external const : [>`R] t -> ro t = "%identity" + (** [const conn] turns a read/write connection into a read-only + connection. Note that the opposite operation is impossible. +diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c +index 42301b7..c51aad7 100644 +--- a/libvirt/libvirt_c_oneoffs.c ++++ b/libvirt/libvirt_c_oneoffs.c +@@ -169,6 +169,23 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, + } + + CAMLprim value ++ocaml_libvirt_connect_set_keep_alive(value connv, ++ value intervalv, value countv) ++{ ++ CAMLparam3 (connv, intervalv, countv); ++ virConnectPtr conn = Connect_val(connv); ++ int interval = Int_val(intervalv); ++ unsigned int count = Int_val(countv); ++ int r; ++ ++ NONBLOCKING(r = virConnectSetKeepAlive(conn, interval, count)); ++ CHECK_ERROR (r == -1, conn, "virConnectSetKeepAlive"); ++ ++ CAMLreturn(Val_unit); ++} ++ ++ ++CAMLprim value + ocaml_libvirt_domain_get_id (value domv) + { + CAMLparam1 (domv); diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 3a441dc0..545801c2 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -13,6 +13,20 @@ Group: Development/Libraries License: LGPLv2+ URL: http://libvirt.org/ocaml/ Source0: http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz +Patch0: ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a +Patch1: ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 +Patch2: ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf +Patch3: ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 +Patch4: ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 +Patch5: ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 +Patch6: ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 +Patch7: ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d +Patch8: ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 +Patch9: ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 +Patch10: ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d +Patch11: ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 +Patch12: ocaml-libvirt-13-fixbuild + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x @@ -57,7 +71,19 @@ OCaml virtualization shell. %prep %setup -q - +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %build CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix} From 8b7abe9ea7826ee444f73178428f27dfeb4f44a5 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Mon, 3 Jun 2013 18:10:53 +0100 Subject: [PATCH 0107/1125] Tidy up mock.md a little more Signed-off-by: Mike McClurg --- mock.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mock.md b/mock.md index 52a634fb..f2ada178 100644 --- a/mock.md +++ b/mock.md @@ -4,12 +4,16 @@ Using mock to build these RPMs: (tidy this up later) ``` -useradd djs -G mock -passwd djs - -cp xenserver.cfg /etc/mock/ +useradd -G mock +passwd -su - djs +git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild +mkdir -p /home//rpmbuild/RPMS/x86_64/ +createrepo /home//rpmbuild/RPMS/x86_64 + +cp xenserver.cfg /etc/mock/ # edit so last repo points to file:///home//blah + +su - mock -r xenserver --init mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-obuild-0.0.2-0.src.rpm From ac8be6e8c90c30aea50096f24f5598a1248174a3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 17:25:55 +0000 Subject: [PATCH 0108/1125] Build xapi-libvirt-storage --- SPECS/xapi-libvirt-storage.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 1923fc3e..0df6b39c 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -6,8 +6,12 @@ License: LGPL Group: Development/Other URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz Source0: xapi-libvirt-storage-0.9.0.tar.gz +Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: ocaml-oclock-devel Requires: ocaml %description From fc76623ee3dd2fbe0806fd1b4969b511c2b3e46e Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 17:26:33 +0000 Subject: [PATCH 0109/1125] Add metadata_expire=0 to mock's yum config. This was advice from a random mailing list (!) --- xenserver.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xenserver.cfg b/xenserver.cfg index a91635fa..d24f65bc 100644 --- a/xenserver.cfg +++ b/xenserver.cfg @@ -73,5 +73,5 @@ baseurl=file:///home/djs/rpmbuild/RPMS/x86_64 gpgcheck=0 priority=1 enabled=1 - +metadata_expire=0 """ From 5e6da34a4ed12b488c8379efd4f606f681f3c7bc Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 17:29:54 +0000 Subject: [PATCH 0110/1125] Build ffs --- SPECS/ffs.spec | 6 +++++- mock.md | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 96042216..302d5588 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -6,8 +6,12 @@ License: LGPL Group: Development/Other URL: https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz Source0: ffs-0.9.0.tar.gz +Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: ocaml-oclock-devel Requires: ocaml %description diff --git a/mock.md b/mock.md index e075ac72..65f75b6b 100644 --- a/mock.md +++ b/mock.md @@ -90,4 +90,8 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-lowlevel createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvirt-0.6.1.2-1.el6.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-libvirt-storage-0.9.0-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ffs-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` From 1996eeab53f1619693dca24c4aeadf9539750983 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 20:34:17 +0000 Subject: [PATCH 0111/1125] Incremental commit for xenopsd --- SOURCES/xenopsd-libvirt-init | 90 ++++++++++++++++++++++ SOURCES/xenopsd-simulator-init | 90 ++++++++++++++++++++++ SOURCES/xenopsd-xc-init | 90 ++++++++++++++++++++++ SPECS/xenopsd.spec | 137 +++++++++++++++++++++++++++++++++ 4 files changed, 407 insertions(+) create mode 100755 SOURCES/xenopsd-libvirt-init create mode 100755 SOURCES/xenopsd-simulator-init create mode 100755 SOURCES/xenopsd-xc-init create mode 100644 SPECS/xenopsd.spec diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init new file mode 100755 index 00000000..7c17c755 --- /dev/null +++ b/SOURCES/xenopsd-libvirt-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xenopsd-libvirt Startup script for xenopsd-libvirt service +# +# chkconfig: 2345 13 88 +# description: Manages xen/kvm domains via libvirt +### BEGIN INIT INFO +# Provides: xenopsd-libvirt +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manages xen/kvm domains via libvirt +# Description: Manages xen/kvm domains via libvirt +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xenopsd-libvirt.pid + +prog=xenopsd-libvirt +exec=/usr/sbin/xenopsd-libvirt +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xenopsd-libvirt: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_LIBVIRT_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xenopsd-libvirt: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init new file mode 100755 index 00000000..a3214e50 --- /dev/null +++ b/SOURCES/xenopsd-simulator-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xenopsd-simulator Startup script for xenopsd-simulator service +# +# chkconfig: 2345 13 88 +# description: Manages synthetic VMs for testing +### BEGIN INIT INFO +# Provides: xenopsd-simulator +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manages synthetic VMs for testing +# Description: Manages synthetic VMs for testing +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xenopsd-simulator.pid + +prog=xenopsd-simulator +exec=/usr/sbin/xenopsd-simulator +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xenopsd-simulator: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_SIMULATOR_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xenopsd-simulator: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init new file mode 100755 index 00000000..0770609c --- /dev/null +++ b/SOURCES/xenopsd-xc-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xenopsd-xc Startup script for xenopsd-xc service +# +# chkconfig: 2345 13 88 +# description: Manages xen domains via libxc +### BEGIN INIT INFO +# Provides: xenopsd-xc +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manages xen domains via libxc +# Description: Manages xen domains via libxc +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xenopsd-xc.pid + +prog=xenopsd-xc +exec=/usr/sbin/xenopsd-xc +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xenopsd-xc: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_XC_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xenopsd-xc: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec new file mode 100644 index 00000000..6fa2235b --- /dev/null +++ b/SPECS/xenopsd.spec @@ -0,0 +1,137 @@ +Name: xenopsd +Version: 0.9.0 +Release: 0 +Summary: Simple VM manager +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.0.tar.gz +Source0: xenopsd-0.9.0.tar.gz +Source1: xenopsd-xc-init +Source2: xenopsd-simulator-init +Source3: xenopsd-libvirt-init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexec-devel +BuildRequires: ocaml-libvirt-devel libvirt ocaml-qmp-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +Requires: ocaml + +%description +Simple VM manager for the xapi toolstack. + +%package libvirt +Summary: %{name} using libvirt +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description libvirt +Simple VM manager for Xen and KVM using libvirt. + + +%package xc +Summary: %{name} using xc +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description xc +Simple VM manager for Xen using libxc. + +%package simulator +Summary: %{name} using libvirt +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description simulator +A synthetic VM manager for testing. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +./configure +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} + +install -D dist/build/xenopsd_libvirt/xenopsd_libvirt %{buildroot}/%{_sbindir}/xenopsd-libvirt +install -D dist/build/xenopsd/xenopsd %{buildroot}/%{_sbindir}/xenopsd-xc +install -D dist/build/xenopsd_simulator/xenopsd_simulator %{buildroot}/%{_sbindir}/xenopsd-simulator +install -D dist/build/xenguest/xenguest %{buildroot}/%{_libexecdir}/%{name}/xenguest +install -D scripts/vif %{buildroot}/%{_libexecdir)/%{name}/vif +install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper +install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script +install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules +install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py +install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf + +DESTDIR=%{buildroot} ETCDIR=${_etcdir} SBINDIR=%{_sbindir} LIBEXECDIR=%{_libexecdir}/%{name} SCRIPTSDIR=%{_libexecdir}/%{name} scripts/make-custom-xenopsd.conf + +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt +install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc +install -m 0755 %{_sourcedir}/xenopsd-simulator %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_libexecdir}/%{name}/vif +%{_libexecdir}/%{name}/qemu-dm-wrapper +%{_libexecdir}/%{name}/qemu-vif-script +%{_libexecdir}/%{name}/setup-vif-rules +%{_libexecdir}/%{name}/common.py +%{_libexecdir}/%{name}/network.conf +%{_etcdir}/xenopsd.conf + +%files libvirt +%defattr(-,root,root) +%{_sbindir}/xenopsd-libvirt +%{_sysconfdir}/init.d/xenopsd-libvirt + +%post libvirt +/sbin/chkconfig --add xenopsd-libvirt + +%preun libvirt +if [ $1 -eq 0 ]; then + /sbin/service xenopsd-libvirt stop > /dev/null 2>&1 + /sbin/chkconfig --del xenopsd-libvirt +fi + +%files xc +%defattr(-,root,root) +%{_sbindir}/xenopsd-xc +%{_sysconfdir}/init.d/xenopsd-xc + +%post xc +/sbin/chkconfig --add xenopsd-xc + +%preun xc +if [ $1 -eq 0 ]; then + /sbin/service xenopsd-xc stop > /dev/null 2>&1 + /sbin/chkconfig --del xenopsd-xc +fi + +%files simulator +%defattr(-,root,root) +%{_sbindir}/xenopsd-simulator +%{_sysconfdir}/init.d/xenopsd-simulator + +%post simulator +/sbin/chkconfig --add xenopsd-simulator + +%preun simulator +if [ $1 -eq 0 ]; then + /sbin/service xenopsd-simulator stop > /dev/null 2>&1 + /sbin/chkconfig --del xenopsd-simulator +fi + +%changelog +* Thu May 30 2013 David Scott +- Initial package + From c1a88f800d838d5e4247cd63839db2eab344747f Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 20:43:49 +0000 Subject: [PATCH 0112/1125] Build sexplib --- SPECS/sexplib.spec | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 SPECS/sexplib.spec diff --git a/SPECS/sexplib.spec b/SPECS/sexplib.spec new file mode 100644 index 00000000..9e0d333c --- /dev/null +++ b/SPECS/sexplib.spec @@ -0,0 +1,46 @@ +Name: ocaml-sexplib +Version: 109.20.00 +Release: 0 +Summary: Convert values to and from s-expressions in OCaml + +Group: Development/Other +License: LGPLv2+ with exceptions and BSD +URL: https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz +Source0: sexplib-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} + +BuildRequires: ocaml >= 4.00.0 +BuildRequires: ocaml-findlib +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv + +%description +Convert values to and from s-expressions in OCaml. + +%prep +%setup -q -n sexplib-%{version} + +%build +make + +%install +rm -rf %{buildroot} +export DESTDIR=%{buildroot} +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt +%{_libdir}/ocaml/sexplib + +%changelog +* Mon Jun 3 2013 David Scott +- Initial package + From e49feecc3e24e6e019d874eeb5cccb899144766c Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 3 Jun 2013 22:10:47 +0000 Subject: [PATCH 0113/1125] Build xenopsd (and xenstore-clients) --- SPECS/xenopsd.spec | 31 ++++++++++++++--------- SPECS/xenstore-clients.spec | 50 +++++++++++++++++++++++++++++++++++++ mock.md | 6 +++++ sources.csv | 3 +++ 4 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 SPECS/xenstore-clients.spec diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 6fa2235b..8e2891d5 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,11 +1,11 @@ Name: xenopsd -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.0.tar.gz -Source0: xenopsd-0.9.0.tar.gz +URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.1.tar.gz +Source0: xenopsd-0.9.1.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init @@ -14,8 +14,10 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexec-devel -BuildRequires: ocaml-libvirt-devel libvirt ocaml-qmp-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib +BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel +BuildRequires: xen-devel Requires: ocaml %description @@ -60,34 +62,38 @@ mkdir -p %{buildroot}/%{_sbindir} install -D dist/build/xenopsd_libvirt/xenopsd_libvirt %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D dist/build/xenopsd/xenopsd %{buildroot}/%{_sbindir}/xenopsd-xc install -D dist/build/xenopsd_simulator/xenopsd_simulator %{buildroot}/%{_sbindir}/xenopsd-simulator +mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D dist/build/xenguest/xenguest %{buildroot}/%{_libexecdir}/%{name}/xenguest -install -D scripts/vif %{buildroot}/%{_libexecdir)/%{name}/vif +install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf -DESTDIR=%{buildroot} ETCDIR=${_etcdir} SBINDIR=%{_sbindir} LIBEXECDIR=%{_libexecdir}/%{name} SCRIPTSDIR=%{_libexecdir}/%{name} scripts/make-custom-xenopsd.conf - mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc -install -m 0755 %{_sourcedir}/xenopsd-simulator %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator +install -m 0755 %{_sourcedir}/xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator + +mkdir -p %{buildroot}/etc +DESTDIR=%{buildroot} ETCDIR=/etc SBINDIR=%{_sbindir} LIBEXECDIR=%{_libexecdir}/%{name} SCRIPTSDIR=%{_libexecdir}/%{name} scripts/make-custom-xenopsd.conf %clean rm -rf %{buildroot} %files %defattr(-,root,root) -%doc README.md LICENSE MAINTAINERS +%doc README.md LICENSE %{_libexecdir}/%{name}/vif %{_libexecdir}/%{name}/qemu-dm-wrapper %{_libexecdir}/%{name}/qemu-vif-script %{_libexecdir}/%{name}/setup-vif-rules -%{_libexecdir}/%{name}/common.py %{_libexecdir}/%{name}/network.conf -%{_etcdir}/xenopsd.conf +%{_libexecdir}/%{name}/common.py +%{_libexecdir}/%{name}/common.pyo +%{_libexecdir}/%{name}/common.pyc +/etc/xenopsd.conf %files libvirt %defattr(-,root,root) @@ -107,6 +113,7 @@ fi %defattr(-,root,root) %{_sbindir}/xenopsd-xc %{_sysconfdir}/init.d/xenopsd-xc +%{_libexecdir}/%{name}/xenguest %post xc /sbin/chkconfig --add xenopsd-xc diff --git a/SPECS/xenstore-clients.spec b/SPECS/xenstore-clients.spec new file mode 100644 index 00000000..20860742 --- /dev/null +++ b/SPECS/xenstore-clients.spec @@ -0,0 +1,50 @@ +Name: ocaml-xenstore-clients +Version: 0.9.0 +Release: 0 +Summary: Unix xenstore clients for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel +Requires: ocaml ocaml-findlib + +%description +Unix xenstore clients for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=${buildroot} + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_libdir}/ocaml/xenstore_transport/* + +%changelog +* Mon Jun 3 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index 65f75b6b..5e2cb98a 100644 --- a/mock.md +++ b/mock.md @@ -94,4 +94,10 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-libvirt-stora createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ffs-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-sexplib-109.20.00-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-clients-0.9.0-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenopsd-0.9.1-0.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index 186ae6b7..6adb8ea2 100644 --- a/sources.csv +++ b/sources.csv @@ -46,3 +46,6 @@ xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1. stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.1.tar.gz, +sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, +xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, From 223c543467dda79be93e34b999b06b086d3eb3cd Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 09:57:30 +0000 Subject: [PATCH 0114/1125] Add a script to upload package repositories to a www server --- upload.sh | 13 +++++++++++++ xapi.repo | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 upload.sh create mode 100644 xapi.repo diff --git a/upload.sh b/upload.sh new file mode 100755 index 00000000..93680b74 --- /dev/null +++ b/upload.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +URL=dscott@drall.uk.xensource.com:public_html/xapi/ + +rm -f RPMS/x86_64/*.log +rm -f RPMS/x86_64/*_pkgs +createrepo SRPMS +mkdir -p debug/x86_64 +mv RPMS/x86_64/*-debuginfo-*rpm debug/x86_64 +createrepo RPMS/x86_64 +createrepo debug/x86_64 + +rsync -avrz --delete xapi.repo RPMS debug SRPMS $URL diff --git a/xapi.repo b/xapi.repo new file mode 100644 index 00000000..9b95a221 --- /dev/null +++ b/xapi.repo @@ -0,0 +1,13 @@ +[xapi] +name=CentOS-$releasever - xapi +baseurl=http://www.uk.xensource.com/~dscott/xapi/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xapi-source] +name=CentOS-$releasever - xapi Source +baseurl=http://www.uk.xensource.com/~dscott/xapi/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 From 21980e9575a1663327aa59a290a99c0e8e84b650 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 12:28:00 +0000 Subject: [PATCH 0115/1125] Fix typo in xapi.repo --- xapi.repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xapi.repo b/xapi.repo index 9b95a221..fd1a19cf 100644 --- a/xapi.repo +++ b/xapi.repo @@ -1,6 +1,6 @@ [xapi] name=CentOS-$releasever - xapi -baseurl=http://www.uk.xensource.com/~dscott/xapi/$basearch/ +baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/$basearch/ gpgcheck=0 Priority=1 enabled=1 From cf0675079115be3d4a29ba25468db377398d2345 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 12:28:07 +0000 Subject: [PATCH 0116/1125] Remove runtime dependency on ocaml. --- SPECS/message-switch.spec | 4 ++-- SPECS/sm-cli.spec | 4 ++-- SPECS/xenops-cli.spec | 4 ++-- SPECS/xenopsd.spec | 6 ++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 410846f5..c5794f62 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,6 +1,6 @@ Name: message-switch Version: 0.9.2 -Release: 0 +Release: 1 Summary: A store and forward message switch License: FreeBSD Group: Development/Other @@ -9,7 +9,6 @@ Source0: message-switch-0.9.2.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -Requires: ocaml ocaml-findlib Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts @@ -74,6 +73,7 @@ fi Summary: Development files for %{name} Group: Development/Other #Requires: %{name} = %{version}-%{release} +Requires: ocaml ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 55b3ee33..411ebf12 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,6 +1,6 @@ Name: sm-cli Version: 0.9.0 -Release: 0 +Release: 1 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other @@ -9,7 +9,7 @@ Source0: sm-cli-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel -Requires: ocaml +Requires: message-switch # XXX transitively required by message_switch BuildRequires: ocaml-oclock-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index f938b720..548cf8e4 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -1,6 +1,6 @@ Name: xenops-cli Version: 0.9.0 -Release: 0 +Release: 1 Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other @@ -9,7 +9,7 @@ Source0: xenops-cli-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel -Requires: ocaml +Requires: message-switch # XXX transitively required by message_switch BuildRequires: ocaml-oclock-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 8e2891d5..5af8de13 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.1 -Release: 0 +Release: 2 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -18,7 +18,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel -Requires: ocaml +Requires: message-switch xenops-cli %description Simple VM manager for the xapi toolstack. @@ -27,6 +27,7 @@ Simple VM manager for the xapi toolstack. Summary: %{name} using libvirt Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: libvirt %description libvirt Simple VM manager for Xen and KVM using libvirt. @@ -36,6 +37,7 @@ Simple VM manager for Xen and KVM using libvirt. Summary: %{name} using xc Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: xen-libs %description xc Simple VM manager for Xen using libxc. From bcd6eacb120f6416aca112a8bdda2084f79a4148 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 17:50:55 +0000 Subject: [PATCH 0117/1125] Add and build vncterm --- SOURCES/vncterm-1-fix-build | 12 ++++++++++++ SPECS/vncterm.spec | 36 ++++++++++++++++++++++++++++++++++++ mock.md | 2 ++ sources.csv | 1 + 4 files changed, 51 insertions(+) create mode 100644 SOURCES/vncterm-1-fix-build create mode 100644 SPECS/vncterm.spec diff --git a/SOURCES/vncterm-1-fix-build b/SOURCES/vncterm-1-fix-build new file mode 100644 index 00000000..8a7d6644 --- /dev/null +++ b/SOURCES/vncterm-1-fix-build @@ -0,0 +1,12 @@ +diff -r feee2b1d5a29 main.c +--- a/main.c Wed Oct 31 16:55:54 2012 +0000 ++++ b/main.c Tue Jun 04 17:44:46 2013 +0000 +@@ -47,7 +47,7 @@ + #include + + #ifndef NXENSTORE +-#include ++#include + #endif + + #if !defined(__APPLE__) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec new file mode 100644 index 00000000..cd64c09b --- /dev/null +++ b/SPECS/vncterm.spec @@ -0,0 +1,36 @@ +Summary: vncterm tty to vnc utility +Name: vncterm +Version: 0.1 +Release: 0 +License: GPL +Group: System/Hypervisor +Source0: %{name}-%{version}.tar.gz +Patch0: vncterm-1-fix-build +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +BuildRequires: xen-devel + +%description +This package contains the vncterm utility +%prep +%setup -q -n vncterm-master-%{version} +%patch0 -p1 + +%build +%{__make} + +%install +mkdir -p %{buildroot}%{_bindir}/ +cp vncterm %{buildroot}%{_bindir}/ + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc +%{_bindir}/vncterm + +%changelog +* Mon Jun 3 2013 David Scott +- Imported from vncterm/mk/vncterm.spec.in + diff --git a/mock.md b/mock.md index 5e2cb98a..f383f23f 100644 --- a/mock.md +++ b/mock.md @@ -100,4 +100,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-cli createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenopsd-0.9.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/vncterm-0.1-0.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index 6adb8ea2..f5a33953 100644 --- a/sources.csv +++ b/sources.csv @@ -45,6 +45,7 @@ ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml- xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, +vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.1.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, From b56cc06643dc8cba30f4c43072ff51e94f3a4248 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 21:04:02 +0000 Subject: [PATCH 0118/1125] xenopsd-xc needs forkexec and xenstored --- SOURCES/xenopsd-xc-init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 0770609c..23cc51cf 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -6,9 +6,9 @@ # description: Manages xen domains via libxc ### BEGIN INIT INFO # Provides: xenopsd-xc -# Required-Start: $local_fs $network $syslog message-switch +# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored # Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch +# Should-Start: $syslog message-switch forkexecd # Should-Stop: $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 @@ -37,7 +37,7 @@ start() { umask 077 echo -n $"Starting xenopsd-xc: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_XC_OPTIONS + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XC_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From 6b82ec976d10e15ecef1c364d18331292b46f6ea Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 21:04:29 +0000 Subject: [PATCH 0119/1125] xenopsd-*-init: add -config /etc/xenopsd.conf --- SOURCES/xenopsd-libvirt-init | 2 +- SOURCES/xenopsd-simulator-init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init index 7c17c755..908973ae 100755 --- a/SOURCES/xenopsd-libvirt-init +++ b/SOURCES/xenopsd-libvirt-init @@ -37,7 +37,7 @@ start() { umask 077 echo -n $"Starting xenopsd-libvirt: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_LIBVIRT_OPTIONS + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_LIBVIRT_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init index a3214e50..63a066cf 100755 --- a/SOURCES/xenopsd-simulator-init +++ b/SOURCES/xenopsd-simulator-init @@ -37,7 +37,7 @@ start() { umask 077 echo -n $"Starting xenopsd-simulator: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XENOPSD_SIMULATOR_OPTIONS + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_SIMULATOR_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From 3fa7020daa5b3f39c55dd604048e440d32aa2243 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 21:04:53 +0000 Subject: [PATCH 0120/1125] forkexec: the daemon doesn't need ocaml, the devel package does --- SPECS/forkexecd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index ae51726b..48480a01 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -1,6 +1,6 @@ Name: forkexec Version: 0.9.0 -Release: 0 +Release: 1 Summary: A subprocess management service License: LGPL Group: Development/Other @@ -10,7 +10,6 @@ Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-syslog-devel ocaml-uuidm-devel ocaml-stdext-devel -Requires: ocaml ocaml-findlib Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts @@ -59,6 +58,7 @@ fi Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: ocaml ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for From 366d616193ab9704129f6f61616ea6c8df76f3cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 4 Jun 2013 21:05:34 +0000 Subject: [PATCH 0121/1125] xenopsd-xc: now properly starts on boot --- SOURCES/xenopsd-conf | 20 ++++++++++++++++++++ SOURCES/xenopsd-network-conf | 1 + SPECS/xenopsd.spec | 19 +++++++++++-------- sources.csv | 2 +- 4 files changed, 33 insertions(+), 9 deletions(-) create mode 100755 SOURCES/xenopsd-conf create mode 100644 SOURCES/xenopsd-network-conf diff --git a/SOURCES/xenopsd-conf b/SOURCES/xenopsd-conf new file mode 100755 index 00000000..f71dd045 --- /dev/null +++ b/SOURCES/xenopsd-conf @@ -0,0 +1,20 @@ +# Configuration file for xenopsd + +# Omit some sources of log-spam by default +disable-logging-for=http + +xenguest=/usr/libexec/xenopsd/xenguest + +network-conf=/etc/xapi/network.conf + +vif-script=/usr/libexec/xenopsd/vif +qemu-vif-script=/usr/libexec/xenopsd/qemu-vif-script +qemu-dm-wrapper=/usr/libexec/xenopsd/qemu-dm-wrapper +setup-vif-rules=/usr/libexec/xenopsd/setup-vif-rules + +hvmloader=/usr/lib/xen/boot/hvmloader +pygrub=/usr/bin/pygrub +sockets-group=wheel + +vncterm=/usr/bin/vncterm +eliloader=/usr/bin/pygrub diff --git a/SOURCES/xenopsd-network-conf b/SOURCES/xenopsd-network-conf new file mode 100644 index 00000000..7096907a --- /dev/null +++ b/SOURCES/xenopsd-network-conf @@ -0,0 +1 @@ +bridge diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 5af8de13..bd66dfa4 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,14 +1,16 @@ Name: xenopsd -Version: 0.9.1 -Release: 2 +Version: 0.9.2 +Release: 0 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.1.tar.gz -Source0: xenopsd-0.9.1.tar.gz +URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.2.tar.gz +Source0: xenopsd-0.9.2.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init +Source4: xenopsd-conf +Source5: xenopsd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel @@ -37,7 +39,7 @@ Simple VM manager for Xen and KVM using libvirt. Summary: %{name} using xc Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: xen-libs +Requires: xen-libs vncterm forkexec %description xc Simple VM manager for Xen using libxc. @@ -77,9 +79,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 %{_sourcedir}/xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator - -mkdir -p %{buildroot}/etc -DESTDIR=%{buildroot} ETCDIR=/etc SBINDIR=%{_sbindir} LIBEXECDIR=%{_libexecdir}/%{name} SCRIPTSDIR=%{_libexecdir}/%{name} scripts/make-custom-xenopsd.conf +mkdir -p %{buildroot}/etc/xapi +install -m 0644 %{_sourcedir}/xenopsd-conf %{buildroot}/etc/xenopsd.conf +install -m 0644 %{_sourcedir}/xenopsd-network-conf %{buildroot}/etc/xapi/network.conf %clean rm -rf %{buildroot} @@ -96,6 +98,7 @@ rm -rf %{buildroot} %{_libexecdir}/%{name}/common.pyo %{_libexecdir}/%{name}/common.pyc /etc/xenopsd.conf +/etc/xapi/network.conf %files libvirt %defattr(-,root,root) diff --git a/sources.csv b/sources.csv index f5a33953..5456b637 100644 --- a/sources.csv +++ b/sources.csv @@ -47,6 +47,6 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.1.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, From 84ac016e7ad150270346abf59eb87bf7a9474006 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 08:19:42 +0000 Subject: [PATCH 0122/1125] Add and build squeezed --- SPECS/squeezed.spec | 56 +++++++++++++++++++++++++++++++++++++++++++++ mock.md | 2 ++ sources.csv | 1 + 3 files changed, 59 insertions(+) create mode 100644 SPECS/squeezed.spec diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec new file mode 100644 index 00000000..057ac2e2 --- /dev/null +++ b/SPECS/squeezed.spec @@ -0,0 +1,56 @@ +Name: squeezed +Version: 0.9.0 +Release: 0 +Summary: Memory ballooning daemon for the xapi toolstack +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz +Source0: squeezed-0.9.0.tar.gz +Source1: squeezed-init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-syslog-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel +BuildRequires: ocaml-oclock-devel xen-devel +Requires: xen-libs + +%description +Memory ballooning daemon for the xapi toolstack. + +%prep +%setup -q -n squeezed-squeezed-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install dist/build/squeezed/squeezed %{buildroot}/%{_sbindir}/squeezed +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/squeezed +%{_sysconfdir}/init.d/squeezed + +%post +/sbin/chkconfig --add squeezed + +%preun +if [ $1 -eq 0 ]; then + /sbin/service squeezed stop > /dev/null 2>&1 + /sbin/chkconfig --del squeezed +fi + +%changelog +* Wed Jun 5 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index f383f23f..d68a6c13 100644 --- a/mock.md +++ b/mock.md @@ -102,4 +102,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenopsd-0.9.1-0.sr createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/vncterm-0.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/squeezed-0.9.0-0.src.rpm +createrepo RPMX/x86_64 ``` diff --git a/sources.csv b/sources.csv index 5456b637..6450a535 100644 --- a/sources.csv +++ b/sources.csv @@ -50,3 +50,4 @@ libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, +squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, From cc3a3e397d0a8c10e5a2f1d15fb1bb9361940eea Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 09:00:22 +0000 Subject: [PATCH 0123/1125] Add and build xcp-inventory --- SPECS/xcp-inventory.spec | 52 ++++++++++++++++++++++++++++++++++++++++ mock.md | 4 +++- sources.csv | 2 ++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 SPECS/xcp-inventory.spec diff --git a/SPECS/xcp-inventory.spec b/SPECS/xcp-inventory.spec new file mode 100644 index 00000000..b42a97e5 --- /dev/null +++ b/SPECS/xcp-inventory.spec @@ -0,0 +1,52 @@ +Name: ocaml-xcp-inventory +Version: 0.9.0 +Release: 0 +Summary: OCaml library to read and write the XCP inventory file +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/xen-org/xcp-inventory +Source0: xcp-inventory-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel +Requires: ocaml ocaml-findlib + +%description +A simple library to read and write the XCP inventory file. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xcp-inventory-xcp-inventory-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md LICENSE + +%{_libdir}/ocaml/xcp-inventory/* + +%changelog +* Wed Jun 5 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index d68a6c13..d24cc399 100644 --- a/mock.md +++ b/mock.md @@ -103,5 +103,7 @@ createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/vncterm-0.1-0.src.rpm createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/squeezed-0.9.0-0.src.rpm -createrepo RPMX/x86_64 +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-inventory-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index 6450a535..1f8a5f65 100644 --- a/sources.csv +++ b/sources.csv @@ -51,3 +51,5 @@ xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, +xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, +xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, From 7de20ed3c3ec8410c40973f4fd74089d65c5dabc Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 09:26:06 +0000 Subject: [PATCH 0124/1125] Add and build xen-api-libs-transitional --- SPECS/xen-api-libs-transitional.spec | 66 ++++++++++++++++++++++++++++ mock.md | 2 + sources.csv | 1 + 3 files changed, 69 insertions(+) create mode 100644 SPECS/xen-api-libs-transitional.spec diff --git a/SPECS/xen-api-libs-transitional.spec b/SPECS/xen-api-libs-transitional.spec new file mode 100644 index 00000000..bd6f5bf1 --- /dev/null +++ b/SPECS/xen-api-libs-transitional.spec @@ -0,0 +1,66 @@ +Name: ocaml-xen-api-libs-transitional +Version: 0.9.0 +Release: 0 +Summary: Deprecated standard library extension for OCaml. +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/xen-org/xen-api-libs-transitional +Source0: xen-api-libs-transitional-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexec-devel +BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel xen-devel ocaml-camlp4-devel +BuildRequires: ocaml-syslog-devel +Requires: ocaml ocaml-findlib xen-libs + +%description +A deprecated standard library extension for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xen-api-libs-transitional-xen-api-libs-transitional-%{version} + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md LICENSE +%{_libdir}/ocaml/cpuid/* +%{_libdir}/ocaml/gzip/* +%{_libdir}/ocaml/http-svr/* +%{_libdir}/ocaml/log/* +%{_libdir}/ocaml/pciutil/* +%{_libdir}/ocaml/sexpr/* +%{_libdir}/ocaml/sha1/* +%{_libdir}/ocaml/stunnel/* +%{_libdir}/ocaml/uuid/* +%{_libdir}/ocaml/xenctrlext/* +%{_libdir}/ocaml/xenstore-compat/* +%{_libdir}/ocaml/xen-utils/* +%{_libdir}/ocaml/xml-light2/* + +%changelog +* Wed Jun 5 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index d24cc399..7f45745a 100644 --- a/mock.md +++ b/mock.md @@ -106,4 +106,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/squeezed-0.9.0-0.s createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-inventory-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-libs-transitional-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index 1f8a5f65..c5d04b5a 100644 --- a/sources.csv +++ b/sources.csv @@ -53,3 +53,4 @@ xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, +xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, From 72937eb9cc893918cbeb21277d15ee928107b0cc Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 09:26:18 +0000 Subject: [PATCH 0125/1125] Add squeezed's init.d script --- SOURCES/squeezed-init | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 SOURCES/squeezed-init diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init new file mode 100755 index 00000000..12ddd4ee --- /dev/null +++ b/SOURCES/squeezed-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# squeeze Startup script for memory ballooning daemon +# +# chkconfig: 2345 13 88 +# description: Manages host memory by ballooning VMs +### BEGIN INIT INFO +# Provides: squeezed +# Required-Start: $local_fs $network $syslog message-switch xenstored +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Memory ballooning daemon +# Description: Manages host memory by ballooning VMs +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/squeezed.pid + +prog=squeezed +exec=/usr/sbin/squeezed +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting squeezed: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $SQUEEZED_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down squeezed: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? From a618846ea0afda3ad6cce2f0dcbd19edc4eefa16 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 12:10:44 +0000 Subject: [PATCH 0126/1125] Build xen-api-client (after updating to 0.9.3) --- SPECS/xen-api-client.spec | 10 +++++++--- sources.csv | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SPECS/xen-api-client.spec b/SPECS/xen-api-client.spec index 922410c0..6f9105df 100644 --- a/SPECS/xen-api-client.spec +++ b/SPECS/xen-api-client.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-api-client -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 @@ -7,7 +7,7 @@ Group: Development/Libraries URL: https://github.com/xen-org/xen-api-client Source0: xen-api-client-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-lwt ocaml-ssl ocaml-ounit ocaml-cohttp ocaml-uri ocaml-xmlm ocaml-rpc +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel ocaml-ssl-devel openssl openssl-devel ocaml-ounit-devel ocaml-cohttp-devel ocaml-uri-devel xmlm-devel ocaml-rpc-devel Requires: ocaml ocaml-findlib %description @@ -18,7 +18,7 @@ virtualization hosts. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel XenAPI Client is an OCaml library implementing XenServer's XenAPI. @@ -36,6 +36,7 @@ ocaml setup.ml -doc %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install %clean @@ -48,5 +49,8 @@ rm -rf %{buildroot} %changelog +* Wed Jun 5 2013 David Scott +- Update to 0.9.3 + * Wed May 29 2013 Mike McClurg - Initial package diff --git a/sources.csv b/sources.csv index c5d04b5a..6683b3fd 100644 --- a/sources.csv +++ b/sources.csv @@ -22,7 +22,7 @@ uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.1.tar.gz, -xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/xen-api-client-0.9.2.tar.gz, +xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.3.tar.gz,xen-api-client-0.9.3.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, From b000532db61e37f8ae771ab403c289b826c31a0a Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 12:38:23 +0000 Subject: [PATCH 0127/1125] Add and build the network daemon. --- SOURCES/xcp-networkd-init | 90 +++++++++++++++++++++++++++++++++++++++ SPECS/xcp-networkd.spec | 56 ++++++++++++++++++++++++ mock.md | 4 ++ 3 files changed, 150 insertions(+) create mode 100755 SOURCES/xcp-networkd-init create mode 100644 SPECS/xcp-networkd.spec diff --git a/SOURCES/xcp-networkd-init b/SOURCES/xcp-networkd-init new file mode 100755 index 00000000..7505ad4c --- /dev/null +++ b/SOURCES/xcp-networkd-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xcp-networkd Startup script for network management service +# +# chkconfig: 2345 13 88 +# description: Manages host networking for VMs. +### BEGIN INIT INFO +# Provides: xcp-networkd +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Network management service +# Description: Manages host networking for VMs. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xcp-networkd.pid + +prog=xcp-networkd +exec=/usr/sbin/xcp-networkd +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xcp-networkd: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_NETWORKD_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xcp-networkd: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec new file mode 100644 index 00000000..a3caad2d --- /dev/null +++ b/SPECS/xcp-networkd.spec @@ -0,0 +1,56 @@ +Name: xcp-networkd +Version: 0.9.0 +Release: 0 +Summary: Simple host network management service for the xapi toolstack +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz +Source0: xcp-networkd-0.9.0.tar.gz +Source1: xcp-networkd-init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-stdext-devel forkexec-devel ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: ocaml-xen-api-client-devel +BuildRequires: ocaml-oclock-devel + +%description +Simple host networking management service for the xapi toolstack. + +%prep +%setup -q -n xcp-networkd-xcp-networkd-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install dist/build/xcp-networkd/xcp-networkd %{buildroot}/%{_sbindir}/xcp-networkd +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.markdown LICENSE MAINTAINERS +%{_sbindir}/xcp-networkd +%{_sysconfdir}/init.d/xcp-networkd + +%post +/sbin/chkconfig --add xcp-networkd + +%preun +if [ $1 -eq 0 ]; then + /sbin/service xcp-networkd stop > /dev/null 2>&1 + /sbin/chkconfig --del xcp-networkd +fi + +%changelog +* Wed Jun 5 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index 7f45745a..d60eae35 100644 --- a/mock.md +++ b/mock.md @@ -108,4 +108,8 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-inventor createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-libs-transitional-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-client-0.9.3-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xcp-networkd-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` From 9d61482435483acaddea5028c5cb65405c4ab2f7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 13:10:05 +0000 Subject: [PATCH 0128/1125] First attempt at a xapi.spec, from the xen-api/xapi.spec.in ... this is going to need a lot of work. --- SPECS/xapi.spec | 248 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 SPECS/xapi.spec diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec new file mode 100644 index 00000000..1d9af409 --- /dev/null +++ b/SPECS/xapi.spec @@ -0,0 +1,248 @@ +# -*- rpm-spec -*- + +Summary: xapi - xen toolstack for XCP +Name: xapi +Version: 1.9.0 +Release: 0 +Group: System/Hypervisor +License: LGPL+linking exception +URL: http://www.xen.org +Source0: xen-api-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel +BuildRequires: ocaml-xcp-devel ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel +BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexec-devel +BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel +BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel +BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-devel + +%description +XCP toolstack. + +%package core +Summary: The xapi toolstack +Group: System/Hypervisor + +%description core +This package contains the xapi toolstack. + +%package xe +Summary: The xapi toolstack CLI +Group: System/Hypervisor + +%description xe +The command-line interface for controlling XCP hosts. + +%package tests +Summary: Toolstack test programs +Group: System/Hypervisor + +%description tests +This package contains a series of simple regression tests. + +%package v6d +Summary: The editions and features daemon +Group: System/Hypervisor + +%description v6d +This package contains daemon that defines and controls XCP editions and +associated features + +%package rrdd +Summary: The RRD daemon +Group: System/Hypervisor + +%description rrdd +This package contains a daemon that continually collects performance metrics +from the host and its VMs, stores the data in host's memory, and occasionally +synchronises the data to host's local storage. + +%package xenops +Summary: Low-level debugging tools +Group: System/Hypervisor + +%description xenops +This package contains the xenops-based low-level debugging tools. + +%package client-devel +Summary: xapi Development Headers and Libraries +Group: Development/Libraries + +%description client-devel +This package contains the xapi development libraries and header files +for building addon tools. + +%package datamodel-devel +Summary: xapi Datamodel headers and libraries +Group: Development/Libraries + +%description datamodel-devel +This package contains the internal xapi datamodel as a library suitable +for writing additional code generators. + +%package rrd-devel +Summary: rrd-client headers and libraries +Group: Development/Libraries + +%description rrd-devel +This package contains rrd functions as a library suitable for writing tools +related to rrd. Needed for rrd2csv and rrdd-plugins. + +%prep +%setup -q +#%patch0 -p0 -b xapi-version.patch + +%build +COMPILE_JAVA=no %{__make} + +%install +rm -rf %{buildroot} + +DESTDIR=$RPM_BUILD_ROOT %{__make} install + +SITEDIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +for f in XenAPI XenAPIPlugin inventory; do + for e in py pyc pyo; do + echo $SITEDIR/$f.$e + done +done > core-files + +for e in py pyc pyo; do + echo $SITEDIR/rrdd.$e +done > rrdd-files + +ln -s /var/lib/xcp $RPM_BUILD_ROOT/var/xapi + +%clean +rm -rf $RPM_BUILD_ROOT + +%post core +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi +[ ! -x /sbin/chkconfig ] || chkconfig --add xenservices +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-domains +[ ! -x /sbin/chkconfig ] || chkconfig --add perfmon +[ ! -x /sbin/chkconfig ] || chkconfig --add genptoken + +%post v6d +[ ! -x /sbin/chkconfig ] || chkconfig --add v6d + +%files core -f core-files +%defattr(-,root,root,-) +%{_bindir}/xapi +%config(noreplace) /etc/xapi.conf +/etc/logrotate.d/audit +/etc/logrotate.d/v6d +/etc/logrotate.d/xapi +/etc/pam.d/xapi +/etc/rc.d/init.d/management-interface +/etc/rc.d/init.d/perfmon +/etc/rc.d/init.d/xapi +/etc/rc.d/init.d/xapi-domains +%{_libexecdir}/xapi/xapissl +/etc/rc.d/init.d/xenservices +/etc/rc.d/init.d/genptoken +%config(noreplace) /etc/sysconfig/perfmon +%config(noreplace) /etc/sysconfig/xapi +/etc/xapi.d/base-path +/etc/xapi.d/plugins/* +%config(noreplace) /etc/xensource/db.conf +%config(noreplace) /etc/xensource/db.conf.rio +/etc/xensource/master.d/01-example +/etc/xensource/master.d/03-mpathalert-daemon +%config(noreplace) /etc/xensource/pool.conf +%{_bindir}/fix_firewall.sh +%{_bindir}/list_domains +%{_bindir}/mpathalert +%{_bindir}/perfmon +%{_bindir}/static-vdis +%{_bindir}/xapi-autostart-vms +%{_bindir}/xapi-db-process +%{_bindir}/xapi-wait-init-complete +%{_bindir}/xe-backup-metadata +%{_bindir}/xe-edit-bootloader +%{_bindir}/xe-get-network-backend +%{_bindir}/xe-mount-iso-sr +%{_bindir}/xe-restore-metadata +%{_bindir}/xe-reset-networking +%{_bindir}/xe-scsi-dev-map +%{_bindir}/xe-set-iscsi-iqn +%{_bindir}/xe-toolstack-restart +%{_bindir}/xe-xentrace +%{_bindir}/xe-switch-network-backend +/etc/bash_completion.d/xe-switch-network-backend +%{_bindir}/xsh +/etc/xensource/bugtool/xapi.xml +/etc/xensource/bugtool/xapi/stuff.xml +%{_libexecdir}/xapi/* +%config(noreplace) /etc/sparse_dd.conf +/var/lib/xcp/udhcpd.skel +/etc/xapi.d/host-post-declare-dead/10resetvdis +/var/xapi + +%files xe +%defattr(-,root,root,-) +%{_bindir}/xe +/etc/bash_completion.d/xe + +%files v6d +%defattr(-,root,root,-) +%{_sbindir}/v6d +/etc/rc.d/init.d/v6d + +%files rrdd +%defattr(-,root,root,-) +%{_sbindir}/xcp-rrdd +/etc/rc.d/init.d/xcp-rrdd + +%files xenops +%defattr(-,root,root,-) +%{_bindir}/xenops +%{_bindir}/add_vbd +%{_bindir}/add_vif +%{_bindir}/build_domain +%{_bindir}/build_hvm +%{_bindir}/create_domain +%{_bindir}/debug_ha_query_liveset +%{_bindir}/destroy_domain +%{_bindir}/event_listen +%{_bindir}/graph +%{_bindir}/memory_breakdown +%{_bindir}/memory_summary +%{_bindir}/pause_domain +%{_bindir}/restore_domain +%{_bindir}/shutdown_domain +%{_bindir}/sm_stress +%{_bindir}/suspend_domain +%{_bindir}/unpause_domain +%{_bindir}/vncproxy +%{_bindir}/with-vdi + +%files tests +%defattr(-,root,root,-) +/etc/xapi.d/plugins/lvhdrt-helper +/etc/xapi.d/plugins/lvhdrt-trash-vdi +/etc/xapi.d/plugins/multipathrt-helper +%{_bindir}/cli-rt-domu-shar.sh +%{_bindir}/cli_test +%{_bindir}/install-debian-pv-inside.sh +%{_bindir}/install-debian-pv.sh +%{_bindir}/lvhdrt +%{_bindir}/multipathrt +%{_bindir}/myfirstpatch.asc +%{_bindir}/perftest +%{_bindir}/quicktest +%{_bindir}/quicktestbin +/cli-rt/* + +%changelog + + + + + + + + From 1feda370804d48d46579ca52478ba18e2bea5c96 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 13:46:02 +0000 Subject: [PATCH 0129/1125] Make netdev build --- SPECS/netdev.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SPECS/netdev.spec b/SPECS/netdev.spec index c977db09..d6756756 100644 --- a/SPECS/netdev.spec +++ b/SPECS/netdev.spec @@ -7,8 +7,9 @@ Group: Development/Other URL: https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz Source0: netdev-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# forkexec stdext +BuildRequires: ocaml ocaml-findlib forkexec-devel ocaml-stdext-devel +#required by forkexec +BuildRequires: ocaml-syslog-devel Requires: ocaml ocaml-findlib %description @@ -17,7 +18,7 @@ Manipulate Linux bridges, network devices and openvswitch instances in OCaml. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -34,6 +35,7 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install %clean From 9afa23d4f13ad3b5045913dc54dda5e340adfcc0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 13:50:40 +0000 Subject: [PATCH 0130/1125] Build libvhd --- SPECS/libvhd.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/libvhd.spec b/SPECS/libvhd.spec index 33a16d38..47de21a7 100644 --- a/SPECS/libvhd.spec +++ b/SPECS/libvhd.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/libvhd Source0: https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel Requires: ocaml ocaml-findlib %description @@ -16,7 +16,7 @@ Simple C bindings which allow .vhd files to be manipulated. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -33,6 +33,7 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install %clean From 1b5f648c6b5c7183960365a1e089e6255394dc58 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 13:58:32 +0000 Subject: [PATCH 0131/1125] Make tapctl build --- SPECS/tapctl.spec | 9 ++++++--- mock.md | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/SPECS/tapctl.spec b/SPECS/tapctl.spec index cea5da56..777c1113 100644 --- a/SPECS/tapctl.spec +++ b/SPECS/tapctl.spec @@ -7,8 +7,10 @@ Group: Development/Other URL: https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz Source0: tapctl-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -# forkexec stdext +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: forkexec-devel ocaml-stdext-devel ocaml-rpc-devel +# required by forkexec +BuildRequires: ocaml-syslog-devel Requires: ocaml ocaml-findlib %description @@ -17,7 +19,7 @@ Manipulate running tapdisk instances on a xen host. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -34,6 +36,7 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install %clean diff --git a/mock.md b/mock.md index f75026b6..a67eab69 100644 --- a/mock.md +++ b/mock.md @@ -116,4 +116,10 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-clie createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xcp-networkd-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-netdev-0.9.0-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvhd-0.9.0-0.src.rpm +createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-tapctl-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` From 90fda6378ad4261c43b09e61ee4999d3d20fc254 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 17:17:38 +0000 Subject: [PATCH 0132/1125] nbd: nbd-devel doesn't need to depend on nbd (since it doesn't exist) --- SPECS/nbd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/nbd.spec b/SPECS/nbd.spec index 6ac68552..192315e3 100644 --- a/SPECS/nbd.spec +++ b/SPECS/nbd.spec @@ -18,7 +18,7 @@ access remote block devices. %package devel Summary: Development files for %{name} Group: Development/Other -Requires: %{name} = %{version}-%{release} +#Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 96044a206ad37272a6b05b069679b376350a78e7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 17:18:31 +0000 Subject: [PATCH 0133/1125] xapi: init scripts and ssl configuration. The xapi RPM has been stripped to a minimal configuration. --- SOURCES/xen-api-init | 90 +++++++++++++++ SOURCES/xen-api-xapi-conf | 7 ++ SOURCES/xen-api-xapissl | 118 +++++++++++++++++++ SOURCES/xen-api-xapissl-conf | 13 +++ SPECS/xapi.spec | 215 ++++++----------------------------- sources.csv | 1 + 6 files changed, 262 insertions(+), 182 deletions(-) create mode 100755 SOURCES/xen-api-init create mode 100644 SOURCES/xen-api-xapi-conf create mode 100755 SOURCES/xen-api-xapissl create mode 100644 SOURCES/xen-api-xapissl-conf diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init new file mode 100755 index 00000000..7be4eab6 --- /dev/null +++ b/SOURCES/xen-api-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xapi Startup script for xapi toolstack +# +# chkconfig: 2345 13 88 +# description: Manages VMs and resource pools +### BEGIN INIT INFO +# Provides: xapi +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: xapi toolstack +# Description: Manages VMs and resource pools +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xapi.pid + +prog=xapi +exec=/usr/sbin/xapi +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xapi: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xapi: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SOURCES/xen-api-xapi-conf b/SOURCES/xen-api-xapi-conf new file mode 100644 index 00000000..61fcf5bc --- /dev/null +++ b/SOURCES/xen-api-xapi-conf @@ -0,0 +1,7 @@ +# The xapi config file + +use-xenopsd = true +disable-logging-for = http db_write redo_log api_readonly +xapissl=/usr/lib/xapi/xapissl + +udhcpd=/bin/true diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl new file mode 100755 index 00000000..b14278c3 --- /dev/null +++ b/SOURCES/xen-api-xapissl @@ -0,0 +1,118 @@ +#! /bin/bash + +# start and stop stunnel for xapi + +# source function library +. /etc/rc.d/init.d/functions + +ACCEPT=$2 +PEMFILE="/etc/xapi/ssl.pem" +PIDFILE="/var/run/xapissl.pid" +SSLCONFFILE="/etc/xapi/xapissl.conf" +XAPISSL_LOCK="/var/lock/xapissl" + +# If stunnel4 exists, use it. Otherwise use stunnel. +exec=$(which stunnel) + +generate_ssl_cert() { + local FILE=$1 + local CN=$2 + if [ ! -e "${FILE}" ]; then + DIR=$(mktemp -d) + pushd ${DIR} + cat <config +[req] # openssl req params +prompt = no +distinguished_name = dn-param +[dn-param] # DN fields +CN = ${CN} +EOF + openssl genrsa 1024 > privkey.rsa + openssl req -batch -new -x509 -key privkey.rsa -days 3650 -config config -out cert.csr + openssl dhparam 512 > dh.pem + + popd + + (cat ${DIR}/privkey.rsa; echo ""; cat ${DIR}/cert.csr; echo ""; cat ${DIR}/dh.pem) > ${FILE} + chmod 400 ${FILE} + + rm -rf ${DIR} + fi +} + +start() { + echo -n $"Starting xapi SSL: " + if [ -e ${XAPISSL_LOCK} ]; then + if [ -e ${PIDFILE} ] && [ -e /proc/`cat ${PIDFILE}` ]; then + failure $"cannot start xapi SSL: xapi SSL already running."; + echo + return 1 + fi + fi + if [ ! -f ${PEMFILE} ]; then + # generating a pem file + CN=`hostname -f` + + case "${CN}" in + localhost*) + CN=127.0.0.1;; + *.*) + :;; + *) + CN=127.0.0.1;; + esac + generate_ssl_cert ${PEMFILE} ${CN} + fi + daemon --pidfile="$PIDFILE" $exec ${SSLCONFILE} $XAPISSL_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $XAPISSL_LOCK + return $RETVAL +} + +stop() { + echo -n $"Stopping xapi SSL: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $XAPISSL_LOCK + return $RETVAL +} + +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SOURCES/xen-api-xapissl-conf b/SOURCES/xen-api-xapissl-conf new file mode 100644 index 00000000..7eda44a7 --- /dev/null +++ b/SOURCES/xen-api-xapissl-conf @@ -0,0 +1,13 @@ +pid = /var/run/xapissl.pid +socket = r:TCP_NODELAY=1 +socket = a:TCP_NODELAY=1 +socket = l:TCP_NODELAY=1 +compression = zlib + +[xapi] +accept = 0.0.0.0 +connect = 80 +cert = /etc/xapi/ssl.pem +ciphers = !SSLv2:RSA+AES256-SHA:RSA+AES128-SHA:RSA+RC4-SHA:RSA+RC4-MD5:RSA+DES-CBC3-SHA +TIMEOUTclose = 0 + diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1d9af409..739caa5e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -8,25 +8,26 @@ Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org Source0: xen-api-%{version}.tar.gz +Source1: xen-api-xapi-conf +Source2: xen-api-init +Source3: xen-api-xapissl +Source4: xen-api-xapissl-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel -BuildRequires: ocaml-xcp-devel ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexec-devel BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel +Requires: stunnel %description XCP toolstack. -%package core -Summary: The xapi toolstack -Group: System/Hypervisor - -%description core +%description This package contains the xapi toolstack. %package xe @@ -36,207 +37,57 @@ Group: System/Hypervisor %description xe The command-line interface for controlling XCP hosts. -%package tests -Summary: Toolstack test programs -Group: System/Hypervisor - -%description tests -This package contains a series of simple regression tests. - -%package v6d -Summary: The editions and features daemon -Group: System/Hypervisor - -%description v6d -This package contains daemon that defines and controls XCP editions and -associated features - -%package rrdd -Summary: The RRD daemon -Group: System/Hypervisor - -%description rrdd -This package contains a daemon that continually collects performance metrics -from the host and its VMs, stores the data in host's memory, and occasionally -synchronises the data to host's local storage. - -%package xenops -Summary: Low-level debugging tools -Group: System/Hypervisor - -%description xenops -This package contains the xenops-based low-level debugging tools. - -%package client-devel -Summary: xapi Development Headers and Libraries -Group: Development/Libraries - -%description client-devel -This package contains the xapi development libraries and header files -for building addon tools. - -%package datamodel-devel -Summary: xapi Datamodel headers and libraries -Group: Development/Libraries - -%description datamodel-devel -This package contains the internal xapi datamodel as a library suitable -for writing additional code generators. - -%package rrd-devel -Summary: rrd-client headers and libraries -Group: Development/Libraries - -%description rrd-devel -This package contains rrd functions as a library suitable for writing tools -related to rrd. Needed for rrd2csv and rrdd-plugins. - %prep -%setup -q +%setup -q -n xen-api-%{version} #%patch0 -p0 -b xapi-version.patch %build -COMPILE_JAVA=no %{__make} +export COMPILE_JAVA=no +omake phase1 +omake phase2 +omake ocaml/xapi/xapi %install rm -rf %{buildroot} -DESTDIR=$RPM_BUILD_ROOT %{__make} install - -SITEDIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -for f in XenAPI XenAPIPlugin inventory; do - for e in py pyc pyo; do - echo $SITEDIR/$f.$e - done -done > core-files +mkdir %{buildroot}/%{_bindir} +install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_bindir} +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi +mkdir %{buildroot}/%{_libexecdir}/xapi +install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl +mkdir %{buildroot}/etc/xapi +install -m 0644 db.conf %{buildroot}/etc/xapi +install -m 0644 ${_sourcedir}/xen-api-xapissl-conf %{buildroot}/etc/xapi/xapissl.conf -for e in py pyc pyo; do - echo $SITEDIR/rrdd.$e -done > rrdd-files - -ln -s /var/lib/xcp $RPM_BUILD_ROOT/var/xapi +install -m 0755 ocaml/xe-cli/xe.opt %{buildroot}/%{_bindir}/xe +mkdir %{buildroot}/etc/bash_completion.d +install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/xe %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -%post core +%post [ ! -x /sbin/chkconfig ] || chkconfig --add xapi -[ ! -x /sbin/chkconfig ] || chkconfig --add xenservices -[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-domains -[ ! -x /sbin/chkconfig ] || chkconfig --add perfmon -[ ! -x /sbin/chkconfig ] || chkconfig --add genptoken -%post v6d -[ ! -x /sbin/chkconfig ] || chkconfig --add v6d +%preun +if [ $1 -eq 0 ]; then + /sbin/service xapi stop > /dev/null 2>&1 + /sbin/chkconfig --del xapi +fi -%files core -f core-files +%files %defattr(-,root,root,-) %{_bindir}/xapi %config(noreplace) /etc/xapi.conf -/etc/logrotate.d/audit -/etc/logrotate.d/v6d -/etc/logrotate.d/xapi -/etc/pam.d/xapi -/etc/rc.d/init.d/management-interface -/etc/rc.d/init.d/perfmon -/etc/rc.d/init.d/xapi -/etc/rc.d/init.d/xapi-domains %{_libexecdir}/xapi/xapissl -/etc/rc.d/init.d/xenservices -/etc/rc.d/init.d/genptoken -%config(noreplace) /etc/sysconfig/perfmon -%config(noreplace) /etc/sysconfig/xapi -/etc/xapi.d/base-path -/etc/xapi.d/plugins/* -%config(noreplace) /etc/xensource/db.conf -%config(noreplace) /etc/xensource/db.conf.rio -/etc/xensource/master.d/01-example -/etc/xensource/master.d/03-mpathalert-daemon -%config(noreplace) /etc/xensource/pool.conf -%{_bindir}/fix_firewall.sh -%{_bindir}/list_domains -%{_bindir}/mpathalert -%{_bindir}/perfmon -%{_bindir}/static-vdis -%{_bindir}/xapi-autostart-vms -%{_bindir}/xapi-db-process -%{_bindir}/xapi-wait-init-complete -%{_bindir}/xe-backup-metadata -%{_bindir}/xe-edit-bootloader -%{_bindir}/xe-get-network-backend -%{_bindir}/xe-mount-iso-sr -%{_bindir}/xe-restore-metadata -%{_bindir}/xe-reset-networking -%{_bindir}/xe-scsi-dev-map -%{_bindir}/xe-set-iscsi-iqn -%{_bindir}/xe-toolstack-restart -%{_bindir}/xe-xentrace -%{_bindir}/xe-switch-network-backend -/etc/bash_completion.d/xe-switch-network-backend -%{_bindir}/xsh -/etc/xensource/bugtool/xapi.xml -/etc/xensource/bugtool/xapi/stuff.xml -%{_libexecdir}/xapi/* -%config(noreplace) /etc/sparse_dd.conf -/var/lib/xcp/udhcpd.skel -/etc/xapi.d/host-post-declare-dead/10resetvdis -/var/xapi +/etc/xapi/db.conf %files xe %defattr(-,root,root,-) %{_bindir}/xe /etc/bash_completion.d/xe -%files v6d -%defattr(-,root,root,-) -%{_sbindir}/v6d -/etc/rc.d/init.d/v6d - -%files rrdd -%defattr(-,root,root,-) -%{_sbindir}/xcp-rrdd -/etc/rc.d/init.d/xcp-rrdd - -%files xenops -%defattr(-,root,root,-) -%{_bindir}/xenops -%{_bindir}/add_vbd -%{_bindir}/add_vif -%{_bindir}/build_domain -%{_bindir}/build_hvm -%{_bindir}/create_domain -%{_bindir}/debug_ha_query_liveset -%{_bindir}/destroy_domain -%{_bindir}/event_listen -%{_bindir}/graph -%{_bindir}/memory_breakdown -%{_bindir}/memory_summary -%{_bindir}/pause_domain -%{_bindir}/restore_domain -%{_bindir}/shutdown_domain -%{_bindir}/sm_stress -%{_bindir}/suspend_domain -%{_bindir}/unpause_domain -%{_bindir}/vncproxy -%{_bindir}/with-vdi - -%files tests -%defattr(-,root,root,-) -/etc/xapi.d/plugins/lvhdrt-helper -/etc/xapi.d/plugins/lvhdrt-trash-vdi -/etc/xapi.d/plugins/multipathrt-helper -%{_bindir}/cli-rt-domu-shar.sh -%{_bindir}/cli_test -%{_bindir}/install-debian-pv-inside.sh -%{_bindir}/install-debian-pv.sh -%{_bindir}/lvhdrt -%{_bindir}/multipathrt -%{_bindir}/myfirstpatch.asc -%{_bindir}/perftest -%{_bindir}/quicktest -%{_bindir}/quicktestbin -/cli-rt/* - %changelog diff --git a/sources.csv b/sources.csv index 6683b3fd..98b40bba 100644 --- a/sources.csv +++ b/sources.csv @@ -54,3 +54,4 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.0.tar.gz,xen-api-1.9.0.tar.gz From ce49480eb80a51c99c4e1544e09e61b715ca4c4f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 21:33:37 +0000 Subject: [PATCH 0134/1125] Build xapi --- SOURCES/xen-api-db-conf | 4 ++++ SPECS/xapi.spec | 33 ++++++++++++++++++++++----------- mock.md | 2 ++ sources.csv | 2 +- 4 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 SOURCES/xen-api-db-conf diff --git a/SOURCES/xen-api-db-conf b/SOURCES/xen-api-db-conf new file mode 100644 index 00000000..183639db --- /dev/null +++ b/SOURCES/xen-api-db-conf @@ -0,0 +1,4 @@ +[/var/lib/xapi/state.db] +mode:no_limit +format:xml +available_this_boot:true diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 739caa5e..cdccf3d8 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.0 +Version: 1.9.1 Release: 0 Group: System/Hypervisor License: LGPL+linking exception @@ -12,8 +12,9 @@ Source1: xen-api-xapi-conf Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-xapissl-conf +Source5: xen-api-db-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel BuildRequires: ocaml-xcp-idl-devel ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel @@ -21,7 +22,8 @@ BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexec-devel BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel +BuildRequires: ocaml-bitstring-devel libuuid-devel Requires: stunnel %description @@ -42,28 +44,34 @@ The command-line interface for controlling XCP hosts. #%patch0 -p0 -b xapi-version.patch %build +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi export COMPILE_JAVA=no +make version omake phase1 omake phase2 omake ocaml/xapi/xapi +omake ocaml/xe-cli/xe %install rm -rf %{buildroot} - -mkdir %{buildroot}/%{_bindir} -install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_bindir} + +mkdir -p %{buildroot}/%{_bindir} +install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_bindir}/xapi mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi -mkdir %{buildroot}/%{_libexecdir}/xapi +mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl -mkdir %{buildroot}/etc/xapi -install -m 0644 db.conf %{buildroot}/etc/xapi -install -m 0644 ${_sourcedir}/xen-api-xapissl-conf %{buildroot}/etc/xapi/xapissl.conf +mkdir -p %{buildroot}/etc/xapi +install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf +install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf +install -m 0644 %{_sourcedir}/xen-api-xapissl-conf %{buildroot}/etc/xapi/xapissl.conf install -m 0755 ocaml/xe-cli/xe.opt %{buildroot}/%{_bindir}/xe -mkdir %{buildroot}/etc/bash_completion.d +mkdir -p %{buildroot}/etc/bash_completion.d install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/xe +mkdir -p %{buildroot}/var/lib/xapi + %clean rm -rf %{buildroot} @@ -79,9 +87,12 @@ fi %files %defattr(-,root,root,-) %{_bindir}/xapi +/etc/init.d/xapi %config(noreplace) /etc/xapi.conf +%config(noreplace) /etc/xapi/xapissl.conf %{_libexecdir}/xapi/xapissl /etc/xapi/db.conf +/var/lib/xapi %files xe %defattr(-,root,root,-) diff --git a/mock.md b/mock.md index a67eab69..36f41cd4 100644 --- a/mock.md +++ b/mock.md @@ -122,4 +122,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvhd-0.9.0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-tapctl-0.9.0-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-1.9.1-0.src.rpm +createrepo RPMS/x86_64 ``` diff --git a/sources.csv b/sources.csv index 98b40bba..b150ed21 100644 --- a/sources.csv +++ b/sources.csv @@ -54,4 +54,4 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.0.tar.gz,xen-api-1.9.0.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.1.tar.gz,xen-api-1.9.1.tar.gz From 058670a532190e435a970b096230d8b4caa0d2ab Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 21:49:23 +0000 Subject: [PATCH 0135/1125] Add virtual xenserver package --- SOURCES/xenserver-readme | 1 + SPECS/xenserver.spec | 38 ++++++++++++++++++++++++++++++++++++++ mock.md | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 SOURCES/xenserver-readme create mode 100644 SPECS/xenserver.spec diff --git a/SOURCES/xenserver-readme b/SOURCES/xenserver-readme new file mode 100644 index 00000000..8cfede66 --- /dev/null +++ b/SOURCES/xenserver-readme @@ -0,0 +1 @@ +Insert some interesting information here. diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec new file mode 100644 index 00000000..5276d45b --- /dev/null +++ b/SPECS/xenserver.spec @@ -0,0 +1,38 @@ +Name: xenserver +Version: 0.9.0 +Release: 0 +Summary: A virtual package which installs the xapi toolstack +License: LGPL +Group: Development/Other +URL: http://www.xen.org/ +Source0: xenserver-readme +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +Requires: xapi xapi-xe +Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator +Requires: ffs xapi-libvirt-storage +Requires: xcp-networkd +Requires: squeezed +Requires: xen + +%description +A virtual package which installs the xapi toolstack. + +%prep + +%build + +%install +mkdir -p %{buildroot}/usr/share/doc/xenserver +install -m 0644 %{_sourcedir}/xenserver-readme %{buildroot}/usr/share/doc/xenserver/README + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +/usr/share/doc/xenserver/README + +%changelog +* Wed Jun 5 2013 David Scott +- Initial package + diff --git a/mock.md b/mock.md index 36f41cd4..c7c2c363 100644 --- a/mock.md +++ b/mock.md @@ -124,4 +124,6 @@ mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-tapctl-0.9.0 createrepo RPMS/x86_64 mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-1.9.1-0.src.rpm createrepo RPMS/x86_64 +mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenserver-0.9.0-0.src.rpm +createrepo RPMS/x86_64 ``` From efb3e535145b86d0dceb2455769bd73ed9ae586a Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 21:56:14 +0000 Subject: [PATCH 0136/1125] Remove some unnecessary runtime dependencies on ocaml --- SPECS/ffs.spec | 3 +-- SPECS/xapi-libvirt-storage.spec | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 302d5588..8bd36579 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,6 +1,6 @@ Name: ffs Version: 0.9.0 -Release: 0 +Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other @@ -12,7 +12,6 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel -Requires: ocaml %description Simple flat file storage manager for the xapi toolstack. diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 0df6b39c..c7319e87 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,6 +1,6 @@ Name: xapi-libvirt-storage Version: 0.9.0 -Release: 0 +Release: 1 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other @@ -12,7 +12,6 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvir BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel -Requires: ocaml %description Allows the manipulation of libvirt storage pools and volumes via xapi. From 084693c9da7715bdf175ddfce213daa2baa8839a Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 22:04:17 +0000 Subject: [PATCH 0137/1125] xapi: put xapi in /usr/sbin, not /usr/bin --- SPECS/xapi.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index cdccf3d8..e4b7c773 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -55,8 +55,8 @@ omake ocaml/xe-cli/xe %install rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_bindir} -install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_bindir}/xapi +mkdir -p %{buildroot}/%{_sbindir} +install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_sbindir}/xapi mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi @@ -66,6 +66,7 @@ install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf install -m 0644 %{_sourcedir}/xen-api-xapissl-conf %{buildroot}/etc/xapi/xapissl.conf +mkdir -p %{buildroot}/%{_bindir} install -m 0755 ocaml/xe-cli/xe.opt %{buildroot}/%{_bindir}/xe mkdir -p %{buildroot}/etc/bash_completion.d install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/xe @@ -86,7 +87,7 @@ fi %files %defattr(-,root,root,-) -%{_bindir}/xapi +%{_sbindir}/xapi /etc/init.d/xapi %config(noreplace) /etc/xapi.conf %config(noreplace) /etc/xapi/xapissl.conf From 086d0c3f6fa77adbc6b87fbfff2ff2d38fe4757d Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 22:29:46 +0000 Subject: [PATCH 0138/1125] xapi: add dep on xcp-inventory --- SPECS/xapi.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index e4b7c773..7b228b1e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.1 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -24,7 +24,7 @@ BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-de BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel -Requires: stunnel +Requires: stunnel ocaml-xcp-inventory %description XCP toolstack. @@ -44,7 +44,9 @@ The command-line interface for controlling XCP hosts. #%patch0 -p0 -b xapi-version.patch %build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi \ + --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts + export COMPILE_JAVA=no make version omake phase1 @@ -72,6 +74,7 @@ mkdir -p %{buildroot}/etc/bash_completion.d install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/xe mkdir -p %{buildroot}/var/lib/xapi +mkdir -p %{buildroot}/etc/xapi/hook-scripts %clean rm -rf %{buildroot} @@ -93,6 +96,7 @@ fi %config(noreplace) /etc/xapi/xapissl.conf %{_libexecdir}/xapi/xapissl /etc/xapi/db.conf +/etc/xapi/hook-scripts /var/lib/xapi %files xe From dc824cd9108215dcbe0b633bef048f45d3139831 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 22:30:05 +0000 Subject: [PATCH 0139/1125] xcp-inventory: actually create the configured directory in this package --- SPECS/xcp-inventory.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SPECS/xcp-inventory.spec b/SPECS/xcp-inventory.spec index b42a97e5..b2cf84e6 100644 --- a/SPECS/xcp-inventory.spec +++ b/SPECS/xcp-inventory.spec @@ -1,6 +1,6 @@ Name: ocaml-xcp-inventory Version: 0.9.0 -Release: 0 +Release: 1 Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception Group: Development/Other @@ -8,7 +8,6 @@ URL: http://github.com/xen-org/xcp-inventory Source0: xcp-inventory-0.9.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel -Requires: ocaml ocaml-findlib %description A simple library to read and write the XCP inventory file. @@ -16,6 +15,7 @@ A simple library to read and write the XCP inventory file. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: ocaml ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for @@ -26,7 +26,7 @@ developing applications that use %{name}. %build if [ -x ./configure ]; then - ./configure + ./configure --default_inventory=/etc/xcp/inventory fi make @@ -36,10 +36,15 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/etc/xcp %clean rm -rf %{buildroot} +%files +%defattr(-,root,root) +/etc/xcp + %files devel %defattr(-,root,root) %doc ChangeLog README.md LICENSE From 1ea3169b8fb7b9aa35da9c4c29f5056a6924e4f8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 22:38:56 +0000 Subject: [PATCH 0140/1125] xapi: add pci-info and pool.conf --- SOURCES/xen-api-xapi-conf | 3 ++- SPECS/xapi.spec | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SOURCES/xen-api-xapi-conf b/SOURCES/xen-api-xapi-conf index 61fcf5bc..5a3b8fb7 100644 --- a/SOURCES/xen-api-xapi-conf +++ b/SOURCES/xen-api-xapi-conf @@ -2,6 +2,7 @@ use-xenopsd = true disable-logging-for = http db_write redo_log api_readonly -xapissl=/usr/lib/xapi/xapissl +xapissl=/usr/libexec/xapi/xapissl +pci-info=/usr/libexec/xapi/pci-info udhcpd=/bin/true diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 7b228b1e..c8513615 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.1 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -63,6 +63,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl +install -m 0755 %{_sourcedir}/scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info mkdir -p %{buildroot}/etc/xapi install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf @@ -76,6 +77,8 @@ install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/ mkdir -p %{buildroot}/var/lib/xapi mkdir -p %{buildroot}/etc/xapi/hook-scripts +echo master > %{buildroot}/etc/pool.conf + %clean rm -rf %{buildroot} @@ -94,7 +97,9 @@ fi /etc/init.d/xapi %config(noreplace) /etc/xapi.conf %config(noreplace) /etc/xapi/xapissl.conf +%config(noreplace) /etc/pool.conf %{_libexecdir}/xapi/xapissl +%{_libexecdir}/xapi/pci-info /etc/xapi/db.conf /etc/xapi/hook-scripts /var/lib/xapi From b9a5c35dc2341fad9666330dcda6930dc546c57c Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 5 Jun 2013 22:59:17 +0000 Subject: [PATCH 0141/1125] xapi: correct path of pci-info --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c8513615..8a816042 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -63,7 +63,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl -install -m 0755 %{_sourcedir}/scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info +install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info mkdir -p %{buildroot}/etc/xapi install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf From 185d8e5461784fa6b978c3369949b378baf0b845 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 10:07:01 +0000 Subject: [PATCH 0142/1125] xapi: put pool.conf in /etc/xcp/pool.conf --- SPECS/xapi.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 8a816042..33c9bb88 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.1 -Release: 2 +Release: 3 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -77,7 +77,8 @@ install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/ mkdir -p %{buildroot}/var/lib/xapi mkdir -p %{buildroot}/etc/xapi/hook-scripts -echo master > %{buildroot}/etc/pool.conf +mkdir -p %{buildroot}/etc/xcp +echo master > %{buildroot}/etc/xcp/pool.conf %clean rm -rf %{buildroot} @@ -97,7 +98,7 @@ fi /etc/init.d/xapi %config(noreplace) /etc/xapi.conf %config(noreplace) /etc/xapi/xapissl.conf -%config(noreplace) /etc/pool.conf +%config(noreplace) /etc/xcp/pool.conf %{_libexecdir}/xapi/xapissl %{_libexecdir}/xapi/pci-info /etc/xapi/db.conf From c10ded6ee150a31b4ce1d6ebd874b85af42aca4e Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 10:32:24 +0000 Subject: [PATCH 0143/1125] xenserver: add dependency on 3.4 or greater kernel --- SPECS/xenserver.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 5276d45b..912b8e8b 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 0 +Release: 1 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -12,6 +12,7 @@ Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator Requires: ffs xapi-libvirt-storage Requires: xcp-networkd Requires: squeezed +Requires: kernel >= 3.4.46 kernel-firmware Requires: xen %description From c259518064b58c61774829e4dca2366e5602cfe4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 10:50:37 +0000 Subject: [PATCH 0144/1125] Add the camomile UTF library --- SPECS/camomile.spec | 167 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 SPECS/camomile.spec diff --git a/SPECS/camomile.spec b/SPECS/camomile.spec new file mode 100644 index 00000000..d5d421c3 --- /dev/null +++ b/SPECS/camomile.spec @@ -0,0 +1,167 @@ +#%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define opt 0 +%define debug_package %{nil} + +Name: ocaml-camomile +Version: 0.8.3 +Release: 0 +Summary: Unicode library for OCaml + +Group: Development/Libraries +# Several files are MIT and UCD licensed, but the overall work is LGPLv2+ +# and the LGPL/GPL supercedes compatible licenses. +# https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html +License: LGPLv2+ +URL: http://sourceforge.net/projects/camomile/ +Source0: http://downloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: ppc64 sparc64 s390 s390x + +BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc, ocaml-camlp4-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + +%description +Camomile is a Unicode library for ocaml. Camomile provides Unicode +character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from +about 200 encodings, collation and locale-sensitive case mappings, and +more. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%package data +Summary: Data files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description data +The %{name}-data package contains data files for developing +applications that use %{name}. + + +%prep +%setup -q -n camomile-%{version} + + +%build +./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir} +make +make dochtml +make man +strip tools/*.opt + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +mkdir -p $RPM_BUILD_ROOT%{_bindir} +make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir} +%if %opt +mv $RPM_BUILD_ROOT%{_bindir}/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap +mv $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README +%{_libdir}/ocaml/camomile +%if %opt +%exclude %{_libdir}/ocaml/camomile/*.a +%exclude %{_libdir}/ocaml/camomile/*.cmxa +%exclude %{_libdir}/ocaml/camomile/*.cmx +%endif +%exclude %{_libdir}/ocaml/camomile/*.mli +%if %opt +%{_bindir}/camomilecharmap +%{_bindir}/camomilelocaledef +%endif + + +%files devel +%defattr(-,root,root,-) +%doc README dochtml/* +%if %opt +%{_libdir}/ocaml/camomile/*.a +%{_libdir}/ocaml/camomile/*.cmxa +%{_libdir}/ocaml/camomile/*.cmx +%endif +%{_libdir}/ocaml/camomile/*.mli + + +%files data +%defattr(-,root,root,-) +%doc README +%{_datadir}/camomile/ + + +%changelog +* Wed Dec 30 2009 Richard W.M. Jones - 0.7.2-2 +- Rebuild for OCaml 3.11.2. + +* Thu Oct 8 2009 Richard W.M. Jones - 0.7.2-1 +- New upstream version 0.7.2. + +* Sat Jul 25 2009 Fedora Release Engineering - 0.7.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 23 2009 Richard W.M. Jones - 0.7.1-11 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Wed Feb 25 2009 Fedora Release Engineering - 0.7.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Nov 26 2008 Richard W.M. Jones - 0.7.1-9 +- Rebuild for OCaml 3.11.0+rc1. + +* Wed Nov 19 2008 Richard W.M. Jones - 0.7.1-8 +- Rebuild for OCaml 3.11.0 + +* Wed Apr 23 2008 Richard W.M. Jones - 0.7.1-7 +- Rebuild for OCaml 3.10.2 + +* Fri Mar 21 2008 Richard W.M. Jones - 0.7.1-6 +- ExcludeArch ppc64 (#438486). + +* Mon Mar 17 2008 Richard W.M. Jones - 0.7.1-5 +- Definitive license. +- Move ./configure into the build section. +- Remove a superfluous comment in the install section. +- Fix rpmlint error 'configure-without-libdir-spec'. +- Scratch build in Koji. + +* Wed Mar 5 2008 Richard W.M. Jones - 0.7.1-4 +- License is LGPLv2+ (no OCaml exception). + +* Wed Mar 5 2008 Richard W.M. Jones - 0.7.1-3 +- Remove ExcludeArch ppc64. + +* Tue Feb 12 2008 Richard W.M. Jones - 0.7.1-2 +- Added BR ocaml-camlp4-devel. +- Rename /usr/bin/*.opt as /usr/bin. + +* Wed Aug 08 2007 Richard W.M. Jones - 0.7.1-1 +- Initial RPM release. From 79b7927f7183448713b738c2145862b44b8fbbe2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 11:00:31 +0000 Subject: [PATCH 0145/1125] Add and build zed --- SPECS/xapi.spec | 2 +- SPECS/zed.spec | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ sources.csv | 2 ++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 SPECS/zed.spec diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 33c9bb88..221e34d0 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -23,7 +23,7 @@ BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel -BuildRequires: ocaml-bitstring-devel libuuid-devel +BuildRequires: ocaml-bitstring-devel libuuid-devel make Requires: stunnel ocaml-xcp-inventory %description diff --git a/SPECS/zed.spec b/SPECS/zed.spec new file mode 100644 index 00000000..c6f364d0 --- /dev/null +++ b/SPECS/zed.spec @@ -0,0 +1,50 @@ +Name: ocaml-zed +Version: 1.2 +Release: 0 +Summary: An abstract engine for text editing for OCaml +License: BSD3 +Group: Development/Other +URL: http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz +Source0: zed-1.2.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-react-devel +Requires: ocaml ocaml-findlib + +%description +Zed is an abstract engine for text edition. It can be used for writing text editors, edition widgets, readlines, ... + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n zed-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE CHANGES +%{_libdir}/ocaml/zed/* + +%changelog +* Thu Jun 6 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index b150ed21..1b73d252 100644 --- a/sources.csv +++ b/sources.csv @@ -55,3 +55,5 @@ xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0 xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, xapi.spec,https://github.com/djs55/xen-api/archive/1.9.1.tar.gz,xen-api-1.9.1.tar.gz +camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, +zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, From e0302490d04a5f9bcad696290a773d0874315b7c Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 11:14:40 +0000 Subject: [PATCH 0146/1125] Add and build lambda-term --- SPECS/lambda-term.spec | 51 ++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 52 insertions(+) create mode 100644 SPECS/lambda-term.spec diff --git a/SPECS/lambda-term.spec b/SPECS/lambda-term.spec new file mode 100644 index 00000000..8d9e613c --- /dev/null +++ b/SPECS/lambda-term.spec @@ -0,0 +1,51 @@ +Name: ocaml-lambda-term +Version: 1.2 +Release: 0 +Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml +License: BSD3 +Group: Development/Other +URL: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz +Source0: lambda-term-1.2.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc ocaml-zed-devel ocaml-lwt-devel ocaml-camomile-devel ocaml-react-devel +Requires: ocaml ocaml-findlib + +%description +Lambda-Term is a cross-platform library for manipulating the terminal. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n lambda-term-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +ocaml setup.ml -install + +rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE CHANGES +%{_libdir}/ocaml/lambda-term/* + +%changelog +* Thu Jun 6 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 1b73d252..97cefdf1 100644 --- a/sources.csv +++ b/sources.csv @@ -57,3 +57,4 @@ xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitio xapi.spec,https://github.com/djs55/xen-api/archive/1.9.1.tar.gz,xen-api-1.9.1.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, +lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From 936725ebb0b63c1cb9d6036576af7ff9e5638931 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 12:47:12 +0000 Subject: [PATCH 0147/1125] Add and build utop --- SPECS/utop.spec | 45 +++++++++++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 46 insertions(+) create mode 100644 SPECS/utop.spec diff --git a/SPECS/utop.spec b/SPECS/utop.spec new file mode 100644 index 00000000..60d9fc87 --- /dev/null +++ b/SPECS/utop.spec @@ -0,0 +1,45 @@ +Name: utop +Version: 1.4 +Release: 0 +Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... +License: BSD +Group: Development/Other +URL: https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz +Source0: utop-1.4.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc +BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel + +%description +utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... + +%prep +%setup -q -n utop-%{version} + +%build +ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE CHANGES.md +%{_bindir}/utop +%{_bindir}/utop-full +%{_libdir}/ocaml/utop/* +/usr/share/emacs/site-lisp/utop.el + +%changelog +* Thu May 30 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 97cefdf1..3d354abf 100644 --- a/sources.csv +++ b/sources.csv @@ -58,3 +58,4 @@ xapi.spec,https://github.com/djs55/xen-api/archive/1.9.1.tar.gz,xen-api-1.9.1.ta camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, +utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, From eb1d0a2303e7ef87d572634b1f4e06f0517941dc Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 13:11:18 +0000 Subject: [PATCH 0148/1125] Upgrade message switch to 0.9.3 --- SPECS/message-switch.spec | 8 ++++---- sources.csv | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index c5794f62..6ac4c672 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,11 +1,11 @@ Name: message-switch -Version: 0.9.2 -Release: 1 +Version: 0.9.3 +Release: 0 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.2.tar.gz -Source0: message-switch-0.9.2.tar.gz +URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.3.tar.gz +Source0: message-switch-0.9.3.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/sources.csv b/sources.csv index 3d354abf..b7cbed30 100644 --- a/sources.csv +++ b/sources.csv @@ -7,7 +7,7 @@ cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1 ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.2.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.3.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz From 4e4fe301be77920dad156389bf8112e3a13c3236 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 13:32:05 +0000 Subject: [PATCH 0149/1125] Update xapi to 1.9.2 --- SPECS/xapi.spec | 6 +++--- sources.csv | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 221e34d0..c4598a5b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.1 -Release: 3 +Version: 1.9.2 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -23,7 +23,7 @@ BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel -BuildRequires: ocaml-bitstring-devel libuuid-devel make +BuildRequires: ocaml-bitstring-devel libuuid-devel make utop Requires: stunnel ocaml-xcp-inventory %description diff --git a/sources.csv b/sources.csv index b7cbed30..32eb9185 100644 --- a/sources.csv +++ b/sources.csv @@ -54,7 +54,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.1.tar.gz,xen-api-1.9.1.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.2.tar.gz,xen-api-1.9.2.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From a047e6bda2799db53cfc7af3d03282be83e3593f Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 14:45:20 +0000 Subject: [PATCH 0150/1125] put all the dll*.so in ocaml/stublibs (since we can't modify ld.conf) --- SPECS/cdrom.spec | 18 +++++------------- SPECS/cstruct.spec | 6 +++++- SPECS/fd-send-recv.spec | 5 ++++- SPECS/js_of_ocaml.spec | 5 ++++- SPECS/lambda-term.spec | 6 +++++- SPECS/libvhd.spec | 5 ++++- SPECS/netdev.spec | 5 ++++- SPECS/oclock.spec | 13 +++++-------- SPECS/ssl.spec | 11 +++++++++-- SPECS/stdext.spec | 5 ++++- SPECS/xen-api-libs-transitional.spec | 9 ++++++++- SPECS/xen-lowlevel-libs.spec | 5 ++++- 12 files changed, 61 insertions(+), 32 deletions(-) diff --git a/SPECS/cdrom.spec b/SPECS/cdrom.spec index 0f639864..c7f9a910 100644 --- a/SPECS/cdrom.spec +++ b/SPECS/cdrom.spec @@ -1,6 +1,6 @@ Name: ocaml-cdrom Version: 0.9.1 -Release: 0 +Release: 2 Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception Group: Development/Other @@ -34,6 +34,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml @@ -43,18 +44,9 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root) %doc ChangeLog README.md -%{_libdir}/ocaml/cdrom/cdrom.a -%{_libdir}/ocaml/cdrom/cdrom.cma -%{_libdir}/ocaml/cdrom/cdrom.cmi -%{_libdir}/ocaml/cdrom/cdrom.cmxa -%{_libdir}/ocaml/cdrom/cdrom.mli -%{_libdir}/ocaml/cdrom/cdrom.cmx -%{_libdir}/ocaml/cdrom/cdrom.cmo -%{_libdir}/ocaml/cdrom/cdrom.o -%{_libdir}/ocaml/cdrom/cdrom_stubs.c.o -%{_libdir}/ocaml/cdrom/dllstubs_cdrom.so -%{_libdir}/ocaml/cdrom/libstubs_cdrom.a -%{_libdir}/ocaml/cdrom/META +%{_libdir}/ocaml/cdrom/* +%{_libdir}/ocaml/stublibs/dllstubs_cdrom.so +%{_libdir}/ocaml/stublibs/dllstubs_cdrom.so.owner %changelog * Tue May 28 2013 David Scott diff --git a/SPECS/cstruct.spec b/SPECS/cstruct.spec index 50ce2314..a50649a0 100644 --- a/SPECS/cstruct.spec +++ b/SPECS/cstruct.spec @@ -1,6 +1,6 @@ Name: ocaml-cstruct Version: 0.7.1 -Release: 0 +Release: 1 Summary: Read and write low-level C-style structures in OCaml License: ISC Group: Development/Other @@ -31,6 +31,8 @@ ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs + export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install DESTDIR=%{buildroot} @@ -42,6 +44,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md CHANGES %{_libdir}/ocaml/cstruct/* +%{_libdir}/ocaml/stublibs/dllcstruct_stubs.so +%{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner %changelog * Thu May 30 2013 David Scott diff --git a/SPECS/fd-send-recv.spec b/SPECS/fd-send-recv.spec index 6dba11fc..ee9ca324 100644 --- a/SPECS/fd-send-recv.spec +++ b/SPECS/fd-send-recv.spec @@ -1,6 +1,6 @@ Name: ocaml-fd-send-recv Version: 1.0.1 -Release: 0 +Release: 1 Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL Group: Development/Other @@ -32,6 +32,7 @@ ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install @@ -43,6 +44,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md LICENSE %{_libdir}/ocaml/fd-send-recv/* +%{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so +%{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so.owner %changelog * Fri May 31 2013 David Scott diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index e47ad4c2..4507ab75 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -1,6 +1,6 @@ Name: js_of_ocaml Version: 1.3.2 -Release: 0 +Release: 1 Summary: Compile OCaml programs to javascript License: LGPL and others Group: Development/Other @@ -31,6 +31,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore mkdir -p %{buildroot}/%{_bindir} @@ -43,6 +44,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc LICENSE README CHANGES %{_libdir}/ocaml/js_of_ocaml/* +%{_libdir}/ocaml/stublibs/dlljs_of_ocaml.so +%{_libdir}/ocaml/stublibs/dlljs_of_ocaml.so.owner %{_bindir}/js_of_ocaml %changelog diff --git a/SPECS/lambda-term.spec b/SPECS/lambda-term.spec index 8d9e613c..6628838e 100644 --- a/SPECS/lambda-term.spec +++ b/SPECS/lambda-term.spec @@ -1,6 +1,6 @@ Name: ocaml-lambda-term Version: 1.2 -Release: 0 +Release: 1 Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 Group: Development/Other @@ -32,6 +32,8 @@ ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs + export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install @@ -44,6 +46,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc LICENSE CHANGES %{_libdir}/ocaml/lambda-term/* +%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so +%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner %changelog * Thu Jun 6 2013 David Scott diff --git a/SPECS/libvhd.spec b/SPECS/libvhd.spec index 47de21a7..fa911d7f 100644 --- a/SPECS/libvhd.spec +++ b/SPECS/libvhd.spec @@ -1,6 +1,6 @@ Name: ocaml-libvhd Version: 0.9.0 -Release: 0 +Release: 1 Summary: vhd manipulation via libvhd License: BSD3 Group: Development/Other @@ -32,6 +32,7 @@ ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install @@ -43,6 +44,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc ChangeLog README.md %{_libdir}/ocaml/libvhd/* +%{_libdir}/ocaml/stublibs/dlllibvhd_stubs.so +%{_libdir}/ocaml/stublibs/dlllibvhd_stubs.so.owner %changelog * Wed May 29 2013 David Scott diff --git a/SPECS/netdev.spec b/SPECS/netdev.spec index d6756756..a45b01ee 100644 --- a/SPECS/netdev.spec +++ b/SPECS/netdev.spec @@ -1,6 +1,6 @@ Name: ocaml-netdev Version: 0.9.0 -Release: 0 +Release: 1 Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL Group: Development/Other @@ -34,6 +34,7 @@ ocaml setup.ml -build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install @@ -45,6 +46,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/netdev/* +%{_libdir}/ocaml/stublibs/dllnetdev_stubs.so +%{_libdir}/ocaml/stublibs/dllnetdev_stubs.so.owner %changelog * Thu May 30 2013 David Scott diff --git a/SPECS/oclock.spec b/SPECS/oclock.spec index ddc5deef..e99baec4 100644 --- a/SPECS/oclock.spec +++ b/SPECS/oclock.spec @@ -2,7 +2,7 @@ Name: ocaml-oclock Version: 0.3 -Release: 0 +Release: 2 Summary: POSIX monotonic clock for OCaml License: ISC Group: Development/Other @@ -40,6 +40,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml @@ -49,13 +50,9 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root) %doc LICENSE README.markdown -%{_libdir}/ocaml/oclock/oclock.a -%{_libdir}/ocaml/oclock/oclock.cma -%{_libdir}/ocaml/oclock/oclock.cmi -%{_libdir}/ocaml/oclock/oclock.cmxa -%{_libdir}/ocaml/oclock/liboclock.a -%{_libdir}/ocaml/oclock/dlloclock.so -%{_libdir}/ocaml/oclock/META +%{_libdir}/ocaml/oclock/* +%{_libdir}/ocaml/stublibs/dlloclock.so +%{_libdir}/ocaml/stublibs/dlloclock.so.owner %changelog * Wed May 29 2013 David Scott diff --git a/SPECS/ssl.spec b/SPECS/ssl.spec index ca023202..7b36f16e 100644 --- a/SPECS/ssl.spec +++ b/SPECS/ssl.spec @@ -1,6 +1,6 @@ Name: ocaml-ssl Version: 0.4.6 -Release: 0 +Release: 1 Summary: Use OpenSSL from OCaml License: LGPL Group: Development/Other @@ -25,12 +25,14 @@ developing applications that use %{name}. %setup -q -n ocaml-ssl-%{version} %build -./configure --disable-ldconf +./configure +# --disable-ldconf make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot} @@ -42,6 +44,11 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc CHANGES COPYING README %{_libdir}/ocaml/ssl/* +%{_libdir}/ocaml/stublibs/dllssl_stubs.so +%{_libdir}/ocaml/stublibs/dllssl_stubs.so.owner + +%{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so +%{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so.owner %changelog * Sun Jun 2 2013 David Scott diff --git a/SPECS/stdext.spec b/SPECS/stdext.spec index adbcab43..7e486db4 100644 --- a/SPECS/stdext.spec +++ b/SPECS/stdext.spec @@ -1,6 +1,6 @@ Name: ocaml-stdext Version: 0.9.0 -Release: 0 +Release: 1 Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Other @@ -31,6 +31,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} @@ -42,6 +43,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md %{_libdir}/ocaml/stdext/* +%{_libdir}/ocaml/stublibs/dllstdext_stubs.so +%{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner %changelog * Mon Jun 3 2013 David Scott diff --git a/SPECS/xen-api-libs-transitional.spec b/SPECS/xen-api-libs-transitional.spec index bd6f5bf1..d9e11324 100644 --- a/SPECS/xen-api-libs-transitional.spec +++ b/SPECS/xen-api-libs-transitional.spec @@ -1,6 +1,6 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.0 -Release: 0 +Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception Group: Development/Other @@ -36,6 +36,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml @@ -59,6 +60,12 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore-compat/* %{_libdir}/ocaml/xen-utils/* %{_libdir}/ocaml/xml-light2/* +%{_libdir}/ocaml/stublibs/dllcpuid_stubs.so +%{_libdir}/ocaml/stublibs/dllcpuid_stubs.so.owner +%{_libdir}/ocaml/stublibs/dlllog_stubs.so +%{_libdir}/ocaml/stublibs/dlllog_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so +%{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner %changelog * Wed Jun 5 2013 David Scott diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 8a21b530..660bb0a6 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -1,6 +1,6 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.0 -Release: 0 +Release: 1 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other @@ -31,6 +31,7 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} @@ -42,6 +43,8 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md %{_libdir}/ocaml/xenctrl/* +%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so +%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner %changelog * Mon Jun 3 2013 David Scott From 6d4cf966b676d3c0cfb5128c3efc414e1aeda481 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 15:16:39 +0000 Subject: [PATCH 0151/1125] utop requires ocaml-camomile-data at runtime --- SPECS/utop.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 60d9fc87..becd54f0 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,6 +1,6 @@ Name: utop Version: 1.4 -Release: 0 +Release: 1 Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... License: BSD Group: Development/Other @@ -9,6 +9,7 @@ Source0: utop-1.4.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel +Requires: ocaml-camomile-data %description utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... From 40c5228ec1059754a1737df7cd16d66a5dff5a51 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 17:46:38 +0000 Subject: [PATCH 0152/1125] xcp-idl 0.9.2 now depends on xcp-rrd --- SPECS/xcp-idl.spec | 6 +++--- SPECS/xcp-rrd.spec | 48 ++++++++++++++++++++++++++++++++++++++++++++++ sources.csv | 3 ++- 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 SPECS/xcp-rrd.spec diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 3d7dd7e5..1377c943 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,14 +1,14 @@ Name: ocaml-xcp-idl -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.1.tar.gz +URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-%{version}.tar.gz Source0: xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel +BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel # XXX transitive dependencies of message-switch-devel BuildRequires: ocaml-oclock-devel diff --git a/SPECS/xcp-rrd.spec b/SPECS/xcp-rrd.spec new file mode 100644 index 00000000..54d972f5 --- /dev/null +++ b/SPECS/xcp-rrd.spec @@ -0,0 +1,48 @@ +Name: ocaml-xcp-rrd +Version: 0.9.0 +Release: 0 +Summary: Round-Robin Datasources in OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-%{version}.tar.gz +Source0: xcp-rrd-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel +Requires: ocaml ocaml-findlib + +%description +Round-Robin Datasources in OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xcp-rrd-xcp-rrd-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/xcp-rrd/* + +%changelog +* Thu Jun 6 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 32eb9185..ed0727d1 100644 --- a/sources.csv +++ b/sources.csv @@ -21,7 +21,8 @@ tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.1.tar.gz, +xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.2.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.3.tar.gz,xen-api-client-0.9.3.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, From c3dcd4c93fde1ba83ba582e50e6ab967317a67a2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 19:09:29 +0000 Subject: [PATCH 0153/1125] xcp-networkd: needs both /etc/xcp/network.conf and /etc/xcp-networkd.conf --- SOURCES/xcp-networkd-conf | 2 ++ SOURCES/xcp-networkd-network-conf | 1 + SPECS/xcp-networkd.spec | 9 ++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 SOURCES/xcp-networkd-conf create mode 100644 SOURCES/xcp-networkd-network-conf diff --git a/SOURCES/xcp-networkd-conf b/SOURCES/xcp-networkd-conf new file mode 100644 index 00000000..efa12c78 --- /dev/null +++ b/SOURCES/xcp-networkd-conf @@ -0,0 +1,2 @@ +brctl=/usr/sbin/brctl + diff --git a/SOURCES/xcp-networkd-network-conf b/SOURCES/xcp-networkd-network-conf new file mode 100644 index 00000000..7096907a --- /dev/null +++ b/SOURCES/xcp-networkd-network-conf @@ -0,0 +1 @@ +bridge diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index a3caad2d..2bcfb206 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,12 +1,14 @@ Name: xcp-networkd Version: 0.9.0 -Release: 0 +Release: 1 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz Source0: xcp-networkd-0.9.0.tar.gz Source1: xcp-networkd-init +Source2: xcp-networkd-conf +Source3: xcp-networkd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel @@ -31,6 +33,9 @@ mkdir -p %{buildroot}/%{_sbindir} install dist/build/xcp-networkd/xcp-networkd %{buildroot}/%{_sbindir}/xcp-networkd mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd +mkdir -p %{buildroot}/etc/xcp +install -m 0644 %{_sourcedir}/xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf +install -m 0644 %{_sourcedir}/xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf %clean rm -rf %{buildroot} @@ -40,6 +45,8 @@ rm -rf %{buildroot} %doc README.markdown LICENSE MAINTAINERS %{_sbindir}/xcp-networkd %{_sysconfdir}/init.d/xcp-networkd +/etc/xcp/network.conf +/etc/xcp-networkd.conf %post /sbin/chkconfig --add xcp-networkd From be11643b577a98b03f6976bc4cc7cc4b38099aa3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 6 Jun 2013 19:17:52 +0000 Subject: [PATCH 0154/1125] xcp-networkd: mark the network.conf and the xcp-networkd.conf as config files, with noreplace --- SPECS/xcp-networkd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 2bcfb206..0ebde66d 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -45,8 +45,8 @@ rm -rf %{buildroot} %doc README.markdown LICENSE MAINTAINERS %{_sbindir}/xcp-networkd %{_sysconfdir}/init.d/xcp-networkd -/etc/xcp/network.conf -/etc/xcp-networkd.conf +%config(noreplace) /etc/xcp/network.conf +%config(noreplace) /etc/xcp-networkd.conf %post /sbin/chkconfig --add xcp-networkd From 480b3a7bff129590f3dd1a530a95aedf6c9048ef Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 7 Jun 2013 09:59:15 +0100 Subject: [PATCH 0155/1125] re: Fix %prep target to match the directory in which the new tarball extracts itself. --- SPECS/re.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/re.spec b/SPECS/re.spec index 3ef9b196..a94ad8e7 100644 --- a/SPECS/re.spec +++ b/SPECS/re.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-ocaml-re-f572d01 +%setup -q -n ocaml-ocaml-re-f464ffd %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml From 5f33c12be8613280f53147793322e171ccdc8ab6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 09:52:33 +0000 Subject: [PATCH 0156/1125] xe: now Requires bash-completion; in related news bash-completion now works --- SPECS/xapi.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c4598a5b..82ba719a 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.2 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -35,6 +35,7 @@ This package contains the xapi toolstack. %package xe Summary: The xapi toolstack CLI Group: System/Hypervisor +Requires: bash-completion %description xe The command-line interface for controlling XCP hosts. From 7c168e5b5f3f30cb0ba0dd726678fac74c6b28d9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 10:43:38 +0000 Subject: [PATCH 0157/1125] xapi: add update-mh-info to libexec/xapi (otherwise management interface reconfigure/disable fails) --- SPECS/xapi.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 82ba719a..97550895 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.2 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -65,6 +65,7 @@ install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xap mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info +install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info mkdir -p %{buildroot}/etc/xapi install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf @@ -102,6 +103,7 @@ fi %config(noreplace) /etc/xcp/pool.conf %{_libexecdir}/xapi/xapissl %{_libexecdir}/xapi/pci-info +%{_libexecdir}/xapi/update-mh-info /etc/xapi/db.conf /etc/xapi/hook-scripts /var/lib/xapi From 49e36dd8695f96ecb57bf16cf2c84a13e791b092 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 10:50:33 +0000 Subject: [PATCH 0158/1125] xcp-networkd: update to 0.9.1 --- SPECS/xcp-networkd.spec | 11 +++++++---- sources.csv | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 0ebde66d..595f4a65 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,11 +1,11 @@ Name: xcp-networkd -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz -Source0: xcp-networkd-0.9.0.tar.gz +URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz +Source0: xcp-networkd-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf @@ -58,6 +58,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Jun 7 2013 David Scott +- Update to 0.9.1 + * Wed Jun 5 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index ed0727d1..28dd409a 100644 --- a/sources.csv +++ b/sources.csv @@ -52,7 +52,7 @@ xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, -xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.0.tar.gz, +xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.1.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, xapi.spec,https://github.com/djs55/xen-api/archive/1.9.2.tar.gz,xen-api-1.9.2.tar.gz From 0b6f40babe8743656f86972247e37c6496aff758 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 12:55:17 +0000 Subject: [PATCH 0159/1125] xapi: include an empty /usr/share/xapi/packages/iso --- SPECS/xapi.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 97550895..231a6d3e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.2 -Release: 2 +Release: 3 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -46,7 +46,8 @@ The command-line interface for controlling XCP hosts. %build ./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi \ - --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts + --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts \ + --sharedir=/usr/share/xapi export COMPILE_JAVA=no make version @@ -82,6 +83,8 @@ mkdir -p %{buildroot}/etc/xapi/hook-scripts mkdir -p %{buildroot}/etc/xcp echo master > %{buildroot}/etc/xcp/pool.conf +mkdir -p %{buildroot}/usr/share/xapi/packages/iso + %clean rm -rf %{buildroot} @@ -107,6 +110,7 @@ fi /etc/xapi/db.conf /etc/xapi/hook-scripts /var/lib/xapi +/usr/share/xapi/packages/iso %files xe %defattr(-,root,root,-) From 61d576e3ae6893324215bfde9617e9ce03483d74 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 7 Jun 2013 14:41:32 +0100 Subject: [PATCH 0160/1125] Build: Add a script to generate a Makefile, using the dependency information from the RPM spec files. --- makemake.py | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++ mock.md | 113 +-------------------------------------------------- 2 files changed, 117 insertions(+), 111 deletions(-) create mode 100755 makemake.py diff --git a/makemake.py b/makemake.py new file mode 100755 index 00000000..421c0157 --- /dev/null +++ b/makemake.py @@ -0,0 +1,115 @@ +#!/usr/bin/python + +# see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html + +import rpm +import os + +# for debugging, make all paths relative to PWD +rpm.addMacro( '_topdir', '.' ) + +rpm_dir = rpm.expandMacro( '%_rpmdir' ) +spec_dir = rpm.expandMacro( '%_specdir' ) +srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) + +print "all: rpms" + +rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) + +ts = rpm.TransactionSet() + +def specFromFile( spec ): + return rpm.ts().parseSpec( spec ) + +spec_names = os.listdir( spec_dir ) +specs = { s: specFromFile( os.path.join( spec_dir, s ) ) for s in spec_names } + +def srpmNameFromSpec( spec ): + h = spec.sourceHeader + rpm.addMacro( 'NAME', h['name'] ) + rpm.addMacro( 'VERSION', h['version'] ) + rpm.addMacro( 'RELEASE', h['release'] ) + rpm.addMacro( 'ARCH', 'src' ) + + # There doesn't seem to be a macro for the name of the source + # rpm, but the name appears to be the same as the rpm name format. + # Unfortunately expanding that macro gives us a leading 'src' that we + # don't want, so we strip that off + + srpmname = os.path.basename( rpm.expandMacro( rpmfilenamepat ) ) + rpm.delMacro( 'NAME' ) + rpm.delMacro( 'VERSION' ) + rpm.delMacro( 'RELEASE' ) + rpm.delMacro( 'ARCH' ) + return srpmname + +# Rules to build SRPM from SPEC +rule_spec_from_srpm = 'rpmbuild -bs $<' +for specname, spec in specs.iteritems(): + srpmname = srpmNameFromSpec( spec ) + print '%s: %s' % (os.path.join( srpm_dir, srpmname ), + os.path.join( spec_dir, specname ) ) + print '\t%s' % rule_spec_from_srpm + +def rpmNamesFromSpec( spec ): + def rpmNameFromHeader( h ): + rpm.addMacro( 'NAME', h['name'] ) + rpm.addMacro( 'VERSION', h['version'] ) + rpm.addMacro( 'RELEASE', h['release'] ) + rpm.addMacro( 'ARCH', rpm.expandMacro( '%_arch' ) ) + rpmname = rpm.expandMacro( rpmfilenamepat ) + rpm.delMacro( 'NAME' ) + rpm.delMacro( 'VERSION' ) + rpm.delMacro( 'RELEASE' ) + rpm.delMacro( 'ARCH' ) + return rpmname + return [rpmNameFromHeader( p.header ) for p in spec.packages] + + +# Rules to build RPMS from SRPMS (uses information from the SPECs to +# get packages) +rule_rpm_from_srpm = 'mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" $< && createrepo RPMS/x86_64' +for specname, spec in specs.iteritems(): + # This doesn't generate the right Makefile fragment for a multi-target + # rule - we may end up building too often, or not rebuilding correctly + # on a partial build + rpmnames = rpmNamesFromSpec( spec ) + srpmname = srpmNameFromSpec( spec ) + for r in rpmnames: + print '%s: %s' % ( os.path.join( rpm_dir, r), + os.path.join( srpm_dir, srpmname )) + print '\t%s' % rule_rpm_from_srpm + +# RPM build dependencies. The 'requires' key for the *source* RPM is +# actually the 'buildrequires' key from the spec +def buildRequiresFromSpec( spec ): + return spec.sourceHeader['requires'] + +provides_to_rpm = {} +for specname, spec in specs.iteritems(): + for package in spec.packages: + for provided in package.header['provides']: + for rpmname in rpmNamesFromSpec( spec ): + provides_to_rpm[ provided ] = rpmname + +for specname, spec in specs.iteritems(): + for rpmname in rpmNamesFromSpec( spec ): + for buildreq in buildRequiresFromSpec( spec ): + # Some buildrequires come from the system repository + if provides_to_rpm.has_key( buildreq ): + buildreqrpm = provides_to_rpm[buildreq] + print "%s: %s" % (os.path.join( rpm_dir, rpmname ), + os.path.join( rpm_dir, buildreqrpm ) ) + + +# Generate targets to build all srpms and all rpms +all_srpms = [ os.path.join( srpm_dir, srpmNameFromSpec( s ) ) + for s in specs.values() ] + +all_rpms = [] +for rpms in [ rpmNamesFromSpec( s ) for s in specs.values() ]: + all_rpms += [ os.path.join( rpm_dir, rpm ) for rpm in rpms ] + + +print "rpms: " + " \\\n\t".join( all_rpms ) +print "srpms: " + " \\\n\t".join( all_srpms ) diff --git a/mock.md b/mock.md index c7c2c363..90e71204 100644 --- a/mock.md +++ b/mock.md @@ -15,115 +15,6 @@ cp xenserver.cfg /etc/mock/ # edit so last repo points to file:///home//bl su - -mock -r xenserver --init -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-obuild-0.0.2-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/cppo-0.9.3-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/easy-format-1.0.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/biniou-1.0.6-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-yojson-1.1.6-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/cmdliner-0.9.3-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ounit-1.1.2-3.el6.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-qmp-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/optcomp-1.4-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-ocplib-endian-0.3-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cstruct-0.7.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-cdrom-0.9.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-re-1.2.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-uri-1.3.8-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-react-0.9.4-0.el6.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir=./RPMS/%(target_arch)s/ SRPMS/ocaml-text-0.6-0.el6.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-cohttp-0.9.8-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xmlm-1.1.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-syslog-1.4-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-bitstring-2.0.4-0.el6.src.rpm createrepo RPMS/x86_64 -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-oclock-0.3-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-nbd-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/omake-0.9.8.6-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-type-conv-109.20.00-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/deriving-ocsigen-0.3c-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/js_of_ocaml-1.3.2-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-rpc-1.4.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-ssl-0.4.6-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-1.2.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/message-switch-0.9.2-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-fd-send-recv-1.0.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-idl-0.9.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-uuidm-0.9.5-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenops-cli-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/sm-cli-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-stdext-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/forkexec-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-lowlevel-libs-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvirt-0.6.1.2-1.el6.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-libvirt-storage-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ffs-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-sexplib-109.20.00-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xenstore-clients-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenopsd-0.9.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/vncterm-0.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/squeezed-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xcp-inventory-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-libs-transitional-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-xen-api-client-0.9.3-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xcp-networkd-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-netdev-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-libvhd-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/ocaml-tapctl-0.9.0-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xapi-1.9.1-0.src.rpm -createrepo RPMS/x86_64 -mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" SRPMS/xenserver-0.9.0-0.src.rpm -createrepo RPMS/x86_64 +./makemake.py > Makefile +make ``` From fdc908181b4078fc5c9251c932e6ed6e618365a9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 14:24:14 +0000 Subject: [PATCH 0161/1125] xapi: it turns out that RPM ignores \-separated lines by silently skipping them --- SOURCES/xen-api-xapissl-conf | 13 ------------- SPECS/xapi.spec | 4 +--- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 SOURCES/xen-api-xapissl-conf diff --git a/SOURCES/xen-api-xapissl-conf b/SOURCES/xen-api-xapissl-conf deleted file mode 100644 index 7eda44a7..00000000 --- a/SOURCES/xen-api-xapissl-conf +++ /dev/null @@ -1,13 +0,0 @@ -pid = /var/run/xapissl.pid -socket = r:TCP_NODELAY=1 -socket = a:TCP_NODELAY=1 -socket = l:TCP_NODELAY=1 -compression = zlib - -[xapi] -accept = 0.0.0.0 -connect = 80 -cert = /etc/xapi/ssl.pem -ciphers = !SSLv2:RSA+AES256-SHA:RSA+AES128-SHA:RSA+RC4-SHA:RSA+RC4-MD5:RSA+DES-CBC3-SHA -TIMEOUTclose = 0 - diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 231a6d3e..95904705 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -45,9 +45,7 @@ The command-line interface for controlling XCP hosts. #%patch0 -p0 -b xapi-version.patch %build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi \ - --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts \ - --sharedir=/usr/share/xapi +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi export COMPILE_JAVA=no make version From 82947bdb5256e8b2cfd10fdbef71b3f06ef88eb7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 7 Jun 2013 14:24:49 +0000 Subject: [PATCH 0162/1125] xapi: generate the xapissl.conf from the init.d script as upstream intended This is important because xapi tells xapissl what addresses to accept on. --- SOURCES/xen-api-xapissl | 31 ++++++++++++++++++++++++++++++- SPECS/xapi.spec | 7 ++----- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index b14278c3..6c4566b2 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -40,6 +40,32 @@ EOF fi } +# Write out the stunnel config file. This requires the management +# interface, so it's done here rather than written statically. +writeconffile () { + # Initial boilerplate which is valid whether the management + # interface is enabled or disabled. + cat > $SSLCONFFILE < Date: Fri, 7 Jun 2013 15:15:36 +0000 Subject: [PATCH 0163/1125] xapi: add a pam configuration suitable for CentOS I verified that a non-root user cannot execute xe commands without re-authenticating as root. --- SOURCES/xen-api-pam | 3 +++ SPECS/xapi.spec | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 SOURCES/xen-api-pam diff --git a/SOURCES/xen-api-pam b/SOURCES/xen-api-pam new file mode 100644 index 00000000..9f1d921c --- /dev/null +++ b/SOURCES/xen-api-pam @@ -0,0 +1,3 @@ +auth include password-auth +account include password-auth +password include password-auth diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index a600c4f9..978c365a 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.2 -Release: 5 +Release: 6 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -12,6 +12,7 @@ Source1: xen-api-xapi-conf Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf +Source5: xen-api-pam BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel @@ -58,6 +59,8 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_sbindir}/xapi +mkdir -p %{buildroot}/etc/pam.d +install -m 0644 %{_sourcedir}/xen-api-pam %{buildroot}/etc/pam.d/xapi mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi @@ -106,6 +109,7 @@ fi /etc/xapi/hook-scripts /var/lib/xapi /usr/share/xapi/packages/iso +/etc/pam.d/xapi %files xe %defattr(-,root,root,-) From 109c57a22da21c11929f81e1c59930cd10a8c83d Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Fri, 7 Jun 2013 17:30:06 +0100 Subject: [PATCH 0164/1125] Convert list/dict comprehensions for use on CentOS's version of Python Signed-off-by: Mike McClurg --- makemake.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makemake.py b/makemake.py index 421c0157..39c9bee6 100755 --- a/makemake.py +++ b/makemake.py @@ -22,7 +22,9 @@ def specFromFile( spec ): return rpm.ts().parseSpec( spec ) spec_names = os.listdir( spec_dir ) -specs = { s: specFromFile( os.path.join( spec_dir, s ) ) for s in spec_names } +specs = {} +for s in spec_names: + specs[s] = specFromFile( os.path.join( spec_dir, s ) ) def srpmNameFromSpec( spec ): h = spec.sourceHeader @@ -108,7 +110,7 @@ def buildRequiresFromSpec( spec ): all_rpms = [] for rpms in [ rpmNamesFromSpec( s ) for s in specs.values() ]: - all_rpms += [ os.path.join( rpm_dir, rpm ) for rpm in rpms ] + all_rpms += map( (lambda rpm: os.path.join( rpm_dir, rpm )), rpms ) print "rpms: " + " \\\n\t".join( all_rpms ) From 4288e82f15307d357bf03d1eeaf1f840e9c0b480 Mon Sep 17 00:00:00 2001 From: jludlam Date: Fri, 7 Jun 2013 22:56:09 +0100 Subject: [PATCH 0165/1125] Fix the dependency generation I suspect maybe fedora's rpm python stuff puts the rpm name into 'provides' - CentOS's version doesn't seem to, so this commit puts it in explicitly. Signed-off-by: Jon Ludlam --- makemake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makemake.py b/makemake.py index 39c9bee6..0e1be621 100755 --- a/makemake.py +++ b/makemake.py @@ -90,7 +90,7 @@ def buildRequiresFromSpec( spec ): provides_to_rpm = {} for specname, spec in specs.iteritems(): for package in spec.packages: - for provided in package.header['provides']: + for provided in (package.header['provides'] + [package.header['name']]): for rpmname in rpmNamesFromSpec( spec ): provides_to_rpm[ provided ] = rpmname From 6278659f29db3c39c8cbbd62318a9edbb4def9bb Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Sat, 8 Jun 2013 09:29:40 +0100 Subject: [PATCH 0166/1125] Move mock.md info to README.md Signed-off-by: Mike McClurg --- README.md | 22 +++++++++++++++++++++- mock.md | 20 -------------------- 2 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 mock.md diff --git a/README.md b/README.md index 100031b9..81aaee6a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,24 @@ xen-api-rpm-buildroot ===================== -RPM buildroot for xen-api and related packages \ No newline at end of file +RPM buildroot for xen-api and related packages. To use this, clone the +repo into ~/rpmbuild. You'll need to set up a user to run mock. + +Using mock to build these RPMs: +------------------------------- + +``` +useradd -G mock +passwd + +git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild +mkdir -p /home//rpmbuild/RPMS/x86_64/ +createrepo /home//rpmbuild/RPMS/x86_64 + +cp xenserver.cfg /etc/mock/ # edit so last repo points to file:///home//blah + +su - + +./makemake.py > Makefile +make +``` diff --git a/mock.md b/mock.md deleted file mode 100644 index 90e71204..00000000 --- a/mock.md +++ /dev/null @@ -1,20 +0,0 @@ -Using mock to build these RPMs: -============================== - -(tidy this up later) - -``` -useradd -G mock -passwd - -git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild -mkdir -p /home//rpmbuild/RPMS/x86_64/ -createrepo /home//rpmbuild/RPMS/x86_64 - -cp xenserver.cfg /etc/mock/ # edit so last repo points to file:///home//blah - -su - - -./makemake.py > Makefile -make -``` From c7e50130f0879cb60cee8608d98f75ce0b63d0b2 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Sat, 8 Jun 2013 09:46:56 +0100 Subject: [PATCH 0167/1125] Auto-configure xenserver.cfg, update README Add a configure script that sets the home directory in xenserver.cfg. Update the readme with new instructions for setting up the environment. Signed-off-by: Mike McClurg --- README.md | 7 ++++--- configure.sh | 3 +++ xenserver.cfg => xenserver.cfg.in | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 configure.sh rename xenserver.cfg => xenserver.cfg.in (97%) diff --git a/README.md b/README.md index 81aaee6a..9c614286 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,14 @@ Using mock to build these RPMs: useradd -G mock passwd +su - + git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild mkdir -p /home//rpmbuild/RPMS/x86_64/ createrepo /home//rpmbuild/RPMS/x86_64 -cp xenserver.cfg /etc/mock/ # edit so last repo points to file:///home//blah - -su - +./configure.sh +sudo cp xenserver.cfg /etc/mock/ ./makemake.py > Makefile make diff --git a/configure.sh b/configure.sh new file mode 100755 index 00000000..42eacefa --- /dev/null +++ b/configure.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sed "s|@HOME@|$HOME|" xenserver.cfg.in > xenserver.cfg diff --git a/xenserver.cfg b/xenserver.cfg.in similarity index 97% rename from xenserver.cfg rename to xenserver.cfg.in index d24f65bc..d9927c10 100644 --- a/xenserver.cfg +++ b/xenserver.cfg.in @@ -70,6 +70,7 @@ enabled=0 [mock] name=Mock output baseurl=file:///home/djs/rpmbuild/RPMS/x86_64 +baseurl=file://@HOME@/rpmbuild/RPMS/x86_64 gpgcheck=0 priority=1 enabled=1 From 781e187ff6a9def2530b4eb10e736a498a3a7b45 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Sat, 8 Jun 2013 09:51:14 +0100 Subject: [PATCH 0168/1125] Remove duplicate line in xenserver.cfg.in Signed-off-by: Mike McClurg --- xenserver.cfg.in | 1 - 1 file changed, 1 deletion(-) diff --git a/xenserver.cfg.in b/xenserver.cfg.in index d9927c10..3afa32f9 100644 --- a/xenserver.cfg.in +++ b/xenserver.cfg.in @@ -69,7 +69,6 @@ enabled=0 [mock] name=Mock output -baseurl=file:///home/djs/rpmbuild/RPMS/x86_64 baseurl=file://@HOME@/rpmbuild/RPMS/x86_64 gpgcheck=0 priority=1 From 61546df08354e45430b6a6420fb836b6823e095f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 17:54:46 +0000 Subject: [PATCH 0169/1125] xapi: package the XenAPI python code --- SPECS/xapi.spec | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 978c365a..be401502 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.2 -Release: 6 +Release: 7 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -40,6 +40,14 @@ Requires: bash-completion %description xe The command-line interface for controlling XCP hosts. +%package python-devel +Summary: XenAPI client support in python +Group: System/Hypervisor +Requires: python + +%description python-devel +Libraries for writing XenAPI clients in python. + %prep %setup -q -n xen-api-%{version} #%patch0 -p0 -b xapi-version.patch @@ -84,6 +92,10 @@ echo master > %{buildroot}/etc/xcp/pool.conf mkdir -p %{buildroot}/usr/share/xapi/packages/iso +mkdir -p %{buildroot}/usr/lib/python2.6/site-packages +install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}/usr/lib/python2.6/site-packages/ +install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}/usr/lib/python2.6/site-packages/ + %clean rm -rf %{buildroot} @@ -116,9 +128,22 @@ fi %{_bindir}/xe /etc/bash_completion.d/xe -%changelog +%files python-devel +%defattr(-,root,root,-) +/usr/lib/python2.6/site-packages/XenAPI.py +/usr/lib/python2.6/site-packages/XenAPI.pyo +/usr/lib/python2.6/site-packages/XenAPI.pyc +/usr/lib/python2.6/site-packages/XenAPIPlugin.py +/usr/lib/python2.6/site-packages/XenAPIPlugin.pyo +/usr/lib/python2.6/site-packages/XenAPIPlugin.pyc + +%changelog +* Sun Jun 8 2013 David Scott +- Add python-devel for writing python clients +* Wed Jun 5 2013 David Scott +- Initial package From 9a91cca70ff6708db990bd2495ca290cfe228776 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 17:57:11 +0000 Subject: [PATCH 0170/1125] xenserver: add dependency on xapi-python-devel --- SPECS/xenserver.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 912b8e8b..67501bbd 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,13 +1,13 @@ Name: xenserver Version: 0.9.0 -Release: 1 +Release: 2 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other URL: http://www.xen.org/ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -Requires: xapi xapi-xe +Requires: xapi xapi-xe xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator Requires: ffs xapi-libvirt-storage Requires: xcp-networkd @@ -34,6 +34,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Sat Jun 8 2013 David Scott +- add dependency on xapi-python-devel for use by the install wizard + * Wed Jun 5 2013 David Scott - Initial package From 4895363588f425d61199cf56a610309df24e43d5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 18:01:01 +0000 Subject: [PATCH 0171/1125] xapi: use the CLI to request a clean shutdown before killing with a signal. --- SOURCES/xen-api-init | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index 7be4eab6..bd81088a 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -45,6 +45,25 @@ start() { } stop() { echo -n $"Shutting down xapi: " + + # Use the CLI to request a clean shutdown + RETRIES=60 + while [ ${RETRIES} -ne 0 ]; do + xe host-shutdown-agent 2> /dev/null + # Finish if all xapis have gone + xapi_pids=$(pidof $prog) + if [ -z "$xapi_pids" ]; then + logger "xapi stopped successfully" + rm -f $PIDFILE $lockfile + success $"xapi stopped successfully" + echo + return 0 + fi + sleep 1 + echo -n . + RETRIES=$(( ${RETRIES} - 1 )) + done + killproc -p "$PIDFILE" $exec RETVAL=$? echo From 52fba145ac1f6731c5eea20941e2ff3cdf29ecc1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 21:17:43 +0000 Subject: [PATCH 0172/1125] xapi: update to 1.9.3 --- SPECS/xapi.spec | 4 ++-- sources.csv | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index be401502..5070d3c1 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.2 -Release: 7 +Version: 1.9.3 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org diff --git a/sources.csv b/sources.csv index 28dd409a..905c0d08 100644 --- a/sources.csv +++ b/sources.csv @@ -55,7 +55,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.1.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.2.tar.gz,xen-api-1.9.2.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.3.tar.gz,xen-api-1.9.3.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From 51702c5cfdb5c1d358e6630fbca39c5b513c7204 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 21:43:18 +0000 Subject: [PATCH 0173/1125] xenserver: add xenops and SM CLIs --- SPECS/xenserver.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 67501bbd..88356ef4 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 2 +Release: 3 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -8,8 +8,8 @@ URL: http://www.xen.org/ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xapi xapi-xe xapi-python-devel -Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator -Requires: ffs xapi-libvirt-storage +Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator xenops-cli +Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd Requires: squeezed Requires: kernel >= 3.4.46 kernel-firmware @@ -36,6 +36,7 @@ rm -rf %{buildroot} %changelog * Sat Jun 8 2013 David Scott - add dependency on xapi-python-devel for use by the install wizard +- include the xenops and SM CLIs * Wed Jun 5 2013 David Scott - Initial package From 9886224f344354d7944c1133b6d4234e756e52be Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 22:15:14 +0000 Subject: [PATCH 0174/1125] xenserver: add a xenserver-install-wizard to configure the box after RPM install --- SPECS/xenserver-install-wizard.spec | 43 +++++++++++++++++++++++++++++ SPECS/xenserver.spec | 4 ++- sources.csv | 1 + 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 SPECS/xenserver-install-wizard.spec diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec new file mode 100644 index 00000000..32e8065d --- /dev/null +++ b/SPECS/xenserver-install-wizard.spec @@ -0,0 +1,43 @@ +# -*- rpm-spec -*- + +Summary: a simple wizard to configure a XenServer +Name: xenserver-install-wizard +Version: 0.1.0 +Release: 0 +Group: System/Hypervisor +License: LGPL+linking exception +URL: http://github.com/djs55/xenserver-install-wizard +Source0: xenserver-install-wizard-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Requires: python whiptail xapi-python-devel + +%description +A simple wizard to configure a XenServer after install + +%prep +%setup -q -n xenserver-install-wizard-%{version} + +%build + +%install +make DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_bindir} +ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroot}%{_bindir}/xenserver-install-wizard + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +/usr/share/xenserver-install-wizard/* +%{_bindir}/xenserver-install-wizard + +%changelog +* Sun Jun 8 2013 David Scott +- Initial package + + + + + + diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 88356ef4..6ac84c67 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,12 +1,13 @@ Name: xenserver Version: 0.9.0 -Release: 3 +Release: 4 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other URL: http://www.xen.org/ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +Requires: xenserver-install-wizard Requires: xapi xapi-xe xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator xenops-cli Requires: ffs xapi-libvirt-storage sm-cli @@ -35,6 +36,7 @@ rm -rf %{buildroot} %changelog * Sat Jun 8 2013 David Scott +- add a xenserver-install-wizard - add dependency on xapi-python-devel for use by the install wizard - include the xenops and SM CLIs diff --git a/sources.csv b/sources.csv index 905c0d08..7bd16e78 100644 --- a/sources.csv +++ b/sources.csv @@ -60,3 +60,4 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.1.0.tar.gz,xenserver-install-wizard-0.1.0.tar.gz From e72155649c77bca9c602c60dbcd974fc121390cc Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 8 Jun 2013 22:18:50 +0000 Subject: [PATCH 0175/1125] whiptail is in the newt package --- SPECS/xenserver-install-wizard.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 32e8065d..7053d577 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,13 +3,13 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.1.0 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard Source0: xenserver-install-wizard-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root -Requires: python whiptail xapi-python-devel +Requires: python newt xapi-python-devel %description A simple wizard to configure a XenServer after install From 87d475b3c533f0e7ded301af48510d7e075e378f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 9 Jun 2013 13:03:30 +0000 Subject: [PATCH 0176/1125] Add a fusion package containing the yum repos --- SOURCES/fusion-release-epel-testing.repo | 26 ++++++++++++ SOURCES/fusion-release-epel.repo | 26 ++++++++++++ SOURCES/fusion-release-xapi.repo | 13 ++++++ SOURCES/fusion-release-xen-c6-RC1.repo | 13 ++++++ SOURCES/fusion-release-xen-c6.repo | 13 ++++++ SPECS/fusion-release.spec | 50 ++++++++++++++++++++++++ 6 files changed, 141 insertions(+) create mode 100644 SOURCES/fusion-release-epel-testing.repo create mode 100644 SOURCES/fusion-release-epel.repo create mode 100644 SOURCES/fusion-release-xapi.repo create mode 100644 SOURCES/fusion-release-xen-c6-RC1.repo create mode 100644 SOURCES/fusion-release-xen-c6.repo create mode 100644 SPECS/fusion-release.spec diff --git a/SOURCES/fusion-release-epel-testing.repo b/SOURCES/fusion-release-epel-testing.repo new file mode 100644 index 00000000..97703b2c --- /dev/null +++ b/SOURCES/fusion-release-epel-testing.repo @@ -0,0 +1,26 @@ +[epel-testing] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 + +[epel-testing-source] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 diff --git a/SOURCES/fusion-release-epel.repo b/SOURCES/fusion-release-epel.repo new file mode 100644 index 00000000..0160dfec --- /dev/null +++ b/SOURCES/fusion-release-epel.repo @@ -0,0 +1,26 @@ +[epel] +name=Extra Packages for Enterprise Linux 6 - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch +failovermethod=priority +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 6 - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 + +[epel-source] +name=Extra Packages for Enterprise Linux 6 - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo new file mode 100644 index 00000000..fd1a19cf --- /dev/null +++ b/SOURCES/fusion-release-xapi.repo @@ -0,0 +1,13 @@ +[xapi] +name=CentOS-$releasever - xapi +baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xapi-source] +name=CentOS-$releasever - xapi Source +baseurl=http://www.uk.xensource.com/~dscott/xapi/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/SOURCES/fusion-release-xen-c6-RC1.repo b/SOURCES/fusion-release-xen-c6-RC1.repo new file mode 100644 index 00000000..88337c66 --- /dev/null +++ b/SOURCES/fusion-release-xen-c6-RC1.repo @@ -0,0 +1,13 @@ +[xen-c6-RC1] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/SOURCES/fusion-release-xen-c6.repo b/SOURCES/fusion-release-xen-c6.repo new file mode 100644 index 00000000..a172c2ce --- /dev/null +++ b/SOURCES/fusion-release-xen-c6.repo @@ -0,0 +1,13 @@ +[xen-c6] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/SPECS/fusion-release.spec b/SPECS/fusion-release.spec new file mode 100644 index 00000000..3ec16a3e --- /dev/null +++ b/SPECS/fusion-release.spec @@ -0,0 +1,50 @@ +Name: fusion-release +Version: 0.1.0 +Release: 0 +Summary: Yum repositories for xenserver +License: LGPL +Group: Development/Other +URL: http://www.xen.org/ +Source0: fusion-release-xapi.repo +Source1: fusion-release-xen-c6.repo +Source2: fusion-release-xen-c6-RC1.repo +Source3: fusion-release-epel.repo +Source4: fusion-release-epel-testing.repo +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} + +%description +A virtual package which installs the xenserver yum repos. + +%prep + +%build + +%install +mkdir -p %{buildroot}/etc/yum.repos.d +install -m 0644 %{_sourcedir}/fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo +install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo +install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo +install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo +install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo + +%clean +rm -rf %{buildroot} + +%post +yum repolist + +%postun +yum repolist + +%files +%defattr(-,root,root) +/etc/yum.repos.d/xapi.repo +/etc/yum.repos.d/xen-c6.repo +/etc/yum.repos.d/xen-c6-RC1.repo +/etc/yum.repos.d/epel.repo +/etc/yum.repos.d/epel-testing.repo + +%changelog +* Sun Jun 9 2013 David Scott +- Initial package + From be30ddc74e2425bb00334522391a12b821b379ad Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 9 Jun 2013 13:38:48 +0000 Subject: [PATCH 0177/1125] fusion-release: add GPG keys for EPEL and remi --- SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 | 29 ++++++++++++++++++++++ SOURCES/fusion-release-RPM-GPG-KEY-remi | 24 ++++++++++++++++++ SOURCES/fusion-release-remi.repo | 30 +++++++++++++++++++++++ SPECS/fusion-release.spec | 13 +++++++++- 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 create mode 100644 SOURCES/fusion-release-RPM-GPG-KEY-remi create mode 100644 SOURCES/fusion-release-remi.repo diff --git a/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 b/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 new file mode 100644 index 00000000..7a203048 --- /dev/null +++ b/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/SOURCES/fusion-release-RPM-GPG-KEY-remi b/SOURCES/fusion-release-RPM-GPG-KEY-remi new file mode 100644 index 00000000..32833860 --- /dev/null +++ b/SOURCES/fusion-release-RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/SOURCES/fusion-release-remi.repo b/SOURCES/fusion-release-remi.repo new file mode 100644 index 00000000..b9472d8c --- /dev/null +++ b/SOURCES/fusion-release-remi.repo @@ -0,0 +1,30 @@ +[remi] +name=Les RPM de remi pour Enterprise Linux 6 - $basearch +#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/ +mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-test] +name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch +#baseurl=http://rpms.famillecollet.com/enterprise/6/test/$basearch/ +mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-debuginfo] +name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo +baseurl=http://rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-test-debuginfo] +name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo +baseurl=http://rpms.famillecollet.com/enterprise/6/debug-test/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + diff --git a/SPECS/fusion-release.spec b/SPECS/fusion-release.spec index 3ec16a3e..704007b9 100644 --- a/SPECS/fusion-release.spec +++ b/SPECS/fusion-release.spec @@ -2,7 +2,7 @@ Name: fusion-release Version: 0.1.0 Release: 0 Summary: Yum repositories for xenserver -License: LGPL +License: GPL Group: Development/Other URL: http://www.xen.org/ Source0: fusion-release-xapi.repo @@ -10,6 +10,10 @@ Source1: fusion-release-xen-c6.repo Source2: fusion-release-xen-c6-RC1.repo Source3: fusion-release-epel.repo Source4: fusion-release-epel-testing.repo +Source5: fusion-release-remi.repo +Source6: fusion-release-RPM-GPG-KEY-EPEL-6 +Source7: fusion-release-RPM-GPG-KEY-remi + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %description @@ -26,6 +30,10 @@ install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.re install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo +install -m 0644 %{_sourcedir}/fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo +mkdir -p %{buildroot}/etc/pki/rpm-gpg/ +install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi %clean rm -rf %{buildroot} @@ -43,6 +51,9 @@ yum repolist /etc/yum.repos.d/xen-c6-RC1.repo /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo +/etc/yum.repos.d/remi.repo +/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +/etc/pki/rpm-gpg/RPM-GPG-KEY-remi %changelog * Sun Jun 9 2013 David Scott From ff0fdd4d6d5a012e2a79c74d45f15210eb912230 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 9 Jun 2013 17:32:24 +0000 Subject: [PATCH 0178/1125] new releases of xapi, xcp-networkd and xenserver-install-wizard --- SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 5 ++++- SPECS/xenserver-install-wizard.spec | 9 ++++++--- sources.csv | 6 +++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 5070d3c1..7a1e55be 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.3 +Version: 1.9.4 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 595f4a65..3b7085ec 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,5 +1,5 @@ Name: xcp-networkd -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Simple host network management service for the xapi toolstack License: LGPL @@ -58,6 +58,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Sun Jun 9 2013 David Scott +- Update to 0.9.2 + * Fri Jun 7 2013 David Scott - Update to 0.9.1 diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 7053d577..52004e09 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,8 +2,8 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.1.0 -Release: 1 +Version: 0.2.1 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard @@ -33,7 +33,10 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog -* Sun Jun 8 2013 David Scott +* Sun Jun 9 2013 David Scott +- Update to 0.2.0, hopefully the first fully-working version + +* Sat Jun 8 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index 7bd16e78..1dc44065 100644 --- a/sources.csv +++ b/sources.csv @@ -52,12 +52,12 @@ xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, -xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.1.tar.gz, +xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.3.tar.gz,xen-api-1.9.3.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.4.tar.gz,xen-api-1.9.4.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.1.0.tar.gz,xenserver-install-wizard-0.1.0.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.1.tar.gz,xenserver-install-wizard-0.2.1.tar.gz From 1f300c4e290c0aa6fa136e299e191378abf90074 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 9 Jun 2013 17:48:58 +0000 Subject: [PATCH 0179/1125] xenserver-install-wizard new version --- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 52004e09..203eb7c4 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.1 +Version: 0.2.2 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index 1dc44065..a57d7abb 100644 --- a/sources.csv +++ b/sources.csv @@ -60,4 +60,4 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.1.tar.gz,xenserver-install-wizard-0.2.1.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.2.tar.gz,xenserver-install-wizard-0.2.2.tar.gz From 7190bd2febe7935d4835e17a7d0d536ec463c627 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 10 Jun 2013 11:18:39 +0000 Subject: [PATCH 0180/1125] Update xenserver-install-wizard to 0.2.4 --- SPECS/xenserver-install-wizard.spec | 9 ++++++--- sources.csv | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 203eb7c4..d3826bf4 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.2 +Version: 0.2.4 Release: 0 Group: System/Hypervisor License: LGPL+linking exception @@ -33,10 +33,13 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog -* Sun Jun 9 2013 David Scott +* Mon Jun 10 2013 David Scott +- Update to 0.2.4 + +* Sun Jun 9 2013 David Scott - Update to 0.2.0, hopefully the first fully-working version -* Sat Jun 8 2013 David Scott +* Sat Jun 8 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index a57d7abb..dd30f90b 100644 --- a/sources.csv +++ b/sources.csv @@ -60,4 +60,4 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.2.tar.gz,xenserver-install-wizard-0.2.2.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.4.tar.gz,xenserver-install-wizard-0.2.4.tar.gz From c6d64d9600648ff55f58e835f059512bbda6fec9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 10 Jun 2013 16:59:07 +0000 Subject: [PATCH 0181/1125] Add a patched libvirt 0.10.2.4 --- ...ystem-i386-as-binary-instead-of-qemu.patch | 27 + SOURCES/libvirt-dbus.patch | 225 ++ SOURCES/libvirt-emulator.patch | 46 + SOURCES/libvirt-qdisk-fixup.patch | 31 + SOURCES/libvirt-qdisk.patch | 40 + SOURCES/libvirt-save-with-session.patch | 303 ++ SPECS/libvirt.spec | 2887 ++++++++++++++++- SPECS/ocaml-libvirt.spec | 152 + sources.csv | 3 +- 9 files changed, 3596 insertions(+), 118 deletions(-) create mode 100644 SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch create mode 100644 SOURCES/libvirt-dbus.patch create mode 100644 SOURCES/libvirt-emulator.patch create mode 100644 SOURCES/libvirt-qdisk-fixup.patch create mode 100644 SOURCES/libvirt-qdisk.patch create mode 100644 SOURCES/libvirt-save-with-session.patch create mode 100644 SPECS/ocaml-libvirt.spec diff --git a/SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch b/SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch new file mode 100644 index 00000000..585c39e8 --- /dev/null +++ b/SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch @@ -0,0 +1,27 @@ +From 37865f1dead1fac2ee34af48f96d19d686296e04 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 13 Sep 2012 14:37:22 +0100 +Subject: [PATCH] Use 'qemu-system-i386' as binary instead of 'qemu'. + +--- + src/qemu/qemu_capabilities.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index af3b0b2..179b3d2 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -244,8 +244,8 @@ static const struct qemu_feature_flags const arch_info_x86_64_flags [] = { + + /* The archicture tables for supported QEMU archs */ + static const struct qemu_arch_info const arch_info_hvm[] = { +- { "i686", 32, NULL, "qemu", +- "qemu-system-x86_64", arch_info_i686_flags, 4 }, ++ { "i686", 32, NULL, "qemu-system-i386", ++ NULL, arch_info_i686_flags, 4 }, + { "x86_64", 64, NULL, "qemu-system-x86_64", + NULL, arch_info_x86_64_flags, 2 }, + { "arm", 32, NULL, "qemu-system-arm", NULL, NULL, 0 }, +-- +1.7.11.4 + diff --git a/SOURCES/libvirt-dbus.patch b/SOURCES/libvirt-dbus.patch new file mode 100644 index 00000000..eb3e2c66 --- /dev/null +++ b/SOURCES/libvirt-dbus.patch @@ -0,0 +1,225 @@ +Return-Path: alexl@redhat.com +Received: from zmta04.collab.prod.int.phx2.redhat.com (LHLO + zmta04.collab.prod.int.phx2.redhat.com) (10.5.81.11) by + zmail20.collab.prod.int.phx2.redhat.com with LMTP; Tue, 9 Oct 2012 11:26:38 + -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta04.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4096D0927 + for ; Tue, 9 Oct 2012 11:26:38 -0400 (EDT) +Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q99FQV93016417; + Tue, 9 Oct 2012 11:26:33 -0400 +From: Alexander Larsson +To: libvir-list@redhat.com +Cc: Alexander Larsson +Subject: [PATCH 1/2] virdbus: Add virDBusGetSessionBus helper +Date: Tue, 9 Oct 2012 17:26:28 +0200 +Message-Id: <1349796389-6122-2-git-send-email-alexl@redhat.com> +In-Reply-To: <1349796389-6122-1-git-send-email-alexl@redhat.com> +References: <1349796389-6122-1-git-send-email-alexl@redhat.com> +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 + +This splits out some common code from virDBusGetSystemBus and +uses it to implement a new virDBusGetSessionBus helper. +--- + src/libvirt_private.syms | 1 + + src/util/virdbus.c | 84 ++++++++++++++++++++++++++++++++++++------------ + src/util/virdbus.h | 1 + + 3 files changed, 66 insertions(+), 20 deletions(-) + +diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms +index a8c81e7..88f1b2f 100644 +--- a/src/libvirt_private.syms ++++ b/src/libvirt_private.syms +@@ -1310,6 +1310,7 @@ virConsoleOpen; + + # virdbus.h + virDBusGetSystemBus; ++virDBusGetSessionBus; + + + # virdomainlist.h +diff --git a/src/util/virdbus.c b/src/util/virdbus.c +index 4acce12..2dc7265 100644 +--- a/src/util/virdbus.c ++++ b/src/util/virdbus.c +@@ -32,40 +32,49 @@ + #ifdef HAVE_DBUS + + static DBusConnection *systembus = NULL; +-static virOnceControl once = VIR_ONCE_CONTROL_INITIALIZER; +-static DBusError dbuserr; ++static DBusConnection *sessionbus = NULL; ++static virOnceControl systemonce = VIR_ONCE_CONTROL_INITIALIZER; ++static virOnceControl sessiononce = VIR_ONCE_CONTROL_INITIALIZER; ++static DBusError systemdbuserr; ++static DBusError sessiondbuserr; + + static dbus_bool_t virDBusAddWatch(DBusWatch *watch, void *data); + static void virDBusRemoveWatch(DBusWatch *watch, void *data); + static void virDBusToggleWatch(DBusWatch *watch, void *data); + +-static void virDBusSystemBusInit(void) ++static DBusConnection *virDBusBusInit(DBusBusType type, DBusError *dbuserr) + { ++ DBusConnection *bus; ++ + /* Allocate and initialize a new HAL context */ + dbus_connection_set_change_sigpipe(FALSE); + dbus_threads_init_default(); + +- dbus_error_init(&dbuserr); +- if (!(systembus = dbus_bus_get(DBUS_BUS_SYSTEM, &dbuserr))) +- return; ++ dbus_error_init(dbuserr); ++ if (!(bus = dbus_bus_get(type, dbuserr))) ++ return NULL; + +- dbus_connection_set_exit_on_disconnect(systembus, FALSE); ++ dbus_connection_set_exit_on_disconnect(bus, FALSE); + + /* Register dbus watch callbacks */ +- if (!dbus_connection_set_watch_functions(systembus, ++ if (!dbus_connection_set_watch_functions(bus, + virDBusAddWatch, + virDBusRemoveWatch, + virDBusToggleWatch, +- NULL, NULL)) { +- systembus = NULL; +- return; ++ bus, NULL)) { ++ return NULL; + } ++ return bus; + } + ++static void virDBusSystemBusInit(void) ++{ ++ systembus = virDBusBusInit (DBUS_BUS_SYSTEM, &systemdbuserr); ++} + + DBusConnection *virDBusGetSystemBus(void) + { +- if (virOnce(&once, virDBusSystemBusInit) < 0) { ++ if (virOnce(&systemonce, virDBusSystemBusInit) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Unable to run one time DBus initializer")); + return NULL; +@@ -74,7 +83,7 @@ DBusConnection *virDBusGetSystemBus(void) + if (!systembus) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unable to get DBus system bus connection: %s"), +- dbuserr.message ? dbuserr.message : "watch setup failed"); ++ systemdbuserr.message ? systemdbuserr.message : "watch setup failed"); + return NULL; + } + +@@ -82,13 +91,45 @@ DBusConnection *virDBusGetSystemBus(void) + } + + ++static void virDBusSessionBusInit(void) ++{ ++ sessionbus = virDBusBusInit (DBUS_BUS_SESSION, &sessiondbuserr); ++} ++ ++DBusConnection *virDBusGetSessionBus(void) ++{ ++ if (virOnce(&sessiononce, virDBusSessionBusInit) < 0) { ++ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", ++ _("Unable to run one time DBus initializer")); ++ return NULL; ++ } ++ ++ if (!sessionbus) { ++ virReportError(VIR_ERR_INTERNAL_ERROR, ++ _("Unable to get DBus session bus connection: %s"), ++ sessiondbuserr.message ? sessiondbuserr.message : "watch setup failed"); ++ return NULL; ++ } ++ ++ return sessionbus; ++} ++ ++struct virDBusWatch ++{ ++ int watch; ++ DBusConnection *bus; ++}; ++ + static void virDBusWatchCallback(int fdatch ATTRIBUTE_UNUSED, + int fd ATTRIBUTE_UNUSED, + int events, void *opaque) + { + DBusWatch *watch = opaque; ++ struct virDBusWatch *info; + int dbus_flags = 0; + ++ info = dbus_watch_get_data(watch); ++ + if (events & VIR_EVENT_HANDLE_READABLE) + dbus_flags |= DBUS_WATCH_READABLE; + if (events & VIR_EVENT_HANDLE_WRITABLE) +@@ -100,7 +141,7 @@ static void virDBusWatchCallback(int fdatch ATTRIBUTE_UNUSED, + + (void)dbus_watch_handle(watch, dbus_flags); + +- while (dbus_connection_dispatch(systembus) == DBUS_DISPATCH_DATA_REMAINS) ++ while (dbus_connection_dispatch(info->bus) == DBUS_DISPATCH_DATA_REMAINS) + /* keep dispatching while data remains */; + } + +@@ -120,18 +161,13 @@ static int virDBusTranslateWatchFlags(int dbus_flags) + } + + +-struct virDBusWatch +-{ +- int watch; +-}; +- + static void virDBusWatchFree(void *data) { + struct virDBusWatch *info = data; + VIR_FREE(info); + } + + static dbus_bool_t virDBusAddWatch(DBusWatch *watch, +- void *data ATTRIBUTE_UNUSED) ++ void *data) + { + int flags = 0; + int fd; +@@ -148,6 +184,7 @@ static dbus_bool_t virDBusAddWatch(DBusWatch *watch, + # else + fd = dbus_watch_get_fd(watch); + # endif ++ info->bus = (DBusConnection *)data; + info->watch = virEventAddHandle(fd, flags, + virDBusWatchCallback, + watch, NULL); +@@ -194,4 +231,11 @@ DBusConnection *virDBusGetSystemBus(void) + return NULL; + } + ++DBusConnection *virDBusGetSessionBus(void) ++{ ++ virReportError(VIR_ERR_INTERNAL_ERROR, ++ "%s", _("DBus support not compiled into this binary")); ++ return NULL; ++} ++ + #endif /* ! HAVE_DBUS */ +diff --git a/src/util/virdbus.h b/src/util/virdbus.h +index 27dca00..e443fbe 100644 +--- a/src/util/virdbus.h ++++ b/src/util/virdbus.h +@@ -30,5 +30,6 @@ + # include "internal.h" + + DBusConnection *virDBusGetSystemBus(void); ++DBusConnection *virDBusGetSessionBus(void); + + #endif /* __VIR_DBUS_H__ */ +-- +1.7.12.1 + diff --git a/SOURCES/libvirt-emulator.patch b/SOURCES/libvirt-emulator.patch new file mode 100644 index 00000000..675b376b --- /dev/null +++ b/SOURCES/libvirt-emulator.patch @@ -0,0 +1,46 @@ +diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c +index f549a5d..abbd3c0 100644 +--- a/src/libxl/libxl_conf.c ++++ b/src/libxl/libxl_conf.c +@@ -811,6 +811,30 @@ libxlMakeCapabilities(libxl_ctx *ctx) + } + + int ++libxlMakeEmulator(virDomainDefPtr def, libxl_domain_config *d_config) ++{ ++ /* No explicit override means use the default */ ++ if (!def->emulator) { ++ return 0; ++ } ++ if (strstr(def->emulator, "/qemu-system-")) { ++ d_config->b_info.device_model_version = ++ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; ++ return 0; ++ } ++ if (strstr(def->emulator, "/qemu-dm")) { ++ d_config->b_info.device_model_version = ++ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; ++ return 0; ++ } ++ virReportError(VIR_ERR_INTERNAL_ERROR, ++ _("libxenlight doesn't support emulator '%s'"), ++ def->emulator); ++ return -1; ++} ++ ++ ++int + libxlBuildDomainConfig(libxlDriverPrivatePtr driver, + virDomainDefPtr def, libxl_domain_config *d_config) + { +@@ -834,6 +858,10 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver, + goto error; + } + ++ if (libxlMakeEmulator(def, d_config) < 0) { ++ goto error; ++ } ++ + d_config->on_reboot = def->onReboot; + d_config->on_poweroff = def->onPoweroff; + d_config->on_crash = def->onCrash; diff --git a/SOURCES/libvirt-qdisk-fixup.patch b/SOURCES/libvirt-qdisk-fixup.patch new file mode 100644 index 00000000..a63abbb9 --- /dev/null +++ b/SOURCES/libvirt-qdisk-fixup.patch @@ -0,0 +1,31 @@ +--- libvirt-0.10.2.4/src/libxl/libxl_conf.c.orig 2013-04-26 16:14:27.233001065 +0000 ++++ libvirt-0.10.2.4/src/libxl/libxl_conf.c 2013-04-26 16:16:10.456001296 +0000 +@@ -542,27 +542,7 @@ + x_disk->backend = LIBXL_DISK_BACKEND_PHY; + } else if (STREQ(l_disk->driverName, "qemu")) { + x_disk->backend = LIBXL_DISK_BACKEND_QDISK; +- switch (l_disk->format) { +- case VIR_STORAGE_FILE_QCOW: +- x_disk->format = LIBXL_DISK_FORMAT_QCOW; +- break; +- case VIR_STORAGE_FILE_QCOW2: +- x_disk->format = LIBXL_DISK_FORMAT_QCOW2; +- break; +- case VIR_STORAGE_FILE_VHD: +- x_disk->format = LIBXL_DISK_FORMAT_VHD; +- break; +- case VIR_STORAGE_FILE_NONE: +- /* No subtype specified, default to raw */ +- case VIR_STORAGE_FILE_RAW: +- x_disk->format = LIBXL_DISK_FORMAT_RAW; +- break; +- default: +- virReportError(VIR_ERR_INTERNAL_ERROR, +- _("libxenlight does not support disk format %s"), +- virStorageFileFormatTypeToString(l_disk->format)); +- return -1; +- } ++ x_disk->format = LIBXL_DISK_FORMAT_RAW; + } else { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("libxenlight does not support disk driver %s"), diff --git a/SOURCES/libvirt-qdisk.patch b/SOURCES/libvirt-qdisk.patch new file mode 100644 index 00000000..c42d372c --- /dev/null +++ b/SOURCES/libvirt-qdisk.patch @@ -0,0 +1,40 @@ +commit cb1a4ff0bc3af7c41f5755560062958853d6cac4 +Author: David Scott +Date: Fri Apr 26 08:40:10 2013 +0000 + + Patch from Jim + +diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c +index 7e0753a..f549a5d 100644 +--- a/src/libxl/libxl_conf.c ++++ b/src/libxl/libxl_conf.c +@@ -505,6 +505,29 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk) + } else if (STREQ(l_disk->driverName, "phy")) { + x_disk->format = LIBXL_DISK_FORMAT_RAW; + x_disk->backend = LIBXL_DISK_BACKEND_PHY; ++ } else if (STREQ(l_disk->driverName, "qemu")) { ++ x_disk->backend = LIBXL_DISK_BACKEND_QDISK; ++ switch (l_disk->format) { ++ case VIR_STORAGE_FILE_QCOW: ++ x_disk->format = LIBXL_DISK_FORMAT_QCOW; ++ break; ++ case VIR_STORAGE_FILE_QCOW2: ++ x_disk->format = LIBXL_DISK_FORMAT_QCOW2; ++ break; ++ case VIR_STORAGE_FILE_VHD: ++ x_disk->format = LIBXL_DISK_FORMAT_VHD; ++ break; ++ case VIR_STORAGE_FILE_NONE: ++ /* No subtype specified, default to raw */ ++ case VIR_STORAGE_FILE_RAW: ++ x_disk->format = LIBXL_DISK_FORMAT_RAW; ++ break; ++ default: ++ virReportError(VIR_ERR_INTERNAL_ERROR, ++ _("libxenlight does not support disk format %s"), ++ virStorageFileFormatTypeToString(l_disk->format)); ++ return -1; ++ } + } else { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("libxenlight does not support disk driver %s"), diff --git a/SOURCES/libvirt-save-with-session.patch b/SOURCES/libvirt-save-with-session.patch new file mode 100644 index 00000000..2cc8dc6a --- /dev/null +++ b/SOURCES/libvirt-save-with-session.patch @@ -0,0 +1,303 @@ +Return-Path: alexl@redhat.com +Received: from zmta06.collab.prod.int.phx2.redhat.com (LHLO + zmta06.collab.prod.int.phx2.redhat.com) (10.5.81.13) by + zmail20.collab.prod.int.phx2.redhat.com with LMTP; Tue, 9 Oct 2012 11:26:39 + -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta06.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4A8516044F + for ; Tue, 9 Oct 2012 11:26:39 -0400 (EDT) +Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q99FQV94016417; + Tue, 9 Oct 2012 11:26:34 -0400 +From: Alexander Larsson +To: libvir-list@redhat.com +Cc: Alexander Larsson +Subject: [PATCH 2/2] Shut down session libvirtd cleanly +Date: Tue, 9 Oct 2012 17:26:29 +0200 +Message-Id: <1349796389-6122-3-git-send-email-alexl@redhat.com> +In-Reply-To: <1349796389-6122-1-git-send-email-alexl@redhat.com> +References: <1349796389-6122-1-git-send-email-alexl@redhat.com> +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 + +When the session dies or when the system is going to be shut down +we save all active VMs and exit libvirtd. + +Additionally whenever there is an active domain we hold a +shutdown inhibitor to avoid shutting down before all the +VMs are saved. +--- + daemon/libvirtd.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 244 insertions(+) + +diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c +index b49acc5..c3bf2ce 100644 +--- a/daemon/libvirtd.c ++++ b/daemon/libvirtd.c +@@ -98,6 +98,11 @@ + + #include "configmake.h" + ++#ifdef HAVE_DBUS ++# include ++# include "virdbus.h" ++#endif ++ + #if HAVE_SASL + virNetSASLContextPtr saslCtxt = NULL; + #endif +@@ -769,6 +774,212 @@ static int daemonSetupSignals(virNetServerPtr srv) + return 0; + } + ++#ifdef HAVE_DBUS ++ ++static DBusConnection *sessionBus; ++static DBusConnection *systemBus; ++static virConnectPtr sessionConnection; ++static int numActiveDomains; ++static bool hasInhibit; ++static bool callingInhibit; ++static int inhibitFd = -1; ++ ++static void runSaveAllDomains(void *opaque) ++{ ++ virNetServerPtr srv = opaque; ++ int numDomains, i; ++ int state; ++ virDomainPtr *domains = NULL; ++ unsigned int *flags = NULL; ++ ++ numDomains = virConnectListAllDomains(sessionConnection, &domains, VIR_CONNECT_LIST_DOMAINS_ACTIVE); ++ if (numDomains < 0) ++ goto cleanup; ++ ++ if (VIR_ALLOC_N(flags, numDomains) < 0) { ++ virReportOOMError(); ++ goto cleanup; ++ } ++ ++ /* First we pause all VMs to make them stop dirtying ++ pages, etc. We remember if any VMs were paused so ++ we can restore that on resume. */ ++ for (i = 0 ; i < numDomains ; i++) { ++ flags[i] = VIR_DOMAIN_SAVE_RUNNING; ++ if (virDomainGetState (domains[i], &state, NULL, 0) == 0) { ++ if (state == VIR_DOMAIN_PAUSED) { ++ flags[i] = VIR_DOMAIN_SAVE_PAUSED; ++ } ++ } ++ virDomainSuspend (domains[i]); ++ } ++ ++ /* Then we save the VMs to disk */ ++ for (i = 0 ; i < numDomains ; i++) ++ virDomainManagedSave (domains[i], flags[i]); ++ ++ VIR_FREE (domains); ++ VIR_FREE (flags); ++ ++ cleanup: ++ if (domains != NULL) { ++ for (i = 0 ; i < numDomains ; i++) ++ virDomainFree (domains[i]); ++ VIR_FREE (domains); ++ } ++ if (flags != NULL) ++ VIR_FREE (flags); ++ ++ /* We don't need any shutdown inhibit lock anymore now */ ++ if (inhibitFd != -1) { ++ if (VIR_CLOSE (inhibitFd) < 0) ++ virReportSystemError(errno, "%s", _("failed to close file")); ++ inhibitFd = -1; ++ } ++ ++ /* Exit libvirtd cleanly */ ++ virNetServerQuit (srv); ++} ++ ++/* We do this in a thread to not block the main loop */ ++static void saveAllDomains(virNetServerPtr srv) ++{ ++ virThread thr; ++ virObjectRef(srv); ++ if (virThreadCreate(&thr, false, runSaveAllDomains, srv) < 0) { ++ virObjectUnref(srv); ++ } ++} ++ ++static void gotInhibitReply (DBusPendingCall *pending, ++ void *opaque ATTRIBUTE_UNUSED) ++{ ++ DBusMessage *reply; ++ int fd; ++ ++ callingInhibit = false; ++ ++ reply = dbus_pending_call_steal_reply (pending); ++ if (reply == NULL) ++ return; ++ ++ if (dbus_message_get_args (reply, NULL, ++ DBUS_TYPE_UNIX_FD, &fd, ++ DBUS_TYPE_INVALID)) { ++ if (hasInhibit) ++ inhibitFd = fd; ++ else { ++ /* We stopped the last VM since we made the inhibit call */ ++ if (VIR_CLOSE (fd) < 0) { ++ virReportSystemError(errno, "%s", _("failed to close file")); ++ } ++ } ++ } ++ dbus_message_unref (reply); ++} ++ ++/* As per: http://www.freedesktop.org/wiki/Software/systemd/inhibit */ ++static void callInhibit(const char *what, ++ const char *who, ++ const char *why, ++ const char *mode) ++{ ++ DBusMessage *message; ++ DBusPendingCall *pendingReply; ++ ++ if (systemBus == NULL) ++ return; ++ ++ /* Only one outstanding call at a time */ ++ if (callingInhibit) ++ return; ++ ++ message = dbus_message_new_method_call ("org.freedesktop.login1", ++ "/org/freedesktop/login1", ++ "org.freedesktop.login1.Manager", ++ "Inhibit"); ++ if (message == NULL) ++ return; ++ ++ dbus_message_append_args (message, ++ DBUS_TYPE_STRING, &what, ++ DBUS_TYPE_STRING, &who, ++ DBUS_TYPE_STRING, &why, ++ DBUS_TYPE_STRING, &mode, ++ DBUS_TYPE_INVALID); ++ ++ pendingReply = NULL; ++ if (dbus_connection_send_with_reply (systemBus, message, ++ &pendingReply, ++ 25*1000)) { ++ dbus_pending_call_set_notify (pendingReply, ++ gotInhibitReply, ++ NULL, NULL); ++ callingInhibit = true; ++ } ++ dbus_message_unref (message); ++} ++ ++ ++static void numActiveDomainsChanged(void) ++{ ++ if (numActiveDomains > 0 && !hasInhibit) { ++ callInhibit("shutdown", _("Libvirt"), _("Virtual machines need to be saved"), "delay"); ++ hasInhibit = true; ++ } else if (numActiveDomains == 0 && hasInhibit) { ++ if (inhibitFd != -1) { ++ if (VIR_CLOSE (inhibitFd) < 0) { ++ virReportSystemError(errno, "%s", _("failed to close file")); ++ } ++ inhibitFd = -1; ++ } ++ hasInhibit = false; ++ } ++} ++ ++static int lifecycleEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED, ++ virDomainPtr dom ATTRIBUTE_UNUSED, ++ int event, ++ int detail ATTRIBUTE_UNUSED, ++ void *opaque ATTRIBUTE_UNUSED) ++{ ++ if (event == VIR_DOMAIN_EVENT_STOPPED) ++ numActiveDomains--; ++ else if (event == VIR_DOMAIN_EVENT_STARTED) ++ numActiveDomains++; ++ ++ numActiveDomainsChanged(); ++ ++ return 0; ++} ++ ++static DBusHandlerResult handleSessionMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED, ++ DBusMessage *message, ++ void *userData) ++{ ++ virNetServerPtr srv = userData; ++ ++ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { ++ saveAllDomains (srv); ++ } ++ ++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; ++} ++ ++static DBusHandlerResult handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED, ++ DBusMessage *message, ++ void *userData) ++{ ++ virNetServerPtr srv = userData; ++ ++ if (dbus_message_is_signal(message, "org.freedesktop.login1.Manager", "PrepareForShutdown")) { ++ saveAllDomains (srv); ++ } ++ ++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; ++} ++#endif ++ + static void daemonRunStateInit(void *opaque) + { + virNetServerPtr srv = opaque; +@@ -785,6 +996,39 @@ static void daemonRunStateInit(void *opaque) + return; + } + ++#ifdef HAVE_DBUS ++ /* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */ ++ if (!virNetServerIsPrivileged(srv)) { ++ ++ sessionBus = virDBusGetSessionBus (); ++ if (sessionBus != NULL) { ++ dbus_connection_add_filter(sessionBus, ++ handleSessionMessageFunc, srv, NULL); ++ } ++ ++ systemBus = virDBusGetSystemBus (); ++ if (systemBus != NULL) { ++ dbus_connection_add_filter(systemBus, ++ handleSystemMessageFunc, srv, NULL); ++ dbus_bus_add_match(systemBus, ++ "type='signal',sender='org.freedesktop.login1', interface='org.freedesktop.login1.Manager'", ++ NULL); ++ } ++ ++ sessionConnection = virConnectOpen("qemu:///session"); ++ if (sessionConnection != NULL) { ++ numActiveDomains = virConnectNumOfDomains(sessionConnection); ++ virConnectDomainEventRegisterAny(sessionConnection, ++ NULL, ++ VIR_DOMAIN_EVENT_ID_LIFECYCLE, ++ VIR_DOMAIN_EVENT_CALLBACK (lifecycleEventCallback), ++ NULL, NULL); ++ numActiveDomainsChanged(); ++ } ++ ++ } ++#endif ++ + /* Only now accept clients from network */ + virNetServerUpdateServices(srv, true); + virObjectUnref(srv); +-- +1.7.12.1 + diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 545801c2..e7282fc0 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -1,152 +1,2805 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -# Select what subpackages to build. -%define build_mlvirsh 0 - -Name: ocaml-libvirt -Version: 0.6.1.2 -Release: 1%{?dist}%{?extra_release} -Summary: OCaml binding for libvirt - -Group: Development/Libraries -License: LGPLv2+ -URL: http://libvirt.org/ocaml/ -Source0: http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz -Patch0: ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a -Patch1: ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 -Patch2: ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf -Patch3: ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 -Patch4: ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 -Patch5: ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 -Patch6: ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 -Patch7: ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d -Patch8: ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 -Patch9: ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 -Patch10: ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d -Patch11: ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 -Patch12: ocaml-libvirt-13-fixbuild - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel - -BuildRequires: libvirt-devel >= 0.2.1 -BuildRequires: perl -BuildRequires: gawk - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh +# -*- rpm-spec -*- + +# If neither fedora nor rhel was defined, try to guess them from %{dist} +%if !0%{?rhel} && !0%{?fedora} +%{expand:%(echo "%{?dist}" | \ + sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')} +%{expand:%(echo "%{?dist}" | \ + sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')} +%endif + +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%define enable_autotools 0} + +# A client only build will create a libvirt.so only containing +# the generic RPC driver, and test driver and no libvirtd +# Default to a full server + client build +%define client_only 0 + +# Now turn off server build in certain cases + +# RHEL-5 builds are client-only for s390, ppc +%if 0%{?rhel} == 5 +%ifnarch %{ix86} x86_64 ia64 +%define client_only 1 +%endif +%endif + +# Disable all server side drivers if client only build requested +%if %{client_only} +%define server_drivers 0 +%else +%define server_drivers 1 +%endif + +# Always build with dlopen'd modules +%define with_driver_modules 1 + +# Now set the defaults for all the important features, independent +# of any particular OS + +# First the daemon itself +%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}} +%define with_avahi 0%{!?_without_avahi:%{server_drivers}} + +# Then the hypervisor drivers that run in libvirtd +%define with_xen 1 +%define with_qemu 0%{!?_without_qemu:%{server_drivers}} +%define with_lxc 0%{!?_without_lxc:%{server_drivers}} +%define with_uml 0%{!?_without_uml:%{server_drivers}} +%define with_libxl 1 + +%define with_qemu_tcg %{with_qemu} +# Change if we ever provide qemu-kvm binaries on non-x86 hosts +%if 0%{?fedora} >= 18 +%define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x +%else +%define qemu_kvm_arches %{ix86} x86_64 +%endif + +%ifarch %{qemu_kvm_arches} +%define with_qemu_kvm %{with_qemu} +%else +%define with_qemu_kvm 0 +%endif + +# Then the hypervisor drivers that run outside libvirtd, in libvirt.so +%define with_openvz 0%{!?_without_openvz:1} +%define with_vbox 0%{!?_without_vbox:1} +%define with_vmware 0%{!?_without_vmware:1} +%define with_phyp 0%{!?_without_phyp:1} +%define with_esx 0%{!?_without_esx:1} +%define with_hyperv 0%{!?_without_hyperv:1} +%define with_xenapi 0%{!?_without_xenapi:1} +%define with_parallels 0%{!?_without_parallels:1} + +# Then the secondary host drivers, which run inside libvirtd +%define with_interface 0%{!?_without_interface:%{server_drivers}} +%define with_network 0%{!?_without_network:%{server_drivers}} +%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}} +%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}} +%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}} +%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}} +%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} +%define with_storage_rbd 1 +%if 0%{?fedora} >= 17 +%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}} +%else +%define with_storage_sheepdog 0 +%endif +%define with_numactl 0%{!?_without_numactl:%{server_drivers}} +%define with_selinux 0%{!?_without_selinux:%{server_drivers}} + +# A few optional bits off by default, we enable later +%define with_polkit 0%{!?_without_polkit:0} +%define with_capng 0%{!?_without_capng:0} +%define with_netcf 0%{!?_without_netcf:0} +%define with_udev 0%{!?_without_udev:0} +%define with_hal 0%{!?_without_hal:0} +%define with_yajl 0%{!?_without_yajl:0} +%define with_nwfilter 0%{!?_without_nwfilter:0} +%define with_libpcap 0%{!?_without_libpcap:0} +%define with_macvtap 0%{!?_without_macvtap:0} +%define with_libnl 0%{!?_without_libnl:0} +%define with_audit 0%{!?_without_audit:0} +%define with_dtrace 0%{!?_without_dtrace:0} +%define with_cgconfig 0%{!?_without_cgconfig:0} +%define with_sanlock 0%{!?_without_sanlock:0} +%define with_systemd 0%{!?_without_systemd:0} +%define with_numad 0%{!?_without_numad:0} +%define with_firewalld 0%{!?_without_firewalld:0} +%define with_libssh2_transport 0%{!?_without_libssh2_transport:0} + +# Non-server/HV driver defaults which are always enabled +%define with_python 0%{!?_without_python:1} +%define with_sasl 0%{!?_without_sasl:1} + + +# Finally set the OS / architecture specific special cases + +# Xen is available only on i386 x86_64 ia64 +%ifnarch %{ix86} x86_64 ia64 +%define with_xen 0 +%define with_libxl 0 +%endif + +# Numactl is not available on s390[x] and ARM +%ifarch s390 s390x %{arm} +%define with_numactl 0 +%endif + +# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, +# VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), +# or HyperV. +%if 0%{?rhel} +%define with_openvz 0 +%define with_vbox 0 +%define with_uml 0 +%define with_phyp 0 +%define with_vmware 0 +%define with_xenapi 0 +%define with_libxl 1 +%define with_hyperv 0 +%define with_parallels 0 +%endif + +# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier +# Fedora has systemd, libvirt still used sysvinit there. +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%define with_systemd 1 +%endif + +# Fedora 18 / RHEL-7 are first where firewalld support is enabled +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%define with_firewalld 1 +%endif + +# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC +%if 0%{?rhel} == 5 +%define with_qemu_tcg 0 +%ifnarch x86_64 +%define with_qemu 0 +%define with_qemu_kvm 0 +%endif +%define with_lxc 0 +%endif + +# RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen +# on all archs. Other archs all have LXC available though +%if 0%{?rhel} >= 6 +%define with_qemu_tcg 0 +%ifnarch x86_64 +%define with_qemu 0 +%define with_qemu_kvm 0 +%endif +%define with_xen 1 +%endif + +# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc +%if 0%{?fedora} && 0%{?fedora} < 16 +%ifarch ppc64 +%define with_qemu 0 +%endif +%endif + +# Fedora doesn't have new enough Xen for libxl until F18 +%if 0%{?fedora} && 0%{?fedora} < 18 +%define with_libxl 0 +%endif + +# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer +%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6 +%define with_polkit 0%{!?_without_polkit:1} +%endif + +# libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%define with_capng 0%{!?_without_capng:1} +%endif + +# netcf is used to manage network interfaces in Fedora 12 / RHEL-6 or newer +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%define with_netcf 0%{!?_without_netcf:%{server_drivers}} +%endif + +# udev is used to manage host devices in Fedora 12 / RHEL-6 or newer +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%define with_udev 0%{!?_without_udev:%{server_drivers}} +%else +%define with_hal 0%{!?_without_hal:%{server_drivers}} +%endif + +# interface requires netcf +%if ! 0%{?with_netcf} +%define with_interface 0 +%endif + +# Enable yajl library for JSON mode with QEMU +%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 +%define with_yajl 0%{!?_without_yajl:%{server_drivers}} +%endif + +# Enable sanlock library for lock management with QEMU +# Sanlock is available only on i686 x86_64 for RHEL +%if 0%{?fedora} >= 16 +%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} +%endif +%if 0%{?rhel} >= 6 +%ifarch %{ix86} x86_64 +%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} +%endif +%endif + +# Enable libssh2 transport for new enough distros +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 +%define with_libssh2_transport 0%{!?_without_libssh2_transport:1} +%endif + +# Disable some drivers when building without libvirt daemon. +# The logic is the same as in configure.ac +%if ! %{with_libvirtd} +%define with_interface 0 +%define with_network 0 +%define with_qemu 0 +%define with_lxc 0 +%define with_uml 0 +%define with_hal 0 +%define with_udev 0 +%define with_storage_fs 0 +%define with_storage_lvm 0 +%define with_storage_iscsi 0 +%define with_storage_mpath 0 +%define with_storage_rbd 0 +%define with_storage_sheepdog 0 +%define with_storage_disk 0 +%endif + +%if %{with_qemu} || %{with_lxc} || %{with_uml} +%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}} +# Enable libpcap library +%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}} +%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}} + +# numad is used to manage the CPU and memory placement dynamically, +# it's not available on s390[x] and ARM. +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 +%ifnarch s390 s390x %{arm} +%define with_numad 0%{!?_without_numad:%{server_drivers}} +%endif +%endif +%endif + +%if %{with_macvtap} +%define with_libnl 1 +%endif + +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 5 +%define with_audit 0%{!?_without_audit:1} +%endif + +%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 +%define with_dtrace 1 +%endif + +# Pull in cgroups config system +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%if %{with_qemu} || %{with_lxc} +%define with_cgconfig 0%{!?_without_cgconfig:1} +%endif +%endif + +%if %{with_udev} || %{with_hal} +%define with_nodedev 1 +%else +%define with_nodedev 0 +%endif + +%if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk} +%define with_storage 1 +%else +%define with_storage 0 +%endif + + +# Force QEMU to run as non-root +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%define qemu_user qemu +%define qemu_group qemu +%else +%define qemu_user root +%define qemu_group root +%endif + + +# The RHEL-5 Xen package has some feature backports. This +# flag is set to enable use of those special bits on RHEL-5 +%if 0%{?rhel} == 5 +%define with_rhel5 1 +%else +%define with_rhel5 0 +%endif + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%define with_systemd_macros 1 +%else +%define with_systemd_macros 0 +%endif + + +Summary: Library providing a simple virtualization API +Name: libvirt +Version: 0.10.2.4 +Release: 100%{?dist}%{?extra_release} +License: LGPLv2+ +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +URL: http://libvirt.org/ + +%if %(echo %{version} | grep -o \\. | wc -l) == 3 +%define mainturl stable_updates/ +%endif +Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz + +# Fix qemu -> qemu-system-i386 (bz #857026). +# keep: This patch is Fedora-specific and not upstream. +Patch1: 0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch +# Cleanly save session VMs on logout/shutdown (bz #872254) +# keep: Fixed upstream, but using patches not suitable for stable +Patch2: libvirt-dbus.patch +# Cleanly save session VMs on logout/shutdown (bz #872254) +# keep: Fixed upstream, but using patches not suitable for stable +Patch3: libvirt-save-with-session.patch + +Patch4: libvirt-qdisk.patch +Patch5: libvirt-qdisk-fixup.patch +Patch6: libvirt-emulator.patch + +%if %{with_libvirtd} +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_network} +Requires: libvirt-daemon-config-network = %{version}-%{release} +%endif +%if %{with_nwfilter} +Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} +%endif +%if %{with_driver_modules} +%if %{with_libxl} +Requires: libvirt-daemon-driver-libxl = %{version}-%{release} +%endif +%if %{with_lxc} +Requires: libvirt-daemon-driver-lxc = %{version}-%{release} +%endif +%if %{with_qemu} +Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +%endif +%if %{with_uml} +Requires: libvirt-daemon-driver-uml = %{version}-%{release} +%endif +%if %{with_xen} +Requires: libvirt-daemon-driver-xen = %{version}-%{release} +%endif + +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +%endif +%endif +Requires: libvirt-client = %{version}-%{release} + +# All build-time requirements. Run-time requirements are +# listed against each sub-RPM +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif +BuildRequires: python-devel +%if %{with_systemd} +BuildRequires: systemd-units +%endif +%if %{with_xen} +BuildRequires: xen-devel +%endif +BuildRequires: libxml2-devel +BuildRequires: xhtml1-dtds +BuildRequires: libxslt +BuildRequires: readline-devel +BuildRequires: ncurses-devel +BuildRequires: gettext +BuildRequires: libtasn1-devel +BuildRequires: gnutls-devel +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +# for augparse, optionally used in testing +BuildRequires: augeas +%endif +%if %{with_hal} +BuildRequires: hal-devel +%endif +%if %{with_udev} +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: systemd-devel >= 185 +%else +BuildRequires: libudev-devel >= 145 +%endif +BuildRequires: libpciaccess-devel >= 0.10.9 +%endif +%if %{with_yajl} +BuildRequires: yajl-devel +%endif +%if %{with_sanlock} +BuildRequires: sanlock-devel >= 1.8 +%endif +%if %{with_libpcap} +BuildRequires: libpcap-devel +%endif +%if %{with_libnl} +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: libnl3-devel +%else +BuildRequires: libnl-devel +%endif +%endif +%if %{with_avahi} +BuildRequires: avahi-devel +%endif +%if %{with_selinux} +BuildRequires: libselinux-devel +%endif +%if %{with_network} +BuildRequires: dnsmasq >= 2.41 +BuildRequires: iptables +BuildRequires: iptables-ipv6 +BuildRequires: radvd +%endif +%if %{with_nwfilter} +BuildRequires: ebtables +%endif +BuildRequires: module-init-tools +%if %{with_sasl} +BuildRequires: cyrus-sasl-devel +%endif +%if %{with_polkit} +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +# Only need the binary, not -devel +BuildRequires: polkit >= 0.93 +%else +BuildRequires: PolicyKit-devel >= 0.6 +%endif +%endif +%if %{with_storage_fs} +# For mount/umount in FS driver +BuildRequires: util-linux +%endif +%if %{with_qemu} +# From QEMU RPMs +BuildRequires: /usr/bin/qemu-img +%else +%if %{with_xen} +# From Xen RPMs +BuildRequires: /usr/sbin/qcow-create +%endif +%endif +%if %{with_storage_lvm} +# For LVM drivers +BuildRequires: lvm2 +%endif +%if %{with_storage_iscsi} +# For ISCSI driver +BuildRequires: iscsi-initiator-utils +%endif +%if %{with_storage_disk} +# For disk driver +BuildRequires: parted-devel +%if 0%{?rhel} == 5 +# Broken RHEL-5 parted RPM is missing a dep +BuildRequires: e2fsprogs-devel +%endif +%endif +%if %{with_storage_mpath} +# For Multipath support +%if 0%{?rhel} == 5 +# Broken RHEL-5 packaging has header files in main RPM :-( +BuildRequires: device-mapper +%else +BuildRequires: device-mapper-devel +%endif +%if %{with_storage_rbd} +BuildRequires: ceph-devel +%endif +%endif +%if %{with_numactl} +# For QEMU/LXC numa info +BuildRequires: numactl-devel +%endif +%if %{with_capng} +BuildRequires: libcap-ng-devel >= 0.5.0 +%endif +%if %{with_phyp} || %{with_libssh2_transport} +%if %{with_libssh2_transport} +BuildRequires: libssh2-devel >= 1.3.0 +%else +BuildRequires: libssh2-devel +%endif +%endif + +%if %{with_netcf} +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: netcf-devel >= 0.2.2 +%else +%if 0%{?fedora} >= 16 || 0%{?rhel} >= 6 +BuildRequires: netcf-devel >= 0.1.8 +%else +BuildRequires: netcf-devel >= 0.1.4 +%endif +%endif +%endif +%if %{with_esx} +%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 +BuildRequires: libcurl-devel +%else +BuildRequires: curl-devel +%endif +%endif +%if %{with_hyperv} +BuildRequires: libwsman-devel >= 2.2.3 +%endif +%if %{with_audit} +BuildRequires: audit-libs-devel +%endif +%if %{with_dtrace} +# we need /usr/sbin/dtrace +BuildRequires: systemtap-sdt-devel +%endif + +%if %{with_storage_fs} +# For mount/umount in FS driver +BuildRequires: util-linux +# For showmount in FS driver (netfs discovery) +BuildRequires: nfs-utils +%endif + +%if %{with_firewalld} +# Communication with the firewall daemon uses DBus +BuildRequires: dbus-devel +%endif + +# Fedora build root suckage +BuildRequires: gawk + +# For storage wiping with different algorithms +BuildRequires: scrub + +%if %{with_numad} +BuildRequires: numad +%endif + +Provides: bundled(gnulib) %description -OCaml binding for libvirt. +Libvirt is a C toolkit to interact with the virtualization capabilities +of recent versions of Linux (and other OSes). The main package includes +the libvirtd server exporting the virtualization support. + +%package docs +Summary: API reference and website documentation +Group: Development/Libraries + +%description docs +Includes the API reference for the libvirt C library, and a complete +copy of the libvirt.org website documentation. + +%if %{with_libvirtd} +%package daemon +Summary: Server side daemon and supporting files for libvirt library +Group: Development/Libraries + +# All runtime requirements for the libvirt package (runtime requrements +# for subpackages are listed later in those subpackages) + +# The client side, i.e. shared libs and virsh are in a subpackage +Requires: %{name}-client = %{version}-%{release} + +# for modprobe of pci devices +Requires: module-init-tools +# for /sbin/ip & /sbin/tc +Requires: iproute +%if %{with_avahi} +Requires: avahi-libs +%endif +%if %{with_network} +Requires: dnsmasq >= 2.41 +Requires: radvd +%endif +%if %{with_network} || %{with_nwfilter} +Requires: iptables +Requires: iptables-ipv6 +%endif +%if %{with_nwfilter} +Requires: ebtables +%endif +%if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7) +Requires: netcf-libs >= 0.2.2 +%endif +# needed for device enumeration +%if %{with_hal} +Requires: hal +%endif +%if %{with_udev} +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +Requires: systemd >= 185 +%else +Requires: udev >= 145 +%endif +%endif +%if %{with_polkit} +%if 0%{?fedora} >= 12 || 0%{?rhel} >=6 +Requires: polkit >= 0.93 +%else +Requires: PolicyKit >= 0.6 +%endif +%endif +%if %{with_storage_fs} +Requires: nfs-utils +# For mkfs +Requires: util-linux +# For pool-build probing for existing pools +BuildRequires: libblkid-devel >= 2.17 +# For glusterfs +%if 0%{?fedora} >= 11 +Requires: glusterfs-client >= 2.0.1 +%endif +%endif +%if %{with_qemu} +# From QEMU RPMs +Requires: /usr/bin/qemu-img +# For image compression +Requires: gzip +Requires: bzip2 +Requires: lzop +Requires: xz +%else +%if %{with_xen} +# From Xen RPMs +Requires: /usr/sbin/qcow-create +%endif +%endif +%if %{with_storage_lvm} +# For LVM drivers +Requires: lvm2 +%endif +%if %{with_storage_iscsi} +# For ISCSI driver +Requires: iscsi-initiator-utils +%endif +%if %{with_storage_disk} +# For disk driver +Requires: parted +Requires: device-mapper +%endif +%if %{with_storage_mpath} +# For multipath support +Requires: device-mapper +%endif +%if %{with_storage_sheepdog} +# For Sheepdog support +Requires: sheepdog +%endif +%if %{with_cgconfig} +Requires: libcgroup +%endif +%ifarch %{ix86} x86_64 ia64 +# For virConnectGetSysinfo +Requires: dmidecode +%endif +# For service management +%if %{with_systemd} +Requires(post): systemd-units +Requires(post): systemd-sysv +Requires(preun): systemd-units +Requires(postun): systemd-units +%endif +%if %{with_numad} +Requires: numad +%endif + +%description daemon +Server side daemon required to manage the virtualization capabilities +of recent versions of Linux. Requires a hypervisor specific sub-RPM +for specific drivers. + +%if %{with_network} +%package daemon-config-network +Summary: Default configuration files for the libvirtd daemon +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-config-network +Default configuration files for setting up NAT based networking +%endif + +%if %{with_nwfilter} +%package daemon-config-nwfilter +Summary: Network filter configuration files for the libvirtd daemon +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-config-nwfilter +Network filter configuration files for cleaning guest traffic +%endif + +%if %{with_driver_modules} +%if %{with_network} +%package daemon-driver-network +Summary: Network driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-network +The network driver plugin for the libvirtd daemon, providing +an implementation of the virtual network APIs using the Linux +bridge capabilities. +%endif + + +%if %{with_nwfilter} +%package daemon-driver-nwfilter +Summary: Nwfilter driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-nwfilter +The nwfilter driver plugin for the libvirtd daemon, providing +an implementation of the firewall APIs using the ebtables, +iptables and ip6tables capabilities +%endif + + +%if %{with_nodedev} +%package daemon-driver-nodedev +Summary: Nodedev driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-nodedev +The nodedev driver plugin for the libvirtd daemon, providing +an implementation of the node device APIs using the udev +capabilities. +%endif + + +%if %{with_interface} +%package daemon-driver-interface +Summary: Interface driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-interface +The interface driver plugin for the libvirtd daemon, providing +an implementation of the network interface APIs using the +netcf library +%endif + + +%package daemon-driver-secret +Summary: Secret driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-secret +The secret driver plugin for the libvirtd daemon, providing +an implementation of the secret key APIs. + + +%if %{with_storage} +%package daemon-driver-storage +Summary: Storage driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-storage +The storage driver plugin for the libvirtd daemon, providing +an implementation of the storage APIs using LVM, iSCSI, +parted and more. +%endif + + +%if %{with_qemu} +%package daemon-driver-qemu +Summary: Qemu driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} +# There really is a hard cross-driver dependency here +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +%endif + +%description daemon-driver-qemu +The qemu driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs using +QEMU +%endif + + +%if %{with_lxc} +%package daemon-driver-lxc +Summary: LXC driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} +# There really is a hard cross-driver dependency here +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +%endif + +%description daemon-driver-lxc +The LXC driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs using +the Linux kernel +%endif + + +%if %{with_uml} +%package daemon-driver-uml +Summary: Uml driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-uml +The UML driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs using +User Mode Linux +%endif + + +%if %{with_xen} +%package daemon-driver-xen +Summary: Xen driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-xen +The Xen driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs using +Xen +%endif + + +%if %{with_libxl} +%package daemon-driver-libxl +Summary: Libxl driver plugin for the libvirtd daemon +Group: Development/Libraries +Requires: libvirt-daemon = %{version}-%{release} + +%description daemon-driver-libxl +The Libxl driver plugin for the libvirtd daemon, providing +an implementation of the hypervisor driver APIs using +Libxl +%endif +%endif + + + +%if %{with_qemu_tcg} +%package daemon-qemu +Summary: Server side daemon & driver required to run QEMU guests +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +%endif +Requires: qemu + +%description daemon-qemu +Server side daemon and driver required to manage the virtualization +capabilities of the QEMU TCG emulators +%endif + + +%if %{with_qemu_kvm} +%package daemon-kvm +Summary: Server side daemon & driver required to run KVM guests +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +%endif +Requires: qemu-kvm + +%description daemon-kvm +Server side daemon and driver required to manage the virtualization +capabilities of the KVM hypervisor +%endif + + +%if %{with_lxc} +%package daemon-lxc +Summary: Server side daemon & driver required to run LXC guests +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-lxc = %{version}-%{release} +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +%endif + +%description daemon-lxc +Server side daemon and driver required to manage the virtualization +capabilities of LXC +%endif + + +%if %{with_uml} +%package daemon-uml +Summary: Server side daemon & driver required to run UML guests +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_driver_modules} +Requires: libvirt-daemon-driver-uml = %{version}-%{release} +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +%endif +# There are no UML kernel RPMs in Fedora/RHEL to depend on. + +%description daemon-uml +Server side daemon and driver required to manage the virtualization +capabilities of UML +%endif + + +%if %{with_xen} || %{with_libxl} +%package daemon-xen +Summary: Server side daemon & driver required to run XEN guests +Group: Development/Libraries + +Requires: libvirt-daemon = %{version}-%{release} +%if %{with_driver_modules} +%if %{with_xen} +Requires: libvirt-daemon-driver-xen = %{version}-%{release} +%endif +%if %{with_libxl} +Requires: libvirt-daemon-driver-libxl = %{version}-%{release} +%endif +Requires: libvirt-daemon-driver-interface = %{version}-%{release} +Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage = %{version}-%{release} +%endif +Requires: xen + +%description daemon-xen +Server side daemon and driver required to manage the virtualization +capabilities of XEN +%endif +%endif + +%package client +Summary: Client side library and utilities of the libvirt library +Group: Development/Libraries +Requires: readline +Requires: ncurses +# So remote clients can access libvirt over SSH tunnel +# (client invokes 'nc' against the UNIX socket on the server) +Requires: nc +# Needed by libvirt-guests init script. +Requires: gettext +# Needed by virt-pki-validate script. +Requires: gnutls-utils +# Needed for probing the power management features of the host. +Requires: pm-utils +%if %{with_sasl} +Requires: cyrus-sasl +# Not technically required, but makes 'out-of-box' config +# work correctly & doesn't have onerous dependencies +Requires: cyrus-sasl-md5 +%endif +%if %{with_libssh2_transport} +Requires: libssh2 >= 1.3.0 +%endif + +%description client +Shared libraries and client binaries needed to access to the +virtualization capabilities of recent versions of Linux (and other OSes). + +%package devel +Summary: Libraries, includes, etc. to compile with the libvirt library +Group: Development/Libraries +Requires: %{name}-client = %{version}-%{release} +Requires: %{name}-docs = %{version}-%{release} +Requires: pkgconfig + +%description devel +Include header files & development libraries for the libvirt C library. + +%if %{with_sanlock} +%package lock-sanlock +Summary: Sanlock lock manager plugin for QEMU driver +Group: Development/Libraries +Requires: sanlock >= 1.8 +#for virt-sanlock-cleanup require augeas +Requires: augeas +Requires: %{name}-daemon = %{version}-%{release} + +%description lock-sanlock +Includes the Sanlock lock manager plugin for the QEMU +driver +%endif + +%if %{with_python} +%package python +Summary: Python bindings for the libvirt library +Group: Development/Libraries +Requires: %{name}-client = %{version}-%{release} + +%description python +The libvirt-python package contains a module that permits applications +written in the Python programming language to use the interface +supplied by the libvirt library to use the virtualization capabilities +of recent versions of Linux (and other OSes). +%endif + +%prep +%setup -q + +# Fix qemu -> qemu-system-i386 (bz #857026). +# keep: This patch is Fedora-specific and not upstream. +%patch1 -p1 +# Cleanly save session VMs on logout/shutdown (bz #872254) +# keep: Fixed upstream, but using patches not suitable for stable +%patch2 -p1 +# Cleanly save session VMs on logout/shutdown (bz #872254) +# keep: Fixed upstream, but using patches not suitable for stable +%patch3 -p1 + +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +%build +%if ! %{with_xen} +%define _without_xen --without-xen +%endif + +%if ! %{with_qemu} +%define _without_qemu --without-qemu +%endif + +%if ! %{with_openvz} +%define _without_openvz --without-openvz +%endif + +%if ! %{with_lxc} +%define _without_lxc --without-lxc +%endif + +%if ! %{with_vbox} +%define _without_vbox --without-vbox +%endif + +%if ! %{with_xenapi} +%define _without_xenapi --without-xenapi +%endif + +%if ! %{with_libxl} +%define _without_libxl --without-libxl +%endif + +%if ! %{with_sasl} +%define _without_sasl --without-sasl +%endif + +%if ! %{with_avahi} +%define _without_avahi --without-avahi +%endif + +%if ! %{with_phyp} +%define _without_phyp --without-phyp +%endif + +%if ! %{with_esx} +%define _without_esx --without-esx +%endif + +%if ! %{with_hyperv} +%define _without_hyperv --without-hyperv +%endif + +%if ! %{with_vmware} +%define _without_vmware --without-vmware +%endif + +%if ! %{with_parallels} +%define _without_parallels --without-parallels +%endif + +%if ! %{with_polkit} +%define _without_polkit --without-polkit +%endif + +%if ! %{with_python} +%define _without_python --without-python +%endif + +%if ! %{with_libvirtd} +%define _without_libvirtd --without-libvirtd +%endif + +%if ! %{with_uml} +%define _without_uml --without-uml +%endif + +%if %{with_rhel5} +%define _with_rhel5_api --with-rhel5-api +%endif + +%if ! %{with_interface} +%define _without_interface --without-interface +%endif + +%if ! %{with_network} +%define _without_network --without-network +%endif + +%if ! %{with_storage_fs} +%define _without_storage_fs --without-storage-fs +%endif + +%if ! %{with_storage_lvm} +%define _without_storage_lvm --without-storage-lvm +%endif + +%if ! %{with_storage_iscsi} +%define _without_storage_iscsi --without-storage-iscsi +%endif + +%if ! %{with_storage_disk} +%define _without_storage_disk --without-storage-disk +%endif + +%if ! %{with_storage_mpath} +%define _without_storage_mpath --without-storage-mpath +%endif + +%if ! %{with_storage_rbd} +%define _without_storage_rbd --without-storage-rbd +%endif + +%if ! %{with_storage_sheepdog} +%define _without_storage_sheepdog --without-storage-sheepdog +%endif + +%if ! %{with_numactl} +%define _without_numactl --without-numactl +%endif + +%if ! %{with_numad} +%define _without_numad --without-numad +%endif + +%if ! %{with_capng} +%define _without_capng --without-capng +%endif + +%if ! %{with_netcf} +%define _without_netcf --without-netcf +%endif + +%if ! %{with_selinux} +%define _without_selinux --without-selinux +%endif + +%if ! %{with_hal} +%define _without_hal --without-hal +%endif + +%if ! %{with_udev} +%define _without_udev --without-udev +%endif + +%if ! %{with_yajl} +%define _without_yajl --without-yajl +%endif + +%if ! %{with_sanlock} +%define _without_sanlock --without-sanlock +%endif + +%if ! %{with_libpcap} +%define _without_libpcap --without-libpcap +%endif + +%if ! %{with_macvtap} +%define _without_macvtap --without-macvtap +%endif + +%if ! %{with_audit} +%define _without_audit --without-audit +%endif + +%if ! %{with_dtrace} +%define _without_dtrace --without-dtrace +%endif + +%if ! %{with_driver_modules} +%define _without_driver_modules --without-driver-modules +%endif + +%if %{with_firewalld} +%define _with_firewalld --with-firewalld +%endif + +%define when %(date +"%%F-%%T") +%define where %(hostname) +%define who %{?packager}%{!?packager:Unknown} +%define with_packager --with-packager="%{who}, %{when}, %{where}" +%define with_packager_version --with-packager-version="%{release}" + +%if %{with_systemd} +%define init_scripts --with-init_script=systemd +%else +%define init_scripts --with-init_script=redhat +%endif + +%if 0%{?enable_autotools} +autoreconf -if +%endif + +%if %{with_selinux} +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux" +%else +%define with_selinux_mount --with-selinux-mount="/selinux" +%endif +%endif + +%configure %{?_without_xen} \ + %{?_without_qemu} \ + %{?_without_openvz} \ + %{?_without_lxc} \ + %{?_without_vbox} \ + --with-libxl \ + %{?_without_xenapi} \ + %{?_without_sasl} \ + %{?_without_avahi} \ + %{?_without_polkit} \ + %{?_without_python} \ + %{?_without_libvirtd} \ + %{?_without_uml} \ + %{?_without_phyp} \ + %{?_without_esx} \ + %{?_without_hyperv} \ + %{?_without_vmware} \ + %{?_without_parallels} \ + %{?_without_interface} \ + %{?_without_network} \ + %{?_with_rhel5_api} \ + %{?_without_storage_fs} \ + %{?_without_storage_lvm} \ + %{?_without_storage_iscsi} \ + %{?_without_storage_disk} \ + %{?_without_storage_mpath} \ + %{?_without_storage_rbd} \ + %{?_without_storage_sheepdog} \ + %{?_without_numactl} \ + %{?_without_numad} \ + %{?_without_capng} \ + %{?_without_netcf} \ + %{?_without_selinux} \ + %{?_with_selinux_mount} \ + %{?_without_hal} \ + %{?_without_udev} \ + %{?_without_yajl} \ + %{?_without_sanlock} \ + %{?_without_libpcap} \ + %{?_without_macvtap} \ + %{?_without_audit} \ + %{?_without_dtrace} \ + %{?_without_driver_modules} \ + %{?_with_firewalld} \ + %{with_packager} \ + %{with_packager_version} \ + --with-qemu-user=%{qemu_user} \ + --with-qemu-group=%{qemu_group} \ + %{init_scripts} +make %{?_smp_mflags} +gzip -9 ChangeLog + +%install +rm -fr %{buildroot} + +%makeinstall SYSTEMD_UNIT_DIR=%{buildroot}%{_unitdir} +for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap +do + (cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in) +done +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a +%if %{with_driver_modules} +rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a +%endif + +%if %{with_network} +install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/ +# We don't want to install /etc/libvirt/qemu/networks in the main %files list +# because if the admin wants to delete the default network completely, we don't +# want to end up re-incarnating it on every RPM upgrade. +install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/ +cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \ + $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml +# Strip auto-generated UUID - we need it generated per-install +sed -i -e "//d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml +%else +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml +%endif +%if ! %{with_qemu} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug +%endif +%find_lang %{name} + +%if ! %{with_sanlock} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%endif + +%if ! %{with_lxc} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug +%endif + +%if ! %{with_python} +rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version} +%endif + +%if ! %{with_qemu} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu +%endif +%if ! %{with_lxc} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc +%endif +%if ! %{with_uml} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml +%endif + +mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \ + $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version} + +%if %{with_dtrace} +%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 +mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ + $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp +mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ + $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp +%endif +%endif + +%if 0%{?fedora} < 14 && 0%{?rhel} < 6 +rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf +%endif + +%clean +rm -fr %{buildroot} + +%check +cd tests +make +# These tests don't current work in a mock build root +for i in nodeinfotest seclabeltest +do + rm -f $i + printf 'int main(void) { return 0; }' > $i.c + printf '#!/bin/sh\nexit 0\n' > $i + chmod +x $i +done +make check + +%if %{with_libvirtd} +%pre daemon +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +# Normally 'setup' adds this in /etc/passwd, but this is +# here for case of upgrades from earlier Fedora/RHEL. This +# UID/GID pair is reserved for qemu:qemu +getent group kvm >/dev/null || groupadd -g 36 -r kvm +getent group qemu >/dev/null || groupadd -g 107 -r qemu +getent passwd qemu >/dev/null || \ + useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ + -c "qemu user" qemu +%endif + +%post daemon + +%if %{with_network} +# All newly defined networks will have a mac address for the bridge +# auto-generated, but networks already existing at the time of upgrade +# will not. We need to go through all the network configs, look for +# those that don't have a mac address, and add one. + +network_files=$( (cd %{_localstatedir}/lib/libvirt/network && \ + grep -L "mac address" *.xml; \ + cd %{_sysconfdir}/libvirt/qemu/networks && \ + grep -L "mac address" *.xml) 2>/dev/null \ + | sort -u) + +for file in $network_files +do + # each file exists in either the config or state directory (or both) and + # does not have a mac address specified in either. We add the same mac + # address to both files (or just one, if the other isn't there) + + mac4=`printf '%X' $(($RANDOM % 256))` + mac5=`printf '%X' $(($RANDOM % 256))` + mac6=`printf '%X' $(($RANDOM % 256))` + for dir in %{_localstatedir}/lib/libvirt/network \ + %{_sysconfdir}/libvirt/qemu/networks + do + if test -f $dir/$file + then + sed -i.orig -e \ + "s|\(|" \ + $dir/$file + if test $? != 0 + then + echo "failed to add " \ + "to $dir/$file" + mv -f $dir/$file.orig $dir/$file + else + rm -f $dir/$file.orig + fi + fi + done +done +%endif + +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_post libvirtd.service +%else +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || : +fi +%endif +%else +%if %{with_cgconfig} +# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups, +# and cgconfig is no longer a necessary service. +%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16) +if [ "$1" -eq "1" ]; then +/sbin/chkconfig cgconfig on +fi +%endif +%endif + +/sbin/chkconfig --add libvirtd +if [ "$1" -ge "1" ]; then + /sbin/service libvirtd condrestart > /dev/null 2>&1 +fi +%endif + +%preun daemon +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_preun libvirtd.service +%else +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable libvirtd.service > /dev/null 2>&1 || : + /bin/systemctl stop libvirtd.service > /dev/null 2>&1 || : +fi +%endif +%else +if [ $1 = 0 ]; then + /sbin/service libvirtd stop 1>/dev/null 2>&1 + /sbin/chkconfig --del libvirtd +fi +%endif + +%postun daemon +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_postun_with_restart libvirtd.service +%else +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : +fi +%endif +%endif + +%if %{with_network} +%post daemon-config-network +if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then + UUID=`/usr/bin/uuidgen` + sed -e "s,,\n $UUID," \ + < %{_datadir}/libvirt/networks/default.xml \ + > %{_sysconfdir}/libvirt/qemu/networks/default.xml + ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml +fi +%endif +%endif + +%if %{with_libvirtd} +%if %{with_systemd} +%triggerun -- libvirt < 0.9.4 +%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||: + +# If the package is allowed to autostart: +/bin/systemctl --no-reload enable libvirtd.service >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del libvirtd >/dev/null 2>&1 || : +/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : +%endif +%endif + +%preun client + +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_preun libvirt-guests.service +%endif +%else +if [ $1 = 0 ]; then + /sbin/chkconfig --del libvirt-guests + rm -f /var/lib/libvirt/libvirt-guests +fi +%endif + +%post client + +/sbin/ldconfig +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_post libvirt-guests.service +%endif +%else +/sbin/chkconfig --add libvirt-guests +%endif +%postun client -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +/sbin/ldconfig +%if %{with_systemd} +%if %{with_systemd_macros} +%systemd_postun_with_restart libvirt-guests.service +%endif +%triggerun client -- libvirt < 0.9.4 +%{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||: + +# If the package is allowed to autostart: +/bin/systemctl --no-reload enable libvirt-guests.service >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || : +/bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || : +%endif +%files +%defattr(-, root, root) -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. +%files docs +%defattr(-, root, root) +# Website +%dir %{_datadir}/doc/libvirt-docs-%{version} +%dir %{_datadir}/doc/libvirt-docs-%{version}/html +%{_datadir}/doc/libvirt-docs-%{version}/html/* +# API docs +%dir %{_datadir}/gtk-doc/html/libvirt/ +%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp +%doc %{_datadir}/gtk-doc/html/libvirt/*.html +%doc %{_datadir}/gtk-doc/html/libvirt/*.png +%doc %{_datadir}/gtk-doc/html/libvirt/*.css -%if %build_mlvirsh -%package -n mlvirsh -Summary: OCaml virsh utility -Group: Applications/Emulators -License: GPLv2+ +%if %{with_libvirtd} +%files daemon +%defattr(-, root, root) +%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ -%description -n mlvirsh -OCaml virtualization shell. +%if %{with_network} +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart %endif +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 +%if %{with_systemd} +%{_unitdir}/libvirtd.service +%else +%{_sysconfdir}/rc.d/init.d/libvirtd +%endif +%doc daemon/libvirtd.upstart +%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd +%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf +%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6 +%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf +%endif +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ +%if %{with_libxl} +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/ +%endif -%build -CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix} -make all doc -%if %opt -make opt -strip libvirt/dllmllibvirt.so +%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%if %{with_qemu} +%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu +%endif +%if %{with_lxc} +%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc +%endif +%if %{with_uml} +%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml %endif +%dir %{_datadir}/libvirt/ -%install -# These rules work if the library uses 'ocamlfind install' to install itself. -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -mkdir -p $RPM_BUILD_ROOT%{_bindir} -%if %opt -make install-opt +%if %{with_network} +%dir %{_datadir}/libvirt/networks/ +%{_datadir}/libvirt/networks/default.xml +%endif + +%ghost %dir %{_localstatedir}/run/libvirt/ + +%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ +%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ +%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ +%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ + +%if %{with_qemu} +%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ +%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ +%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/ +%endif +%if %{with_lxc} +%ghost %dir %{_localstatedir}/run/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ +%endif +%if %{with_uml} +%ghost %dir %{_localstatedir}/run/libvirt/uml/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ +%endif +%if %{with_libxl} +%ghost %dir %{_localstatedir}/run/libvirt/libxl/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/ +%endif +%if %{with_network} +%ghost %dir %{_localstatedir}/run/libvirt/network/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ +%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/ +%endif + +%if %{with_qemu} +%{_datadir}/augeas/lenses/libvirtd_qemu.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug +%endif + +%if %{with_lxc} +%{_datadir}/augeas/lenses/libvirtd_lxc.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug +%endif + +%{_datadir}/augeas/lenses/libvirtd.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd.aug + +%if %{with_polkit} +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 +%{_datadir}/polkit-1/actions/org.libvirt.unix.policy %else -make install-byte +%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy %endif +%endif + +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ -%if !%build_mlvirsh -rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh +%if %{with_lxc} +%attr(0755, root, root) %{_libexecdir}/libvirt_lxc %endif +%if %{with_storage_disk} +%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper +%endif -%clean -rm -rf $RPM_BUILD_ROOT +%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper +%attr(0755, root, root) %{_sbindir}/libvirtd +%{_mandir}/man8/libvirtd.8* -%files -%defattr(-,root,root,-) -%doc COPYING.LIB README ChangeLog -%{_libdir}/ocaml/libvirt -%if %opt -%exclude %{_libdir}/ocaml/libvirt/*.a -%exclude %{_libdir}/ocaml/libvirt/*.cmxa -%exclude %{_libdir}/ocaml/libvirt/*.cmx +%if %{with_driver_modules} +%if %{with_network} +%files daemon-config-network +%defattr(-, root, root) %endif -%exclude %{_libdir}/ocaml/libvirt/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner +%if %{with_nwfilter} +%files daemon-config-nwfilter +%defattr(-, root, root) +%{_sysconfdir}/libvirt/nwfilter/*.xml +%endif -%files devel -%defattr(-,root,root,-) -%doc COPYING.LIB README TODO.libvirt ChangeLog html/* -%if %opt -%{_libdir}/ocaml/libvirt/*.a -%{_libdir}/ocaml/libvirt/*.cmxa -%{_libdir}/ocaml/libvirt/*.cmx +%if %{with_interface} +%files daemon-driver-interface +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so +%endif + +%if %{with_network} +%files daemon-driver-network +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so +%endif + +%if %{with_nodedev} +%files daemon-driver-nodedev +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so +%endif + +%if %{with_nwfilter} +%files daemon-driver-nwfilter +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so +%endif + +%files daemon-driver-secret +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so + +%if %{with_storage} +%files daemon-driver-storage +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so +%endif + +%if %{with_qemu} +%files daemon-driver-qemu +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so +%endif + +%if %{with_lxc} +%files daemon-driver-lxc +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so +%endif + +%if %{with_uml} +%files daemon-driver-uml +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so +%endif + +%if %{with_xen} +%files daemon-driver-xen +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_xen.so +%endif + +%if %{with_libxl} +%files daemon-driver-libxl +%defattr(-, root, root) +%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so +%endif +%endif + +%if %{with_qemu_tcg} +%files daemon-qemu +%defattr(-, root, root) +%endif + +%if %{with_qemu_kvm} +%files daemon-kvm +%defattr(-, root, root) +%endif + +%if %{with_lxc} +%files daemon-lxc +%defattr(-, root, root) +%endif + +%if %{with_uml} +%files daemon-uml +%defattr(-, root, root) +%endif + +%if %{with_xen} || %{with_libxl} +%files daemon-xen +%defattr(-, root, root) +%endif +%endif + +%if %{with_sanlock} +%files lock-sanlock +%defattr(-, root, root) +%if %{with_qemu} +%config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf +%endif +%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so +%{_datadir}/augeas/lenses/libvirt_sanlock.aug +%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock +%{_sbindir}/virt-sanlock-cleanup +%{_mandir}/man8/virt-sanlock-cleanup.8* +%endif + +%files client -f %{name}.lang +%defattr(-, root, root) +%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO + +%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf +%{_mandir}/man1/virsh.1* +%{_mandir}/man1/virt-xml-validate.1* +%{_mandir}/man1/virt-pki-validate.1* +%{_mandir}/man1/virt-host-validate.1* +%{_bindir}/virsh +%{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate +%{_bindir}/virt-host-validate +%{_libdir}/lib*.so.* + +%if %{with_dtrace} +%{_datadir}/systemtap/tapset/libvirt_probes*.stp +%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp +%{_datadir}/systemtap/tapset/libvirt_functions.stp %endif -%{_libdir}/ocaml/libvirt/*.mli +%dir %{_datadir}/libvirt/ +%dir %{_datadir}/libvirt/schemas/ + +%{_datadir}/libvirt/schemas/basictypes.rng +%{_datadir}/libvirt/schemas/capability.rng +%{_datadir}/libvirt/schemas/domain.rng +%{_datadir}/libvirt/schemas/domaincommon.rng +%{_datadir}/libvirt/schemas/domainsnapshot.rng +%{_datadir}/libvirt/schemas/interface.rng +%{_datadir}/libvirt/schemas/network.rng +%{_datadir}/libvirt/schemas/networkcommon.rng +%{_datadir}/libvirt/schemas/nodedev.rng +%{_datadir}/libvirt/schemas/nwfilter.rng +%{_datadir}/libvirt/schemas/secret.rng +%{_datadir}/libvirt/schemas/storageencryption.rng +%{_datadir}/libvirt/schemas/storagepool.rng +%{_datadir}/libvirt/schemas/storagevol.rng + +%{_datadir}/libvirt/cpu_map.xml + +%if %{with_systemd} +%{_unitdir}/libvirt-guests.service +%else +%{_sysconfdir}/rc.d/init.d/libvirt-guests +%endif +%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests +%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh +%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ -%if %build_mlvirsh -%files -n mlvirsh -%defattr(-,root,root,-) -%doc COPYING README ChangeLog -%{_bindir}/mlvirsh +%if %{with_sasl} +%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %endif +%files devel +%defattr(-, root, root) + +%{_libdir}/lib*.so +%dir %{_includedir}/libvirt +%{_includedir}/libvirt/*.h +%{_libdir}/pkgconfig/libvirt.pc + +%dir %{_datadir}/libvirt/api/ +%{_datadir}/libvirt/api/libvirt-api.xml +%{_datadir}/libvirt/api/libvirt-qemu-api.xml + +%doc docs/*.html docs/html docs/*.gif +%doc docs/libvirt-api.xml +%doc examples/hellolibvirt +%doc examples/domain-events/events-c +%doc examples/dominfo +%doc examples/domsuspend +%doc examples/openauth +%doc examples/xml +%doc examples/systemtap + +%if %{with_python} +%files python +%defattr(-, root, root) + +%doc AUTHORS NEWS README COPYING.LIB +%{_libdir}/python*/site-packages/libvirt.py* +%{_libdir}/python*/site-packages/libvirt_qemu.py* +%{_libdir}/python*/site-packages/libvirtmod* +%doc python/tests/*.py +%doc python/TODO +%doc examples/python +%doc examples/domain-events/events-python +%endif %changelog +* Fri Apr 05 2013 Johnny Hughes - 0.10.2.4-1.el6.centos.alt +- modified to build xen and libxl on centos + +* Mon Apr 01 2013 Cole Robinson - 0.10.2.4-1 +- Rebased to version 0.10.2.4 +- Fix 'Cannot parse sensitivity level in s0' error (bz #902103) +- Fix updating NIC that has boot order set (bz #906446) +- Fix virsh list for vmware ESX (bz #910702) +- Fix libxl disk backend default (bz #912488) + +* Mon Jan 28 2013 Cole Robinson - 0.10.2.3-1 +- Rebased to version 0.10.2.3 +- Fix libxl driver to build against xen 4.2 (bz #870689) +- Fix possible crash when destroying guests (bz #877110) +- Fix loading sysctl file (bz #887017) +- Fix svirt memory leak (bz #890039) +- Fix attaching PCI netdev to VM (bz #893131) +- Fix libvirtd segfault on shutdown (bz #903194) +- Raise mem limit to stop qemu processes from getting OOM killed (bz #903432) +- CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz #893450, bz + #905173) + +* Mon Dec 17 2012 Cole Robinson - 0.10.2.2-3 +- Fix scriplet warning when uninstalling libvirt-client (bz #888071) + +* Sun Dec 16 2012 Cole Robinson - 0.10.2.2-2 +- Fix conflict with NM launched dnsmasq (bz #886663) +- Fix selinux denials when launching non-kvm qemu guests (bz #885837) + +* Sun Dec 09 2012 Cole Robinson - 0.10.2.2-1 +- Rebased to version 0.10.2.2 +- CVE-2012-3411: avoid open DNS proxy with dnsmasq (bz #874702, bz #882309) +- Don't ignore address for USB disks (bz #861309) +- Fix error with blkdeviotune (bz #872582) +- Fix cloning LVM volume (bz #869607) +- Fix VDSM error when libvirt doesn't format CPU topology (bz #876475) +- Use systemd macros in spec file (bz #850186) + +* Thu Dec 06 2012 Cole Robinson - 0.10.2.1-4 +- Add ppc64 and s390x as KVM arches for Fedora >= 18 (bz #872545) + +* Tue Nov 13 2012 Cole Robinson - 0.10.2.1-3 +- Cleanly save session VMs on logout/shutdown (bz #872254) + +* Tue Oct 30 2012 Cole Robinson - 0.10.2.1-2 +- Disable libxl on F18 too + +* Sat Oct 27 2012 Cole Robinson - 0.10.2.1-1 +- Rebased to version 0.10.2.1 +- Fix lvm volume creation when alloc=0 (bz #866481) +- Clarify virsh send-keys man page example (bz #860004) +- Fix occasional deadlock via virDomainDestroy (bz #859009) +- Fix LXC deadlock from ctrl-c (bz #848119) +- Fix occasional selinux denials with macvtap (bz #798605) +- Fix multilib conflict with systemtap files (bz #831425) +- Don't trigger keytab warning in system logs (bz #745203) +- Fix qemu domxml-2-native NIC model out (bz #636832) +- Fix error message if not enough space for lvm vol (bz #609104) + +* Thu Oct 25 2012 Cole Robinson - 0.10.2-4 +- Disable libxl driver, since it doesn't build with xen 4.2 in rawhide + +* Mon Sep 24 2012 Richard W.M. Jones - 0.10.2-3 +- Re-add Use-qemu-system-i386-as-binary-instead-of-qemu.patch + NB: This patch is Fedora-specific and not upstream. +- Add upstream patches: don't duplicate environment variables (RHBZ#859596). + +* Mon Sep 24 2012 Daniel Veillard - 0.10.2-1 +- Upstream release 0.10.2 +- network: define new API virNetworkUpdate +- add support for QEmu sandbox support +- blockjob: add virDomainBlockCommit +- New APIs to get/set Node memory parameters +- new API virConnectListAllSecrets +- new API virConnectListAllNWFilters +- new API virConnectListAllNodeDevices +- parallels: add support of containers to the driver +- new API virConnectListAllInterfaces +- new API virConnectListAllNetworks +- new API virStoragePoolListAllVolumes +- Add PMSUSPENDED life cycle event +- new API virStorageListAllStoragePools +- Add per-guest S3/S4 state configuration +- qemu: Support for Block Device IO Limits +- a lot of bug fixes, improvements and portability work + +* Fri Sep 21 2012 Richard W.M. Jones - 0.10.1-5 +- Add (upstream) patches to label sockets for SELinux (RHBZ#853393). + +* Thu Sep 13 2012 Richard W.M. Jones - 0.10.1-4 +- Fix for 32 bit qemu renamed to qemu-system-i386 (RHBZ#857026). + +* Wed Sep 12 2012 Cole Robinson - 0.10.1-3 +- Fix libvirtd segfault with old netcf-libs (bz 853381) +- Drop unneeded dnsmasq --filterwin2k +- Fix unwanted connection closing, needed for boxes + +* Wed Sep 5 2012 Daniel P. Berrange - 0.10.1-2 +- Remove dep on ceph RPM (rhbz #854360) + +* Fri Aug 31 2012 Daniel Veillard - 0.10.1-1 +- upstream release of 0.10.1 +- many fixes from 0.10.0 + +* Wed Aug 29 2012 Daniel Veillard - 0.10.0-1 +- upstream release of 0.10.0 +- agent: add qemuAgentArbitraryCommand() for general qemu agent command +- Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions +- network: use firewalld instead of iptables, when available +- network: make network driver vlan-aware +- esx: Implement network driver +- driver for parallels hypervisor +- Various LXC improvements +- Add virDomainGetHostname +- a lot of bug fixes, improvements and portability work + +* Thu Aug 23 2012 Daniel Veillard - 0.10.0-0rc1 +- release candidate 1 of 0.10.0 + +* Tue Aug 14 2012 Daniel P. Berrange - 0.10.0-0rc0.2 +- Enable autotools to make previous patch work + +* Tue Aug 14 2012 Daniel Veillard - 0.10.0-0rc0.1 +- fix security driver missing from the daemon + +* Wed Aug 8 2012 Daniel Veillard - 0.10.0-0rc0 +- snapshot before 0.10.0 in a few weeks +- adds the parallel driver support + +* Mon Jul 23 2012 Richard W.M. Jones - 0.9.13-3 +- Add upstream patch to fix RHBZ#842114. + +* Thu Jul 19 2012 Fedora Release Engineering - 0.9.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Daniel Veillard - 0.9.13-1 +- S390: support for s390(x) +- snapshot: implement new APIs for esx and vbox +- snapshot: new query APIs and many improvements +- virsh: Allow users to reedit rejected XML +- nwfilter: add DHCP snooping +- Enable driver modules in libvirt RPM +- Default to enable driver modules for libvirtd +- storage backend: Add RBD (RADOS Block Device) support +- sVirt support for LXC domains inprovement +- a lot of bug fixes, improvements and portability work + +* Mon May 14 2012 Daniel Veillard - 0.9.12-1 +- qemu: allow snapshotting of sheepdog and rbd disks +- blockjob: add new APIs +- a lot of bug fixes, improvements and portability work + +* Thu Apr 26 2012 Cole Robinson - 0.9.11.3-1 +- Rebased to version 0.9.11.3 +- Abide URI username when connecting to hypervisor (bz 811397) +- Fix managed USB mode (bz 814866) +- Fix crash connecting to ESX host (bz 811891) + +* Wed Apr 4 2012 Daniel P. Berrange - 0.9.11-1 +- Update to 0.9.11 release + +* Tue Apr 3 2012 Daniel P. Berrange - 0.9.10-4 +- Revert previous change + +* Sat Mar 31 2012 Daniel P. Berrange - 0.9.10-3 +- Refactor RPM spec to allow install without default configs + +* Thu Mar 15 2012 Daniel P. Berrange - 0.9.10-2 +- Rebuild for libparted soname break + +* Mon Feb 13 2012 Daniel P. Berrange - 0.9.10-1 +- Update to 0.9.10 + +* Thu Jan 12 2012 Daniel P. Berrange - 0.9.9-2 +- Fix LXC I/O handling + +* Sat Jan 7 2012 Daniel Veillard - 0.9.9-1 +- Add API virDomain{S,G}etInterfaceParameters +- Add API virDomain{G, S}etNumaParameters +- Add support for ppc64 qemu +- Support Xen domctl v8 +- many improvements and bug fixes + +* Thu Dec 8 2011 Daniel P. Berrange - 0.9.8-2 +- Fix install of libvirt-guests.service & libvirtd.service + +* Thu Dec 8 2011 Daniel Veillard - 0.9.8-1 +- Add support for QEMU 1.0 +- Add preliminary PPC cpu driver +- Add new API virDomain{Set, Get}BlockIoTune +- block_resize: Define the new API +- Add a public API to invoke suspend/resume on the host +- various improvements for LXC containers +- Define keepalive protocol and add virConnectIsAlive API +- Add support for STP and VLAN filtering +- many improvements and bug fixes + +* Mon Nov 14 2011 Justin M. Forbes - 0.9.7-3 +- Remove versioned buildreq for yajl as 2.0.x features are not required. + +* Thu Nov 10 2011 Daniel P. Berrange - 0.9.7-2 +- Rebuild for yajl 2.0.1 + +* Tue Nov 8 2011 Daniel P. Berrange - 0.9.7-1 +- Update to 0.9.7 release + +* Tue Oct 11 2011 Dan Horák - 0.9.6-3 +- xenlight available only on Xen arches (#745020) + +* Mon Oct 3 2011 Laine Stump - 0.9.6-2 +- Make PCI multifunction support more manual - Bug 742836 +- F15 build still uses cgconfig - Bug 738725 + +* Thu Sep 22 2011 Daniel Veillard - 0.9.6-1 +- Fix the qemu reboot bug and a few others bug fixes + +* Tue Sep 20 2011 Daniel Veillard - 0.9.5-1 +- many snapshot improvements (Eric Blake) +- latency: Define new public API and structure (Osier Yang) +- USB2 and various USB improvements (Marc-André Lureau) +- storage: Add fs pool formatting (Osier Yang) +- Add public API for getting migration speed (Jim Fehlig) +- Add basic driver for Microsoft Hyper-V (Matthias Bolte) +- many improvements and bug fixes + +* Wed Aug 3 2011 Daniel Veillard - 0.9.4-1 +- network bandwidth QoS control +- Add new API virDomainBlockPull* +- save: new API to manipulate save file images +- CPU bandwidth limits support +- allow to send NMI and key event to guests +- new API virDomainUndefineFlags +- Implement code to attach to external QEMU instances +- bios: Add support for SGA +- various missing python binding +- many improvements and bug fixes + +* Sat Jul 30 2011 Dan Hor?k - 0.9.3-3 +- xenlight available only on Xen arches + +* Wed Jul 5 2011 Peter Robinson - 0.9.3-2 +- Add ARM to NUMA platform excludes + +* Mon Jul 4 2011 Daniel Veillard - 0.9.3-1 +- new API virDomainGetVcpupinInfo +- Add TXT record support for virtual DNS service +- Support reboots with the QEMU driver +- New API virDomainGetControlInfo API +- New API virNodeGetMemoryStats +- New API virNodeGetCPUTime +- New API for send-key +- New API virDomainPinVcpuFlags +- support multifunction PCI device +- lxc: various improvements +- many improvements and bug fixes + +* Wed Jun 29 2011 Richard W.M. Jones - 0.9.2-3 +- Rebuild because of libparted soname bump (libparted.so.0 -> libparted.so.1). + +* Tue Jun 21 2011 Laine Stump - 0.9.2-2 +- add rule to require netcf-0.1.8 during build so that new transactional + network change APIs are included. +- document that CVE-2011-2178 has been fixed (by virtue of rebase + to 0.9.2 - see https://bugzilla.redhat.com/show_bug.cgi?id=709777) + +* Mon Jun 6 2011 Daniel Veillard - 0.9.2-1 +- Framework for lock manager plugins +- API for network config change transactions +- flags for setting memory parameters +- virDomainGetState public API +- qemu: allow blkstat/blkinfo calls during migration +- Introduce migration v3 API +- Defining the Screenshot public API +- public API for NMI injection +- Various improvements and bug fixes + +* Wed May 25 2011 Richard W.M. Jones - 0.9.1-3 +- Add upstream patches: + 0001-json-Avoid-passing-large-positive-64-bit-integers-to.patch + 0001-qemudDomainMemoryPeek-change-ownership-selinux-label.patch + 0002-remote-remove-bogus-virDomainFree.patch + so that users can try out virt-dmesg. +- Change /var/cache mode to 0711. + +* Thu May 5 2011 Daniel Veillard - 0.9.1-1 +- support various persistent domain updates +- improvements on memory APIs +- Add virDomainEventRebootNew +- various improvements to libxl driver +- Spice: support audio, images and stream compression +- Various improvements and bug fixes + +* Thu Apr 7 2011 Daniel Veillard - 0.9.0-1 +- Support cputune cpu usage tuning +- Add public APIs for storage volume upload/download +- Add public API for setting migration speed on the fly +- Add libxenlight driver +- qemu: support migration to fd +- libvirt: add virDomain{Get,Set}BlkioParameters +- setmem: introduce a new libvirt API (virDomainSetMemoryFlags) +- Expose event loop implementation as a public API +- Dump the debug buffer to libvirtd.log on fatal signal +- Audit support +- Various improvements and bug fixes + +* Mon Mar 14 2011 Daniel Veillard - 0.8.8-3 +- fix a lack of API check on read-only connections +- CVE-2011-1146 + +* Mon Feb 21 2011 Daniel P. Berrange - 0.8.8-2 +- Fix kernel boot with latest QEMU + +* Thu Feb 17 2011 Daniel Veillard - 0.8.8-1 +- expose new API for sysinfo extraction +- cgroup blkio weight support +- smartcard device support +- qemu: Support per-device boot ordering +- Various improvements and bug fixes + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 6 2011 Daniel Veillard - 0.8.7-1 +- Preliminary support for VirtualBox 4.0 +- IPv6 support +- Add VMware Workstation and Player driver driver +- Add network disk support +- Various improvements and bug fixes +- from 0.8.6: +- Add support for iSCSI target auto-discovery +- QED: Basic support for QED images +- remote console support +- support for SPICE graphics +- sysinfo and VMBIOS support +- virsh qemu-monitor-command +- various improvements and bug fixes + +* Fri Oct 29 2010 Daniel Veillard - 0.8.5-1 +- Enable JSON and netdev features in QEMU >= 0.13 +- framework for auditing integration +- framework DTrace/SystemTap integration +- Setting the number of vcpu at boot +- Enable support for nested SVM +- Virtio plan9fs filesystem QEMU +- Memory parameter controls +- various improvements and bug fixes + +* Wed Sep 29 2010 jkeating - 0.8.4-3 +- Rebuilt for gcc bug 634757 + +* Thu Sep 16 2010 Dan Horák - 0.8.4-2 +- disable the nwfilterxml2xmltest also on s390(x) + +* Mon Sep 13 2010 Daniel Veillard - 0.8.4-1 +- Upstream release 0.8.4 + +* Mon Aug 23 2010 Daniel P. Berrange - 0.8.3-2 +- Fix potential overflow in boot menu code + +* Mon Aug 23 2010 Daniel P. Berrange - 0.8.3-1 +- Upstream release 0.8.3 + +* Wed Jul 21 2010 David Malcolm - 0.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Mon Jul 12 2010 Daniel P. Berrange - 0.8.2-2 +- CVE-2010-2237 ignoring defined main disk format when looking up disk backing stores +- CVE-2010-2238 ignoring defined disk backing store format when recursing into disk + image backing stores +- CVE-2010-2239 not setting user defined backing store format when creating new image +- CVE-2010-2242 libvirt: improperly mapped source privileged ports may allow for + obtaining privileged resources on the host + +* Mon Jul 5 2010 Daniel Veillard - 0.8.2-1 +- Upstream release 0.8.2 +- phyp: adding support for IVM +- libvirt: introduce domainCreateWithFlags API +- add 802.1Qbh and 802.1Qbg switches handling +- Support for VirtualBox version 3.2 +- Init script for handling guests on shutdown/boot +- qemu: live migration with non-shared storage for kvm + +* Fri Apr 30 2010 Daniel Veillard - 0.8.1-1 +- Upstream release 0.8.1 +- Starts dnsmasq from libvirtd with --dhcp-hostsfile +- Add virDomainGetBlockInfo API to query disk sizing +- a lot of bug fixes and cleanups + +* Mon Apr 12 2010 Daniel Veillard - 0.8.0-1 +- Upstream release 0.8.0 +- Snapshotting support (QEmu/VBox/ESX) +- Network filtering API +- XenAPI driver +- new APIs for domain events +- Libvirt managed save API +- timer subselection for domain clock +- synchronous hooks +- API to update guest CPU to host CPU +- virDomainUpdateDeviceFlags new API +- migrate max downtime API +- volume wiping API +- and many bug fixes + +* Tue Mar 30 2010 Richard W.M. Jones - 0.7.7-3.fc14 +- No change, just rebuild against new libparted with bumped soname. + +* Mon Mar 22 2010 Cole Robinson - 0.7.7-2.fc14 +- Fix USB devices by product with security enabled (bz 574136) +- Set kernel/initrd in security driver, fixes some URL installs (bz 566425) + +* Fri Mar 5 2010 Daniel Veillard - 0.7.7-1 +- macvtap support +- async job handling +- virtio channel +- computing baseline CPU +- virDomain{Attach,Detach}DeviceFlags +- assorted bug fixes and lots of cleanups + +* Tue Feb 16 2010 Adam Jackson 0.7.6-2 +- libvirt-0.7.6-add-needed.patch: Fix FTBFS from --no-add-needed +- Add BuildRequires: xmlrpc-c-client for libxmlrpc_client.so + +* Wed Feb 3 2010 Daniel Veillard - 0.7.6-1 +- upstream release of 0.7.6 +- Use QEmu new device adressing when possible +- Implement CPU topology support for QEMU driver +- Implement SCSI controller hotplug/unplug for QEMU +- Implement support for multi IQN +- a lot of fixes and improvements + +* Thu Jan 14 2010 Chris Weyl 0.7.5-3 +- bump for libssh2 rebuild + +* Tue Jan 12 2010 Daniel P. Berrange - 0.7.5-2 +- Rebuild for libparted soname change + +* Wed Dec 23 2009 Daniel Veillard - 0.7.5-1 +- Add new API virDomainMemoryStats +- Public API and domain extension for CPU flags +- vbox: Add support for version 3.1 +- Support QEMU's virtual FAT block device driver +- a lot of fixes + +* Fri Nov 20 2009 Daniel Veillard - 0.7.4-1 +- upstream release of 0.7.4 +- udev node device backend +- API to check object properties +- better QEmu monitor processing +- MAC address based port filtering for qemu +- support IPv6 and multiple addresses per interfaces +- a lot of fixes + +* Thu Nov 19 2009 Daniel P. Berrange - 0.7.2-6 +- Really fix restore file labelling this time + +* Wed Nov 11 2009 Daniel P. Berrange - 0.7.2-5 +- Disable numactl on s390[x]. Again. + +* Wed Nov 11 2009 Daniel P. Berrange - 0.7.2-4 +- Fix QEMU save/restore permissions / labelling + +* Thu Oct 29 2009 Mark McLoughlin - 0.7.2-3 +- Avoid compressing small log files (#531030) + +* Thu Oct 29 2009 Mark McLoughlin - 0.7.2-2 +- Make libvirt-devel require libvirt-client, not libvirt +- Fix qemu machine types handling + +* Wed Oct 14 2009 Daniel Veillard - 0.7.2-1 +- Upstream release of 0.7.2 +- Allow to define ESX domains +- Allows suspend and resulme of LXC domains +- API for data streams +- many bug fixes + +* Tue Oct 13 2009 Mark McLoughlin - 0.7.1-12 +- Fix restore of qemu guest using raw save format (#523158) + +* Fri Oct 9 2009 Mark McLoughlin - 0.7.1-11 +- Fix libvirtd memory leak during error reply sending (#528162) +- Add several PCI hot-unplug typo fixes from upstream + +* Tue Oct 6 2009 Mark McLoughlin - 0.7.1-10 +- Create /var/log/libvirt/{lxc,uml} dirs for logrotate +- Make libvirt-python dependon on libvirt-client +- Sync misc minor changes from upstream spec + +* Tue Oct 6 2009 Mark McLoughlin - 0.7.1-9 +- Change logrotate config to weekly (#526769) + +* Thu Oct 1 2009 Mark McLoughlin - 0.7.1-8 +- Disable sound backend, even when selinux is disabled (#524499) +- Re-label qcow2 backing files (#497131) + +* Wed Sep 30 2009 Mark McLoughlin - 0.7.1-7 +- Fix USB device passthrough (#522683) + +* Mon Sep 21 2009 Chris Weyl - 0.7.1-6 +- rebuild for libssh2 1.2 + +* Mon Sep 21 2009 Mark McLoughlin - 0.7.1-5 +- Don't set a bogus error in virDrvSupportsFeature() +- Fix raw save format + +* Thu Sep 17 2009 Mark McLoughlin - 0.7.1-4 +- A couple of hot-unplug memory handling fixes (#523953) + +* Thu Sep 17 2009 Daniel Veillard - 0.7.1-3 +- disable numactl on s390[x] + +* Thu Sep 17 2009 Daniel Veillard - 0.7.1-2 +- revamp of spec file for modularity and RHELs + +* Tue Sep 15 2009 Daniel Veillard - 0.7.1-1 +- Upstream release of 0.7.1 +- ESX, VBox driver updates +- mutipath support +- support for encrypted (qcow) volume +- compressed save image format for Qemu/KVM +- QEmu host PCI device hotplug support +- configuration of huge pages in guests +- a lot of fixes + +* Mon Sep 14 2009 Mark McLoughlin - 0.7.1-0.2.gitfac3f4c +- Update to newer snapshot of 0.7.1 +- Stop libvirt using untrusted 'info vcpus' PID data (#520864) +- Support relabelling of USB and PCI devices +- Enable multipath storage support +- Restart libvirtd upon RPM upgrade + +* Sun Sep 6 2009 Mark McLoughlin - 0.7.1-0.1.gitg3ef2e05 +- Update to pre-release git snapshot of 0.7.1 +- Drop upstreamed patches + +* Wed Aug 19 2009 Mark McLoughlin - 0.7.0-6 +- Fix migration completion with newer versions of qemu (#516187) + +* Wed Aug 19 2009 Mark McLoughlin - 0.7.0-5 +- Add PCI host device hotplug support +- Allow PCI bus reset to reset other devices (#499678) +- Fix stupid PCI reset error message (bug #499678) +- Allow PM reset on multi-function PCI devices (bug #515689) +- Re-attach PCI host devices after guest shuts down (bug #499561) +- Fix list corruption after disk hot-unplug +- Fix minor 'virsh nodedev-list --tree' annoyance + +* Thu Aug 13 2009 Daniel P. Berrange - 0.7.0-4 +- Rewrite policykit support (rhbz #499970) +- Log and ignore NUMA topology problems (rhbz #506590) + +* Mon Aug 10 2009 Mark McLoughlin - 0.7.0-3 +- Don't fail to start network if ipv6 modules is not loaded (#516497) + +* Thu Aug 6 2009 Mark McLoughlin - 0.7.0-2 +- Make sure qemu can access kernel/initrd (bug #516034) +- Set perms on /var/lib/libvirt/boot to 0711 (bug #516034) + +* Wed Aug 5 2009 Daniel Veillard - 0.7.0-1 +- ESX, VBox3, Power Hypervisor drivers +- new net filesystem glusterfs +- Storage cloning for LVM and Disk backends +- interface implementation based on netcf +- Support cgroups in QEMU driver +- QEmu hotplug NIC support +- a lot of fixes + +* Fri Jul 3 2009 Daniel Veillard - 0.6.5-1 +- release of 0.6.5 + +* Fri May 29 2009 Daniel Veillard - 0.6.4-1 +- release of 0.6.4 +- various new APIs + +* Fri Apr 24 2009 Daniel Veillard - 0.6.3-1 +- release of 0.6.3 +- VirtualBox driver + +* Fri Apr 3 2009 Daniel Veillard - 0.6.2-1 +- release of 0.6.2 + +* Fri Mar 4 2009 Daniel Veillard - 0.6.1-1 +- release of 0.6.1 + +* Sat Jan 31 2009 Daniel Veillard - 0.6.0-1 +- release of 0.6.0 + +* Tue Nov 25 2008 Daniel Veillard - 0.5.0-1 +- release of 0.5.0 + +* Tue Sep 23 2008 Daniel Veillard - 0.4.6-1 +- release of 0.4.6 + +* Mon Sep 8 2008 Daniel Veillard - 0.4.5-1 +- release of 0.4.5 + +* Wed Jun 25 2008 Daniel Veillard - 0.4.4-1 +- release of 0.4.4 +- mostly a few bug fixes from 0.4.3 + +* Thu Jun 12 2008 Daniel Veillard - 0.4.3-1 +- release of 0.4.3 +- lots of bug fixes and small improvements + +* Tue Apr 8 2008 Daniel Veillard - 0.4.2-1 +- release of 0.4.2 +- lots of bug fixes and small improvements + +* Mon Mar 3 2008 Daniel Veillard - 0.4.1-1 +- Release of 0.4.1 +- Storage APIs +- xenner support +- lots of assorted improvements, bugfixes and cleanups +- documentation and localization improvements + +* Tue Dec 18 2007 Daniel Veillard - 0.4.0-1 +- Release of 0.4.0 +- SASL based authentication +- PolicyKit authentication +- improved NUMA and statistics support +- lots of assorted improvements, bugfixes and cleanups +- documentation and localization improvements + +* Sun Sep 30 2007 Daniel Veillard - 0.3.3-1 +- Release of 0.3.3 +- Avahi support +- NUMA support +- lots of assorted improvements, bugfixes and cleanups +- documentation and localization improvements + +* Tue Aug 21 2007 Daniel Veillard - 0.3.2-1 +- Release of 0.3.2 +- API for domains migration +- APIs for collecting statistics on disks and interfaces +- lots of assorted bugfixes and cleanups +- documentation and localization improvements + +* Tue Jul 24 2007 Daniel Veillard - 0.3.1-1 +- Release of 0.3.1 +- localtime clock support +- PS/2 and USB input devices +- lots of assorted bugfixes and cleanups +- documentation and localization improvements + +* Mon Jul 9 2007 Daniel Veillard - 0.3.0-1 +- Release of 0.3.0 +- Secure remote access support +- unification of daemons +- lots of assorted bugfixes and cleanups +- documentation and localization improvements + +* Fri Jun 8 2007 Daniel Veillard - 0.2.3-1 +- Release of 0.2.3 +- lot of assorted bugfixes and cleanups +- support for Xen-3.1 +- new scheduler API + +* Tue Apr 17 2007 Daniel Veillard - 0.2.2-1 +- Release of 0.2.2 +- lot of assorted bugfixes and cleanups +- preparing for Xen-3.0.5 + +* Thu Mar 22 2007 Jeremy Katz - 0.2.1-2.fc7 +- don't require xen; we don't need the daemon and can control non-xen now +- fix scriptlet error (need to own more directories) +- update description text + +* Fri Mar 16 2007 Daniel Veillard - 0.2.1-1 +- Release of 0.2.1 +- lot of bug and portability fixes +- Add support for network autostart and init scripts +- New API to detect the virtualization capabilities of a host +- Documentation updates + +* Fri Feb 23 2007 Daniel P. Berrange - 0.2.0-4.fc7 +- Fix loading of guest & network configs + +* Fri Feb 16 2007 Daniel P. Berrange - 0.2.0-3.fc7 +- Disable kqemu support since its not in Fedora qemu binary +- Fix for -vnc arg syntax change in 0.9.0 QEMU + +* Thu Feb 15 2007 Daniel P. Berrange - 0.2.0-2.fc7 +- Fixed path to qemu daemon for autostart +- Fixed generation of block in XML +- Pre-create config directory at startup + +* Wed Feb 14 2007 Daniel Veillard 0.2.0-1.fc7 +- support for KVM and QEmu +- support for network configuration +- assorted fixes + +* Mon Jan 22 2007 Daniel Veillard 0.1.11-1.fc7 +- finish inactive Xen domains support +- memory leak fix +- RelaxNG schemas for XML configs + +* Wed Dec 20 2006 Daniel Veillard 0.1.10-1.fc7 +- support for inactive Xen domains +- improved support for Xen display and vnc +- a few bug fixes +- localization updates + +* Thu Dec 7 2006 Jeremy Katz - 0.1.9-2 +- rebuild against python 2.5 + +* Wed Nov 29 2006 Daniel Veillard 0.1.9-1 +- better error reporting +- python bindings fixes and extensions +- add support for shareable drives +- add support for non-bridge style networking +- hot plug device support +- added support for inactive domains +- API to dump core of domains +- various bug fixes, cleanups and improvements +- updated the localization + +* Tue Nov 7 2006 Daniel Veillard 0.1.8-3 +- it's pkgconfig not pgkconfig ! + +* Mon Nov 6 2006 Daniel Veillard 0.1.8-2 +- fixing spec file, added %dist, -devel requires pkgconfig and xen-devel +- Resolves: rhbz#202320 + +* Mon Oct 16 2006 Daniel Veillard 0.1.8-1 +- fix missing page size detection code for ia64 +- fix mlock size when getting domain info list from hypervisor +- vcpu number initialization +- don't label crashed domains as shut off +- fix virsh man page +- blktapdd support for alternate drivers like blktap +- memory leak fixes (xend interface and XML parsing) +- compile fix +- mlock/munlock size fixes + +* Fri Sep 22 2006 Daniel Veillard 0.1.7-1 +- Fix bug when running against xen-3.0.3 hypercalls +- Fix memory bug when getting vcpus info from xend + +* Fri Sep 22 2006 Daniel Veillard 0.1.6-1 +- Support for localization +- Support for new Xen-3.0.3 cdrom and disk configuration +- Support for setting VNC port +- Fix bug when running against xen-3.0.2 hypercalls +- Fix reconnection problem when talking directly to http xend + +* Tue Sep 5 2006 Jeremy Katz - 0.1.5-3 +- patch from danpb to support new-format cd devices for HVM guests + +* Tue Sep 5 2006 Daniel Veillard 0.1.5-2 +- reactivating ia64 support + +* Tue Sep 5 2006 Daniel Veillard 0.1.5-1 +- new release +- bug fixes +- support for new hypervisor calls +- early code for config files and defined domains + +* Mon Sep 4 2006 Daniel Berrange - 0.1.4-5 +- add patch to address dom0_ops API breakage in Xen 3.0.3 tree + +* Mon Aug 28 2006 Jeremy Katz - 0.1.4-4 +- add patch to support paravirt framebuffer in Xen + +* Mon Aug 21 2006 Daniel Veillard 0.1.4-3 +- another patch to fix network handling in non-HVM guests + +* Thu Aug 17 2006 Daniel Veillard 0.1.4-2 +- patch to fix virParseUUID() + +* Wed Aug 16 2006 Daniel Veillard 0.1.4-1 +- vCPUs and affinity support +- more complete XML, console and boot options +- specific features support +- enforced read-only connections +- various improvements, bug fixes + +* Wed Aug 2 2006 Jeremy Katz - 0.1.3-6 +- add patch from pvetere to allow getting uuid from libvirt + +* Wed Aug 2 2006 Jeremy Katz - 0.1.3-5 +- build on ia64 now + +* Thu Jul 27 2006 Jeremy Katz - 0.1.3-4 +- don't BR xen, we just need xen-devel + +* Thu Jul 27 2006 Daniel Veillard 0.1.3-3 +- need rebuild since libxenstore is now versionned + +* Mon Jul 24 2006 Mark McLoughlin - 0.1.3-2 +- Add BuildRequires: xen-devel + +* Wed Jul 12 2006 Jesse Keating - 0.1.3-1.1 +- rebuild + +* Tue Jul 11 2006 Daniel Veillard 0.1.3-1 +- support for HVM Xen guests +- various bugfixes + +* Mon Jul 3 2006 Daniel Veillard 0.1.2-1 +- added a proxy mechanism for read only access using httpu +- fixed header includes paths + +* Wed Jun 21 2006 Daniel Veillard 0.1.1-1 +- extend and cleanup the driver infrastructure and code +- python examples +- extend uuid support +- bug fixes, buffer handling cleanups +- support for new Xen hypervisor API +- test driver for unit testing +- virsh --conect argument + +* Mon Apr 10 2006 Daniel Veillard 0.1.0-1 +- various fixes +- new APIs: for Node information and Reboot +- virsh improvements and extensions +- documentation updates and man page +- enhancement and fixes of the XML description format + +* Tue Feb 28 2006 Daniel Veillard 0.0.6-1 +- added error handling APIs +- small bug fixes +- improve python bindings +- augment documentation and regression tests + +* Thu Feb 23 2006 Daniel Veillard 0.0.5-1 +- new domain creation API +- new UUID based APIs +- more tests, documentation, devhelp +- bug fixes + +* Fri Feb 10 2006 Daniel Veillard 0.0.4-1 +- fixes some problems in 0.0.3 due to the change of names + +* Wed Feb 8 2006 Daniel Veillard 0.0.3-1 +- changed library name to libvirt from libvir, complete and test the python + bindings + +* Sun Jan 29 2006 Daniel Veillard 0.0.2-1 +- upstream release of 0.0.2, use xend, save and restore added, python bindings + fixed + +* Wed Nov 2 2005 Daniel Veillard 0.0.1-1 +- created diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec new file mode 100644 index 00000000..545801c2 --- /dev/null +++ b/SPECS/ocaml-libvirt.spec @@ -0,0 +1,152 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +# Select what subpackages to build. +%define build_mlvirsh 0 + +Name: ocaml-libvirt +Version: 0.6.1.2 +Release: 1%{?dist}%{?extra_release} +Summary: OCaml binding for libvirt + +Group: Development/Libraries +License: LGPLv2+ +URL: http://libvirt.org/ocaml/ +Source0: http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz +Patch0: ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a +Patch1: ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 +Patch2: ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf +Patch3: ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 +Patch4: ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 +Patch5: ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 +Patch6: ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 +Patch7: ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d +Patch8: ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 +Patch9: ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 +Patch10: ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d +Patch11: ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 +Patch12: ocaml-libvirt-13-fixbuild + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib-devel + +BuildRequires: libvirt-devel >= 0.2.1 +BuildRequires: perl +BuildRequires: gawk + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + +%description +OCaml binding for libvirt. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%if %build_mlvirsh +%package -n mlvirsh +Summary: OCaml virsh utility +Group: Applications/Emulators +License: GPLv2+ + + +%description -n mlvirsh +OCaml virtualization shell. +%endif + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 + +%build +CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix} +make all doc +%if %opt +make opt +strip libvirt/dllmllibvirt.so +%endif + + +%install +# These rules work if the library uses 'ocamlfind install' to install itself. +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +mkdir -p $RPM_BUILD_ROOT%{_bindir} +%if %opt +make install-opt +%else +make install-byte +%endif + +%if !%build_mlvirsh +rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING.LIB README ChangeLog +%{_libdir}/ocaml/libvirt +%if %opt +%exclude %{_libdir}/ocaml/libvirt/*.a +%exclude %{_libdir}/ocaml/libvirt/*.cmxa +%exclude %{_libdir}/ocaml/libvirt/*.cmx +%endif +%exclude %{_libdir}/ocaml/libvirt/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + + +%files devel +%defattr(-,root,root,-) +%doc COPYING.LIB README TODO.libvirt ChangeLog html/* +%if %opt +%{_libdir}/ocaml/libvirt/*.a +%{_libdir}/ocaml/libvirt/*.cmxa +%{_libdir}/ocaml/libvirt/*.cmx +%endif +%{_libdir}/ocaml/libvirt/*.mli + + +%if %build_mlvirsh +%files -n mlvirsh +%defattr(-,root,root,-) +%doc COPYING README ChangeLog +%{_bindir}/mlvirsh +%endif + + +%changelog diff --git a/sources.csv b/sources.csv index dd30f90b..09bf5ef8 100644 --- a/sources.csv +++ b/sources.csv @@ -47,7 +47,7 @@ xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1. stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz -libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, +ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, @@ -61,3 +61,4 @@ zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.4.tar.gz,xenserver-install-wizard-0.2.4.tar.gz +libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, From 6e750ffd2f448ce5d6d0b71774c330da106a70f1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 10 Jun 2013 17:06:55 +0000 Subject: [PATCH 0182/1125] Rename libvirt patch for better hygene --- ...ibvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch} | 0 SPECS/libvirt.spec | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename SOURCES/{0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch => libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch} (100%) diff --git a/SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch b/SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch similarity index 100% rename from SOURCES/0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch rename to SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index e7282fc0..7d957104 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -344,7 +344,7 @@ Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz # Fix qemu -> qemu-system-i386 (bz #857026). # keep: This patch is Fedora-specific and not upstream. -Patch1: 0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch +Patch1: libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch # Cleanly save session VMs on logout/shutdown (bz #872254) # keep: Fixed upstream, but using patches not suitable for stable Patch2: libvirt-dbus.patch From 39949e4bd7ef5a8b9822ef812a576a73b78f9ca8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 15:04:17 +0000 Subject: [PATCH 0183/1125] Add and build xe-create-templates --- SPECS/xe-create-templates.spec | 43 ++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 44 insertions(+) create mode 100644 SPECS/xe-create-templates.spec diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec new file mode 100644 index 00000000..0545848b --- /dev/null +++ b/SPECS/xe-create-templates.spec @@ -0,0 +1,43 @@ +Name: xe-create-templates +Version: 0.9.0 +Release: 0 +Summary: Creates default XenServer templates +License: LGPL +Group: Development/Other +URL: https://github.com/djs55/xcp-guest-templates/0.9.0.tar.gz +Source0: xe-create-templates-0.9.0.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xen-api-client-devel +BuildRequires: openssl-devel +Requires: openssl + +%description +A utility to create the default XenServer templates. + +%prep +%setup -q -n xcp-guest-templates-%{version} + +%build +obuild configure +obuild build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +install -m 0755 dist/build/xe-create-templates/xe-create-templates %{buildroot}/%{_bindir}/ + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md +%{_bindir}/xe-create-templates + +%changelog +* Wed Jun 12 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 09bf5ef8..ed3acc3a 100644 --- a/sources.csv +++ b/sources.csv @@ -62,3 +62,4 @@ lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2 utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.4.tar.gz,xenserver-install-wizard-0.2.4.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, +xe-create-templates.spec,https://github.com/djs55/xcp-guest-templates/archive/0.9.0.tar.gz,xe-create-templates-0.9.0.tar.gz From 3a84a207da48db5da855f59c482b11385c93c9d0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 15:06:21 +0000 Subject: [PATCH 0184/1125] Add xe-create-tempates as a dependency of xenserver --- SPECS/xenserver.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 6ac84c67..ae491d1f 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 4 +Release: 5 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -8,7 +8,7 @@ URL: http://www.xen.org/ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xenserver-install-wizard -Requires: xapi xapi-xe xapi-python-devel +Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator xenops-cli Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd From 71efd649603a2947a88b7efe5d47f492f85fd407 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 21:24:03 +0000 Subject: [PATCH 0185/1125] Update message switch to 0.9.4 --- SPECS/message-switch.spec | 6 +++--- sources.csv | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 6ac4c672..822863b7 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,11 +1,11 @@ Name: message-switch -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xen-org/message-switch/archive/message-switch-0.9.3.tar.gz -Source0: message-switch-0.9.3.tar.gz +URL: https://github.com/xen-org/message-switch/archive/message-switch-%{version}.tar.gz +Source0: message-switch-%{version}.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/sources.csv b/sources.csv index ed3acc3a..fbce1cde 100644 --- a/sources.csv +++ b/sources.csv @@ -7,7 +7,7 @@ cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1 ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.3.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.4.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz From dca0288cdf1332d73f30152821587d8b4c8c685f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 21:44:52 +0000 Subject: [PATCH 0186/1125] Update xenserver-install-wizard --- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index d3826bf4..feda2692 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.4 +Version: 0.2.5 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index fbce1cde..5f4fcebc 100644 --- a/sources.csv +++ b/sources.csv @@ -60,6 +60,6 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.4.tar.gz,xenserver-install-wizard-0.2.4.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.5.tar.gz,xenserver-install-wizard-0.2.5.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/djs55/xcp-guest-templates/archive/0.9.0.tar.gz,xe-create-templates-0.9.0.tar.gz From 93bdb2e4ce9eb85005ce2ec7fe2ca8bd9a9badb0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 21:45:05 +0000 Subject: [PATCH 0187/1125] fusion-release nolonger needs xen-c6: xen and kernel are now in xapi repo --- SPECS/fusion-release.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SPECS/fusion-release.spec b/SPECS/fusion-release.spec index 704007b9..eabc2035 100644 --- a/SPECS/fusion-release.spec +++ b/SPECS/fusion-release.spec @@ -1,6 +1,6 @@ Name: fusion-release Version: 0.1.0 -Release: 0 +Release: 1 Summary: Yum repositories for xenserver License: GPL Group: Development/Other @@ -26,8 +26,8 @@ A virtual package which installs the xenserver yum repos. %install mkdir -p %{buildroot}/etc/yum.repos.d install -m 0644 %{_sourcedir}/fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo -install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo -install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo +#install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo +#install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo install -m 0644 %{_sourcedir}/fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo @@ -47,8 +47,8 @@ yum repolist %files %defattr(-,root,root) /etc/yum.repos.d/xapi.repo -/etc/yum.repos.d/xen-c6.repo -/etc/yum.repos.d/xen-c6-RC1.repo +#/etc/yum.repos.d/xen-c6.repo +#/etc/yum.repos.d/xen-c6-RC1.repo /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/remi.repo From f96df800ce7e9afb508820da0340630e875d9269 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 12 Jun 2013 21:53:54 +0000 Subject: [PATCH 0188/1125] xenserver-install-wizard 0.2.6 --- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index feda2692..d40f4abe 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.5 +Version: 0.2.6 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index 5f4fcebc..095d8f6d 100644 --- a/sources.csv +++ b/sources.csv @@ -60,6 +60,6 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.5.tar.gz,xenserver-install-wizard-0.2.5.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.6.tar.gz,xenserver-install-wizard-0.2.6.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/djs55/xcp-guest-templates/archive/0.9.0.tar.gz,xe-create-templates-0.9.0.tar.gz From 82bfe5f67665b76aeea067404b4b32defea9ccf8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jun 2013 20:21:26 +0000 Subject: [PATCH 0189/1125] Update to message-switch-0.9.7 --- SPECS/message-switch.spec | 4 ++-- sources.csv | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 822863b7..f03e8696 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,5 +1,5 @@ Name: message-switch -Version: 0.9.4 +Version: 0.9.7 Release: 0 Summary: A store and forward message switch License: FreeBSD @@ -46,7 +46,7 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install mkdir -p %{buildroot}/%{_sbindir} -install switch.native %{buildroot}/%{_sbindir}/message-switch +install switch_main.native %{buildroot}/%{_sbindir}/message-switch install main.native %{buildroot}/%{_sbindir}/message-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch diff --git a/sources.csv b/sources.csv index 095d8f6d..cded4aba 100644 --- a/sources.csv +++ b/sources.csv @@ -7,7 +7,7 @@ cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1 ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.4.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.7.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz From 65fc3196f4bbd46aa43143b4316437c06574ff81 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 17 Jun 2013 09:13:46 +0000 Subject: [PATCH 0190/1125] A bunch of updates --- SPECS/ffs.spec | 8 ++++---- SPECS/xe-create-templates.spec | 6 +++--- SPECS/xen-api-client.spec | 2 +- sources.csv | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 8bd36579..561aa470 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,11 +1,11 @@ Name: ffs -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz -Source0: ffs-0.9.0.tar.gz +URL: https://github.com/xen-org/ffs/archive/ffs-%{version}.tar.gz +Source0: ffs-%{version}.tar.gz Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 0545848b..e9186452 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -1,11 +1,11 @@ Name: xe-create-templates -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: Creates default XenServer templates License: LGPL Group: Development/Other -URL: https://github.com/djs55/xcp-guest-templates/0.9.0.tar.gz -Source0: xe-create-templates-0.9.0.tar.gz +URL: https://github.com/djs55/xcp-guest-templates/%{version}.tar.gz +Source0: xe-create-templates-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel diff --git a/SPECS/xen-api-client.spec b/SPECS/xen-api-client.spec index 6f9105df..18d923c3 100644 --- a/SPECS/xen-api-client.spec +++ b/SPECS/xen-api-client.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-api-client -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 diff --git a/sources.csv b/sources.csv index cded4aba..22300819 100644 --- a/sources.csv +++ b/sources.csv @@ -4,7 +4,7 @@ cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.0.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.1.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.7.tar.gz, @@ -23,7 +23,7 @@ uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.2.tar.gz, -xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.3.tar.gz,xen-api-client-0.9.3.tar.gz +xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, @@ -62,4 +62,4 @@ lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2 utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.6.tar.gz,xenserver-install-wizard-0.2.6.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, -xe-create-templates.spec,https://github.com/djs55/xcp-guest-templates/archive/0.9.0.tar.gz,xe-create-templates-0.9.0.tar.gz +xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz From 971f08daca82d56c461ad66e87b9ba76043730ac Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 17 Jun 2013 13:04:15 +0000 Subject: [PATCH 0191/1125] Update ffs to 0.9.2 Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 561aa470..a7a27fcd 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/sources.csv b/sources.csv index 22300819..fd988706 100644 --- a/sources.csv +++ b/sources.csv @@ -4,7 +4,7 @@ cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.1.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.2.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.7.tar.gz, From 50bdba6b61d5e1879e6160f9ad962cb34f23eb52 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 17 Jun 2013 13:04:28 +0000 Subject: [PATCH 0192/1125] Update xenserver install wizard to 0.2.7 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index d40f4abe..4c4d601a 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.6 +Version: 0.2.7 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index fd988706..80a071a7 100644 --- a/sources.csv +++ b/sources.csv @@ -60,6 +60,6 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.6.tar.gz,xenserver-install-wizard-0.2.6.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.7.tar.gz,xenserver-install-wizard-0.2.7.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz From cb4f167db33bce509af2d428bc6261f953ba8997 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 17 Jun 2013 21:40:25 +0000 Subject: [PATCH 0193/1125] Another bunch of updates. --- SPECS/ffs.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xenopsd.spec | 8 ++++---- sources.csv | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index a7a27fcd..80b51885 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index f03e8696..845f3bf7 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,5 +1,5 @@ Name: message-switch -Version: 0.9.7 +Version: 0.10.0 Release: 0 Summary: A store and forward message switch License: FreeBSD diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 7a1e55be..54a920b6 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.4 +Version: 1.9.5 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index bd66dfa4..ed0b2a93 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,11 +1,11 @@ Name: xenopsd -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenopsd/archive/xenopsd-0.9.2.tar.gz -Source0: xenopsd-0.9.2.tar.gz +URL: https://github.com/xen-org/xenopsd/archive/xenopsd-%{version}.tar.gz +Source0: xenopsd-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init @@ -19,7 +19,7 @@ BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexec-devel BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel -BuildRequires: xen-devel +BuildRequires: xen-devel ocaml-xcp-inventory-devel Requires: message-switch xenops-cli %description diff --git a/sources.csv b/sources.csv index 80a071a7..d5d5f4c9 100644 --- a/sources.csv +++ b/sources.csv @@ -4,10 +4,10 @@ cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.2.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.3.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.9.7.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz @@ -48,14 +48,14 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.2.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.3.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.4.tar.gz,xen-api-1.9.4.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.5.tar.gz,xen-api-1.9.5.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From bee9131e487f9e89e1a106de080f35c21165609a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 18 Jun 2013 09:24:03 +0000 Subject: [PATCH 0194/1125] Updates required to add xcp-rrdd 0.9.0. Signed-off-by: David Scott --- SOURCES/xcp-rrdd-init | 90 ++++++++++++++++++++++++++++++++++++ SOURCES/xen-api-init | 2 +- SPECS/xcp-rrdd.spec | 56 ++++++++++++++++++++++ SPECS/xen-lowlevel-libs.spec | 9 ++-- SPECS/xenops.spec | 51 ++++++++++++++++++++ sources.csv | 4 +- 6 files changed, 207 insertions(+), 5 deletions(-) create mode 100755 SOURCES/xcp-rrdd-init create mode 100644 SPECS/xcp-rrdd.spec create mode 100644 SPECS/xenops.spec diff --git a/SOURCES/xcp-rrdd-init b/SOURCES/xcp-rrdd-init new file mode 100755 index 00000000..67864349 --- /dev/null +++ b/SOURCES/xcp-rrdd-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xcp-rrdd Startup script for statistics gathering service +# +# chkconfig: 2345 13 88 +# description: Manages VM and Host statistics: sampling and archiving. +### BEGIN INIT INFO +# Provides: xcp-rrdd +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Statistics gathering service +# Description: Samples and archives statistics for VMs and Hosts. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xcp-rrdd.pid + +prog=xcp-rrdd +exec=/usr/sbin/xcp-rrdd +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xcp-rrdd: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_RRDD_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xcp-rrdd: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index bd81088a..8f0c2a53 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -6,7 +6,7 @@ # description: Manages VMs and resource pools ### BEGIN INIT INFO # Provides: xapi -# Required-Start: $local_fs $network $syslog message-switch +# Required-Start: $local_fs $network $syslog xcp-rrdd message-switch # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec new file mode 100644 index 00000000..e85f8ba6 --- /dev/null +++ b/SPECS/xcp-rrdd.spec @@ -0,0 +1,56 @@ +Name: xcp-rrdd +Version: 0.9.0 +Release: 0 +Summary: Statistics gathering daemon for the xapi toolstack +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xcp-rrdd/archive/%{version}.tar.gz +Source0: xcp-rrdd-%{version}.tar.gz +Source1: xcp-rrdd-init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-re-devel ocaml-cohttp-devel ocaml-xcp-inventory-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xenops-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: xen-devel + +%description +Statistics gathering daemon for the xapi toolstack. + +%prep +%setup -q -n xcp-rrdd-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 %{_sourcedir}/xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.markdown LICENSE +%{_sbindir}/xcp-rrdd +%{_sysconfdir}/init.d/xcp-rrdd + +%post +/sbin/chkconfig --add xcp-rrdd + +%preun +if [ $1 -eq 0 ]; then + /sbin/service xcp-rrdd stop > /dev/null 2>&1 + /sbin/chkconfig --del xcp-rrdd +fi + +%changelog +* Tue Jun 18 2013 David Scott +- Initial package + diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 660bb0a6..130ab75b 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -1,10 +1,10 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz +URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel xen-devel @@ -47,6 +47,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner %changelog +* Tue Jun 18 2013 David Scott +- Update to 0.9.1 + * Mon Jun 3 2013 David Scott - Initial package diff --git a/SPECS/xenops.spec b/SPECS/xenops.spec new file mode 100644 index 00000000..4b6f91ed --- /dev/null +++ b/SPECS/xenops.spec @@ -0,0 +1,51 @@ +Name: ocaml-xenops +Version: 0.9.0 +Release: 0 +Summary: Low-level xen control operations OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xenops/archive/xenops-%{version}.tar.gz +Source0: ocaml-xenops-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +Requires: ocaml ocaml-findlib + +%description +Low-level xen control operations in OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n xenops-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +make install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md ChangeLog MAINTAINERS +%{_libdir}/ocaml/xenops/* + +%changelog +* Tue Jun 18 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index d5d5f4c9..b20d2e92 100644 --- a/sources.csv +++ b/sources.csv @@ -45,7 +45,7 @@ js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.0.tar.gz, +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.1.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.3.tar.gz, @@ -63,3 +63,5 @@ utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.7.tar.gz,xenserver-install-wizard-0.2.7.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz +xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz +xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz From 78e737cf9f6ba3346e03bec0e8db81d903c58758 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 18 Jun 2013 09:41:59 +0000 Subject: [PATCH 0195/1125] Add xcp-rrdd as a dependency of xenserver. Signed-off-by: David Scott --- SPECS/xenserver.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index ae491d1f..f8ed2e4d 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 5 +Release: 6 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -12,6 +12,7 @@ Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator xenops-cli Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd +Requires: xcp-rrdd Requires: squeezed Requires: kernel >= 3.4.46 kernel-firmware Requires: xen @@ -35,6 +36,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Tue Jun 18 2013 David Scott +- add a dependency on xcp-rrdd + * Sat Jun 8 2013 David Scott - add a xenserver-install-wizard - add dependency on xapi-python-devel for use by the install wizard From 41e3de8a0ec35eb2c57befd1a6e95ae5e267759a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 18 Jun 2013 09:54:35 +0000 Subject: [PATCH 0196/1125] Update to ffs 0.9.4 Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- sources.csv | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 80b51885..6f412b7d 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -48,6 +48,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Jun 18 2013 David Scott +- Update to 0.9.4 + * Thu May 30 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index b20d2e92..dd49dfee 100644 --- a/sources.csv +++ b/sources.csv @@ -4,7 +4,7 @@ cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.3.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.4.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0.tar.gz, From 9e71d4e8c62a675ab977f05b046978ba9b0251a2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 18 Jun 2013 12:43:35 +0000 Subject: [PATCH 0197/1125] Update xapi to 1.9.6 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- sources.csv | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 54a920b6..1c421881 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.5 +Version: 1.9.6 Release: 0 Group: System/Hypervisor License: LGPL+linking exception @@ -139,6 +139,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Tue Jun 18 2013 David Scott +- Update to 1.9.6 + * Sun Jun 8 2013 David Scott - Add python-devel for writing python clients diff --git a/sources.csv b/sources.csv index dd49dfee..db432177 100644 --- a/sources.csv +++ b/sources.csv @@ -55,7 +55,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.5.tar.gz,xen-api-1.9.5.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.6.tar.gz,xen-api-1.9.6.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From f0cfff2abf3019be1d097c9be8e2ca225777ac2b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 18 Jun 2013 21:30:29 +0000 Subject: [PATCH 0198/1125] Update to xapi 1.9.7 --- SPECS/xapi.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1c421881..58f07bf6 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.6 +Version: 1.9.7 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index db432177..9b9f9566 100644 --- a/sources.csv +++ b/sources.csv @@ -55,7 +55,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.6.tar.gz,xen-api-1.9.6.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.7.tar.gz,xen-api-1.9.7.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From 9fc03083b932059ca24dfb8429a2caffa8f694f8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 19 Jun 2013 17:16:08 +0000 Subject: [PATCH 0199/1125] Another stack of updates. --- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- SPECS/xenops-cli.spec | 6 +++--- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 58f07bf6..d0ffdbc9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.7 +Version: 1.9.8 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 1377c943..04f725b1 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 548cf8e4..6081c293 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -1,11 +1,11 @@ Name: xenops-cli -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz -Source0: xenops-cli-0.9.0.tar.gz +URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-%{version}.tar.gz +Source0: xenops-cli-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index ed0b2a93..b629057c 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 4c4d601a..715e618b 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.7 +Version: 0.2.8 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index 9b9f9566..2f4d63d3 100644 --- a/sources.csv +++ b/sources.csv @@ -22,9 +22,9 @@ uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.2.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.3.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz -xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.0.tar.gz, +xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, fd-send-recv.spec,https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, @@ -48,19 +48,19 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.1.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.3.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.4.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.7.tar.gz,xen-api-1.9.7.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.8.tar.gz,xen-api-1.9.8.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.7.tar.gz,xenserver-install-wizard-0.2.7.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.8.tar.gz,xenserver-install-wizard-0.2.8.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz From 543c0ba76c7dba3ff0ae0d13a478544db25e1c44 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 19 Jun 2013 19:23:10 +0000 Subject: [PATCH 0200/1125] Add xsiostat 0.2.0 --- SPECS/xsiostat.spec | 36 ++++++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 37 insertions(+) create mode 100644 SPECS/xsiostat.spec diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec new file mode 100644 index 00000000..30f33c43 --- /dev/null +++ b/SPECS/xsiostat.spec @@ -0,0 +1,36 @@ +Name: xsiostat +Version: 0.2.0 +Release: 0 +Summary: XenServer IO stat thingy +License: LGPL +Group: Development/Other +URL: https://github.com/xen-org/xsiostat/archive/xsiostat-%{version}.tar.gz +Source0: xsiostat-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} + +%description +Simple XenServer IO stat thingy + +%prep +%setup -q -n xsiostat-%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sbindir} +install -m 0755 xsiostat %{buildroot}/%{_sbindir}/xsiostat + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc README.md LICENSE MAINTAINERS +%{_sbindir}/xsiostat + +%changelog +* Tue Jun 19 2013 David Scott +- Initial package + diff --git a/sources.csv b/sources.csv index 2f4d63d3..490671dc 100644 --- a/sources.csv +++ b/sources.csv @@ -65,3 +65,4 @@ libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz +xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz From a0760d788f389e35ac89bb94b3e4a87d23058b0f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 19 Jun 2013 21:21:57 +0000 Subject: [PATCH 0201/1125] Update wizard to 0.2.9 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 715e618b..ab5e0530 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.8 +Version: 0.2.9 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index 490671dc..1c269985 100644 --- a/sources.csv +++ b/sources.csv @@ -60,7 +60,7 @@ camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.8.tar.gz,xenserver-install-wizard-0.2.8.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.9.tar.gz,xenserver-install-wizard-0.2.9.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz From 390da8a5371e836824c013fdd4d3e0a88ebcd5c7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 21 Jun 2013 10:13:25 +0000 Subject: [PATCH 0202/1125] Update xen-lowlevel-libs to include libxl Signed-off-by: David Scott --- SPECS/xen-lowlevel-libs.spec | 13 +++++++++++-- sources.csv | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 130ab75b..1dbc9d85 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Xen hypercall bindings for OCaml License: LGPL @@ -7,7 +7,8 @@ Group: Development/Other URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel xen-devel +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc +BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel Requires: ocaml ocaml-findlib %description @@ -43,10 +44,18 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md %{_libdir}/ocaml/xenctrl/* +%{_libdir}/ocaml/xenlight/* %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so +%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so +%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner %changelog +* Fri Jun 21 2013 David Scott +- Update to 0.9.2 + * Tue Jun 18 2013 David Scott - Update to 0.9.1 diff --git a/sources.csv b/sources.csv index 1c269985..69cdfeab 100644 --- a/sources.csv +++ b/sources.csv @@ -45,7 +45,7 @@ js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.1.tar.gz, +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.2.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.4.tar.gz, From 093268bb6998d9ca41ef0b82d627bca6f9b9336a Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 21 Jun 2013 13:49:20 +0000 Subject: [PATCH 0203/1125] Package up Rob Hoes' experimental xenopsd using libxenlight --- SPECS/xen-lowlevel-libs.spec | 2 +- SPECS/xenopsd.spec | 34 +++++++++++++++++++++++++++++++--- sources.csv | 4 ++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 1dbc9d85..8fd381f8 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Xen hypercall bindings for OCaml License: LGPL diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index b629057c..fb98ccbf 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.4 +Version: 0.9.5 Release: 0 Summary: Simple VM manager License: LGPL @@ -9,8 +9,9 @@ Source0: xenopsd-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init -Source4: xenopsd-conf -Source5: xenopsd-network-conf +Source4: xenopsd-xenlight-init +Source5: xenopsd-conf +Source6: xenopsd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel @@ -52,6 +53,14 @@ Requires: %{name} = %{version}-%{release} %description simulator A synthetic VM manager for testing. +%package xenlight +Summary: %{name} using libxenlight +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description xenlight +Simple VM manager for Xen using libxenlight + %prep %setup -q -n %{name}-%{name}-%{version} @@ -66,6 +75,7 @@ mkdir -p %{buildroot}/%{_sbindir} install -D dist/build/xenopsd_libvirt/xenopsd_libvirt %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D dist/build/xenopsd/xenopsd %{buildroot}/%{_sbindir}/xenopsd-xc install -D dist/build/xenopsd_simulator/xenopsd_simulator %{buildroot}/%{_sbindir}/xenopsd-simulator +install -D dist/build/xenopsd_xenlight/xenopsd_xenlight %{buildroot}/%{_sbindir}/xenopsd-xenlight mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D dist/build/xenguest/xenguest %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif @@ -79,6 +89,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 %{_sourcedir}/xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator +install -m 0755 %{_sourcedir}/xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight mkdir -p %{buildroot}/etc/xapi install -m 0644 %{_sourcedir}/xenopsd-conf %{buildroot}/etc/xenopsd.conf install -m 0644 %{_sourcedir}/xenopsd-network-conf %{buildroot}/etc/xapi/network.conf @@ -143,7 +154,24 @@ if [ $1 -eq 0 ]; then /sbin/chkconfig --del xenopsd-simulator fi +%files xenlight +%defattr(-,root,root) +%{_sbindir}/xenopsd-xenlight +%{_sysconfdir}/init.d/xenopsd-xenlight + +%post xenlight +/sbin/chkconfig --add xenopsd-xenlight + +%preun xenlight +if [ $1 -eq 0 ]; then + /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 + /sbin/chkconfig --del xenopsd-xenlight +fi + %changelog +* Fri Jun 21 2013 David Scott +- Update to 0.9.5, which includes xenopsd-xenlight + * Thu May 30 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index 69cdfeab..ed184812 100644 --- a/sources.csv +++ b/sources.csv @@ -45,10 +45,10 @@ js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.2.tar.gz, +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.3.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.4.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.5.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, From 1c61c00b6a679c36e3994286bac626ee853e376c Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 21 Jun 2013 14:07:33 +0000 Subject: [PATCH 0204/1125] Add missing file needed for xenopsd-xenlight --- SOURCES/xenopsd-xenlight-init | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 SOURCES/xenopsd-xenlight-init diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init new file mode 100755 index 00000000..4bf56f07 --- /dev/null +++ b/SOURCES/xenopsd-xenlight-init @@ -0,0 +1,90 @@ +#!/bin/bash +# +# xenopsd-xenlight Startup script for xenopsd-xenlight service +# +# chkconfig: 2345 13 88 +# description: Manages VMs via libxl +### BEGIN INIT INFO +# Provides: xenopsd-xenlight +# Required-Start: $local_fs $network $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manages VMs via libxl +# Description: Manages VMs via libxl +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PIDFILE=/var/run/xenopsd-xenlight.pid + +prog=xenopsd-xenlight +exec=/usr/sbin/xenopsd-xenlight +lockfile=/var/lock/subsys/$prog + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xenopsd-xenlight: " + daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XENLIGHT_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xenopsd-xenlight: " + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status -p "$PIDFILE" -l $prog $exec +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? From 463339e44dc8ab7f77b78deca574ad8f7004491f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 21 Jun 2013 14:56:53 +0000 Subject: [PATCH 0205/1125] Include xenopsd-xenlight, make xapi expect it to be there. Signed-off-by: David Scott --- SOURCES/xenopsd-xenlight-init | 2 +- SPECS/xapi.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver.spec | 8 ++++++-- sources.csv | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 4bf56f07..2eedcd7a 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -6,7 +6,7 @@ # description: Manages VMs via libxl ### BEGIN INIT INFO # Provides: xenopsd-xenlight -# Required-Start: $local_fs $network $syslog message-switch +# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index d0ffdbc9..064615e9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.8 +Version: 1.9.9 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index fb98ccbf..22641469 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.5 -Release: 0 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index f8ed2e4d..46d88cdd 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 6 +Release: 7 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -9,7 +9,8 @@ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel -Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator xenops-cli +Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator +Requires: xenops-cli Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd Requires: xcp-rrdd @@ -36,6 +37,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Fri Jun 21 2013 David Scott +- Include xenopsd-xenlight + * Tue Jun 18 2013 David Scott - add a dependency on xcp-rrdd diff --git a/sources.csv b/sources.csv index ed184812..81224ab3 100644 --- a/sources.csv +++ b/sources.csv @@ -55,7 +55,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.8.tar.gz,xen-api-1.9.8.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.9.tar.gz,xen-api-1.9.9.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From fde9b05d68b2dcc2e17136302df686b387528fb1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 21 Jun 2013 16:41:43 +0000 Subject: [PATCH 0206/1125] Update utop to 1.5 --- SPECS/utop.spec | 11 +++++++---- sources.csv | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SPECS/utop.spec b/SPECS/utop.spec index becd54f0..3b9278d6 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,11 +1,11 @@ Name: utop -Version: 1.4 -Release: 1 +Version: 1.5 +Release: 0 Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... License: BSD Group: Development/Other -URL: https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz -Source0: utop-1.4.tar.gz +URL: https://github.com/diml/utop/archives/%{version}.tar.gz +Source0: utop-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel @@ -41,6 +41,9 @@ rm -rf %{buildroot} /usr/share/emacs/site-lisp/utop.el %changelog +* Fri Jun 21 2013 David Scott +- Update to version 1.5 (discovered lurking in plain sight on github) + * Thu May 30 2013 David Scott - Initial package diff --git a/sources.csv b/sources.csv index 81224ab3..022622d2 100644 --- a/sources.csv +++ b/sources.csv @@ -59,7 +59,7 @@ xapi.spec,https://github.com/djs55/xen-api/archive/1.9.9.tar.gz,xen-api-1.9.9.ta camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, -utop.spec,https://forge.ocamlcore.org/frs/download.php/1122/utop-1.4.tar.gz, +utop.spec,https://github.com/diml/utop/archive/1.5.tar.gz,utop-1.5.tar.gz xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.9.tar.gz,xenserver-install-wizard-0.2.9.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz From 746959daa0c8420b170ad39f186fb6bbe9bcca6c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 22 Jun 2013 13:51:56 +0000 Subject: [PATCH 0207/1125] Add and build eliloader (without extra data files) --- SPECS/eliloader.spec | 33 +++++++++++++++++++++++++++++++++ sources.csv | 1 + 2 files changed, 34 insertions(+) create mode 100644 SPECS/eliloader.spec diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec new file mode 100644 index 00000000..71ac35be --- /dev/null +++ b/SPECS/eliloader.spec @@ -0,0 +1,33 @@ +Summary: Bootloader for EL-based distros that support Xen +Name: eliloader +Version: 0.1 +Release: 0 +Source: %{name}-%{version}.tar.gz +License: GPL +Group: Applications/System +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +BuildArch: noarch + +%description +Bootloader for EL-based distros that support Xen. + +%prep +%setup -q -n xcp-eliloader-master-%{version} + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p %{buildroot}/%{_sbindir} +install -m 0755 eliloader %{buildroot}%{_sbindir}/eliloader + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_sbindir}/eliloader + + + +%changelog diff --git a/sources.csv b/sources.csv index 022622d2..e1db7fb7 100644 --- a/sources.csv +++ b/sources.csv @@ -66,3 +66,4 @@ xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/ xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz +eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.1.tar.gz,eliloader-0.1.tar.gz From 101233aec4ac2283b7a4d5591ced55953ed3d778 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 22 Jun 2013 13:52:18 +0000 Subject: [PATCH 0208/1125] xenserver now depends on eliloader --- SPECS/xenserver.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index 46d88cdd..f4d1ff43 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -1,6 +1,6 @@ Name: xenserver Version: 0.9.0 -Release: 7 +Release: 8 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -15,6 +15,7 @@ Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed +Requires: eliloader Requires: kernel >= 3.4.46 kernel-firmware Requires: xen From 97312388c66222a772c8ffabbdbb15322688b6c5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 22 Jun 2013 13:52:28 +0000 Subject: [PATCH 0209/1125] xenopsd's config file now has the path for eliloader --- SOURCES/xenopsd-conf | 2 +- SPECS/xenopsd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/xenopsd-conf b/SOURCES/xenopsd-conf index f71dd045..8cbaa4bf 100755 --- a/SOURCES/xenopsd-conf +++ b/SOURCES/xenopsd-conf @@ -17,4 +17,4 @@ pygrub=/usr/bin/pygrub sockets-group=wheel vncterm=/usr/bin/vncterm -eliloader=/usr/bin/pygrub +eliloader=/usr/sbin/eliloader diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 22641469..af8df4ce 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.5 -Release: 1 +Release: 2 Summary: Simple VM manager License: LGPL Group: Development/Other From 01c2bd32071512fc05593edfe5fbdab6c9324e3c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 22 Jun 2013 14:10:35 +0000 Subject: [PATCH 0210/1125] Update to eliloader 0.2 (doesn't assume data file directory is present) --- SPECS/eliloader.spec | 4 ++-- sources.csv | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 71ac35be..99e164ee 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -1,6 +1,6 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader -Version: 0.1 +Version: 0.2 Release: 0 Source: %{name}-%{version}.tar.gz License: GPL @@ -19,7 +19,7 @@ Bootloader for EL-based distros that support Xen. %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 eliloader %{buildroot}%{_sbindir}/eliloader +install -m 0755 eliloader.py %{buildroot}%{_sbindir}/eliloader %clean rm -rf $RPM_BUILD_ROOT diff --git a/sources.csv b/sources.csv index e1db7fb7..2172fc7d 100644 --- a/sources.csv +++ b/sources.csv @@ -66,4 +66,4 @@ xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/ xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz -eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.1.tar.gz,eliloader-0.1.tar.gz +eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.2.tar.gz,eliloader-0.2.tar.gz From 38c99428dc24e4e46b3ba2351bb53e392aad799b Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 23 Jun 2013 11:25:18 +0000 Subject: [PATCH 0211/1125] Update xapi, xenopsd and xcp-idl --- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- SPECS/xenopsd.spec | 4 ++-- sources.csv | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 064615e9..310a853b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.9 +Version: 1.9.10 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 04f725b1..41c95fc9 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index af8df4ce..02266626 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.5 -Release: 2 +Version: 0.9.6 +Release: 0 Summary: Simple VM manager License: LGPL Group: Development/Other diff --git a/sources.csv b/sources.csv index 2172fc7d..712241b8 100644 --- a/sources.csv +++ b/sources.csv @@ -22,7 +22,7 @@ uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.3.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.4.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, @@ -48,14 +48,14 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.3.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.5.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.6.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.9.tar.gz,xen-api-1.9.9.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.10.tar.gz,xen-api-1.9.10.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From a028bf169de215fe3a39d60f6bc9e73a22fba253 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 24 Jun 2013 14:25:51 +0000 Subject: [PATCH 0212/1125] Update xapi, xenopsd, install wizard --- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- sources.csv | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 310a853b..eaa6b32e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.10 +Version: 1.9.11 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 41c95fc9..27afc66c 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.4 +Version: 0.9.5 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 02266626..8622b81a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.6 +Version: 0.9.7 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index ab5e0530..7547fdf4 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.9 +Version: 0.2.11 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/sources.csv b/sources.csv index 712241b8..4ab38a03 100644 --- a/sources.csv +++ b/sources.csv @@ -22,7 +22,7 @@ uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.4.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.5.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, @@ -48,19 +48,19 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.3.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.6.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.7.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.10.tar.gz,xen-api-1.9.10.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.11.tar.gz,xen-api-1.9.11.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, utop.spec,https://github.com/diml/utop/archive/1.5.tar.gz,utop-1.5.tar.gz -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.9.tar.gz,xenserver-install-wizard-0.2.9.tar.gz +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.11.tar.gz,xenserver-install-wizard-0.2.11.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz From ba3c522174fbb2257067e20e9c9797baf66df8e6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 24 Jun 2013 14:41:09 +0000 Subject: [PATCH 0213/1125] eliloader 0.3 --- SPECS/eliloader.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 99e164ee..2f8e1e66 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -1,6 +1,6 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader -Version: 0.2 +Version: 0.3 Release: 0 Source: %{name}-%{version}.tar.gz License: GPL diff --git a/sources.csv b/sources.csv index 4ab38a03..52fae25f 100644 --- a/sources.csv +++ b/sources.csv @@ -66,4 +66,4 @@ xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/ xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz -eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.2.tar.gz,eliloader-0.2.tar.gz +eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3.tar.gz,eliloader-0.3.tar.gz From c47978f276c8f38076f8c51ee4981a99c86cb934 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 24 Jun 2013 20:24:59 +0000 Subject: [PATCH 0214/1125] Update to xenopsd 0.9.8 --- SPECS/xenopsd.spec | 4 +++- sources.csv | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 8622b81a..e16b7af5 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.7 +Version: 0.9.8 Release: 0 Summary: Simple VM manager License: LGPL @@ -79,6 +79,7 @@ install -D dist/build/xenopsd_xenlight/xenopsd_xenlight %{buildroot}/%{_sbindir} mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D dist/build/xenguest/xenguest %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif +install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules @@ -101,6 +102,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md LICENSE %{_libexecdir}/%{name}/vif +%{_libexecdir}/%{name}/vif-xl %{_libexecdir}/%{name}/qemu-dm-wrapper %{_libexecdir}/%{name}/qemu-vif-script %{_libexecdir}/%{name}/setup-vif-rules diff --git a/sources.csv b/sources.csv index 52fae25f..dee91f45 100644 --- a/sources.csv +++ b/sources.csv @@ -48,7 +48,7 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.3.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.7.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.8.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, From e129691d9770d523b8e8b2049cc35c7d71858231 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 25 Jun 2013 17:12:44 +0000 Subject: [PATCH 0215/1125] Update xapi, xenopsd and xen-lowlevel-libs --- SPECS/xapi.spec | 2 +- SPECS/xen-lowlevel-libs.spec | 2 +- SPECS/xenopsd.spec | 2 +- sources.csv | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index eaa6b32e..3412390d 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.11 +Version: 1.9.12 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 8fd381f8..106ee9f2 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.3 +Version: 0.9.5 Release: 0 Summary: Xen hypercall bindings for OCaml License: LGPL diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index e16b7af5..f21e5b5f 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.8 +Version: 0.9.9 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/sources.csv b/sources.csv index dee91f45..f2892cd0 100644 --- a/sources.csv +++ b/sources.csv @@ -45,17 +45,17 @@ js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.3.tar.gz, +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.8.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.9.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.11.tar.gz,xen-api-1.9.11.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.12.tar.gz,xen-api-1.9.12.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From 36ca09d91a774ca93154ee411c87fee186a11a83 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 25 Jun 2013 20:18:27 +0000 Subject: [PATCH 0216/1125] xenopsd 0.9.10, with xl-specifc 'udev' script --- SOURCES/xenopsd-conf | 1 + SPECS/xenopsd.spec | 2 +- sources.csv | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SOURCES/xenopsd-conf b/SOURCES/xenopsd-conf index 8cbaa4bf..02e801e7 100755 --- a/SOURCES/xenopsd-conf +++ b/SOURCES/xenopsd-conf @@ -8,6 +8,7 @@ xenguest=/usr/libexec/xenopsd/xenguest network-conf=/etc/xapi/network.conf vif-script=/usr/libexec/xenopsd/vif +vif-xl-script=/usr/libexec/xenopsd/vif-xl qemu-vif-script=/usr/libexec/xenopsd/qemu-vif-script qemu-dm-wrapper=/usr/libexec/xenopsd/qemu-dm-wrapper setup-vif-rules=/usr/libexec/xenopsd/setup-vif-rules diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index f21e5b5f..a0752a4a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.9 +Version: 0.9.10 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/sources.csv b/sources.csv index f2892cd0..c1e29394 100644 --- a/sources.csv +++ b/sources.csv @@ -48,7 +48,7 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.9.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.10.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, From 1807b5e5ea53674db8323e15189e1a262f7b67a4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 27 Jun 2013 15:17:01 +0000 Subject: [PATCH 0217/1125] Update xapi, xenopsd, vncterm --- SPECS/vncterm.spec | 11 ++++++++++- SPECS/xapi.spec | 2 +- SPECS/xenopsd.spec | 2 +- sources.csv | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index cd64c09b..d703bd4f 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,7 +1,7 @@ Summary: vncterm tty to vnc utility Name: vncterm Version: 0.1 -Release: 0 +Release: 1 License: GPL Group: System/Hypervisor Source0: %{name}-%{version}.tar.gz @@ -25,12 +25,21 @@ cp vncterm %{buildroot}%{_bindir}/ %clean rm -rf %{buildroot} +%pre +getent group vncterm >/dev/null || groupadd -r vncterm +getent group vncterm_base >/dev/null || groupadd -r vncterm_base +getent passwd vncterm >/dev/null || useradd -r -g vncterm -d /none -s /sbin/nologin -c 'for vncterm' vncterm +getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s /sbin/nologin -c 'for vncterm' vncterm_base + %files %defattr(-,root,root,-) %doc %{_bindir}/vncterm %changelog +* Thu Jun 27 2013 David Scott +- add users and groups: vncterm,vncterm_base + * Mon Jun 3 2013 David Scott - Imported from vncterm/mk/vncterm.spec.in diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 3412390d..e28c88b9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.12 +Version: 1.9.13 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a0752a4a..587b7ab9 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.10 +Version: 0.9.13 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/sources.csv b/sources.csv index c1e29394..c1a55b87 100644 --- a/sources.csv +++ b/sources.csv @@ -48,14 +48,14 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.10.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.13.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.12.tar.gz,xen-api-1.9.12.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.13.tar.gz,xen-api-1.9.13.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From 04929f3e4cdaec5b461759fcd8c475602e2683fb Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 28 Jun 2013 08:10:50 +0000 Subject: [PATCH 0218/1125] Update xenopsd to 0.9.14 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 2 +- sources.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 587b7ab9..2305f5d8 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.13 +Version: 0.9.14 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/sources.csv b/sources.csv index c1a55b87..ca0f1f38 100644 --- a/sources.csv +++ b/sources.csv @@ -48,7 +48,7 @@ stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml- xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.13.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.14.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, From cb6bc797521048cf93d0e4d0fe21d4d5f422b440 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 28 Jun 2013 13:46:30 +0100 Subject: [PATCH 0219/1125] Add openstack-xen-plugins Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 35 +++++++++++++++++++++++++++++++ SPECS/xenserver.spec | 1 + sources.csv | 1 + 3 files changed, 37 insertions(+) create mode 100644 SPECS/openstack-xapi-plugins.spec diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec new file mode 100644 index 00000000..e6f677ef --- /dev/null +++ b/SPECS/openstack-xapi-plugins.spec @@ -0,0 +1,35 @@ +Name: openstack-xapi-plugins +Version: 2013.1.2 +Release: 1 +Summary: XenAPI plugins from OpenStack +License: ASL 2.0 +Group: System/Hypervisor +URL: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz +Source0: nova-%{version}.tar.gz +BuildArch: noarch +BuildRoot: %{_tmppath}/nova-%{version}-%{release} + +%define debug_package %{nil} + +%description +XenAPI plugins used by OpenStack to control XenServer. + +%prep +%setup -q -n nova-%{version} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_sysconfdir} +cp -r plugins/xenserver/xenapi/etc/xapi.d %{buildroot}/%{_sysconfdir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(755,root,root,-) +%{_sysconfdir}/xapi.d/ + +%changelog +* Fri Jun 28 2013 Euan Harris +- Initial package + diff --git a/SPECS/xenserver.spec b/SPECS/xenserver.spec index f4d1ff43..e2f8d54d 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver.spec @@ -11,6 +11,7 @@ Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator Requires: xenops-cli +Requires: openstack-xen-plugins Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd Requires: xcp-rrdd diff --git a/sources.csv b/sources.csv index ca0f1f38..104e9e3c 100644 --- a/sources.csv +++ b/sources.csv @@ -67,3 +67,4 @@ xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd- xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3.tar.gz,eliloader-0.3.tar.gz +openstack-xapi-plugins.spec,https://launchpad.net/nova/grizzly/2013.1.2/+download/nova-2013.1.2.tar.gz,nova-2013.1.2.tar.gz From 4cc703fe5e3f8389fab8ed2ffbe83e0e9dda3dde Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 28 Jun 2013 14:32:25 +0000 Subject: [PATCH 0220/1125] Rename xenserver to xenserver-core Signed-off-by: David Scott --- SPECS/{xenserver.spec => xenserver-core.spec} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename SPECS/{xenserver.spec => xenserver-core.spec} (97%) diff --git a/SPECS/xenserver.spec b/SPECS/xenserver-core.spec similarity index 97% rename from SPECS/xenserver.spec rename to SPECS/xenserver-core.spec index f4d1ff43..d1c514ac 100644 --- a/SPECS/xenserver.spec +++ b/SPECS/xenserver-core.spec @@ -1,4 +1,4 @@ -Name: xenserver +Name: xenserver-core Version: 0.9.0 Release: 8 Summary: A virtual package which installs the xapi toolstack From d183ba91452a6d7ae9bb48f6a9fe66d993886946 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 29 Jun 2013 21:35:37 +0000 Subject: [PATCH 0221/1125] Update xcp-idl, libvhd, ffs Signed-off-by: David Scott --- SPECS/ffs.spec | 5 +++-- SPECS/libvhd.spec | 12 ++++++------ SPECS/xcp-idl.spec | 3 ++- sources.csv | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 6f412b7d..97b6a4e1 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.4 +Version: 0.9.5 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -11,7 +11,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel -BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel +BuildRequires: ocaml-tapctl-devel %description Simple flat file storage manager for the xapi toolstack. diff --git a/SPECS/libvhd.spec b/SPECS/libvhd.spec index fa911d7f..627b8dac 100644 --- a/SPECS/libvhd.spec +++ b/SPECS/libvhd.spec @@ -1,11 +1,11 @@ Name: ocaml-libvhd -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: vhd manipulation via libvhd License: BSD3 Group: Development/Other URL: http://github.com/xen-org/libvhd -Source0: https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz +Source0: https://github.com/xen-org/libvhd/archive/libvhd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel Requires: ocaml ocaml-findlib @@ -43,9 +43,9 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root) %doc ChangeLog README.md -%{_libdir}/ocaml/libvhd/* -%{_libdir}/ocaml/stublibs/dlllibvhd_stubs.so -%{_libdir}/ocaml/stublibs/dlllibvhd_stubs.so.owner +%{_libdir}/ocaml/vhdlib/* +%{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so +%{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so.owner %changelog * Wed May 29 2013 David Scott diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 27afc66c..4dcf540b 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.5 +Version: 0.9.6 Release: 0 Summary: Common interface definitions for XCP services License: LGPL @@ -9,6 +9,7 @@ Source0: xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel +BuildRequires: ocaml-ounit-devel # XXX transitive dependencies of message-switch-devel BuildRequires: ocaml-oclock-devel diff --git a/sources.csv b/sources.csv index 104e9e3c..6af324ea 100644 --- a/sources.csv +++ b/sources.csv @@ -4,9 +4,9 @@ cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.4.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.5.tar.gz, forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, -libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.0.tar.gz, +libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.1.tar.gz, message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0.tar.gz, nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, @@ -22,7 +22,7 @@ uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.5.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.6.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, From 0107a5d2a24783ed33fce5f690b78c020563c59b Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 30 Jun 2013 17:24:10 +0000 Subject: [PATCH 0222/1125] Update xcp-idl, sm-cli, libvirt storage and xapi Signed-off-by: David Scott --- SPECS/sm-cli.spec | 8 ++++---- SPECS/xapi-libvirt-storage.spec | 8 ++++---- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- sources.csv | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 411ebf12..b197374d 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,11 +1,11 @@ Name: sm-cli -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other -URL: https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz -Source0: sm-cli-0.9.0.tar.gz +URL: https://github.com/xen-org/sm-cli/archive/sm-cli-%{version}.tar.gz +Source0: sm-cli-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index c7319e87..a2e8db0d 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,11 +1,11 @@ Name: xapi-libvirt-storage -Version: 0.9.0 -Release: 1 +Version: 0.9.1 +Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz -Source0: xapi-libvirt-storage-0.9.0.tar.gz +URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-%{version}.tar.gz +Source0: xapi-libvirt-storage-%{version}.tar.gz Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index e28c88b9..c4b1dec8 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.13 +Version: 1.9.14 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 4dcf540b..104f3c01 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.6 +Version: 0.9.7 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/sources.csv b/sources.csv index 6af324ea..4b357a80 100644 --- a/sources.csv +++ b/sources.csv @@ -15,14 +15,14 @@ oclock.spec,http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.ta qmp.spec,https://github.com/xen-org/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz re.spec,http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz -sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.0.tar.gz, +sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.1.tar.gz, syslog.spec,http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, -xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.0.tar.gz, +xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1.tar.gz, xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.6.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.7.tar.gz, xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, @@ -55,7 +55,7 @@ squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.13.tar.gz,xen-api-1.9.13.tar.gz +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.14.tar.gz,xen-api-1.9.14.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, From c2eca0739de05e6b476faa0f15368ac1b9d9d1bb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 1 Jul 2013 09:37:17 +0100 Subject: [PATCH 0223/1125] build: Use the correct architecture when building packages Previously we tagged all packages with the build machine architecture, which has always been x86_64. Now we have some noarch packages, which specify 'BuildArch: noarch' in their SPEC files. With this change, we use the architecture which RPM gives us instead of assuming the architecture of the build machine. Signed-off-by: Euan Harris --- makemake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makemake.py b/makemake.py index 0e1be621..677bfa23 100755 --- a/makemake.py +++ b/makemake.py @@ -58,7 +58,7 @@ def rpmNameFromHeader( h ): rpm.addMacro( 'NAME', h['name'] ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) - rpm.addMacro( 'ARCH', rpm.expandMacro( '%_arch' ) ) + rpm.addMacro( 'ARCH', h['arch'] ) rpmname = rpm.expandMacro( rpmfilenamepat ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) From fe6a9569cb004a158b23242d8e32de2fb58e00a9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 1 Jul 2013 09:43:42 +0100 Subject: [PATCH 0224/1125] build: Update the repo instead of fully rebuilding it after adding a package Signed-off-by: Euan Harris --- makemake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makemake.py b/makemake.py index 677bfa23..b4410625 100755 --- a/makemake.py +++ b/makemake.py @@ -70,7 +70,6 @@ def rpmNameFromHeader( h ): # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) -rule_rpm_from_srpm = 'mock -r xenserver --resultdir="./RPMS/%(target_arch)s/" $< && createrepo RPMS/x86_64' for specname, spec in specs.iteritems(): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly @@ -80,7 +79,8 @@ def rpmNameFromHeader( h ): for r in rpmnames: print '%s: %s' % ( os.path.join( rpm_dir, r), os.path.join( srpm_dir, srpmname )) - print '\t%s' % rule_rpm_from_srpm + print '\tmock -r xenserver --resultdir="./RPMS/%(target_arch)s/" $<' + print '\tcreaterepo --update RPMS/x86_64' # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec From 264db2724831a67d3957467af65e8e9ff2b12927 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 1 Jul 2013 16:17:44 +0100 Subject: [PATCH 0225/1125] build: Put RPMs in architecture-specific subdirectories Until now we have been putting all the RPMs we build in RPMS/x86_64. Now that we also build noarch RPMs, we should have a more appropriate directory structure. Signed-off-by: Euan Harris --- makemake.py | 10 ++++++---- xapi.repo | 2 +- xenserver.cfg.in | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/makemake.py b/makemake.py index b4410625..521ec51f 100755 --- a/makemake.py +++ b/makemake.py @@ -77,10 +77,12 @@ def rpmNameFromHeader( h ): rpmnames = rpmNamesFromSpec( spec ) srpmname = srpmNameFromSpec( spec ) for r in rpmnames: - print '%s: %s' % ( os.path.join( rpm_dir, r), - os.path.join( srpm_dir, srpmname )) - print '\tmock -r xenserver --resultdir="./RPMS/%(target_arch)s/" $<' - print '\tcreaterepo --update RPMS/x86_64' + rpm_path = os.path.join( rpm_dir, r ) + srpm_path = os.path.join( srpm_dir, srpmname ) + rpm_outdir = os.path.dirname( rpm_path ) + print '%s: %s' % ( rpm_path, srpm_path ) + print '\tmock -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\tcreaterepo --update %s' % rpm_dir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec diff --git a/xapi.repo b/xapi.repo index fd1a19cf..35993c88 100644 --- a/xapi.repo +++ b/xapi.repo @@ -1,6 +1,6 @@ [xapi] name=CentOS-$releasever - xapi -baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/$basearch/ +baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/ gpgcheck=0 Priority=1 enabled=1 diff --git a/xenserver.cfg.in b/xenserver.cfg.in index 3afa32f9..ad810b20 100644 --- a/xenserver.cfg.in +++ b/xenserver.cfg.in @@ -69,7 +69,7 @@ enabled=0 [mock] name=Mock output -baseurl=file://@HOME@/rpmbuild/RPMS/x86_64 +baseurl=file://@HOME@/rpmbuild/RPMS gpgcheck=0 priority=1 enabled=1 From 45ff06af229c88d720db2b8caf76ff0c6631c4fa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 2 Jul 2013 10:57:16 +0100 Subject: [PATCH 0226/1125] build: SRPM targets depend on sources and patches, as well spec files Signed-off-by: Euan Harris --- makemake.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/makemake.py b/makemake.py index 521ec51f..a87f3c9d 100755 --- a/makemake.py +++ b/makemake.py @@ -11,6 +11,7 @@ rpm_dir = rpm.expandMacro( '%_rpmdir' ) spec_dir = rpm.expandMacro( '%_specdir' ) srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) +src_dir = rpm.expandMacro( '%_sourcedir' ) print "all: rpms" @@ -49,8 +50,13 @@ def srpmNameFromSpec( spec ): rule_spec_from_srpm = 'rpmbuild -bs $<' for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) - print '%s: %s' % (os.path.join( srpm_dir, srpmname ), - os.path.join( spec_dir, specname ) ) + sources = [ os.path.join( src_dir, p ) for p in spec.sourceHeader['source'] ] + patches = [ os.path.join( src_dir, p ) for p in spec.sourceHeader['patch'] ] + + print '%s: %s %s %s' % (os.path.join( srpm_dir, srpmname ), + os.path.join( spec_dir, specname ), + " ".join( sources ), + " ".join( patches ) ) print '\t%s' % rule_spec_from_srpm def rpmNamesFromSpec( spec ): From ab790e65b7a2f343098d356e08bbe5dad14a50fe Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 3 Jul 2013 13:34:59 +0100 Subject: [PATCH 0227/1125] build: Change xen-org to xapi-project in GitHub URLs Signed-off-by: Euan Harris --- sources.csv | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/sources.csv b/sources.csv index 4b357a80..399e703f 100644 --- a/sources.csv +++ b/sources.csv @@ -1,33 +1,33 @@ # spec file, Download url, filename override (optional) # -cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz, +cdrom.spec,https://github.com/xapi-project/cdrom/archive/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.5.tar.gz, -forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz, -libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.1.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0.tar.gz, -nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz, -netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz, +ffs.spec,https://github.com/xapi-project/ffs/archive/ffs-0.9.5.tar.gz, +forkexecd.spec,https://github.com/xapi-project/forkexecd/archive/forkexecd-0.9.0.tar.gz, +libvhd.spec,https://github.com/xapi-project/libvhd/archive/libvhd-0.9.1.tar.gz, +message-switch.spec,https://github.com/xapi-project/message-switch/archive/message-switch-0.10.0.tar.gz, +nbd.spec,https://github.com/xapi-project/nbd/archive/nbd-0.9.0.tar.gz, +netdev.spec,https://github.com/xapi-project/netdev/archive/netdev-0.9.0.tar.gz, obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz oclock.spec,http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.tar.gz -qmp.spec,https://github.com/xen-org/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz +qmp.spec,https://github.com/xapi-project/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz re.spec,http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz -sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.1.tar.gz, +sm-cli.spec,https://github.com/xapi-project/sm-cli/archive/sm-cli-0.9.1.tar.gz, syslog.spec,http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, -tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz, +tapctl.spec,https://github.com/xapi-project/tapctl/archive/tapctl-0.9.0.tar.gz, uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, -xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1.tar.gz, -xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.7.tar.gz, -xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz -xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, +xapi-libvirt-storage.spec,https://github.com/xapi-project/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1.tar.gz, +xcp-rrd.spec,https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, +xcp-idl.spec,https://github.com/xapi-project/xcp-idl/archive/xcp-idl-0.9.7.tar.gz, +xen-api-client.spec,https://github.com/xapi-project/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz +xenops-cli.spec,https://github.com/xapi-project/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, -fd-send-recv.spec,https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, +fd-send-recv.spec,https://github.com/xapi-project/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, cppo.spec,http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, deriving-ocsigen.spec,http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, optcomp.spec,https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, @@ -44,17 +44,17 @@ type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, -stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, -vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz +stdext.spec,https://github.com/xapi-project/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz +xen-lowlevel-libs.spec,https://github.com/xapi-project/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, +vncterm.spec,https://github.com/xapi-project/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.14.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, -xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, -squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz, -xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, -xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, -xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, +xenstore-clients.spec,https://github.com/xapi-project/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, +squeezed.spec,https://github.com/xapi-project/squeezed/archive/squeezed-0.9.0.tar.gz, +xcp-networkd.spec,https://github.com/xapi-project/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, +xcp-inventory.spec,https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, +xen-api-libs-transitional.spec,https://github.com/xapi-project/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, xapi.spec,https://github.com/djs55/xen-api/archive/1.9.14.tar.gz,xen-api-1.9.14.tar.gz camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, @@ -62,9 +62,9 @@ lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2 utop.spec,https://github.com/diml/utop/archive/1.5.tar.gz,utop-1.5.tar.gz xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.11.tar.gz,xenserver-install-wizard-0.2.11.tar.gz libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, -xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz -xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz -xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz +xe-create-templates.spec,https://github.com/xapi-project/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz +xcp-rrdd.spec,https://github.com/xapi-project/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz +xenops.spec,https://github.com/xapi-project/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3.tar.gz,eliloader-0.3.tar.gz openstack-xapi-plugins.spec,https://launchpad.net/nova/grizzly/2013.1.2/+download/nova-2013.1.2.tar.gz,nova-2013.1.2.tar.gz From 6649ec23b55342613081068a73eefbce4ac6710d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 3 Jul 2013 14:06:32 +0100 Subject: [PATCH 0228/1125] build: Fix GitHub download URLs to pin versions and reduce need for override The file name at the end of a github.com///archive URL is arbitrary, so we shouldn't need the 'override' feature of fetch.py for GitHub downloads - we can just ask for the filename we want. However fetching from github.com///archive seems to return the most recent version, not necessarily the version we want (the version in the filename is ignored, because GitHub doesn't care about the filename). Therefore we should request archive//filename-1.2.3.tar.gz, to make sure we always get the same version. Signed-off-by: Euan Harris --- SPECS/re.spec | 2 +- sources.csv | 88 +++++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/SPECS/re.spec b/SPECS/re.spec index a94ad8e7..0ef44f21 100644 --- a/SPECS/re.spec +++ b/SPECS/re.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-ocaml-re-f464ffd +%setup -q -n ocaml-re-ocaml-re-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/sources.csv b/sources.csv index 399e703f..b8f4d154 100644 --- a/sources.csv +++ b/sources.csv @@ -1,70 +1,70 @@ # spec file, Download url, filename override (optional) # -cdrom.spec,https://github.com/xapi-project/cdrom/archive/cdrom-0.9.1.tar.gz, +cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1/cdrom-0.9.1.tar.gz, cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, -cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz, -cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xapi-project/ffs/archive/ffs-0.9.5.tar.gz, -forkexecd.spec,https://github.com/xapi-project/forkexecd/archive/forkexecd-0.9.0.tar.gz, -libvhd.spec,https://github.com/xapi-project/libvhd/archive/libvhd-0.9.1.tar.gz, -message-switch.spec,https://github.com/xapi-project/message-switch/archive/message-switch-0.10.0.tar.gz, -nbd.spec,https://github.com/xapi-project/nbd/archive/nbd-0.9.0.tar.gz, -netdev.spec,https://github.com/xapi-project/netdev/archive/netdev-0.9.0.tar.gz, -obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2.tar.gz,obuild-0.0.2.tar.gz -oclock.spec,http://github.com/polazarus/oclock/archive/v0.3.tar.gz,oclock-0.3.tar.gz -qmp.spec,https://github.com/xapi-project/ocaml-qmp/archive/0.9.0.tar.gz,ocaml-qmp-0.9.0.tar.gz -re.spec,http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1,ocaml-re-1.2.1.tar.gz -rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz,ocaml-rpc-1.4.1.tar.gz -sm-cli.spec,https://github.com/xapi-project/sm-cli/archive/sm-cli-0.9.1.tar.gz, +cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz, +cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1/ocaml-cstruct-0.7.1.tar.gz, +ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.5/ffs-0.9.5.tar.gz, +forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0/forkexecd-0.9.0.tar.gz, +libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.1/libvhd-0.9.1.tar.gz, +message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0/message-switch-0.10.0.tar.gz, +nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0/nbd-0.9.0.tar.gz, +netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0/netdev-0.9.0.tar.gz, +obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2/obuild-0.0.2.tar.gz, +oclock.spec,http://github.com/polazarus/oclock/archive/v0.3/oclock-0.3.tar.gz, +qmp.spec,https://github.com/xen-org/ocaml-qmp/archive/0.9.0/ocaml-qmp-0.9.0.tar.gz, +re.spec,http://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.1/ocaml-re-1.2.1.tar.gz, +rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1/ocaml-rpc-1.4.1.tar.gz, +sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.1/sm-cli-0.9.1.tar.gz, syslog.spec,http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, -tapctl.spec,https://github.com/xapi-project/tapctl/archive/tapctl-0.9.0.tar.gz, -uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz, +tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0/tapctl-0.9.0.tar.gz, +uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8/ocaml-uri-1.3.8.tar.gz, uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, -xapi-libvirt-storage.spec,https://github.com/xapi-project/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1.tar.gz, -xcp-rrd.spec,https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xapi-project/xcp-idl/archive/xcp-idl-0.9.7.tar.gz, -xen-api-client.spec,https://github.com/xapi-project/xen-api-client/archive/0.9.4.tar.gz,xen-api-client-0.9.4.tar.gz -xenops-cli.spec,https://github.com/xapi-project/xenops-cli/archive/xenops-cli-0.9.1.tar.gz, +xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1/xapi-libvirt-storage-0.9.1.tar.gz, +xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0/xcp-rrd-0.9.0.tar.gz, +xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.7/xcp-idl-0.9.7.tar.gz, +xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4/xen-api-client-0.9.4.tar.gz, +xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1/xenops-cli-0.9.1.tar.gz, xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, -fd-send-recv.spec,https://github.com/xapi-project/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz, +fd-send-recv.spec,https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1/ocaml-fd-send-recv-1.0.1.tar.gz, cppo.spec,http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, deriving-ocsigen.spec,http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, optcomp.spec,https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, easy-format.spec,http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, -ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz,ocplib-endian-0.3.tar.gz +ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3/ocplib-endian-0.3.tar.gz, ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, -bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz,ocaml-bitstring-2.0.4.tar.gz +bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz, omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, -xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz, -stdext.spec,https://github.com/xapi-project/stdext/archive/stdext-0.9.0.tar.gz,ocaml-stdext-0.9.0.tar.gz -xen-lowlevel-libs.spec,https://github.com/xapi-project/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, -vncterm.spec,https://github.com/xapi-project/vncterm/archive/master/0.1.tar.gz,vncterm-0.1.tar.gz +xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1/ocaml-xenstore-1.2.1.tar.gz, +stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0/ocaml-stdext-0.9.0.tar.gz, +xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, +vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1/vncterm-0.1.tar.gz, ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.14.tar.gz, +xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.14/xenopsd-0.9.14.tar.gz, sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, -xenstore-clients.spec,https://github.com/xapi-project/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0.tar.gz, -squeezed.spec,https://github.com/xapi-project/squeezed/archive/squeezed-0.9.0.tar.gz, -xcp-networkd.spec,https://github.com/xapi-project/xcp-networkd/archive/xcp-networkd-0.9.2.tar.gz, -xcp-inventory.spec,https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-0.9.0.tar.gz, -xen-api-libs-transitional.spec,https://github.com/xapi-project/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.14.tar.gz,xen-api-1.9.14.tar.gz +xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0/ocaml-xenstore-clients-0.9.0.tar.gz, +squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0/squeezed-0.9.0.tar.gz, +xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2/xcp-networkd-0.9.2.tar.gz, +xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0/xcp-inventory-0.9.0.tar.gz, +xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0/xen-api-libs-transitional-0.9.0.tar.gz, +xapi.spec,https://github.com/djs55/xen-api/archive/1.9.14/xen-api-1.9.14.tar.gz, camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, -utop.spec,https://github.com/diml/utop/archive/1.5.tar.gz,utop-1.5.tar.gz -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.11.tar.gz,xenserver-install-wizard-0.2.11.tar.gz +utop.spec,https://github.com/diml/utop/archive/1.5/utop-1.5.tar.gz, +xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.11/xenserver-install-wizard-0.2.11.tar.gz, libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, -xe-create-templates.spec,https://github.com/xapi-project/xcp-guest-templates/archive/0.9.1.tar.gz,xe-create-templates-0.9.1.tar.gz -xcp-rrdd.spec,https://github.com/xapi-project/xcp-rrdd/archive/0.9.0.tar.gz,xcp-rrdd-0.9.0.tar.gz -xenops.spec,https://github.com/xapi-project/xenops/archive/0.9.0.tar.gz,ocaml-xenops-0.9.0.tar.gz -xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0.tar.gz,xsiostat-0.2.0.tar.gz -eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3.tar.gz,eliloader-0.3.tar.gz -openstack-xapi-plugins.spec,https://launchpad.net/nova/grizzly/2013.1.2/+download/nova-2013.1.2.tar.gz,nova-2013.1.2.tar.gz +xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1/xe-create-templates-0.9.1.tar.gz, +xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0/xcp-rrdd-0.9.0.tar.gz, +xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0/ocaml-xenops-0.9.0.tar.gz, +xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0/xsiostat-0.2.0.tar.gz, +eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3/eliloader-0.3.tar.gz, +openstack-xapi-plugins.spec,https://launchpad.net/nova/grizzly/2013.1.2/+download/nova-2013.1.2.tar.gz, From c16053d1c31aea8959211f657da43bcbaf5bd784 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 5 Jul 2013 11:58:15 +0100 Subject: [PATCH 0229/1125] build: Store tarball URLs in spec files RPM only cares about the basename part of a Source: filename, so we can store the original download URL there as long as the downloaded file has the correct name. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/camomile.spec | 2 +- SPECS/cdrom.spec | 2 +- SPECS/cmdliner.spec | 2 +- SPECS/cohttp.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/cstruct.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/eliloader.spec | 2 +- SPECS/fd-send-recv.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/lambda-term.spec | 2 +- SPECS/libvhd.spec | 2 +- SPECS/libvirt.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/nbd.spec | 2 +- SPECS/netdev.spec | 2 +- SPECS/obuild.spec | 2 +- SPECS/ocaml-libvirt.spec | 2 +- SPECS/oclock.spec | 2 +- SPECS/ocplib-endian.spec | 2 +- SPECS/omake.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/ounit.spec | 2 +- SPECS/qmp.spec | 2 +- SPECS/re.spec | 2 +- SPECS/rpc.spec | 2 +- SPECS/sexplib.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/ssl.spec | 2 +- SPECS/stdext.spec | 2 +- SPECS/syslog.spec | 2 +- SPECS/tapctl.spec | 2 +- SPECS/text.spec | 2 +- SPECS/type_conv.spec | 2 +- SPECS/uri.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/uuidm.spec | 2 +- SPECS/vncterm.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- SPECS/xcp-inventory.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xen-api-client.spec | 2 +- SPECS/xen-api-libs-transitional.spec | 2 +- SPECS/xen-lowlevel-libs.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenops.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xenstore-clients.spec | 2 +- SPECS/xenstore.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsiostat.spec | 2 +- SPECS/yojson.spec | 2 +- SPECS/zed.spec | 2 +- 65 files changed, 65 insertions(+), 65 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 597a128b..09c8a3b4 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -5,7 +5,7 @@ Summary: Binary data format designed for speed, safety, ease of use and b License: BSD3 Group: Development/Other URL: http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz -Source0: biniou-1.0.6.tar.gz +Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib easy-format Requires: ocaml ocaml-findlib diff --git a/SPECS/camomile.spec b/SPECS/camomile.spec index d5d421c3..f6686117 100644 --- a/SPECS/camomile.spec +++ b/SPECS/camomile.spec @@ -13,7 +13,7 @@ Group: Development/Libraries # https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html License: LGPLv2+ URL: http://sourceforge.net/projects/camomile/ -Source0: http://downloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2 +Source0: http://prdownloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: ppc64 sparc64 s390 s390x diff --git a/SPECS/cdrom.spec b/SPECS/cdrom.spec index c7f9a910..a2021549 100644 --- a/SPECS/cdrom.spec +++ b/SPECS/cdrom.spec @@ -5,7 +5,7 @@ Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xen-org/ocaml -Source0: https://github.com/xen-org/cdrom/archive/cdrom-0.9.1.tar.gz +Source0: https://github.com/xen-org/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild Requires: ocaml ocaml-findlib diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 88985bc4..9c6d0d37 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -5,7 +5,7 @@ Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 Group: Development/Other URL: http://erratique.ch/software/cmdliner -Source0: cmdliner-0.9.3.tbz +Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/cohttp.spec b/SPECS/cohttp.spec index 68588261..bbbf7777 100644 --- a/SPECS/cohttp.spec +++ b/SPECS/cohttp.spec @@ -5,7 +5,7 @@ Summary: An HTTP library for OCaml License: LGPL Group: Development/Other URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz -Source0: ocaml-cohttp-0.9.8.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel # should these be inherited from ssl.spec somehow? diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 4f8d3794..0803d8f7 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -5,7 +5,7 @@ Summary: Equivalent of the C preprocessor for OCaml License: BSD3 Group: Development/Other URL: http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz -Source0: cppo-0.9.3.tar.gz +Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml Requires: ocaml diff --git a/SPECS/cstruct.spec b/SPECS/cstruct.spec index a50649a0..1103b8a5 100644 --- a/SPECS/cstruct.spec +++ b/SPECS/cstruct.spec @@ -5,7 +5,7 @@ Summary: Read and write low-level C-style structures in OCaml License: ISC Group: Development/Other URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz -Source0: ocaml-cstruct-0.7.1.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 8196d25e..cf9ac892 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -5,7 +5,7 @@ Summary: Extension to OCaml for deriving functions from type declarations License: MIT Group: Development/Other URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz -Source0: deriving-ocsigen-0.3c.tar.gz +Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 783ba962..82d102a5 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -5,7 +5,7 @@ Summary: Indentation made easy License: BSD3 Group: Development/Other URL: http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz -Source0: easy-format-1.0.1.tar.gz +Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 2f8e1e66..64eccc5f 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -2,7 +2,7 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader Version: 0.3 Release: 0 -Source: %{name}-%{version}.tar.gz +Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot diff --git a/SPECS/fd-send-recv.spec b/SPECS/fd-send-recv.spec index ee9ca324..caec80d2 100644 --- a/SPECS/fd-send-recv.spec +++ b/SPECS/fd-send-recv.spec @@ -5,7 +5,7 @@ Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL Group: Development/Other URL: http://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz -Source0: ocaml-fd-send-recv-1.0.1.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 97b6a4e1..3a5fefc3 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -5,7 +5,7 @@ Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xen-org/ffs/archive/ffs-%{version}.tar.gz -Source0: ffs-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 48480a01..a32bcc18 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -5,7 +5,7 @@ Summary: A subprocess management service License: LGPL Group: Development/Other URL: https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz -Source0: forkexecd-0.9.0.tar.gz +Source0: https://github.com/xen-org/forkexecd/archive/forkexecd-%{version}/forkexecd-%{version}.tar.gz Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 4507ab75..69b8cb77 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -5,7 +5,7 @@ Summary: Compile OCaml programs to javascript License: LGPL and others Group: Development/Other URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz -Source0: js_of_ocaml-%{version}.tar.gz +Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel ocaml-ocamldoc Requires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel diff --git a/SPECS/lambda-term.spec b/SPECS/lambda-term.spec index 6628838e..002d76d9 100644 --- a/SPECS/lambda-term.spec +++ b/SPECS/lambda-term.spec @@ -5,7 +5,7 @@ Summary: Lambda-Term is a cross-platform library for manipulating the ter License: BSD3 Group: Development/Other URL: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz -Source0: lambda-term-1.2.tar.gz +Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc ocaml-zed-devel ocaml-lwt-devel ocaml-camomile-devel ocaml-react-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/libvhd.spec b/SPECS/libvhd.spec index 627b8dac..c1104fd0 100644 --- a/SPECS/libvhd.spec +++ b/SPECS/libvhd.spec @@ -5,7 +5,7 @@ Summary: vhd manipulation via libvhd License: BSD3 Group: Development/Other URL: http://github.com/xen-org/libvhd -Source0: https://github.com/xen-org/libvhd/archive/libvhd-%{version}.tar.gz +Source0: https://github.com/xen-org/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 7d957104..308a0d95 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -340,7 +340,7 @@ URL: http://libvirt.org/ %if %(echo %{version} | grep -o \\. | wc -l) == 3 %define mainturl stable_updates/ %endif -Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz +Source0: http://libvirt.org/sources/stable_updates/%{name}-%{version}.tar.gz # Fix qemu -> qemu-system-i386 (bz #857026). # keep: This patch is Fedora-specific and not upstream. diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 845f3bf7..8ecce63c 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -5,7 +5,7 @@ Summary: A store and forward message switch License: FreeBSD Group: Development/Other URL: https://github.com/xen-org/message-switch/archive/message-switch-%{version}.tar.gz -Source0: message-switch-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/nbd.spec b/SPECS/nbd.spec index 192315e3..4c198530 100644 --- a/SPECS/nbd.spec +++ b/SPECS/nbd.spec @@ -5,7 +5,7 @@ Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xen-org/nbd -Source0: https://github.com/xen-org/nbd/archive/nbd-0.9.0.tar.gz +Source0: https://github.com/xen-org/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib diff --git a/SPECS/netdev.spec b/SPECS/netdev.spec index a45b01ee..3de9688e 100644 --- a/SPECS/netdev.spec +++ b/SPECS/netdev.spec @@ -5,7 +5,7 @@ Summary: Manipulate Linux bridges, network devices and openvswitch instan License: LGPL Group: Development/Other URL: https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz -Source0: netdev-0.9.0.tar.gz +Source0: https://github.com/xen-org/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib forkexec-devel ocaml-stdext-devel #required by forkexec diff --git a/SPECS/obuild.spec b/SPECS/obuild.spec index a6d9a9c9..c641fbd9 100644 --- a/SPECS/obuild.spec +++ b/SPECS/obuild.spec @@ -5,7 +5,7 @@ Summary: Simple build tool for OCaml programs License: BSD2 Group: Development/Other URL: http://github.com/vincenthz/obuild -Source0: obuild-0.0.2.tar.gz +Source0: https://github.com/vincenthz/obuild/archive/v0.0.2/obuild-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml Requires: ocaml diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 545801c2..fccd6a76 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -12,7 +12,7 @@ Summary: OCaml binding for libvirt Group: Development/Libraries License: LGPLv2+ URL: http://libvirt.org/ocaml/ -Source0: http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz +Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz Patch0: ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a Patch1: ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 Patch2: ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf diff --git a/SPECS/oclock.spec b/SPECS/oclock.spec index e99baec4..02719a06 100644 --- a/SPECS/oclock.spec +++ b/SPECS/oclock.spec @@ -7,7 +7,7 @@ Summary: POSIX monotonic clock for OCaml License: ISC Group: Development/Other URL: https://github.com/polazarus/oclock -Source0: oclock-0.3.tar.gz +Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocplib-endian.spec b/SPECS/ocplib-endian.spec index 762f9ca6..eb2a4a10 100644 --- a/SPECS/ocplib-endian.spec +++ b/SPECS/ocplib-endian.spec @@ -5,7 +5,7 @@ Summary: Optimised functions to read and write int16/32/64 from strings a License: LGPL Group: Development/Other URL: https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz -Source0: ocplib-endian-0.3.tar.gz +Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib optcomp ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 6a6c15ec..e6af6217 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -3,7 +3,7 @@ Release: 0 Summary: The omake build system. Name: omake URL: http://omake.metaprl.org/ -Source0: %{name}-%{version}.tar.gz +Source0: http://omake.metaprl.org/downloads/%{name}-%{version}-0.rc1.tar.gz Patch0: omake-1-warnings License: GPL Group: Development/Tools diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index e6f677ef..320fef90 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -5,7 +5,7 @@ Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor URL: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz -Source0: nova-%{version}.tar.gz +Source0: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/nova-%{version}-%{release} diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index c993ec63..88871a10 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -5,7 +5,7 @@ Summary: Optional compilation with cpp-like directives License: BSD3 Group: Development/Other URL: https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz -Source0: optcomp-1.4.tar.gz +Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml diff --git a/SPECS/ounit.spec b/SPECS/ounit.spec index 2d5d9530..a1206976 100644 --- a/SPECS/ounit.spec +++ b/SPECS/ounit.spec @@ -9,7 +9,7 @@ Summary: Unit test framework for OCaml Group: Development/Libraries License: MIT URL: http://ounit.forge.ocamlcore.org/ -Source0: https://forge.ocamlcore.org/frs/download.php/495/ounit-%{version}.tar.gz +Source0: http://forge.ocamlcore.org/frs/download.php/886/ounit-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x diff --git a/SPECS/qmp.spec b/SPECS/qmp.spec index aec72f1a..abc6c596 100644 --- a/SPECS/qmp.spec +++ b/SPECS/qmp.spec @@ -5,7 +5,7 @@ Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xen-org/ocaml-qmp -Source0: ocaml-qmp-0.9.0.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/re.spec b/SPECS/re.spec index 0ef44f21..8c6a26ca 100644 --- a/SPECS/re.spec +++ b/SPECS/re.spec @@ -5,7 +5,7 @@ Summary: A regular expression library for OCaml License: LGPL Group: Development/Other URL: http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1 -Source0: ocaml-re-1.2.1.tar.gz +Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/rpc.spec b/SPECS/rpc.spec index d200e72d..26fb2088 100644 --- a/SPECS/rpc.spec +++ b/SPECS/rpc.spec @@ -5,7 +5,7 @@ Summary: An RPC library for OCaml License: LGPL Group: Development/Other URL: https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz -Source0: ocaml-rpc-1.4.1.tar.gz +Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-type-conv xmlm-devel js_of_ocaml-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib ocaml-type-conv ocaml-camlp4-devel diff --git a/SPECS/sexplib.spec b/SPECS/sexplib.spec index 9e0d333c..3e608a87 100644 --- a/SPECS/sexplib.spec +++ b/SPECS/sexplib.spec @@ -6,7 +6,7 @@ Summary: Convert values to and from s-expressions in OCaml Group: Development/Other License: LGPLv2+ with exceptions and BSD URL: https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz -Source0: sexplib-%{version}.tar.gz +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml >= 4.00.0 diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index b197374d..b2ed9def 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -5,7 +5,7 @@ Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other URL: https://github.com/xen-org/sm-cli/archive/sm-cli-%{version}.tar.gz -Source0: sm-cli-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 057ac2e2..fac0550a 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -5,7 +5,7 @@ Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz -Source0: squeezed-0.9.0.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/ssl.spec b/SPECS/ssl.spec index 7b36f16e..aa9ed667 100644 --- a/SPECS/ssl.spec +++ b/SPECS/ssl.spec @@ -5,7 +5,7 @@ Summary: Use OpenSSL from OCaml License: LGPL Group: Development/Other URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib openssl-devel Requires: ocaml ocaml-findlib openssl diff --git a/SPECS/stdext.spec b/SPECS/stdext.spec index 7e486db4..2c592786 100644 --- a/SPECS/stdext.spec +++ b/SPECS/stdext.spec @@ -5,7 +5,7 @@ Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Other URL: https://github.com/xen-org/stdext/archive/stdext-%{version}.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: https://github.com/xen-org/stdext/archive/stdext-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/syslog.spec b/SPECS/syslog.spec index 2e479e3b..b306f8fa 100644 --- a/SPECS/syslog.spec +++ b/SPECS/syslog.spec @@ -5,7 +5,7 @@ Summary: Syslog bindings for OCaml License: LGPL Group: Development/Other URL: http://opam.ocamlpro.com/pkg/syslog.1.4.html -Source0: syslog-1.4.tar.gz +Source0: http://godi-backup2.camlcity.org/godi-backup/syslog-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/tapctl.spec b/SPECS/tapctl.spec index 777c1113..5671105e 100644 --- a/SPECS/tapctl.spec +++ b/SPECS/tapctl.spec @@ -5,7 +5,7 @@ Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other URL: https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz -Source0: tapctl-0.9.0.tar.gz +Source0: https://github.com/xen-org/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexec-devel ocaml-stdext-devel ocaml-rpc-devel diff --git a/SPECS/text.spec b/SPECS/text.spec index 71a21642..610b0a4a 100644 --- a/SPECS/text.spec +++ b/SPECS/text.spec @@ -9,7 +9,7 @@ Summary: OCaml-Text is a library for dealing with ``text'', i.e. sequence Group: Development/Libraries License: BSD URL: http://forge.ocamlcore.org/projects/ocaml-text -Source0: http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-%{version}.tar.gz +Source0: http://forge.ocamlcore.org/frs/download.php/937/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x diff --git a/SPECS/type_conv.spec b/SPECS/type_conv.spec index dba91fef..8156f1db 100644 --- a/SPECS/type_conv.spec +++ b/SPECS/type_conv.spec @@ -6,7 +6,7 @@ Summary: OCaml base library for type conversion Group: Development/Other License: LGPLv2+ with exceptions and BSD URL: http://www.ocaml.info/home/ocaml_sources.html#type-conv -Source0: type_conv-%{version}.tar.gz +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz #Patch0: type-conv-META.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/uri.spec b/SPECS/uri.spec index b2b1c384..951c8adc 100644 --- a/SPECS/uri.spec +++ b/SPECS/uri.spec @@ -5,7 +5,7 @@ Summary: A URI library for OCaml License: ISC Group: Development/Other URL: https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz -Source0: ocaml-uri-1.3.8.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-re-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 3b9278d6..cd93363e 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -5,7 +5,7 @@ Summary: utop is a toplevel for OCaml which can run in a terminal or in e License: BSD Group: Development/Other URL: https://github.com/diml/utop/archives/%{version}.tar.gz -Source0: utop-%{version}.tar.gz +Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel diff --git a/SPECS/uuidm.spec b/SPECS/uuidm.spec index 8b8b98ff..9f5322b3 100644 --- a/SPECS/uuidm.spec +++ b/SPECS/uuidm.spec @@ -5,7 +5,7 @@ Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 Group: Development/Other URL: http://erratique.ch/software/uuidm -Source0: uuidm-0.9.5.tbz +Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index d703bd4f..dab2721c 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -4,7 +4,7 @@ Version: 0.1 Release: 1 License: GPL Group: System/Hypervisor -Source0: %{name}-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: xen-devel diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index a2e8db0d..3668196f 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -5,7 +5,7 @@ Summary: Allows the manipulation of libvirt storage pools and volumes via License: LGPL Group: Development/Other URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-%{version}.tar.gz -Source0: xapi-libvirt-storage-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c4b1dec8..996cc409 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -7,7 +7,7 @@ Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org -Source0: xen-api-%{version}.tar.gz +Source0: https://github.com/djs55/xen-api/archive/%{version}/xen-api-%{version}.tar.gz Source1: xen-api-xapi-conf Source2: xen-api-init Source3: xen-api-xapissl diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 104f3c01..8795c845 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -5,7 +5,7 @@ Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-%{version}.tar.gz -Source0: xcp-idl-%{version}.tar.gz +Source0: https://github.com/xen-org/xcp-idl/archive/xcp-idl-%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel diff --git a/SPECS/xcp-inventory.spec b/SPECS/xcp-inventory.spec index b2cf84e6..132b8da3 100644 --- a/SPECS/xcp-inventory.spec +++ b/SPECS/xcp-inventory.spec @@ -5,7 +5,7 @@ Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xen-org/xcp-inventory -Source0: xcp-inventory-0.9.0.tar.gz +Source0: https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 3b7085ec..55f436be 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -5,7 +5,7 @@ Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz -Source0: xcp-networkd-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf diff --git a/SPECS/xcp-rrd.spec b/SPECS/xcp-rrd.spec index 54d972f5..2628db31 100644 --- a/SPECS/xcp-rrd.spec +++ b/SPECS/xcp-rrd.spec @@ -5,7 +5,7 @@ Summary: Round-Robin Datasources in OCaml License: LGPL Group: Development/Other URL: https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-%{version}.tar.gz -Source0: xcp-rrd-%{version}.tar.gz +Source0: https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index e85f8ba6..ea350ed4 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -5,7 +5,7 @@ Summary: Statistics gathering daemon for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xen-org/xcp-rrdd/archive/%{version}.tar.gz -Source0: xcp-rrdd-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index e9186452..43fec4a7 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -5,7 +5,7 @@ Summary: Creates default XenServer templates License: LGPL Group: Development/Other URL: https://github.com/djs55/xcp-guest-templates/%{version}.tar.gz -Source0: xe-create-templates-%{version}.tar.gz +Source0: https://github.com/xen-org/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel diff --git a/SPECS/xen-api-client.spec b/SPECS/xen-api-client.spec index 18d923c3..972b8821 100644 --- a/SPECS/xen-api-client.spec +++ b/SPECS/xen-api-client.spec @@ -5,7 +5,7 @@ Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 Group: Development/Libraries URL: https://github.com/xen-org/xen-api-client -Source0: xen-api-client-%{version}.tar.gz +Source0: https://github.com/xen-org/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel ocaml-ssl-devel openssl openssl-devel ocaml-ounit-devel ocaml-cohttp-devel ocaml-uri-devel xmlm-devel ocaml-rpc-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/xen-api-libs-transitional.spec b/SPECS/xen-api-libs-transitional.spec index d9e11324..309c98ed 100644 --- a/SPECS/xen-api-libs-transitional.spec +++ b/SPECS/xen-api-libs-transitional.spec @@ -5,7 +5,7 @@ Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xen-org/xen-api-libs-transitional -Source0: xen-api-libs-transitional-0.9.0.tar.gz +Source0: https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-%{version}/xen-api-libs-transitional-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexec-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/xen-lowlevel-libs.spec index 106ee9f2..4ee51a7e 100644 --- a/SPECS/xen-lowlevel-libs.spec +++ b/SPECS/xen-lowlevel-libs.spec @@ -5,7 +5,7 @@ Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 6081c293..84819877 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -5,7 +5,7 @@ Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-%{version}.tar.gz -Source0: xenops-cli-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/xenops.spec b/SPECS/xenops.spec index 4b6f91ed..863e0f68 100644 --- a/SPECS/xenops.spec +++ b/SPECS/xenops.spec @@ -5,7 +5,7 @@ Summary: Low-level xen control operations OCaml License: LGPL Group: Development/Other URL: https://github.com/xen-org/xenops/archive/xenops-%{version}.tar.gz -Source0: ocaml-xenops-%{version}.tar.gz +Source0: https://github.com/xen-org/xenops/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 2305f5d8..33a68483 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -5,7 +5,7 @@ Summary: Simple VM manager License: LGPL Group: Development/Other URL: https://github.com/xen-org/xenopsd/archive/xenopsd-%{version}.tar.gz -Source0: xenopsd-%{version}.tar.gz +Source0: https://github.com/djs55/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 7547fdf4..03947e52 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -7,7 +7,7 @@ Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard -Source0: xenserver-install-wizard-%{version}.tar.gz +Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: python newt xapi-python-devel diff --git a/SPECS/xenstore-clients.spec b/SPECS/xenstore-clients.spec index 20860742..8780f8a1 100644 --- a/SPECS/xenstore-clients.spec +++ b/SPECS/xenstore-clients.spec @@ -5,7 +5,7 @@ Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other URL: https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-%{version}.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel diff --git a/SPECS/xenstore.spec b/SPECS/xenstore.spec index 82f93cdb..c5f6d50a 100644 --- a/SPECS/xenstore.spec +++ b/SPECS/xenstore.spec @@ -5,7 +5,7 @@ Summary: Xenstore protocol implementation in OCaml License: LGPL Group: Development/Other URL: https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz -Source0: %{name}-%{version}.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 446099da..c1e81246 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -5,7 +5,7 @@ Summary: Streaming XML input/output for OCaml License: BSD3 Group: Development/Other URL: http://erratique.ch/software/xmlm -Source0: xmlm-1.1.1.tbz +Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 30f33c43..9c5edd98 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -5,7 +5,7 @@ Summary: XenServer IO stat thingy License: LGPL Group: Development/Other URL: https://github.com/xen-org/xsiostat/archive/xsiostat-%{version}.tar.gz -Source0: xsiostat-%{version}.tar.gz +Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %description diff --git a/SPECS/yojson.spec b/SPECS/yojson.spec index 69a6f9e4..49e585c6 100644 --- a/SPECS/yojson.spec +++ b/SPECS/yojson.spec @@ -5,7 +5,7 @@ Summary: A JSON parser and priter for OCaml License: BSD3 Group: Development/Other URL: http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz -Source0: yojson-1.1.6.tar.gz +Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib cppo easy-format biniou Requires: ocaml ocaml-findlib diff --git a/SPECS/zed.spec b/SPECS/zed.spec index c6f364d0..6b373b41 100644 --- a/SPECS/zed.spec +++ b/SPECS/zed.spec @@ -5,7 +5,7 @@ Summary: An abstract engine for text editing for OCaml License: BSD3 Group: Development/Other URL: http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz -Source0: zed-1.2.tar.gz +Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-react-devel Requires: ocaml ocaml-findlib From 21c3b5c180118d16e4c5ab9e1d320101d453eec6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 5 Jul 2013 10:14:52 +0100 Subject: [PATCH 0230/1125] build: Remove unnecessary build directory name overrides If the source tarball expands to produce a directory called %{name}-%{version}, RPM will automatically find it. -n is only needed when the directory produced by the tarball has a name which doesn't fit this pattern. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/cmdliner.spec | 2 +- SPECS/cohttp.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/cstruct.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/eliloader.spec | 2 +- SPECS/fd-send-recv.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/qmp.spec | 2 +- SPECS/re.spec | 2 +- SPECS/rpc.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/ssl.spec | 2 +- SPECS/text.spec | 2 +- SPECS/uri.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/vncterm.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsiostat.spec | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 09c8a3b4..d38658c2 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -14,7 +14,7 @@ Requires: ocaml ocaml-findlib Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. %prep -%setup -q -n biniou-%{version} +%setup -q %build make diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 9c6d0d37..68ae04a0 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -27,7 +27,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n cmdliner-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/cohttp.spec b/SPECS/cohttp.spec index bbbf7777..d5f2818d 100644 --- a/SPECS/cohttp.spec +++ b/SPECS/cohttp.spec @@ -25,7 +25,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-cohttp-ocaml-cohttp-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make build diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 0803d8f7..0c5549ee 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -14,7 +14,7 @@ Requires: ocaml Equivalent of the C preprocessor for OCaml. %prep -%setup -q -n cppo-%{version} +%setup -q %build make diff --git a/SPECS/cstruct.spec b/SPECS/cstruct.spec index 1103b8a5..442792b8 100644 --- a/SPECS/cstruct.spec +++ b/SPECS/cstruct.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-cstruct-ocaml-cstruct-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index cf9ac892..933191e8 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -23,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n deriving-ocsigen-%{version} +%setup -q %build make diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 82d102a5..6949fceb 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -14,7 +14,7 @@ Requires: ocaml ocaml-findlib Easy_format: indentation made easy. %prep -%setup -q -n easy-format-%{version} +%setup -q %build make diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 64eccc5f..59ec45e3 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -12,7 +12,7 @@ BuildArch: noarch Bootloader for EL-based distros that support Xen. %prep -%setup -q -n xcp-eliloader-master-%{version} +%setup -q -n xcp-%{name}-master-%{version} %build diff --git a/SPECS/fd-send-recv.spec b/SPECS/fd-send-recv.spec index caec80d2..4ef20c6b 100644 --- a/SPECS/fd-send-recv.spec +++ b/SPECS/fd-send-recv.spec @@ -23,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-fd-send-recv-ocaml-fd-send-recv-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 3a5fefc3..8cd8e436 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-tapctl-devel Simple flat file storage manager for the xapi toolstack. %prep -%setup -q -n ffs-ffs-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 69b8cb77..4afb23f8 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -23,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n js_of_ocaml-%{version} +%setup -q %build make diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 8ecce63c..09812b44 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -34,7 +34,7 @@ BuildRequires: openssl openssl-devel A store and forward message switch for OCaml. %prep -%setup -q -n message-switch-message-switch-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 88871a10..e19727eb 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -14,7 +14,7 @@ Requires: ocaml Optional compilation with cpp-like directives. %prep -%setup -q -n optcomp-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/qmp.spec b/SPECS/qmp.spec index abc6c596..3793d8bb 100644 --- a/SPECS/qmp.spec +++ b/SPECS/qmp.spec @@ -24,7 +24,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-qmp-%{version} +%setup -q %build if [ -x ./configure ]; then diff --git a/SPECS/re.spec b/SPECS/re.spec index 8c6a26ca..f5fbf86c 100644 --- a/SPECS/re.spec +++ b/SPECS/re.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-re-ocaml-re-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/rpc.spec b/SPECS/rpc.spec index 26fb2088..db380107 100644 --- a/SPECS/rpc.spec +++ b/SPECS/rpc.spec @@ -23,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-rpc-%{version} +%setup -q %build make diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index b2ed9def..9e74e13e 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-oclock-devel Command-line interface for xapi toolstack storage managers. %prep -%setup -q -n sm-cli-sm-cli-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index fac0550a..d2d7fb08 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -20,7 +20,7 @@ Requires: xen-libs Memory ballooning daemon for the xapi toolstack. %prep -%setup -q -n squeezed-squeezed-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/ssl.spec b/SPECS/ssl.spec index aa9ed667..0a58d1e1 100644 --- a/SPECS/ssl.spec +++ b/SPECS/ssl.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-ssl-%{version} +%setup -q %build ./configure diff --git a/SPECS/text.spec b/SPECS/text.spec index 610b0a4a..0366869d 100644 --- a/SPECS/text.spec +++ b/SPECS/text.spec @@ -38,7 +38,7 @@ developing applications that use %{name}. %prep -%setup -q -n ocaml-text-%{version} +%setup -q ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr %build diff --git a/SPECS/uri.spec b/SPECS/uri.spec index 951c8adc..ebe51aaa 100644 --- a/SPECS/uri.spec +++ b/SPECS/uri.spec @@ -22,7 +22,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-uri-ocaml-uri-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/utop.spec b/SPECS/utop.spec index cd93363e..1f6522bc 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -15,7 +15,7 @@ Requires: ocaml-camomile-data utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... %prep -%setup -q -n utop-%{version} +%setup -q %build ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index dab2721c..7d4ffbb9 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -12,7 +12,7 @@ BuildRequires: xen-devel %description This package contains the vncterm utility %prep -%setup -q -n vncterm-master-%{version} +%setup -q -n %{name}-master-%{version} %patch0 -p1 %build diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 3668196f..21ae46c3 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -17,7 +17,7 @@ BuildRequires: ocaml-oclock-devel Allows the manipulation of libvirt storage pools and volumes via xapi. %prep -%setup -q -n xapi-libvirt-storage-xapi-libvirt-storage-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 55f436be..3632cb7d 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -22,7 +22,7 @@ BuildRequires: ocaml-oclock-devel Simple host networking management service for the xapi toolstack. %prep -%setup -q -n xcp-networkd-xcp-networkd-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index ea350ed4..1d5d45a0 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -20,7 +20,7 @@ BuildRequires: xen-devel Statistics gathering daemon for the xapi toolstack. %prep -%setup -q -n xcp-rrdd-%{version} +%setup -q %build make diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 84819877..e9beb53a 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-oclock-devel Command-line interface for xenopsd, the xapi toolstack domain manager. %prep -%setup -q -n xenops-cli-xenops-cli-%{version} +%setup -q -n %{name}-%{name}-%{version} %build make diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 03947e52..17a7a047 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -15,7 +15,7 @@ Requires: python newt xapi-python-devel A simple wizard to configure a XenServer after install %prep -%setup -q -n xenserver-install-wizard-%{version} +%setup -q %build diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index c1e81246..403e2299 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -28,7 +28,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n xmlm-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 9c5edd98..5bf62a12 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -12,7 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Simple XenServer IO stat thingy %prep -%setup -q -n xsiostat-%{version} +%setup -q %build make From a8ba07c19c529f2a1c5d8220e03db954cab1fa37 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 5 Jul 2013 09:46:32 +0100 Subject: [PATCH 0231/1125] build: Move tarball downloading into the makefile With source URLs now embedded in the spec files, we can generate rules to download the tarballs needed to build each SRPM. Signed-off-by: Euan Harris --- fetch.py | 50 -------------------------------------- makemake.py | 22 +++++++++++++++++ sources.csv | 70 ----------------------------------------------------- 3 files changed, 22 insertions(+), 120 deletions(-) delete mode 100755 fetch.py delete mode 100644 sources.csv diff --git a/fetch.py b/fetch.py deleted file mode 100755 index b2e0dd2f..00000000 --- a/fetch.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python - -import os.path, sys -from subprocess import call - -SOURCES="./SOURCES" -SPECS="./SPECS" - -number_skipped = 0 -number_fetched = 0 - -def fetch(spec, url, override): - global number_skipped, number_fetched - - # check the .spec file exists - spec_path = os.path.join(SPECS, spec) - if not(os.path.exists(spec_path)): - print >>sys.stderr, "%s doesn't exist" % spec_path - exit(1) - - final_name = url.split("/")[-1] - if override <> "": - final_name = override - final_path = os.path.join(SOURCES, final_name) - if os.path.exists(final_path): - number_skipped = number_skipped + 1 - else: - print "fetching %s -> %s" % (url, final_path) - call(["curl", "-L", "-o", final_path, url]) - number_fetched = number_fetched + 1 - print "generating SRPM from %s" % spec_path - call(["rpmbuild", "-bs", spec_path]) - -if __name__ == "__main__": - if not(os.path.exists(SOURCES)): - print >>sys.stderr, "SOURCES dir doesn't exist: %s" % SOURCES - exit(1) - f = open("sources.csv", "r") - lines = f.readlines() - f.close() - for line in lines: - line = line.strip() - if line == "": - continue - if line.startswith('#'): - continue - spec, url, override = line.split(",") - fetch(spec, url, override) - print "number of packages skipped: %d" % number_skipped - print "number of packages fetched: %d" % number_fetched diff --git a/makemake.py b/makemake.py index a87f3c9d..3f2dec95 100755 --- a/makemake.py +++ b/makemake.py @@ -4,6 +4,7 @@ import rpm import os +import urlparse # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -73,6 +74,27 @@ def rpmNameFromHeader( h ): return rpmname return [rpmNameFromHeader( p.header ) for p in spec.packages] +# Rules to download sources + +# Assumes each RPM only needs one download - we have some multi-source +# packages but in all cases the additional sources are patches provided +# in the Git repository +for specname, spec in specs.iteritems(): + # The RPM documentation says that RPM only cares about the basename + # of the path given in a Source: tag. spec.sourceHeader['url'] + # enforces this - even if we have a URL in the source tag, it + # will only give us the basename. However the full tag text is + # available in spec.sources. It's not clear whether or not we + # can rely on this as part of the RPM library API. + + for (source, _, _) in spec.sources: + url = urlparse.urlparse( source ) + if url.scheme is not "": + print '%s: %s' % ( + os.path.join( src_dir, os.path.basename( url.path ) ), + os.path.join( spec_dir, specname ) ) + print '\tcurl -L -o $@ %s' % source + # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) diff --git a/sources.csv b/sources.csv deleted file mode 100644 index b8f4d154..00000000 --- a/sources.csv +++ /dev/null @@ -1,70 +0,0 @@ -# spec file, Download url, filename override (optional) -# -cdrom.spec,https://github.com/xen-org/cdrom/archive/cdrom-0.9.1/cdrom-0.9.1.tar.gz, -cmdliner.spec,http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz, -cohttp.spec,https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz, -cstruct.spec,https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1/ocaml-cstruct-0.7.1.tar.gz, -ffs.spec,https://github.com/xen-org/ffs/archive/ffs-0.9.5/ffs-0.9.5.tar.gz, -forkexecd.spec,https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0/forkexecd-0.9.0.tar.gz, -libvhd.spec,https://github.com/xen-org/libvhd/archive/libvhd-0.9.1/libvhd-0.9.1.tar.gz, -message-switch.spec,https://github.com/xen-org/message-switch/archive/message-switch-0.10.0/message-switch-0.10.0.tar.gz, -nbd.spec,https://github.com/xen-org/nbd/archive/nbd-0.9.0/nbd-0.9.0.tar.gz, -netdev.spec,https://github.com/xen-org/netdev/archive/netdev-0.9.0/netdev-0.9.0.tar.gz, -obuild.spec,https://github.com/vincenthz/obuild/archive/v0.0.2/obuild-0.0.2.tar.gz, -oclock.spec,http://github.com/polazarus/oclock/archive/v0.3/oclock-0.3.tar.gz, -qmp.spec,https://github.com/xen-org/ocaml-qmp/archive/0.9.0/ocaml-qmp-0.9.0.tar.gz, -re.spec,http://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.1/ocaml-re-1.2.1.tar.gz, -rpc.spec,https://github.com/samoht/ocaml-rpc/archive/1.4.1/ocaml-rpc-1.4.1.tar.gz, -sm-cli.spec,https://github.com/xen-org/sm-cli/archive/sm-cli-0.9.1/sm-cli-0.9.1.tar.gz, -syslog.spec,http://godi-backup2.camlcity.org/godi-backup/syslog-1.4.tar.gz, -tapctl.spec,https://github.com/xen-org/tapctl/archive/tapctl-0.9.0/tapctl-0.9.0.tar.gz, -uri.spec,https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8/ocaml-uri-1.3.8.tar.gz, -uuidm.spec,http://erratique.ch/software/uuidm/releases/uuidm-0.9.5.tbz, -xapi-libvirt-storage.spec,https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-0.9.1/xapi-libvirt-storage-0.9.1.tar.gz, -xcp-rrd.spec,https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-0.9.0/xcp-rrd-0.9.0.tar.gz, -xcp-idl.spec,https://github.com/xen-org/xcp-idl/archive/xcp-idl-0.9.7/xcp-idl-0.9.7.tar.gz, -xen-api-client.spec,https://github.com/xen-org/xen-api-client/archive/0.9.4/xen-api-client-0.9.4.tar.gz, -xenops-cli.spec,https://github.com/xen-org/xenops-cli/archive/xenops-cli-0.9.1/xenops-cli-0.9.1.tar.gz, -xmlm.spec,http://erratique.ch/software/xmlm/releases/xmlm-1.1.1.tbz, -yojson.spec,http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz, -fd-send-recv.spec,https://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1/ocaml-fd-send-recv-1.0.1.tar.gz, -cppo.spec,http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz, -deriving-ocsigen.spec,http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz, -optcomp.spec,https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz, -easy-format.spec,http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz, -biniou.spec,http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz, -ocplib-endian.spec,https://github.com/OCamlPro/ocplib-endian/archive/0.3/ocplib-endian-0.3.tar.gz, -ounit.spec,http://forge.ocamlcore.org/frs/download.php/886/ounit-1.1.2.tar.gz, -lwt.spec,http://ocsigen.org/download/lwt-2.4.3.tar.gz, -react.spec,http://erratique.ch/software/react/releases/react-0.9.4.tbz, -text.spec,http://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz, -bitstring.spec,http://bitstring.googlecode.com/files/ocaml-bitstring-2.0.4.tar.gz, -omake.spec,http://omake.metaprl.org/downloads/omake-0.9.8.6-0.rc1.tar.gz,omake-0.9.8.6.tar.gz -type_conv.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/type_conv-109.20.00.tar.gz, -js_of_ocaml.spec,http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz, -ssl.spec,http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz, -xenstore.spec,https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1/ocaml-xenstore-1.2.1.tar.gz, -stdext.spec,https://github.com/xen-org/stdext/archive/stdext-0.9.0/ocaml-stdext-0.9.0.tar.gz, -xen-lowlevel-libs.spec,https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-0.9.5/ocaml-xen-lowlevel-libs-0.9.5.tar.gz, -vncterm.spec,https://github.com/xen-org/vncterm/archive/master/0.1/vncterm-0.1.tar.gz, -ocaml-libvirt.spec,http://libvirt.org/sources/ocaml/ocaml-libvirt-0.6.1.2.tar.gz, -xenopsd.spec,https://github.com/djs55/xenopsd/archive/xenopsd-0.9.14/xenopsd-0.9.14.tar.gz, -sexplib.spec,https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz, -xenstore-clients.spec,https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-0.9.0/ocaml-xenstore-clients-0.9.0.tar.gz, -squeezed.spec,https://github.com/xen-org/squeezed/archive/squeezed-0.9.0/squeezed-0.9.0.tar.gz, -xcp-networkd.spec,https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-0.9.2/xcp-networkd-0.9.2.tar.gz, -xcp-inventory.spec,https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-0.9.0/xcp-inventory-0.9.0.tar.gz, -xen-api-libs-transitional.spec,https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-0.9.0/xen-api-libs-transitional-0.9.0.tar.gz, -xapi.spec,https://github.com/djs55/xen-api/archive/1.9.14/xen-api-1.9.14.tar.gz, -camomile.spec,http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2, -zed.spec,http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz, -lambda-term.spec,http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz, -utop.spec,https://github.com/diml/utop/archive/1.5/utop-1.5.tar.gz, -xenserver-install-wizard.spec,https://github.com/djs55/xenserver-install-wizard/archive/0.2.11/xenserver-install-wizard-0.2.11.tar.gz, -libvirt.spec,http://libvirt.org/sources/stable_updates/libvirt-0.10.2.4.tar.gz, -xe-create-templates.spec,https://github.com/xen-org/xcp-guest-templates/archive/0.9.1/xe-create-templates-0.9.1.tar.gz, -xcp-rrdd.spec,https://github.com/xen-org/xcp-rrdd/archive/0.9.0/xcp-rrdd-0.9.0.tar.gz, -xenops.spec,https://github.com/xen-org/xenops/archive/0.9.0/ocaml-xenops-0.9.0.tar.gz, -xsiostat.spec,https://github.com/xenserver/xsiostat/archive/0.2.0/xsiostat-0.2.0.tar.gz, -eliloader.spec,https://github.com/djs55/xcp-eliloader/archive/master/0.3/eliloader-0.3.tar.gz, -openstack-xapi-plugins.spec,https://launchpad.net/nova/grizzly/2013.1.2/+download/nova-2013.1.2.tar.gz, From 45acf29074b2acefb8bc7e65af43d5383cbe570a Mon Sep 17 00:00:00 2001 From: James Bulpin Date: Fri, 5 Jul 2013 18:05:18 +0100 Subject: [PATCH 0232/1125] Add xsconsole spec file. Uses temporary github location pending formal release. --- SPECS/xsconsole.spec | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 SPECS/xsconsole.spec diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec new file mode 100644 index 00000000..b23b6796 --- /dev/null +++ b/SPECS/xsconsole.spec @@ -0,0 +1,39 @@ +Summary: XenServer Host Configuration Console +Name: xsconsole +Version: 0.9.0 +Release: 1 +License: GPL2 +Group: Administration/System +URL: http://github.com/jamesbulpin/xsconsole +Source0: https://github.com/jamesbulpin/xsconsole/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Provides: xsconsole0 +Requires: PyPAM + +%description +Console tool for configuring a XenServer installation. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/bin +mkdir -p $RPM_BUILD_ROOT/usr/lib +make install-base DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_libdir}/xsconsole/*.py +%{_libdir}/xsconsole/*.pyc +%{_libdir}/xsconsole/*.pyo +%{_libdir}/xsconsole/plugins-base +#%{_libdir}/xsconsole/plugins-oem +#%{_libdir}/xsconsole/plugins-extras +%{_bindir}/xsconsole +%doc LICENSE + +%changelog From 03657c48b3d9ea8d6cafc3fd37d927bfa8e04284 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 19 Jul 2013 11:16:27 +0100 Subject: [PATCH 0233/1125] obuild: Remove hard-coded version number from source download URL Signed-off-by: Euan Harris --- SPECS/obuild.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/obuild.spec b/SPECS/obuild.spec index c641fbd9..c37ace21 100644 --- a/SPECS/obuild.spec +++ b/SPECS/obuild.spec @@ -5,7 +5,7 @@ Summary: Simple build tool for OCaml programs License: BSD2 Group: Development/Other URL: http://github.com/vincenthz/obuild -Source0: https://github.com/vincenthz/obuild/archive/v0.0.2/obuild-%{version}.tar.gz +Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml Requires: ocaml From 1545cb2f09d4198ae1597a23938ce57e60d58554 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 30 Jun 2013 17:30:14 +0000 Subject: [PATCH 0234/1125] Update the xenserver install wizard Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 17a7a047..52cc15d9 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.11 +Version: 0.2.12 Release: 0 Group: System/Hypervisor License: LGPL+linking exception From a37f3059725521181ea4f9e95ab61ef3afdfd5b5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 30 Jun 2013 19:24:48 +0000 Subject: [PATCH 0235/1125] Update xapi-libvirt-storage to 0.9.2 Signed-off-by: David Scott --- SPECS/xapi-libvirt-storage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 21ae46c3..4cac2b93 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,5 +1,5 @@ Name: xapi-libvirt-storage -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL From 971656df1daa1c323b8e3c5fe216661cfa2661b6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 3 Jul 2013 15:31:47 +0000 Subject: [PATCH 0236/1125] Update packages to make more openstack-friendly Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 11 +++++++---- SPECS/xapi.spec | 4 ++-- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core.spec | 4 ++-- SPECS/xenserver-install-wizard.spec | 2 +- upload.sh | 1 - 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 8cd8e436..419d5f5e 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.5 +Version: 0.9.8 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 320fef90..c47c5209 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -1,6 +1,6 @@ Name: openstack-xapi-plugins Version: 2013.1.2 -Release: 1 +Release: 2 Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor @@ -19,17 +19,20 @@ XenAPI plugins used by OpenStack to control XenServer. %install rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_sysconfdir} -cp -r plugins/xenserver/xenapi/etc/xapi.d %{buildroot}/%{_sysconfdir} +mkdir -p %{buildroot}/usr/lib/xapi/plugins +cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ %clean rm -rf %{buildroot} %files %defattr(755,root,root,-) -%{_sysconfdir}/xapi.d/ +/usr/lib/xapi/plugins/* %changelog +* Wed Jul 3 2013 David Scott +- Tweak plugins directory to match xapi + * Fri Jun 28 2013 Euan Harris - Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 996cc409..326e4b1d 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.14 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -53,7 +53,7 @@ Libraries for writing XenAPI clients in python. #%patch0 -p0 -b xapi-version.patch %build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins export COMPILE_JAVA=no make version diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 33a68483..4510f6cf 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.14 +Version: 0.9.15 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index fa11d08d..1c4324f4 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.9.0 -Release: 8 +Release: 9 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -11,7 +11,7 @@ Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator Requires: xenops-cli -Requires: openstack-xen-plugins +Requires: openstack-xapi-plugins Requires: ffs xapi-libvirt-storage sm-cli Requires: xcp-networkd Requires: xcp-rrdd diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 52cc15d9..9dcf17f1 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.12 +Version: 0.2.14 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/upload.sh b/upload.sh index 93680b74..93fe796d 100755 --- a/upload.sh +++ b/upload.sh @@ -9,5 +9,4 @@ mkdir -p debug/x86_64 mv RPMS/x86_64/*-debuginfo-*rpm debug/x86_64 createrepo RPMS/x86_64 createrepo debug/x86_64 - rsync -avrz --delete xapi.repo RPMS debug SRPMS $URL From 9f7c9b54c8a30ec6e22d050844cfde79c4c067cc Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 6 Jul 2013 15:47:47 +0000 Subject: [PATCH 0237/1125] A large batch of updates Signed-off-by: David Scott --- SOURCES/fusion-release-xapi.repo | 8 ++++---- SPECS/ffs.spec | 2 +- SPECS/fusion-release.spec | 6 +++--- SPECS/sm-cli.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 4 ++-- SPECS/xcp-idl.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- xapi.repo | 8 ++++---- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo index fd1a19cf..f76f63b6 100644 --- a/SOURCES/fusion-release-xapi.repo +++ b/SOURCES/fusion-release-xapi.repo @@ -1,13 +1,13 @@ [xapi] -name=CentOS-$releasever - xapi -baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/$basearch/ +name=CentOS-$releasever - xenserver tech preview +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/RPMS/ gpgcheck=0 Priority=1 enabled=1 [xapi-source] -name=CentOS-$releasever - xapi Source -baseurl=http://www.uk.xensource.com/~dscott/xapi/SRPMS/ +name=CentOS-$releasever - xenserver tech preview Source +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/SRPMS/ gpgcheck=0 Priority=1 enabled=0 diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 419d5f5e..72e84d47 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.8 +Version: 0.9.11 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/SPECS/fusion-release.spec b/SPECS/fusion-release.spec index eabc2035..2c85d445 100644 --- a/SPECS/fusion-release.spec +++ b/SPECS/fusion-release.spec @@ -1,6 +1,6 @@ -Name: fusion-release -Version: 0.1.0 -Release: 1 +Name: xenserver-tech-preview-release +Version: 0.2.0 +Release: 0 Summary: Yum repositories for xenserver License: GPL Group: Development/Other diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 9e74e13e..4f47571c 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,5 +1,5 @@ Name: sm-cli -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: CLI for xapi toolstack storage managers. License: LGPL diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 4cac2b93..14f60b39 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,5 +1,5 @@ Name: xapi-libvirt-storage -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 326e4b1d..39ab7f58 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.14 -Release: 1 +Version: 1.9.16 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 8795c845..6dddec9b 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.7 +Version: 0.9.8 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 4510f6cf..b31eefd4 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.15 +Version: 0.9.17 Release: 0 Summary: Simple VM manager License: LGPL diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 9dcf17f1..aed31f97 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.14 +Version: 0.2.15 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/xapi.repo b/xapi.repo index 35993c88..f76f63b6 100644 --- a/xapi.repo +++ b/xapi.repo @@ -1,13 +1,13 @@ [xapi] -name=CentOS-$releasever - xapi -baseurl=http://www.uk.xensource.com/~dscott/xapi/RPMS/ +name=CentOS-$releasever - xenserver tech preview +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/RPMS/ gpgcheck=0 Priority=1 enabled=1 [xapi-source] -name=CentOS-$releasever - xapi Source -baseurl=http://www.uk.xensource.com/~dscott/xapi/SRPMS/ +name=CentOS-$releasever - xenserver tech preview Source +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/SRPMS/ gpgcheck=0 Priority=1 enabled=0 From e321f96bca44816e44b9e8bfdae0f8ed052b4b50 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 6 Jul 2013 19:17:14 +0000 Subject: [PATCH 0238/1125] Update ffs Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 72e84d47..7bce9ee4 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.11 +Version: 0.9.12 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL From b2a748fd5747f5b44cfd88edf468ca299de72a02 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 10 Jul 2013 12:30:46 +0000 Subject: [PATCH 0239/1125] Lots and lots of lovely updates Signed-off-by: David Scott --- SOURCES/fusion-release-xapi.repo | 4 ++-- SPECS/ffs.spec | 2 +- SPECS/fusion-release.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-idl.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo index f76f63b6..67efbd2d 100644 --- a/SOURCES/fusion-release-xapi.repo +++ b/SOURCES/fusion-release-xapi.repo @@ -1,13 +1,13 @@ [xapi] name=CentOS-$releasever - xenserver tech preview -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/RPMS/ +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview.20130707.1/RPMS/ gpgcheck=0 Priority=1 enabled=1 [xapi-source] name=CentOS-$releasever - xenserver tech preview Source -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/SRPMS/ +baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview.20130707.1/SRPMS/ gpgcheck=0 Priority=1 enabled=0 diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 7bce9ee4..733822b6 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.12 +Version: 0.9.13 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/SPECS/fusion-release.spec b/SPECS/fusion-release.spec index 2c85d445..16b3445f 100644 --- a/SPECS/fusion-release.spec +++ b/SPECS/fusion-release.spec @@ -1,5 +1,5 @@ Name: xenserver-tech-preview-release -Version: 0.2.0 +Version: 0.3.0 Release: 0 Summary: Yum repositories for xenserver License: GPL diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 4f47571c..5cb00a67 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,5 +1,5 @@ Name: sm-cli -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: CLI for xapi toolstack storage managers. License: LGPL diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index d2d7fb08..43f0cffe 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,6 +1,6 @@ Name: squeezed Version: 0.9.0 -Release: 0 +Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 14f60b39..23fc3750 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,5 +1,5 @@ Name: xapi-libvirt-storage -Version: 0.9.3 +Version: 0.9.5 Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 39ab7f58..35ab3bf5 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.16 +Version: 1.9.17 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xcp-idl.spec b/SPECS/xcp-idl.spec index 6dddec9b..62a1d7bb 100644 --- a/SPECS/xcp-idl.spec +++ b/SPECS/xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.8 +Version: 0.9.9 Release: 0 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 3632cb7d..4be91878 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,6 +1,6 @@ Name: xcp-networkd Version: 0.9.2 -Release: 0 +Release: 1 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 1d5d45a0..ef7cf996 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,6 +1,6 @@ Name: xcp-rrdd Version: 0.9.0 -Release: 0 +Release: 1 Summary: Statistics gathering daemon for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index e9beb53a..628d5483 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -1,6 +1,6 @@ Name: xenops-cli Version: 0.9.1 -Release: 1 +Release: 2 Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index b31eefd4..164c13fb 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.17 -Release: 0 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other From 48f35dd37694c49dfc0e8283ecc5dc4ce9cb1b88 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 22 Jul 2013 13:10:47 +0100 Subject: [PATCH 0240/1125] build: Use correct value of %dist in RPM and SRPM dependencies RPMs are built in the mock chroot, so filenames in dependency rules should use the value of %dist from the mock - typically a CentOS value such as '.el6'. SRPMs are built outside the mock chroot, so their names will include the value of %dist set by the host operating system - for instance '.fc18'. Signed-off-by: Euan Harris --- makemake.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/makemake.py b/makemake.py index 3f2dec95..913edfc3 100755 --- a/makemake.py +++ b/makemake.py @@ -9,11 +9,36 @@ # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) +# Directories where rpmbuild/mock expects to find inputs +# and writes outputs rpm_dir = rpm.expandMacro( '%_rpmdir' ) spec_dir = rpm.expandMacro( '%_specdir' ) srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) src_dir = rpm.expandMacro( '%_sourcedir' ) +# Some RPMs include the value of '%dist' in the release part of the +# filename. In the mock chroot, %dist is set to a CentOS release +# such as '.el6', so RPMs produced by mock will have that in their +# names. However if we generate the dependencies in a Fedora 'host', +# the filenames will be generated with a %dist of '.fc18' instead. +# We can override %dist so these dependencies are named correctly, +# but we (currently) run rpmbuild directly in the host to build the +# SRPMS, so we need to make sure those dependencies use the +# host value of %dist. There should not be any problem with building +# the SRPMs in a distribution that is different to the one in +# which we build RPMs, as an SRPM is just a CPIO archive containing +# the spec file and the source tarball. +# +# Annoyingly, the dist interpolation is done when we read the specfile, +# so we either have to read it twice or rewrite the SRPM name appropriately. + +host_dist = rpm.expandMacro( '%dist' ) +# We could avoid hardcoding this by running +# "mock -r xenserver --chroot "rpm --eval '%dist'" +chroot_dist = '.el6' +rpm.addMacro( 'dist', chroot_dist ) + + print "all: rpms" rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) @@ -41,11 +66,14 @@ def srpmNameFromSpec( spec ): # don't want, so we strip that off srpmname = os.path.basename( rpm.expandMacro( rpmfilenamepat ) ) + rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) rpm.delMacro( 'RELEASE' ) rpm.delMacro( 'ARCH' ) - return srpmname + + # HACK: rewrite %dist if it appears in the filename + return srpmname.replace( chroot_dist, host_dist ) # Rules to build SRPM from SPEC rule_spec_from_srpm = 'rpmbuild -bs $<' From c231c0860e81dc4de2b4be83bff8d2cc51f6a4fa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 25 Jul 2013 11:39:38 +0100 Subject: [PATCH 0241/1125] build: Reduce the volume of output printed during the build Some stages of the build can produce an enormous volume of output, which makes it hard to see what's going on. This change causes make to echo just the name of the command it is running and the target it is building. The commands will still write error messages to standard output if they fail. Signed-off-by: Euan Harris --- makemake.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/makemake.py b/makemake.py index 913edfc3..e78a4b05 100755 --- a/makemake.py +++ b/makemake.py @@ -76,7 +76,6 @@ def srpmNameFromSpec( spec ): return srpmname.replace( chroot_dist, host_dist ) # Rules to build SRPM from SPEC -rule_spec_from_srpm = 'rpmbuild -bs $<' for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) sources = [ os.path.join( src_dir, p ) for p in spec.sourceHeader['source'] ] @@ -86,7 +85,8 @@ def srpmNameFromSpec( spec ): os.path.join( spec_dir, specname ), " ".join( sources ), " ".join( patches ) ) - print '\t%s' % rule_spec_from_srpm + print '\t@echo [RPMBUILD] $@' + print '\t@rpmbuild --quiet -bs $<' def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): @@ -121,7 +121,8 @@ def rpmNameFromHeader( h ): print '%s: %s' % ( os.path.join( src_dir, os.path.basename( url.path ) ), os.path.join( spec_dir, specname ) ) - print '\tcurl -L -o $@ %s' % source + print '\t@echo [CURL] $@' + print '\t@curl --silent --show-error -L -o $@ %s' % source # Rules to build RPMS from SRPMS (uses information from the SPECs to @@ -137,8 +138,10 @@ def rpmNameFromHeader( h ): srpm_path = os.path.join( srpm_dir, srpmname ) rpm_outdir = os.path.dirname( rpm_path ) print '%s: %s' % ( rpm_path, srpm_path ) - print '\tmock -r xenserver --resultdir="%s" $<' % rpm_outdir - print '\tcreaterepo --update %s' % rpm_dir + print '\t@echo [MOCK] $@' + print '\t@mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\t@echo [CREATEREPO] $@' + print '\t@createrepo --quiet --update %s' % rpm_dir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec From 02dc284ea82d4f603b510c060c1e077a290eb19c Mon Sep 17 00:00:00 2001 From: Rob Hoes Date: Thu, 4 Jul 2013 12:20:01 +0100 Subject: [PATCH 0242/1125] Add libnl-3 Signed-off-by: Rob Hoes --- SPECS/libnl3.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 SPECS/libnl3.spec diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec new file mode 100644 index 00000000..fafef1e6 --- /dev/null +++ b/SPECS/libnl3.spec @@ -0,0 +1,101 @@ +Summary: Convenience library for kernel netlink sockets +Group: Development/Libraries +License: LGPLv2 +Name: libnl3 +Version: 3.2.22 +Release: 1%{?dist} +URL: http://www.infradead.org/~tgr/libnl/ +Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz +Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRequires: flex bison +BuildRequires: python + +%description +This package contains a convenience library to simplify +using the Linux kernel's netlink sockets interface for +network manipulation + +%package devel +Summary: Libraries and headers for using libnl3 +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-cli = %{version}-%{release} +Requires: kernel-headers + +%description devel +This package contains various headers for using libnl3 + +%package cli +Summary: Command line interface utils for libnl3 +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description cli +This package contains various libnl3 utils and additional +libraries on which they depend + +%package doc +Summary: API documentation for libnl3 +Group: Documentation +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains libnl3 API documentation + +%prep +%setup -q -n libnl-%{version} + +tar -xzf %SOURCE1 + +%build +%configure --disable-static +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +find $RPM_BUILD_ROOT -name \*.la -delete + +%post -p /sbin/ldconfig +%post cli -p /sbin/ldconfig +%postun -p /sbin/ldconfig +%postun cli -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc COPYING +%exclude %{_libdir}/libnl-cli*.so.* +%{_libdir}/libnl-*.so.* +%config(noreplace) %{_sysconfdir}/* + +%files devel +%defattr(-,root,root,-) +%doc COPYING +%{_includedir}/libnl3/netlink/ +%dir %{_includedir}/libnl3/ +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%files cli +%defattr(-,root,root,-) +%doc COPYING +%{_libdir}/libnl-cli*.so.* +%{_libdir}/libnl/ +%{_sbindir}/* +%{_mandir}/man8/* + +%files doc +%defattr(-,root,root,-) +%doc COPYING +%doc libnl-doc-%{version}/*.html +%doc libnl-doc-%{version}/*.css +%doc libnl-doc-%{version}/stylesheets/* +%doc libnl-doc-%{version}/images/* +%doc libnl-doc-%{version}/images/icons/* +%doc libnl-doc-%{version}/images/icons/callouts/* +%doc libnl-doc-%{version}/api/* + +%changelog +* Thu Jul 04 2013 Simon Rowe - 3.2.22-1 +- Package for CentOS (derived from Fedora) From 7048f25522f69c576cd1d371af6680856a87e79a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 31 Jul 2013 12:20:12 +0100 Subject: [PATCH 0243/1125] README: Remove unnecessary instruction to create RPMS directory Mock creates this directory if it doesn't exist. Signed-off-by: Euan Harris --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 9c614286..e2717098 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ passwd su - git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild -mkdir -p /home//rpmbuild/RPMS/x86_64/ -createrepo /home//rpmbuild/RPMS/x86_64 ./configure.sh sudo cp xenserver.cfg /etc/mock/ From 809293d61658c53edd6af69e27aab3c2ad2f3bc3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 31 Jul 2013 12:21:03 +0100 Subject: [PATCH 0244/1125] build: Take mock configuration from a local directory This removes the need to be root to set up a build environment. Signed-off-by: Euan Harris --- README.md | 2 +- configure.sh | 6 +++++- makemake.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2717098..1a36c129 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ su - git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild ./configure.sh -sudo cp xenserver.cfg /etc/mock/ ./makemake.py > Makefile + make ``` diff --git a/configure.sh b/configure.sh index 42eacefa..8b4b5469 100755 --- a/configure.sh +++ b/configure.sh @@ -1,3 +1,7 @@ #!/bin/sh -sed "s|@HOME@|$HOME|" xenserver.cfg.in > xenserver.cfg +mkdir mock +sed "s|@HOME@|$HOME|" xenserver.cfg.in > mock/xenserver.cfg +ln -s /etc/mock/default.cfg mock/ +ln -s /etc/mock/site-defaults.cfg mock/ +ln -s /etc/mock/logging.ini mock/ diff --git a/makemake.py b/makemake.py index e78a4b05..a1b8f5e7 100755 --- a/makemake.py +++ b/makemake.py @@ -139,7 +139,7 @@ def rpmNameFromHeader( h ): rpm_outdir = os.path.dirname( rpm_path ) print '%s: %s' % ( rpm_path, srpm_path ) print '\t@echo [MOCK] $@' - print '\t@mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir print '\t@echo [CREATEREPO] $@' print '\t@createrepo --quiet --update %s' % rpm_dir From c1248a469198bf8037c75f3ca562a69570521d5d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 31 Jul 2013 17:55:40 +0100 Subject: [PATCH 0245/1125] build: Work around RPM library limitations in RPM 4.8 on CentOS 6.4 CentOS 6.4 ships with RPM 4.8. In this version, the sourceHeader object doesn't seem to handle the 'sources' and 'patches' RPM tags. Asking for spec.sourceHeader['sources'] always returns an empty list. Work around this by using spec.sources, which contains the full paths of sources and patches. Signed-off-by: Euan Harris --- makemake.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/makemake.py b/makemake.py index a1b8f5e7..6ee03801 100755 --- a/makemake.py +++ b/makemake.py @@ -78,13 +78,11 @@ def srpmNameFromSpec( spec ): # Rules to build SRPM from SPEC for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) - sources = [ os.path.join( src_dir, p ) for p in spec.sourceHeader['source'] ] - patches = [ os.path.join( src_dir, p ) for p in spec.sourceHeader['patch'] ] + sources = [ os.path.join( src_dir, os.path.basename( p[0] ) ) for p in spec.sources ] - print '%s: %s %s %s' % (os.path.join( srpm_dir, srpmname ), + print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), os.path.join( spec_dir, specname ), - " ".join( sources ), - " ".join( patches ) ) + " ".join( sources ) ) print '\t@echo [RPMBUILD] $@' print '\t@rpmbuild --quiet -bs $<' From 44d3a46344d5566bc152a136becb65b4164992bf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 31 Jul 2013 18:52:31 +0100 Subject: [PATCH 0246/1125] build: Remove requirement to build in $HOME/rpmbuild Signed-off-by: Euan Harris --- README.md | 4 +++- makemake.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a36c129..30d24e98 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ passwd su - -git clone git://github.com/xen-org/xen-api-rpm-buildroot.git /home//rpmbuild +git clone git://github.com/xen-org/xen-api-rpm-buildroot.git rpmbuild + +cd rpmbuild ./configure.sh diff --git a/makemake.py b/makemake.py index 6ee03801..2ff55ba8 100755 --- a/makemake.py +++ b/makemake.py @@ -84,7 +84,7 @@ def srpmNameFromSpec( spec ): os.path.join( spec_dir, specname ), " ".join( sources ) ) print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet -bs $<' + print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): From c6e38a893e7a9d06e5adc257dfc7e162640d60c6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 1 Aug 2013 10:26:43 +0100 Subject: [PATCH 0247/1125] build: Don't print errors if configure.sh is run more than once Signed-off-by: Euan Harris --- configure.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.sh b/configure.sh index 8b4b5469..1ac12ac8 100755 --- a/configure.sh +++ b/configure.sh @@ -1,7 +1,7 @@ #!/bin/sh -mkdir mock +mkdir -p mock sed "s|@HOME@|$HOME|" xenserver.cfg.in > mock/xenserver.cfg -ln -s /etc/mock/default.cfg mock/ -ln -s /etc/mock/site-defaults.cfg mock/ -ln -s /etc/mock/logging.ini mock/ +ln -fs /etc/mock/default.cfg mock/ +ln -fs /etc/mock/site-defaults.cfg mock/ +ln -fs /etc/mock/logging.ini mock/ From e82b7484af675396fa0de6c541f5fd57556c579e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 1 Aug 2013 10:38:16 +0100 Subject: [PATCH 0248/1125] build: Add a comment about workaround for RPM 4.8 in CentOS 6.4 Signed-off-by: Euan Harris --- makemake.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makemake.py b/makemake.py index 2ff55ba8..958621c7 100755 --- a/makemake.py +++ b/makemake.py @@ -78,6 +78,11 @@ def srpmNameFromSpec( spec ): # Rules to build SRPM from SPEC for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) + + # spec.sourceHeader['sources'] and ['patches'] doesn't work + # in RPM 4.8 on CentOS 6.4. spec.sources contains both + # sources and patches, but with full paths which must be + # chopped. sources = [ os.path.join( src_dir, os.path.basename( p[0] ) ) for p in spec.sources ] print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), From 301b3bb2f15ba441fb058e662b0111fdd53545a2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 1 Aug 2013 13:38:58 +0100 Subject: [PATCH 0249/1125] build: Fix mock's RPM repository path Mock still assumes that RPMS can be found in $HOME/rpmbuild/RPMS. Signed-off-by: Euan Harris --- configure.sh | 2 +- xenserver.cfg.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.sh b/configure.sh index 1ac12ac8..5fa53880 100755 --- a/configure.sh +++ b/configure.sh @@ -1,7 +1,7 @@ #!/bin/sh mkdir -p mock -sed "s|@HOME@|$HOME|" xenserver.cfg.in > mock/xenserver.cfg +sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ diff --git a/xenserver.cfg.in b/xenserver.cfg.in index ad810b20..3ca1d1bc 100644 --- a/xenserver.cfg.in +++ b/xenserver.cfg.in @@ -69,7 +69,7 @@ enabled=0 [mock] name=Mock output -baseurl=file://@HOME@/rpmbuild/RPMS +baseurl=file://@PWD@/RPMS gpgcheck=0 priority=1 enabled=1 From 0794728a692482edd59e40f23df67851537148d2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 1 Aug 2013 15:10:30 +0100 Subject: [PATCH 0250/1125] build: Add short targets for RPMs N.B. Short targets are based on the name directive in the spec file, which may differ from the name of the spec file itself. Signed-off-by: Euan Harris --- makemake.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/makemake.py b/makemake.py index 958621c7..4f2a172f 100755 --- a/makemake.py +++ b/makemake.py @@ -173,8 +173,11 @@ def buildRequiresFromSpec( spec ): for s in specs.values() ] all_rpms = [] -for rpms in [ rpmNamesFromSpec( s ) for s in specs.values() ]: - all_rpms += map( (lambda rpm: os.path.join( rpm_dir, rpm )), rpms ) +for spec in specs.values(): + rpms = rpmNamesFromSpec( spec ) + rpm_paths = map( (lambda rpm: os.path.join( rpm_dir, rpm )), rpms ) + all_rpms += rpm_paths + print "%s: %s" % ( spec.sourceHeader['name'], " ".join( rpm_paths ) ) print "rpms: " + " \\\n\t".join( all_rpms ) From 1643f3deb3206d5b3ace60b508d8fedec37654de Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 1 Aug 2013 17:53:28 +0100 Subject: [PATCH 0251/1125] build: Add a naive mechanism for building packages from local sources To include locally-modified source in a package: 1. Check out the source: git clone https://github.com/euanh/xenserver-install-wizard.git 2. Edit the spec file to refer to this source tree. There is a specific format which must be followed: file:///path/to/checkout#/tarball-version.tar.gz Note the slash after the # - this is vital to make rpmbuild ignore the rest of the URL. In this case: Source0: file:///scratch/xenserver-install-wizard#/%{name}-%{version} 3. Re-run makemake.py and build ./makemake.py > Makefile make xenserver-install-wizard The RPM will use the version number from the spec file. If you have already built and installed a package with this version, you will need to force RPM to install the new one. Alternatively, you can increment the minor version number when you edit the spec file to point at the local tree. Signed-off-by: Euan Harris --- makemake.py | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/makemake.py b/makemake.py index 4f2a172f..830d5677 100755 --- a/makemake.py +++ b/makemake.py @@ -83,7 +83,21 @@ def srpmNameFromSpec( spec ): # in RPM 4.8 on CentOS 6.4. spec.sources contains both # sources and patches, but with full paths which must be # chopped. - sources = [ os.path.join( src_dir, os.path.basename( p[0] ) ) for p in spec.sources ] + sources = [] + for (source, _, _) in spec.sources: + url = urlparse.urlparse( source ) + + # Source comes from a remote HTTP server + if url.scheme in ["http", "https"]: + sources.append( os.path.join( src_dir, os.path.basename( url.path ) ) ) + + # Source comes from a local file or directory + if url.scheme == "file": + sources.append( os.path.join( src_dir, os.path.basename( url.fragment ) ) ) + + # Source is an otherwise unqualified file, probably a patch + if url.scheme == "": + sources.append( os.path.join( src_dir, url.path ) ) print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), os.path.join( spec_dir, specname ), @@ -119,13 +133,27 @@ def rpmNameFromHeader( h ): # can rely on this as part of the RPM library API. for (source, _, _) in spec.sources: - url = urlparse.urlparse( source ) - if url.scheme is not "": + url = urlparse.urlparse( source ) + + # Source comes from a remote HTTP server + if url.scheme in ["http", "https"]: print '%s: %s' % ( - os.path.join( src_dir, os.path.basename( url.path ) ), - os.path.join( spec_dir, specname ) ) + os.path.join( src_dir, os.path.basename( url.path ) ), + os.path.join( spec_dir, specname ) ) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source + + # Source comes from a local file or directory + if url.scheme == "file": + print '%s: %s $(shell find %s)' % ( + os.path.join( src_dir, os.path.basename( url.fragment ) ), + os.path.join( spec_dir, specname ), + url.path ) + print '\t@echo [TAR] $@' + # assume that the directory name is already what's expected by the + # spec file, and tag it with the version number in the tarball + dirname = "%s-%s" % ( os.path.basename( url.path ), spec.sourceHeader['version'] ) + print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % ( url.path, dirname ) # Rules to build RPMS from SRPMS (uses information from the SPECs to From 012831a8e924cdc4c22e636209659e95652e3ec2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 2 Aug 2013 12:51:17 +0100 Subject: [PATCH 0252/1125] build: Rename spec files to match the packages they produce A spec file's name should match the base name of the packages it produces. This makes it easier to find the spec file given an RPM, and to write generic makefile rules. See https://fedoraproject.org/wiki/Packaging:NamingGuidelines?rd=Packaging/NamingGuidelines#Spec_file_name Signed-off-by: Euan Harris --- SPECS/{forkexecd.spec => forkexec.spec} | 0 SPECS/{bitstring.spec => ocaml-bitstring.spec} | 0 SPECS/{camomile.spec => ocaml-camomile.spec} | 0 SPECS/{cdrom.spec => ocaml-cdrom.spec} | 0 SPECS/{cohttp.spec => ocaml-cohttp.spec} | 0 SPECS/{cstruct.spec => ocaml-cstruct.spec} | 0 SPECS/{fd-send-recv.spec => ocaml-fd-send-recv.spec} | 0 SPECS/{lambda-term.spec => ocaml-lambda-term.spec} | 0 SPECS/{libvhd.spec => ocaml-libvhd.spec} | 0 SPECS/{lwt.spec => ocaml-lwt.spec} | 0 SPECS/{nbd.spec => ocaml-nbd.spec} | 0 SPECS/{netdev.spec => ocaml-netdev.spec} | 0 SPECS/{obuild.spec => ocaml-obuild.spec} | 0 SPECS/{oclock.spec => ocaml-oclock.spec} | 0 SPECS/{ocplib-endian.spec => ocaml-ocplib-endian.spec} | 0 SPECS/{ounit.spec => ocaml-ounit.spec} | 0 SPECS/{qmp.spec => ocaml-qmp.spec} | 0 SPECS/{re.spec => ocaml-re.spec} | 0 SPECS/{react.spec => ocaml-react.spec} | 0 SPECS/{rpc.spec => ocaml-rpc.spec} | 0 SPECS/{sexplib.spec => ocaml-sexplib.spec} | 0 SPECS/{ssl.spec => ocaml-ssl.spec} | 0 SPECS/{stdext.spec => ocaml-stdext.spec} | 0 SPECS/{syslog.spec => ocaml-syslog.spec} | 0 SPECS/{tapctl.spec => ocaml-tapctl.spec} | 0 SPECS/{text.spec => ocaml-text.spec} | 0 SPECS/{type_conv.spec => ocaml-type-conv.spec} | 0 SPECS/{uri.spec => ocaml-uri.spec} | 0 SPECS/{uuidm.spec => ocaml-uuidm.spec} | 0 SPECS/{xcp-idl.spec => ocaml-xcp-idl.spec} | 0 SPECS/{xcp-inventory.spec => ocaml-xcp-inventory.spec} | 0 SPECS/{xcp-rrd.spec => ocaml-xcp-rrd.spec} | 0 SPECS/{xen-api-client.spec => ocaml-xen-api-client.spec} | 0 ...ibs-transitional.spec => ocaml-xen-api-libs-transitional.spec} | 0 SPECS/{xen-lowlevel-libs.spec => ocaml-xen-lowlevel-libs.spec} | 0 SPECS/{xenops.spec => ocaml-xenops.spec} | 0 SPECS/{xenstore-clients.spec => ocaml-xenstore-clients.spec} | 0 SPECS/{xenstore.spec => ocaml-xenstore.spec} | 0 SPECS/{yojson.spec => ocaml-yojson.spec} | 0 SPECS/{zed.spec => ocaml-zed.spec} | 0 .../{fusion-release.spec => xenserver-tech-preview-release.spec} | 0 41 files changed, 0 insertions(+), 0 deletions(-) rename SPECS/{forkexecd.spec => forkexec.spec} (100%) rename SPECS/{bitstring.spec => ocaml-bitstring.spec} (100%) rename SPECS/{camomile.spec => ocaml-camomile.spec} (100%) rename SPECS/{cdrom.spec => ocaml-cdrom.spec} (100%) rename SPECS/{cohttp.spec => ocaml-cohttp.spec} (100%) rename SPECS/{cstruct.spec => ocaml-cstruct.spec} (100%) rename SPECS/{fd-send-recv.spec => ocaml-fd-send-recv.spec} (100%) rename SPECS/{lambda-term.spec => ocaml-lambda-term.spec} (100%) rename SPECS/{libvhd.spec => ocaml-libvhd.spec} (100%) rename SPECS/{lwt.spec => ocaml-lwt.spec} (100%) rename SPECS/{nbd.spec => ocaml-nbd.spec} (100%) rename SPECS/{netdev.spec => ocaml-netdev.spec} (100%) rename SPECS/{obuild.spec => ocaml-obuild.spec} (100%) rename SPECS/{oclock.spec => ocaml-oclock.spec} (100%) rename SPECS/{ocplib-endian.spec => ocaml-ocplib-endian.spec} (100%) rename SPECS/{ounit.spec => ocaml-ounit.spec} (100%) rename SPECS/{qmp.spec => ocaml-qmp.spec} (100%) rename SPECS/{re.spec => ocaml-re.spec} (100%) rename SPECS/{react.spec => ocaml-react.spec} (100%) rename SPECS/{rpc.spec => ocaml-rpc.spec} (100%) rename SPECS/{sexplib.spec => ocaml-sexplib.spec} (100%) rename SPECS/{ssl.spec => ocaml-ssl.spec} (100%) rename SPECS/{stdext.spec => ocaml-stdext.spec} (100%) rename SPECS/{syslog.spec => ocaml-syslog.spec} (100%) rename SPECS/{tapctl.spec => ocaml-tapctl.spec} (100%) rename SPECS/{text.spec => ocaml-text.spec} (100%) rename SPECS/{type_conv.spec => ocaml-type-conv.spec} (100%) rename SPECS/{uri.spec => ocaml-uri.spec} (100%) rename SPECS/{uuidm.spec => ocaml-uuidm.spec} (100%) rename SPECS/{xcp-idl.spec => ocaml-xcp-idl.spec} (100%) rename SPECS/{xcp-inventory.spec => ocaml-xcp-inventory.spec} (100%) rename SPECS/{xcp-rrd.spec => ocaml-xcp-rrd.spec} (100%) rename SPECS/{xen-api-client.spec => ocaml-xen-api-client.spec} (100%) rename SPECS/{xen-api-libs-transitional.spec => ocaml-xen-api-libs-transitional.spec} (100%) rename SPECS/{xen-lowlevel-libs.spec => ocaml-xen-lowlevel-libs.spec} (100%) rename SPECS/{xenops.spec => ocaml-xenops.spec} (100%) rename SPECS/{xenstore-clients.spec => ocaml-xenstore-clients.spec} (100%) rename SPECS/{xenstore.spec => ocaml-xenstore.spec} (100%) rename SPECS/{yojson.spec => ocaml-yojson.spec} (100%) rename SPECS/{zed.spec => ocaml-zed.spec} (100%) rename SPECS/{fusion-release.spec => xenserver-tech-preview-release.spec} (100%) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexec.spec similarity index 100% rename from SPECS/forkexecd.spec rename to SPECS/forkexec.spec diff --git a/SPECS/bitstring.spec b/SPECS/ocaml-bitstring.spec similarity index 100% rename from SPECS/bitstring.spec rename to SPECS/ocaml-bitstring.spec diff --git a/SPECS/camomile.spec b/SPECS/ocaml-camomile.spec similarity index 100% rename from SPECS/camomile.spec rename to SPECS/ocaml-camomile.spec diff --git a/SPECS/cdrom.spec b/SPECS/ocaml-cdrom.spec similarity index 100% rename from SPECS/cdrom.spec rename to SPECS/ocaml-cdrom.spec diff --git a/SPECS/cohttp.spec b/SPECS/ocaml-cohttp.spec similarity index 100% rename from SPECS/cohttp.spec rename to SPECS/ocaml-cohttp.spec diff --git a/SPECS/cstruct.spec b/SPECS/ocaml-cstruct.spec similarity index 100% rename from SPECS/cstruct.spec rename to SPECS/ocaml-cstruct.spec diff --git a/SPECS/fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec similarity index 100% rename from SPECS/fd-send-recv.spec rename to SPECS/ocaml-fd-send-recv.spec diff --git a/SPECS/lambda-term.spec b/SPECS/ocaml-lambda-term.spec similarity index 100% rename from SPECS/lambda-term.spec rename to SPECS/ocaml-lambda-term.spec diff --git a/SPECS/libvhd.spec b/SPECS/ocaml-libvhd.spec similarity index 100% rename from SPECS/libvhd.spec rename to SPECS/ocaml-libvhd.spec diff --git a/SPECS/lwt.spec b/SPECS/ocaml-lwt.spec similarity index 100% rename from SPECS/lwt.spec rename to SPECS/ocaml-lwt.spec diff --git a/SPECS/nbd.spec b/SPECS/ocaml-nbd.spec similarity index 100% rename from SPECS/nbd.spec rename to SPECS/ocaml-nbd.spec diff --git a/SPECS/netdev.spec b/SPECS/ocaml-netdev.spec similarity index 100% rename from SPECS/netdev.spec rename to SPECS/ocaml-netdev.spec diff --git a/SPECS/obuild.spec b/SPECS/ocaml-obuild.spec similarity index 100% rename from SPECS/obuild.spec rename to SPECS/ocaml-obuild.spec diff --git a/SPECS/oclock.spec b/SPECS/ocaml-oclock.spec similarity index 100% rename from SPECS/oclock.spec rename to SPECS/ocaml-oclock.spec diff --git a/SPECS/ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec similarity index 100% rename from SPECS/ocplib-endian.spec rename to SPECS/ocaml-ocplib-endian.spec diff --git a/SPECS/ounit.spec b/SPECS/ocaml-ounit.spec similarity index 100% rename from SPECS/ounit.spec rename to SPECS/ocaml-ounit.spec diff --git a/SPECS/qmp.spec b/SPECS/ocaml-qmp.spec similarity index 100% rename from SPECS/qmp.spec rename to SPECS/ocaml-qmp.spec diff --git a/SPECS/re.spec b/SPECS/ocaml-re.spec similarity index 100% rename from SPECS/re.spec rename to SPECS/ocaml-re.spec diff --git a/SPECS/react.spec b/SPECS/ocaml-react.spec similarity index 100% rename from SPECS/react.spec rename to SPECS/ocaml-react.spec diff --git a/SPECS/rpc.spec b/SPECS/ocaml-rpc.spec similarity index 100% rename from SPECS/rpc.spec rename to SPECS/ocaml-rpc.spec diff --git a/SPECS/sexplib.spec b/SPECS/ocaml-sexplib.spec similarity index 100% rename from SPECS/sexplib.spec rename to SPECS/ocaml-sexplib.spec diff --git a/SPECS/ssl.spec b/SPECS/ocaml-ssl.spec similarity index 100% rename from SPECS/ssl.spec rename to SPECS/ocaml-ssl.spec diff --git a/SPECS/stdext.spec b/SPECS/ocaml-stdext.spec similarity index 100% rename from SPECS/stdext.spec rename to SPECS/ocaml-stdext.spec diff --git a/SPECS/syslog.spec b/SPECS/ocaml-syslog.spec similarity index 100% rename from SPECS/syslog.spec rename to SPECS/ocaml-syslog.spec diff --git a/SPECS/tapctl.spec b/SPECS/ocaml-tapctl.spec similarity index 100% rename from SPECS/tapctl.spec rename to SPECS/ocaml-tapctl.spec diff --git a/SPECS/text.spec b/SPECS/ocaml-text.spec similarity index 100% rename from SPECS/text.spec rename to SPECS/ocaml-text.spec diff --git a/SPECS/type_conv.spec b/SPECS/ocaml-type-conv.spec similarity index 100% rename from SPECS/type_conv.spec rename to SPECS/ocaml-type-conv.spec diff --git a/SPECS/uri.spec b/SPECS/ocaml-uri.spec similarity index 100% rename from SPECS/uri.spec rename to SPECS/ocaml-uri.spec diff --git a/SPECS/uuidm.spec b/SPECS/ocaml-uuidm.spec similarity index 100% rename from SPECS/uuidm.spec rename to SPECS/ocaml-uuidm.spec diff --git a/SPECS/xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec similarity index 100% rename from SPECS/xcp-idl.spec rename to SPECS/ocaml-xcp-idl.spec diff --git a/SPECS/xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec similarity index 100% rename from SPECS/xcp-inventory.spec rename to SPECS/ocaml-xcp-inventory.spec diff --git a/SPECS/xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec similarity index 100% rename from SPECS/xcp-rrd.spec rename to SPECS/ocaml-xcp-rrd.spec diff --git a/SPECS/xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec similarity index 100% rename from SPECS/xen-api-client.spec rename to SPECS/ocaml-xen-api-client.spec diff --git a/SPECS/xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec similarity index 100% rename from SPECS/xen-api-libs-transitional.spec rename to SPECS/ocaml-xen-api-libs-transitional.spec diff --git a/SPECS/xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec similarity index 100% rename from SPECS/xen-lowlevel-libs.spec rename to SPECS/ocaml-xen-lowlevel-libs.spec diff --git a/SPECS/xenops.spec b/SPECS/ocaml-xenops.spec similarity index 100% rename from SPECS/xenops.spec rename to SPECS/ocaml-xenops.spec diff --git a/SPECS/xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec similarity index 100% rename from SPECS/xenstore-clients.spec rename to SPECS/ocaml-xenstore-clients.spec diff --git a/SPECS/xenstore.spec b/SPECS/ocaml-xenstore.spec similarity index 100% rename from SPECS/xenstore.spec rename to SPECS/ocaml-xenstore.spec diff --git a/SPECS/yojson.spec b/SPECS/ocaml-yojson.spec similarity index 100% rename from SPECS/yojson.spec rename to SPECS/ocaml-yojson.spec diff --git a/SPECS/zed.spec b/SPECS/ocaml-zed.spec similarity index 100% rename from SPECS/zed.spec rename to SPECS/ocaml-zed.spec diff --git a/SPECS/fusion-release.spec b/SPECS/xenserver-tech-preview-release.spec similarity index 100% rename from SPECS/fusion-release.spec rename to SPECS/xenserver-tech-preview-release.spec From 4b6f436bdb20a0b3a5f29e5c6442f2a32afc5c66 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 2 Aug 2013 13:14:22 +0100 Subject: [PATCH 0253/1125] build: Enforce spec file naming requirements makemake.py will exit with an error if the spec file name does not match the name of the packages it produces. Signed-off-by: Euan Harris --- makemake.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/makemake.py b/makemake.py index 4f2a172f..894bc2ce 100755 --- a/makemake.py +++ b/makemake.py @@ -5,6 +5,7 @@ import rpm import os import urlparse +import sys # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -50,8 +51,14 @@ def specFromFile( spec ): spec_names = os.listdir( spec_dir ) specs = {} -for s in spec_names: - specs[s] = specFromFile( os.path.join( spec_dir, s ) ) +for spec_name in spec_names: + spec = specFromFile( os.path.join( spec_dir, spec_name ) ) + pkg_name = spec.sourceHeader['name'] + if os.path.splitext( spec_name )[0] != pkg_name: + sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) + sys.exit( 1 ) + + specs[spec_name] = spec def srpmNameFromSpec( spec ): h = spec.sourceHeader From cef43c2aee94765bb04f95a2da1bed5f2badd478 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 26 Jul 2013 15:19:32 +0100 Subject: [PATCH 0254/1125] build: Don't override the built-in RPM dependency generator Four ocaml packages overrode RPM's dependency generator. This upset some other packages that depended on them, when not building in a clean mock environment. RPM's builtin dependency generator seems to be doing a fine job, so we don't need this override. Signed-off-by: Euan Harris --- SPECS/ocaml-camomile.spec | 4 ---- SPECS/ocaml-libvirt.spec | 4 ---- SPECS/ocaml-ounit.spec | 2 -- SPECS/ocaml-text.spec | 4 ---- 4 files changed, 14 deletions(-) diff --git a/SPECS/ocaml-camomile.spec b/SPECS/ocaml-camomile.spec index f6686117..9c8541d6 100644 --- a/SPECS/ocaml-camomile.spec +++ b/SPECS/ocaml-camomile.spec @@ -19,10 +19,6 @@ ExcludeArch: ppc64 sparc64 s390 s390x BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc, ocaml-camlp4-devel -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - %description Camomile is a Unicode library for ocaml. Camomile provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index fccd6a76..1f55cb08 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -38,10 +38,6 @@ BuildRequires: libvirt-devel >= 0.2.1 BuildRequires: perl BuildRequires: gawk -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - %description OCaml binding for libvirt. diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index a1206976..bde1b6f3 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -18,8 +18,6 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4 ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc -%define _use_internal_dependency_generator 0 - %description OUnit is a unit test framework for OCaml. It allows one to easily diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 0366869d..1ef6822e 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -18,10 +18,6 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - %description OCaml-Text is a library for dealing with ``text'', i.e. sequence of From 0fd8cca1cec6e070269e3d1a525b041d10fd898e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 2 Aug 2013 13:01:30 +0100 Subject: [PATCH 0255/1125] build: Rename forkexec to forkexecd This matches the package name to the repository name and is the way we handle other daemons such as xenopsd. Signed-off-by: Euan Harris --- SPECS/{forkexec.spec => forkexecd.spec} | 6 +++--- SPECS/ocaml-netdev.spec | 4 ++-- SPECS/ocaml-tapctl.spec | 4 ++-- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xenopsd.spec | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) rename SPECS/{forkexec.spec => forkexecd.spec} (92%) diff --git a/SPECS/forkexec.spec b/SPECS/forkexecd.spec similarity index 92% rename from SPECS/forkexec.spec rename to SPECS/forkexecd.spec index a32bcc18..fe98eac0 100644 --- a/SPECS/forkexec.spec +++ b/SPECS/forkexecd.spec @@ -1,11 +1,11 @@ -Name: forkexec +Name: forkexecd Version: 0.9.0 Release: 1 Summary: A subprocess management service License: LGPL Group: Development/Other URL: https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz -Source0: https://github.com/xen-org/forkexecd/archive/forkexecd-%{version}/forkexecd-%{version}.tar.gz +Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel @@ -19,7 +19,7 @@ A service which starts and manages subprocesses, avoiding the need to manually fork() and exec() in a multithreaded program. %prep -%setup -q -n forkexecd-forkexecd-%{version} +%setup -q -n %{name}-%{name}-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 3de9688e..f04c25e4 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz Source0: https://github.com/xen-org/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib forkexec-devel ocaml-stdext-devel -#required by forkexec +BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel +#required by forkexecd BuildRequires: ocaml-syslog-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 5671105e..e18f39e7 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -8,8 +8,8 @@ URL: https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz Source0: https://github.com/xen-org/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: forkexec-devel ocaml-stdext-devel ocaml-rpc-devel -# required by forkexec +BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel +# required by forkexecd BuildRequires: ocaml-syslog-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 309c98ed..059efb71 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xen-org/xen-api-libs-transitional Source0: https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-%{version}/xen-api-libs-transitional-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexec-devel +BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel BuildRequires: ocaml-xenstore-clients-devel xen-devel ocaml-camlp4-devel BuildRequires: ocaml-syslog-devel diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 35ab3bf5..91a66fc7 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel BuildRequires: ocaml-xcp-idl-devel ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel -BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexec-devel +BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexecd-devel BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 4be91878..9288161f 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -12,7 +12,7 @@ Source3: xcp-networkd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel forkexec-devel ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-stdext-devel forkexecd-devel ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-xen-api-client-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 164c13fb..6a1c6944 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -16,7 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel -BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexec-devel +BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexecd-devel BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel @@ -40,7 +40,7 @@ Simple VM manager for Xen and KVM using libvirt. Summary: %{name} using xc Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: xen-libs vncterm forkexec +Requires: xen-libs vncterm forkexecd %description xc Simple VM manager for Xen using libxc. From be083767344ad9270caf90ca2d9fd53da7125f24 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 7 Aug 2013 13:49:37 +0100 Subject: [PATCH 0256/1125] xapi: Set OCAMLRUNPARAM to enable backtraces Signed-off-by: Euan Harris --- SOURCES/xen-api-init | 1 + 1 file changed, 1 insertion(+) diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index 8f0c2a53..3e1948e4 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -37,6 +37,7 @@ start() { umask 077 echo -n $"Starting xapi: " + OCAMLRUNPARAM=b daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS RETVAL=$? echo From 4b0e4fdf78d724d7c1df698bb54893ac366f21d6 Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Thu, 8 Aug 2013 09:01:35 +0100 Subject: [PATCH 0257/1125] Warn the user not to call their user "mock" Added some text pointing at "mock" install instructions. Using "" "mock" gives a confusing error message: ``` [root@st30 ~]# useradd mock -G mock useradd: group mock exists - if you want to add this user to that group, use -g. ``` --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 30d24e98..8491ba1c 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,26 @@ xen-api-rpm-buildroot RPM buildroot for xen-api and related packages. To use this, clone the repo into ~/rpmbuild. You'll need to set up a user to run mock. +Installing mock +--------------- + +First if running a RHEL/CentOS system then you will need to add the +[EPEL repositories](http://fedoraproject.org/wiki/EPEL). Here is a useful +article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). +After installing mock, type: + +``` +yum install -y mock +``` + Using mock to build these RPMs: ------------------------------- +Mock will refuse to run as root. You must choose a non-privileged user to +run mock as. Type the following as root: + +(Note select a "" which isn't "mock" when typing the commands below) + ``` useradd -G mock passwd From 207628f5f9e4e5e2c9ad0532b214bfc11225d8aa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 8 Aug 2013 09:59:16 +0100 Subject: [PATCH 0258/1125] configure: Initialize the repository in RPMS This is not needed on Fedora, but is needed on ancient CentOS. Fixes #117 Signed-off-by: Euan Harris --- configure.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.sh b/configure.sh index 5fa53880..a5068855 100755 --- a/configure.sh +++ b/configure.sh @@ -1,7 +1,14 @@ #!/bin/sh +echo -n "Writing mock configuration..." mkdir -p mock sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ +echo " done" + +echo -n "Initializing repository..." +createrepo --quiet RPMS +echo " done" + From 999c9513ef631403fa99c5ba4dc372cb942d125b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 8 Aug 2013 12:20:43 +0100 Subject: [PATCH 0259/1125] specs: Change xen-org to xapi-project in URLs Signed-off-by: Euan Harris --- SPECS/ffs.spec | 4 ++-- SPECS/forkexecd.spec | 4 ++-- SPECS/message-switch.spec | 4 ++-- SPECS/ocaml-cdrom.spec | 4 ++-- SPECS/ocaml-fd-send-recv.spec | 4 ++-- SPECS/ocaml-libvhd.spec | 4 ++-- SPECS/ocaml-nbd.spec | 4 ++-- SPECS/ocaml-netdev.spec | 4 ++-- SPECS/ocaml-qmp.spec | 4 ++-- SPECS/ocaml-stdext.spec | 4 ++-- SPECS/ocaml-tapctl.spec | 4 ++-- SPECS/ocaml-xcp-idl.spec | 4 ++-- SPECS/ocaml-xcp-inventory.spec | 4 ++-- SPECS/ocaml-xcp-rrd.spec | 4 ++-- SPECS/ocaml-xen-api-client.spec | 4 ++-- SPECS/ocaml-xen-api-libs-transitional.spec | 4 ++-- SPECS/ocaml-xen-lowlevel-libs.spec | 4 ++-- SPECS/ocaml-xenops.spec | 4 ++-- SPECS/ocaml-xenstore-clients.spec | 4 ++-- SPECS/sm-cli.spec | 4 ++-- SPECS/squeezed.spec | 4 ++-- SPECS/vncterm.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 4 ++-- SPECS/xcp-networkd.spec | 4 ++-- SPECS/xcp-rrdd.spec | 4 ++-- SPECS/xe-create-templates.spec | 2 +- SPECS/xenops-cli.spec | 4 ++-- SPECS/xenopsd.spec | 2 +- SPECS/xsiostat.spec | 2 +- 29 files changed, 54 insertions(+), 54 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 733822b6..b5f41c64 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/ffs/archive/ffs-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ffs/archive/ffs-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index fe98eac0..eee5b3ee 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -4,8 +4,8 @@ Release: 1 Summary: A subprocess management service License: LGPL Group: Development/Other -URL: https://github.com/xen-org/forkexecd/archive/forkexecd-0.9.0.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/forkexecd/archive/forkexecd-0.9.0.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 09812b44..9c127bf1 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -4,8 +4,8 @@ Release: 0 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xen-org/message-switch/archive/message-switch-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/message-switch/archive/message-switch-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index a2021549..76664552 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -4,8 +4,8 @@ Release: 2 Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xen-org/ocaml -Source0: https://github.com/xen-org/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz +URL: http://github.com/xapi-project/ocaml +Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 4ef20c6b..2ec47044 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL Group: Development/Other -URL: http://github.com/xen-org/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: http://github.com/xapi-project/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index c1104fd0..e2ca3344 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -4,8 +4,8 @@ Release: 0 Summary: vhd manipulation via libvhd License: BSD3 Group: Development/Other -URL: http://github.com/xen-org/libvhd -Source0: https://github.com/xen-org/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz +URL: http://github.com/xapi-project/libvhd +Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 4c198530..92e2c65e 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xen-org/nbd -Source0: https://github.com/xen-org/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz +URL: http://github.com/xapi-project/nbd +Source0: https://github.com/xapi-project/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index f04c25e4..2ceaaac7 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/netdev/archive/netdev-0.9.0.tar.gz -Source0: https://github.com/xen-org/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz +URL: https://github.com/xapi-project/netdev/archive/netdev-0.9.0.tar.gz +Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel #required by forkexecd diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 3793d8bb..d1ff668b 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xen-org/ocaml-qmp -Source0: https://github.com/xen-org/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +URL: http://github.com/xapi-project/ocaml-qmp +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 2c592786..545cc203 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/stdext/archive/stdext-%{version}.tar.gz -Source0: https://github.com/xen-org/stdext/archive/stdext-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/stdext/archive/stdext-%{version}.tar.gz +Source0: https://github.com/xapi-project/stdext/archive/stdext-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index e18f39e7..204935a0 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other -URL: https://github.com/xen-org/tapctl/archive/tapctl-0.9.0.tar.gz -Source0: https://github.com/xen-org/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz +URL: https://github.com/xapi-project/tapctl/archive/tapctl-0.9.0.tar.gz +Source0: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 62a1d7bb..25af355a 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-idl/archive/xcp-idl-%{version}.tar.gz -Source0: https://github.com/xen-org/xcp-idl/archive/xcp-idl-%{version}/xcp-idl-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-idl/archive/xcp-idl-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-idl/archive/xcp-idl-%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 132b8da3..37172b8e 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -4,8 +4,8 @@ Release: 1 Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xen-org/xcp-inventory -Source0: https://github.com/xen-org/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz +URL: http://github.com/xapi-project/xcp-inventory +Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 2628db31..b8a40d7f 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Round-Robin Datasources in OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-%{version}.tar.gz -Source0: https://github.com/xen-org/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 972b8821..eda4288f 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -4,8 +4,8 @@ Release: 0 Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 Group: Development/Libraries -URL: https://github.com/xen-org/xen-api-client -Source0: https://github.com/xen-org/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz +URL: https://github.com/xapi-project/xen-api-client +Source0: https://github.com/xapi-project/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel ocaml-ssl-devel openssl openssl-devel ocaml-ounit-devel ocaml-cohttp-devel ocaml-uri-devel xmlm-devel ocaml-rpc-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 059efb71..8247bce1 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xen-org/xen-api-libs-transitional -Source0: https://github.com/xen-org/xen-api-libs-transitional/archive/xen-api-libs-transitional-%{version}/xen-api-libs-transitional-%{version}.tar.gz +URL: http://github.com/xapi-project/xen-api-libs-transitional +Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/xen-api-libs-transitional-%{version}/xen-api-libs-transitional-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 4ee51a7e..2f508419 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 863e0f68..87a5f0ed 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Low-level xen control operations OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenops/archive/xenops-%{version}.tar.gz -Source0: https://github.com/xen-org/xenops/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xenops/archive/xenops-%{version}.tar.gz +Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 8780f8a1..05251e35 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xen-org/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 5cb00a67..3dff2d77 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -4,8 +4,8 @@ Release: 0 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other -URL: https://github.com/xen-org/sm-cli/archive/sm-cli-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/sm-cli/archive/sm-cli-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 43f0cffe..72fca045 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/squeezed/archive/squeezed-0.9.0.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/squeezed/archive/squeezed-0.9.0.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 7d4ffbb9..8174bc59 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -4,7 +4,7 @@ Version: 0.1 Release: 1 License: GPL Group: System/Hypervisor -Source0: https://github.com/xen-org/%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: xen-devel diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 23fc3750..f92f5e38 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -4,8 +4,8 @@ Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xapi-libvirt-storage/archive/xapi-libvirt-storage-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/xapi-libvirt-storage-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 9288161f..de8225b0 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index ef7cf996..74d490b2 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Statistics gathering daemon for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xcp-rrdd/archive/%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-rrdd/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 43fec4a7..53bf5577 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -5,7 +5,7 @@ Summary: Creates default XenServer templates License: LGPL Group: Development/Other URL: https://github.com/djs55/xcp-guest-templates/%{version}.tar.gz -Source0: https://github.com/xen-org/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 628d5483..29937666 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -4,8 +4,8 @@ Release: 2 Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenops-cli/archive/xenops-cli-%{version}.tar.gz -Source0: https://github.com/xen-org/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xenops-cli/archive/xenops-cli-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 6a1c6944..f7aa9a7f 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xenopsd/archive/xenopsd-%{version}.tar.gz +URL: https://github.com/xapi-project/xenopsd/archive/xenopsd-%{version}.tar.gz Source0: https://github.com/djs55/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 5bf62a12..9bbc96e2 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -4,7 +4,7 @@ Release: 0 Summary: XenServer IO stat thingy License: LGPL Group: Development/Other -URL: https://github.com/xen-org/xsiostat/archive/xsiostat-%{version}.tar.gz +URL: https://github.com/xapi-project/xsiostat/archive/xsiostat-%{version}.tar.gz Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From 2ec66a1d0b4e7bad705a641e6711a7df81c3a7b3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 8 Aug 2013 12:23:43 +0100 Subject: [PATCH 0260/1125] configure: Create RPMS if it doesn't exist Signed-off-by: Euan Harris --- configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.sh b/configure.sh index a5068855..63ab9007 100755 --- a/configure.sh +++ b/configure.sh @@ -9,6 +9,7 @@ ln -fs /etc/mock/logging.ini mock/ echo " done" echo -n "Initializing repository..." +mkdir -p RPMS createrepo --quiet RPMS echo " done" From ec80561e0ca5cb21417da67ada10a507f2b81f95 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 8 Aug 2013 12:40:23 +0100 Subject: [PATCH 0261/1125] readme: Fix quotes around in setup instructions Should be backticks, not double quotes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8491ba1c..392140ad 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Using mock to build these RPMs: Mock will refuse to run as root. You must choose a non-privileged user to run mock as. Type the following as root: -(Note select a "" which isn't "mock" when typing the commands below) +(Note select a `` which isn't "mock" when typing the commands below) ``` useradd -G mock From 12661f3257e7d829b740bf557762f3f925ef5808 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 9 Aug 2013 16:16:56 +0100 Subject: [PATCH 0262/1125] specs: Update to latest ocaml-qmp Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index d1ff668b..4703c907 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -1,5 +1,5 @@ Name: ocaml-qmp -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception From 7225ef9d178e2ec408dedc21ce3a3617613cb48a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 9 Aug 2013 16:54:08 +0100 Subject: [PATCH 0263/1125] specs: Update ocaml-qmp changelog Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 4703c907..a401491c 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -47,6 +47,11 @@ rm -rf %{buildroot} %{_libdir}/ocaml/qmp/* %changelog -* Wed May 29 2013 David Scott +* Fri Aug 09 2013 Euan Harris - 0.9.1 +- Change representation of message timestamps from a tuple of ints to + a float. This avoids problems on 32-bit architectures and follows + the example of the OCaml standard library. + +* Wed May 29 2013 David Scott - 0.9.0 - Initial package From 02f381d20a9c25e4f2cc0064bbde25e510943007 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 9 Aug 2013 14:10:43 +0100 Subject: [PATCH 0264/1125] build: Ensure all spec files have mandatory %files list A spec file must have a %files list, even if the list is empty. Some of our base packages don't have %files lists, which causes mock to build them and throw them away. We still generate Makefile rules to build these files, so they are rebuilt and thrown away every time we run make. For library packages, we should move the libraries into the base package; keep only the headers, interfaces or other developer-focussed files in the -devel package, and have the -devel package depend on the base package. Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 3 +++ SPECS/deriving-ocsigen.spec | 3 +++ SPECS/js_of_ocaml.spec | 3 +++ SPECS/ocaml-cdrom.spec | 3 +++ SPECS/ocaml-cohttp.spec | 3 +++ SPECS/ocaml-cstruct.spec | 3 +++ SPECS/ocaml-fd-send-recv.spec | 3 +++ SPECS/ocaml-lambda-term.spec | 3 +++ SPECS/ocaml-libvhd.spec | 3 +++ SPECS/ocaml-lwt.spec | 2 ++ SPECS/ocaml-nbd.spec | 3 +++ SPECS/ocaml-netdev.spec | 3 +++ SPECS/ocaml-oclock.spec | 3 +++ SPECS/ocaml-ocplib-endian.spec | 3 +++ SPECS/ocaml-qmp.spec | 3 +++ SPECS/ocaml-re.spec | 3 +++ SPECS/ocaml-react.spec | 3 +++ SPECS/ocaml-rpc.spec | 3 +++ SPECS/ocaml-ssl.spec | 3 +++ SPECS/ocaml-stdext.spec | 3 +++ SPECS/ocaml-syslog.spec | 3 +++ SPECS/ocaml-tapctl.spec | 3 +++ SPECS/ocaml-text.spec | 3 +++ SPECS/ocaml-uri.spec | 3 +++ SPECS/ocaml-uuidm.spec | 3 +++ SPECS/ocaml-xcp-idl.spec | 3 +++ SPECS/ocaml-xcp-rrd.spec | 3 +++ SPECS/ocaml-xen-api-client.spec | 3 +++ SPECS/ocaml-xen-api-libs-transitional.spec | 3 +++ SPECS/ocaml-xen-lowlevel-libs.spec | 3 +++ SPECS/ocaml-xenops.spec | 3 +++ SPECS/ocaml-xenstore-clients.spec | 3 +++ SPECS/ocaml-xenstore.spec | 3 +++ SPECS/ocaml-yojson.spec | 3 +++ SPECS/ocaml-zed.spec | 3 +++ SPECS/xmlm.spec | 3 +++ 36 files changed, 107 insertions(+) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 68ae04a0..d15e54e0 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -42,6 +42,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README CHANGES diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 933191e8..8437b15d 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -37,6 +37,9 @@ make install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc COPYING README CHANGES diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 4afb23f8..3bd96aec 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -40,6 +40,9 @@ make install BINDIR=%{buildroot}/%{_bindir}/ %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README CHANGES diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 76664552..ece7c63a 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -41,6 +41,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc ChangeLog README.md diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index d5f2818d..3e187f7b 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -39,6 +39,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md CHANGES diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 442792b8..77511a00 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -40,6 +40,9 @@ ocaml setup.ml -install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md CHANGES diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 2ec47044..2474b9f2 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -40,6 +40,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md LICENSE diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 002d76d9..2b9f7083 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -42,6 +42,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE CHANGES diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index e2ca3344..afc04014 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -40,6 +40,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc ChangeLog README.md diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index ac63a96a..6441b23f 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -71,6 +71,8 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so %clean rm -rf $RPM_BUILD_ROOT +%files +# This space intentionally left blank %files devel %defattr(-,root,root,-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 92e2c65e..a1204886 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -41,6 +41,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc ChangeLog README.markdown diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 2ceaaac7..46980d0e 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -42,6 +42,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 02719a06..cf727064 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -47,6 +47,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.markdown diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index eb2a4a10..cd92e805 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -44,6 +44,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc COPYING.txt README.md diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index d1ff668b..e677c0ab 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -40,6 +40,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc ChangeLog README.md LICENSE diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index f5fbf86c..cb55dcd7 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -37,6 +37,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README CHANGES diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 769208b2..1375753d 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -59,6 +59,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root,-) %doc CHANGES README diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index db380107..282fbfac 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -38,6 +38,9 @@ make install DESTDIR=${buildroot} %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 0a58d1e1..d383f58d 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -40,6 +40,9 @@ make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc CHANGES COPYING README diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 545cc203..26afa9f5 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -39,6 +39,9 @@ make install DESTDIR=${buildroot} %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec index b306f8fa..62f6d0f1 100644 --- a/SPECS/ocaml-syslog.spec +++ b/SPECS/ocaml-syslog.spec @@ -36,6 +36,9 @@ make install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc Changelog diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 204935a0..df17e212 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -42,6 +42,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 1ef6822e..83651189 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc rm -rf $RPM_BUILD_ROOT +%files +#This space intentionally left blank + %files devel %defattr(-,root,root,-) %doc /usr/share/doc/ocaml-text/* diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index ebe51aaa..9ab5ac70 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -37,6 +37,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md CHANGES diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 9f5322b3..21bcb906 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -41,6 +41,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README CHANGES diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 25af355a..58ede347 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -52,6 +52,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index b8a40d7f..4f537513 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -37,6 +37,9 @@ make install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index eda4288f..71701b4f 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -42,6 +42,9 @@ OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md CHANGES diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 8247bce1..6f9fd442 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -44,6 +44,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc ChangeLog README.md LICENSE diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 2f508419..ad25c8bf 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -40,6 +40,9 @@ make install DESTDIR=${buildroot} %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 87a5f0ed..1d871772 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -40,6 +40,9 @@ make install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 05251e35..fe57f5a7 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -39,6 +39,9 @@ make install DESTDIR=${buildroot} %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md LICENSE MAINTAINERS diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index c5f6d50a..b59df580 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -37,6 +37,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README CHANGES LICENSE diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 49e585c6..80bc2312 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -37,6 +37,9 @@ make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md LICENSE diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 6b373b41..f0b70fba 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -39,6 +39,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc LICENSE CHANGES diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 403e2299..e57224ac 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -44,6 +44,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip %clean rm -rf %{buildroot} +%files +#This space intentionally left blank + %files devel %defattr(-,root,root) %doc README CHANGES From 981b37f063575fa4f4020a47e81473219401d4c1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 Aug 2013 17:33:27 +0000 Subject: [PATCH 0265/1125] Update xenopsd, ffs --- SPECS/ffs.spec | 6 +++--- SPECS/xenopsd.spec | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index b5f41c64..4acd0317 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,11 +1,11 @@ Name: ffs -Version: 0.9.13 +Version: 0.9.14 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/ffs/archive/ffs-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ffs/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index f7aa9a7f..756fb9a4 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,11 +1,11 @@ Name: xenopsd -Version: 0.9.17 -Release: 1 +Version: 0.9.18 +Release: 0 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xenopsd/archive/xenopsd-%{version}.tar.gz -Source0: https://github.com/djs55/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xenopsd/archive/%{version}.tar.gz +Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init From b2c7407f53114cb5d6289e6e2dae11482e443e2e Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 10:56:09 +0000 Subject: [PATCH 0266/1125] Correct %setup lines in ffs, xenopsd now that our tagging convention is sensible Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- SPECS/xenopsd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 4acd0317..efce12cb 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-tapctl-devel Simple flat file storage manager for the xapi toolstack. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q -n %{name}-%{version} %build make diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 756fb9a4..e40fd127 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -62,7 +62,7 @@ Requires: %{name} = %{version}-%{release} Simple VM manager for Xen using libxenlight %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q -n %{name}-%{version} %build ./configure From ca12cfe5571b0ef073d53c3560d7e69537c8a2a8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 10:57:04 +0000 Subject: [PATCH 0267/1125] Add xenserver-core-latest-snapshot repository RPM Signed-off-by: David Scott --- SOURCES/fusion-release-xapi.repo | 8 +-- SOURCES/fusion-release-xen-c6-tweaked.repo | 7 +++ SPECS/xenserver-core-latest-snapshot.spec | 63 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 SOURCES/fusion-release-xen-c6-tweaked.repo create mode 100644 SPECS/xenserver-core-latest-snapshot.spec diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo index 67efbd2d..7fba7e22 100644 --- a/SOURCES/fusion-release-xapi.repo +++ b/SOURCES/fusion-release-xapi.repo @@ -1,13 +1,13 @@ [xapi] -name=CentOS-$releasever - xenserver tech preview -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview.20130707.1/RPMS/ +name=CentOS-$releasever - xenserver core snapshot +baseurl=http://xenbits.xen.org/djs/xenserver-core-snapshot/RPMS/ gpgcheck=0 Priority=1 enabled=1 [xapi-source] -name=CentOS-$releasever - xenserver tech preview Source -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview.20130707.1/SRPMS/ +name=CentOS-$releasever - xenserver core snapshot Source +baseurl=http://xenbits.xen.org/djs/xenserver-core-snapshot/SRPMS/ gpgcheck=0 Priority=1 enabled=0 diff --git a/SOURCES/fusion-release-xen-c6-tweaked.repo b/SOURCES/fusion-release-xen-c6-tweaked.repo new file mode 100644 index 00000000..0e4a8146 --- /dev/null +++ b/SOURCES/fusion-release-xen-c6-tweaked.repo @@ -0,0 +1,7 @@ +[xen-c6-tweaked] +name=CentOS-$releasever - XenServer temporary Xen override +baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ +gpgcheck=0 +Priority=1 +enabled=1 + diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec new file mode 100644 index 00000000..5a07bf83 --- /dev/null +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -0,0 +1,63 @@ +Name: xenserver-core-latest-snapshot +Version: 0.1.0 +Release: 0 +Summary: Yum repositories for xenserver +License: GPL +Group: Development/Other +URL: http://www.xen.org/ +Source0: fusion-release-xapi.repo +Source1: fusion-release-xen-c6.repo +Source2: fusion-release-xen-c6-RC1.repo +Source3: fusion-release-epel.repo +Source4: fusion-release-epel-testing.repo +Source5: fusion-release-remi.repo +Source6: fusion-release-RPM-GPG-KEY-EPEL-6 +Source7: fusion-release-RPM-GPG-KEY-remi +Source8: fusion-release-xen-c6-tweaked.repo + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} + +%description +A virtual package which installs the xenserver yum repos. + +%prep + +%build + +%install +mkdir -p %{buildroot}/etc/yum.repos.d +install -m 0644 %{_sourcedir}/fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo +install -m 0644 %{_sourcedir}/fusion-release-xen-c6-tweaked.repo %{buildroot}/etc/yum.repos.d/xen-c6-tweaked.repo +#install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo +#install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo +install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo +install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo +install -m 0644 %{_sourcedir}/fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo +mkdir -p %{buildroot}/etc/pki/rpm-gpg/ +install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +%clean +rm -rf %{buildroot} + +%post +yum repolist + +%postun +yum repolist + +%files +%defattr(-,root,root) +/etc/yum.repos.d/xapi.repo +#/etc/yum.repos.d/xen-c6.repo +#/etc/yum.repos.d/xen-c6-RC1.repo +/etc/yum.repos.d/epel.repo +/etc/yum.repos.d/epel-testing.repo +/etc/yum.repos.d/remi.repo +/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +/etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +%changelog +* Sun Jun 9 2013 David Scott +- Initial package + From 73432c4d0cbf4df57f9cac052d974a3cfb67cb2b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 10:59:29 +0000 Subject: [PATCH 0268/1125] Remove old tech preview release RPM Signed-off-by: David Scott --- SPECS/xenserver-tech-preview-release.spec | 61 ----------------------- 1 file changed, 61 deletions(-) delete mode 100644 SPECS/xenserver-tech-preview-release.spec diff --git a/SPECS/xenserver-tech-preview-release.spec b/SPECS/xenserver-tech-preview-release.spec deleted file mode 100644 index 16b3445f..00000000 --- a/SPECS/xenserver-tech-preview-release.spec +++ /dev/null @@ -1,61 +0,0 @@ -Name: xenserver-tech-preview-release -Version: 0.3.0 -Release: 0 -Summary: Yum repositories for xenserver -License: GPL -Group: Development/Other -URL: http://www.xen.org/ -Source0: fusion-release-xapi.repo -Source1: fusion-release-xen-c6.repo -Source2: fusion-release-xen-c6-RC1.repo -Source3: fusion-release-epel.repo -Source4: fusion-release-epel-testing.repo -Source5: fusion-release-remi.repo -Source6: fusion-release-RPM-GPG-KEY-EPEL-6 -Source7: fusion-release-RPM-GPG-KEY-remi - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} - -%description -A virtual package which installs the xenserver yum repos. - -%prep - -%build - -%install -mkdir -p %{buildroot}/etc/yum.repos.d -install -m 0644 %{_sourcedir}/fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo -#install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo -#install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo -install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo -install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo -install -m 0644 %{_sourcedir}/fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo -mkdir -p %{buildroot}/etc/pki/rpm-gpg/ -install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -%clean -rm -rf %{buildroot} - -%post -yum repolist - -%postun -yum repolist - -%files -%defattr(-,root,root) -/etc/yum.repos.d/xapi.repo -#/etc/yum.repos.d/xen-c6.repo -#/etc/yum.repos.d/xen-c6-RC1.repo -/etc/yum.repos.d/epel.repo -/etc/yum.repos.d/epel-testing.repo -/etc/yum.repos.d/remi.repo -/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -/etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -%changelog -* Sun Jun 9 2013 David Scott -- Initial package - From d07671925607136bec59f3afd771f8dacb1e403a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 10:59:47 +0000 Subject: [PATCH 0269/1125] Fix file list in xenserver-core-latest-snapshot RPM Signed-off-by: David Scott --- SPECS/xenserver-core-latest-snapshot.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 5a07bf83..f34c6204 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -49,6 +49,7 @@ yum repolist %files %defattr(-,root,root) /etc/yum.repos.d/xapi.repo +/etc/yum.repos.d/xen-c6-tweaked.repo #/etc/yum.repos.d/xen-c6.repo #/etc/yum.repos.d/xen-c6-RC1.repo /etc/yum.repos.d/epel.repo From 9eb9e7726fde00c5c8d786b699ddf1dd559ee69b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 11:08:10 +0000 Subject: [PATCH 0270/1125] Update ffs to 0.9.15 --- SPECS/ffs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index efce12cb..71eb92c9 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.14 +Version: 0.9.15 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL From a0fac7725a56931188dece78eb9481a357e11925 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 11:08:24 +0000 Subject: [PATCH 0271/1125] Update xapi to 1.9.18 Signed-off-by: David Scott --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 91a66fc7..484992e9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.17 +Version: 1.9.18 Release: 0 Group: System/Hypervisor License: LGPL+linking exception From 2ac2bfc44e8648308d9efd38d0f065a8879b5f2d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 Aug 2013 11:08:43 +0000 Subject: [PATCH 0272/1125] We need to build against a slightly enhanced xen 4.2.1 There were some backported fixes to the libxl OCaml bindings. Hopefully this will go away once we move to xen 4.3. Signed-off-by: David Scott --- xenserver.cfg.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xenserver.cfg.in b/xenserver.cfg.in index 3ca1d1bc..f6564643 100644 --- a/xenserver.cfg.in +++ b/xenserver.cfg.in @@ -60,6 +60,13 @@ gpgcheck=0 Priority=1 enabled=1 +[xen-c6-tweaked] +name=CentOS-$releasever - XenServer temporary Xen override +baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ +gpgcheck=0 +Priority=1 +enabled=1 + [xen-c6-source] name=CentOS-$releasever - Xen Source baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ From 96e7b3c3406009cdb37058effd259ae9b7cf854e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 17:05:53 +0100 Subject: [PATCH 0273/1125] specs: Remove unneeded setup name parameters Signed-off-by: Euan Harris --- SPECS/ffs.spec | 2 +- SPECS/xenopsd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 71eb92c9..86d7edd4 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-tapctl-devel Simple flat file storage manager for the xapi toolstack. %prep -%setup -q -n %{name}-%{version} +%setup -q %build make diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index e40fd127..735dfaca 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -62,7 +62,7 @@ Requires: %{name} = %{version}-%{release} Simple VM manager for Xen using libxenlight %prep -%setup -q -n %{name}-%{version} +%setup -q %build ./configure From f83b8f94effe3381c6695825205dd59ab8392643 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 11:06:27 +0100 Subject: [PATCH 0274/1125] omake: Rewrite patch to apply with patch -p1 This is needed to let dpkg-source apply this patch. Signed-off-by: Euan Harris --- SOURCES/omake-1-warnings | 6 +++--- SPECS/omake.spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SOURCES/omake-1-warnings b/SOURCES/omake-1-warnings index fe985ce2..18f61c9b 100644 --- a/SOURCES/omake-1-warnings +++ b/SOURCES/omake-1-warnings @@ -1,6 +1,6 @@ -diff -ru /tmp/opam-12040-1582/omake.0.9.8.6-0.rc1/OMakefile /tmp/opam-12040-2422/omake.0.9.8.6-0.rc1/OMakefile ---- /tmp/opam-12040-1582/omake.0.9.8.6-0.rc1/OMakefile 2010-10-27 02:42:37.000000000 +0200 -+++ /tmp/opam-12040-2422/omake.0.9.8.6-0.rc1/OMakefile 2012-10-05 18:14:52.045652506 +0200 +diff -ru old/OMakefile new/OMakefile +--- old/OMakefile ++++ new/OMakefile @@ -57,7 +57,7 @@ # # OCaml options diff --git a/SPECS/omake.spec b/SPECS/omake.spec index e6af6217..b98a0102 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -28,7 +28,7 @@ features, including: %prep %setup -q -%patch0 -p4 -b ~omake-1-warnings +%patch0 -p1 -b ~omake-1-warnings %build INSTALL_ROOT=$RPM_BUILD_ROOT\ From 683d285c18bfce47ccf5b744372330613dc30781 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 10:30:37 +0100 Subject: [PATCH 0275/1125] ocaml-camomile: Update spec to latest upstream version Signed-off-by: Euan Harris --- SPECS/ocaml-camomile.spec | 72 +++++++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/SPECS/ocaml-camomile.spec b/SPECS/ocaml-camomile.spec index 9c8541d6..efadb5e9 100644 --- a/SPECS/ocaml-camomile.spec +++ b/SPECS/ocaml-camomile.spec @@ -1,23 +1,24 @@ -#%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define opt 0 -%define debug_package %{nil} +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} Name: ocaml-camomile Version: 0.8.3 -Release: 0 +Release: 10%{?dist} Summary: Unicode library for OCaml -Group: Development/Libraries # Several files are MIT and UCD licensed, but the overall work is LGPLv2+ # and the LGPL/GPL supercedes compatible licenses. # https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html License: LGPLv2+ URL: http://sourceforge.net/projects/camomile/ -Source0: http://prdownloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: ppc64 sparc64 s390 s390x +Source0: http://downloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 3.12.1-12 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc, ocaml-camlp4-devel %description Camomile is a Unicode library for ocaml. Camomile provides Unicode @@ -28,7 +29,6 @@ more. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} @@ -39,7 +39,6 @@ developing applications that use %{name}. %package data Summary: Data files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} @@ -61,22 +60,17 @@ strip tools/*.opt %install -rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p $RPM_BUILD_ROOT%{_bindir} make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir} %if %opt -mv $RPM_BUILD_ROOT%{_bindir}/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap -mv $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef +cp tools/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap +cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %endif -%clean -rm -rf $RPM_BUILD_ROOT - - %files %defattr(-,root,root,-) %doc README @@ -111,6 +105,48 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Oct 19 2012 Richard W.M. Jones - 0.8.3-10 +- Rebuild for OCaml 4.00.1. +- Clean up the spec file. + +* Sat Jul 28 2012 Richard W.M. Jones - 0.8.3-9 +- Bump and rebuild against new OCaml 4.00.0 official release. + +* Fri Jul 20 2012 Fedora Release Engineering - 0.8.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jun 09 2012 Richard W.M. Jones - 0.8.3-7 +- Rebuild for OCaml 4.00.0. + +* Wed Jun 6 2012 Richard W.M. Jones - 0.8.3-6 +- Remove sed hack which worked around segfault on ppc64. Now fixed + in OCaml >= 3.12.1-12. + +* Sun Jun 3 2012 Richard W.M. Jones - 0.8.3-5 +- Remove patch which worked around segfault on ARM. Now fixed + in OCaml >= 3.12.1-9. + +* Wed May 30 2012 Richard W.M. Jones - 0.8.3-4 +- Remove ExcludeArch ppc64. +- Add sed hack to reduce size of long entry function which breaks + ppc64 code generator. See comment in spec file for full details. + +* Sat May 19 2012 Richard W.M. Jones - 0.8.3-2 +- Include workaround for segfault in gen_mappings.ml on ARM. +- Bump release and rebuild for new OCaml on ARM. + +* Fri Jan 6 2012 Richard W.M. Jones - 0.8.3-1 +- New upstream version 0.8.3. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jan 5 2011 Richard W.M. Jones - 0.8.1-1 +- New upstream version 0.8.1. +- Rebuild for OCaml 3.12.0. +- camomilecharmap and camomilelocaledef no longer installed by default, + install them by hand instead. + * Wed Dec 30 2009 Richard W.M. Jones - 0.7.2-2 - Rebuild for OCaml 3.11.2. From a605c552e3dd082c2acd8f8c65e5177b672909a9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 10:46:29 +0100 Subject: [PATCH 0276/1125] xsconsole: Update changelog Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index b23b6796..2aa7bec7 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -37,3 +37,6 @@ rm -rf $RPM_BUILD_ROOT %doc LICENSE %changelog +* Fri Jul 5 2013 James Bulpin - 0.9.0-1 +- Initial package + From c90b4718bbbb592e9f1cfabc94764e1cbfed9872 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 10:55:34 +0100 Subject: [PATCH 0277/1125] ocaml-libvirt: Update changelog Our version of the specfile is quite a bit behind the upstream version from Fedora 18, and is now also beginning to diverge. We should consider switching to the upstream package. Signed-off-by: Euan Harris --- SPECS/ocaml-libvirt.spec | 154 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 1f55cb08..7694e884 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -146,3 +146,157 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Mar 23 2012 Richard W.M. Jones - 0.6.1.2-1 +- New upstream version 0.6.1.2. + +* Tue Mar 6 2012 Richard W.M. Jones - 0.6.1.1-1 +- New upstream version 0.6.1.1. +- Remove mlvirsh subpackage, no longer upstream. +- Replace custom configure with RPM macro configure. +- Use RPM global instead of define. +- Use built-in RPM OCaml dependency generator. + +* Fri Jan 06 2012 Richard W.M. Jones - 0.6.1.0-10 +- Rebuild for OCaml 3.12.1. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.6.1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jan 05 2011 Richard W.M. Jones - 0.6.1.0-8 +- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). + +* Wed Dec 30 2009 Richard W.M. Jones - 0.6.1.0-7 +- Rebuild for OCaml 3.11.2. + +* Sat Jul 25 2009 Fedora Release Engineering - 0.6.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 15 2009 Richard W.M. Jones - 0.6.1.0-5 +- Force rebuild to test FTBFS issue. + +* Fri Jun 12 2009 Richard W.M. Jones - 0.6.1.0-3 +- Force rebuild to test FTBFS issue. + +* Sat May 23 2009 Richard W.M. Jones - 0.6.1.0-2 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Tue Mar 10 2009 Richard W.M. Jones - 0.6.1.0-1 +- New upstream release 0.6.1.0. + +* Wed Feb 25 2009 Fedora Release Engineering - 0.4.4.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Nov 26 2008 Richard W.M. Jones - 0.4.4.2-3 +- Rebuild for OCaml 3.11.0+rc1. + +* Wed Nov 19 2008 Richard W.M. Jones - 0.4.4.2-2 +- Rebuild for OCaml 3.11.0 + +* Wed Jul 9 2008 Richard W.M. Jones - 0.4.4.2-1 +- New upstream version. +- In upstream, 'make install' became 'make install-byte' or 'make install-opt' + +* Tue Jun 10 2008 Richard W.M. Jones - 0.4.2.4-1 +- New upstream version. + +* Thu Jun 5 2008 Richard W.M. Jones - 0.4.2.3-1 +- New upstream version. + +* Thu Jun 5 2008 Richard W.M. Jones - 0.4.2.2-1 +- New upstream version. +- Removed virt-ctrl, virt-df, virt-top subpackages, since these are + now separate Fedora packages. + +* Tue May 20 2008 Richard W.M. Jones - 0.4.1.1-4 +- Disable virt-top (bz 442871). +- Disable virt-ctrl (bz 442875). + +* Mon May 19 2008 Richard W.M. Jones - 0.4.1.1-3 +- Disable virt-df (bz 442873). + +* Wed Apr 23 2008 Richard W.M. Jones - 0.4.1.1-2 +- Rebuild for OCaml 3.10.2 + +* Tue Mar 19 2008 Richard W.M. Jones - 0.4.1.1-1 +- New upstream release 0.4.1.1. +- Move configure to build section. +- Pass RPM_OPT_FLAGS. + +* Tue Mar 4 2008 Richard W.M. Jones - 0.4.1.0-2 +- Fix source URL. +- Install virt-df manpage. + +* Tue Mar 4 2008 Richard W.M. Jones - 0.4.1.0-1 +- New upstream release 0.4.1.0. +- Upstream now requires ocaml-dbus >= 0.06, ocaml-lablgtk >= 2.10.0, + ocaml-dbus-devel. +- Enable virt-df. + +* Sat Mar 1 2008 Richard W.M. Jones - 0.4.0.3-3 +- Rebuild for ppc64. + +* Wed Feb 13 2008 Richard W.M. Jones - 0.4.0.3-2 +- Add BR gtk2-devel + +* Tue Feb 12 2008 Richard W.M. Jones - 0.4.0.3-1 +- New upstream version 0.4.0.3. +- Rebuild for OCaml 3.10.1. + +* Tue Nov 20 2007 Richard W.M. Jones - 0.3.3.4-1 +- New upstream release 0.3.3.4. +- Upstream website is now http://libvirt.org/ocaml/ + +* Fri Oct 19 2007 Richard W.M. Jones - 0.3.3.0-2 +- Mistake: BR is ocaml-calendar-devel. + +* Fri Oct 19 2007 Richard W.M. Jones - 0.3.3.0-1 +- New upstream release 0.3.3.0. +- Added support for virt-df, but disabled it by default. +- +BR ocaml-calendar. + +* Mon Sep 24 2007 Richard W.M. Jones - 0.3.2.8-1 +- New upstream release 0.3.2.8. + +* Thu Sep 20 2007 Richard W.M. Jones - 0.3.2.7-1 +- New upstream release 0.3.2.7. +- Ship the upstream ChangeLog file. + +* Thu Sep 6 2007 Richard W.M. Jones - 0.3.2.6-2 +- Force dependency on ocaml >= 3.10.0-7 which has fixed requires/provides + scripts. + +* Thu Sep 6 2007 Richard W.M. Jones - 0.3.2.6-1 +- New upstream version 0.3.2.6. + +* Wed Aug 29 2007 Richard W.M. Jones - 0.3.2.5-1 +- New upstream version 0.3.2.5. +- Keep TODO out of the main package, but add (renamed) TODO.libvirt and + TODO.virt-top to the devel and virt-top packages respectively. +- Add BR gawk. + +* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.4-1 +- New upstream version 0.3.2.4. + +* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.3-2 +- build_* macros so we can choose what subpackages to build. + +* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.3-1 +- Upstream version 0.3.2.3. +- Add missing BR libvirt-devel. + +* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.2-1 +- Upstream version 0.3.2.2. + +* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.1-2 +- Fix unclosed if-statement in spec file. + +* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.1-1 +- Upstream version 0.3.2.1. +- Put HTML documentation in -devel package. + +* Mon Aug 6 2007 Richard W.M. Jones - 0.3.1.2-1 +- Initial RPM release. From 8fc9904e35c03e353fd8304214f5a60f9a9d73eb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 11:44:19 +0100 Subject: [PATCH 0278/1125] ocaml-ounit: Run configure during %build, not %prep The configure script should be run in the build phase, not in the prep phase. Signed-off-by: Euan Harris --- SPECS/ocaml-ounit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index bde1b6f3..32861b34 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -39,10 +39,10 @@ developing applications that use %{name}. %prep %setup -q -n ounit-%{version} -sh ./configure --destdir $RPM_BUILD_ROOT %build +sh ./configure --destdir $RPM_BUILD_ROOT make all make doc From 1a40c7a5299f37de9da63bc3b92cda6dd9f41b16 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 11:45:18 +0100 Subject: [PATCH 0279/1125] ocaml-ounit: Fix changelog Signed-off-by: Euan Harris --- SPECS/ocaml-ounit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 32861b34..604d8e91 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -88,7 +88,7 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Fri Sep 30 2011 Mike McClurg - 1.1.0-3 +* Fri Sep 30 2011 Mike McClurg - 1.1.2-3 - Repackaged for XenSource build system * Tue Feb 08 2011 Fedora Release Engineering - 1.1.0-3 From 3e3253002d16fa615d1312a1e54faa2e4566da9d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 12:09:29 +0100 Subject: [PATCH 0280/1125] ocaml-text: Update changelog Signed-off-by: Euan Harris --- SPECS/ocaml-text.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 83651189..b4b31990 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -62,4 +62,8 @@ rm -rf $RPM_BUILD_ROOT %doc /usr/share/doc/ocaml-text/* %{_libdir}/ocaml/text/* %{_libdir}/ocaml/stublibs/* + %changelog +* Sat Jun 01 2013 David Scott +- Initial package + From 7756d8c7b0ef8d02c1a553c6a2acb701f6a60765 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 16:44:34 +0100 Subject: [PATCH 0281/1125] ocaml-text: Run configure during %build, not %prep Signed-off-by: Euan Harris --- SPECS/ocaml-text.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index b4b31990..747ba67c 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -35,9 +35,9 @@ developing applications that use %{name}. %prep %setup -q -ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr %build +ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr ocaml setup.ml -build ocaml setup.ml -doc From 25378224d3508167c3a57a0b4cc0b559eb3727bf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 13:39:31 +0100 Subject: [PATCH 0282/1125] ocaml-bitstring: Update to upstream specfile Signed-off-by: Euan Harris --- SPECS/ocaml-bitstring.spec | 93 +++++++++++--------------------------- 1 file changed, 27 insertions(+), 66 deletions(-) diff --git a/SPECS/ocaml-bitstring.spec b/SPECS/ocaml-bitstring.spec index c172f5ba..032a8d61 100644 --- a/SPECS/ocaml-bitstring.spec +++ b/SPECS/ocaml-bitstring.spec @@ -1,12 +1,9 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %global debug_package %{nil} -# CIL tools are deprecated, don't build them on any platform. -%global build_cil_tools 0 - Name: ocaml-bitstring Version: 2.0.4 -Release: 0%{?dist} +Release: 1%{?dist} Summary: OCaml library for matching and constructing bitstrings Group: Development/Libraries @@ -15,19 +12,14 @@ License: LGPLv2+ with exceptions and GPLv2+ URL: http://code.google.com/p/bitstring/ Source0: http://bitstring.googlecode.com/files/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel -%if %build_cil_tools -BuildRequires: ocaml-cil-devel -BuildRequires: ocaml-extlib-devel -%endif -#BuildRequires: chrpath +BuildRequires: chrpath BuildRequires: time %global __ocaml_requires_opts -i Asttypes -i Parsetree @@ -62,24 +54,6 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. -%if %build_cil_tools -%package c -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -# Upstream project used to be called ocaml-bitmatch. -# Keep these until Fedora 12. -Obsoletes: ocaml-bitmatch-c <= 1.9.5 -Provides: ocaml-bitmatch-c = %{version}-%{release} - - -%description c -The %{name}-c package contains tools for importing structs -from C code and header files into %{name}. -%endif - - %prep %setup -q @@ -89,55 +63,34 @@ cp -a examples bitstring-examples %build %configure -make + +# Doesn't build correctly with parallel builds, or if MAKEFLAGS=-j is set. +make -j1 + make doc make examples -%if %build_cil_tools -%if %opt -strip cil-tools/bitstring-import-c.opt -%endif -%endif - %check make check %install -rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs make install strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so mkdir -p $RPM_BUILD_ROOT%{_bindir} -%if %build_cil_tools -# Install bitstring-import-c by hand for now. -%if %opt -install -m 0755 cil-tools/bitstring-import-c.opt $RPM_BUILD_ROOT%{_bindir}/bitstring-import-c -%else -install -m 0755 cil-tools/bitstring-import-c $RPM_BUILD_ROOT%{_bindir}/bitstring-import-c -%endif - -# Install bitstring-import-prefix.h by hand for now. -install -m 0644 cil-tools/bitstring-import-prefix.h $OCAMLFIND_DESTDIR/bitstring/ -%endif - # Install bitstring-objinfo by hand for now. install -m 0755 bitstring-objinfo $RPM_BUILD_ROOT%{_bindir} -%clean -rm -rf $RPM_BUILD_ROOT - - %files -%defattr(-,root,root,-) %doc COPYING.LIB %{_libdir}/ocaml/bitstring %if %opt @@ -146,15 +99,11 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_libdir}/ocaml/bitstring/*.cmx %endif %exclude %{_libdir}/ocaml/bitstring/*.mli -%if %build_cil_tools -%exclude %{_libdir}/ocaml/bitstring/*.h -%endif %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner %files devel -%defattr(-,root,root,-) %doc COPYING.LIB README TODO html bitstring-examples %if %opt %{_libdir}/ocaml/bitstring/*.a @@ -165,16 +114,28 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/bitstring-objinfo -%if %build_cil_tools -%files c -%defattr(-,root,root,-) -%doc COPYING.LIB cil-tools/ext3.c cil-tools/ext3.ml cil-tools/task_struct.c cil-tools/task_struct.ml -%{_bindir}/bitstring-import-c -%{_libdir}/ocaml/bitstring/*.h -%endif +%changelog +* Tue May 14 2013 Richard W.M. Jones - 2.0.4-1 +- New upstream version 2.0.4. +- Remove upstream patch to META file. +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Dec 02 2012 Bruno Wolff III - 2.0.3-5 +- Rebuild for ocaml 4.0.1. + +* Fri Jul 20 2012 Richard W.M. Jones - 2.0.3-4 +- Remove defattr, clean etc for modern spec file. +- Permanently remove obsolete CIL tools. +- Add upstream patch to fix META file. + +* Fri Jul 20 2012 Fedora Release Engineering - 2.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jun 7 2012 Richard W.M. Jones - 2.0.3-2 +- Rebuild for OCaml 4.00.0. -%changelog * Tue Jan 17 2012 Richard W.M. Jones - 2.0.3-1 - New upstream version 2.0.3. From ff86cfe85c29eb6bfe080b737370bd0b45ab160f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 17:55:14 +0100 Subject: [PATCH 0283/1125] ocaml-qmp: Fix version in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index c890ce54..10427d1e 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -50,11 +50,11 @@ rm -rf %{buildroot} %{_libdir}/ocaml/qmp/* %changelog -* Fri Aug 09 2013 Euan Harris - 0.9.1 +* Fri Aug 09 2013 Euan Harris - 0.9.1-0 - Change representation of message timestamps from a tuple of ints to a float. This avoids problems on 32-bit architectures and follows the example of the OCaml standard library. -* Wed May 29 2013 David Scott - 0.9.0 +* Wed May 29 2013 David Scott - 0.9.0-0 - Initial package From 1141f1667b4612d3b1c567e5270191b82d593a4a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 14 Aug 2013 18:16:32 +0100 Subject: [PATCH 0284/1125] message-switch: Copy extra sources into build directory All sources are copied into the SRPM and unpacked in $RPM_SOURCE_DIR. Previously this spec file installed the message-switch-init file directly from $RPM_SOURCE_DIR into the output directory, but in our Debian build flow we currently build the source package by executing the %prep phase and then packaging up the build directory. For this to work, we need to make sure that we copy all the source files into the build directory in the %prep section. Signed-off-by: Euan Harris --- SPECS/message-switch.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 9c127bf1..9970fb5f 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -35,6 +35,7 @@ A store and forward message switch for OCaml. %prep %setup -q -n %{name}-%{name}-%{version} +cp %{SOURCE1} message-switch-init %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml @@ -49,7 +50,7 @@ mkdir -p %{buildroot}/%{_sbindir} install switch_main.native %{buildroot}/%{_sbindir}/message-switch install main.native %{buildroot}/%{_sbindir}/message-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch +install -m 0755 message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch %clean rm -rf %{buildroot} From 154abd38ffef62a6f5e675d27e04b1a92e73848f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 14 Aug 2013 18:24:41 +0100 Subject: [PATCH 0285/1125] forkexecd: Copy extra sources into build directory All sources are copied into the SRPM and unpacked in $RPM_SOURCE_DIR. Previously this spec file installed the forkexecd-init file directly from $RPM_SOURCE_DIR into the output directory, but in our Debian build flow we currently build the source package by executing the %prep phase and then packaging up the build directory. For this to work, we need to make sure that we copy all the source files into the build directory in the %prep section. Signed-off-by: Euan Harris --- SPECS/forkexecd.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index eee5b3ee..2cce5d9e 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -20,6 +20,7 @@ fork() and exec() in a multithreaded program. %prep %setup -q -n %{name}-%{name}-%{version} +cp %{SOURCE1} forkexecd-init %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml @@ -34,7 +35,7 @@ mkdir -p %{buildroot}/%{_sbindir} install fe_main.native %{buildroot}/%{_sbindir}/forkexecd install fe_cli.native %{buildroot}/%{_sbindir}/forkexecd-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd +install -m 0755 forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd %clean rm -rf %{buildroot} From 2ab58525f5721d240d5df0fb646753a78997371d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 15 Aug 2013 11:20:04 +0100 Subject: [PATCH 0286/1125] message-switch: No longer need to rename the unpacked source directory Signed-off-by: Euan Harris --- SPECS/message-switch.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 9970fb5f..e37ec7f6 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -34,7 +34,7 @@ BuildRequires: openssl openssl-devel A store and forward message switch for OCaml. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q cp %{SOURCE1} message-switch-init %build From 3129ba8ca4b07ef1cebd412893ada298d88fa933 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 15 Aug 2013 12:05:28 +0100 Subject: [PATCH 0287/1125] message-switch: Fix Source0 URL Signed-off-by: Euan Harris --- SPECS/message-switch.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index e37ec7f6..62cc2c35 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -5,7 +5,7 @@ Summary: A store and forward message switch License: FreeBSD Group: Development/Other URL: https://github.com/xapi-project/message-switch/archive/message-switch-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel From 3ce7fb70b60ce45960d3d8961dfdecedbfb89b88 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 16 Aug 2013 11:37:30 +0000 Subject: [PATCH 0288/1125] Updates required to resync the xenopsd package with trunk xen-api Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 8 ++++---- SPECS/xapi-libvirt-storage.spec | 8 ++++---- SPECS/xapi.spec | 2 +- SPECS/xenopsd.spec | 22 ++++++++++------------ 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 86d7edd4..ec775397 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.15 +Version: 0.9.16 Release: 0 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 58ede347..442389a3 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,11 +1,11 @@ Name: ocaml-xcp-idl -Version: 0.9.9 +Version: 0.9.11 Release: 0 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-idl/archive/xcp-idl-%{version}.tar.gz -Source0: https://github.com/xapi-project/xcp-idl/archive/xcp-idl-%{version}/xcp-idl-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-idl/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel @@ -37,7 +37,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n xcp-idl-xcp-idl-%{version} +%setup -q -n xcp-idl-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index f92f5e38..449ed120 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,11 +1,11 @@ Name: xapi-libvirt-storage -Version: 0.9.5 +Version: 0.9.6 Release: 0 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/xapi-libvirt-storage-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel @@ -17,7 +17,7 @@ BuildRequires: ocaml-oclock-devel Allows the manipulation of libvirt storage pools and volumes via xapi. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q -n %{name}-%{version} %build make diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 484992e9..756f31d0 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.18 +Version: 1.9.19 Release: 0 Group: System/Hypervisor License: LGPL+linking exception diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 735dfaca..b551b5c7 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.18 +Version: 0.9.21 Release: 0 Summary: Simple VM manager License: LGPL @@ -65,19 +65,18 @@ Simple VM manager for Xen using libxenlight %setup -q %build -./configure make %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} -install -D dist/build/xenopsd_libvirt/xenopsd_libvirt %{buildroot}/%{_sbindir}/xenopsd-libvirt -install -D dist/build/xenopsd/xenopsd %{buildroot}/%{_sbindir}/xenopsd-xc -install -D dist/build/xenopsd_simulator/xenopsd_simulator %{buildroot}/%{_sbindir}/xenopsd-simulator -install -D dist/build/xenopsd_xenlight/xenopsd_xenlight %{buildroot}/%{_sbindir}/xenopsd-xenlight +#install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt +install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator +install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc +install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight mkdir -p %{buildroot}/%{_libexecdir}/%{name} -install -D dist/build/xenguest/xenguest %{buildroot}/%{_libexecdir}/%{name}/xenguest +install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper @@ -87,7 +86,7 @@ install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt +#install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 %{_sourcedir}/xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator install -m 0755 %{_sourcedir}/xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight @@ -114,9 +113,9 @@ rm -rf %{buildroot} /etc/xapi/network.conf %files libvirt -%defattr(-,root,root) -%{_sbindir}/xenopsd-libvirt -%{_sysconfdir}/init.d/xenopsd-libvirt +#%defattr(-,root,root) +#%{_sbindir}/xenopsd-libvirt +#%{_sysconfdir}/init.d/xenopsd-libvirt %post libvirt /sbin/chkconfig --add xenopsd-libvirt @@ -176,4 +175,3 @@ fi * Thu May 30 2013 David Scott - Initial package - From 161dfc9b2e8ae5443b80cd767aab0b0760754699 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 16 Aug 2013 13:45:48 +0000 Subject: [PATCH 0289/1125] Update xenserver-install-wizard Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index aed31f97..f8414f7f 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.15 +Version: 0.2.16 Release: 0 Group: System/Hypervisor License: LGPL+linking exception From 895549f15e274bef232cc816fd9ead4ae892d5c2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 16 Aug 2013 13:46:09 +0000 Subject: [PATCH 0290/1125] xenserver-core release snapshot rpm needs more xen-c6 repos Fixes xapi-project/xen-api-rpm-buildroot#124 Signed-off-by: David Scott --- SOURCES/fusion-release-xen-c6-tweaked.repo | 14 ++++++++++++++ SPECS/xenserver-core-latest-snapshot.spec | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/SOURCES/fusion-release-xen-c6-tweaked.repo b/SOURCES/fusion-release-xen-c6-tweaked.repo index 0e4a8146..5f9f49d1 100644 --- a/SOURCES/fusion-release-xen-c6-tweaked.repo +++ b/SOURCES/fusion-release-xen-c6-tweaked.repo @@ -5,3 +5,17 @@ gpgcheck=0 Priority=1 enabled=1 +[xen-c6] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 + diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index f34c6204..1ad481c8 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -1,6 +1,6 @@ Name: xenserver-core-latest-snapshot Version: 0.1.0 -Release: 0 +Release: 1 Summary: Yum repositories for xenserver License: GPL Group: Development/Other From 6130051e67da02cee2e0c1c1d931c4a3a8effc00 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 16 Aug 2013 15:38:27 +0100 Subject: [PATCH 0291/1125] xapi-libvirt-storage: Remove redundant renamining in %setup rule Signed-off-by: Euan Harris --- SPECS/xapi-libvirt-storage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 449ed120..fc90ab8f 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -17,7 +17,7 @@ BuildRequires: ocaml-oclock-devel Allows the manipulation of libvirt storage pools and volumes via xapi. %prep -%setup -q -n %{name}-%{version} +%setup -q %build make From ee4955c5db7061fb620091966b075dad2b291bb3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 16 Aug 2013 15:27:31 +0000 Subject: [PATCH 0292/1125] ocplib-endian 0.4's META file doesn't trash the toplevel Signed-off-by: David Scott --- SPECS/ocaml-ocplib-endian.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index cd92e805..4f8ebea6 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -1,5 +1,5 @@ Name: ocaml-ocplib-endian -Version: 0.3 +Version: 0.4 Release: 0 Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. License: LGPL From 68bf7aa63dc7f8cf8769d56c37664e740be99df6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 16 Aug 2013 15:32:41 +0000 Subject: [PATCH 0293/1125] New release of xenserver-install-wizard with experimental 'dont fall over if there is an unconfigured NIC' technology Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index f8414f7f..4218eae9 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.16 +Version: 0.2.17 Release: 0 Group: System/Hypervisor License: LGPL+linking exception From 91df826323f52735d80908ffb7abcec2589fbbbc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 16 Aug 2013 18:01:31 +0100 Subject: [PATCH 0294/1125] specs: Package release tags should start at 1 The RPM packaging guidelines say that the 'Release' tag starts at 1 and is incremented whenever the package is changed but the packaged version of the software remains the same. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/cmdliner.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/eliloader.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-lwt.spec | 2 +- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-obuild.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-qmp.spec | 2 +- SPECS/ocaml-re.spec | 2 +- SPECS/ocaml-react.spec | 2 +- SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-syslog.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-type-conv.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-uuidm.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-yojson.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- SPECS/omake.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsiostat.spec | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index d38658c2..688bfac2 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -1,6 +1,6 @@ Name: biniou Version: 1.0.6 -Release: 0 +Release: 1 Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve License: BSD3 Group: Development/Other diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index d15e54e0..072e38fe 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -1,6 +1,6 @@ Name: cmdliner Version: 0.9.3 -Release: 0 +Release: 1 Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 0c5549ee..5f918321 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -1,6 +1,6 @@ Name: cppo Version: 0.9.3 -Release: 0 +Release: 1 Summary: Equivalent of the C preprocessor for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 8437b15d..c4c85c7e 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -1,6 +1,6 @@ Name: deriving-ocsigen Version: 0.3c -Release: 0 +Release: 1 Summary: Extension to OCaml for deriving functions from type declarations License: MIT Group: Development/Other diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 6949fceb..30cf66e8 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -1,6 +1,6 @@ Name: easy-format Version: 1.0.1 -Release: 0 +Release: 1 Summary: Indentation made easy License: BSD3 Group: Development/Other diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 59ec45e3..7f7bdd82 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -1,7 +1,7 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader Version: 0.3 -Release: 0 +Release: 1 Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index ec775397..8441e37f 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,6 +1,6 @@ Name: ffs Version: 0.9.16 -Release: 0 +Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 62cc2c35..9cf8cb3b 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,6 +1,6 @@ Name: message-switch Version: 0.10.0 -Release: 0 +Release: 1 Summary: A store and forward message switch License: FreeBSD Group: Development/Other diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 3e187f7b..61e6e2b2 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -1,6 +1,6 @@ Name: ocaml-cohttp Version: 0.9.8 -Release: 0 +Release: 1 Summary: An HTTP library for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index afc04014..63d52dfe 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -1,6 +1,6 @@ Name: ocaml-libvhd Version: 0.9.1 -Release: 0 +Release: 1 Summary: vhd manipulation via libvhd License: BSD3 Group: Development/Other diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 6441b23f..8a780a1c 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -3,7 +3,7 @@ Name: ocaml-lwt Version: 2.4.3 -Release: 0%{?dist} +Release: 1%{?dist} Summary: OCaml lightweight thread library Group: Development/Libraries diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index a1204886..53777eff 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -1,6 +1,6 @@ Name: ocaml-nbd Version: 0.9.0 -Release: 0 +Release: 1 Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index c37ace21..d22bf041 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -1,6 +1,6 @@ Name: ocaml-obuild Version: 0.0.2 -Release: 0 +Release: 1 Summary: Simple build tool for OCaml programs License: BSD2 Group: Development/Other diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 4f8ebea6..5e8eab7a 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -1,6 +1,6 @@ Name: ocaml-ocplib-endian Version: 0.4 -Release: 0 +Release: 1 Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 10427d1e..a0df666a 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -1,6 +1,6 @@ Name: ocaml-qmp Version: 0.9.1 -Release: 0 +Release: 1 Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Other diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index cb55dcd7..6c830bcf 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -1,6 +1,6 @@ Name: ocaml-re Version: 1.2.1 -Release: 0 +Release: 1 Summary: A regular expression library for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 1375753d..3588c912 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -3,7 +3,7 @@ Name: ocaml-react Version: 0.9.4 -Release: 0%{?dist} +Release: 1%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 282fbfac..84967b59 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -1,6 +1,6 @@ Name: ocaml-rpc Version: 1.4.1 -Release: 0 +Release: 1 Summary: An RPC library for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 3e608a87..7cf4c3bc 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -1,6 +1,6 @@ Name: ocaml-sexplib Version: 109.20.00 -Release: 0 +Release: 1 Summary: Convert values to and from s-expressions in OCaml Group: Development/Other diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec index 62f6d0f1..fd00100c 100644 --- a/SPECS/ocaml-syslog.spec +++ b/SPECS/ocaml-syslog.spec @@ -1,6 +1,6 @@ Name: ocaml-syslog Version: 1.4 -Release: 0 +Release: 1 Summary: Syslog bindings for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index df17e212..b5cc58dc 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -1,6 +1,6 @@ Name: ocaml-tapctl Version: 0.9.0 -Release: 0 +Release: 1 Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 747ba67c..a8c612a4 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -3,7 +3,7 @@ Name: ocaml-text Version: 0.6 -Release: 0%{?dist} +Release: 1%{?dist} Summary: OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. Group: Development/Libraries diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 8156f1db..2006cf51 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -1,6 +1,6 @@ Name: ocaml-type-conv Version: 109.20.00 -Release: 0 +Release: 1 Summary: OCaml base library for type conversion Group: Development/Other diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 9ab5ac70..a48befa8 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -1,6 +1,6 @@ Name: ocaml-uri Version: 1.3.8 -Release: 0 +Release: 1 Summary: A URI library for OCaml License: ISC Group: Development/Other diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 21bcb906..70661f30 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -1,6 +1,6 @@ Name: ocaml-uuidm Version: 0.9.5 -Release: 0 +Release: 1 Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 442389a3..fdee1063 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,6 +1,6 @@ Name: ocaml-xcp-idl Version: 0.9.11 -Release: 0 +Release: 1 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 4f537513..daaf8016 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -1,6 +1,6 @@ Name: ocaml-xcp-rrd Version: 0.9.0 -Release: 0 +Release: 1 Summary: Round-Robin Datasources in OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 71701b4f..0a9bfeff 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -1,6 +1,6 @@ Name: ocaml-xen-api-client Version: 0.9.4 -Release: 0 +Release: 1 Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 Group: Development/Libraries diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index ad25c8bf..ecacb04e 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,6 +1,6 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.5 -Release: 0 +Release: 1 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 1d871772..e93bf7f3 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,6 +1,6 @@ Name: ocaml-xenops Version: 0.9.0 -Release: 0 +Release: 1 Summary: Low-level xen control operations OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index fe57f5a7..417ff39b 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -1,6 +1,6 @@ Name: ocaml-xenstore-clients Version: 0.9.0 -Release: 0 +Release: 1 Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index b59df580..c597f441 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,6 +1,6 @@ Name: ocaml-xenstore Version: 1.2.1 -Release: 0 +Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL Group: Development/Other diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 80bc2312..88ca67c6 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -1,6 +1,6 @@ Name: ocaml-yojson Version: 1.1.6 -Release: 0 +Release: 1 Summary: A JSON parser and priter for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index f0b70fba..f5fada86 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -1,6 +1,6 @@ Name: ocaml-zed Version: 1.2 -Release: 0 +Release: 1 Summary: An abstract engine for text editing for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/omake.spec b/SPECS/omake.spec index b98a0102..8459af56 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -1,5 +1,5 @@ Version: 0.9.8.6 -Release: 0 +Release: 1 Summary: The omake build system. Name: omake URL: http://omake.metaprl.org/ diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index e19727eb..7f57dcdd 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -1,6 +1,6 @@ Name: optcomp Version: 1.4 -Release: 0 +Release: 1 Summary: Optional compilation with cpp-like directives License: BSD3 Group: Development/Other diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 3dff2d77..3fdbf41e 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,6 +1,6 @@ Name: sm-cli Version: 0.9.3 -Release: 0 +Release: 1 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 1f6522bc..dfb23dd6 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,6 +1,6 @@ Name: utop Version: 1.5 -Release: 0 +Release: 1 Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... License: BSD Group: Development/Other diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index fc90ab8f..2931cef2 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,6 +1,6 @@ Name: xapi-libvirt-storage Version: 0.9.6 -Release: 0 +Release: 1 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 756f31d0..1d3aca67 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.19 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 53bf5577..d97aa517 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -1,6 +1,6 @@ Name: xe-create-templates Version: 0.9.1 -Release: 0 +Release: 1 Summary: Creates default XenServer templates License: LGPL Group: Development/Other diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index b551b5c7..acfd98c5 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.21 -Release: 0 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 4218eae9..4a4e9d34 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,7 +3,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.17 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index e57224ac..ffa17af4 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -1,6 +1,6 @@ Name: xmlm Version: 1.1.1 -Release: 0 +Release: 1 Summary: Streaming XML input/output for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 9bbc96e2..a0a3ee85 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -1,6 +1,6 @@ Name: xsiostat Version: 0.2.0 -Release: 0 +Release: 1 Summary: XenServer IO stat thingy License: LGPL Group: Development/Other From b520763d1c08464ae62023081e90f02b67802188 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 Aug 2013 13:52:51 +0100 Subject: [PATCH 0295/1125] ocaml-xen-lowlevel-libs: Update to latest release Signed-off-by: Euan Harris --- SPECS/ocaml-xen-lowlevel-libs.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index ecacb04e..685f7eb4 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,14 +1,15 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.5 +Version: 0.9.8 Release: 1 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel +BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel cmdliner-devel +BuildRequires: ocaml-cstruct-devel Requires: ocaml ocaml-findlib %description @@ -24,7 +25,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build make From 50c3817c31a9136869f851bfe3cc96d84e543928 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 15:07:35 +0100 Subject: [PATCH 0296/1125] ocaml-qmp: Fix release numbers in changelog Release numbers start at 1. Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index a0df666a..cb4eddf1 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -50,11 +50,11 @@ rm -rf %{buildroot} %{_libdir}/ocaml/qmp/* %changelog -* Fri Aug 09 2013 Euan Harris - 0.9.1-0 +* Fri Aug 09 2013 Euan Harris - 0.9.1-1 - Change representation of message timestamps from a tuple of ints to a float. This avoids problems on 32-bit architectures and follows the example of the OCaml standard library. -* Wed May 29 2013 David Scott - 0.9.0-0 +* Wed May 29 2013 David Scott - 0.9.0-1 - Initial package From b3ff0f0e4200b13973e48bd62a7d8acfbbcb2c18 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 20 Aug 2013 14:44:08 +0000 Subject: [PATCH 0297/1125] Add sparse_dd to the xapi package This is needed by VDI.copy Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1d3aca67..24f6021f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.19 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -61,6 +61,7 @@ omake phase1 omake phase2 omake ocaml/xapi/xapi omake ocaml/xe-cli/xe +omake ocaml/xapi/sparse_dd %install rm -rf %{buildroot} @@ -75,6 +76,7 @@ mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info +install -m 0755 ocaml/xapi/sparse_dd %{buildroot}/%{_libexecdir}/xapi/sparse_dd mkdir -p %{buildroot}/etc/xapi install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf @@ -117,6 +119,7 @@ fi %{_libexecdir}/xapi/xapissl %{_libexecdir}/xapi/pci-info %{_libexecdir}/xapi/update-mh-info +%{_libexecdir}/xapi/sparse_dd /etc/xapi/db.conf /etc/xapi/hook-scripts /var/lib/xapi From aec0ffd95ac63c1041c36853c5f9242d2a7efcd8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 20 Aug 2013 14:45:48 +0000 Subject: [PATCH 0298/1125] ... and add a changelog entry for sparse_dd Signed-off-by: David Scott --- SPECS/xapi.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 24f6021f..d4c72325 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -142,6 +142,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Tue Aug 20 2013 David Scott +- Add sparse_dd to the xapi package so VDI.copy should work + * Tue Jun 18 2013 David Scott - Update to 1.9.6 From 2d896d14235e654325e148e1c288eac8bf6f60de Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 15:04:35 +0100 Subject: [PATCH 0299/1125] build: Copy extra sources to build directory during %prep The Debian package builder makes a tarball from the build directory after executing the %prep stage, so we must copy all extra sources into the build directory during this stage. Signed-off-by: Euan Harris --- SPECS/ffs.spec | 3 ++- SPECS/squeezed.spec | 3 ++- SPECS/xapi-libvirt-storage.spec | 3 ++- SPECS/xapi.spec | 16 +++++++++++----- SPECS/xcp-networkd.spec | 9 ++++++--- SPECS/xcp-rrdd.spec | 3 ++- SPECS/xenopsd.spec | 16 +++++++++++----- 7 files changed, 36 insertions(+), 17 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 8441e37f..5e493fbc 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -19,6 +19,7 @@ Simple flat file storage manager for the xapi toolstack. %prep %setup -q +cp %{SOURCE1} ffs-init %build make @@ -28,7 +29,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/ffs/ffs %{buildroot}/%{_sbindir}/ffs mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs +install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs %clean rm -rf %{buildroot} diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 72fca045..a29eb172 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -21,6 +21,7 @@ Memory ballooning daemon for the xapi toolstack. %prep %setup -q -n %{name}-%{name}-%{version} +cp %{SOURCE1} squeezed-init %build make @@ -30,7 +31,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/squeezed/squeezed %{buildroot}/%{_sbindir}/squeezed mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed +install -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed %clean rm -rf %{buildroot} diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 2931cef2..4eb0ff5b 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -18,6 +18,7 @@ Allows the manipulation of libvirt storage pools and volumes via xapi. %prep %setup -q +cp %{SOURCE1} xapi-libvirt-storage-init %build make @@ -27,7 +28,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/sm-libvirt/sm-libvirt %{buildroot}/%{_sbindir}/xapi-libvirt-storage mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage +install -m 0755 xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage %clean rm -rf %{buildroot} diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1d3aca67..00ffbd40 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -51,6 +51,12 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} #%patch0 -p0 -b xapi-version.patch +cp %{SOURCE1} xen-api-xapi-conf +cp %{SOURCE2} xen-api-init +cp %{SOURCE3} xen-api-xapissl +cp %{SOURCE4} xen-api-db-conf +cp %{SOURCE5} xen-api-pam + %build ./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins @@ -68,16 +74,16 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_sbindir}/xapi mkdir -p %{buildroot}/etc/pam.d -install -m 0644 %{_sourcedir}/xen-api-pam %{buildroot}/etc/pam.d/xapi +install -m 0644 xen-api-pam %{buildroot}/etc/pam.d/xapi mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi +install -m 0755 xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi -install -m 0755 %{_sourcedir}/xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl +install -m 0755 xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info mkdir -p %{buildroot}/etc/xapi -install -m 0644 %{_sourcedir}/xen-api-xapi-conf %{buildroot}/etc/xapi.conf -install -m 0644 %{_sourcedir}/xen-api-db-conf %{buildroot}/etc/xapi/db.conf +install -m 0644 xen-api-xapi-conf %{buildroot}/etc/xapi.conf +install -m 0644 xen-api-db-conf %{buildroot}/etc/xapi/db.conf mkdir -p %{buildroot}/%{_bindir} install -m 0755 ocaml/xe-cli/xe.opt %{buildroot}/%{_bindir}/xe diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index de8225b0..47ed2b6c 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -23,6 +23,9 @@ Simple host networking management service for the xapi toolstack. %prep %setup -q -n %{name}-%{name}-%{version} +cp %{SOURCE1} xcp-networkd-init +cp %{SOURCE2} xcp-networkd-conf +cp %{SOURCE3} xcp-networkd-network-conf %build make @@ -32,10 +35,10 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/xcp-networkd/xcp-networkd %{buildroot}/%{_sbindir}/xcp-networkd mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd +install -m 0755 xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd mkdir -p %{buildroot}/etc/xcp -install -m 0644 %{_sourcedir}/xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf -install -m 0644 %{_sourcedir}/xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf +install -m 0644 xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf +install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf %clean rm -rf %{buildroot} diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 74d490b2..62be9082 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -21,6 +21,7 @@ Statistics gathering daemon for the xapi toolstack. %prep %setup -q +cp %{SOURCE1} xcp-rrdd-init %build make @@ -30,7 +31,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 %{_sourcedir}/xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd +install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd %clean rm -rf %{buildroot} diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index acfd98c5..08478a0c 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -63,6 +63,12 @@ Simple VM manager for Xen using libxenlight %prep %setup -q +cp %{SOURCE1} xenopsd-xc-init +cp %{SOURCE2} xenopsd-simulator-init +cp %{SOURCE3} xenopsd-libvirt-init +cp %{SOURCE4} xenopsd-xenlight-init +cp %{SOURCE5} xenopsd-conf +cp %{SOURCE6} xenopsd-network-conf %build make @@ -87,12 +93,12 @@ install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf mkdir -p %{buildroot}%{_sysconfdir}/init.d #install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt -install -m 0755 %{_sourcedir}/xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc -install -m 0755 %{_sourcedir}/xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator -install -m 0755 %{_sourcedir}/xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight +install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc +install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator +install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight mkdir -p %{buildroot}/etc/xapi -install -m 0644 %{_sourcedir}/xenopsd-conf %{buildroot}/etc/xenopsd.conf -install -m 0644 %{_sourcedir}/xenopsd-network-conf %{buildroot}/etc/xapi/network.conf +install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf +install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf %clean rm -rf %{buildroot} From 7c3c572db71986376a0e1111e53b74e918bf4dc2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:27:55 +0100 Subject: [PATCH 0300/1125] eliloader: Add change log Signed-off-by: Euan Harris --- SPECS/eliloader.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 7f7bdd82..67b9abe0 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -28,6 +28,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_sbindir}/eliloader +%changelog +* Mon Jun 24 2013 David Scott - 0.3-1 +- Update to eliloader 0.3 +* Sat Jun 22 2013 David Scott - 0.2-1 +- Update to eliloader 0.2 (doesn't assume data file directory is present) + +* Sat Jun 22 2013 David Scott - 0.1-1 +- Initial package -%changelog From b48371f299fa5c794f804664af76a74decfe854f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:28:42 +0100 Subject: [PATCH 0301/1125] xsc-latest-snapshot: Create build dir and copy in sources The Debian packaging script expects the %prep phase of rpmbuild to create a build directory and copy all sources into it. Normally the directory is created by the setup macro unpacking the source tarball, but since xenserver-core-latest-snapshot doesn't have a source tarball we must pass different options to have it create an empty directory. Signed-off-by: Euan Harris --- SPECS/xenserver-core-latest-snapshot.spec | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 1ad481c8..b6bdc1a9 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -21,21 +21,31 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} A virtual package which installs the xenserver yum repos. %prep +%setup -c -T +cp %{SOURCE0} fusion-release-xapi.repo +cp %{SOURCE1} fusion-release-xen-c6.repo +cp %{SOURCE2} fusion-release-xen-c6-RC1.repo +cp %{SOURCE3} fusion-release-epel.repo +cp %{SOURCE4} fusion-release-epel-testing.repo +cp %{SOURCE5} fusion-release-remi.repo +cp %{SOURCE6} fusion-release-RPM-GPG-KEY-EPEL-6 +cp %{SOURCE7} fusion-release-RPM-GPG-KEY-remi +cp %{SOURCE8} fusion-release-xen-c6-tweaked.repo %build %install mkdir -p %{buildroot}/etc/yum.repos.d -install -m 0644 %{_sourcedir}/fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo -install -m 0644 %{_sourcedir}/fusion-release-xen-c6-tweaked.repo %{buildroot}/etc/yum.repos.d/xen-c6-tweaked.repo -#install -m 0644 %{_sourcedir}/fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo -#install -m 0644 %{_sourcedir}/fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo -install -m 0644 %{_sourcedir}/fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo -install -m 0644 %{_sourcedir}/fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo -install -m 0644 %{_sourcedir}/fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo +install -m 0644 fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo +install -m 0644 fusion-release-xen-c6-tweaked.repo %{buildroot}/etc/yum.repos.d/xen-c6-tweaked.repo +#install -m 0644 fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo +#install -m 0644 fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo +install -m 0644 fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo +install -m 0644 fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo +install -m 0644 fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo mkdir -p %{buildroot}/etc/pki/rpm-gpg/ -install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -install -m 0644 %{_sourcedir}/fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi +install -m 0644 fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +install -m 0644 fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi %clean rm -rf %{buildroot} From 25b69f2a6ffd3bc27239f09e957deac78311e234 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:31:12 +0100 Subject: [PATCH 0302/1125] xenserver-core: Create build dir and copy in sources The Debian packaging script expects the %prep phase of rpmbuild to create a build directory and copy all sources into it. Normally the directory is created by the setup macro unpacking the source tarball, but since xenserver-core doesn't have a source tarball we must pass different options to have it create an empty directory. Signed-off-by: Euan Harris --- SPECS/xenserver-core.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 1c4324f4..ba24f7b0 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -24,12 +24,14 @@ Requires: xen A virtual package which installs the xapi toolstack. %prep +%setup -c -T +cp %{SOURCE0} xenserver-readme %build %install mkdir -p %{buildroot}/usr/share/doc/xenserver -install -m 0644 %{_sourcedir}/xenserver-readme %{buildroot}/usr/share/doc/xenserver/README +install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README %clean rm -rf %{buildroot} From 5a4cc627bb0d8d59fff40b887b8d7501cdf695f1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:44:53 +0100 Subject: [PATCH 0303/1125] xapi: Remove commented-out %patch call Signed-off-by: Euan Harris --- SPECS/xapi.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index d3e79357..15dc6e3d 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -50,7 +50,6 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} -#%patch0 -p0 -b xapi-version.patch cp %{SOURCE1} xen-api-xapi-conf cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl From c1e2dd5bfb95fdf057fbcd7298f9a54ccb7cab7a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:49:07 +0100 Subject: [PATCH 0304/1125] xen-api-init: OCAMLRUNPARAM needs to be exported Signed-off-by: Euan Harris --- SOURCES/xen-api-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index 3e1948e4..14446e7b 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -37,7 +37,7 @@ start() { umask 077 echo -n $"Starting xapi: " - OCAMLRUNPARAM=b + export OCAMLRUNPARAM=b daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS RETVAL=$? echo From ce0d16c0228b944b6b32278df113712d9942c620 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 11:03:47 +0100 Subject: [PATCH 0305/1125] xenopsd: Uncomment libvirt subpackage We stopped installing xenopsd-libvirt in change 3ce7fb7; putting it back. Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 08478a0c..a93da72b 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -77,7 +77,7 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} -#install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt +install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight @@ -92,7 +92,7 @@ install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf mkdir -p %{buildroot}%{_sysconfdir}/init.d -#install -m 0755 %{_sourcedir}/xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt +install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight @@ -119,9 +119,9 @@ rm -rf %{buildroot} /etc/xapi/network.conf %files libvirt -#%defattr(-,root,root) -#%{_sbindir}/xenopsd-libvirt -#%{_sysconfdir}/init.d/xenopsd-libvirt +%defattr(-,root,root) +%{_sbindir}/xenopsd-libvirt +%{_sysconfdir}/init.d/xenopsd-libvirt %post libvirt /sbin/chkconfig --add xenopsd-libvirt From 9ca1c68f8638044ed166fb90c2ccc888cb7ebb65 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 11:30:08 +0100 Subject: [PATCH 0306/1125] ocaml-xenstore: Mark as conflicting with upstream xen-ocaml package For now, at least, we need to use our own build of xenstore, not the version provided by upstream. Reported-by: Sayid Munawar Signed-off-by: Euan Harris --- SPECS/ocaml-xenstore.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index c597f441..6b71f71b 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -9,6 +9,7 @@ Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{n BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib +Conflicts: xen-ocaml %description An implementation of the xenstore protocol in OCaml. @@ -16,6 +17,7 @@ An implementation of the xenstore protocol in OCaml. %package devel Summary: Development files for %{name} Group: Development/Other +Conflicts: xen-ocaml-devel %description devel The %{name}-devel package contains libraries and signature files for From 8a7dba8e9067a758b485f40dcf30d79955612226 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 14:45:54 +0100 Subject: [PATCH 0307/1125] vncterm: Update to latest release in upstream repository Signed-off-by: Euan Harris --- SPECS/vncterm.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 8174bc59..3a767bd7 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,10 +1,10 @@ Summary: vncterm tty to vnc utility Name: vncterm -Version: 0.1 +Version: 0.9.0 Release: 1 License: GPL Group: System/Hypervisor -Source0: https://github.com/xapi-project/%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: xen-devel @@ -12,7 +12,7 @@ BuildRequires: xen-devel %description This package contains the vncterm utility %prep -%setup -q -n %{name}-master-%{version} +%setup -q %patch0 -p1 %build @@ -37,6 +37,9 @@ getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s %{_bindir}/vncterm %changelog +* Thu Aug 22 2013 Euan Harris - 0.9.0-1 +- Update to latest version of upstream package + * Thu Jun 27 2013 David Scott - add users and groups: vncterm,vncterm_base From 3ee128617bbe04bacd70b27b7de9ec8c56c280f5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 17:09:53 +0100 Subject: [PATCH 0308/1125] vncterm: Update patch to fix build on Debian Signed-off-by: Euan Harris --- SOURCES/vncterm-1-fix-build | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/SOURCES/vncterm-1-fix-build b/SOURCES/vncterm-1-fix-build index 8a7d6644..4aafcd03 100644 --- a/SOURCES/vncterm-1-fix-build +++ b/SOURCES/vncterm-1-fix-build @@ -1,7 +1,26 @@ -diff -r feee2b1d5a29 main.c ---- a/main.c Wed Oct 31 16:55:54 2012 +0000 -+++ b/main.c Tue Jun 04 17:44:46 2013 +0000 -@@ -47,7 +47,7 @@ +diff --git a/Makefile b/Makefile +index 8ef431f..9a87d60 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,7 +5,7 @@ OBJS := main.o console.o + LIBS_so := libvnc/libvnc.so + LIBS := libvnc/libvnc.a + +-CFLAGS = -I$(shell pwd)/include ++CFLAGS = -I$(shell pwd)/include -Wno-unused-result + # _GNU_SOURCE for asprintf. + CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE + CFLAGS += -Wall -Werror -g -O1 +diff --git a/main.c b/main.c +index 526e09f..9fd5ff3 100644 +--- a/main.c ++++ b/main.c +@@ -43,11 +43,12 @@ + #include + #include + #include ++#include + #include #ifndef NXENSTORE From 02c6eeedbadce33fa2cd0e85a016efded8feb863 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 27 Aug 2013 16:19:39 +0100 Subject: [PATCH 0309/1125] xapi: Add version numbers to changelog Signed-off-by: Euan Harris --- SPECS/xapi.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 15dc6e3d..d8aace35 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -147,16 +147,16 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog -* Tue Aug 20 2013 David Scott +* Tue Aug 20 2013 David Scott - 1.9.19-1 - Add sparse_dd to the xapi package so VDI.copy should work -* Tue Jun 18 2013 David Scott +* Tue Jun 18 2013 David Scott - 1.9.6-1 - Update to 1.9.6 -* Sun Jun 8 2013 David Scott +* Sun Jun 8 2013 David Scott - 1.9.2-1 - Add python-devel for writing python clients -* Wed Jun 5 2013 David Scott +* Wed Jun 5 2013 David Scott - 1.9.1-1 - Initial package From 1f405f4cad50044384f25ae9f8a01fb477c9d54d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 28 Aug 2013 13:03:33 +0100 Subject: [PATCH 0310/1125] xapi: Make xapissl use stunnel4 if it is available Signed-off-by: Euan Harris --- SOURCES/xen-api-xapissl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index 6c4566b2..45124b2d 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -12,7 +12,7 @@ SSLCONFFILE="/etc/xapi/xapissl.conf" XAPISSL_LOCK="/var/lock/xapissl" # If stunnel4 exists, use it. Otherwise use stunnel. -exec=$(which stunnel) +$(which stunnel4 || which stunnel) 2> /dev/null generate_ssl_cert() { local FILE=$1 From 387c87cc5b1c15071643785b9c7dd03737c38284 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 28 Aug 2013 15:01:07 +0100 Subject: [PATCH 0311/1125] Avoid needing to play with domain 0's firewall forwarding chain We exempt bridged ethernet traffic from being processed by the iptables forwarding chain by setting the sysctl at module load time. This brings bridge into line with the ovs. Signed-off-by: David Scott --- SOURCES/xcp-networkd-bridge-conf | 4 ++++ SPECS/xcp-networkd.spec | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 SOURCES/xcp-networkd-bridge-conf diff --git a/SOURCES/xcp-networkd-bridge-conf b/SOURCES/xcp-networkd-bridge-conf new file mode 100644 index 00000000..280743c7 --- /dev/null +++ b/SOURCES/xcp-networkd-bridge-conf @@ -0,0 +1,4 @@ +# Prevent guest traffic flowing over the bridge being processed +# by the domain 0 firewall +install bridge \ +/sbin/modprobe bridge --ignore-install && /sbin/sysctl -w net.bridge.bridge-nf-call-iptables=0 diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 47ed2b6c..3c99fece 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,6 +1,6 @@ Name: xcp-networkd Version: 0.9.2 -Release: 1 +Release: 2 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other @@ -9,6 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{versio Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf +Source4: xcp-networkd-bridge-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel @@ -39,6 +40,7 @@ install -m 0755 xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd mkdir -p %{buildroot}/etc/xcp install -m 0644 xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf +install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf %clean rm -rf %{buildroot} @@ -48,6 +50,7 @@ rm -rf %{buildroot} %doc README.markdown LICENSE MAINTAINERS %{_sbindir}/xcp-networkd %{_sysconfdir}/init.d/xcp-networkd +/etc/modprobe.d/bridge.conf %config(noreplace) /etc/xcp/network.conf %config(noreplace) /etc/xcp-networkd.conf @@ -61,6 +64,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Aug 28 2013 David Scott +- When loading the bridge module, prevent guest traffic being + processed by the domain 0 firewall + * Sun Jun 9 2013 David Scott - Update to 0.9.2 From 7de7401e354d946735bb7c406f248de24962ae38 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 28 Aug 2013 17:09:30 +0100 Subject: [PATCH 0312/1125] ffs: Add installation dependency on nfs-utils Signed-off-by: Euan Harris --- SPECS/ffs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 5e493fbc..ee1cc53f 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -13,6 +13,7 @@ BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel +Requries: nfs-utils %description Simple flat file storage manager for the xapi toolstack. From fedbad6d4e482a687fddc34f6e8d703c3d35c5ac Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Wed, 28 Aug 2013 12:09:30 -0500 Subject: [PATCH 0313/1125] Fixing xcp-networkd SPEC file so that xcp-networkd-bridge-conf is copied and modprobe.d dir is created --- SPECS/xcp-networkd.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 3c99fece..a8e1fcec 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -27,6 +27,7 @@ Simple host networking management service for the xapi toolstack. cp %{SOURCE1} xcp-networkd-init cp %{SOURCE2} xcp-networkd-conf cp %{SOURCE3} xcp-networkd-network-conf +cp %{SOURCE4} xcp-networkd-bridge-conf %build make @@ -40,6 +41,7 @@ install -m 0755 xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd mkdir -p %{buildroot}/etc/xcp install -m 0644 xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf +mkdir -p %{buildroot}/etc/modprobe.d install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf %clean From f0fc369f7636913763ffcfd9614e5f6a573ae672 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 28 Aug 2013 17:09:30 +0100 Subject: [PATCH 0314/1125] ffs: Add installation dependency on nfs-utils Signed-off-by: Euan Harris --- SPECS/ffs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 5e493fbc..5e3b4abb 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -13,6 +13,7 @@ BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel +Requires: nfs-utils %description Simple flat file storage manager for the xapi toolstack. From 191deff4fcafe785064677b31546dbecd071e678 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 28 Aug 2013 18:26:31 +0100 Subject: [PATCH 0315/1125] ffs: Fix typo Signed-off-by: Euan Harris --- SPECS/ffs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index ee1cc53f..5e3b4abb 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -13,7 +13,7 @@ BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel -Requries: nfs-utils +Requires: nfs-utils %description Simple flat file storage manager for the xapi toolstack. From f35797e59877b26f14b173657ee7a14f2b064dad Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 Aug 2013 16:39:58 +0100 Subject: [PATCH 0316/1125] xapi: Add installation dependency on hwdata pci-info requires the pci.ids file, which is provided by hwdata. Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index d8aace35..2c21f882 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -24,7 +24,7 @@ BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-de BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop -Requires: stunnel ocaml-xcp-inventory +Requires: stunnel ocaml-xcp-inventory hwdata %description XCP toolstack. From 340d7d80162e76d071e03cdfd661be01647912e7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 2 Sep 2013 11:08:35 +0100 Subject: [PATCH 0317/1125] Update xapi, fix XenAPI.py Signed-off-by: David Scott --- SPECS/xapi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 2c21f882..bac75d2a 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.19 -Release: 2 +Version: 1.9.20 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -147,6 +147,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Mon Sep 1 2013 David Scott - 1.9.20-0 +- Fix XenAPI.py on python2.7 + * Tue Aug 20 2013 David Scott - 1.9.19-1 - Add sparse_dd to the xapi package so VDI.copy should work From fd0ae1d722645e3bf62bcd934aeeeb372dea0c16 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:47:47 +0100 Subject: [PATCH 0318/1125] forkexecd: Add installation dependency on ocaml-rpc Signed-off-by: Euan Harris --- SPECS/forkexecd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 2cce5d9e..7e270f01 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -10,6 +10,7 @@ Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-syslog-devel ocaml-uuidm-devel ocaml-stdext-devel +Requires: ocaml-rpc ocaml-rpc-devel Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts From 751f70c363e856b405b999dc2e1c8bf6a9f8a2b7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:48:22 +0100 Subject: [PATCH 0319/1125] ocaml-cstruct: Add installation dependency on ocaml-ocplib-endian-devel Signed-off-by: Euan Harris --- SPECS/ocaml-cstruct.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 77511a00..57bfce0c 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -8,7 +8,8 @@ URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0. Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel -Requires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib ocaml-ocplib-endian-devel +#XXX ocaml-cstruct should require caml-ocplib-endian, not -devel %description Read and write low-level C-style structures in OCaml. From 89a93d3f6eeab9598c35ed6e139da0a3c880502c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:50:38 +0100 Subject: [PATCH 0320/1125] ocaml-xcp-inventory: Fix build dependency on ocaml-findlib-devel --- SPECS/ocaml-xcp-inventory.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 37172b8e..9beda20b 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -7,7 +7,7 @@ Group: Development/Other URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel +BuildRequires: ocaml ocaml-findlib-devel ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel %description A simple library to read and write the XCP inventory file. From 1b22400843819e5d2722c1cf71b45f56663b77e6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:51:24 +0100 Subject: [PATCH 0321/1125] xcp-networkd: Add build dependency on message-switch-devel Signed-off-by: Euan Harris --- SPECS/xcp-networkd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index a8e1fcec..4d7fec13 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -17,7 +17,7 @@ BuildRequires: ocaml-stdext-devel forkexecd-devel ocaml-xen-api-libs-transition BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-xen-api-client-devel -BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-oclock-devel message-switch-devel %description Simple host networking management service for the xapi toolstack. From 8b47b2cfacb025a126195aac298a67e7792737ed Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 15:04:08 +0100 Subject: [PATCH 0322/1125] ffs: Add missing build dependencies Signed-off-by: Euan Harris --- SPECS/ffs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 5e3b4abb..9a4ebb34 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -12,8 +12,8 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel -BuildRequires: ocaml-tapctl-devel -Requires: nfs-utils +BuildRequires: ocaml-tapctl-devel message-switch-devel forkexecd-devel +Requires: ocaml-libvhd-devel nfs-utils %description Simple flat file storage manager for the xapi toolstack. From 97c22208fc9d05abcaaf8102df8c367e3bd9746d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 15:12:21 +0100 Subject: [PATCH 0323/1125] sm-cli: Add build dependency on message-switch-devel Signed-off-by: Euan Harris --- SPECS/sm-cli.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 3fdbf41e..7633c56d 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -9,6 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{versio BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel +BuildRequires: message-switch-devel Requires: message-switch # XXX transitively required by message_switch From c96c09a0bbc4ef163c72b764d1229cd9401429a7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 Aug 2013 13:58:56 +0100 Subject: [PATCH 0324/1125] xapi-libvirt-storage: Add dependency on message-switch-devel Signed-off-by: Euan Harris --- SPECS/xapi-libvirt-storage.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 4eb0ff5b..8c217ad7 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -12,6 +12,7 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvir BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel +BuildRequires: message-switch-devel %description Allows the manipulation of libvirt storage pools and volumes via xapi. From 884a9b356bcafa7db59c8a90d4606adc89e56e15 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 Aug 2013 14:11:23 +0100 Subject: [PATCH 0325/1125] xapi: Add missing dependencies Signed-off-by: Euan Harris --- SPECS/xapi.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index bac75d2a..2cb251c9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -24,6 +24,7 @@ BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-de BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop +BuildRequires: ocaml-xenstore-clients-devel message-switch-devel Requires: stunnel ocaml-xcp-inventory hwdata %description From fa1821657cf7e52378db79fb39a99ee64b9a5566 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 Aug 2013 14:13:48 +0100 Subject: [PATCH 0326/1125] xcp-rrdd: Add missing dependencies Signed-off-by: Euan Harris --- SPECS/xcp-rrdd.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 62be9082..dd972673 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -12,9 +12,10 @@ BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel -BuildRequires: xen-devel +BuildRequires: xen-devel message-switch-devel forkexecd-devel %description Statistics gathering daemon for the xapi toolstack. From 5eb7d785649f45b0dd0509d6a0ead89c6845c2a3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 Aug 2013 14:14:51 +0100 Subject: [PATCH 0327/1125] xenops-cli: Add missing dependency on message-switch Signed-off-by: Euan Harris --- SPECS/xenops-cli.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 29937666..7f56966a 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -9,6 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{versio BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel +BuildRequires: message-switch-devel Requires: message-switch # XXX transitively required by message_switch From 974afd074601e8c7c449eb942503dd5fbd1cf149 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 2 Sep 2013 11:52:49 +0100 Subject: [PATCH 0328/1125] Update xenserver-install-wizard Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 4a4e9d34..b41cd3a7 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,8 +2,8 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.17 -Release: 1 +Version: 0.2.18 +Release: 0 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Mon Sep 1 2013 David Scott +- Update to 0.2.18 + * Mon Jun 10 2013 David Scott - Update to 0.2.4 From fac63c4d6419c161812615149205f76cdeffaab2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 09:27:30 +0100 Subject: [PATCH 0329/1125] xcp-networkd: Add installation dependency on ethtool Signed-off-by: Euan Harris --- SPECS/xcp-networkd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 4d7fec13..e76307d7 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -18,6 +18,7 @@ BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-xen-api-client-devel BuildRequires: ocaml-oclock-devel message-switch-devel +Requires: ethtool %description Simple host networking management service for the xapi toolstack. From 3c8a7a6623a1b49da383a84932fdfec1570a4860 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 15:32:59 +0100 Subject: [PATCH 0330/1125] xen-api-xapissl: Put back exec variable, lost in change 1f405f4c Signed-off-by: Euan Harris --- SOURCES/xen-api-xapissl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index 45124b2d..97a718e8 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -12,7 +12,7 @@ SSLCONFFILE="/etc/xapi/xapissl.conf" XAPISSL_LOCK="/var/lock/xapissl" # If stunnel4 exists, use it. Otherwise use stunnel. -$(which stunnel4 || which stunnel) 2> /dev/null +exec=$(which stunnel4 || which stunnel) 2> /dev/null generate_ssl_cert() { local FILE=$1 From 4c8919825e90f79da355f25efadc4c54ae5b4f63 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 15:54:26 +0100 Subject: [PATCH 0331/1125] xenopsd: Add missing install dependency on qemu-system-x86 Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a93da72b..04247f6a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel -Requires: message-switch xenops-cli +Requires: message-switch xenops-cli qemu-system-x86 %description Simple VM manager for the xapi toolstack. From d061707db213285518415a916215cf0bc689128f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 17:11:06 +0100 Subject: [PATCH 0332/1125] xapi, wizard: Release should start at 1 Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 2cb251c9..246b8bd0 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.20 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index b41cd3a7..e9b9d5cd 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,7 +3,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.18 -Release: 0 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard From e8895a3e9d5db11e430eaa0c7a7733f7403683bb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 Aug 2013 17:54:58 +0100 Subject: [PATCH 0333/1125] specs: Fall back to /var/lock if subsys doesn't exist Signed-off-by: Euan Harris --- SOURCES/ffs-init | 6 +++++- SOURCES/forkexecd-init | 6 +++++- SOURCES/message-switch-init | 6 +++++- SOURCES/squeezed-init | 6 +++++- SOURCES/xapi-libvirt-storage-init | 6 +++++- SOURCES/xcp-networkd-init | 6 +++++- SOURCES/xcp-rrdd-init | 6 +++++- SOURCES/xen-api-init | 6 +++++- SOURCES/xenopsd-libvirt-init | 6 +++++- SOURCES/xenopsd-simulator-init | 6 +++++- SOURCES/xenopsd-xc-init | 6 +++++- SOURCES/xenopsd-xenlight-init | 6 +++++- 12 files changed, 60 insertions(+), 12 deletions(-) diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init index 69dce5be..c8ce7e45 100755 --- a/SOURCES/ffs-init +++ b/SOURCES/ffs-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/ffs.pid prog=ffs exec=/usr/sbin/ffs -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/forkexecd-init b/SOURCES/forkexecd-init index 7fc87eb5..fe329f4d 100755 --- a/SOURCES/forkexecd-init +++ b/SOURCES/forkexecd-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/forkexecd.pid prog=forkexecd exec=/usr/sbin/forkexecd -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/message-switch-init b/SOURCES/message-switch-init index 27aa0045..22fceeae 100755 --- a/SOURCES/message-switch-init +++ b/SOURCES/message-switch-init @@ -26,7 +26,11 @@ PIDFILE=/var/run/message-switch.pid prog=message-switch exec=/usr/sbin/message-switch -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init index 12ddd4ee..1c23b49f 100755 --- a/SOURCES/squeezed-init +++ b/SOURCES/squeezed-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/squeezed.pid prog=squeezed exec=/usr/sbin/squeezed -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xapi-libvirt-storage-init b/SOURCES/xapi-libvirt-storage-init index 08382b55..9d7d7049 100755 --- a/SOURCES/xapi-libvirt-storage-init +++ b/SOURCES/xapi-libvirt-storage-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xapi-libvirt-storage.pid prog=xapi-libvirt-storage exec=/usr/sbin/xapi-libvirt-storage -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xcp-networkd-init b/SOURCES/xcp-networkd-init index 7505ad4c..a7b004ee 100755 --- a/SOURCES/xcp-networkd-init +++ b/SOURCES/xcp-networkd-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xcp-networkd.pid prog=xcp-networkd exec=/usr/sbin/xcp-networkd -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xcp-rrdd-init b/SOURCES/xcp-rrdd-init index 67864349..d0f546ea 100755 --- a/SOURCES/xcp-rrdd-init +++ b/SOURCES/xcp-rrdd-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xcp-rrdd.pid prog=xcp-rrdd exec=/usr/sbin/xcp-rrdd -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index 14446e7b..e0888840 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xapi.pid prog=xapi exec=/usr/sbin/xapi -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init index 908973ae..b0512419 100755 --- a/SOURCES/xenopsd-libvirt-init +++ b/SOURCES/xenopsd-libvirt-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xenopsd-libvirt.pid prog=xenopsd-libvirt exec=/usr/sbin/xenopsd-libvirt -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init index 63a066cf..f6001ec3 100755 --- a/SOURCES/xenopsd-simulator-init +++ b/SOURCES/xenopsd-simulator-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xenopsd-simulator.pid prog=xenopsd-simulator exec=/usr/sbin/xenopsd-simulator -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 23cc51cf..799e0c91 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xenopsd-xc.pid prog=xenopsd-xc exec=/usr/sbin/xenopsd-xc -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 2eedcd7a..37b1df48 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -24,7 +24,11 @@ PIDFILE=/var/run/xenopsd-xenlight.pid prog=xenopsd-xenlight exec=/usr/sbin/xenopsd-xenlight -lockfile=/var/lock/subsys/$prog +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi # Source config if [ -f /etc/sysconfig/$prog ] ; then From 9a624b34dd0fe5bef435dc8abf1ca6438d842f5c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 Aug 2013 18:06:17 +0100 Subject: [PATCH 0334/1125] specs: Use LSB init-functions instead of RedHat-specific functions Signed-off-by: Euan Harris --- SOURCES/ffs-init | 6 +++--- SOURCES/forkexecd-init | 6 +++--- SOURCES/message-switch-init | 6 +++--- SOURCES/squeezed-init | 6 +++--- SOURCES/xapi-libvirt-storage-init | 6 +++--- SOURCES/xcp-networkd-init | 6 +++--- SOURCES/xcp-rrdd-init | 6 +++--- SOURCES/xen-api-init | 6 +++--- SOURCES/xenopsd-libvirt-init | 6 +++--- SOURCES/xenopsd-simulator-init | 6 +++--- SOURCES/xenopsd-xc-init | 6 +++--- SOURCES/xenopsd-xenlight-init | 6 +++--- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init index c8ce7e45..f346b64d 100755 --- a/SOURCES/ffs-init +++ b/SOURCES/ffs-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/ffs.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting ffs: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/forkexecd-init b/SOURCES/forkexecd-init index fe329f4d..97d4cab6 100755 --- a/SOURCES/forkexecd-init +++ b/SOURCES/forkexecd-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/forkexecd.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting forkexecd: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $FORKEXEC_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $FORKEXEC_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/message-switch-init b/SOURCES/message-switch-init index 22fceeae..cdff03f3 100755 --- a/SOURCES/message-switch-init +++ b/SOURCES/message-switch-init @@ -19,7 +19,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/message-switch.pid @@ -43,7 +43,7 @@ start() { umask 077 echo -n $"Starting message switch: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $MESSAGE_SWITCH_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $MESSAGE_SWITCH_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -58,7 +58,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init index 1c23b49f..6e89cebf 100755 --- a/SOURCES/squeezed-init +++ b/SOURCES/squeezed-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/squeezed.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting squeezed: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $SQUEEZED_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $SQUEEZED_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xapi-libvirt-storage-init b/SOURCES/xapi-libvirt-storage-init index 9d7d7049..6140b92a 100755 --- a/SOURCES/xapi-libvirt-storage-init +++ b/SOURCES/xapi-libvirt-storage-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xapi-libvirt-storage.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xapi-libvirt-storage: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_LIBVIRT_STORAGE_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_LIBVIRT_STORAGE_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xcp-networkd-init b/SOURCES/xcp-networkd-init index a7b004ee..54f31c87 100755 --- a/SOURCES/xcp-networkd-init +++ b/SOURCES/xcp-networkd-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xcp-networkd.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xcp-networkd: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_NETWORKD_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_NETWORKD_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xcp-rrdd-init b/SOURCES/xcp-rrdd-init index d0f546ea..41a3975f 100755 --- a/SOURCES/xcp-rrdd-init +++ b/SOURCES/xcp-rrdd-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xcp-rrdd.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xcp-rrdd: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_RRDD_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_RRDD_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index e0888840..d49bb7d7 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xapi.pid @@ -42,7 +42,7 @@ start() { echo -n $"Starting xapi: " export OCAMLRUNPARAM=b - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -76,7 +76,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init index b0512419..f753257d 100755 --- a/SOURCES/xenopsd-libvirt-init +++ b/SOURCES/xenopsd-libvirt-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xenopsd-libvirt.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-libvirt: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_LIBVIRT_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_LIBVIRT_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init index f6001ec3..257a9892 100755 --- a/SOURCES/xenopsd-simulator-init +++ b/SOURCES/xenopsd-simulator-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xenopsd-simulator.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-simulator: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_SIMULATOR_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_SIMULATOR_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 799e0c91..01f87363 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xenopsd-xc.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-xc: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XC_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XC_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 37b1df48..0acdaff3 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -17,7 +17,7 @@ ### END INIT INFO # Source function library. -. /etc/init.d/functions +. /lib/lsb/init-functions RETVAL=0 PIDFILE=/var/run/xenopsd-xenlight.pid @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-xenlight: " - daemon --pidfile="$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XENLIGHT_OPTIONS + start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XENLIGHT_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -56,7 +56,7 @@ stop() { return $RETVAL } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status_of_proc -p "$PIDFILE" $exec $prog } restart() { stop From 9cf4e5a86e2c6c45f891ef2d5c13a00b0ee08981 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 Aug 2013 18:08:01 +0100 Subject: [PATCH 0335/1125] xen-api-xapissl: Use LSB init-functions Signed-off-by: Euan Harris --- SOURCES/xen-api-xapissl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index 97a718e8..9a8e64d3 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -3,7 +3,7 @@ # start and stop stunnel for xapi # source function library -. /etc/rc.d/init.d/functions +. /lib/lsb/init-functions ACCEPT=$2 PEMFILE="/etc/xapi/ssl.pem" @@ -92,7 +92,7 @@ start() { if [ ! -f %{SSLCONFFILE} ]; then writeconffile fi - daemon --pidfile="$PIDFILE" $exec ${SSLCONFFILE} $XAPISSL_OPTIONS + start_daemon -p "$PIDFILE" $exec ${SSLCONFFILE} $XAPISSL_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $XAPISSL_LOCK @@ -109,7 +109,7 @@ stop() { } rhstatus() { - status -p "$PIDFILE" -l $prog $exec + status -p "$PIDFILE" $exec $prog } restart() { stop From edd5a424d48ae56427ddb192048343ee5ac9e4b0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 17:22:40 +0100 Subject: [PATCH 0336/1125] specs: Add dependencies on RedHat LSB initscripts package Signed-off-by: Euan Harris --- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/message-switch.spec | 1 + SPECS/squeezed.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 1 + SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 1 + SPECS/xenopsd.spec | 2 +- 9 files changed, 9 insertions(+), 6 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 9a4ebb34..c6d558d6 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -13,7 +13,7 @@ BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel message-switch-devel forkexecd-devel -Requires: ocaml-libvhd-devel nfs-utils +Requires: ocaml-libvhd-devel nfs-utils redhat-lsb-core %description Simple flat file storage manager for the xapi toolstack. diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 7e270f01..d0ec919e 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -10,7 +10,7 @@ Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-syslog-devel ocaml-uuidm-devel ocaml-stdext-devel -Requires: ocaml-rpc ocaml-rpc-devel +Requires: ocaml-rpc ocaml-rpc-devel redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 9cf8cb3b..38f0907a 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -17,6 +17,7 @@ BuildRequires: ocaml-ounit-devel ocaml-syslog-devel ocaml-uri-devel BuildRequires: ocaml-re-devel ocaml-rpc-devel cmdliner-devel BuildRequires: ocaml-ssl-devel ocaml-oclock-devel BuildRequires: openssl openssl-devel +Requires: redhat-lsb-core # "ocamlfind" # "cohttp" {= "0.9.7"} # "rpc" diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index a29eb172..0ed3e75f 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -14,7 +14,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstor BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel BuildRequires: ocaml-oclock-devel xen-devel -Requires: xen-libs +Requires: xen-libs redhat-lsb-core %description Memory ballooning daemon for the xapi toolstack. diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 8c217ad7..c26a2c1a 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -13,6 +13,7 @@ BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel BuildRequires: message-switch-devel +Requires: redhat-lsb-core %description Allows the manipulation of libvirt storage pools and volumes via xapi. diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 246b8bd0..eec7de8f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -25,7 +25,7 @@ BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-dev BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -Requires: stunnel ocaml-xcp-inventory hwdata +Requires: stunnel ocaml-xcp-inventory hwdata redhat-ls-core %description XCP toolstack. diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index e76307d7..d6c0c1ba 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-xen-api-client-devel BuildRequires: ocaml-oclock-devel message-switch-devel -Requires: ethtool +Requires: ethtool redhat-lsb-core %description Simple host networking management service for the xapi toolstack. diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index dd972673..93f87dc4 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -16,6 +16,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel BuildRequires: xen-devel message-switch-devel forkexecd-devel +Requires: redhat-lsb-init %description Statistics gathering daemon for the xapi toolstack. diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 04247f6a..e3ee6626 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel -Requires: message-switch xenops-cli qemu-system-x86 +Requires: message-switch xenops-cli qemu-system-x86 redhat-lsb-core %description Simple VM manager for the xapi toolstack. From a735c78c8493b43608e1235c69eefcd0829d592c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Sep 2013 17:40:56 +0100 Subject: [PATCH 0337/1125] xapi: Release should start at 1 in changelog, too Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 246b8bd0..22be3ba2 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -148,7 +148,7 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog -* Mon Sep 1 2013 David Scott - 1.9.20-0 +* Mon Sep 1 2013 David Scott - 1.9.20-1 - Fix XenAPI.py on python2.7 * Tue Aug 20 2013 David Scott - 1.9.19-1 From 3bc32c6001f92e2459f0628807e2c456d58943af Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 2 Sep 2013 17:24:44 +0000 Subject: [PATCH 0338/1125] Update to squeezed 0.10.0, set to manage ballooning domain 0 Signed-off-by: David Scott --- SOURCES/squeezed-conf | 23 +++++++++++++++++++++++ SPECS/squeezed.spec | 16 ++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 SOURCES/squeezed-conf diff --git a/SOURCES/squeezed-conf b/SOURCES/squeezed-conf new file mode 100644 index 00000000..7f53269d --- /dev/null +++ b/SOURCES/squeezed-conf @@ -0,0 +1,23 @@ +# Configuration file for squeezed + +log=syslog:squeezed +pidfile=/var/run/squeezed.pid + +# Omit some sources of log-spam by default +disable-logging-for=http + +# Host memory will be re-examined and possibly re-balanced +# every balance-check-interval +balance-check-interval=10 + +# Set to true if you want domain zero to be automatically ballooned +manage-domain-zero=true + +# If managing domain zero, we won't balloon lower than this value +# domain-zero-dynamic-min = 1073741824 + +# If managing domain zero, we won't balloon higher than this value +# 'auto' means use all available memory (where 'available' means +# available to domain 0, possibly constrained by the xen commandline) +# domain-zero-dynamic-max = auto + diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 0ed3e75f..6bf9171a 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,12 +1,13 @@ Name: squeezed -Version: 0.9.0 +Version: 0.10.0 Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/squeezed/archive/squeezed-0.9.0.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/squeezed/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init +Source2: squeezed-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-syslog-devel @@ -20,8 +21,9 @@ Requires: xen-libs redhat-lsb-core Memory ballooning daemon for the xapi toolstack. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q -n %{name}-%{version} cp %{SOURCE1} squeezed-init +cp %{SOURCE2} squeezed-conf %build make @@ -32,6 +34,8 @@ mkdir -p %{buildroot}/%{_sbindir} install dist/build/squeezed/squeezed %{buildroot}/%{_sbindir}/squeezed mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed +mkdir -p %{buildroot}/etc +install -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf %clean rm -rf %{buildroot} @@ -41,6 +45,7 @@ rm -rf %{buildroot} %doc README.md LICENSE MAINTAINERS %{_sbindir}/squeezed %{_sysconfdir}/init.d/squeezed +%{_sysconfdir}/squeezed.conf %post /sbin/chkconfig --add squeezed @@ -52,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Mon Sep 2 2013 David Scott +- Update to 0.10.0, with support for domain 0 ballooning + * Wed Jun 5 2013 David Scott - Initial package From aee8c817d24c89482cd15f85e0e4a388934ddbd6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 2 Sep 2013 19:10:42 +0000 Subject: [PATCH 0339/1125] omake: switch to the same source URL that opam uses (omake.metaprl.org doesn't seem reliable) Signed-off-by: David Scott --- SPECS/omake.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 8459af56..62bd9dc9 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -3,7 +3,7 @@ Release: 1 Summary: The omake build system. Name: omake URL: http://omake.metaprl.org/ -Source0: http://omake.metaprl.org/downloads/%{name}-%{version}-0.rc1.tar.gz +Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1.tar.gz/fe39a476ef4e33b7ba2ca77a6bcaded2/omake-0.9.8.6-0.rc1.tar.gz Patch0: omake-1-warnings License: GPL Group: Development/Tools From c733d799549fb81e2f43ae2796ff3f2d1a755c46 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 15:13:02 +0100 Subject: [PATCH 0340/1125] squeezed: Add dependency on message-switch Signed-off-by: Euan Harris --- SPECS/squeezed.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 6bf9171a..6c485166 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -14,8 +14,8 @@ BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-syslog-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel -BuildRequires: ocaml-oclock-devel xen-devel -Requires: xen-libs redhat-lsb-core +BuildRequires: ocaml-oclock-devel xen-devel message-switch-devel +Requires: xen-libs redhat-lsb-core message-switch %description Memory ballooning daemon for the xapi toolstack. From 99fe7e81cc80c06265d9d929525687b3e88895e1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 10:07:29 +0100 Subject: [PATCH 0341/1125] xapi: Fix typo in installation dependencies Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index cefc7529..f0a6f18f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -25,7 +25,7 @@ BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-dev BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -Requires: stunnel ocaml-xcp-inventory hwdata redhat-ls-core +Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core %description XCP toolstack. From 54fe73efbb037a0e70ca1f4161ddec3333bea2a6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 10:16:57 +0100 Subject: [PATCH 0342/1125] xcp-rrdd: Fix redhat-lsb-core dependency Signed-off-by: Euan Harris --- SPECS/xcp-rrdd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 93f87dc4..3d18a03b 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -16,7 +16,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel BuildRequires: xen-devel message-switch-devel forkexecd-devel -Requires: redhat-lsb-init +Requires: redhat-lsb-core %description Statistics gathering daemon for the xapi toolstack. From 43ccf5c79450c5d40931b4fc0b69495381392640 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 13:35:07 +0100 Subject: [PATCH 0343/1125] xen-api: Change PAM configuration from password-auth to passwd password-auth isn't available on Ubuntu, but passwd is and it seems to behave equivalently to password-auth on CentOS. In particular, local non-root users can still call xe commands using: xe -u root -pw Signed-off-by: Euan Harris --- SOURCES/xen-api-pam | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SOURCES/xen-api-pam b/SOURCES/xen-api-pam index 9f1d921c..7cbaa522 100644 --- a/SOURCES/xen-api-pam +++ b/SOURCES/xen-api-pam @@ -1,3 +1,3 @@ -auth include password-auth -account include password-auth -password include password-auth +auth include passwd +account include passwd +password include passwd From 17dfa43070898f0ec122f2318f35311e6cff1487 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 3 Sep 2013 16:12:58 +0100 Subject: [PATCH 0344/1125] New wizard version Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index e9b9d5cd..c1ee40af 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.18 +Version: 0.2.19 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Mon Sep 2 2013 David Scott +- Update to 0.2.19 + * Mon Sep 1 2013 David Scott - Update to 0.2.18 From e86eb419523f549f704d084182cedc4b10ab83a4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 17:50:07 +0100 Subject: [PATCH 0345/1125] xapi: Preprocess xapi.conf to fill in libexec directory during build On Fedora, we install some files into /usr/libexec; on Ubuntu this directory does not exist and we use /usr/lib instead. Signed-off-by: Euan Harris --- SOURCES/{xen-api-xapi-conf => xen-api-xapi-conf.in} | 4 ++-- SPECS/xapi.spec | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename SOURCES/{xen-api-xapi-conf => xen-api-xapi-conf.in} (62%) diff --git a/SOURCES/xen-api-xapi-conf b/SOURCES/xen-api-xapi-conf.in similarity index 62% rename from SOURCES/xen-api-xapi-conf rename to SOURCES/xen-api-xapi-conf.in index 5a3b8fb7..fb377569 100644 --- a/SOURCES/xen-api-xapi-conf +++ b/SOURCES/xen-api-xapi-conf.in @@ -2,7 +2,7 @@ use-xenopsd = true disable-logging-for = http db_write redo_log api_readonly -xapissl=/usr/libexec/xapi/xapissl -pci-info=/usr/libexec/xapi/pci-info +xapissl=@LIBEXECDIR@/xapi/xapissl +pci-info=@LIBEXECDIR@/xapi/pci-info udhcpd=/bin/true diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index f0a6f18f..6cc89435 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -8,7 +8,7 @@ Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/djs55/xen-api/archive/%{version}/xen-api-%{version}.tar.gz -Source1: xen-api-xapi-conf +Source1: xen-api-xapi-conf.in Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf @@ -51,7 +51,7 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} -cp %{SOURCE1} xen-api-xapi-conf +cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl cp %{SOURCE4} xen-api-db-conf @@ -69,6 +69,8 @@ omake ocaml/xapi/xapi omake ocaml/xe-cli/xe omake ocaml/xapi/sparse_dd +sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xen-api-xapi-conf.in > xen-api-xapi-conf + %install rm -rf %{buildroot} From 8baeaaab1ec4eb0434d38e1258a6a81d61727fd0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Sep 2013 10:02:04 +0100 Subject: [PATCH 0346/1125] xenopsd: Preprocess xenopsd.conf to fill in libexec directory during build On Fedora, we install some files into /usr/libexec; on Ubuntu this directory does not exist and we use /usr/lib instead. Signed-off-by: Euan Harris --- SOURCES/{xenopsd-conf => xenopsd-conf.in} | 12 ++++++------ SPECS/xenopsd.spec | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) rename SOURCES/{xenopsd-conf => xenopsd-conf.in} (50%) diff --git a/SOURCES/xenopsd-conf b/SOURCES/xenopsd-conf.in similarity index 50% rename from SOURCES/xenopsd-conf rename to SOURCES/xenopsd-conf.in index 02e801e7..ed82dc2e 100755 --- a/SOURCES/xenopsd-conf +++ b/SOURCES/xenopsd-conf.in @@ -3,15 +3,15 @@ # Omit some sources of log-spam by default disable-logging-for=http -xenguest=/usr/libexec/xenopsd/xenguest +xenguest=@LIBEXECDIR@/xenopsd/xenguest network-conf=/etc/xapi/network.conf -vif-script=/usr/libexec/xenopsd/vif -vif-xl-script=/usr/libexec/xenopsd/vif-xl -qemu-vif-script=/usr/libexec/xenopsd/qemu-vif-script -qemu-dm-wrapper=/usr/libexec/xenopsd/qemu-dm-wrapper -setup-vif-rules=/usr/libexec/xenopsd/setup-vif-rules +vif-script=@LIBEXECDIR@/xenopsd/vif +vif-xl-script=@LIBEXECDIR@/xenopsd/vif-xl +qemu-vif-script=@LIBEXECDIR@/xenopsd/qemu-vif-script +qemu-dm-wrapper=@LIBEXECDIR@/xenopsd/qemu-dm-wrapper +setup-vif-rules=@LIBEXECDIR@/xenopsd/setup-vif-rules hvmloader=/usr/lib/xen/boot/hvmloader pygrub=/usr/bin/pygrub diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index e3ee6626..59f48111 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -10,7 +10,7 @@ Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init Source4: xenopsd-xenlight-init -Source5: xenopsd-conf +Source5: xenopsd-conf.in Source6: xenopsd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel @@ -67,12 +67,14 @@ cp %{SOURCE1} xenopsd-xc-init cp %{SOURCE2} xenopsd-simulator-init cp %{SOURCE3} xenopsd-libvirt-init cp %{SOURCE4} xenopsd-xenlight-init -cp %{SOURCE5} xenopsd-conf +cp %{SOURCE5} xenopsd-conf.in cp %{SOURCE6} xenopsd-network-conf %build make +sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xenopsd-conf.in > xenopsd-conf + %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} From 9674a131c6a2eedde0b0a5dea4669e752d2aa4bd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Sep 2013 10:50:58 +0100 Subject: [PATCH 0347/1125] libvirt: Remove libvirt spec file and use distribution version Signed-off-by: Euan Harris --- SPECS/libvirt.spec | 2805 -------------------------------------------- 1 file changed, 2805 deletions(-) delete mode 100644 SPECS/libvirt.spec diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec deleted file mode 100644 index 308a0d95..00000000 --- a/SPECS/libvirt.spec +++ /dev/null @@ -1,2805 +0,0 @@ -# -*- rpm-spec -*- - -# If neither fedora nor rhel was defined, try to guess them from %{dist} -%if !0%{?rhel} && !0%{?fedora} -%{expand:%(echo "%{?dist}" | \ - sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')} -%{expand:%(echo "%{?dist}" | \ - sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')} -%endif - -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 0} - -# A client only build will create a libvirt.so only containing -# the generic RPC driver, and test driver and no libvirtd -# Default to a full server + client build -%define client_only 0 - -# Now turn off server build in certain cases - -# RHEL-5 builds are client-only for s390, ppc -%if 0%{?rhel} == 5 -%ifnarch %{ix86} x86_64 ia64 -%define client_only 1 -%endif -%endif - -# Disable all server side drivers if client only build requested -%if %{client_only} -%define server_drivers 0 -%else -%define server_drivers 1 -%endif - -# Always build with dlopen'd modules -%define with_driver_modules 1 - -# Now set the defaults for all the important features, independent -# of any particular OS - -# First the daemon itself -%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}} -%define with_avahi 0%{!?_without_avahi:%{server_drivers}} - -# Then the hypervisor drivers that run in libvirtd -%define with_xen 1 -%define with_qemu 0%{!?_without_qemu:%{server_drivers}} -%define with_lxc 0%{!?_without_lxc:%{server_drivers}} -%define with_uml 0%{!?_without_uml:%{server_drivers}} -%define with_libxl 1 - -%define with_qemu_tcg %{with_qemu} -# Change if we ever provide qemu-kvm binaries on non-x86 hosts -%if 0%{?fedora} >= 18 -%define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x -%else -%define qemu_kvm_arches %{ix86} x86_64 -%endif - -%ifarch %{qemu_kvm_arches} -%define with_qemu_kvm %{with_qemu} -%else -%define with_qemu_kvm 0 -%endif - -# Then the hypervisor drivers that run outside libvirtd, in libvirt.so -%define with_openvz 0%{!?_without_openvz:1} -%define with_vbox 0%{!?_without_vbox:1} -%define with_vmware 0%{!?_without_vmware:1} -%define with_phyp 0%{!?_without_phyp:1} -%define with_esx 0%{!?_without_esx:1} -%define with_hyperv 0%{!?_without_hyperv:1} -%define with_xenapi 0%{!?_without_xenapi:1} -%define with_parallels 0%{!?_without_parallels:1} - -# Then the secondary host drivers, which run inside libvirtd -%define with_interface 0%{!?_without_interface:%{server_drivers}} -%define with_network 0%{!?_without_network:%{server_drivers}} -%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}} -%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}} -%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}} -%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}} -%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} -%define with_storage_rbd 1 -%if 0%{?fedora} >= 17 -%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}} -%else -%define with_storage_sheepdog 0 -%endif -%define with_numactl 0%{!?_without_numactl:%{server_drivers}} -%define with_selinux 0%{!?_without_selinux:%{server_drivers}} - -# A few optional bits off by default, we enable later -%define with_polkit 0%{!?_without_polkit:0} -%define with_capng 0%{!?_without_capng:0} -%define with_netcf 0%{!?_without_netcf:0} -%define with_udev 0%{!?_without_udev:0} -%define with_hal 0%{!?_without_hal:0} -%define with_yajl 0%{!?_without_yajl:0} -%define with_nwfilter 0%{!?_without_nwfilter:0} -%define with_libpcap 0%{!?_without_libpcap:0} -%define with_macvtap 0%{!?_without_macvtap:0} -%define with_libnl 0%{!?_without_libnl:0} -%define with_audit 0%{!?_without_audit:0} -%define with_dtrace 0%{!?_without_dtrace:0} -%define with_cgconfig 0%{!?_without_cgconfig:0} -%define with_sanlock 0%{!?_without_sanlock:0} -%define with_systemd 0%{!?_without_systemd:0} -%define with_numad 0%{!?_without_numad:0} -%define with_firewalld 0%{!?_without_firewalld:0} -%define with_libssh2_transport 0%{!?_without_libssh2_transport:0} - -# Non-server/HV driver defaults which are always enabled -%define with_python 0%{!?_without_python:1} -%define with_sasl 0%{!?_without_sasl:1} - - -# Finally set the OS / architecture specific special cases - -# Xen is available only on i386 x86_64 ia64 -%ifnarch %{ix86} x86_64 ia64 -%define with_xen 0 -%define with_libxl 0 -%endif - -# Numactl is not available on s390[x] and ARM -%ifarch s390 s390x %{arm} -%define with_numactl 0 -%endif - -# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, -# VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), -# or HyperV. -%if 0%{?rhel} -%define with_openvz 0 -%define with_vbox 0 -%define with_uml 0 -%define with_phyp 0 -%define with_vmware 0 -%define with_xenapi 0 -%define with_libxl 1 -%define with_hyperv 0 -%define with_parallels 0 -%endif - -# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier -# Fedora has systemd, libvirt still used sysvinit there. -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 -%define with_systemd 1 -%endif - -# Fedora 18 / RHEL-7 are first where firewalld support is enabled -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 -%define with_firewalld 1 -%endif - -# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC -%if 0%{?rhel} == 5 -%define with_qemu_tcg 0 -%ifnarch x86_64 -%define with_qemu 0 -%define with_qemu_kvm 0 -%endif -%define with_lxc 0 -%endif - -# RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen -# on all archs. Other archs all have LXC available though -%if 0%{?rhel} >= 6 -%define with_qemu_tcg 0 -%ifnarch x86_64 -%define with_qemu 0 -%define with_qemu_kvm 0 -%endif -%define with_xen 1 -%endif - -# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc -%if 0%{?fedora} && 0%{?fedora} < 16 -%ifarch ppc64 -%define with_qemu 0 -%endif -%endif - -# Fedora doesn't have new enough Xen for libxl until F18 -%if 0%{?fedora} && 0%{?fedora} < 18 -%define with_libxl 0 -%endif - -# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer -%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6 -%define with_polkit 0%{!?_without_polkit:1} -%endif - -# libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%define with_capng 0%{!?_without_capng:1} -%endif - -# netcf is used to manage network interfaces in Fedora 12 / RHEL-6 or newer -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%define with_netcf 0%{!?_without_netcf:%{server_drivers}} -%endif - -# udev is used to manage host devices in Fedora 12 / RHEL-6 or newer -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%define with_udev 0%{!?_without_udev:%{server_drivers}} -%else -%define with_hal 0%{!?_without_hal:%{server_drivers}} -%endif - -# interface requires netcf -%if ! 0%{?with_netcf} -%define with_interface 0 -%endif - -# Enable yajl library for JSON mode with QEMU -%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 -%define with_yajl 0%{!?_without_yajl:%{server_drivers}} -%endif - -# Enable sanlock library for lock management with QEMU -# Sanlock is available only on i686 x86_64 for RHEL -%if 0%{?fedora} >= 16 -%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} -%endif -%if 0%{?rhel} >= 6 -%ifarch %{ix86} x86_64 -%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} -%endif -%endif - -# Enable libssh2 transport for new enough distros -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 -%define with_libssh2_transport 0%{!?_without_libssh2_transport:1} -%endif - -# Disable some drivers when building without libvirt daemon. -# The logic is the same as in configure.ac -%if ! %{with_libvirtd} -%define with_interface 0 -%define with_network 0 -%define with_qemu 0 -%define with_lxc 0 -%define with_uml 0 -%define with_hal 0 -%define with_udev 0 -%define with_storage_fs 0 -%define with_storage_lvm 0 -%define with_storage_iscsi 0 -%define with_storage_mpath 0 -%define with_storage_rbd 0 -%define with_storage_sheepdog 0 -%define with_storage_disk 0 -%endif - -%if %{with_qemu} || %{with_lxc} || %{with_uml} -%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}} -# Enable libpcap library -%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}} -%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}} - -# numad is used to manage the CPU and memory placement dynamically, -# it's not available on s390[x] and ARM. -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 -%ifnarch s390 s390x %{arm} -%define with_numad 0%{!?_without_numad:%{server_drivers}} -%endif -%endif -%endif - -%if %{with_macvtap} -%define with_libnl 1 -%endif - -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 5 -%define with_audit 0%{!?_without_audit:1} -%endif - -%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 -%define with_dtrace 1 -%endif - -# Pull in cgroups config system -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%if %{with_qemu} || %{with_lxc} -%define with_cgconfig 0%{!?_without_cgconfig:1} -%endif -%endif - -%if %{with_udev} || %{with_hal} -%define with_nodedev 1 -%else -%define with_nodedev 0 -%endif - -%if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk} -%define with_storage 1 -%else -%define with_storage 0 -%endif - - -# Force QEMU to run as non-root -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%define qemu_user qemu -%define qemu_group qemu -%else -%define qemu_user root -%define qemu_group root -%endif - - -# The RHEL-5 Xen package has some feature backports. This -# flag is set to enable use of those special bits on RHEL-5 -%if 0%{?rhel} == 5 -%define with_rhel5 1 -%else -%define with_rhel5 0 -%endif - -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -%define with_systemd_macros 1 -%else -%define with_systemd_macros 0 -%endif - - -Summary: Library providing a simple virtualization API -Name: libvirt -Version: 0.10.2.4 -Release: 100%{?dist}%{?extra_release} -License: LGPLv2+ -Group: Development/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -URL: http://libvirt.org/ - -%if %(echo %{version} | grep -o \\. | wc -l) == 3 -%define mainturl stable_updates/ -%endif -Source0: http://libvirt.org/sources/stable_updates/%{name}-%{version}.tar.gz - -# Fix qemu -> qemu-system-i386 (bz #857026). -# keep: This patch is Fedora-specific and not upstream. -Patch1: libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch -# Cleanly save session VMs on logout/shutdown (bz #872254) -# keep: Fixed upstream, but using patches not suitable for stable -Patch2: libvirt-dbus.patch -# Cleanly save session VMs on logout/shutdown (bz #872254) -# keep: Fixed upstream, but using patches not suitable for stable -Patch3: libvirt-save-with-session.patch - -Patch4: libvirt-qdisk.patch -Patch5: libvirt-qdisk-fixup.patch -Patch6: libvirt-emulator.patch - -%if %{with_libvirtd} -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_network} -Requires: libvirt-daemon-config-network = %{version}-%{release} -%endif -%if %{with_nwfilter} -Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} -%endif -%if %{with_driver_modules} -%if %{with_libxl} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} -%endif -%if %{with_lxc} -Requires: libvirt-daemon-driver-lxc = %{version}-%{release} -%endif -%if %{with_qemu} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -%endif -%if %{with_uml} -Requires: libvirt-daemon-driver-uml = %{version}-%{release} -%endif -%if %{with_xen} -Requires: libvirt-daemon-driver-xen = %{version}-%{release} -%endif - -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -%endif -%endif -Requires: libvirt-client = %{version}-%{release} - -# All build-time requirements. Run-time requirements are -# listed against each sub-RPM -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -%endif -BuildRequires: python-devel -%if %{with_systemd} -BuildRequires: systemd-units -%endif -%if %{with_xen} -BuildRequires: xen-devel -%endif -BuildRequires: libxml2-devel -BuildRequires: xhtml1-dtds -BuildRequires: libxslt -BuildRequires: readline-devel -BuildRequires: ncurses-devel -BuildRequires: gettext -BuildRequires: libtasn1-devel -BuildRequires: gnutls-devel -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -# for augparse, optionally used in testing -BuildRequires: augeas -%endif -%if %{with_hal} -BuildRequires: hal-devel -%endif -%if %{with_udev} -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -BuildRequires: systemd-devel >= 185 -%else -BuildRequires: libudev-devel >= 145 -%endif -BuildRequires: libpciaccess-devel >= 0.10.9 -%endif -%if %{with_yajl} -BuildRequires: yajl-devel -%endif -%if %{with_sanlock} -BuildRequires: sanlock-devel >= 1.8 -%endif -%if %{with_libpcap} -BuildRequires: libpcap-devel -%endif -%if %{with_libnl} -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -BuildRequires: libnl3-devel -%else -BuildRequires: libnl-devel -%endif -%endif -%if %{with_avahi} -BuildRequires: avahi-devel -%endif -%if %{with_selinux} -BuildRequires: libselinux-devel -%endif -%if %{with_network} -BuildRequires: dnsmasq >= 2.41 -BuildRequires: iptables -BuildRequires: iptables-ipv6 -BuildRequires: radvd -%endif -%if %{with_nwfilter} -BuildRequires: ebtables -%endif -BuildRequires: module-init-tools -%if %{with_sasl} -BuildRequires: cyrus-sasl-devel -%endif -%if %{with_polkit} -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -# Only need the binary, not -devel -BuildRequires: polkit >= 0.93 -%else -BuildRequires: PolicyKit-devel >= 0.6 -%endif -%endif -%if %{with_storage_fs} -# For mount/umount in FS driver -BuildRequires: util-linux -%endif -%if %{with_qemu} -# From QEMU RPMs -BuildRequires: /usr/bin/qemu-img -%else -%if %{with_xen} -# From Xen RPMs -BuildRequires: /usr/sbin/qcow-create -%endif -%endif -%if %{with_storage_lvm} -# For LVM drivers -BuildRequires: lvm2 -%endif -%if %{with_storage_iscsi} -# For ISCSI driver -BuildRequires: iscsi-initiator-utils -%endif -%if %{with_storage_disk} -# For disk driver -BuildRequires: parted-devel -%if 0%{?rhel} == 5 -# Broken RHEL-5 parted RPM is missing a dep -BuildRequires: e2fsprogs-devel -%endif -%endif -%if %{with_storage_mpath} -# For Multipath support -%if 0%{?rhel} == 5 -# Broken RHEL-5 packaging has header files in main RPM :-( -BuildRequires: device-mapper -%else -BuildRequires: device-mapper-devel -%endif -%if %{with_storage_rbd} -BuildRequires: ceph-devel -%endif -%endif -%if %{with_numactl} -# For QEMU/LXC numa info -BuildRequires: numactl-devel -%endif -%if %{with_capng} -BuildRequires: libcap-ng-devel >= 0.5.0 -%endif -%if %{with_phyp} || %{with_libssh2_transport} -%if %{with_libssh2_transport} -BuildRequires: libssh2-devel >= 1.3.0 -%else -BuildRequires: libssh2-devel -%endif -%endif - -%if %{with_netcf} -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -BuildRequires: netcf-devel >= 0.2.2 -%else -%if 0%{?fedora} >= 16 || 0%{?rhel} >= 6 -BuildRequires: netcf-devel >= 0.1.8 -%else -BuildRequires: netcf-devel >= 0.1.4 -%endif -%endif -%endif -%if %{with_esx} -%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 -BuildRequires: libcurl-devel -%else -BuildRequires: curl-devel -%endif -%endif -%if %{with_hyperv} -BuildRequires: libwsman-devel >= 2.2.3 -%endif -%if %{with_audit} -BuildRequires: audit-libs-devel -%endif -%if %{with_dtrace} -# we need /usr/sbin/dtrace -BuildRequires: systemtap-sdt-devel -%endif - -%if %{with_storage_fs} -# For mount/umount in FS driver -BuildRequires: util-linux -# For showmount in FS driver (netfs discovery) -BuildRequires: nfs-utils -%endif - -%if %{with_firewalld} -# Communication with the firewall daemon uses DBus -BuildRequires: dbus-devel -%endif - -# Fedora build root suckage -BuildRequires: gawk - -# For storage wiping with different algorithms -BuildRequires: scrub - -%if %{with_numad} -BuildRequires: numad -%endif - -Provides: bundled(gnulib) - -%description -Libvirt is a C toolkit to interact with the virtualization capabilities -of recent versions of Linux (and other OSes). The main package includes -the libvirtd server exporting the virtualization support. - -%package docs -Summary: API reference and website documentation -Group: Development/Libraries - -%description docs -Includes the API reference for the libvirt C library, and a complete -copy of the libvirt.org website documentation. - -%if %{with_libvirtd} -%package daemon -Summary: Server side daemon and supporting files for libvirt library -Group: Development/Libraries - -# All runtime requirements for the libvirt package (runtime requrements -# for subpackages are listed later in those subpackages) - -# The client side, i.e. shared libs and virsh are in a subpackage -Requires: %{name}-client = %{version}-%{release} - -# for modprobe of pci devices -Requires: module-init-tools -# for /sbin/ip & /sbin/tc -Requires: iproute -%if %{with_avahi} -Requires: avahi-libs -%endif -%if %{with_network} -Requires: dnsmasq >= 2.41 -Requires: radvd -%endif -%if %{with_network} || %{with_nwfilter} -Requires: iptables -Requires: iptables-ipv6 -%endif -%if %{with_nwfilter} -Requires: ebtables -%endif -%if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7) -Requires: netcf-libs >= 0.2.2 -%endif -# needed for device enumeration -%if %{with_hal} -Requires: hal -%endif -%if %{with_udev} -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -Requires: systemd >= 185 -%else -Requires: udev >= 145 -%endif -%endif -%if %{with_polkit} -%if 0%{?fedora} >= 12 || 0%{?rhel} >=6 -Requires: polkit >= 0.93 -%else -Requires: PolicyKit >= 0.6 -%endif -%endif -%if %{with_storage_fs} -Requires: nfs-utils -# For mkfs -Requires: util-linux -# For pool-build probing for existing pools -BuildRequires: libblkid-devel >= 2.17 -# For glusterfs -%if 0%{?fedora} >= 11 -Requires: glusterfs-client >= 2.0.1 -%endif -%endif -%if %{with_qemu} -# From QEMU RPMs -Requires: /usr/bin/qemu-img -# For image compression -Requires: gzip -Requires: bzip2 -Requires: lzop -Requires: xz -%else -%if %{with_xen} -# From Xen RPMs -Requires: /usr/sbin/qcow-create -%endif -%endif -%if %{with_storage_lvm} -# For LVM drivers -Requires: lvm2 -%endif -%if %{with_storage_iscsi} -# For ISCSI driver -Requires: iscsi-initiator-utils -%endif -%if %{with_storage_disk} -# For disk driver -Requires: parted -Requires: device-mapper -%endif -%if %{with_storage_mpath} -# For multipath support -Requires: device-mapper -%endif -%if %{with_storage_sheepdog} -# For Sheepdog support -Requires: sheepdog -%endif -%if %{with_cgconfig} -Requires: libcgroup -%endif -%ifarch %{ix86} x86_64 ia64 -# For virConnectGetSysinfo -Requires: dmidecode -%endif -# For service management -%if %{with_systemd} -Requires(post): systemd-units -Requires(post): systemd-sysv -Requires(preun): systemd-units -Requires(postun): systemd-units -%endif -%if %{with_numad} -Requires: numad -%endif - -%description daemon -Server side daemon required to manage the virtualization capabilities -of recent versions of Linux. Requires a hypervisor specific sub-RPM -for specific drivers. - -%if %{with_network} -%package daemon-config-network -Summary: Default configuration files for the libvirtd daemon -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-config-network -Default configuration files for setting up NAT based networking -%endif - -%if %{with_nwfilter} -%package daemon-config-nwfilter -Summary: Network filter configuration files for the libvirtd daemon -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-config-nwfilter -Network filter configuration files for cleaning guest traffic -%endif - -%if %{with_driver_modules} -%if %{with_network} -%package daemon-driver-network -Summary: Network driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-network -The network driver plugin for the libvirtd daemon, providing -an implementation of the virtual network APIs using the Linux -bridge capabilities. -%endif - - -%if %{with_nwfilter} -%package daemon-driver-nwfilter -Summary: Nwfilter driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-nwfilter -The nwfilter driver plugin for the libvirtd daemon, providing -an implementation of the firewall APIs using the ebtables, -iptables and ip6tables capabilities -%endif - - -%if %{with_nodedev} -%package daemon-driver-nodedev -Summary: Nodedev driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-nodedev -The nodedev driver plugin for the libvirtd daemon, providing -an implementation of the node device APIs using the udev -capabilities. -%endif - - -%if %{with_interface} -%package daemon-driver-interface -Summary: Interface driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-interface -The interface driver plugin for the libvirtd daemon, providing -an implementation of the network interface APIs using the -netcf library -%endif - - -%package daemon-driver-secret -Summary: Secret driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-secret -The secret driver plugin for the libvirtd daemon, providing -an implementation of the secret key APIs. - - -%if %{with_storage} -%package daemon-driver-storage -Summary: Storage driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-storage -The storage driver plugin for the libvirtd daemon, providing -an implementation of the storage APIs using LVM, iSCSI, -parted and more. -%endif - - -%if %{with_qemu} -%package daemon-driver-qemu -Summary: Qemu driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} -# There really is a hard cross-driver dependency here -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -%endif - -%description daemon-driver-qemu -The qemu driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -QEMU -%endif - - -%if %{with_lxc} -%package daemon-driver-lxc -Summary: LXC driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} -# There really is a hard cross-driver dependency here -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -%endif - -%description daemon-driver-lxc -The LXC driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -the Linux kernel -%endif - - -%if %{with_uml} -%package daemon-driver-uml -Summary: Uml driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-uml -The UML driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -User Mode Linux -%endif - - -%if %{with_xen} -%package daemon-driver-xen -Summary: Xen driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-xen -The Xen driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -Xen -%endif - - -%if %{with_libxl} -%package daemon-driver-libxl -Summary: Libxl driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-libxl -The Libxl driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -Libxl -%endif -%endif - - - -%if %{with_qemu_tcg} -%package daemon-qemu -Summary: Server side daemon & driver required to run QEMU guests -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -%endif -Requires: qemu - -%description daemon-qemu -Server side daemon and driver required to manage the virtualization -capabilities of the QEMU TCG emulators -%endif - - -%if %{with_qemu_kvm} -%package daemon-kvm -Summary: Server side daemon & driver required to run KVM guests -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -%endif -Requires: qemu-kvm - -%description daemon-kvm -Server side daemon and driver required to manage the virtualization -capabilities of the KVM hypervisor -%endif - - -%if %{with_lxc} -%package daemon-lxc -Summary: Server side daemon & driver required to run LXC guests -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-lxc = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -%endif - -%description daemon-lxc -Server side daemon and driver required to manage the virtualization -capabilities of LXC -%endif - - -%if %{with_uml} -%package daemon-uml -Summary: Server side daemon & driver required to run UML guests -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_driver_modules} -Requires: libvirt-daemon-driver-uml = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -%endif -# There are no UML kernel RPMs in Fedora/RHEL to depend on. - -%description daemon-uml -Server side daemon and driver required to manage the virtualization -capabilities of UML -%endif - - -%if %{with_xen} || %{with_libxl} -%package daemon-xen -Summary: Server side daemon & driver required to run XEN guests -Group: Development/Libraries - -Requires: libvirt-daemon = %{version}-%{release} -%if %{with_driver_modules} -%if %{with_xen} -Requires: libvirt-daemon-driver-xen = %{version}-%{release} -%endif -%if %{with_libxl} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} -%endif -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -%endif -Requires: xen - -%description daemon-xen -Server side daemon and driver required to manage the virtualization -capabilities of XEN -%endif -%endif - -%package client -Summary: Client side library and utilities of the libvirt library -Group: Development/Libraries -Requires: readline -Requires: ncurses -# So remote clients can access libvirt over SSH tunnel -# (client invokes 'nc' against the UNIX socket on the server) -Requires: nc -# Needed by libvirt-guests init script. -Requires: gettext -# Needed by virt-pki-validate script. -Requires: gnutls-utils -# Needed for probing the power management features of the host. -Requires: pm-utils -%if %{with_sasl} -Requires: cyrus-sasl -# Not technically required, but makes 'out-of-box' config -# work correctly & doesn't have onerous dependencies -Requires: cyrus-sasl-md5 -%endif -%if %{with_libssh2_transport} -Requires: libssh2 >= 1.3.0 -%endif - -%description client -Shared libraries and client binaries needed to access to the -virtualization capabilities of recent versions of Linux (and other OSes). - -%package devel -Summary: Libraries, includes, etc. to compile with the libvirt library -Group: Development/Libraries -Requires: %{name}-client = %{version}-%{release} -Requires: %{name}-docs = %{version}-%{release} -Requires: pkgconfig - -%description devel -Include header files & development libraries for the libvirt C library. - -%if %{with_sanlock} -%package lock-sanlock -Summary: Sanlock lock manager plugin for QEMU driver -Group: Development/Libraries -Requires: sanlock >= 1.8 -#for virt-sanlock-cleanup require augeas -Requires: augeas -Requires: %{name}-daemon = %{version}-%{release} - -%description lock-sanlock -Includes the Sanlock lock manager plugin for the QEMU -driver -%endif - -%if %{with_python} -%package python -Summary: Python bindings for the libvirt library -Group: Development/Libraries -Requires: %{name}-client = %{version}-%{release} - -%description python -The libvirt-python package contains a module that permits applications -written in the Python programming language to use the interface -supplied by the libvirt library to use the virtualization capabilities -of recent versions of Linux (and other OSes). -%endif - -%prep -%setup -q - -# Fix qemu -> qemu-system-i386 (bz #857026). -# keep: This patch is Fedora-specific and not upstream. -%patch1 -p1 -# Cleanly save session VMs on logout/shutdown (bz #872254) -# keep: Fixed upstream, but using patches not suitable for stable -%patch2 -p1 -# Cleanly save session VMs on logout/shutdown (bz #872254) -# keep: Fixed upstream, but using patches not suitable for stable -%patch3 -p1 - -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 - -%build -%if ! %{with_xen} -%define _without_xen --without-xen -%endif - -%if ! %{with_qemu} -%define _without_qemu --without-qemu -%endif - -%if ! %{with_openvz} -%define _without_openvz --without-openvz -%endif - -%if ! %{with_lxc} -%define _without_lxc --without-lxc -%endif - -%if ! %{with_vbox} -%define _without_vbox --without-vbox -%endif - -%if ! %{with_xenapi} -%define _without_xenapi --without-xenapi -%endif - -%if ! %{with_libxl} -%define _without_libxl --without-libxl -%endif - -%if ! %{with_sasl} -%define _without_sasl --without-sasl -%endif - -%if ! %{with_avahi} -%define _without_avahi --without-avahi -%endif - -%if ! %{with_phyp} -%define _without_phyp --without-phyp -%endif - -%if ! %{with_esx} -%define _without_esx --without-esx -%endif - -%if ! %{with_hyperv} -%define _without_hyperv --without-hyperv -%endif - -%if ! %{with_vmware} -%define _without_vmware --without-vmware -%endif - -%if ! %{with_parallels} -%define _without_parallels --without-parallels -%endif - -%if ! %{with_polkit} -%define _without_polkit --without-polkit -%endif - -%if ! %{with_python} -%define _without_python --without-python -%endif - -%if ! %{with_libvirtd} -%define _without_libvirtd --without-libvirtd -%endif - -%if ! %{with_uml} -%define _without_uml --without-uml -%endif - -%if %{with_rhel5} -%define _with_rhel5_api --with-rhel5-api -%endif - -%if ! %{with_interface} -%define _without_interface --without-interface -%endif - -%if ! %{with_network} -%define _without_network --without-network -%endif - -%if ! %{with_storage_fs} -%define _without_storage_fs --without-storage-fs -%endif - -%if ! %{with_storage_lvm} -%define _without_storage_lvm --without-storage-lvm -%endif - -%if ! %{with_storage_iscsi} -%define _without_storage_iscsi --without-storage-iscsi -%endif - -%if ! %{with_storage_disk} -%define _without_storage_disk --without-storage-disk -%endif - -%if ! %{with_storage_mpath} -%define _without_storage_mpath --without-storage-mpath -%endif - -%if ! %{with_storage_rbd} -%define _without_storage_rbd --without-storage-rbd -%endif - -%if ! %{with_storage_sheepdog} -%define _without_storage_sheepdog --without-storage-sheepdog -%endif - -%if ! %{with_numactl} -%define _without_numactl --without-numactl -%endif - -%if ! %{with_numad} -%define _without_numad --without-numad -%endif - -%if ! %{with_capng} -%define _without_capng --without-capng -%endif - -%if ! %{with_netcf} -%define _without_netcf --without-netcf -%endif - -%if ! %{with_selinux} -%define _without_selinux --without-selinux -%endif - -%if ! %{with_hal} -%define _without_hal --without-hal -%endif - -%if ! %{with_udev} -%define _without_udev --without-udev -%endif - -%if ! %{with_yajl} -%define _without_yajl --without-yajl -%endif - -%if ! %{with_sanlock} -%define _without_sanlock --without-sanlock -%endif - -%if ! %{with_libpcap} -%define _without_libpcap --without-libpcap -%endif - -%if ! %{with_macvtap} -%define _without_macvtap --without-macvtap -%endif - -%if ! %{with_audit} -%define _without_audit --without-audit -%endif - -%if ! %{with_dtrace} -%define _without_dtrace --without-dtrace -%endif - -%if ! %{with_driver_modules} -%define _without_driver_modules --without-driver-modules -%endif - -%if %{with_firewalld} -%define _with_firewalld --with-firewalld -%endif - -%define when %(date +"%%F-%%T") -%define where %(hostname) -%define who %{?packager}%{!?packager:Unknown} -%define with_packager --with-packager="%{who}, %{when}, %{where}" -%define with_packager_version --with-packager-version="%{release}" - -%if %{with_systemd} -%define init_scripts --with-init_script=systemd -%else -%define init_scripts --with-init_script=redhat -%endif - -%if 0%{?enable_autotools} -autoreconf -if -%endif - -%if %{with_selinux} -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 -%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux" -%else -%define with_selinux_mount --with-selinux-mount="/selinux" -%endif -%endif - -%configure %{?_without_xen} \ - %{?_without_qemu} \ - %{?_without_openvz} \ - %{?_without_lxc} \ - %{?_without_vbox} \ - --with-libxl \ - %{?_without_xenapi} \ - %{?_without_sasl} \ - %{?_without_avahi} \ - %{?_without_polkit} \ - %{?_without_python} \ - %{?_without_libvirtd} \ - %{?_without_uml} \ - %{?_without_phyp} \ - %{?_without_esx} \ - %{?_without_hyperv} \ - %{?_without_vmware} \ - %{?_without_parallels} \ - %{?_without_interface} \ - %{?_without_network} \ - %{?_with_rhel5_api} \ - %{?_without_storage_fs} \ - %{?_without_storage_lvm} \ - %{?_without_storage_iscsi} \ - %{?_without_storage_disk} \ - %{?_without_storage_mpath} \ - %{?_without_storage_rbd} \ - %{?_without_storage_sheepdog} \ - %{?_without_numactl} \ - %{?_without_numad} \ - %{?_without_capng} \ - %{?_without_netcf} \ - %{?_without_selinux} \ - %{?_with_selinux_mount} \ - %{?_without_hal} \ - %{?_without_udev} \ - %{?_without_yajl} \ - %{?_without_sanlock} \ - %{?_without_libpcap} \ - %{?_without_macvtap} \ - %{?_without_audit} \ - %{?_without_dtrace} \ - %{?_without_driver_modules} \ - %{?_with_firewalld} \ - %{with_packager} \ - %{with_packager_version} \ - --with-qemu-user=%{qemu_user} \ - --with-qemu-group=%{qemu_group} \ - %{init_scripts} -make %{?_smp_mflags} -gzip -9 ChangeLog - -%install -rm -fr %{buildroot} - -%makeinstall SYSTEMD_UNIT_DIR=%{buildroot}%{_unitdir} -for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap -do - (cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in) -done -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a -%if %{with_driver_modules} -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a -%endif - -%if %{with_network} -install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/ -# We don't want to install /etc/libvirt/qemu/networks in the main %files list -# because if the admin wants to delete the default network completely, we don't -# want to end up re-incarnating it on every RPM upgrade. -install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/ -cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \ - $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml -# Strip auto-generated UUID - we need it generated per-install -sed -i -e "//d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml -%else -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml -%endif -%if ! %{with_qemu} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug -%endif -%find_lang %{name} - -%if ! %{with_sanlock} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -%endif - -%if ! %{with_lxc} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug -%endif - -%if ! %{with_python} -rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version} -%endif - -%if ! %{with_qemu} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu -%endif -%if ! %{with_lxc} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc -%endif -%if ! %{with_uml} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml -%endif - -mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \ - $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version} - -%if %{with_dtrace} -%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 -mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ - $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp -mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ - $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp -%endif -%endif - -%if 0%{?fedora} < 14 && 0%{?rhel} < 6 -rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf -%endif - -%clean -rm -fr %{buildroot} - -%check -cd tests -make -# These tests don't current work in a mock build root -for i in nodeinfotest seclabeltest -do - rm -f $i - printf 'int main(void) { return 0; }' > $i.c - printf '#!/bin/sh\nexit 0\n' > $i - chmod +x $i -done -make check - -%if %{with_libvirtd} -%pre daemon -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -# Normally 'setup' adds this in /etc/passwd, but this is -# here for case of upgrades from earlier Fedora/RHEL. This -# UID/GID pair is reserved for qemu:qemu -getent group kvm >/dev/null || groupadd -g 36 -r kvm -getent group qemu >/dev/null || groupadd -g 107 -r qemu -getent passwd qemu >/dev/null || \ - useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ - -c "qemu user" qemu -%endif - -%post daemon - -%if %{with_network} -# All newly defined networks will have a mac address for the bridge -# auto-generated, but networks already existing at the time of upgrade -# will not. We need to go through all the network configs, look for -# those that don't have a mac address, and add one. - -network_files=$( (cd %{_localstatedir}/lib/libvirt/network && \ - grep -L "mac address" *.xml; \ - cd %{_sysconfdir}/libvirt/qemu/networks && \ - grep -L "mac address" *.xml) 2>/dev/null \ - | sort -u) - -for file in $network_files -do - # each file exists in either the config or state directory (or both) and - # does not have a mac address specified in either. We add the same mac - # address to both files (or just one, if the other isn't there) - - mac4=`printf '%X' $(($RANDOM % 256))` - mac5=`printf '%X' $(($RANDOM % 256))` - mac6=`printf '%X' $(($RANDOM % 256))` - for dir in %{_localstatedir}/lib/libvirt/network \ - %{_sysconfdir}/libvirt/qemu/networks - do - if test -f $dir/$file - then - sed -i.orig -e \ - "s|\(|" \ - $dir/$file - if test $? != 0 - then - echo "failed to add " \ - "to $dir/$file" - mv -f $dir/$file.orig $dir/$file - else - rm -f $dir/$file.orig - fi - fi - done -done -%endif - -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_post libvirtd.service -%else -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || : -fi -%endif -%else -%if %{with_cgconfig} -# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups, -# and cgconfig is no longer a necessary service. -%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16) -if [ "$1" -eq "1" ]; then -/sbin/chkconfig cgconfig on -fi -%endif -%endif - -/sbin/chkconfig --add libvirtd -if [ "$1" -ge "1" ]; then - /sbin/service libvirtd condrestart > /dev/null 2>&1 -fi -%endif - -%preun daemon -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_preun libvirtd.service -%else -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable libvirtd.service > /dev/null 2>&1 || : - /bin/systemctl stop libvirtd.service > /dev/null 2>&1 || : -fi -%endif -%else -if [ $1 = 0 ]; then - /sbin/service libvirtd stop 1>/dev/null 2>&1 - /sbin/chkconfig --del libvirtd -fi -%endif - -%postun daemon -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_postun_with_restart libvirtd.service -%else -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -fi -%endif -%endif - -%if %{with_network} -%post daemon-config-network -if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then - UUID=`/usr/bin/uuidgen` - sed -e "s,,\n $UUID," \ - < %{_datadir}/libvirt/networks/default.xml \ - > %{_sysconfdir}/libvirt/qemu/networks/default.xml - ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml -fi -%endif -%endif - -%if %{with_libvirtd} -%if %{with_systemd} -%triggerun -- libvirt < 0.9.4 -%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||: - -# If the package is allowed to autostart: -/bin/systemctl --no-reload enable libvirtd.service >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del libvirtd >/dev/null 2>&1 || : -/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -%endif -%endif - -%preun client - -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_preun libvirt-guests.service -%endif -%else -if [ $1 = 0 ]; then - /sbin/chkconfig --del libvirt-guests - rm -f /var/lib/libvirt/libvirt-guests -fi -%endif - -%post client - -/sbin/ldconfig -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_post libvirt-guests.service -%endif -%else -/sbin/chkconfig --add libvirt-guests -%endif - -%postun client - -/sbin/ldconfig -%if %{with_systemd} -%if %{with_systemd_macros} -%systemd_postun_with_restart libvirt-guests.service -%endif -%triggerun client -- libvirt < 0.9.4 -%{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||: - -# If the package is allowed to autostart: -/bin/systemctl --no-reload enable libvirt-guests.service >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || : -/bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || : -%endif - -%files -%defattr(-, root, root) - -%files docs -%defattr(-, root, root) -# Website -%dir %{_datadir}/doc/libvirt-docs-%{version} -%dir %{_datadir}/doc/libvirt-docs-%{version}/html -%{_datadir}/doc/libvirt-docs-%{version}/html/* - -# API docs -%dir %{_datadir}/gtk-doc/html/libvirt/ -%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp -%doc %{_datadir}/gtk-doc/html/libvirt/*.html -%doc %{_datadir}/gtk-doc/html/libvirt/*.png -%doc %{_datadir}/gtk-doc/html/libvirt/*.css - -%if %{with_libvirtd} -%files daemon -%defattr(-, root, root) - -%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ - -%if %{with_network} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%endif - -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ - -%if %{with_systemd} -%{_unitdir}/libvirtd.service -%else -%{_sysconfdir}/rc.d/init.d/libvirtd -%endif -%doc daemon/libvirtd.upstart -%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd -%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf -%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6 -%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf -%endif -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ -%if %{with_libxl} -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/ -%endif - -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd -%if %{with_qemu} -%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%endif -%if %{with_lxc} -%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc -%endif -%if %{with_uml} -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml -%endif - -%dir %{_datadir}/libvirt/ - -%if %{with_network} -%dir %{_datadir}/libvirt/networks/ -%{_datadir}/libvirt/networks/default.xml -%endif - -%ghost %dir %{_localstatedir}/run/libvirt/ - -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ -%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ - -%if %{with_qemu} -%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ -%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ -%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/ -%endif -%if %{with_lxc} -%ghost %dir %{_localstatedir}/run/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ -%endif -%if %{with_uml} -%ghost %dir %{_localstatedir}/run/libvirt/uml/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ -%endif -%if %{with_libxl} -%ghost %dir %{_localstatedir}/run/libvirt/libxl/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/ -%endif -%if %{with_network} -%ghost %dir %{_localstatedir}/run/libvirt/network/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ -%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/ -%endif - -%if %{with_qemu} -%{_datadir}/augeas/lenses/libvirtd_qemu.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug -%endif - -%if %{with_lxc} -%{_datadir}/augeas/lenses/libvirtd_lxc.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug -%endif - -%{_datadir}/augeas/lenses/libvirtd.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd.aug - -%if %{with_polkit} -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -%{_datadir}/polkit-1/actions/org.libvirt.unix.policy -%else -%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy -%endif -%endif - -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ - -%if %{with_lxc} -%attr(0755, root, root) %{_libexecdir}/libvirt_lxc -%endif - -%if %{with_storage_disk} -%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper -%endif - -%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper -%attr(0755, root, root) %{_sbindir}/libvirtd - -%{_mandir}/man8/libvirtd.8* - -%if %{with_driver_modules} -%if %{with_network} -%files daemon-config-network -%defattr(-, root, root) -%endif - -%if %{with_nwfilter} -%files daemon-config-nwfilter -%defattr(-, root, root) -%{_sysconfdir}/libvirt/nwfilter/*.xml -%endif - -%if %{with_interface} -%files daemon-driver-interface -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so -%endif - -%if %{with_network} -%files daemon-driver-network -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so -%endif - -%if %{with_nodedev} -%files daemon-driver-nodedev -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so -%endif - -%if %{with_nwfilter} -%files daemon-driver-nwfilter -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so -%endif - -%files daemon-driver-secret -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so - -%if %{with_storage} -%files daemon-driver-storage -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so -%endif - -%if %{with_qemu} -%files daemon-driver-qemu -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so -%endif - -%if %{with_lxc} -%files daemon-driver-lxc -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so -%endif - -%if %{with_uml} -%files daemon-driver-uml -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so -%endif - -%if %{with_xen} -%files daemon-driver-xen -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_xen.so -%endif - -%if %{with_libxl} -%files daemon-driver-libxl -%defattr(-, root, root) -%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so -%endif -%endif - -%if %{with_qemu_tcg} -%files daemon-qemu -%defattr(-, root, root) -%endif - -%if %{with_qemu_kvm} -%files daemon-kvm -%defattr(-, root, root) -%endif - -%if %{with_lxc} -%files daemon-lxc -%defattr(-, root, root) -%endif - -%if %{with_uml} -%files daemon-uml -%defattr(-, root, root) -%endif - -%if %{with_xen} || %{with_libxl} -%files daemon-xen -%defattr(-, root, root) -%endif -%endif - -%if %{with_sanlock} -%files lock-sanlock -%defattr(-, root, root) -%if %{with_qemu} -%config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf -%endif -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so -%{_datadir}/augeas/lenses/libvirt_sanlock.aug -%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock -%{_sbindir}/virt-sanlock-cleanup -%{_mandir}/man8/virt-sanlock-cleanup.8* -%endif - -%files client -f %{name}.lang -%defattr(-, root, root) -%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO - -%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf -%{_mandir}/man1/virsh.1* -%{_mandir}/man1/virt-xml-validate.1* -%{_mandir}/man1/virt-pki-validate.1* -%{_mandir}/man1/virt-host-validate.1* -%{_bindir}/virsh -%{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-validate -%{_bindir}/virt-host-validate -%{_libdir}/lib*.so.* - -%if %{with_dtrace} -%{_datadir}/systemtap/tapset/libvirt_probes*.stp -%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp -%{_datadir}/systemtap/tapset/libvirt_functions.stp -%endif - -%dir %{_datadir}/libvirt/ -%dir %{_datadir}/libvirt/schemas/ - -%{_datadir}/libvirt/schemas/basictypes.rng -%{_datadir}/libvirt/schemas/capability.rng -%{_datadir}/libvirt/schemas/domain.rng -%{_datadir}/libvirt/schemas/domaincommon.rng -%{_datadir}/libvirt/schemas/domainsnapshot.rng -%{_datadir}/libvirt/schemas/interface.rng -%{_datadir}/libvirt/schemas/network.rng -%{_datadir}/libvirt/schemas/networkcommon.rng -%{_datadir}/libvirt/schemas/nodedev.rng -%{_datadir}/libvirt/schemas/nwfilter.rng -%{_datadir}/libvirt/schemas/secret.rng -%{_datadir}/libvirt/schemas/storageencryption.rng -%{_datadir}/libvirt/schemas/storagepool.rng -%{_datadir}/libvirt/schemas/storagevol.rng - -%{_datadir}/libvirt/cpu_map.xml - -%if %{with_systemd} -%{_unitdir}/libvirt-guests.service -%else -%{_sysconfdir}/rc.d/init.d/libvirt-guests -%endif -%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests -%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh -%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ - -%if %{with_sasl} -%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf -%endif - -%files devel -%defattr(-, root, root) - -%{_libdir}/lib*.so -%dir %{_includedir}/libvirt -%{_includedir}/libvirt/*.h -%{_libdir}/pkgconfig/libvirt.pc - -%dir %{_datadir}/libvirt/api/ -%{_datadir}/libvirt/api/libvirt-api.xml -%{_datadir}/libvirt/api/libvirt-qemu-api.xml - -%doc docs/*.html docs/html docs/*.gif -%doc docs/libvirt-api.xml -%doc examples/hellolibvirt -%doc examples/domain-events/events-c -%doc examples/dominfo -%doc examples/domsuspend -%doc examples/openauth -%doc examples/xml -%doc examples/systemtap - -%if %{with_python} -%files python -%defattr(-, root, root) - -%doc AUTHORS NEWS README COPYING.LIB -%{_libdir}/python*/site-packages/libvirt.py* -%{_libdir}/python*/site-packages/libvirt_qemu.py* -%{_libdir}/python*/site-packages/libvirtmod* -%doc python/tests/*.py -%doc python/TODO -%doc examples/python -%doc examples/domain-events/events-python -%endif - -%changelog -* Fri Apr 05 2013 Johnny Hughes - 0.10.2.4-1.el6.centos.alt -- modified to build xen and libxl on centos - -* Mon Apr 01 2013 Cole Robinson - 0.10.2.4-1 -- Rebased to version 0.10.2.4 -- Fix 'Cannot parse sensitivity level in s0' error (bz #902103) -- Fix updating NIC that has boot order set (bz #906446) -- Fix virsh list for vmware ESX (bz #910702) -- Fix libxl disk backend default (bz #912488) - -* Mon Jan 28 2013 Cole Robinson - 0.10.2.3-1 -- Rebased to version 0.10.2.3 -- Fix libxl driver to build against xen 4.2 (bz #870689) -- Fix possible crash when destroying guests (bz #877110) -- Fix loading sysctl file (bz #887017) -- Fix svirt memory leak (bz #890039) -- Fix attaching PCI netdev to VM (bz #893131) -- Fix libvirtd segfault on shutdown (bz #903194) -- Raise mem limit to stop qemu processes from getting OOM killed (bz #903432) -- CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz #893450, bz - #905173) - -* Mon Dec 17 2012 Cole Robinson - 0.10.2.2-3 -- Fix scriplet warning when uninstalling libvirt-client (bz #888071) - -* Sun Dec 16 2012 Cole Robinson - 0.10.2.2-2 -- Fix conflict with NM launched dnsmasq (bz #886663) -- Fix selinux denials when launching non-kvm qemu guests (bz #885837) - -* Sun Dec 09 2012 Cole Robinson - 0.10.2.2-1 -- Rebased to version 0.10.2.2 -- CVE-2012-3411: avoid open DNS proxy with dnsmasq (bz #874702, bz #882309) -- Don't ignore address for USB disks (bz #861309) -- Fix error with blkdeviotune (bz #872582) -- Fix cloning LVM volume (bz #869607) -- Fix VDSM error when libvirt doesn't format CPU topology (bz #876475) -- Use systemd macros in spec file (bz #850186) - -* Thu Dec 06 2012 Cole Robinson - 0.10.2.1-4 -- Add ppc64 and s390x as KVM arches for Fedora >= 18 (bz #872545) - -* Tue Nov 13 2012 Cole Robinson - 0.10.2.1-3 -- Cleanly save session VMs on logout/shutdown (bz #872254) - -* Tue Oct 30 2012 Cole Robinson - 0.10.2.1-2 -- Disable libxl on F18 too - -* Sat Oct 27 2012 Cole Robinson - 0.10.2.1-1 -- Rebased to version 0.10.2.1 -- Fix lvm volume creation when alloc=0 (bz #866481) -- Clarify virsh send-keys man page example (bz #860004) -- Fix occasional deadlock via virDomainDestroy (bz #859009) -- Fix LXC deadlock from ctrl-c (bz #848119) -- Fix occasional selinux denials with macvtap (bz #798605) -- Fix multilib conflict with systemtap files (bz #831425) -- Don't trigger keytab warning in system logs (bz #745203) -- Fix qemu domxml-2-native NIC model out (bz #636832) -- Fix error message if not enough space for lvm vol (bz #609104) - -* Thu Oct 25 2012 Cole Robinson - 0.10.2-4 -- Disable libxl driver, since it doesn't build with xen 4.2 in rawhide - -* Mon Sep 24 2012 Richard W.M. Jones - 0.10.2-3 -- Re-add Use-qemu-system-i386-as-binary-instead-of-qemu.patch - NB: This patch is Fedora-specific and not upstream. -- Add upstream patches: don't duplicate environment variables (RHBZ#859596). - -* Mon Sep 24 2012 Daniel Veillard - 0.10.2-1 -- Upstream release 0.10.2 -- network: define new API virNetworkUpdate -- add support for QEmu sandbox support -- blockjob: add virDomainBlockCommit -- New APIs to get/set Node memory parameters -- new API virConnectListAllSecrets -- new API virConnectListAllNWFilters -- new API virConnectListAllNodeDevices -- parallels: add support of containers to the driver -- new API virConnectListAllInterfaces -- new API virConnectListAllNetworks -- new API virStoragePoolListAllVolumes -- Add PMSUSPENDED life cycle event -- new API virStorageListAllStoragePools -- Add per-guest S3/S4 state configuration -- qemu: Support for Block Device IO Limits -- a lot of bug fixes, improvements and portability work - -* Fri Sep 21 2012 Richard W.M. Jones - 0.10.1-5 -- Add (upstream) patches to label sockets for SELinux (RHBZ#853393). - -* Thu Sep 13 2012 Richard W.M. Jones - 0.10.1-4 -- Fix for 32 bit qemu renamed to qemu-system-i386 (RHBZ#857026). - -* Wed Sep 12 2012 Cole Robinson - 0.10.1-3 -- Fix libvirtd segfault with old netcf-libs (bz 853381) -- Drop unneeded dnsmasq --filterwin2k -- Fix unwanted connection closing, needed for boxes - -* Wed Sep 5 2012 Daniel P. Berrange - 0.10.1-2 -- Remove dep on ceph RPM (rhbz #854360) - -* Fri Aug 31 2012 Daniel Veillard - 0.10.1-1 -- upstream release of 0.10.1 -- many fixes from 0.10.0 - -* Wed Aug 29 2012 Daniel Veillard - 0.10.0-1 -- upstream release of 0.10.0 -- agent: add qemuAgentArbitraryCommand() for general qemu agent command -- Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions -- network: use firewalld instead of iptables, when available -- network: make network driver vlan-aware -- esx: Implement network driver -- driver for parallels hypervisor -- Various LXC improvements -- Add virDomainGetHostname -- a lot of bug fixes, improvements and portability work - -* Thu Aug 23 2012 Daniel Veillard - 0.10.0-0rc1 -- release candidate 1 of 0.10.0 - -* Tue Aug 14 2012 Daniel P. Berrange - 0.10.0-0rc0.2 -- Enable autotools to make previous patch work - -* Tue Aug 14 2012 Daniel Veillard - 0.10.0-0rc0.1 -- fix security driver missing from the daemon - -* Wed Aug 8 2012 Daniel Veillard - 0.10.0-0rc0 -- snapshot before 0.10.0 in a few weeks -- adds the parallel driver support - -* Mon Jul 23 2012 Richard W.M. Jones - 0.9.13-3 -- Add upstream patch to fix RHBZ#842114. - -* Thu Jul 19 2012 Fedora Release Engineering - 0.9.13-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 2 2012 Daniel Veillard - 0.9.13-1 -- S390: support for s390(x) -- snapshot: implement new APIs for esx and vbox -- snapshot: new query APIs and many improvements -- virsh: Allow users to reedit rejected XML -- nwfilter: add DHCP snooping -- Enable driver modules in libvirt RPM -- Default to enable driver modules for libvirtd -- storage backend: Add RBD (RADOS Block Device) support -- sVirt support for LXC domains inprovement -- a lot of bug fixes, improvements and portability work - -* Mon May 14 2012 Daniel Veillard - 0.9.12-1 -- qemu: allow snapshotting of sheepdog and rbd disks -- blockjob: add new APIs -- a lot of bug fixes, improvements and portability work - -* Thu Apr 26 2012 Cole Robinson - 0.9.11.3-1 -- Rebased to version 0.9.11.3 -- Abide URI username when connecting to hypervisor (bz 811397) -- Fix managed USB mode (bz 814866) -- Fix crash connecting to ESX host (bz 811891) - -* Wed Apr 4 2012 Daniel P. Berrange - 0.9.11-1 -- Update to 0.9.11 release - -* Tue Apr 3 2012 Daniel P. Berrange - 0.9.10-4 -- Revert previous change - -* Sat Mar 31 2012 Daniel P. Berrange - 0.9.10-3 -- Refactor RPM spec to allow install without default configs - -* Thu Mar 15 2012 Daniel P. Berrange - 0.9.10-2 -- Rebuild for libparted soname break - -* Mon Feb 13 2012 Daniel P. Berrange - 0.9.10-1 -- Update to 0.9.10 - -* Thu Jan 12 2012 Daniel P. Berrange - 0.9.9-2 -- Fix LXC I/O handling - -* Sat Jan 7 2012 Daniel Veillard - 0.9.9-1 -- Add API virDomain{S,G}etInterfaceParameters -- Add API virDomain{G, S}etNumaParameters -- Add support for ppc64 qemu -- Support Xen domctl v8 -- many improvements and bug fixes - -* Thu Dec 8 2011 Daniel P. Berrange - 0.9.8-2 -- Fix install of libvirt-guests.service & libvirtd.service - -* Thu Dec 8 2011 Daniel Veillard - 0.9.8-1 -- Add support for QEMU 1.0 -- Add preliminary PPC cpu driver -- Add new API virDomain{Set, Get}BlockIoTune -- block_resize: Define the new API -- Add a public API to invoke suspend/resume on the host -- various improvements for LXC containers -- Define keepalive protocol and add virConnectIsAlive API -- Add support for STP and VLAN filtering -- many improvements and bug fixes - -* Mon Nov 14 2011 Justin M. Forbes - 0.9.7-3 -- Remove versioned buildreq for yajl as 2.0.x features are not required. - -* Thu Nov 10 2011 Daniel P. Berrange - 0.9.7-2 -- Rebuild for yajl 2.0.1 - -* Tue Nov 8 2011 Daniel P. Berrange - 0.9.7-1 -- Update to 0.9.7 release - -* Tue Oct 11 2011 Dan Horák - 0.9.6-3 -- xenlight available only on Xen arches (#745020) - -* Mon Oct 3 2011 Laine Stump - 0.9.6-2 -- Make PCI multifunction support more manual - Bug 742836 -- F15 build still uses cgconfig - Bug 738725 - -* Thu Sep 22 2011 Daniel Veillard - 0.9.6-1 -- Fix the qemu reboot bug and a few others bug fixes - -* Tue Sep 20 2011 Daniel Veillard - 0.9.5-1 -- many snapshot improvements (Eric Blake) -- latency: Define new public API and structure (Osier Yang) -- USB2 and various USB improvements (Marc-André Lureau) -- storage: Add fs pool formatting (Osier Yang) -- Add public API for getting migration speed (Jim Fehlig) -- Add basic driver for Microsoft Hyper-V (Matthias Bolte) -- many improvements and bug fixes - -* Wed Aug 3 2011 Daniel Veillard - 0.9.4-1 -- network bandwidth QoS control -- Add new API virDomainBlockPull* -- save: new API to manipulate save file images -- CPU bandwidth limits support -- allow to send NMI and key event to guests -- new API virDomainUndefineFlags -- Implement code to attach to external QEMU instances -- bios: Add support for SGA -- various missing python binding -- many improvements and bug fixes - -* Sat Jul 30 2011 Dan Hor?k - 0.9.3-3 -- xenlight available only on Xen arches - -* Wed Jul 5 2011 Peter Robinson - 0.9.3-2 -- Add ARM to NUMA platform excludes - -* Mon Jul 4 2011 Daniel Veillard - 0.9.3-1 -- new API virDomainGetVcpupinInfo -- Add TXT record support for virtual DNS service -- Support reboots with the QEMU driver -- New API virDomainGetControlInfo API -- New API virNodeGetMemoryStats -- New API virNodeGetCPUTime -- New API for send-key -- New API virDomainPinVcpuFlags -- support multifunction PCI device -- lxc: various improvements -- many improvements and bug fixes - -* Wed Jun 29 2011 Richard W.M. Jones - 0.9.2-3 -- Rebuild because of libparted soname bump (libparted.so.0 -> libparted.so.1). - -* Tue Jun 21 2011 Laine Stump - 0.9.2-2 -- add rule to require netcf-0.1.8 during build so that new transactional - network change APIs are included. -- document that CVE-2011-2178 has been fixed (by virtue of rebase - to 0.9.2 - see https://bugzilla.redhat.com/show_bug.cgi?id=709777) - -* Mon Jun 6 2011 Daniel Veillard - 0.9.2-1 -- Framework for lock manager plugins -- API for network config change transactions -- flags for setting memory parameters -- virDomainGetState public API -- qemu: allow blkstat/blkinfo calls during migration -- Introduce migration v3 API -- Defining the Screenshot public API -- public API for NMI injection -- Various improvements and bug fixes - -* Wed May 25 2011 Richard W.M. Jones - 0.9.1-3 -- Add upstream patches: - 0001-json-Avoid-passing-large-positive-64-bit-integers-to.patch - 0001-qemudDomainMemoryPeek-change-ownership-selinux-label.patch - 0002-remote-remove-bogus-virDomainFree.patch - so that users can try out virt-dmesg. -- Change /var/cache mode to 0711. - -* Thu May 5 2011 Daniel Veillard - 0.9.1-1 -- support various persistent domain updates -- improvements on memory APIs -- Add virDomainEventRebootNew -- various improvements to libxl driver -- Spice: support audio, images and stream compression -- Various improvements and bug fixes - -* Thu Apr 7 2011 Daniel Veillard - 0.9.0-1 -- Support cputune cpu usage tuning -- Add public APIs for storage volume upload/download -- Add public API for setting migration speed on the fly -- Add libxenlight driver -- qemu: support migration to fd -- libvirt: add virDomain{Get,Set}BlkioParameters -- setmem: introduce a new libvirt API (virDomainSetMemoryFlags) -- Expose event loop implementation as a public API -- Dump the debug buffer to libvirtd.log on fatal signal -- Audit support -- Various improvements and bug fixes - -* Mon Mar 14 2011 Daniel Veillard - 0.8.8-3 -- fix a lack of API check on read-only connections -- CVE-2011-1146 - -* Mon Feb 21 2011 Daniel P. Berrange - 0.8.8-2 -- Fix kernel boot with latest QEMU - -* Thu Feb 17 2011 Daniel Veillard - 0.8.8-1 -- expose new API for sysinfo extraction -- cgroup blkio weight support -- smartcard device support -- qemu: Support per-device boot ordering -- Various improvements and bug fixes - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jan 6 2011 Daniel Veillard - 0.8.7-1 -- Preliminary support for VirtualBox 4.0 -- IPv6 support -- Add VMware Workstation and Player driver driver -- Add network disk support -- Various improvements and bug fixes -- from 0.8.6: -- Add support for iSCSI target auto-discovery -- QED: Basic support for QED images -- remote console support -- support for SPICE graphics -- sysinfo and VMBIOS support -- virsh qemu-monitor-command -- various improvements and bug fixes - -* Fri Oct 29 2010 Daniel Veillard - 0.8.5-1 -- Enable JSON and netdev features in QEMU >= 0.13 -- framework for auditing integration -- framework DTrace/SystemTap integration -- Setting the number of vcpu at boot -- Enable support for nested SVM -- Virtio plan9fs filesystem QEMU -- Memory parameter controls -- various improvements and bug fixes - -* Wed Sep 29 2010 jkeating - 0.8.4-3 -- Rebuilt for gcc bug 634757 - -* Thu Sep 16 2010 Dan Horák - 0.8.4-2 -- disable the nwfilterxml2xmltest also on s390(x) - -* Mon Sep 13 2010 Daniel Veillard - 0.8.4-1 -- Upstream release 0.8.4 - -* Mon Aug 23 2010 Daniel P. Berrange - 0.8.3-2 -- Fix potential overflow in boot menu code - -* Mon Aug 23 2010 Daniel P. Berrange - 0.8.3-1 -- Upstream release 0.8.3 - -* Wed Jul 21 2010 David Malcolm - 0.8.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Mon Jul 12 2010 Daniel P. Berrange - 0.8.2-2 -- CVE-2010-2237 ignoring defined main disk format when looking up disk backing stores -- CVE-2010-2238 ignoring defined disk backing store format when recursing into disk - image backing stores -- CVE-2010-2239 not setting user defined backing store format when creating new image -- CVE-2010-2242 libvirt: improperly mapped source privileged ports may allow for - obtaining privileged resources on the host - -* Mon Jul 5 2010 Daniel Veillard - 0.8.2-1 -- Upstream release 0.8.2 -- phyp: adding support for IVM -- libvirt: introduce domainCreateWithFlags API -- add 802.1Qbh and 802.1Qbg switches handling -- Support for VirtualBox version 3.2 -- Init script for handling guests on shutdown/boot -- qemu: live migration with non-shared storage for kvm - -* Fri Apr 30 2010 Daniel Veillard - 0.8.1-1 -- Upstream release 0.8.1 -- Starts dnsmasq from libvirtd with --dhcp-hostsfile -- Add virDomainGetBlockInfo API to query disk sizing -- a lot of bug fixes and cleanups - -* Mon Apr 12 2010 Daniel Veillard - 0.8.0-1 -- Upstream release 0.8.0 -- Snapshotting support (QEmu/VBox/ESX) -- Network filtering API -- XenAPI driver -- new APIs for domain events -- Libvirt managed save API -- timer subselection for domain clock -- synchronous hooks -- API to update guest CPU to host CPU -- virDomainUpdateDeviceFlags new API -- migrate max downtime API -- volume wiping API -- and many bug fixes - -* Tue Mar 30 2010 Richard W.M. Jones - 0.7.7-3.fc14 -- No change, just rebuild against new libparted with bumped soname. - -* Mon Mar 22 2010 Cole Robinson - 0.7.7-2.fc14 -- Fix USB devices by product with security enabled (bz 574136) -- Set kernel/initrd in security driver, fixes some URL installs (bz 566425) - -* Fri Mar 5 2010 Daniel Veillard - 0.7.7-1 -- macvtap support -- async job handling -- virtio channel -- computing baseline CPU -- virDomain{Attach,Detach}DeviceFlags -- assorted bug fixes and lots of cleanups - -* Tue Feb 16 2010 Adam Jackson 0.7.6-2 -- libvirt-0.7.6-add-needed.patch: Fix FTBFS from --no-add-needed -- Add BuildRequires: xmlrpc-c-client for libxmlrpc_client.so - -* Wed Feb 3 2010 Daniel Veillard - 0.7.6-1 -- upstream release of 0.7.6 -- Use QEmu new device adressing when possible -- Implement CPU topology support for QEMU driver -- Implement SCSI controller hotplug/unplug for QEMU -- Implement support for multi IQN -- a lot of fixes and improvements - -* Thu Jan 14 2010 Chris Weyl 0.7.5-3 -- bump for libssh2 rebuild - -* Tue Jan 12 2010 Daniel P. Berrange - 0.7.5-2 -- Rebuild for libparted soname change - -* Wed Dec 23 2009 Daniel Veillard - 0.7.5-1 -- Add new API virDomainMemoryStats -- Public API and domain extension for CPU flags -- vbox: Add support for version 3.1 -- Support QEMU's virtual FAT block device driver -- a lot of fixes - -* Fri Nov 20 2009 Daniel Veillard - 0.7.4-1 -- upstream release of 0.7.4 -- udev node device backend -- API to check object properties -- better QEmu monitor processing -- MAC address based port filtering for qemu -- support IPv6 and multiple addresses per interfaces -- a lot of fixes - -* Thu Nov 19 2009 Daniel P. Berrange - 0.7.2-6 -- Really fix restore file labelling this time - -* Wed Nov 11 2009 Daniel P. Berrange - 0.7.2-5 -- Disable numactl on s390[x]. Again. - -* Wed Nov 11 2009 Daniel P. Berrange - 0.7.2-4 -- Fix QEMU save/restore permissions / labelling - -* Thu Oct 29 2009 Mark McLoughlin - 0.7.2-3 -- Avoid compressing small log files (#531030) - -* Thu Oct 29 2009 Mark McLoughlin - 0.7.2-2 -- Make libvirt-devel require libvirt-client, not libvirt -- Fix qemu machine types handling - -* Wed Oct 14 2009 Daniel Veillard - 0.7.2-1 -- Upstream release of 0.7.2 -- Allow to define ESX domains -- Allows suspend and resulme of LXC domains -- API for data streams -- many bug fixes - -* Tue Oct 13 2009 Mark McLoughlin - 0.7.1-12 -- Fix restore of qemu guest using raw save format (#523158) - -* Fri Oct 9 2009 Mark McLoughlin - 0.7.1-11 -- Fix libvirtd memory leak during error reply sending (#528162) -- Add several PCI hot-unplug typo fixes from upstream - -* Tue Oct 6 2009 Mark McLoughlin - 0.7.1-10 -- Create /var/log/libvirt/{lxc,uml} dirs for logrotate -- Make libvirt-python dependon on libvirt-client -- Sync misc minor changes from upstream spec - -* Tue Oct 6 2009 Mark McLoughlin - 0.7.1-9 -- Change logrotate config to weekly (#526769) - -* Thu Oct 1 2009 Mark McLoughlin - 0.7.1-8 -- Disable sound backend, even when selinux is disabled (#524499) -- Re-label qcow2 backing files (#497131) - -* Wed Sep 30 2009 Mark McLoughlin - 0.7.1-7 -- Fix USB device passthrough (#522683) - -* Mon Sep 21 2009 Chris Weyl - 0.7.1-6 -- rebuild for libssh2 1.2 - -* Mon Sep 21 2009 Mark McLoughlin - 0.7.1-5 -- Don't set a bogus error in virDrvSupportsFeature() -- Fix raw save format - -* Thu Sep 17 2009 Mark McLoughlin - 0.7.1-4 -- A couple of hot-unplug memory handling fixes (#523953) - -* Thu Sep 17 2009 Daniel Veillard - 0.7.1-3 -- disable numactl on s390[x] - -* Thu Sep 17 2009 Daniel Veillard - 0.7.1-2 -- revamp of spec file for modularity and RHELs - -* Tue Sep 15 2009 Daniel Veillard - 0.7.1-1 -- Upstream release of 0.7.1 -- ESX, VBox driver updates -- mutipath support -- support for encrypted (qcow) volume -- compressed save image format for Qemu/KVM -- QEmu host PCI device hotplug support -- configuration of huge pages in guests -- a lot of fixes - -* Mon Sep 14 2009 Mark McLoughlin - 0.7.1-0.2.gitfac3f4c -- Update to newer snapshot of 0.7.1 -- Stop libvirt using untrusted 'info vcpus' PID data (#520864) -- Support relabelling of USB and PCI devices -- Enable multipath storage support -- Restart libvirtd upon RPM upgrade - -* Sun Sep 6 2009 Mark McLoughlin - 0.7.1-0.1.gitg3ef2e05 -- Update to pre-release git snapshot of 0.7.1 -- Drop upstreamed patches - -* Wed Aug 19 2009 Mark McLoughlin - 0.7.0-6 -- Fix migration completion with newer versions of qemu (#516187) - -* Wed Aug 19 2009 Mark McLoughlin - 0.7.0-5 -- Add PCI host device hotplug support -- Allow PCI bus reset to reset other devices (#499678) -- Fix stupid PCI reset error message (bug #499678) -- Allow PM reset on multi-function PCI devices (bug #515689) -- Re-attach PCI host devices after guest shuts down (bug #499561) -- Fix list corruption after disk hot-unplug -- Fix minor 'virsh nodedev-list --tree' annoyance - -* Thu Aug 13 2009 Daniel P. Berrange - 0.7.0-4 -- Rewrite policykit support (rhbz #499970) -- Log and ignore NUMA topology problems (rhbz #506590) - -* Mon Aug 10 2009 Mark McLoughlin - 0.7.0-3 -- Don't fail to start network if ipv6 modules is not loaded (#516497) - -* Thu Aug 6 2009 Mark McLoughlin - 0.7.0-2 -- Make sure qemu can access kernel/initrd (bug #516034) -- Set perms on /var/lib/libvirt/boot to 0711 (bug #516034) - -* Wed Aug 5 2009 Daniel Veillard - 0.7.0-1 -- ESX, VBox3, Power Hypervisor drivers -- new net filesystem glusterfs -- Storage cloning for LVM and Disk backends -- interface implementation based on netcf -- Support cgroups in QEMU driver -- QEmu hotplug NIC support -- a lot of fixes - -* Fri Jul 3 2009 Daniel Veillard - 0.6.5-1 -- release of 0.6.5 - -* Fri May 29 2009 Daniel Veillard - 0.6.4-1 -- release of 0.6.4 -- various new APIs - -* Fri Apr 24 2009 Daniel Veillard - 0.6.3-1 -- release of 0.6.3 -- VirtualBox driver - -* Fri Apr 3 2009 Daniel Veillard - 0.6.2-1 -- release of 0.6.2 - -* Fri Mar 4 2009 Daniel Veillard - 0.6.1-1 -- release of 0.6.1 - -* Sat Jan 31 2009 Daniel Veillard - 0.6.0-1 -- release of 0.6.0 - -* Tue Nov 25 2008 Daniel Veillard - 0.5.0-1 -- release of 0.5.0 - -* Tue Sep 23 2008 Daniel Veillard - 0.4.6-1 -- release of 0.4.6 - -* Mon Sep 8 2008 Daniel Veillard - 0.4.5-1 -- release of 0.4.5 - -* Wed Jun 25 2008 Daniel Veillard - 0.4.4-1 -- release of 0.4.4 -- mostly a few bug fixes from 0.4.3 - -* Thu Jun 12 2008 Daniel Veillard - 0.4.3-1 -- release of 0.4.3 -- lots of bug fixes and small improvements - -* Tue Apr 8 2008 Daniel Veillard - 0.4.2-1 -- release of 0.4.2 -- lots of bug fixes and small improvements - -* Mon Mar 3 2008 Daniel Veillard - 0.4.1-1 -- Release of 0.4.1 -- Storage APIs -- xenner support -- lots of assorted improvements, bugfixes and cleanups -- documentation and localization improvements - -* Tue Dec 18 2007 Daniel Veillard - 0.4.0-1 -- Release of 0.4.0 -- SASL based authentication -- PolicyKit authentication -- improved NUMA and statistics support -- lots of assorted improvements, bugfixes and cleanups -- documentation and localization improvements - -* Sun Sep 30 2007 Daniel Veillard - 0.3.3-1 -- Release of 0.3.3 -- Avahi support -- NUMA support -- lots of assorted improvements, bugfixes and cleanups -- documentation and localization improvements - -* Tue Aug 21 2007 Daniel Veillard - 0.3.2-1 -- Release of 0.3.2 -- API for domains migration -- APIs for collecting statistics on disks and interfaces -- lots of assorted bugfixes and cleanups -- documentation and localization improvements - -* Tue Jul 24 2007 Daniel Veillard - 0.3.1-1 -- Release of 0.3.1 -- localtime clock support -- PS/2 and USB input devices -- lots of assorted bugfixes and cleanups -- documentation and localization improvements - -* Mon Jul 9 2007 Daniel Veillard - 0.3.0-1 -- Release of 0.3.0 -- Secure remote access support -- unification of daemons -- lots of assorted bugfixes and cleanups -- documentation and localization improvements - -* Fri Jun 8 2007 Daniel Veillard - 0.2.3-1 -- Release of 0.2.3 -- lot of assorted bugfixes and cleanups -- support for Xen-3.1 -- new scheduler API - -* Tue Apr 17 2007 Daniel Veillard - 0.2.2-1 -- Release of 0.2.2 -- lot of assorted bugfixes and cleanups -- preparing for Xen-3.0.5 - -* Thu Mar 22 2007 Jeremy Katz - 0.2.1-2.fc7 -- don't require xen; we don't need the daemon and can control non-xen now -- fix scriptlet error (need to own more directories) -- update description text - -* Fri Mar 16 2007 Daniel Veillard - 0.2.1-1 -- Release of 0.2.1 -- lot of bug and portability fixes -- Add support for network autostart and init scripts -- New API to detect the virtualization capabilities of a host -- Documentation updates - -* Fri Feb 23 2007 Daniel P. Berrange - 0.2.0-4.fc7 -- Fix loading of guest & network configs - -* Fri Feb 16 2007 Daniel P. Berrange - 0.2.0-3.fc7 -- Disable kqemu support since its not in Fedora qemu binary -- Fix for -vnc arg syntax change in 0.9.0 QEMU - -* Thu Feb 15 2007 Daniel P. Berrange - 0.2.0-2.fc7 -- Fixed path to qemu daemon for autostart -- Fixed generation of block in XML -- Pre-create config directory at startup - -* Wed Feb 14 2007 Daniel Veillard 0.2.0-1.fc7 -- support for KVM and QEmu -- support for network configuration -- assorted fixes - -* Mon Jan 22 2007 Daniel Veillard 0.1.11-1.fc7 -- finish inactive Xen domains support -- memory leak fix -- RelaxNG schemas for XML configs - -* Wed Dec 20 2006 Daniel Veillard 0.1.10-1.fc7 -- support for inactive Xen domains -- improved support for Xen display and vnc -- a few bug fixes -- localization updates - -* Thu Dec 7 2006 Jeremy Katz - 0.1.9-2 -- rebuild against python 2.5 - -* Wed Nov 29 2006 Daniel Veillard 0.1.9-1 -- better error reporting -- python bindings fixes and extensions -- add support for shareable drives -- add support for non-bridge style networking -- hot plug device support -- added support for inactive domains -- API to dump core of domains -- various bug fixes, cleanups and improvements -- updated the localization - -* Tue Nov 7 2006 Daniel Veillard 0.1.8-3 -- it's pkgconfig not pgkconfig ! - -* Mon Nov 6 2006 Daniel Veillard 0.1.8-2 -- fixing spec file, added %dist, -devel requires pkgconfig and xen-devel -- Resolves: rhbz#202320 - -* Mon Oct 16 2006 Daniel Veillard 0.1.8-1 -- fix missing page size detection code for ia64 -- fix mlock size when getting domain info list from hypervisor -- vcpu number initialization -- don't label crashed domains as shut off -- fix virsh man page -- blktapdd support for alternate drivers like blktap -- memory leak fixes (xend interface and XML parsing) -- compile fix -- mlock/munlock size fixes - -* Fri Sep 22 2006 Daniel Veillard 0.1.7-1 -- Fix bug when running against xen-3.0.3 hypercalls -- Fix memory bug when getting vcpus info from xend - -* Fri Sep 22 2006 Daniel Veillard 0.1.6-1 -- Support for localization -- Support for new Xen-3.0.3 cdrom and disk configuration -- Support for setting VNC port -- Fix bug when running against xen-3.0.2 hypercalls -- Fix reconnection problem when talking directly to http xend - -* Tue Sep 5 2006 Jeremy Katz - 0.1.5-3 -- patch from danpb to support new-format cd devices for HVM guests - -* Tue Sep 5 2006 Daniel Veillard 0.1.5-2 -- reactivating ia64 support - -* Tue Sep 5 2006 Daniel Veillard 0.1.5-1 -- new release -- bug fixes -- support for new hypervisor calls -- early code for config files and defined domains - -* Mon Sep 4 2006 Daniel Berrange - 0.1.4-5 -- add patch to address dom0_ops API breakage in Xen 3.0.3 tree - -* Mon Aug 28 2006 Jeremy Katz - 0.1.4-4 -- add patch to support paravirt framebuffer in Xen - -* Mon Aug 21 2006 Daniel Veillard 0.1.4-3 -- another patch to fix network handling in non-HVM guests - -* Thu Aug 17 2006 Daniel Veillard 0.1.4-2 -- patch to fix virParseUUID() - -* Wed Aug 16 2006 Daniel Veillard 0.1.4-1 -- vCPUs and affinity support -- more complete XML, console and boot options -- specific features support -- enforced read-only connections -- various improvements, bug fixes - -* Wed Aug 2 2006 Jeremy Katz - 0.1.3-6 -- add patch from pvetere to allow getting uuid from libvirt - -* Wed Aug 2 2006 Jeremy Katz - 0.1.3-5 -- build on ia64 now - -* Thu Jul 27 2006 Jeremy Katz - 0.1.3-4 -- don't BR xen, we just need xen-devel - -* Thu Jul 27 2006 Daniel Veillard 0.1.3-3 -- need rebuild since libxenstore is now versionned - -* Mon Jul 24 2006 Mark McLoughlin - 0.1.3-2 -- Add BuildRequires: xen-devel - -* Wed Jul 12 2006 Jesse Keating - 0.1.3-1.1 -- rebuild - -* Tue Jul 11 2006 Daniel Veillard 0.1.3-1 -- support for HVM Xen guests -- various bugfixes - -* Mon Jul 3 2006 Daniel Veillard 0.1.2-1 -- added a proxy mechanism for read only access using httpu -- fixed header includes paths - -* Wed Jun 21 2006 Daniel Veillard 0.1.1-1 -- extend and cleanup the driver infrastructure and code -- python examples -- extend uuid support -- bug fixes, buffer handling cleanups -- support for new Xen hypervisor API -- test driver for unit testing -- virsh --conect argument - -* Mon Apr 10 2006 Daniel Veillard 0.1.0-1 -- various fixes -- new APIs: for Node information and Reboot -- virsh improvements and extensions -- documentation updates and man page -- enhancement and fixes of the XML description format - -* Tue Feb 28 2006 Daniel Veillard 0.0.6-1 -- added error handling APIs -- small bug fixes -- improve python bindings -- augment documentation and regression tests - -* Thu Feb 23 2006 Daniel Veillard 0.0.5-1 -- new domain creation API -- new UUID based APIs -- more tests, documentation, devhelp -- bug fixes - -* Fri Feb 10 2006 Daniel Veillard 0.0.4-1 -- fixes some problems in 0.0.3 due to the change of names - -* Wed Feb 8 2006 Daniel Veillard 0.0.3-1 -- changed library name to libvirt from libvir, complete and test the python - bindings - -* Sun Jan 29 2006 Daniel Veillard 0.0.2-1 -- upstream release of 0.0.2, use xend, save and restore added, python bindings - fixed - -* Wed Nov 2 2005 Daniel Veillard 0.0.1-1 -- created From dfbeb65889c9523d3a475287efa6c9b506b3a7dd Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 4 Sep 2013 10:17:30 +0000 Subject: [PATCH 0348/1125] xapi now uses the classic xenopsd only Signed-off-by: David Scott --- SOURCES/xen-api-xapi-conf.in | 6 ++++++ SPECS/xapi.spec | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index fb377569..fb7c9f4c 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -6,3 +6,9 @@ xapissl=@LIBEXECDIR@/xapi/xapissl pci-info=@LIBEXECDIR@/xapi/pci-info udhcpd=/bin/true + +# The full list of xenopsd instances to manage. These must all be running. +xenopsd-queues = org.xen.xcp.xenops.classic + +# The default xenopsd to use for VMs, unless a per-VM override is specified +xenopsd-default = org.xen.xcp.xenops.classic diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 6cc89435..d86c46ce 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.20 +Version: 1.9.21 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -150,6 +150,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Wed Sep 4 2013 David Scott - 1.9.21-1 +- Update to 1.9.21, switch default xenopsd to the "classic" version + * Mon Sep 1 2013 David Scott - 1.9.20-1 - Fix XenAPI.py on python2.7 From 3e257b4ecef3740cc8518f23acd36caeb66a4842 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 4 Sep 2013 15:55:33 +0100 Subject: [PATCH 0349/1125] Update wizard to require argparse (See seperate pull request in xenserver-install-wizard repo) --- SPECS/xenserver-install-wizard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 4a4e9d34..ae36f3c2 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -9,7 +9,7 @@ License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root -Requires: python newt xapi-python-devel +Requires: python newt xapi-python-devel python-argparse %description A simple wizard to configure a XenServer after install From c45e311a59a9fc616e47df3bdf40de8ad29d7b69 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 4 Sep 2013 17:12:17 +0000 Subject: [PATCH 0350/1125] Updates to xapi, squeezed required for domain 0 memory handling Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/xapi.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index fdee1063..63cf1cc4 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.11 +Version: 0.9.12 Release: 1 Summary: Common interface definitions for XCP services License: LGPL diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 6c485166..202de8e7 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.0 +Version: 0.10.1 Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index d86c46ce..4b3337ba 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.21 +Version: 1.9.22 Release: 1 Group: System/Hypervisor License: LGPL+linking exception From 89e31f9e9155865eaa8c509f95b0c1f6ef1e1d1a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 10:11:10 +0100 Subject: [PATCH 0351/1125] xapi, ocaml-xcp-idl, squeezed: Update changelogs Signed-off-by: Euan Harris --- SPECS/ocaml-xcp-idl.spec | 3 +++ SPECS/squeezed.spec | 5 ++++- SPECS/xapi.spec | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 63cf1cc4..922f4ab4 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -61,6 +61,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp/* %changelog +* Wed Sep 04 2013 David Scott - 0.9.12-1 +- Allow domain 0 memory policy to be queried + * Thu May 30 2013 David Scott - Initial package diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 202de8e7..f24a8c1d 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -57,7 +57,10 @@ if [ $1 -eq 0 ]; then fi %changelog -* Mon Sep 2 2013 David Scott +* Wed Sep 04 2013 David Scott - 0.10.1-1 +- Add get_domain_zero_palicy call required for domain 0 ballooning + +* Mon Sep 2 2013 David Scott - 0.10.0-1 - Update to 0.10.0, with support for domain 0 ballooning * Wed Jun 5 2013 David Scott diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 4b3337ba..98dc37d4 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -150,6 +150,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Wed Sep 4 2013 David Scott - 1.9.22-1 +- Query domain 0 memory policy from squeezed + * Wed Sep 4 2013 David Scott - 1.9.21-1 - Update to 1.9.21, switch default xenopsd to the "classic" version From 24c68d81f19f53e04644f34e8b31ecafe7f5437b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:52:59 +0100 Subject: [PATCH 0352/1125] xenopsd: Add build dependency on message-switch-devel Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 59f48111..adec7cac 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -20,7 +20,7 @@ BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexecd-devel BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel -BuildRequires: xen-devel ocaml-xcp-inventory-devel +BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel Requires: message-switch xenops-cli qemu-system-x86 redhat-lsb-core %description From 40c03bf0c081189566cc1bd83e0466e3b995a923 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 18:08:01 +0100 Subject: [PATCH 0353/1125] xapi: Change optdir to /usr/lib/xapi Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 98dc37d4..c853ae9f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -59,7 +59,7 @@ cp %{SOURCE5} xen-api-pam %build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins --optdir=/usr/lib/xapi export COMPILE_JAVA=no make version From a05cdebc633b2778b6ae590a7d58798fdc416920 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 18:22:09 +0100 Subject: [PATCH 0354/1125] ocaml-oclock: Fix build dependency on ocaml-findlib-devel Signed-off-by: Euan Harris --- SPECS/ocaml-oclock.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index cf727064..b0d08a64 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -11,7 +11,7 @@ Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib +BuildRequires: ocaml ocaml-findlib-devel Requires: ocaml ocaml-findlib %description From 901911886b40e25ba44af0561735812257adc8de Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 10:58:17 +0000 Subject: [PATCH 0355/1125] Update ffs to 0.9.17 Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index c6d558d6..d0de21e0 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.16 +Version: 0.9.17 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -51,6 +51,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Sept 10 2013 David Scott +- Update to 0.9.17 + * Tue Jun 18 2013 David Scott - Update to 0.9.4 From 290641c9dd87949ea0f3da5cd0868056c8d656f7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 11:02:50 +0000 Subject: [PATCH 0356/1125] Update xenopsd to 0.9.22 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index adec7cac..7f5c7f05 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.21 +Version: 0.9.22 Release: 1 Summary: Simple VM manager License: LGPL @@ -178,6 +178,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.22 + * Fri Jun 21 2013 David Scott - Update to 0.9.5, which includes xenopsd-xenlight From 836b94fde764c5b5a6cc18d0cfad72e03f353616 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 11:04:40 +0000 Subject: [PATCH 0357/1125] Correct typo in changelog Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index d0de21e0..006c0c6b 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -51,7 +51,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Tue Sept 10 2013 David Scott +* Tue Sep 10 2013 David Scott - Update to 0.9.17 * Tue Jun 18 2013 David Scott From 3f9b134301fad80c4f9e270a09ed6512d4908d6b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 17:20:55 +0000 Subject: [PATCH 0358/1125] Update xenstore to 1.2.3 Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 6b71f71b..52a0b7f9 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,5 +1,5 @@ Name: ocaml-xenstore -Version: 1.2.1 +Version: 1.2.3 Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL @@ -48,6 +48,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore/* %changelog +* Tue Sep 10 2013 David Scott +- Update to 1.2.3 + * Sun May 2 2013 David Scott - Initial package From be3ae2279f8eda627a9acb6625ca1dfa6310fd5f Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 17:23:15 +0000 Subject: [PATCH 0359/1125] Update ocaml-xenstore spec file Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 52a0b7f9..3b10e190 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -4,8 +4,8 @@ Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL Group: Development/Other -URL: https://github.com/mirage/ocaml-xenstore/archive/ocaml-xenstore-1.2.1.tar.gz -Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/mirage/ocaml-xenstore/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib @@ -24,7 +24,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml From 7f60c176c2267c222cadd11ae1864751e6f182c5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:09:29 +0000 Subject: [PATCH 0360/1125] xenstore now requires ocaml-ocamldoc Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 3b10e190..2b9c671c 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -8,6 +8,7 @@ URL: https://github.com/mirage/ocaml-xenstore/archive/%{version}/%{na Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc Requires: ocaml ocaml-findlib Conflicts: xen-ocaml From fbdeab964ef7f3ca9f71bd32b483e51b46793cbd Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:16:59 +0000 Subject: [PATCH 0361/1125] Update ocaml-xenstore-clients to 0.9.2 Signed-off-by: David Scott --- SPECS/ocaml-xenstore-clients.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 417ff39b..1466be4c 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -1,11 +1,11 @@ Name: ocaml-xenstore-clients -Version: 0.9.0 +Version: 0.9.2 Release: 1 Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/ocaml-xenstore-clients/archive/ocaml-xenstore-clients-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ocaml-xenstore-clients/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel @@ -24,7 +24,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build make @@ -48,6 +48,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore_transport/* %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.2 + * Mon Jun 3 2013 David Scott - Initial package From bd80fd9ee1bcf3725b9d509fb38a566ac0d4fce1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:19:28 +0000 Subject: [PATCH 0362/1125] Update ocaml-xenstore-clients SPEC Signed-off-by: David Scott --- SPECS/ocaml-xenstore-clients.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 1466be4c..fbbc877e 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -5,7 +5,7 @@ Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other URL: https://github.com/xapi-project/ocaml-xenstore-clients/archive/%{version}/%{name}-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel From 9bd510b9bc683d991780d1e1ac703c8974056682 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:33:33 +0000 Subject: [PATCH 0363/1125] Update xen-api-libs-transitional to 0.9.1 Signed-off-by: David Scott --- SPECS/ocaml-xen-api-libs-transitional.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 6f9fd442..fc8675c2 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -1,11 +1,11 @@ Name: ocaml-xen-api-libs-transitional -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/xapi-project/xen-api-libs-transitional -Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/xen-api-libs-transitional-%{version}/xen-api-libs-transitional-%{version}.tar.gz +Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel @@ -25,7 +25,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n xen-api-libs-transitional-xen-api-libs-transitional-%{version} +%setup -q %build if [ -x ./configure ]; then @@ -71,6 +71,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.1 + * Wed Jun 5 2013 David Scott - Initial package From de111ae85a78946fe1fe87f738cfbff4250a51db Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:36:04 +0000 Subject: [PATCH 0364/1125] xen-api-libs-transitional: correct the directory name Signed-off-by: David Scott --- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index fc8675c2..cd8d9727 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -25,7 +25,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n ocaml-%{name}-%{version} %build if [ -x ./configure ]; then From 3bd854f9a11e5df21c4c26d95d9417a056a0ac04 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:38:58 +0000 Subject: [PATCH 0365/1125] Correct again the ocaml-xen-api-libs-transitional (too many ocamls) Signed-off-by: David Scott --- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index cd8d9727..4c1314a5 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -25,7 +25,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n ocaml-%{name}-%{version} +%setup -q -n xen-api-libs-transitional-%{version} %build if [ -x ./configure ]; then From 4b9c59838db5b8b0eea58e7569ab91f8d1bd0573 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:45:04 +0000 Subject: [PATCH 0366/1125] Attempt a swift ocaml-xenstore-downgrade Can we get the bugfix without the interface change? Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 2b9c671c..f39ad45d 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,5 +1,5 @@ Name: ocaml-xenstore -Version: 1.2.3 +Version: 1.2.2 Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL From 038da6261ca0444f6f783284c7cfe3ce7fa33eab Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 19:54:48 +0000 Subject: [PATCH 0367/1125] Upgrade to ocaml-xenstore 1.2.3 again Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index f39ad45d..2b9c671c 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,5 +1,5 @@ Name: ocaml-xenstore -Version: 1.2.2 +Version: 1.2.3 Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL From 42237505d65ee6e6691e29187e392a90197b2f59 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 20:28:05 +0000 Subject: [PATCH 0368/1125] Update xen-api-libs-transitional to 0.9.2 Signed-off-by: David Scott --- SPECS/ocaml-xen-api-libs-transitional.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 4c1314a5..74e8e691 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-api-libs-transitional -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception @@ -72,7 +72,7 @@ rm -rf %{buildroot} %changelog * Tue Sep 10 2013 David Scott -- Update to 0.9.1 +- Update to 0.9.2 * Wed Jun 5 2013 David Scott - Initial package From ce97b39db6343142c9508afe6ee511ebab12c6d9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 20:36:12 +0000 Subject: [PATCH 0369/1125] Update stdext to 0.9.1 Signed-off-by: David Scott --- SPECS/ocaml-stdext.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 26afa9f5..1cd663ae 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -1,11 +1,11 @@ Name: ocaml-stdext -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/stdext/archive/stdext-%{version}.tar.gz -Source0: https://github.com/xapi-project/stdext/archive/stdext-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/stdext/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib @@ -23,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n stdext-stdext-%{version} +%setup -q -n stdext-%{version} %build make @@ -50,6 +50,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.1 + * Mon Jun 3 2013 David Scott - Initial package From 6a46428cb3b7fc34c5270b4240779cc0f64d389b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 21:27:33 +0000 Subject: [PATCH 0370/1125] Update to xenopsd 0.9.23 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 7f5c7f05..590d5a73 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.22 +Version: 0.9.23 Release: 1 Summary: Simple VM manager License: LGPL @@ -179,7 +179,7 @@ fi %changelog * Tue Sep 10 2013 David Scott -- Update to 0.9.22 +- Update to 0.9.23 * Fri Jun 21 2013 David Scott - Update to 0.9.5, which includes xenopsd-xenlight From dfdade3a0b43c9695bf286123ceb3f2a0d6ea0a4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 21:35:12 +0000 Subject: [PATCH 0371/1125] Update xenopsd to 0.9.24 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 590d5a73..6bd48286 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.23 +Version: 0.9.24 Release: 1 Summary: Simple VM manager License: LGPL @@ -179,7 +179,7 @@ fi %changelog * Tue Sep 10 2013 David Scott -- Update to 0.9.23 +- Update to 0.9.24 * Fri Jun 21 2013 David Scott - Update to 0.9.5, which includes xenopsd-xenlight From 1c42ea4f438d519c81d663a86ca19c0620e991c6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 21:45:37 +0000 Subject: [PATCH 0372/1125] Update to squeezed 0.10.2 Signed-off-by: David Scott --- SPECS/squeezed.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index f24a8c1d..61f08dae 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.1 +Version: 0.10.2 Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL @@ -57,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Sep 10 2013 David Scott - 0.10.2-1 +- Update to new xenstore interface in v1.2.3 + * Wed Sep 04 2013 David Scott - 0.10.1-1 - Add get_domain_zero_palicy call required for domain 0 ballooning From b985cf83ad066f4a6ddb5a619d030aa8560955cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 21:58:36 +0000 Subject: [PATCH 0373/1125] Update xenops to 0.9.1 Signed-off-by: David Scott --- SPECS/ocaml-xenops.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index e93bf7f3..25692568 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,5 +1,5 @@ Name: ocaml-xenops -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Low-level xen control operations OCaml License: LGPL @@ -49,6 +49,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenops/* %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.1 + * Tue Jun 18 2013 David Scott - Initial package From 5acabf041f16b04d1ed24b216f123a96c3a017be Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 10 Sep 2013 22:15:08 +0000 Subject: [PATCH 0374/1125] Update xcp-rrdd 0.9.1 Signed-off-by: David Scott --- SPECS/xcp-rrdd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 3d18a03b..16c74cd1 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,5 +1,5 @@ Name: xcp-rrdd -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Statistics gathering daemon for the xapi toolstack License: LGPL @@ -54,6 +54,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Sep 10 2013 David Scott +- Update to 0.9.1 + * Tue Jun 18 2013 David Scott - Initial package From 04f963f3b3b4d38f3f9e4962475b43687bbef8ab Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 11:38:54 +0100 Subject: [PATCH 0375/1125] xcp-sm: Import Storage Managers Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 256 ++++++++++++++++++++++++++++++++++++++ SPECS/xenserver-core.spec | 2 +- 2 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 SPECS/xcp-sm.spec diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec new file mode 100644 index 00000000..cf20688b --- /dev/null +++ b/SPECS/xcp-sm.spec @@ -0,0 +1,256 @@ +# -*- rpm-spec -*- + +Summary: sm - XCP storage managers +Name: xcp-sm +Version: 0.9.0 +Release: 1 +Group: System/Hypervisor +License: LGPL +URL: http://www.citrix.com +Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: swig python-devel xen-devel + +%description +This package contains storage backends used in XCP + +%prep +%setup -q -n sm-%{version} + +%build +DESTDIR=$RPM_BUILD_ROOT make + +%install +make PLUGIN_SCRIPT_DEST=/usr/lib/xapi/plugins/ DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +[ ! -x /sbin/chkconfig ] || chkconfig --add mpathroot + +%files +%defattr(-,root,root,-) +/etc/cron.d/* +/etc/rc.d/init.d/snapwatchd +/etc/rc.d/init.d/mpathroot +/usr/lib/xapi/plugins/coalesce-leaf +/usr/lib/xapi/plugins/lvhd-thin +/usr/lib/xapi/plugins/nfs-on-slave +/usr/lib/xapi/plugins/on-slave +/usr/lib/xapi/plugins/tapdisk-pause +/usr/lib/xapi/plugins/testing-hooks +/usr/lib/xapi/plugins/vss_control +/usr/lib/xapi/plugins/intellicache-clean +/etc/xensource/master.d/02-vhdcleanup +/opt/xensource/bin/blktap2 +/opt/xensource/bin/tapdisk-cache-stats +/opt/xensource/debug/tp +/opt/xensource/libexec/check-device-sharing +/opt/xensource/libexec/dcopy +/opt/xensource/libexec/local-device-change +/opt/xensource/sm/DummySR +/opt/xensource/sm/DummySR.py +/opt/xensource/sm/DummySR.pyc +/opt/xensource/sm/DummySR.pyo +/opt/xensource/sm/EXTSR +/opt/xensource/sm/EXTSR.py +/opt/xensource/sm/EXTSR.pyc +/opt/xensource/sm/EXTSR.pyo +/opt/xensource/sm/FileSR +/opt/xensource/sm/FileSR.py +/opt/xensource/sm/FileSR.pyc +/opt/xensource/sm/FileSR.pyo +/opt/xensource/sm/HBASR +/opt/xensource/sm/HBASR.py +/opt/xensource/sm/HBASR.pyc +/opt/xensource/sm/HBASR.pyo +/opt/xensource/sm/ISCSISR +/opt/xensource/sm/ISCSISR.py +/opt/xensource/sm/ISCSISR.pyc +/opt/xensource/sm/ISCSISR.pyo +/opt/xensource/sm/ISOSR +/opt/xensource/sm/ISOSR.py +/opt/xensource/sm/ISOSR.pyc +/opt/xensource/sm/ISOSR.pyo +/opt/xensource/sm/OCFSSR.py +/opt/xensource/sm/OCFSSR.pyc +/opt/xensource/sm/OCFSSR.pyo +/opt/xensource/sm/OCFSoISCSISR +/opt/xensource/sm/OCFSoISCSISR.py +/opt/xensource/sm/OCFSoISCSISR.pyc +/opt/xensource/sm/OCFSoISCSISR.pyo +/opt/xensource/sm/OCFSoHBASR +/opt/xensource/sm/OCFSoHBASR.py +/opt/xensource/sm/OCFSoHBASR.pyc +/opt/xensource/sm/OCFSoHBASR.pyo +/opt/xensource/sm/LUNperVDI.py +/opt/xensource/sm/LUNperVDI.pyc +/opt/xensource/sm/LUNperVDI.pyo +/opt/xensource/sm/LVHDSR.py +/opt/xensource/sm/LVHDSR.pyc +/opt/xensource/sm/LVHDSR.pyo +/opt/xensource/sm/LVHDoHBASR.py +/opt/xensource/sm/LVHDoHBASR.pyc +/opt/xensource/sm/LVHDoHBASR.pyo +/opt/xensource/sm/LVHDoISCSISR.py +/opt/xensource/sm/LVHDoISCSISR.pyc +/opt/xensource/sm/LVHDoISCSISR.pyo +/opt/xensource/sm/LVMSR +/opt/xensource/sm/LVMoHBASR +/opt/xensource/sm/LVMoISCSISR +/opt/xensource/sm/NFSSR +/opt/xensource/sm/NFSSR.py +/opt/xensource/sm/NFSSR.pyc +/opt/xensource/sm/NFSSR.pyo +/opt/xensource/sm/SHMSR.py +/opt/xensource/sm/SHMSR.pyc +/opt/xensource/sm/SHMSR.pyo +/opt/xensource/sm/SR.py +/opt/xensource/sm/SR.pyc +/opt/xensource/sm/SR.pyo +/opt/xensource/sm/SRCommand.py +/opt/xensource/sm/SRCommand.pyc +/opt/xensource/sm/SRCommand.pyo +/opt/xensource/sm/VDI.py +/opt/xensource/sm/VDI.pyc +/opt/xensource/sm/VDI.pyo +/opt/xensource/sm/XE_SR_ERRORCODES.xml +/opt/xensource/sm/blktap2.py +/opt/xensource/sm/blktap2.pyc +/opt/xensource/sm/blktap2.pyo +/opt/xensource/sm/cleanup.py +/opt/xensource/sm/cleanup.pyc +/opt/xensource/sm/cleanup.pyo +/opt/xensource/sm/devscan.py +/opt/xensource/sm/devscan.pyc +/opt/xensource/sm/devscan.pyo +/opt/xensource/sm/fjournaler.py +/opt/xensource/sm/fjournaler.pyc +/opt/xensource/sm/fjournaler.pyo +/opt/xensource/sm/flock.py +/opt/xensource/sm/flock.pyc +/opt/xensource/sm/flock.pyo +/opt/xensource/sm/ipc.py +/opt/xensource/sm/ipc.pyc +/opt/xensource/sm/ipc.pyo +/opt/xensource/sm/iscsilib.py +/opt/xensource/sm/iscsilib.pyc +/opt/xensource/sm/iscsilib.pyo +/opt/xensource/sm/journaler.py +/opt/xensource/sm/journaler.pyc +/opt/xensource/sm/journaler.pyo +/opt/xensource/sm/lcache.py +/opt/xensource/sm/lcache.pyc +/opt/xensource/sm/lcache.pyo +/opt/xensource/sm/lock.py +/opt/xensource/sm/lock.pyc +/opt/xensource/sm/lock.pyo +/opt/xensource/sm/lvhdutil.py +/opt/xensource/sm/lvhdutil.pyc +/opt/xensource/sm/lvhdutil.pyo +/opt/xensource/sm/lvmanager.py +/opt/xensource/sm/lvmanager.pyc +/opt/xensource/sm/lvmanager.pyo +/opt/xensource/sm/lvmcache.py +/opt/xensource/sm/lvmcache.pyc +/opt/xensource/sm/lvmcache.pyo +/opt/xensource/sm/lvutil.py +/opt/xensource/sm/lvutil.pyc +/opt/xensource/sm/lvutil.pyo +/opt/xensource/sm/metadata.py +/opt/xensource/sm/metadata.pyc +/opt/xensource/sm/metadata.pyo +/opt/xensource/sm/srmetadata.py +/opt/xensource/sm/srmetadata.pyc +/opt/xensource/sm/srmetadata.pyo +/opt/xensource/sm/mpath_cli.py +/opt/xensource/sm/mpath_cli.pyc +/opt/xensource/sm/mpath_cli.pyo +/opt/xensource/sm/mpath_dmp.py +/opt/xensource/sm/mpath_dmp.pyc +/opt/xensource/sm/mpath_dmp.pyo +/opt/xensource/sm/mpath_null.py +/opt/xensource/sm/mpath_null.pyc +/opt/xensource/sm/mpath_null.pyo +/opt/xensource/sm/mpathcount.py +/opt/xensource/sm/mpathcount.pyc +/opt/xensource/sm/mpathcount.pyo +/opt/xensource/sm/mpathutil.py +/opt/xensource/sm/mpathutil.pyc +/opt/xensource/sm/mpathutil.pyo +/opt/xensource/sm/mpp_luncheck.py +/opt/xensource/sm/mpp_luncheck.pyc +/opt/xensource/sm/mpp_luncheck.pyo +/opt/xensource/sm/mpp_mpathutil.py +/opt/xensource/sm/mpp_mpathutil.pyc +/opt/xensource/sm/mpp_mpathutil.pyo +/opt/xensource/sm/nfs.py +/opt/xensource/sm/nfs.pyc +/opt/xensource/sm/nfs.pyo +/opt/xensource/sm/refcounter.py +/opt/xensource/sm/refcounter.pyc +/opt/xensource/sm/refcounter.pyo +/opt/xensource/sm/resetvdis.py +/opt/xensource/sm/resetvdis.pyc +/opt/xensource/sm/resetvdis.pyo +/opt/xensource/sm/scsiutil.py +/opt/xensource/sm/scsiutil.pyc +/opt/xensource/sm/scsiutil.pyo +/opt/xensource/sm/scsi_host_rescan.py +/opt/xensource/sm/scsi_host_rescan.pyc +/opt/xensource/sm/scsi_host_rescan.pyo +/opt/xensource/sm/snapwatchd/_xslib.so +/opt/xensource/sm/snapwatchd/snapwatchd +/opt/xensource/sm/snapwatchd/xslib.py +/opt/xensource/sm/snapwatchd/xslib.pyc +/opt/xensource/sm/snapwatchd/xslib.pyo +/opt/xensource/sm/sysdevice.py +/opt/xensource/sm/sysdevice.pyc +/opt/xensource/sm/sysdevice.pyo +/opt/xensource/sm/udevSR +/opt/xensource/sm/udevSR.py +/opt/xensource/sm/udevSR.pyc +/opt/xensource/sm/udevSR.pyo +/opt/xensource/sm/updatempppathd.py +/opt/xensource/sm/updatempppathd.pyc +/opt/xensource/sm/updatempppathd.pyo +/opt/xensource/sm/util.py +/opt/xensource/sm/util.pyc +/opt/xensource/sm/util.pyo +/opt/xensource/sm/verifyVHDsOnSR.py +/opt/xensource/sm/verifyVHDsOnSR.pyc +/opt/xensource/sm/verifyVHDsOnSR.pyo +/opt/xensource/sm/vhdutil.py +/opt/xensource/sm/vhdutil.pyc +/opt/xensource/sm/vhdutil.pyo +/opt/xensource/sm/vss_control +/opt/xensource/sm/xs_errors.py +/opt/xensource/sm/xs_errors.pyc +/opt/xensource/sm/xs_errors.pyo +/sbin/mpathutil + + +%package rawhba +Group: System/Hypervisor +Summary: rawhba SR type capability +#Requires: sm = @SM_VERSION@-@SM_RELEASE@ + +%description rawhba +This package adds a new rawhba SR type. This SR type allows utilization of +Fiber Channel raw LUNs as separate VDIs (LUN per VDI) + +%files rawhba +/opt/xensource/sm/RawHBASR +/opt/xensource/sm/RawHBASR.py +/opt/xensource/sm/RawHBASR.pyc +/opt/xensource/sm/RawHBASR.pyo +/opt/xensource/sm/B_util.py +/opt/xensource/sm/B_util.pyc +/opt/xensource/sm/B_util.pyo + +%changelog + +* Mon Sep 09 2013 Euan Harris +- Initial package + diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index ba24f7b0..55b324de 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -12,7 +12,7 @@ Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator Requires: xenops-cli Requires: openstack-xapi-plugins -Requires: ffs xapi-libvirt-storage sm-cli +Requires: ffs xapi-libvirt-storage sm-cli xcp-sm Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed From a1a2c1baef482103ae501c4a3f71aa354d9ab022 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 16:57:04 +0100 Subject: [PATCH 0376/1125] specs: Don't build debuginfo packages for OCaml packages Signed-off-by: Euan Harris --- SPECS/js_of_ocaml.spec | 2 ++ SPECS/ocaml-cohttp.spec | 2 ++ SPECS/ocaml-nbd.spec | 2 ++ SPECS/ocaml-rpc.spec | 2 ++ SPECS/ocaml-syslog.spec | 2 ++ SPECS/ocaml-yojson.spec | 2 ++ 6 files changed, 12 insertions(+) diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 3bd96aec..d81e06e0 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: js_of_ocaml Version: 1.3.2 Release: 1 diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 61e6e2b2..04f4f6fe 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-cohttp Version: 0.9.8 Release: 1 diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 53777eff..b5182bfb 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-nbd Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 84967b59..c9a61e27 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-rpc Version: 1.4.1 Release: 1 diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec index fd00100c..2ab6c68c 100644 --- a/SPECS/ocaml-syslog.spec +++ b/SPECS/ocaml-syslog.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-syslog Version: 1.4 Release: 1 diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 88ca67c6..e3dc835b 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-yojson Version: 1.1.6 Release: 1 From f0c56e97bfec451dd0309e6f2eea5272a5c60130 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 18:03:25 +0100 Subject: [PATCH 0377/1125] xenopsd: Remove qemu-system-x86 dependency Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 6bd48286..72f36e19 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel -Requires: message-switch xenops-cli qemu-system-x86 redhat-lsb-core +Requires: message-switch xenops-cli redhat-lsb-core %description Simple VM manager for the xapi toolstack. From f880e4f0507852c02a198f7196a6b54d7837437e Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 11 Sep 2013 10:16:58 +0000 Subject: [PATCH 0378/1125] Update to xenstore 1.2.4 (watching bug) Signed-off-by: David Scott --- SPECS/ocaml-xenstore.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 2b9c671c..4314a496 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,5 +1,5 @@ Name: ocaml-xenstore -Version: 1.2.3 +Version: 1.2.4 Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL @@ -49,6 +49,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore/* %changelog +* Wed Sep 11 2013 David Scott +- Update to 1.2.4 (fixes critical watching bug) + * Tue Sep 10 2013 David Scott - Update to 1.2.3 From 0d81078e746a07b5646146f44c235f00d2fb1539 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 11 Sep 2013 12:23:31 +0100 Subject: [PATCH 0379/1125] sm: Move drivers to /usr/lib/xapi/sm Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 368 +++++++++++++++++++++++----------------------- 1 file changed, 185 insertions(+), 183 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index cf20688b..c9310020 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,7 +2,7 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.0 +Version: 0.9.1 Release: 1 Group: System/Hypervisor License: LGPL @@ -21,7 +21,7 @@ This package contains storage backends used in XCP DESTDIR=$RPM_BUILD_ROOT make %install -make PLUGIN_SCRIPT_DEST=/usr/lib/xapi/plugins/ DESTDIR=$RPM_BUILD_ROOT install +make PLUGIN_SCRIPT_DEST=/usr/lib/xapi/plugins/ SM_DEST=/usr/lib/xapi/sm/ DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT @@ -49,185 +49,185 @@ rm -rf $RPM_BUILD_ROOT /opt/xensource/libexec/check-device-sharing /opt/xensource/libexec/dcopy /opt/xensource/libexec/local-device-change -/opt/xensource/sm/DummySR -/opt/xensource/sm/DummySR.py -/opt/xensource/sm/DummySR.pyc -/opt/xensource/sm/DummySR.pyo -/opt/xensource/sm/EXTSR -/opt/xensource/sm/EXTSR.py -/opt/xensource/sm/EXTSR.pyc -/opt/xensource/sm/EXTSR.pyo -/opt/xensource/sm/FileSR -/opt/xensource/sm/FileSR.py -/opt/xensource/sm/FileSR.pyc -/opt/xensource/sm/FileSR.pyo -/opt/xensource/sm/HBASR -/opt/xensource/sm/HBASR.py -/opt/xensource/sm/HBASR.pyc -/opt/xensource/sm/HBASR.pyo -/opt/xensource/sm/ISCSISR -/opt/xensource/sm/ISCSISR.py -/opt/xensource/sm/ISCSISR.pyc -/opt/xensource/sm/ISCSISR.pyo -/opt/xensource/sm/ISOSR -/opt/xensource/sm/ISOSR.py -/opt/xensource/sm/ISOSR.pyc -/opt/xensource/sm/ISOSR.pyo -/opt/xensource/sm/OCFSSR.py -/opt/xensource/sm/OCFSSR.pyc -/opt/xensource/sm/OCFSSR.pyo -/opt/xensource/sm/OCFSoISCSISR -/opt/xensource/sm/OCFSoISCSISR.py -/opt/xensource/sm/OCFSoISCSISR.pyc -/opt/xensource/sm/OCFSoISCSISR.pyo -/opt/xensource/sm/OCFSoHBASR -/opt/xensource/sm/OCFSoHBASR.py -/opt/xensource/sm/OCFSoHBASR.pyc -/opt/xensource/sm/OCFSoHBASR.pyo -/opt/xensource/sm/LUNperVDI.py -/opt/xensource/sm/LUNperVDI.pyc -/opt/xensource/sm/LUNperVDI.pyo -/opt/xensource/sm/LVHDSR.py -/opt/xensource/sm/LVHDSR.pyc -/opt/xensource/sm/LVHDSR.pyo -/opt/xensource/sm/LVHDoHBASR.py -/opt/xensource/sm/LVHDoHBASR.pyc -/opt/xensource/sm/LVHDoHBASR.pyo -/opt/xensource/sm/LVHDoISCSISR.py -/opt/xensource/sm/LVHDoISCSISR.pyc -/opt/xensource/sm/LVHDoISCSISR.pyo -/opt/xensource/sm/LVMSR -/opt/xensource/sm/LVMoHBASR -/opt/xensource/sm/LVMoISCSISR -/opt/xensource/sm/NFSSR -/opt/xensource/sm/NFSSR.py -/opt/xensource/sm/NFSSR.pyc -/opt/xensource/sm/NFSSR.pyo -/opt/xensource/sm/SHMSR.py -/opt/xensource/sm/SHMSR.pyc -/opt/xensource/sm/SHMSR.pyo -/opt/xensource/sm/SR.py -/opt/xensource/sm/SR.pyc -/opt/xensource/sm/SR.pyo -/opt/xensource/sm/SRCommand.py -/opt/xensource/sm/SRCommand.pyc -/opt/xensource/sm/SRCommand.pyo -/opt/xensource/sm/VDI.py -/opt/xensource/sm/VDI.pyc -/opt/xensource/sm/VDI.pyo -/opt/xensource/sm/XE_SR_ERRORCODES.xml -/opt/xensource/sm/blktap2.py -/opt/xensource/sm/blktap2.pyc -/opt/xensource/sm/blktap2.pyo -/opt/xensource/sm/cleanup.py -/opt/xensource/sm/cleanup.pyc -/opt/xensource/sm/cleanup.pyo -/opt/xensource/sm/devscan.py -/opt/xensource/sm/devscan.pyc -/opt/xensource/sm/devscan.pyo -/opt/xensource/sm/fjournaler.py -/opt/xensource/sm/fjournaler.pyc -/opt/xensource/sm/fjournaler.pyo -/opt/xensource/sm/flock.py -/opt/xensource/sm/flock.pyc -/opt/xensource/sm/flock.pyo -/opt/xensource/sm/ipc.py -/opt/xensource/sm/ipc.pyc -/opt/xensource/sm/ipc.pyo -/opt/xensource/sm/iscsilib.py -/opt/xensource/sm/iscsilib.pyc -/opt/xensource/sm/iscsilib.pyo -/opt/xensource/sm/journaler.py -/opt/xensource/sm/journaler.pyc -/opt/xensource/sm/journaler.pyo -/opt/xensource/sm/lcache.py -/opt/xensource/sm/lcache.pyc -/opt/xensource/sm/lcache.pyo -/opt/xensource/sm/lock.py -/opt/xensource/sm/lock.pyc -/opt/xensource/sm/lock.pyo -/opt/xensource/sm/lvhdutil.py -/opt/xensource/sm/lvhdutil.pyc -/opt/xensource/sm/lvhdutil.pyo -/opt/xensource/sm/lvmanager.py -/opt/xensource/sm/lvmanager.pyc -/opt/xensource/sm/lvmanager.pyo -/opt/xensource/sm/lvmcache.py -/opt/xensource/sm/lvmcache.pyc -/opt/xensource/sm/lvmcache.pyo -/opt/xensource/sm/lvutil.py -/opt/xensource/sm/lvutil.pyc -/opt/xensource/sm/lvutil.pyo -/opt/xensource/sm/metadata.py -/opt/xensource/sm/metadata.pyc -/opt/xensource/sm/metadata.pyo -/opt/xensource/sm/srmetadata.py -/opt/xensource/sm/srmetadata.pyc -/opt/xensource/sm/srmetadata.pyo -/opt/xensource/sm/mpath_cli.py -/opt/xensource/sm/mpath_cli.pyc -/opt/xensource/sm/mpath_cli.pyo -/opt/xensource/sm/mpath_dmp.py -/opt/xensource/sm/mpath_dmp.pyc -/opt/xensource/sm/mpath_dmp.pyo -/opt/xensource/sm/mpath_null.py -/opt/xensource/sm/mpath_null.pyc -/opt/xensource/sm/mpath_null.pyo -/opt/xensource/sm/mpathcount.py -/opt/xensource/sm/mpathcount.pyc -/opt/xensource/sm/mpathcount.pyo -/opt/xensource/sm/mpathutil.py -/opt/xensource/sm/mpathutil.pyc -/opt/xensource/sm/mpathutil.pyo -/opt/xensource/sm/mpp_luncheck.py -/opt/xensource/sm/mpp_luncheck.pyc -/opt/xensource/sm/mpp_luncheck.pyo -/opt/xensource/sm/mpp_mpathutil.py -/opt/xensource/sm/mpp_mpathutil.pyc -/opt/xensource/sm/mpp_mpathutil.pyo -/opt/xensource/sm/nfs.py -/opt/xensource/sm/nfs.pyc -/opt/xensource/sm/nfs.pyo -/opt/xensource/sm/refcounter.py -/opt/xensource/sm/refcounter.pyc -/opt/xensource/sm/refcounter.pyo -/opt/xensource/sm/resetvdis.py -/opt/xensource/sm/resetvdis.pyc -/opt/xensource/sm/resetvdis.pyo -/opt/xensource/sm/scsiutil.py -/opt/xensource/sm/scsiutil.pyc -/opt/xensource/sm/scsiutil.pyo -/opt/xensource/sm/scsi_host_rescan.py -/opt/xensource/sm/scsi_host_rescan.pyc -/opt/xensource/sm/scsi_host_rescan.pyo +/usr/lib/xapi/sm/DummySR +/usr/lib/xapi/sm/DummySR.py +/usr/lib/xapi/sm/DummySR.pyc +/usr/lib/xapi/sm/DummySR.pyo +/usr/lib/xapi/sm/EXTSR +/usr/lib/xapi/sm/EXTSR.py +/usr/lib/xapi/sm/EXTSR.pyc +/usr/lib/xapi/sm/EXTSR.pyo +/usr/lib/xapi/sm/FileSR +/usr/lib/xapi/sm/FileSR.py +/usr/lib/xapi/sm/FileSR.pyc +/usr/lib/xapi/sm/FileSR.pyo +/usr/lib/xapi/sm/HBASR +/usr/lib/xapi/sm/HBASR.py +/usr/lib/xapi/sm/HBASR.pyc +/usr/lib/xapi/sm/HBASR.pyo +/usr/lib/xapi/sm/ISCSISR +/usr/lib/xapi/sm/ISCSISR.py +/usr/lib/xapi/sm/ISCSISR.pyc +/usr/lib/xapi/sm/ISCSISR.pyo +/usr/lib/xapi/sm/ISOSR +/usr/lib/xapi/sm/ISOSR.py +/usr/lib/xapi/sm/ISOSR.pyc +/usr/lib/xapi/sm/ISOSR.pyo +/usr/lib/xapi/sm/OCFSSR.py +/usr/lib/xapi/sm/OCFSSR.pyc +/usr/lib/xapi/sm/OCFSSR.pyo +/usr/lib/xapi/sm/OCFSoISCSISR +/usr/lib/xapi/sm/OCFSoISCSISR.py +/usr/lib/xapi/sm/OCFSoISCSISR.pyc +/usr/lib/xapi/sm/OCFSoISCSISR.pyo +/usr/lib/xapi/sm/OCFSoHBASR +/usr/lib/xapi/sm/OCFSoHBASR.py +/usr/lib/xapi/sm/OCFSoHBASR.pyc +/usr/lib/xapi/sm/OCFSoHBASR.pyo +/usr/lib/xapi/sm/LUNperVDI.py +/usr/lib/xapi/sm/LUNperVDI.pyc +/usr/lib/xapi/sm/LUNperVDI.pyo +/usr/lib/xapi/sm/LVHDSR.py +/usr/lib/xapi/sm/LVHDSR.pyc +/usr/lib/xapi/sm/LVHDSR.pyo +/usr/lib/xapi/sm/LVHDoHBASR.py +/usr/lib/xapi/sm/LVHDoHBASR.pyc +/usr/lib/xapi/sm/LVHDoHBASR.pyo +/usr/lib/xapi/sm/LVHDoISCSISR.py +/usr/lib/xapi/sm/LVHDoISCSISR.pyc +/usr/lib/xapi/sm/LVHDoISCSISR.pyo +/usr/lib/xapi/sm/LVMSR +/usr/lib/xapi/sm/LVMoHBASR +/usr/lib/xapi/sm/LVMoISCSISR +/usr/lib/xapi/sm/NFSSR +/usr/lib/xapi/sm/NFSSR.py +/usr/lib/xapi/sm/NFSSR.pyc +/usr/lib/xapi/sm/NFSSR.pyo +/usr/lib/xapi/sm/SHMSR.py +/usr/lib/xapi/sm/SHMSR.pyc +/usr/lib/xapi/sm/SHMSR.pyo +/usr/lib/xapi/sm/SR.py +/usr/lib/xapi/sm/SR.pyc +/usr/lib/xapi/sm/SR.pyo +/usr/lib/xapi/sm/SRCommand.py +/usr/lib/xapi/sm/SRCommand.pyc +/usr/lib/xapi/sm/SRCommand.pyo +/usr/lib/xapi/sm/VDI.py +/usr/lib/xapi/sm/VDI.pyc +/usr/lib/xapi/sm/VDI.pyo +/usr/lib/xapi/sm/XE_SR_ERRORCODES.xml +/usr/lib/xapi/sm/blktap2.py +/usr/lib/xapi/sm/blktap2.pyc +/usr/lib/xapi/sm/blktap2.pyo +/usr/lib/xapi/sm/cleanup.py +/usr/lib/xapi/sm/cleanup.pyc +/usr/lib/xapi/sm/cleanup.pyo +/usr/lib/xapi/sm/devscan.py +/usr/lib/xapi/sm/devscan.pyc +/usr/lib/xapi/sm/devscan.pyo +/usr/lib/xapi/sm/fjournaler.py +/usr/lib/xapi/sm/fjournaler.pyc +/usr/lib/xapi/sm/fjournaler.pyo +/usr/lib/xapi/sm/flock.py +/usr/lib/xapi/sm/flock.pyc +/usr/lib/xapi/sm/flock.pyo +/usr/lib/xapi/sm/ipc.py +/usr/lib/xapi/sm/ipc.pyc +/usr/lib/xapi/sm/ipc.pyo +/usr/lib/xapi/sm/iscsilib.py +/usr/lib/xapi/sm/iscsilib.pyc +/usr/lib/xapi/sm/iscsilib.pyo +/usr/lib/xapi/sm/journaler.py +/usr/lib/xapi/sm/journaler.pyc +/usr/lib/xapi/sm/journaler.pyo +/usr/lib/xapi/sm/lcache.py +/usr/lib/xapi/sm/lcache.pyc +/usr/lib/xapi/sm/lcache.pyo +/usr/lib/xapi/sm/lock.py +/usr/lib/xapi/sm/lock.pyc +/usr/lib/xapi/sm/lock.pyo +/usr/lib/xapi/sm/lvhdutil.py +/usr/lib/xapi/sm/lvhdutil.pyc +/usr/lib/xapi/sm/lvhdutil.pyo +/usr/lib/xapi/sm/lvmanager.py +/usr/lib/xapi/sm/lvmanager.pyc +/usr/lib/xapi/sm/lvmanager.pyo +/usr/lib/xapi/sm/lvmcache.py +/usr/lib/xapi/sm/lvmcache.pyc +/usr/lib/xapi/sm/lvmcache.pyo +/usr/lib/xapi/sm/lvutil.py +/usr/lib/xapi/sm/lvutil.pyc +/usr/lib/xapi/sm/lvutil.pyo +/usr/lib/xapi/sm/metadata.py +/usr/lib/xapi/sm/metadata.pyc +/usr/lib/xapi/sm/metadata.pyo +/usr/lib/xapi/sm/srmetadata.py +/usr/lib/xapi/sm/srmetadata.pyc +/usr/lib/xapi/sm/srmetadata.pyo +/usr/lib/xapi/sm/mpath_cli.py +/usr/lib/xapi/sm/mpath_cli.pyc +/usr/lib/xapi/sm/mpath_cli.pyo +/usr/lib/xapi/sm/mpath_dmp.py +/usr/lib/xapi/sm/mpath_dmp.pyc +/usr/lib/xapi/sm/mpath_dmp.pyo +/usr/lib/xapi/sm/mpath_null.py +/usr/lib/xapi/sm/mpath_null.pyc +/usr/lib/xapi/sm/mpath_null.pyo +/usr/lib/xapi/sm/mpathcount.py +/usr/lib/xapi/sm/mpathcount.pyc +/usr/lib/xapi/sm/mpathcount.pyo +/usr/lib/xapi/sm/mpathutil.py +/usr/lib/xapi/sm/mpathutil.pyc +/usr/lib/xapi/sm/mpathutil.pyo +/usr/lib/xapi/sm/mpp_luncheck.py +/usr/lib/xapi/sm/mpp_luncheck.pyc +/usr/lib/xapi/sm/mpp_luncheck.pyo +/usr/lib/xapi/sm/mpp_mpathutil.py +/usr/lib/xapi/sm/mpp_mpathutil.pyc +/usr/lib/xapi/sm/mpp_mpathutil.pyo +/usr/lib/xapi/sm/nfs.py +/usr/lib/xapi/sm/nfs.pyc +/usr/lib/xapi/sm/nfs.pyo +/usr/lib/xapi/sm/refcounter.py +/usr/lib/xapi/sm/refcounter.pyc +/usr/lib/xapi/sm/refcounter.pyo +/usr/lib/xapi/sm/resetvdis.py +/usr/lib/xapi/sm/resetvdis.pyc +/usr/lib/xapi/sm/resetvdis.pyo +/usr/lib/xapi/sm/scsiutil.py +/usr/lib/xapi/sm/scsiutil.pyc +/usr/lib/xapi/sm/scsiutil.pyo +/usr/lib/xapi/sm/scsi_host_rescan.py +/usr/lib/xapi/sm/scsi_host_rescan.pyc +/usr/lib/xapi/sm/scsi_host_rescan.pyo /opt/xensource/sm/snapwatchd/_xslib.so /opt/xensource/sm/snapwatchd/snapwatchd /opt/xensource/sm/snapwatchd/xslib.py /opt/xensource/sm/snapwatchd/xslib.pyc /opt/xensource/sm/snapwatchd/xslib.pyo -/opt/xensource/sm/sysdevice.py -/opt/xensource/sm/sysdevice.pyc -/opt/xensource/sm/sysdevice.pyo -/opt/xensource/sm/udevSR -/opt/xensource/sm/udevSR.py -/opt/xensource/sm/udevSR.pyc -/opt/xensource/sm/udevSR.pyo -/opt/xensource/sm/updatempppathd.py -/opt/xensource/sm/updatempppathd.pyc -/opt/xensource/sm/updatempppathd.pyo -/opt/xensource/sm/util.py -/opt/xensource/sm/util.pyc -/opt/xensource/sm/util.pyo -/opt/xensource/sm/verifyVHDsOnSR.py -/opt/xensource/sm/verifyVHDsOnSR.pyc -/opt/xensource/sm/verifyVHDsOnSR.pyo -/opt/xensource/sm/vhdutil.py -/opt/xensource/sm/vhdutil.pyc -/opt/xensource/sm/vhdutil.pyo -/opt/xensource/sm/vss_control -/opt/xensource/sm/xs_errors.py -/opt/xensource/sm/xs_errors.pyc -/opt/xensource/sm/xs_errors.pyo +/usr/lib/xapi/sm/sysdevice.py +/usr/lib/xapi/sm/sysdevice.pyc +/usr/lib/xapi/sm/sysdevice.pyo +/usr/lib/xapi/sm/udevSR +/usr/lib/xapi/sm/udevSR.py +/usr/lib/xapi/sm/udevSR.pyc +/usr/lib/xapi/sm/udevSR.pyo +/usr/lib/xapi/sm/updatempppathd.py +/usr/lib/xapi/sm/updatempppathd.pyc +/usr/lib/xapi/sm/updatempppathd.pyo +/usr/lib/xapi/sm/util.py +/usr/lib/xapi/sm/util.pyc +/usr/lib/xapi/sm/util.pyo +/usr/lib/xapi/sm/verifyVHDsOnSR.py +/usr/lib/xapi/sm/verifyVHDsOnSR.pyc +/usr/lib/xapi/sm/verifyVHDsOnSR.pyo +/usr/lib/xapi/sm/vhdutil.py +/usr/lib/xapi/sm/vhdutil.pyc +/usr/lib/xapi/sm/vhdutil.pyo +/usr/lib/xapi/sm/vss_control +/usr/lib/xapi/sm/xs_errors.py +/usr/lib/xapi/sm/xs_errors.pyc +/usr/lib/xapi/sm/xs_errors.pyo /sbin/mpathutil @@ -241,15 +241,17 @@ This package adds a new rawhba SR type. This SR type allows utilization of Fiber Channel raw LUNs as separate VDIs (LUN per VDI) %files rawhba -/opt/xensource/sm/RawHBASR -/opt/xensource/sm/RawHBASR.py -/opt/xensource/sm/RawHBASR.pyc -/opt/xensource/sm/RawHBASR.pyo -/opt/xensource/sm/B_util.py -/opt/xensource/sm/B_util.pyc -/opt/xensource/sm/B_util.pyo +/usr/lib/xapi/sm/RawHBASR +/usr/lib/xapi/sm/RawHBASR.py +/usr/lib/xapi/sm/RawHBASR.pyc +/usr/lib/xapi/sm/RawHBASR.pyo +/usr/lib/xapi/sm/B_util.py +/usr/lib/xapi/sm/B_util.pyc +/usr/lib/xapi/sm/B_util.pyo %changelog +* Wed Sep 11 2013 Euan Harris +- Move drivers to /usr/lib/xapi/sm * Mon Sep 09 2013 Euan Harris - Initial package From fe6689db754347331ad4c4c7b7e684cb9e4830b7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 11 Sep 2013 12:39:39 +0000 Subject: [PATCH 0380/1125] Update wizard to 0.2.20 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index ddcb0bb2..f9482882 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.19 +Version: 0.2.20 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Wed Sep 11 2013 David Scott +- Update to 0.2.20 + * Mon Sep 2 2013 David Scott - Update to 0.2.19 From e49521feb657c3d9a24a7e56158940b86118a86e Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 11 Sep 2013 12:54:40 +0000 Subject: [PATCH 0381/1125] Update xapi to 1.9.23 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c853ae9f..c2c86255 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.22 +Version: 1.9.23 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -150,6 +150,9 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog +* Wed Sep 11 2013 David Scott - 1.9.23-1 +- Can now use either 'ffs' or 'iso' for the tools SR + * Wed Sep 4 2013 David Scott - 1.9.22-1 - Query domain 0 memory policy from squeezed From 59e3d927a11444812548fdcc0296cd1fedd56499 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 11 Sep 2013 17:12:46 +0000 Subject: [PATCH 0382/1125] Another xapi Signed-off-by: David Scott --- SPECS/xapi.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c2c86255..19957cac 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.23 +Version: 1.9.24 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -150,7 +150,7 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog -* Wed Sep 11 2013 David Scott - 1.9.23-1 +* Wed Sep 11 2013 David Scott - 1.9.24-1 - Can now use either 'ffs' or 'iso' for the tools SR * Wed Sep 4 2013 David Scott - 1.9.22-1 From 180a9781eaa4f7a488abe58b703b1afa77d0e863 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 11 Sep 2013 19:40:03 +0000 Subject: [PATCH 0383/1125] Update xapi with migration hack Signed-off-by: David Scott --- SPECS/xapi.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 19957cac..f699e412 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.24 +Version: 1.9.25 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -150,7 +150,7 @@ fi /usr/lib/python2.6/site-packages/XenAPIPlugin.pyc %changelog -* Wed Sep 11 2013 David Scott - 1.9.24-1 +* Wed Sep 11 2013 David Scott - 1.9.25-1 - Can now use either 'ffs' or 'iso' for the tools SR * Wed Sep 4 2013 David Scott - 1.9.22-1 From 813702a140c37d7e16daec6f0cb18042069fd2dd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 16 Sep 2013 16:06:17 +0100 Subject: [PATCH 0384/1125] ocaml-xen-lowlevel-libs: Update to 0.9.9 with Debian linker paths Signed-off-by: Euan Harris --- SPECS/ocaml-xen-lowlevel-libs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 685f7eb4..963c9a6d 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-lowlevel-libs -Version: 0.9.8 +Version: 0.9.9 Release: 1 Summary: Xen hypercall bindings for OCaml License: LGPL @@ -57,6 +57,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner %changelog +* Mon Sep 16 2013 Euan Harris +- Update to 0.9.9, which includes linker paths required on Debian + * Fri Jun 21 2013 David Scott - Update to 0.9.2 From 723c4b583ff2abf8c2a059e8b3ee93c9b8a09942 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 16 Sep 2013 16:52:03 +0100 Subject: [PATCH 0385/1125] xenopsd: Update to 0.9.25 with Debian linker paths Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 72f36e19..db225fc1 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.24 +Version: 0.9.25 Release: 1 Summary: Simple VM manager License: LGPL @@ -178,6 +178,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Mon Sep 16 2013 Euan Harris +- Update to 0.9.25, which includes linker paths required on Debian + * Tue Sep 10 2013 David Scott - Update to 0.9.24 From a9068e630479a1e7d23d9d8a545609bb2ed44f85 Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Tue, 17 Sep 2013 11:05:43 +0100 Subject: [PATCH 0386/1125] Update README.md following rename to xenserver-core --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 392140ad..149d2997 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -xen-api-rpm-buildroot -===================== +xenserver-core +============== -RPM buildroot for xen-api and related packages. To use this, clone the -repo into ~/rpmbuild. You'll need to set up a user to run mock. +A build environment for xenserver-core: the core components of [XenServer](http://www.xenserver.org/). +It currently builds on CentOS, Fedora and other RPM-based distributions. +To use this, first clone the repo. You'll need to set up a user to run mock. Installing mock --------------- From c132526281a11f976d9298e0aa932882bd8fd37a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 18 Sep 2013 11:16:01 +0100 Subject: [PATCH 0387/1125] ocaml-syslog: Switch to OPAM's source archive The GODI URL from which we have been downloading this package seems to have gone away. Signed-off-by: Euan Harris --- SPECS/ocaml-syslog.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec index 2ab6c68c..5da3e7f3 100644 --- a/SPECS/ocaml-syslog.spec +++ b/SPECS/ocaml-syslog.spec @@ -7,7 +7,7 @@ Summary: Syslog bindings for OCaml License: LGPL Group: Development/Other URL: http://opam.ocamlpro.com/pkg/syslog.1.4.html -Source0: http://godi-backup2.camlcity.org/godi-backup/syslog-%{version}.tar.gz +Source0: http://opam.ocamlpro.com/archives/syslog.%{version}+opam.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib @@ -24,7 +24,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n syslog-%{version} +%setup -q -n syslog.%{version} %build make reallyall From d8d42095a0d4a43a1a047c9dbe3e356a0d50dc51 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 19 Sep 2013 11:13:35 +0100 Subject: [PATCH 0388/1125] xapi: Don't hard code Python site-packages installation path Signed-off-by: Euan Harris --- SPECS/xapi.spec | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index f699e412..eb7499ca 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.25 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -25,6 +25,7 @@ BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-dev BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel +BuildRequires: python2-devel Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core %description @@ -102,9 +103,9 @@ echo master > %{buildroot}/etc/xcp/pool.conf mkdir -p %{buildroot}/usr/share/xapi/packages/iso -mkdir -p %{buildroot}/usr/lib/python2.6/site-packages -install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}/usr/lib/python2.6/site-packages/ -install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}/usr/lib/python2.6/site-packages/ +mkdir -p %{buildroot}%{python_sitelib} +install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}%{python_sitelib} +install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}%{python_sitelib} %clean rm -rf %{buildroot} @@ -141,15 +142,18 @@ fi %files python-devel %defattr(-,root,root,-) -/usr/lib/python2.6/site-packages/XenAPI.py -/usr/lib/python2.6/site-packages/XenAPI.pyo -/usr/lib/python2.6/site-packages/XenAPI.pyc +%{python_sitelib}/XenAPI.py +%{python_sitelib}/XenAPI.pyo +%{python_sitelib}/XenAPI.pyc -/usr/lib/python2.6/site-packages/XenAPIPlugin.py -/usr/lib/python2.6/site-packages/XenAPIPlugin.pyo -/usr/lib/python2.6/site-packages/XenAPIPlugin.pyc +%{python_sitelib}/XenAPIPlugin.py +%{python_sitelib}/XenAPIPlugin.pyo +%{python_sitelib}/XenAPIPlugin.pyc %changelog +* Wed Sep 19 2013 Euan Harris - 1.9.25-2 +- Use %{python_sitelib} to choose Python install path, instead of hard-coding it. + * Wed Sep 11 2013 David Scott - 1.9.25-1 - Can now use either 'ffs' or 'iso' for the tools SR From f61e197b47ff0f9e59d6f87db02d3ffe308ee180 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 20 Sep 2013 12:07:20 +0100 Subject: [PATCH 0389/1125] xsconsole: Depend on the xapi-python package Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 2aa7bec7..c635965e 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -8,7 +8,7 @@ URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Provides: xsconsole0 -Requires: PyPAM +Requires: PyPAM xapi-python-devel %description Console tool for configuring a XenServer installation. From 5c01aaf443729e503ae2a337406444ff7e59da16 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 20 Sep 2013 12:43:55 +0100 Subject: [PATCH 0390/1125] xenserver-core: Don't depend on openstack-xapi-plugins Currently we package plugins for the latest stable OpenStack release. This causes problems for people who want to run a development version. We should not install this package by default, but keep it available for people who would like to install the stable OpenStack release. Signed-off-by: Euan Harris --- SPECS/xenserver-core.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 55b324de..9a0b6b93 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.9.0 -Release: 9 +Release: 10 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -11,7 +11,6 @@ Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator Requires: xenops-cli -Requires: openstack-xapi-plugins Requires: ffs xapi-libvirt-storage sm-cli xcp-sm Requires: xcp-networkd Requires: xcp-rrdd @@ -41,6 +40,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Fri Sep 20 2013 Euan Harris +- Don't install openstack-xapi-plugins with xenserver-core + * Fri Jun 21 2013 David Scott - Include xenopsd-xenlight From fa628cea8232f916addd4df984d56bc6d99488d7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 20 Sep 2013 14:04:09 +0000 Subject: [PATCH 0391/1125] Fix the install wizard, hopefully Signed-off-by: David Scott --- SPECS/squeezed.spec | 5 ++++- SPECS/xenserver-install-wizard.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 61f08dae..cc354a61 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.2 +Version: 0.10.3 Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL @@ -57,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Sep 20 2013 David Scott - 0.10.3-1 +- Update to allow minimal operation without xen + * Tue Sep 10 2013 David Scott - 0.10.2-1 - Update to new xenstore interface in v1.2.3 diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index f9482882..c4bb336e 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.20 +Version: 0.2.21 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Fri Sep 20 2013 David Scott +- Update to 0.2.21 + * Wed Sep 11 2013 David Scott - Update to 0.2.20 From 9d995abfcb0f2a7891362ddb4b4e9bed74b28f66 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 20 Sep 2013 15:08:14 +0000 Subject: [PATCH 0392/1125] Update the wizard to 0.9.22 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index c4bb336e..d53ffed7 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.21 +Version: 0.2.22 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -34,7 +34,7 @@ rm -rf %{buildroot} %changelog * Fri Sep 20 2013 David Scott -- Update to 0.2.21 +- Update to 0.2.22 * Wed Sep 11 2013 David Scott - Update to 0.2.20 From f1fdb488b12c40e7a81e95d9130ad1ef0ea635ce Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 20 Sep 2013 15:30:01 +0000 Subject: [PATCH 0393/1125] Update wizard to 0.9.23 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index d53ffed7..cc20b170 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.22 +Version: 0.2.23 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -34,7 +34,7 @@ rm -rf %{buildroot} %changelog * Fri Sep 20 2013 David Scott -- Update to 0.2.22 +- Update to 0.2.23 * Wed Sep 11 2013 David Scott - Update to 0.2.20 From 68b2d7467a168425322b5fc79c2cbc2fbf943018 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:17:02 +0000 Subject: [PATCH 0394/1125] Add vhd-tool, remove xapi dependency on libvhd Signed-off-by: David Scott --- SOURCES/vhd-tool-sparse_dd-conf | 15 +++++++++ SPECS/ocaml-nbd.spec | 9 +++-- SPECS/vhd-tool.spec | 58 +++++++++++++++++++++++++++++++++ SPECS/xapi.spec | 12 +++---- 4 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 SOURCES/vhd-tool-sparse_dd-conf create mode 100644 SPECS/vhd-tool.spec diff --git a/SOURCES/vhd-tool-sparse_dd-conf b/SOURCES/vhd-tool-sparse_dd-conf new file mode 100644 index 00000000..25f5d054 --- /dev/null +++ b/SOURCES/vhd-tool-sparse_dd-conf @@ -0,0 +1,15 @@ +# system-wide defaults for sparse_dd: used for VDI.copy and storage +# migration. + +# If true all writes will use O_DIRECT and bypass the Linux pagecache +# unbuffered = true + +# When to encrypt block data: +# always: always, even if the client requests an unencrypted transfer +# never: never, even if the client requests an encrypted transfer +# user: do what the user asks +# encryption-mode = never + +# This writes directly to the destination VHD file (when possible) +# avoiding a round-trip through tapdisk and the kernel. +# experimental-writes-bypass-tapdisk = false diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index b5182bfb..c3c22de5 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} Name: ocaml-nbd -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xapi-project/nbd -Source0: https://github.com/xapi-project/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz +URL: http://github.com/djs55/nbd +Source0: https://github.com/djs55/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib @@ -85,6 +85,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/nbd/nbd_lwt.cmi %changelog +* Mon Sep 23 2013 David Scott +- Update to 0.9.1 + * Wed May 29 2013 David Scott - Initial package diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec new file mode 100644 index 00000000..78f26d56 --- /dev/null +++ b/SPECS/vhd-tool.spec @@ -0,0 +1,58 @@ +# -*- rpm-spec -*- + +Summary: command-line tools for manipulating and streaming .vhd format files +Name: vhd-tool +Version: 0.5.0 +Release: 1 +Group: System/Hypervisor +License: LGPL+linking exception +URL: http://www.xen.org +Source0: https://github.com/djs55/ocaml-vhd/archive/%{version}/ocaml-vhd-%{version}.tar.gz +Source1: vhd-tool-sparse_dd-conf +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-nbd-devel +BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel +BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-devel git cmdliner-devel +BuildRequires: libuuid-devel make utop +BuildRequires: ocaml-xenstore-clients-devel message-switch-devel +BuildRequires: python2-devel + +%description +Simple command-line tools for manipulating and streaming .vhd format file. + +%prep +%setup -q +cp %{SOURCE1} vhd-tool-sparse_dd-conf + + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}/%{_sbindir} +install -m 0755 main.native %{buildroot}/%{_sbindir}/vhd-tool +mkdir -p %{buildroot}/%{_libexecdir} +install -m 0755 sparse_dd.native %{buildroot}/%{_libexecdir}/xapi/sparse_dd +mkdir -p %{buildroot}/etc +install -m 0755 vhd-tool-sparse_dd-conf %{buildroot}/etc/sparse_dd.conf + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_sbindir}/vhd-tool +/etc/sparse_dd.conf +%{_libexecdir}/xapi/sparse_dd + +%changelog +* Mon Sep 23 2013 David Scott - 0.5.0-1 +- Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index eb7499ca..a80a44e2 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.25 -Release: 2 +Version: 1.9.26 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -26,7 +26,7 @@ BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-bitstring-devel libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel BuildRequires: python2-devel -Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core +Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core vhd-tool %description XCP toolstack. @@ -68,7 +68,6 @@ omake phase1 omake phase2 omake ocaml/xapi/xapi omake ocaml/xe-cli/xe -omake ocaml/xapi/sparse_dd sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xen-api-xapi-conf.in > xen-api-xapi-conf @@ -85,7 +84,6 @@ mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info -install -m 0755 ocaml/xapi/sparse_dd %{buildroot}/%{_libexecdir}/xapi/sparse_dd mkdir -p %{buildroot}/etc/xapi install -m 0644 xen-api-xapi-conf %{buildroot}/etc/xapi.conf install -m 0644 xen-api-db-conf %{buildroot}/etc/xapi/db.conf @@ -128,7 +126,6 @@ fi %{_libexecdir}/xapi/xapissl %{_libexecdir}/xapi/pci-info %{_libexecdir}/xapi/update-mh-info -%{_libexecdir}/xapi/sparse_dd /etc/xapi/db.conf /etc/xapi/hook-scripts /var/lib/xapi @@ -151,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Mon Sep 23 2013 David Scott - 1.9.26-1 +- Update to 1.9.26 + * Wed Sep 19 2013 Euan Harris - 1.9.25-2 - Use %{python_sitelib} to choose Python install path, instead of hard-coding it. From 6efec95c2fa77c1adc10b46a649bf1c1cb70ba7e Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:33:13 +0000 Subject: [PATCH 0395/1125] A few fixups of the NBD spec file Signed-off-by: David Scott --- SPECS/ocaml-nbd.spec | 68 +++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index c3c22de5..552fd642 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -7,7 +7,7 @@ Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/djs55/nbd -Source0: https://github.com/djs55/nbd/archive/nbd-%{version}/nbd-%{version}.tar.gz +Source0: https://github.com/djs55/nbd/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib @@ -27,7 +27,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n nbd-nbd-%{version} +%setup -q %build if [ -x ./configure ]; then @@ -50,39 +50,47 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc ChangeLog README.markdown -%{_libdir}/ocaml/nbd/nbd_unix.cmti -%{_libdir}/ocaml/nbd/nbd_unix.cmxa -%{_libdir}/ocaml/nbd/lwt_mux.cmx -%{_libdir}/ocaml/nbd/META -%{_libdir}/ocaml/nbd/nbd.cmx -%{_libdir}/ocaml/nbd/nbd.cmo -%{_libdir}/ocaml/nbd/nbd.o -%{_libdir}/ocaml/nbd/nbd_lwt.cmx %{_libdir}/ocaml/nbd/nbd_lwt.a -%{_libdir}/ocaml/nbd/nbd_unix.cmo -%{_libdir}/ocaml/nbd/nbd.cmti -%{_libdir}/ocaml/nbd/lwt_mux.cmi -%{_libdir}/ocaml/nbd/nbd.cmi -%{_libdir}/ocaml/nbd/nbd_unix.cma -%{_libdir}/ocaml/nbd/nbd_unix.cmt %{_libdir}/ocaml/nbd/nbd_lwt.cmxa -%{_libdir}/ocaml/nbd/nbd.cmxa -%{_libdir}/ocaml/nbd/nbd.cmt -%{_libdir}/ocaml/nbd/nbd_unix.cmx -%{_libdir}/ocaml/nbd/lwt_mux.cmo -%{_libdir}/ocaml/nbd/nbd_lwt.o -%{_libdir}/ocaml/nbd/nbd.a -%{_libdir}/ocaml/nbd/nbd_unix.cmi -%{_libdir}/ocaml/nbd/nbd.cma -%{_libdir}/ocaml/nbd/nbd_lwt.cmti +%{_libdir}/ocaml/nbd/nbd_lwt_common.cmo +%{_libdir}/ocaml/nbd/nbd_lwt_server.cmi +%{_libdir}/ocaml/nbd/nbd_lwt_client.cmx +%{_libdir}/ocaml/nbd/nbd_lwt_common.cmt +%{_libdir}/ocaml/nbd/lwt_mux.cmx %{_libdir}/ocaml/nbd/lwt_mux.cmt -%{_libdir}/ocaml/nbd/nbd_unix.a +%{_libdir}/ocaml/nbd/lwt_mux.cmo %{_libdir}/ocaml/nbd/nbd_lwt.cma +%{_libdir}/ocaml/nbd/lwt_mux.cmi +%{_libdir}/ocaml/nbd/nbd_lwt_client.cmt +%{_libdir}/ocaml/nbd/nbd_lwt_server.cmo +%{_libdir}/ocaml/nbd/nbd_lwt_client.o +%{_libdir}/ocaml/nbd/nbd_lwt_server.o %{_libdir}/ocaml/nbd/lwt_mux.o -%{_libdir}/ocaml/nbd/nbd_unix.o -%{_libdir}/ocaml/nbd/nbd_lwt.cmo -%{_libdir}/ocaml/nbd/nbd_lwt.cmt -%{_libdir}/ocaml/nbd/nbd_lwt.cmi +%{_libdir}/ocaml/nbd/nbd_lwt_common.cmi +%{_libdir}/ocaml/nbd/nbd_lwt_client.cmo +%{_libdir}/ocaml/nbd/nbd_lwt_common.cmti +%{_libdir}/ocaml/nbd/nbd_lwt_client.cmi +%{_libdir}/ocaml/nbd/nbd_lwt_common.cmx +%{_libdir}/ocaml/nbd/nbd_lwt_common.o +%{_libdir}/ocaml/nbd/nbd_lwt_client.cmti +%{_libdir}/ocaml/nbd/nbd_lwt_server.cmti +%{_libdir}/ocaml/nbd/nbd_lwt_server.cmx +%{_libdir}/ocaml/nbd/nbd_lwt_server.cmt +%{_libdir}/ocaml/nbd/result.cmi +%{_libdir}/ocaml/nbd/nbd.a +%{_libdir}/ocaml/nbd/nbd.cmt +%{_libdir}/ocaml/nbd/nbd.o +%{_libdir}/ocaml/nbd/nbd.cmti +%{_libdir}/ocaml/nbd/nbd.cmo +%{_libdir}/ocaml/nbd/result.cmt +%{_libdir}/ocaml/nbd/nbd.cmxa +%{_libdir}/ocaml/nbd/nbd.cmx +%{_libdir}/ocaml/nbd/result.cmo +%{_libdir}/ocaml/nbd/result.o +%{_libdir}/ocaml/nbd/result.cmx +%{_libdir}/ocaml/nbd/nbd.cmi +%{_libdir}/ocaml/nbd/nbd.cma +%{_libdir}/ocaml/nbd/META %changelog * Mon Sep 23 2013 David Scott From 9ff7ee1e58feabbfc8b5ca38939c06eb0ff07d60 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:36:02 +0000 Subject: [PATCH 0396/1125] Of course 'ocaml-nbd' violates the naming convention Signed-off-by: David Scott --- SPECS/ocaml-nbd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 552fd642..5b6731eb 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -7,7 +7,7 @@ Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other URL: http://github.com/djs55/nbd -Source0: https://github.com/djs55/nbd/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/djs55/nbd/archive/%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib @@ -27,7 +27,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n nbd-%{version} %build if [ -x ./configure ]; then From 4368e11546fcbbaad8fd25087906d93b65a2f91a Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:38:16 +0000 Subject: [PATCH 0397/1125] nbd depends on cstruct rather than bitstring Signed-off-by: David Scott --- SPECS/ocaml-nbd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 5b6731eb..c122da4e 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -9,7 +9,7 @@ Group: Development/Other URL: http://github.com/djs55/nbd Source0: https://github.com/djs55/nbd/archive/%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-bitstring-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 +BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 Requires: ocaml ocaml-findlib %description From 3258aeb76d4a2cb12c1fe01649fcac8575411693 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:40:31 +0000 Subject: [PATCH 0398/1125] .. and cmdliner-devel Signed-off-by: David Scott --- SPECS/ocaml-nbd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index c122da4e..033f1e9e 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -9,7 +9,7 @@ Group: Development/Other URL: http://github.com/djs55/nbd Source0: https://github.com/djs55/nbd/archive/%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 +BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 cmdliner-devel Requires: ocaml ocaml-findlib %description From d6d184c85d87be254c4454f5245f304f8e6ca744 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:45:02 +0000 Subject: [PATCH 0399/1125] vhd-tool doesn't obey the naming convention either Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 78f26d56..5b986227 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -24,7 +24,7 @@ BuildRequires: python2-devel Simple command-line tools for manipulating and streaming .vhd format file. %prep -%setup -q +%setup -q -n ocaml-vhd-%{version} cp %{SOURCE1} vhd-tool-sparse_dd-conf From cc52f0fe179c8cb077416cbf360dc1f3cae75f00 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:48:10 +0000 Subject: [PATCH 0400/1125] vhd-tool requires ocaml-cstruct-devel Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 5b986227..5528ac62 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -12,7 +12,7 @@ Source1: vhd-tool-sparse_dd-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-nbd-devel +BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel From 5d59b87046618b51d02fdd353d495000bb722807 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 21:51:48 +0000 Subject: [PATCH 0401/1125] We need cstruct.lwt too Signed-off-by: David Scott --- SPECS/ocaml-cstruct.spec | 7 +++++-- SPECS/vhd-tool.spec | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 57bfce0c..102ce67a 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -1,13 +1,13 @@ Name: ocaml-cstruct Version: 0.7.1 -Release: 1 +Release: 2 Summary: Read and write low-level C-style structures in OCaml License: ISC Group: Development/Other URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel +BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel ocaml-lwt-devel Requires: ocaml ocaml-findlib ocaml-ocplib-endian-devel #XXX ocaml-cstruct should require caml-ocplib-endian, not -devel @@ -52,6 +52,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner %changelog +* Mon Sep 23 2013 David Scott +- Add dependency on lwt so the cstruct.lwt package is built + * Thu May 30 2013 David Scott - Initial package diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 5528ac62..d795624c 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -12,7 +12,7 @@ Source1: vhd-tool-sparse_dd-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel +BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel From 2c7afd1a1874fefe9c6cf89c6041b4b24de376b3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 Sep 2013 22:16:07 +0000 Subject: [PATCH 0402/1125] ocaml-cstruct: pass --enable-lwt to setup.ml Signed-off-by: David Scott --- SPECS/ocaml-cstruct.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 102ce67a..f204b92c 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -26,7 +26,7 @@ developing applications that use %{name}. %setup -q -n %{name}-%{name}-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml --enable-lwt ocaml setup.ml -build %install From d56bafa5a00f9b3a53b53e76619f3058038f59d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 24 Sep 2013 10:00:42 +0100 Subject: [PATCH 0403/1125] openstack-xapi-plugins: Add build dependency on python-setuptools Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index c47c5209..b0eb4194 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -8,6 +8,7 @@ URL: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{v Source0: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/nova-%{version}-%{release} +BuildRequires: python-setuptools %define debug_package %{nil} From d9fde89e8bf4432a8d60d48b6c5a88547243094b Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 09:00:57 +0000 Subject: [PATCH 0404/1125] ... and ocaml-oclock-devel Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index d795624c..cd6b6e02 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -15,7 +15,7 @@ BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-devel git cmdliner-devel +BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-oclock-devel BuildRequires: libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel BuildRequires: python2-devel From 6ea3716b08c8d3cbfae324726869293e9f202664 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 09:06:44 +0000 Subject: [PATCH 0405/1125] ... and openssl-devel Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index cd6b6e02..1baf10d6 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -16,9 +16,9 @@ BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-oclock-devel -BuildRequires: libuuid-devel make utop +BuildRequires: libuuid-devel BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -BuildRequires: python2-devel +BuildRequires: openssl openssl-devel %description Simple command-line tools for manipulating and streaming .vhd format file. From 333e0435c91499f380899f6ea5b217af993a6d8c Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 09:29:34 +0000 Subject: [PATCH 0406/1125] vhd-tool: correct a 'mkdir -p' Is there a lint command which could spot these mistakes? Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 1baf10d6..9d57eb33 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -39,7 +39,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -m 0755 main.native %{buildroot}/%{_sbindir}/vhd-tool -mkdir -p %{buildroot}/%{_libexecdir} +mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 sparse_dd.native %{buildroot}/%{_libexecdir}/xapi/sparse_dd mkdir -p %{buildroot}/etc install -m 0755 vhd-tool-sparse_dd-conf %{buildroot}/etc/sparse_dd.conf From 6a04f3153e3a1d0e53869ded8dea1129a2fe9b31 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 09:42:54 +0000 Subject: [PATCH 0407/1125] Update xapi to 1.9.27 Signed-off-by: David Scott --- SPECS/xapi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index a80a44e2..dbef482e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.26 +Version: 1.9.27 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,8 +148,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Mon Sep 23 2013 David Scott - 1.9.26-1 -- Update to 1.9.26 +* Tue Sep 23 2013 David Scott - 1.9.27-1 +- Update to 1.9.27 * Wed Sep 19 2013 Euan Harris - 1.9.25-2 - Use %{python_sitelib} to choose Python install path, instead of hard-coding it. From 8ab9206a8841501699014a4eab659af836a5177a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 10:17:29 +0000 Subject: [PATCH 0408/1125] Remove bitstring (everything uses Cstruct) Signed-off-by: David Scott --- SPECS/ocaml-bitstring.spec | 258 ------------------------------------- SPECS/xapi.spec | 2 +- 2 files changed, 1 insertion(+), 259 deletions(-) delete mode 100644 SPECS/ocaml-bitstring.spec diff --git a/SPECS/ocaml-bitstring.spec b/SPECS/ocaml-bitstring.spec deleted file mode 100644 index 032a8d61..00000000 --- a/SPECS/ocaml-bitstring.spec +++ /dev/null @@ -1,258 +0,0 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global debug_package %{nil} - -Name: ocaml-bitstring -Version: 2.0.4 -Release: 1%{?dist} -Summary: OCaml library for matching and constructing bitstrings - -Group: Development/Libraries -License: LGPLv2+ with exceptions and GPLv2+ - -URL: http://code.google.com/p/bitstring/ -Source0: http://bitstring.googlecode.com/files/%{name}-%{version}.tar.gz - -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel - -BuildRequires: chrpath -BuildRequires: time - -%global __ocaml_requires_opts -i Asttypes -i Parsetree -%global __ocaml_provides_opts -i Pa_bitstring - -# Upstream project used to be called ocaml-bitmatch. -# Keep these until Fedora 12. -Obsoletes: ocaml-bitmatch <= 1.9.5 -Provides: ocaml-bitmatch = %{version}-%{release} - - -%description -Bitstring adds Erlang-style bitstrings and matching over bitstrings as -a syntax extension and library for OCaml. You can use this module to -both parse and generate binary formats, for example, communications -protocols, disk formats and binary files. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -# Upstream project used to be called ocaml-bitmatch. -# Keep these until Fedora 12. -Obsoletes: ocaml-bitmatch-devel <= 1.9.5 -Provides: ocaml-bitmatch-devel = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q - -# Keep a pristine copy of the examples directory for distribution. -cp -a examples bitstring-examples - - -%build -%configure - -# Doesn't build correctly with parallel builds, or if MAKEFLAGS=-j is set. -make -j1 - -make doc -make examples - - -%check -make check - - -%install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -make install - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - -mkdir -p $RPM_BUILD_ROOT%{_bindir} - -# Install bitstring-objinfo by hand for now. -install -m 0755 bitstring-objinfo $RPM_BUILD_ROOT%{_bindir} - - -%files -%doc COPYING.LIB -%{_libdir}/ocaml/bitstring -%if %opt -%exclude %{_libdir}/ocaml/bitstring/*.a -%exclude %{_libdir}/ocaml/bitstring/*.cmxa -%exclude %{_libdir}/ocaml/bitstring/*.cmx -%endif -%exclude %{_libdir}/ocaml/bitstring/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - - -%files devel -%doc COPYING.LIB README TODO html bitstring-examples -%if %opt -%{_libdir}/ocaml/bitstring/*.a -%{_libdir}/ocaml/bitstring/*.cmxa -%{_libdir}/ocaml/bitstring/*.cmx -%endif -%{_libdir}/ocaml/bitstring/*.mli -%{_bindir}/bitstring-objinfo - - -%changelog -* Tue May 14 2013 Richard W.M. Jones - 2.0.4-1 -- New upstream version 2.0.4. -- Remove upstream patch to META file. - -* Thu Feb 14 2013 Fedora Release Engineering - 2.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Dec 02 2012 Bruno Wolff III - 2.0.3-5 -- Rebuild for ocaml 4.0.1. - -* Fri Jul 20 2012 Richard W.M. Jones - 2.0.3-4 -- Remove defattr, clean etc for modern spec file. -- Permanently remove obsolete CIL tools. -- Add upstream patch to fix META file. - -* Fri Jul 20 2012 Fedora Release Engineering - 2.0.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jun 7 2012 Richard W.M. Jones - 2.0.3-2 -- Rebuild for OCaml 4.00.0. - -* Tue Jan 17 2012 Richard W.M. Jones - 2.0.3-1 -- New upstream version 2.0.3. - -* Fri Jan 06 2012 Richard W.M. Jones - 2.0.2-4 -- Rebuild for OCaml 3.12.1. - -* Tue Feb 08 2011 Fedora Release Engineering - 2.0.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jan 06 2011 Richard W.M. Jones - 2.0.2-2 -- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). - -* Fri Jan 8 2010 Richard W.M. Jones - 2.0.2-1 -- New upstream version 2.0.2. -- Remove the two patches which are now upstream. -- Replace %%define with %%global. -- Use upstream RPM 4.8 OCaml dependency generator. -- Recheck package with rpmlint. - -* Wed Dec 30 2009 Richard W.M. Jones - 2.0.0-11 -- Rebuild for OCaml 3.11.2. - -* Sat Jul 25 2009 Fedora Release Engineering - 2.0.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sat May 23 2009 Richard W.M. Jones - 2.0.0-9 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Wed Feb 25 2009 Fedora Release Engineering - 2.0.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Dec 5 2008 Richard W.M. Jones - 2.0.0-7 -- Patch for OCaml 3.11.0 official. - -* Thu Dec 4 2008 Richard W.M. Jones - 2.0.0-6 -- Rebuild. - -* Thu Nov 20 2008 Richard W.M. Jones - 2.0.0-5 -- Disable CIL tools. -- Patch for OCaml 3.11.0. - -* Wed Nov 19 2008 Richard W.M. Jones - 2.0.0-3 -- Rebuild for OCaml 3.11.0 - -* Tue Oct 21 2008 Richard W.M. Jones - 2.0.0-2 -- Fixed incorrect sources file. - -* Mon Oct 20 2008 Richard W.M. Jones - 2.0.0-1 -- Upstream released 2.0.0, requires OCaml 3.10.2 to compile. - -* Tue Aug 26 2008 Richard W.M. Jones - 1.9.8-3 -- +BR time. - -* Tue Aug 26 2008 Richard W.M. Jones - 1.9.8-2 -- New upstream release 1.9.8. -- Add *.so* files. - -* Thu Jul 17 2008 Richard W.M. Jones - 1.9.7-1 -- New upstream release 1.9.7. -- Project renamed from ocaml-bitmatch to ocaml-bitstring. - -* Fri Jul 11 2008 Richard W.M. Jones - 1.9.5-1 -- New upstream release 1.9.5. -- Clarify that the programs have GPL license. -- Ship bitmatch-objinfo program. - -* Fri Jul 4 2008 Richard W.M. Jones - 1.9.4-1 -- New upstream release 1.9.4. - -* Fri Jul 4 2008 Richard W.M. Jones - 1.9.3-2 -- New upstream release 1.9.3. -- Don't build CIL tools unless we have CIL. - -* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-3 -- +BR ocaml-extlib-devel. - -* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-2 -- Force rebuild, forgot sources first time. - -* Tue Jul 1 2008 Richard W.M. Jones - 1.9.2-1 -- New upstream release 1.9.2. -- Include C tools (requiring CIL) in a separate subpackage. - -* Wed May 21 2008 Richard W.M. Jones - 1.3-1 -- New upstream release 1.3. - -* Sun May 18 2008 Richard W.M. Jones - 1.2-1 -- New upstream release 1.2. -- Build and distribute the examples. -- Distribute the TODO file. - -* Sun May 18 2008 Richard W.M. Jones - 1.0-3 -- New upstream release 1.0. -- New upstream URL and download location. -- Use RPM percent-configure in build section. - -* Mon May 12 2008 Richard W.M. Jones - 0.9-1 -- New upstream release 0.9. - -* Thu May 8 2008 Richard W.M. Jones - 0.8-1 -- New upstream release 0.8. - -* Wed May 7 2008 Richard W.M. Jones - 0.7-3 -- New upstream release 0.7. - -* Fri Apr 25 2008 Richard W.M. Jones - 0.6-1 -- New upstream release 0.6. - -* Fri Apr 25 2008 Richard W.M. Jones - 0.5-1 -- New upstream release 0.5. - -* Fri Apr 16 2008 Richard W.M. Jones - 0.4-1 -- New upstream release 0.4. - -* Fri Apr 2 2008 Richard W.M. Jones - 0.2-1 -- Initial RPM release. diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index dbef482e..ad672d0b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -23,7 +23,7 @@ BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel -BuildRequires: ocaml-bitstring-devel libuuid-devel make utop +BuildRequires: libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel BuildRequires: python2-devel Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core vhd-tool From 7cdcacad24c660100a912b5e931c558e1d0c8480 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 10:18:07 +0000 Subject: [PATCH 0409/1125] bump xapi release post removing bitstring Signed-off-by: David Scott --- SPECS/xapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index ad672d0b..98d41ef4 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi Version: 1.9.27 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org From 74ddbafc444a830cd68716997170d967a85d688d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 10:30:56 +0000 Subject: [PATCH 0410/1125] Update xenopsd to 0.9.26 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index db225fc1..37b37a3d 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.25 +Version: 0.9.26 Release: 1 Summary: Simple VM manager License: LGPL @@ -86,6 +86,7 @@ install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif +install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script @@ -109,6 +110,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md LICENSE %{_libexecdir}/%{name}/vif +%{_libexecdir}/%{name}/vif-real %{_libexecdir}/%{name}/vif-xl %{_libexecdir}/%{name}/qemu-dm-wrapper %{_libexecdir}/%{name}/qemu-vif-script @@ -178,6 +180,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Sep 23 2013 David Scott +- Update to 0.9.26, which includes fixes for networking and libxl + * Mon Sep 16 2013 Euan Harris - Update to 0.9.25, which includes linker paths required on Debian From 948783751ffa48e1f8c527192faa6d7f866002b8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 24 Sep 2013 13:23:28 +0100 Subject: [PATCH 0411/1125] xapi: Update changelog for 1.9.27-2 Signed-off-by: Euan Harris --- SPECS/xapi.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 98d41ef4..5902b9fe 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Tue Sep 23 2013 David Scott - 1.9.27-2 +- Remove dependency on ocaml-bitstring + * Tue Sep 23 2013 David Scott - 1.9.27-1 - Update to 1.9.27 @@ -178,8 +181,3 @@ fi * Wed Jun 5 2013 David Scott - 1.9.1-1 - Initial package - - - - - From e521ee41a057303d04bdd76e38599d9b56fc701d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 24 Sep 2013 15:26:16 +0100 Subject: [PATCH 0412/1125] Disable direct running of 'udev' scripts in xenopsd Works around djs55/xenopsd#45 Signed-off-by: David Scott --- SOURCES/xenopsd-conf.in | 4 ++++ SPECS/xenopsd.spec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SOURCES/xenopsd-conf.in b/SOURCES/xenopsd-conf.in index ed82dc2e..ff3cb17f 100755 --- a/SOURCES/xenopsd-conf.in +++ b/SOURCES/xenopsd-conf.in @@ -19,3 +19,7 @@ sockets-group=wheel vncterm=/usr/bin/vncterm eliloader=/usr/sbin/eliloader + +# Workaround xenopsd bug #45 +run_hotplug_scripts=false + diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 37b37a3d..5c685483 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.26 -Release: 1 +Release: 2 Summary: Simple VM manager License: LGPL Group: Development/Other From 203f652f58abb2215fa51bfd58f4210cae7d9605 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 24 Sep 2013 16:04:30 +0100 Subject: [PATCH 0413/1125] ocaml-tapctl: Add runtime dependency on forkexecd This change adds a dependency on forkexecd-devel, but the required files should probably be in the forkexecd base package. Signed-off-by: Euan Harris --- SPECS/ocaml-tapctl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index b5cc58dc..0940388d 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -11,7 +11,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel # required by forkexecd BuildRequires: ocaml-syslog-devel -Requires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib forkexecd-devel %description Manipulate running tapdisk instances on a xen host. From 1c4a78a19e32abc1bc40d93fa24752d87530e2b8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 09:38:01 +0100 Subject: [PATCH 0414/1125] ocaml-re: Don't build a debuginfo package Signed-off-by: Euan Harris --- SPECS/ocaml-re.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 6c830bcf..d1c846ba 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-re Version: 1.2.1 Release: 1 From fcec2a8bf43d3efdcdc00244d23d8b0b1ba3c19d Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 13:54:31 +0000 Subject: [PATCH 0415/1125] xenopsd-xc: currently we always use blktap and blkback so modprobe them Fixes xapi-project/xenserver-core#219 Signed-off-by: David Scott --- SOURCES/xenopsd-xc-init | 2 ++ SPECS/xenopsd.spec | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 01f87363..55a68c0b 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -40,6 +40,8 @@ start() { umask 077 + modprobe blktap 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blktap: vhd-based disks will not work" + modprobe blkback 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blkback: virtual disks will not work" echo -n $"Starting xenopsd-xc: " start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XC_OPTIONS RETVAL=$? diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 5c685483..9332ac1a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.26 -Release: 2 +Release: 3 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -180,6 +180,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 24 2013 David Scott +- modprobe blk{tap,back} in the xenopsd-xc init.d script since + we need these to make virtual disks work + * Tue Sep 23 2013 David Scott - Update to 0.9.26, which includes fixes for networking and libxl From 327e82cdf2b31115e90475c27a161a46e4e9e7c0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 14:30:10 +0000 Subject: [PATCH 0416/1125] Update the wizard to 0.9.24, the version with the hacks in Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index cc20b170..aa69de67 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.23 +Version: 0.2.24 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.2.24 + * Fri Sep 20 2013 David Scott - Update to 0.2.23 From 8c26db2e7127a916f7850aa72475096ff33efda4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 14:46:07 +0000 Subject: [PATCH 0417/1125] Add xcp-idl 0.9.13. We can now rely on $PATH searching behaviour in config files. Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 922f4ab4..f690386a 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,5 +1,5 @@ Name: ocaml-xcp-idl -Version: 0.9.12 +Version: 0.9.13 Release: 1 Summary: Common interface definitions for XCP services License: LGPL @@ -61,6 +61,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp/* %changelog +* Wed Sep 25 2013 David Scott +- Logging, channel passing and interface updates + * Wed Sep 04 2013 David Scott - 0.9.12-1 - Allow domain 0 memory policy to be queried From 336cd5261cf7df6be89dbc95ceae27e19e5fc64b Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:01:32 +0000 Subject: [PATCH 0418/1125] Update xcp-rrdd to 0.9.2 Signed-off-by: David Scott --- SPECS/xcp-rrdd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 16c74cd1..bb028484 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,5 +1,5 @@ Name: xcp-rrdd -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Statistics gathering daemon for the xapi toolstack License: LGPL @@ -54,6 +54,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.2 + * Tue Sep 10 2013 David Scott - Update to 0.9.1 From 5bf2832a40f4c17bfad733bed444c307f7fb8fd0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:15:55 +0000 Subject: [PATCH 0419/1125] Update xcp-networkd to 0.9.3 Signed-off-by: David Scott --- SOURCES/xcp-networkd-conf | 3 ++- SPECS/xcp-networkd.spec | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SOURCES/xcp-networkd-conf b/SOURCES/xcp-networkd-conf index efa12c78..2374fbdc 100644 --- a/SOURCES/xcp-networkd-conf +++ b/SOURCES/xcp-networkd-conf @@ -1,2 +1,3 @@ -brctl=/usr/sbin/brctl +# Search for brctl on the PATH +brctl=brctl diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index d6c0c1ba..804c9df2 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,6 +1,6 @@ Name: xcp-networkd -Version: 0.9.2 -Release: 2 +Version: 0.9.3 +Release: 1 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other @@ -67,6 +67,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.3 + * Wed Aug 28 2013 David Scott - When loading the bridge module, prevent guest traffic being processed by the domain 0 firewall From 3b4ca955aeaf48b35506cabbb1b46667f2deceb5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 7 Aug 2013 10:42:15 +0100 Subject: [PATCH 0420/1125] makedeb: Start modifications to build Debian packages Includes changes to configure.sh to make make it use pbuilder instead of mock. Signed-off-by: Euan Harris --- D05deps.in | 3 + configure.sh | 18 ++- makedeb.py | 415 ++++++++++++++++++++++++++++++++++++++++++++++++++ pbuilderrc.in | 9 ++ 4 files changed, 444 insertions(+), 1 deletion(-) create mode 100644 D05deps.in create mode 100755 makedeb.py create mode 100644 pbuilderrc.in diff --git a/D05deps.in b/D05deps.in new file mode 100644 index 00000000..e4886e7e --- /dev/null +++ b/D05deps.in @@ -0,0 +1,3 @@ +#!/bin/sh +(cd @PWD@/RPMS; apt-ftparchive packages . > Packages) +apt-get update diff --git a/configure.sh b/configure.sh index 63ab9007..2910d6de 100755 --- a/configure.sh +++ b/configure.sh @@ -2,7 +2,7 @@ echo -n "Writing mock configuration..." mkdir -p mock -sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg +sed "s|@PWD@|$PWD|g" xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ @@ -13,3 +13,19 @@ mkdir -p RPMS createrepo --quiet RPMS echo " done" +mkdir -p pbuilder + +ARCH=amd64 +BASETGZ=/var/cache/pbuilder/base-$ARCH.tgz + +sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" pbuilderrc.in > pbuilder/pbuilderrc-$ARCH +sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps +chmod 755 pbuilder/D05deps + +if [ -f $BASETGZ ] ; then + echo $BASETGZ exists - updating + sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$ARCH +else + echo $BASETGZ exists - creating + sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$ARCH +fi diff --git a/makedeb.py b/makedeb.py new file mode 100755 index 00000000..9f645ba4 --- /dev/null +++ b/makedeb.py @@ -0,0 +1,415 @@ +#!/usr/bin/python + +import rpm +import os +import urlparse +import sys +import textwrap +import time +import re +import magic +import shutil +import subprocess +import shlex +import glob + +# BUGS: +# Code is a mess +# Hack to disable CFLAGS for ocaml-oclock +# Hack to disable tests for ocaml-oclock +# Hard coded install files only install ocaml dir + + +# By default, RPM expects everything to be in $HOME/rpmbuild. +rpm.addMacro( '_topdir', os.getcwd() ) + + +# Directories where rpmbuild/mock expects to find inputs +# and writes outputs +top_dir = rpm.expandMacro( '%_topdir' ) +rpm_dir = rpm.expandMacro( '%_rpmdir' ) +spec_dir = rpm.expandMacro( '%_specdir' ) +srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) +src_dir = rpm.expandMacro( '%_sourcedir' ) +build_dir = rpm.expandMacro( '%_builddir' ) + + +# Override some macros interpolated into build rules, so +# paths are appropriate for debuild +# (Actually, using {}, not (), because these identifiers +# end up in helper scripts, not in the makefile +rpm.addMacro( "buildroot", "${DESTDIR}" ) +rpm.addMacro( "_libdir", "${STDLIBDIR}" ) + + +def specFromFile(spec): + return rpm.ts().parseSpec(spec) + + +STANDARDS_VERSION = "3.9.3" + + +# Patches can be added to debian/patches, with a series file +# Files copied into this directory have to be added using dpkg-source --commit +# (possibly just initialize quilt in that directory and add them as we copy them) +# We can just use dpkg-source -b --auto-commit + + +def mapPackageBaseName(name): + """rewrite an rpm name to fit with debian standards""" + # Debian puts the language name after the library name + # whereas Fedora puts it before + if name.startswith( "ocaml-" ): + name = name[ len("ocaml-"): ] + "-ocaml" + + return name + + +def mapPackageName(hdr): + """rewrite an rpm name to fit with debian standards""" + name = hdr['name'] + # XXX UGLY + + # Debian adds a -dev suffix to development packages, + # whereas Fedora uses -devel + isDevel = False + if name.endswith( "-devel" ): + isDevel = True + name = name[ :-len("-devel") ] + + name = mapPackageBaseName(name) + + # Debian prefixes library packag names with 'lib' + if "Libraries" in hdr['group']: + name = "lib" + name + if isDevel: + name += "-dev" + + return name + + +def mapPackage(rpm_name): + """map an rpm to a corresponding deb, based on file contents""" + # XXXXX + if rpm_name == "ocaml": + return "ocaml-nox" + if rpm_name == "ocaml-findlib-devel": + return "ocaml-findlib" + if rpm_name == "ocaml-findlib": + return "ocaml-findlib" + if rpm_name == "ocaml-ocamldoc": + return "ocaml-nox" + if rpm_name == "ocaml-re-devel": + return "re-ocaml-dev" + print "unrecognized package: %s" % rpm_name + assert False + + +def mapSection(rpm_name): + return "ocaml" # XXXXX + + +def formatDescription(description): + """need to format this - correct line length, initial one space indent, + and blank lines must be replaced by dots""" + + paragraphs = "".join(description).split("\n\n") + wrapped = [ "\n".join(textwrap.wrap( p, initial_indent=" ", + subsequent_indent=" ")) + for p in paragraphs ] + return "\n .\n".join( wrapped ) + + +def sourceDebFromSpec(spec): + res = "" + res += "Source: %s\n" % spec.sourceHeader['name'] #XXX should this be mapped? + res += "Priority: %s\n" % "optional" + res += "Maintainer: %s\n" % "Euan Harris " #XXX + res += "Section: %s\n" % mapSection(spec.sourceHeader['group']) + res += "Standards-Version: %s\n" % STANDARDS_VERSION + res += "Build-Depends:\n" + build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)" ] + for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): + dep = mapPackage(pkg) + if version: + dep += " (>= %s)" % version + build_depends.append(dep) + res += ",\n".join( set([" %s" % d for d in build_depends])) + res += "\n" + return res + + +def binaryDebFromSpec(spec): + res = "" + res += "Package: %s\n" % mapPackageName(spec.header) + res += "Architecture: any\n" # XXXX % spec.header['arch'] + res += "Depends:\n" + depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] + depends += [mapPackage(r) for r in spec.header['requires']] + res += ",\n".join( [ " %s" % d for d in depends ] ) + res += "\n" + res += "Provides: ${ocaml:Provides}\n" # XXXX only for ocaml! + res += "Recommends: ocaml-findlib\n" # XXXX + res += "Description: %s\n" % spec.header['summary'] + res += formatDescription( spec.header['description'] ) + res += "\n" + return res + + +def debianControlFromSpec(spec): + res = "" + res += sourceDebFromSpec(spec) + for pkg in spec.packages: + res += "\n" + res += binaryDebFromSpec(pkg) + return res + + +def ocamlRulesPreamble(): + return """#!/usr/bin/make -f +#include /usr/share/cdbs/1/rules/debhelper.mk +#include /usr/share/cdbs/1/class/makefile.mk +#include /usr/share/cdbs/1/rules/ocaml.mk + +export DH_VERBOSE=1 +export DH_OPTIONS + +export DESTDIR=$(CURDIR)/debian/tmp + +%: +\tdh $@ --with ocaml + +""" + + +def debianRulesFromSpec(spec, path): + res = "" + res += ocamlRulesPreamble() + res += debianRulesConfigureFromSpec(spec) + res += debianRulesBuildFromSpec(spec, path) + res += debianRulesInstallFromSpec(spec, path) + res += debianRulesCleanFromSpec(spec, path) + res += debianRulesTestFromSpec(spec, path) + return res + + +# RPM doesn't have a configure target - everything happens in the build target +def debianRulesConfigureFromSpec(spec): +# return """.PHONY: override_dh_auto_configure +#override_dh_auto_configure: +#\tocaml setup.ml -configure --destdir $(DESTDIR)/$(OCAML_STDLIB_DIR) +# +#""" + return "" + + +def debianRulesBuildFromSpec(spec, path): + # RPM's build script is just a script which is run at the appropriate time. + # debian/rules is a Makefile. Makefile recipes aren't shell scripts - each + # line is run independently, so exports don't survive from line to line and + # multi-line constructions such as if statements don't work. + # Tried wrapping everything in a $(shell ...) function, but that didn't work. + # Just write the script fragment into a helper script in the debian directory. + # This almost certainly violates a Debian packaging guideline... + # ...we could write them to temporary files as the makefile is evaluated... + # this sub-script business unfortunately means that variables from the makefile + # aren't passed through + # Hurray, the .ONESHELL special target may save us + + rule = ".PHONY: override_dh_auto_build\n" + rule += "override_dh_auto_build:\n" + rule += "\tdebian/build.sh\n" + rule += "\n" + with open(os.path.join(path, "debian/build.sh"), "w") as f: + helper = "#!/bin/sh\n" + helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock + helper += spec.build + f.write(helper) + os.chmod(os.path.join(path, "debian/build.sh"), 0o755) + return rule + + +def debianRulesInstallFromSpec(spec, path): + rule = ".PHONY: override_dh_auto_install\n" + rule += "override_dh_auto_install:\n" + rule += "\tdebian/install.sh\n" + rule += "\n" + with open(os.path.join(path, "debian/install.sh"), "w") as f: + f.write("#!/bin/sh\n" + spec.install) + os.chmod(os.path.join(path, "debian/install.sh"), 0o755) + return rule + + +def debianRulesTestFromSpec(spec, path): + # XXX HACK for ocaml-oclock - don't try to run the tests when building + rule = ".PHONY: override_dh_auto_test\n" + rule += "override_dh_auto_test:\n" + return rule + + +def debianRulesCleanFromSpec(spec, path): + rule = ".PHONY: override_dh_auto_clean\n" + rule += "override_dh_auto_clean:\n" + rule += "\tdebian/clean.sh\n" + rule += re.sub("^", "\t", spec.clean.strip(), flags=re.MULTILINE) + rule += "\n" + with open(os.path.join(path, "debian/clean.sh"), "w") as f: + f.write("#!/bin/sh\n" + spec.clean) + os.chmod(os.path.join(path, "debian/clean.sh"), 0o755) + return rule + + +def debianChangelogFromSpec(spec): + hdr = spec.sourceHeader + res = "" + for (name, timestamp, text) in zip(hdr['changelogname'], hdr['changelogtime'], hdr['changelogtext']): + + # Most spec files have "First Last - version" + # Some of ours have "First Last " only for the first entry - could + # be a mistake. For these, us the version from the spec. + m = re.match( "^(.+) - (\S+)$", name ) + if m: + author = m.group(1) + version = m.group(2) + else: + author = name + version = spec.sourceHeader['version'] + + res += "%s (%s) UNRELEASED; urgency=low\n" % (hdr['name'], version) + res += "\n" + text = re.sub( "^-", "*", text, flags=re.MULTILINE ) + text = re.sub( "^", " ", text, flags=re.MULTILINE ) + res += "%s\n" % text + res += "\n" + res += " -- %s %s\n" % (author, time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime(int(timestamp)))) + res += "\n" + return res + + +def debianFilesFromPkg(pkg): + # should be able to build this from the files sections - can't find how + # to get at them from the spec object + res = "" + res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific + return res + + +def debianFilelistsFromSpec(spec, path): + for pkg in spec.packages: + name = "%s.install.in" % mapPackageName(pkg.header) + with open( os.path.join(path, "debian/%s") % name, "w" ) as f: + f.write( debianFilesFromPkg(pkg) ) + +def debianPatchesFromSpec(spec, path): + patches = [(seq, name) for (name, seq, typ) in spec.sources + if typ == 2] + patches = [name for (seq,name) in sorted(patches)] + if patches: + os.mkdir(os.path.join(path, "debian/patches")) + for patch in patches: + shutil.copy2(os.path.join(src_dir, patch), os.path.join(path, "debian/patches")) + with open( os.path.join(path, "debian/patches/series"), "a" ) as f: + f.write("%s\n" % patch) + + + +def debianDirFromSpec(spec, path): + os.makedirs( os.path.join(path, "debian/source") ) + + with open( os.path.join(path, "debian/control"), "w" ) as control: + control.write(debianControlFromSpec(spec)) + + with open( os.path.join(path, "debian/rules"), "w" ) as rules: + rules.write(debianRulesFromSpec(spec, path)) + os.chmod( os.path.join(path, "debian/rules"), 0o755 ) + + with open( os.path.join(path, "debian/compat"), "w" ) as compat: + compat.write("8\n") + + with open( os.path.join(path, "debian/source/format"), "w" ) as format: + format.write("3.0 (quilt)\n") + + with open( os.path.join(path, "debian/copyright"), "w" ) as copyright: + copyright.write("FIXME") + + with open( os.path.join(path, "debian/changelog"), "w" ) as changelog: + changelog.write(debianChangelogFromSpec(spec)) + + debianFilelistsFromSpec(spec, path) + debianPatchesFromSpec(spec, path) + +def principalSourceFile(spec): + return os.path.basename([name for (name, seq, type) in spec.sources + if seq == 0 and type == 1][0]) + +def prepareBuildDir(spec): + # To prepare the build dir, RPM cds into $TOPDIR/BUILD + # and expands all paths in the prep script with $TOPDIR. + # It unpacks the tarball and then cds into the directory it + # creates before applying patches. + # $TOPDIR should be an absolute path to the top RPM build + # directory, not a relative path, so that references to SOURCES + # expand to reachable paths inside the source tree (getting the + # tarball from ../SOURCES works in the outer BUILD dir, but getting + # patches from ../SOURCES doesn't work when we have cd'ed into the + # source tree. + + subprocess.call(spec.prep, shell=True) + + +def renameSource(spec): + # Debian source package name should probably match the tarball name + origfilename = principalSourceFile(spec) + if origfilename.endswith(".tbz"): + filename = origfilename[:-len(".tbz")] + ".tar.bz2" + else: + filename = origfilename + m = re.match( "^(.+)(\.tar\.(gz|bz2|lzma|xz))", filename ) + if not m: + print "error: could not parse filename %s" % filename + basename, ext = m.groups()[:2] + baseFileName = "%s_%s.orig%s" % (spec.sourceHeader['name'], spec.sourceHeader['version'], ext) + shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) + +# Instead of writing to all these files, we could just accumulate +# everything in a dictionary of path -> (content, perms) and then +# write the files at the end. + +if __name__ == '__main__': + shutil.rmtree(build_dir) #XXX + os.mkdir(build_dir) + spec = specFromFile(sys.argv[1]) + + # subdirectory of builddir in which the tarball is unpacked; + # set by RPM after processing the spec file + build_subdir = rpm.expandMacro("%buildsubdir") + prepareBuildDir(spec) + + tarball = principalSourceFile(spec) + + # copy over the source, run the prep rule to unpack it, then rename it as deb expects + renameSource(spec) + + debianDirFromSpec(spec, os.path.join(build_dir, build_subdir)) + + # pdebuild gives us source debs as well as binaries + #res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) + res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) + assert res == 0 + shutil.rmtree(os.path.join(build_dir, build_subdir)) + for i in glob.glob(os.path.join(build_dir, "*")): + shutil.copy2(i, srpm_dir) #XXX + os.unlink(i) + + # at this point we have a debian source package (at least 3 files) in SRPMS + # to build it: + # (first time: pbuilder --create) + # dpkg-source -x SRPMS/ocaml-react-0.9.4.dsc + # cd ocaml-react-0.9.4 + # pdebuild --config pbuilder/pbuilder.cfg --buildresult DEBS (can we set up groups to avoid the sudo password prompt?) + # + # to build for arm: + # pbuilder --create --distribution raring --architecture armhf --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz + # pdebuild -- --distribution raring --architecture armhf --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz + + diff --git a/pbuilderrc.in b/pbuilderrc.in new file mode 100644 index 00000000..1c747917 --- /dev/null +++ b/pbuilderrc.in @@ -0,0 +1,9 @@ +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://ppa.launchpad.net/mike-mcclurg/ocaml/ubuntu precise main" +BINDMOUNTS="@PWD@/RPMS" +HOOKDIR="@PWD@/pbuilder" +EXTRAPACKAGES="apt-utils" +ALLOWUNTRUSTED=yes + +# Architecture specific settings +ARCHITECTURE=@ARCH@ +BASETGZ=@BASETGZ@ From 872fa644fb1028d25148fd93106c61e0d30eac8f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 13:28:53 +0100 Subject: [PATCH 0421/1125] makedeb: Extract additional information from spec file The Python RPM library doesn't give us all the information we need from a spec file, such as the list of file contents, so we must read these directly from the spec file. Don't really want to write a full spec file parser, but this may be necessary to deal with conditionals in more complex files. Signed-off-by: Euan Harris --- makedeb.py | 139 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 115 insertions(+), 24 deletions(-) diff --git a/makedeb.py b/makedeb.py index 9f645ba4..13ddf5be 100755 --- a/makedeb.py +++ b/makedeb.py @@ -18,6 +18,8 @@ # Hack to disable CFLAGS for ocaml-oclock # Hack to disable tests for ocaml-oclock # Hard coded install files only install ocaml dir +# Should be building signed debs +# mapPackageName needs to return a list of packages, and to understand version numbers # By default, RPM expects everything to be in $HOME/rpmbuild. @@ -77,32 +79,45 @@ def mapPackageName(hdr): isDevel = True name = name[ :-len("-devel") ] - name = mapPackageBaseName(name) + #name = mapPackageBaseName(name) # Debian prefixes library packag names with 'lib' - if "Libraries" in hdr['group']: - name = "lib" + name + #if "Libraries" in hdr['group'] or "library" in hdr['summary'].lower(): + # name = "lib" + name + + # Do this manually for now... + mapping = { + "ocaml-re": "libre-ocaml" , + "ocaml-uri": "liburi-ocaml" , + } + + name = name.replace( name, mapping[name] ) + if isDevel: name += "-dev" - return name def mapPackage(rpm_name): """map an rpm to a corresponding deb, based on file contents""" # XXXXX - if rpm_name == "ocaml": - return "ocaml-nox" - if rpm_name == "ocaml-findlib-devel": - return "ocaml-findlib" - if rpm_name == "ocaml-findlib": - return "ocaml-findlib" - if rpm_name == "ocaml-ocamldoc": - return "ocaml-nox" - if rpm_name == "ocaml-re-devel": - return "re-ocaml-dev" - print "unrecognized package: %s" % rpm_name - assert False + mapping = { + "ocaml-re": "libre-ocaml" , + "ocaml-uri": "liburi-ocaml" , + "ocaml": "ocaml-nox", + "ocaml-findlib-devel": "ocaml-findlib", + "ocaml-findlib": "ocaml-findlib", + "ocaml-ocamldoc": "ocaml-nox", + "ocaml-re-devel": "libre-ocaml-dev", + "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? + "ocaml-compiler-libs", + } + + if not mapping.has_key(rpm_name): + print "unrecognized package: %s" % rpm_name + sys.exit(1) + + return mapping[rpm_name] def mapSection(rpm_name): @@ -286,19 +301,30 @@ def debianChangelogFromSpec(spec): return res -def debianFilesFromPkg(pkg): +def debianFilesFromPkg(basename, pkg, specpath): # should be able to build this from the files sections - can't find how # to get at them from the spec object res = "" - res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific + #res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific + files = filesFromSpec(basename, specpath) + for l in files.get(pkg.header['name'], []): + rpm.addMacro("_libdir", "") + src = rpm.expandMacro(l).lstrip("/") # deb just wants relative paths + rpm.delMacro("_libdir") + rpm.addMacro("_libdir", "/usr/lib") + dst = rpm.expandMacro(l) + if dst.endswith("/*"): + dst = dst[:-len("/*")] + rpm.delMacro("_libdir") + res += "%s %s\n" % (src, dst) return res -def debianFilelistsFromSpec(spec, path): +def debianFilelistsFromSpec(spec, path, specpath): for pkg in spec.packages: name = "%s.install.in" % mapPackageName(pkg.header) with open( os.path.join(path, "debian/%s") % name, "w" ) as f: - f.write( debianFilesFromPkg(pkg) ) + f.write( debianFilesFromPkg(spec.sourceHeader['name'], pkg, specpath) ) def debianPatchesFromSpec(spec, path): patches = [(seq, name) for (name, seq, typ) in spec.sources @@ -313,7 +339,7 @@ def debianPatchesFromSpec(spec, path): -def debianDirFromSpec(spec, path): +def debianDirFromSpec(spec, path, specpath): os.makedirs( os.path.join(path, "debian/source") ) with open( os.path.join(path, "debian/control"), "w" ) as control: @@ -335,7 +361,7 @@ def debianDirFromSpec(spec, path): with open( os.path.join(path, "debian/changelog"), "w" ) as changelog: changelog.write(debianChangelogFromSpec(spec)) - debianFilelistsFromSpec(spec, path) + debianFilelistsFromSpec(spec, path, specpath) debianPatchesFromSpec(spec, path) def principalSourceFile(spec): @@ -355,6 +381,7 @@ def prepareBuildDir(spec): # source tree. subprocess.call(spec.prep, shell=True) + # could also just do: RPMBUILD_PREP = 1<<0; spec._doBuild() def renameSource(spec): @@ -371,6 +398,70 @@ def renameSource(spec): baseFileName = "%s_%s.orig%s" % (spec.sourceHeader['name'], spec.sourceHeader['version'], ext) shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) + +def filesFromSpec(basename, specpath): + """The RPM library doesn't seem to give us access to the files section, + so we need to go and get it ourselves. This parsing algorithm is + based on build/parseFiles.c in RPM. The list of section titles + comes from build/parseSpec.c. We should get this by using ctypes + to load the rpm library.""" + """XXX shouldn't be parsing this by hand. will need to handle conditionals + within and surrounding files and packages sections.""" + + #XXX Why do we need the .install.in files? + + otherparts = [ + "%package", + "%prep", + "%build", + "%install", + "%check", + "%clean", + "%preun", + "%postun", + "%pretrans", + "%posttrans", + "%pre", + "%post", + "%changelog", + "%description", + "%triggerpostun", + "%triggerprein", + "%triggerun", + "%triggerin", + "%trigger", + "%verifyscript", + "%sepolicy", + ] + + files = {} + with open(specpath) as spec: + inFiles = False + section = "" + for line in spec: + tokens = line.lower().strip().split(" ") + if tokens and tokens[0] == "%files": + inFiles = True + if len(tokens) > 1: + section = basename + "-" + tokens[1] + continue + + if tokens and tokens[0] in otherparts: + inFiles = False + + if inFiles: + if tokens[0].startswith("%defattr"): + continue + if tokens[0] == "%doc": + docsection = section + "-doc" + files[docsection] = files.get(docsection, []) + tokens[1:] + continue + if line.strip(): + files[section] = files.get(section, []) + [line.strip()] + return files + + + # Instead of writing to all these files, we could just accumulate # everything in a dictionary of path -> (content, perms) and then # write the files at the end. @@ -390,8 +481,8 @@ def renameSource(spec): # copy over the source, run the prep rule to unpack it, then rename it as deb expects renameSource(spec) - debianDirFromSpec(spec, os.path.join(build_dir, build_subdir)) - + debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1]) + # pdebuild gives us source debs as well as binaries #res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) From 6ffb7568963d31646f189ff42f0923657f628545 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 13:29:17 +0100 Subject: [PATCH 0422/1125] ocaml-uri: Specify required OCaml version Signed-off-by: Euan Harris --- SPECS/ocaml-uri.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index a48befa8..33c36e63 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -7,8 +7,8 @@ Group: Development/Other URL: https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-re-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml >= 4.00, ocaml-findlib, ocaml-ocamldoc, ocaml-re-devel, ocaml-compiler-libs +Requires: ocaml, ocaml-findlib %description A URI library for OCaml. From ca9b812ec2cdfb416892df01546cfe3ed4550569 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 12 Aug 2013 12:16:59 +0100 Subject: [PATCH 0423/1125] makemake: Generate a Makefile that builds debs instead of RPMS Signed-off-by: Euan Harris --- makemake.py | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/makemake.py b/makemake.py index 7e494014..e4fc73ee 100755 --- a/makemake.py +++ b/makemake.py @@ -6,6 +6,7 @@ import os import urlparse import sys +import makedeb # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -37,12 +38,12 @@ # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" chroot_dist = '.el6' -rpm.addMacro( 'dist', chroot_dist ) +rpm.addMacro( 'dist', "" ) print "all: rpms" -rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) +rpmfilenamepat = "%{NAME}_%{VERSION}_%{ARCH}.deb" ts = rpm.TransactionSet() @@ -62,7 +63,7 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - rpm.addMacro( 'NAME', h['name'] ) + rpm.addMacro( 'NAME', makedeb.mapPackage(h['name']) ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) @@ -72,7 +73,7 @@ def srpmNameFromSpec( spec ): # Unfortunately expanding that macro gives us a leading 'src' that we # don't want, so we strip that off - srpmname = os.path.basename( rpm.expandMacro( rpmfilenamepat ) ) + srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}.dsc" ) ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) @@ -82,6 +83,20 @@ def srpmNameFromSpec( spec ): # HACK: rewrite %dist if it appears in the filename return srpmname.replace( chroot_dist, host_dist ) +def rpmNamesFromSpec( spec ): + def rpmNameFromHeader( h ): + rpm.addMacro( 'NAME', makedeb.mapPackageName(h) ) + rpm.addMacro( 'VERSION', h['version'] ) + rpm.addMacro( 'RELEASE', h['release'] ) + rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else h['arch']) + rpmname = rpm.expandMacro( rpmfilenamepat ) + rpm.delMacro( 'NAME' ) + rpm.delMacro( 'VERSION' ) + rpm.delMacro( 'RELEASE' ) + rpm.delMacro( 'ARCH' ) + return rpmname + return [rpmNameFromHeader( p.header ) for p in spec.packages] + # Rules to build SRPM from SPEC for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) @@ -109,23 +124,9 @@ def srpmNameFromSpec( spec ): print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), os.path.join( spec_dir, specname ), " ".join( sources ) ) - print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' + print '\t@echo [MAKEDEB] $@' + print '\t./makedeb.py $<' -def rpmNamesFromSpec( spec ): - def rpmNameFromHeader( h ): - rpm.addMacro( 'NAME', h['name'] ) - rpm.addMacro( 'VERSION', h['version'] ) - rpm.addMacro( 'RELEASE', h['release'] ) - rpm.addMacro( 'ARCH', h['arch'] ) - rpmname = rpm.expandMacro( rpmfilenamepat ) - rpm.delMacro( 'NAME' ) - rpm.delMacro( 'VERSION' ) - rpm.delMacro( 'RELEASE' ) - rpm.delMacro( 'ARCH' ) - return rpmname - return [rpmNameFromHeader( p.header ) for p in spec.packages] - # Rules to download sources # Assumes each RPM only needs one download - we have some multi-source @@ -176,10 +177,10 @@ def rpmNameFromHeader( h ): srpm_path = os.path.join( srpm_dir, srpmname ) rpm_outdir = os.path.dirname( rpm_path ) print '%s: %s' % ( rpm_path, srpm_path ) - print '\t@echo [MOCK] $@' - print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir - print '\t@echo [CREATEREPO] $@' - print '\t@createrepo --quiet --update %s' % rpm_dir + print '\t@echo [PBUILDER] $@' + print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-amd64 --buildresult %s $<' % rpm_outdir + #print '\t@echo [CREATEREPO] $@' + #print '\t@createrepo --quiet --update %s' % rpm_dir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec From d1ce80db085c62d40bdf5d50276becf0044ba182 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 09:55:32 +0100 Subject: [PATCH 0424/1125] makedeb: Add package mappings and fix install file generation Signed-off-by: Euan Harris --- makedeb.py | 234 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 192 insertions(+), 42 deletions(-) diff --git a/makedeb.py b/makedeb.py index 13ddf5be..4583d6b2 100755 --- a/makedeb.py +++ b/makedeb.py @@ -41,7 +41,8 @@ # (Actually, using {}, not (), because these identifiers # end up in helper scripts, not in the makefile rpm.addMacro( "buildroot", "${DESTDIR}" ) -rpm.addMacro( "_libdir", "${STDLIBDIR}" ) +#rpm.addMacro( "_libdir", "${STDLIBDIR}" ) +rpm.addMacro( "_libdir", "/usr/lib" ) def specFromFile(spec): @@ -66,6 +67,151 @@ def mapPackageBaseName(name): return name +mapping = { + "biniou": "libbiniou-ocaml", + "cmdliner": "libcmdliner-ocaml", + "cppo": "cppo", + "deriving-ocsigen": "libderiving-ocsigen-ocaml", + "easy-format": "libeasy-format-ocaml", + "eliloader": "eliloader", + "ffs": "ffs", + "forkexecd": "forkexecd", + "js_of_ocaml": "libjs-of-ocaml", + "libnl3-cli": "libnl-3-cli", + "libnl3-doc": "libnl-3-doc", + "libnl3": "libnl-3", + "message-switch": "message-switch", + "ocaml-bitstring": "libbitstring-ocaml", + "ocaml-camomile-data": "libcamomile-data-ocaml", + "ocaml-camomile": "libcamomile-ocaml", + "ocaml-cdrom": "libcdrom-ocaml", + "ocaml-cohttp": "libcohttp-ocaml", + "ocaml-cstruct": "libcstruct-ocaml", + "ocaml-fd-send-recv": "libfd-send-recv-ocaml", + "ocaml-lambda-term": "liblambda-term-ocaml", + "ocaml-libvhd": "libvhd-ocaml", + "ocaml-libvirt": "libvirt-ocaml", + "ocaml-lwt": "liblwt-ocaml", + "ocaml-nbd": "libnbd-ocaml", + "ocaml-netdev": "libnetdev-ocaml", + "ocaml-obuild": "ocaml-obuild", + "ocaml-oclock": "liboclock-ocaml" , + "ocaml-ocplib-endian": "ocplib-endian-ocaml", + "ocaml-ounit": "libounit-ocaml", + "ocaml-qmp": "libqmp-ocaml", + "ocaml-react": "libreact-ocaml", + "ocaml-re": "libre-ocaml" , + "ocaml-rpc": "librpc-ocaml", + "ocaml-sexplib": "libsexplib-camlp4", + "ocaml-ssl": "libssl-ocaml" , + "ocaml-stdext": "libstdext-ocaml", + "ocaml-syslog": "libsyslog-ocaml", + "ocaml-tapctl": "libtapctl-ocaml", + "ocaml-text": "libtext-ocaml", + "ocaml-type-conv": "libtype-conv-camlp4", + "ocaml-uri": "liburi-ocaml" , + "ocaml-uuidm": "libuuidm-ocaml", + "ocaml-xcp-idl": "libxcp-idl-ocaml", + "ocaml-xcp-inventory": "libxcp-inventory-ocaml", + "ocaml-xcp-rrd": "libxcp-rrd-ocaml", + "ocaml-xen-api-client": "libxen-api-client-ocaml", + "ocaml-xen-api-libs-transitional": "ocaml-xen-api-libs-transitional", + "ocaml-xen-lowlevel-libs": "ocaml-xen-lowlevel-libs", + "ocaml-xenops": "libxenops-ocaml", + "ocaml-xenstore-clients": "libxenstore-clients-ocaml", + "ocaml-xenstore": "libxenstore-ocaml", + "ocaml-yojson": "libyojson-ocaml", + "ocaml-zed": "libzed-ocaml", + "omake": "omake", + "openstack-xapi-plugins": "openstack-xapi-plugins", + "optcomp": "optcomp-ocaml", + "sm-cli": "sm-cli", + "squeezed": "squeezed", + "utop": "utop", + "vncterm": "vncterm", + "xapi-libvirt-storage": "libxapi-libvirt-storage-ocaml", + "xapi-python": "xapi-python", + "xapi": "xapi", + "xapi-xe": "xapi-xe", + "xcp-networkd": "xcp-networkd" , + "xcp-rrdd": "libxcp-rrdd-ocaml", + "xe-create-templates": "xe-create-templates", + "xenops-cli": "xenops-cli", + "xenopsd-libvirt": "xenopsd-libvirt", + "xenopsd-simulator": "xenopsd-simulator", + "xenopsd-xc": "xenopsd-xc", + "xenopsd-xenlight": "xenopsd-xenlight", + "xenopsd": "xenopsd", + "xenserver-core": "xenserver-core", + "xenserver-install-wizard": "xenserver-install-wizard", + "xenserver-tech-preview-release": "xenserver-tech-preview-release", + "xmlm": "libxmlm-ocaml", + "xsconsole": "xsconsole", + "xsiostat": "xsiostat", + "xenserver-core-latest-snapshot": "xenserver-core-latest-snapshot", + + # extras + "ocaml": ["ocaml-nox", "ocaml-native-compilers"], + "ocaml-findlib": "ocaml-findlib", + "ocaml-ocamldoc": "ocaml-nox", + "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? + "ocaml-compiler-libs", + "ocaml-camlp4": "camlp4", + "openssl": "libssl1.0.0", + "xen": "xen-hypervisor", + "libuuid": "libuuid1", + "libvirt": "libvirt", + "xen-libs": "libxen", + "make": "make", + "ncurses": "libncurses5-dev", + "chkconfig": "chkconfig", + "initscripts": "initscripts", + "PyPAM": "python-pam", + "perl": "perl", + "gawk": "gawk", + "pam": "libpam0g", + "tetex-latex": "texlive-base", + "zlib": "zlib1g", + "git": "git", + "stunnel": "stunnel", + "bash-completion": "bash-completion", + "python": "python", + "time": "time", + "newt": "libnewt0.52", + "flex": "flex", + "bison": "bison", + "/sbin/ldconfig": "/sbin/ldconfig", + "kernel-headers": "linux-headers-3.2.0-51-generic", + "libvirt-docs": "libvirt-doc", + "chrpath": "chrpath", + + # this seems to come from packages like xcp-networkd, which don't have + # any requirements + "/bin/sh": "/bin/sh" +} + +secondary_mapping = { + "camlp4-dev": "camlp4", +} + +def mapPackage(name): + """map an rpm to a corresponding deb, based on file contents""" + # XXXXX for now we use a static map + isDevel=False + if name.endswith( "-devel" ): + isDevel = True + name = name[ :-len("-devel") ] + res = mapping[name] + if isDevel: + res += "-dev" + if res == "camlp4-dev": + res = "camlp4" + if res == "ocaml-findlib-dev": + res = ["ocaml-findlib", "libfindlib-ocaml-dev"] + if res == "libssl1.0.0-dev": + res = "libssl-dev" + return res + def mapPackageName(hdr): """rewrite an rpm name to fit with debian standards""" @@ -86,39 +232,13 @@ def mapPackageName(hdr): # name = "lib" + name # Do this manually for now... - mapping = { - "ocaml-re": "libre-ocaml" , - "ocaml-uri": "liburi-ocaml" , - } - - name = name.replace( name, mapping[name] ) + name = name.replace( name, mapPackage(name) ) if isDevel: name += "-dev" return name -def mapPackage(rpm_name): - """map an rpm to a corresponding deb, based on file contents""" - # XXXXX - mapping = { - "ocaml-re": "libre-ocaml" , - "ocaml-uri": "liburi-ocaml" , - "ocaml": "ocaml-nox", - "ocaml-findlib-devel": "ocaml-findlib", - "ocaml-findlib": "ocaml-findlib", - "ocaml-ocamldoc": "ocaml-nox", - "ocaml-re-devel": "libre-ocaml-dev", - "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? - "ocaml-compiler-libs", - } - - if not mapping.has_key(rpm_name): - print "unrecognized package: %s" % rpm_name - sys.exit(1) - - return mapping[rpm_name] - def mapSection(rpm_name): return "ocaml" # XXXXX @@ -137,7 +257,7 @@ def formatDescription(description): def sourceDebFromSpec(spec): res = "" - res += "Source: %s\n" % spec.sourceHeader['name'] #XXX should this be mapped? + res += "Source: %s\n" % mapPackage(spec.sourceHeader['name']) #XXX should this be mapped? res += "Priority: %s\n" % "optional" res += "Maintainer: %s\n" % "Euan Harris " #XXX res += "Section: %s\n" % mapSection(spec.sourceHeader['group']) @@ -145,10 +265,14 @@ def sourceDebFromSpec(spec): res += "Build-Depends:\n" build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)" ] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): - dep = mapPackage(pkg) - if version: - dep += " (>= %s)" % version - build_depends.append(dep) + deps = mapPackage(pkg) + # XXXX Ick! + if type(deps) != list: + deps = [deps] + for dep in deps: + if version: + dep += " (>= %s)" % version + build_depends.append(dep) res += ",\n".join( set([" %s" % d for d in build_depends])) res += "\n" return res @@ -160,7 +284,15 @@ def binaryDebFromSpec(spec): res += "Architecture: any\n" # XXXX % spec.header['arch'] res += "Depends:\n" depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] - depends += [mapPackage(r) for r in spec.header['requires']] + for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): + deps = mapPackage(pkg) + # XXXX Ick! + if type(deps) != list: + deps = [deps] + for dep in deps: + if version: + dep += " (>= %s)" % version + depends.append(dep) res += ",\n".join( [ " %s" % d for d in depends ] ) res += "\n" res += "Provides: ${ocaml:Provides}\n" # XXXX only for ocaml! @@ -215,7 +347,14 @@ def debianRulesConfigureFromSpec(spec): #\tocaml setup.ml -configure --destdir $(DESTDIR)/$(OCAML_STDLIB_DIR) # #""" - return "" + + # needed for OASIS packages with configure scripts + # if debhelper sees a configure script it will assume it's from autoconf + # and will run it with arguments that an OASIS configur script won't understand + rule = ".PHONY: override_dh_auto_configure\n" + rule += "override_dh_auto_configure:\n" + return rule + def debianRulesBuildFromSpec(spec, path): @@ -235,6 +374,8 @@ def debianRulesBuildFromSpec(spec, path): rule += "override_dh_auto_build:\n" rule += "\tdebian/build.sh\n" rule += "\n" + if not spec.build: + return rule with open(os.path.join(path, "debian/build.sh"), "w") as f: helper = "#!/bin/sh\n" helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock @@ -290,7 +431,7 @@ def debianChangelogFromSpec(spec): author = name version = spec.sourceHeader['version'] - res += "%s (%s) UNRELEASED; urgency=low\n" % (hdr['name'], version) + res += "%s (%s) UNRELEASED; urgency=low\n" % (mapPackage(hdr['name']), version) res += "\n" text = re.sub( "^-", "*", text, flags=re.MULTILINE ) text = re.sub( "^", " ", text, flags=re.MULTILINE ) @@ -308,13 +449,20 @@ def debianFilesFromPkg(basename, pkg, specpath): #res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific files = filesFromSpec(basename, specpath) for l in files.get(pkg.header['name'], []): - rpm.addMacro("_libdir", "") + rpm.addMacro("_libdir", "usr/lib") + rpm.addMacro("_bindir", "usr/bin") src = rpm.expandMacro(l).lstrip("/") # deb just wants relative paths + rpm.delMacro("_bindir") rpm.delMacro("_libdir") rpm.addMacro("_libdir", "/usr/lib") + rpm.addMacro("_bindir", "/usr/bin") dst = rpm.expandMacro(l) - if dst.endswith("/*"): - dst = dst[:-len("/*")] + # destination paths should be directories, not files. + # if the file is foo and the path is /usr/bin/foo, the + # package will end up install /usr/bin/foo/foo + if not dst.endswith("/"): + dst = os.path.dirname(dst) + rpm.delMacro("_bindir") rpm.delMacro("_libdir") res += "%s %s\n" % (src, dst) return res @@ -395,7 +543,7 @@ def renameSource(spec): if not m: print "error: could not parse filename %s" % filename basename, ext = m.groups()[:2] - baseFileName = "%s_%s.orig%s" % (spec.sourceHeader['name'], spec.sourceHeader['version'], ext) + baseFileName = "%s_%s.orig%s" % (mapPackage(spec.sourceHeader['name']), spec.sourceHeader['version'], ext) shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) @@ -441,6 +589,7 @@ def filesFromSpec(basename, specpath): for line in spec: tokens = line.lower().strip().split(" ") if tokens and tokens[0] == "%files": + section = basename inFiles = True if len(tokens) > 1: section = basename + "-" + tokens[1] @@ -484,8 +633,9 @@ def filesFromSpec(basename, specpath): debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1]) # pdebuild gives us source debs as well as binaries - #res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) - res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) + res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) + #pbuild can build a dsc - pbuilder --build --configfile pbuilder/pbuildrerc-amd64 --resultdir ... + #res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) assert res == 0 shutil.rmtree(os.path.join(build_dir, build_subdir)) for i in glob.glob(os.path.join(build_dir, "*")): From beb9c6e41df1aee5a4a1fe98823c8fc5ec805490 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 12:21:21 +0100 Subject: [PATCH 0425/1125] makedeb: Rewrite $RPM_BUILD_ROOT in recipes Signed-off-by: Euan Harris --- makedeb.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/makedeb.py b/makedeb.py index 4583d6b2..0f8c314c 100755 --- a/makedeb.py +++ b/makedeb.py @@ -379,7 +379,7 @@ def debianRulesBuildFromSpec(spec, path): with open(os.path.join(path, "debian/build.sh"), "w") as f: helper = "#!/bin/sh\n" helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock - helper += spec.build + helper += spec.build.replace("$RPM_BUILD_ROOT", "${DESTDIR}") f.write(helper) os.chmod(os.path.join(path, "debian/build.sh"), 0o755) return rule @@ -391,7 +391,7 @@ def debianRulesInstallFromSpec(spec, path): rule += "\tdebian/install.sh\n" rule += "\n" with open(os.path.join(path, "debian/install.sh"), "w") as f: - f.write("#!/bin/sh\n" + spec.install) + f.write("#!/bin/sh\n" + spec.install.replace("$RPM_BUILD_ROOT", "${DESTDIR}")) os.chmod(os.path.join(path, "debian/install.sh"), 0o755) return rule @@ -410,7 +410,7 @@ def debianRulesCleanFromSpec(spec, path): rule += re.sub("^", "\t", spec.clean.strip(), flags=re.MULTILINE) rule += "\n" with open(os.path.join(path, "debian/clean.sh"), "w") as f: - f.write("#!/bin/sh\n" + spec.clean) + f.write("#!/bin/sh\n" + spec.clean.replace("$RPM_BUILD_ROOT", "${DESTDIR}")) os.chmod(os.path.join(path, "debian/clean.sh"), 0o755) return rule @@ -516,7 +516,7 @@ def principalSourceFile(spec): return os.path.basename([name for (name, seq, type) in spec.sources if seq == 0 and type == 1][0]) -def prepareBuildDir(spec): +def prepareBuildDir(spec, build_subdir): # To prepare the build dir, RPM cds into $TOPDIR/BUILD # and expands all paths in the prep script with $TOPDIR. # It unpacks the tarball and then cds into the directory it @@ -528,7 +528,8 @@ def prepareBuildDir(spec): # patches from ../SOURCES doesn't work when we have cd'ed into the # source tree. - subprocess.call(spec.prep, shell=True) + unpack_dir = os.path.join(build_dir, build_subdir) + subprocess.call(spec.prep.replace("$RPM_BUILD_ROOT", unpack_dir), shell=True) # could also just do: RPMBUILD_PREP = 1<<0; spec._doBuild() From a5425198c70bf55860010619437a86dc6b318614 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 12:21:41 +0100 Subject: [PATCH 0426/1125] makedeb: fix Debian package versioning Signed-off-by: Euan Harris --- makedeb.py | 2 +- makemake.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/makedeb.py b/makedeb.py index 0f8c314c..bdb398dd 100755 --- a/makedeb.py +++ b/makedeb.py @@ -429,7 +429,7 @@ def debianChangelogFromSpec(spec): version = m.group(2) else: author = name - version = spec.sourceHeader['version'] + version = "%s-%s" % (spec.sourceHeader['version'], spec.sourceHeader['release']) res += "%s (%s) UNRELEASED; urgency=low\n" % (mapPackage(hdr['name']), version) res += "\n" diff --git a/makemake.py b/makemake.py index e4fc73ee..36656c35 100755 --- a/makemake.py +++ b/makemake.py @@ -43,7 +43,7 @@ print "all: rpms" -rpmfilenamepat = "%{NAME}_%{VERSION}_%{ARCH}.deb" +rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" ts = rpm.TransactionSet() @@ -73,7 +73,7 @@ def srpmNameFromSpec( spec ): # Unfortunately expanding that macro gives us a leading 'src' that we # don't want, so we strip that off - srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}.dsc" ) ) + srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}-%{RELEASE}.dsc" ) ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) From 45753ef43baa1286aef750b87ba0634a74c2d8d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 12:22:05 +0100 Subject: [PATCH 0427/1125] makedeb: Do nothing if package is already debianized Signed-off-by: Euan Harris --- makedeb.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/makedeb.py b/makedeb.py index bdb398dd..84e03f45 100755 --- a/makedeb.py +++ b/makedeb.py @@ -624,14 +624,16 @@ def filesFromSpec(basename, specpath): # subdirectory of builddir in which the tarball is unpacked; # set by RPM after processing the spec file build_subdir = rpm.expandMacro("%buildsubdir") - prepareBuildDir(spec) + prepareBuildDir(spec, build_subdir) + if not os.path.isdir( os.path.join(build_dir, build_subdir, "debian") ): - tarball = principalSourceFile(spec) + tarball = principalSourceFile(spec) - # copy over the source, run the prep rule to unpack it, then rename it as deb expects - renameSource(spec) - - debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1]) + # copy over the source, run the prep rule to unpack it, then rename it as deb expects + # this should be based on the rewritten (or not) source name in the debian package - build the debian dir first and then rename the tarball as needed + renameSource(spec) + + debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1]) # pdebuild gives us source debs as well as binaries res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) From 8dc52187f59c14f7bb922d406d64225d1a891623 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 13 Aug 2013 18:21:37 +0100 Subject: [PATCH 0428/1125] makedeb: Handle the %exclude directive in file lists We don't handle %if conditionals, though. Signed-off-by: Euan Harris --- makedeb.py | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/makedeb.py b/makedeb.py index 84e03f45..77539737 100755 --- a/makedeb.py +++ b/makedeb.py @@ -329,12 +329,13 @@ def ocamlRulesPreamble(): """ -def debianRulesFromSpec(spec, path): +def debianRulesFromSpec(spec, specpath, path): res = "" res += ocamlRulesPreamble() res += debianRulesConfigureFromSpec(spec) res += debianRulesBuildFromSpec(spec, path) res += debianRulesInstallFromSpec(spec, path) + res += debianRulesDhInstallFromSpec(spec, specpath, path) res += debianRulesCleanFromSpec(spec, path) res += debianRulesTestFromSpec(spec, path) return res @@ -395,6 +396,19 @@ def debianRulesInstallFromSpec(spec, path): os.chmod(os.path.join(path, "debian/install.sh"), 0o755) return rule +def debianRulesDhInstallFromSpec(spec, specpath, path): + rule = ".PHONY: override_dh_install\n" + rule += "override_dh_install:\n" + rule += "\tdh_install\n" + pkgname = mapPackageName(spec.sourceHeader) + files = filesFromSpec(pkgname, specpath) + if files.has_key( pkgname + "-%exclude" ): + for pat in files[pkgname + "-%exclude"]: + path = "\trm -f debian/%s/%s\n" % (pkgname, rpm.expandMacro(pat)) + rule += os.path.normpath(path) + rule += "\n" + return rule + def debianRulesTestFromSpec(spec, path): # XXX HACK for ocaml-oclock - don't try to run the tests when building @@ -494,7 +508,7 @@ def debianDirFromSpec(spec, path, specpath): control.write(debianControlFromSpec(spec)) with open( os.path.join(path, "debian/rules"), "w" ) as rules: - rules.write(debianRulesFromSpec(spec, path)) + rules.write(debianRulesFromSpec(spec, specpath, path)) os.chmod( os.path.join(path, "debian/rules"), 0o755 ) with open( os.path.join(path, "debian/compat"), "w" ) as compat: @@ -588,8 +602,8 @@ def filesFromSpec(basename, specpath): inFiles = False section = "" for line in spec: - tokens = line.lower().strip().split(" ") - if tokens and tokens[0] == "%files": + tokens = line.strip().split(" ") + if tokens and tokens[0].lower() == "%files": section = basename inFiles = True if len(tokens) > 1: @@ -600,12 +614,24 @@ def filesFromSpec(basename, specpath): inFiles = False if inFiles: - if tokens[0].startswith("%defattr"): + if tokens[0].lower().startswith("%defattr"): + continue + if tokens[0].lower().startswith("%attr"): continue - if tokens[0] == "%doc": + if tokens[0].lower() == "%doc": docsection = section + "-doc" files[docsection] = files.get(docsection, []) + tokens[1:] continue + if tokens[0].lower() == "%if" or tokens[0].lower() == "%endif": + # XXX evaluate the if condition and do the right thing here + continue + if tokens[0].lower() == "%exclude": + excludesection = section + "-%exclude" + files[excludesection] = files.get(excludesection, []) + tokens[1:] + continue + if tokens[0].lower().startswith("%config"): + # XXX do the right thing here - should add to debian/configfiles + continue if line.strip(): files[section] = files.get(section, []) + [line.strip()] return files From eea6323f38b305e22b77c218354c606907a4727f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 14 Aug 2013 09:46:17 +0100 Subject: [PATCH 0429/1125] pbuilder: Bind mount SRPMS for debugging --- pbuilderrc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index 1c747917..476bb29b 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,5 +1,5 @@ OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://ppa.launchpad.net/mike-mcclurg/ocaml/ubuntu precise main" -BINDMOUNTS="@PWD@/RPMS" +BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" ALLOWUNTRUSTED=yes From 06263b992c7a05433be449f06384c36850a313e5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 14 Aug 2013 15:44:16 +0100 Subject: [PATCH 0430/1125] makedeb: Add package mappings, handling special cases for camlp4 Signed-off-by: Euan Harris --- makedeb.py | 70 ++++++++++++++++++++++++++++++++++++++--------------- makemake.py | 2 +- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/makedeb.py b/makedeb.py index 77539737..66923f8c 100755 --- a/makedeb.py +++ b/makedeb.py @@ -134,7 +134,7 @@ def mapPackageBaseName(name): "xapi": "xapi", "xapi-xe": "xapi-xe", "xcp-networkd": "xcp-networkd" , - "xcp-rrdd": "libxcp-rrdd-ocaml", + "xcp-rrdd": "xcp-rrdd", "xe-create-templates": "xe-create-templates", "xenops-cli": "xenops-cli", "xenopsd-libvirt": "xenopsd-libvirt", @@ -156,16 +156,16 @@ def mapPackageBaseName(name): "ocaml-ocamldoc": "ocaml-nox", "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? "ocaml-compiler-libs", - "ocaml-camlp4": "camlp4", + "ocaml-camlp4": ["camlp4", "camlp4-extra"], "openssl": "libssl1.0.0", "xen": "xen-hypervisor", - "libuuid": "libuuid1", + "libuuid": "uuid", "libvirt": "libvirt", "xen-libs": "libxen", "make": "make", - "ncurses": "libncurses5-dev", - "chkconfig": "chkconfig", - "initscripts": "initscripts", + "ncurses": "libncurses5", + "chkconfig": [], # "chkconfig", + "initscripts": [], # "initscripts", "PyPAM": "python-pam", "perl": "perl", "gawk": "gawk", @@ -187,7 +187,9 @@ def mapPackageBaseName(name): # this seems to come from packages like xcp-networkd, which don't have # any requirements - "/bin/sh": "/bin/sh" + "/bin/sh": "/bin/sh", + "xen-hypervisor-fixup": "xen-hypervisor-fixup", + "xen-utils": "xen-utils", } secondary_mapping = { @@ -201,15 +203,36 @@ def mapPackage(name): if name.endswith( "-devel" ): isDevel = True name = name[ :-len("-devel") ] - res = mapping[name] - if isDevel: - res += "-dev" - if res == "camlp4-dev": - res = "camlp4" - if res == "ocaml-findlib-dev": - res = ["ocaml-findlib", "libfindlib-ocaml-dev"] - if res == "libssl1.0.0-dev": - res = "libssl-dev" + mapped = mapping[name] + if type(mapped) != list: + mapped = [mapped] + res = [] + for m in mapped: + if isDevel: + m += "-dev" + if m == "camlp4-dev": + m = "camlp4" + if m == "camlp4-extra-dev": + m = "camlp4-extra" + if m == "libeasy-format-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... + m = "libeasy-format-ocaml-dev" + if m == "libbiniou-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... + m = "libbiniou-ocaml-dev" + if m == "libssl1.0.0-dev": + m = "libssl-dev" + if m == "libtype-conv-camlp4": + m = "libtype-conv-camlp4-dev" + if m == "libxapi-libvirt-storage-ocaml": + m = "libxapi-libvirt-storage-ocaml-dev" + if m == "libsexplib-camlp4": + m = "libsexplib-camlp4-dev" + if m == "ocaml-findlib-dev": + m = ["ocaml-findlib", "libfindlib-ocaml-dev"] + if m == "/bin/sh": + continue + if type(m) != list: + m = [m] + res += m return res @@ -232,10 +255,14 @@ def mapPackageName(hdr): # name = "lib" + name # Do this manually for now... - name = name.replace( name, mapPackage(name) ) + name = name.replace( name, mapPackage(name)[0] ) if isDevel: name += "-dev" + + # hack for type-conv. dh_ocaml insists that there must be a -dev package for anything with ocaml or camlp4 in the name... + if name == "libtype-conv-camlp4": + name = "libtype-conv-camlp4-dev" return name @@ -257,7 +284,7 @@ def formatDescription(description): def sourceDebFromSpec(spec): res = "" - res += "Source: %s\n" % mapPackage(spec.sourceHeader['name']) #XXX should this be mapped? + res += "Source: %s\n" % mapPackage(spec.sourceHeader['name'])[0] #XXX should this be mapped? res += "Priority: %s\n" % "optional" res += "Maintainer: %s\n" % "Euan Harris " #XXX res += "Section: %s\n" % mapSection(spec.sourceHeader['group']) @@ -445,7 +472,7 @@ def debianChangelogFromSpec(spec): author = name version = "%s-%s" % (spec.sourceHeader['version'], spec.sourceHeader['release']) - res += "%s (%s) UNRELEASED; urgency=low\n" % (mapPackage(hdr['name']), version) + res += "%s (%s) UNRELEASED; urgency=low\n" % (mapPackage(hdr['name'])[0], version) res += "\n" text = re.sub( "^-", "*", text, flags=re.MULTILINE ) text = re.sub( "^", " ", text, flags=re.MULTILINE ) @@ -558,7 +585,7 @@ def renameSource(spec): if not m: print "error: could not parse filename %s" % filename basename, ext = m.groups()[:2] - baseFileName = "%s_%s.orig%s" % (mapPackage(spec.sourceHeader['name']), spec.sourceHeader['version'], ext) + baseFileName = "%s_%s.orig%s" % (mapPackage(spec.sourceHeader['name'])[0], spec.sourceHeader['version'], ext) shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) @@ -632,6 +659,9 @@ def filesFromSpec(basename, specpath): if tokens[0].lower().startswith("%config"): # XXX do the right thing here - should add to debian/configfiles continue + if tokens[0].startswith("%config"): + # XXX do the right thing here - should add to debian/configfiles + continue if line.strip(): files[section] = files.get(section, []) + [line.strip()] return files diff --git a/makemake.py b/makemake.py index 36656c35..1fbc2905 100755 --- a/makemake.py +++ b/makemake.py @@ -63,7 +63,7 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - rpm.addMacro( 'NAME', makedeb.mapPackage(h['name']) ) + rpm.addMacro( 'NAME', makedeb.mapPackage(h['name'])[0] ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) From 6c00798366bbd39085d87a6bb74a75926c879d5c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 16 Aug 2013 14:37:48 +0100 Subject: [PATCH 0431/1125] pbuilder: Add blktap-dev (in universe) needed by libvhd-ocaml --- makedeb.py | 2 ++ pbuilderrc.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/makedeb.py b/makedeb.py index 66923f8c..471cf6b1 100755 --- a/makedeb.py +++ b/makedeb.py @@ -230,6 +230,8 @@ def mapPackage(name): m = ["ocaml-findlib", "libfindlib-ocaml-dev"] if m == "/bin/sh": continue + if m == "xen-hypervisor-dev": + m = ["libxen-dev", "xen-utils", "blktap-dev"] if type(m) != list: m = [m] res += m diff --git a/pbuilderrc.in b/pbuilderrc.in index 476bb29b..f5e4512f 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,4 +1,4 @@ -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://ppa.launchpad.net/mike-mcclurg/ocaml/ubuntu precise main" +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://ppa.launchpad.net/mike-mcclurg/ocaml/ubuntu precise main|deb http://gb.archive.ubuntu.com/ubuntu/ precise universe" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 783eef47f9e61fc0a41ead9604653411ea8a918d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 14 Aug 2013 11:34:43 +0100 Subject: [PATCH 0432/1125] configure: Use Ubuntu Raring in the pbuilder chroot Signed-off-by: Euan Harris --- configure.sh | 36 +++++++++++++++++------------------- makemake.py | 2 +- pbuilderrc.in | 3 ++- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/configure.sh b/configure.sh index 2910d6de..f0879dc0 100755 --- a/configure.sh +++ b/configure.sh @@ -1,31 +1,29 @@ #!/bin/sh -echo -n "Writing mock configuration..." -mkdir -p mock -sed "s|@PWD@|$PWD|g" xenserver.cfg.in > mock/xenserver.cfg -ln -fs /etc/mock/default.cfg mock/ -ln -fs /etc/mock/site-defaults.cfg mock/ -ln -fs /etc/mock/logging.ini mock/ -echo " done" +ARCH=amd64 +DIST=raring +BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz -echo -n "Initializing repository..." -mkdir -p RPMS -createrepo --quiet RPMS -echo " done" +apt-get install pbuilder +echo -n "Writing pbuilder configuration..." mkdir -p pbuilder - -ARCH=amd64 -BASETGZ=/var/cache/pbuilder/base-$ARCH.tgz - -sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" pbuilderrc.in > pbuilder/pbuilderrc-$ARCH +sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps chmod 755 pbuilder/D05deps +echo " done" if [ -f $BASETGZ ] ; then echo $BASETGZ exists - updating - sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$ARCH + sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH else - echo $BASETGZ exists - creating - sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$ARCH + echo $BASETGZ does not exist - creating + sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH fi + +echo -n "Initializing repository..." +mkdir -p RPMS SRPMS +(cd RPMS; apt-ftparchive packages . > Packages) +(cd SRPMS; apt-ftparchive sources . > Sources) +echo " done" + diff --git a/makemake.py b/makemake.py index 1fbc2905..b8350e1e 100755 --- a/makemake.py +++ b/makemake.py @@ -178,7 +178,7 @@ def rpmNameFromHeader( h ): rpm_outdir = os.path.dirname( rpm_path ) print '%s: %s' % ( rpm_path, srpm_path ) print '\t@echo [PBUILDER] $@' - print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-amd64 --buildresult %s $<' % rpm_outdir + print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir #print '\t@echo [CREATEREPO] $@' #print '\t@createrepo --quiet --update %s' % rpm_dir diff --git a/pbuilderrc.in b/pbuilderrc.in index f5e4512f..4b2a1075 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,8 +1,9 @@ -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://ppa.launchpad.net/mike-mcclurg/ocaml/ubuntu precise main|deb http://gb.archive.ubuntu.com/ubuntu/ precise universe" +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main " BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" ALLOWUNTRUSTED=yes +DISTRIBUTION=@DIST@ # Architecture specific settings ARCHITECTURE=@ARCH@ From 67b6bb420bec839f1e71cc63bc4a622b737b1e43 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 16:05:14 +0100 Subject: [PATCH 0433/1125] configure: Include the SRPMS repository in the buildroot With this change, to build a package we just need to do: sudo pbuilder --login --configfile pbuilder/pbuilderrc-raring-amd64 apt-get update apt-get build-dep apt-get source - or - dpkg-source -x /path/to/debbuild/SRPMS/ cd - dpkg-buildpackage --- D05deps.in | 1 + pbuilderrc.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/D05deps.in b/D05deps.in index e4886e7e..8f939347 100644 --- a/D05deps.in +++ b/D05deps.in @@ -1,3 +1,4 @@ #!/bin/sh (cd @PWD@/RPMS; apt-ftparchive packages . > Packages) +(cd @PWD@/SRPMS; apt-ftparchive sources . > Sources) apt-get update diff --git a/pbuilderrc.in b/pbuilderrc.in index 4b2a1075..05f067d7 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,4 +1,4 @@ -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main " +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main " BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From c08285e9813c247f0dcf5c2ff55644fc06c84f0d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 17:29:35 +0100 Subject: [PATCH 0434/1125] makedeb: include ocaml-nox in default deps - needed by dh_ocaml Signed-off-by: Euan Harris --- makedeb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makedeb.py b/makedeb.py index 471cf6b1..ab0eff7a 100755 --- a/makedeb.py +++ b/makedeb.py @@ -292,7 +292,7 @@ def sourceDebFromSpec(spec): res += "Section: %s\n" % mapSection(spec.sourceHeader['group']) res += "Standards-Version: %s\n" % STANDARDS_VERSION res += "Build-Depends:\n" - build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)" ] + build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox" ] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): deps = mapPackage(pkg) # XXXX Ick! From 118c34f6faa3c5cafc468a4eb24f04e80111e989 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 Aug 2013 12:18:52 +0100 Subject: [PATCH 0435/1125] makemake/makedeb: Map 'noarch' to 'all' for Debian Signed-off-by: Euan Harris --- makedeb.py | 6 +++--- makemake.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/makedeb.py b/makedeb.py index ab0eff7a..e54fa066 100755 --- a/makedeb.py +++ b/makedeb.py @@ -310,7 +310,7 @@ def sourceDebFromSpec(spec): def binaryDebFromSpec(spec): res = "" res += "Package: %s\n" % mapPackageName(spec.header) - res += "Architecture: any\n" # XXXX % spec.header['arch'] + res += "Architecture: %s\n" % ("any" if spec.header['arch'] in [ "x86_64", "i686"] else "all") res += "Depends:\n" depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): @@ -400,12 +400,12 @@ def debianRulesBuildFromSpec(spec, path): # aren't passed through # Hurray, the .ONESHELL special target may save us + if not spec.build: + return "" rule = ".PHONY: override_dh_auto_build\n" rule += "override_dh_auto_build:\n" rule += "\tdebian/build.sh\n" rule += "\n" - if not spec.build: - return rule with open(os.path.join(path, "debian/build.sh"), "w") as f: helper = "#!/bin/sh\n" helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock diff --git a/makemake.py b/makemake.py index b8350e1e..21b10417 100755 --- a/makemake.py +++ b/makemake.py @@ -88,7 +88,7 @@ def rpmNameFromHeader( h ): rpm.addMacro( 'NAME', makedeb.mapPackageName(h) ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) - rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else h['arch']) + rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) rpmname = rpm.expandMacro( rpmfilenamepat ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) From b921d82dcf085ba5c97eaf45d8cb85adea1692ec Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 09:32:30 +0100 Subject: [PATCH 0436/1125] makedeb: Handle packages with no source tarballs Signed-off-by: Euan Harris --- makedeb.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/makedeb.py b/makedeb.py index e54fa066..12985399 100755 --- a/makedeb.py +++ b/makedeb.py @@ -530,7 +530,7 @@ def debianPatchesFromSpec(spec, path): -def debianDirFromSpec(spec, path, specpath): +def debianDirFromSpec(spec, path, specpath, isnative): os.makedirs( os.path.join(path, "debian/source") ) with open( os.path.join(path, "debian/control"), "w" ) as control: @@ -544,7 +544,10 @@ def debianDirFromSpec(spec, path, specpath): compat.write("8\n") with open( os.path.join(path, "debian/source/format"), "w" ) as format: - format.write("3.0 (quilt)\n") + if isnative: + format.write("3.0 (native)\n") + else: + format.write("3.0 (quilt)\n") with open( os.path.join(path, "debian/copyright"), "w" ) as copyright: copyright.write("FIXME") @@ -576,7 +579,7 @@ def prepareBuildDir(spec, build_subdir): # could also just do: RPMBUILD_PREP = 1<<0; spec._doBuild() -def renameSource(spec): +def renameSource(origfilename, pkgname, pkgversion): # Debian source package name should probably match the tarball name origfilename = principalSourceFile(spec) if origfilename.endswith(".tbz"): @@ -587,7 +590,7 @@ def renameSource(spec): if not m: print "error: could not parse filename %s" % filename basename, ext = m.groups()[:2] - baseFileName = "%s_%s.orig%s" % (mapPackage(spec.sourceHeader['name'])[0], spec.sourceHeader['version'], ext) + baseFileName = "%s_%s.orig%s" % (mapPackage(pkgname)[0], pkgversion, ext) shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) @@ -681,17 +684,26 @@ def filesFromSpec(basename, specpath): # subdirectory of builddir in which the tarball is unpacked; # set by RPM after processing the spec file + # if the source file isn't a tarball this won't be set! build_subdir = rpm.expandMacro("%buildsubdir") prepareBuildDir(spec, build_subdir) - if not os.path.isdir( os.path.join(build_dir, build_subdir, "debian") ): - tarball = principalSourceFile(spec) + if os.path.isdir( os.path.join(build_dir, build_subdir, "debian") ): + shutil.rmtree(os.path.join(build_dir, build_subdir, "debian")) + + # a package with no original tarball is built as a 'native debian package' + native = True + tarball = principalSourceFile(spec) + m = re.match( "^(.+)((\.tar\.(gz|bz2|lzma|xz)|\.tbz)$)", tarball ) + if m: + native = False + # copy over the source, run the prep rule to unpack it, then rename it as deb expects # this should be based on the rewritten (or not) source name in the debian package - build the debian dir first and then rename the tarball as needed - renameSource(spec) + renameSource(tarball, spec.sourceHeader['name'], spec.sourceHeader['version']) - debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1]) + debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1], native) # pdebuild gives us source debs as well as binaries res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) From b7a8ec4542f81ce732bca84d274d70b75cfaef7f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 13:42:01 +0100 Subject: [PATCH 0437/1125] makedeb: Add mappings for kernel packages Signed-off-by: Euan Harris --- makedeb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makedeb.py b/makedeb.py index 12985399..7a87a054 100755 --- a/makedeb.py +++ b/makedeb.py @@ -184,6 +184,8 @@ def mapPackageBaseName(name): "kernel-headers": "linux-headers-3.2.0-51-generic", "libvirt-docs": "libvirt-doc", "chrpath": "chrpath", + "kernel": "linux-image", + "kernel-firmware": "linux-firmware", # this seems to come from packages like xcp-networkd, which don't have # any requirements From daab25b8ec360c8b216097998203a165ebabd272 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 22 Aug 2013 17:32:16 +0100 Subject: [PATCH 0438/1125] makedeb: Tweak mappings to account for packages whose -devel names are significantly different from their base names Signed-off-by: Euan Harris --- makedeb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/makedeb.py b/makedeb.py index 7a87a054..a0ed72c7 100755 --- a/makedeb.py +++ b/makedeb.py @@ -160,8 +160,8 @@ def mapPackageBaseName(name): "openssl": "libssl1.0.0", "xen": "xen-hypervisor", "libuuid": "uuid", - "libvirt": "libvirt", - "xen-libs": "libxen", + "libvirt": "libvirt0", + "xen-libs": "libxen-4.2", "make": "make", "ncurses": "libncurses5", "chkconfig": [], # "chkconfig", @@ -234,6 +234,10 @@ def mapPackage(name): continue if m == "xen-hypervisor-dev": m = ["libxen-dev", "xen-utils", "blktap-dev"] + if m == "libvirt0-dev": + m = "libvirt-dev" + if m == "libxen-4.2-dev": + m = "libxen-dev" if type(m) != list: m = [m] res += m From b01f2d8d1867076ce098d0eaebbeba3db47cd078 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 13:57:18 +0100 Subject: [PATCH 0439/1125] makedeb: Use /usr/lib instead of /usr/libexec Signed-off-by: Euan Harris --- makedeb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makedeb.py b/makedeb.py index a0ed72c7..e52929c2 100755 --- a/makedeb.py +++ b/makedeb.py @@ -35,6 +35,10 @@ src_dir = rpm.expandMacro( '%_sourcedir' ) build_dir = rpm.expandMacro( '%_builddir' ) +# Fedora puts executables run by other programs in /usr/libexec, but +# Debian puts them in /usr/lib, which apparently follows the FHS: +# http://www.debian.org/doc/manuals/maint-guide/advanced.en.html#ftn.idp2018768 +rpm.addMacro( '_libexecdir', "/usr/lib" ) # Override some macros interpolated into build rules, so # paths are appropriate for debuild From a4fd02287ec5cffd69692b3f7d656be4d96040fb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Sep 2013 13:57:49 +0100 Subject: [PATCH 0440/1125] makedeb: Add package mappings Signed-off-by: Euan Harris --- makedeb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/makedeb.py b/makedeb.py index e52929c2..0c532fc6 100755 --- a/makedeb.py +++ b/makedeb.py @@ -164,7 +164,7 @@ def mapPackageBaseName(name): "openssl": "libssl1.0.0", "xen": "xen-hypervisor", "libuuid": "uuid", - "libvirt": "libvirt0", + "libvirt": ["libvirt0", "libvirt-bin"], "xen-libs": "libxen-4.2", "make": "make", "ncurses": "libncurses5", @@ -196,6 +196,12 @@ def mapPackageBaseName(name): "/bin/sh": "/bin/sh", "xen-hypervisor-fixup": "xen-hypervisor-fixup", "xen-utils": "xen-utils", + "nfs-utils": "nfs-common", + "hwdata": "hwdata", + "redhat-lsb-core": "lsb-base", + "ethtool": "ethtool", + "qemu-system-x86": "qemu-system-x86", + "python-argparse": "libpython2.7-stdlib", } secondary_mapping = { @@ -242,6 +248,8 @@ def mapPackage(name): m = "libvirt-dev" if m == "libxen-4.2-dev": m = "libxen-dev" + if m == "libvirt-bin-dev": + m = "libvirt-bin" if type(m) != list: m = [m] res += m From 622e517e6e36301e7cf17f5a64a1ec648439fcfa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 17:57:48 +0100 Subject: [PATCH 0441/1125] makedeb: Handle files marked with the %config directive Signed-off-by: Euan Harris --- makedeb.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/makedeb.py b/makedeb.py index 0c532fc6..13ab4c28 100755 --- a/makedeb.py +++ b/makedeb.py @@ -457,6 +457,16 @@ def debianRulesDhInstallFromSpec(spec, specpath, path): return rule +def debianConfigFilesFromSpec(spec, specpath, path): + pkgname = mapPackageName(spec.sourceHeader) + files = filesFromSpec(pkgname, specpath) + config_files = "" + if files.has_key( pkgname + "-%config" ): + for filename in files[pkgname + "-%config"]: + config_files += "%s\n" % filename + return config_files + + def debianRulesTestFromSpec(spec, path): # XXX HACK for ocaml-oclock - don't try to run the tests when building rule = ".PHONY: override_dh_auto_test\n" @@ -576,6 +586,11 @@ def debianDirFromSpec(spec, path, specpath, isnative): debianFilelistsFromSpec(spec, path, specpath) debianPatchesFromSpec(spec, path) + configs = debianConfigFilesFromSpec(spec, specpath, path) + if configs: + with open( os.path.join(path, "debian/conffiles"), "w" ) as conffiles: + conffiles.write(configs) + def principalSourceFile(spec): return os.path.basename([name for (name, seq, type) in spec.sources if seq == 0 and type == 1][0]) @@ -680,7 +695,15 @@ def filesFromSpec(basename, specpath): files[excludesection] = files.get(excludesection, []) + tokens[1:] continue if tokens[0].lower().startswith("%config"): - # XXX do the right thing here - should add to debian/configfiles + # dh_install automatically considers files in /etc to be config files + # so we don't have to do anythin special for them + # The spec file documentation says that a %config directive can + # only apply to a single file. + configsection = section + "-%config" + if tokens[1].startswith("/etc"): + files[section] = files.get(section, []) + tokens[1:] + else: + files[configsection] = files.get(configsection, []) + tokens[1:] continue if tokens[0].startswith("%config"): # XXX do the right thing here - should add to debian/configfiles From 3da507e9fdb0c70f4fafc29a5fbac28e096cfdf3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 3 Sep 2013 17:58:07 +0100 Subject: [PATCH 0442/1125] makedeb: Add -noclean option to keep contents of BUILD Signed-off-by: Euan Harris --- makedeb.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/makedeb.py b/makedeb.py index 13ab4c28..4f90df5e 100755 --- a/makedeb.py +++ b/makedeb.py @@ -722,6 +722,9 @@ def filesFromSpec(basename, specpath): shutil.rmtree(build_dir) #XXX os.mkdir(build_dir) spec = specFromFile(sys.argv[1]) + clean = True + if "-noclean" in sys.argv: + clean = False # subdirectory of builddir in which the tarball is unpacked; # set by RPM after processing the spec file @@ -751,10 +754,14 @@ def filesFromSpec(basename, specpath): #pbuild can build a dsc - pbuilder --build --configfile pbuilder/pbuildrerc-amd64 --resultdir ... #res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) assert res == 0 - shutil.rmtree(os.path.join(build_dir, build_subdir)) + if clean: + shutil.rmtree(os.path.join(build_dir, build_subdir)) for i in glob.glob(os.path.join(build_dir, "*")): + if build_subdir in i: + continue shutil.copy2(i, srpm_dir) #XXX - os.unlink(i) + if clean: + os.unlink(i) # at this point we have a debian source package (at least 3 files) in SRPMS # to build it: From 1239e11d364bfd29b45ac27575021ec86cc059b2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 Aug 2013 16:43:44 +0100 Subject: [PATCH 0443/1125] libxl: Add fixup package containing libxl headers not installed by Ubuntu This is needed to build ocaml-xen-lowlevel-libs. Signed-off-by: Euan Harris --- SOURCES/_libxl_list.h | 651 ++++++++++++++++++++ SOURCES/_libxl_types.h | 609 +++++++++++++++++++ SOURCES/_libxl_types_json.h | 54 ++ SOURCES/libxl.h | 938 +++++++++++++++++++++++++++++ SOURCES/libxl_event.h | 550 +++++++++++++++++ SOURCES/libxl_json.h | 88 +++ SOURCES/libxl_utils.h | 142 +++++ SOURCES/libxl_uuid.h | 72 +++ SPECS/libxl-headers.spec | 60 ++ SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- makedeb.py | 2 +- 11 files changed, 3166 insertions(+), 2 deletions(-) create mode 100644 SOURCES/_libxl_list.h create mode 100644 SOURCES/_libxl_types.h create mode 100644 SOURCES/_libxl_types_json.h create mode 100644 SOURCES/libxl.h create mode 100644 SOURCES/libxl_event.h create mode 100644 SOURCES/libxl_json.h create mode 100644 SOURCES/libxl_utils.h create mode 100644 SOURCES/libxl_uuid.h create mode 100644 SPECS/libxl-headers.spec diff --git a/SOURCES/_libxl_list.h b/SOURCES/_libxl_list.h new file mode 100644 index 00000000..cf35a7ba --- /dev/null +++ b/SOURCES/_libxl_list.h @@ -0,0 +1,651 @@ +/* + * DO NOT EDIT THIS FILE + * + * Generated automatically by bsd-sys-queue-h-seddery to + * - introduce LIBXL_ and libxl_ namespace prefixes + * - turn "struct type" into "type" so that type arguments + * to the macros are type names not struct tags + * - remove the reference to sys/cdefs.h, which is not needed + * + * The purpose of this seddery is to allow the resulting file to be + * freely included by software which might also want to include other + * list macros; to make it usable when struct tags are not being used + * or not known; to make it more portable. + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + * $FreeBSD$ + */ + +#ifndef LIBXL__SYS_QUEUE_H_ +#define LIBXL__SYS_QUEUE_H_ + +/* #include */ + +/* + * This file defines four types of data structures: singly-linked lists, + * singly-linked tail queues, lists and tail queues. + * + * A singly-linked list is headed by a single forward pointer. The elements + * are singly linked for minimum space and pointer manipulation overhead at + * the expense of O(n) removal for arbitrary elements. New elements can be + * added to the list after an existing element or at the head of the list. + * Elements being removed from the head of the list should use the explicit + * macro for this purpose for optimum efficiency. A singly-linked list may + * only be traversed in the forward direction. Singly-linked lists are ideal + * for applications with large datasets and few or no removals or for + * implementing a LIFO queue. + * + * A singly-linked tail queue is headed by a pair of pointers, one to the + * head of the list and the other to the tail of the list. The elements are + * singly linked for minimum space and pointer manipulation overhead at the + * expense of O(n) removal for arbitrary elements. New elements can be added + * to the list after an existing element, at the head of the list, or at the + * end of the list. Elements being removed from the head of the tail queue + * should use the explicit macro for this purpose for optimum efficiency. + * A singly-linked tail queue may only be traversed in the forward direction. + * Singly-linked tail queues are ideal for applications with large datasets + * and few or no removals or for implementing a FIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * For details on the use of these macros, see the queue(3) manual page. + * + * + * LIBXL_SLIST LIBXL_LIST LIBXL_STAILQ LIBXL_TAILQ + * _HEAD + + + + + * _HEAD_INITIALIZER + + + + + * _ENTRY + + + + + * _INIT + + + + + * _EMPTY + + + + + * _FIRST + + + + + * _NEXT + + + + + * _PREV - - - + + * _LAST - - + + + * _FOREACH + + + + + * _FOREACH_SAFE + + + + + * _FOREACH_REVERSE - - - + + * _FOREACH_REVERSE_SAFE - - - + + * _INSERT_HEAD + + + + + * _INSERT_BEFORE - + - + + * _INSERT_AFTER + + + + + * _INSERT_TAIL - - + + + * _CONCAT - - + + + * _REMOVE_AFTER + - + - + * _REMOVE_HEAD + - + - + * _REMOVE + + + + + * _SWAP + + + + + * + */ +#ifdef LIBXL_QUEUE_MACRO_DEBUG +/* Store the last 2 places the queue element or head was altered */ +struct libxl__qm_trace { + char * lastfile; + int lastline; + char * prevfile; + int prevline; +}; + +#define LIBXL__TRACEBUF struct libxl__qm_trace trace; +#define LIBXL__TRASHIT(x) do {(x) = (void *)-1;} while (0) +#define LIBXL__QMD_SAVELINK(name, link) void **name = (void *)&(link) + +#define LIBXL__QMD_TRACE_HEAD(head) do { \ + (head)->trace.prevline = (head)->trace.lastline; \ + (head)->trace.prevfile = (head)->trace.lastfile; \ + (head)->trace.lastline = __LINE__; \ + (head)->trace.lastfile = __FILE__; \ +} while (0) + +#define LIBXL__QMD_TRACE_ELEM(elem) do { \ + (elem)->trace.prevline = (elem)->trace.lastline; \ + (elem)->trace.prevfile = (elem)->trace.lastfile; \ + (elem)->trace.lastline = __LINE__; \ + (elem)->trace.lastfile = __FILE__; \ +} while (0) + +#else +#define LIBXL__QMD_TRACE_ELEM(elem) +#define LIBXL__QMD_TRACE_HEAD(head) +#define LIBXL__QMD_SAVELINK(name, link) +#define LIBXL__TRACEBUF +#define LIBXL__TRASHIT(x) +#endif /* LIBXL_QUEUE_MACRO_DEBUG */ + +/* + * Singly-linked List declarations. + */ +#define LIBXL_SLIST_HEAD(name, type) \ +struct name { \ + type *slh_first; /* first element */ \ +} + +#define LIBXL_SLIST_HEAD_INITIALIZER(head) \ + { 0 } + +#define LIBXL_SLIST_ENTRY(type) \ +struct { \ + type *sle_next; /* next element */ \ +} + +/* + * Singly-linked List functions. + */ +#define LIBXL_SLIST_EMPTY(head) ((head)->slh_first == 0) + +#define LIBXL_SLIST_FIRST(head) ((head)->slh_first) + +#define LIBXL_SLIST_FOREACH(var, head, field) \ + for ((var) = LIBXL_SLIST_FIRST((head)); \ + (var); \ + (var) = LIBXL_SLIST_NEXT((var), field)) + +#define LIBXL_SLIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIBXL_SLIST_FIRST((head)); \ + (var) && ((tvar) = LIBXL_SLIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIBXL_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ + for ((varp) = &LIBXL_SLIST_FIRST((head)); \ + ((var) = *(varp)) != 0; \ + (varp) = &LIBXL_SLIST_NEXT((var), field)) + +#define LIBXL_SLIST_INIT(head) do { \ + LIBXL_SLIST_FIRST((head)) = 0; \ +} while (0) + +#define LIBXL_SLIST_INSERT_AFTER(slistelm, elm, field) do { \ + LIBXL_SLIST_NEXT((elm), field) = LIBXL_SLIST_NEXT((slistelm), field); \ + LIBXL_SLIST_NEXT((slistelm), field) = (elm); \ +} while (0) + +#define LIBXL_SLIST_INSERT_HEAD(head, elm, field) do { \ + LIBXL_SLIST_NEXT((elm), field) = LIBXL_SLIST_FIRST((head)); \ + LIBXL_SLIST_FIRST((head)) = (elm); \ +} while (0) + +#define LIBXL_SLIST_NEXT(elm, field) ((elm)->field.sle_next) + +#define LIBXL_SLIST_REMOVE(head, elm, type, field) do { \ + LIBXL__QMD_SAVELINK(oldnext, (elm)->field.sle_next); \ + if (LIBXL_SLIST_FIRST((head)) == (elm)) { \ + LIBXL_SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + type *curelm = LIBXL_SLIST_FIRST((head)); \ + while (LIBXL_SLIST_NEXT(curelm, field) != (elm)) \ + curelm = LIBXL_SLIST_NEXT(curelm, field); \ + LIBXL_SLIST_REMOVE_AFTER(curelm, field); \ + } \ + LIBXL__TRASHIT(*oldnext); \ +} while (0) + +#define LIBXL_SLIST_REMOVE_AFTER(elm, field) do { \ + LIBXL_SLIST_NEXT(elm, field) = \ + LIBXL_SLIST_NEXT(LIBXL_SLIST_NEXT(elm, field), field); \ +} while (0) + +#define LIBXL_SLIST_REMOVE_HEAD(head, field) do { \ + LIBXL_SLIST_FIRST((head)) = LIBXL_SLIST_NEXT(LIBXL_SLIST_FIRST((head)), field); \ +} while (0) + +#define LIBXL_SLIST_SWAP(head1, head2, type) do { \ + type *swap_first = LIBXL_SLIST_FIRST(head1); \ + LIBXL_SLIST_FIRST(head1) = LIBXL_SLIST_FIRST(head2); \ + LIBXL_SLIST_FIRST(head2) = swap_first; \ +} while (0) + +/* + * Singly-linked Tail queue declarations. + */ +#define LIBXL_STAILQ_HEAD(name, type) \ +struct name { \ + type *stqh_first;/* first element */ \ + type **stqh_last;/* addr of last next element */ \ +} + +#define LIBXL_STAILQ_HEAD_INITIALIZER(head) \ + { 0, &(head).stqh_first } + +#define LIBXL_STAILQ_ENTRY(type) \ +struct { \ + type *stqe_next; /* next element */ \ +} + +/* + * Singly-linked Tail queue functions. + */ +#define LIBXL_STAILQ_CONCAT(head1, head2) do { \ + if (!LIBXL_STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + LIBXL_STAILQ_INIT((head2)); \ + } \ +} while (0) + +#define LIBXL_STAILQ_EMPTY(head) ((head)->stqh_first == 0) + +#define LIBXL_STAILQ_FIRST(head) ((head)->stqh_first) + +#define LIBXL_STAILQ_FOREACH(var, head, field) \ + for((var) = LIBXL_STAILQ_FIRST((head)); \ + (var); \ + (var) = LIBXL_STAILQ_NEXT((var), field)) + + +#define LIBXL_STAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIBXL_STAILQ_FIRST((head)); \ + (var) && ((tvar) = LIBXL_STAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIBXL_STAILQ_INIT(head) do { \ + LIBXL_STAILQ_FIRST((head)) = 0; \ + (head)->stqh_last = &LIBXL_STAILQ_FIRST((head)); \ +} while (0) + +#define LIBXL_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ + if ((LIBXL_STAILQ_NEXT((elm), field) = LIBXL_STAILQ_NEXT((tqelm), field)) == 0)\ + (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ + LIBXL_STAILQ_NEXT((tqelm), field) = (elm); \ +} while (0) + +#define LIBXL_STAILQ_INSERT_HEAD(head, elm, field) do { \ + if ((LIBXL_STAILQ_NEXT((elm), field) = LIBXL_STAILQ_FIRST((head))) == 0) \ + (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ + LIBXL_STAILQ_FIRST((head)) = (elm); \ +} while (0) + +#define LIBXL_STAILQ_INSERT_TAIL(head, elm, field) do { \ + LIBXL_STAILQ_NEXT((elm), field) = 0; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ +} while (0) + +#define LIBXL_STAILQ_LAST(head, type, field) \ + (LIBXL_STAILQ_EMPTY((head)) ? \ + 0 : \ + ((type *)(void *) \ + ((char *)((head)->stqh_last) - __offsetof(type, field)))) + +#define LIBXL_STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + +#define LIBXL_STAILQ_REMOVE(head, elm, type, field) do { \ + LIBXL__QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \ + if (LIBXL_STAILQ_FIRST((head)) == (elm)) { \ + LIBXL_STAILQ_REMOVE_HEAD((head), field); \ + } \ + else { \ + type *curelm = LIBXL_STAILQ_FIRST((head)); \ + while (LIBXL_STAILQ_NEXT(curelm, field) != (elm)) \ + curelm = LIBXL_STAILQ_NEXT(curelm, field); \ + LIBXL_STAILQ_REMOVE_AFTER(head, curelm, field); \ + } \ + LIBXL__TRASHIT(*oldnext); \ +} while (0) + +#define LIBXL_STAILQ_REMOVE_AFTER(head, elm, field) do { \ + if ((LIBXL_STAILQ_NEXT(elm, field) = \ + LIBXL_STAILQ_NEXT(LIBXL_STAILQ_NEXT(elm, field), field)) == 0) \ + (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ +} while (0) + +#define LIBXL_STAILQ_REMOVE_HEAD(head, field) do { \ + if ((LIBXL_STAILQ_FIRST((head)) = \ + LIBXL_STAILQ_NEXT(LIBXL_STAILQ_FIRST((head)), field)) == 0) \ + (head)->stqh_last = &LIBXL_STAILQ_FIRST((head)); \ +} while (0) + +#define LIBXL_STAILQ_SWAP(head1, head2, type) do { \ + type *swap_first = LIBXL_STAILQ_FIRST(head1); \ + type **swap_last = (head1)->stqh_last; \ + LIBXL_STAILQ_FIRST(head1) = LIBXL_STAILQ_FIRST(head2); \ + (head1)->stqh_last = (head2)->stqh_last; \ + LIBXL_STAILQ_FIRST(head2) = swap_first; \ + (head2)->stqh_last = swap_last; \ + if (LIBXL_STAILQ_EMPTY(head1)) \ + (head1)->stqh_last = &LIBXL_STAILQ_FIRST(head1); \ + if (LIBXL_STAILQ_EMPTY(head2)) \ + (head2)->stqh_last = &LIBXL_STAILQ_FIRST(head2); \ +} while (0) + + +/* + * List declarations. + */ +#define LIBXL_LIST_HEAD(name, type) \ +struct name { \ + type *lh_first; /* first element */ \ +} + +#define LIBXL_LIST_HEAD_INITIALIZER(head) \ + { 0 } + +#define LIBXL_LIST_ENTRY(type) \ +struct { \ + type *le_next; /* next element */ \ + type **le_prev; /* address of previous next element */ \ +} + +/* + * List functions. + */ + +#if (defined(_KERNEL) && defined(INVARIANTS)) +#define LIBXL__QMD_LIST_CHECK_HEAD(head, field) do { \ + if (LIBXL_LIST_FIRST((head)) != 0 && \ + LIBXL_LIST_FIRST((head))->field.le_prev != \ + &LIBXL_LIST_FIRST((head))) \ + panic("Bad list head %p first->prev != head", (head)); \ +} while (0) + +#define LIBXL__QMD_LIST_CHECK_NEXT(elm, field) do { \ + if (LIBXL_LIST_NEXT((elm), field) != 0 && \ + LIBXL_LIST_NEXT((elm), field)->field.le_prev != \ + &((elm)->field.le_next)) \ + panic("Bad link elm %p next->prev != elm", (elm)); \ +} while (0) + +#define LIBXL__QMD_LIST_CHECK_PREV(elm, field) do { \ + if (*(elm)->field.le_prev != (elm)) \ + panic("Bad link elm %p prev->next != elm", (elm)); \ +} while (0) +#else +#define LIBXL__QMD_LIST_CHECK_HEAD(head, field) +#define LIBXL__QMD_LIST_CHECK_NEXT(elm, field) +#define LIBXL__QMD_LIST_CHECK_PREV(elm, field) +#endif /* (_KERNEL && INVARIANTS) */ + +#define LIBXL_LIST_EMPTY(head) ((head)->lh_first == 0) + +#define LIBXL_LIST_FIRST(head) ((head)->lh_first) + +#define LIBXL_LIST_FOREACH(var, head, field) \ + for ((var) = LIBXL_LIST_FIRST((head)); \ + (var); \ + (var) = LIBXL_LIST_NEXT((var), field)) + +#define LIBXL_LIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIBXL_LIST_FIRST((head)); \ + (var) && ((tvar) = LIBXL_LIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIBXL_LIST_INIT(head) do { \ + LIBXL_LIST_FIRST((head)) = 0; \ +} while (0) + +#define LIBXL_LIST_INSERT_AFTER(listelm, elm, field) do { \ + LIBXL__QMD_LIST_CHECK_NEXT(listelm, field); \ + if ((LIBXL_LIST_NEXT((elm), field) = LIBXL_LIST_NEXT((listelm), field)) != 0)\ + LIBXL_LIST_NEXT((listelm), field)->field.le_prev = \ + &LIBXL_LIST_NEXT((elm), field); \ + LIBXL_LIST_NEXT((listelm), field) = (elm); \ + (elm)->field.le_prev = &LIBXL_LIST_NEXT((listelm), field); \ +} while (0) + +#define LIBXL_LIST_INSERT_BEFORE(listelm, elm, field) do { \ + LIBXL__QMD_LIST_CHECK_PREV(listelm, field); \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + LIBXL_LIST_NEXT((elm), field) = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &LIBXL_LIST_NEXT((elm), field); \ +} while (0) + +#define LIBXL_LIST_INSERT_HEAD(head, elm, field) do { \ + LIBXL__QMD_LIST_CHECK_HEAD((head), field); \ + if ((LIBXL_LIST_NEXT((elm), field) = LIBXL_LIST_FIRST((head))) != 0) \ + LIBXL_LIST_FIRST((head))->field.le_prev = &LIBXL_LIST_NEXT((elm), field);\ + LIBXL_LIST_FIRST((head)) = (elm); \ + (elm)->field.le_prev = &LIBXL_LIST_FIRST((head)); \ +} while (0) + +#define LIBXL_LIST_NEXT(elm, field) ((elm)->field.le_next) + +#define LIBXL_LIST_REMOVE(elm, field) do { \ + LIBXL__QMD_SAVELINK(oldnext, (elm)->field.le_next); \ + LIBXL__QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ + LIBXL__QMD_LIST_CHECK_NEXT(elm, field); \ + LIBXL__QMD_LIST_CHECK_PREV(elm, field); \ + if (LIBXL_LIST_NEXT((elm), field) != 0) \ + LIBXL_LIST_NEXT((elm), field)->field.le_prev = \ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = LIBXL_LIST_NEXT((elm), field); \ + LIBXL__TRASHIT(*oldnext); \ + LIBXL__TRASHIT(*oldprev); \ +} while (0) + +#define LIBXL_LIST_SWAP(head1, head2, type, field) do { \ + type *swap_tmp = LIBXL_LIST_FIRST((head1)); \ + LIBXL_LIST_FIRST((head1)) = LIBXL_LIST_FIRST((head2)); \ + LIBXL_LIST_FIRST((head2)) = swap_tmp; \ + if ((swap_tmp = LIBXL_LIST_FIRST((head1))) != 0) \ + swap_tmp->field.le_prev = &LIBXL_LIST_FIRST((head1)); \ + if ((swap_tmp = LIBXL_LIST_FIRST((head2))) != 0) \ + swap_tmp->field.le_prev = &LIBXL_LIST_FIRST((head2)); \ +} while (0) + +/* + * Tail queue declarations. + */ +#define LIBXL_TAILQ_HEAD(name, type) \ +struct name { \ + type *tqh_first; /* first element */ \ + type **tqh_last; /* addr of last next element */ \ + LIBXL__TRACEBUF \ +} + +#define LIBXL_TAILQ_HEAD_INITIALIZER(head) \ + { 0, &(head).tqh_first } + +#define LIBXL_TAILQ_ENTRY(type) \ +struct { \ + type *tqe_next; /* next element */ \ + type **tqe_prev; /* address of previous next element */ \ + LIBXL__TRACEBUF \ +} + +/* + * Tail queue functions. + */ +#if (defined(_KERNEL) && defined(INVARIANTS)) +#define LIBXL__QMD_TAILQ_CHECK_HEAD(head, field) do { \ + if (!LIBXL_TAILQ_EMPTY(head) && \ + LIBXL_TAILQ_FIRST((head))->field.tqe_prev != \ + &LIBXL_TAILQ_FIRST((head))) \ + panic("Bad tailq head %p first->prev != head", (head)); \ +} while (0) + +#define LIBXL__QMD_TAILQ_CHECK_TAIL(head, field) do { \ + if (*(head)->tqh_last != 0) \ + panic("Bad tailq NEXT(%p->tqh_last) != 0", (head)); \ +} while (0) + +#define LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field) do { \ + if (LIBXL_TAILQ_NEXT((elm), field) != 0 && \ + LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev != \ + &((elm)->field.tqe_next)) \ + panic("Bad link elm %p next->prev != elm", (elm)); \ +} while (0) + +#define LIBXL__QMD_TAILQ_CHECK_PREV(elm, field) do { \ + if (*(elm)->field.tqe_prev != (elm)) \ + panic("Bad link elm %p prev->next != elm", (elm)); \ +} while (0) +#else +#define LIBXL__QMD_TAILQ_CHECK_HEAD(head, field) +#define LIBXL__QMD_TAILQ_CHECK_TAIL(head, headname) +#define LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field) +#define LIBXL__QMD_TAILQ_CHECK_PREV(elm, field) +#endif /* (_KERNEL && INVARIANTS) */ + +#define LIBXL_TAILQ_CONCAT(head1, head2, field) do { \ + if (!LIBXL_TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + LIBXL_TAILQ_INIT((head2)); \ + LIBXL__QMD_TRACE_HEAD(head1); \ + LIBXL__QMD_TRACE_HEAD(head2); \ + } \ +} while (0) + +#define LIBXL_TAILQ_EMPTY(head) ((head)->tqh_first == 0) + +#define LIBXL_TAILQ_FIRST(head) ((head)->tqh_first) + +#define LIBXL_TAILQ_FOREACH(var, head, field) \ + for ((var) = LIBXL_TAILQ_FIRST((head)); \ + (var); \ + (var) = LIBXL_TAILQ_NEXT((var), field)) + +#define LIBXL_TAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIBXL_TAILQ_FIRST((head)); \ + (var) && ((tvar) = LIBXL_TAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIBXL_TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = LIBXL_TAILQ_LAST((head), headname); \ + (var); \ + (var) = LIBXL_TAILQ_PREV((var), headname, field)) + +#define LIBXL_TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ + for ((var) = LIBXL_TAILQ_LAST((head), headname); \ + (var) && ((tvar) = LIBXL_TAILQ_PREV((var), headname, field), 1); \ + (var) = (tvar)) + +#define LIBXL_TAILQ_INIT(head) do { \ + LIBXL_TAILQ_FIRST((head)) = 0; \ + (head)->tqh_last = &LIBXL_TAILQ_FIRST((head)); \ + LIBXL__QMD_TRACE_HEAD(head); \ +} while (0) + +#define LIBXL_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + LIBXL__QMD_TAILQ_CHECK_NEXT(listelm, field); \ + if ((LIBXL_TAILQ_NEXT((elm), field) = LIBXL_TAILQ_NEXT((listelm), field)) != 0)\ + LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev = \ + &LIBXL_TAILQ_NEXT((elm), field); \ + else { \ + (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ + LIBXL__QMD_TRACE_HEAD(head); \ + } \ + LIBXL_TAILQ_NEXT((listelm), field) = (elm); \ + (elm)->field.tqe_prev = &LIBXL_TAILQ_NEXT((listelm), field); \ + LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ + LIBXL__QMD_TRACE_ELEM(&listelm->field); \ +} while (0) + +#define LIBXL_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ + LIBXL__QMD_TAILQ_CHECK_PREV(listelm, field); \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + LIBXL_TAILQ_NEXT((elm), field) = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &LIBXL_TAILQ_NEXT((elm), field); \ + LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ + LIBXL__QMD_TRACE_ELEM(&listelm->field); \ +} while (0) + +#define LIBXL_TAILQ_INSERT_HEAD(head, elm, field) do { \ + LIBXL__QMD_TAILQ_CHECK_HEAD(head, field); \ + if ((LIBXL_TAILQ_NEXT((elm), field) = LIBXL_TAILQ_FIRST((head))) != 0) \ + LIBXL_TAILQ_FIRST((head))->field.tqe_prev = \ + &LIBXL_TAILQ_NEXT((elm), field); \ + else \ + (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ + LIBXL_TAILQ_FIRST((head)) = (elm); \ + (elm)->field.tqe_prev = &LIBXL_TAILQ_FIRST((head)); \ + LIBXL__QMD_TRACE_HEAD(head); \ + LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define LIBXL_TAILQ_INSERT_TAIL(head, elm, field) do { \ + LIBXL__QMD_TAILQ_CHECK_TAIL(head, field); \ + LIBXL_TAILQ_NEXT((elm), field) = 0; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ + LIBXL__QMD_TRACE_HEAD(head); \ + LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define LIBXL_TAILQ_LAST(head, headname) \ + (*(((struct headname *)((head)->tqh_last))->tqh_last)) + +#define LIBXL_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) + +#define LIBXL_TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + +#define LIBXL_TAILQ_REMOVE(head, elm, field) do { \ + LIBXL__QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ + LIBXL__QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ + LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field); \ + LIBXL__QMD_TAILQ_CHECK_PREV(elm, field); \ + if ((LIBXL_TAILQ_NEXT((elm), field)) != 0) \ + LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else { \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + LIBXL__QMD_TRACE_HEAD(head); \ + } \ + *(elm)->field.tqe_prev = LIBXL_TAILQ_NEXT((elm), field); \ + LIBXL__TRASHIT(*oldnext); \ + LIBXL__TRASHIT(*oldprev); \ + LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ +} while (0) + +#define LIBXL_TAILQ_SWAP(head1, head2, type, field) do { \ + type *swap_first = (head1)->tqh_first; \ + type **swap_last = (head1)->tqh_last; \ + (head1)->tqh_first = (head2)->tqh_first; \ + (head1)->tqh_last = (head2)->tqh_last; \ + (head2)->tqh_first = swap_first; \ + (head2)->tqh_last = swap_last; \ + if ((swap_first = (head1)->tqh_first) != 0) \ + swap_first->field.tqe_prev = &(head1)->tqh_first; \ + else \ + (head1)->tqh_last = &(head1)->tqh_first; \ + if ((swap_first = (head2)->tqh_first) != 0) \ + swap_first->field.tqe_prev = &(head2)->tqh_first; \ + else \ + (head2)->tqh_last = &(head2)->tqh_first; \ +} while (0) + +#endif /* !LIBXL__SYS_QUEUE_H_ */ diff --git a/SOURCES/_libxl_types.h b/SOURCES/_libxl_types.h new file mode 100644 index 00000000..6131c975 --- /dev/null +++ b/SOURCES/_libxl_types.h @@ -0,0 +1,609 @@ +#ifndef __LIBXL_TYPES_H +#define __LIBXL_TYPES_H + +/* + * DO NOT EDIT. + * + * This file is autogenerated by + * "gentypes.py libxl_types.idl __libxl_types.h __libxl_types_json.h __libxl_types.c" + */ + +typedef enum libxl_domain_type { + LIBXL_DOMAIN_TYPE_INVALID = -1, + LIBXL_DOMAIN_TYPE_HVM = 1, + LIBXL_DOMAIN_TYPE_PV = 2, +} libxl_domain_type; +char *libxl_domain_type_to_json(libxl_ctx *ctx, libxl_domain_type p); +const char *libxl_domain_type_to_string(libxl_domain_type p); +int libxl_domain_type_from_string(const char *s, libxl_domain_type *e); +extern libxl_enum_string_table libxl_domain_type_string_table[]; + +typedef enum libxl_device_model_version { + LIBXL_DEVICE_MODEL_VERSION_UNKNOWN = 0, + LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL = 1, + LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN = 2, +} libxl_device_model_version; +char *libxl_device_model_version_to_json(libxl_ctx *ctx, libxl_device_model_version p); +const char *libxl_device_model_version_to_string(libxl_device_model_version p); +int libxl_device_model_version_from_string(const char *s, libxl_device_model_version *e); +extern libxl_enum_string_table libxl_device_model_version_string_table[]; + +typedef enum libxl_console_type { + LIBXL_CONSOLE_TYPE_UNKNOWN = 0, + LIBXL_CONSOLE_TYPE_SERIAL = 1, + LIBXL_CONSOLE_TYPE_PV = 2, +} libxl_console_type; +char *libxl_console_type_to_json(libxl_ctx *ctx, libxl_console_type p); +const char *libxl_console_type_to_string(libxl_console_type p); +int libxl_console_type_from_string(const char *s, libxl_console_type *e); +extern libxl_enum_string_table libxl_console_type_string_table[]; + +typedef enum libxl_disk_format { + LIBXL_DISK_FORMAT_UNKNOWN = 0, + LIBXL_DISK_FORMAT_QCOW = 1, + LIBXL_DISK_FORMAT_QCOW2 = 2, + LIBXL_DISK_FORMAT_VHD = 3, + LIBXL_DISK_FORMAT_RAW = 4, + LIBXL_DISK_FORMAT_EMPTY = 5, +} libxl_disk_format; +char *libxl_disk_format_to_json(libxl_ctx *ctx, libxl_disk_format p); +const char *libxl_disk_format_to_string(libxl_disk_format p); +int libxl_disk_format_from_string(const char *s, libxl_disk_format *e); +extern libxl_enum_string_table libxl_disk_format_string_table[]; + +typedef enum libxl_disk_backend { + LIBXL_DISK_BACKEND_UNKNOWN = 0, + LIBXL_DISK_BACKEND_PHY = 1, + LIBXL_DISK_BACKEND_TAP = 2, + LIBXL_DISK_BACKEND_QDISK = 3, +} libxl_disk_backend; +char *libxl_disk_backend_to_json(libxl_ctx *ctx, libxl_disk_backend p); +const char *libxl_disk_backend_to_string(libxl_disk_backend p); +int libxl_disk_backend_from_string(const char *s, libxl_disk_backend *e); +extern libxl_enum_string_table libxl_disk_backend_string_table[]; + +typedef enum libxl_nic_type { + LIBXL_NIC_TYPE_UNKNOWN = 0, + LIBXL_NIC_TYPE_VIF_IOEMU = 1, + LIBXL_NIC_TYPE_VIF = 2, +} libxl_nic_type; +char *libxl_nic_type_to_json(libxl_ctx *ctx, libxl_nic_type p); +const char *libxl_nic_type_to_string(libxl_nic_type p); +int libxl_nic_type_from_string(const char *s, libxl_nic_type *e); +extern libxl_enum_string_table libxl_nic_type_string_table[]; + +typedef enum libxl_action_on_shutdown { + LIBXL_ACTION_ON_SHUTDOWN_DESTROY = 1, + LIBXL_ACTION_ON_SHUTDOWN_RESTART = 2, + LIBXL_ACTION_ON_SHUTDOWN_RESTART_RENAME = 3, + LIBXL_ACTION_ON_SHUTDOWN_PRESERVE = 4, + LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_DESTROY = 5, + LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_RESTART = 6, +} libxl_action_on_shutdown; +char *libxl_action_on_shutdown_to_json(libxl_ctx *ctx, libxl_action_on_shutdown p); +const char *libxl_action_on_shutdown_to_string(libxl_action_on_shutdown p); +int libxl_action_on_shutdown_from_string(const char *s, libxl_action_on_shutdown *e); +extern libxl_enum_string_table libxl_action_on_shutdown_string_table[]; + +typedef enum libxl_trigger { + LIBXL_TRIGGER_UNKNOWN = 0, + LIBXL_TRIGGER_POWER = 1, + LIBXL_TRIGGER_SLEEP = 2, + LIBXL_TRIGGER_NMI = 3, + LIBXL_TRIGGER_INIT = 4, + LIBXL_TRIGGER_RESET = 5, + LIBXL_TRIGGER_S3RESUME = 6, +} libxl_trigger; +char *libxl_trigger_to_json(libxl_ctx *ctx, libxl_trigger p); +const char *libxl_trigger_to_string(libxl_trigger p); +int libxl_trigger_from_string(const char *s, libxl_trigger *e); +extern libxl_enum_string_table libxl_trigger_string_table[]; + +typedef enum libxl_tsc_mode { + LIBXL_TSC_MODE_DEFAULT = 0, + LIBXL_TSC_MODE_ALWAYS_EMULATE = 1, + LIBXL_TSC_MODE_NATIVE = 2, + LIBXL_TSC_MODE_NATIVE_PARAVIRT = 3, +} libxl_tsc_mode; +char *libxl_tsc_mode_to_json(libxl_ctx *ctx, libxl_tsc_mode p); +const char *libxl_tsc_mode_to_string(libxl_tsc_mode p); +int libxl_tsc_mode_from_string(const char *s, libxl_tsc_mode *e); +extern libxl_enum_string_table libxl_tsc_mode_string_table[]; + +typedef enum libxl_timer_mode { + LIBXL_TIMER_MODE_UNKNOWN = -1, + LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS = 0, + LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS = 1, + LIBXL_TIMER_MODE_NO_MISSED_TICKS_PENDING = 2, + LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING = 3, +} libxl_timer_mode; +char *libxl_timer_mode_to_json(libxl_ctx *ctx, libxl_timer_mode p); +const char *libxl_timer_mode_to_string(libxl_timer_mode p); +int libxl_timer_mode_from_string(const char *s, libxl_timer_mode *e); +extern libxl_enum_string_table libxl_timer_mode_string_table[]; + +typedef enum libxl_bios_type { + LIBXL_BIOS_TYPE_UNKNOWN = 0, + LIBXL_BIOS_TYPE_ROMBIOS = 1, + LIBXL_BIOS_TYPE_SEABIOS = 2, + LIBXL_BIOS_TYPE_OVMF = 3, +} libxl_bios_type; +char *libxl_bios_type_to_json(libxl_ctx *ctx, libxl_bios_type p); +const char *libxl_bios_type_to_string(libxl_bios_type p); +int libxl_bios_type_from_string(const char *s, libxl_bios_type *e); +extern libxl_enum_string_table libxl_bios_type_string_table[]; + +typedef enum libxl_scheduler { + LIBXL_SCHEDULER_UNKNOWN = 0, + LIBXL_SCHEDULER_SEDF = 4, + LIBXL_SCHEDULER_CREDIT = 5, + LIBXL_SCHEDULER_CREDIT2 = 6, + LIBXL_SCHEDULER_ARINC653 = 7, +} libxl_scheduler; +char *libxl_scheduler_to_json(libxl_ctx *ctx, libxl_scheduler p); +const char *libxl_scheduler_to_string(libxl_scheduler p); +int libxl_scheduler_from_string(const char *s, libxl_scheduler *e); +extern libxl_enum_string_table libxl_scheduler_string_table[]; + +typedef enum libxl_shutdown_reason { + LIBXL_SHUTDOWN_REASON_UNKNOWN = -1, + LIBXL_SHUTDOWN_REASON_POWEROFF = 0, + LIBXL_SHUTDOWN_REASON_REBOOT = 1, + LIBXL_SHUTDOWN_REASON_SUSPEND = 2, + LIBXL_SHUTDOWN_REASON_CRASH = 3, + LIBXL_SHUTDOWN_REASON_WATCHDOG = 4, +} libxl_shutdown_reason; +char *libxl_shutdown_reason_to_json(libxl_ctx *ctx, libxl_shutdown_reason p); +const char *libxl_shutdown_reason_to_string(libxl_shutdown_reason p); +int libxl_shutdown_reason_from_string(const char *s, libxl_shutdown_reason *e); +extern libxl_enum_string_table libxl_shutdown_reason_string_table[]; + +typedef enum libxl_vga_interface_type { + LIBXL_VGA_INTERFACE_TYPE_CIRRUS = 1, + LIBXL_VGA_INTERFACE_TYPE_STD = 2, +} libxl_vga_interface_type; +char *libxl_vga_interface_type_to_json(libxl_ctx *ctx, libxl_vga_interface_type p); +const char *libxl_vga_interface_type_to_string(libxl_vga_interface_type p); +int libxl_vga_interface_type_from_string(const char *s, libxl_vga_interface_type *e); +extern libxl_enum_string_table libxl_vga_interface_type_string_table[]; + +typedef struct libxl_ioport_range { + uint32_t first; + uint32_t number; +} libxl_ioport_range; +void libxl_ioport_range_dispose(libxl_ioport_range *p); +void libxl_ioport_range_init(libxl_ioport_range *p); +char *libxl_ioport_range_to_json(libxl_ctx *ctx, libxl_ioport_range *p); + +typedef struct libxl_vga_interface_info { + libxl_vga_interface_type kind; +} libxl_vga_interface_info; +void libxl_vga_interface_info_dispose(libxl_vga_interface_info *p); +void libxl_vga_interface_info_init(libxl_vga_interface_info *p); +char *libxl_vga_interface_info_to_json(libxl_ctx *ctx, libxl_vga_interface_info *p); + +typedef struct libxl_vnc_info { + libxl_defbool enable; + char * listen; + char * passwd; + int display; + libxl_defbool findunused; +} libxl_vnc_info; +void libxl_vnc_info_dispose(libxl_vnc_info *p); +void libxl_vnc_info_init(libxl_vnc_info *p); +char *libxl_vnc_info_to_json(libxl_ctx *ctx, libxl_vnc_info *p); + +typedef struct libxl_spice_info { + libxl_defbool enable; + int port; + int tls_port; + char * host; + libxl_defbool disable_ticketing; + char * passwd; + libxl_defbool agent_mouse; +} libxl_spice_info; +void libxl_spice_info_dispose(libxl_spice_info *p); +void libxl_spice_info_init(libxl_spice_info *p); +char *libxl_spice_info_to_json(libxl_ctx *ctx, libxl_spice_info *p); + +typedef struct libxl_sdl_info { + libxl_defbool enable; + libxl_defbool opengl; + char * display; + char * xauthority; +} libxl_sdl_info; +void libxl_sdl_info_dispose(libxl_sdl_info *p); +void libxl_sdl_info_init(libxl_sdl_info *p); +char *libxl_sdl_info_to_json(libxl_ctx *ctx, libxl_sdl_info *p); + +typedef struct libxl_dominfo { + libxl_uuid uuid; + libxl_domid domid; + uint32_t ssidref; + bool running; + bool blocked; + bool paused; + bool shutdown; + bool dying; + libxl_shutdown_reason shutdown_reason; + uint64_t current_memkb; + uint64_t shared_memkb; + uint64_t paged_memkb; + uint64_t max_memkb; + uint64_t cpu_time; + uint32_t vcpu_max_id; + uint32_t vcpu_online; + uint32_t cpupool; + libxl_domain_type domain_type; +} libxl_dominfo; +void libxl_dominfo_dispose(libxl_dominfo *p); +void libxl_dominfo_init(libxl_dominfo *p); +char *libxl_dominfo_to_json(libxl_ctx *ctx, libxl_dominfo *p); + +typedef struct libxl_cpupoolinfo { + uint32_t poolid; + libxl_scheduler sched; + uint32_t n_dom; + libxl_bitmap cpumap; +} libxl_cpupoolinfo; +void libxl_cpupoolinfo_dispose(libxl_cpupoolinfo *p); +void libxl_cpupoolinfo_init(libxl_cpupoolinfo *p); +char *libxl_cpupoolinfo_to_json(libxl_ctx *ctx, libxl_cpupoolinfo *p); + +typedef struct libxl_vminfo { + libxl_uuid uuid; + libxl_domid domid; +} libxl_vminfo; +void libxl_vminfo_dispose(libxl_vminfo *p); +void libxl_vminfo_init(libxl_vminfo *p); +char *libxl_vminfo_to_json(libxl_ctx *ctx, libxl_vminfo *p); + +typedef struct libxl_version_info { + int xen_version_major; + int xen_version_minor; + char * xen_version_extra; + char * compiler; + char * compile_by; + char * compile_domain; + char * compile_date; + char * capabilities; + char * changeset; + uint64_t virt_start; + int pagesize; + char * commandline; +} libxl_version_info; +void libxl_version_info_dispose(libxl_version_info *p); +void libxl_version_info_init(libxl_version_info *p); +char *libxl_version_info_to_json(libxl_ctx *ctx, libxl_version_info *p); + +typedef struct libxl_domain_create_info { + libxl_domain_type type; + libxl_defbool hap; + libxl_defbool oos; + uint32_t ssidref; + char * name; + libxl_uuid uuid; + libxl_key_value_list xsdata; + libxl_key_value_list platformdata; + uint32_t poolid; + libxl_defbool run_hotplug_scripts; +} libxl_domain_create_info; +void libxl_domain_create_info_dispose(libxl_domain_create_info *p); +void libxl_domain_create_info_init(libxl_domain_create_info *p); +char *libxl_domain_create_info_to_json(libxl_ctx *ctx, libxl_domain_create_info *p); + +typedef struct libxl_domain_sched_params { + libxl_scheduler sched; + int weight; + int cap; + int period; + int slice; + int latency; + int extratime; +} libxl_domain_sched_params; +void libxl_domain_sched_params_dispose(libxl_domain_sched_params *p); +void libxl_domain_sched_params_init(libxl_domain_sched_params *p); +char *libxl_domain_sched_params_to_json(libxl_ctx *ctx, libxl_domain_sched_params *p); + +typedef struct libxl_domain_build_info { + int max_vcpus; + libxl_bitmap avail_vcpus; + libxl_bitmap cpumap; + libxl_defbool numa_placement; + libxl_tsc_mode tsc_mode; + uint64_t max_memkb; + uint64_t target_memkb; + uint64_t video_memkb; + uint64_t shadow_memkb; + uint32_t rtc_timeoffset; + libxl_defbool localtime; + libxl_defbool disable_migrate; + libxl_cpuid_policy_list cpuid; + char * blkdev_start; + libxl_device_model_version device_model_version; + libxl_defbool device_model_stubdomain; + char * device_model; + uint32_t device_model_ssidref; + libxl_string_list extra; + libxl_string_list extra_pv; + libxl_string_list extra_hvm; + libxl_domain_sched_params sched_params; + int num_ioports; + libxl_ioport_range * ioports; + int num_irqs; + uint32_t * irqs; + libxl_domain_type type; + union { + struct { + char * firmware; + libxl_bios_type bios; + libxl_defbool pae; + libxl_defbool apic; + libxl_defbool acpi; + libxl_defbool acpi_s3; + libxl_defbool acpi_s4; + libxl_defbool nx; + libxl_defbool viridian; + char * timeoffset; + libxl_defbool hpet; + libxl_defbool vpt_align; + libxl_timer_mode timer_mode; + libxl_defbool nested_hvm; + libxl_defbool nographic; + libxl_vga_interface_info vga; + libxl_vnc_info vnc; + char * keymap; + libxl_sdl_info sdl; + libxl_spice_info spice; + libxl_defbool gfx_passthru; + char * serial; + char * boot; + libxl_defbool usb; + char * usbdevice; + char * soundhw; + libxl_defbool xen_platform_pci; + } hvm; + struct { + char * kernel; + uint64_t slack_memkb; + char * bootloader; + libxl_string_list bootloader_args; + char * cmdline; + char * ramdisk; + const char * features; + libxl_defbool e820_host; + } pv; + } u; +} libxl_domain_build_info; +void libxl_domain_build_info_dispose(libxl_domain_build_info *p); +void libxl_domain_build_info_init(libxl_domain_build_info *p); +void libxl_domain_build_info_init_type(libxl_domain_build_info *p, libxl_domain_type type); +char *libxl_domain_build_info_to_json(libxl_ctx *ctx, libxl_domain_build_info *p); + +typedef struct libxl_device_vfb { + libxl_domid backend_domid; + libxl_devid devid; + libxl_vnc_info vnc; + libxl_sdl_info sdl; + char * keymap; +} libxl_device_vfb; +void libxl_device_vfb_dispose(libxl_device_vfb *p); +void libxl_device_vfb_init(libxl_device_vfb *p); +char *libxl_device_vfb_to_json(libxl_ctx *ctx, libxl_device_vfb *p); + +typedef struct libxl_device_vkb { + libxl_domid backend_domid; + libxl_devid devid; +} libxl_device_vkb; +void libxl_device_vkb_dispose(libxl_device_vkb *p); +void libxl_device_vkb_init(libxl_device_vkb *p); +char *libxl_device_vkb_to_json(libxl_ctx *ctx, libxl_device_vkb *p); + +typedef struct libxl_device_disk { + libxl_domid backend_domid; + char * pdev_path; + char * vdev; + libxl_disk_backend backend; + libxl_disk_format format; + char * script; + int removable; + int readwrite; + int is_cdrom; +} libxl_device_disk; +void libxl_device_disk_dispose(libxl_device_disk *p); +void libxl_device_disk_init(libxl_device_disk *p); +char *libxl_device_disk_to_json(libxl_ctx *ctx, libxl_device_disk *p); + +typedef struct libxl_device_nic { + libxl_domid backend_domid; + libxl_devid devid; + int mtu; + char * model; + libxl_mac mac; + char * ip; + char * bridge; + char * ifname; + char * script; + libxl_nic_type nictype; + uint64_t rate_bytes_per_interval; + uint32_t rate_interval_usecs; +} libxl_device_nic; +void libxl_device_nic_dispose(libxl_device_nic *p); +void libxl_device_nic_init(libxl_device_nic *p); +char *libxl_device_nic_to_json(libxl_ctx *ctx, libxl_device_nic *p); + +typedef struct libxl_device_pci { + uint8_t func; + uint8_t dev; + uint8_t bus; + int domain; + uint32_t vdevfn; + uint32_t vfunc_mask; + bool msitranslate; + bool power_mgmt; + bool permissive; +} libxl_device_pci; +void libxl_device_pci_dispose(libxl_device_pci *p); +void libxl_device_pci_init(libxl_device_pci *p); +char *libxl_device_pci_to_json(libxl_ctx *ctx, libxl_device_pci *p); + +typedef struct libxl_domain_config { + libxl_domain_create_info c_info; + libxl_domain_build_info b_info; + int num_disks; + libxl_device_disk * disks; + int num_nics; + libxl_device_nic * nics; + int num_pcidevs; + libxl_device_pci * pcidevs; + int num_vfbs; + libxl_device_vfb * vfbs; + int num_vkbs; + libxl_device_vkb * vkbs; + libxl_action_on_shutdown on_poweroff; + libxl_action_on_shutdown on_reboot; + libxl_action_on_shutdown on_watchdog; + libxl_action_on_shutdown on_crash; +} libxl_domain_config; +void libxl_domain_config_dispose(libxl_domain_config *p); +void libxl_domain_config_init(libxl_domain_config *p); +char *libxl_domain_config_to_json(libxl_ctx *ctx, libxl_domain_config *p); + +typedef struct libxl_diskinfo { + char * backend; + uint32_t backend_id; + char * frontend; + uint32_t frontend_id; + libxl_devid devid; + int state; + int evtch; + int rref; +} libxl_diskinfo; +void libxl_diskinfo_dispose(libxl_diskinfo *p); +void libxl_diskinfo_init(libxl_diskinfo *p); +char *libxl_diskinfo_to_json(libxl_ctx *ctx, libxl_diskinfo *p); + +typedef struct libxl_nicinfo { + char * backend; + uint32_t backend_id; + char * frontend; + uint32_t frontend_id; + libxl_devid devid; + int state; + int evtch; + int rref_tx; + int rref_rx; +} libxl_nicinfo; +void libxl_nicinfo_dispose(libxl_nicinfo *p); +void libxl_nicinfo_init(libxl_nicinfo *p); +char *libxl_nicinfo_to_json(libxl_ctx *ctx, libxl_nicinfo *p); + +typedef struct libxl_vcpuinfo { + uint32_t vcpuid; + uint32_t cpu; + bool online; + bool blocked; + bool running; + uint64_t vcpu_time; + libxl_bitmap cpumap; +} libxl_vcpuinfo; +void libxl_vcpuinfo_dispose(libxl_vcpuinfo *p); +void libxl_vcpuinfo_init(libxl_vcpuinfo *p); +char *libxl_vcpuinfo_to_json(libxl_ctx *ctx, libxl_vcpuinfo *p); + +typedef struct libxl_physinfo { + uint32_t threads_per_core; + uint32_t cores_per_socket; + uint32_t max_cpu_id; + uint32_t nr_cpus; + uint32_t cpu_khz; + uint64_t total_pages; + uint64_t free_pages; + uint64_t scrub_pages; + uint64_t sharing_freed_pages; + uint64_t sharing_used_frames; + uint32_t nr_nodes; + libxl_hwcap hw_cap; + bool cap_hvm; + bool cap_hvm_directio; +} libxl_physinfo; +void libxl_physinfo_dispose(libxl_physinfo *p); +void libxl_physinfo_init(libxl_physinfo *p); +char *libxl_physinfo_to_json(libxl_ctx *ctx, libxl_physinfo *p); + +typedef struct libxl_numainfo { + uint64_t size; + uint64_t free; + int num_dists; + uint32_t * dists; +} libxl_numainfo; +void libxl_numainfo_dispose(libxl_numainfo *p); +void libxl_numainfo_init(libxl_numainfo *p); +char *libxl_numainfo_to_json(libxl_ctx *ctx, libxl_numainfo *p); + +typedef struct libxl_cputopology { + uint32_t core; + uint32_t socket; + uint32_t node; +} libxl_cputopology; +void libxl_cputopology_dispose(libxl_cputopology *p); +void libxl_cputopology_init(libxl_cputopology *p); +char *libxl_cputopology_to_json(libxl_ctx *ctx, libxl_cputopology *p); + +typedef struct libxl_sched_credit_params { + int tslice_ms; + int ratelimit_us; +} libxl_sched_credit_params; +void libxl_sched_credit_params_init(libxl_sched_credit_params *p); +char *libxl_sched_credit_params_to_json(libxl_ctx *ctx, libxl_sched_credit_params *p); + +typedef struct libxl_domain_remus_info { + int interval; + bool blackhole; + bool compression; +} libxl_domain_remus_info; +void libxl_domain_remus_info_dispose(libxl_domain_remus_info *p); +void libxl_domain_remus_info_init(libxl_domain_remus_info *p); +char *libxl_domain_remus_info_to_json(libxl_ctx *ctx, libxl_domain_remus_info *p); + +typedef enum libxl_event_type { + LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN = 1, + LIBXL_EVENT_TYPE_DOMAIN_DEATH = 2, + LIBXL_EVENT_TYPE_DISK_EJECT = 3, + LIBXL_EVENT_TYPE_OPERATION_COMPLETE = 4, + LIBXL_EVENT_TYPE_DOMAIN_CREATE_CONSOLE_AVAILABLE = 5, +} libxl_event_type; +char *libxl_event_type_to_json(libxl_ctx *ctx, libxl_event_type p); +const char *libxl_event_type_to_string(libxl_event_type p); +int libxl_event_type_from_string(const char *s, libxl_event_type *e); +extern libxl_enum_string_table libxl_event_type_string_table[]; + +typedef struct libxl_event { + libxl_ev_link link; + libxl_domid domid; + libxl_uuid domuuid; + uint64_t for_user; + libxl_event_type type; + union { + struct { + uint8_t shutdown_reason; + } domain_shutdown; + struct { + } domain_death; + struct { + char * vdev; + libxl_device_disk disk; + } disk_eject; + struct { + int rc; + } operation_complete; + struct { + } domain_create_console_available; + } u; +} libxl_event; +void libxl_event_dispose(libxl_event *p); +void libxl_event_init(libxl_event *p); +void libxl_event_init_type(libxl_event *p, libxl_event_type type); +char *libxl_event_to_json(libxl_ctx *ctx, libxl_event *p); + +#endif /* __LIBXL_TYPES_H */ diff --git a/SOURCES/_libxl_types_json.h b/SOURCES/_libxl_types_json.h new file mode 100644 index 00000000..9b0cffd1 --- /dev/null +++ b/SOURCES/_libxl_types_json.h @@ -0,0 +1,54 @@ +#ifndef __LIBXL_TYPES_JSON_H +#define __LIBXL_TYPES_JSON_H + +/* + * DO NOT EDIT. + * + * This file is autogenerated by + * "gentypes.py libxl_types.idl __libxl_types.h __libxl_types_json.h __libxl_types.c" + */ + +yajl_gen_status libxl_domain_type_gen_json(yajl_gen hand, libxl_domain_type *p); +yajl_gen_status libxl_device_model_version_gen_json(yajl_gen hand, libxl_device_model_version *p); +yajl_gen_status libxl_console_type_gen_json(yajl_gen hand, libxl_console_type *p); +yajl_gen_status libxl_disk_format_gen_json(yajl_gen hand, libxl_disk_format *p); +yajl_gen_status libxl_disk_backend_gen_json(yajl_gen hand, libxl_disk_backend *p); +yajl_gen_status libxl_nic_type_gen_json(yajl_gen hand, libxl_nic_type *p); +yajl_gen_status libxl_action_on_shutdown_gen_json(yajl_gen hand, libxl_action_on_shutdown *p); +yajl_gen_status libxl_trigger_gen_json(yajl_gen hand, libxl_trigger *p); +yajl_gen_status libxl_tsc_mode_gen_json(yajl_gen hand, libxl_tsc_mode *p); +yajl_gen_status libxl_timer_mode_gen_json(yajl_gen hand, libxl_timer_mode *p); +yajl_gen_status libxl_bios_type_gen_json(yajl_gen hand, libxl_bios_type *p); +yajl_gen_status libxl_scheduler_gen_json(yajl_gen hand, libxl_scheduler *p); +yajl_gen_status libxl_shutdown_reason_gen_json(yajl_gen hand, libxl_shutdown_reason *p); +yajl_gen_status libxl_vga_interface_type_gen_json(yajl_gen hand, libxl_vga_interface_type *p); +yajl_gen_status libxl_ioport_range_gen_json(yajl_gen hand, libxl_ioport_range *p); +yajl_gen_status libxl_vga_interface_info_gen_json(yajl_gen hand, libxl_vga_interface_info *p); +yajl_gen_status libxl_vnc_info_gen_json(yajl_gen hand, libxl_vnc_info *p); +yajl_gen_status libxl_spice_info_gen_json(yajl_gen hand, libxl_spice_info *p); +yajl_gen_status libxl_sdl_info_gen_json(yajl_gen hand, libxl_sdl_info *p); +yajl_gen_status libxl_dominfo_gen_json(yajl_gen hand, libxl_dominfo *p); +yajl_gen_status libxl_cpupoolinfo_gen_json(yajl_gen hand, libxl_cpupoolinfo *p); +yajl_gen_status libxl_vminfo_gen_json(yajl_gen hand, libxl_vminfo *p); +yajl_gen_status libxl_version_info_gen_json(yajl_gen hand, libxl_version_info *p); +yajl_gen_status libxl_domain_create_info_gen_json(yajl_gen hand, libxl_domain_create_info *p); +yajl_gen_status libxl_domain_sched_params_gen_json(yajl_gen hand, libxl_domain_sched_params *p); +yajl_gen_status libxl_domain_build_info_gen_json(yajl_gen hand, libxl_domain_build_info *p); +yajl_gen_status libxl_device_vfb_gen_json(yajl_gen hand, libxl_device_vfb *p); +yajl_gen_status libxl_device_vkb_gen_json(yajl_gen hand, libxl_device_vkb *p); +yajl_gen_status libxl_device_disk_gen_json(yajl_gen hand, libxl_device_disk *p); +yajl_gen_status libxl_device_nic_gen_json(yajl_gen hand, libxl_device_nic *p); +yajl_gen_status libxl_device_pci_gen_json(yajl_gen hand, libxl_device_pci *p); +yajl_gen_status libxl_domain_config_gen_json(yajl_gen hand, libxl_domain_config *p); +yajl_gen_status libxl_diskinfo_gen_json(yajl_gen hand, libxl_diskinfo *p); +yajl_gen_status libxl_nicinfo_gen_json(yajl_gen hand, libxl_nicinfo *p); +yajl_gen_status libxl_vcpuinfo_gen_json(yajl_gen hand, libxl_vcpuinfo *p); +yajl_gen_status libxl_physinfo_gen_json(yajl_gen hand, libxl_physinfo *p); +yajl_gen_status libxl_numainfo_gen_json(yajl_gen hand, libxl_numainfo *p); +yajl_gen_status libxl_cputopology_gen_json(yajl_gen hand, libxl_cputopology *p); +yajl_gen_status libxl_sched_credit_params_gen_json(yajl_gen hand, libxl_sched_credit_params *p); +yajl_gen_status libxl_domain_remus_info_gen_json(yajl_gen hand, libxl_domain_remus_info *p); +yajl_gen_status libxl_event_type_gen_json(yajl_gen hand, libxl_event_type *p); +yajl_gen_status libxl_event_gen_json(yajl_gen hand, libxl_event *p); + +#endif /* __LIBXL_TYPES_JSON_H */ diff --git a/SOURCES/libxl.h b/SOURCES/libxl.h new file mode 100644 index 00000000..79ffe44d --- /dev/null +++ b/SOURCES/libxl.h @@ -0,0 +1,938 @@ +/* + * Copyright (C) 2009 Citrix Ltd. + * Author Vincent Hanquez + * + * This program 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; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program 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. + */ + +#define OCAML_READY + +/* + * libxl API compatibility + * + * From Xen 4.2 onwards the API of libxl will be maintained in a + * stable manner. This means that it should be possible to write an + * application against the API provided by libxl in Xen 4.2 and expect + * that it will continue to compile against future versions of Xen + * without source modification. + * + * In order to make such compatibility possible it is required that + * application which want to be exposed to a particular API #define + * LIBXL_API_VERSION before including libxl.h or any other libxl + * header. The syntax of the LIBXL_API_VERSION is: + * 0xVVSSEE + * where ($(XEN_xxx) from xen/Makefile): + * VV is the Xen major release number, $(XEN_VERSION) + * SS is the Xen sub version number, $(XEN_SUBVERSION) + * EE is the Xen extra version digit, first numeric part of + * $(XEN_EXTRAVERSION) not including the leading "." + * For example the first stable API version, supported by Xen 4.2.0, + * is 0x040200. + * + * Lack of LIBXL_API_VERSION means "the latest" which will + * change. Specifying an unknown LIBXL_API_VERSION will result in a + * compile time error. + * + * Identical versions of the libxl API will represented by the version + * containing the earliest instance of that API. e.g. if 4.2.0 and + * 4.3.0 contain an identical libxl API then only LIBXL_API_VERSION + * 0x040200 will be valid. + * + * We will try especially hard to avoid changing the API during a + * stable series, i.e. it should be unusual for the last byte of + * LIBXL_API_VERSION to be non-zero. + * + * In the event that a change is required which cannot be made + * backwards compatible in this manner a #define of the form + * LIBXL_HAVE_ will always be added in order to make it + * possible to write applciations which build against any version of + * libxl. Such changes are expected to be exceptional and used as a + * last resort. The barrier for backporting such a change to a stable + * branch will be very high. + * + * These guarantees apply only to stable releases of Xen. When an + * incompatible change is made in the unstable tree then + * LIBXL_API_VERSION will be bumped to the next expected stable + * release number on the first such change only. Applications which + * want to support building against Xen unstable are expected to track + * API changes in that tree until it is released as a stable release. + * + * API compatibility will be maintained for all versions of Xen using + * the same $(XEN_VERSION) (e.g. throughout a major release). + */ + +/* + * libxl ABI compatibility + * + * The only guarantee which libxl makes regarding ABI compatibility + * across releases is that the SONAME will always be bumped whenever + * the ABI is changed in an incompatible way. + * + * This applies within stable branches as well as + * development branches. It is possible that a new stable release of + * Xen may require a rebuild of applications using the + * library. However per the API compatibility gaurantees such a + * rebuild should not normally require any source level changes. + * + * As with the API compatiblity the SONAME will only be bumped for the + * first ABI incompatible change in a development branch. + */ + +/* + * libxl memory management + * + * From the point of view of the application (ie, libxl's caller), + * struct libxl_ctx* is threadsafe, and all returned allocated + * structures are obtained from malloc(), and must be freed by the + * caller either directly or by calling an appropriate free function + * provided by libxl. Ie the application does not get automatic + * assistance from libxl in managing these allocations. + * + * Specific details are in the header comments which should be found + * in libxl.h or libxlutil.h, next to the relevant function + * declarations. + * + * Internally, libxl has a garbage collection scheme which allows much libxl + * code to allocate strings etc. for internal use without needing to + * free them. These are called "temporary allocations". + * + * The pool for these temporary allocations, along with any other + * thread-specific data which is private to libxl but shared between + * libxl functions (such as the current xenstore transaction), is + * stored in the "gc context" which is a special enhanced context + * structure allocated automatically by convenience macros at every + * entry to libxl. + * + * Every libxl function falls into one of these categories: + * + * 1. Public functions (declared in libxl.h, libxlutil.h), which may + * be called by libxl applications. If a public function returns + * any allocated object to its caller, that object must have come + * from malloc. + * + * The definitions of public functions MUST use the gc context + * initialisation macros (or do the equivalent work themselves). + * These macros will ensure that all temporary allocations will be + * automatically freed before the function returns to its caller. + * + * A public function may be called from within libxl; the call + * context initialisation macros will make sure that the internal + * caller's context is reused (eg, so that the same xenstore + * transaction is used). But in-libxl callers of libxl public + * functions should note that any libxl public function may cause + * recursively reentry into libxl via the application's event + * callback hook. + * + * Public functions have names like libxl_foobar. + * + * 2. Private functions, which may not be called by libxl + * applications; they are not declared in libxl.h or libxlutil.h + * and they may not be called other than by other libxl functions. + * + * Private functions should not use the gc context initialisation + * macros. + * + * Private functions have names like libxl__foobar (NB, two underscores). + * Also the declaration of such functions must be preceeded by the _hidden + * macro. + * + * Allocations made by a libxl function fall into one of the following + * categories (where "object" includes any memory allocation): + * + * (a) Objects which are not returned to the function's caller. + * These should be allocated from the temporary pool. + * + * (b) Objects which are intended for return to the calling + * application. This includes all allocated objects returned by + * any public function. + * + * It may also include objects allocated by an internal function + * specifically for eventual return by the function's external + * callers, but this situation should be clearly documented in + * comments. + * + * These should be allocated from malloc() et al. and comments + * near the function declaration should explain the memory + * ownership. If a simple free() by the application is not + * sufficient, a suitable public freeing function should be + * provided. + * + * (c) Internal objects whose size and/or lifetime dictate explicit + * memory management within libxl. This includes objects which + * will be embedded in opaque structures which will be returned to + * the libxl caller (more generally, any internal object whose + * lifetime exceeds the libxl entrypoint which creates it) and + * objects which are so large or numerous that explicit memory + * management is required. + * + * These should be allocated from malloc() et al., and freed + * explicitly at the appropriate point. The situation should be + * documented in comments. + * + * (d) Objects which are allocated by internal-only functions and + * returned to the function's (therefore, internal) caller but are + * strictly for internal use by other parts of libxl. These + * should be allocated from the temporary pool. + * + * Where a function's primary purpose is to return such an object, + * it should have a libxl__gc * as it's first argument. + * + * Note that there are two ways to change an allocation from this + * category to the "public" category. Either the implementation + * is kept internal and a wrapper function duplicates all memory + * allocations so that they are suitable for return to external + * callers or the implementation uses plain malloc() et al calls + * and an internal wrapper adds the relevant pointers to the gc. + * The latter method is preferred for obvious performance reasons. + * + * No temporary objects allocated from the pool may be explicitly freed. + * Therefore public functions which initialize a libxl__gc MUST call + * libxl__free_all() before returning. + * + * Memory allocation failures are not handled gracefully. If malloc + * (or realloc) fails, libxl will cause the entire process to print + * a message to stderr and exit with status 255. + */ +/* + * libxl types + * + * Most libxl types are defined by the libxl IDL (see + * libxl_types.idl). The library provides a common set of methods for + * initialising and freeing these types. + * + * void libxl__init( *p): + * + * Initialises the members of "p" to all defaults. These may either + * be special value which indicates to the library that it should + * select an appropriate default when using this field or actual + * default values. + * + * Some fields within a data type (e.g. unions) cannot be sensibly + * initialised without further information. In these cases a + * separate subfield initialisation function is provided (see + * below). + * + * An instance which has been initialised using this method can + * always be safely passed to the dispose function (see + * below). This is true even if the data type contains fields which + * require a separate call to a subfield initialisation function. + * + * This method is provided for any aggregate type which is used as + * an input parameter. + * + * void libxl__init_( *p, subfield): + * + * Initialise those parts of "p" which are not initialised by the + * main init function due to the unknown value of "subfield". Sets + * p->subfield as well as initialising any fields to their default + * values. + * + * p->subfield must not have been previously initialised. + * + * This method is provided for any aggregate type. + * + * void libxl__dispose(instance *p): + * + * Frees any dynamically allocated memory used by the members of + * "p" but not the storage used by "p" itself (this allows for the + * allocation of arrays of types and for the composition of types). + */ +#ifndef LIBXL_H +#define LIBXL_H + +#include +#include +#include +#include +#include +#include +#include /* for pid_t */ + +#include + +#include +#include <_libxl_list.h> + +/* API compatibility. Only 0x040200 is supported at this time. */ +#ifdef LIBXL_API_VERSION +#if LIBXL_API_VERSION != 0x040200 +#error Unknown LIBXL_API_VERSION +#endif +#endif + +/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be + * called from within libxl itself. Callers outside libxl, who + * do not #include libxl_internal.h, are fine. */ +#ifndef LIBXL_EXTERNAL_CALLERS_ONLY +#define LIBXL_EXTERNAL_CALLERS_ONLY /* disappears for callers outside libxl */ +#endif + +typedef uint8_t libxl_mac[6]; +#define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" +#define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */ +#define LIBXL_MAC_BYTES(mac) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] + +typedef char **libxl_string_list; +void libxl_string_list_dispose(libxl_string_list *sl); +int libxl_string_list_length(const libxl_string_list *sl); + +typedef char **libxl_key_value_list; +void libxl_key_value_list_dispose(libxl_key_value_list *kvl); + +typedef uint32_t libxl_hwcap[8]; + +typedef uint64_t libxl_ev_user; + +typedef struct { + uint32_t size; /* number of bytes in map */ + uint8_t *map; +} libxl_bitmap; +void libxl_bitmap_init(libxl_bitmap *map); +void libxl_bitmap_dispose(libxl_bitmap *map); + +/* libxl_cpuid_policy_list is a dynamic array storing CPUID policies + * for multiple leafs. It is terminated with an entry holding + * XEN_CPUID_INPUT_UNUSED in input[0] + */ +typedef struct libxl__cpuid_policy libxl_cpuid_policy; +typedef libxl_cpuid_policy * libxl_cpuid_policy_list; +void libxl_cpuid_dispose(libxl_cpuid_policy_list *cpuid_list); + +#define LIBXL_PCI_FUNC_ALL (~0U) + +typedef uint32_t libxl_domid; +typedef int libxl_devid; + +/* + * Formatting Enumerations. + * + * Each enumeration type libxl_E declares an associated lookup table + * libxl_E_string_table and a lookup function libxl_E_from_string. + */ +typedef struct { + const char *s; + int v; +} libxl_enum_string_table; + +struct libxl_event; +typedef LIBXL_TAILQ_ENTRY(struct libxl_event) libxl_ev_link; + +/* + * A boolean variable with an explicit default state. + * + * Users should treat this struct as opaque and use the following + * defined macros and accessor functions. + * + * To allow users of the library to naively select all defaults this + * state is represented as 0. False is < 0 and True is > 0. + */ +typedef struct { + int val; +} libxl_defbool; + +void libxl_defbool_set(libxl_defbool *db, bool b); +/* Resets to default */ +void libxl_defbool_unset(libxl_defbool *db); +/* Sets db only if it is currently == default */ +void libxl_defbool_setdefault(libxl_defbool *db, bool b); +bool libxl_defbool_is_default(libxl_defbool db); +/* db must not be == default */ +bool libxl_defbool_val(libxl_defbool db); + +const char *libxl_defbool_to_string(libxl_defbool b); + +typedef struct libxl__ctx libxl_ctx; + +#define LIBXL_TIMER_MODE_DEFAULT -1 +#define LIBXL_MEMKB_DEFAULT ~0ULL + +#include "_libxl_types.h" + +const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx); + +enum { + ERROR_NONSPECIFIC = -1, + ERROR_VERSION = -2, + ERROR_FAIL = -3, + ERROR_NI = -4, + ERROR_NOMEM = -5, + ERROR_INVAL = -6, + ERROR_BADFAIL = -7, + ERROR_GUEST_TIMEDOUT = -8, + ERROR_TIMEDOUT = -9, + ERROR_NOPARAVIRT = -10, + ERROR_NOT_READY = -11, + ERROR_OSEVENT_REG_FAIL = -12, + ERROR_BUFFERFULL = -13, + ERROR_UNKNOWN_CHILD = -14, +}; + + +/* + * Some libxl operations can take a long time. These functions take a + * parameter to control their concurrency: + * libxl_asyncop_how *ao_how + * + * If ao_how==NULL, the function will be synchronous. + * + * If ao_how!=NULL, the function will set the operation going, and if + * this is successful will return 0. In this case the zero error + * response does NOT mean that the operation was successful; it just + * means that it has been successfully started. It will finish later, + * perhaps with an error. + * + * If ao_how->callback!=NULL, the callback will be called when the + * operation completes. The same rules as for libxl_event_hooks + * apply, including the reentrancy rules and the possibility of + * "disaster", except that libxl calls ao_how->callback instead of + * libxl_event_hooks.event_occurs. (See libxl_event.h.) + * + * If ao_how->callback==NULL, a libxl_event will be generated which + * can be obtained from libxl_event_wait or libxl_event_check. The + * event will have type OPERATION_COMPLETE (which is not used + * elsewhere). + * + * Note that it is possible for an asynchronous operation which is to + * result in a callback to complete during its initiating function + * call. In this case the initiating function will return 0 + * indicating the at the operation is "in progress", even though by + * the time it returns the operation is complete and the callback has + * already happened. + * + * The application must set and use ao_how->for_event (which will be + * copied into libxl_event.for_user) or ao_how->for_callback (passed + * to the callback) to determine which operation finished, and it must + * of course check the rc value for errors. + * + * *ao_how does not need to remain valid after the initiating function + * returns. All other parameters must remain valid for the lifetime of + * the asynchronous operation, unless otherwise specified. + * + * Callbacks may occur on any thread in which the application calls + * libxl. + */ + +typedef struct { + void (*callback)(libxl_ctx *ctx, int rc, void *for_callback); + union { + libxl_ev_user for_event; /* used if callback==NULL */ + void *for_callback; /* passed to callback */ + } u; +} libxl_asyncop_how; + +/* + * Some more complex asynchronous operations can report intermediate + * progress. How this is to be reported is controlled, for each + * function, by a parameter + * libxl_asyncprogress_how *aop_FOO_how; + * for each kind of progress FOO supported by that function. Each + * such kind of progress is associated with an event type. + * + * The function description will document whether, when, and how + * many times, the intermediate progress will be reported, and + * what the corresponding event type(s) are. + * + * If aop_FOO_how==NULL, intermediate progress reports are discarded. + * + * If aop_FOO_how->callback==NULL, intermediate progress reports + * generate libxl events which can be obtained from libxl_event_wait + * or libxl_event_check. + * + * If aop_FOO_how->callback!=NULL, libxl will report intermediate + * progress by calling callback(ctx, &event, for_callback). + * + * The rules for these events are otherwise the same as those for + * ordinary events. The reentrancy and threading rules for the + * callback are the same as those for ao completion callbacks. + * + * Note that the callback, if provided, is responsible for freeing + * the event. + * + * If callbacks are requested, they will be made, and returned, before + * the long-running libxl operation is considered finished (so if the + * long-running libxl operation was invoked with ao_how==NULL then any + * callbacks will occur strictly before the long-running operation + * returns). However, the callbacks may occur on any thread. + * + * In general, otherwise, no promises are made about the relative + * order of callbacks in a multithreaded program. In particular + * different callbacks relating to the same long-running operation may + * be delivered out of order. + */ + +typedef struct { + void (*callback)(libxl_ctx *ctx, libxl_event*, void *for_callback); + libxl_ev_user for_event; /* always used */ + void *for_callback; /* passed to callback */ +} libxl_asyncprogress_how; + +#define LIBXL_VERSION 0 + +/* context functions */ +int libxl_ctx_alloc(libxl_ctx **pctx, int version, + unsigned flags /* none currently defined */, + xentoollog_logger *lg); +int libxl_ctx_free(libxl_ctx *ctx /* 0 is OK */); + +/* domain related functions */ + +int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config, + uint32_t *domid, + const libxl_asyncop_how *ao_how, + const libxl_asyncprogress_how *aop_console_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config, + uint32_t *domid, int restore_fd, + const libxl_asyncop_how *ao_how, + const libxl_asyncprogress_how *aop_console_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + /* A progress report will be made via ao_console_how, of type + * domain_create_console_available, when the domain's primary + * console is available and can be connected to. + */ + +void libxl_domain_config_init(libxl_domain_config *d_config); +void libxl_domain_config_dispose(libxl_domain_config *d_config); + +int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, + int flags, /* LIBXL_SUSPEND_* */ + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +#define LIBXL_SUSPEND_DEBUG 1 +#define LIBXL_SUSPEND_LIVE 2 + +/* @param suspend_cancel [from xenctrl.h:xc_domain_resume( @param fast )] + * If this parameter is true, use co-operative resume. The guest + * must support this. + */ +int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, + uint32_t domid, int send_fd, int recv_fd, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid); +int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid); +int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid); + +/* get max. number of cpus supported by hypervisor */ +int libxl_get_max_cpus(libxl_ctx *ctx); + +/* get max. number of NUMA nodes supported by hypervisor */ +int libxl_get_max_nodes(libxl_ctx *ctx); + +int libxl_domain_rename(libxl_ctx *ctx, uint32_t domid, + const char *old_name, const char *new_name); + + /* if old_name is NULL, any old name is OK; otherwise we check + * transactionally that the domain has the old old name; if + * trans is not 0 we use caller's transaction and caller must do retries */ + +int libxl_domain_pause(libxl_ctx *ctx, uint32_t domid); +int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid); + +int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t domid, + const char *filename, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb); +int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce); +int libxl_get_memory_target(libxl_ctx *ctx, uint32_t domid, uint32_t *out_target); + + +/* + * WARNING + * This memory management API is unstable even in Xen 4.2. + * It has a numer of deficiencies and we intend to replace it. + * + * The semantics of these functions should not be relied on to be very + * coherent or stable. We will however endeavour to keep working + * existing programs which use them in roughly the same way as libxl. + */ +/* how much free memory in the system a domain needs to be built */ +int libxl_domain_need_memory(libxl_ctx *ctx, libxl_domain_build_info *b_info, + uint32_t *need_memkb); +/* how much free memory is available in the system */ +int libxl_get_free_memory(libxl_ctx *ctx, uint32_t *memkb); +/* wait for a given amount of memory to be free in the system */ +int libxl_wait_for_free_memory(libxl_ctx *ctx, uint32_t domid, uint32_t memory_kb, int wait_secs); +/* wait for the memory target of a domain to be reached */ +int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs); + + +int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass); +int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type); +/* libxl_primary_console_exec finds the domid and console number + * corresponding to the primary console of the given vm, then calls + * libxl_console_exec with the right arguments (domid might be different + * if the guest is using stubdoms). + * This function can be called after creating the device model, in + * case of HVM guests, and before libxl_run_bootloader in case of PV + * guests using pygrub. */ +int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm); + +/* libxl_console_get_tty retrieves the specified domain's console tty path + * and stores it in path. Caller is responsible for freeing the memory. + */ +int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num, + libxl_console_type type, char **path); + +/* libxl_primary_console_get_tty retrieves the specified domain's primary + * console tty path and stores it in path. Caller is responsible for freeing + * the memory. + */ +int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm, char **path); + +/* May be called with info_r == NULL to check for domain's existance */ +int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r, + uint32_t domid); + +/* These functions each return (on success) an array of elements, + * and the length via the int* out parameter. These arrays and + * their contents come from malloc, and must be freed with the + * corresponding libxl_THING_list_free function. + */ +libxl_dominfo * libxl_list_domain(libxl_ctx*, int *nb_domain_out); +void libxl_dominfo_list_free(libxl_dominfo *list, int nb_domain); + +libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx*, int *nb_pool_out); +void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nb_pool); + +libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out); +void libxl_vminfo_list_free(libxl_vminfo *list, int nb_vm); + +#define LIBXL_CPUTOPOLOGY_INVALID_ENTRY (~(uint32_t)0) +libxl_cputopology *libxl_get_cpu_topology(libxl_ctx *ctx, int *nb_cpu_out); +void libxl_cputopology_list_free(libxl_cputopology *, int nb_cpu); + +#define LIBXL_NUMAINFO_INVALID_ENTRY (~(uint32_t)0) +libxl_numainfo *libxl_get_numainfo(libxl_ctx *ctx, int *nr); +void libxl_numainfo_list_free(libxl_numainfo *, int nr); + +libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid, + int *nb_vcpu, int *nr_vcpus_out); +void libxl_vcpuinfo_list_free(libxl_vcpuinfo *, int nr_vcpus); + +/* + * Devices + * ======= + * + * Each device is represented by a libxl_device_ data structure + * which is defined via the IDL. In addition some devices have an + * additional data type libxl_device__getinfo which contains + * further runtime information about the device. + * + * In addition to the general methods available for libxl types (see + * "libxl types" above) a common set of methods are available for each + * device type. These are described below. + * + * Querying + * -------- + * + * libxl_device__list(ctx, domid, nr): + * + * Returns an array of libxl_device_ length nr representing + * the devices attached to the specified domain. + * + * libxl_device__getinfo(ctx, domid, device, info): + * + * Initialises info with details of the given device which must be + * attached to the specified domain. + * + * Creation / Control + * ------------------ + * + * libxl_device__add(ctx, domid, device): + * + * Adds the given device to the specified domain. This can be called + * while the guest is running (hotplug) or before boot (coldplug). + * + * This function only sets up the device but does not wait for the + * domain to connect to the device and therefore cannot block on the + * guest. + * + * libxl_device__remove(ctx, domid, device): + * + * Removes the given device from the specified domain by performing + * an orderly unplug with guest co-operation. This requires that the + * guest is running. + * + * This method is currently synchronous and therefore can block + * while interacting with the guest. + * + * libxl_device__destroy(ctx, domid, device): + * + * Removes the given device from the specified domain without guest + * co-operation. It is guest specific what affect this will have on + * a running guest. + * + * This function does not interact with the guest and therefore + * cannot block on the guest. + */ + +/* Disks */ +int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, + libxl_device_disk *disk, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_disk_remove(libxl_ctx *ctx, uint32_t domid, + libxl_device_disk *disk, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_disk_destroy(libxl_ctx *ctx, uint32_t domid, + libxl_device_disk *disk, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *num); +int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, + libxl_device_disk *disk, libxl_diskinfo *diskinfo); + +/* + * Insert a CD-ROM device. A device corresponding to disk must already + * be attached to the guest. + */ +int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +/* Network Interfaces */ +int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_nic_remove(libxl_ctx *ctx, uint32_t domid, + libxl_device_nic *nic, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_nic_destroy(libxl_ctx *ctx, uint32_t domid, + libxl_device_nic *nic, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +libxl_device_nic *libxl_device_nic_list(libxl_ctx *ctx, uint32_t domid, int *num); +int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid, + libxl_device_nic *nic, libxl_nicinfo *nicinfo); + +/* Keyboard */ +int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_vkb_remove(libxl_ctx *ctx, uint32_t domid, + libxl_device_vkb *vkb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_vkb_destroy(libxl_ctx *ctx, uint32_t domid, + libxl_device_vkb *vkb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +/* Framebuffer */ +int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_vfb_remove(libxl_ctx *ctx, uint32_t domid, + libxl_device_vfb *vfb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_vfb_destroy(libxl_ctx *ctx, uint32_t domid, + libxl_device_vfb *vfb, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +/* PCI Passthrough */ +int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, + libxl_device_pci *pcidev, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, + libxl_device_pci *pcidev, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; +int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid, + libxl_device_pci *pcidev, + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; + +libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid, + int *num); + +/* + * Functions related to making devices assignable -- that is, bound to + * the pciback driver, ready to be given to a guest via + * libxl_pci_device_add. + * + * - ..._add() will unbind the device from its current driver (if + * already bound) and re-bind it to pciback; at that point it will be + * ready to be assigned to a VM. If rebind is set, it will store the + * path to the old driver in xenstore so that it can be handed back to + * dom0 on restore. + * + * - ..._remove() will unbind the device from pciback, and if + * rebind is non-zero, attempt to assign it back to the driver + * from whence it came. + * + * - ..._list() will return a list of the PCI devices available to be + * assigned. + * + * add and remove are idempotent: if the device in question is already + * added or is not bound, the functions will emit a warning but return + * SUCCESS. + */ +int libxl_device_pci_assignable_add(libxl_ctx *ctx, libxl_device_pci *pcidev, int rebind); +int libxl_device_pci_assignable_remove(libxl_ctx *ctx, libxl_device_pci *pcidev, int rebind); +libxl_device_pci *libxl_device_pci_assignable_list(libxl_ctx *ctx, int *num); + +/* CPUID handling */ +int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str); +int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, + const char* str); +void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid); +void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, + libxl_cpuid_policy_list cpuid); + +/* + * Functions for allowing users of libxl to store private data + * relating to a domain. The data is an opaque sequence of bytes and + * is not interpreted or used by libxl. + * + * Data is indexed by the userdata userid, which is a short printable + * ASCII string. The following list is a registry of userdata userids + * (the registry may be updated by posting a patch to xen-devel): + * + * userid Data contents + * "xl" domain config file in xl format, Unix line endings + * "libvirt-xml" domain config file in libvirt XML format. See + * http://libvirt.org/formatdomain.html + * + * libxl does not enforce the registration of userdata userids or the + * semantics of the data. For specifications of the data formats + * see the code or documentation for the libxl caller in question. + */ +int libxl_userdata_store(libxl_ctx *ctx, uint32_t domid, + const char *userdata_userid, + const uint8_t *data, int datalen); + /* If datalen==0, data is not used and the user data for + * that domain and userdata_userid is deleted. */ +int libxl_userdata_retrieve(libxl_ctx *ctx, uint32_t domid, + const char *userdata_userid, + uint8_t **data_r, int *datalen_r); + /* On successful return, *data_r is from malloc. + * If there is no data for that domain and userdata_userid, + * *data_r and *datalen_r will be set to 0. + * data_r and datalen_r may be 0. + * On error return, *data_r and *datalen_r are undefined. + */ + +int libxl_get_physinfo(libxl_ctx *ctx, libxl_physinfo *physinfo); +int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid, + libxl_bitmap *cpumap); +int libxl_set_vcpuaffinity_all(libxl_ctx *ctx, uint32_t domid, + unsigned int max_vcpus, libxl_bitmap *cpumap); +int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap); + +libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx); + +/* Per-scheduler parameters */ +int libxl_sched_credit_params_get(libxl_ctx *ctx, uint32_t poolid, + libxl_sched_credit_params *scinfo); +int libxl_sched_credit_params_set(libxl_ctx *ctx, uint32_t poolid, + libxl_sched_credit_params *scinfo); + +/* Scheduler Per-domain parameters */ + +#define LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT -1 +#define LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT -1 +#define LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT -1 +#define LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT -1 +#define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT -1 +#define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1 + +int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid, + libxl_domain_sched_params *params); +int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid, + const libxl_domain_sched_params *params); + +int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid, + libxl_trigger trigger, uint32_t vcpuid); +int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq); +int libxl_send_debug_keys(libxl_ctx *ctx, char *keys); + +typedef struct libxl__xen_console_reader libxl_xen_console_reader; + +libxl_xen_console_reader * + libxl_xen_console_read_start(libxl_ctx *ctx, int clear); +int libxl_xen_console_read_line(libxl_ctx *ctx, + libxl_xen_console_reader *cr, + char **line_r); +void libxl_xen_console_read_finish(libxl_ctx *ctx, + libxl_xen_console_reader *cr); + +uint32_t libxl_vm_get_start_time(libxl_ctx *ctx, uint32_t domid); + +char *libxl_tmem_list(libxl_ctx *ctx, uint32_t domid, int use_long); +int libxl_tmem_freeze(libxl_ctx *ctx, uint32_t domid); +int libxl_tmem_thaw(libxl_ctx *ctx, uint32_t domid); +int libxl_tmem_set(libxl_ctx *ctx, uint32_t domid, char* name, + uint32_t set); +int libxl_tmem_shared_auth(libxl_ctx *ctx, uint32_t domid, char* uuid, + int auth); +int libxl_tmem_freeable(libxl_ctx *ctx); + +int libxl_get_freecpus(libxl_ctx *ctx, libxl_bitmap *cpumap); +int libxl_cpupool_create(libxl_ctx *ctx, const char *name, + libxl_scheduler sched, + libxl_bitmap cpumap, libxl_uuid *uuid, + uint32_t *poolid); +int libxl_cpupool_destroy(libxl_ctx *ctx, uint32_t poolid); +int libxl_cpupool_rename(libxl_ctx *ctx, const char *name, uint32_t poolid); +int libxl_cpupool_cpuadd(libxl_ctx *ctx, uint32_t poolid, int cpu); +int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus); +int libxl_cpupool_cpuremove(libxl_ctx *ctx, uint32_t poolid, int cpu); +int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus); +int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid); +int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_t poolid); + +int libxl_domid_valid_guest(uint32_t domid); + +int libxl_flask_context_to_sid(libxl_ctx *ctx, char *buf, size_t len, + uint32_t *ssidref); +int libxl_flask_sid_to_context(libxl_ctx *ctx, uint32_t ssidref, char **buf, + size_t *len); +int libxl_flask_getenforce(libxl_ctx *ctx); +int libxl_flask_setenforce(libxl_ctx *ctx, int mode); +int libxl_flask_loadpolicy(libxl_ctx *ctx, void *policy, uint32_t size); + +/* misc */ + +/* Each of these sets or clears the flag according to whether the + * 2nd parameter is nonzero. On failure, they log, and + * return ERROR_FAIL, but also leave errno valid. */ +int libxl_fd_set_cloexec(libxl_ctx *ctx, int fd, int cloexec); +int libxl_fd_set_nonblock(libxl_ctx *ctx, int fd, int nonblock); + +#include + +#endif /* LIBXL_H */ + +/* + * Local variables: + * mode: C + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/SOURCES/libxl_event.h b/SOURCES/libxl_event.h new file mode 100644 index 00000000..3bcb6d32 --- /dev/null +++ b/SOURCES/libxl_event.h @@ -0,0 +1,550 @@ +/* + * Copyright (C) 2011 Citrix Ltd. + * Author Ian Jackson + * + * This program 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; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program 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. + */ + +#ifndef LIBXL_EVENT_H +#define LIBXL_EVENT_H + +#include +#include +#include + +/*======================================================================*/ + +/* + * Domain event handling - getting Xen events from libxl + * + * (Callers inside libxl may not call libxl_event_check or _wait.) + */ + +#define LIBXL_EVENTMASK_ALL (~(unsigned long)0) + +typedef int libxl_event_predicate(const libxl_event*, void *user); + /* Return value is 0 if the event is unwanted or non-0 if it is. + * Predicates are not allowed to fail. + */ + +int libxl_event_check(libxl_ctx *ctx, libxl_event **event_r, + uint64_t typemask, + libxl_event_predicate *predicate, void *predicate_user) + LIBXL_EXTERNAL_CALLERS_ONLY; + /* Searches for an event, already-happened, which matches typemask + * and predicate. predicate==0 matches any event. + * libxl_event_check returns the event, which must then later be + * freed by the caller using libxl_event_free. + * + * Returns ERROR_NOT_READY if no such event has happened. + */ + +int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r, + uint64_t typemask, + libxl_event_predicate *predicate, void *predicate_user) + LIBXL_EXTERNAL_CALLERS_ONLY; + /* Like libxl_event_check but blocks if no suitable events are + * available, until some are. Uses libxl_osevent_beforepoll/ + * _afterpoll so may be inefficient if very many domains are being + * handled by a single program. + */ + +void libxl_event_free(libxl_ctx *ctx, libxl_event *event); + + +/* Alternatively or additionally, the application may also use this: */ + +typedef struct libxl_event_hooks { + uint64_t event_occurs_mask; + void (*event_occurs)(void *user, const libxl_event *event); + void (*disaster)(void *user, libxl_event_type type, + const char *msg, int errnoval); +} libxl_event_hooks; + +void libxl_event_register_callbacks(libxl_ctx *ctx, + const libxl_event_hooks *hooks, void *user); + /* + * Arranges that libxl will henceforth call event_occurs for any + * events whose type is set in event_occurs_mask, rather than + * queueing the event for retrieval by libxl_event_check/wait. + * Events whose bit is clear in mask are not affected. + * + * event becomes owned by the application and must be freed, either + * by event_occurs or later. + * + * event_occurs may be NULL if mask is 0. + * + * libxl_event_register_callback also provides a way for libxl to + * report to the application that there was a problem reporting + * events; this can occur due to lack of host memory during event + * handling, or other wholly unrecoverable errors from system calls + * made by libxl. This will not happen for frivolous reasons - only + * if the system, or the Xen components of it, are badly broken. + * + * msg and errnoval will describe the action that libxl was trying + * to do, and type specifies the type of libxl events which may be + * missing. type may be 0 in which case events of all types may be + * missing. + * + * disaster may be NULL. If it is, or if _register_callbacks has + * not been called, errors of this kind are fatal to the entire + * application: libxl will print messages to its logs and to stderr + * and call exit(-1). + * + * If disaster returns, it may be the case that some or all future + * libxl calls will return errors; likewise it may be the case that + * no more events (of the specified type, if applicable) can be + * produced. An application which supplies a disaster function + * should normally react either by exiting, or by (when it has + * returned to its main event loop) shutting down libxl with + * libxl_ctx_free and perhaps trying to restart it with + * libxl_ctx_init. + * + * In any case before calling disaster, libxl will have logged a + * message with level XTL_CRITICAL. + * + * Reentrancy: it IS permitted to call libxl from within + * event_occurs. It is NOT permitted to call libxl from within + * disaster. The event_occurs and disaster callbacks may occur on + * any thread in which the application calls libxl. + * + * libxl_event_register_callbacks may be called as many times, with + * different parameters, as the application likes; the most recent + * call determines the libxl behaviour. However it is NOT safe to + * call _register_callbacks concurrently with, or reentrantly from, + * any other libxl function. + * + * Calls to _register_callbacks do not affect events which have + * already occurred. + */ + + +/* + * Events are only generated if they have been requested. + * The following functions request the generation of specific events. + * + * Each set of functions for controlling event generation has this form: + * + * typedef struct libxl__evgen_FOO libxl__evgen_FOO; + * int libxl_evenable_FOO(libxl_ctx *ctx, FURTHER PARAMETERS, + * libxl_ev_user user, libxl__evgen_FOO **evgen_out); + * void libxl_evdisable_FOO(libxl_ctx *ctx, libxl__evgen_FOO *evgen); + * + * The evenable function arranges that the events (as described in the + * doc comment for the individual function) will start to be generated + * by libxl. On success, *evgen_out is set to a non-null pointer to + * an opaque struct. + * + * The user value is returned in the generated events and may be + * used by the caller for whatever it likes. The type ev_user is + * guaranteed to be an unsigned integer type which is at least + * as big as uint64_t and is also guaranteed to be big enough to + * contain any intptr_t value. + * + * If it becomes desirable to stop generation of the relevant events, + * or to reclaim the resources in libxl associated with the evgen + * structure, the same evgen value should be passed to the evdisable + * function. However, note that events which occurred prior to the + * evdisable call may still be returned. + * + * The caller may enable identical events more than once. If they do + * so, each actual occurrence will generate several events to be + * returned by libxl_event_check, with the appropriate user value(s). + * Aside from this, each occurrence of each event is returned by + * libxl_event_check exactly once. + * + * An evgen is associated with the libxl_ctx used for its creation. + * After libxl_ctx_free, all corresponding evgen handles become + * invalid and must no longer be passed to evdisable. + * + * Applications should ensure that they eventually retrieve every + * event using libxl_event_check or libxl_event_wait, since events + * which occur but are not retreived by the application will be queued + * inside libxl indefinitely. libxl_event_check/_wait may be O(n) + * where n is the number of queued events which do not match the + * criteria specified in the arguments to check/wait. + */ + +typedef struct libxl__evgen_domain_death libxl_evgen_domain_death; +int libxl_evenable_domain_death(libxl_ctx *ctx, uint32_t domid, + libxl_ev_user, libxl_evgen_domain_death **evgen_out); +void libxl_evdisable_domain_death(libxl_ctx *ctx, libxl_evgen_domain_death*); + /* Arranges for the generation of DOMAIN_SHUTDOWN and DOMAIN_DESTROY + * events. A domain which is destroyed before it shuts down + * may generate only a DESTROY event. + */ + +typedef struct libxl__evgen_disk_eject libxl_evgen_disk_eject; +int libxl_evenable_disk_eject(libxl_ctx *ctx, uint32_t domid, const char *vdev, + libxl_ev_user, libxl_evgen_disk_eject **evgen_out); +void libxl_evdisable_disk_eject(libxl_ctx *ctx, libxl_evgen_disk_eject*); + /* Arranges for the generation of DISK_EJECT events. A copy of the + * string *vdev will be made for libxl's internal use, and a pointer + * to this (or some other) copy will be returned as the vdev + * member of event.u. + */ + + +/*======================================================================*/ + +/* + * OS event handling - passing low-level OS events to libxl + * + * Event-driven programs must use these facilities to allow libxl + * to become aware of readability/writeability of file descriptors + * and the occurrence of timeouts. + * + * There are two approaches available. The first is appropriate for + * simple programs handling reasonably small numbers of domains: + * + * for (;;) { + * libxl_osevent_beforepoll(...) + * poll(); + * libxl_osevent_afterpoll(...); + * for (;;) { + * r = libxl_event_check(...); + * if (r==LIBXL_NOT_READY) break; + * if (r) goto error_out; + * do something with the event; + * } + * } + * + * The second approach uses libxl_osevent_register_hooks and is + * suitable for programs which are already using a callback-based + * event library. + * + * An application may freely mix the two styles of interaction. + * + * (Callers inside libxl may not call libxl_osevent_... functions.) + */ + +struct pollfd; + +/* The caller should provide beforepoll with some space for libxl's + * fds, and tell libxl how much space is available by setting *nfds_io. + * fds points to the start of this space (and fds may be a pointer into + * a larger array, for example, if the application has some fds of + * its own that it is interested in). + * + * On return *nfds_io will in any case have been updated by libxl + * according to how many fds libxl wants to poll on. + * + * If the space was sufficient, libxl fills in fds[0..] suitably for poll(2), updates *timeout_upd if needed, + * and returns ok. + * + * If space was insufficient, fds[0..] is undefined on + * return; *nfds_io on return will be greater than the value on + * entry; *timeout_upd may or may not have been updated; and + * libxl_osevent_beforepoll returns ERROR_BUFERFULL. In this case + * the application needs to make more space (enough space for + * *nfds_io struct pollfd) and then call beforepoll again, before + * entering poll(2). Typically this will involve calling realloc. + * + * The application may call beforepoll with fds==NULL and + * *nfds_io==0 in order to find out how much space is needed. + * + * *timeout_upd is as for poll(2): it's in milliseconds, and + * negative values mean no timeout (infinity). + * libxl_osevent_beforepoll will only reduce the timeout, naturally. + */ +int libxl_osevent_beforepoll(libxl_ctx *ctx, int *nfds_io, + struct pollfd *fds, int *timeout_upd, + struct timeval now) + LIBXL_EXTERNAL_CALLERS_ONLY; + +/* nfds and fds[0..nfds] must be from the most recent call to + * _beforepoll, as modified by poll. (It is therefore not possible + * to have multiple threads simultaneously polling using this + * interface.) + * + * This function actually performs all of the IO and other actions, + * and generates events (libxl_event), which are implied by either + * (a) the time of day or (b) both (i) the returned information from + * _beforepoll, and (ii) the results from poll specified in + * fds[0..nfds-1]. Generated events can then be retrieved by + * libxl_event_check. + */ +void libxl_osevent_afterpoll(libxl_ctx *ctx, int nfds, const struct pollfd *fds, + struct timeval now) + LIBXL_EXTERNAL_CALLERS_ONLY; + + +typedef struct libxl_osevent_hooks { + int (*fd_register)(void *user, int fd, void **for_app_registration_out, + short events, void *for_libxl); + int (*fd_modify)(void *user, int fd, void **for_app_registration_update, + short events); + void (*fd_deregister)(void *user, int fd, void *for_app_registration); + int (*timeout_register)(void *user, void **for_app_registration_out, + struct timeval abs, void *for_libxl); + int (*timeout_modify)(void *user, void **for_app_registration_update, + struct timeval abs); + void (*timeout_deregister)(void *user, void *for_app_registration); +} libxl_osevent_hooks; + +/* The application which calls register_fd_hooks promises to + * maintain a register of fds and timeouts that libxl is interested + * in, and make calls into libxl (libxl_osevent_occurred_*) + * when those fd events and timeouts occur. This is more efficient + * than _beforepoll/_afterpoll if there are many fds (which can + * happen if the same libxl application is managing many domains). + * + * For an fd event, events is as for poll(). register or modify may + * be called with events==0, in which case it must still work + * normally, just not generate any events. + * + * For a timeout event, milliseconds is as for poll(). + * Specifically, negative values of milliseconds mean NO TIMEOUT. + * This is used by libxl to temporarily disable a timeout. + * + * If the register or modify hook succeeds it may update + * *for_app_registration_out/_update and must then return 0. + * On entry to register, *for_app_registration_out is always NULL. + * + * A registration or modification hook may fail, in which case it + * must leave the registration state of the fd or timeout unchanged. + * It may then either return ERROR_OSEVENT_REG_FAIL or any positive + * int. The value returned will be passed up through libxl and + * eventually returned back to the application. When register + * fails, any value stored into *for_registration_out is ignored by + * libxl; when modify fails, any changed value stored into + * *for_registration_update is honoured by libxl and will be passed + * to future modify or deregister calls. + * + * libxl may want to register more than one callback for any one fd; + * in that case: (i) each such registration will have at least one bit + * set in revents which is unique to that registration; (ii) if an + * event occurs which is relevant for multiple registrations the + * application's event system may call libxl_osevent_occurred_fd + * for one, some, or all of those registrations. + * + * If fd_modify is used, it is permitted for the application's event + * system to still make calls to libxl_osevent_occurred_fd for the + * "old" set of requested events; these will be safely ignored by + * libxl. + * + * libxl will remember the value stored in *for_app_registration_out + * (or *for_app_registration_update) by a successful call to + * register (or modify), and pass it to subsequent calls to modify + * or deregister. + * + * osevent_register_hooks may be called only once for each libxl_ctx. + * libxl may make calls to register/modify/deregister from within + * any libxl function (indeed, it will usually call register from + * register_event_hooks). Conversely, the application MUST NOT make + * the event occurrence calls (libxl_osevent_occurred_*) into libxl + * reentrantly from within libxl (for example, from within the + * register/modify functions). + * + * Lock hierarchy: the register/modify/deregister functions may be + * called with locks held. These locks (the "libxl internal locks") + * are inside the libxl_ctx. Therefore, if those register functions + * acquire any locks of their own ("caller register locks") outside + * libxl, to avoid deadlock one of the following must hold for each + * such caller register lock: + * (a) "acquire libxl internal locks before caller register lock": + * No libxl function may be called with the caller register + * lock held. + * (b) "acquire caller register lock before libxl internal locks": + * No libxl function may be called _without_ the caller + * register lock held. + * Of these we would normally recommend (a). + * + * The value *hooks is not copied and must outlast the libxl_ctx. + */ +void libxl_osevent_register_hooks(libxl_ctx *ctx, + const libxl_osevent_hooks *hooks, + void *user); + +/* It is NOT legal to call _occurred_ reentrantly within any libxl + * function. Specifically it is NOT legal to call it from within + * a register callback. Conversely, libxl MAY call register/deregister + * from within libxl_event_occurred_call_*. + */ + +void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl, + int fd, short events, short revents) + LIBXL_EXTERNAL_CALLERS_ONLY; + +/* Implicitly, on entry to this function the timeout has been + * deregistered. If _occurred_timeout is called, libxl will not + * call timeout_deregister; if it wants to requeue the timeout it + * will call timeout_register again. + */ +void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl) + LIBXL_EXTERNAL_CALLERS_ONLY; + + +/*======================================================================*/ + +/* + * Subprocess handling. + * + * Unfortunately the POSIX interface makes this very awkward. + * + * There are two possible arrangements for collecting statuses from + * wait/waitpid. + * + * For naive programs: + * + * libxl will keep a SIGCHLD handler installed whenever it has an + * active (unreaped) child. It will reap all children with + * wait(); any children it does not recognise will be passed to + * the application via an optional callback (and will result in + * logged warnings if no callback is provided or the callback + * denies responsibility for the child). + * + * libxl may have children whenever: + * + * - libxl is performing an operation which can be made + * asynchronous; ie one taking a libxl_asyncop_how, even + * if NULL is passed indicating that the operation is + * synchronous; or + * + * - events of any kind are being generated, as requested + * by libxl_evenable_.... + * + * A multithreaded application which is naive in this sense may + * block SIGCHLD on some of its threads, but there must be at + * least one thread that has SIGCHLD unblocked. libxl will not + * modify the blocking flag for SIGCHLD (except that it may create + * internal service threads with all signals blocked). + * + * A naive program must only have at any one time only + * one libxl context which might have children. + * + * For programs which run their own children alongside libxl's: + * + * A program which does this must call libxl_childproc_setmode. + * There are two options: + * + * libxl_sigchld_owner_mainloop: + * The application must install a SIGCHLD handler and reap (at + * least) all of libxl's children and pass their exit status + * to libxl by calling libxl_childproc_exited. + * + * libxl_sigchld_owner_libxl_always: + * The application expects libxl to reap all of its children, + * and provides a callback to be notified of their exit + * statues. + * + * An application which fails to call setmode, or which passes 0 for + * hooks, while it uses any libxl operation which might + * create or use child processes (see above): + * - Must not have any child processes running. + * - Must not install a SIGCHLD handler. + * - Must not reap any children. + */ + + +typedef enum { + /* libxl owns SIGCHLD whenever it has a child. */ + libxl_sigchld_owner_libxl, + + /* Application promises to call libxl_childproc_exited but NOT + * from within a signal handler. libxl will not itself arrange to + * (un)block or catch SIGCHLD. */ + libxl_sigchld_owner_mainloop, + + /* libxl owns SIGCHLD all the time, and the application is + * relying on libxl's event loop for reaping its own children. */ + libxl_sigchld_owner_libxl_always, +} libxl_sigchld_owner; + +typedef struct { + libxl_sigchld_owner chldowner; + + /* All of these are optional: */ + + /* Called by libxl instead of fork. Should behave exactly like + * fork, including setting errno etc. May NOT reenter into libxl. + * Application may use this to discover pids of libxl's children, + * for example. + */ + pid_t (*fork_replacement)(void *user); + + /* With libxl_sigchld_owner_libxl, called by libxl when it has + * reaped a pid. (Not permitted with _owner_mainloop.) + * + * Should return 0 if the child was recognised by the application + * (or if the application does not keep those kind of records), + * ERROR_UNKNOWN_CHILD if the application knows that the child is not + * the application's; if it returns another error code it is a + * disaster as described for libxl_event_register_callbacks. + * (libxl will report unexpected children to its error log.) + * + * If not supplied, the application is assumed not to start + * any children of its own. + * + * This function is NOT called from within the signal handler. + * Rather it will be called from inside a libxl's event handling + * code and thus only when libxl is running, for example from + * within libxl_event_wait. (libxl uses the self-pipe trick + * to implement this.) + * + * childproc_exited_callback may call back into libxl, but it + * is best to avoid making long-running libxl calls as that might + * stall the calling event loop while the nested operation + * completes. + */ + int (*reaped_callback)(pid_t, int status, void *user); +} libxl_childproc_hooks; + +/* hooks may be 0 in which is equivalent to &{ libxl_sigchld_owner_libxl, 0, 0 } + * + * May not be called when libxl might have any child processes, or the + * behaviour is undefined. So it is best to call this at + * initialisation. + */ +void libxl_childproc_setmode(libxl_ctx *ctx, const libxl_childproc_hooks *hooks, + void *user); + +/* + * This function is for an application which owns SIGCHLD and which + * therefore reaps all of the process's children. + * + * May be called only by an application which has called setmode with + * chldowner == libxl_sigchld_owner_mainloop. If pid was a process started + * by this instance of libxl, returns 0 after doing whatever + * processing is appropriate. Otherwise silently returns + * ERROR_UNKNOWN_CHILD. No other error returns are possible. + * + * May NOT be called from within a signal handler which might + * interrupt any libxl operation. The application will almost + * certainly need to use the self-pipe trick (or a working pselect or + * ppoll) to implement this. + */ +int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status) + LIBXL_EXTERNAL_CALLERS_ONLY; + + +/* + * An application which initialises a libxl_ctx in a parent process + * and then forks a child which does not quickly exec, must + * instead libxl_postfork_child_noexec in the child. One call + * on any existing (or specially made) ctx is sufficient; after + * this all previously existing libxl_ctx's are invalidated and + * must not be used - or even freed. It is harmless to call this + * postfork function and then exec anyway. + */ +void libxl_postfork_child_noexec(libxl_ctx *ctx); + + +#endif + +/* + * Local variables: + * mode: C + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/SOURCES/libxl_json.h b/SOURCES/libxl_json.h new file mode 100644 index 00000000..14644591 --- /dev/null +++ b/SOURCES/libxl_json.h @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2011 Citrix Ltd. + * + * This program 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; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program 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. + */ + +#ifndef LIBXL_JSON_H +#define LIBXL_JSON_H + +#include +#include + +#ifdef HAVE_YAJL_YAJL_VERSION_H +# include +#endif + +yajl_gen_status libxl_defbool_gen_json(yajl_gen hand, libxl_defbool *p); +yajl_gen_status libxl_domid_gen_json(yajl_gen hand, libxl_domid *p); +yajl_gen_status libxl_uuid_gen_json(yajl_gen hand, libxl_uuid *p); +yajl_gen_status libxl_mac_gen_json(yajl_gen hand, libxl_mac *p); +yajl_gen_status libxl_bitmap_gen_json(yajl_gen hand, libxl_bitmap *p); +yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, + libxl_cpuid_policy_list *p); +yajl_gen_status libxl_string_list_gen_json(yajl_gen hand, libxl_string_list *p); +yajl_gen_status libxl_key_value_list_gen_json(yajl_gen hand, + libxl_key_value_list *p); +yajl_gen_status libxl_hwcap_gen_json(yajl_gen hand, libxl_hwcap *p); + +#include <_libxl_types_json.h> + +/* YAJL version check */ +#if defined(YAJL_MAJOR) && (YAJL_MAJOR > 1) +# define HAVE_YAJL_V2 1 +#endif + +#ifdef HAVE_YAJL_V2 + +typedef size_t libxl_yajl_length; + +static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, + yajl_alloc_funcs *allocFuncs, + void *ctx) +{ + return yajl_alloc(callbacks, allocFuncs, ctx); +} + +static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) +{ + return yajl_gen_alloc(allocFuncs); +} + +#else /* !HAVE_YAJL_V2 */ + +#define yajl_complete_parse yajl_parse_complete + +typedef unsigned int libxl_yajl_length; + +static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, + const yajl_alloc_funcs *allocFuncs, + void *ctx) +{ + yajl_parser_config cfg = { + .allowComments = 1, + .checkUTF8 = 1, + }; + return yajl_alloc(callbacks, &cfg, allocFuncs, ctx); +} + +static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) +{ + yajl_gen_config conf = { 1, " " }; + return yajl_gen_alloc(&conf, allocFuncs); +} + +#endif /* !HAVE_YAJL_V2 */ + +yajl_gen_status libxl_domain_config_gen_json(yajl_gen hand, + libxl_domain_config *p); + +#endif /* LIBXL_JSON_H */ diff --git a/SOURCES/libxl_utils.h b/SOURCES/libxl_utils.h new file mode 100644 index 00000000..8fee5676 --- /dev/null +++ b/SOURCES/libxl_utils.h @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2009 Citrix Ltd. + * Author Stefano Stabellini + * + * This program 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; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program 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. + */ + +#ifndef LIBXL_UTILS_H +#define LIBXL_UTILS_H + +#include "libxl.h" + +const char *libxl_basename(const char *name); /* returns string from strdup */ +unsigned long libxl_get_required_shadow_memory(unsigned long maxmem_kb, unsigned int smp_cpus); +int libxl_name_to_domid(libxl_ctx *ctx, const char *name, uint32_t *domid); +char *libxl_domid_to_name(libxl_ctx *ctx, uint32_t domid); +int libxl_name_to_cpupoolid(libxl_ctx *ctx, const char *name, uint32_t *poolid); +char *libxl_cpupoolid_to_name(libxl_ctx *ctx, uint32_t poolid); +int libxl_get_stubdom_id(libxl_ctx *ctx, int guest_domid); +int libxl_is_stubdom(libxl_ctx *ctx, uint32_t domid, uint32_t *target_domid); +int libxl_create_logfile(libxl_ctx *ctx, const char *name, char **full_name); +int libxl_string_to_backend(libxl_ctx *ctx, char *s, libxl_disk_backend *backend); + +int libxl_read_file_contents(libxl_ctx *ctx, const char *filename, + void **data_r, int *datalen_r); + /* Reads the contents of the plain file filename into a mallocd + * buffer. Returns 0 or errno. Any errors other than ENOENT are logged. + * If the file is empty, *data_r and *datalen_r are set to 0. + * On error, *data_r and *datalen_r are unchanged. + * data_r and/or datalen_r may be 0. + */ + +int libxl_read_exactly(libxl_ctx *ctx, int fd, void *data, ssize_t sz, + const char *filename, const char *what); +int libxl_write_exactly(libxl_ctx *ctx, int fd, const void *data, + ssize_t sz, const char *filename, const char *what); + /* Returns 0 or errno. If file is truncated on reading, returns + * EPROTO and you have no way to tell how much was read. Errors are + * logged using filename (which is only used for logging) and what + * (which may be 0). */ + +int libxl_pipe(libxl_ctx *ctx, int pipes[2]); + /* Just like pipe(2), but log errors. */ + +void libxl_report_child_exitstatus(libxl_ctx *ctx, xentoollog_level, + const char *what, pid_t pid, int status); + /* treats all exit statuses as errors; if that's not what you want, + * check status yourself first */ + +int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid, + const char *mac, libxl_device_nic *nic); +int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid, int devid, + libxl_device_nic *nic); + +int libxl_vdev_to_device_disk(libxl_ctx *ctx, uint32_t domid, const char *vdev, + libxl_device_disk *disk); + +int libxl_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *bitmap, int n_bits); + /* Allocated bimap is from malloc, libxl_bitmap_dispose() to be + * called by the application when done. */ +void libxl_bitmap_copy(libxl_ctx *ctx, libxl_bitmap *dptr, + const libxl_bitmap *sptr); +int libxl_bitmap_is_full(const libxl_bitmap *bitmap); +int libxl_bitmap_is_empty(const libxl_bitmap *bitmap); +int libxl_bitmap_test(const libxl_bitmap *bitmap, int bit); +void libxl_bitmap_set(libxl_bitmap *bitmap, int bit); +void libxl_bitmap_reset(libxl_bitmap *bitmap, int bit); +int libxl_bitmap_count_set(const libxl_bitmap *cpumap); +char *libxl_bitmap_to_hex_string(libxl_ctx *ctx, const libxl_bitmap *cpumap); +static inline void libxl_bitmap_set_any(libxl_bitmap *bitmap) +{ + memset(bitmap->map, -1, bitmap->size); +} +static inline void libxl_bitmap_set_none(libxl_bitmap *bitmap) +{ + memset(bitmap->map, 0, bitmap->size); +} +static inline int libxl_bitmap_cpu_valid(libxl_bitmap *bitmap, int bit) +{ + return bit >= 0 && bit < (bitmap->size * 8); +} +#define libxl_for_each_bit(var, map) for (var = 0; var < (map).size * 8; var++) +#define libxl_for_each_set_bit(v, m) for (v = 0; v < (m).size * 8; v++) \ + if (libxl_bitmap_test(&(m), v)) + +static inline int libxl_cpu_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *cpumap, + int max_cpus) +{ + if (max_cpus < 0) + return ERROR_INVAL; + if (max_cpus == 0) + max_cpus = libxl_get_max_cpus(ctx); + if (max_cpus == 0) + return ERROR_FAIL; + + return libxl_bitmap_alloc(ctx, cpumap, max_cpus); +} + +static inline int libxl_node_bitmap_alloc(libxl_ctx *ctx, + libxl_bitmap *nodemap, + int max_nodes) +{ + if (max_nodes < 0) + return ERROR_INVAL; + if (max_nodes == 0) + max_nodes = libxl_get_max_nodes(ctx); + if (max_nodes == 0) + return ERROR_FAIL; + + return libxl_bitmap_alloc(ctx, nodemap, max_nodes); +} + +/* Populate cpumap with the cpus spanned by the nodes in nodemap */ +int libxl_nodemap_to_cpumap(libxl_ctx *ctx, + const libxl_bitmap *nodemap, + libxl_bitmap *cpumap); +/* Populate nodemap with the nodes of the cpus in cpumap */ +int libxl_cpumap_to_nodemap(libxl_ctx *ctx, + const libxl_bitmap *cpuemap, + libxl_bitmap *nodemap); + + static inline uint32_t libxl__sizekb_to_mb(uint32_t s) { + return (s + 1023) / 1024; +} + +#endif + +/* + * Local variables: + * mode: C + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/SOURCES/libxl_uuid.h b/SOURCES/libxl_uuid.h new file mode 100644 index 00000000..93c65a78 --- /dev/null +++ b/SOURCES/libxl_uuid.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008,2010 Citrix Ltd. + * + * This program 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; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program 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. + */ + +#ifndef __LIBXL_UUID_H__ +#define __LIBXL_UUID_H__ + +#define LIBXL_UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" +#define LIBXL_UUID_FMTLEN ((2*16)+4) /* 16 hex bytes plus 4 hypens */ +#define LIBXL__UUID_BYTES(uuid) uuid[0], uuid[1], uuid[2], uuid[3], \ + uuid[4], uuid[5], uuid[6], uuid[7], \ + uuid[8], uuid[9], uuid[10], uuid[11], \ + uuid[12], uuid[13], uuid[14], uuid[15] + +#if defined(__linux__) + +#include +#include + +typedef struct { + uuid_t uuid; +} libxl_uuid; + +#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(((uint8_t *)arg.uuid)) + +#elif defined(__NetBSD__) + +#include +#include +#include +#include +#include + +#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(arg.uuid) + +typedef struct { + uint8_t uuid[16]; +} libxl_uuid; + +#else + +#error "Please update libxl_uuid.h for your OS" + +#endif + +int libxl_uuid_is_nil(libxl_uuid *uuid); +void libxl_uuid_generate(libxl_uuid *uuid); +int libxl_uuid_from_string(libxl_uuid *uuid, const char *in); +void libxl_uuid_copy(libxl_uuid *dst, const libxl_uuid *src); +void libxl_uuid_clear(libxl_uuid *uuid); +int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2); +uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid); + +#endif /* __LIBXL_UUID_H__ */ + +/* + * Local variables: + * mode: C + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/SPECS/libxl-headers.spec b/SPECS/libxl-headers.spec new file mode 100644 index 00000000..e2c32923 --- /dev/null +++ b/SPECS/libxl-headers.spec @@ -0,0 +1,60 @@ +Name: libxl-headers +Version: 0.1.0 +Release: 1 +Summary: Hack around missing files in Debian's xen-hypervisor package +License: GPL +Group: Development/Other +Source0: libxl_event.h +Source1: libxl.h +Source2: libxl_json.h +Source3: _libxl_list.h +Source4: _libxl_types.h +Source5: _libxl_types_json.h +Source6: libxl_utils.h +Source7: libxl_uuid.h +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: xen xen-utils ocaml +Requires: xen xen-utils + + + +%description +Header files not included in Ubuntu's xen-hypervisor package + +%prep +%setup -c -T +cp %{SOURCE0} libxl_event.h +cp %{SOURCE1} libxl.h +cp %{SOURCE2} libxl_json.h +cp %{SOURCE3} _libxl_list.h +cp %{SOURCE4} _libxl_types.h +cp %{SOURCE5} _libxl_types_json.h +cp %{SOURCE6} libxl_utils.h +cp %{SOURCE7} libxl_uuid.h + +%build + +%install +rm -rf %{buildroot} +mkdir %{buildroot} +mkdir -p %{buildroot}/usr/include +install -m 0755 libxl_event.h %{buildroot}/%{_includedir}/libxl_event.h +install -m 0755 libxl.h %{buildroot}/%{_includedir}/libxl.h +install -m 0755 libxl_json.h %{buildroot}/%{_includedir}/libxl_json.h +install -m 0755 _libxl_list.h %{buildroot}/%{_includedir}/_libxl_list.h +install -m 0755 _libxl_types.h %{buildroot}/%{_includedir}/_libxl_types.h +install -m 0755 _libxl_types_json.h %{buildroot}/%{_includedir}/_libxl_types_json.h +install -m 0755 libxl_utils.h %{buildroot}/%{_includedir}/libxl_utils.h +install -m 0755 libxl_uuid.h %{buildroot}/%{_includedir}/libxl_uuid.h + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_includedir}/* + +%changelog +* Mon Aug 19 2013 Euan Harris +- Initial package + diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 963c9a6d..4b38443d 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel cmdliner-devel -BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-cstruct-devel libxl-headers Requires: ocaml ocaml-findlib %description diff --git a/makedeb.py b/makedeb.py index 4f90df5e..c63ea046 100755 --- a/makedeb.py +++ b/makedeb.py @@ -194,7 +194,7 @@ def mapPackageBaseName(name): # this seems to come from packages like xcp-networkd, which don't have # any requirements "/bin/sh": "/bin/sh", - "xen-hypervisor-fixup": "xen-hypervisor-fixup", + "libxl-headers": "libxl-headers", "xen-utils": "xen-utils", "nfs-utils": "nfs-common", "hwdata": "hwdata", From f08bd819b4f3ca70875def09c6ca469d9208ab60 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 11:54:21 +0100 Subject: [PATCH 0444/1125] makedeb: Move into scripts directory Signed-off-by: Euan Harris --- makemake.py | 5 ++++- makedeb.py => scripts/makedeb.py | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename makedeb.py => scripts/makedeb.py (100%) diff --git a/makemake.py b/makemake.py index 21b10417..52874f5c 100755 --- a/makemake.py +++ b/makemake.py @@ -2,6 +2,9 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html +import sys +sys.path.append("scripts") + import rpm import os import urlparse @@ -125,7 +128,7 @@ def rpmNameFromHeader( h ): os.path.join( spec_dir, specname ), " ".join( sources ) ) print '\t@echo [MAKEDEB] $@' - print '\t./makedeb.py $<' + print '\tscripts/makedeb.py $<' # Rules to download sources diff --git a/makedeb.py b/scripts/makedeb.py similarity index 100% rename from makedeb.py rename to scripts/makedeb.py From 10e0e614319383d5f312a75d306a4c0e95ae0544 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 12:02:22 +0100 Subject: [PATCH 0445/1125] makedeb: Split package mapping dictionary out of makedeb Signed-off-by: Euan Harris --- makemake.py | 6 +- scripts/makedeb.py | 250 ++---------------------------------------- scripts/mappkgname.py | 233 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+), 242 deletions(-) create mode 100755 scripts/mappkgname.py diff --git a/makemake.py b/makemake.py index 52874f5c..5d03ca41 100755 --- a/makemake.py +++ b/makemake.py @@ -9,7 +9,7 @@ import os import urlparse import sys -import makedeb +import mappkgname # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -66,7 +66,7 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - rpm.addMacro( 'NAME', makedeb.mapPackage(h['name'])[0] ) + rpm.addMacro( 'NAME', mappkgname.mapPackage(h['name'])[0] ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) @@ -88,7 +88,7 @@ def srpmNameFromSpec( spec ): def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): - rpm.addMacro( 'NAME', makedeb.mapPackageName(h) ) + rpm.addMacro( 'NAME', mappkgname.mapPackageName(h) ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) diff --git a/scripts/makedeb.py b/scripts/makedeb.py index c63ea046..07c0546b 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -12,6 +12,7 @@ import subprocess import shlex import glob +import mappkgname # BUGS: # Code is a mess @@ -62,235 +63,6 @@ def specFromFile(spec): # We can just use dpkg-source -b --auto-commit -def mapPackageBaseName(name): - """rewrite an rpm name to fit with debian standards""" - # Debian puts the language name after the library name - # whereas Fedora puts it before - if name.startswith( "ocaml-" ): - name = name[ len("ocaml-"): ] + "-ocaml" - - return name - -mapping = { - "biniou": "libbiniou-ocaml", - "cmdliner": "libcmdliner-ocaml", - "cppo": "cppo", - "deriving-ocsigen": "libderiving-ocsigen-ocaml", - "easy-format": "libeasy-format-ocaml", - "eliloader": "eliloader", - "ffs": "ffs", - "forkexecd": "forkexecd", - "js_of_ocaml": "libjs-of-ocaml", - "libnl3-cli": "libnl-3-cli", - "libnl3-doc": "libnl-3-doc", - "libnl3": "libnl-3", - "message-switch": "message-switch", - "ocaml-bitstring": "libbitstring-ocaml", - "ocaml-camomile-data": "libcamomile-data-ocaml", - "ocaml-camomile": "libcamomile-ocaml", - "ocaml-cdrom": "libcdrom-ocaml", - "ocaml-cohttp": "libcohttp-ocaml", - "ocaml-cstruct": "libcstruct-ocaml", - "ocaml-fd-send-recv": "libfd-send-recv-ocaml", - "ocaml-lambda-term": "liblambda-term-ocaml", - "ocaml-libvhd": "libvhd-ocaml", - "ocaml-libvirt": "libvirt-ocaml", - "ocaml-lwt": "liblwt-ocaml", - "ocaml-nbd": "libnbd-ocaml", - "ocaml-netdev": "libnetdev-ocaml", - "ocaml-obuild": "ocaml-obuild", - "ocaml-oclock": "liboclock-ocaml" , - "ocaml-ocplib-endian": "ocplib-endian-ocaml", - "ocaml-ounit": "libounit-ocaml", - "ocaml-qmp": "libqmp-ocaml", - "ocaml-react": "libreact-ocaml", - "ocaml-re": "libre-ocaml" , - "ocaml-rpc": "librpc-ocaml", - "ocaml-sexplib": "libsexplib-camlp4", - "ocaml-ssl": "libssl-ocaml" , - "ocaml-stdext": "libstdext-ocaml", - "ocaml-syslog": "libsyslog-ocaml", - "ocaml-tapctl": "libtapctl-ocaml", - "ocaml-text": "libtext-ocaml", - "ocaml-type-conv": "libtype-conv-camlp4", - "ocaml-uri": "liburi-ocaml" , - "ocaml-uuidm": "libuuidm-ocaml", - "ocaml-xcp-idl": "libxcp-idl-ocaml", - "ocaml-xcp-inventory": "libxcp-inventory-ocaml", - "ocaml-xcp-rrd": "libxcp-rrd-ocaml", - "ocaml-xen-api-client": "libxen-api-client-ocaml", - "ocaml-xen-api-libs-transitional": "ocaml-xen-api-libs-transitional", - "ocaml-xen-lowlevel-libs": "ocaml-xen-lowlevel-libs", - "ocaml-xenops": "libxenops-ocaml", - "ocaml-xenstore-clients": "libxenstore-clients-ocaml", - "ocaml-xenstore": "libxenstore-ocaml", - "ocaml-yojson": "libyojson-ocaml", - "ocaml-zed": "libzed-ocaml", - "omake": "omake", - "openstack-xapi-plugins": "openstack-xapi-plugins", - "optcomp": "optcomp-ocaml", - "sm-cli": "sm-cli", - "squeezed": "squeezed", - "utop": "utop", - "vncterm": "vncterm", - "xapi-libvirt-storage": "libxapi-libvirt-storage-ocaml", - "xapi-python": "xapi-python", - "xapi": "xapi", - "xapi-xe": "xapi-xe", - "xcp-networkd": "xcp-networkd" , - "xcp-rrdd": "xcp-rrdd", - "xe-create-templates": "xe-create-templates", - "xenops-cli": "xenops-cli", - "xenopsd-libvirt": "xenopsd-libvirt", - "xenopsd-simulator": "xenopsd-simulator", - "xenopsd-xc": "xenopsd-xc", - "xenopsd-xenlight": "xenopsd-xenlight", - "xenopsd": "xenopsd", - "xenserver-core": "xenserver-core", - "xenserver-install-wizard": "xenserver-install-wizard", - "xenserver-tech-preview-release": "xenserver-tech-preview-release", - "xmlm": "libxmlm-ocaml", - "xsconsole": "xsconsole", - "xsiostat": "xsiostat", - "xenserver-core-latest-snapshot": "xenserver-core-latest-snapshot", - - # extras - "ocaml": ["ocaml-nox", "ocaml-native-compilers"], - "ocaml-findlib": "ocaml-findlib", - "ocaml-ocamldoc": "ocaml-nox", - "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? - "ocaml-compiler-libs", - "ocaml-camlp4": ["camlp4", "camlp4-extra"], - "openssl": "libssl1.0.0", - "xen": "xen-hypervisor", - "libuuid": "uuid", - "libvirt": ["libvirt0", "libvirt-bin"], - "xen-libs": "libxen-4.2", - "make": "make", - "ncurses": "libncurses5", - "chkconfig": [], # "chkconfig", - "initscripts": [], # "initscripts", - "PyPAM": "python-pam", - "perl": "perl", - "gawk": "gawk", - "pam": "libpam0g", - "tetex-latex": "texlive-base", - "zlib": "zlib1g", - "git": "git", - "stunnel": "stunnel", - "bash-completion": "bash-completion", - "python": "python", - "time": "time", - "newt": "libnewt0.52", - "flex": "flex", - "bison": "bison", - "/sbin/ldconfig": "/sbin/ldconfig", - "kernel-headers": "linux-headers-3.2.0-51-generic", - "libvirt-docs": "libvirt-doc", - "chrpath": "chrpath", - "kernel": "linux-image", - "kernel-firmware": "linux-firmware", - - # this seems to come from packages like xcp-networkd, which don't have - # any requirements - "/bin/sh": "/bin/sh", - "libxl-headers": "libxl-headers", - "xen-utils": "xen-utils", - "nfs-utils": "nfs-common", - "hwdata": "hwdata", - "redhat-lsb-core": "lsb-base", - "ethtool": "ethtool", - "qemu-system-x86": "qemu-system-x86", - "python-argparse": "libpython2.7-stdlib", -} - -secondary_mapping = { - "camlp4-dev": "camlp4", -} - -def mapPackage(name): - """map an rpm to a corresponding deb, based on file contents""" - # XXXXX for now we use a static map - isDevel=False - if name.endswith( "-devel" ): - isDevel = True - name = name[ :-len("-devel") ] - mapped = mapping[name] - if type(mapped) != list: - mapped = [mapped] - res = [] - for m in mapped: - if isDevel: - m += "-dev" - if m == "camlp4-dev": - m = "camlp4" - if m == "camlp4-extra-dev": - m = "camlp4-extra" - if m == "libeasy-format-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... - m = "libeasy-format-ocaml-dev" - if m == "libbiniou-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... - m = "libbiniou-ocaml-dev" - if m == "libssl1.0.0-dev": - m = "libssl-dev" - if m == "libtype-conv-camlp4": - m = "libtype-conv-camlp4-dev" - if m == "libxapi-libvirt-storage-ocaml": - m = "libxapi-libvirt-storage-ocaml-dev" - if m == "libsexplib-camlp4": - m = "libsexplib-camlp4-dev" - if m == "ocaml-findlib-dev": - m = ["ocaml-findlib", "libfindlib-ocaml-dev"] - if m == "/bin/sh": - continue - if m == "xen-hypervisor-dev": - m = ["libxen-dev", "xen-utils", "blktap-dev"] - if m == "libvirt0-dev": - m = "libvirt-dev" - if m == "libxen-4.2-dev": - m = "libxen-dev" - if m == "libvirt-bin-dev": - m = "libvirt-bin" - if type(m) != list: - m = [m] - res += m - return res - - -def mapPackageName(hdr): - """rewrite an rpm name to fit with debian standards""" - name = hdr['name'] - # XXX UGLY - - # Debian adds a -dev suffix to development packages, - # whereas Fedora uses -devel - isDevel = False - if name.endswith( "-devel" ): - isDevel = True - name = name[ :-len("-devel") ] - - #name = mapPackageBaseName(name) - - # Debian prefixes library packag names with 'lib' - #if "Libraries" in hdr['group'] or "library" in hdr['summary'].lower(): - # name = "lib" + name - - # Do this manually for now... - name = name.replace( name, mapPackage(name)[0] ) - - if isDevel: - name += "-dev" - - # hack for type-conv. dh_ocaml insists that there must be a -dev package for anything with ocaml or camlp4 in the name... - if name == "libtype-conv-camlp4": - name = "libtype-conv-camlp4-dev" - return name - - - -def mapSection(rpm_name): - return "ocaml" # XXXXX - - def formatDescription(description): """need to format this - correct line length, initial one space indent, and blank lines must be replaced by dots""" @@ -304,15 +76,15 @@ def formatDescription(description): def sourceDebFromSpec(spec): res = "" - res += "Source: %s\n" % mapPackage(spec.sourceHeader['name'])[0] #XXX should this be mapped? + res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] #XXX should this be mapped? res += "Priority: %s\n" % "optional" res += "Maintainer: %s\n" % "Euan Harris " #XXX - res += "Section: %s\n" % mapSection(spec.sourceHeader['group']) + res += "Section: %s\n" % mappkgname.mapSection(spec.sourceHeader['group']) res += "Standards-Version: %s\n" % STANDARDS_VERSION res += "Build-Depends:\n" build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox" ] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): - deps = mapPackage(pkg) + deps = mappkgname.mapPackage(pkg) # XXXX Ick! if type(deps) != list: deps = [deps] @@ -327,12 +99,12 @@ def sourceDebFromSpec(spec): def binaryDebFromSpec(spec): res = "" - res += "Package: %s\n" % mapPackageName(spec.header) + res += "Package: %s\n" % mappkgname.mapPackageName(spec.header) res += "Architecture: %s\n" % ("any" if spec.header['arch'] in [ "x86_64", "i686"] else "all") res += "Depends:\n" depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): - deps = mapPackage(pkg) + deps = mappkgname.mapPackage(pkg) # XXXX Ick! if type(deps) != list: deps = [deps] @@ -447,7 +219,7 @@ def debianRulesDhInstallFromSpec(spec, specpath, path): rule = ".PHONY: override_dh_install\n" rule += "override_dh_install:\n" rule += "\tdh_install\n" - pkgname = mapPackageName(spec.sourceHeader) + pkgname = mappkgname.mapPackageName(spec.sourceHeader) files = filesFromSpec(pkgname, specpath) if files.has_key( pkgname + "-%exclude" ): for pat in files[pkgname + "-%exclude"]: @@ -458,7 +230,7 @@ def debianRulesDhInstallFromSpec(spec, specpath, path): def debianConfigFilesFromSpec(spec, specpath, path): - pkgname = mapPackageName(spec.sourceHeader) + pkgname = mappkgname.mapPackageName(spec.sourceHeader) files = filesFromSpec(pkgname, specpath) config_files = "" if files.has_key( pkgname + "-%config" ): @@ -502,7 +274,7 @@ def debianChangelogFromSpec(spec): author = name version = "%s-%s" % (spec.sourceHeader['version'], spec.sourceHeader['release']) - res += "%s (%s) UNRELEASED; urgency=low\n" % (mapPackage(hdr['name'])[0], version) + res += "%s (%s) UNRELEASED; urgency=low\n" % (mappkgname.mapPackage(hdr['name'])[0], version) res += "\n" text = re.sub( "^-", "*", text, flags=re.MULTILINE ) text = re.sub( "^", " ", text, flags=re.MULTILINE ) @@ -541,7 +313,7 @@ def debianFilesFromPkg(basename, pkg, specpath): def debianFilelistsFromSpec(spec, path, specpath): for pkg in spec.packages: - name = "%s.install.in" % mapPackageName(pkg.header) + name = "%s.install.in" % mappkgname.mapPackageName(pkg.header) with open( os.path.join(path, "debian/%s") % name, "w" ) as f: f.write( debianFilesFromPkg(spec.sourceHeader['name'], pkg, specpath) ) @@ -623,7 +395,7 @@ def renameSource(origfilename, pkgname, pkgversion): if not m: print "error: could not parse filename %s" % filename basename, ext = m.groups()[:2] - baseFileName = "%s_%s.orig%s" % (mapPackage(pkgname)[0], pkgversion, ext) + baseFileName = "%s_%s.orig%s" % (mappkgname.mapPackage(pkgname)[0], pkgversion, ext) shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py new file mode 100755 index 00000000..5ff36f56 --- /dev/null +++ b/scripts/mappkgname.py @@ -0,0 +1,233 @@ +#!/usr/bin/python + +"""Maps an RPM package name to the equivalent DEB. + The mapping is static, but in future will be + made dynamically by querying the package databases.""" + + +def mapPackageBaseName(name): + """rewrite an rpm name to fit with debian standards""" + # Debian puts the language name after the library name + # whereas Fedora puts it before + if name.startswith( "ocaml-" ): + name = name[ len("ocaml-"): ] + "-ocaml" + + return name + +mapping = { + "biniou": "libbiniou-ocaml", + "cmdliner": "libcmdliner-ocaml", + "cppo": "cppo", + "deriving-ocsigen": "libderiving-ocsigen-ocaml", + "easy-format": "libeasy-format-ocaml", + "eliloader": "eliloader", + "ffs": "ffs", + "forkexecd": "forkexecd", + "js_of_ocaml": "libjs-of-ocaml", + "libnl3-cli": "libnl-3-cli", + "libnl3-doc": "libnl-3-doc", + "libnl3": "libnl-3", + "message-switch": "message-switch", + "ocaml-bitstring": "libbitstring-ocaml", + "ocaml-camomile-data": "libcamomile-data-ocaml", + "ocaml-camomile": "libcamomile-ocaml", + "ocaml-cdrom": "libcdrom-ocaml", + "ocaml-cohttp": "libcohttp-ocaml", + "ocaml-cstruct": "libcstruct-ocaml", + "ocaml-fd-send-recv": "libfd-send-recv-ocaml", + "ocaml-lambda-term": "liblambda-term-ocaml", + "ocaml-libvhd": "libvhd-ocaml", + "ocaml-libvirt": "libvirt-ocaml", + "ocaml-lwt": "liblwt-ocaml", + "ocaml-nbd": "libnbd-ocaml", + "ocaml-netdev": "libnetdev-ocaml", + "ocaml-obuild": "ocaml-obuild", + "ocaml-oclock": "liboclock-ocaml" , + "ocaml-ocplib-endian": "ocplib-endian-ocaml", + "ocaml-ounit": "libounit-ocaml", + "ocaml-qmp": "libqmp-ocaml", + "ocaml-react": "libreact-ocaml", + "ocaml-re": "libre-ocaml" , + "ocaml-rpc": "librpc-ocaml", + "ocaml-sexplib": "libsexplib-camlp4", + "ocaml-ssl": "libssl-ocaml" , + "ocaml-stdext": "libstdext-ocaml", + "ocaml-syslog": "libsyslog-ocaml", + "ocaml-tapctl": "libtapctl-ocaml", + "ocaml-text": "libtext-ocaml", + "ocaml-type-conv": "libtype-conv-camlp4", + "ocaml-uri": "liburi-ocaml" , + "ocaml-uuidm": "libuuidm-ocaml", + "ocaml-xcp-idl": "libxcp-idl-ocaml", + "ocaml-xcp-inventory": "libxcp-inventory-ocaml", + "ocaml-xcp-rrd": "libxcp-rrd-ocaml", + "ocaml-xen-api-client": "libxen-api-client-ocaml", + "ocaml-xen-api-libs-transitional": "ocaml-xen-api-libs-transitional", + "ocaml-xen-lowlevel-libs": "ocaml-xen-lowlevel-libs", + "ocaml-xenops": "libxenops-ocaml", + "ocaml-xenstore-clients": "libxenstore-clients-ocaml", + "ocaml-xenstore": "libxenstore-ocaml", + "ocaml-yojson": "libyojson-ocaml", + "ocaml-zed": "libzed-ocaml", + "omake": "omake", + "openstack-xapi-plugins": "openstack-xapi-plugins", + "optcomp": "optcomp-ocaml", + "sm-cli": "sm-cli", + "squeezed": "squeezed", + "utop": "utop", + "vncterm": "vncterm", + "xapi-libvirt-storage": "libxapi-libvirt-storage-ocaml", + "xapi-python": "xapi-python", + "xapi": "xapi", + "xapi-xe": "xapi-xe", + "xcp-networkd": "xcp-networkd" , + "xcp-rrdd": "xcp-rrdd", + "xe-create-templates": "xe-create-templates", + "xenops-cli": "xenops-cli", + "xenopsd-libvirt": "xenopsd-libvirt", + "xenopsd-simulator": "xenopsd-simulator", + "xenopsd-xc": "xenopsd-xc", + "xenopsd-xenlight": "xenopsd-xenlight", + "xenopsd": "xenopsd", + "xenserver-core": "xenserver-core", + "xenserver-install-wizard": "xenserver-install-wizard", + "xenserver-tech-preview-release": "xenserver-tech-preview-release", + "xmlm": "libxmlm-ocaml", + "xsconsole": "xsconsole", + "xsiostat": "xsiostat", + "xenserver-core-latest-snapshot": "xenserver-core-latest-snapshot", + + # extras + "ocaml": ["ocaml-nox", "ocaml-native-compilers"], + "ocaml-findlib": "ocaml-findlib", + "ocaml-ocamldoc": "ocaml-nox", + "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? + "ocaml-compiler-libs", + "ocaml-camlp4": ["camlp4", "camlp4-extra"], + "openssl": "libssl1.0.0", + "xen": "xen-hypervisor", + "libuuid": "uuid", + "libvirt": ["libvirt0", "libvirt-bin"], + "xen-libs": "libxen-4.2", + "make": "make", + "ncurses": "libncurses5", + "chkconfig": [], # "chkconfig", + "initscripts": [], # "initscripts", + "PyPAM": "python-pam", + "perl": "perl", + "gawk": "gawk", + "pam": "libpam0g", + "tetex-latex": "texlive-base", + "zlib": "zlib1g", + "git": "git", + "stunnel": "stunnel", + "bash-completion": "bash-completion", + "python": "python", + "time": "time", + "newt": "libnewt0.52", + "flex": "flex", + "bison": "bison", + "/sbin/ldconfig": "/sbin/ldconfig", + "kernel-headers": "linux-headers-3.2.0-51-generic", + "libvirt-docs": "libvirt-doc", + "chrpath": "chrpath", + "kernel": "linux-image", + "kernel-firmware": "linux-firmware", + + # this seems to come from packages like xcp-networkd, which don't have + # any requirements + "/bin/sh": "/bin/sh", + "libxl-headers": "libxl-headers", + "xen-utils": "xen-utils", + "nfs-utils": "nfs-common", + "hwdata": "hwdata", + "redhat-lsb-core": "lsb-base", + "ethtool": "ethtool", + "qemu-system-x86": "qemu-system-x86", + "python-argparse": "libpython2.7-stdlib", +} + +secondary_mapping = { + "camlp4-dev": "camlp4", +} + +def mapPackage(name): + """map an rpm to a corresponding deb, based on file contents""" + # XXXXX for now we use a static map + isDevel=False + if name.endswith( "-devel" ): + isDevel = True + name = name[ :-len("-devel") ] + mapped = mapping[name] + if type(mapped) != list: + mapped = [mapped] + res = [] + for m in mapped: + if isDevel: + m += "-dev" + if m == "camlp4-dev": + m = "camlp4" + if m == "camlp4-extra-dev": + m = "camlp4-extra" + if m == "libeasy-format-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... + m = "libeasy-format-ocaml-dev" + if m == "libbiniou-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... + m = "libbiniou-ocaml-dev" + if m == "libssl1.0.0-dev": + m = "libssl-dev" + if m == "libtype-conv-camlp4": + m = "libtype-conv-camlp4-dev" + if m == "libxapi-libvirt-storage-ocaml": + m = "libxapi-libvirt-storage-ocaml-dev" + if m == "libsexplib-camlp4": + m = "libsexplib-camlp4-dev" + if m == "ocaml-findlib-dev": + m = ["ocaml-findlib", "libfindlib-ocaml-dev"] + if m == "/bin/sh": + continue + if m == "xen-hypervisor-dev": + m = ["libxen-dev", "xen-utils", "blktap-dev"] + if m == "libvirt0-dev": + m = "libvirt-dev" + if m == "libxen-4.2-dev": + m = "libxen-dev" + if m == "libvirt-bin-dev": + m = "libvirt-bin" + if type(m) != list: + m = [m] + res += m + return res + + +def mapPackageName(hdr): + """rewrite an rpm name to fit with debian standards""" + name = hdr['name'] + # XXX UGLY + + # Debian adds a -dev suffix to development packages, + # whereas Fedora uses -devel + isDevel = False + if name.endswith( "-devel" ): + isDevel = True + name = name[ :-len("-devel") ] + + #name = mapPackageBaseName(name) + + # Debian prefixes library packag names with 'lib' + #if "Libraries" in hdr['group'] or "library" in hdr['summary'].lower(): + # name = "lib" + name + + # Do this manually for now... + name = name.replace( name, mapPackage(name)[0] ) + + if isDevel: + name += "-dev" + + # hack for type-conv. dh_ocaml insists that there must be a -dev package for anything with ocaml or camlp4 in the name... + if name == "libtype-conv-camlp4": + name = "libtype-conv-camlp4-dev" + return name + +def mapSection(rpm_name): + return "ocaml" # XXXXX + From 535696ea7a99235d11f9f1ce911357202ec8cead Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 12:05:13 +0100 Subject: [PATCH 0446/1125] debian: Add a script to rebuild the dists directory Signed-off-by: Euan Harris --- scripts/apt-ftparchive.conf | 27 +++++++++++++++++++++++ scripts/apt-raring-release.conf | 7 ++++++ scripts/archive.conf | 8 +++++++ scripts/update-debian-dist.sh | 39 +++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 scripts/apt-ftparchive.conf create mode 100644 scripts/apt-raring-release.conf create mode 100644 scripts/archive.conf create mode 100755 scripts/update-debian-dist.sh diff --git a/scripts/apt-ftparchive.conf b/scripts/apt-ftparchive.conf new file mode 100644 index 00000000..64d3e4ce --- /dev/null +++ b/scripts/apt-ftparchive.conf @@ -0,0 +1,27 @@ +Dir { + ArchiveDir "."; + CacheDir "."; +}; + +Default { + Packages::Compress ". gzip bzip2"; + Sources::Compress "gzip bzip2"; + Contents::Compress "gzip bzip2"; +}; + +BinDirectory "dists/raring/main/binary-amd64" { + Packages "dists/raring/main/binary-amd64/Packages"; + Contents "dists/raring/Contents-amd64"; + SrcPackages "dists/raring/main/source/Sources"; +}; + +Tree "dists/raring" { + Sections "main"; + Architectures "amd64 source"; +}; + +Default { + Packages { + Extensions ".deb"; + }; +}; diff --git a/scripts/apt-raring-release.conf b/scripts/apt-raring-release.conf new file mode 100644 index 00000000..679587f8 --- /dev/null +++ b/scripts/apt-raring-release.conf @@ -0,0 +1,7 @@ +APT::FTPArchive::Release::Origin "Euan Harris "; +APT::FTPArchive::Release::Label "xenserver-core"; +APT::FTPArchive::Release::Suite "experimental"; +APT::FTPArchive::Release::Codename "raring"; +APT::FTPArchive::Release::Architectures "amd64 i386 source"; +APT::FTPArchive::Release::Components "main"; +APT::FTPArchive::Release::Description "xenserver-core for Debian"; diff --git a/scripts/archive.conf b/scripts/archive.conf new file mode 100644 index 00000000..ff3430a5 --- /dev/null +++ b/scripts/archive.conf @@ -0,0 +1,8 @@ +Dir { + ArchiveDir "/local/scratch/euanh/debbuild"; +}; + +BinDirectory "dists/raring" { + Packages "dists/raring/main/binary-amd64/Packages"; + SrcPackages "dists/raring/main/source/Sources"; +}; diff --git a/scripts/update-debian-dist.sh b/scripts/update-debian-dist.sh new file mode 100755 index 00000000..57933183 --- /dev/null +++ b/scripts/update-debian-dist.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +rm -rf dists +mkdir -p dists/raring/main/binary-amd64 +mkdir -p dists/raring/main/binary-i386 +mkdir -p dists/raring/main/source + +rsync --delete -avu SRPMS/* dists/raring/main/source +rsync --delete -avu RPMS/*.deb dists/raring/main/binary-amd64 + +cat >dists/raring/main/binary-amd64/Release <dists/raring/main/source/Release <dists/raring/main/binary-amd64/Packages +#apt-ftparchive -c apt-raring-release.conf release dists/raring/ >dists/raring/Release + + +# https://enc.com.au/2007/08/07/creating-an-apt-archive/ +apt-ftparchive generate scripts/archive.conf + +echo "now run: rsync -avu --delete dists/ ~/public_html/dists/" From 8ce7ba0d6e3d76c67ccb2e4fd5270ad9dbfba99d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 13:46:47 +0100 Subject: [PATCH 0447/1125] makedeb: Small tidy up Signed-off-by: Euan Harris --- scripts/makedeb.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/scripts/makedeb.py b/scripts/makedeb.py index 07c0546b..b990ee91 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -20,14 +20,14 @@ # Hack to disable tests for ocaml-oclock # Hard coded install files only install ocaml dir # Should be building signed debs -# mapPackageName needs to return a list of packages, and to understand version numbers # By default, RPM expects everything to be in $HOME/rpmbuild. +# We want it to run in the current directory. rpm.addMacro( '_topdir', os.getcwd() ) -# Directories where rpmbuild/mock expects to find inputs +# Directories where rpmbuild expects to find inputs # and writes outputs top_dir = rpm.expandMacro( '%_topdir' ) rpm_dir = rpm.expandMacro( '%_rpmdir' ) @@ -46,7 +46,6 @@ # (Actually, using {}, not (), because these identifiers # end up in helper scripts, not in the makefile rpm.addMacro( "buildroot", "${DESTDIR}" ) -#rpm.addMacro( "_libdir", "${STDLIBDIR}" ) rpm.addMacro( "_libdir", "/usr/lib" ) @@ -76,7 +75,7 @@ def formatDescription(description): def sourceDebFromSpec(spec): res = "" - res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] #XXX should this be mapped? + res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] res += "Priority: %s\n" % "optional" res += "Maintainer: %s\n" % "Euan Harris " #XXX res += "Section: %s\n" % mappkgname.mapSection(spec.sourceHeader['group']) @@ -85,9 +84,6 @@ def sourceDebFromSpec(spec): build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox" ] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): deps = mappkgname.mapPackage(pkg) - # XXXX Ick! - if type(deps) != list: - deps = [deps] for dep in deps: if version: dep += " (>= %s)" % version @@ -105,9 +101,6 @@ def binaryDebFromSpec(spec): depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): deps = mappkgname.mapPackage(pkg) - # XXXX Ick! - if type(deps) != list: - deps = [deps] for dep in deps: if version: dep += " (>= %s)" % version @@ -162,12 +155,6 @@ def debianRulesFromSpec(spec, specpath, path): # RPM doesn't have a configure target - everything happens in the build target def debianRulesConfigureFromSpec(spec): -# return """.PHONY: override_dh_auto_configure -#override_dh_auto_configure: -#\tocaml setup.ml -configure --destdir $(DESTDIR)/$(OCAML_STDLIB_DIR) -# -#""" - # needed for OASIS packages with configure scripts # if debhelper sees a configure script it will assume it's from autoconf # and will run it with arguments that an OASIS configur script won't understand From 95eac45d600f687f1721e2b648a208a0b8c11274 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 9 Sep 2013 11:56:08 +0100 Subject: [PATCH 0448/1125] xcp-sm: Add required package mappings Signed-off-by: Euan Harris --- scripts/mappkgname.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 5ff36f56..df1a4bdc 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -72,7 +72,9 @@ def mapPackageBaseName(name): "omake": "omake", "openstack-xapi-plugins": "openstack-xapi-plugins", "optcomp": "optcomp-ocaml", + "xcp-sm": "xcp-sm", "sm-cli": "sm-cli", + "xcp-sm-rawhba": "xcp-sm-rawhba", "squeezed": "squeezed", "utop": "utop", "vncterm": "vncterm", @@ -133,6 +135,7 @@ def mapPackageBaseName(name): "chrpath": "chrpath", "kernel": "linux-image", "kernel-firmware": "linux-firmware", + "swig": "swig", # this seems to come from packages like xcp-networkd, which don't have # any requirements From 97150a25727b8dc3c555febb892f913ce6b76105 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 13 Sep 2013 09:37:34 +0100 Subject: [PATCH 0449/1125] makedeb: Fix xen package mappings Signed-off-by: Euan Harris --- scripts/mappkgname.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index df1a4bdc..a1902080 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -107,7 +107,7 @@ def mapPackageBaseName(name): "ocaml-compiler-libs", "ocaml-camlp4": ["camlp4", "camlp4-extra"], "openssl": "libssl1.0.0", - "xen": "xen-hypervisor", + "xen": ["xen-hypervisor", "qemu-system-x86", "blktap-utils"], "libuuid": "uuid", "libvirt": ["libvirt0", "libvirt-bin"], "xen-libs": "libxen-4.2", @@ -196,6 +196,10 @@ def mapPackage(name): m = "libxen-dev" if m == "libvirt-bin-dev": m = "libvirt-bin" + if m == "blktap-utils-dev": + m = "blktap-utils" + if m == "qemu-system-x86-dev": + m = "qemu-system-x86" if type(m) != list: m = [m] res += m From 7146e9d763df1dadcc4f0335d0310736be14698f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Sep 2013 18:58:49 +0100 Subject: [PATCH 0450/1125] makedeb: Rewrite debianRulesFromSpec to return a tree, not create files directly Signed-off-by: Euan Harris --- scripts/makedeb.py | 186 +++++++++++++++++++++++++++++---------------- 1 file changed, 121 insertions(+), 65 deletions(-) diff --git a/scripts/makedeb.py b/scripts/makedeb.py index b990ee91..50b98920 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -124,47 +124,97 @@ def debianControlFromSpec(spec): return res -def ocamlRulesPreamble(): - return """#!/usr/bin/make -f -#include /usr/share/cdbs/1/rules/debhelper.mk -#include /usr/share/cdbs/1/class/makefile.mk -#include /usr/share/cdbs/1/rules/ocaml.mk - -export DH_VERBOSE=1 -export DH_OPTIONS +class Tree(object): + def __init__(self): + self.t = {} + + def append(self, filename, contents=None, permissions=None): + node = self.t.get( filename, {} ) + if contents: + node['contents'] = node.get( 'contents', '' ) + contents + if permissions: + if node.has_key('permissions') and node['permissions'] != permissions: + raise Exception("Trying to change permissions for " % filename) + + if permissions: + node['permissions'] = permissions + else: + node['permissions'] = 0o644 + self.t[filename] = node + + def apply(self, path): + for k, v in self.t.items(): + permissions = v.get("permissions", 0o644) + contents = v.get("contents", "") + fullpath = os.path.dirname( os.path.join(path, k)) + if not os.path.isdir(fullpath): + print "makedirs(%s)" % fullpath + os.makedirs(fullpath) + f = os.open( os.path.join(path, k), os.O_WRONLY | os.O_CREAT, permissions) + print "write(%s)" % os.path.join(path, k) + os.write(f, contents) + os.close(f) + + def __repr__(self): + res = "" + for k, v in self.t.items(): + permissions = v.get("permissions", 0o644) + contents = v.get("contents", "") + res += "%s (0o%o):\n" % (k, permissions) + res += contents + res += "\n\n" + return res + + +def debianRulesFromSpec(spec, specpath): + # XXX make each helper return a subtree and merge them at this level? + # XXX write some tests! + res = Tree() + ocamlRulesPreamble(spec, res) + debianRulesConfigureFromSpec(spec, res) + debianRulesBuildFromSpec(spec, res) + debianRulesInstallFromSpec(spec, res) + debianRulesDhInstallFromSpec(spec, res, specpath) # XXX need to augment the specfile object + debianRulesCleanFromSpec(spec, res) + debianRulesTestFromSpec(spec, res) + return res -export DESTDIR=$(CURDIR)/debian/tmp +# XXX move all this into a separate file -%: -\tdh $@ --with ocaml +def ocamlRulesPreamble(spec, tree): + # should only include this at the end, if we noticed that we have packed up ocaml files + # similarly for python files + rule = "#!/usr/bin/make -f\n" + rule += "\n" + rule += "#include /usr/share/cdbs/1/rules/debhelper.mk\n" + rule += "#include /usr/share/cdbs/1/class/makefile.mk\n" + rule += "#include /usr/share/cdbs/1/rules/ocaml.mk\n" + rule += "\n" + rule += "export DH_VERBOSE=1\n" + rule += "export DH_OPTIONS\n" + rule += "export DESTDIR=$(CURDIR)/debian/tmp\n" + rule += "%:\n" + rule += "\tdh $@ --with ocaml\n" + rule += "\n" -""" + tree.append('debian/rules', rule) -def debianRulesFromSpec(spec, specpath, path): - res = "" - res += ocamlRulesPreamble() - res += debianRulesConfigureFromSpec(spec) - res += debianRulesBuildFromSpec(spec, path) - res += debianRulesInstallFromSpec(spec, path) - res += debianRulesDhInstallFromSpec(spec, specpath, path) - res += debianRulesCleanFromSpec(spec, path) - res += debianRulesTestFromSpec(spec, path) - return res +def debianRulesConfigureFromSpec(spec, tree): + # RPM doesn't have a configure target - everything happens in the + # build target. Nevertheless we must override the auto_configure target + # because some OASIS packages have configure scripts. If debhelper + # sees a configure script it will assume it's from autoconf and will + # run it with arguments that an OASIS configure script won't understand. - -# RPM doesn't have a configure target - everything happens in the build target -def debianRulesConfigureFromSpec(spec): - # needed for OASIS packages with configure scripts - # if debhelper sees a configure script it will assume it's from autoconf - # and will run it with arguments that an OASIS configur script won't understand rule = ".PHONY: override_dh_auto_configure\n" rule += "override_dh_auto_configure:\n" - return rule + rule += "\n" + tree.append('debian/rules', rule) -def debianRulesBuildFromSpec(spec, path): +def debianRulesBuildFromSpec(spec, tree): # RPM's build script is just a script which is run at the appropriate time. # debian/rules is a Makefile. Makefile recipes aren't shell scripts - each # line is run independently, so exports don't survive from line to line and @@ -175,37 +225,40 @@ def debianRulesBuildFromSpec(spec, path): # ...we could write them to temporary files as the makefile is evaluated... # this sub-script business unfortunately means that variables from the makefile # aren't passed through - # Hurray, the .ONESHELL special target may save us if not spec.build: - return "" - rule = ".PHONY: override_dh_auto_build\n" + return {} + + rule = ".PHONY: override_dh_auto_build\n" rule += "override_dh_auto_build:\n" rule += "\tdebian/build.sh\n" rule += "\n" - with open(os.path.join(path, "debian/build.sh"), "w") as f: - helper = "#!/bin/sh\n" - helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock - helper += spec.build.replace("$RPM_BUILD_ROOT", "${DESTDIR}") - f.write(helper) - os.chmod(os.path.join(path, "debian/build.sh"), 0o755) - return rule + + helper = "#!/bin/sh\n" + helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock + helper += spec.build.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/build.sh', helper, permissions=0o755) -def debianRulesInstallFromSpec(spec, path): - rule = ".PHONY: override_dh_auto_install\n" +def debianRulesInstallFromSpec(spec, tree): + rule = ".PHONY: override_dh_auto_install\n" rule += "override_dh_auto_install:\n" rule += "\tdebian/install.sh\n" rule += "\n" - with open(os.path.join(path, "debian/install.sh"), "w") as f: - f.write("#!/bin/sh\n" + spec.install.replace("$RPM_BUILD_ROOT", "${DESTDIR}")) - os.chmod(os.path.join(path, "debian/install.sh"), 0o755) - return rule -def debianRulesDhInstallFromSpec(spec, specpath, path): - rule = ".PHONY: override_dh_install\n" + helper = "#!/bin/sh\n" + helper += spec.install.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/install.sh', helper, permissions=0o755) + +def debianRulesDhInstallFromSpec(spec, tree, specpath): + rule = ".PHONY: override_dh_install\n" rule += "override_dh_install:\n" rule += "\tdh_install\n" + pkgname = mappkgname.mapPackageName(spec.sourceHeader) files = filesFromSpec(pkgname, specpath) if files.has_key( pkgname + "-%exclude" ): @@ -213,7 +266,8 @@ def debianRulesDhInstallFromSpec(spec, specpath, path): path = "\trm -f debian/%s/%s\n" % (pkgname, rpm.expandMacro(pat)) rule += os.path.normpath(path) rule += "\n" - return rule + + tree.append('debian/rules', rule) def debianConfigFilesFromSpec(spec, specpath, path): @@ -226,23 +280,26 @@ def debianConfigFilesFromSpec(spec, specpath, path): return config_files -def debianRulesTestFromSpec(spec, path): - # XXX HACK for ocaml-oclock - don't try to run the tests when building - rule = ".PHONY: override_dh_auto_test\n" - rule += "override_dh_auto_test:\n" - return rule - - -def debianRulesCleanFromSpec(spec, path): +def debianRulesCleanFromSpec(spec, tree): rule = ".PHONY: override_dh_auto_clean\n" rule += "override_dh_auto_clean:\n" rule += "\tdebian/clean.sh\n" rule += re.sub("^", "\t", spec.clean.strip(), flags=re.MULTILINE) - rule += "\n" - with open(os.path.join(path, "debian/clean.sh"), "w") as f: - f.write("#!/bin/sh\n" + spec.clean.replace("$RPM_BUILD_ROOT", "${DESTDIR}")) - os.chmod(os.path.join(path, "debian/clean.sh"), 0o755) - return rule + rule += "\n\n" + + helper = "#!/bin/sh\n" + spec.clean.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/clean.sh', helper, permissions=0o755) + + +def debianRulesTestFromSpec(spec, tree): + # XXX HACK for ocaml-oclock - don't try to run the tests when building + rule = ".PHONY: override_dh_auto_test\n" + rule += "override_dh_auto_test:\n" + + tree.append('debian/rules', rule) + def debianChangelogFromSpec(spec): @@ -323,9 +380,8 @@ def debianDirFromSpec(spec, path, specpath, isnative): with open( os.path.join(path, "debian/control"), "w" ) as control: control.write(debianControlFromSpec(spec)) - with open( os.path.join(path, "debian/rules"), "w" ) as rules: - rules.write(debianRulesFromSpec(spec, specpath, path)) - os.chmod( os.path.join(path, "debian/rules"), 0o755 ) + rules = debianRulesFromSpec(spec, specpath) + rules.apply(path) with open( os.path.join(path, "debian/compat"), "w" ) as compat: compat.write("8\n") From 4d6f8a4fdb57d01fd99003c840008534438c29a9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 10:34:17 +0100 Subject: [PATCH 0451/1125] makedeb: Split Debian rules functions into a separate module Signed-off-by: Euan Harris --- scripts/debianrules.py | 144 +++++++++++++++++++++ scripts/makedeb.py | 281 ++--------------------------------------- scripts/rpmextra.py | 84 ++++++++++++ scripts/tree.py | 42 ++++++ 4 files changed, 284 insertions(+), 267 deletions(-) create mode 100755 scripts/debianrules.py create mode 100644 scripts/rpmextra.py create mode 100644 scripts/tree.py diff --git a/scripts/debianrules.py b/scripts/debianrules.py new file mode 100755 index 00000000..bb861564 --- /dev/null +++ b/scripts/debianrules.py @@ -0,0 +1,144 @@ +#!/usr/bin/python + +import rpm +import rpmextra +import os +import urlparse +import sys +import textwrap +import time +import re +import magic +import shutil +import subprocess +import shlex +import glob +import mappkgname +from tree import Tree + + +def rulesFromSpec(spec, specpath): + # XXX make each helper return a subtree and merge them at this level? + # XXX write some tests! + res = Tree() + ocamlRulesPreamble(spec, res) + rulesConfigureFromSpec(spec, res) + rulesBuildFromSpec(spec, res) + rulesInstallFromSpec(spec, res) + rulesDhInstallFromSpec(spec, res, specpath) # XXX need to augment the specfile object + rulesCleanFromSpec(spec, res) + rulesTestFromSpec(spec, res) + return res + +# XXX move all this into a separate file + +def ocamlRulesPreamble(spec, tree): + # should only include this at the end, if we noticed that we have packed up ocaml files + # similarly for python files + rule = "#!/usr/bin/make -f\n" + rule += "\n" + rule += "#include /usr/share/cdbs/1/rules/debhelper.mk\n" + rule += "#include /usr/share/cdbs/1/class/makefile.mk\n" + rule += "#include /usr/share/cdbs/1/rules/ocaml.mk\n" + rule += "\n" + rule += "export DH_VERBOSE=1\n" + rule += "export DH_OPTIONS\n" + rule += "export DESTDIR=$(CURDIR)/debian/tmp\n" + rule += "%:\n" + rule += "\tdh $@ --with ocaml\n" + rule += "\n" + + tree.append('debian/rules', rule) + + +def rulesConfigureFromSpec(spec, tree): + # RPM doesn't have a configure target - everything happens in the + # build target. Nevertheless we must override the auto_configure target + # because some OASIS packages have configure scripts. If debhelper + # sees a configure script it will assume it's from autoconf and will + # run it with arguments that an OASIS configure script won't understand. + + rule = ".PHONY: override_dh_auto_configure\n" + rule += "override_dh_auto_configure:\n" + rule += "\n" + + tree.append('debian/rules', rule) + + +def rulesBuildFromSpec(spec, tree): + # RPM's build script is just a script which is run at the appropriate time. + # debian/rules is a Makefile. Makefile recipes aren't shell scripts - each + # line is run independently, so exports don't survive from line to line and + # multi-line constructions such as if statements don't work. + # Tried wrapping everything in a $(shell ...) function, but that didn't work. + # Just write the script fragment into a helper script in the debian directory. + # This almost certainly violates a Debian packaging guideline... + # ...we could write them to temporary files as the makefile is evaluated... + # this sub-script business unfortunately means that variables from the makefile + # aren't passed through + + if not spec.build: + return {} + + rule = ".PHONY: override_dh_auto_build\n" + rule += "override_dh_auto_build:\n" + rule += "\tdebian/build.sh\n" + rule += "\n" + + helper = "#!/bin/sh\n" + helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock + helper += spec.build.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/build.sh', helper, permissions=0o755) + + +def rulesInstallFromSpec(spec, tree): + rule = ".PHONY: override_dh_auto_install\n" + rule += "override_dh_auto_install:\n" + rule += "\tdebian/install.sh\n" + rule += "\n" + + helper = "#!/bin/sh\n" + helper += spec.install.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/install.sh', helper, permissions=0o755) + +def rulesDhInstallFromSpec(spec, tree, specpath): + rule = ".PHONY: override_dh_install\n" + rule += "override_dh_install:\n" + rule += "\tdh_install\n" + + pkgname = mappkgname.mapPackageName(spec.sourceHeader) + files = rpmextra.filesFromSpec(pkgname, specpath) + if files.has_key( pkgname + "-%exclude" ): + for pat in files[pkgname + "-%exclude"]: + path = "\trm -f debian/%s/%s\n" % (pkgname, rpm.expandMacro(pat)) + rule += os.path.normpath(path) + rule += "\n" + + tree.append('debian/rules', rule) + + + +def rulesCleanFromSpec(spec, tree): + rule = ".PHONY: override_dh_auto_clean\n" + rule += "override_dh_auto_clean:\n" + rule += "\tdebian/clean.sh\n" + rule += re.sub("^", "\t", spec.clean.strip(), flags=re.MULTILINE) + rule += "\n\n" + + helper = "#!/bin/sh\n" + spec.clean.replace("$RPM_BUILD_ROOT", "${DESTDIR}") + + tree.append('debian/rules', rule) + tree.append('debian/clean.sh', helper, permissions=0o755) + + +def rulesTestFromSpec(spec, tree): + # XXX HACK for ocaml-oclock - don't try to run the tests when building + rule = ".PHONY: override_dh_auto_test\n" + rule += "override_dh_auto_test:\n" + + tree.append('debian/rules', rule) + diff --git a/scripts/makedeb.py b/scripts/makedeb.py index 50b98920..e01b181e 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -1,6 +1,7 @@ #!/usr/bin/python import rpm +import rpmextra import os import urlparse import sys @@ -13,6 +14,7 @@ import shlex import glob import mappkgname +import debianrules # BUGS: # Code is a mess @@ -124,184 +126,6 @@ def debianControlFromSpec(spec): return res -class Tree(object): - def __init__(self): - self.t = {} - - def append(self, filename, contents=None, permissions=None): - node = self.t.get( filename, {} ) - if contents: - node['contents'] = node.get( 'contents', '' ) + contents - if permissions: - if node.has_key('permissions') and node['permissions'] != permissions: - raise Exception("Trying to change permissions for " % filename) - - if permissions: - node['permissions'] = permissions - else: - node['permissions'] = 0o644 - self.t[filename] = node - - def apply(self, path): - for k, v in self.t.items(): - permissions = v.get("permissions", 0o644) - contents = v.get("contents", "") - fullpath = os.path.dirname( os.path.join(path, k)) - if not os.path.isdir(fullpath): - print "makedirs(%s)" % fullpath - os.makedirs(fullpath) - f = os.open( os.path.join(path, k), os.O_WRONLY | os.O_CREAT, permissions) - print "write(%s)" % os.path.join(path, k) - os.write(f, contents) - os.close(f) - - def __repr__(self): - res = "" - for k, v in self.t.items(): - permissions = v.get("permissions", 0o644) - contents = v.get("contents", "") - res += "%s (0o%o):\n" % (k, permissions) - res += contents - res += "\n\n" - return res - - -def debianRulesFromSpec(spec, specpath): - # XXX make each helper return a subtree and merge them at this level? - # XXX write some tests! - res = Tree() - ocamlRulesPreamble(spec, res) - debianRulesConfigureFromSpec(spec, res) - debianRulesBuildFromSpec(spec, res) - debianRulesInstallFromSpec(spec, res) - debianRulesDhInstallFromSpec(spec, res, specpath) # XXX need to augment the specfile object - debianRulesCleanFromSpec(spec, res) - debianRulesTestFromSpec(spec, res) - return res - -# XXX move all this into a separate file - -def ocamlRulesPreamble(spec, tree): - # should only include this at the end, if we noticed that we have packed up ocaml files - # similarly for python files - rule = "#!/usr/bin/make -f\n" - rule += "\n" - rule += "#include /usr/share/cdbs/1/rules/debhelper.mk\n" - rule += "#include /usr/share/cdbs/1/class/makefile.mk\n" - rule += "#include /usr/share/cdbs/1/rules/ocaml.mk\n" - rule += "\n" - rule += "export DH_VERBOSE=1\n" - rule += "export DH_OPTIONS\n" - rule += "export DESTDIR=$(CURDIR)/debian/tmp\n" - rule += "%:\n" - rule += "\tdh $@ --with ocaml\n" - rule += "\n" - - tree.append('debian/rules', rule) - - -def debianRulesConfigureFromSpec(spec, tree): - # RPM doesn't have a configure target - everything happens in the - # build target. Nevertheless we must override the auto_configure target - # because some OASIS packages have configure scripts. If debhelper - # sees a configure script it will assume it's from autoconf and will - # run it with arguments that an OASIS configure script won't understand. - - rule = ".PHONY: override_dh_auto_configure\n" - rule += "override_dh_auto_configure:\n" - rule += "\n" - - tree.append('debian/rules', rule) - - -def debianRulesBuildFromSpec(spec, tree): - # RPM's build script is just a script which is run at the appropriate time. - # debian/rules is a Makefile. Makefile recipes aren't shell scripts - each - # line is run independently, so exports don't survive from line to line and - # multi-line constructions such as if statements don't work. - # Tried wrapping everything in a $(shell ...) function, but that didn't work. - # Just write the script fragment into a helper script in the debian directory. - # This almost certainly violates a Debian packaging guideline... - # ...we could write them to temporary files as the makefile is evaluated... - # this sub-script business unfortunately means that variables from the makefile - # aren't passed through - - if not spec.build: - return {} - - rule = ".PHONY: override_dh_auto_build\n" - rule += "override_dh_auto_build:\n" - rule += "\tdebian/build.sh\n" - rule += "\n" - - helper = "#!/bin/sh\n" - helper += "unset CFLAGS\n" #XXX HACK for ocaml-oclock - helper += spec.build.replace("$RPM_BUILD_ROOT", "${DESTDIR}") - - tree.append('debian/rules', rule) - tree.append('debian/build.sh', helper, permissions=0o755) - - -def debianRulesInstallFromSpec(spec, tree): - rule = ".PHONY: override_dh_auto_install\n" - rule += "override_dh_auto_install:\n" - rule += "\tdebian/install.sh\n" - rule += "\n" - - helper = "#!/bin/sh\n" - helper += spec.install.replace("$RPM_BUILD_ROOT", "${DESTDIR}") - - tree.append('debian/rules', rule) - tree.append('debian/install.sh', helper, permissions=0o755) - -def debianRulesDhInstallFromSpec(spec, tree, specpath): - rule = ".PHONY: override_dh_install\n" - rule += "override_dh_install:\n" - rule += "\tdh_install\n" - - pkgname = mappkgname.mapPackageName(spec.sourceHeader) - files = filesFromSpec(pkgname, specpath) - if files.has_key( pkgname + "-%exclude" ): - for pat in files[pkgname + "-%exclude"]: - path = "\trm -f debian/%s/%s\n" % (pkgname, rpm.expandMacro(pat)) - rule += os.path.normpath(path) - rule += "\n" - - tree.append('debian/rules', rule) - - -def debianConfigFilesFromSpec(spec, specpath, path): - pkgname = mappkgname.mapPackageName(spec.sourceHeader) - files = filesFromSpec(pkgname, specpath) - config_files = "" - if files.has_key( pkgname + "-%config" ): - for filename in files[pkgname + "-%config"]: - config_files += "%s\n" % filename - return config_files - - -def debianRulesCleanFromSpec(spec, tree): - rule = ".PHONY: override_dh_auto_clean\n" - rule += "override_dh_auto_clean:\n" - rule += "\tdebian/clean.sh\n" - rule += re.sub("^", "\t", spec.clean.strip(), flags=re.MULTILINE) - rule += "\n\n" - - helper = "#!/bin/sh\n" + spec.clean.replace("$RPM_BUILD_ROOT", "${DESTDIR}") - - tree.append('debian/rules', rule) - tree.append('debian/clean.sh', helper, permissions=0o755) - - -def debianRulesTestFromSpec(spec, tree): - # XXX HACK for ocaml-oclock - don't try to run the tests when building - rule = ".PHONY: override_dh_auto_test\n" - rule += "override_dh_auto_test:\n" - - tree.append('debian/rules', rule) - - - def debianChangelogFromSpec(spec): hdr = spec.sourceHeader res = "" @@ -329,12 +153,22 @@ def debianChangelogFromSpec(spec): return res +def debianConfigFilesFromSpec(spec, specpath, path): + pkgname = mappkgname.mapPackageName(spec.sourceHeader) + files = rpmextra.filesFromSpec(pkgname, specpath) + config_files = "" + if files.has_key( pkgname + "-%config" ): + for filename in files[pkgname + "-%config"]: + config_files += "%s\n" % filename + return config_files + + def debianFilesFromPkg(basename, pkg, specpath): # should be able to build this from the files sections - can't find how # to get at them from the spec object res = "" #res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific - files = filesFromSpec(basename, specpath) + files = rpmextra.filesFromSpec(basename, specpath) for l in files.get(pkg.header['name'], []): rpm.addMacro("_libdir", "usr/lib") rpm.addMacro("_bindir", "usr/bin") @@ -380,7 +214,7 @@ def debianDirFromSpec(spec, path, specpath, isnative): with open( os.path.join(path, "debian/control"), "w" ) as control: control.write(debianControlFromSpec(spec)) - rules = debianRulesFromSpec(spec, specpath) + rules = debianrules.rulesFromSpec(spec, specpath) rules.apply(path) with open( os.path.join(path, "debian/compat"), "w" ) as compat: @@ -442,93 +276,6 @@ def renameSource(origfilename, pkgname, pkgversion): shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) -def filesFromSpec(basename, specpath): - """The RPM library doesn't seem to give us access to the files section, - so we need to go and get it ourselves. This parsing algorithm is - based on build/parseFiles.c in RPM. The list of section titles - comes from build/parseSpec.c. We should get this by using ctypes - to load the rpm library.""" - """XXX shouldn't be parsing this by hand. will need to handle conditionals - within and surrounding files and packages sections.""" - - #XXX Why do we need the .install.in files? - - otherparts = [ - "%package", - "%prep", - "%build", - "%install", - "%check", - "%clean", - "%preun", - "%postun", - "%pretrans", - "%posttrans", - "%pre", - "%post", - "%changelog", - "%description", - "%triggerpostun", - "%triggerprein", - "%triggerun", - "%triggerin", - "%trigger", - "%verifyscript", - "%sepolicy", - ] - - files = {} - with open(specpath) as spec: - inFiles = False - section = "" - for line in spec: - tokens = line.strip().split(" ") - if tokens and tokens[0].lower() == "%files": - section = basename - inFiles = True - if len(tokens) > 1: - section = basename + "-" + tokens[1] - continue - - if tokens and tokens[0] in otherparts: - inFiles = False - - if inFiles: - if tokens[0].lower().startswith("%defattr"): - continue - if tokens[0].lower().startswith("%attr"): - continue - if tokens[0].lower() == "%doc": - docsection = section + "-doc" - files[docsection] = files.get(docsection, []) + tokens[1:] - continue - if tokens[0].lower() == "%if" or tokens[0].lower() == "%endif": - # XXX evaluate the if condition and do the right thing here - continue - if tokens[0].lower() == "%exclude": - excludesection = section + "-%exclude" - files[excludesection] = files.get(excludesection, []) + tokens[1:] - continue - if tokens[0].lower().startswith("%config"): - # dh_install automatically considers files in /etc to be config files - # so we don't have to do anythin special for them - # The spec file documentation says that a %config directive can - # only apply to a single file. - configsection = section + "-%config" - if tokens[1].startswith("/etc"): - files[section] = files.get(section, []) + tokens[1:] - else: - files[configsection] = files.get(configsection, []) + tokens[1:] - continue - if tokens[0].startswith("%config"): - # XXX do the right thing here - should add to debian/configfiles - continue - if line.strip(): - files[section] = files.get(section, []) + [line.strip()] - return files - - - # Instead of writing to all these files, we could just accumulate # everything in a dictionary of path -> (content, perms) and then # write the files at the end. diff --git a/scripts/rpmextra.py b/scripts/rpmextra.py new file mode 100644 index 00000000..70b391b2 --- /dev/null +++ b/scripts/rpmextra.py @@ -0,0 +1,84 @@ +import rpm + +def filesFromSpec(basename, specpath): + """The RPM library doesn't seem to give us access to the files section, + so we need to go and get it ourselves. This parsing algorithm is + based on build/parseFiles.c in RPM. The list of section titles + comes from build/parseSpec.c. We should get this by using ctypes + to load the rpm library.""" + """XXX shouldn't be parsing this by hand. will need to handle conditionals + within and surrounding files and packages sections.""" + + #XXX Why do we need the .install.in files? + + otherparts = [ + "%package", + "%prep", + "%build", + "%install", + "%check", + "%clean", + "%preun", + "%postun", + "%pretrans", + "%posttrans", + "%pre", + "%post", + "%changelog", + "%description", + "%triggerpostun", + "%triggerprein", + "%triggerun", + "%triggerin", + "%trigger", + "%verifyscript", + "%sepolicy", + ] + + files = {} + with open(specpath) as spec: + inFiles = False + section = "" + for line in spec: + tokens = line.strip().split(" ") + if tokens and tokens[0].lower() == "%files": + section = basename + inFiles = True + if len(tokens) > 1: + section = basename + "-" + tokens[1] + continue + + if tokens and tokens[0] in otherparts: + inFiles = False + + if inFiles: + if tokens[0].lower().startswith("%defattr"): + continue + if tokens[0].lower().startswith("%attr"): + continue + if tokens[0].lower() == "%doc": + docsection = section + "-doc" + files[docsection] = files.get(docsection, []) + tokens[1:] + continue + if tokens[0].lower() == "%if" or tokens[0].lower() == "%endif": + # XXX evaluate the if condition and do the right thing here + continue + if tokens[0].lower() == "%exclude": + excludesection = section + "-%exclude" + files[excludesection] = files.get(excludesection, []) + tokens[1:] + continue + if tokens[0].lower().startswith("%config"): + # dh_install automatically considers files in /etc to be config files + # so we don't have to do anythin special for them + # The spec file documentation says that a %config directive can + # only apply to a single file. + configsection = section + "-%config" + if tokens[1].startswith("/etc"): + files[section] = files.get(section, []) + tokens[1:] + else: + files[configsection] = files.get(configsection, []) + tokens[1:] + continue + if line.strip(): + files[section] = files.get(section, []) + [line.strip()] + return files + diff --git a/scripts/tree.py b/scripts/tree.py new file mode 100644 index 00000000..1719f57d --- /dev/null +++ b/scripts/tree.py @@ -0,0 +1,42 @@ +import os + +class Tree(object): + def __init__(self): + self.t = {} + + def append(self, filename, contents=None, permissions=None): + node = self.t.get( filename, {} ) + if contents: + node['contents'] = node.get( 'contents', '' ) + contents + if permissions: + if node.has_key('permissions') and node['permissions'] != permissions: + raise Exception("Trying to change permissions for " % filename) + + if permissions: + node['permissions'] = permissions + else: + node['permissions'] = 0o644 + self.t[filename] = node + + def apply(self, path): + for k, v in self.t.items(): + permissions = v.get("permissions", 0o644) + contents = v.get("contents", "") + fullpath = os.path.dirname( os.path.join(path, k)) + if not os.path.isdir(fullpath): + print "makedirs(%s)" % fullpath + os.makedirs(fullpath) + f = os.open( os.path.join(path, k), os.O_WRONLY | os.O_CREAT, permissions) + os.write(f, contents) + os.close(f) + + def __repr__(self): + res = "" + for k, v in self.t.items(): + permissions = v.get("permissions", 0o644) + contents = v.get("contents", "") + res += "%s (0o%o):\n" % (k, permissions) + res += contents + res += "\n\n" + return res + From ed9f216a3525671ffff33e7b5f156ead837a8af8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 11:30:22 +0100 Subject: [PATCH 0452/1125] makedeb: Move control file processing into a module Signed-off-by: Euan Harris --- scripts/debiancontrol.py | 81 ++++++++++++++++++++++++++++++++++++++++ scripts/makedeb.py | 67 ++------------------------------- 2 files changed, 84 insertions(+), 64 deletions(-) create mode 100644 scripts/debiancontrol.py diff --git a/scripts/debiancontrol.py b/scripts/debiancontrol.py new file mode 100644 index 00000000..6435c64e --- /dev/null +++ b/scripts/debiancontrol.py @@ -0,0 +1,81 @@ +from tree import Tree +import mappkgname +import textwrap + + +STANDARDS_VERSION = "3.9.3" + + +def control_from_spec(spec): + res = Tree() + source_deb_from_spec(spec, res) + for pkg in spec.packages: + binary_deb_from_spec(pkg, res) + return res + + +def source_deb_from_spec(spec, tree): + res = "" + res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] + res += "Priority: %s\n" % "optional" + res += "Maintainer: %s\n" % "Euan Harris " + res += "Section: %s\n" % mappkgname.mapSection(spec.sourceHeader['group']) + res += "Standards-Version: %s\n" % STANDARDS_VERSION + + res += "Build-Depends:\n" + build_depends = ["debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox"] + for pkg, version in zip(spec.sourceHeader['requires'], + spec.sourceHeader['requireVersion']): + deps = mappkgname.mapPackage(pkg) + for dep in deps: + if version: + dep += " (>= %s)" % version + build_depends.append(dep) + + res += ",\n".join(set([" %s" % d for d in build_depends])) + res += "\n\n" + + tree.append('debian/control', res) + + +def binary_deb_from_spec(spec, tree): + res = "" + res += "Package: %s\n" % mappkgname.mapPackageName(spec.header) + if spec.header['arch'] in ["x86_64", "i686"]: + res += "Architecture: any\n" + else: + res += "Architecture: all\n" + + res += "Depends:\n" + depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] + for pkg, version in zip(spec.header['requires'], + spec.header['requireVersion']): + deps = mappkgname.mapPackage(pkg) + for dep in deps: + if version: + dep += " (>= %s)" % version + depends.append(dep) + res += ",\n".join([" %s" % d for d in depends]) + res += "\n" + + # XXX These lines should only be added for ocaml packages + res += "Provides: ${ocaml:Provides}\n" + res += "Recommends: ocaml-findlib\n" + + res += "Description: %s\n" % spec.header['summary'] + res += format_description(spec.header['description']) + res += "\n\n" + + tree.append('debian/control', res) + + +def format_description(description): + """need to format this - correct line length, initial one space indent, + and blank lines must be replaced by dots""" + + paragraphs = "".join(description).split("\n\n") + wrapped = ["\n".join(textwrap.wrap(p, initial_indent=" ", + subsequent_indent=" ")) + for p in paragraphs] + return "\n .\n".join(wrapped) + diff --git a/scripts/makedeb.py b/scripts/makedeb.py index e01b181e..1c2c6d1c 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -15,6 +15,7 @@ import glob import mappkgname import debianrules +import debiancontrol # BUGS: # Code is a mess @@ -55,7 +56,6 @@ def specFromFile(spec): return rpm.ts().parseSpec(spec) -STANDARDS_VERSION = "3.9.3" # Patches can be added to debian/patches, with a series file @@ -64,67 +64,6 @@ def specFromFile(spec): # We can just use dpkg-source -b --auto-commit -def formatDescription(description): - """need to format this - correct line length, initial one space indent, - and blank lines must be replaced by dots""" - - paragraphs = "".join(description).split("\n\n") - wrapped = [ "\n".join(textwrap.wrap( p, initial_indent=" ", - subsequent_indent=" ")) - for p in paragraphs ] - return "\n .\n".join( wrapped ) - - -def sourceDebFromSpec(spec): - res = "" - res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] - res += "Priority: %s\n" % "optional" - res += "Maintainer: %s\n" % "Euan Harris " #XXX - res += "Section: %s\n" % mappkgname.mapSection(spec.sourceHeader['group']) - res += "Standards-Version: %s\n" % STANDARDS_VERSION - res += "Build-Depends:\n" - build_depends = [ "debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox" ] - for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): - deps = mappkgname.mapPackage(pkg) - for dep in deps: - if version: - dep += " (>= %s)" % version - build_depends.append(dep) - res += ",\n".join( set([" %s" % d for d in build_depends])) - res += "\n" - return res - - -def binaryDebFromSpec(spec): - res = "" - res += "Package: %s\n" % mappkgname.mapPackageName(spec.header) - res += "Architecture: %s\n" % ("any" if spec.header['arch'] in [ "x86_64", "i686"] else "all") - res += "Depends:\n" - depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] - for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): - deps = mappkgname.mapPackage(pkg) - for dep in deps: - if version: - dep += " (>= %s)" % version - depends.append(dep) - res += ",\n".join( [ " %s" % d for d in depends ] ) - res += "\n" - res += "Provides: ${ocaml:Provides}\n" # XXXX only for ocaml! - res += "Recommends: ocaml-findlib\n" # XXXX - res += "Description: %s\n" % spec.header['summary'] - res += formatDescription( spec.header['description'] ) - res += "\n" - return res - - -def debianControlFromSpec(spec): - res = "" - res += sourceDebFromSpec(spec) - for pkg in spec.packages: - res += "\n" - res += binaryDebFromSpec(pkg) - return res - def debianChangelogFromSpec(spec): hdr = spec.sourceHeader @@ -211,8 +150,8 @@ def debianPatchesFromSpec(spec, path): def debianDirFromSpec(spec, path, specpath, isnative): os.makedirs( os.path.join(path, "debian/source") ) - with open( os.path.join(path, "debian/control"), "w" ) as control: - control.write(debianControlFromSpec(spec)) + control = debiancontrol.control_from_spec(spec) + control.apply(path) rules = debianrules.rulesFromSpec(spec, specpath) rules.apply(path) From 1817df6fc7a24cd19ca0bdacab623a0d78328646 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 11:33:03 +0100 Subject: [PATCH 0453/1125] makedeb: Move specFromFile to rpmextra Signed-off-by: Euan Harris --- scripts/makedeb.py | 5 +---- scripts/rpmextra.py | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/makedeb.py b/scripts/makedeb.py index 1c2c6d1c..9f73a99c 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -52,9 +52,6 @@ rpm.addMacro( "_libdir", "/usr/lib" ) -def specFromFile(spec): - return rpm.ts().parseSpec(spec) - @@ -222,7 +219,7 @@ def renameSource(origfilename, pkgname, pkgversion): if __name__ == '__main__': shutil.rmtree(build_dir) #XXX os.mkdir(build_dir) - spec = specFromFile(sys.argv[1]) + spec = rpmextra.specFromFile(sys.argv[1]) clean = True if "-noclean" in sys.argv: clean = False diff --git a/scripts/rpmextra.py b/scripts/rpmextra.py index 70b391b2..51d6342c 100644 --- a/scripts/rpmextra.py +++ b/scripts/rpmextra.py @@ -1,5 +1,10 @@ import rpm + +def specFromFile(spec): + return rpm.ts().parseSpec(spec) + + def filesFromSpec(basename, specpath): """The RPM library doesn't seem to give us access to the files section, so we need to go and get it ourselves. This parsing algorithm is From baac098b92e38a0e269cebf568d08ad441371613 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 11:59:39 +0100 Subject: [PATCH 0454/1125] makedeb: Move changelog function into its own module Signed-off-by: Euan Harris --- scripts/debianchangelog.py | 47 ++++++++++++++++++++++++++++++++++++++ scripts/makedeb.py | 32 +++----------------------- 2 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 scripts/debianchangelog.py diff --git a/scripts/debianchangelog.py b/scripts/debianchangelog.py new file mode 100644 index 00000000..10d623f3 --- /dev/null +++ b/scripts/debianchangelog.py @@ -0,0 +1,47 @@ +from tree import Tree +import mappkgname +import re +import time + +def changelog_from_spec(spec): + res = Tree() + + hdr = spec.sourceHeader + log = "" + for (name, timestamp, text) in zip(hdr['changelogname'], + hdr['changelogtime'], + hdr['changelogtext']): + + # A Debian package's version is defined by the version of the + # first entry in the changelog, so we must get this right. + # Most spec files have changelog entries starting "First Last + # - version" - this seems to be the standard + # for Red Hat spec files. + # Some of our changelos only have "First Last ". + # For these, we use the version from the spec. + m = re.match( "^(.+) - (\S+)$", name ) + if m: + author = m.group(1) + version = m.group(2) + else: + author = name + version = "%s-%s" % (spec.sourceHeader['version'], + spec.sourceHeader['release']) + + package_name = mappkgname.mapPackage(hdr['name'])[0] + log += "%s (%s) UNRELEASED; urgency=low\n" % (package_name, version) + log += "\n" + + text = re.sub( "^-", "*", text, flags=re.MULTILINE ) + text = re.sub( "^", " ", text, flags=re.MULTILINE ) + log += "%s\n" % text + log += "\n" + + date_string = time.strftime("%a, %d %b %Y %H:%M:%S %z", + time.gmtime(int(timestamp))) + log += " -- %s %s\n" % (author, date_string) + log += "\n" + + res.append('debian/changelog', log) + return res + diff --git a/scripts/makedeb.py b/scripts/makedeb.py index 9f73a99c..eeb0f594 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -16,6 +16,7 @@ import mappkgname import debianrules import debiancontrol +import debianchangelog # BUGS: # Code is a mess @@ -62,33 +63,6 @@ -def debianChangelogFromSpec(spec): - hdr = spec.sourceHeader - res = "" - for (name, timestamp, text) in zip(hdr['changelogname'], hdr['changelogtime'], hdr['changelogtext']): - - # Most spec files have "First Last - version" - # Some of ours have "First Last " only for the first entry - could - # be a mistake. For these, us the version from the spec. - m = re.match( "^(.+) - (\S+)$", name ) - if m: - author = m.group(1) - version = m.group(2) - else: - author = name - version = "%s-%s" % (spec.sourceHeader['version'], spec.sourceHeader['release']) - - res += "%s (%s) UNRELEASED; urgency=low\n" % (mappkgname.mapPackage(hdr['name'])[0], version) - res += "\n" - text = re.sub( "^-", "*", text, flags=re.MULTILINE ) - text = re.sub( "^", " ", text, flags=re.MULTILINE ) - res += "%s\n" % text - res += "\n" - res += " -- %s %s\n" % (author, time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime(int(timestamp)))) - res += "\n" - return res - - def debianConfigFilesFromSpec(spec, specpath, path): pkgname = mappkgname.mapPackageName(spec.sourceHeader) files = rpmextra.filesFromSpec(pkgname, specpath) @@ -165,8 +139,8 @@ def debianDirFromSpec(spec, path, specpath, isnative): with open( os.path.join(path, "debian/copyright"), "w" ) as copyright: copyright.write("FIXME") - with open( os.path.join(path, "debian/changelog"), "w" ) as changelog: - changelog.write(debianChangelogFromSpec(spec)) + changelog = debianchangelog.changelog_from_spec(spec) + changelog.apply(path) debianFilelistsFromSpec(spec, path, specpath) debianPatchesFromSpec(spec, path) From fde94a36190811daf6a4e9a49844ca8b75484b6a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 12:28:53 +0100 Subject: [PATCH 0455/1125] makedeb: Move miscellaneous Debian packaging functions out into a module Signed-off-by: Euan Harris --- scripts/debianmisc.py | 73 +++++++++++++++++++++++++++++++++++++++++ scripts/makedeb.py | 76 +++++-------------------------------------- 2 files changed, 81 insertions(+), 68 deletions(-) create mode 100644 scripts/debianmisc.py diff --git a/scripts/debianmisc.py b/scripts/debianmisc.py new file mode 100644 index 00000000..f8c7c7ce --- /dev/null +++ b/scripts/debianmisc.py @@ -0,0 +1,73 @@ +import rpm +from tree import Tree +import mappkgname +import os +import rpmextra + +def conffiles_from_spec(spec, specpath): + # Configuration files, not to be overwritten on upgrade. + # Files in /etc are automatically marked as config files, + # so we only need to list files here if they are in a + # different place. + res = Tree() + pkgname = mappkgname.mapPackageName(spec.sourceHeader) + files = rpmextra.filesFromSpec(pkgname, specpath) + if files.has_key( pkgname + "-%config" ): + for filename in files[pkgname + "-%config"]: + res.append('debian/conffiles', "%s\n" % filename) + return res + + +def filelists_from_spec(spec, specpath): + res = Tree() + for pkg in spec.packages: + name = "%s.install.in" % mappkgname.mapPackageName(pkg.header) + res.append("debian/%s" % name, + files_from_pkg(spec.sourceHeader['name'], pkg, specpath)) + return res + + +def files_from_pkg(basename, pkg, specpath): + # should be able to build this from the files sections - can't find how + # to get at them from the spec object + res = "" + files = rpmextra.filesFromSpec(basename, specpath) + for filename in files.get(pkg.header['name'], []): + rpm.addMacro("_libdir", "usr/lib") + rpm.addMacro("_bindir", "usr/bin") + + # deb just wants relative paths + src = rpm.expandMacro(filename).lstrip("/") + rpm.delMacro("_bindir") + rpm.delMacro("_libdir") + rpm.addMacro("_libdir", "/usr/lib") + rpm.addMacro("_bindir", "/usr/bin") + dst = rpm.expandMacro(filename) + + # destination paths should be directories, not files. + # if the file is foo and the path is /usr/bin/foo, the + # package will end up install /usr/bin/foo/foo + if not dst.endswith("/"): + dst = os.path.dirname(dst) + rpm.delMacro("_bindir") + rpm.delMacro("_libdir") + res += "%s %s\n" % (src, dst) + return res + + +# Patches can be added to debian/patches, with a series file +# We use dpkg-source -b --auto-commit + +def patches_from_spec(spec, src_dir): + res = Tree() + patches = [(seq, name) for (name, seq, typ) in spec.sources + if typ == 2] + patches = [name for (seq, name) in sorted(patches)] + for patch in patches: + with open(os.path.join(src_dir, patch)) as patchfile: + contents = patchfile.read() + permissions = os.fstat(patchfile.fileno()).st_mode + res.append(os.path.join("debian/patches", patch), + contents, permissions) + res.append("debian/patches/series", "%s\n" % patch) + return res diff --git a/scripts/makedeb.py b/scripts/makedeb.py index eeb0f594..da281a69 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -17,6 +17,7 @@ import debianrules import debiancontrol import debianchangelog +import debianmisc # BUGS: # Code is a mess @@ -56,68 +57,6 @@ -# Patches can be added to debian/patches, with a series file -# Files copied into this directory have to be added using dpkg-source --commit -# (possibly just initialize quilt in that directory and add them as we copy them) -# We can just use dpkg-source -b --auto-commit - - - -def debianConfigFilesFromSpec(spec, specpath, path): - pkgname = mappkgname.mapPackageName(spec.sourceHeader) - files = rpmextra.filesFromSpec(pkgname, specpath) - config_files = "" - if files.has_key( pkgname + "-%config" ): - for filename in files[pkgname + "-%config"]: - config_files += "%s\n" % filename - return config_files - - -def debianFilesFromPkg(basename, pkg, specpath): - # should be able to build this from the files sections - can't find how - # to get at them from the spec object - res = "" - #res += "ocaml/* @OCamlStdlibDir@/\n" # should be more specific - files = rpmextra.filesFromSpec(basename, specpath) - for l in files.get(pkg.header['name'], []): - rpm.addMacro("_libdir", "usr/lib") - rpm.addMacro("_bindir", "usr/bin") - src = rpm.expandMacro(l).lstrip("/") # deb just wants relative paths - rpm.delMacro("_bindir") - rpm.delMacro("_libdir") - rpm.addMacro("_libdir", "/usr/lib") - rpm.addMacro("_bindir", "/usr/bin") - dst = rpm.expandMacro(l) - # destination paths should be directories, not files. - # if the file is foo and the path is /usr/bin/foo, the - # package will end up install /usr/bin/foo/foo - if not dst.endswith("/"): - dst = os.path.dirname(dst) - rpm.delMacro("_bindir") - rpm.delMacro("_libdir") - res += "%s %s\n" % (src, dst) - return res - - -def debianFilelistsFromSpec(spec, path, specpath): - for pkg in spec.packages: - name = "%s.install.in" % mappkgname.mapPackageName(pkg.header) - with open( os.path.join(path, "debian/%s") % name, "w" ) as f: - f.write( debianFilesFromPkg(spec.sourceHeader['name'], pkg, specpath) ) - -def debianPatchesFromSpec(spec, path): - patches = [(seq, name) for (name, seq, typ) in spec.sources - if typ == 2] - patches = [name for (seq,name) in sorted(patches)] - if patches: - os.mkdir(os.path.join(path, "debian/patches")) - for patch in patches: - shutil.copy2(os.path.join(src_dir, patch), os.path.join(path, "debian/patches")) - with open( os.path.join(path, "debian/patches/series"), "a" ) as f: - f.write("%s\n" % patch) - - - def debianDirFromSpec(spec, path, specpath, isnative): os.makedirs( os.path.join(path, "debian/source") ) @@ -142,13 +81,14 @@ def debianDirFromSpec(spec, path, specpath, isnative): changelog = debianchangelog.changelog_from_spec(spec) changelog.apply(path) - debianFilelistsFromSpec(spec, path, specpath) - debianPatchesFromSpec(spec, path) + filelists = debianmisc.filelists_from_spec(spec, specpath) + filelists.apply(path) + + patches = debianmisc.patches_from_spec(spec, src_dir) + patches.apply(path) - configs = debianConfigFilesFromSpec(spec, specpath, path) - if configs: - with open( os.path.join(path, "debian/conffiles"), "w" ) as conffiles: - conffiles.write(configs) + conffiles = debianmisc.conffiles_from_spec(spec, specpath) + conffiles.apply(path) def principalSourceFile(spec): return os.path.basename([name for (name, seq, type) in spec.sources From d1635c84d333aa542f89b2d7bf6ff6c78e645a55 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 6 Sep 2013 10:47:49 +0100 Subject: [PATCH 0456/1125] makedeb: Fix most Pylint warnings Signed-off-by: Euan Harris --- makemake.py | 4 +- scripts/debianchangelog.py | 10 +-- scripts/debiancontrol.py | 10 +-- scripts/debianmisc.py | 26 +++++- scripts/debianrules.py | 61 +++++-------- scripts/makedeb.py | 173 ++++++++++++++++++------------------- scripts/mappkgname.py | 120 ++++++++++++------------- scripts/rpmextra.py | 32 +++---- scripts/tree.py | 43 ++++----- 9 files changed, 233 insertions(+), 246 deletions(-) diff --git a/makemake.py b/makemake.py index 5d03ca41..83c5e09e 100755 --- a/makemake.py +++ b/makemake.py @@ -66,7 +66,7 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - rpm.addMacro( 'NAME', mappkgname.mapPackage(h['name'])[0] ) + rpm.addMacro( 'NAME', mappkgname.map_package(h['name'])[0] ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) @@ -88,7 +88,7 @@ def srpmNameFromSpec( spec ): def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): - rpm.addMacro( 'NAME', mappkgname.mapPackageName(h) ) + rpm.addMacro( 'NAME', mappkgname.map_package_name(h) ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) diff --git a/scripts/debianchangelog.py b/scripts/debianchangelog.py index 10d623f3..5cc49f74 100644 --- a/scripts/debianchangelog.py +++ b/scripts/debianchangelog.py @@ -19,16 +19,16 @@ def changelog_from_spec(spec): # for Red Hat spec files. # Some of our changelos only have "First Last ". # For these, we use the version from the spec. - m = re.match( "^(.+) - (\S+)$", name ) - if m: - author = m.group(1) - version = m.group(2) + match = re.match( "^(.+) - (\S+)$", name ) + if match: + author = match.group(1) + version = match.group(2) else: author = name version = "%s-%s" % (spec.sourceHeader['version'], spec.sourceHeader['release']) - package_name = mappkgname.mapPackage(hdr['name'])[0] + package_name = mappkgname.map_package(hdr['name'])[0] log += "%s (%s) UNRELEASED; urgency=low\n" % (package_name, version) log += "\n" diff --git a/scripts/debiancontrol.py b/scripts/debiancontrol.py index 6435c64e..9607408c 100644 --- a/scripts/debiancontrol.py +++ b/scripts/debiancontrol.py @@ -16,17 +16,17 @@ def control_from_spec(spec): def source_deb_from_spec(spec, tree): res = "" - res += "Source: %s\n" % mappkgname.mapPackage(spec.sourceHeader['name'])[0] + res += "Source: %s\n" % mappkgname.map_package(spec.sourceHeader['name'])[0] res += "Priority: %s\n" % "optional" res += "Maintainer: %s\n" % "Euan Harris " - res += "Section: %s\n" % mappkgname.mapSection(spec.sourceHeader['group']) + res += "Section: %s\n" % mappkgname.map_section(spec.sourceHeader['group']) res += "Standards-Version: %s\n" % STANDARDS_VERSION res += "Build-Depends:\n" build_depends = ["debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox"] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): - deps = mappkgname.mapPackage(pkg) + deps = mappkgname.map_package(pkg) for dep in deps: if version: dep += " (>= %s)" % version @@ -40,7 +40,7 @@ def source_deb_from_spec(spec, tree): def binary_deb_from_spec(spec, tree): res = "" - res += "Package: %s\n" % mappkgname.mapPackageName(spec.header) + res += "Package: %s\n" % mappkgname.map_package_name(spec.header) if spec.header['arch'] in ["x86_64", "i686"]: res += "Architecture: any\n" else: @@ -50,7 +50,7 @@ def binary_deb_from_spec(spec, tree): depends = ["${ocaml:Depends}", "${shlibs:Depends}", "${misc:Depends}"] for pkg, version in zip(spec.header['requires'], spec.header['requireVersion']): - deps = mappkgname.mapPackage(pkg) + deps = mappkgname.map_package(pkg) for dep in deps: if version: dep += " (>= %s)" % version diff --git a/scripts/debianmisc.py b/scripts/debianmisc.py index f8c7c7ce..63845aec 100644 --- a/scripts/debianmisc.py +++ b/scripts/debianmisc.py @@ -10,8 +10,8 @@ def conffiles_from_spec(spec, specpath): # so we only need to list files here if they are in a # different place. res = Tree() - pkgname = mappkgname.mapPackageName(spec.sourceHeader) - files = rpmextra.filesFromSpec(pkgname, specpath) + pkgname = mappkgname.map_package_name(spec.sourceHeader) + files = rpmextra.files_from_spec(pkgname, specpath) if files.has_key( pkgname + "-%config" ): for filename in files[pkgname + "-%config"]: res.append('debian/conffiles', "%s\n" % filename) @@ -21,7 +21,7 @@ def conffiles_from_spec(spec, specpath): def filelists_from_spec(spec, specpath): res = Tree() for pkg in spec.packages: - name = "%s.install.in" % mappkgname.mapPackageName(pkg.header) + name = "%s.install.in" % mappkgname.map_package_name(pkg.header) res.append("debian/%s" % name, files_from_pkg(spec.sourceHeader['name'], pkg, specpath)) return res @@ -31,7 +31,7 @@ def files_from_pkg(basename, pkg, specpath): # should be able to build this from the files sections - can't find how # to get at them from the spec object res = "" - files = rpmextra.filesFromSpec(basename, specpath) + files = rpmextra.files_from_spec(basename, specpath) for filename in files.get(pkg.header['name'], []): rpm.addMacro("_libdir", "usr/lib") rpm.addMacro("_bindir", "usr/bin") @@ -71,3 +71,21 @@ def patches_from_spec(spec, src_dir): contents, permissions) res.append("debian/patches/series", "%s\n" % patch) return res + + +def compat_from_spec(_spec): + res = Tree() + res.append("debian/compat", "8") + return res + +def format_from_spec(_spec, isnative): + res = Tree() + fmt = "native" if isnative else "quilt" + res.append("debian/source/format", "3.0 (%s)\n" % fmt) + return res + +def copyright_from_spec(_spec): + res = Tree() + res.append("debian/copyright", "FIXME") + return res + diff --git a/scripts/debianrules.py b/scripts/debianrules.py index bb861564..36a5f6c3 100755 --- a/scripts/debianrules.py +++ b/scripts/debianrules.py @@ -3,38 +3,25 @@ import rpm import rpmextra import os -import urlparse -import sys -import textwrap -import time import re -import magic -import shutil -import subprocess -import shlex -import glob import mappkgname from tree import Tree -def rulesFromSpec(spec, specpath): - # XXX make each helper return a subtree and merge them at this level? - # XXX write some tests! +def rules_from_spec(spec, specpath): res = Tree() - ocamlRulesPreamble(spec, res) - rulesConfigureFromSpec(spec, res) - rulesBuildFromSpec(spec, res) - rulesInstallFromSpec(spec, res) - rulesDhInstallFromSpec(spec, res, specpath) # XXX need to augment the specfile object - rulesCleanFromSpec(spec, res) - rulesTestFromSpec(spec, res) + ocaml_rules_preamble(spec, res) + rules_configure_from_spec(spec, res) + rules_build_from_spec(spec, res) + rules_install_from_spec(spec, res) + rules_dh_install_from_spec(spec, res, specpath) + rules_clean_from_spec(spec, res) + rules_test_from_spec(spec, res) return res -# XXX move all this into a separate file -def ocamlRulesPreamble(spec, tree): - # should only include this at the end, if we noticed that we have packed up ocaml files - # similarly for python files +def ocaml_rules_preamble(_spec, tree): + # TODO: should only include if we have packed up ocaml files rule = "#!/usr/bin/make -f\n" rule += "\n" rule += "#include /usr/share/cdbs/1/rules/debhelper.mk\n" @@ -51,7 +38,7 @@ def ocamlRulesPreamble(spec, tree): tree.append('debian/rules', rule) -def rulesConfigureFromSpec(spec, tree): +def rules_configure_from_spec(_spec, tree): # RPM doesn't have a configure target - everything happens in the # build target. Nevertheless we must override the auto_configure target # because some OASIS packages have configure scripts. If debhelper @@ -65,17 +52,13 @@ def rulesConfigureFromSpec(spec, tree): tree.append('debian/rules', rule) -def rulesBuildFromSpec(spec, tree): - # RPM's build script is just a script which is run at the appropriate time. +def rules_build_from_spec(spec, tree): + # RPM's build rule is just a script which is run at the appropriate time. # debian/rules is a Makefile. Makefile recipes aren't shell scripts - each # line is run independently, so exports don't survive from line to line and # multi-line constructions such as if statements don't work. - # Tried wrapping everything in a $(shell ...) function, but that didn't work. - # Just write the script fragment into a helper script in the debian directory. - # This almost certainly violates a Debian packaging guideline... - # ...we could write them to temporary files as the makefile is evaluated... - # this sub-script business unfortunately means that variables from the makefile - # aren't passed through + # To work around this, we put these recipes in helper scripts in the debian/ + # directory. if not spec.build: return {} @@ -93,7 +76,7 @@ def rulesBuildFromSpec(spec, tree): tree.append('debian/build.sh', helper, permissions=0o755) -def rulesInstallFromSpec(spec, tree): +def rules_install_from_spec(spec, tree): rule = ".PHONY: override_dh_auto_install\n" rule += "override_dh_auto_install:\n" rule += "\tdebian/install.sh\n" @@ -105,24 +88,24 @@ def rulesInstallFromSpec(spec, tree): tree.append('debian/rules', rule) tree.append('debian/install.sh', helper, permissions=0o755) -def rulesDhInstallFromSpec(spec, tree, specpath): +def rules_dh_install_from_spec(spec, tree, specpath): rule = ".PHONY: override_dh_install\n" rule += "override_dh_install:\n" rule += "\tdh_install\n" - pkgname = mappkgname.mapPackageName(spec.sourceHeader) - files = rpmextra.filesFromSpec(pkgname, specpath) + pkgname = mappkgname.map_package_name(spec.sourceHeader) + files = rpmextra.files_from_spec(pkgname, specpath) if files.has_key( pkgname + "-%exclude" ): for pat in files[pkgname + "-%exclude"]: path = "\trm -f debian/%s/%s\n" % (pkgname, rpm.expandMacro(pat)) - rule += os.path.normpath(path) + rule += os.path.normpath(path) rule += "\n" tree.append('debian/rules', rule) -def rulesCleanFromSpec(spec, tree): +def rules_clean_from_spec(spec, tree): rule = ".PHONY: override_dh_auto_clean\n" rule += "override_dh_auto_clean:\n" rule += "\tdebian/clean.sh\n" @@ -135,7 +118,7 @@ def rulesCleanFromSpec(spec, tree): tree.append('debian/clean.sh', helper, permissions=0o755) -def rulesTestFromSpec(spec, tree): +def rules_test_from_spec(_spec, tree): # XXX HACK for ocaml-oclock - don't try to run the tests when building rule = ".PHONY: override_dh_auto_test\n" rule += "override_dh_auto_test:\n" diff --git a/scripts/makedeb.py b/scripts/makedeb.py index da281a69..792f7fcf 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -1,26 +1,21 @@ #!/usr/bin/python -import rpm -import rpmextra +import glob +import mappkgname import os -import urlparse -import sys -import textwrap -import time import re -import magic +import rpm +import rpmextra import shutil import subprocess -import shlex -import glob -import mappkgname -import debianrules -import debiancontrol +import sys + import debianchangelog +import debiancontrol import debianmisc +import debianrules # BUGS: -# Code is a mess # Hack to disable CFLAGS for ocaml-oclock # Hack to disable tests for ocaml-oclock # Hard coded install files only install ocaml dir @@ -29,54 +24,47 @@ # By default, RPM expects everything to be in $HOME/rpmbuild. # We want it to run in the current directory. -rpm.addMacro( '_topdir', os.getcwd() ) +rpm.addMacro('_topdir', os.getcwd()) # Directories where rpmbuild expects to find inputs # and writes outputs -top_dir = rpm.expandMacro( '%_topdir' ) -rpm_dir = rpm.expandMacro( '%_rpmdir' ) -spec_dir = rpm.expandMacro( '%_specdir' ) -srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) -src_dir = rpm.expandMacro( '%_sourcedir' ) -build_dir = rpm.expandMacro( '%_builddir' ) +SRPM_DIR = rpm.expandMacro('%_srcrpmdir') +SRC_DIR = rpm.expandMacro('%_sourcedir') +BUILD_DIR = rpm.expandMacro('%_builddir') + # Fedora puts executables run by other programs in /usr/libexec, but # Debian puts them in /usr/lib, which apparently follows the FHS: # http://www.debian.org/doc/manuals/maint-guide/advanced.en.html#ftn.idp2018768 -rpm.addMacro( '_libexecdir', "/usr/lib" ) +rpm.addMacro('_libexecdir', "/usr/lib") + # Override some macros interpolated into build rules, so # paths are appropriate for debuild # (Actually, using {}, not (), because these identifiers # end up in helper scripts, not in the makefile -rpm.addMacro( "buildroot", "${DESTDIR}" ) -rpm.addMacro( "_libdir", "/usr/lib" ) - - +rpm.addMacro("buildroot", "${DESTDIR}") +rpm.addMacro("_libdir", "/usr/lib") - -def debianDirFromSpec(spec, path, specpath, isnative): - os.makedirs( os.path.join(path, "debian/source") ) +def debian_dir_from_spec(spec, path, specpath, isnative): + os.makedirs(os.path.join(path, "debian/source")) control = debiancontrol.control_from_spec(spec) control.apply(path) - rules = debianrules.rulesFromSpec(spec, specpath) + rules = debianrules.rules_from_spec(spec, specpath) rules.apply(path) - with open( os.path.join(path, "debian/compat"), "w" ) as compat: - compat.write("8\n") + compat = debianmisc.compat_from_spec(spec) + compat.apply(path) - with open( os.path.join(path, "debian/source/format"), "w" ) as format: - if isnative: - format.write("3.0 (native)\n") - else: - format.write("3.0 (quilt)\n") + fmt = debianmisc.format_from_spec(spec, isnative) + fmt.apply(path) - with open( os.path.join(path, "debian/copyright"), "w" ) as copyright: - copyright.write("FIXME") + copyright_file = debianmisc.copyright_from_spec(spec) + copyright_file.apply(path) changelog = debianchangelog.changelog_from_spec(spec) changelog.apply(path) @@ -84,17 +72,20 @@ def debianDirFromSpec(spec, path, specpath, isnative): filelists = debianmisc.filelists_from_spec(spec, specpath) filelists.apply(path) - patches = debianmisc.patches_from_spec(spec, src_dir) + patches = debianmisc.patches_from_spec(spec, SRC_DIR) patches.apply(path) conffiles = debianmisc.conffiles_from_spec(spec, specpath) conffiles.apply(path) -def principalSourceFile(spec): - return os.path.basename([name for (name, seq, type) in spec.sources - if seq == 0 and type == 1][0]) -def prepareBuildDir(spec, build_subdir): +def principal_source_file(spec): + return os.path.basename([name for (name, seq, filetype) + in spec.sources + if seq == 0 and filetype == 1][0]) + + +def prepare_build_dir(spec, build_subdir): # To prepare the build dir, RPM cds into $TOPDIR/BUILD # and expands all paths in the prep script with $TOPDIR. # It unpacks the tarball and then cds into the directory it @@ -106,34 +97,33 @@ def prepareBuildDir(spec, build_subdir): # patches from ../SOURCES doesn't work when we have cd'ed into the # source tree. - unpack_dir = os.path.join(build_dir, build_subdir) - subprocess.call(spec.prep.replace("$RPM_BUILD_ROOT", unpack_dir), shell=True) + unpack_dir = os.path.join(BUILD_DIR, build_subdir) + subprocess.call(spec.prep.replace("$RPM_BUILD_ROOT", unpack_dir), + shell=True) # could also just do: RPMBUILD_PREP = 1<<0; spec._doBuild() -def renameSource(origfilename, pkgname, pkgversion): +def rename_source(spec, pkgname, pkgversion): # Debian source package name should probably match the tarball name - origfilename = principalSourceFile(spec) + origfilename = principal_source_file(spec) if origfilename.endswith(".tbz"): filename = origfilename[:-len(".tbz")] + ".tar.bz2" else: filename = origfilename - m = re.match( "^(.+)(\.tar\.(gz|bz2|lzma|xz))", filename ) - if not m: + match = re.match("^(.+)(\.tar\.(gz|bz2|lzma|xz))", filename) + if not match: print "error: could not parse filename %s" % filename - basename, ext = m.groups()[:2] - baseFileName = "%s_%s.orig%s" % (mappkgname.mapPackage(pkgname)[0], pkgversion, ext) - shutil.copy(os.path.join(src_dir, origfilename), os.path.join(build_dir, baseFileName)) - + _, ext = match.groups()[:2] + base_filename = "%s_%s.orig%s" % (mappkgname.map_package(pkgname)[0], + pkgversion, ext) + shutil.copy(os.path.join(SRC_DIR, origfilename), + os.path.join(BUILD_DIR, base_filename)) -# Instead of writing to all these files, we could just accumulate -# everything in a dictionary of path -> (content, perms) and then -# write the files at the end. -if __name__ == '__main__': - shutil.rmtree(build_dir) #XXX - os.mkdir(build_dir) - spec = rpmextra.specFromFile(sys.argv[1]) +def main(): + shutil.rmtree(BUILD_DIR) + os.mkdir(BUILD_DIR) + spec = rpmextra.spec_from_file(sys.argv[1]) clean = True if "-noclean" in sys.argv: clean = False @@ -142,48 +132,53 @@ def renameSource(origfilename, pkgname, pkgversion): # set by RPM after processing the spec file # if the source file isn't a tarball this won't be set! build_subdir = rpm.expandMacro("%buildsubdir") - prepareBuildDir(spec, build_subdir) + prepare_build_dir(spec, build_subdir) - if os.path.isdir( os.path.join(build_dir, build_subdir, "debian") ): - shutil.rmtree(os.path.join(build_dir, build_subdir, "debian")) + if os.path.isdir(os.path.join(BUILD_DIR, build_subdir, "debian")): + shutil.rmtree(os.path.join(BUILD_DIR, build_subdir, "debian")) # a package with no original tarball is built as a 'native debian package' native = True - tarball = principalSourceFile(spec) - m = re.match( "^(.+)((\.tar\.(gz|bz2|lzma|xz)|\.tbz)$)", tarball ) - if m: + tarball = principal_source_file(spec) + match = re.match("^(.+)((\.tar\.(gz|bz2|lzma|xz)|\.tbz)$)", tarball) + if match: native = False - - # copy over the source, run the prep rule to unpack it, then rename it as deb expects - # this should be based on the rewritten (or not) source name in the debian package - build the debian dir first and then rename the tarball as needed - renameSource(tarball, spec.sourceHeader['name'], spec.sourceHeader['version']) - - debianDirFromSpec(spec, os.path.join(build_dir, build_subdir), sys.argv[1], native) - - # pdebuild gives us source debs as well as binaries - res = subprocess.call( "cd %s\ndpkg-source -b --auto-commit %s" % (build_dir, build_subdir), shell=True ) - #pbuild can build a dsc - pbuilder --build --configfile pbuilder/pbuildrerc-amd64 --resultdir ... - #res = subprocess.call( "cd %s\npdebuild --configfile %s --buildresult %s" % (os.path.join(build_dir, build_subdir), os.path.join(top_dir, "pbuilder/pbuilderrc-amd64"), rpm_dir), shell=True ) + # copy over the source, run the prep rule to unpack it, then + # rename it as deb expects this should be based on the rewritten + # (or not) source name in the debian package - build the debian + # dir first and then rename the tarball as needed + rename_source(spec, spec.sourceHeader['name'], + spec.sourceHeader['version']) + + debian_dir_from_spec(spec, os.path.join(BUILD_DIR, build_subdir), + sys.argv[1], native) + + res = subprocess.call("cd %s\ndpkg-source -b --auto-commit %s" % + (BUILD_DIR, build_subdir), shell=True) assert res == 0 + if clean: - shutil.rmtree(os.path.join(build_dir, build_subdir)) - for i in glob.glob(os.path.join(build_dir, "*")): + shutil.rmtree(os.path.join(BUILD_DIR, build_subdir)) + for i in glob.glob(os.path.join(BUILD_DIR, "*")): if build_subdir in i: continue - shutil.copy2(i, srpm_dir) #XXX + shutil.copy2(i, SRPM_DIR) if clean: os.unlink(i) - # at this point we have a debian source package (at least 3 files) in SRPMS - # to build it: - # (first time: pbuilder --create) - # dpkg-source -x SRPMS/ocaml-react-0.9.4.dsc - # cd ocaml-react-0.9.4 - # pdebuild --config pbuilder/pbuilder.cfg --buildresult DEBS (can we set up groups to avoid the sudo password prompt?) + # At this point we have a debian source package (at least 3 files) in SRPMS. + # To build: + # pbuilder --create --distribution raring --architecture amd64 \ + # --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com \ + # --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz # - # to build for arm: - # pbuilder --create --distribution raring --architecture armhf --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz - # pdebuild -- --distribution raring --architecture armhf --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz + # To build for ARM: + # pbuilder --create --distribution raring --architecture armhf \ + # --debootstrap qemu-debootstrap --mirror http://ports.ubuntu.com \ + # --basetgz /var/cache/pbuilder/qemu-raring-armhf-base.tar.gz + +if __name__ == '__main__': + main() diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index a1902080..c464a16b 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -1,20 +1,11 @@ #!/usr/bin/python """Maps an RPM package name to the equivalent DEB. - The mapping is static, but in future will be + The MAPPING is static, but in future will be made dynamically by querying the package databases.""" -def mapPackageBaseName(name): - """rewrite an rpm name to fit with debian standards""" - # Debian puts the language name after the library name - # whereas Fedora puts it before - if name.startswith( "ocaml-" ): - name = name[ len("ocaml-"): ] + "-ocaml" - - return name - -mapping = { +MAPPING = { "biniou": "libbiniou-ocaml", "cmdliner": "libcmdliner-ocaml", "cppo": "cppo", @@ -150,91 +141,88 @@ def mapPackageBaseName(name): "python-argparse": "libpython2.7-stdlib", } -secondary_mapping = { +SECONDARY_MAPPING = { "camlp4-dev": "camlp4", } -def mapPackage(name): +def map_package(name): """map an rpm to a corresponding deb, based on file contents""" - # XXXXX for now we use a static map - isDevel=False + is_devel = False if name.endswith( "-devel" ): - isDevel = True + is_devel = True name = name[ :-len("-devel") ] - mapped = mapping[name] + mapped = MAPPING[name] if type(mapped) != list: - mapped = [mapped] + mapped = [mapped] res = [] - for m in mapped: - if isDevel: - m += "-dev" - if m == "camlp4-dev": - m = "camlp4" - if m == "camlp4-extra-dev": - m = "camlp4-extra" - if m == "libeasy-format-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... - m = "libeasy-format-ocaml-dev" - if m == "libbiniou-ocaml": # packages with 'ocaml' or 'camlp4' must have a -dev... - m = "libbiniou-ocaml-dev" - if m == "libssl1.0.0-dev": - m = "libssl-dev" - if m == "libtype-conv-camlp4": - m = "libtype-conv-camlp4-dev" - if m == "libxapi-libvirt-storage-ocaml": - m = "libxapi-libvirt-storage-ocaml-dev" - if m == "libsexplib-camlp4": - m = "libsexplib-camlp4-dev" - if m == "ocaml-findlib-dev": - m = ["ocaml-findlib", "libfindlib-ocaml-dev"] - if m == "/bin/sh": + for newname in mapped: + if is_devel: + newname += "-dev" + if newname == "camlp4-dev": + newname = "camlp4" + if newname == "camlp4-extra-dev": + newname = "camlp4-extra" + # packages with 'ocaml' or 'camlp4' must have a -dev... + if newname == "libeasy-format-ocaml": + newname = "libeasy-format-ocaml-dev" + if newname == "libbiniou-ocaml": + newname = "libbiniou-ocaml-dev" + if newname == "libssl1.0.0-dev": + newname = "libssl-dev" + if newname == "libtype-conv-camlp4": + newname = "libtype-conv-camlp4-dev" + if newname == "libxapi-libvirt-storage-ocaml": + newname = "libxapi-libvirt-storage-ocaml-dev" + if newname == "libsexplib-camlp4": + newname = "libsexplib-camlp4-dev" + if newname == "ocaml-findlib-dev": + newname = ["ocaml-findlib", "libfindlib-ocaml-dev"] + if newname == "/bin/sh": continue - if m == "xen-hypervisor-dev": - m = ["libxen-dev", "xen-utils", "blktap-dev"] - if m == "libvirt0-dev": - m = "libvirt-dev" - if m == "libxen-4.2-dev": - m = "libxen-dev" - if m == "libvirt-bin-dev": - m = "libvirt-bin" - if m == "blktap-utils-dev": - m = "blktap-utils" - if m == "qemu-system-x86-dev": - m = "qemu-system-x86" - if type(m) != list: - m = [m] - res += m + if newname == "xen-hypervisor-dev": + newname = ["libxen-dev", "xen-utils", "blktap-dev"] + if newname == "libvirt0-dev": + newname = "libvirt-dev" + if newname == "libxen-4.2-dev": + newname = "libxen-dev" + if newname == "libvirt-bin-dev": + newname = "libvirt-bin" + if newname == "blktap-utils-dev": + newname = "blktap-utils" + if newname == "qemu-system-x86-dev": + newname = "qemu-system-x86" + if type(newname) != list: + newname = [newname] + res += newname return res -def mapPackageName(hdr): +def map_package_name(hdr): """rewrite an rpm name to fit with debian standards""" name = hdr['name'] # XXX UGLY # Debian adds a -dev suffix to development packages, # whereas Fedora uses -devel - isDevel = False + is_devel = False if name.endswith( "-devel" ): - isDevel = True + is_devel = True name = name[ :-len("-devel") ] - #name = mapPackageBaseName(name) - # Debian prefixes library packag names with 'lib' #if "Libraries" in hdr['group'] or "library" in hdr['summary'].lower(): # name = "lib" + name + name = name.replace( name, map_package(name)[0] ) - # Do this manually for now... - name = name.replace( name, mapPackage(name)[0] ) - - if isDevel: + if is_devel: name += "-dev" - # hack for type-conv. dh_ocaml insists that there must be a -dev package for anything with ocaml or camlp4 in the name... + # hack for type-conv. dh_ocaml insists that there must be a + # -dev package for anything with ocaml or camlp4 in the name... if name == "libtype-conv-camlp4": name = "libtype-conv-camlp4-dev" return name -def mapSection(rpm_name): +def map_section(_rpm_name): return "ocaml" # XXXXX diff --git a/scripts/rpmextra.py b/scripts/rpmextra.py index 51d6342c..0d6bb426 100644 --- a/scripts/rpmextra.py +++ b/scripts/rpmextra.py @@ -1,20 +1,18 @@ import rpm -def specFromFile(spec): +def spec_from_file(spec): return rpm.ts().parseSpec(spec) -def filesFromSpec(basename, specpath): +def files_from_spec(basename, specpath): """The RPM library doesn't seem to give us access to the files section, so we need to go and get it ourselves. This parsing algorithm is based on build/parseFiles.c in RPM. The list of section titles comes from build/parseSpec.c. We should get this by using ctypes to load the rpm library.""" - """XXX shouldn't be parsing this by hand. will need to handle conditionals - within and surrounding files and packages sections.""" - - #XXX Why do we need the .install.in files? + # XXX shouldn't be parsing this by hand. will need to handle conditionals + # within and surrounding files and packages sections.""" otherparts = [ "%package", @@ -42,21 +40,21 @@ def filesFromSpec(basename, specpath): files = {} with open(specpath) as spec: - inFiles = False + in_files = False section = "" for line in spec: tokens = line.strip().split(" ") if tokens and tokens[0].lower() == "%files": section = basename - inFiles = True + in_files = True if len(tokens) > 1: section = basename + "-" + tokens[1] continue if tokens and tokens[0] in otherparts: - inFiles = False + in_files = False - if inFiles: + if in_files: if tokens[0].lower().startswith("%defattr"): continue if tokens[0].lower().startswith("%attr"): @@ -70,18 +68,20 @@ def filesFromSpec(basename, specpath): continue if tokens[0].lower() == "%exclude": excludesection = section + "-%exclude" - files[excludesection] = files.get(excludesection, []) + tokens[1:] + files[excludesection] = \ + files.get(excludesection, []) + tokens[1:] continue if tokens[0].lower().startswith("%config"): - # dh_install automatically considers files in /etc to be config files - # so we don't have to do anythin special for them - # The spec file documentation says that a %config directive can - # only apply to a single file. + # dh_install automatically considers files in /etc + # to be config files so we don't have to do anythin + # special for them The spec file documentation says that + # a %config directive can only apply to a single file. configsection = section + "-%config" if tokens[1].startswith("/etc"): files[section] = files.get(section, []) + tokens[1:] else: - files[configsection] = files.get(configsection, []) + tokens[1:] + files[configsection] = \ + files.get(configsection, []) + tokens[1:] continue if line.strip(): files[section] = files.get(section, []) + [line.strip()] diff --git a/scripts/tree.py b/scripts/tree.py index 1719f57d..92788be7 100644 --- a/scripts/tree.py +++ b/scripts/tree.py @@ -2,40 +2,43 @@ class Tree(object): def __init__(self): - self.t = {} + self.tree = {} def append(self, filename, contents=None, permissions=None): - node = self.t.get( filename, {} ) + node = self.tree.get(filename, {}) if contents: - node['contents'] = node.get( 'contents', '' ) + contents + node['contents'] = node.get('contents', '') + contents if permissions: - if node.has_key('permissions') and node['permissions'] != permissions: + if node.has_key('permissions') and \ + node['permissions'] != permissions: raise Exception("Trying to change permissions for " % filename) if permissions: node['permissions'] = permissions else: node['permissions'] = 0o644 - self.t[filename] = node + self.tree[filename] = node - def apply(self, path): - for k, v in self.t.items(): - permissions = v.get("permissions", 0o644) - contents = v.get("contents", "") - fullpath = os.path.dirname( os.path.join(path, k)) - if not os.path.isdir(fullpath): - print "makedirs(%s)" % fullpath - os.makedirs(fullpath) - f = os.open( os.path.join(path, k), os.O_WRONLY | os.O_CREAT, permissions) - os.write(f, contents) - os.close(f) + def apply(self, basepath): + for subpath, node in self.tree.items(): + permissions = node.get("permissions", 0o644) + contents = node.get("contents", "") + fullpath = os.path.join(basepath, subpath) + + if not os.path.isdir(os.path.dirname(fullpath)): + os.makedirs(os.path.dirname(fullpath)) + + out = os.open(os.path.join(basepath, subpath), + os.O_WRONLY | os.O_CREAT, permissions) + os.write(out, contents) + os.close(out) def __repr__(self): res = "" - for k, v in self.t.items(): - permissions = v.get("permissions", 0o644) - contents = v.get("contents", "") - res += "%s (0o%o):\n" % (k, permissions) + for subpath, node in self.tree.items(): + permissions = node.get("permissions", 0o644) + contents = node.get("contents", "") + res += "%s (0o%o):\n" % (subpath, permissions) res += contents res += "\n\n" return res From 54586af1aab231aa16d8331b946d401276bda2f1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 13 Sep 2013 17:07:17 +0100 Subject: [PATCH 0457/1125] mappkgname: clean up package mapping dictionary Signed-off-by: Euan Harris --- scripts/mappkgname.py | 314 +++++++++++++++++++----------------------- 1 file changed, 144 insertions(+), 170 deletions(-) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index c464a16b..7417846c 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -6,143 +6,155 @@ MAPPING = { - "biniou": "libbiniou-ocaml", - "cmdliner": "libcmdliner-ocaml", - "cppo": "cppo", - "deriving-ocsigen": "libderiving-ocsigen-ocaml", - "easy-format": "libeasy-format-ocaml", - "eliloader": "eliloader", - "ffs": "ffs", - "forkexecd": "forkexecd", - "js_of_ocaml": "libjs-of-ocaml", - "libnl3-cli": "libnl-3-cli", - "libnl3-doc": "libnl-3-doc", - "libnl3": "libnl-3", - "message-switch": "message-switch", - "ocaml-bitstring": "libbitstring-ocaml", - "ocaml-camomile-data": "libcamomile-data-ocaml", - "ocaml-camomile": "libcamomile-ocaml", - "ocaml-cdrom": "libcdrom-ocaml", - "ocaml-cohttp": "libcohttp-ocaml", - "ocaml-cstruct": "libcstruct-ocaml", - "ocaml-fd-send-recv": "libfd-send-recv-ocaml", - "ocaml-lambda-term": "liblambda-term-ocaml", - "ocaml-libvhd": "libvhd-ocaml", - "ocaml-libvirt": "libvirt-ocaml", - "ocaml-lwt": "liblwt-ocaml", - "ocaml-nbd": "libnbd-ocaml", - "ocaml-netdev": "libnetdev-ocaml", - "ocaml-obuild": "ocaml-obuild", - "ocaml-oclock": "liboclock-ocaml" , - "ocaml-ocplib-endian": "ocplib-endian-ocaml", - "ocaml-ounit": "libounit-ocaml", - "ocaml-qmp": "libqmp-ocaml", - "ocaml-react": "libreact-ocaml", - "ocaml-re": "libre-ocaml" , - "ocaml-rpc": "librpc-ocaml", - "ocaml-sexplib": "libsexplib-camlp4", - "ocaml-ssl": "libssl-ocaml" , - "ocaml-stdext": "libstdext-ocaml", - "ocaml-syslog": "libsyslog-ocaml", - "ocaml-tapctl": "libtapctl-ocaml", - "ocaml-text": "libtext-ocaml", - "ocaml-type-conv": "libtype-conv-camlp4", - "ocaml-uri": "liburi-ocaml" , - "ocaml-uuidm": "libuuidm-ocaml", - "ocaml-xcp-idl": "libxcp-idl-ocaml", - "ocaml-xcp-inventory": "libxcp-inventory-ocaml", - "ocaml-xcp-rrd": "libxcp-rrd-ocaml", - "ocaml-xen-api-client": "libxen-api-client-ocaml", - "ocaml-xen-api-libs-transitional": "ocaml-xen-api-libs-transitional", - "ocaml-xen-lowlevel-libs": "ocaml-xen-lowlevel-libs", - "ocaml-xenops": "libxenops-ocaml", - "ocaml-xenstore-clients": "libxenstore-clients-ocaml", - "ocaml-xenstore": "libxenstore-ocaml", - "ocaml-yojson": "libyojson-ocaml", - "ocaml-zed": "libzed-ocaml", - "omake": "omake", - "openstack-xapi-plugins": "openstack-xapi-plugins", - "optcomp": "optcomp-ocaml", - "xcp-sm": "xcp-sm", - "sm-cli": "sm-cli", - "xcp-sm-rawhba": "xcp-sm-rawhba", - "squeezed": "squeezed", - "utop": "utop", - "vncterm": "vncterm", - "xapi-libvirt-storage": "libxapi-libvirt-storage-ocaml", - "xapi-python": "xapi-python", - "xapi": "xapi", - "xapi-xe": "xapi-xe", - "xcp-networkd": "xcp-networkd" , - "xcp-rrdd": "xcp-rrdd", - "xe-create-templates": "xe-create-templates", - "xenops-cli": "xenops-cli", - "xenopsd-libvirt": "xenopsd-libvirt", - "xenopsd-simulator": "xenopsd-simulator", - "xenopsd-xc": "xenopsd-xc", - "xenopsd-xenlight": "xenopsd-xenlight", - "xenopsd": "xenopsd", - "xenserver-core": "xenserver-core", - "xenserver-install-wizard": "xenserver-install-wizard", - "xenserver-tech-preview-release": "xenserver-tech-preview-release", - "xmlm": "libxmlm-ocaml", - "xsconsole": "xsconsole", - "xsiostat": "xsiostat", - "xenserver-core-latest-snapshot": "xenserver-core-latest-snapshot", + # Our packages + "biniou": ["libbiniou-ocaml"], + "cmdliner": ["libcmdliner-ocaml"], + "cppo": ["cppo"], + "deriving-ocsigen": ["libderiving-ocsigen-ocaml"], + "easy-format": ["libeasy-format-ocaml"], + "eliloader": ["eliloader"], + "ffs": ["ffs"], + "forkexecd": ["forkexecd"], + "js_of_ocaml": ["libjs-of-ocaml"], + "libnl3-cli": ["libnl-3-cli"], + "libnl3-doc": ["libnl-3-doc"], + "libnl3": ["libnl-3"], + "message-switch": ["message-switch"], + "ocaml-bitstring": ["libbitstring-ocaml"], + "ocaml-camomile-data": ["libcamomile-data-ocaml"], + "ocaml-camomile": ["libcamomile-ocaml"], + "ocaml-cdrom": ["libcdrom-ocaml"], + "ocaml-cohttp": ["libcohttp-ocaml"], + "ocaml-cstruct": ["libcstruct-ocaml"], + "ocaml-fd-send-recv": ["libfd-send-recv-ocaml"], + "ocaml-lambda-term": ["liblambda-term-ocaml"], + "ocaml-libvhd": ["libvhd-ocaml"], + "ocaml-libvirt": ["libvirt-ocaml"], + "ocaml-lwt": ["liblwt-ocaml"], + "ocaml-nbd": ["libnbd-ocaml"], + "ocaml-netdev": ["libnetdev-ocaml"], + "ocaml-obuild": ["ocaml-obuild"], + "ocaml-oclock": ["liboclock-ocaml"], + "ocaml-ocplib-endian": ["ocplib-endian-ocaml"], + "ocaml-ounit": ["libounit-ocaml"], + "ocaml-qmp": ["libqmp-ocaml"], + "ocaml-react": ["libreact-ocaml"], + "ocaml-re": ["libre-ocaml"], + "ocaml-rpc": ["librpc-ocaml"], + "ocaml-sexplib": ["libsexplib-camlp4"], + "ocaml-ssl": ["libssl-ocaml"], + "ocaml-stdext": ["libstdext-ocaml"], + "ocaml-syslog": ["libsyslog-ocaml"], + "ocaml-tapctl": ["libtapctl-ocaml"], + "ocaml-text": ["libtext-ocaml"], + "ocaml-type-conv": ["libtype-conv-camlp4"], + "ocaml-uri": ["liburi-ocaml"], + "ocaml-uuidm": ["libuuidm-ocaml"], + "ocaml-xcp-idl": ["libxcp-idl-ocaml"], + "ocaml-xcp-inventory": ["libxcp-inventory-ocaml"], + "ocaml-xcp-rrd": ["libxcp-rrd-ocaml"], + "ocaml-xen-api-client": ["libxen-api-client-ocaml"], + "ocaml-xen-api-libs-transitional": ["ocaml-xen-api-libs-transitional"], + "ocaml-xen-lowlevel-libs": ["ocaml-xen-lowlevel-libs"], + "ocaml-xenops": ["libxenops-ocaml"], + "ocaml-xenstore-clients": ["libxenstore-clients-ocaml"], + "ocaml-xenstore": ["libxenstore-ocaml"], + "ocaml-yojson": ["libyojson-ocaml"], + "ocaml-zed": ["libzed-ocaml"], + "omake": ["omake"], + "openstack-xapi-plugins": ["openstack-xapi-plugins"], + "optcomp": ["optcomp-ocaml"], + "xcp-sm": ["xcp-sm"], + "sm-cli": ["sm-cli"], + "xcp-sm-rawhba": ["xcp-sm-rawhba"], + "squeezed": ["squeezed"], + "utop": ["utop"], + "vncterm": ["vncterm"], + "xapi-libvirt-storage": ["libxapi-libvirt-storage-ocaml"], + "xapi-python": ["xapi-python"], + "xapi": ["xapi"], + "xapi-xe": ["xapi-xe"], + "xcp-networkd": ["xcp-networkd"], + "xcp-rrdd": ["xcp-rrdd"], + "xe-create-templates": ["xe-create-templates"], + "xenops-cli": ["xenops-cli"], + "xenopsd-libvirt": ["xenopsd-libvirt"], + "xenopsd-simulator": ["xenopsd-simulator"], + "xenopsd-xc": ["xenopsd-xc"], + "xenopsd-xenlight": ["xenopsd-xenlight"], + "xenopsd": ["xenopsd"], + "xenserver-core": ["xenserver-core"], + "xenserver-install-wizard": ["xenserver-install-wizard"], + "xenserver-tech-preview-release": ["xenserver-tech-preview-release"], + "xmlm": ["libxmlm-ocaml"], + "xsconsole": ["xsconsole"], + "xsiostat": ["xsiostat"], + "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], - # extras + # Distribution packages "ocaml": ["ocaml-nox", "ocaml-native-compilers"], - "ocaml-findlib": "ocaml-findlib", - "ocaml-ocamldoc": "ocaml-nox", - "ocaml-compiler-libs": # added to ocaml-uri - why does rpmbuild succeed? - "ocaml-compiler-libs", + "ocaml-findlib": ["ocaml-findlib"], + "ocaml-ocamldoc": ["ocaml-nox"], + "ocaml-compiler-libs": ["ocaml-compiler-libs"], "ocaml-camlp4": ["camlp4", "camlp4-extra"], - "openssl": "libssl1.0.0", + "openssl": ["libssl1.0.0"], "xen": ["xen-hypervisor", "qemu-system-x86", "blktap-utils"], - "libuuid": "uuid", + "libuuid": ["uuid"], "libvirt": ["libvirt0", "libvirt-bin"], - "xen-libs": "libxen-4.2", - "make": "make", - "ncurses": "libncurses5", - "chkconfig": [], # "chkconfig", - "initscripts": [], # "initscripts", - "PyPAM": "python-pam", - "perl": "perl", - "gawk": "gawk", - "pam": "libpam0g", - "tetex-latex": "texlive-base", - "zlib": "zlib1g", - "git": "git", - "stunnel": "stunnel", - "bash-completion": "bash-completion", - "python": "python", - "time": "time", - "newt": "libnewt0.52", - "flex": "flex", - "bison": "bison", - "/sbin/ldconfig": "/sbin/ldconfig", - "kernel-headers": "linux-headers-3.2.0-51-generic", - "libvirt-docs": "libvirt-doc", - "chrpath": "chrpath", - "kernel": "linux-image", - "kernel-firmware": "linux-firmware", - "swig": "swig", - - # this seems to come from packages like xcp-networkd, which don't have - # any requirements - "/bin/sh": "/bin/sh", - "libxl-headers": "libxl-headers", - "xen-utils": "xen-utils", - "nfs-utils": "nfs-common", - "hwdata": "hwdata", - "redhat-lsb-core": "lsb-base", - "ethtool": "ethtool", - "qemu-system-x86": "qemu-system-x86", - "python-argparse": "libpython2.7-stdlib", + "xen-libs": ["libxen-4.2"], + "make": ["make"], + "ncurses": ["libncurses5"], + "chkconfig": [], + "initscripts": [], + "PyPAM": ["python-pam"], + "perl": ["perl"], + "gawk": ["gawk"], + "pam": ["libpam0g"], + "tetex-latex": ["texlive-base"], + "zlib": ["zlib1g"], + "git": ["git"], + "stunnel": ["stunnel"], + "bash-completion": ["bash-completion"], + "python": ["python"], + "time": ["time"], + "newt": ["libnewt0.52"], + "flex": ["flex"], + "bison": ["bison"], + "/sbin/ldconfig": ["/sbin/ldconfig"], + "kernel-headers": ["linux-headers-3.2.0-51-generic"], + "libvirt-docs": ["libvirt-doc"], + "chrpath": ["chrpath"], + "kernel": ["linux-image"], + "kernel-firmware": ["linux-firmware"], + "swig": ["swig"], + "/bin/sh": [], + "libxl-headers": ["libxl-headers"], + "xen-utils": ["xen-utils"], + "nfs-utils": ["nfs-common"], + "hwdata": ["hwdata"], + "redhat-lsb-core": ["lsb-base"], + "ethtool": ["ethtool"], + "qemu-system-x86": ["qemu-system-x86"], + "python-argparse": ["libpython2.7-stdlib"], } SECONDARY_MAPPING = { - "camlp4-dev": "camlp4", + "camlp4-dev": ["camlp4"], + "camlp4-extra-dev": ["camlp4-extra"], + # packages with 'ocaml' or 'camlp4' in the name must have a -dev... + "libeasy-format-ocaml": ["libeasy-format-ocaml-dev"], + "libbiniou-ocaml": ["libbiniou-ocaml-dev"], + "libssl1.0.0-dev": ["libssl-dev"], + "libtype-conv-camlp4": ["libtype-conv-camlp4-dev"], + "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], + "libsexplib-camlp4": ["libsexplib-camlp4-dev"], + "ocaml-findlib-dev": ["ocaml-findlib", "libfindlib-ocaml-dev"], + "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], + "libvirt0-dev": ["libvirt-dev"], + "libxen-4.2-dev": ["libxen-dev"], + "libvirt-bin-dev": ["libvirt-bin"], + "blktap-utils-dev": ["blktap-utils"], + "qemu-system-x86-dev": ["qemu-system-x86"], } def map_package(name): @@ -152,55 +164,17 @@ def map_package(name): is_devel = True name = name[ :-len("-devel") ] mapped = MAPPING[name] - if type(mapped) != list: - mapped = [mapped] res = [] - for newname in mapped: + for debname in mapped: if is_devel: - newname += "-dev" - if newname == "camlp4-dev": - newname = "camlp4" - if newname == "camlp4-extra-dev": - newname = "camlp4-extra" - # packages with 'ocaml' or 'camlp4' must have a -dev... - if newname == "libeasy-format-ocaml": - newname = "libeasy-format-ocaml-dev" - if newname == "libbiniou-ocaml": - newname = "libbiniou-ocaml-dev" - if newname == "libssl1.0.0-dev": - newname = "libssl-dev" - if newname == "libtype-conv-camlp4": - newname = "libtype-conv-camlp4-dev" - if newname == "libxapi-libvirt-storage-ocaml": - newname = "libxapi-libvirt-storage-ocaml-dev" - if newname == "libsexplib-camlp4": - newname = "libsexplib-camlp4-dev" - if newname == "ocaml-findlib-dev": - newname = ["ocaml-findlib", "libfindlib-ocaml-dev"] - if newname == "/bin/sh": - continue - if newname == "xen-hypervisor-dev": - newname = ["libxen-dev", "xen-utils", "blktap-dev"] - if newname == "libvirt0-dev": - newname = "libvirt-dev" - if newname == "libxen-4.2-dev": - newname = "libxen-dev" - if newname == "libvirt-bin-dev": - newname = "libvirt-bin" - if newname == "blktap-utils-dev": - newname = "blktap-utils" - if newname == "qemu-system-x86-dev": - newname = "qemu-system-x86" - if type(newname) != list: - newname = [newname] - res += newname + debname += "-dev" + res += SECONDARY_MAPPING.get(debname, [debname]) return res def map_package_name(hdr): """rewrite an rpm name to fit with debian standards""" name = hdr['name'] - # XXX UGLY # Debian adds a -dev suffix to development packages, # whereas Fedora uses -devel From df6be8fe2147a2449fb2e413dbdcf1b23a50c925 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 16 Sep 2013 16:10:09 +0100 Subject: [PATCH 0458/1125] xsconsole: Use numeric release tag Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index c635965e..eb808baa 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -5,7 +5,7 @@ Release: 1 License: GPL2 Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole -Source0: https://github.com/jamesbulpin/xsconsole/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Provides: xsconsole0 Requires: PyPAM xapi-python-devel @@ -14,7 +14,7 @@ Requires: PyPAM xapi-python-devel Console tool for configuring a XenServer installation. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %install rm -rf $RPM_BUILD_ROOT From 6b15c0ea59316a9e85fcb29d93777893932cad05 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 16 Sep 2013 16:11:35 +0100 Subject: [PATCH 0459/1125] xsconsole: Use %{_libdir} directive instead of hard coding paths Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index eb808baa..a3ad2351 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -1,7 +1,7 @@ Summary: XenServer Host Configuration Console Name: xsconsole Version: 0.9.0 -Release: 1 +Release: 2 License: GPL2 Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole @@ -17,13 +17,13 @@ Console tool for configuring a XenServer installation. %setup -q %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/bin -mkdir -p $RPM_BUILD_ROOT/usr/lib -make install-base DESTDIR=$RPM_BUILD_ROOT +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_libdir} +make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files %defattr(-,root,root,-) @@ -37,6 +37,9 @@ rm -rf $RPM_BUILD_ROOT %doc LICENSE %changelog +* Mon Sep 16 2013 Euan Harris - 0.9.0-2 +- Use %{_libdir} rather than hard coding library installation path + * Fri Jul 5 2013 James Bulpin - 0.9.0-1 - Initial package From d550eed6186f0361731a89240884274f2ca6b015 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 16 Sep 2013 17:57:22 +0100 Subject: [PATCH 0460/1125] configure: Make sure script works on a fresh Ubuntu installation Signed-off-by: Euan Harris --- configure.sh | 3 ++- pbuilderrc.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.sh b/configure.sh index f0879dc0..d618f85a 100755 --- a/configure.sh +++ b/configure.sh @@ -4,7 +4,8 @@ ARCH=amd64 DIST=raring BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz -apt-get install pbuilder +apt-get install pbuilder python-rpm curl +mkdir -p BUILD echo -n "Writing pbuilder configuration..." mkdir -p pbuilder diff --git a/pbuilderrc.in b/pbuilderrc.in index 05f067d7..7df6ecf3 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,4 +1,5 @@ -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main " +MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 4fdb703cec2157eb81350a5496f409b518e55f75 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 17 Sep 2013 14:53:56 +0100 Subject: [PATCH 0461/1125] pbuilder: Remove local path from archive.conf Signed-off-by: Euan Harris --- scripts/archive.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/archive.conf b/scripts/archive.conf index ff3430a5..b98bf9c8 100644 --- a/scripts/archive.conf +++ b/scripts/archive.conf @@ -1,5 +1,5 @@ Dir { - ArchiveDir "/local/scratch/euanh/debbuild"; + ArchiveDir "."; }; BinDirectory "dists/raring" { From f322d8f3df5a2fd9d73789f02c51e89783bf6643 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 20 Sep 2013 14:06:22 +0100 Subject: [PATCH 0462/1125] ocaml-syslog: Increase release number to beat Ubuntu's package Signed-off-by: Euan Harris --- SPECS/ocaml-syslog.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec index 5da3e7f3..4aea78d6 100644 --- a/SPECS/ocaml-syslog.spec +++ b/SPECS/ocaml-syslog.spec @@ -2,7 +2,7 @@ Name: ocaml-syslog Version: 1.4 -Release: 1 +Release: 7 Summary: Syslog bindings for OCaml License: LGPL Group: Development/Other From 4ddbb90e7dc6a7bcf6b384af7789fc2d6ee0573f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 20 Sep 2013 14:12:04 +0100 Subject: [PATCH 0463/1125] makedeb: Use dh_python2 to help with Python file installation The python2 debhelper arranges to byte-compile Python files on installation, amongst other helpful features. Signed-off-by: Euan Harris --- scripts/debiancontrol.py | 2 +- scripts/debianmisc.py | 6 ++++++ scripts/debianrules.py | 2 +- scripts/mappkgname.py | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/debiancontrol.py b/scripts/debiancontrol.py index 9607408c..acb0ccd7 100644 --- a/scripts/debiancontrol.py +++ b/scripts/debiancontrol.py @@ -23,7 +23,7 @@ def source_deb_from_spec(spec, tree): res += "Standards-Version: %s\n" % STANDARDS_VERSION res += "Build-Depends:\n" - build_depends = ["debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox"] + build_depends = ["debhelper (>= 8)", "dh-ocaml (>= 0.9)", "ocaml-nox", "python"] for pkg, version in zip(spec.sourceHeader['requires'], spec.sourceHeader['requireVersion']): deps = mappkgname.map_package(pkg) diff --git a/scripts/debianmisc.py b/scripts/debianmisc.py index 63845aec..cdb8c040 100644 --- a/scripts/debianmisc.py +++ b/scripts/debianmisc.py @@ -33,6 +33,12 @@ def files_from_pkg(basename, pkg, specpath): res = "" files = rpmextra.files_from_spec(basename, specpath) for filename in files.get(pkg.header['name'], []): + # Debian packages must not contain compiled Python files. + # Instead, the python2 helper arranges to compile these + # files when they are installed. + if os.path.splitext(filename)[1] in [".pyc", ".pyo"]: + continue + rpm.addMacro("_libdir", "usr/lib") rpm.addMacro("_bindir", "usr/bin") diff --git a/scripts/debianrules.py b/scripts/debianrules.py index 36a5f6c3..054f5472 100755 --- a/scripts/debianrules.py +++ b/scripts/debianrules.py @@ -32,7 +32,7 @@ def ocaml_rules_preamble(_spec, tree): rule += "export DH_OPTIONS\n" rule += "export DESTDIR=$(CURDIR)/debian/tmp\n" rule += "%:\n" - rule += "\tdh $@ --with ocaml\n" + rule += "\tdh $@ --with ocaml --with python2\n" rule += "\n" tree.append('debian/rules', rule) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 7417846c..341be1a8 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -116,6 +116,7 @@ "stunnel": ["stunnel"], "bash-completion": ["bash-completion"], "python": ["python"], + "python2": ["python"], "time": ["time"], "newt": ["libnewt0.52"], "flex": ["flex"], From 81177208b42c98f8acc539e9c31ad6e2fece4e05 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Sep 2013 16:41:54 +0100 Subject: [PATCH 0464/1125] xenopsd: Autogenerate xenopsd.conf To account for the differences between Fedora/CentOS and Ubuntu, we need to generate xenopsd.conf dynamically. This change does it during the build, but we should do it as part of the post-installation script. Signed-off-by: Euan Harris --- SOURCES/make-xsc-xenopsd.conf | 53 +++++++++++++++++++++++++++++++++++ SOURCES/xenopsd-conf.in | 25 ----------------- SPECS/xenopsd.spec | 13 ++++++--- 3 files changed, 62 insertions(+), 29 deletions(-) create mode 100755 SOURCES/make-xsc-xenopsd.conf delete mode 100755 SOURCES/xenopsd-conf.in diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf new file mode 100755 index 00000000..efd507ea --- /dev/null +++ b/SOURCES/make-xsc-xenopsd.conf @@ -0,0 +1,53 @@ +#!/bin/sh + +# Find xen: +for i in xen xen-4.1 xen-4.2 xen-4.3; do + if [ -d /usr/lib/$i ]; then myxen=$i; fi +done + +# Find a group +for i in wheel root xapi xendev; do + egrep -i "^$i" /etc/group > /dev/null && group=$i +done + +# Find qemu-system-i386 +for i in /usr/lib/${myxen}/bin /usr/bin; do + if [ -f $i/qemu-system-i386 ]; then myqemu=$i; fi +done + + +# Find pygrub +for i in /usr/lib/${myxen}/bin /usr/bin; do + if [ -f $i/pygrub ]; then mypygrub=$i; fi +done + +# Find eliloader +for i in /usr/bin /usr/sbin; do + if [ -f $i/eliloader ]; then myeliloader=$i; fi +done + +# Find vncterm +for i in /usr/bin /usr/lib/${myxen}/bin; do + if [ -f $i/vncterm ]; then myvncterm=$i; fi +done + + +cat < xenopsd-conf - %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} @@ -99,7 +98,10 @@ install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd- install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight + mkdir -p %{buildroot}/etc/xapi +chmod 755 make-xsc-xenopsd.conf +LIBEXECDIR=%{_libexecdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libexecdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf @@ -183,6 +185,9 @@ fi * Tue Sep 23 2013 David Scott - Update to 0.9.26, which includes fixes for networking and libxl +* Fri Sep 20 2013 Euan Harris +- Generate xenopsd.conf automatically + * Mon Sep 16 2013 Euan Harris - Update to 0.9.25, which includes linker paths required on Debian From 3a6912823e4c32e334fa183b470f4255da503a09 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 24 Sep 2013 10:26:24 +0100 Subject: [PATCH 0465/1125] makedeb: Add mappings for python-setuptools and vhd-util Signed-off-by: Euan Harris --- scripts/mappkgname.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 341be1a8..d0a745bb 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -90,6 +90,8 @@ "xsconsole": ["xsconsole"], "xsiostat": ["xsiostat"], "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], + "python-setuptools": ["python-setuptools"], + "vhd-tool": ["vhd-tool"], # Distribution packages "ocaml": ["ocaml-nox", "ocaml-native-compilers"], From 29770839f7d32d22c9a6834751e39a756920044d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 12:16:29 +0100 Subject: [PATCH 0466/1125] makemake: Merge RPM-building rules back in Signed-off-by: Euan Harris --- makemake.py | 66 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/makemake.py b/makemake.py index 83c5e09e..aa18674a 100755 --- a/makemake.py +++ b/makemake.py @@ -10,6 +10,20 @@ import urlparse import sys import mappkgname +import platform + +def buildType(): + debian_like = [ "ubuntu", "debian" ] + rhel_like = [ "fedora", "redhat", "centos" ] + + distribution = platform.linux_distribution()[0].lower() + assert distribution in debian_like + rhel_like + + if distribution in debian_like: + return "deb" + elif distribution in rhel_like: + return "rpm" + # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -41,12 +55,19 @@ # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" chroot_dist = '.el6' -rpm.addMacro( 'dist', "" ) +if buildType() == "rpm": + rpm.addMacro( 'dist', chroot_dist ) +else: + rpm.addMacro( 'dist', "" ) + print "all: rpms" -rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" +if buildType() == "rpm": + rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) +else: + rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" ts = rpm.TransactionSet() @@ -66,7 +87,10 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - rpm.addMacro( 'NAME', mappkgname.map_package(h['name'])[0] ) + if buildType() == "rpm": + rpm.addMacro( 'NAME', h['name'] ) + else: + rpm.addMacro( 'NAME', mappkgname.map_package(h['name'])[0] ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) @@ -76,7 +100,10 @@ def srpmNameFromSpec( spec ): # Unfortunately expanding that macro gives us a leading 'src' that we # don't want, so we strip that off - srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}-%{RELEASE}.dsc" ) ) + if buildType() == "rpm": + srpmname = os.path.basename( rpm.expandMacro( rpmfilenamepat ) ) + else: + srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}-%{RELEASE}.dsc" ) ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) @@ -88,10 +115,16 @@ def srpmNameFromSpec( spec ): def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): - rpm.addMacro( 'NAME', mappkgname.map_package_name(h) ) + if buildType() == "rpm": + rpm.addMacro( 'NAME', h['name'] ) + else: + rpm.addMacro( 'NAME', mappkgname.map_package_name(h) ) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) - rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) + if buildType() == "rpm": + rpm.addMacro( 'ARCH', h['arch'] ) + else: + rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) rpmname = rpm.expandMacro( rpmfilenamepat ) rpm.delMacro( 'NAME' ) rpm.delMacro( 'VERSION' ) @@ -127,8 +160,12 @@ def rpmNameFromHeader( h ): print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), os.path.join( spec_dir, specname ), " ".join( sources ) ) - print '\t@echo [MAKEDEB] $@' - print '\tscripts/makedeb.py $<' + if buildType() == "rpm": + print '\t@echo [RPMBUILD] $@' + print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' + else: + print '\t@echo [MAKEDEB] $@' + print '\tscripts/makedeb.py $<' # Rules to download sources @@ -180,10 +217,15 @@ def rpmNameFromHeader( h ): srpm_path = os.path.join( srpm_dir, srpmname ) rpm_outdir = os.path.dirname( rpm_path ) print '%s: %s' % ( rpm_path, srpm_path ) - print '\t@echo [PBUILDER] $@' - print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir - #print '\t@echo [CREATEREPO] $@' - #print '\t@createrepo --quiet --update %s' % rpm_dir + if buildType() == "rpm": + print '\t@echo [MOCK] $@' + print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\t@echo [CREATEREPO] $@' + print '\t@createrepo --quiet --update %s' % rpm_dir + + else: + print '\t@echo [PBUILDER] $@' + print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec From fd19b569863b31ed964195a5d3dacbb0c2fceebd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 14:48:52 +0100 Subject: [PATCH 0467/1125] makedeb: Map ocaml-camomile-data to libcamomile-data dh_ocaml insists that a package with 'ocaml' in its name should have a -dev package. Currently we call dh_ocaml for all packages (we should only call it for packages that actually contain OCaml code), so the lack of a libcamomile-ocaml-data-dev file causes the build to fail. As a workaround, map the package to libcamomile-data. Signed-off-by: Euan Harris --- scripts/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index d0a745bb..205c9c83 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -21,7 +21,7 @@ "libnl3": ["libnl-3"], "message-switch": ["message-switch"], "ocaml-bitstring": ["libbitstring-ocaml"], - "ocaml-camomile-data": ["libcamomile-data-ocaml"], + "ocaml-camomile-data": ["libcamomile-data"], "ocaml-camomile": ["libcamomile-ocaml"], "ocaml-cdrom": ["libcdrom-ocaml"], "ocaml-cohttp": ["libcohttp-ocaml"], From 9b186674e4364149711a348f56f5becf1f64bb33 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 16:06:09 +0100 Subject: [PATCH 0468/1125] rpmextra: Include files with %attr annotations in Debian packages Until now we completely ignored files defined with %attr annotations. With this change we include them in Debian packages, but don't try to apply the ownership and permissions defined by the annotations. Signed-off-by: Euan Harris --- scripts/rpmextra.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/rpmextra.py b/scripts/rpmextra.py index 0d6bb426..7b3f8ce8 100644 --- a/scripts/rpmextra.py +++ b/scripts/rpmextra.py @@ -58,6 +58,7 @@ def files_from_spec(basename, specpath): if tokens[0].lower().startswith("%defattr"): continue if tokens[0].lower().startswith("%attr"): + files[section] = files.get(section, []) + tokens[1:] continue if tokens[0].lower() == "%doc": docsection = section + "-doc" From 0a0e199fac1275ba75588aeb43ee3978affc5374 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:20:00 +0000 Subject: [PATCH 0469/1125] Update to squeezed 0.10.4 Signed-off-by: David Scott --- SPECS/squeezed.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index cc354a61..6e71a8a6 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.3 +Version: 0.10.4 Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL @@ -57,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 24 2013 David Scott +- Update to 0.10.4 + * Fri Sep 20 2013 David Scott - 0.10.3-1 - Update to allow minimal operation without xen From 7e0b32bc5af80fdf8ab0e0e49dc02735f75170b2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:23:13 +0000 Subject: [PATCH 0470/1125] Update xenopsd to 0.9.27 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 9332ac1a..0d963eab 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.26 -Release: 3 +Version: 0.9.27 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -183,6 +183,7 @@ fi * Wed Sep 24 2013 David Scott - modprobe blk{tap,back} in the xenopsd-xc init.d script since we need these to make virtual disks work +- update to 0.9.27 * Tue Sep 23 2013 David Scott - Update to 0.9.26, which includes fixes for networking and libxl From 2ca6fe38979a5e01e3f5e08e7b122c231d670fd9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:24:05 +0000 Subject: [PATCH 0471/1125] Update xcp-networkd following tagging convention change Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 804c9df2..633bc471 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -5,7 +5,7 @@ Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf @@ -24,7 +24,7 @@ Requires: ethtool redhat-lsb-core Simple host networking management service for the xapi toolstack. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q cp %{SOURCE1} xcp-networkd-init cp %{SOURCE2} xcp-networkd-conf cp %{SOURCE3} xcp-networkd-network-conf From be2f0cf8b7a526484db06e9993d172343e006a37 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 16:24:41 +0100 Subject: [PATCH 0472/1125] specs: Don't build debuginfo subpackages for OCaml code Debuginfo subpackages aren't actually built for OCaml packages, but the Python RPM library thinks they will be built so makemake.py produces build rules for them. Since the targets of the rules are never actually built, these packages may be rebuilt unnecessarily during subsequent builds. The example spec file given in the Fedora OCaml packaging guidelines: https://fedoraproject.org/wiki/Packaging:OCaml Note that the example uses %define (lazily expanded), whereas we are using %global (eagerly expanded, available in global context). A comment in ocaml-re.spec (from upstream) suggests that it is better to use %global than %define. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 ++ SPECS/js_of_ocaml.spec | 2 +- SPECS/ocaml-cdrom.spec | 2 ++ SPECS/ocaml-cstruct.spec | 2 ++ SPECS/ocaml-fd-send-recv.spec | 2 ++ SPECS/ocaml-lambda-term.spec | 2 ++ SPECS/ocaml-libvhd.spec | 2 ++ SPECS/ocaml-netdev.spec | 2 ++ SPECS/ocaml-obuild.spec | 2 ++ SPECS/ocaml-ocplib-endian.spec | 2 ++ SPECS/ocaml-qmp.spec | 2 ++ SPECS/ocaml-sexplib.spec | 2 ++ SPECS/ocaml-ssl.spec | 2 ++ SPECS/ocaml-stdext.spec | 2 ++ SPECS/ocaml-tapctl.spec | 2 ++ SPECS/ocaml-type-conv.spec | 2 ++ SPECS/ocaml-uri.spec | 2 ++ SPECS/ocaml-uuidm.spec | 2 ++ SPECS/ocaml-xcp-idl.spec | 2 ++ SPECS/ocaml-xcp-inventory.spec | 2 ++ SPECS/ocaml-xcp-rrd.spec | 2 ++ SPECS/ocaml-xen-api-client.spec | 2 ++ SPECS/ocaml-xen-api-libs-transitional.spec | 2 ++ SPECS/ocaml-xen-lowlevel-libs.spec | 2 ++ SPECS/ocaml-xenops.spec | 2 ++ SPECS/ocaml-xenstore-clients.spec | 2 ++ SPECS/ocaml-xenstore.spec | 2 ++ SPECS/ocaml-zed.spec | 2 ++ 28 files changed, 55 insertions(+), 1 deletion(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 688bfac2..21fe3a05 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -1,3 +1,5 @@ +%define debug_package %{nil} + Name: biniou Version: 1.0.6 Release: 1 diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index d81e06e0..2f20cd86 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -1,4 +1,4 @@ -%global debug_package %{nil} +%define debug_package %{nil} Name: js_of_ocaml Version: 1.3.2 diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index ece7c63a..bfb360b6 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-cdrom Version: 0.9.1 Release: 2 diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index f204b92c..336ec778 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-cstruct Version: 0.7.1 Release: 2 diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 2474b9f2..efca5260 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-fd-send-recv Version: 1.0.1 Release: 1 diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 2b9f7083..6af62376 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-lambda-term Version: 1.2 Release: 1 diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 63d52dfe..5e33bebb 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-libvhd Version: 0.9.1 Release: 1 diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 46980d0e..31ed27c5 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-netdev Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index d22bf041..7eef5451 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-obuild Version: 0.0.2 Release: 1 diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 5e8eab7a..a1a12274 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-ocplib-endian Version: 0.4 Release: 1 diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index cb4eddf1..663fd00d 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-qmp Version: 0.9.1 Release: 1 diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 7cf4c3bc..275561ec 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-sexplib Version: 109.20.00 Release: 1 diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index d383f58d..aa4c4041 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-ssl Version: 0.4.6 Release: 1 diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 1cd663ae..2a760acc 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-stdext Version: 0.9.1 Release: 1 diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 0940388d..16a13bc5 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-tapctl Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 2006cf51..373ce79c 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-type-conv Version: 109.20.00 Release: 1 diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index a48befa8..401213b5 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-uri Version: 1.3.8 Release: 1 diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 70661f30..7f7bad4e 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-uuidm Version: 0.9.5 Release: 1 diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 922f4ab4..b8b8fd48 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xcp-idl Version: 0.9.12 Release: 1 diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 9beda20b..709c906c 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xcp-inventory Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index daaf8016..93102433 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xcp-rrd Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 0a9bfeff..b9537c52 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xen-api-client Version: 0.9.4 Release: 1 diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 74e8e691..bd685592 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xen-api-libs-transitional Version: 0.9.2 Release: 1 diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 963c9a6d..64a37ffd 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xen-lowlevel-libs Version: 0.9.9 Release: 1 diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 25692568..e0b9b9f2 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xenops Version: 0.9.1 Release: 1 diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index fbbc877e..233f720f 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xenstore-clients Version: 0.9.2 Release: 1 diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 4314a496..fa1135fe 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-xenstore Version: 1.2.4 Release: 1 diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index f5fada86..1524e276 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -1,3 +1,5 @@ +%global debug_package %{nil} + Name: ocaml-zed Version: 1.2 Release: 1 From 67293ac13a9d0f0d73cf41fe2c94760bb368cea2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:42:25 +0000 Subject: [PATCH 0473/1125] Update forkexecd to 0.9.1 (now respects the tagging convention!) Signed-off-by: David Scott --- SPECS/forkexecd.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index d0ec919e..07c83d32 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -1,11 +1,11 @@ Name: forkexecd -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: A subprocess management service License: LGPL Group: Development/Other URL: https://github.com/xapi-project/forkexecd/archive/forkexecd-0.9.0.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel @@ -20,7 +20,7 @@ A service which starts and manages subprocesses, avoiding the need to manually fork() and exec() in a multithreaded program. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q cp %{SOURCE1} forkexecd-init %build @@ -72,6 +72,9 @@ developing applications that use %{name}. %{_libdir}/ocaml/forkexec/* %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.1 + * Fri May 31 2013 David Scott - Initial package From 97970d94289be205d62ebb899c06d791b7546a79 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:49:07 +0000 Subject: [PATCH 0474/1125] Update xen-api-libs-transitional to 0.9.3 Signed-off-by: David Scott --- SPECS/ocaml-xen-api-libs-transitional.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 74e8e691..12c7e5f5 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -1,5 +1,5 @@ Name: ocaml-xen-api-libs-transitional -Version: 0.9.2 +Version: 0.9.3 Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception @@ -71,6 +71,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.3 + * Tue Sep 10 2013 David Scott - Update to 0.9.2 From 0a31e6717b09686553dbe98348ab13d16650823f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 16:52:33 +0100 Subject: [PATCH 0475/1125] configure: Merge RPM setup back in Signed-off-by: Euan Harris --- configure.sh | 80 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 28 deletions(-) diff --git a/configure.sh b/configure.sh index d618f85a..76549a1f 100755 --- a/configure.sh +++ b/configure.sh @@ -1,30 +1,54 @@ -#!/bin/sh - -ARCH=amd64 -DIST=raring -BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz - -apt-get install pbuilder python-rpm curl -mkdir -p BUILD - -echo -n "Writing pbuilder configuration..." -mkdir -p pbuilder -sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH -sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps -chmod 755 pbuilder/D05deps -echo " done" - -if [ -f $BASETGZ ] ; then - echo $BASETGZ exists - updating - sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH -else - echo $BASETGZ does not exist - creating - sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH -fi +#!/bin/bash + +if [ `lsb_release -si` == "Fedora" ] ; then + + echo "Configuring RPM-based build" + + sudo yum install mock rpm-build + + echo -n "Writing mock configuration..." + mkdir -p mock + sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg + ln -fs /etc/mock/default.cfg mock/ + ln -fs /etc/mock/site-defaults.cfg mock/ + ln -fs /etc/mock/logging.ini mock/ + echo " done" + + echo -n "Initializing repository..." + mkdir -p RPMS + createrepo --quiet RPMS + echo " done" + +elif [ `lsb_release -si` == "Ubuntu" ] ; then -echo -n "Initializing repository..." -mkdir -p RPMS SRPMS -(cd RPMS; apt-ftparchive packages . > Packages) -(cd SRPMS; apt-ftparchive sources . > Sources) -echo " done" + echo "Configuring DEB-based build" + ARCH=amd64 + DIST=raring + BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz + + sudo apt-get install pbuilder python-rpm curl + mkdir -p BUILD + + echo -n "Writing pbuilder configuration..." + mkdir -p pbuilder + sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH + sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps + chmod 755 pbuilder/D05deps + echo " done" + + if [ -f $BASETGZ ] ; then + echo $BASETGZ exists - updating + sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + else + echo $BASETGZ does not exist - creating + sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + fi + + echo -n "Initializing repository..." + mkdir -p RPMS SRPMS + (cd RPMS; apt-ftparchive packages . > Packages) + (cd SRPMS; apt-ftparchive sources . > Sources) + echo " done" + +fi From bba40ece91a9de1ea7b8c1c318760eeb5ce1094b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 13 Sep 2013 10:16:10 +0100 Subject: [PATCH 0476/1125] libnl3: Temporarily remove Signed-off-by: Euan Harris --- {SPECS => xs-baggage/centos-6.4}/libnl3.spec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {SPECS => xs-baggage/centos-6.4}/libnl3.spec (100%) diff --git a/SPECS/libnl3.spec b/xs-baggage/centos-6.4/libnl3.spec similarity index 100% rename from SPECS/libnl3.spec rename to xs-baggage/centos-6.4/libnl3.spec From 976ab8b36248ac0416cdf8a87795095355520d87 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 15:59:50 +0000 Subject: [PATCH 0477/1125] Update xapi to 1.9.28 Signed-off-by: David Scott --- SPECS/xapi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 5902b9fe..c4943ad3 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.27 -Release: 2 +Version: 1.9.28 +Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Wed Sep 25 2013 David Scott +- Update to 1.9.28 + * Tue Sep 23 2013 David Scott - 1.9.27-2 - Remove dependency on ocaml-bitstring From 5bd3385a73dc5da4d687c4ab90e86ce666754851 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:05:29 +0100 Subject: [PATCH 0478/1125] makemake: Add ignore list of packages not to be built Signed-off-by: Euan Harris --- makemake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makemake.py b/makemake.py index aa18674a..72dc7ae6 100755 --- a/makemake.py +++ b/makemake.py @@ -5,6 +5,8 @@ import sys sys.path.append("scripts") +ignore_list = {"rpm":["libxl-headers"]} + import rpm import os import urlparse @@ -79,6 +81,8 @@ def specFromFile( spec ): for spec_name in spec_names: spec = specFromFile( os.path.join( spec_dir, spec_name ) ) pkg_name = spec.sourceHeader['name'] + if pkg_name in ignore_list[buildType()]: + continue if os.path.splitext( spec_name )[0] != pkg_name: sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) sys.exit( 1 ) From 7733b7559e31aa260224208ac529dc0190faf2d6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:11:51 +0100 Subject: [PATCH 0479/1125] makemake: Add empty ignore list on Debian Signed-off-by: Euan Harris --- makemake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makemake.py b/makemake.py index 72dc7ae6..aa4bb75c 100755 --- a/makemake.py +++ b/makemake.py @@ -5,7 +5,8 @@ import sys sys.path.append("scripts") -ignore_list = {"rpm":["libxl-headers"]} +ignore_list = {"rpm":["libxl-headers"], + "deb":[]} import rpm import os From 9ed64d35fa3fe4ef419043d39acfbfc854597ee7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:12:58 +0100 Subject: [PATCH 0480/1125] makemake: Add ignore list for Debian, ignoring libnl3 Signed-off-by: Euan Harris --- {xs-baggage/centos-6.4 => SPECS}/libnl3.spec | 0 makemake.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename {xs-baggage/centos-6.4 => SPECS}/libnl3.spec (100%) diff --git a/xs-baggage/centos-6.4/libnl3.spec b/SPECS/libnl3.spec similarity index 100% rename from xs-baggage/centos-6.4/libnl3.spec rename to SPECS/libnl3.spec diff --git a/makemake.py b/makemake.py index aa4bb75c..335b15ee 100755 --- a/makemake.py +++ b/makemake.py @@ -5,8 +5,8 @@ import sys sys.path.append("scripts") -ignore_list = {"rpm":["libxl-headers"], - "deb":[]} +ignore_list = {"rpm":["libxl-headers","libnl3"], + "deb":["libnl3"]} import rpm import os From 82585e587155e1be81ed086a03574f8d772e6933 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 19:07:08 +0100 Subject: [PATCH 0481/1125] ocaml-xen-lowlevel-libs: Remove hardcoded dependency on libxl-headers libxl-headers is a fixup package needed on Ubuntu, where the xen-devel packages don't include the libxl headers. It should not be in the dependency list in the spec file - we should instead add it when mapping package names in makedeb. Signed-off-by: Euan Harris --- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- scripts/mappkgname.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index fb95a2f0..64a37ffd 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -11,7 +11,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel cmdliner-devel -BuildRequires: ocaml-cstruct-devel libxl-headers +BuildRequires: ocaml-cstruct-devel Requires: ocaml ocaml-findlib %description diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 205c9c83..a5809e6f 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -152,7 +152,7 @@ "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], "libsexplib-camlp4": ["libsexplib-camlp4-dev"], "ocaml-findlib-dev": ["ocaml-findlib", "libfindlib-ocaml-dev"], - "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], + "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev", "libxl-headers"], "libvirt0-dev": ["libvirt-dev"], "libxen-4.2-dev": ["libxen-dev"], "libvirt-bin-dev": ["libvirt-bin"], From 6eafd859d8c5ba7be709d9304affb36b720e9339 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 20:11:36 +0000 Subject: [PATCH 0482/1125] Lots of updates required to make it build Signed-off-by: David Scott --- SPECS/ffs.spec | 7 +++++-- SPECS/forkexecd.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-netdev.spec | 4 +--- SPECS/ocaml-tapctl.spec | 4 +--- SPECS/ocaml-xcp-idl.spec | 3 ++- SPECS/ocaml-xen-api-libs-transitional.spec | 5 +---- SPECS/ocaml-xenops.spec | 5 ++++- SPECS/squeezed.spec | 2 +- SPECS/vhd-tool.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 7 +++++-- SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xe-create-templates.spec | 7 +++++-- SPECS/xenopsd.spec | 2 +- 16 files changed, 32 insertions(+), 26 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 006c0c6b..b2e03a64 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.17 +Version: 0.9.18 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel message-switch-devel forkexecd-devel @@ -51,6 +51,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.18 + * Tue Sep 10 2013 David Scott - Update to 0.9.17 diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 07c83d32..df103827 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-syslog-devel ocaml-uuidm-devel ocaml-stdext-devel +BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-uuidm-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml-rpc ocaml-rpc-devel redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 38f0907a..5d80e083 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -13,7 +13,7 @@ Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts BuildRequires: ocaml-cohttp-devel ocaml-rpc-devel ocaml-xenstore-devel -BuildRequires: ocaml-ounit-devel ocaml-syslog-devel ocaml-uri-devel +BuildRequires: ocaml-ounit-devel ocaml-uri-devel BuildRequires: ocaml-re-devel ocaml-rpc-devel cmdliner-devel BuildRequires: ocaml-ssl-devel ocaml-oclock-devel BuildRequires: openssl openssl-devel diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 46980d0e..73deea79 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -7,9 +7,7 @@ Group: Development/Other URL: https://github.com/xapi-project/netdev/archive/netdev-0.9.0.tar.gz Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel -#required by forkexecd -BuildRequires: ocaml-syslog-devel +BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib %description diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 0940388d..e59174b1 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -8,9 +8,7 @@ URL: https://github.com/xapi-project/tapctl/archive/tapctl-0.9.0.tar. Source0: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel -# required by forkexecd -BuildRequires: ocaml-syslog-devel +BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib forkexecd-devel %description diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index f690386a..0bde0713 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -8,7 +8,7 @@ URL: https://github.com/xapi-project/xcp-idl/archive/%{version}.tar.g Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel ocaml-syslog-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel +BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel BuildRequires: ocaml-ounit-devel # XXX transitive dependencies of message-switch-devel @@ -47,6 +47,7 @@ ocaml setup.ml -build rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install %clean diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 12c7e5f5..c382e5de 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel BuildRequires: ocaml-xenstore-clients-devel xen-devel ocaml-camlp4-devel -BuildRequires: ocaml-syslog-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib xen-libs %description @@ -53,7 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cpuid/* %{_libdir}/ocaml/gzip/* %{_libdir}/ocaml/http-svr/* -%{_libdir}/ocaml/log/* %{_libdir}/ocaml/pciutil/* %{_libdir}/ocaml/sexpr/* %{_libdir}/ocaml/sha1/* @@ -65,8 +64,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xml-light2/* %{_libdir}/ocaml/stublibs/dllcpuid_stubs.so %{_libdir}/ocaml/stublibs/dllcpuid_stubs.so.owner -%{_libdir}/ocaml/stublibs/dlllog_stubs.so -%{_libdir}/ocaml/stublibs/dlllog_stubs.so.owner %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 25692568..cdbb8b89 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib %description @@ -49,6 +49,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenops/* %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.2 + * Tue Sep 10 2013 David Scott - Update to 0.9.1 diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 6e71a8a6..6037a733 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -10,7 +10,7 @@ Source1: squeezed-init Source2: squeezed-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-syslog-devel +BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 9d57eb33..374b0a84 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -14,7 +14,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel -BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-oclock-devel BuildRequires: libuuid-devel BuildRequires: ocaml-xenstore-clients-devel message-switch-devel diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index c26a2c1a..04e943de 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,5 +1,5 @@ Name: xapi-libvirt-storage -Version: 0.9.6 +Version: 0.9.7 Release: 1 Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam Source1: xapi-libvirt-storage-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel BuildRequires: message-switch-devel @@ -51,6 +51,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.7 + * Fri May 31 2013 David Scott - Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c4943ad3..c77f50c5 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexecd-devel BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel -BuildRequires: ocaml-syslog-devel ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 633bc471..7b81ade7 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -12,7 +12,7 @@ Source3: xcp-networkd-network-conf Source4: xcp-networkd-bridge-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-stdext-devel forkexecd-devel ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index bb028484..5f8b32f0 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam Source1: xcp-rrdd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-lowlevel-libs-devel diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index d97aa517..af755fee 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -1,5 +1,5 @@ Name: xe-create-templates -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Creates default XenServer templates License: LGPL @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-xen-api-client-devel +BuildRequires: ocaml-xen-api-client-devel ocaml-oclock-devel BuildRequires: openssl-devel Requires: openssl @@ -38,6 +38,9 @@ rm -rf %{buildroot} %{_bindir}/xe-create-templates %changelog +* Wed Sep 25 2013 David Scott +- Update to 0.9.2 + * Wed Jun 12 2013 David Scott - Initial package diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 0d963eab..334314ef 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -14,7 +14,7 @@ Source5: xenopsd-conf.in Source6: xenopsd-network-conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-syslog-devel ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexecd-devel BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel From af7cd24b246181c82519a887fad5520a39a49057 Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Wed, 25 Sep 2013 21:16:06 +0100 Subject: [PATCH 0483/1125] Update README.md configure.sh needs redhat-lsb-core --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 149d2997..cd09fd3c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ article for [CentOS](http://www.rackspace.com/knowledge_center/article/installin After installing mock, type: ``` -yum install -y mock +yum install -y mock redhat-lsb-core ``` Using mock to build these RPMs: From 1c34090c88f39dec3758c7ff1ba73b124ca15adf Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 25 Sep 2013 21:02:59 +0000 Subject: [PATCH 0484/1125] Update xenops to 0.9.2 Signed-off-by: David Scott --- SPECS/ocaml-xenops.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 8b548610..72be2934 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xenops -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Low-level xen control operations OCaml License: LGPL From 50aae67b596b052c8ac90c5e4a75cf8ab0e829dd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 26 Sep 2013 09:46:09 +0100 Subject: [PATCH 0485/1125] xenops: Update to 0.9.2 0.9.1's META file still requires 'log', which has gone away. Signed-off-by: Euan Harris --- SPECS/ocaml-xenops.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 8b548610..72be2934 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xenops -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Low-level xen control operations OCaml License: LGPL From 2c3cf68bd90f9c06ba1cedadf712484fb6beb337 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 26 Sep 2013 16:32:30 +0000 Subject: [PATCH 0486/1125] xenopsd-xc: set the XCP_PATH to all the places the xen binaries may be Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 41 +++++++---------------------------- SOURCES/xenopsd-xc-init | 3 +++ 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index efd507ea..edb64d4b 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -1,53 +1,28 @@ #!/bin/sh -# Find xen: -for i in xen xen-4.1 xen-4.2 xen-4.3; do - if [ -d /usr/lib/$i ]; then myxen=$i; fi -done - # Find a group for i in wheel root xapi xendev; do egrep -i "^$i" /etc/group > /dev/null && group=$i done -# Find qemu-system-i386 -for i in /usr/lib/${myxen}/bin /usr/bin; do - if [ -f $i/qemu-system-i386 ]; then myqemu=$i; fi -done - - -# Find pygrub -for i in /usr/lib/${myxen}/bin /usr/bin; do - if [ -f $i/pygrub ]; then mypygrub=$i; fi -done - -# Find eliloader -for i in /usr/bin /usr/sbin; do - if [ -f $i/eliloader ]; then myeliloader=$i; fi -done - -# Find vncterm -for i in /usr/bin /usr/lib/${myxen}/bin; do - if [ -f $i/vncterm ]; then myvncterm=$i; fi -done - - cat < Date: Thu, 26 Sep 2013 16:34:27 +0000 Subject: [PATCH 0487/1125] xcp-idl: update to 0.9.14 with XCP_PATH-searching ability Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 6bbc0e63..11edcbee 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.13 +Version: 0.9.14 Release: 1 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xcp-idl/archive/%{version}.tar.gz -Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz +Source0: https://github.com/xapi-project/djs55/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel @@ -64,6 +64,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp/* %changelog +* Thu Sep 26 2013 David Scott +- Support searching for executables on the XCP_PATH as well as the PATH + * Wed Sep 25 2013 David Scott - Logging, channel passing and interface updates From 687770005551f4dc4f3e4c98ffd3d07ac9f6b3de Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 26 Sep 2013 16:35:55 +0000 Subject: [PATCH 0488/1125] Update wizard to 0.2.25 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index aa69de67..c4acf3c7 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.24 +Version: 0.2.25 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Thu Sep 26 2013 David Scott +- Update to 0.2.25 + * Wed Sep 25 2013 David Scott - Update to 0.2.24 From 8c1f4bf150bc1fffe2b77177cefb23be9484f60f Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 26 Sep 2013 16:37:41 +0000 Subject: [PATCH 0489/1125] ocaml-xcp-idl: correct typo Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 11edcbee..9511eecd 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -7,7 +7,7 @@ Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xcp-idl/archive/%{version}.tar.gz -Source0: https://github.com/xapi-project/djs55/archive/%{version}/xcp-idl-%{version}.tar.gz +Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel From 845bb1486933d0393a453163671637d050c4740f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 27 Sep 2013 15:43:53 +0000 Subject: [PATCH 0490/1125] Fix VDI.copy Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 5 ++++- SPECS/xapi.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 374b0a84..761c60f3 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,7 +2,7 @@ Summary: command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.5.0 +Version: 0.5.1 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -54,5 +54,8 @@ rm -rf %{buildroot} %{_libexecdir}/xapi/sparse_dd %changelog +* Fri Sep 27 2013 David Scott - 0.5.1-1 +- Update to 0.5.1 + * Mon Sep 23 2013 David Scott - 0.5.0-1 - Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c77f50c5..eb8a3ed5 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.28 +Version: 1.9.29 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Sep 27 2013 David Scott - 1.9.29-1 +- Update to 1.9.29 + * Wed Sep 25 2013 David Scott - Update to 1.9.28 From feb347b3697f2d01a6066f267fe3489cffed7969 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:22:14 +0100 Subject: [PATCH 0491/1125] Update README.md Tidy up the build instructions for RPM-based distributions. --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cd09fd3c..291df16e 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,23 @@ xenserver-core ============== -A build environment for xenserver-core: the core components of [XenServer](http://www.xenserver.org/). -It currently builds on CentOS, Fedora and other RPM-based distributions. -To use this, first clone the repo. You'll need to set up a user to run mock. +Buildroot for xen-api and related packages, producing RPM and (experimentally) Debian packages. -Installing mock ---------------- +RPM-based distributions +----------------------- -First if running a RHEL/CentOS system then you will need to add the -[EPEL repositories](http://fedoraproject.org/wiki/EPEL). Here is a useful -article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). -After installing mock, type: +On RPM-based distributions, the packages are build using `mock`. +To install it on a RHEL/CentOS system then you will need to add the +[EPEL repositories](http://fedoraproject.org/wiki/EPEL). +Here is a useful article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). + + +After adding EPEL, install and set up mock: ``` yum install -y mock redhat-lsb-core ``` -Using mock to build these RPMs: -------------------------------- - Mock will refuse to run as root. You must choose a non-privileged user to run mock as. Type the following as root: @@ -30,10 +28,14 @@ useradd -G mock passwd su - +``` + +You are now ready to clone the xenserver-core repository and build the packages: -git clone git://github.com/xen-org/xen-api-rpm-buildroot.git rpmbuild +``` +git clone git://github.com/xapi-project/xenserver-core.git -cd rpmbuild +cd xenserver-core ./configure.sh From 0fbac0f50b0b867ba229cb25bde9a9bcc0d605e4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:27:46 +0100 Subject: [PATCH 0492/1125] Update README.md --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 291df16e..16f8cb8c 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,29 @@ You are now ready to clone the xenserver-core repository and build the packages: ``` git clone git://github.com/xapi-project/xenserver-core.git - cd xenserver-core ./configure.sh - ./makemake.py > Makefile +make +``` + +Debian-based distributions (experimental) +========================================= + +Building Debian packages is experimental. + +On Debian-based distributions, the packages are built using `pbuilder`. +`pbuilder` is available in the main Ubuntu and Debian package repositories, so there is no need to add extra ones. +`pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. +The steps to build Debian packages are the same as those to build RPMs: + +``` +git clone git://github.com/xapi-project/xenserver-core.git +cd xenserver-core + +./configure.sh +./makemake.py > Makefile make ``` From ebedfadac563b3085644a62a5840590f998e4d2e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:28:25 +0100 Subject: [PATCH 0493/1125] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16f8cb8c..065a2e8a 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,9 @@ make ``` Debian-based distributions (experimental) -========================================= +----------------------------------------- -Building Debian packages is experimental. +Building Debian packages is experimental! On Debian-based distributions, the packages are built using `pbuilder`. `pbuilder` is available in the main Ubuntu and Debian package repositories, so there is no need to add extra ones. From f8f091aff56e011cf1774d0bc3092c3162065cad Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Sep 2013 18:29:18 +0100 Subject: [PATCH 0494/1125] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 065a2e8a..15e8e470 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Buildroot for xen-api and related packages, producing RPM and (experimentally) D RPM-based distributions ----------------------- -On RPM-based distributions, the packages are build using `mock`. +On RPM-based distributions, the packages are build using `mock`. To install it on a RHEL/CentOS system then you will need to add the [EPEL repositories](http://fedoraproject.org/wiki/EPEL). Here is a useful article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). From f1cc4e0ef3057532aec09cf5b03701842be92a10 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 26 Sep 2013 09:50:59 +0100 Subject: [PATCH 0495/1125] ocaml-xcp-idl: Add install dependency on message-switch Note this dependency is added to the -devel package. Signed-off-by: Euan Harris --- SPECS/ocaml-xcp-idl.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 9511eecd..c2e9ae4a 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -33,6 +33,7 @@ Common interface definitions for XCP services. Summary: Development files for %{name} Group: Development/Other #Requires: %{name} = %{version}-%{release} +Requires: message-switch-devel %description devel The %{name}-devel package contains libraries and signature files for From ad1c5b88ea98797ed774af53aa91f06fc4b35608 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 27 Sep 2013 19:10:04 +0100 Subject: [PATCH 0496/1125] xe-create-templates: Add dependency on ocaml-xcp-idl-devel Also fix misleading URL field. Signed-off-by: Euan Harris --- SPECS/xe-create-templates.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index af755fee..2f117802 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -4,14 +4,14 @@ Release: 1 Summary: Creates default XenServer templates License: LGPL Group: Development/Other -URL: https://github.com/djs55/xcp-guest-templates/%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-guest-templates/%{version}.tar.gz Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-api-client-devel ocaml-oclock-devel -BuildRequires: openssl-devel +BuildRequires: openssl-devel ocaml-xcp-idl-devel Requires: openssl %description From 947737520c455bab47d4f49543b01d97684fd817 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 27 Sep 2013 19:13:42 +0100 Subject: [PATCH 0497/1125] xenopsd: Add dependency on ocaml-xcp-idl-devel Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index da9f9c82..22cdd473 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel -BuildRequires: vncterm eliloader +BuildRequires: vncterm eliloader ocaml-xcp-idl-devel Requires: message-switch xenops-cli redhat-lsb-core %description From 701329dac5a17628777f5d47ed45108b5d34677f Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Mon, 30 Sep 2013 13:10:33 +0100 Subject: [PATCH 0498/1125] Add OCaml PPA to README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 15e8e470..92df2d1b 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,12 @@ On Debian-based distributions, the packages are built using `pbuilder`. `pbuilder` is available in the main Ubuntu and Debian package repositories, so there is no need to add extra ones. `pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. +The build also depends on a more modern OCaml compiler, available from this PPA: +``` +deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main +deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main +``` + The steps to build Debian packages are the same as those to build RPMs: ``` From c952813be310f695e574ea51908b5fe6f9b3f1aa Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 15:02:07 +0100 Subject: [PATCH 0499/1125] New sparse_dd Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 761c60f3..e3809b53 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,16 +2,16 @@ Summary: command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.5.1 +Version: 0.6.0 Release: 1 Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org -Source0: https://github.com/djs55/ocaml-vhd/archive/%{version}/ocaml-vhd-%{version}.tar.gz +Source0: https://github.com/djs55/vhd-tool/archive/%{version}/vhd-tool-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel @@ -24,36 +24,35 @@ BuildRequires: openssl openssl-devel Simple command-line tools for manipulating and streaming .vhd format file. %prep -%setup -q -n ocaml-vhd-%{version} +%setup -q cp %{SOURCE1} vhd-tool-sparse_dd-conf %build -if [ -x ./configure ]; then - ./configure -fi +./configure --bindir %{buildroot}/%{_bindir} --libexecdir %{buildroot}/${_libexecdir}/xapi --etcdir %{buildroot}/etc make %install rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 main.native %{buildroot}/%{_sbindir}/vhd-tool +mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libexecdir}/xapi -install -m 0755 sparse_dd.native %{buildroot}/%{_libexecdir}/xapi/sparse_dd mkdir -p %{buildroot}/etc -install -m 0755 vhd-tool-sparse_dd-conf %{buildroot}/etc/sparse_dd.conf +make install %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{_sbindir}/vhd-tool +%{_bindir}/vhd-tool /etc/sparse_dd.conf %{_libexecdir}/xapi/sparse_dd %changelog +* Wed Oct 02 2013 David Scott - 0.6.0-1 +- Update to 0.6.0 + * Fri Sep 27 2013 David Scott - 0.5.1-1 - Update to 0.5.1 From 65dfacdfc917a4986ae568eee16547d014d68328 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 16:19:25 +0100 Subject: [PATCH 0500/1125] add missing file Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 SPECS/ocaml-vhd.spec diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec new file mode 100644 index 00000000..f49ac587 --- /dev/null +++ b/SPECS/ocaml-vhd.spec @@ -0,0 +1,59 @@ +%global debug_package %{nil} + +Name: ocaml-vhd +Version: 0.6.0 +Release: 1 +Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/djs55/ocaml-vhd +Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel +Requires: ocaml ocaml-findlib + +%description +A pure OCaml parser and printer for vhd format data. The library allows +vhd files to be read, written and streamed with on-the-fly format conversion. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +if [ -x ./configure ]; then + ./configure +fi +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +# This space intentionally left blank + +%files devel +%defattr(-,root,root) +%doc CHANGES README.md LICENSE + +%{_libdir}/ocaml/vhd-format/* +%{_libdir}/ocaml/stublibs/dllvhd* + +%changelog +* Wed Oct 02 2013 David Scott - 0.6.0-1 +- Initial package + From a72113569ea21f3e8016ad966aecb3dfe653d742 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 16:21:09 +0100 Subject: [PATCH 0501/1125] vhd depends on uuidm Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index f49ac587..4d8e7df0 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -9,7 +9,7 @@ Group: Development/Other URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel +BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib %description From 3c902cc8b53da6f398e9c830f9aa432c2c54d30b Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 16:22:28 +0100 Subject: [PATCH 0502/1125] vhd depends on camlp4 Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 4d8e7df0..adab10c9 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -9,7 +9,7 @@ Group: Development/Other URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel +BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib %description From 8e764a50623a32480d7e096175f879c38cd3aad2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 16:25:25 +0100 Subject: [PATCH 0503/1125] vhd-tool requires obuild Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index e3809b53..7bda4eda 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -11,7 +11,7 @@ Source0: https://github.com/djs55/vhd-tool/archive/%{version}/vhd-tool-%{version Source1: vhd-tool-sparse_dd-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel +BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel ocaml-obuild BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel From f8fce60de7f534d6b37f711cd5eeb72b727bcd68 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 2 Oct 2013 16:28:09 +0100 Subject: [PATCH 0504/1125] typo in vhd-tool spec file Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 7bda4eda..39ec945b 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -29,7 +29,7 @@ cp %{SOURCE1} vhd-tool-sparse_dd-conf %build -./configure --bindir %{buildroot}/%{_bindir} --libexecdir %{buildroot}/${_libexecdir}/xapi --etcdir %{buildroot}/etc +./configure --bindir %{buildroot}/%{_bindir} --libexecdir %{buildroot}/%{_libexecdir}/xapi --etcdir %{buildroot}/etc make %install From afe6cc6ae8faf82b6bca56bc7bd43e2dbe03a1a4 Mon Sep 17 00:00:00 2001 From: James Bulpin Date: Thu, 3 Oct 2013 18:46:58 +0100 Subject: [PATCH 0505/1125] Fix build on CentOS --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 76549a1f..6a954cd6 100755 --- a/configure.sh +++ b/configure.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ `lsb_release -si` == "Fedora" ] ; then +if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" ] ; then echo "Configuring RPM-based build" From 6694b71740f20078628a2c5e889887928a772111 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 7 Oct 2013 14:45:05 +0100 Subject: [PATCH 0506/1125] Add mapping for ocaml-vhd --- scripts/mappkgname.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index a5809e6f..ce7f5962 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -61,6 +61,7 @@ "ocaml-xenstore": ["libxenstore-ocaml"], "ocaml-yojson": ["libyojson-ocaml"], "ocaml-zed": ["libzed-ocaml"], + "ocaml-vhd": ["libvhd-ocaml"], "omake": ["omake"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], From 295dd595d3e923196747637dc171dfc83bb7bf2a Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 7 Oct 2013 15:08:42 +0100 Subject: [PATCH 0507/1125] Map ocaml-vhd to vhd-ocaml --- scripts/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index ce7f5962..679aff72 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -61,7 +61,7 @@ "ocaml-xenstore": ["libxenstore-ocaml"], "ocaml-yojson": ["libyojson-ocaml"], "ocaml-zed": ["libzed-ocaml"], - "ocaml-vhd": ["libvhd-ocaml"], + "ocaml-vhd": ["vhd-ocaml"], "omake": ["omake"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], From cd73566f17841cce183c274c47efaa4666a6f6d4 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 30 Sep 2013 17:00:07 +0100 Subject: [PATCH 0508/1125] Create and initialise repositories, so pbuilder could mount them --- configure.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.sh b/configure.sh index 6a954cd6..f3baf545 100755 --- a/configure.sh +++ b/configure.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eu if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" ] ; then @@ -37,6 +38,12 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then chmod 755 pbuilder/D05deps echo " done" + echo -n "Initializing repository..." + mkdir -p RPMS SRPMS + (cd RPMS; apt-ftparchive packages . > Packages) + (cd SRPMS; apt-ftparchive sources . > Sources) + echo " done" + if [ -f $BASETGZ ] ; then echo $BASETGZ exists - updating sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH @@ -45,10 +52,6 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH fi - echo -n "Initializing repository..." - mkdir -p RPMS SRPMS - (cd RPMS; apt-ftparchive packages . > Packages) - (cd SRPMS; apt-ftparchive sources . > Sources) echo " done" fi From f3d0cb2e10ee7db500d82d6197230fa55d4c26e9 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 30 Sep 2013 17:24:11 +0100 Subject: [PATCH 0509/1125] Import ppa key for ocaml repos --- configure.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.sh b/configure.sh index f3baf545..3c0ed0b5 100755 --- a/configure.sh +++ b/configure.sh @@ -50,6 +50,23 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then else echo $BASETGZ does not exist - creating sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + # inject Keyfile for Launchpad PPA for Louis Gesbert + sudo pbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: SKS 1.1.4 +Comment: Hostname: keyserver.ubuntu.com + +mI0EUgJE5QEEANHD2l6yuvqffhqTcJd4nOQVax6m9i4SKb/IpXqOh40PYzG17bc0rbGaM7CU ++nD9vDAtP6Wjjc5aatMyYOQ1aPzAmPtFfvjg9NyR88r9GK7G8sR6N2YzarUblrxI0yEmfc9X +409JOejfgv7s1D/Jmsoo5GqYQihXiSBS7juJk6ihABEBAAG0H0xhdW5jaHBhZCBQUEEgZm9y +IExvdWlzIEdlc2JlcnSIuAQTAQIAIgUCUgJE5QIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC +F4AACgkQrWm///0xBNZrugQAqEz0xu6FmNSvCtn9vVghI8/UAoYla87qHSjEY1gmQ9oC4/0Y +hPh2pBmI475HlPvESksjApsUHh9ksc9SkLiNS9rPE5rFp/gEDjFA6arFcaPcNmAu51x3lDfh +KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= +=ZOqF +-----END PGP PUBLIC KEY BLOCK----- +KEYFILE + fi echo " done" From 5008a6ee01e16ebfcf933e55b982bd184fe8d77e Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 7 Oct 2013 15:21:10 +0100 Subject: [PATCH 0510/1125] Inject key for Anil Madhavapeddy --- configure.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.sh b/configure.sh index 3c0ed0b5..5c96e2c8 100755 --- a/configure.sh +++ b/configure.sh @@ -65,6 +65,22 @@ hPh2pBmI475HlPvESksjApsUHh9ksc9SkLiNS9rPE5rFp/gEDjFA6arFcaPcNmAu51x3lDfh KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= =ZOqF -----END PGP PUBLIC KEY BLOCK----- +KEYFILE + # inject Keyfile for Launchpad PPA for Anil Madhavapeddy + sudo pbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: SKS 1.1.4 +Comment: Hostname: keyserver.ubuntu.com + +mI0EUd0+wQEEAMOeX/cGrgub9dEn9xjViAQub7w94JhGYKEpS2w79N3nQKA5NLBxpwvwH9xb +R7tjVJ11g/feZ+xKkbtcDNHc+BW8IpKf4x7qPy1JrDZ0c8KQhGA6TJY61Wgg4Rwzzi9l1n7L +G+EkIPotbHY0D27zqzFqwIKj+SbJFPZ9Ty1Z2VCLABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y +IEFuaWwgTWFkaGF2YXBlZGR5iLgEEwECACIFAlHdPsECGwMGCwkIBwMCBhUIAgkKCwQWAgMB +Ah4BAheAAAoJEFstDFVhcHsJryAD/01EFC2zz8LjmEvJX3hPBkkDipD+NCPsuxe78H1QR7AV +MLzqar1aYcQk/zVUGJDdIcbJnHJ2OnyeeJ0wOVOmJKSrch+jePUkLzM3bWdx5fbK5b4o2nYW +Xp9mmv8bABlmMr5PDd6/G9y5HTBeImUe7v6a4EtFnF3LnBY0Nkmh9QGq +=4ul6 +-----END PGP PUBLIC KEY BLOCK----- KEYFILE fi From 001950cb9faba89d75eac181348419cebcd747c2 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Wed, 9 Oct 2013 11:15:24 +0100 Subject: [PATCH 0511/1125] Added Ocaml compiler repos --- pbuilderrc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index 7df6ecf3..d37e49f0 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,5 +1,5 @@ MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe" +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main|deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 31ce3882955c742c4b98432fb2dcc3173e5e26cb Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Wed, 9 Oct 2013 11:16:38 +0100 Subject: [PATCH 0512/1125] Break long line, so that humans can read it --- pbuilderrc.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index d37e49f0..3fff575a 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,5 +1,9 @@ MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe|deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main|deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main" +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ +|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main\ +|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe\ +|deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main\ +|deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 55ed195cd1ca1fe55cb42608710f7dc396da87b6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 9 Oct 2013 15:04:55 +0100 Subject: [PATCH 0513/1125] makemake: Account for package mapping when generating dependencies This change handles Debian-only dependencies which are added by the package name mapping. Signed-off-by: Euan Harris --- makemake.py | 28 ++++++++++++++++++---------- scripts/mappkgname.py | 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/makemake.py b/makemake.py index 335b15ee..db0e3d70 100755 --- a/makemake.py +++ b/makemake.py @@ -27,6 +27,13 @@ def buildType(): elif distribution in rhel_like: return "rpm" +def map_package_name(name): + if buildType() == "rpm": + return [name] + else: + return mappkgname.map_package(name) + + # for debugging, make all paths relative to PWD rpm.addMacro( '_topdir', '.' ) @@ -92,10 +99,7 @@ def specFromFile( spec ): def srpmNameFromSpec( spec ): h = spec.sourceHeader - if buildType() == "rpm": - rpm.addMacro( 'NAME', h['name'] ) - else: - rpm.addMacro( 'NAME', mappkgname.map_package(h['name'])[0] ) + rpm.addMacro('NAME', map_package_name(h['name'])[0]) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) rpm.addMacro( 'ARCH', 'src' ) @@ -120,10 +124,7 @@ def srpmNameFromSpec( spec ): def rpmNamesFromSpec( spec ): def rpmNameFromHeader( h ): - if buildType() == "rpm": - rpm.addMacro( 'NAME', h['name'] ) - else: - rpm.addMacro( 'NAME', mappkgname.map_package_name(h) ) + rpm.addMacro('NAME', map_package_name(h['name'])[0]) rpm.addMacro( 'VERSION', h['version'] ) rpm.addMacro( 'RELEASE', h['release'] ) if buildType() == "rpm": @@ -234,13 +235,20 @@ def rpmNameFromHeader( h ): # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec +def flatten(lst): + res = [] + for li in lst: + res += li + return res + def buildRequiresFromSpec( spec ): - return spec.sourceHeader['requires'] + reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] + return set(flatten(reqs)) provides_to_rpm = {} for specname, spec in specs.iteritems(): for package in spec.packages: - for provided in (package.header['provides'] + [package.header['name']]): + for provided in set(flatten([map_package_name(r) for r in (package.header['provides'] + [package.header['name']])])): for rpmname in rpmNamesFromSpec( spec ): provides_to_rpm[ provided ] = rpmname diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 679aff72..886b26f0 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -89,6 +89,7 @@ "xenserver-tech-preview-release": ["xenserver-tech-preview-release"], "xmlm": ["libxmlm-ocaml"], "xsconsole": ["xsconsole"], + "xsconsole0": ["xsconsole"], "xsiostat": ["xsiostat"], "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], "python-setuptools": ["python-setuptools"], From d18eb76e240229d3d9ef0ae609aa49d3e24b0bdc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 9 Oct 2013 16:09:16 +0100 Subject: [PATCH 0514/1125] pbuilder: Remove avsm OCaml repository It doesn't have ocamlfind, and causes conflicts with the OCamlPro repository, which does have it. Signed-off-by: Euan Harris --- pbuilderrc.in | 1 - 1 file changed, 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index 3fff575a..0968c594 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -2,7 +2,6 @@ MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main\ |deb http://gb.archive.ubuntu.com/ubuntu/ raring universe\ -|deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main\ |deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From 217e95e7cc7a4a24062eed47065fec6a6a22e320 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 9 Oct 2013 16:45:31 +0100 Subject: [PATCH 0515/1125] ocaml-xenops: Add ocaml-xcp-idl-devel build dependency Signed-off-by: Euan Harris --- SPECS/ocaml-xenops.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 72be2934..8bfec360 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -11,7 +11,7 @@ Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel ocaml-oclock-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel ocaml-oclock-devel ocaml-xcp-idl-devel Requires: ocaml ocaml-findlib %description From b9c3ae9a5fa62ebcddefa5a05c8c706a87ecac69 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 9 Oct 2013 16:48:42 +0100 Subject: [PATCH 0516/1125] scripts: Add script to log into pbuilder chroot Signed-off-by: Euan Harris --- scripts/pbuilder-login.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 scripts/pbuilder-login.sh diff --git a/scripts/pbuilder-login.sh b/scripts/pbuilder-login.sh new file mode 100755 index 00000000..4fa88cbb --- /dev/null +++ b/scripts/pbuilder-login.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo pbuilder --login --configfile pbuilder/pbuilderrc-raring-amd64 From de99e05d66157cc9aff1f50f43117c044c9b7f2e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Oct 2013 09:46:25 +0100 Subject: [PATCH 0517/1125] pbuilder: Remove avsm's deb-src, too Signed-off-by: Euan Harris --- pbuilderrc.in | 1 - 1 file changed, 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index 0968c594..a5552347 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -2,7 +2,6 @@ MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main\ |deb http://gb.archive.ubuntu.com/ubuntu/ raring universe\ -|deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 8f02fba0414dcaf56c44c9118487ba775f1eb61e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Oct 2013 10:41:29 +0100 Subject: [PATCH 0518/1125] pbuilder: Fix typo in pbuilderrc Signed-off-by: Euan Harris --- pbuilderrc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilderrc.in b/pbuilderrc.in index a5552347..e33228f6 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -1,7 +1,7 @@ MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main\ -|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe\ +|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" From 0b37fa33484e3ec83e06fa8a778b907688a6861e Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Thu, 10 Oct 2013 13:16:38 +0100 Subject: [PATCH 0519/1125] Only attempt to install packages if they are not present --- configure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.sh b/configure.sh index 5c96e2c8..ed61f977 100755 --- a/configure.sh +++ b/configure.sh @@ -5,7 +5,7 @@ if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" ] ; then echo "Configuring RPM-based build" - sudo yum install mock rpm-build + rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build echo -n "Writing mock configuration..." mkdir -p mock @@ -28,7 +28,7 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then DIST=raring BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz - sudo apt-get install pbuilder python-rpm curl + dpkg -l pbuilder python-rpm curl > /dev/null 2>&1 || sudo apt-get install pbuilder python-rpm curl mkdir -p BUILD echo -n "Writing pbuilder configuration..." From 7f5989e841999340f4b7a4c9868dc1db92130810 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Oct 2013 13:26:31 +0100 Subject: [PATCH 0520/1125] mappkgname: Drop architecture annotations when mapping package names Signed-off-by: Euan Harris --- scripts/mappkgname.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 886b26f0..2a5baf37 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -165,6 +165,10 @@ def map_package(name): """map an rpm to a corresponding deb, based on file contents""" is_devel = False + + # RPM 4.6 adds architecture constraints to dependencies. Drop them. + if name.endswith( "(x86-64)" ): + name = name[ :-len("(x86-64)") ] if name.endswith( "-devel" ): is_devel = True name = name[ :-len("-devel") ] From 9f3565c126cfb8f8594dda6c08838bf4a8912c46 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Oct 2013 17:09:18 +0100 Subject: [PATCH 0521/1125] configure: Install ocaml to work around spec files which build opt targets conditionally makedeb.py expands the spec file %build recipe on the host, not in a chroot. The opt target in the %build recipe of some spec files, such as ocaml-libvirt, is conditional on the existence of %{_bindir}/ocamlopt. If ocaml isn't installed on the host, the opt target won't be included, even though ocamlopt is available in the chroot. Installing ocaml on the build host is a quick workaround; the proper fix is either to override the check for %{_bindir}/ocamlopt in the spec file (harder than you might think to do this neatly) or to run makedeb in the chroot (slow, but accurate). Signed-off-by: Euan Harris --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index ed61f977..d6e357bb 100755 --- a/configure.sh +++ b/configure.sh @@ -28,7 +28,7 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then DIST=raring BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz - dpkg -l pbuilder python-rpm curl > /dev/null 2>&1 || sudo apt-get install pbuilder python-rpm curl + dpkg -l pbuilder python-rpm curl ocaml-nox > /dev/null 2>&1 || sudo apt-get install pbuilder python-rpm curl ocaml-nox mkdir -p BUILD echo -n "Writing pbuilder configuration..." From 0a60c3d085e1f165b3c588025f2811c0af4376b0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Oct 2013 18:19:46 +0100 Subject: [PATCH 0522/1125] mappkgname: Install python-setuptools-git along with python-setuptools on Ubuntu Needed for openstack-xapi-plugins. Signed-off-by: Euan Harris --- scripts/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index 2a5baf37..e64da0c7 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -92,7 +92,7 @@ "xsconsole0": ["xsconsole"], "xsiostat": ["xsiostat"], "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], - "python-setuptools": ["python-setuptools"], + "python-setuptools": ["python-setuptools", "python-setuptools-git"], "vhd-tool": ["vhd-tool"], # Distribution packages From 5308422a00c8dd6d4bbf7f3aa5b4b77b900e00c6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 11 Oct 2013 17:00:45 +0100 Subject: [PATCH 0523/1125] xapi: Update to 1.9.30 Signed-off-by: Euan Harris --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index eb8a3ed5..bec94b72 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.29 +Version: 1.9.30 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Oct 11 2013 Euan Harris - 1.9.30-1 +- Update to 1.9.30 - assume dom0 can be ballooned in all memory calculations. + * Fri Sep 27 2013 David Scott - 1.9.29-1 - Update to 1.9.29 From 5d3e33fb8bbe0b4d62928e0313193cd7a891117a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 09:38:17 +0100 Subject: [PATCH 0524/1125] ocaml-syslog: Remove package This package is unmaintained and we no longer need it. Originally it came from Godi, which is gone; for a while we got it from OPAM's archive but it has also been removed from there. Signed-off-by: Euan Harris --- SPECS/ocaml-syslog.spec | 52 ----------------------------------------- scripts/mappkgname.py | 1 - 2 files changed, 53 deletions(-) delete mode 100644 SPECS/ocaml-syslog.spec diff --git a/SPECS/ocaml-syslog.spec b/SPECS/ocaml-syslog.spec deleted file mode 100644 index 4aea78d6..00000000 --- a/SPECS/ocaml-syslog.spec +++ /dev/null @@ -1,52 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-syslog -Version: 1.4 -Release: 7 -Summary: Syslog bindings for OCaml -License: LGPL -Group: Development/Other -URL: http://opam.ocamlpro.com/pkg/syslog.1.4.html -Source0: http://opam.ocamlpro.com/archives/syslog.%{version}+opam.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -Requires: ocaml ocaml-findlib - -%description -Syslog bindings for OCaml. - -%package devel -Summary: Development files for %{name} -Group: Development/Other - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n syslog.%{version} - -%build -make reallyall - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install - -%clean -rm -rf %{buildroot} - -%files -#This space intentionally left blank - -%files devel -%defattr(-,root,root) -%doc Changelog -%{_libdir}/ocaml/syslog/* - -%changelog -* Thu May 30 2013 David Scott -- Initial package - diff --git a/scripts/mappkgname.py b/scripts/mappkgname.py index e64da0c7..3fc8ddf6 100755 --- a/scripts/mappkgname.py +++ b/scripts/mappkgname.py @@ -44,7 +44,6 @@ "ocaml-sexplib": ["libsexplib-camlp4"], "ocaml-ssl": ["libssl-ocaml"], "ocaml-stdext": ["libstdext-ocaml"], - "ocaml-syslog": ["libsyslog-ocaml"], "ocaml-tapctl": ["libtapctl-ocaml"], "ocaml-text": ["libtext-ocaml"], "ocaml-type-conv": ["libtype-conv-camlp4"], From c9eba12fe627c0195e7f695b74de53cb42ab7bb4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 14:36:40 +0100 Subject: [PATCH 0525/1125] debian: Don't waste time regenerating the manpage database By default, APT regenerates the manual page database after installing packages. This happens for every build and takes several seconds, so skipping it should save quite a lot of time. Signed-off-by: Euan Harris --- D05deps.in | 3 +++ D10mandb | 7 +++++++ configure.sh | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 D10mandb diff --git a/D05deps.in b/D05deps.in index 8f939347..8be9d93f 100644 --- a/D05deps.in +++ b/D05deps.in @@ -1,4 +1,7 @@ #!/bin/sh + +echo "I: Updating Packages file" (cd @PWD@/RPMS; apt-ftparchive packages . > Packages) +echo "I: Updating Sources file" (cd @PWD@/SRPMS; apt-ftparchive sources . > Sources) apt-get update diff --git a/D10mandb b/D10mandb new file mode 100644 index 00000000..f75dbc3e --- /dev/null +++ b/D10mandb @@ -0,0 +1,7 @@ +#!/bin/sh +# Don't rebuild man-db + +echo "I: Preseed man-db/auto-update to false" +debconf-set-selections < pbuilder/pbuilderrc-$DIST-$ARCH sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps chmod 755 pbuilder/D05deps + cp D10mandb pbuilder/D10mandb + chmod 755 pbuilder/D10mandb echo " done" echo -n "Initializing repository..." From 57cf92c7ff1aa457bf08634ece4ab13db67f3242 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 14:46:39 +0100 Subject: [PATCH 0526/1125] debian/configure: Remove Packages and Sources files if they exist Signed-off-by: Euan Harris --- configure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.sh b/configure.sh index 79341cef..70192387 100755 --- a/configure.sh +++ b/configure.sh @@ -42,8 +42,8 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then echo -n "Initializing repository..." mkdir -p RPMS SRPMS - (cd RPMS; apt-ftparchive packages . > Packages) - (cd SRPMS; apt-ftparchive sources . > Sources) + (cd RPMS; rm -f Packages; apt-ftparchive packages . > Packages) + (cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) echo " done" if [ -f $BASETGZ ] ; then From a2345eba9c2b85333fcd2f502891611487899813 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 16:42:21 +0100 Subject: [PATCH 0527/1125] debian: Switch from pbuilder to cowbuilder For each package it builds, pbuilder creates a new chroot by unpacking a tarball. cowbuilder is a wrapper around pbuilder that creates copy-on-write chroot directories, avoiding the need to unpack the tarball. Although unpacking the tarball isn't extremely slow, this change should give us back a few seconds per package. Signed-off-by: Euan Harris --- configure.sh | 16 ++++++++-------- makemake.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configure.sh b/configure.sh index 70192387..250a362a 100755 --- a/configure.sh +++ b/configure.sh @@ -26,9 +26,9 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then ARCH=amd64 DIST=raring - BASETGZ=/var/cache/pbuilder/base-$DIST-$ARCH.tgz + BASEDIR=/var/cache/pbuilder/base-$DIST-$ARCH.cow - dpkg -l pbuilder python-rpm curl ocaml-nox > /dev/null 2>&1 || sudo apt-get install pbuilder python-rpm curl ocaml-nox + dpkg -l pbuilder cowbuilder python-rpm curl ocaml-nox > /dev/null 2>&1 || sudo apt-get install pbuilder cowbuilder python-rpm curl ocaml-nox mkdir -p BUILD echo -n "Writing pbuilder configuration..." @@ -46,14 +46,14 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then (cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) echo " done" - if [ -f $BASETGZ ] ; then - echo $BASETGZ exists - updating - sudo pbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + if [ -f $BASEDIR ] ; then + echo $BASEDIR exists - updating + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH else echo $BASETGZ does not exist - creating - sudo pbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH # inject Keyfile for Launchpad PPA for Louis Gesbert - sudo pbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 Comment: Hostname: keyserver.ubuntu.com @@ -69,7 +69,7 @@ KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= -----END PGP PUBLIC KEY BLOCK----- KEYFILE # inject Keyfile for Launchpad PPA for Anil Madhavapeddy - sudo pbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 Comment: Hostname: keyserver.ubuntu.com diff --git a/makemake.py b/makemake.py index db0e3d70..4e0062b1 100755 --- a/makemake.py +++ b/makemake.py @@ -230,8 +230,8 @@ def rpmNameFromHeader( h ): print '\t@createrepo --quiet --update %s' % rpm_dir else: - print '\t@echo [PBUILDER] $@' - print '\tsudo pbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir + print '\t@echo [COWBUILDER] $@' + print '\tsudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec From d6620b383481682bce513caf891983331193fd9c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 16:54:39 +0100 Subject: [PATCH 0528/1125] debian: Fix leftover references to BASETGZ Signed-off-by: Euan Harris --- configure.sh | 4 ++-- pbuilderrc.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.sh b/configure.sh index 250a362a..51152741 100755 --- a/configure.sh +++ b/configure.sh @@ -33,7 +33,7 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then echo -n "Writing pbuilder configuration..." mkdir -p pbuilder - sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASETGZ@|$BASETGZ|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH + sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEDIR@|$BASEDIR|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps chmod 755 pbuilder/D05deps cp D10mandb pbuilder/D10mandb @@ -50,7 +50,7 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then echo $BASEDIR exists - updating sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH else - echo $BASETGZ does not exist - creating + echo $BASEDIR does not exist - creating sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH # inject Keyfile for Launchpad PPA for Louis Gesbert sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE diff --git a/pbuilderrc.in b/pbuilderrc.in index e33228f6..729db1eb 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -10,4 +10,4 @@ DISTRIBUTION=@DIST@ # Architecture specific settings ARCHITECTURE=@ARCH@ -BASETGZ=@BASETGZ@ +BASEDIR=@BASEDIR@ From d2ef76e66c6d340d3c68464fd69a0d358dbe5d94 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 15 Oct 2013 18:21:09 +0100 Subject: [PATCH 0529/1125] debian: cowbuilder doesn't seem to honour EXTRAPACKAGES with --create cowbuilder --create seems to ignore the EXTRAPACKAGES configuration option. cowbuilder --update doesn't, so we run --update after --create to make sure apt-utils is installed in the chroot. This seems like a bug, either in cowbuilder or in the way we are using it. Signed-off-by: Euan Harris --- configure.sh | 13 +++++++------ pbuilderrc.in | 2 +- scripts/pbuilder-login.sh | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.sh b/configure.sh index 51152741..ed8375e9 100755 --- a/configure.sh +++ b/configure.sh @@ -26,14 +26,14 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then ARCH=amd64 DIST=raring - BASEDIR=/var/cache/pbuilder/base-$DIST-$ARCH.cow + BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow - dpkg -l pbuilder cowbuilder python-rpm curl ocaml-nox > /dev/null 2>&1 || sudo apt-get install pbuilder cowbuilder python-rpm curl ocaml-nox + dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils > /dev/null 2>&1 || sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils mkdir -p BUILD echo -n "Writing pbuilder configuration..." mkdir -p pbuilder - sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEDIR@|$BASEDIR|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH + sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps chmod 755 pbuilder/D05deps cp D10mandb pbuilder/D10mandb @@ -46,12 +46,13 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then (cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) echo " done" - if [ -f $BASEDIR ] ; then - echo $BASEDIR exists - updating + if [ -e $BASEPATH ] ; then + echo $BASEPATH exists - updating sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH else - echo $BASEDIR does not exist - creating + echo $BASEPATH does not exist - creating sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH # inject Keyfile for Launchpad PPA for Louis Gesbert sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE -----BEGIN PGP PUBLIC KEY BLOCK----- diff --git a/pbuilderrc.in b/pbuilderrc.in index 729db1eb..81b12ab2 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -10,4 +10,4 @@ DISTRIBUTION=@DIST@ # Architecture specific settings ARCHITECTURE=@ARCH@ -BASEDIR=@BASEDIR@ +BASEPATH=@BASEPATH@ diff --git a/scripts/pbuilder-login.sh b/scripts/pbuilder-login.sh index 4fa88cbb..bff13b93 100755 --- a/scripts/pbuilder-login.sh +++ b/scripts/pbuilder-login.sh @@ -1,3 +1,3 @@ #!/bin/bash -sudo pbuilder --login --configfile pbuilder/pbuilderrc-raring-amd64 +sudo cowbuilder --login --configfile pbuilder/pbuilderrc-raring-amd64 From 53b446704fc2316753e8799e0102e053f53b4ce6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Oct 2013 09:58:28 +0100 Subject: [PATCH 0530/1125] debian: Prevent apt from calling fsync after each package installation This should speed up the installation of build prerequisites. https://wiki.ubuntu.com/PbuilderHowto#dpkg_setting Signed-off-by: Euan Harris --- D15nofsync | 5 +++++ configure.sh | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 D15nofsync diff --git a/D15nofsync b/D15nofsync new file mode 100644 index 00000000..6ec0746d --- /dev/null +++ b/D15nofsync @@ -0,0 +1,5 @@ +#!/bin/sh +# Stop apt from calling fsync for each package + +echo "I: Stop apt from calling fsync for each package" +echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup diff --git a/configure.sh b/configure.sh index ed8375e9..96929579 100755 --- a/configure.sh +++ b/configure.sh @@ -38,6 +38,8 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then chmod 755 pbuilder/D05deps cp D10mandb pbuilder/D10mandb chmod 755 pbuilder/D10mandb + cp D15nofsync pbuilder/D15nofsync + chmod 755 pbuilder/D15nofsync echo " done" echo -n "Initializing repository..." From 65f755cea847c67a1ab9b311cdc7c28a140f2072 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Oct 2013 10:35:24 +0100 Subject: [PATCH 0531/1125] debian: Switch to gdebi dependency resolver This should be faster than apt: https://wiki.ubuntu.com/PbuilderHowto#Speeding_up_build-dependency_calculation Signed-off-by: Euan Harris --- configure.sh | 3 ++- pbuilderrc.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 96929579..c173fb03 100755 --- a/configure.sh +++ b/configure.sh @@ -28,7 +28,8 @@ elif [ `lsb_release -si` == "Ubuntu" ] ; then DIST=raring BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow - dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils > /dev/null 2>&1 || sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils + dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core > /dev/null 2>&1 || \ + sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core mkdir -p BUILD echo -n "Writing pbuilder configuration..." diff --git a/pbuilderrc.in b/pbuilderrc.in index 81b12ab2..ad163863 100644 --- a/pbuilderrc.in +++ b/pbuilderrc.in @@ -7,6 +7,7 @@ HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" ALLOWUNTRUSTED=yes DISTRIBUTION=@DIST@ +PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-gdebi" # Architecture specific settings ARCHITECTURE=@ARCH@ From ef91610935380f393b9a47e5af4eab69aba24a2c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Oct 2013 15:15:05 +0100 Subject: [PATCH 0532/1125] ocaml-camomile: Update to 0.8.5 Ubuntu insists on installing its v0.8.4 package ahead of our v0.8.3 one. 0.8.5 is the latest version, so if we update to that we will trump Ubuntu's version. Signed-off-by: Euan Harris --- SPECS/ocaml-camomile.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-camomile.spec b/SPECS/ocaml-camomile.spec index efadb5e9..53975c12 100644 --- a/SPECS/ocaml-camomile.spec +++ b/SPECS/ocaml-camomile.spec @@ -2,8 +2,8 @@ %global debug_package %{nil} Name: ocaml-camomile -Version: 0.8.3 -Release: 10%{?dist} +Version: 0.8.5 +Release: 1%{?dist} Summary: Unicode library for OCaml # Several files are MIT and UCD licensed, but the overall work is LGPLv2+ @@ -11,7 +11,7 @@ Summary: Unicode library for OCaml # https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html License: LGPLv2+ URL: http://sourceforge.net/projects/camomile/ -Source0: http://downloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 +Source0: https://github.com/yoriyuki/Camomile/releases/download/rel-%{version}/camomile-%{version}.tar.bz2 ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.12.1-12 @@ -105,6 +105,9 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %changelog +* Wed Oct 16 2013 Euan Harris - 0.8.5-1 +- Update to 0.8.5 + * Fri Oct 19 2012 Richard W.M. Jones - 0.8.3-10 - Rebuild for OCaml 4.00.1. - Clean up the spec file. From c1ff17424f99894d517f445753aeff20e9e62bb3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 15:14:30 +0100 Subject: [PATCH 0533/1125] debian: Move Debian packaging Python code into a lib directory Signed-off-by: Euan Harris --- scripts/{ => lib}/debianchangelog.py | 0 scripts/{ => lib}/debiancontrol.py | 0 scripts/{ => lib}/debianmisc.py | 0 scripts/{ => lib}/debianrules.py | 0 scripts/{ => lib}/mappkgname.py | 0 scripts/{ => lib}/rpmextra.py | 0 scripts/{ => lib}/tree.py | 0 scripts/makedeb.py | 8 ++++++-- 8 files changed, 6 insertions(+), 2 deletions(-) rename scripts/{ => lib}/debianchangelog.py (100%) rename scripts/{ => lib}/debiancontrol.py (100%) rename scripts/{ => lib}/debianmisc.py (100%) rename scripts/{ => lib}/debianrules.py (100%) rename scripts/{ => lib}/mappkgname.py (100%) rename scripts/{ => lib}/rpmextra.py (100%) rename scripts/{ => lib}/tree.py (100%) diff --git a/scripts/debianchangelog.py b/scripts/lib/debianchangelog.py similarity index 100% rename from scripts/debianchangelog.py rename to scripts/lib/debianchangelog.py diff --git a/scripts/debiancontrol.py b/scripts/lib/debiancontrol.py similarity index 100% rename from scripts/debiancontrol.py rename to scripts/lib/debiancontrol.py diff --git a/scripts/debianmisc.py b/scripts/lib/debianmisc.py similarity index 100% rename from scripts/debianmisc.py rename to scripts/lib/debianmisc.py diff --git a/scripts/debianrules.py b/scripts/lib/debianrules.py similarity index 100% rename from scripts/debianrules.py rename to scripts/lib/debianrules.py diff --git a/scripts/mappkgname.py b/scripts/lib/mappkgname.py similarity index 100% rename from scripts/mappkgname.py rename to scripts/lib/mappkgname.py diff --git a/scripts/rpmextra.py b/scripts/lib/rpmextra.py similarity index 100% rename from scripts/rpmextra.py rename to scripts/lib/rpmextra.py diff --git a/scripts/tree.py b/scripts/lib/tree.py similarity index 100% rename from scripts/tree.py rename to scripts/lib/tree.py diff --git a/scripts/makedeb.py b/scripts/makedeb.py index 792f7fcf..4ade47e9 100755 --- a/scripts/makedeb.py +++ b/scripts/makedeb.py @@ -1,19 +1,23 @@ #!/usr/bin/python import glob -import mappkgname import os import re import rpm -import rpmextra import shutil import subprocess import sys +SCRIPTDIR=os.path.dirname(os.path.abspath(__file__)) +LIBDIR=os.path.normpath(os.path.join(SCRIPTDIR, "lib")) +sys.path.append(LIBDIR) + import debianchangelog import debiancontrol import debianmisc import debianrules +import mappkgname +import rpmextra # BUGS: # Hack to disable CFLAGS for ocaml-oclock From ce6cb693af15df7566ef668d83d1daddcf343b7a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 15:16:42 +0100 Subject: [PATCH 0534/1125] debian: Move Debian-specific scripts into scripts/deb Signed-off-by: Euan Harris --- makemake.py | 2 +- scripts/{ => deb}/apt-ftparchive.conf | 0 scripts/{ => deb}/apt-raring-release.conf | 0 scripts/{ => deb}/archive.conf | 0 scripts/{ => deb}/makedeb.py | 2 +- scripts/{ => deb}/pbuilder-login.sh | 0 scripts/{ => deb}/update-debian-dist.sh | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename scripts/{ => deb}/apt-ftparchive.conf (100%) rename scripts/{ => deb}/apt-raring-release.conf (100%) rename scripts/{ => deb}/archive.conf (100%) rename scripts/{ => deb}/makedeb.py (99%) rename scripts/{ => deb}/pbuilder-login.sh (100%) rename scripts/{ => deb}/update-debian-dist.sh (100%) diff --git a/makemake.py b/makemake.py index 4e0062b1..94bcc90a 100755 --- a/makemake.py +++ b/makemake.py @@ -171,7 +171,7 @@ def rpmNameFromHeader( h ): print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' else: print '\t@echo [MAKEDEB] $@' - print '\tscripts/makedeb.py $<' + print '\tscripts/deb/makedeb.py $<' # Rules to download sources diff --git a/scripts/apt-ftparchive.conf b/scripts/deb/apt-ftparchive.conf similarity index 100% rename from scripts/apt-ftparchive.conf rename to scripts/deb/apt-ftparchive.conf diff --git a/scripts/apt-raring-release.conf b/scripts/deb/apt-raring-release.conf similarity index 100% rename from scripts/apt-raring-release.conf rename to scripts/deb/apt-raring-release.conf diff --git a/scripts/archive.conf b/scripts/deb/archive.conf similarity index 100% rename from scripts/archive.conf rename to scripts/deb/archive.conf diff --git a/scripts/makedeb.py b/scripts/deb/makedeb.py similarity index 99% rename from scripts/makedeb.py rename to scripts/deb/makedeb.py index 4ade47e9..614ed3ef 100755 --- a/scripts/makedeb.py +++ b/scripts/deb/makedeb.py @@ -9,7 +9,7 @@ import sys SCRIPTDIR=os.path.dirname(os.path.abspath(__file__)) -LIBDIR=os.path.normpath(os.path.join(SCRIPTDIR, "lib")) +LIBDIR=os.path.normpath(os.path.join(SCRIPTDIR, "../lib")) sys.path.append(LIBDIR) import debianchangelog diff --git a/scripts/pbuilder-login.sh b/scripts/deb/pbuilder-login.sh similarity index 100% rename from scripts/pbuilder-login.sh rename to scripts/deb/pbuilder-login.sh diff --git a/scripts/update-debian-dist.sh b/scripts/deb/update-debian-dist.sh similarity index 100% rename from scripts/update-debian-dist.sh rename to scripts/deb/update-debian-dist.sh From 83a61289ea7e095e7275bdaa7903efc081aa0d80 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 16:02:19 +0100 Subject: [PATCH 0535/1125] configure: Split out RPM and DEB configure scripts Signed-off-by: Euan Harris --- configure.sh | 93 ++-------------------------------------- scripts/deb/configure.sh | 73 +++++++++++++++++++++++++++++++ scripts/rpm/configure.sh | 21 +++++++++ 3 files changed, 97 insertions(+), 90 deletions(-) create mode 100755 scripts/deb/configure.sh create mode 100755 scripts/rpm/configure.sh diff --git a/configure.sh b/configure.sh index c173fb03..fd287bb7 100755 --- a/configure.sh +++ b/configure.sh @@ -2,95 +2,8 @@ set -eu if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" ] ; then + . scripts/rpm/configure.sh - echo "Configuring RPM-based build" - - rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build - - echo -n "Writing mock configuration..." - mkdir -p mock - sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg - ln -fs /etc/mock/default.cfg mock/ - ln -fs /etc/mock/site-defaults.cfg mock/ - ln -fs /etc/mock/logging.ini mock/ - echo " done" - - echo -n "Initializing repository..." - mkdir -p RPMS - createrepo --quiet RPMS - echo " done" - -elif [ `lsb_release -si` == "Ubuntu" ] ; then - - echo "Configuring DEB-based build" - - ARCH=amd64 - DIST=raring - BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow - - dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core > /dev/null 2>&1 || \ - sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core - mkdir -p BUILD - - echo -n "Writing pbuilder configuration..." - mkdir -p pbuilder - sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH - sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps - chmod 755 pbuilder/D05deps - cp D10mandb pbuilder/D10mandb - chmod 755 pbuilder/D10mandb - cp D15nofsync pbuilder/D15nofsync - chmod 755 pbuilder/D15nofsync - echo " done" - - echo -n "Initializing repository..." - mkdir -p RPMS SRPMS - (cd RPMS; rm -f Packages; apt-ftparchive packages . > Packages) - (cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) - echo " done" - - if [ -e $BASEPATH ] ; then - echo $BASEPATH exists - updating - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH - else - echo $BASEPATH does not exist - creating - sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH - # inject Keyfile for Launchpad PPA for Louis Gesbert - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.1.4 -Comment: Hostname: keyserver.ubuntu.com - -mI0EUgJE5QEEANHD2l6yuvqffhqTcJd4nOQVax6m9i4SKb/IpXqOh40PYzG17bc0rbGaM7CU -+nD9vDAtP6Wjjc5aatMyYOQ1aPzAmPtFfvjg9NyR88r9GK7G8sR6N2YzarUblrxI0yEmfc9X -409JOejfgv7s1D/Jmsoo5GqYQihXiSBS7juJk6ihABEBAAG0H0xhdW5jaHBhZCBQUEEgZm9y -IExvdWlzIEdlc2JlcnSIuAQTAQIAIgUCUgJE5QIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC -F4AACgkQrWm///0xBNZrugQAqEz0xu6FmNSvCtn9vVghI8/UAoYla87qHSjEY1gmQ9oC4/0Y -hPh2pBmI475HlPvESksjApsUHh9ksc9SkLiNS9rPE5rFp/gEDjFA6arFcaPcNmAu51x3lDfh -KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= -=ZOqF ------END PGP PUBLIC KEY BLOCK----- -KEYFILE - # inject Keyfile for Launchpad PPA for Anil Madhavapeddy - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.1.4 -Comment: Hostname: keyserver.ubuntu.com - -mI0EUd0+wQEEAMOeX/cGrgub9dEn9xjViAQub7w94JhGYKEpS2w79N3nQKA5NLBxpwvwH9xb -R7tjVJ11g/feZ+xKkbtcDNHc+BW8IpKf4x7qPy1JrDZ0c8KQhGA6TJY61Wgg4Rwzzi9l1n7L -G+EkIPotbHY0D27zqzFqwIKj+SbJFPZ9Ty1Z2VCLABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y -IEFuaWwgTWFkaGF2YXBlZGR5iLgEEwECACIFAlHdPsECGwMGCwkIBwMCBhUIAgkKCwQWAgMB -Ah4BAheAAAoJEFstDFVhcHsJryAD/01EFC2zz8LjmEvJX3hPBkkDipD+NCPsuxe78H1QR7AV -MLzqar1aYcQk/zVUGJDdIcbJnHJ2OnyeeJ0wOVOmJKSrch+jePUkLzM3bWdx5fbK5b4o2nYW -Xp9mmv8bABlmMr5PDd6/G9y5HTBeImUe7v6a4EtFnF3LnBY0Nkmh9QGq -=4ul6 ------END PGP PUBLIC KEY BLOCK----- -KEYFILE - - fi - - echo " done" - +elif [ `lsb_release -si` == "Ubuntu" -o `lsb_release -si` == "Debian" ] ; then + . scripts/deb/configure.sh fi diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh new file mode 100755 index 00000000..dccd8511 --- /dev/null +++ b/scripts/deb/configure.sh @@ -0,0 +1,73 @@ +#!/bin/bash +set -eu + +echo "Configuring DEB-based build" + +ARCH=amd64 +DIST=raring +BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow + +dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core > /dev/null 2>&1 || \ + sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core +mkdir -p BUILD + +echo -n "Writing pbuilder configuration..." +mkdir -p pbuilder +sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH +sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps +chmod 755 pbuilder/D05deps +cp D10mandb pbuilder/D10mandb +chmod 755 pbuilder/D10mandb +cp D15nofsync pbuilder/D15nofsync +chmod 755 pbuilder/D15nofsync +echo " done" + +echo -n "Initializing repository..." +mkdir -p RPMS SRPMS +(cd RPMS; rm -f Packages; apt-ftparchive packages . > Packages) +(cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) +echo " done" + +if [ -e $BASEPATH ] ; then + echo $BASEPATH exists - updating + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH +else + echo $BASEPATH does not exist - creating + sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + # inject Keyfile for Launchpad PPA for Louis Gesbert + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: SKS 1.1.4 +Comment: Hostname: keyserver.ubuntu.com + +mI0EUgJE5QEEANHD2l6yuvqffhqTcJd4nOQVax6m9i4SKb/IpXqOh40PYzG17bc0rbGaM7CU ++nD9vDAtP6Wjjc5aatMyYOQ1aPzAmPtFfvjg9NyR88r9GK7G8sR6N2YzarUblrxI0yEmfc9X +409JOejfgv7s1D/Jmsoo5GqYQihXiSBS7juJk6ihABEBAAG0H0xhdW5jaHBhZCBQUEEgZm9y +IExvdWlzIEdlc2JlcnSIuAQTAQIAIgUCUgJE5QIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC +F4AACgkQrWm///0xBNZrugQAqEz0xu6FmNSvCtn9vVghI8/UAoYla87qHSjEY1gmQ9oC4/0Y +hPh2pBmI475HlPvESksjApsUHh9ksc9SkLiNS9rPE5rFp/gEDjFA6arFcaPcNmAu51x3lDfh +KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= +=ZOqF +-----END PGP PUBLIC KEY BLOCK----- +KEYFILE + # inject Keyfile for Launchpad PPA for Anil Madhavapeddy + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: SKS 1.1.4 +Comment: Hostname: keyserver.ubuntu.com + +mI0EUd0+wQEEAMOeX/cGrgub9dEn9xjViAQub7w94JhGYKEpS2w79N3nQKA5NLBxpwvwH9xb +R7tjVJ11g/feZ+xKkbtcDNHc+BW8IpKf4x7qPy1JrDZ0c8KQhGA6TJY61Wgg4Rwzzi9l1n7L +G+EkIPotbHY0D27zqzFqwIKj+SbJFPZ9Ty1Z2VCLABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y +IEFuaWwgTWFkaGF2YXBlZGR5iLgEEwECACIFAlHdPsECGwMGCwkIBwMCBhUIAgkKCwQWAgMB +Ah4BAheAAAoJEFstDFVhcHsJryAD/01EFC2zz8LjmEvJX3hPBkkDipD+NCPsuxe78H1QR7AV +MLzqar1aYcQk/zVUGJDdIcbJnHJ2OnyeeJ0wOVOmJKSrch+jePUkLzM3bWdx5fbK5b4o2nYW +Xp9mmv8bABlmMr5PDd6/G9y5HTBeImUe7v6a4EtFnF3LnBY0Nkmh9QGq +=4ul6 +-----END PGP PUBLIC KEY BLOCK----- +KEYFILE + +fi +echo " done" + diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh new file mode 100755 index 00000000..3cb5a288 --- /dev/null +++ b/scripts/rpm/configure.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eu + +echo "Configuring RPM-based build" + +rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build + +echo -n "Writing mock configuration..." +mkdir -p mock +sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg +ln -fs /etc/mock/default.cfg mock/ +ln -fs /etc/mock/site-defaults.cfg mock/ +ln -fs /etc/mock/logging.ini mock/ +echo " done" + +echo -n "Initializing repository..." +mkdir -p RPMS +createrepo --quiet RPMS +mkdir -p SRPMS +echo " done" + From b11dcd17dbee434e58c110ed156269f4e776edf1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 16:04:29 +0100 Subject: [PATCH 0536/1125] makemake: Libraries are now in scripts/libs Signed-off-by: Euan Harris --- makemake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makemake.py b/makemake.py index 94bcc90a..74aede4a 100755 --- a/makemake.py +++ b/makemake.py @@ -3,7 +3,7 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html import sys -sys.path.append("scripts") +sys.path.append("scripts/lib") ignore_list = {"rpm":["libxl-headers","libnl3"], "deb":["libnl3"]} From c87d8ad9e4386c3aecba0ada1ed600188f9c4832 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 16:07:40 +0100 Subject: [PATCH 0537/1125] scripts: Move RPM-specific scripts to scripts/rpm Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 2 +- upload.sh => scripts/rpm/upload.sh | 0 xenserver.cfg.in => scripts/rpm/xenserver.cfg.in | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename upload.sh => scripts/rpm/upload.sh (100%) rename xenserver.cfg.in => scripts/rpm/xenserver.cfg.in (100%) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 3cb5a288..47ff17a4 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -7,7 +7,7 @@ rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build echo -n "Writing mock configuration..." mkdir -p mock -sed "s|@PWD@|$PWD|" xenserver.cfg.in > mock/xenserver.cfg +sed "s|@PWD@|$PWD|" scripts/rpm/xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ diff --git a/upload.sh b/scripts/rpm/upload.sh similarity index 100% rename from upload.sh rename to scripts/rpm/upload.sh diff --git a/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in similarity index 100% rename from xenserver.cfg.in rename to scripts/rpm/xenserver.cfg.in From eac3eb69fce2f2000963ec9f2e462999168c8abb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Oct 2013 16:10:45 +0100 Subject: [PATCH 0538/1125] debian: Move Debian configuration files to scripts/deb Signed-off-by: Euan Harris --- D05deps.in => scripts/deb/D05deps.in | 0 D10mandb => scripts/deb/D10mandb | 0 D15nofsync => scripts/deb/D15nofsync | 0 scripts/deb/configure.sh | 8 ++++---- pbuilderrc.in => scripts/deb/pbuilderrc.in | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename D05deps.in => scripts/deb/D05deps.in (100%) rename D10mandb => scripts/deb/D10mandb (100%) rename D15nofsync => scripts/deb/D15nofsync (100%) rename pbuilderrc.in => scripts/deb/pbuilderrc.in (100%) diff --git a/D05deps.in b/scripts/deb/D05deps.in similarity index 100% rename from D05deps.in rename to scripts/deb/D05deps.in diff --git a/D10mandb b/scripts/deb/D10mandb similarity index 100% rename from D10mandb rename to scripts/deb/D10mandb diff --git a/D15nofsync b/scripts/deb/D15nofsync similarity index 100% rename from D15nofsync rename to scripts/deb/D15nofsync diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index dccd8511..4e6adbeb 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -13,12 +13,12 @@ mkdir -p BUILD echo -n "Writing pbuilder configuration..." mkdir -p pbuilder -sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH -sed -e "s|@PWD@|$PWD|g" D05deps.in > pbuilder/D05deps +sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" scripts/deb/pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH +sed -e "s|@PWD@|$PWD|g" scripts/deb/D05deps.in > pbuilder/D05deps chmod 755 pbuilder/D05deps -cp D10mandb pbuilder/D10mandb +cp scripts/deb/D10mandb pbuilder/D10mandb chmod 755 pbuilder/D10mandb -cp D15nofsync pbuilder/D15nofsync +cp scripts/deb/D15nofsync pbuilder/D15nofsync chmod 755 pbuilder/D15nofsync echo " done" diff --git a/pbuilderrc.in b/scripts/deb/pbuilderrc.in similarity index 100% rename from pbuilderrc.in rename to scripts/deb/pbuilderrc.in From ffc8b6eb195a8ac9abcf6ddcf5d625f821a23b96 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 18 Oct 2013 16:13:38 +0000 Subject: [PATCH 0539/1125] debian: Add make install target This target will configure Apt to install locally-built packages, and install xenserver-core. Signed-off-by: Euan Harris --- makemake.py | 4 ++++ scripts/deb/configure.sh | 4 ++-- scripts/deb/install.sh | 16 ++++++++++++++++ scripts/deb/ocp-ppa.list | 3 +++ scripts/deb/xapi.list.in | 2 ++ scripts/deb/xapi.pref | 4 ++++ 6 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 scripts/deb/install.sh create mode 100644 scripts/deb/ocp-ppa.list create mode 100644 scripts/deb/xapi.list.in create mode 100644 scripts/deb/xapi.pref diff --git a/makemake.py b/makemake.py index 74aede4a..ced14a81 100755 --- a/makemake.py +++ b/makemake.py @@ -276,3 +276,7 @@ def buildRequiresFromSpec( spec ): print "rpms: " + " \\\n\t".join( all_rpms ) print "srpms: " + " \\\n\t".join( all_srpms ) + + +print "install: all" +print "\t. scripts/%s/install.sh" % buildType() diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index 4e6adbeb..e5512cb3 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -7,8 +7,8 @@ ARCH=amd64 DIST=raring BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow -dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core > /dev/null 2>&1 || \ - sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core +dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ + sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common mkdir -p BUILD echo -n "Writing pbuilder configuration..." diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh new file mode 100644 index 00000000..06ab5a6f --- /dev/null +++ b/scripts/deb/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash -x + +# Add the OCaml 4 PPA +install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list + +# Configure the local machine to install packages built in this workspace +sed -e "s,@PWD@,$PWD,g" scripts/deb/xapi.list.in > scripts/deb/xapi.list +install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list + +# Configure apt to prefer packages from the local repository +install -m 0644 scripts/deb/xapi.preference /etc/apt/preferences.d/xapi + +# Install +apt-get update +apt-get install -y xenserver-core + diff --git a/scripts/deb/ocp-ppa.list b/scripts/deb/ocp-ppa.list new file mode 100644 index 00000000..d7f342d6 --- /dev/null +++ b/scripts/deb/ocp-ppa.list @@ -0,0 +1,3 @@ +deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main +deb-src http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main + diff --git a/scripts/deb/xapi.list.in b/scripts/deb/xapi.list.in new file mode 100644 index 00000000..104942d2 --- /dev/null +++ b/scripts/deb/xapi.list.in @@ -0,0 +1,2 @@ +deb file:@PWD@/RPMS/ ./ +deb-src file:@PWD@/SRPMS/ ./ diff --git a/scripts/deb/xapi.pref b/scripts/deb/xapi.pref new file mode 100644 index 00000000..ea045fb7 --- /dev/null +++ b/scripts/deb/xapi.pref @@ -0,0 +1,4 @@ +Package: * +Pin: origin "" +Pin-Priority: 1500 + From b38c4b60bf9cf08901f85c61612daf0963cc892d Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 18:05:35 +0100 Subject: [PATCH 0540/1125] Update message-switch to 0.10.1 Signed-off-by: David Scott --- SPECS/message-switch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 5d80e083..1903428d 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,5 +1,5 @@ Name: message-switch -Version: 0.10.0 +Version: 0.10.1 Release: 1 Summary: A store and forward message switch License: FreeBSD @@ -87,6 +87,9 @@ developing applications that use %{name}. %{_libdir}/ocaml/message_switch/* %changelog +* Fri Oct 18 2013 David Scott +- Update to 0.10.1 which is more tolerant of startup orderings + * Thu May 30 2013 David Scott - Initial package From 629b598a9c8b4fd19d20d434d446c008e746773c Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 18:17:02 +0100 Subject: [PATCH 0541/1125] Add uutf.0.9.3 from xen-dist-ocaml Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 SPECS/ocaml-uutf.spec diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec new file mode 100644 index 00000000..268d38b5 --- /dev/null +++ b/SPECS/ocaml-uutf.spec @@ -0,0 +1,70 @@ +Name: ocaml-uutf +Version: 0.9.3 +Release: 1 +Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE +License: BSD3 +Group: Development/Other +URL: http://erratique.ch/software/uutf +Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-ocamldoc ocaml-findlib +Requires: ocaml + +%description +Uutf is an non-blocking streaming Unicode codec for OCaml to decode and encode the +UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently work +character by character without blocking on IO. Decoders perform character position +tracking and support newline normalization. +. +Functions are also provided to fold over the characters of UTF encoded OCaml string +values and to directly encode characters in OCaml Buffer.t values. +. +Uutf is made of a single, independent, module and distributed under the BSD3 license. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n uutf-%{version} + +%build +./pkg/pkg-git +./pkg/build true + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p %{buildroot}%{_libdir}/ocaml/uutf +ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_libdir}/ocaml/uutf/META +%{_libdir}/ocaml/uutf/uutf.cmi +%{_libdir}/ocaml/uutf/uutf.cma + +%files devel +%defattr(-,root,root) +%{_libdir}/ocaml/uutf/uutf.cmx +%{_libdir}/ocaml/uutf/uutf.cmxa +%{_libdir}/ocaml/uutf/uutf.cmxs +%{_libdir}/ocaml/uutf/uutf.a +%{_libdir}/ocaml/uutf/uutf.mli + + +%changelog +* Fri Oct 18 2013 David Scott 0.9.3-1 +- 'Ported' from xen-dist-ocaml to xenserver-core + +* Fri Oct 11 2013 Jon Ludlam 0.9.3-1 + Initial RPM release + + From 191a0f0b39fa4b496e8541cbece5929ebd1ae6c2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 19:23:06 +0100 Subject: [PATCH 0542/1125] Update xenopsd to 0.9.28 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 22cdd473..ce2262f6 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.27 +Version: 0.9.28 Release: 1 Summary: Simple VM manager License: LGPL @@ -22,6 +22,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel BuildRequires: vncterm eliloader ocaml-xcp-idl-devel +BuildRequires: ocaml-uutf-devel Requires: message-switch xenops-cli redhat-lsb-core %description @@ -182,6 +183,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Oct 18 2013 David Scott +- update to 0.9.28 + * Wed Sep 24 2013 David Scott - modprobe blk{tap,back} in the xenopsd-xc init.d script since we need these to make virtual disks work From 7b211aabe9c0428ebf90a9268d0425d43e65fc7f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 20:10:44 +0100 Subject: [PATCH 0543/1125] Add a mapping for ocaml-uutf Signed-off-by: David Scott --- scripts/lib/mappkgname.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 3fc8ddf6..1885d84c 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -61,6 +61,7 @@ "ocaml-yojson": ["libyojson-ocaml"], "ocaml-zed": ["libzed-ocaml"], "ocaml-vhd": ["vhd-ocaml"], + "ocaml-uutf": ["uutf-ocaml"], "omake": ["omake"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], From 81c87229b1734cf83dce6f1128cd13361fa1a6dd Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 20:14:33 +0100 Subject: [PATCH 0544/1125] Attempt to fix the ocaml-uutf changelog Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 268d38b5..46291e08 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -65,6 +65,4 @@ rm -rf %{buildroot} - 'Ported' from xen-dist-ocaml to xenserver-core * Fri Oct 11 2013 Jon Ludlam 0.9.3-1 - Initial RPM release - - +- Initial RPM release From 3e17df02a8832224e80eba372f47e604669dd856 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 20:43:26 +0100 Subject: [PATCH 0545/1125] Bump uutf release version Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 46291e08..d3af135d 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -1,6 +1,6 @@ Name: ocaml-uutf Version: 0.9.3 -Release: 1 +Release: 2 Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE License: BSD3 Group: Development/Other @@ -61,7 +61,7 @@ rm -rf %{buildroot} %changelog -* Fri Oct 18 2013 David Scott 0.9.3-1 +* Fri Oct 18 2013 David Scott 0.9.3-2 - 'Ported' from xen-dist-ocaml to xenserver-core * Fri Oct 11 2013 Jon Ludlam 0.9.3-1 From bbf633e1d17e4607ce682b1168d2fe9a0399884b Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 20:46:59 +0100 Subject: [PATCH 0546/1125] uutf: missing dashes Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index d3af135d..8beb7fe3 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -61,8 +61,8 @@ rm -rf %{buildroot} %changelog -* Fri Oct 18 2013 David Scott 0.9.3-2 +* Fri Oct 18 2013 David Scott - 0.9.3-2 - 'Ported' from xen-dist-ocaml to xenserver-core -* Fri Oct 11 2013 Jon Ludlam 0.9.3-1 +* Fri Oct 11 2013 Jon Ludlam - 0.9.3-1 - Initial RPM release From 49a2cd9ae2f1b2f8ff3f4f8773595855f4743b31 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 21:03:33 +0100 Subject: [PATCH 0547/1125] uutf: remove bash-ism form the %install phase Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 8beb7fe3..64161a00 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -40,7 +40,8 @@ developing applications that use %{name}. %install export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}%{_libdir}/ocaml/uutf -ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} +(cd _build/src; ocamlfind install uutf ../pkg/META uutf.mli uutf.cmi uutf.cmx uutf.cma uutf.cma uutf.cmxa uutf.cmxs) +#ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} %clean rm -rf %{buildroot} From 68df5d1c009fb7dc5d78fe4beb72445476f12a28 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 21:06:05 +0100 Subject: [PATCH 0548/1125] uutf: install uutf.a Signed-off-by: David Scott --- SPECS/ocaml-uutf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 64161a00..e42f6cc2 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -40,7 +40,7 @@ developing applications that use %{name}. %install export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}%{_libdir}/ocaml/uutf -(cd _build/src; ocamlfind install uutf ../pkg/META uutf.mli uutf.cmi uutf.cmx uutf.cma uutf.cma uutf.cmxa uutf.cmxs) +(cd _build/src; ocamlfind install uutf ../pkg/META uutf.mli uutf.cmi uutf.cmx uutf.cma uutf.a uutf.cma uutf.cmxa uutf.cmxs) #ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} %clean From 10320d709d3dc9cd914f739bdf99e40177feb722 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 18 Oct 2013 22:34:09 +0100 Subject: [PATCH 0549/1125] Update xenopsd.0.9.29 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index ce2262f6..fb69e2b8 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.28 +Version: 0.9.29 Release: 1 Summary: Simple VM manager License: LGPL @@ -183,6 +183,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Oct 18 2013 David Scott +- update to 0.9.29 + * Fri Oct 18 2013 David Scott - update to 0.9.28 From bdf2761125cc1bc60924bd4d79fe61a06a34387f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 20 Oct 2013 14:10:00 +0100 Subject: [PATCH 0550/1125] Remove dependency on xenlight The xenopsd code depends on APIs present in xen-4.4 which is too new for us. Signed-off-by: David Scott --- SPECS/libxl-headers.spec | 60 ------------------------------ SPECS/ocaml-xen-lowlevel-libs.spec | 19 ++++++---- SPECS/xenopsd.spec | 44 +++++++++++----------- SPECS/xenserver-core.spec | 7 +++- scripts/lib/mappkgname.py | 3 +- 5 files changed, 40 insertions(+), 93 deletions(-) delete mode 100644 SPECS/libxl-headers.spec diff --git a/SPECS/libxl-headers.spec b/SPECS/libxl-headers.spec deleted file mode 100644 index e2c32923..00000000 --- a/SPECS/libxl-headers.spec +++ /dev/null @@ -1,60 +0,0 @@ -Name: libxl-headers -Version: 0.1.0 -Release: 1 -Summary: Hack around missing files in Debian's xen-hypervisor package -License: GPL -Group: Development/Other -Source0: libxl_event.h -Source1: libxl.h -Source2: libxl_json.h -Source3: _libxl_list.h -Source4: _libxl_types.h -Source5: _libxl_types_json.h -Source6: libxl_utils.h -Source7: libxl_uuid.h -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: xen xen-utils ocaml -Requires: xen xen-utils - - - -%description -Header files not included in Ubuntu's xen-hypervisor package - -%prep -%setup -c -T -cp %{SOURCE0} libxl_event.h -cp %{SOURCE1} libxl.h -cp %{SOURCE2} libxl_json.h -cp %{SOURCE3} _libxl_list.h -cp %{SOURCE4} _libxl_types.h -cp %{SOURCE5} _libxl_types_json.h -cp %{SOURCE6} libxl_utils.h -cp %{SOURCE7} libxl_uuid.h - -%build - -%install -rm -rf %{buildroot} -mkdir %{buildroot} -mkdir -p %{buildroot}/usr/include -install -m 0755 libxl_event.h %{buildroot}/%{_includedir}/libxl_event.h -install -m 0755 libxl.h %{buildroot}/%{_includedir}/libxl.h -install -m 0755 libxl_json.h %{buildroot}/%{_includedir}/libxl_json.h -install -m 0755 _libxl_list.h %{buildroot}/%{_includedir}/_libxl_list.h -install -m 0755 _libxl_types.h %{buildroot}/%{_includedir}/_libxl_types.h -install -m 0755 _libxl_types_json.h %{buildroot}/%{_includedir}/_libxl_types_json.h -install -m 0755 libxl_utils.h %{buildroot}/%{_includedir}/libxl_utils.h -install -m 0755 libxl_uuid.h %{buildroot}/%{_includedir}/libxl_uuid.h - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root) -%{_includedir}/* - -%changelog -* Mon Aug 19 2013 Euan Harris -- Initial package - diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 64a37ffd..3c0b6b43 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.9 -Release: 1 +Release: 2 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other @@ -50,15 +50,18 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README.md %{_libdir}/ocaml/xenctrl/* -%{_libdir}/ocaml/xenlight/* -%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so -%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner -%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so -%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner -%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so -%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +#%{_libdir}/ocaml/xenlight/* +#%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so +#%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner +#%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so +#%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner +#%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so +#%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner %changelog +* Sun Oct 20 2013 David Scott +- Remove xenlight because this old version isn't enough for xenopsd-xenlight + * Mon Sep 16 2013 Euan Harris - Update to 0.9.9, which includes linker paths required on Debian diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index fb69e2b8..3ed025a4 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.29 -Release: 1 +Release: 2 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -55,13 +55,12 @@ Requires: %{name} = %{version}-%{release} %description simulator A synthetic VM manager for testing. -%package xenlight -Summary: %{name} using libxenlight -Group: Development/Other -Requires: %{name} = %{version}-%{release} - -%description xenlight -Simple VM manager for Xen using libxenlight +#%package xenlight +#Summary: %{name} using libxenlight +#Group: Development/Other +#Requires: %{name} = %{version}-%{release} +#%description xenlight +#Simple VM manager for Xen using libxenlight %prep %setup -q @@ -82,7 +81,7 @@ mkdir -p %{buildroot}/%{_sbindir} install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc -install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight +#install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif @@ -98,7 +97,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator -install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight +#install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight mkdir -p %{buildroot}/etc/xapi chmod 755 make-xsc-xenopsd.conf @@ -168,21 +167,24 @@ if [ $1 -eq 0 ]; then /sbin/chkconfig --del xenopsd-simulator fi -%files xenlight -%defattr(-,root,root) -%{_sbindir}/xenopsd-xenlight -%{_sysconfdir}/init.d/xenopsd-xenlight +#%files xenlight +#%defattr(-,root,root) +#%{_sbindir}/xenopsd-xenlight +#%{_sysconfdir}/init.d/xenopsd-xenlight -%post xenlight -/sbin/chkconfig --add xenopsd-xenlight +#%post xenlight +#/sbin/chkconfig --add xenopsd-xenlight -%preun xenlight -if [ $1 -eq 0 ]; then - /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 - /sbin/chkconfig --del xenopsd-xenlight -fi +#%preun xenlight +#if [ $1 -eq 0 ]; then +# /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 +# /sbin/chkconfig --del xenopsd-xenlight +#fi %changelog +* Sun Oct 20 2013 David Scott +- give up on making libxl work, since it requires xen-4.4 + * Fri Oct 18 2013 David Scott - update to 0.9.29 diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 9a0b6b93..86ec7ea6 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.9.0 -Release: 10 +Release: 11 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -9,7 +9,7 @@ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel -Requires: xenopsd-xc xenopsd-libvirt xenopsd-xenlight xenopsd-simulator +Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator Requires: xenops-cli Requires: ffs xapi-libvirt-storage sm-cli xcp-sm Requires: xcp-networkd @@ -40,6 +40,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Sun Oct 20 2013 David Scott +- Remove xenopsd-xenlight since the build depends on xen-4.4 + * Fri Sep 20 2013 Euan Harris - Don't install openstack-xapi-plugins with xenserver-core diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 1885d84c..7e70eb1c 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -133,7 +133,6 @@ "kernel-firmware": ["linux-firmware"], "swig": ["swig"], "/bin/sh": [], - "libxl-headers": ["libxl-headers"], "xen-utils": ["xen-utils"], "nfs-utils": ["nfs-common"], "hwdata": ["hwdata"], @@ -154,7 +153,7 @@ "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], "libsexplib-camlp4": ["libsexplib-camlp4-dev"], "ocaml-findlib-dev": ["ocaml-findlib", "libfindlib-ocaml-dev"], - "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev", "libxl-headers"], + "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], "libvirt0-dev": ["libvirt-dev"], "libxen-4.2-dev": ["libxen-dev"], "libvirt-bin-dev": ["libvirt-bin"], From 7f0a067cfea27e0f5a0cffd812be1d41d0c6ef9f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 20 Oct 2013 15:50:48 +0100 Subject: [PATCH 0551/1125] Update to xenopsd 0.9.30, with scripts in /usr/lib rather than /usr/libexec --- SPECS/xenopsd.spec | 49 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 3ed025a4..8dcdc0d8 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.29 -Release: 2 +Version: 0.9.30 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -82,16 +82,16 @@ install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc #install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight -mkdir -p %{buildroot}/%{_libexecdir}/%{name} -install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest -install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif -install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real -install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl -install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper -install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script -install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules -install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py -install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf +mkdir -p %{buildroot}/%{_libdir}/%{name} +install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libdir}/%{name}/xenguest +install -D scripts/vif %{buildroot}/%{_libdir}/%{name}/vif +install -D scripts/vif-real %{buildroot}/%{_libdir}/%{name}/vif-real +install -D scripts/vif-xl %{buildroot}/%{_libdir}/%{name}/vif-xl +install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libdir}/%{name}/qemu-dm-wrapper +install -D scripts/qemu-vif-script %{buildroot}/%{_libdir}/%{name}/qemu-vif-script +install -D scripts/setup-vif-rules %{buildroot}/%{_libdir}/%{name}/setup-vif-rules +install -D scripts/common.py %{buildroot}/%{_libdir}/%{name}/common.py +install -D scripts/network.conf %{buildroot}/%{_libdir}/%{name}/network.conf mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt @@ -101,7 +101,7 @@ install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenops mkdir -p %{buildroot}/etc/xapi chmod 755 make-xsc-xenopsd.conf -LIBEXECDIR=%{_libexecdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libexecdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf +LIBEXECDIR=%{_libdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf @@ -111,16 +111,16 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %doc README.md LICENSE -%{_libexecdir}/%{name}/vif -%{_libexecdir}/%{name}/vif-real -%{_libexecdir}/%{name}/vif-xl -%{_libexecdir}/%{name}/qemu-dm-wrapper -%{_libexecdir}/%{name}/qemu-vif-script -%{_libexecdir}/%{name}/setup-vif-rules -%{_libexecdir}/%{name}/network.conf -%{_libexecdir}/%{name}/common.py -%{_libexecdir}/%{name}/common.pyo -%{_libexecdir}/%{name}/common.pyc +%{_libdir}/%{name}/vif +%{_libdir}/%{name}/vif-real +%{_libdir}/%{name}/vif-xl +%{_libdir}/%{name}/qemu-dm-wrapper +%{_libdir}/%{name}/qemu-vif-script +%{_libdir}/%{name}/setup-vif-rules +%{_libdir}/%{name}/network.conf +%{_libdir}/%{name}/common.py +%{_libdir}/%{name}/common.pyo +%{_libdir}/%{name}/common.pyc /etc/xenopsd.conf /etc/xapi/network.conf @@ -142,7 +142,7 @@ fi %defattr(-,root,root) %{_sbindir}/xenopsd-xc %{_sysconfdir}/init.d/xenopsd-xc -%{_libexecdir}/%{name}/xenguest +%{_libdir}/%{name}/xenguest %post xc /sbin/chkconfig --add xenopsd-xc @@ -184,6 +184,7 @@ fi %changelog * Sun Oct 20 2013 David Scott - give up on making libxl work, since it requires xen-4.4 +- move scripts from libexecdir to libdir * Fri Oct 18 2013 David Scott - update to 0.9.29 From b44f71adf23a19d35809fde8601bbbf3fcae7889 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Oct 2013 11:21:45 +0100 Subject: [PATCH 0552/1125] Get xenopsd from xapi-project/ Signed-off-by: David Scott --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 8dcdc0d8..83919042 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -5,7 +5,7 @@ Summary: Simple VM manager License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xenopsd/archive/%{version}.tar.gz -Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init From 4b27f077c352db317cebf30b65de99085d8446b9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Oct 2013 13:14:51 +0100 Subject: [PATCH 0553/1125] xen-lowlevel-libs: %exclude xenlight --- SPECS/ocaml-xen-lowlevel-libs.spec | 32 +++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 3c0b6b43..3e77cbe9 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.9 -Release: 2 +Release: 3 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other @@ -51,14 +51,40 @@ rm -rf %{buildroot} %doc README.md %{_libdir}/ocaml/xenctrl/* #%{_libdir}/ocaml/xenlight/* -#%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so -#%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so +%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner #%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so #%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +%exclude %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so +%exclude %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner +%exclude %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so +%exclude %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +%exclude %{_libdir}/ocaml/xenlight/META +%exclude %{_libdir}/ocaml/xenlight/libxenlight_stubs.a +%exclude %{_libdir}/ocaml/xenlight/libxentoollog_stubs.a +%exclude %{_libdir}/ocaml/xenlight/xenlight.a +%exclude %{_libdir}/ocaml/xenlight/xenlight.cma +%exclude %{_libdir}/ocaml/xenlight/xenlight.cmi +%exclude %{_libdir}/ocaml/xenlight/xenlight.cmx +%exclude %{_libdir}/ocaml/xenlight/xenlight.cmxa +%exclude %{_libdir}/ocaml/xenlight/xenlight.cmxs +%exclude %{_libdir}/ocaml/xenlight/xenlight.mli +%exclude %{_libdir}/ocaml/xenlight/xentoollog.a +%exclude %{_libdir}/ocaml/xenlight/xentoollog.cma +%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmi +%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmx +%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmxa +%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmxs +%exclude %{_libdir}/ocaml/xenlight/xentoollog.mli + + %changelog +* Mon Oct 21 2013 David Scott +- Exclude the xenlight stuff in case it manages to build + * Sun Oct 20 2013 David Scott - Remove xenlight because this old version isn't enough for xenopsd-xenlight From 8d912ad1aa601f3ab4737398b6823c041200867d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 21 Oct 2013 15:02:35 +0000 Subject: [PATCH 0554/1125] debian: Install pinning preference file correctly, and force-yes in install Signed-off-by: Euan Harris --- scripts/deb/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 06ab5a6f..5d80fefb 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -8,9 +8,9 @@ sed -e "s,@PWD@,$PWD,g" scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list # Configure apt to prefer packages from the local repository -install -m 0644 scripts/deb/xapi.preference /etc/apt/preferences.d/xapi +install -m 0644 scripts/deb/xapi.pref /etc/apt/preferences.d/xapi # Install apt-get update -apt-get install -y xenserver-core +apt-get install -y --force-yes xenserver-core From 1e832f1a441fec7769679dd3d664835bc7c8e44f Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Oct 2013 17:33:59 +0100 Subject: [PATCH 0555/1125] Use new configure script in xenopsd.0.9.31 --- SPECS/xenopsd.spec | 54 +++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 83919042..689d6e93 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.30 -Release: 1 +Version: 0.9.31 +Release: 2 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -72,6 +72,8 @@ cp %{SOURCE5} make-xsc-xenopsd.conf cp %{SOURCE6} xenopsd-network-conf %build +make configure +./configure --libexecdir %{_libexecdir}/%{name} make %install @@ -82,16 +84,16 @@ install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc #install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight -mkdir -p %{buildroot}/%{_libdir}/%{name} -install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libdir}/%{name}/xenguest -install -D scripts/vif %{buildroot}/%{_libdir}/%{name}/vif -install -D scripts/vif-real %{buildroot}/%{_libdir}/%{name}/vif-real -install -D scripts/vif-xl %{buildroot}/%{_libdir}/%{name}/vif-xl -install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libdir}/%{name}/qemu-dm-wrapper -install -D scripts/qemu-vif-script %{buildroot}/%{_libdir}/%{name}/qemu-vif-script -install -D scripts/setup-vif-rules %{buildroot}/%{_libdir}/%{name}/setup-vif-rules -install -D scripts/common.py %{buildroot}/%{_libdir}/%{name}/common.py -install -D scripts/network.conf %{buildroot}/%{_libdir}/%{name}/network.conf +mkdir -p %{buildroot}/%{_libexecdir}/%{name} +install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest +install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif +install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real +install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl +install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper +install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script +install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules +install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py +install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt @@ -101,7 +103,7 @@ install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenops mkdir -p %{buildroot}/etc/xapi chmod 755 make-xsc-xenopsd.conf -LIBEXECDIR=%{_libdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf +LIBEXECDIR=%{_libexecdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libexecdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf @@ -111,16 +113,16 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %doc README.md LICENSE -%{_libdir}/%{name}/vif -%{_libdir}/%{name}/vif-real -%{_libdir}/%{name}/vif-xl -%{_libdir}/%{name}/qemu-dm-wrapper -%{_libdir}/%{name}/qemu-vif-script -%{_libdir}/%{name}/setup-vif-rules -%{_libdir}/%{name}/network.conf -%{_libdir}/%{name}/common.py -%{_libdir}/%{name}/common.pyo -%{_libdir}/%{name}/common.pyc +%{_libexecdir}/%{name}/vif +%{_libexecdir}/%{name}/vif-real +%{_libexecdir}/%{name}/vif-xl +%{_libexecdir}/%{name}/qemu-dm-wrapper +%{_libexecdir}/%{name}/qemu-vif-script +%{_libexecdir}/%{name}/setup-vif-rules +%{_libexecdir}/%{name}/network.conf +%{_libexecdir}/%{name}/common.py +%{_libexecdir}/%{name}/common.pyo +%{_libexecdir}/%{name}/common.pyc /etc/xenopsd.conf /etc/xapi/network.conf @@ -142,7 +144,7 @@ fi %defattr(-,root,root) %{_sbindir}/xenopsd-xc %{_sysconfdir}/init.d/xenopsd-xc -%{_libdir}/%{name}/xenguest +%{_libexecdir}/%{name}/xenguest %post xc /sbin/chkconfig --add xenopsd-xc @@ -182,6 +184,10 @@ fi #fi %changelog +* Mon Oct 21 2013 David Scott +- Update to 0.9.31 +- move scripts back to libexecdir + * Sun Oct 20 2013 David Scott - give up on making libxl work, since it requires xen-4.4 - move scripts from libexecdir to libdir From 0287df36414e0744685c00c8d70c1abbb42a3930 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Oct 2013 17:51:21 +0100 Subject: [PATCH 0556/1125] Update xapi.1.9.31 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- scripts/deb/update-debian-dist.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index bec94b72..6beceab7 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.30 +Version: 1.9.31 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Mon Oct 21 2013 David Scott - 1.9.31-1 +- Update to 1.9.31 - include VDI.uuid name-label improvements + * Fri Oct 11 2013 Euan Harris - 1.9.30-1 - Update to 1.9.30 - assume dom0 can be ballooned in all memory calculations. diff --git a/scripts/deb/update-debian-dist.sh b/scripts/deb/update-debian-dist.sh index 57933183..fb3acc53 100755 --- a/scripts/deb/update-debian-dist.sh +++ b/scripts/deb/update-debian-dist.sh @@ -34,6 +34,6 @@ EOF # https://enc.com.au/2007/08/07/creating-an-apt-archive/ -apt-ftparchive generate scripts/archive.conf +apt-ftparchive generate scripts/deb/archive.conf echo "now run: rsync -avu --delete dists/ ~/public_html/dists/" From c9eedf65a1904a530ba6c04b27fe3e147e12a4cd Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Oct 2013 22:14:32 +0100 Subject: [PATCH 0557/1125] Bump xapi to 1.9.32 Signed-off-by: David Scott --- SPECS/xapi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 6beceab7..36f5fdd8 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.31 +Version: 1.9.32 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,8 +148,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Mon Oct 21 2013 David Scott - 1.9.31-1 -- Update to 1.9.31 - include VDI.uuid name-label improvements +* Mon Oct 21 2013 David Scott - 1.9.32-1 +- Update to 1.9.32 - include VDI.uuid filename improvements * Fri Oct 11 2013 Euan Harris - 1.9.30-1 - Update to 1.9.30 - assume dom0 can be ballooned in all memory calculations. From 39dda44e1382a14bcc7c2e56ee654bb69044d9ca Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Tue, 22 Oct 2013 15:24:27 +0100 Subject: [PATCH 0558/1125] Update xapi to 1.9.33 --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 36f5fdd8..7b3a27f3 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.32 +Version: 1.9.33 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Tue Oct 22 2013 David Scott - 1.9.33-1 +- Update to 1.9.33 - bugfix for VDI.uuid filename feature + * Mon Oct 21 2013 David Scott - 1.9.32-1 - Update to 1.9.32 - include VDI.uuid filename improvements From ccc39f54cc46bdf039e2f73af6a101390c8a8fea Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 14:51:06 +0000 Subject: [PATCH 0559/1125] debian: Refresh Packages and Sources before trying to install packages Signed-off-by: Euan Harris --- scripts/deb/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 5d80fefb..6cff16d4 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -10,6 +10,9 @@ install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list # Configure apt to prefer packages from the local repository install -m 0644 scripts/deb/xapi.pref /etc/apt/preferences.d/xapi +(cd RPMS && apt-ftparchive packages . > Packages) +(cd SRPMS && apt-ftparchive sources . > Sources ) + # Install apt-get update apt-get install -y --force-yes xenserver-core From 396028da411acb41c516c3c4f67a1bc6c05d3a4d Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Tue, 22 Oct 2013 16:06:45 +0100 Subject: [PATCH 0560/1125] xapi.1.9.34 --- SPECS/xapi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 7b3a27f3..9e21b1ee 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.33 +Version: 1.9.34 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,8 +148,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Tue Oct 22 2013 David Scott - 1.9.33-1 -- Update to 1.9.33 - bugfix for VDI.uuid filename feature +* Tue Oct 22 2013 David Scott - 1.9.34-1 +- Update to 1.9.34 - bugfix for VDI.uuid filename feature * Mon Oct 21 2013 David Scott - 1.9.32-1 - Update to 1.9.32 - include VDI.uuid filename improvements From c3905f6e0e05c3369f26115e3d1d21ec07288437 Mon Sep 17 00:00:00 2001 From: Dave Scott Date: Wed, 23 Oct 2013 14:04:09 +0100 Subject: [PATCH 0561/1125] Update xcp-sm to 0.9.2 --- SPECS/xcp-sm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index c9310020..adb3d942 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,12 +2,12 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.1 +Version: 0.9.2 Release: 1 Group: System/Hypervisor License: LGPL URL: http://www.citrix.com -Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz +Source0: https://github.com/djs55/sm/archive/%{version}/sm-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel @@ -250,6 +250,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Wed Oct 23 2013 David Scott +- Update to 0.9.2 + * Wed Sep 11 2013 Euan Harris - Move drivers to /usr/lib/xapi/sm From b3d35ef0ebec80f7a91fc1eb30841ff2b48d2c04 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 23 Oct 2013 13:30:14 +0000 Subject: [PATCH 0562/1125] ... and update to xcp-sm.0.9.3 Signed-off-by: David Scott --- SPECS/xcp-sm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index adb3d942..bf03e0da 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,7 +2,7 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.2 +Version: 0.9.3 Release: 1 Group: System/Hypervisor License: LGPL @@ -251,7 +251,7 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) %changelog * Wed Oct 23 2013 David Scott -- Update to 0.9.2 +- Update to 0.9.3 * Wed Sep 11 2013 Euan Harris - Move drivers to /usr/lib/xapi/sm From 2af3e78e3bd8be6964639a6a051af65da4c0196a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Oct 2013 09:53:45 +0100 Subject: [PATCH 0563/1125] xcp-sm: Add new /etc/rc.d files to spec file Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index bf03e0da..2e517ade 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -34,6 +34,8 @@ rm -rf $RPM_BUILD_ROOT /etc/cron.d/* /etc/rc.d/init.d/snapwatchd /etc/rc.d/init.d/mpathroot +/etc/rc.d/init.d/sm-multipath +/etc/udev/rules.d/40-multipath.rules /usr/lib/xapi/plugins/coalesce-leaf /usr/lib/xapi/plugins/lvhd-thin /usr/lib/xapi/plugins/nfs-on-slave From 85fb9a27bbbb3aa644d11a8d4669c77237e12451 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Oct 2013 10:07:39 +0100 Subject: [PATCH 0564/1125] xcp-sm: Flip back to euanh's clone of xcp-sm, which defines the 0.9.4 tag Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 2e517ade..f680b921 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,12 +2,12 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.3 +Version: 0.9.4 Release: 1 Group: System/Hypervisor License: LGPL URL: http://www.citrix.com -Source0: https://github.com/djs55/sm/archive/%{version}/sm-%{version}.tar.gz +Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel From 2862806fc96edd1f305166bfa764e80d2b522b70 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Oct 2013 10:30:57 +0100 Subject: [PATCH 0565/1125] xcp-sm: Update changelog for 0.9.4 Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index f680b921..4bf3ecf2 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -252,6 +252,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Thu Oct 24 2013 Euan Harris +- Update to 0.9.4 + * Wed Oct 23 2013 David Scott - Update to 0.9.3 From 072507889863094b60cbfcf31c02d5a01f693fda Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 15:55:20 +0100 Subject: [PATCH 0566/1125] CentOS: Add make install target Signed-off-by: Euan Harris --- scripts/rpm/RPM-GPG-KEY-EPEL-6 | 29 +++++++++++++++++++++++++++++ scripts/rpm/RPM-GPG-KEY-remi | 24 ++++++++++++++++++++++++ scripts/rpm/epel-testing.repo | 26 ++++++++++++++++++++++++++ scripts/rpm/epel.repo | 26 ++++++++++++++++++++++++++ scripts/rpm/install.sh | 20 ++++++++++++++++++++ scripts/rpm/remi.repo | 30 ++++++++++++++++++++++++++++++ scripts/rpm/xapi.repo.in | 13 +++++++++++++ scripts/rpm/xen-c6-RC1.repo | 13 +++++++++++++ scripts/rpm/xen-c6-tweaked.repo | 21 +++++++++++++++++++++ scripts/rpm/xen-c6.repo | 13 +++++++++++++ xapi.repo | 13 ------------- 11 files changed, 215 insertions(+), 13 deletions(-) create mode 100644 scripts/rpm/RPM-GPG-KEY-EPEL-6 create mode 100644 scripts/rpm/RPM-GPG-KEY-remi create mode 100644 scripts/rpm/epel-testing.repo create mode 100644 scripts/rpm/epel.repo create mode 100755 scripts/rpm/install.sh create mode 100644 scripts/rpm/remi.repo create mode 100644 scripts/rpm/xapi.repo.in create mode 100644 scripts/rpm/xen-c6-RC1.repo create mode 100644 scripts/rpm/xen-c6-tweaked.repo create mode 100644 scripts/rpm/xen-c6.repo diff --git a/scripts/rpm/RPM-GPG-KEY-EPEL-6 b/scripts/rpm/RPM-GPG-KEY-EPEL-6 new file mode 100644 index 00000000..7a203048 --- /dev/null +++ b/scripts/rpm/RPM-GPG-KEY-EPEL-6 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/scripts/rpm/RPM-GPG-KEY-remi b/scripts/rpm/RPM-GPG-KEY-remi new file mode 100644 index 00000000..32833860 --- /dev/null +++ b/scripts/rpm/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/scripts/rpm/epel-testing.repo b/scripts/rpm/epel-testing.repo new file mode 100644 index 00000000..97703b2c --- /dev/null +++ b/scripts/rpm/epel-testing.repo @@ -0,0 +1,26 @@ +[epel-testing] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 + +[epel-testing-source] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 diff --git a/scripts/rpm/epel.repo b/scripts/rpm/epel.repo new file mode 100644 index 00000000..0160dfec --- /dev/null +++ b/scripts/rpm/epel.repo @@ -0,0 +1,26 @@ +[epel] +name=Extra Packages for Enterprise Linux 6 - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch +failovermethod=priority +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 6 - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 + +[epel-source] +name=Extra Packages for Enterprise Linux 6 - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh new file mode 100755 index 00000000..e18c924b --- /dev/null +++ b/scripts/rpm/install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Configure the local machine to install packages built in this working directory + +sed -e "s,@BASEDIR@,$PWD,g" scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo +install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo + +#install -m 0644 scripts/rpm/xen-c6.repo /etc/yum.repos.d/xen-c6.repo +#install -m 0644 scripts/rpm/xen-c6-RC1.repo /etc/yum.repos.d/xen-c6-RC1.repo +install -m 0644 scripts/rpm/xen-c6-tweaked.repo /etc/yum.repos.d/xen-c6-tweaked.repo + +install -m 0644 scripts/rpm/epel.repo /etc/yum.repos.d/epel.repo +install -m 0644 scripts/rpm/epel-testing.repo /etc/yum.repos.d/epel-testing.repo +install -m 0644 scripts/rpm/remi.repo /etc/yum.repos.d/remi.repo + +install -m 0644 scripts/rpm/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +install -m 0644 scripts/rpm/RPM-GPG-KEY-remi /etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +yum repolist +yum install xenserver-core diff --git a/scripts/rpm/remi.repo b/scripts/rpm/remi.repo new file mode 100644 index 00000000..b9472d8c --- /dev/null +++ b/scripts/rpm/remi.repo @@ -0,0 +1,30 @@ +[remi] +name=Les RPM de remi pour Enterprise Linux 6 - $basearch +#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/ +mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-test] +name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch +#baseurl=http://rpms.famillecollet.com/enterprise/6/test/$basearch/ +mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-debuginfo] +name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo +baseurl=http://rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + +[remi-test-debuginfo] +name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo +baseurl=http://rpms.famillecollet.com/enterprise/6/debug-test/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi + diff --git a/scripts/rpm/xapi.repo.in b/scripts/rpm/xapi.repo.in new file mode 100644 index 00000000..6eec4269 --- /dev/null +++ b/scripts/rpm/xapi.repo.in @@ -0,0 +1,13 @@ +[xapi] +name=CentOS-$releasever - xenserver-core +baseurl=file://@BASEDIR@/RPMS/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xapi-source] +name=CentOS-$releasever - xenserver-core Source +baseurl=file://@BASEDIR@/SRPMS +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/scripts/rpm/xen-c6-RC1.repo b/scripts/rpm/xen-c6-RC1.repo new file mode 100644 index 00000000..88337c66 --- /dev/null +++ b/scripts/rpm/xen-c6-RC1.repo @@ -0,0 +1,13 @@ +[xen-c6-RC1] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/scripts/rpm/xen-c6-tweaked.repo b/scripts/rpm/xen-c6-tweaked.repo new file mode 100644 index 00000000..5f9f49d1 --- /dev/null +++ b/scripts/rpm/xen-c6-tweaked.repo @@ -0,0 +1,21 @@ +[xen-c6-tweaked] +name=CentOS-$releasever - XenServer temporary Xen override +baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 + diff --git a/scripts/rpm/xen-c6.repo b/scripts/rpm/xen-c6.repo new file mode 100644 index 00000000..a172c2ce --- /dev/null +++ b/scripts/rpm/xen-c6.repo @@ -0,0 +1,13 @@ +[xen-c6] +name=CentOS-$releasever - Xen +baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ +gpgcheck=0 +Priority=1 +enabled=1 + +[xen-c6-source] +name=CentOS-$releasever - Xen Source +baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ +gpgcheck=0 +Priority=1 +enabled=0 diff --git a/xapi.repo b/xapi.repo index f76f63b6..e69de29b 100644 --- a/xapi.repo +++ b/xapi.repo @@ -1,13 +0,0 @@ -[xapi] -name=CentOS-$releasever - xenserver tech preview -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/RPMS/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xapi-source] -name=CentOS-$releasever - xenserver tech preview Source -baseurl=http://xenbits.xen.org/djs/xenserver-tech-preview/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 From 5d6ec8d522bf749858ed1f92f3815596f401a3ff Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Oct 2013 17:14:59 +0100 Subject: [PATCH 0567/1125] xenserver-install-wizard: Update to 0.2.26 Signed-off-by: Euan Harris --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index c4acf3c7..9cafb65a 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.25 +Version: 0.2.26 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Thu Oct 24 2013 Euan Harris +- Update to 0.2.26, which sets the iSCSI QN + * Thu Sep 26 2013 David Scott - Update to 0.2.25 From 89b9875a51cd86d6fcd784815aa38ca2a68cae20 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 24 Oct 2013 19:11:52 +0000 Subject: [PATCH 0568/1125] Incremental commit: blktap2.5 Signed-off-by: David Scott --- SPECS/blktap.spec | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 SPECS/blktap.spec diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec new file mode 100644 index 00000000..53d0b5e5 --- /dev/null +++ b/SPECS/blktap.spec @@ -0,0 +1,53 @@ +Summary: enhanced version of tapdisk +Name: blktap +Version: 0.9.0 +Release: 1 +Group: System/Hypervisor +License: LGPL+linking exception +URL: http://www.xen.org +Source0: https://github.com/djs55/blktap/archive/%{version}/blktap-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: autoconf automake libtool libaio-devel xen-devel libuuid-devel + +%description +Enhanced version of tapdisk with support for storage mirroring. + +%prep +%setup -q + + +%build +sh autogen.sh +./configure --prefix %{buildroot}/%{_libdir}/%{name} +make + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}/%{_libdir}/%{name} +mkdir -p %{buildroot}/%{_libdir}/%{name}/lib +mkdir -p %{buildroot}/%{_libdir}/%{name}/sbin +mkdir -p %{buildroot}/%{_libdir}/%{name}/bin +mkdir -p %{buildroot}/%{_libdir}/%{name}/include/blktap +mkdir -p %{buildroot}/%{_libdir}/%{name}/include/vhd +mkdir -p %{buildroot}/%{_libdir}/%{name}/libexec +mkdir -p %{buildroot}/%{_libdir}/%{name}/etc/udev/rules.d + +make install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_libdir}/%{name}/bin/* +%{_libdir}/%{name}/etc/udev/rules.d/blktap.rules +%{_libdir}/%{name}/include/blktap/* +%{_libdir}/%{name}/include/vhd/* +%{_libdir}/%{name}/lib/* +%{_libdir}/%{name}/libexec/* +%{_libdir}/%{name}/sbin/* + +%changelog +* Thu Oct 24 2013 David Scott - 0.9.0-1 +- Initial package From 11e51a3a4a48b447e1306c4b042ae91d1b31f024 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 24 Oct 2013 20:28:14 +0000 Subject: [PATCH 0569/1125] blktap2.5 now builds Signed-off-by: David Scott --- SPECS/blktap.spec | 4 ++-- SPECS/ffs.spec | 1 + makemake.py | 6 +++++- scripts/lib/mappkgname.py | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 53d0b5e5..67bf66f9 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -18,7 +18,7 @@ Enhanced version of tapdisk with support for storage mirroring. %build sh autogen.sh -./configure --prefix %{buildroot}/%{_libdir}/%{name} +./configure --prefix %{_libdir}/%{name} make %install @@ -33,7 +33,7 @@ mkdir -p %{buildroot}/%{_libdir}/%{name}/include/vhd mkdir -p %{buildroot}/%{_libdir}/%{name}/libexec mkdir -p %{buildroot}/%{_libdir}/%{name}/etc/udev/rules.d -make install +make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index b2e03a64..a3298794 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -14,6 +14,7 @@ BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel BuildRequires: ocaml-tapctl-devel message-switch-devel forkexecd-devel Requires: ocaml-libvhd-devel nfs-utils redhat-lsb-core +Requires: blktap %description Simple flat file storage manager for the xapi toolstack. diff --git a/makemake.py b/makemake.py index ced14a81..c33504c4 100755 --- a/makemake.py +++ b/makemake.py @@ -82,7 +82,11 @@ def map_package_name(name): ts = rpm.TransactionSet() def specFromFile( spec ): - return rpm.ts().parseSpec( spec ) + try: + return rpm.ts().parseSpec( spec ) + except Exception, e: + print >>sys.stderr, "Failed to parse %s" % spec + raise e spec_names = os.listdir( spec_dir ) specs = {} diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 7e70eb1c..c4175e6c 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -94,6 +94,7 @@ "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], "python-setuptools": ["python-setuptools", "python-setuptools-git"], "vhd-tool": ["vhd-tool"], + "blktap": ["blktap"], # Distribution packages "ocaml": ["ocaml-nox", "ocaml-native-compilers"], @@ -140,6 +141,10 @@ "ethtool": ["ethtool"], "qemu-system-x86": ["qemu-system-x86"], "python-argparse": ["libpython2.7-stdlib"], + "autoconf": ["autoconf"], + "automake": ["automake"], + "libtool": ["libtool"], + "libaio": ["libaio"], } SECONDARY_MAPPING = { From 362e1e7c9db8d893143b81094f8e586fb236b2a2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Oct 2013 22:24:38 +0100 Subject: [PATCH 0570/1125] xcp-sm: Add dependency on iscsi-initiator-utils (open-iscsi on Debian) Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 3 ++- scripts/lib/mappkgname.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 4bf3ecf2..29f1414c 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,13 +3,14 @@ Summary: sm - XCP storage managers Name: xcp-sm Version: 0.9.4 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL URL: http://www.citrix.com Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel +Requires: iscsi-initiator-utils %description This package contains storage backends used in XCP diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 7e70eb1c..42a11dc3 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -15,6 +15,7 @@ "eliloader": ["eliloader"], "ffs": ["ffs"], "forkexecd": ["forkexecd"], + "iscsi-initiator-utils": ["open-iscsi"], "js_of_ocaml": ["libjs-of-ocaml"], "libnl3-cli": ["libnl-3-cli"], "libnl3-doc": ["libnl-3-doc"], From 91b6bfc2042e49b9a7659ade735ce81cad4ef3d6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 10:44:25 +0000 Subject: [PATCH 0571/1125] Set the XCP_PATH and TAPDISK2 env vars if we detect a parallel install of blktap2.5 Signed-off-by: David Scott --- SOURCES/ffs-init | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init index f346b64d..6a7f5e32 100755 --- a/SOURCES/ffs-init +++ b/SOURCES/ffs-init @@ -35,6 +35,15 @@ if [ -f /etc/sysconfig/$prog ] ; then . /etc/sysconfig/$prog fi +# Use 'blktap 2.5' if it has been installed +if [ -d /usr/lib64/blktap/libexec/tapdisk ]; then + export XCP_PATH=/usr/lib64/blktap/sbin + export TAPDISK2=/usr/lib64/blktap/libexec/tapdisk +elif [ -d /usr/lib/blktap/libexec/tapdisk ]; then + export XCP_PATH=/usr/lib/blktap/sbin + export TAPDISK2=/usr/lib/blktap/libexec/tapdisk +fi + start() { [ -x $exec ] || exit 5 From b351891b065688b3dc6ce6b8add1315bb0b1ed84 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 10:56:43 +0000 Subject: [PATCH 0572/1125] Fix init.d/ffs to cope with parallel installs of blktap2 Signed-off-by: David Scott --- SOURCES/ffs-init | 5 +++-- SPECS/ffs.spec | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init index 6a7f5e32..a0c34985 100755 --- a/SOURCES/ffs-init +++ b/SOURCES/ffs-init @@ -36,13 +36,14 @@ if [ -f /etc/sysconfig/$prog ] ; then fi # Use 'blktap 2.5' if it has been installed -if [ -d /usr/lib64/blktap/libexec/tapdisk ]; then +if [ -d /usr/lib64/blktap ]; then export XCP_PATH=/usr/lib64/blktap/sbin export TAPDISK2=/usr/lib64/blktap/libexec/tapdisk -elif [ -d /usr/lib/blktap/libexec/tapdisk ]; then +elif [ -d /usr/lib/blktap ]; then export XCP_PATH=/usr/lib/blktap/sbin export TAPDISK2=/usr/lib/blktap/libexec/tapdisk fi +logger -t ffs "XCP_PATH=${XCP_PATH} TAPDISK2=${TAPDISK2}" start() { [ -x $exec ] || exit 5 diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index a3298794..05039514 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,6 +1,6 @@ Name: ffs Version: 0.9.18 -Release: 1 +Release: 2 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other @@ -52,6 +52,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Oct 25 2013 David Scott +- Detect a parallel install of blktap and use that + * Wed Sep 25 2013 David Scott - Update to 0.9.18 From b7cb158fa54900bca0fe8717c8e1f04feed95620 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 10:58:35 +0000 Subject: [PATCH 0573/1125] xapi is going to need to know about parallel blktap2 installs too Signed-off-by: David Scott --- SOURCES/xen-api-init | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init index d49bb7d7..8e34444e 100755 --- a/SOURCES/xen-api-init +++ b/SOURCES/xen-api-init @@ -35,6 +35,17 @@ if [ -f /etc/sysconfig/$prog ] ; then . /etc/sysconfig/$prog fi +# Use 'blktap 2.5' if it has been installed +if [ -d /usr/lib64/blktap ]; then + export XCP_PATH=/usr/lib64/blktap/sbin + export TAPDISK2=/usr/lib64/blktap/libexec/tapdisk +elif [ -d /usr/lib/blktap ]; then + export XCP_PATH=/usr/lib/blktap/sbin + export TAPDISK2=/usr/lib/blktap/libexec/tapdisk +fi +logger -t ffs "XCP_PATH=${XCP_PATH} TAPDISK2=${TAPDISK2}" + + start() { [ -x $exec ] || exit 5 From 1c76e1e94c5973b43ed0467b3dd76a4a4285cc69 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 16:21:22 +0100 Subject: [PATCH 0574/1125] Update ffs and sm-cli for storage motion Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- SPECS/sm-cli.spec | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index b2e03a64..8cd10bd2 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.18 +Version: 0.9.19 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -51,6 +51,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Oct 25 2013 David Scott +- Update to 0.9.19 + * Wed Sep 25 2013 David Scott - Update to 0.9.18 diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 7633c56d..ef48d776 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,11 +1,11 @@ Name: sm-cli -Version: 0.9.3 +Version: 0.9.4 Release: 1 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/sm-cli/archive/sm-cli-%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/sm-cli/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel @@ -19,7 +19,7 @@ BuildRequires: ocaml-oclock-devel Command-line interface for xapi toolstack storage managers. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build make @@ -38,6 +38,9 @@ rm -rf %{buildroot} %{_sbindir}/sm-cli %changelog +* Fri Oct 25 2013 David Scott +- Update to 0.9.4 + * Thu May 30 2013 David Scott - Initial package From 5cb46df297d34cd66999909c2a4a23792faa1df0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 16:46:23 +0100 Subject: [PATCH 0575/1125] Update tapctl to 0.9.1 Signed-off-by: David Scott --- SPECS/ocaml-tapctl.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index f3406d7a..b91bbf29 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-tapctl -Version: 0.9.0 +Version: 0.9.1 Release: 1 Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/tapctl/archive/tapctl-0.9.0.tar.gz +URL: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}.tar.gz Source0: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel @@ -51,6 +51,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/tapctl/* %changelog +* Fri Oct 25 2013 David Scott +- Update to 0.9.1 + * Thu May 30 2013 David Scott - Initial package From 69c8abde0071e8d65c0ee2bfe65d440752418c04 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 16:48:34 +0100 Subject: [PATCH 0576/1125] normalise tapctl tag Signed-off-by: David Scott --- SPECS/ocaml-tapctl.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index b91bbf29..7b6b8fa6 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -6,8 +6,8 @@ Release: 1 Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}.tar.gz -Source0: https://github.com/xapi-project/tapctl/archive/tapctl-%{version}/tapctl-%{version}.tar.gz +URL: https://github.com/xapi-project/tapctl/archive/%{version}.tar.gz +Source0: https://github.com/xapi-project/tapctl/archive/%{version}/tapctl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel ocaml-xcp-idl-devel ocaml-oclock-devel @@ -26,7 +26,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n tapctl-tapctl-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml From b34cd1a96e6081c3441b8f5e0a92d7bce472e7f1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 16:50:23 +0100 Subject: [PATCH 0577/1125] try again to normalise tag Signed-off-by: David Scott --- SPECS/ocaml-tapctl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 7b6b8fa6..cce3dea4 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -7,7 +7,7 @@ Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other URL: https://github.com/xapi-project/tapctl/archive/%{version}.tar.gz -Source0: https://github.com/xapi-project/tapctl/archive/%{version}/tapctl-%{version}.tar.gz +Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel ocaml-xcp-idl-devel ocaml-oclock-devel From 73731da4c536ca9ef01a74427fae741b492c6e14 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 16:52:03 +0100 Subject: [PATCH 0578/1125] try again to normalise tag Signed-off-by: David Scott --- SPECS/ocaml-tapctl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index cce3dea4..e48538f7 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -26,7 +26,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n tapctl-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml From a15ffe030e5c8d7dc64d3b76fef36fd9213c8d1f Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 17:44:09 +0100 Subject: [PATCH 0579/1125] Update xapi to 1.9.35 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 9e21b1ee..8ecb0821 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.34 +Version: 1.9.35 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Oct 25 2013 David Scott - 1.9.35-1 +- update to 1.9.35 - bugfixes for storage motion + * Tue Oct 22 2013 David Scott - 1.9.34-1 - Update to 1.9.34 - bugfix for VDI.uuid filename feature From 9e210434b97bbc391d2ec6079b099cf10403abfa Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 22:15:18 +0100 Subject: [PATCH 0580/1125] Update vhd-tool 0.6.1 Signed-off-by: David Scott --- SPECS/vhd-tool.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 39ec945b..da5c6db4 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,7 +2,7 @@ Summary: command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.6.0 +Version: 0.6.1 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -50,6 +50,9 @@ rm -rf %{buildroot} %{_libexecdir}/xapi/sparse_dd %changelog +* Fri Oct 25 2013 David Scott - 0.6.1-0 +- Update to 0.6.1 + * Wed Oct 02 2013 David Scott - 0.6.0-1 - Update to 0.6.0 From f9b25916b1c6cb1f2e220bab46cd0252b83d39e5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 22:45:24 +0100 Subject: [PATCH 0581/1125] Update ffs to 0.9.20 Signed-off-by: David Scott --- SPECS/ffs.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index e2bf2a98..10b67fb5 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,6 +1,6 @@ Name: ffs -Version: 0.9.19 -Release: 2 +Version: 0.9.20 +Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other @@ -53,7 +53,7 @@ fi %changelog * Fri Oct 25 2013 David Scott -- Update to 0.9.19 +- Update to 0.9.20 - Detect a parallel install of blktap and use that * Wed Sep 25 2013 David Scott From 5389fdc46e3351670a7ee9f9e8177caf7b9556fb Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Oct 2013 23:07:42 +0100 Subject: [PATCH 0582/1125] Update xapi to 1.9.36 Signed-off-by: David Scott --- SPECS/xapi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 8ecb0821..38b4bf67 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.35 +Version: 1.9.36 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,8 +148,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Fri Oct 25 2013 David Scott - 1.9.35-1 -- update to 1.9.35 - bugfixes for storage motion +* Fri Oct 25 2013 David Scott - 1.9.36-1 +- update to 1.9.36 - bugfixes for storage motion * Tue Oct 22 2013 David Scott - 1.9.34-1 - Update to 1.9.34 - bugfix for VDI.uuid filename feature From 557ccbf05f0f0943c79c70a3444eeea16e6d562c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Oct 2013 10:08:22 +0000 Subject: [PATCH 0583/1125] vhd-tool: Fix release number in changelog Debian packaging takes the version number from the top of the changelog. Signed-off-by: Euan Harris --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index da5c6db4..2b4b9f3d 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -50,7 +50,7 @@ rm -rf %{buildroot} %{_libexecdir}/xapi/sparse_dd %changelog -* Fri Oct 25 2013 David Scott - 0.6.1-0 +* Fri Oct 25 2013 David Scott - 0.6.1-1 - Update to 0.6.1 * Wed Oct 02 2013 David Scott - 0.6.0-1 From 8747e998c9592a18cefbac18244b3f6a30d24d6a Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Mon, 28 Oct 2013 14:47:04 +0000 Subject: [PATCH 0584/1125] Add -y switch to yum install This way the install script does not require any user input. --- scripts/rpm/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index e18c924b..a3cbba45 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -17,4 +17,4 @@ install -m 0644 scripts/rpm/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL install -m 0644 scripts/rpm/RPM-GPG-KEY-remi /etc/pki/rpm-gpg/RPM-GPG-KEY-remi yum repolist -yum install xenserver-core +yum install -y xenserver-core From bab3093b1c145c2488b5be431653513502e1b954 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 28 Oct 2013 17:23:39 +0000 Subject: [PATCH 0585/1125] Update xenopsd to 0.9.32 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 689d6e93..1bd26c7a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.31 -Release: 2 +Version: 0.9.32 +Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other @@ -184,6 +184,9 @@ fi #fi %changelog +* Mon Oct 28 2013 David Scott +- Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") + * Mon Oct 21 2013 David Scott - Update to 0.9.31 - move scripts back to libexecdir From b5d4279b400ce848e8e44a0db053d78875591e1c Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 28 Oct 2013 17:27:25 +0000 Subject: [PATCH 0586/1125] Update ffs.0.9.21 Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 10b67fb5..582d24d0 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.20 +Version: 0.9.21 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -52,6 +52,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Mon Oct 28 2013 David Scott +- Update to 0.9.21, with minimal storage motion support + * Fri Oct 25 2013 David Scott - Update to 0.9.20 - Detect a parallel install of blktap and use that From 93803ea21c4a42e78000ff0ab99bc1106e938704 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Oct 2013 17:23:24 +0000 Subject: [PATCH 0587/1125] xcp-sm: Add udev rules and package dependencies needed to attach iSCSI volumes Signed-off-by: Euan Harris --- SOURCES/xcp-mpath-scsidev-rules | 5 ++ SOURCES/xcp-mpath-scsidev-script | 117 +++++++++++++++++++++++++++++++ SPECS/xcp-sm.spec | 18 ++++- scripts/lib/mappkgname.py | 1 + 4 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 SOURCES/xcp-mpath-scsidev-rules create mode 100755 SOURCES/xcp-mpath-scsidev-script diff --git a/SOURCES/xcp-mpath-scsidev-rules b/SOURCES/xcp-mpath-scsidev-rules new file mode 100644 index 00000000..d460f4ce --- /dev/null +++ b/SOURCES/xcp-mpath-scsidev-rules @@ -0,0 +1,5 @@ +KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode session %n", SYMLINK+="%c" +KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode serial %n", SYMLINK+="%c" +KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode base %n", SYMLINK+="%c" +KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bybus %n", SYMLINK+="%c" +KERNEL=="sd*", BUS=="scsi", DRIVER=="sd", WAIT_FOR_SYSFS="dev", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bympp %n", SYMLINK+="%c" diff --git a/SOURCES/xcp-mpath-scsidev-script b/SOURCES/xcp-mpath-scsidev-script new file mode 100755 index 00000000..31cf0e88 --- /dev/null +++ b/SOURCES/xcp-mpath-scsidev-script @@ -0,0 +1,117 @@ +#!/bin/bash + +BUS=${1} +NAME=${2} +HOST=${BUS%%:*} +NODE=${3} +OUT=${4} +LUN=`echo $BUS | cut -d: -f4` + +# The required files are located in an extra layer of directories in 3.x kernels +kernel=`uname -r | cut -d. -f1-2` +case $kernel in + 2.6) + targetIQNPath="/device/session*/iscsi_session*" + targetIPPortPath="/device/session*/connection*/iscsi_connection*" + ;; + 3.*) + targetIQNPath="/device/session*/iscsi_session/session*" + targetIPPortPath="/device/session*/connection*/iscsi_connection/connection*" + ;; + *) + echo "Unkown kernel: neither 2.6 nor 3.x. Exiting..." + exit 2 + ;; +esac + +#Args: ID +query_hosts() { + /usr/sbin/mppUtil -g $1 | grep hostId | while read file + do + host=`echo $file | awk '{gsub(/^.*\(|\).*$/,"");gsub(/,/,"");print $2}'` + ISCSIPATH="/sys/class/iscsi_host/host${host}" + [ -e ${ISCSIPATH} ] || continue + + #Query the IQN, IP and Port values + targetIQNfile="${ISCSIPATH}${targetIQNPath}/targetname" + targetIQN=$(cat ${targetIQNfile}) + + targetIPfile="${ISCSIPATH}${targetIPPortPath}/persistent_address" + targetPortfile="${ISCSIPATH}${targetIPPortPath}/persistent_port" + targetIP=$(cat ${targetIPfile}) + targetPort=$(cat ${targetPortfile}) + + path="/dev/iscsi/${targetIQN}/${targetIP}:${targetPort}/SESSIONID-${host}" + echo "${host}" + return + done +} + +if [ $# -gt 5 -o $# -lt 4 ]; then + echo "Incorrect number of arguments" + exit 1 +fi + +if [[ $OUT == "scsi_bybus" && -z ${5} ]]; then + SCSIID=`/sbin/scsi_id -g -u -s /block/$2` + if [ $? == 0 ]; then + echo "disk/by-scsibus/${SCSIID}-%b disk/by-scsid/${SCSIID}/$2" + fi + exit +fi + +[ -e /sys/class/scsi_host/host${HOST}/proc_name ] || exit 1 + +driver=$(cat /sys/class/scsi_host/host${HOST}/proc_name) + +if [ $driver == "mpp" ]; then + # RDAC special device handling + array=`/opt/xensource/bin/xe-getarrayidentifier ${NODE}` + id=`/usr/sbin/mppUtil -a | grep ${array} | awk '{print $1}'` + if [[ $OUT == "scsi_bympp" && -z ${5} ]]; then + SCSIID=`/sbin/scsi_id -g -u -s /block/$2` + if [ $? == 0 ]; then + #lunnum=`/opt/xensource/bin/xe-getlunidentifier ${NODE}` + #lunid=`/usr/sbin/mppUtil -g ${id} | grep ${lunnum} | awk '{gsub(/#/,"");print $2}'` + #echo "disk/by-mpp/${SCSIID}-${id}:${lunid}" + echo "disk/by-mpp/${SCSIID}" + fi + exit + else + HOST=`query_hosts $id` + fi +fi + +ISCSIPATH="/sys/class/iscsi_host/host${HOST}" + +[ -e ${ISCSIPATH} ] || exit 1 + +# Query targetIQN +targetIQNfile="${ISCSIPATH}${targetIQNPath}/targetname" +targetIQN=$(cat ${targetIQNfile}) + +# Query target address and port +targetIPfile="${ISCSIPATH}${targetIPPortPath}/persistent_address" +targetPortfile="${ISCSIPATH}${targetIPPortPath}/persistent_port" +targetIP=$(cat ${targetIPfile}) +targetPort=$(cat ${targetPortfile}) + +basepath="iscsi/${targetIQN}/${targetIP}:${targetPort}" + +# Handle the Kernel assigned device number +if [ -z ${5} ]; then + DEV="LUN${LUN}" +else + DEV="LUN${LUN}_${5}" +fi + +if [ ${OUT} == "base" ]; then + echo "${basepath}/${DEV}" +elif [ ${OUT} == "session" ]; then + echo "${basepath}/SESSIONID-${HOST}/${DEV}" +elif [[ ${OUT} == "serial" && -z ${5} ]]; then + SERIAL=`/opt/xensource/bin/xe-getserialhex ${NODE}` + if [ $? == 0 ]; then + echo "${basepath}/SERIAL-${SERIAL}" + fi +fi diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 29f1414c..aecdd2bd 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,27 +2,36 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.4 -Release: 2 +Version: 0.9.5 +Release: 1 Group: System/Hypervisor License: LGPL URL: http://www.citrix.com Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz +Source1: xcp-mpath-scsidev-rules +Source2: xcp-mpath-scsidev-script BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel Requires: iscsi-initiator-utils +Requires: sg3_utils %description This package contains storage backends used in XCP %prep %setup -q -n sm-%{version} +cp %{SOURCE1} xcp-mpath-scsidev-rules +cp %{SOURCE2} xcp-mpath-scsidev-script %build DESTDIR=$RPM_BUILD_ROOT make %install make PLUGIN_SCRIPT_DEST=/usr/lib/xapi/plugins/ SM_DEST=/usr/lib/xapi/sm/ DESTDIR=$RPM_BUILD_ROOT install +mkdir -p %{buildroot}/etc/udev/rules.d +install -m 0644 xcp-mpath-scsidev-rules %{buildroot}/etc/udev/rules.d/55-xs-mpath-scsidev.rules +mkdir -p %{buildroot}/etc/udev/scripts +install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath-scsidev.sh %clean rm -rf $RPM_BUILD_ROOT @@ -37,6 +46,8 @@ rm -rf $RPM_BUILD_ROOT /etc/rc.d/init.d/mpathroot /etc/rc.d/init.d/sm-multipath /etc/udev/rules.d/40-multipath.rules +/etc/udev/rules.d/55-xs-mpath-scsidev.rules +/etc/udev/scripts/xs-mpath-scsidev.sh /usr/lib/xapi/plugins/coalesce-leaf /usr/lib/xapi/plugins/lvhd-thin /usr/lib/xapi/plugins/nfs-on-slave @@ -253,6 +264,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Mon Oct 28 2013 Euan Harris +- Update to 0.9.5, adding udev scripts and package dependencies needed to use iSCSI volumes + * Thu Oct 24 2013 Euan Harris - Update to 0.9.4 diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 49f5a8eb..c9cd6373 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -139,6 +139,7 @@ "nfs-utils": ["nfs-common"], "hwdata": ["hwdata"], "redhat-lsb-core": ["lsb-base"], + "sg3_utils": ["sg3-utils"], "ethtool": ["ethtool"], "qemu-system-x86": ["qemu-system-x86"], "python-argparse": ["libpython2.7-stdlib"], From 96916ae07ef7140c955d4def9f5b28f4d4aca41a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 29 Oct 2013 21:20:22 +0000 Subject: [PATCH 0588/1125] Update xapi to 1.9.37 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 38b4bf67..1ca1cbb3 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.36 +Version: 1.9.37 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Tue Oct 29 2013 David Scott - 1.9.37-1 +- update to 1.9.37 - bugfixes for storage motion on Ubuntu + * Fri Oct 25 2013 David Scott - 1.9.36-1 - update to 1.9.36 - bugfixes for storage motion From 0475110656a34421e07ff5bc41725085c9a2d0db Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 30 Oct 2013 10:31:56 +0000 Subject: [PATCH 0589/1125] xenserver-install-wizard: Update to 0.2.27 Signed-off-by: Euan Harris --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 9cafb65a..2a8a9a48 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: a simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.26 +Version: 0.2.27 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Wed Oct 30 2013 Euan Harris +- Update to 0.2.27 + * Thu Oct 24 2013 Euan Harris - Update to 0.2.26, which sets the iSCSI QN From fee1e40f5d58112480a44c4b48a16dab0d1910e5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 30 Oct 2013 17:20:55 +0000 Subject: [PATCH 0590/1125] Update ocaml-vhd to 0.6.1 Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index adab10c9..c9bd2934 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-vhd -Version: 0.6.0 +Version: 0.6.1 Release: 1 Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception @@ -54,6 +54,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllvhd* %changelog +* Wed Oct 30 2013 David Scott - 0.6.0-1 +- Update to 0.6.1 + * Wed Oct 02 2013 David Scott - 0.6.0-1 - Initial package From a7e5b50d451892b20217e2bb4d053964be1de8e6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 30 Oct 2013 17:22:11 +0000 Subject: [PATCH 0591/1125] Update xapi to 1.9.38 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1ca1cbb3..0aeb6a8f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: xapi - xen toolstack for XCP Name: xapi -Version: 1.9.37 +Version: 1.9.38 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -148,6 +148,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Wed Oct 30 2013 David Scott - 1.9.38-1 +- update to 1.9.38 - import_raw_vdi path fix + * Tue Oct 29 2013 David Scott - 1.9.37-1 - update to 1.9.37 - bugfixes for storage motion on Ubuntu From ecffb1fc2c0cb462ecf4b59b4903d6c18e3091df Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 30 Oct 2013 17:25:37 +0000 Subject: [PATCH 0592/1125] Update ffs to 0.9.22 Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 582d24d0..bf46eb24 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.21 +Version: 0.9.22 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -52,6 +52,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Oct 30 2013 David Scott +- Update to 0.9.22, with VDI.clone and VDI.snapshot fixes + * Mon Oct 28 2013 David Scott - Update to 0.9.21, with minimal storage motion support From 9046d319a6a94d9cbce1b786f13fc1407a328aec Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 30 Oct 2013 17:34:56 +0000 Subject: [PATCH 0593/1125] Correct changelog typo Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index c9bd2934..b08a7aab 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -54,7 +54,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllvhd* %changelog -* Wed Oct 30 2013 David Scott - 0.6.0-1 +* Wed Oct 30 2013 David Scott - 0.6.1-1 - Update to 0.6.1 * Wed Oct 02 2013 David Scott - 0.6.0-1 From eb9cefc520e932fbb562a7af015061c06e0b72bf Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 31 Oct 2013 14:25:32 +0000 Subject: [PATCH 0594/1125] Update ffs to 0.9.23 Signed-off-by: David Scott --- SPECS/ffs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index bf46eb24..c80c3b4c 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.22 +Version: 0.9.23 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -52,6 +52,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Oct 31 2013 David Scott +- Update to 0.9.23, with VDI.copy fix + * Wed Oct 30 2013 David Scott - Update to 0.9.22, with VDI.clone and VDI.snapshot fixes From 55d5e3f4327f1429c0da04fec7d3ba829da1cccc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2013 10:50:25 +0000 Subject: [PATCH 0595/1125] xenserver-core: Bump version to 0.10.0 Signed-off-by: Euan Harris --- SPECS/xenserver-core.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 86ec7ea6..2ac5b3c0 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core -Version: 0.9.0 -Release: 11 +Version: 0.10.0 +Release: 1 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other @@ -40,6 +40,9 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog +* Fri Nov 1 2013 Euan Harris +- Bump version to 0.10.0 + * Sun Oct 20 2013 David Scott - Remove xenopsd-xenlight since the build depends on xen-4.4 From a10198efed6a8a0bbd8170040684a665e03b8536 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2013 10:53:57 +0000 Subject: [PATCH 0596/1125] xenserver-core-latest-snapshot: Point to Akamai download Signed-off-by: Euan Harris --- SOURCES/fusion-release-xapi.repo | 8 ++++---- SPECS/xenserver-core-latest-snapshot.spec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo index 7fba7e22..93902550 100644 --- a/SOURCES/fusion-release-xapi.repo +++ b/SOURCES/fusion-release-xapi.repo @@ -1,13 +1,13 @@ [xapi] -name=CentOS-$releasever - xenserver core snapshot -baseurl=http://xenbits.xen.org/djs/xenserver-core-snapshot/RPMS/ +name=CentOS-$releasever - xenserver-core snapshot +baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/RPMS gpgcheck=0 Priority=1 enabled=1 [xapi-source] -name=CentOS-$releasever - xenserver core snapshot Source -baseurl=http://xenbits.xen.org/djs/xenserver-core-snapshot/SRPMS/ +name=CentOS-$releasever - xenserver-core snapshot Source +baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/SRPMS gpgcheck=0 Priority=1 enabled=0 diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index b6bdc1a9..5e0d3a3f 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -1,6 +1,6 @@ Name: xenserver-core-latest-snapshot Version: 0.1.0 -Release: 1 +Release: 2 Summary: Yum repositories for xenserver License: GPL Group: Development/Other From 95c4fba06343d4202d10e915cdf268915d6b72fc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2013 14:29:43 +0000 Subject: [PATCH 0597/1125] README: Add 'make install' to the instructions Signed-off-by: Euan Harris --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 92df2d1b..b75d8496 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,10 @@ cd xenserver-core ./configure.sh ./makemake.py > Makefile make +make install ``` + Debian-based distributions (experimental) ----------------------------------------- @@ -50,7 +52,7 @@ On Debian-based distributions, the packages are built using `pbuilder`. `pbuilder` is available in the main Ubuntu and Debian package repositories, so there is no need to add extra ones. `pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. -The build also depends on a more modern OCaml compiler, available from this PPA: +The build also depends on a more modern OCaml compiler than the version in Ubuntu, available from this PPA: ``` deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main @@ -65,4 +67,5 @@ cd xenserver-core ./configure.sh ./makemake.py > Makefile make +make install ``` From b54757a45fca677c67647073376a7d5b5e6d8e40 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2013 15:18:42 +0000 Subject: [PATCH 0598/1125] README: Update checkout URL Signed-off-by: Euan Harris --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b75d8496..61597508 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ su - You are now ready to clone the xenserver-core repository and build the packages: ``` -git clone git://github.com/xapi-project/xenserver-core.git +git clone git://github.com/xenserver/xenserver-core.git cd xenserver-core ./configure.sh @@ -61,7 +61,7 @@ deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main The steps to build Debian packages are the same as those to build RPMs: ``` -git clone git://github.com/xapi-project/xenserver-core.git +git clone git://github.com/xenserver/xenserver-core.git cd xenserver-core ./configure.sh From 316b5c6f18b259c8152da2c571291b788731d647 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Nov 2013 19:19:32 +0000 Subject: [PATCH 0599/1125] xenserver-core-latest-snapshot: Tweak download URLs Signed-off-by: Euan Harris --- SOURCES/fusion-release-xapi.repo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo index 93902550..d5884493 100644 --- a/SOURCES/fusion-release-xapi.repo +++ b/SOURCES/fusion-release-xapi.repo @@ -1,13 +1,13 @@ [xapi] name=CentOS-$releasever - xenserver-core snapshot -baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/RPMS +baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/CentOS-$releasever/RPMS gpgcheck=0 Priority=1 enabled=1 [xapi-source] name=CentOS-$releasever - xenserver-core snapshot Source -baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/SRPMS +baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/CentOS-$releasever/SRPMS gpgcheck=0 Priority=1 enabled=0 From 1ba9ba0b4a6186e513bd50a2ea4d37471d62aa7f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 5 Nov 2013 10:20:59 +0800 Subject: [PATCH 0600/1125] README: Add xenserver-install-wizard to the installation instructions Signed-off-by: Euan Harris --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 61597508..07c4580c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,13 @@ cd xenserver-core ./configure.sh ./makemake.py > Makefile make +``` + +Finally, install the packages you have just built, run the install wizard to configure your system to boot Xen and start the xenserver-core components on boot, then reboot: +``` make install +xenserver-install-wizard +reboot ``` @@ -67,5 +73,8 @@ cd xenserver-core ./configure.sh ./makemake.py > Makefile make + make install +xenserver-install-wizard +reboot ``` From 5326d34b4706196efa66750847ed1eaf644db83e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 16:52:27 +0000 Subject: [PATCH 0601/1125] Makefile: Add a trivial makefile which uses makemake to rebuild the dependency graph when needed Signed-off-by: Euan Harris --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..b550f09b --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +-include deps + +deps: SPECS/*.spec + ./makemake.py > $@ + From 9e3ee0dfe8bdc67288ccae0ddb68ae1b542a9e35 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 17:07:53 +0000 Subject: [PATCH 0602/1125] build: Move source -> binary make rules to static makefile makemake.py generated all makefile rules - both the dependencies and the recipes to generate the targets. The rules to build binary packages from source packages are easy to describe using pattern rules, so we don't need to generate these rules any more. Signed-off-by: Euan Harris --- Makefile | 22 +++++++++++++++++++++- makemake.py | 23 ----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index b550f09b..ff1befdb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,25 @@ -include deps -deps: SPECS/*.spec + +./RPMS/x86_64/%.x86_64.rpm: ./SRPMS/%.src.rpm + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS + + +./RPMS/noarch/%.noarch.rpm: ./SRPMS/%.src.rpm + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/noarch" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS + + +./RPMS/%_amd64.deb: ./SRPMS/%.dsc + @echo [COWBUILDER] $@ + sudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult ./RPMS $< + + +deps: SPECS/*.spec makemake.py ./makemake.py > $@ diff --git a/makemake.py b/makemake.py index c33504c4..cf94c793 100755 --- a/makemake.py +++ b/makemake.py @@ -214,29 +214,6 @@ def rpmNameFromHeader( h ): print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % ( url.path, dirname ) -# Rules to build RPMS from SRPMS (uses information from the SPECs to -# get packages) -for specname, spec in specs.iteritems(): - # This doesn't generate the right Makefile fragment for a multi-target - # rule - we may end up building too often, or not rebuilding correctly - # on a partial build - rpmnames = rpmNamesFromSpec( spec ) - srpmname = srpmNameFromSpec( spec ) - for r in rpmnames: - rpm_path = os.path.join( rpm_dir, r ) - srpm_path = os.path.join( srpm_dir, srpmname ) - rpm_outdir = os.path.dirname( rpm_path ) - print '%s: %s' % ( rpm_path, srpm_path ) - if buildType() == "rpm": - print '\t@echo [MOCK] $@' - print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir - print '\t@echo [CREATEREPO] $@' - print '\t@createrepo --quiet --update %s' % rpm_dir - - else: - print '\t@echo [COWBUILDER] $@' - print '\tsudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir - # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def flatten(lst): From c0ce0bd664cfedc0136c23609988a7dd4a758b59 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 17:15:38 +0000 Subject: [PATCH 0603/1125] make: Move sources -> source package rules to static Makefile Signed-off-by: Euan Harris --- Makefile | 10 ++++++++++ makemake.py | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ff1befdb..b6b970dc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ -include deps +./SRPMS/%.src.rpm: + @echo [RPMBUILD] $@ + @rpmbuild --quiet --define "_topdir ." -bs $< + + +./SRPMS/%.dsc: + @echo [MAKEDEB] $@ + scripts/deb/makedeb.py $< + + ./RPMS/x86_64/%.x86_64.rpm: ./SRPMS/%.src.rpm @echo [MOCK] $@ @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< diff --git a/makemake.py b/makemake.py index cf94c793..23e271a7 100755 --- a/makemake.py +++ b/makemake.py @@ -170,12 +170,6 @@ def rpmNameFromHeader( h ): print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), os.path.join( spec_dir, specname ), " ".join( sources ) ) - if buildType() == "rpm": - print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' - else: - print '\t@echo [MAKEDEB] $@' - print '\tscripts/deb/makedeb.py $<' # Rules to download sources From 11932da87f1075b9c25d2a68c48a2d6fff921bff Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 17:31:04 +0000 Subject: [PATCH 0604/1125] Makefile: make the dependency-regeneration rule prettier Signed-off-by: Euan Harris --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b6b970dc..e625ca66 100644 --- a/Makefile +++ b/Makefile @@ -31,5 +31,6 @@ deps: SPECS/*.spec makemake.py - ./makemake.py > $@ + @echo Updating dependencies... + @./makemake.py > $@ From d3fa874a842d7c0fab005518a59cfebd216084c2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 17:40:55 +0000 Subject: [PATCH 0605/1125] Makefile: move "all" target into Makefile Signed-off-by: Euan Harris --- Makefile | 3 ++- makemake.py | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e625ca66..c44e4d26 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ --include deps +all: rpms ./SRPMS/%.src.rpm: @echo [RPMBUILD] $@ @@ -34,3 +34,4 @@ deps: SPECS/*.spec makemake.py @echo Updating dependencies... @./makemake.py > $@ +-include deps diff --git a/makemake.py b/makemake.py index 23e271a7..0e14c532 100755 --- a/makemake.py +++ b/makemake.py @@ -14,6 +14,7 @@ import sys import mappkgname import platform +import glob def buildType(): debian_like = [ "ubuntu", "debian" ] @@ -72,8 +73,6 @@ def map_package_name(name): -print "all: rpms" - if buildType() == "rpm": rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) else: @@ -88,18 +87,18 @@ def specFromFile( spec ): print >>sys.stderr, "Failed to parse %s" % spec raise e -spec_names = os.listdir( spec_dir ) +spec_names = glob.glob( os.path.join( spec_dir, "*.spec" ) ) specs = {} for spec_name in spec_names: - spec = specFromFile( os.path.join( spec_dir, spec_name ) ) + spec = specFromFile( spec_name ) pkg_name = spec.sourceHeader['name'] if pkg_name in ignore_list[buildType()]: continue - if os.path.splitext( spec_name )[0] != pkg_name: + if os.path.splitext( os.path.basename(spec_name) )[0] != pkg_name: sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) sys.exit( 1 ) - specs[spec_name] = spec + specs[os.path.basename(spec_name)] = spec def srpmNameFromSpec( spec ): h = spec.sourceHeader From 32e7cbae220bc4823bbde90ae22d141c2bca7839 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Oct 2013 17:49:04 +0000 Subject: [PATCH 0606/1125] makemake: Don't strip spec file paths only to then re-add them Signed-off-by: Euan Harris --- makemake.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/makemake.py b/makemake.py index 0e14c532..fc3389f2 100755 --- a/makemake.py +++ b/makemake.py @@ -87,18 +87,18 @@ def specFromFile( spec ): print >>sys.stderr, "Failed to parse %s" % spec raise e -spec_names = glob.glob( os.path.join( spec_dir, "*.spec" ) ) +spec_paths = glob.glob( os.path.join( spec_dir, "*.spec" ) ) specs = {} -for spec_name in spec_names: - spec = specFromFile( spec_name ) +for spec_path in spec_paths: + spec = specFromFile( spec_path ) pkg_name = spec.sourceHeader['name'] if pkg_name in ignore_list[buildType()]: continue - if os.path.splitext( os.path.basename(spec_name) )[0] != pkg_name: - sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) + if os.path.splitext( os.path.basename(spec_path) )[0] != pkg_name: + sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_path, pkg_name ) ) sys.exit( 1 ) - specs[os.path.basename(spec_name)] = spec + specs[spec_path] = spec def srpmNameFromSpec( spec ): h = spec.sourceHeader @@ -143,7 +143,7 @@ def rpmNameFromHeader( h ): return [rpmNameFromHeader( p.header ) for p in spec.packages] # Rules to build SRPM from SPEC -for specname, spec in specs.iteritems(): +for spec_path, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) # spec.sourceHeader['sources'] and ['patches'] doesn't work @@ -167,15 +167,14 @@ def rpmNameFromHeader( h ): sources.append( os.path.join( src_dir, url.path ) ) print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), - os.path.join( spec_dir, specname ), - " ".join( sources ) ) + spec_path, " ".join( sources ) ) # Rules to download sources # Assumes each RPM only needs one download - we have some multi-source # packages but in all cases the additional sources are patches provided # in the Git repository -for specname, spec in specs.iteritems(): +for spec_path, spec in specs.iteritems(): # The RPM documentation says that RPM only cares about the basename # of the path given in a Source: tag. spec.sourceHeader['url'] # enforces this - even if we have a URL in the source tag, it @@ -189,8 +188,7 @@ def rpmNameFromHeader( h ): # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: print '%s: %s' % ( - os.path.join( src_dir, os.path.basename( url.path ) ), - os.path.join( spec_dir, specname ) ) + os.path.join( src_dir, os.path.basename( url.path ) ), spec_path ) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source @@ -198,8 +196,7 @@ def rpmNameFromHeader( h ): if url.scheme == "file": print '%s: %s $(shell find %s)' % ( os.path.join( src_dir, os.path.basename( url.fragment ) ), - os.path.join( spec_dir, specname ), - url.path ) + spec_path, url.path ) print '\t@echo [TAR] $@' # assume that the directory name is already what's expected by the # spec file, and tag it with the version number in the tarball @@ -220,13 +217,13 @@ def buildRequiresFromSpec( spec ): return set(flatten(reqs)) provides_to_rpm = {} -for specname, spec in specs.iteritems(): +for _, spec in specs.iteritems(): for package in spec.packages: for provided in set(flatten([map_package_name(r) for r in (package.header['provides'] + [package.header['name']])])): for rpmname in rpmNamesFromSpec( spec ): provides_to_rpm[ provided ] = rpmname -for specname, spec in specs.iteritems(): +for _, spec in specs.iteritems(): for rpmname in rpmNamesFromSpec( spec ): for buildreq in buildRequiresFromSpec( spec ): # Some buildrequires come from the system repository From 881f090125e53025ea30c459aa44312247663624 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 5 Nov 2013 17:49:54 +0800 Subject: [PATCH 0607/1125] Revert "Merge pull request #309 from euanh/makefile-refactoring" This reverts commit bf80f01b82c729eca2384c85f356f4e7c71b12ac, reversing changes made to 25cd277308c9350b08290a0c0952843faa9d74d3. Not quite ready yet... Signed-off-by: Euan Harris --- Makefile | 37 -------------------------------- makemake.py | 61 +++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 51 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index c44e4d26..00000000 --- a/Makefile +++ /dev/null @@ -1,37 +0,0 @@ - -all: rpms - -./SRPMS/%.src.rpm: - @echo [RPMBUILD] $@ - @rpmbuild --quiet --define "_topdir ." -bs $< - - -./SRPMS/%.dsc: - @echo [MAKEDEB] $@ - scripts/deb/makedeb.py $< - - -./RPMS/x86_64/%.x86_64.rpm: ./SRPMS/%.src.rpm - @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< - @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS - - -./RPMS/noarch/%.noarch.rpm: ./SRPMS/%.src.rpm - @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/noarch" $< - @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS - - -./RPMS/%_amd64.deb: ./SRPMS/%.dsc - @echo [COWBUILDER] $@ - sudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult ./RPMS $< - - -deps: SPECS/*.spec makemake.py - @echo Updating dependencies... - @./makemake.py > $@ - --include deps diff --git a/makemake.py b/makemake.py index fc3389f2..c33504c4 100755 --- a/makemake.py +++ b/makemake.py @@ -14,7 +14,6 @@ import sys import mappkgname import platform -import glob def buildType(): debian_like = [ "ubuntu", "debian" ] @@ -73,6 +72,8 @@ def map_package_name(name): +print "all: rpms" + if buildType() == "rpm": rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) else: @@ -87,18 +88,18 @@ def specFromFile( spec ): print >>sys.stderr, "Failed to parse %s" % spec raise e -spec_paths = glob.glob( os.path.join( spec_dir, "*.spec" ) ) +spec_names = os.listdir( spec_dir ) specs = {} -for spec_path in spec_paths: - spec = specFromFile( spec_path ) +for spec_name in spec_names: + spec = specFromFile( os.path.join( spec_dir, spec_name ) ) pkg_name = spec.sourceHeader['name'] if pkg_name in ignore_list[buildType()]: continue - if os.path.splitext( os.path.basename(spec_path) )[0] != pkg_name: - sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_path, pkg_name ) ) + if os.path.splitext( spec_name )[0] != pkg_name: + sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) sys.exit( 1 ) - specs[spec_path] = spec + specs[spec_name] = spec def srpmNameFromSpec( spec ): h = spec.sourceHeader @@ -143,7 +144,7 @@ def rpmNameFromHeader( h ): return [rpmNameFromHeader( p.header ) for p in spec.packages] # Rules to build SRPM from SPEC -for spec_path, spec in specs.iteritems(): +for specname, spec in specs.iteritems(): srpmname = srpmNameFromSpec( spec ) # spec.sourceHeader['sources'] and ['patches'] doesn't work @@ -167,14 +168,21 @@ def rpmNameFromHeader( h ): sources.append( os.path.join( src_dir, url.path ) ) print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), - spec_path, " ".join( sources ) ) + os.path.join( spec_dir, specname ), + " ".join( sources ) ) + if buildType() == "rpm": + print '\t@echo [RPMBUILD] $@' + print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' + else: + print '\t@echo [MAKEDEB] $@' + print '\tscripts/deb/makedeb.py $<' # Rules to download sources # Assumes each RPM only needs one download - we have some multi-source # packages but in all cases the additional sources are patches provided # in the Git repository -for spec_path, spec in specs.iteritems(): +for specname, spec in specs.iteritems(): # The RPM documentation says that RPM only cares about the basename # of the path given in a Source: tag. spec.sourceHeader['url'] # enforces this - even if we have a URL in the source tag, it @@ -188,7 +196,8 @@ def rpmNameFromHeader( h ): # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: print '%s: %s' % ( - os.path.join( src_dir, os.path.basename( url.path ) ), spec_path ) + os.path.join( src_dir, os.path.basename( url.path ) ), + os.path.join( spec_dir, specname ) ) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source @@ -196,7 +205,8 @@ def rpmNameFromHeader( h ): if url.scheme == "file": print '%s: %s $(shell find %s)' % ( os.path.join( src_dir, os.path.basename( url.fragment ) ), - spec_path, url.path ) + os.path.join( spec_dir, specname ), + url.path ) print '\t@echo [TAR] $@' # assume that the directory name is already what's expected by the # spec file, and tag it with the version number in the tarball @@ -204,6 +214,29 @@ def rpmNameFromHeader( h ): print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % ( url.path, dirname ) +# Rules to build RPMS from SRPMS (uses information from the SPECs to +# get packages) +for specname, spec in specs.iteritems(): + # This doesn't generate the right Makefile fragment for a multi-target + # rule - we may end up building too often, or not rebuilding correctly + # on a partial build + rpmnames = rpmNamesFromSpec( spec ) + srpmname = srpmNameFromSpec( spec ) + for r in rpmnames: + rpm_path = os.path.join( rpm_dir, r ) + srpm_path = os.path.join( srpm_dir, srpmname ) + rpm_outdir = os.path.dirname( rpm_path ) + print '%s: %s' % ( rpm_path, srpm_path ) + if buildType() == "rpm": + print '\t@echo [MOCK] $@' + print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\t@echo [CREATEREPO] $@' + print '\t@createrepo --quiet --update %s' % rpm_dir + + else: + print '\t@echo [COWBUILDER] $@' + print '\tsudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir + # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def flatten(lst): @@ -217,13 +250,13 @@ def buildRequiresFromSpec( spec ): return set(flatten(reqs)) provides_to_rpm = {} -for _, spec in specs.iteritems(): +for specname, spec in specs.iteritems(): for package in spec.packages: for provided in set(flatten([map_package_name(r) for r in (package.header['provides'] + [package.header['name']])])): for rpmname in rpmNamesFromSpec( spec ): provides_to_rpm[ provided ] = rpmname -for _, spec in specs.iteritems(): +for specname, spec in specs.iteritems(): for rpmname in rpmNamesFromSpec( spec ): for buildreq in buildRequiresFromSpec( spec ): # Some buildrequires come from the system repository From 239180c7d2057ca19ccb4cc32606579d3a9ab9cf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 10:37:48 +0800 Subject: [PATCH 0608/1125] makemake: Fix pylint whitespace warnings Signed-off-by: Euan Harris --- makemake.py | 186 ++++++++++++++++++++++++++++------------------------ 1 file changed, 100 insertions(+), 86 deletions(-) diff --git a/makemake.py b/makemake.py index c33504c4..d998cee8 100755 --- a/makemake.py +++ b/makemake.py @@ -16,8 +16,8 @@ import platform def buildType(): - debian_like = [ "ubuntu", "debian" ] - rhel_like = [ "fedora", "redhat", "centos" ] + debian_like = ["ubuntu", "debian"] + rhel_like = ["fedora", "redhat", "centos"] distribution = platform.linux_distribution()[0].lower() assert distribution in debian_like + rhel_like @@ -36,14 +36,14 @@ def map_package_name(name): # for debugging, make all paths relative to PWD -rpm.addMacro( '_topdir', '.' ) +rpm.addMacro('_topdir', '.') # Directories where rpmbuild/mock expects to find inputs # and writes outputs -rpm_dir = rpm.expandMacro( '%_rpmdir' ) -spec_dir = rpm.expandMacro( '%_specdir' ) -srpm_dir = rpm.expandMacro( '%_srcrpmdir' ) -src_dir = rpm.expandMacro( '%_sourcedir' ) +rpm_dir = rpm.expandMacro('%_rpmdir') +spec_dir = rpm.expandMacro('%_specdir') +srpm_dir = rpm.expandMacro('%_srcrpmdir') +src_dir = rpm.expandMacro('%_sourcedir') # Some RPMs include the value of '%dist' in the release part of the # filename. In the mock chroot, %dist is set to a CentOS release @@ -61,52 +61,54 @@ def map_package_name(name): # Annoyingly, the dist interpolation is done when we read the specfile, # so we either have to read it twice or rewrite the SRPM name appropriately. -host_dist = rpm.expandMacro( '%dist' ) +host_dist = rpm.expandMacro('%dist') # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" chroot_dist = '.el6' if buildType() == "rpm": - rpm.addMacro( 'dist', chroot_dist ) + rpm.addMacro('dist', chroot_dist) else: - rpm.addMacro( 'dist', "" ) + rpm.addMacro('dist', "") print "all: rpms" if buildType() == "rpm": - rpmfilenamepat = rpm.expandMacro( '%_build_name_fmt' ) + rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') else: rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" ts = rpm.TransactionSet() -def specFromFile( spec ): +def specFromFile(spec): try: - return rpm.ts().parseSpec( spec ) + return rpm.ts().parseSpec(spec) except Exception, e: - print >>sys.stderr, "Failed to parse %s" % spec - raise e + print >> sys.stderr, "Failed to parse %s" % spec + raise e -spec_names = os.listdir( spec_dir ) +spec_names = os.listdir(spec_dir) specs = {} for spec_name in spec_names: - spec = specFromFile( os.path.join( spec_dir, spec_name ) ) + spec = specFromFile(os.path.join(spec_dir, spec_name)) pkg_name = spec.sourceHeader['name'] if pkg_name in ignore_list[buildType()]: continue - if os.path.splitext( spec_name )[0] != pkg_name: - sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % ( spec_name, pkg_name ) ) - sys.exit( 1 ) + if os.path.splitext(spec_name)[0] != pkg_name: + sys.stderr.write( + "error: spec file name '%s' does not match package name '%s'\n" % + (spec_name, pkg_name)) + sys.exit(1) specs[spec_name] = spec -def srpmNameFromSpec( spec ): +def srpmNameFromSpec(spec): h = spec.sourceHeader rpm.addMacro('NAME', map_package_name(h['name'])[0]) - rpm.addMacro( 'VERSION', h['version'] ) - rpm.addMacro( 'RELEASE', h['release'] ) - rpm.addMacro( 'ARCH', 'src' ) + rpm.addMacro('VERSION', h['version']) + rpm.addMacro('RELEASE', h['release']) + rpm.addMacro('ARCH', 'src') # There doesn't seem to be a macro for the name of the source # rpm, but the name appears to be the same as the rpm name format. @@ -114,38 +116,42 @@ def srpmNameFromSpec( spec ): # don't want, so we strip that off if buildType() == "rpm": - srpmname = os.path.basename( rpm.expandMacro( rpmfilenamepat ) ) + srpmname = os.path.basename(rpm.expandMacro(rpmfilenamepat)) else: - srpmname = os.path.basename( rpm.expandMacro( "%{NAME}_%{VERSION}-%{RELEASE}.dsc" ) ) + srpmname = os.path.basename( + rpm.expandMacro("%{NAME}_%{VERSION}-%{RELEASE}.dsc")) - rpm.delMacro( 'NAME' ) - rpm.delMacro( 'VERSION' ) - rpm.delMacro( 'RELEASE' ) - rpm.delMacro( 'ARCH' ) + rpm.delMacro('NAME') + rpm.delMacro('VERSION') + rpm.delMacro('RELEASE') + rpm.delMacro('ARCH') # HACK: rewrite %dist if it appears in the filename - return srpmname.replace( chroot_dist, host_dist ) + return srpmname.replace(chroot_dist, host_dist) -def rpmNamesFromSpec( spec ): - def rpmNameFromHeader( h ): +def rpmNamesFromSpec(spec): + def rpmNameFromHeader(h): rpm.addMacro('NAME', map_package_name(h['name'])[0]) - rpm.addMacro( 'VERSION', h['version'] ) - rpm.addMacro( 'RELEASE', h['release'] ) + rpm.addMacro('VERSION', h['version']) + rpm.addMacro('RELEASE', h['release']) if buildType() == "rpm": - rpm.addMacro( 'ARCH', h['arch'] ) + rpm.addMacro('ARCH', h['arch']) else: - rpm.addMacro( 'ARCH', "amd64" if h['arch'] == "x86_64" else "all" if h['arch'] == "noarch" else h['arch']) - rpmname = rpm.expandMacro( rpmfilenamepat ) - rpm.delMacro( 'NAME' ) - rpm.delMacro( 'VERSION' ) - rpm.delMacro( 'RELEASE' ) - rpm.delMacro( 'ARCH' ) + rpm.addMacro( + 'ARCH', "amd64" if h['arch'] == "x86_64" + else "all" if h['arch'] == "noarch" + else h['arch']) + rpmname = rpm.expandMacro(rpmfilenamepat) + rpm.delMacro('NAME') + rpm.delMacro('VERSION') + rpm.delMacro('RELEASE') + rpm.delMacro('ARCH') return rpmname - return [rpmNameFromHeader( p.header ) for p in spec.packages] + return [rpmNameFromHeader(p.header) for p in spec.packages] # Rules to build SRPM from SPEC for specname, spec in specs.iteritems(): - srpmname = srpmNameFromSpec( spec ) + srpmname = srpmNameFromSpec(spec) # spec.sourceHeader['sources'] and ['patches'] doesn't work # in RPM 4.8 on CentOS 6.4. spec.sources contains both @@ -153,23 +159,24 @@ def rpmNameFromHeader( h ): # chopped. sources = [] for (source, _, _) in spec.sources: - url = urlparse.urlparse( source ) + url = urlparse.urlparse(source) # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: - sources.append( os.path.join( src_dir, os.path.basename( url.path ) ) ) + sources.append(os.path.join(src_dir, os.path.basename(url.path))) # Source comes from a local file or directory if url.scheme == "file": - sources.append( os.path.join( src_dir, os.path.basename( url.fragment ) ) ) + sources.append( + os.path.join(src_dir, os.path.basename(url.fragment))) # Source is an otherwise unqualified file, probably a patch if url.scheme == "": - sources.append( os.path.join( src_dir, url.path ) ) + sources.append(os.path.join(src_dir, url.path)) - print '%s: %s %s' % (os.path.join( srpm_dir, srpmname ), - os.path.join( spec_dir, specname ), - " ".join( sources ) ) + print '%s: %s %s' % (os.path.join(srpm_dir, srpmname), + os.path.join(spec_dir, specname), + " ".join(sources)) if buildType() == "rpm": print '\t@echo [RPMBUILD] $@' print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' @@ -191,27 +198,29 @@ def rpmNameFromHeader( h ): # can rely on this as part of the RPM library API. for (source, _, _) in spec.sources: - url = urlparse.urlparse( source ) + url = urlparse.urlparse(source) # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: - print '%s: %s' % ( - os.path.join( src_dir, os.path.basename( url.path ) ), - os.path.join( spec_dir, specname ) ) + print '%s: %s' % ( + os.path.join(src_dir, os.path.basename(url.path)), + os.path.join(spec_dir, specname)) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source # Source comes from a local file or directory if url.scheme == "file": - print '%s: %s $(shell find %s)' % ( - os.path.join( src_dir, os.path.basename( url.fragment ) ), - os.path.join( spec_dir, specname ), - url.path ) + print '%s: %s $(shell find %s)' % ( + os.path.join(src_dir, os.path.basename(url.fragment)), + os.path.join(spec_dir, specname), + url.path) print '\t@echo [TAR] $@' # assume that the directory name is already what's expected by the # spec file, and tag it with the version number in the tarball - dirname = "%s-%s" % ( os.path.basename( url.path ), spec.sourceHeader['version'] ) - print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % ( url.path, dirname ) + dirname = "%s-%s" % (os.path.basename(url.path), + spec.sourceHeader['version']) + print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % (url.path, + dirname) # Rules to build RPMS from SRPMS (uses information from the SPECs to @@ -220,66 +229,71 @@ def rpmNameFromHeader( h ): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly # on a partial build - rpmnames = rpmNamesFromSpec( spec ) - srpmname = srpmNameFromSpec( spec ) + rpmnames = rpmNamesFromSpec(spec) + srpmname = srpmNameFromSpec(spec) for r in rpmnames: - rpm_path = os.path.join( rpm_dir, r ) - srpm_path = os.path.join( srpm_dir, srpmname ) - rpm_outdir = os.path.dirname( rpm_path ) - print '%s: %s' % ( rpm_path, srpm_path ) + rpm_path = os.path.join(rpm_dir, r) + srpm_path = os.path.join(srpm_dir, srpmname) + rpm_outdir = os.path.dirname(rpm_path) + print '%s: %s' % (rpm_path, srpm_path) if buildType() == "rpm": print '\t@echo [MOCK] $@' - print '\t@mock --configdir=mock --quiet -r xenserver --resultdir="%s" $<' % rpm_outdir + print '\t@mock --configdir=mock --quiet -r xenserver '\ + '--resultdir="%s" $<' % rpm_outdir print '\t@echo [CREATEREPO] $@' print '\t@createrepo --quiet --update %s' % rpm_dir else: print '\t@echo [COWBUILDER] $@' - print '\tsudo cowbuilder --build --configfile pbuilder/pbuilderrc-raring-amd64 --buildresult %s $<' % rpm_outdir + print '\tsudo cowbuilder --build '\ + '--configfile pbuilder/pbuilderrc-raring-amd64 '\ + '--buildresult %s $<' % rpm_outdir # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def flatten(lst): res = [] for li in lst: - res += li + res += li return res -def buildRequiresFromSpec( spec ): +def buildRequiresFromSpec(spec): reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] return set(flatten(reqs)) provides_to_rpm = {} for specname, spec in specs.iteritems(): for package in spec.packages: - for provided in set(flatten([map_package_name(r) for r in (package.header['provides'] + [package.header['name']])])): - for rpmname in rpmNamesFromSpec( spec ): - provides_to_rpm[ provided ] = rpmname + provides = package.header['provides'] + [package.header['name']] + for provided in set(flatten([map_package_name(r) for r in provides])): + + for rpmname in rpmNamesFromSpec(spec): + provides_to_rpm[provided] = rpmname for specname, spec in specs.iteritems(): - for rpmname in rpmNamesFromSpec( spec ): - for buildreq in buildRequiresFromSpec( spec ): + for rpmname in rpmNamesFromSpec(spec): + for buildreq in buildRequiresFromSpec(spec): # Some buildrequires come from the system repository - if provides_to_rpm.has_key( buildreq ): + if provides_to_rpm.has_key(buildreq): buildreqrpm = provides_to_rpm[buildreq] - print "%s: %s" % (os.path.join( rpm_dir, rpmname ), - os.path.join( rpm_dir, buildreqrpm ) ) + print "%s: %s" % (os.path.join(rpm_dir, rpmname), + os.path.join(rpm_dir, buildreqrpm)) # Generate targets to build all srpms and all rpms -all_srpms = [ os.path.join( srpm_dir, srpmNameFromSpec( s ) ) - for s in specs.values() ] +all_srpms = [os.path.join(srpm_dir, srpmNameFromSpec(s)) + for s in specs.values()] all_rpms = [] for spec in specs.values(): - rpms = rpmNamesFromSpec( spec ) - rpm_paths = map( (lambda rpm: os.path.join( rpm_dir, rpm )), rpms ) + rpms = rpmNamesFromSpec(spec) + rpm_paths = map((lambda rpm: os.path.join(rpm_dir, rpm)), rpms) all_rpms += rpm_paths - print "%s: %s" % ( spec.sourceHeader['name'], " ".join( rpm_paths ) ) + print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) -print "rpms: " + " \\\n\t".join( all_rpms ) -print "srpms: " + " \\\n\t".join( all_srpms ) +print "rpms: " + " \\\n\t".join(all_rpms) +print "srpms: " + " \\\n\t".join(all_srpms) print "install: all" From 7e74871d5c1fb0cfb06bcc3bbdd276d6a711fe03 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 8 Nov 2013 02:06:23 +0000 Subject: [PATCH 0609/1125] xcp-sm: Update rules and script to work on Ubuntu Ubuntu's udev no longer recognises the deprecated 'BUS' tag, and it installs scsi_id in /lib/udev rather than in /usr/sbin. Signed-off-by: Euan Harris --- SOURCES/xcp-mpath-scsidev-rules | 10 +++++----- SOURCES/xcp-mpath-scsidev-script | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/SOURCES/xcp-mpath-scsidev-rules b/SOURCES/xcp-mpath-scsidev-rules index d460f4ce..f9e842ec 100644 --- a/SOURCES/xcp-mpath-scsidev-rules +++ b/SOURCES/xcp-mpath-scsidev-rules @@ -1,5 +1,5 @@ -KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode session %n", SYMLINK+="%c" -KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode serial %n", SYMLINK+="%c" -KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode base %n", SYMLINK+="%c" -KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bybus %n", SYMLINK+="%c" -KERNEL=="sd*", BUS=="scsi", DRIVER=="sd", WAIT_FOR_SYSFS="dev", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bympp %n", SYMLINK+="%c" +KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode session %n", SYMLINK+="%c" +KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode serial %n", SYMLINK+="%c" +KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode base %n", SYMLINK+="%c" +KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bybus %n", SYMLINK+="%c" +KERNEL=="sd*", SUBSYSTEMS=="scsi", DRIVER=="sd", WAIT_FOR_SYSFS="dev", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bympp %n", SYMLINK+="%c" diff --git a/SOURCES/xcp-mpath-scsidev-script b/SOURCES/xcp-mpath-scsidev-script index 31cf0e88..8eaa36ea 100755 --- a/SOURCES/xcp-mpath-scsidev-script +++ b/SOURCES/xcp-mpath-scsidev-script @@ -7,6 +7,8 @@ NODE=${3} OUT=${4} LUN=`echo $BUS | cut -d: -f4` +export PATH=/lib/udev:$PATH + # The required files are located in an extra layer of directories in 3.x kernels kernel=`uname -r | cut -d. -f1-2` case $kernel in @@ -53,7 +55,7 @@ if [ $# -gt 5 -o $# -lt 4 ]; then fi if [[ $OUT == "scsi_bybus" && -z ${5} ]]; then - SCSIID=`/sbin/scsi_id -g -u -s /block/$2` + SCSIID=`scsi_id -g -u -s /block/$2` if [ $? == 0 ]; then echo "disk/by-scsibus/${SCSIID}-%b disk/by-scsid/${SCSIID}/$2" fi @@ -69,7 +71,7 @@ if [ $driver == "mpp" ]; then array=`/opt/xensource/bin/xe-getarrayidentifier ${NODE}` id=`/usr/sbin/mppUtil -a | grep ${array} | awk '{print $1}'` if [[ $OUT == "scsi_bympp" && -z ${5} ]]; then - SCSIID=`/sbin/scsi_id -g -u -s /block/$2` + SCSIID=`scsi_id -g -u -s /block/$2` if [ $? == 0 ]; then #lunnum=`/opt/xensource/bin/xe-getlunidentifier ${NODE}` #lunid=`/usr/sbin/mppUtil -g ${id} | grep ${lunnum} | awk '{gsub(/#/,"");print $2}'` From 6768cb49add3b767e31c68afc62c2554efecc3f1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 8 Nov 2013 07:11:35 +0000 Subject: [PATCH 0610/1125] xcp-sm: Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index aecdd2bd..ccad9ae6 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,7 +2,7 @@ Summary: sm - XCP storage managers Name: xcp-sm -Version: 0.9.5 +Version: 0.9.6 Release: 1 Group: System/Hypervisor License: LGPL @@ -264,6 +264,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Fri Nov 8 2013 Euan Harris +- Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu + * Mon Oct 28 2013 Euan Harris - Update to 0.9.5, adding udev scripts and package dependencies needed to use iSCSI volumes From 39a514a416f14c37043348350dea6fd6bff566dd Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 14 Nov 2013 17:34:42 +0000 Subject: [PATCH 0611/1125] Remove hardwired url patterns from inputs --- scripts/deb/install.sh | 5 ++++- scripts/deb/xapi.list.in | 4 ++-- scripts/rpm/install.sh | 5 ++++- scripts/rpm/xapi.repo.in | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 6cff16d4..6c6512b9 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -4,7 +4,10 @@ install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list # Configure the local machine to install packages built in this workspace -sed -e "s,@PWD@,$PWD,g" scripts/deb/xapi.list.in > scripts/deb/xapi.list +sed \ + -e "s,@DEBURL@,file:$PWD/RPMS/,g" \ + -e "s,@DEBSRCURL@,file:$PWD/SRPMS/,g" \ + scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list # Configure apt to prefer packages from the local repository diff --git a/scripts/deb/xapi.list.in b/scripts/deb/xapi.list.in index 104942d2..0f6b923c 100644 --- a/scripts/deb/xapi.list.in +++ b/scripts/deb/xapi.list.in @@ -1,2 +1,2 @@ -deb file:@PWD@/RPMS/ ./ -deb-src file:@PWD@/SRPMS/ ./ +deb @DEBURL@ ./ +deb-src @DEBSRCURL@ ./ diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index a3cbba45..9c41a876 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -2,7 +2,10 @@ # Configure the local machine to install packages built in this working directory -sed -e "s,@BASEDIR@,$PWD,g" scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo +sed \ + -e "s,@XAPIBASEURL@,file://$PWD/RPMS/,g" \ + -e "s,@XAPISRCBASEURL@,file://$PWD/SRPMS/,g" \ + scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo #install -m 0644 scripts/rpm/xen-c6.repo /etc/yum.repos.d/xen-c6.repo diff --git a/scripts/rpm/xapi.repo.in b/scripts/rpm/xapi.repo.in index 6eec4269..2315ebeb 100644 --- a/scripts/rpm/xapi.repo.in +++ b/scripts/rpm/xapi.repo.in @@ -1,13 +1,13 @@ [xapi] name=CentOS-$releasever - xenserver-core -baseurl=file://@BASEDIR@/RPMS/ +baseurl=@XAPIBASEURL@ gpgcheck=0 Priority=1 enabled=1 [xapi-source] name=CentOS-$releasever - xenserver-core Source -baseurl=file://@BASEDIR@/SRPMS +baseurl=@XAPISRCBASEURL@ gpgcheck=0 Priority=1 enabled=0 From 77d015036ef16e73af298b36e7fc99ddb2b872c1 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 14 Nov 2013 17:43:17 +0000 Subject: [PATCH 0612/1125] Override repositories with environment variables --- scripts/deb/install.sh | 4 ++-- scripts/rpm/install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 6c6512b9..75fedc24 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -5,8 +5,8 @@ install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list # Configure the local machine to install packages built in this workspace sed \ - -e "s,@DEBURL@,file:$PWD/RPMS/,g" \ - -e "s,@DEBSRCURL@,file:$PWD/SRPMS/,g" \ + -e "s,@DEBURL@,${DEBURL:-file:$PWD/RPMS/},g" \ + -e "s,@DEBSRCURL@,${DEBSRCURL:-file:$PWD/SRPMS/},g" \ scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index 9c41a876..6885a8aa 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -3,8 +3,8 @@ # Configure the local machine to install packages built in this working directory sed \ - -e "s,@XAPIBASEURL@,file://$PWD/RPMS/,g" \ - -e "s,@XAPISRCBASEURL@,file://$PWD/SRPMS/,g" \ + -e "s,@XAPIBASEURL@,${XAPIBASEURL:-file://$PWD/RPMS/},g" \ + -e "s,@XAPISRCBASEURL@,${XAPISRCBASEURL:-file://$PWD/SRPMS/},g" \ scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo From b122328b375557f75159bdad41ee0ea89318f269 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Fri, 15 Nov 2013 09:17:06 +0000 Subject: [PATCH 0613/1125] Extract variables --- scripts/deb/install.sh | 7 +++++-- scripts/rpm/install.sh | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 75fedc24..699d2973 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -3,10 +3,13 @@ # Add the OCaml 4 PPA install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list +DEBURL=${DEBURL:-file:$PWD/RPMS/} +DEBSRCURL=${DEBSRCURL:-file:$PWD/SRPMS/} + # Configure the local machine to install packages built in this workspace sed \ - -e "s,@DEBURL@,${DEBURL:-file:$PWD/RPMS/},g" \ - -e "s,@DEBSRCURL@,${DEBSRCURL:-file:$PWD/SRPMS/},g" \ + -e "s,@DEBURL@,${DEBURL},g" \ + -e "s,@DEBSRCURL@,${DEBSRCURL},g" \ scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index 6885a8aa..0679f811 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -2,9 +2,12 @@ # Configure the local machine to install packages built in this working directory +XAPIBASEURL=${XAPIBASEURL:-file://$PWD/RPMS/} +XAPISRCBASEURL=${XAPISRCBASEURL:-file://$PWD/SRPMS/} + sed \ - -e "s,@XAPIBASEURL@,${XAPIBASEURL:-file://$PWD/RPMS/},g" \ - -e "s,@XAPISRCBASEURL@,${XAPISRCBASEURL:-file://$PWD/SRPMS/},g" \ + -e "s,@XAPIBASEURL@,${XAPISRCBASEURL},g" \ + -e "s,@XAPISRCBASEURL@,${XAPISRCBASEURL},g" \ scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo From 2c483e6d49d9f4d80f4ef52c91fd2eae4cf5c04a Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Fri, 15 Nov 2013 09:19:33 +0000 Subject: [PATCH 0614/1125] Rename variables The same environment variables could be used for both deb and rpm packages: PKG_REPO_LOCATION SRC_REPO_LOCATION --- scripts/deb/install.sh | 4 ++-- scripts/rpm/install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 699d2973..f437a028 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -3,8 +3,8 @@ # Add the OCaml 4 PPA install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list -DEBURL=${DEBURL:-file:$PWD/RPMS/} -DEBSRCURL=${DEBSRCURL:-file:$PWD/SRPMS/} +DEBURL=${PKG_REPO_LOCATION:-file:$PWD/RPMS/} +DEBSRCURL=${SRC_REPO_LOCATION:-file:$PWD/SRPMS/} # Configure the local machine to install packages built in this workspace sed \ diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index 0679f811..75e0c0ec 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -2,8 +2,8 @@ # Configure the local machine to install packages built in this working directory -XAPIBASEURL=${XAPIBASEURL:-file://$PWD/RPMS/} -XAPISRCBASEURL=${XAPISRCBASEURL:-file://$PWD/SRPMS/} +XAPIBASEURL=${PKG_REPO_LOCATION:-file://$PWD/RPMS/} +XAPISRCBASEURL=${SRC_REPO_LOCATION:-file://$PWD/SRPMS/} sed \ -e "s,@XAPIBASEURL@,${XAPISRCBASEURL},g" \ From 63e1d316651bd6c9d4145e10eaf1aeea0cfb317f Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Fri, 15 Nov 2013 09:38:03 +0000 Subject: [PATCH 0615/1125] Fix bad variable name --- scripts/rpm/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index 75e0c0ec..a5ae8fea 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -6,7 +6,7 @@ XAPIBASEURL=${PKG_REPO_LOCATION:-file://$PWD/RPMS/} XAPISRCBASEURL=${SRC_REPO_LOCATION:-file://$PWD/SRPMS/} sed \ - -e "s,@XAPIBASEURL@,${XAPISRCBASEURL},g" \ + -e "s,@XAPIBASEURL@,${XAPIBASEURL},g" \ -e "s,@XAPISRCBASEURL@,${XAPISRCBASEURL},g" \ scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo From 7ee38c6ca7d84e179bc74fd7edcd330668247321 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Fri, 15 Nov 2013 12:13:15 +0000 Subject: [PATCH 0616/1125] Templated debian preferences If the repo location is an URL, the debian preference file need to refer to the hostname. --- scripts/deb/install.sh | 10 +++++++++- scripts/deb/{xapi.pref => xapi.pref.in} | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) rename scripts/deb/{xapi.pref => xapi.pref.in} (55%) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index f437a028..377abcc9 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -6,6 +6,11 @@ install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list DEBURL=${PKG_REPO_LOCATION:-file:$PWD/RPMS/} DEBSRCURL=${SRC_REPO_LOCATION:-file:$PWD/SRPMS/} +REPOHOST="" +if [[ "$DEBURL" =~ ^http://.* ]]; then + REPOHOST=$(echo "$DEBURL" | sed -e 's,^http://\([^/]*\)/.*$,\1,g') +fi + # Configure the local machine to install packages built in this workspace sed \ -e "s,@DEBURL@,${DEBURL},g" \ @@ -13,7 +18,10 @@ sed \ scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list -# Configure apt to prefer packages from the local repository +# Configure apt to prefer packages from the xenserver-core repository +sed \ + -e "s,@REPOHOST@,${REPOHOST},g" \ + scripts/deb/xapi.pref.in > scripts/deb/xapi.pref install -m 0644 scripts/deb/xapi.pref /etc/apt/preferences.d/xapi (cd RPMS && apt-ftparchive packages . > Packages) diff --git a/scripts/deb/xapi.pref b/scripts/deb/xapi.pref.in similarity index 55% rename from scripts/deb/xapi.pref rename to scripts/deb/xapi.pref.in index ea045fb7..8d8f8b2e 100644 --- a/scripts/deb/xapi.pref +++ b/scripts/deb/xapi.pref.in @@ -1,4 +1,4 @@ Package: * -Pin: origin "" +Pin: origin "@REPOHOST@" Pin-Priority: 1500 From 3391847996661af547881cbe791f3b38a4e84241 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 15:30:23 +0800 Subject: [PATCH 0617/1125] makemake: Fix Pylint naming warnings Signed-off-by: Euan Harris --- makemake.py | 205 +++++++++++++++++++++++++++------------------------- 1 file changed, 107 insertions(+), 98 deletions(-) diff --git a/makemake.py b/makemake.py index d998cee8..0673aa8f 100755 --- a/makemake.py +++ b/makemake.py @@ -5,17 +5,18 @@ import sys sys.path.append("scripts/lib") -ignore_list = {"rpm":["libxl-headers","libnl3"], - "deb":["libnl3"]} - -import rpm -import os -import urlparse -import sys import mappkgname +import os import platform +import rpm +import urlparse -def buildType(): + +IGNORE_LIST = {"rpm":["libxl-headers","libnl3"], + "deb":["libnl3"]} + + +def build_type(): debian_like = ["ubuntu", "debian"] rhel_like = ["fedora", "redhat", "centos"] @@ -27,23 +28,24 @@ def buildType(): elif distribution in rhel_like: return "rpm" + def map_package_name(name): - if buildType() == "rpm": + if build_type() == "rpm": return [name] else: return mappkgname.map_package(name) - # for debugging, make all paths relative to PWD rpm.addMacro('_topdir', '.') # Directories where rpmbuild/mock expects to find inputs # and writes outputs -rpm_dir = rpm.expandMacro('%_rpmdir') -spec_dir = rpm.expandMacro('%_specdir') -srpm_dir = rpm.expandMacro('%_srcrpmdir') -src_dir = rpm.expandMacro('%_sourcedir') +RPMDIR = rpm.expandMacro('%_rpmdir') +SPECDIR = rpm.expandMacro('%_specdir') +SRPMDIR = rpm.expandMacro('%_srcrpmdir') +SRCDIR = rpm.expandMacro('%_sourcedir') + # Some RPMs include the value of '%dist' in the release part of the # filename. In the mock chroot, %dist is set to a CentOS release @@ -61,39 +63,38 @@ def map_package_name(name): # Annoyingly, the dist interpolation is done when we read the specfile, # so we either have to read it twice or rewrite the SRPM name appropriately. -host_dist = rpm.expandMacro('%dist') +HOST_DIST = rpm.expandMacro('%dist') # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" -chroot_dist = '.el6' -if buildType() == "rpm": - rpm.addMacro('dist', chroot_dist) +CHROOT_DIST = '.el6' +if build_type() == "rpm": + rpm.addMacro('dist', CHROOT_DIST) else: rpm.addMacro('dist', "") - print "all: rpms" -if buildType() == "rpm": - rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') +if build_type() == "rpm": + RPMFILENAMEPAT = rpm.expandMacro('%_build_name_fmt') else: - rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" + RPMFILENAMEPAT = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" -ts = rpm.TransactionSet() -def specFromFile(spec): +def spec_from_file(spec): try: return rpm.ts().parseSpec(spec) - except Exception, e: + except Exception, exn: print >> sys.stderr, "Failed to parse %s" % spec - raise e + raise exn + -spec_names = os.listdir(spec_dir) -specs = {} -for spec_name in spec_names: - spec = specFromFile(os.path.join(spec_dir, spec_name)) +SPEC_NAMES = os.listdir(SPECDIR) +SPECS = {} +for spec_name in SPEC_NAMES: + spec = spec_from_file(os.path.join(SPECDIR, spec_name)) pkg_name = spec.sourceHeader['name'] - if pkg_name in ignore_list[buildType()]: + if pkg_name in IGNORE_LIST[build_type()]: continue if os.path.splitext(spec_name)[0] != pkg_name: sys.stderr.write( @@ -101,13 +102,14 @@ def specFromFile(spec): (spec_name, pkg_name)) sys.exit(1) - specs[spec_name] = spec + SPECS[spec_name] = spec -def srpmNameFromSpec(spec): - h = spec.sourceHeader - rpm.addMacro('NAME', map_package_name(h['name'])[0]) - rpm.addMacro('VERSION', h['version']) - rpm.addMacro('RELEASE', h['release']) + +def srpm_name_from_spec(spec): + hdr = spec.sourceHeader + rpm.addMacro('NAME', map_package_name(hdr['name'])[0]) + rpm.addMacro('VERSION', hdr['version']) + rpm.addMacro('RELEASE', hdr['release']) rpm.addMacro('ARCH', 'src') # There doesn't seem to be a macro for the name of the source @@ -115,8 +117,8 @@ def srpmNameFromSpec(spec): # Unfortunately expanding that macro gives us a leading 'src' that we # don't want, so we strip that off - if buildType() == "rpm": - srpmname = os.path.basename(rpm.expandMacro(rpmfilenamepat)) + if build_type() == "rpm": + srpmname = os.path.basename(rpm.expandMacro(RPMFILENAMEPAT)) else: srpmname = os.path.basename( rpm.expandMacro("%{NAME}_%{VERSION}-%{RELEASE}.dsc")) @@ -127,31 +129,33 @@ def srpmNameFromSpec(spec): rpm.delMacro('ARCH') # HACK: rewrite %dist if it appears in the filename - return srpmname.replace(chroot_dist, host_dist) - -def rpmNamesFromSpec(spec): - def rpmNameFromHeader(h): - rpm.addMacro('NAME', map_package_name(h['name'])[0]) - rpm.addMacro('VERSION', h['version']) - rpm.addMacro('RELEASE', h['release']) - if buildType() == "rpm": - rpm.addMacro('ARCH', h['arch']) + return srpmname.replace(CHROOT_DIST, HOST_DIST) + + +def rpm_names_from_spec(spec): + def rpm_name_from_header(hdr): + rpm.addMacro('NAME', map_package_name(hdr['name'])[0]) + rpm.addMacro('VERSION', hdr['version']) + rpm.addMacro('RELEASE', hdr['release']) + if build_type() == "rpm": + rpm.addMacro('ARCH', hdr['arch']) else: rpm.addMacro( - 'ARCH', "amd64" if h['arch'] == "x86_64" - else "all" if h['arch'] == "noarch" - else h['arch']) - rpmname = rpm.expandMacro(rpmfilenamepat) + 'ARCH', "amd64" if hdr['arch'] == "x86_64" + else "all" if hdr['arch'] == "noarch" + else hdr['arch']) + rpmname = rpm.expandMacro(RPMFILENAMEPAT) rpm.delMacro('NAME') rpm.delMacro('VERSION') rpm.delMacro('RELEASE') rpm.delMacro('ARCH') return rpmname - return [rpmNameFromHeader(p.header) for p in spec.packages] + return [rpm_name_from_header(pkg.header) for pkg in spec.packages] + # Rules to build SRPM from SPEC -for specname, spec in specs.iteritems(): - srpmname = srpmNameFromSpec(spec) +for specname, spec in SPECS.iteritems(): + srpmname = srpm_name_from_spec(spec) # spec.sourceHeader['sources'] and ['patches'] doesn't work # in RPM 4.8 on CentOS 6.4. spec.sources contains both @@ -163,33 +167,34 @@ def rpmNameFromHeader(h): # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: - sources.append(os.path.join(src_dir, os.path.basename(url.path))) + sources.append(os.path.join(SRCDIR, os.path.basename(url.path))) # Source comes from a local file or directory if url.scheme == "file": sources.append( - os.path.join(src_dir, os.path.basename(url.fragment))) + os.path.join(SRCDIR, os.path.basename(url.fragment))) # Source is an otherwise unqualified file, probably a patch if url.scheme == "": - sources.append(os.path.join(src_dir, url.path)) + sources.append(os.path.join(SRCDIR, url.path)) - print '%s: %s %s' % (os.path.join(srpm_dir, srpmname), - os.path.join(spec_dir, specname), + print '%s: %s %s' % (os.path.join(SRPMDIR, srpmname), + os.path.join(SPECDIR, specname), " ".join(sources)) - if buildType() == "rpm": + if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' else: print '\t@echo [MAKEDEB] $@' print '\tscripts/deb/makedeb.py $<' + # Rules to download sources # Assumes each RPM only needs one download - we have some multi-source # packages but in all cases the additional sources are patches provided # in the Git repository -for specname, spec in specs.iteritems(): +for specname, spec in SPECS.iteritems(): # The RPM documentation says that RPM only cares about the basename # of the path given in a Source: tag. spec.sourceHeader['url'] # enforces this - even if we have a URL in the source tag, it @@ -203,16 +208,16 @@ def rpmNameFromHeader(h): # Source comes from a remote HTTP server if url.scheme in ["http", "https"]: print '%s: %s' % ( - os.path.join(src_dir, os.path.basename(url.path)), - os.path.join(spec_dir, specname)) + os.path.join(SRCDIR, os.path.basename(url.path)), + os.path.join(SPECDIR, specname)) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source # Source comes from a local file or directory if url.scheme == "file": print '%s: %s $(shell find %s)' % ( - os.path.join(src_dir, os.path.basename(url.fragment)), - os.path.join(spec_dir, specname), + os.path.join(SRCDIR, os.path.basename(url.fragment)), + os.path.join(SPECDIR, specname), url.path) print '\t@echo [TAR] $@' # assume that the directory name is already what's expected by the @@ -225,23 +230,23 @@ def rpmNameFromHeader(h): # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) -for specname, spec in specs.iteritems(): +for specname, spec in SPECS.iteritems(): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly # on a partial build - rpmnames = rpmNamesFromSpec(spec) - srpmname = srpmNameFromSpec(spec) + rpmnames = rpm_names_from_spec(spec) + srpmname = srpm_name_from_spec(spec) for r in rpmnames: - rpm_path = os.path.join(rpm_dir, r) - srpm_path = os.path.join(srpm_dir, srpmname) + rpm_path = os.path.join(RPMDIR, r) + srpm_path = os.path.join(SRPMDIR, srpmname) rpm_outdir = os.path.dirname(rpm_path) print '%s: %s' % (rpm_path, srpm_path) - if buildType() == "rpm": + if build_type() == "rpm": print '\t@echo [MOCK] $@' print '\t@mock --configdir=mock --quiet -r xenserver '\ '--resultdir="%s" $<' % rpm_outdir print '\t@echo [CREATEREPO] $@' - print '\t@createrepo --quiet --update %s' % rpm_dir + print '\t@createrepo --quiet --update %s' % RPMDIR else: print '\t@echo [COWBUILDER] $@' @@ -249,52 +254,56 @@ def rpmNameFromHeader(h): '--configfile pbuilder/pbuilderrc-raring-amd64 '\ '--buildresult %s $<' % rpm_outdir + # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def flatten(lst): res = [] - for li in lst: - res += li + for elt in lst: + res += elt return res -def buildRequiresFromSpec(spec): + +def buildrequires_from_spec(spec): reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] return set(flatten(reqs)) -provides_to_rpm = {} -for specname, spec in specs.iteritems(): + +PROVIDES_TO_RPM = {} +for specname, spec in SPECS.iteritems(): for package in spec.packages: provides = package.header['provides'] + [package.header['name']] for provided in set(flatten([map_package_name(r) for r in provides])): - for rpmname in rpmNamesFromSpec(spec): - provides_to_rpm[provided] = rpmname + for rpmname in rpm_names_from_spec(spec): + PROVIDES_TO_RPM[provided] = rpmname + -for specname, spec in specs.iteritems(): - for rpmname in rpmNamesFromSpec(spec): - for buildreq in buildRequiresFromSpec(spec): +for specname, spec in SPECS.iteritems(): + for rpmname in rpm_names_from_spec(spec): + for buildreq in buildrequires_from_spec(spec): # Some buildrequires come from the system repository - if provides_to_rpm.has_key(buildreq): - buildreqrpm = provides_to_rpm[buildreq] - print "%s: %s" % (os.path.join(rpm_dir, rpmname), - os.path.join(rpm_dir, buildreqrpm)) + if PROVIDES_TO_RPM.has_key(buildreq): + buildreqrpm = PROVIDES_TO_RPM[buildreq] + print "%s: %s" % (os.path.join(RPMDIR, rpmname), + os.path.join(RPMDIR, buildreqrpm)) # Generate targets to build all srpms and all rpms -all_srpms = [os.path.join(srpm_dir, srpmNameFromSpec(s)) - for s in specs.values()] - -all_rpms = [] -for spec in specs.values(): - rpms = rpmNamesFromSpec(spec) - rpm_paths = map((lambda rpm: os.path.join(rpm_dir, rpm)), rpms) - all_rpms += rpm_paths +ALL_SRPMS = [os.path.join(SRPMDIR, srpm_name_from_spec(s)) + for s in SPECS.values()] + +ALL_RPMS = [] +for spec in SPECS.values(): + rpms = rpm_names_from_spec(spec) + rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) + ALL_RPMS += rpm_paths print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) -print "rpms: " + " \\\n\t".join(all_rpms) -print "srpms: " + " \\\n\t".join(all_srpms) +print "rpms: " + " \\\n\t".join(ALL_RPMS) +print "srpms: " + " \\\n\t".join(ALL_SRPMS) print "install: all" -print "\t. scripts/%s/install.sh" % buildType() +print "\t. scripts/%s/install.sh" % build_type() From 9485795e73e9679b9e463534228bcb5a62d14a5c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 16:02:31 +0800 Subject: [PATCH 0618/1125] makemake: Separate toplevel code into functions Signed-off-by: Euan Harris --- makemake.py | 131 ++++++++++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 61 deletions(-) diff --git a/makemake.py b/makemake.py index 0673aa8f..4f49e9da 100755 --- a/makemake.py +++ b/makemake.py @@ -73,8 +73,6 @@ def map_package_name(name): rpm.addMacro('dist', "") -print "all: rpms" - if build_type() == "rpm": RPMFILENAMEPAT = rpm.expandMacro('%_build_name_fmt') else: @@ -89,22 +87,6 @@ def spec_from_file(spec): raise exn -SPEC_NAMES = os.listdir(SPECDIR) -SPECS = {} -for spec_name in SPEC_NAMES: - spec = spec_from_file(os.path.join(SPECDIR, spec_name)) - pkg_name = spec.sourceHeader['name'] - if pkg_name in IGNORE_LIST[build_type()]: - continue - if os.path.splitext(spec_name)[0] != pkg_name: - sys.stderr.write( - "error: spec file name '%s' does not match package name '%s'\n" % - (spec_name, pkg_name)) - sys.exit(1) - - SPECS[spec_name] = spec - - def srpm_name_from_spec(spec): hdr = spec.sourceHeader rpm.addMacro('NAME', map_package_name(hdr['name'])[0]) @@ -154,7 +136,7 @@ def rpm_name_from_header(hdr): # Rules to build SRPM from SPEC -for specname, spec in SPECS.iteritems(): +def build_srpm_from_spec(spec, specname): srpmname = srpm_name_from_spec(spec) # spec.sourceHeader['sources'] and ['patches'] doesn't work @@ -194,7 +176,7 @@ def rpm_name_from_header(hdr): # Assumes each RPM only needs one download - we have some multi-source # packages but in all cases the additional sources are patches provided # in the Git repository -for specname, spec in SPECS.iteritems(): +def download_rpm_sources(spec, specname): # The RPM documentation says that RPM only cares about the basename # of the path given in a Source: tag. spec.sourceHeader['url'] # enforces this - even if we have a URL in the source tag, it @@ -226,18 +208,18 @@ def rpm_name_from_header(hdr): spec.sourceHeader['version']) print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % (url.path, dirname) - + # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) -for specname, spec in SPECS.iteritems(): +def build_rpm_from_srpm(spec): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly # on a partial build rpmnames = rpm_names_from_spec(spec) srpmname = srpm_name_from_spec(spec) - for r in rpmnames: - rpm_path = os.path.join(RPMDIR, r) + for rpmname in rpmnames: + rpm_path = os.path.join(RPMDIR, rpmname) srpm_path = os.path.join(SRPMDIR, srpmname) rpm_outdir = os.path.dirname(rpm_path) print '%s: %s' % (rpm_path, srpm_path) @@ -253,7 +235,7 @@ def rpm_name_from_header(hdr): print '\tsudo cowbuilder --build '\ '--configfile pbuilder/pbuilderrc-raring-amd64 '\ '--buildresult %s $<' % rpm_outdir - + # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec @@ -269,41 +251,68 @@ def buildrequires_from_spec(spec): return set(flatten(reqs)) -PROVIDES_TO_RPM = {} -for specname, spec in SPECS.iteritems(): - for package in spec.packages: - provides = package.header['provides'] + [package.header['name']] - for provided in set(flatten([map_package_name(r) for r in provides])): - - for rpmname in rpm_names_from_spec(spec): - PROVIDES_TO_RPM[provided] = rpmname - - -for specname, spec in SPECS.iteritems(): - for rpmname in rpm_names_from_spec(spec): - for buildreq in buildrequires_from_spec(spec): - # Some buildrequires come from the system repository - if PROVIDES_TO_RPM.has_key(buildreq): - buildreqrpm = PROVIDES_TO_RPM[buildreq] - print "%s: %s" % (os.path.join(RPMDIR, rpmname), - os.path.join(RPMDIR, buildreqrpm)) - - -# Generate targets to build all srpms and all rpms -ALL_SRPMS = [os.path.join(SRPMDIR, srpm_name_from_spec(s)) - for s in SPECS.values()] - -ALL_RPMS = [] -for spec in SPECS.values(): - rpms = rpm_names_from_spec(spec) - rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) - ALL_RPMS += rpm_paths - print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) - - -print "rpms: " + " \\\n\t".join(ALL_RPMS) -print "srpms: " + " \\\n\t".join(ALL_SRPMS) +def main(): + print "all: rpms" + + spec_names = os.listdir(SPECDIR) + specs = {} + for spec_name in spec_names: + spec = spec_from_file(os.path.join(SPECDIR, spec_name)) + pkg_name = spec.sourceHeader['name'] + if pkg_name in IGNORE_LIST[build_type()]: + continue + if os.path.splitext(spec_name)[0] != pkg_name: + sys.stderr.write( + "error: spec file name '%s' does not match package name '%s'\n" % + (spec_name, pkg_name)) + sys.exit(1) + + specs[spec_name] = spec + + for specname, spec in specs.iteritems(): + build_srpm_from_spec(spec, specname) + + for specname, spec in specs.iteritems(): + download_rpm_sources(spec, specname) + + for _, spec in specs.iteritems(): + build_rpm_from_srpm(spec) + + provides_to_rpm = {} + for _, spec in specs.iteritems(): + for package in spec.packages: + provides = package.header['provides'] + [package.header['name']] + for provided in set(flatten([map_package_name(r) for r in provides])): + for rpmname in rpm_names_from_spec(spec): + provides_to_rpm[provided] = rpmname + + + for _, spec in specs.iteritems(): + for rpmname in rpm_names_from_spec(spec): + for buildreq in buildrequires_from_spec(spec): + # Some buildrequires come from the system repository + if provides_to_rpm.has_key(buildreq): + buildreqrpm = provides_to_rpm[buildreq] + print "%s: %s" % (os.path.join(RPMDIR, rpmname), + os.path.join(RPMDIR, buildreqrpm)) + + # Generate targets to build all srpms and all rpms + all_srpms = [os.path.join(SRPMDIR, srpm_name_from_spec(s)) + for s in specs.values()] + + all_rpms = [] + for spec in specs.values(): + rpms = rpm_names_from_spec(spec) + rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) + all_rpms += rpm_paths + print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) + + print "rpms: " + " \\\n\t".join(all_rpms) + print "srpms: " + " \\\n\t".join(all_srpms) + + print "install: all" + print "\t. scripts/%s/install.sh" % build_type() -print "install: all" -print "\t. scripts/%s/install.sh" % build_type() +if __name__ == "__main__": + main() From f5bf05c3476a1acf9a0b9697a09b06157f6bcb42 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 16:08:15 +0800 Subject: [PATCH 0619/1125] makemake: Switch from os.listdir() to glob.glob() to read SPEC dir Signed-off-by: Euan Harris --- makemake.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/makemake.py b/makemake.py index 4f49e9da..d65bb2ff 100755 --- a/makemake.py +++ b/makemake.py @@ -5,6 +5,7 @@ import sys sys.path.append("scripts/lib") +import glob import mappkgname import os import platform @@ -237,8 +238,6 @@ def build_rpm_from_srpm(spec): '--buildresult %s $<' % rpm_outdir -# RPM build dependencies. The 'requires' key for the *source* RPM is -# actually the 'buildrequires' key from the spec def flatten(lst): res = [] for elt in lst: @@ -246,6 +245,8 @@ def flatten(lst): return res +# RPM build dependencies. The 'requires' key for the *source* RPM is +# actually the 'buildrequires' key from the spec def buildrequires_from_spec(spec): reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] return set(flatten(reqs)) @@ -254,20 +255,20 @@ def buildrequires_from_spec(spec): def main(): print "all: rpms" - spec_names = os.listdir(SPECDIR) + spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) specs = {} - for spec_name in spec_names: - spec = spec_from_file(os.path.join(SPECDIR, spec_name)) + for spec_path in spec_paths: + spec = spec_from_file(spec_path) pkg_name = spec.sourceHeader['name'] if pkg_name in IGNORE_LIST[build_type()]: continue - if os.path.splitext(spec_name)[0] != pkg_name: + if os.path.splitext(os.path.basename(spec_path))[0] != pkg_name: sys.stderr.write( "error: spec file name '%s' does not match package name '%s'\n" % - (spec_name, pkg_name)) + (spec_path, pkg_name)) sys.exit(1) - specs[spec_name] = spec + specs[os.path.basename(spec_path)] = spec for specname, spec in specs.iteritems(): build_srpm_from_spec(spec, specname) From 95ae6f00b30942e1f979617b1d6cb689b0489060 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 16:28:28 +0800 Subject: [PATCH 0620/1125] makemake: Remove some unnecessary duplicate iterations over the specs Signed-off-by: Euan Harris --- makemake.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/makemake.py b/makemake.py index d65bb2ff..580e6f6f 100755 --- a/makemake.py +++ b/makemake.py @@ -257,6 +257,8 @@ def main(): spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) specs = {} + provides_to_rpm = {} + for spec_path in spec_paths: spec = spec_from_file(spec_path) pkg_name = spec.sourceHeader['name'] @@ -269,6 +271,12 @@ def main(): sys.exit(1) specs[os.path.basename(spec_path)] = spec + for package in spec.packages: + provides = package.header['provides'] + [package.header['name']] + for provided in set(flatten([map_package_name(r) for r in provides])): + for rpmname in rpm_names_from_spec(spec): + provides_to_rpm[provided] = rpmname + for specname, spec in specs.iteritems(): build_srpm_from_spec(spec, specname) @@ -279,15 +287,6 @@ def main(): for _, spec in specs.iteritems(): build_rpm_from_srpm(spec) - provides_to_rpm = {} - for _, spec in specs.iteritems(): - for package in spec.packages: - provides = package.header['provides'] + [package.header['name']] - for provided in set(flatten([map_package_name(r) for r in provides])): - for rpmname in rpm_names_from_spec(spec): - provides_to_rpm[provided] = rpmname - - for _, spec in specs.iteritems(): for rpmname in rpm_names_from_spec(spec): for buildreq in buildrequires_from_spec(spec): @@ -298,14 +297,13 @@ def main(): os.path.join(RPMDIR, buildreqrpm)) # Generate targets to build all srpms and all rpms - all_srpms = [os.path.join(SRPMDIR, srpm_name_from_spec(s)) - for s in specs.values()] - all_rpms = [] + all_srpms = [] for spec in specs.values(): rpms = rpm_names_from_spec(spec) rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) all_rpms += rpm_paths + all_srpms.append(os.path.join(SRPMDIR, srpm_name_from_spec(spec))) print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) print "rpms: " + " \\\n\t".join(all_rpms) From 60a8457d8ec21dfad690a0ca0b6d46be745f432d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Nov 2013 16:33:17 +0800 Subject: [PATCH 0621/1125] makemake: Remove further unnecessary traversals of the spec list This change substantially alters the order in which rules appear in the Makefile. Signed-off-by: Euan Harris --- makemake.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/makemake.py b/makemake.py index 580e6f6f..b85cf1ac 100755 --- a/makemake.py +++ b/makemake.py @@ -253,8 +253,6 @@ def buildrequires_from_spec(spec): def main(): - print "all: rpms" - spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) specs = {} provides_to_rpm = {} @@ -278,16 +276,12 @@ def main(): provides_to_rpm[provided] = rpmname - for specname, spec in specs.iteritems(): - build_srpm_from_spec(spec, specname) + print "all: rpms" for specname, spec in specs.iteritems(): + build_srpm_from_spec(spec, specname) download_rpm_sources(spec, specname) - - for _, spec in specs.iteritems(): build_rpm_from_srpm(spec) - - for _, spec in specs.iteritems(): for rpmname in rpm_names_from_spec(spec): for buildreq in buildrequires_from_spec(spec): # Some buildrequires come from the system repository @@ -295,6 +289,7 @@ def main(): buildreqrpm = provides_to_rpm[buildreq] print "%s: %s" % (os.path.join(RPMDIR, rpmname), os.path.join(RPMDIR, buildreqrpm)) + print "" # Generate targets to build all srpms and all rpms all_rpms = [] @@ -305,10 +300,12 @@ def main(): all_rpms += rpm_paths all_srpms.append(os.path.join(SRPMDIR, srpm_name_from_spec(spec))) print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) + print "" print "rpms: " + " \\\n\t".join(all_rpms) + print "" print "srpms: " + " \\\n\t".join(all_srpms) - + print "" print "install: all" print "\t. scripts/%s/install.sh" % build_type() From 63da0f010a215f2130fbc1cdd2079ce08a6edd11 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 7 Nov 2013 10:28:12 +0800 Subject: [PATCH 0622/1125] makemake: Extract package name to RPM name mapping into functions This reintroduces an extra traversal over the specs, but this whole mess should go away shortly. Signed-off-by: Euan Harris --- makemake.py | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/makemake.py b/makemake.py index b85cf1ac..933af3ef 100755 --- a/makemake.py +++ b/makemake.py @@ -251,11 +251,29 @@ def buildrequires_from_spec(spec): reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] return set(flatten(reqs)) +def package_to_rpm_map(specs): + provides_to_rpm = {} + for spec in specs: + for package in spec.packages: + provides = package.header['provides'] + [package.header['name']] + for provided in set(flatten([map_package_name(r) for r in provides])): + for rpmname in rpm_names_from_spec(spec): + provides_to_rpm[provided] = rpmname + return provides_to_rpm + + +def buildrequires_for_rpm(spec, provides_to_rpm): + for rpmname in rpm_names_from_spec(spec): + for buildreq in buildrequires_from_spec(spec): + # Some buildrequires come from the system repository + if provides_to_rpm.has_key(buildreq): + buildreqrpm = provides_to_rpm[buildreq] + print "%s: %s" % (os.path.join(RPMDIR, rpmname), + os.path.join(RPMDIR, buildreqrpm)) def main(): spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) specs = {} - provides_to_rpm = {} for spec_path in spec_paths: spec = spec_from_file(spec_path) @@ -269,12 +287,8 @@ def main(): sys.exit(1) specs[os.path.basename(spec_path)] = spec - for package in spec.packages: - provides = package.header['provides'] + [package.header['name']] - for provided in set(flatten([map_package_name(r) for r in provides])): - for rpmname in rpm_names_from_spec(spec): - provides_to_rpm[provided] = rpmname - + + provides_to_rpm = package_to_rpm_map(specs.values()) print "all: rpms" @@ -282,13 +296,7 @@ def main(): build_srpm_from_spec(spec, specname) download_rpm_sources(spec, specname) build_rpm_from_srpm(spec) - for rpmname in rpm_names_from_spec(spec): - for buildreq in buildrequires_from_spec(spec): - # Some buildrequires come from the system repository - if provides_to_rpm.has_key(buildreq): - buildreqrpm = provides_to_rpm[buildreq] - print "%s: %s" % (os.path.join(RPMDIR, rpmname), - os.path.join(RPMDIR, buildreqrpm)) + buildrequires_for_rpm(spec, provides_to_rpm) print "" # Generate targets to build all srpms and all rpms From 126b93d297ef98af47d069c0de3a6c270ca75e7c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 7 Nov 2013 11:31:18 +0800 Subject: [PATCH 0623/1125] makemake: Start on a test suite Signed-off-by: Euan Harris --- tests/test_makemake.py | 76 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 tests/test_makemake.py diff --git a/tests/test_makemake.py b/tests/test_makemake.py new file mode 100644 index 00000000..1b706ead --- /dev/null +++ b/tests/test_makemake.py @@ -0,0 +1,76 @@ +from cStringIO import StringIO +import glob +import os +import sys +import unittest + +import makemake + +class BasicTests(unittest.TestCase): + def setUp(self): + self.spec = makemake.spec_from_file("SPECS/ocaml-cohttp.spec") + self.spec = makemake.spec_from_file("SPECS/ocaml-cohttp.spec") + + def test_rpm_names_from_spec(self): + assert makemake.rpm_names_from_spec(self.spec) == \ + ["x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm", + "x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm"] + + def test_buildrequires_from_spec(self): + assert makemake.buildrequires_from_spec(self.spec) == \ + set(["ocaml", "ocaml-findlib", "ocaml-re-devel", "ocaml-uri-devel", "ocaml-cstruct-devel", "ocaml-lwt-devel", "ocaml-ounit-devel", "ocaml-ocamldoc", "ocaml-camlp4-devel", "openssl", "openssl-devel"]) + + + def test_build_srpm_from_spec(self): + makemake.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") + + assert sys.stdout.getvalue() == \ +"""./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz + @echo [RPMBUILD] $@ + @rpmbuild --quiet --define "_topdir ." -bs $< +""" + + def test_download_rpm_sources(self): + makemake.download_rpm_sources(self.spec, "ocaml-cohttp.spec") + + assert sys.stdout.getvalue() == \ +"""./SOURCES/ocaml-cohttp-0.9.8.tar.gz: ./SPECS/ocaml-cohttp.spec + @echo [CURL] $@ + @curl --silent --show-error -L -o $@ https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz +""" + + def test_build_rpm_from_srpm(self): + makemake.build_rpm_from_srpm(self.spec) + + assert sys.stdout.getvalue() == \ +"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS +""" + + + def test_buildrequires_for_rpm(self): + spec_paths = glob.glob(os.path.join("./SPECS", "*.spec")) + specs = [makemake.spec_from_file(spec_path) for spec_path in spec_paths] + + makemake.buildrequires_for_rpm(self.spec, makemake.package_to_rpm_map(specs)) + assert sys.stdout.getvalue() == \ +"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm +""" + From db85e1f365e1465fa23e62f31ed5b0fcf71564c9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 7 Nov 2013 12:15:26 +0800 Subject: [PATCH 0624/1125] makemake: Regenerate dependencies automatically in the makefile makemake.py is now known as specdep.py Signed-off-by: Euan Harris --- Makefile | 6 ++++++ README.md | 2 -- makemake.py => specdep.py | 0 tests/{test_makemake.py => test_specdep.py} | 24 ++++++++++++--------- 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 Makefile rename makemake.py => specdep.py (100%) rename tests/{test_makemake.py => test_specdep.py} (79%) diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..955f31d4 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +-include deps + +deps: SPECS/*.spec specdep.py + @echo Updating dependencies... + @./specdep.py > $@ + diff --git a/README.md b/README.md index 07c4580c..98ec8490 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ git clone git://github.com/xenserver/xenserver-core.git cd xenserver-core ./configure.sh -./makemake.py > Makefile make ``` @@ -71,7 +70,6 @@ git clone git://github.com/xenserver/xenserver-core.git cd xenserver-core ./configure.sh -./makemake.py > Makefile make make install diff --git a/makemake.py b/specdep.py similarity index 100% rename from makemake.py rename to specdep.py diff --git a/tests/test_makemake.py b/tests/test_specdep.py similarity index 79% rename from tests/test_makemake.py rename to tests/test_specdep.py index 1b706ead..450e996f 100644 --- a/tests/test_makemake.py +++ b/tests/test_specdep.py @@ -1,28 +1,32 @@ +# Run these tests with 'nosetests': +# install the 'python-nose' package (Fedora/CentOS or Ubuntu) +# run 'nosetests' in the root of the repository + from cStringIO import StringIO import glob import os import sys import unittest -import makemake +import specdep class BasicTests(unittest.TestCase): def setUp(self): - self.spec = makemake.spec_from_file("SPECS/ocaml-cohttp.spec") - self.spec = makemake.spec_from_file("SPECS/ocaml-cohttp.spec") + self.spec = specdep.spec_from_file("SPECS/ocaml-cohttp.spec") + self.spec = specdep.spec_from_file("SPECS/ocaml-cohttp.spec") def test_rpm_names_from_spec(self): - assert makemake.rpm_names_from_spec(self.spec) == \ + assert specdep.rpm_names_from_spec(self.spec) == \ ["x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm", "x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm"] def test_buildrequires_from_spec(self): - assert makemake.buildrequires_from_spec(self.spec) == \ + assert specdep.buildrequires_from_spec(self.spec) == \ set(["ocaml", "ocaml-findlib", "ocaml-re-devel", "ocaml-uri-devel", "ocaml-cstruct-devel", "ocaml-lwt-devel", "ocaml-ounit-devel", "ocaml-ocamldoc", "ocaml-camlp4-devel", "openssl", "openssl-devel"]) def test_build_srpm_from_spec(self): - makemake.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") + specdep.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") assert sys.stdout.getvalue() == \ """./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz @@ -31,7 +35,7 @@ def test_build_srpm_from_spec(self): """ def test_download_rpm_sources(self): - makemake.download_rpm_sources(self.spec, "ocaml-cohttp.spec") + specdep.download_rpm_sources(self.spec, "ocaml-cohttp.spec") assert sys.stdout.getvalue() == \ """./SOURCES/ocaml-cohttp-0.9.8.tar.gz: ./SPECS/ocaml-cohttp.spec @@ -40,7 +44,7 @@ def test_download_rpm_sources(self): """ def test_build_rpm_from_srpm(self): - makemake.build_rpm_from_srpm(self.spec) + specdep.build_rpm_from_srpm(self.spec) assert sys.stdout.getvalue() == \ """./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm @@ -58,9 +62,9 @@ def test_build_rpm_from_srpm(self): def test_buildrequires_for_rpm(self): spec_paths = glob.glob(os.path.join("./SPECS", "*.spec")) - specs = [makemake.spec_from_file(spec_path) for spec_path in spec_paths] + specs = [specdep.spec_from_file(spec_path) for spec_path in spec_paths] - makemake.buildrequires_for_rpm(self.spec, makemake.package_to_rpm_map(specs)) + specdep.buildrequires_for_rpm(self.spec, specdep.package_to_rpm_map(specs)) assert sys.stdout.getvalue() == \ """./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.x86_64.rpm ./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.x86_64.rpm From 15e57195377b8ec556771c35e3eb48c5ea258150 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 20 Nov 2013 15:02:33 +0000 Subject: [PATCH 0625/1125] README: Fix typo Signed-off-by: Euan Harris --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98ec8490..2ffb56bc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Buildroot for xen-api and related packages, producing RPM and (experimentally) D RPM-based distributions ----------------------- -On RPM-based distributions, the packages are build using `mock`. +On RPM-based distributions, the packages are built using `mock`. To install it on a RHEL/CentOS system then you will need to add the [EPEL repositories](http://fedoraproject.org/wiki/EPEL). Here is a useful article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). From 41ef64c19c82f140937e89bd57902128d2cd1bae Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 20 Nov 2013 15:18:07 +0000 Subject: [PATCH 0626/1125] openstack-xapi-plugins: Update to Havana release Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index b0eb4194..61ff1057 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -1,11 +1,11 @@ Name: openstack-xapi-plugins -Version: 2013.1.2 -Release: 2 +Version: 2013.2 +Release: 1 Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor -URL: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz -Source0: https://launchpad.net/nova/grizzly/%{version}/+download/nova-%{version}.tar.gz +URL: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz +Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/nova-%{version}-%{release} BuildRequires: python-setuptools @@ -31,6 +31,9 @@ rm -rf %{buildroot} /usr/lib/xapi/plugins/* %changelog +* Wed Nov 20 2013 Euan Harris +- Update to Havana release + * Wed Jul 3 2013 David Scott - Tweak plugins directory to match xapi From 5cf2854a09f8ba950aac9a726d245cc3e98066f4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 20 Nov 2013 17:01:21 +0000 Subject: [PATCH 0627/1125] SPECS: URL should point to a page of human-readable information, not a tarball Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/blktap.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-cstruct.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-lambda-term.spec | 2 +- SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-re.spec | 2 +- SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-ssl.spec | 2 +- SPECS/ocaml-stdext.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-yojson.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/vhd-tool.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xcp-sm.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core-latest-snapshot.spec | 2 +- SPECS/xenserver-core.spec | 2 +- SPECS/xsiostat.spec | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 21fe3a05..1df68982 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve License: BSD3 Group: Development/Other -URL: http://mjambon.com/releases/biniou/biniou-1.0.6.tar.gz +URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib easy-format diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 67bf66f9..97645ee4 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -4,7 +4,7 @@ Version: 0.9.0 Release: 1 Group: System/Hypervisor License: LGPL+linking exception -URL: http://www.xen.org +URL: https://github.com/djs55/blktap Source0: https://github.com/djs55/blktap/archive/%{version}/blktap-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: autoconf automake libtool libaio-devel xen-devel libuuid-devel diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 5f918321..7762dfb9 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Equivalent of the C preprocessor for OCaml License: BSD3 Group: Development/Other -URL: http://mjambon.com/releases/cppo/cppo-0.9.3.tar.gz +URL: http://mjambon.com/cppo.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 30cf66e8..5b87d72d 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Indentation made easy License: BSD3 Group: Development/Other -URL: http://mjambon.com/releases/easy-format/easy-format-1.0.1.tar.gz +URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index c80c3b4c..2ca569db 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/ffs/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/ffs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index df103827..ea35548b 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -4,7 +4,7 @@ Release: 1 Summary: A subprocess management service License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/forkexecd/archive/forkexecd-0.9.0.tar.gz +URL: https://github.com/xapi-project/forkexecd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 1903428d..bafb0f8a 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -4,7 +4,7 @@ Release: 1 Summary: A store and forward message switch License: FreeBSD Group: Development/Other -URL: https://github.com/xapi-project/message-switch/archive/message-switch-%{version}.tar.gz +URL: https://github.com/xapi-project/message-switch Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 04f4f6fe..cce84350 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -6,7 +6,7 @@ Release: 1 Summary: An HTTP library for OCaml License: LGPL Group: Development/Other -URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz +URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 336ec778..6cbaf99e 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -6,7 +6,7 @@ Release: 2 Summary: Read and write low-level C-style structures in OCaml License: ISC Group: Development/Other -URL: https://github.com/mirage/ocaml-cstruct/archive/ocaml-cstruct-0.7.1.tar.gz +URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel ocaml-lwt-devel diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index efca5260..6559eb9c 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL Group: Development/Other -URL: http://github.com/xapi-project/ocaml-fd-send-recv/archive/ocaml-fd-send-recv-1.0.1.tar.gz +URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 6af62376..7f070622 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 Group: Development/Other -URL: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-1.2.tar.gz +URL: http://forge.ocamlcore.org/projects/lambda-term/ Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc ocaml-zed-devel ocaml-lwt-devel ocaml-camomile-devel ocaml-react-devel diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index c6008895..4e759008 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/netdev/archive/netdev-0.9.0.tar.gz +URL: https://github.com/xapi-project/netdev Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index a1a12274..429c7bb8 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. License: LGPL Group: Development/Other -URL: https://github.com/OCamlPro/ocplib-endian/archive/0.3.tar.gz +URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib optcomp ocaml-camlp4 ocaml-camlp4-devel diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index d1c846ba..66400fea 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -6,7 +6,7 @@ Release: 1 Summary: A regular expression library for OCaml License: LGPL Group: Development/Other -URL: http://github.com/ocaml/ocaml-re/tarball/ocaml-re-1.2.1 +URL: http://github.com/ocaml/ocaml-re Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index c9a61e27..76e4f3b2 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -6,7 +6,7 @@ Release: 1 Summary: An RPC library for OCaml License: LGPL Group: Development/Other -URL: https://github.com/samoht/ocaml-rpc/archive/1.4.1.tar.gz +URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-type-conv xmlm-devel js_of_ocaml-devel ocaml-camlp4-devel diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 275561ec..9b76921d 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -7,7 +7,7 @@ Summary: Convert values to and from s-expressions in OCaml Group: Development/Other License: LGPLv2+ with exceptions and BSD -URL: https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/sexplib-109.20.00.tar.gz +URL: https://ocaml.janestreet.com Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index aa4c4041..40ae1133 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Use OpenSSL from OCaml License: LGPL Group: Development/Other -URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl/0.4.6/ocaml-ssl-0.4.6.tar.gz +URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib openssl-devel diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 2a760acc..43de78f4 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/stdext/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/stdext Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index e48538f7..eca722d4 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/tapctl/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/tapctl Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 9b03c1f3..b8e3a8a4 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -6,7 +6,7 @@ Release: 1 Summary: A URI library for OCaml License: ISC Group: Development/Other -URL: https://github.com/mirage/ocaml-uri/archive/ocaml-uri-1.3.8.tar.gz +URL: https://github.com/mirage/ocaml-uri Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml >= 4.00, ocaml-findlib, ocaml-ocamldoc, ocaml-re-devel, ocaml-compiler-libs diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index c2e9ae4a..598352a2 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Common interface definitions for XCP services License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-idl/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 93102433..439ada17 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Round-Robin Datasources in OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-rrd Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 3e77cbe9..83420b9c 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -6,7 +6,7 @@ Release: 3 Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs/archive/ocaml-xen-lowlevel-libs-%{version}.tar.gz +URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 8bfec360..c0195d57 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Low-level xen control operations OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xenops/archive/xenops-%{version}.tar.gz +URL: https://github.com/xapi-project/xenops Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 233f720f..dfce2a3d 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/ocaml-xenstore-clients/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/ocaml-xenstore-clients Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index fa1135fe..b6dcbf0c 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL Group: Development/Other -URL: https://github.com/mirage/ocaml-xenstore/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/mirage/ocaml-xenstore Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index e3dc835b..e4c2b54e 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -6,7 +6,7 @@ Release: 1 Summary: A JSON parser and priter for OCaml License: BSD3 Group: Development/Other -URL: http://mjambon.com/releases/yojson/yojson-1.1.6.tar.gz +URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib cppo easy-format biniou diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 1524e276..4fe8bc9e 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -6,7 +6,7 @@ Release: 1 Summary: An abstract engine for text editing for OCaml License: BSD3 Group: Development/Other -URL: http://forge.ocamlcore.org/frs/download.php/944/zed-1.2.tar.gz +URL: http://forge.ocamlcore.org/projects/zed/ Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-react-devel diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 61ff1057..cf6c5dc9 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -4,7 +4,7 @@ Release: 1 Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor -URL: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz +URL: https://launchpad.net/nova/havana Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/nova-%{version}-%{release} diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 7f57dcdd..bcb3bf16 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Optional compilation with cpp-like directives License: BSD3 Group: Development/Other -URL: https://forge.ocamlcore.org/frs/download.php/1011/optcomp-1.4.tar.gz +URL: http://forge.ocamlcore.org/projects/optcomp/ Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camlp4 ocaml-camlp4-devel diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index ef48d776..5ad6f735 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -4,7 +4,7 @@ Release: 1 Summary: CLI for xapi toolstack storage managers. License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/sm-cli/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/sm-cli Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 6037a733..9c86dd81 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/squeezed/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init Source2: squeezed-conf diff --git a/SPECS/utop.spec b/SPECS/utop.spec index dfb23dd6..e52d9185 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -4,7 +4,7 @@ Release: 1 Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... License: BSD Group: Development/Other -URL: https://github.com/diml/utop/archives/%{version}.tar.gz +URL: https://github.com/diml/utop Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 2b4b9f3d..d339ebcd 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -6,7 +6,7 @@ Version: 0.6.1 Release: 1 Group: System/Hypervisor License: LGPL+linking exception -URL: http://www.xen.org +URL: https://github.com/djs55/vhd-tool Source0: https://github.com/djs55/vhd-tool/archive/%{version}/vhd-tool-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf BuildRoot: %{_tmppath}/%{name}-%{version}-root diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 7b81ade7..0d21542e 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-networkd/archive/xcp-networkd-%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-networkd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 5f8b32f0..b5d022a2 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Statistics gathering daemon for the xapi toolstack License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-rrdd/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-rrdd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index ccad9ae6..ab5cc2c8 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -6,7 +6,7 @@ Version: 0.9.6 Release: 1 Group: System/Hypervisor License: LGPL -URL: http://www.citrix.com +URL: https://github.com/xapi-project/sm Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz Source1: xcp-mpath-scsidev-rules Source2: xcp-mpath-scsidev-script diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 2f117802..22aad259 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Creates default XenServer templates License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xcp-guest-templates/%{version}.tar.gz +URL: https://github.com/xapi-project/xcp-guest-templates Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 7f56966a..30d0363a 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -4,7 +4,7 @@ Release: 2 Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xenops-cli/archive/xenops-cli-%{version}.tar.gz +URL: https://github.com/xapi-project/xenops-cli Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 1bd26c7a..0fead5fc 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -4,7 +4,7 @@ Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xenopsd/archive/%{version}.tar.gz +URL: https://github.com/xapi-project/xenopsd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 5e0d3a3f..5cb05aa1 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -4,7 +4,7 @@ Release: 2 Summary: Yum repositories for xenserver License: GPL Group: Development/Other -URL: http://www.xen.org/ +URL: http://www.xenserver.org/ Source0: fusion-release-xapi.repo Source1: fusion-release-xen-c6.repo Source2: fusion-release-xen-c6-RC1.repo diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 2ac5b3c0..c68d412a 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -4,7 +4,7 @@ Release: 1 Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other -URL: http://www.xen.org/ +URL: http://www.xenserver.org/ Source0: xenserver-readme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xenserver-install-wizard diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index a0a3ee85..1803922c 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -4,7 +4,7 @@ Release: 1 Summary: XenServer IO stat thingy License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xsiostat/archive/xsiostat-%{version}.tar.gz +URL: https://github.com/xapi-project/xsiostat Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From ec87df85d57dd037a7ef2d9d6279e0930e9a8cac Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Nov 2013 14:01:36 +0000 Subject: [PATCH 0628/1125] Update ocaml-vhd and vhd-tool Signed-off-by: David Scott --- SPECS/ocaml-vhd.spec | 5 ++++- SPECS/vhd-tool.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index b08a7aab..b55ecb4a 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-vhd -Version: 0.6.1 +Version: 0.6.4 Release: 1 Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception @@ -54,6 +54,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllvhd* %changelog +* Thu Nov 21 2013 David Scott - 0.6.4-1 +- Update to 0.6.4 + * Wed Oct 30 2013 David Scott - 0.6.1-1 - Update to 0.6.1 diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index d339ebcd..6b72ef18 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,7 +2,7 @@ Summary: command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.6.1 +Version: 0.6.4 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -50,6 +50,9 @@ rm -rf %{buildroot} %{_libexecdir}/xapi/sparse_dd %changelog +* Thu Nov 21 2013 David Scott - 0.6.4-1 +- Update to 0.6.4 + * Fri Oct 25 2013 David Scott - 0.6.1-1 - Update to 0.6.1 From e43912bf8179b1044ea14de85f90adb8d1b07408 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Nov 2013 17:12:00 +0000 Subject: [PATCH 0629/1125] Add ocaml-tar, update ocaml-nbd --- SPECS/ocaml-nbd.spec | 9 +++-- SPECS/ocaml-tar.spec | 79 +++++++++++++++++++++++++++++++++++++++ scripts/lib/mappkgname.py | 1 + 3 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 SPECS/ocaml-tar.spec diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 033f1e9e..ad1d0e76 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} Name: ocaml-nbd -Version: 0.9.1 +Version: 0.9.2 Release: 1 Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/djs55/nbd -Source0: https://github.com/djs55/nbd/archive/%{version}/nbd-%{version}.tar.gz +URL: http://github.com/xapi-project/nbd +Source0: https://github.com/xapi-project/nbd/archive/%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 cmdliner-devel Requires: ocaml ocaml-findlib @@ -93,6 +93,9 @@ rm -rf %{buildroot} %{_libdir}/ocaml/nbd/META %changelog +* Thu Nov 21 2013 David Scott +- Update to 0.9.2 + * Mon Sep 23 2013 David Scott - Update to 0.9.1 diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec new file mode 100644 index 00000000..1dd424b4 --- /dev/null +++ b/SPECS/ocaml-tar.spec @@ -0,0 +1,79 @@ +Name: ocaml-tar +Version: 0.2.1 +Release: 0 +Summary: OCaml parser and printer for tar-format data +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: http://github.com/djs55/ocaml-tar +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-ounit-devel +# These are build requires which are also requires of the -devel package +BuildRequires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel +# These are build requires which should be requires of some of the -devel +# packages -- update the devel packages later +BuildRequires: ocaml-camlp4 +Requires: ocaml ocaml-findlib + +%description +This is a pure OCaml library for reading and writing tar-format data. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel +# These are requires which should be requires of some of the -devel +# packages -- update the devel packages later +Requires: ocaml-camlp4 + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files devel +%defattr(-,root,root) +%doc README.md + +%{_libdir}/ocaml/tar/META +%{_libdir}/ocaml/tar/tar.a +%{_libdir}/ocaml/tar/tar.cma +%{_libdir}/ocaml/tar/tar.cmi +%{_libdir}/ocaml/tar/tar.cmx +%{_libdir}/ocaml/tar/tar.cmxa +%{_libdir}/ocaml/tar/tar.cmxs +%{_libdir}/ocaml/tar/tar.mli +%{_libdir}/ocaml/tar/tar_lwt_unix.a +%{_libdir}/ocaml/tar/tar_lwt_unix.cma +%{_libdir}/ocaml/tar/tar_lwt_unix.cmi +%{_libdir}/ocaml/tar/tar_lwt_unix.cmx +%{_libdir}/ocaml/tar/tar_lwt_unix.cmxa +%{_libdir}/ocaml/tar/tar_lwt_unix.cmxs +%{_libdir}/ocaml/tar/tar_lwt_unix.mli +%{_libdir}/ocaml/tar/tar_unix.a +%{_libdir}/ocaml/tar/tar_unix.cma +%{_libdir}/ocaml/tar/tar_unix.cmi +%{_libdir}/ocaml/tar/tar_unix.cmx +%{_libdir}/ocaml/tar/tar_unix.cmxa +%{_libdir}/ocaml/tar/tar_unix.cmxs +%{_libdir}/ocaml/tar/tar_unix.mli + +%changelog +* Fri Nov 15 2013 David Scott +- Initial package diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index c9cd6373..1b96631d 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -62,6 +62,7 @@ "ocaml-yojson": ["libyojson-ocaml"], "ocaml-zed": ["libzed-ocaml"], "ocaml-vhd": ["vhd-ocaml"], + "ocaml-tar": ["tar-ocaml"], "ocaml-uutf": ["uutf-ocaml"], "omake": ["omake"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], From 1106ffae280f6fb4381ae1bae1f330ae6e9403ff Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 22 Nov 2013 13:40:51 +0000 Subject: [PATCH 0630/1125] ocaml-tar: Fix camlp4 dependency Signed-off-by: Euan Harris --- SPECS/ocaml-tar.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 1dd424b4..1c8fce3e 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -12,7 +12,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-ounit-devel BuildRequires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel # These are build requires which should be requires of some of the -devel # packages -- update the devel packages later -BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel Requires: ocaml ocaml-findlib %description From b854f882c4a701787d44dc141b9e56f69743f9f6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 20 Nov 2013 17:12:58 +0000 Subject: [PATCH 0631/1125] xsiostat: Fix URL Signed-off-by: Euan Harris --- SPECS/xsiostat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 1803922c..e00fb210 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -4,7 +4,7 @@ Release: 1 Summary: XenServer IO stat thingy License: LGPL Group: Development/Other -URL: https://github.com/xapi-project/xsiostat +URL: https://github.com/xenserver/xsiostat Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From 992841c95baee113de2edc387ee3630906906edf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 20 Nov 2013 17:26:54 +0000 Subject: [PATCH 0632/1125] ocaml-cdrom: Fix URL Signed-off-by: Euan Harris --- SPECS/ocaml-cdrom.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xsiostat.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index bfb360b6..39ba9683 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -6,7 +6,7 @@ Release: 2 Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception Group: Development/Other -URL: http://github.com/xapi-project/ocaml +URL: http://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 2a8a9a48..1dc30d3d 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: a simple wizard to configure a XenServer +Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.27 Release: 1 diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index e00fb210..78d84b1c 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -2,7 +2,7 @@ Name: xsiostat Version: 0.2.0 Release: 1 Summary: XenServer IO stat thingy -License: LGPL +License: LGPLv2.1 Group: Development/Other URL: https://github.com/xenserver/xsiostat Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From be65aa25e63b8988d274a1e76d649f27cc0b7c9d Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Fri, 22 Nov 2013 13:53:59 +0000 Subject: [PATCH 0633/1125] URL based install - fix missing RPMS Always create the directories --- scripts/deb/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 377abcc9..02e383b9 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -24,8 +24,8 @@ sed \ scripts/deb/xapi.pref.in > scripts/deb/xapi.pref install -m 0644 scripts/deb/xapi.pref /etc/apt/preferences.d/xapi -(cd RPMS && apt-ftparchive packages . > Packages) -(cd SRPMS && apt-ftparchive sources . > Sources ) +(mkdir -p RPMS && cd RPMS && apt-ftparchive packages . > Packages) +(mkdir -p SRPMS && cd SRPMS && apt-ftparchive sources . > Sources ) # Install apt-get update From 2a78aac4d51b514a2f1640ce5253c4288dc04541 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 25 Nov 2013 11:20:23 +0000 Subject: [PATCH 0634/1125] SPECS: Libraries should be in the group 'Development/Libraries' rpmlint objects to the group 'Development/Other' Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/ocaml-cdrom.spec | 2 +- SPECS/ocaml-cohttp.spec | 4 ++-- SPECS/ocaml-cstruct.spec | 4 ++-- SPECS/ocaml-fd-send-recv.spec | 4 ++-- SPECS/ocaml-lambda-term.spec | 4 ++-- SPECS/ocaml-libvhd.spec | 4 ++-- SPECS/ocaml-nbd.spec | 4 ++-- SPECS/ocaml-netdev.spec | 4 ++-- SPECS/ocaml-oclock.spec | 4 ++-- SPECS/ocaml-ocplib-endian.spec | 4 ++-- SPECS/ocaml-qmp.spec | 4 ++-- SPECS/ocaml-re.spec | 4 ++-- SPECS/ocaml-rpc.spec | 4 ++-- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-ssl.spec | 4 ++-- SPECS/ocaml-stdext.spec | 4 ++-- SPECS/ocaml-tapctl.spec | 4 ++-- SPECS/ocaml-tar.spec | 4 ++-- SPECS/ocaml-type-conv.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-uuidm.spec | 4 ++-- SPECS/ocaml-uutf.spec | 4 ++-- SPECS/ocaml-vhd.spec | 4 ++-- SPECS/ocaml-xcp-idl.spec | 4 ++-- SPECS/ocaml-xcp-inventory.spec | 4 ++-- SPECS/ocaml-xcp-rrd.spec | 4 ++-- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 4 ++-- SPECS/ocaml-xen-lowlevel-libs.spec | 4 ++-- SPECS/ocaml-xenops.spec | 4 ++-- SPECS/ocaml-xenstore-clients.spec | 4 ++-- SPECS/ocaml-xenstore.spec | 4 ++-- SPECS/ocaml-yojson.spec | 4 ++-- SPECS/ocaml-zed.spec | 4 ++-- SPECS/xmlm.spec | 2 +- 38 files changed, 67 insertions(+), 67 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 1df68982..a264562c 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -5,7 +5,7 @@ Version: 1.0.6 Release: 1 Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index c4c85c7e..0900f9e6 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -3,7 +3,7 @@ Version: 0.3c Release: 1 Summary: Extension to OCaml for deriving functions from type declarations License: MIT -Group: Development/Other +Group: Development/Libraries URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 5b87d72d..27df1cbc 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -3,7 +3,7 @@ Version: 1.0.1 Release: 1 Summary: Indentation made easy License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 39ba9683..93a4f9a3 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 2 Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index cce84350..62d1ace3 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -5,7 +5,7 @@ Version: 0.9.8 Release: 1 Summary: An HTTP library for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ An HTTP library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 6cbaf99e..db980f93 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -5,7 +5,7 @@ Version: 0.7.1 Release: 2 Summary: Read and write low-level C-style structures in OCaml License: ISC -Group: Development/Other +Group: Development/Libraries URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -18,7 +18,7 @@ Read and write low-level C-style structures in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 6559eb9c..fc23058d 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -5,7 +5,7 @@ Version: 1.0.1 Release: 1 Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Bindings to sendmsg/recvmsg for fd passing under Linux. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 7f070622..18ca5f0e 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -5,7 +5,7 @@ Version: 1.2 Release: 1 Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/lambda-term/ Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Lambda-Term is a cross-platform library for manipulating the terminal. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 5e33bebb..cf1181b0 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 1 Summary: vhd manipulation via libvhd License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/libvhd Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Simple C bindings which allow .vhd files to be manipulated. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index ad1d0e76..6caeef59 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -5,7 +5,7 @@ Version: 0.9.2 Release: 1 Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/%{version}/nbd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ access remote block devices. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 4e759008..a690bf7f 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -5,7 +5,7 @@ Version: 0.9.0 Release: 1 Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/netdev Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Manipulate Linux bridges, network devices and openvswitch instances in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index b0d08a64..22d7b7a6 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -5,7 +5,7 @@ Version: 0.3 Release: 2 Summary: POSIX monotonic clock for OCaml License: ISC -Group: Development/Other +Group: Development/Libraries URL: https://github.com/polazarus/oclock Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers @@ -19,7 +19,7 @@ A POSIX monotonic clock for OCaml %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 429c7bb8..8b6e0fc3 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -5,7 +5,7 @@ Version: 0.4 Release: 1 Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -23,7 +23,7 @@ The library implements two modules: %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries Requires: optcomp %description devel diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 663fd00d..610f747b 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 1 Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ process. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 66400fea..481af40f 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -5,7 +5,7 @@ Version: 1.2.1 Release: 1 Summary: A regular expression library for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: http://github.com/ocaml/ocaml-re Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ A regular expression library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 76e4f3b2..517b0e08 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -5,7 +5,7 @@ Version: 1.4.1 Release: 1 Summary: An RPC library for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Am RPC library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 9b76921d..78e148a2 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -5,7 +5,7 @@ Version: 109.20.00 Release: 1 Summary: Convert values to and from s-expressions in OCaml -Group: Development/Other +Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: https://ocaml.janestreet.com Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 40ae1133..de530684 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -5,7 +5,7 @@ Version: 0.4.6 Release: 1 Summary: Use OpenSSL from OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Use OpenSSL from OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 43de78f4..885aaeb0 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 1 Summary: Deprecated misc library functions for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/stdext Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Deprecated misc library functions for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index eca722d4..257230ba 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 1 Summary: Manipulate running tapdisk instances License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/tapctl Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -18,7 +18,7 @@ Manipulate running tapdisk instances on a xen host. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 1c8fce3e..7deb61dd 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -3,7 +3,7 @@ Version: 0.2.1 Release: 0 Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/djs55/ocaml-tar Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -20,7 +20,7 @@ This is a pure OCaml library for reading and writing tar-format data. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries Requires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel # These are requires which should be requires of some of the -devel # packages -- update the devel packages later diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 373ce79c..52a53a69 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -5,7 +5,7 @@ Version: 109.20.00 Release: 1 Summary: OCaml base library for type conversion -Group: Development/Other +Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: http://www.ocaml.info/home/ocaml_sources.html#type-conv Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index b8e3a8a4..d01903d6 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -5,7 +5,7 @@ Version: 1.3.8 Release: 1 Summary: A URI library for OCaml License: ISC -Group: Development/Other +Group: Development/Libraries URL: https://github.com/mirage/ocaml-uri Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 7f7bad4e..6ad162e8 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -5,7 +5,7 @@ Version: 0.9.5 Release: 1 Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://erratique.ch/software/uuidm Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index e42f6cc2..d7382f4f 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -3,7 +3,7 @@ Version: 0.9.3 Release: 2 Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://erratique.ch/software/uutf Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -23,7 +23,7 @@ Uutf is made of a single, independent, module and distributed under the BSD3 lic %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index b55ecb4a..a75b2f5f 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -5,7 +5,7 @@ Version: 0.6.4 Release: 1 Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -18,7 +18,7 @@ vhd files to be read, written and streamed with on-the-fly format conversion. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 598352a2..81b3f816 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -5,7 +5,7 @@ Version: 0.9.14 Release: 1 Summary: Common interface definitions for XCP services License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -31,7 +31,7 @@ Common interface definitions for XCP services. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} Requires: message-switch-devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 709c906c..8cf1fcfa 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -5,7 +5,7 @@ Version: 0.9.0 Release: 1 Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -16,7 +16,7 @@ A simple library to read and write the XCP inventory file. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries Requires: ocaml ocaml-findlib %description devel diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 439ada17..929f0785 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -5,7 +5,7 @@ Version: 0.9.0 Release: 1 Summary: Round-Robin Datasources in OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/xcp-rrd Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Round-Robin Datasources in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index b9537c52..bef30c90 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -19,7 +19,7 @@ virtualization hosts. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 3e36b92d..3318842b 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -5,7 +5,7 @@ Version: 0.9.3 Release: 1 Summary: Deprecated standard library extension for OCaml. License: LGPL2.1 + OCaml linking exception -Group: Development/Other +Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -20,7 +20,7 @@ A deprecated standard library extension for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 83420b9c..82c57dbe 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -5,7 +5,7 @@ Version: 0.9.9 Release: 3 Summary: Xen hypercall bindings for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ Xen hypercall bindings for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index c0195d57..66186fd2 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -5,7 +5,7 @@ Version: 0.9.2 Release: 1 Summary: Low-level xen control operations OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/xenops Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ Low-level xen control operations in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index dfce2a3d..308efc66 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -5,7 +5,7 @@ Version: 0.9.2 Release: 1 Summary: Unix xenstore clients for OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xenstore-clients Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -18,7 +18,7 @@ Unix xenstore clients for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index b6dcbf0c..659b0f88 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -5,7 +5,7 @@ Version: 1.2.4 Release: 1 Summary: Xenstore protocol implementation in OCaml License: LGPL -Group: Development/Other +Group: Development/Libraries URL: https://github.com/mirage/ocaml-xenstore Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -19,7 +19,7 @@ An implementation of the xenstore protocol in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries Conflicts: xen-ocaml-devel %description devel diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index e4c2b54e..d7aa59ee 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -5,7 +5,7 @@ Version: 1.1.6 Release: 1 Summary: A JSON parser and priter for OCaml License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ A JSON parser and printer for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 4fe8bc9e..f960092e 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -5,7 +5,7 @@ Version: 1.2 Release: 1 Summary: An abstract engine for text editing for OCaml License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/zed/ Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -17,7 +17,7 @@ Zed is an abstract engine for text edition. It can be used for writing text edit %package devel Summary: Development files for %{name} -Group: Development/Other +Group: Development/Libraries #Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index ffa17af4..e6415395 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -3,7 +3,7 @@ Version: 1.1.1 Release: 1 Summary: Streaming XML input/output for OCaml License: BSD3 -Group: Development/Other +Group: Development/Libraries URL: http://erratique.ch/software/xmlm Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From f39d31080fc0129b50d09b7537100682e8cc3876 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 25 Nov 2013 13:22:17 +0000 Subject: [PATCH 0635/1125] biniou: Fix long lines in summary and description Signed-off-by: Euan Harris --- SPECS/biniou.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index a264562c..489ca02c 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -3,7 +3,7 @@ Name: biniou Version: 1.0.6 Release: 1 -Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve +Summary: Compact, fast and extensible serialization format License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html @@ -13,7 +13,8 @@ BuildRequires: ocaml ocaml-findlib easy-format Requires: ocaml ocaml-findlib %description -Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. +Binary data format designed for speed, safety, ease of use and backward +compatibility as protocols evolve. %prep %setup -q From c6b47f6f18a785726a1907d406db1cdf2c1d1cfd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 25 Nov 2013 13:22:33 +0000 Subject: [PATCH 0636/1125] biniou: Fix missing version in changelog Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 489ca02c..56118038 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -39,6 +39,6 @@ rm -rf %{buildroot} %{_bindir}/bdump %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.6-1 - Initial package From 2423bcc5a84551cfd6713e233a09e3dd11c9eedf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 25 Nov 2013 13:22:17 +0000 Subject: [PATCH 0637/1125] biniou: Fix long lines in summary and description Signed-off-by: Euan Harris --- SPECS/biniou.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index a264562c..489ca02c 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -3,7 +3,7 @@ Name: biniou Version: 1.0.6 Release: 1 -Summary: Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve +Summary: Compact, fast and extensible serialization format License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html @@ -13,7 +13,8 @@ BuildRequires: ocaml ocaml-findlib easy-format Requires: ocaml ocaml-findlib %description -Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. +Binary data format designed for speed, safety, ease of use and backward +compatibility as protocols evolve. %prep %setup -q From 740eb59f4f783bab14e7a1f1f54446c925ad2ed0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 25 Nov 2013 13:22:33 +0000 Subject: [PATCH 0638/1125] biniou: Fix missing version in changelog Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 489ca02c..56118038 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -39,6 +39,6 @@ rm -rf %{buildroot} %{_bindir}/bdump %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.6-1 - Initial package From 3fe507afdc40bb1d98aee5f06b14539e99b85f4c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:00:59 +0000 Subject: [PATCH 0639/1125] SPECS: Fix most rpmlint errors and warnings in summaries and descriptions Signed-off-by: Euan Harris --- SPECS/blktap.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 11 ++++++++--- SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-uutf.spec | 20 +++++++++++--------- SPECS/ocaml-vhd.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/ocaml-zed.spec | 3 ++- SPECS/omake.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/utop.spec | 5 +++-- SPECS/vhd-tool.spec | 2 +- SPECS/vncterm.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-sm.spec | 2 +- 15 files changed, 35 insertions(+), 26 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 97645ee4..9e44a73f 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,4 +1,4 @@ -Summary: enhanced version of tapdisk +Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index cf1181b0..fffe5bec 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -3,7 +3,7 @@ Name: ocaml-libvhd Version: 0.9.1 Release: 1 -Summary: vhd manipulation via libvhd +Summary: VHD manipulation via libvhd License: BSD3 Group: Development/Libraries URL: http://github.com/xapi-project/libvhd diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8b6e0fc3..44f1d85f 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -3,7 +3,7 @@ Name: ocaml-ocplib-endian Version: 0.4 Release: 1 -Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. +Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays License: LGPL Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian @@ -17,8 +17,13 @@ Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. The library implements two modules: -- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; -- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; +- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works + directly on strings, and provides submodules BigEndian and LittleEndian, + with their unsafe counter-parts; + +- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) + works on bigstrings (Bigarrays of chars), and provides submodules + BigEndian and LittleEndian, with their unsafe counter-parts; %package devel diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index a8c612a4..bc89f574 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -4,7 +4,7 @@ Name: ocaml-text Version: 0.6 Release: 1%{?dist} -Summary: OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. +Summary: Library for dealing with unicode text conveniently Group: Development/Libraries License: BSD diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index d7382f4f..4db3b6b4 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -11,15 +11,17 @@ BuildRequires: ocaml ocaml-ocamldoc ocaml-findlib Requires: ocaml %description -Uutf is an non-blocking streaming Unicode codec for OCaml to decode and encode the -UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently work -character by character without blocking on IO. Decoders perform character position -tracking and support newline normalization. -. -Functions are also provided to fold over the characters of UTF encoded OCaml string -values and to directly encode characters in OCaml Buffer.t values. -. -Uutf is made of a single, independent, module and distributed under the BSD3 license. +Uutf is an non-blocking streaming Unicode codec for OCaml to decode and +encode the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can +efficiently work character by character without blocking on IO. Decoders +perform character position tracking and support newline normalization. + +Functions are also provided to fold over the characters of UTF encoded +OCaml string values and to directly encode characters in OCaml Buffer.t +values. + +Uutf is made of a single, independent, module and distributed under the +BSD3 license. %package devel Summary: Development files for %{name} diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index a75b2f5f..1f9034d3 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -3,7 +3,7 @@ Name: ocaml-vhd Version: 0.6.4 Release: 1 -Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files +Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 3318842b..1f78736c 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -3,7 +3,7 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.3 Release: 1 -Summary: Deprecated standard library extension for OCaml. +Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index f960092e..2fb6808c 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -13,7 +13,8 @@ BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-re Requires: ocaml ocaml-findlib %description -Zed is an abstract engine for text edition. It can be used for writing text editors, edition widgets, readlines, ... +Zed is an abstract engine for text edition. It can be used for writing +text editors, edition widgets, readlines, ... %package devel Summary: Development files for %{name} diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 62bd9dc9..bbe54e6f 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -1,6 +1,6 @@ Version: 0.9.8.6 Release: 1 -Summary: The omake build system. +Summary: The omake build system Name: omake URL: http://omake.metaprl.org/ Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1.tar.gz/fe39a476ef4e33b7ba2ca77a6bcaded2/omake-0.9.8.6-0.rc1.tar.gz diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 5ad6f735..5b324f45 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,7 +1,7 @@ Name: sm-cli Version: 0.9.4 Release: 1 -Summary: CLI for xapi toolstack storage managers. +Summary: CLI for xapi toolstack storage managers License: LGPL Group: Development/Other URL: https://github.com/xapi-project/sm-cli diff --git a/SPECS/utop.spec b/SPECS/utop.spec index e52d9185..579bc0a7 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,7 +1,7 @@ Name: utop Version: 1.5 Release: 1 -Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... +Summary: A toplevel for OCaml which can run in a terminal or in emacs License: BSD Group: Development/Other URL: https://github.com/diml/utop @@ -12,7 +12,8 @@ BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel Requires: ocaml-camomile-data %description -utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... +utop is a toplevel for OCaml which can run in a terminal or in emacs. It +supports completion, colors, parenthesis matching, ... %prep %setup -q diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 6b72ef18..b8ee8304 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: command-line tools for manipulating and streaming .vhd format files +Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool Version: 0.6.4 Release: 1 diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3a767bd7..3c7b7352 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,4 +1,4 @@ -Summary: vncterm tty to vnc utility +Summary: TTY to VNC utility Name: vncterm Version: 0.9.0 Release: 1 diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 0aeb6a8f..c0f103b9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: xapi - xen toolstack for XCP +Summary: Xen toolstack for XCP Name: xapi Version: 1.9.38 Release: 1 diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index ab5cc2c8..e6089641 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: sm - XCP storage managers +Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 Release: 1 From ca9a75e098863a40511948cca3ea7af08d5f36a1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:05:46 +0000 Subject: [PATCH 0640/1125] xsconsole: Add %build section required by rpmlint Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index a3ad2351..4603bcd2 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -22,6 +22,9 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libdir} make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} +%build +#This space intentionally left blank + %clean rm -rf %{buildroot} From 3c9f5073ab05b1014f8fa86294246d2ccaeada9d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:08:28 +0000 Subject: [PATCH 0641/1125] cmdliner: Fix typo in description Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 072e38fe..76fdc9b7 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -11,7 +11,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description -Cmdliner is an OCaml module for the declraitive definition of command line +Cmdliner is an OCaml module for the declarative definition of command line interfaces. It provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions. The module automatically handles syntax errors, help messages and UNIX From ecb916ef8ac6ee7cfce1c566da95a741d8a1c343 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:10:47 +0000 Subject: [PATCH 0642/1125] ocaml-obuild: Spelling Signed-off-by: Euan Harris --- SPECS/ocaml-obuild.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 7eef5451..e0c99c6d 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -14,13 +14,13 @@ Requires: ocaml %description The goal is to make a very simple build system for users and developers -of OCaml library and programs. +of OCaml libraries and programs. -Obuild acts as building black box: user declares only what they want to -build and with which sources, and the build system will consistantly +Obuild acts as a building black box: user declares only what they want to +build and with which sources, and the build system will consistently build it. -The design is based on cabal, and borrow most of the layout and way of +The design is based on cabal, and borrows most of its layout and way of working, adapting parts where necessary to support OCaml fully. %prep From aeca00b234ea27291a42f96ea8614524401c0f59 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:12:00 +0000 Subject: [PATCH 0643/1125] utop: Spelling Signed-off-by: Euan Harris --- SPECS/utop.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 579bc0a7..4b1c2837 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,7 +1,7 @@ Name: utop Version: 1.5 Release: 1 -Summary: A toplevel for OCaml which can run in a terminal or in emacs +Summary: A toplevel for OCaml which can run in a terminal or in Emacs License: BSD Group: Development/Other URL: https://github.com/diml/utop @@ -12,7 +12,7 @@ BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel Requires: ocaml-camomile-data %description -utop is a toplevel for OCaml which can run in a terminal or in emacs. It +utop is a toplevel for OCaml which can run in a terminal or in Emacs. It supports completion, colors, parenthesis matching, ... %prep From d1b4a63be735987302e56d03099dfd109b2263dd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:17:54 +0000 Subject: [PATCH 0644/1125] ocaml-type-conf: Fix broken URL Signed-off-by: Euan Harris --- SPECS/ocaml-type-conv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 52a53a69..93a5eefc 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -7,7 +7,7 @@ Summary: OCaml base library for type conversion Group: Development/Libraries License: LGPLv2+ with exceptions and BSD -URL: http://www.ocaml.info/home/ocaml_sources.html#type-conv +URL: http://www.ocaml.info/software.html#type_driven Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz #Patch0: type-conv-META.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From fc68dda56d79f3aaa310b6675ec5b04f69fb2509 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:23:06 +0000 Subject: [PATCH 0645/1125] openstack-xapi-plugins: Add %build section required by rpmlint Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index cf6c5dc9..7af834b3 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -23,6 +23,9 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/usr/lib/xapi/plugins cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ +%build +#This space intentionally left blank + %clean rm -rf %{buildroot} From aa816cc03ce46309ee1977d500c0419a046adcbc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:23:56 +0000 Subject: [PATCH 0646/1125] vncterm: Add URL tag required by rpmlint Signed-off-by: Euan Harris --- SPECS/vncterm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3c7b7352..4d93391a 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -4,6 +4,7 @@ Version: 0.9.0 Release: 1 License: GPL Group: System/Hypervisor +URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot From f48b667a1ae3f15f3668c8351cf649d6a48481d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:24:25 +0000 Subject: [PATCH 0647/1125] eliloader: Add URL tag required by rpmlint Signed-off-by: Euan Harris --- SPECS/eliloader.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 67b9abe0..547b716f 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -2,6 +2,7 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader Version: 0.3 Release: 1 +URL: https://github.com/djs55/xcp-eliloader Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System From ca458c734c7ae74ba1ec4eab8ae8ad45b0d352a5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 13:47:50 +0000 Subject: [PATCH 0648/1125] SPECS: macros should not be used in changlogs Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- SPECS/xsconsole.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c0f103b9..8ddf63c1 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -179,7 +179,7 @@ fi - Update to 1.9.27 * Wed Sep 19 2013 Euan Harris - 1.9.25-2 -- Use %{python_sitelib} to choose Python install path, instead of hard-coding it. +- Use 'python_sitelib' macro to choose Python install path, instead of hard-coding it. * Wed Sep 11 2013 David Scott - 1.9.25-1 - Can now use either 'ffs' or 'iso' for the tools SR diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 4603bcd2..54d4cf16 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -41,7 +41,7 @@ rm -rf %{buildroot} %changelog * Mon Sep 16 2013 Euan Harris - 0.9.0-2 -- Use %{_libdir} rather than hard coding library installation path +- Use '_libdir' macro rather than hard coding library installation path * Fri Jul 5 2013 James Bulpin - 0.9.0-1 - Initial package From 48b81a2b99504d0ba8737e764ef44fa02cbc24c2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 15:04:04 +0000 Subject: [PATCH 0649/1125] xsconsole: Remove 'Provides: xsconsole0' line Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 54d4cf16..4ea83db0 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -7,7 +7,6 @@ Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -Provides: xsconsole0 Requires: PyPAM xapi-python-devel %description From 9668c258a11955a3ac66da3145c376afd6565e80 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 27 Nov 2013 17:31:56 +0000 Subject: [PATCH 0650/1125] ocaml-tar: Add empty %files section so base package is built Signed-off-by: Euan Harris --- SPECS/ocaml-tar.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 7deb61dd..02d3ac3b 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -1,6 +1,6 @@ Name: ocaml-tar Version: 0.2.1 -Release: 0 +Release: 1 Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception Group: Development/Libraries @@ -47,6 +47,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md From ef5af54741688a5bdd5092f6e3384c730ab7c329 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 28 Nov 2013 11:19:44 +0000 Subject: [PATCH 0651/1125] SPECS: Ensure most recent changelog entry has a version number Required by rpmlint. Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cdrom.spec | 2 +- SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-cstruct.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-lambda-term.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-lwt.spec | 2 +- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-obuild.spec | 2 +- SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-re.spec | 2 +- SPECS/ocaml-react.spec | 2 +- SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-ssl.spec | 2 +- SPECS/ocaml-stdext.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-tar.spec | 2 +- SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-type-conv.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-uuidm.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 +- SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-yojson.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- SPECS/omake.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xcp-sm.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core-latest-snapshot.spec | 2 +- SPECS/xenserver-core.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsiostat.spec | 2 +- 61 files changed, 61 insertions(+), 61 deletions(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 76fdc9b7..6b236088 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -51,6 +51,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cmdliner/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.3-1 - Initial package diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 7762dfb9..5a3781e8 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -33,6 +33,6 @@ rm -rf %{buildroot} %{_bindir}/cppo %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.9.3-1 - Initial package diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 0900f9e6..e6f9629c 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -46,6 +46,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/deriving-ocsigen/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.3c-1 - Initial package diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 27df1cbc..0a49226b 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -34,6 +34,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/easy-format/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.1-1 - Initial package diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 2ca569db..39e421f1 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -52,7 +52,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Thu Oct 31 2013 David Scott +* Thu Oct 31 2013 David Scott - 0.9.23-1 - Update to 0.9.23, with VDI.copy fix * Wed Oct 30 2013 David Scott diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index ea35548b..a8bb3138 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -72,7 +72,7 @@ developing applications that use %{name}. %{_libdir}/ocaml/forkexec/* %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Fri May 31 2013 David Scott diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 2f20cd86..8cf85823 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_bindir}/js_of_ocaml %changelog -* Sun Jun 2 2013 David Scott +* Sun Jun 2 2013 David Scott - 1.3.2-1 - Initial package diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index bafb0f8a..02cb79d4 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -87,7 +87,7 @@ developing applications that use %{name}. %{_libdir}/ocaml/message_switch/* %changelog -* Fri Oct 18 2013 David Scott +* Fri Oct 18 2013 David Scott - 0.10.1-1 - Update to 0.10.1 which is more tolerant of startup orderings * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 93a4f9a3..501c58ac 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllstubs_cdrom.so.owner %changelog -* Tue May 28 2013 David Scott +* Tue May 28 2013 David Scott - 0.9.1-2 - Initial package diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 62d1ace3..4ece1246 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -50,6 +50,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cohttp/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.8-1 - Initial package diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index db980f93..0c4abbc7 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -54,7 +54,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner %changelog -* Mon Sep 23 2013 David Scott +* Mon Sep 23 2013 David Scott - 0.7.1-2 - Add dependency on lwt so the cstruct.lwt package is built * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index fc23058d..21609dca 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so.owner %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.1-1 - Initial package diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 18ca5f0e..75e1a251 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -55,6 +55,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 1.2-1 - Initial package diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index fffe5bec..7b1ce407 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so.owner %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.9.1-1 - Initial package diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 8a780a1c..c3551a6f 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -82,7 +82,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/stublibs/*.so.owner %changelog -* Sat Jun 1 2013 David Scott +* Sat Jun 1 2013 David Scott - 2.4.3-1 - Update to 2.4.3 * Wed Nov 2 2011 David Scott - 2.2.0-2 diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 6caeef59..2c4302cd 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -93,7 +93,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/nbd/META %changelog -* Thu Nov 21 2013 David Scott +* Thu Nov 21 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Mon Sep 23 2013 David Scott diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index a690bf7f..33fe1c3d 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllnetdev_stubs.so.owner %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index e0c99c6d..850ca103 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -48,6 +48,6 @@ rm -rf dist %{_bindir}/obuild-from-oasis %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.0.2-1 - Initial package diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 22d7b7a6..cfbf5d35 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -58,6 +58,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dlloclock.so.owner %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.3-2 - Initial package diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 44f1d85f..88ba416a 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -60,6 +60,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/ocplib-endian/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.4-1 - Initial package diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 481af40f..669ce85e 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/re/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.2.1-1 - Initial package diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 3588c912..df0c6721 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -69,7 +69,7 @@ rm -rf %{buildroot} %changelog -* Sat Jun 01 2013 David Scott +* Sat Jun 01 2013 David Scott - 0.9.4-1 - Update for 0.9.4 * Tue Feb 08 2011 Fedora Release Engineering - 0.9.2-2 diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 517b0e08..68974076 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -49,6 +49,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/rpclib/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.4.1-1 - Initial package diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 78e148a2..f3b004c5 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -43,6 +43,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/sexplib %changelog -* Mon Jun 3 2013 David Scott +* Mon Jun 3 2013 David Scott - 109.20.00-1 - Initial package diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index de530684..9ebeb4e2 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -56,6 +56,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so.owner %changelog -* Sun Jun 2 2013 David Scott +* Sun Jun 2 2013 David Scott - 0.4.6-1 - Initial package diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 885aaeb0..c1f9665e 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -52,7 +52,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner %changelog -* Tue Sep 10 2013 David Scott +* Tue Sep 10 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Mon Jun 3 2013 David Scott diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 257230ba..37a83596 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/tapctl/* %changelog -* Fri Oct 25 2013 David Scott +* Fri Oct 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 02d3ac3b..84fd9c49 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -78,5 +78,5 @@ rm -rf %{buildroot} %{_libdir}/ocaml/tar/tar_unix.mli %changelog -* Fri Nov 15 2013 David Scott +* Fri Nov 15 2013 David Scott - 0.2.1-1 - Initial package diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index bc89f574..56bb057b 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -64,6 +64,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/stublibs/* %changelog -* Sat Jun 01 2013 David Scott +* Sat Jun 01 2013 David Scott - 0.6-1 - Initial package diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 93a5eefc..00c82411 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -48,7 +48,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/type_conv %changelog -* Wed Nov 25 2010 Mike McClurg +* Wed Nov 25 2010 Mike McClurg - 109.20.00-1 - Updated to version 2.0.1 for compatability with OCaml 3.12.0 * Fri May 14 2010 David Scott diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index d01903d6..82bfd551 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/uri/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.3.8-1 - Initial package diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 6ad162e8..f9fe4664 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -59,6 +59,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/uuidm/META %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.9.5-1 - Initial package diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 81b3f816..6b7b1b5b 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -65,7 +65,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp/* %changelog -* Thu Sep 26 2013 David Scott +* Thu Sep 26 2013 David Scott - 0.9.14-1 - Support searching for executables on the XCP_PATH as well as the PATH * Wed Sep 25 2013 David Scott diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 8cf1fcfa..e958edea 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp-inventory/* %changelog -* Wed Jun 5 2013 David Scott +* Wed Jun 5 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 929f0785..7bc0c51e 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp-rrd/* %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index bef30c90..b7004885 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -54,7 +54,7 @@ rm -rf %{buildroot} %changelog -* Wed Jun 5 2013 David Scott +* Wed Jun 5 2013 David Scott - 0.9.4-1 - Update to 0.9.3 * Wed May 29 2013 Mike McClurg diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 1f78736c..149e53b6 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -70,7 +70,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 82c57dbe..33a4d70e 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -82,7 +82,7 @@ rm -rf %{buildroot} %changelog -* Mon Oct 21 2013 David Scott +* Mon Oct 21 2013 David Scott - 0.9.9-3 - Exclude the xenlight stuff in case it manages to build * Sun Oct 20 2013 David Scott diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 66186fd2..50445b61 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenops/* %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 308efc66..9190c334 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -50,7 +50,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore_transport/* %changelog -* Tue Sep 10 2013 David Scott +* Tue Sep 10 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Mon Jun 3 2013 David Scott diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 659b0f88..23dd72fb 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore/* %changelog -* Wed Sep 11 2013 David Scott +* Wed Sep 11 2013 David Scott - 1.2.4-1 - Update to 1.2.4 (fixes critical watching bug) * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index d7aa59ee..8746b2c3 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -49,6 +49,6 @@ rm -rf %{buildroot} %{_bindir}/ydump %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.1.6-1 - Initial package diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 2fb6808c..87781090 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -51,6 +51,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/zed/* %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 1.2-1 - Initial package diff --git a/SPECS/omake.spec b/SPECS/omake.spec index bbe54e6f..1540c1d1 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -61,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/omake %changelog -* Thu Nov 25 2010 Mike McClurg +* Thu Nov 25 2010 Mike McClurg - 0.9.8.6-1 - Updated to 0.9.8.6 (revision 13252) to support OCaml 3.12.0. * Fri May 14 2010 David Scott diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 7af834b3..ec14d83e 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -34,7 +34,7 @@ rm -rf %{buildroot} /usr/lib/xapi/plugins/* %changelog -* Wed Nov 20 2013 Euan Harris +* Wed Nov 20 2013 Euan Harris - 2013.2-1 - Update to Havana release * Wed Jul 3 2013 David Scott diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index bcb3bf16..786cc9fd 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -40,6 +40,6 @@ rm -rf %{buildroot} %{_bindir}/optcomp-o %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.4-1 - Initial package diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 5b324f45..41dd678f 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -38,7 +38,7 @@ rm -rf %{buildroot} %{_sbindir}/sm-cli %changelog -* Fri Oct 25 2013 David Scott +* Fri Oct 25 2013 David Scott - 0.9.4-1 - Update to 0.9.4 * Thu May 30 2013 David Scott diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 9c86dd81..07c32038 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -57,7 +57,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 24 2013 David Scott +* Wed Sep 24 2013 David Scott - 0.10.4-1 - Update to 0.10.4 * Fri Sep 20 2013 David Scott - 0.10.3-1 diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 4b1c2837..4607d21b 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -42,7 +42,7 @@ rm -rf %{buildroot} /usr/share/emacs/site-lisp/utop.el %changelog -* Fri Jun 21 2013 David Scott +* Fri Jun 21 2013 David Scott - 1.5-1 - Update to version 1.5 (discovered lurking in plain sight on github) * Thu May 30 2013 David Scott diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 04e943de..e3e26916 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -51,7 +51,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.7-1 - Update to 0.9.7 * Fri May 31 2013 David Scott diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 0d21542e..cee89693 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -67,7 +67,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 * Wed Aug 28 2013 David Scott diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index b5d022a2..9318e585 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -54,7 +54,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Tue Sep 10 2013 David Scott diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index e6089641..87ef07c2 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -264,7 +264,7 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog -* Fri Nov 8 2013 Euan Harris +* Fri Nov 8 2013 Euan Harris - 0.9.6-1 - Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu * Mon Oct 28 2013 Euan Harris diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 22aad259..69a1f20d 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -38,7 +38,7 @@ rm -rf %{buildroot} %{_bindir}/xe-create-templates %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Wed Jun 12 2013 David Scott diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 30d0363a..0caafd06 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -38,6 +38,6 @@ rm -rf %{buildroot} %{_sbindir}/xenops-cli %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.1-2 - Initial package diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 0fead5fc..4824a09d 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -184,7 +184,7 @@ fi #fi %changelog -* Mon Oct 28 2013 David Scott +* Mon Oct 28 2013 David Scott - 0.9.32-1 - Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") * Mon Oct 21 2013 David Scott diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 5cb05aa1..f99c2898 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -69,6 +69,6 @@ yum repolist /etc/pki/rpm-gpg/RPM-GPG-KEY-remi %changelog -* Sun Jun 9 2013 David Scott +* Sun Jun 9 2013 David Scott - 0.1.0-2 - Initial package diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index c68d412a..e11719f8 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -40,7 +40,7 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog -* Fri Nov 1 2013 Euan Harris +* Fri Nov 1 2013 Euan Harris - 0.10.0-1 - Bump version to 0.10.0 * Sun Oct 20 2013 David Scott diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 1dc30d3d..2d26665b 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -33,7 +33,7 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog -* Wed Oct 30 2013 Euan Harris +* Wed Oct 30 2013 Euan Harris - 0.2.27-1 - Update to 0.2.27 * Thu Oct 24 2013 Euan Harris diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index e6415395..d92fa7f0 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xmlm/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.1.1-1 - Initial package diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 78d84b1c..632bcff3 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -31,6 +31,6 @@ rm -rf %{buildroot} %{_sbindir}/xsiostat %changelog -* Tue Jun 19 2013 David Scott +* Tue Jun 19 2013 David Scott - 0.2.0-1 - Initial package From d074996c7b10ff66b62ce8c00fa99bc828698e34 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:00:59 +0000 Subject: [PATCH 0652/1125] SPECS: Fix most rpmlint errors and warnings in summaries and descriptions Signed-off-by: Euan Harris --- SPECS/blktap.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 11 ++++++++--- SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-uutf.spec | 20 +++++++++++--------- SPECS/ocaml-vhd.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/ocaml-zed.spec | 3 ++- SPECS/omake.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/utop.spec | 5 +++-- SPECS/vhd-tool.spec | 2 +- SPECS/vncterm.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-sm.spec | 2 +- 15 files changed, 35 insertions(+), 26 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 97645ee4..9e44a73f 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,4 +1,4 @@ -Summary: enhanced version of tapdisk +Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.0 Release: 1 diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index cf1181b0..fffe5bec 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -3,7 +3,7 @@ Name: ocaml-libvhd Version: 0.9.1 Release: 1 -Summary: vhd manipulation via libvhd +Summary: VHD manipulation via libvhd License: BSD3 Group: Development/Libraries URL: http://github.com/xapi-project/libvhd diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8b6e0fc3..44f1d85f 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -3,7 +3,7 @@ Name: ocaml-ocplib-endian Version: 0.4 Release: 1 -Summary: Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. +Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays License: LGPL Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian @@ -17,8 +17,13 @@ Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. The library implements two modules: -- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; -- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; +- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works + directly on strings, and provides submodules BigEndian and LittleEndian, + with their unsafe counter-parts; + +- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) + works on bigstrings (Bigarrays of chars), and provides submodules + BigEndian and LittleEndian, with their unsafe counter-parts; %package devel diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index a8c612a4..bc89f574 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -4,7 +4,7 @@ Name: ocaml-text Version: 0.6 Release: 1%{?dist} -Summary: OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. +Summary: Library for dealing with unicode text conveniently Group: Development/Libraries License: BSD diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index d7382f4f..4db3b6b4 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -11,15 +11,17 @@ BuildRequires: ocaml ocaml-ocamldoc ocaml-findlib Requires: ocaml %description -Uutf is an non-blocking streaming Unicode codec for OCaml to decode and encode the -UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently work -character by character without blocking on IO. Decoders perform character position -tracking and support newline normalization. -. -Functions are also provided to fold over the characters of UTF encoded OCaml string -values and to directly encode characters in OCaml Buffer.t values. -. -Uutf is made of a single, independent, module and distributed under the BSD3 license. +Uutf is an non-blocking streaming Unicode codec for OCaml to decode and +encode the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can +efficiently work character by character without blocking on IO. Decoders +perform character position tracking and support newline normalization. + +Functions are also provided to fold over the characters of UTF encoded +OCaml string values and to directly encode characters in OCaml Buffer.t +values. + +Uutf is made of a single, independent, module and distributed under the +BSD3 license. %package devel Summary: Development files for %{name} diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index a75b2f5f..1f9034d3 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -3,7 +3,7 @@ Name: ocaml-vhd Version: 0.6.4 Release: 1 -Summary: A pure OCaml library for reading, writing, streaming, converting vhd format files +Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 3318842b..1f78736c 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -3,7 +3,7 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.3 Release: 1 -Summary: Deprecated standard library extension for OCaml. +Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index f960092e..2fb6808c 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -13,7 +13,8 @@ BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-re Requires: ocaml ocaml-findlib %description -Zed is an abstract engine for text edition. It can be used for writing text editors, edition widgets, readlines, ... +Zed is an abstract engine for text edition. It can be used for writing +text editors, edition widgets, readlines, ... %package devel Summary: Development files for %{name} diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 62bd9dc9..bbe54e6f 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -1,6 +1,6 @@ Version: 0.9.8.6 Release: 1 -Summary: The omake build system. +Summary: The omake build system Name: omake URL: http://omake.metaprl.org/ Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1.tar.gz/fe39a476ef4e33b7ba2ca77a6bcaded2/omake-0.9.8.6-0.rc1.tar.gz diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 5ad6f735..5b324f45 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,7 +1,7 @@ Name: sm-cli Version: 0.9.4 Release: 1 -Summary: CLI for xapi toolstack storage managers. +Summary: CLI for xapi toolstack storage managers License: LGPL Group: Development/Other URL: https://github.com/xapi-project/sm-cli diff --git a/SPECS/utop.spec b/SPECS/utop.spec index e52d9185..579bc0a7 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,7 +1,7 @@ Name: utop Version: 1.5 Release: 1 -Summary: utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... +Summary: A toplevel for OCaml which can run in a terminal or in emacs License: BSD Group: Development/Other URL: https://github.com/diml/utop @@ -12,7 +12,8 @@ BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel Requires: ocaml-camomile-data %description -utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ... +utop is a toplevel for OCaml which can run in a terminal or in emacs. It +supports completion, colors, parenthesis matching, ... %prep %setup -q diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 6b72ef18..b8ee8304 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: command-line tools for manipulating and streaming .vhd format files +Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool Version: 0.6.4 Release: 1 diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3a767bd7..3c7b7352 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,4 +1,4 @@ -Summary: vncterm tty to vnc utility +Summary: TTY to VNC utility Name: vncterm Version: 0.9.0 Release: 1 diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 0aeb6a8f..c0f103b9 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: xapi - xen toolstack for XCP +Summary: Xen toolstack for XCP Name: xapi Version: 1.9.38 Release: 1 diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index ab5cc2c8..e6089641 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -1,6 +1,6 @@ # -*- rpm-spec -*- -Summary: sm - XCP storage managers +Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 Release: 1 From 332b60008023bd41a6de2ce0a94f8f4a809e14f5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:05:46 +0000 Subject: [PATCH 0653/1125] xsconsole: Add %build section required by rpmlint Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index a3ad2351..4603bcd2 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -22,6 +22,9 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libdir} make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} +%build +#This space intentionally left blank + %clean rm -rf %{buildroot} From b1566dcc1eb3ef73af3d20945ba9c1a207e490cf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:08:28 +0000 Subject: [PATCH 0654/1125] cmdliner: Fix typo in description Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 072e38fe..76fdc9b7 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -11,7 +11,7 @@ BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib %description -Cmdliner is an OCaml module for the declraitive definition of command line +Cmdliner is an OCaml module for the declarative definition of command line interfaces. It provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions. The module automatically handles syntax errors, help messages and UNIX From 6fdb028e050e2e131613aa6f873beb811616bb3f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:10:47 +0000 Subject: [PATCH 0655/1125] ocaml-obuild: Spelling Signed-off-by: Euan Harris --- SPECS/ocaml-obuild.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 7eef5451..e0c99c6d 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -14,13 +14,13 @@ Requires: ocaml %description The goal is to make a very simple build system for users and developers -of OCaml library and programs. +of OCaml libraries and programs. -Obuild acts as building black box: user declares only what they want to -build and with which sources, and the build system will consistantly +Obuild acts as a building black box: user declares only what they want to +build and with which sources, and the build system will consistently build it. -The design is based on cabal, and borrow most of the layout and way of +The design is based on cabal, and borrows most of its layout and way of working, adapting parts where necessary to support OCaml fully. %prep From 0f119a6db741e5536717bb3a8cbdf96afa98ff0c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:12:00 +0000 Subject: [PATCH 0656/1125] utop: Spelling Signed-off-by: Euan Harris --- SPECS/utop.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 579bc0a7..4b1c2837 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,7 +1,7 @@ Name: utop Version: 1.5 Release: 1 -Summary: A toplevel for OCaml which can run in a terminal or in emacs +Summary: A toplevel for OCaml which can run in a terminal or in Emacs License: BSD Group: Development/Other URL: https://github.com/diml/utop @@ -12,7 +12,7 @@ BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel Requires: ocaml-camomile-data %description -utop is a toplevel for OCaml which can run in a terminal or in emacs. It +utop is a toplevel for OCaml which can run in a terminal or in Emacs. It supports completion, colors, parenthesis matching, ... %prep From 501bce6347f09059a11b3aef5e3ca997ccd059ec Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:17:54 +0000 Subject: [PATCH 0657/1125] ocaml-type-conf: Fix broken URL Signed-off-by: Euan Harris --- SPECS/ocaml-type-conv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 52a53a69..93a5eefc 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -7,7 +7,7 @@ Summary: OCaml base library for type conversion Group: Development/Libraries License: LGPLv2+ with exceptions and BSD -URL: http://www.ocaml.info/home/ocaml_sources.html#type-conv +URL: http://www.ocaml.info/software.html#type_driven Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz #Patch0: type-conv-META.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} From 026839da906debe69f83d73a67c09caa4c82b5f3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:23:06 +0000 Subject: [PATCH 0658/1125] openstack-xapi-plugins: Add %build section required by rpmlint Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index cf6c5dc9..7af834b3 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -23,6 +23,9 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/usr/lib/xapi/plugins cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ +%build +#This space intentionally left blank + %clean rm -rf %{buildroot} From 5ed2afe498a23aa7da24108e631d359ef2d6578f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:23:56 +0000 Subject: [PATCH 0659/1125] vncterm: Add URL tag required by rpmlint Signed-off-by: Euan Harris --- SPECS/vncterm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3c7b7352..4d93391a 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -4,6 +4,7 @@ Version: 0.9.0 Release: 1 License: GPL Group: System/Hypervisor +URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot From f0ebeafcc88bda46564ba17236250c07876865af Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 10:24:25 +0000 Subject: [PATCH 0660/1125] eliloader: Add URL tag required by rpmlint Signed-off-by: Euan Harris --- SPECS/eliloader.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 67b9abe0..547b716f 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -2,6 +2,7 @@ Summary: Bootloader for EL-based distros that support Xen Name: eliloader Version: 0.3 Release: 1 +URL: https://github.com/djs55/xcp-eliloader Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System From e15cdc6bc2ad827876e899052f67ca293b101fb4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 13:47:50 +0000 Subject: [PATCH 0661/1125] SPECS: macros should not be used in changlogs Signed-off-by: Euan Harris --- SPECS/xapi.spec | 2 +- SPECS/xsconsole.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c0f103b9..8ddf63c1 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -179,7 +179,7 @@ fi - Update to 1.9.27 * Wed Sep 19 2013 Euan Harris - 1.9.25-2 -- Use %{python_sitelib} to choose Python install path, instead of hard-coding it. +- Use 'python_sitelib' macro to choose Python install path, instead of hard-coding it. * Wed Sep 11 2013 David Scott - 1.9.25-1 - Can now use either 'ffs' or 'iso' for the tools SR diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 4603bcd2..54d4cf16 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -41,7 +41,7 @@ rm -rf %{buildroot} %changelog * Mon Sep 16 2013 Euan Harris - 0.9.0-2 -- Use %{_libdir} rather than hard coding library installation path +- Use '_libdir' macro rather than hard coding library installation path * Fri Jul 5 2013 James Bulpin - 0.9.0-1 - Initial package From 4191012ce0672b8fd8c8012715cbad4c6324a2b3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 26 Nov 2013 15:04:04 +0000 Subject: [PATCH 0662/1125] xsconsole: Remove 'Provides: xsconsole0' line Signed-off-by: Euan Harris --- SPECS/xsconsole.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 54d4cf16..4ea83db0 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -7,7 +7,6 @@ Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -Provides: xsconsole0 Requires: PyPAM xapi-python-devel %description From 4b568f08ac4e55676022792f2f21e48494ce965c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 27 Nov 2013 17:31:56 +0000 Subject: [PATCH 0663/1125] ocaml-tar: Add empty %files section so base package is built Signed-off-by: Euan Harris --- SPECS/ocaml-tar.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 7deb61dd..02d3ac3b 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -1,6 +1,6 @@ Name: ocaml-tar Version: 0.2.1 -Release: 0 +Release: 1 Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception Group: Development/Libraries @@ -47,6 +47,9 @@ ocaml setup.ml -install %clean rm -rf %{buildroot} +%files +# This space intentionally left blank + %files devel %defattr(-,root,root) %doc README.md From 0b4300e36aaadb2ec3ad9bb1e5d2b96e04cf9cfb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 28 Nov 2013 11:19:44 +0000 Subject: [PATCH 0664/1125] SPECS: Ensure most recent changelog entry has a version number Required by rpmlint. Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cdrom.spec | 2 +- SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-cstruct.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-lambda-term.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-lwt.spec | 2 +- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-obuild.spec | 2 +- SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-re.spec | 2 +- SPECS/ocaml-react.spec | 2 +- SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-ssl.spec | 2 +- SPECS/ocaml-stdext.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-tar.spec | 2 +- SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-type-conv.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-uuidm.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 +- SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-yojson.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- SPECS/omake.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xcp-sm.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core-latest-snapshot.spec | 2 +- SPECS/xenserver-core.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsiostat.spec | 2 +- 61 files changed, 61 insertions(+), 61 deletions(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 76fdc9b7..6b236088 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -51,6 +51,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cmdliner/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.3-1 - Initial package diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 7762dfb9..5a3781e8 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -33,6 +33,6 @@ rm -rf %{buildroot} %{_bindir}/cppo %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.9.3-1 - Initial package diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 0900f9e6..e6f9629c 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -46,6 +46,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/deriving-ocsigen/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.3c-1 - Initial package diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 27df1cbc..0a49226b 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -34,6 +34,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/easy-format/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.1-1 - Initial package diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 2ca569db..39e421f1 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -52,7 +52,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Thu Oct 31 2013 David Scott +* Thu Oct 31 2013 David Scott - 0.9.23-1 - Update to 0.9.23, with VDI.copy fix * Wed Oct 30 2013 David Scott diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index ea35548b..a8bb3138 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -72,7 +72,7 @@ developing applications that use %{name}. %{_libdir}/ocaml/forkexec/* %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Fri May 31 2013 David Scott diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 2f20cd86..8cf85823 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_bindir}/js_of_ocaml %changelog -* Sun Jun 2 2013 David Scott +* Sun Jun 2 2013 David Scott - 1.3.2-1 - Initial package diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index bafb0f8a..02cb79d4 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -87,7 +87,7 @@ developing applications that use %{name}. %{_libdir}/ocaml/message_switch/* %changelog -* Fri Oct 18 2013 David Scott +* Fri Oct 18 2013 David Scott - 0.10.1-1 - Update to 0.10.1 which is more tolerant of startup orderings * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 93a4f9a3..501c58ac 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllstubs_cdrom.so.owner %changelog -* Tue May 28 2013 David Scott +* Tue May 28 2013 David Scott - 0.9.1-2 - Initial package diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 62d1ace3..4ece1246 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -50,6 +50,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/cohttp/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.8-1 - Initial package diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index db980f93..0c4abbc7 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -54,7 +54,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner %changelog -* Mon Sep 23 2013 David Scott +* Mon Sep 23 2013 David Scott - 0.7.1-2 - Add dependency on lwt so the cstruct.lwt package is built * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index fc23058d..21609dca 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so.owner %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.0.1-1 - Initial package diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 18ca5f0e..75e1a251 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -55,6 +55,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 1.2-1 - Initial package diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index fffe5bec..7b1ce407 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so.owner %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.9.1-1 - Initial package diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 8a780a1c..c3551a6f 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -82,7 +82,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/stublibs/*.so.owner %changelog -* Sat Jun 1 2013 David Scott +* Sat Jun 1 2013 David Scott - 2.4.3-1 - Update to 2.4.3 * Wed Nov 2 2011 David Scott - 2.2.0-2 diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 6caeef59..2c4302cd 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -93,7 +93,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/nbd/META %changelog -* Thu Nov 21 2013 David Scott +* Thu Nov 21 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Mon Sep 23 2013 David Scott diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index a690bf7f..33fe1c3d 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllnetdev_stubs.so.owner %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index e0c99c6d..850ca103 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -48,6 +48,6 @@ rm -rf dist %{_bindir}/obuild-from-oasis %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.0.2-1 - Initial package diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 22d7b7a6..cfbf5d35 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -58,6 +58,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dlloclock.so.owner %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.3-2 - Initial package diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 44f1d85f..88ba416a 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -60,6 +60,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/ocplib-endian/* %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 0.4-1 - Initial package diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 481af40f..669ce85e 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/re/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.2.1-1 - Initial package diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 3588c912..df0c6721 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -69,7 +69,7 @@ rm -rf %{buildroot} %changelog -* Sat Jun 01 2013 David Scott +* Sat Jun 01 2013 David Scott - 0.9.4-1 - Update for 0.9.4 * Tue Feb 08 2011 Fedora Release Engineering - 0.9.2-2 diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 517b0e08..68974076 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -49,6 +49,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/rpclib/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.4.1-1 - Initial package diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 78e148a2..f3b004c5 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -43,6 +43,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/sexplib %changelog -* Mon Jun 3 2013 David Scott +* Mon Jun 3 2013 David Scott - 109.20.00-1 - Initial package diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index de530684..9ebeb4e2 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -56,6 +56,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so.owner %changelog -* Sun Jun 2 2013 David Scott +* Sun Jun 2 2013 David Scott - 0.4.6-1 - Initial package diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 885aaeb0..c1f9665e 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -52,7 +52,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner %changelog -* Tue Sep 10 2013 David Scott +* Tue Sep 10 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Mon Jun 3 2013 David Scott diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 257230ba..37a83596 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/tapctl/* %changelog -* Fri Oct 25 2013 David Scott +* Fri Oct 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 * Thu May 30 2013 David Scott diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 02d3ac3b..84fd9c49 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -78,5 +78,5 @@ rm -rf %{buildroot} %{_libdir}/ocaml/tar/tar_unix.mli %changelog -* Fri Nov 15 2013 David Scott +* Fri Nov 15 2013 David Scott - 0.2.1-1 - Initial package diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index bc89f574..56bb057b 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -64,6 +64,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/stublibs/* %changelog -* Sat Jun 01 2013 David Scott +* Sat Jun 01 2013 David Scott - 0.6-1 - Initial package diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 93a5eefc..00c82411 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -48,7 +48,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/type_conv %changelog -* Wed Nov 25 2010 Mike McClurg +* Wed Nov 25 2010 Mike McClurg - 109.20.00-1 - Updated to version 2.0.1 for compatability with OCaml 3.12.0 * Fri May 14 2010 David Scott diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index d01903d6..82bfd551 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/uri/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.3.8-1 - Initial package diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 6ad162e8..f9fe4664 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -59,6 +59,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/uuidm/META %changelog -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.9.5-1 - Initial package diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 81b3f816..6b7b1b5b 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -65,7 +65,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp/* %changelog -* Thu Sep 26 2013 David Scott +* Thu Sep 26 2013 David Scott - 0.9.14-1 - Support searching for executables on the XCP_PATH as well as the PATH * Wed Sep 25 2013 David Scott diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 8cf1fcfa..e958edea 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -54,6 +54,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp-inventory/* %changelog -* Wed Jun 5 2013 David Scott +* Wed Jun 5 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 929f0785..7bc0c51e 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -48,6 +48,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xcp-rrd/* %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index bef30c90..b7004885 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -54,7 +54,7 @@ rm -rf %{buildroot} %changelog -* Wed Jun 5 2013 David Scott +* Wed Jun 5 2013 David Scott - 0.9.4-1 - Update to 0.9.3 * Wed May 29 2013 Mike McClurg diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 1f78736c..149e53b6 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -70,7 +70,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 82c57dbe..33a4d70e 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -82,7 +82,7 @@ rm -rf %{buildroot} %changelog -* Mon Oct 21 2013 David Scott +* Mon Oct 21 2013 David Scott - 0.9.9-3 - Exclude the xenlight stuff in case it manages to build * Sun Oct 20 2013 David Scott diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 66186fd2..50445b61 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenops/* %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 308efc66..9190c334 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -50,7 +50,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore_transport/* %changelog -* Tue Sep 10 2013 David Scott +* Tue Sep 10 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Mon Jun 3 2013 David Scott diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 659b0f88..23dd72fb 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -51,7 +51,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xenstore/* %changelog -* Wed Sep 11 2013 David Scott +* Wed Sep 11 2013 David Scott - 1.2.4-1 - Update to 1.2.4 (fixes critical watching bug) * Tue Sep 10 2013 David Scott diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index d7aa59ee..8746b2c3 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -49,6 +49,6 @@ rm -rf %{buildroot} %{_bindir}/ydump %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.1.6-1 - Initial package diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 2fb6808c..87781090 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -51,6 +51,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/zed/* %changelog -* Thu Jun 6 2013 David Scott +* Thu Jun 6 2013 David Scott - 1.2-1 - Initial package diff --git a/SPECS/omake.spec b/SPECS/omake.spec index bbe54e6f..1540c1d1 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -61,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/omake %changelog -* Thu Nov 25 2010 Mike McClurg +* Thu Nov 25 2010 Mike McClurg - 0.9.8.6-1 - Updated to 0.9.8.6 (revision 13252) to support OCaml 3.12.0. * Fri May 14 2010 David Scott diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 7af834b3..ec14d83e 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -34,7 +34,7 @@ rm -rf %{buildroot} /usr/lib/xapi/plugins/* %changelog -* Wed Nov 20 2013 Euan Harris +* Wed Nov 20 2013 Euan Harris - 2013.2-1 - Update to Havana release * Wed Jul 3 2013 David Scott diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index bcb3bf16..786cc9fd 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -40,6 +40,6 @@ rm -rf %{buildroot} %{_bindir}/optcomp-o %changelog -* Fri May 31 2013 David Scott +* Fri May 31 2013 David Scott - 1.4-1 - Initial package diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 5b324f45..41dd678f 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -38,7 +38,7 @@ rm -rf %{buildroot} %{_sbindir}/sm-cli %changelog -* Fri Oct 25 2013 David Scott +* Fri Oct 25 2013 David Scott - 0.9.4-1 - Update to 0.9.4 * Thu May 30 2013 David Scott diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 9c86dd81..07c32038 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -57,7 +57,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 24 2013 David Scott +* Wed Sep 24 2013 David Scott - 0.10.4-1 - Update to 0.10.4 * Fri Sep 20 2013 David Scott - 0.10.3-1 diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 4b1c2837..4607d21b 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -42,7 +42,7 @@ rm -rf %{buildroot} /usr/share/emacs/site-lisp/utop.el %changelog -* Fri Jun 21 2013 David Scott +* Fri Jun 21 2013 David Scott - 1.5-1 - Update to version 1.5 (discovered lurking in plain sight on github) * Thu May 30 2013 David Scott diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 04e943de..e3e26916 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -51,7 +51,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.7-1 - Update to 0.9.7 * Fri May 31 2013 David Scott diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 0d21542e..cee89693 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -67,7 +67,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 * Wed Aug 28 2013 David Scott diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index b5d022a2..9318e585 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -54,7 +54,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Tue Sep 10 2013 David Scott diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index e6089641..87ef07c2 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -264,7 +264,7 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog -* Fri Nov 8 2013 Euan Harris +* Fri Nov 8 2013 Euan Harris - 0.9.6-1 - Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu * Mon Oct 28 2013 Euan Harris diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 22aad259..69a1f20d 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -38,7 +38,7 @@ rm -rf %{buildroot} %{_bindir}/xe-create-templates %changelog -* Wed Sep 25 2013 David Scott +* Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 * Wed Jun 12 2013 David Scott diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 30d0363a..0caafd06 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -38,6 +38,6 @@ rm -rf %{buildroot} %{_sbindir}/xenops-cli %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 0.9.1-2 - Initial package diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 0fead5fc..4824a09d 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -184,7 +184,7 @@ fi #fi %changelog -* Mon Oct 28 2013 David Scott +* Mon Oct 28 2013 David Scott - 0.9.32-1 - Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") * Mon Oct 21 2013 David Scott diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 5cb05aa1..f99c2898 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -69,6 +69,6 @@ yum repolist /etc/pki/rpm-gpg/RPM-GPG-KEY-remi %changelog -* Sun Jun 9 2013 David Scott +* Sun Jun 9 2013 David Scott - 0.1.0-2 - Initial package diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index c68d412a..e11719f8 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -40,7 +40,7 @@ rm -rf %{buildroot} /usr/share/doc/xenserver/README %changelog -* Fri Nov 1 2013 Euan Harris +* Fri Nov 1 2013 Euan Harris - 0.10.0-1 - Bump version to 0.10.0 * Sun Oct 20 2013 David Scott diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 1dc30d3d..2d26665b 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -33,7 +33,7 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog -* Wed Oct 30 2013 Euan Harris +* Wed Oct 30 2013 Euan Harris - 0.2.27-1 - Update to 0.2.27 * Thu Oct 24 2013 Euan Harris diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index e6415395..d92fa7f0 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -53,6 +53,6 @@ rm -rf %{buildroot} %{_libdir}/ocaml/xmlm/* %changelog -* Thu May 30 2013 David Scott +* Thu May 30 2013 David Scott - 1.1.1-1 - Initial package diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 78d84b1c..632bcff3 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -31,6 +31,6 @@ rm -rf %{buildroot} %{_sbindir}/xsiostat %changelog -* Tue Jun 19 2013 David Scott +* Tue Jun 19 2013 David Scott - 0.2.0-1 - Initial package From 0367e6f4bdd5777775112f335d84e36097782609 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Dec 2013 10:23:48 +0000 Subject: [PATCH 0665/1125] specdep: Get short distribution name, needed for RHEL Signed-off-by: Euan Harris --- specdep.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specdep.py b/specdep.py index 933af3ef..a1dcc327 100755 --- a/specdep.py +++ b/specdep.py @@ -21,12 +21,12 @@ def build_type(): debian_like = ["ubuntu", "debian"] rhel_like = ["fedora", "redhat", "centos"] - distribution = platform.linux_distribution()[0].lower() - assert distribution in debian_like + rhel_like + dist = platform.linux_distribution(full_distribution_name=False)[0].lower() + assert dist in debian_like + rhel_like - if distribution in debian_like: + if dist in debian_like: return "deb" - elif distribution in rhel_like: + elif dist in rhel_like: return "rpm" From d101f8d6ef40df1672a1ff857810ef14121296a9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Dec 2013 11:56:46 +0000 Subject: [PATCH 0666/1125] configure: Recognize 'RedHatEnterpriseServer' as an RPM-based distribution Fixes issue #334. Signed-off-by: Euan Harris --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index fd287bb7..08218e79 100755 --- a/configure.sh +++ b/configure.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" ] ; then +if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" -o `lsb_release -si` == "RedHatEnterpriseServer" ] ; then . scripts/rpm/configure.sh elif [ `lsb_release -si` == "Ubuntu" -o `lsb_release -si` == "Debian" ] ; then From d4a39dd225791bff7b858722ab14af98f4549b67 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Dec 2013 12:02:00 +0000 Subject: [PATCH 0667/1125] xenserver-install-wizard: Bump to 0.2.28 Signed-off-by: Euan Harris --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 2d26665b..56c2cf69 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.27 +Version: 0.2.28 Release: 1 Group: System/Hypervisor License: LGPL+linking exception @@ -33,6 +33,9 @@ rm -rf %{buildroot} %{_bindir}/xenserver-install-wizard %changelog +* Wed Dec 4 2013 Euan Harris - 0.2.28-1 +- Update to 0.2.28, with fixes for RHEL + * Wed Oct 30 2013 Euan Harris - 0.2.27-1 - Update to 0.2.27 From 38edf99a0d37db57cbb6470fc4ebf1e655319945 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Dec 2013 13:52:05 +0000 Subject: [PATCH 0668/1125] xenopsd: Update to 0.9.33, with HVM suspend/resume fixes Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 4824a09d..a4b46c79 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.32 +Version: 0.9.33 Release: 1 Summary: Simple VM manager License: LGPL @@ -184,6 +184,9 @@ fi #fi %changelog +* Wed Dec 4 2013 Euan Harris - 0.9.33-1 +- Update to 0.9.33, with fixes for suspending and resuming HVM guests + * Mon Oct 28 2013 David Scott - 0.9.32-1 - Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") From 3f10de7735d3bd209acd37fec17fd4620906552e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 5 Dec 2013 12:44:21 +0000 Subject: [PATCH 0669/1125] xenopsd: Back to 0.9.32 we go This reverts commit 38edf99a0d37db57cbb6470fc4ebf1e655319945. --- SPECS/xenopsd.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a4b46c79..4824a09d 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.33 +Version: 0.9.32 Release: 1 Summary: Simple VM manager License: LGPL @@ -184,9 +184,6 @@ fi #fi %changelog -* Wed Dec 4 2013 Euan Harris - 0.9.33-1 -- Update to 0.9.33, with fixes for suspending and resuming HVM guests - * Mon Oct 28 2013 David Scott - 0.9.32-1 - Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") From 96e1374dddb5703d152fa712416438c20d6d6f52 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Dec 2013 10:00:27 +0000 Subject: [PATCH 0670/1125] xcp-sm: Add dependency on xen-runtime xen-runtime provides /usr/sbin/xen-ringwatch, which is called by the ringwatch cron job which this package installs. Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 87ef07c2..7748b27f 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,7 +3,7 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL URL: https://github.com/xapi-project/sm @@ -14,6 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel Requires: iscsi-initiator-utils Requires: sg3_utils +Requires: xen-runtime %description This package contains storage backends used in XCP @@ -264,6 +265,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Tue Dec 10 2013 Euan Harris - 0.9.6-2 +- Add dependency on xen-runtime + * Fri Nov 8 2013 Euan Harris - 0.9.6-1 - Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu From de474a191bc2223e30084f34727cb476de0de981 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 10 Dec 2013 16:23:30 +0000 Subject: [PATCH 0671/1125] mappkgname: Add package mapping for xen-runtime Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 1b96631d..0645f44c 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -137,6 +137,7 @@ "swig": ["swig"], "/bin/sh": [], "xen-utils": ["xen-utils"], + "xen-runtime": ["xen-utils"], "nfs-utils": ["nfs-common"], "hwdata": ["hwdata"], "redhat-lsb-core": ["lsb-base"], From 149a4e8d41dec5d36aee75b9e62d88021fe1cafb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 23 Dec 2013 11:23:04 +0000 Subject: [PATCH 0672/1125] SPECS: Remove deprecated BuildRoot directive See http://rwmj.wordpress.com/2012/10/12/cleanu-up-your-spec-files Signed-off-by: Euan Harris --- SPECS/biniou.spec | 1 - SPECS/blktap.spec | 1 - SPECS/cmdliner.spec | 1 - SPECS/cppo.spec | 1 - SPECS/deriving-ocsigen.spec | 1 - SPECS/easy-format.spec | 1 - SPECS/eliloader.spec | 1 - SPECS/ffs.spec | 1 - SPECS/forkexecd.spec | 1 - SPECS/js_of_ocaml.spec | 1 - SPECS/libnl3.spec | 1 - SPECS/message-switch.spec | 1 - SPECS/ocaml-cdrom.spec | 1 - SPECS/ocaml-cohttp.spec | 1 - SPECS/ocaml-cstruct.spec | 1 - SPECS/ocaml-fd-send-recv.spec | 1 - SPECS/ocaml-lambda-term.spec | 1 - SPECS/ocaml-libvhd.spec | 1 - SPECS/ocaml-libvirt.spec | 1 - SPECS/ocaml-lwt.spec | 1 - SPECS/ocaml-nbd.spec | 1 - SPECS/ocaml-netdev.spec | 1 - SPECS/ocaml-obuild.spec | 1 - SPECS/ocaml-oclock.spec | 1 - SPECS/ocaml-ocplib-endian.spec | 1 - SPECS/ocaml-ounit.spec | 1 - SPECS/ocaml-qmp.spec | 1 - SPECS/ocaml-re.spec | 1 - SPECS/ocaml-react.spec | 1 - SPECS/ocaml-rpc.spec | 1 - SPECS/ocaml-sexplib.spec | 1 - SPECS/ocaml-ssl.spec | 1 - SPECS/ocaml-stdext.spec | 1 - SPECS/ocaml-tapctl.spec | 1 - SPECS/ocaml-tar.spec | 1 - SPECS/ocaml-text.spec | 1 - SPECS/ocaml-type-conv.spec | 1 - SPECS/ocaml-uri.spec | 1 - SPECS/ocaml-uuidm.spec | 1 - SPECS/ocaml-uutf.spec | 1 - SPECS/ocaml-vhd.spec | 1 - SPECS/ocaml-xcp-idl.spec | 1 - SPECS/ocaml-xcp-inventory.spec | 1 - SPECS/ocaml-xcp-rrd.spec | 1 - SPECS/ocaml-xen-api-client.spec | 1 - SPECS/ocaml-xen-api-libs-transitional.spec | 1 - SPECS/ocaml-xen-lowlevel-libs.spec | 1 - SPECS/ocaml-xenops.spec | 1 - SPECS/ocaml-xenstore-clients.spec | 1 - SPECS/ocaml-xenstore.spec | 1 - SPECS/ocaml-yojson.spec | 1 - SPECS/ocaml-zed.spec | 1 - SPECS/omake.spec | 1 - SPECS/openstack-xapi-plugins.spec | 1 - SPECS/optcomp.spec | 1 - SPECS/sm-cli.spec | 1 - SPECS/squeezed.spec | 1 - SPECS/utop.spec | 1 - SPECS/vhd-tool.spec | 1 - SPECS/vncterm.spec | 1 - SPECS/xapi-libvirt-storage.spec | 1 - SPECS/xapi.spec | 1 - SPECS/xcp-networkd.spec | 1 - SPECS/xcp-rrdd.spec | 1 - SPECS/xcp-sm.spec | 1 - SPECS/xe-create-templates.spec | 1 - SPECS/xenops-cli.spec | 1 - SPECS/xenopsd.spec | 1 - SPECS/xenserver-core-latest-snapshot.spec | 1 - SPECS/xenserver-core.spec | 1 - SPECS/xenserver-install-wizard.spec | 1 - SPECS/xmlm.spec | 1 - SPECS/xsconsole.spec | 1 - SPECS/xsiostat.spec | 1 - 74 files changed, 74 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 56118038..b5c21b34 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib easy-format Requires: ocaml ocaml-findlib diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 9e44a73f..abb894e7 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -6,7 +6,6 @@ Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/djs55/blktap Source0: https://github.com/djs55/blktap/archive/%{version}/blktap-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: autoconf automake libtool libaio-devel xen-devel libuuid-devel %description diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 6b236088..b9687816 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Other URL: http://erratique.ch/software/cmdliner Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 5a3781e8..dc2071fe 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Other URL: http://mjambon.com/cppo.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml Requires: ocaml diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index e6f9629c..445cecfc 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -6,7 +6,6 @@ License: MIT Group: Development/Libraries URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 0a49226b..e83a635b 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 547b716f..836823d9 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -6,7 +6,6 @@ URL: https://github.com/djs55/xcp-eliloader Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch %description diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 39e421f1..2fac6ca5 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: https://github.com/xapi-project/ffs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index a8bb3138..d0f0d0ca 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: https://github.com/xapi-project/forkexecd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-uuidm-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml-rpc ocaml-rpc-devel redhat-lsb-core diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 8cf85823..0e7ce4cb 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -8,7 +8,6 @@ License: LGPL and others Group: Development/Other URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel ocaml-ocamldoc Requires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index fafef1e6..2ddc1fe4 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -7,7 +7,6 @@ Release: 1%{?dist} URL: http://www.infradead.org/~tgr/libnl/ Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: flex bison BuildRequires: python diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 02cb79d4..60370afc 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: https://github.com/xapi-project/message-switch Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel Requires(post): chkconfig Requires(preun): chkconfig diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 501c58ac..35c643f6 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 4ece1246..72e59da5 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel # should these be inherited from ssl.spec somehow? BuildRequires: openssl openssl-devel diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 0c4abbc7..8a3492ff 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -8,7 +8,6 @@ License: ISC Group: Development/Libraries URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel ocaml-lwt-devel Requires: ocaml ocaml-findlib ocaml-ocplib-endian-devel #XXX ocaml-cstruct should require caml-ocplib-endian, not -devel diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 21609dca..66cf33cf 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 75e1a251..8e421eea 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/lambda-term/ Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc ocaml-zed-devel ocaml-lwt-devel ocaml-camomile-devel ocaml-react-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 7b1ce407..36a747c9 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://github.com/xapi-project/libvhd Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 7694e884..22481a73 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -27,7 +27,6 @@ Patch10: ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d Patch11: ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 Patch12: ocaml-libvirt-13-fixbuild -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index c3551a6f..5d39e72f 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://ocsigen.org/lwt Source0: http://ocsigen.org/download/lwt-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x # Location of libev headers on Fedora is in /usr/include/libev/ev.h diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 2c4302cd..3bd9d9fc 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/%{version}/nbd-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 cmdliner-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 33fe1c3d..34791600 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/netdev Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 850ca103..497bcd50 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -8,7 +8,6 @@ License: BSD2 Group: Development/Other URL: http://github.com/vincenthz/obuild Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml Requires: ocaml diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index cfbf5d35..79aa5ca6 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -10,7 +10,6 @@ URL: https://github.com/polazarus/oclock Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 88ba416a..8e52b141 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib optcomp ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 604d8e91..b13a3284 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: MIT URL: http://ounit.forge.ocamlcore.org/ Source0: http://forge.ocamlcore.org/frs/download.php/886/ounit-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 610f747b..b04b0243 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 669ce85e..4191e9b2 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: http://github.com/ocaml/ocaml-re Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index df0c6721..f3ccf67d 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -6,7 +6,6 @@ Version: 0.9.4 Release: 1%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Group: Development/Libraries License: BSD diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 68974076..6652c77c 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-type-conv xmlm-devel js_of_ocaml-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib ocaml-type-conv ocaml-camlp4-devel diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index f3b004c5..41ff4fb9 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -9,7 +9,6 @@ Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: https://ocaml.janestreet.com Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml >= 4.00.0 BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 9ebeb4e2..6e5ebb17 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib openssl-devel Requires: ocaml ocaml-findlib openssl diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index c1f9665e..79a941d8 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/stdext Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 37a83596..cdfd3702 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/tapctl Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel ocaml-xcp-idl-devel ocaml-oclock-devel Requires: ocaml ocaml-findlib forkexecd-devel diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 84fd9c49..e872aa95 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -6,7 +6,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-tar Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ounit-devel # These are build requires which are also requires of the -devel package BuildRequires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 56bb057b..05cad12f 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: BSD URL: http://forge.ocamlcore.org/projects/ocaml-text Source0: http://forge.ocamlcore.org/frs/download.php/937/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 00c82411..c5b0d313 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -10,7 +10,6 @@ License: LGPLv2+ with exceptions and BSD URL: http://www.ocaml.info/software.html#type_driven Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz #Patch0: type-conv-META.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml >= 4.00.0 BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 82bfd551..67360cb5 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -8,7 +8,6 @@ License: ISC Group: Development/Libraries URL: https://github.com/mirage/ocaml-uri Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml >= 4.00, ocaml-findlib, ocaml-ocamldoc, ocaml-re-devel, ocaml-compiler-libs Requires: ocaml, ocaml-findlib diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index f9fe4664..02f7c134 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uuidm Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 4db3b6b4..2b312202 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uutf Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-ocamldoc ocaml-findlib Requires: ocaml diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 1f9034d3..0861074f 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 6b7b1b5b..bd1a0095 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel BuildRequires: ocaml-ounit-devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index e958edea..f082f1ab 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib-devel ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel %description diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 7bc0c51e..4c91c706 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xcp-rrd Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index b7004885..882e5e76 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -8,7 +8,6 @@ License: LGPLv2 Group: Development/Libraries URL: https://github.com/xapi-project/xen-api-client Source0: https://github.com/xapi-project/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel ocaml-ssl-devel openssl openssl-devel ocaml-ounit-devel ocaml-cohttp-devel ocaml-uri-devel xmlm-devel ocaml-rpc-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 149e53b6..c6294567 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -8,7 +8,6 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel BuildRequires: ocaml-xenstore-clients-devel xen-devel ocaml-camlp4-devel diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 33a4d70e..26e7da54 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel cmdliner-devel BuildRequires: ocaml-cstruct-devel diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 50445b61..e78948b0 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xenops Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel BuildRequires: ocaml-xen-api-libs-transitional-devel ocaml-oclock-devel ocaml-xcp-idl-devel diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 9190c334..85b078b8 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xenstore-clients Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 23dd72fb..c0f7b5e4 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -8,7 +8,6 @@ License: LGPL Group: Development/Libraries URL: https://github.com/mirage/ocaml-xenstore Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 8746b2c3..a6616f78 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib cppo easy-format biniou Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 87781090..cf3e2a78 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -8,7 +8,6 @@ License: BSD3 Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/zed/ Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-react-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 1540c1d1..d9d1c549 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -7,7 +7,6 @@ Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1 Patch0: omake-1-warnings License: GPL Group: Development/Tools -BuildRoot: %{_tmppath}/%{name}-root BuildRequires: ocaml >= 3.09.2, make, ncurses-devel %define debug_package %{nil} diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index ec14d83e..162b0637 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -7,7 +7,6 @@ Group: System/Hypervisor URL: https://launchpad.net/nova/havana Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch -BuildRoot: %{_tmppath}/nova-%{version}-%{release} BuildRequires: python-setuptools %define debug_package %{nil} diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 786cc9fd..df30e652 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Other URL: http://forge.ocamlcore.org/projects/optcomp/ Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camlp4 ocaml-camlp4-devel Requires: ocaml diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 41dd678f..50bb426f 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -6,7 +6,6 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/sm-cli Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel BuildRequires: message-switch-devel diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 07c32038..79f44ee3 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -8,7 +8,6 @@ URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init Source2: squeezed-conf -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 4607d21b..58cb82f7 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -6,7 +6,6 @@ License: BSD Group: Development/Other URL: https://github.com/diml/utop Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel Requires: ocaml-camomile-data diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index b8ee8304..ec2df6a9 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -9,7 +9,6 @@ License: LGPL+linking exception URL: https://github.com/djs55/vhd-tool Source0: https://github.com/djs55/vhd-tool/archive/%{version}/vhd-tool-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf -BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel ocaml-obuild BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 4d93391a..76f24cf5 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -7,7 +7,6 @@ Group: System/Hypervisor URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: xen-devel %description diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index e3e26916..613e47f7 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/%{version}.tar.gz Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 8ddf63c1..1a59c570 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -13,7 +13,6 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam -BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel BuildRequires: ocaml-xcp-idl-devel ocaml-xen-api-libs-transitional-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index cee89693..e84caa51 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -10,7 +10,6 @@ Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf Source4: xcp-networkd-bridge-conf -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-stdext-devel forkexecd-devel ocaml-xen-api-libs-transitional-devel diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 9318e585..70d8e1f8 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: https://github.com/xapi-project/xcp-rrdd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel ocaml-xcp-inventory-devel diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 7748b27f..3b187218 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -10,7 +10,6 @@ URL: https://github.com/xapi-project/sm Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz Source1: xcp-mpath-scsidev-rules Source2: xcp-mpath-scsidev-script -BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: swig python-devel xen-devel Requires: iscsi-initiator-utils Requires: sg3_utils diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 69a1f20d..6fede8c9 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -6,7 +6,6 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xcp-guest-templates Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel BuildRequires: ocaml-xen-api-libs-transitional-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 0caafd06..9590fc4e 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -6,7 +6,6 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xenops-cli Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel BuildRequires: message-switch-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 4824a09d..35a3df00 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -12,7 +12,6 @@ Source3: xenopsd-libvirt-init Source4: xenopsd-xenlight-init Source5: make-xsc-xenopsd.conf Source6: xenopsd-network-conf -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index f99c2898..6d0704b7 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -15,7 +15,6 @@ Source6: fusion-release-RPM-GPG-KEY-EPEL-6 Source7: fusion-release-RPM-GPG-KEY-remi Source8: fusion-release-xen-c6-tweaked.repo -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %description A virtual package which installs the xenserver yum repos. diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index e11719f8..fef4f036 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -6,7 +6,6 @@ License: LGPL Group: Development/Other URL: http://www.xenserver.org/ Source0: xenserver-readme -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Requires: xenserver-install-wizard Requires: xapi xapi-xe xe-create-templates xapi-python-devel Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 56c2cf69..8093f3b7 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -8,7 +8,6 @@ Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/djs55/xenserver-install-wizard Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: python newt xapi-python-devel python-argparse %description diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index d92fa7f0..0a7cd905 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -6,7 +6,6 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/xmlm Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc Requires: ocaml ocaml-findlib diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 4ea83db0..670e0778 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -6,7 +6,6 @@ License: GPL2 Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: PyPAM xapi-python-devel %description diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 632bcff3..63244e82 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -6,7 +6,6 @@ License: LGPLv2.1 Group: Development/Other URL: https://github.com/xenserver/xsiostat Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %description Simple XenServer IO stat thingy From 51ba83b627ca97c54de5c5b7e4bbb200f770a552 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 23 Dec 2013 11:27:17 +0000 Subject: [PATCH 0673/1125] SPECS: Remove deprecated %clean directives See http://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files Signed-off-by: Euan Harris --- SPECS/biniou.spec | 3 --- SPECS/blktap.spec | 3 --- SPECS/cmdliner.spec | 3 --- SPECS/cppo.spec | 3 --- SPECS/deriving-ocsigen.spec | 3 --- SPECS/easy-format.spec | 3 --- SPECS/eliloader.spec | 3 --- SPECS/ffs.spec | 3 --- SPECS/forkexecd.spec | 3 --- SPECS/js_of_ocaml.spec | 3 --- SPECS/message-switch.spec | 3 --- SPECS/ocaml-cdrom.spec | 3 --- SPECS/ocaml-cohttp.spec | 3 --- SPECS/ocaml-cstruct.spec | 3 --- SPECS/ocaml-fd-send-recv.spec | 3 --- SPECS/ocaml-lambda-term.spec | 3 --- SPECS/ocaml-libvhd.spec | 3 --- SPECS/ocaml-libvirt.spec | 3 --- SPECS/ocaml-lwt.spec | 3 --- SPECS/ocaml-nbd.spec | 3 --- SPECS/ocaml-netdev.spec | 3 --- SPECS/ocaml-obuild.spec | 4 ---- SPECS/ocaml-oclock.spec | 3 --- SPECS/ocaml-ocplib-endian.spec | 3 --- SPECS/ocaml-ounit.spec | 5 ----- SPECS/ocaml-qmp.spec | 3 --- SPECS/ocaml-re.spec | 3 --- SPECS/ocaml-react.spec | 3 --- SPECS/ocaml-rpc.spec | 3 --- SPECS/ocaml-sexplib.spec | 3 --- SPECS/ocaml-ssl.spec | 3 --- SPECS/ocaml-stdext.spec | 3 --- SPECS/ocaml-tapctl.spec | 3 --- SPECS/ocaml-tar.spec | 3 --- SPECS/ocaml-text.spec | 3 --- SPECS/ocaml-type-conv.spec | 3 --- SPECS/ocaml-uri.spec | 3 --- SPECS/ocaml-uuidm.spec | 3 --- SPECS/ocaml-uutf.spec | 2 -- SPECS/ocaml-vhd.spec | 3 --- SPECS/ocaml-xcp-idl.spec | 3 --- SPECS/ocaml-xcp-inventory.spec | 3 --- SPECS/ocaml-xcp-rrd.spec | 3 --- SPECS/ocaml-xen-api-client.spec | 3 --- SPECS/ocaml-xen-api-libs-transitional.spec | 3 --- SPECS/ocaml-xen-lowlevel-libs.spec | 3 --- SPECS/ocaml-xenops.spec | 3 --- SPECS/ocaml-xenstore-clients.spec | 3 --- SPECS/ocaml-xenstore.spec | 3 --- SPECS/ocaml-yojson.spec | 3 --- SPECS/ocaml-zed.spec | 3 --- SPECS/omake.spec | 3 --- SPECS/openstack-xapi-plugins.spec | 3 --- SPECS/optcomp.spec | 3 --- SPECS/sm-cli.spec | 3 --- SPECS/squeezed.spec | 3 --- SPECS/utop.spec | 3 --- SPECS/vhd-tool.spec | 3 --- SPECS/vncterm.spec | 2 -- SPECS/xapi-libvirt-storage.spec | 3 --- SPECS/xapi.spec | 3 --- SPECS/xcp-networkd.spec | 3 --- SPECS/xcp-rrdd.spec | 3 --- SPECS/xcp-sm.spec | 2 -- SPECS/xe-create-templates.spec | 3 --- SPECS/xenops-cli.spec | 3 --- SPECS/xenopsd.spec | 3 --- SPECS/xenserver-core-latest-snapshot.spec | 2 -- SPECS/xenserver-core.spec | 2 -- SPECS/xenserver-install-wizard.spec | 2 -- SPECS/xmlm.spec | 3 --- SPECS/xsconsole.spec | 3 --- SPECS/xsiostat.spec | 3 --- 73 files changed, 216 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index b5c21b34..67183c2d 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -22,14 +22,11 @@ compatibility as protocols evolve. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index abb894e7..7a693164 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -21,7 +21,6 @@ sh autogen.sh make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/%{name} mkdir -p %{buildroot}/%{_libdir}/%{name}/lib @@ -34,8 +33,6 @@ mkdir -p %{buildroot}/%{_libdir}/%{name}/etc/udev/rules.d make install DESTDIR=%{buildroot} -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index b9687816..63848748 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -33,13 +33,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index dc2071fe..8dc5a0f4 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -19,12 +19,9 @@ Equivalent of the C preprocessor for OCaml. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 445cecfc..1a07d73e 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -28,13 +28,10 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index e83a635b..92fa6069 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -19,13 +19,10 @@ Easy_format: indentation made easy. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index 836823d9..afe02602 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -17,12 +17,9 @@ Bootloader for EL-based distros that support Xen. %build %install -rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}/%{_sbindir} install -m 0755 eliloader.py %{buildroot}%{_sbindir}/eliloader -%clean -rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 2fac6ca5..21b23c3b 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -26,14 +26,11 @@ cp %{SOURCE1} ffs-init make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/ffs/ffs %{buildroot}/%{_sbindir}/ffs mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index d0f0d0ca..2a1fa61d 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -27,7 +27,6 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install @@ -37,8 +36,6 @@ install fe_cli.native %{buildroot}/%{_sbindir}/forkexecd-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d install -m 0755 forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 0e7ce4cb..0abec18a 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -30,7 +30,6 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml @@ -38,8 +37,6 @@ export OCAMLFIND_LDCONF=ignore mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir}/ -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 60370afc..eba316ae 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -42,7 +42,6 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install @@ -52,8 +51,6 @@ install main.native %{buildroot}/%{_sbindir}/message-cli mkdir -p %{buildroot}/%{_sysconfdir}/init.d install -m 0755 message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 35c643f6..bba1cc8b 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -33,14 +33,11 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 72e59da5..a7b5a144 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -32,13 +32,10 @@ developing applications that use %{name}. make build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 8a3492ff..b5b1d541 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -31,7 +31,6 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml --enable-lwt ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs @@ -39,8 +38,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install DESTDIR=%{buildroot} -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 66cf33cf..04e7579a 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -31,15 +31,12 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 8e421eea..19d830d1 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -31,7 +31,6 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs @@ -40,8 +39,6 @@ export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 36a747c9..c595cfd1 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -31,15 +31,12 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 22481a73..44cb32c7 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -91,7 +91,6 @@ strip libvirt/dllmllibvirt.so %install # These rules work if the library uses 'ocamlfind install' to install itself. -rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs @@ -107,8 +106,6 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh %endif -%clean -rm -rf $RPM_BUILD_ROOT %files diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 5d39e72f..48444784 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -56,7 +56,6 @@ make %install -rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs @@ -67,8 +66,6 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so #chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so -%clean -rm -rf $RPM_BUILD_ROOT %files # This space intentionally left blank diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 3bd9d9fc..95262184 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -35,12 +35,9 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 34791600..afa3bb03 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -31,15 +31,12 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 497bcd50..bd515c37 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -29,15 +29,11 @@ working, adapting parts where necessary to support OCaml fully. ./bootstrap %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} install dist/build/obuild/obuild %{buildroot}/%{_bindir} install dist/build/obuild-simple/obuild-simple %{buildroot}/%{_bindir} install dist/build/obuild-from-oasis/obuild-from-oasis %{buildroot}/%{_bindir} -%clean -rm -rf %{buildroot} -rm -rf dist %files %defattr(-,root,root) diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 79aa5ca6..84a686b8 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -37,14 +37,11 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8e52b141..8098c8c5 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -42,13 +42,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index b13a3284..f5357970 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -51,7 +51,6 @@ make test %install -rm -rf $RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs make install @@ -60,10 +59,6 @@ make install rm -rf $RPM_BUILD_ROOT/usr/local/share/doc -%clean -rm -rf $RPM_BUILD_ROOT - - %files %defattr(-,root,root,-) %doc LICENSE.txt diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index b04b0243..461dba51 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -34,12 +34,9 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 4191e9b2..bb793a7d 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -30,13 +30,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index f3ccf67d..5a31262e 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -50,13 +50,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 6652c77c..23700d35 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -30,14 +30,11 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 41ff4fb9..301dc0ab 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -27,14 +27,11 @@ Convert values to and from s-expressions in OCaml. make %install -rm -rf %{buildroot} export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 6e5ebb17..0c2334e3 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -31,15 +31,12 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot} -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 79a941d8..2279f10d 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -30,15 +30,12 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index cdfd3702..de640270 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -32,14 +32,11 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index e872aa95..9ff23205 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -37,14 +37,11 @@ ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 05cad12f..fac47008 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -41,7 +41,6 @@ ocaml setup.ml -build ocaml setup.ml -doc %install -rm -rf $RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs ocaml setup.ml -install @@ -49,8 +48,6 @@ ocaml setup.ml -install # Remove this, reinstall it properly with a %%doc rule below. rm -rf $RPM_BUILD_ROOT/usr/local/share/doc -%clean -rm -rf $RPM_BUILD_ROOT %files diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index c5b0d313..390793e5 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -32,14 +32,11 @@ ability to use these preprocessors simultaneously. make %install -rm -rf %{buildroot} export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 67360cb5..cc652633 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -30,13 +30,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 02f7c134..b1855032 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -33,14 +33,11 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 2b312202..4360b1ea 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -44,8 +44,6 @@ mkdir -p %{buildroot}%{_libdir}/ocaml/uutf (cd _build/src; ocamlfind install uutf ../pkg/META uutf.mli uutf.cmi uutf.cmx uutf.cma uutf.a uutf.cma uutf.cmxa uutf.cmxs) #ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 0861074f..9d05866f 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -33,14 +33,11 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files # This space intentionally left blank diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index bd1a0095..a9d7b037 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -46,14 +46,11 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index f082f1ab..35495f71 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -32,15 +32,12 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/etc/xcp -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 4c91c706..53f84d11 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -30,13 +30,10 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 882e5e76..57be6ac1 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -35,13 +35,10 @@ ocaml setup.ml -build ocaml setup.ml -doc %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index c6294567..d2bd3039 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -35,15 +35,12 @@ fi make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 26e7da54..1aa704c8 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -32,15 +32,12 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index e78948b0..de437612 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -32,14 +32,11 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 85b078b8..24512387 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -31,14 +31,11 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index c0f7b5e4..f5850355 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -33,13 +33,10 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index a6616f78..e1cc319a 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -29,14 +29,11 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_bindir} make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index cf3e2a78..2957507d 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -32,14 +32,11 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/omake.spec b/SPECS/omake.spec index d9d1c549..0426f538 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -37,7 +37,6 @@ INSTALL_ROOT=$RPM_BUILD_ROOT\ make all %install -rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_libdir}/omake @@ -49,8 +48,6 @@ INSTALL_ROOT=$RPM_BUILD_ROOT\ chmod +w $RPM_BUILD_ROOT/%{_bindir}/* -%clean -rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 162b0637..72a71b58 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -18,15 +18,12 @@ XenAPI plugins used by OpenStack to control XenServer. %setup -q -n nova-%{version} %install -rm -rf %{buildroot} mkdir -p %{buildroot}/usr/lib/xapi/plugins cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ %build #This space intentionally left blank -%clean -rm -rf %{buildroot} %files %defattr(755,root,root,-) diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index df30e652..163734dc 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -20,7 +20,6 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install @@ -28,8 +27,6 @@ mkdir -p %{buildroot}/%{_bindir} mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-r %{buildroot}/%{_bindir}/ mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-o %{buildroot}/%{_bindir}/ -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 50bb426f..3bd02b75 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -24,12 +24,9 @@ Command-line interface for xapi toolstack storage managers. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/sm-cli/sm-cli %{buildroot}/%{_sbindir}/sm-cli -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 79f44ee3..91899de9 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -28,7 +28,6 @@ cp %{SOURCE2} squeezed-conf make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/squeezed/squeezed %{buildroot}/%{_sbindir}/squeezed mkdir -p %{buildroot}%{_sysconfdir}/init.d @@ -36,8 +35,6 @@ install -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed mkdir -p %{buildroot}/etc install -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 58cb82f7..1e3627fa 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -22,15 +22,12 @@ ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index ec2df6a9..4b9f2972 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -32,15 +32,12 @@ cp %{SOURCE1} vhd-tool-sparse_dd-conf make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libexecdir}/xapi mkdir -p %{buildroot}/etc make install -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 76f24cf5..13cb7af8 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -22,8 +22,6 @@ This package contains the vncterm utility mkdir -p %{buildroot}%{_bindir}/ cp vncterm %{buildroot}%{_bindir}/ -%clean -rm -rf %{buildroot} %pre getent group vncterm >/dev/null || groupadd -r vncterm diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 613e47f7..b2d881c9 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -25,14 +25,11 @@ cp %{SOURCE1} xapi-libvirt-storage-init make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/sm-libvirt/sm-libvirt %{buildroot}/%{_sbindir}/xapi-libvirt-storage mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 1a59c570..2772be98 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -71,7 +71,6 @@ omake ocaml/xe-cli/xe sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xen-api-xapi-conf.in > xen-api-xapi-conf %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_sbindir}/xapi @@ -104,8 +103,6 @@ mkdir -p %{buildroot}%{python_sitelib} install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}%{python_sitelib} install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}%{python_sitelib} -%clean -rm -rf %{buildroot} %post [ ! -x /sbin/chkconfig ] || chkconfig --add xapi diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index e84caa51..980b624c 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -33,7 +33,6 @@ cp %{SOURCE4} xcp-networkd-bridge-conf make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install dist/build/xcp-networkd/xcp-networkd %{buildroot}/%{_sbindir}/xcp-networkd mkdir -p %{buildroot}%{_sysconfdir}/init.d @@ -44,8 +43,6 @@ install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf mkdir -p %{buildroot}/etc/modprobe.d install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 70d8e1f8..7136603f 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -28,14 +28,11 @@ cp %{SOURCE1} xcp-rrdd-init make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 3b187218..117d9429 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -33,8 +33,6 @@ install -m 0644 xcp-mpath-scsidev-rules %{buildroot}/etc/udev/rules.d/55-xs-mpat mkdir -p %{buildroot}/etc/udev/scripts install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath-scsidev.sh -%clean -rm -rf $RPM_BUILD_ROOT %post [ ! -x /sbin/chkconfig ] || chkconfig --add mpathroot diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 6fede8c9..26ad50d8 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -24,12 +24,9 @@ obuild configure obuild build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} install -m 0755 dist/build/xe-create-templates/xe-create-templates %{buildroot}/%{_bindir}/ -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 9590fc4e..5aa9dc8c 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -24,12 +24,9 @@ Command-line interface for xenopsd, the xapi toolstack domain manager. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install main.native %{buildroot}/%{_sbindir}/xenops-cli -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 35a3df00..57808a33 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -76,7 +76,6 @@ make configure make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt @@ -106,8 +105,6 @@ LIBEXECDIR=%{_libexecdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libexecdir}/%{n install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 6d0704b7..564f7b5f 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -46,8 +46,6 @@ mkdir -p %{buildroot}/etc/pki/rpm-gpg/ install -m 0644 fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 install -m 0644 fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi -%clean -rm -rf %{buildroot} %post yum repolist diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index fef4f036..3da29ef1 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -31,8 +31,6 @@ cp %{SOURCE0} xenserver-readme mkdir -p %{buildroot}/usr/share/doc/xenserver install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 8093f3b7..3308017e 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -23,8 +23,6 @@ make DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_bindir} ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroot}%{_bindir}/xenserver-install-wizard -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 0a7cd905..e6514e4a 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -34,14 +34,11 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip -%clean -rm -rf %{buildroot} %files #This space intentionally left blank diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 670e0778..c7fa3965 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -15,7 +15,6 @@ Console tool for configuring a XenServer installation. %setup -q %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libdir} make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} @@ -23,8 +22,6 @@ make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} %build #This space intentionally left blank -%clean -rm -rf %{buildroot} %files %defattr(-,root,root,-) diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 63244e82..00324e73 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -17,12 +17,9 @@ Simple XenServer IO stat thingy make %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} install -m 0755 xsiostat %{buildroot}/%{_sbindir}/xsiostat -%clean -rm -rf %{buildroot} %files %defattr(-,root,root) From c0b3e914fb87e0a219d56987dd9e03ba17736b4d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 23 Dec 2013 11:30:08 +0000 Subject: [PATCH 0674/1125] SPECS: Remove deprecated %defattr directives See http://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files Signed-off-by: Euan Harris --- SPECS/biniou.spec | 1 - SPECS/blktap.spec | 1 - SPECS/cmdliner.spec | 1 - SPECS/cppo.spec | 1 - SPECS/deriving-ocsigen.spec | 1 - SPECS/easy-format.spec | 1 - SPECS/eliloader.spec | 1 - SPECS/ffs.spec | 1 - SPECS/forkexecd.spec | 2 -- SPECS/js_of_ocaml.spec | 1 - SPECS/libnl3.spec | 4 ---- SPECS/message-switch.spec | 2 -- SPECS/ocaml-camomile.spec | 3 --- SPECS/ocaml-cdrom.spec | 1 - SPECS/ocaml-cohttp.spec | 1 - SPECS/ocaml-cstruct.spec | 1 - SPECS/ocaml-fd-send-recv.spec | 1 - SPECS/ocaml-lambda-term.spec | 1 - SPECS/ocaml-libvhd.spec | 1 - SPECS/ocaml-libvirt.spec | 3 --- SPECS/ocaml-lwt.spec | 1 - SPECS/ocaml-nbd.spec | 1 - SPECS/ocaml-netdev.spec | 1 - SPECS/ocaml-obuild.spec | 1 - SPECS/ocaml-oclock.spec | 1 - SPECS/ocaml-ocplib-endian.spec | 1 - SPECS/ocaml-ounit.spec | 2 -- SPECS/ocaml-qmp.spec | 1 - SPECS/ocaml-re.spec | 1 - SPECS/ocaml-react.spec | 1 - SPECS/ocaml-rpc.spec | 1 - SPECS/ocaml-sexplib.spec | 1 - SPECS/ocaml-ssl.spec | 1 - SPECS/ocaml-stdext.spec | 1 - SPECS/ocaml-tapctl.spec | 1 - SPECS/ocaml-tar.spec | 1 - SPECS/ocaml-text.spec | 1 - SPECS/ocaml-type-conv.spec | 1 - SPECS/ocaml-uri.spec | 1 - SPECS/ocaml-uuidm.spec | 1 - SPECS/ocaml-uutf.spec | 2 -- SPECS/ocaml-vhd.spec | 1 - SPECS/ocaml-xcp-idl.spec | 1 - SPECS/ocaml-xcp-inventory.spec | 2 -- SPECS/ocaml-xcp-rrd.spec | 1 - SPECS/ocaml-xen-api-client.spec | 1 - SPECS/ocaml-xen-api-libs-transitional.spec | 1 - SPECS/ocaml-xen-lowlevel-libs.spec | 1 - SPECS/ocaml-xenops.spec | 1 - SPECS/ocaml-xenstore-clients.spec | 1 - SPECS/ocaml-xenstore.spec | 1 - SPECS/ocaml-yojson.spec | 1 - SPECS/ocaml-zed.spec | 1 - SPECS/omake.spec | 1 - SPECS/openstack-xapi-plugins.spec | 1 - SPECS/optcomp.spec | 1 - SPECS/sm-cli.spec | 1 - SPECS/squeezed.spec | 1 - SPECS/utop.spec | 1 - SPECS/vhd-tool.spec | 1 - SPECS/vncterm.spec | 1 - SPECS/xapi-libvirt-storage.spec | 1 - SPECS/xapi.spec | 3 --- SPECS/xcp-networkd.spec | 1 - SPECS/xcp-rrdd.spec | 1 - SPECS/xcp-sm.spec | 1 - SPECS/xe-create-templates.spec | 1 - SPECS/xenops-cli.spec | 1 - SPECS/xenopsd.spec | 4 ---- SPECS/xenserver-core-latest-snapshot.spec | 1 - SPECS/xenserver-core.spec | 1 - SPECS/xenserver-install-wizard.spec | 1 - SPECS/xmlm.spec | 1 - SPECS/xsconsole.spec | 1 - SPECS/xsiostat.spec | 1 - 75 files changed, 92 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 67183c2d..4dcc9ce7 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -29,7 +29,6 @@ make install BINDIR=%{buildroot}/%{_bindir} %files -%defattr(-,root,root) %doc LICENSE README.md %{_libdir}/ocaml/biniou/* %{_bindir}/bdump diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 7a693164..04f0ba8a 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -35,7 +35,6 @@ make install DESTDIR=%{buildroot} %files -%defattr(-,root,root,-) %{_libdir}/%{name}/bin/* %{_libdir}/%{name}/etc/udev/rules.d/blktap.rules %{_libdir}/%{name}/include/blktap/* diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 63848748..fd5eec92 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README CHANGES %{_libdir}/ocaml/cmdliner/* diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 8dc5a0f4..d8ca7957 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -24,7 +24,6 @@ make install BINDIR=%{buildroot}/%{_bindir} %files -%defattr(-,root,root) %doc LICENSE README %{_bindir}/cppo diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 1a07d73e..4c5e4772 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -37,7 +37,6 @@ make install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc COPYING README CHANGES %{_libdir}/ocaml/deriving-ocsigen/* diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 92fa6069..97b47d34 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -25,7 +25,6 @@ make install %files -%defattr(-,root,root) %doc LICENSE README %{_libdir}/ocaml/easy-format/* diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec index afe02602..dce29375 100644 --- a/SPECS/eliloader.spec +++ b/SPECS/eliloader.spec @@ -22,7 +22,6 @@ install -m 0755 eliloader.py %{buildroot}%{_sbindir}/eliloader %files -%defattr(-,root,root) %{_sbindir}/eliloader %changelog diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 21b23c3b..5a05137e 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -33,7 +33,6 @@ install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/ffs %{_sysconfdir}/init.d/ffs diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 2a1fa61d..ef1001ef 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -38,7 +38,6 @@ install -m 0755 forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd %files -%defattr(-,root,root) %{_sbindir}/forkexecd %{_sbindir}/forkexecd-cli %{_sysconfdir}/init.d/forkexecd @@ -63,7 +62,6 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/forkexec/* diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 0abec18a..0a282e46 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -42,7 +42,6 @@ make install BINDIR=%{buildroot}/%{_bindir}/ # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README CHANGES %{_libdir}/ocaml/js_of_ocaml/* %{_libdir}/ocaml/stublibs/dlljs_of_ocaml.so diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index 2ddc1fe4..3abf9c05 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -62,14 +62,12 @@ find $RPM_BUILD_ROOT -name \*.la -delete %postun cli -p /sbin/ldconfig %files -%defattr(-,root,root,-) %doc COPYING %exclude %{_libdir}/libnl-cli*.so.* %{_libdir}/libnl-*.so.* %config(noreplace) %{_sysconfdir}/* %files devel -%defattr(-,root,root,-) %doc COPYING %{_includedir}/libnl3/netlink/ %dir %{_includedir}/libnl3/ @@ -77,7 +75,6 @@ find $RPM_BUILD_ROOT -name \*.la -delete %{_libdir}/pkgconfig/*.pc %files cli -%defattr(-,root,root,-) %doc COPYING %{_libdir}/libnl-cli*.so.* %{_libdir}/libnl/ @@ -85,7 +82,6 @@ find $RPM_BUILD_ROOT -name \*.la -delete %{_mandir}/man8/* %files doc -%defattr(-,root,root,-) %doc COPYING %doc libnl-doc-%{version}/*.html %doc libnl-doc-%{version}/*.css diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index eba316ae..2f7a9db0 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -53,7 +53,6 @@ install -m 0755 message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-sw %files -%defattr(-,root,root) %{_sbindir}/message-switch %{_sbindir}/message-cli %{_sysconfdir}/init.d/message-switch @@ -78,7 +77,6 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog %{_libdir}/ocaml/message_switch/* diff --git a/SPECS/ocaml-camomile.spec b/SPECS/ocaml-camomile.spec index 53975c12..3bd075ef 100644 --- a/SPECS/ocaml-camomile.spec +++ b/SPECS/ocaml-camomile.spec @@ -72,7 +72,6 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %files -%defattr(-,root,root,-) %doc README %{_libdir}/ocaml/camomile %if %opt @@ -88,7 +87,6 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %files devel -%defattr(-,root,root,-) %doc README dochtml/* %if %opt %{_libdir}/ocaml/camomile/*.a @@ -99,7 +97,6 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %files data -%defattr(-,root,root,-) %doc README %{_datadir}/camomile/ diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index bba1cc8b..87760ed7 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -43,7 +43,6 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml # This space intentionally left blank %files devel -%defattr(-,root,root) %doc ChangeLog README.md %{_libdir}/ocaml/cdrom/* %{_libdir}/ocaml/stublibs/dllstubs_cdrom.so diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index a7b5a144..763831f3 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -41,7 +41,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md CHANGES %{_libdir}/ocaml/cohttp/* diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index b5b1d541..ebbf5839 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -43,7 +43,6 @@ ocaml setup.ml -install DESTDIR=%{buildroot} # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md CHANGES %{_libdir}/ocaml/cstruct/* %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 04e7579a..254cb538 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md LICENSE %{_libdir}/ocaml/fd-send-recv/* %{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 19d830d1..460538a2 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -44,7 +44,6 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE CHANGES %{_libdir}/ocaml/lambda-term/* %{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index c595cfd1..9b5e929e 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc ChangeLog README.md %{_libdir}/ocaml/vhdlib/* %{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 44cb32c7..dd137c5b 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -109,7 +109,6 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh %files -%defattr(-,root,root,-) %doc COPYING.LIB README ChangeLog %{_libdir}/ocaml/libvirt %if %opt @@ -123,7 +122,6 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh %files devel -%defattr(-,root,root,-) %doc COPYING.LIB README TODO.libvirt ChangeLog html/* %if %opt %{_libdir}/ocaml/libvirt/*.a @@ -135,7 +133,6 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh %if %build_mlvirsh %files -n mlvirsh -%defattr(-,root,root,-) %doc COPYING README ChangeLog %{_bindir}/mlvirsh %endif diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 48444784..1049893f 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -71,7 +71,6 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so # This space intentionally left blank %files devel -%defattr(-,root,root,-) %doc LICENSE COPYING CHANGES README %{_libdir}/ocaml/lwt/* %{_libdir}/ocaml/stublibs/*.so diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 95262184..2534fffb 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -43,7 +43,6 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml # This space intentionally left blank %files devel -%defattr(-,root,root) %doc ChangeLog README.markdown %{_libdir}/ocaml/nbd/nbd_lwt.a diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index afa3bb03..42edfb0b 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/netdev/* %{_libdir}/ocaml/stublibs/dllnetdev_stubs.so diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index bd515c37..6565e07e 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -36,7 +36,6 @@ install dist/build/obuild-from-oasis/obuild-from-oasis %{buildroot}/%{_bindir} %files -%defattr(-,root,root) %doc README.md TODO.md DESIGN.md LICENSE OBUILD_SPEC.md %{_bindir}/obuild %{_bindir}/obuild-simple diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 84a686b8..3e940280 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -47,7 +47,6 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.markdown %{_libdir}/ocaml/oclock/* %{_libdir}/ocaml/stublibs/dlloclock.so diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8098c8c5..72e08dcf 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -51,7 +51,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc COPYING.txt README.md %{_libdir}/ocaml/ocplib-endian/* diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index f5357970..37d9505e 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -60,7 +60,6 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %files -%defattr(-,root,root,-) %doc LICENSE.txt %{_libdir}/ocaml/oUnit %if %opt @@ -71,7 +70,6 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %files devel -%defattr(-,root,root,-) %doc LICENSE.txt README.txt %doc _build/src/api-ounit.docdir/* %if %opt diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 461dba51..f63358b5 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -42,7 +42,6 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml # This space intentionally left blank %files devel -%defattr(-,root,root) %doc ChangeLog README.md LICENSE %{_libdir}/ocaml/qmp/* diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index bb793a7d..0cdbfbe4 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -39,7 +39,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README CHANGES %{_libdir}/ocaml/re/* diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 5a31262e..31802875 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -59,7 +59,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root,-) %doc CHANGES README %{_libdir}/ocaml/react/* diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 23700d35..1b2dbf9d 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -40,7 +40,6 @@ make install DESTDIR=${buildroot} # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md %{_libdir}/ocaml/rpclib/* diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 301dc0ab..b8d2d9a5 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -34,7 +34,6 @@ make install %files -%defattr(-,root,root,-) %doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt %{_libdir}/ocaml/sexplib diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 0c2334e3..5be2bca7 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -42,7 +42,6 @@ make install DESTDIR=%{buildroot} #This space intentionally left blank %files devel -%defattr(-,root,root) %doc CHANGES COPYING README %{_libdir}/ocaml/ssl/* %{_libdir}/ocaml/stublibs/dllssl_stubs.so diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 2279f10d..4a746d17 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -41,7 +41,6 @@ make install DESTDIR=${buildroot} #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md %{_libdir}/ocaml/stdext/* %{_libdir}/ocaml/stublibs/dllstdext_stubs.so diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index de640270..1615dee3 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/tapctl/* diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 9ff23205..9456d2a9 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -47,7 +47,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md %{_libdir}/ocaml/tar/META diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index fac47008..79430500 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -54,7 +54,6 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc #This space intentionally left blank %files devel -%defattr(-,root,root,-) %doc /usr/share/doc/ocaml-text/* %{_libdir}/ocaml/text/* %{_libdir}/ocaml/stublibs/* diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 390793e5..f1f58b47 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -39,7 +39,6 @@ make install %files -%defattr(-,root,root,-) %doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt %{_libdir}/ocaml/type_conv diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index cc652633..739f5b6a 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -39,7 +39,6 @@ ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md CHANGES %{_libdir}/ocaml/uri/* diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index b1855032..0bd13a01 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -43,7 +43,6 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README CHANGES %{_libdir}/ocaml/uuidm/uuidm.mli %{_libdir}/ocaml/uuidm/uuidm.cma diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 4360b1ea..137f627d 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -46,13 +46,11 @@ mkdir -p %{buildroot}%{_libdir}/ocaml/uutf %files -%defattr(-,root,root) %{_libdir}/ocaml/uutf/META %{_libdir}/ocaml/uutf/uutf.cmi %{_libdir}/ocaml/uutf/uutf.cma %files devel -%defattr(-,root,root) %{_libdir}/ocaml/uutf/uutf.cmx %{_libdir}/ocaml/uutf/uutf.cmxa %{_libdir}/ocaml/uutf/uutf.cmxs diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 9d05866f..d9a2cded 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -43,7 +43,6 @@ ocaml setup.ml -install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc CHANGES README.md LICENSE %{_libdir}/ocaml/vhd-format/* diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index a9d7b037..98c1a8f6 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -56,7 +56,6 @@ ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/xcp/* diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 35495f71..0b324908 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -40,11 +40,9 @@ mkdir -p %{buildroot}/etc/xcp %files -%defattr(-,root,root) /etc/xcp %files devel -%defattr(-,root,root) %doc ChangeLog README.md LICENSE %{_libdir}/ocaml/xcp-inventory/* diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 53f84d11..7fcc9489 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -39,7 +39,6 @@ make install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/xcp-rrd/* diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 57be6ac1..e2c8663e 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -44,7 +44,6 @@ OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md CHANGES %{_libdir}/ocaml/xen-api-client/* diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index d2bd3039..d082b11c 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -46,7 +46,6 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml #This space intentionally left blank %files devel -%defattr(-,root,root) %doc ChangeLog README.md LICENSE %{_libdir}/ocaml/cpuid/* %{_libdir}/ocaml/gzip/* diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 1aa704c8..2a1e33d1 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -43,7 +43,6 @@ make install DESTDIR=${buildroot} #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md %{_libdir}/ocaml/xenctrl/* #%{_libdir}/ocaml/xenlight/* diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index de437612..41f9260b 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -42,7 +42,6 @@ make install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/xenops/* diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 24512387..367fc504 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -41,7 +41,6 @@ make install DESTDIR=${buildroot} #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_libdir}/ocaml/xenstore_transport/* diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index f5850355..667d16b1 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README CHANGES LICENSE %{_libdir}/ocaml/xenstore/* diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index e1cc319a..fb3219f3 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -39,7 +39,6 @@ make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README.md LICENSE %{_libdir}/ocaml/yojson/* %{_bindir}/ydump diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 2957507d..18c3c66c 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -42,7 +42,6 @@ ocaml setup.ml -install #This space intentionally left blank %files devel -%defattr(-,root,root) %doc LICENSE CHANGES %{_libdir}/ocaml/zed/* diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 0426f538..da0b1d66 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -50,7 +50,6 @@ chmod +w $RPM_BUILD_ROOT/%{_bindir}/* %files -%defattr(-,root,root) %doc LICENSE LICENSE.OMake doc/txt/omake-doc.txt doc/ps/omake-doc.ps doc/ps/omake-doc.pdf doc/webpage CHANGELOG.txt %attr(555,root,root) %{_bindir}/* diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 72a71b58..29767459 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -26,7 +26,6 @@ cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/pl %files -%defattr(755,root,root,-) /usr/lib/xapi/plugins/* %changelog diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 163734dc..52d4ed4f 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -29,7 +29,6 @@ mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-o %{buildroot}/%{_bindir} %files -%defattr(-,root,root) %doc LICENSE README %{_libdir}/ocaml/optcomp/* %{_bindir}/optcomp-r diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 3bd02b75..aaeb7331 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -29,7 +29,6 @@ install dist/build/sm-cli/sm-cli %{buildroot}/%{_sbindir}/sm-cli %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/sm-cli diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 91899de9..afd78f1a 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -37,7 +37,6 @@ install -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/squeezed %{_sysconfdir}/init.d/squeezed diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 1e3627fa..477c1646 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -30,7 +30,6 @@ ocaml setup.ml -install %files -%defattr(-,root,root) %doc README.md LICENSE CHANGES.md %{_bindir}/utop %{_bindir}/utop-full diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 4b9f2972..257c08d6 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -40,7 +40,6 @@ make install %files -%defattr(-,root,root,-) %{_bindir}/vhd-tool /etc/sparse_dd.conf %{_libexecdir}/xapi/sparse_dd diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 13cb7af8..a1643a93 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -30,7 +30,6 @@ getent passwd vncterm >/dev/null || useradd -r -g vncterm -d /none -s /sbin/nolo getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s /sbin/nologin -c 'for vncterm' vncterm_base %files -%defattr(-,root,root,-) %doc %{_bindir}/vncterm diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index b2d881c9..cbd7c19d 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -32,7 +32,6 @@ install -m 0755 xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/xapi-libvirt-storage %{_sysconfdir}/init.d/xapi-libvirt-storage diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 2772be98..ebfaaa16 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -114,7 +114,6 @@ if [ $1 -eq 0 ]; then fi %files -%defattr(-,root,root,-) %{_sbindir}/xapi /etc/init.d/xapi %config(noreplace) /etc/xapi.conf @@ -129,12 +128,10 @@ fi /etc/pam.d/xapi %files xe -%defattr(-,root,root,-) %{_bindir}/xe /etc/bash_completion.d/xe %files python-devel -%defattr(-,root,root,-) %{python_sitelib}/XenAPI.py %{python_sitelib}/XenAPI.pyo %{python_sitelib}/XenAPI.pyc diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 980b624c..93a2f304 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -45,7 +45,6 @@ install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf %files -%defattr(-,root,root) %doc README.markdown LICENSE MAINTAINERS %{_sbindir}/xcp-networkd %{_sysconfdir}/init.d/xcp-networkd diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 7136603f..b883ad59 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -35,7 +35,6 @@ install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd %files -%defattr(-,root,root) %doc README.markdown LICENSE %{_sbindir}/xcp-rrdd %{_sysconfdir}/init.d/xcp-rrdd diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 117d9429..6be5fd58 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -38,7 +38,6 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- [ ! -x /sbin/chkconfig ] || chkconfig --add mpathroot %files -%defattr(-,root,root,-) /etc/cron.d/* /etc/rc.d/init.d/snapwatchd /etc/rc.d/init.d/mpathroot diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 26ad50d8..339a2e96 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -29,7 +29,6 @@ install -m 0755 dist/build/xe-create-templates/xe-create-templates %{buildroot}/ %files -%defattr(-,root,root) %doc README.md %{_bindir}/xe-create-templates diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 5aa9dc8c..d5a81ad7 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -29,7 +29,6 @@ install main.native %{buildroot}/%{_sbindir}/xenops-cli %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/xenops-cli diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 57808a33..5c40b1e1 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -107,7 +107,6 @@ install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf %files -%defattr(-,root,root) %doc README.md LICENSE %{_libexecdir}/%{name}/vif %{_libexecdir}/%{name}/vif-real @@ -123,7 +122,6 @@ install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf /etc/xapi/network.conf %files libvirt -%defattr(-,root,root) %{_sbindir}/xenopsd-libvirt %{_sysconfdir}/init.d/xenopsd-libvirt @@ -137,7 +135,6 @@ if [ $1 -eq 0 ]; then fi %files xc -%defattr(-,root,root) %{_sbindir}/xenopsd-xc %{_sysconfdir}/init.d/xenopsd-xc %{_libexecdir}/%{name}/xenguest @@ -152,7 +149,6 @@ if [ $1 -eq 0 ]; then fi %files simulator -%defattr(-,root,root) %{_sbindir}/xenopsd-simulator %{_sysconfdir}/init.d/xenopsd-simulator diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 564f7b5f..74dcc42b 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -54,7 +54,6 @@ yum repolist yum repolist %files -%defattr(-,root,root) /etc/yum.repos.d/xapi.repo /etc/yum.repos.d/xen-c6-tweaked.repo #/etc/yum.repos.d/xen-c6.repo diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 3da29ef1..e379ac6d 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -33,7 +33,6 @@ install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README %files -%defattr(-,root,root) /usr/share/doc/xenserver/README %changelog diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 3308017e..fc20a387 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -25,7 +25,6 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %files -%defattr(-,root,root,-) /usr/share/xenserver-install-wizard/* %{_bindir}/xenserver-install-wizard diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index e6514e4a..114d8ca8 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -44,7 +44,6 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip #This space intentionally left blank %files devel -%defattr(-,root,root) %doc README CHANGES %{_libdir}/ocaml/xmlm/* diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index c7fa3965..754da028 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -24,7 +24,6 @@ make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} %files -%defattr(-,root,root,-) %{_libdir}/xsconsole/*.py %{_libdir}/xsconsole/*.pyc %{_libdir}/xsconsole/*.pyo diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 00324e73..680e01bb 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -22,7 +22,6 @@ install -m 0755 xsiostat %{buildroot}/%{_sbindir}/xsiostat %files -%defattr(-,root,root) %doc README.md LICENSE MAINTAINERS %{_sbindir}/xsiostat From acc3312bfe14e065888258fae0f926ad5e133d1a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 23 Dec 2013 11:41:37 +0000 Subject: [PATCH 0675/1125] cmdliner: Remove errant tab Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index fd5eec92..cd4a303a 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -11,7 +11,7 @@ Requires: ocaml ocaml-findlib %description Cmdliner is an OCaml module for the declarative definition of command line -interfaces. It provides a simple and compositional mechanism to convert +interfaces. It provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions. The module automatically handles syntax errors, help messages and UNIX man page generation. It supports programs with single or multiple commands From b6b477314a17c433862147c13791d24dee444c89 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 23 Dec 2013 14:01:31 +0000 Subject: [PATCH 0676/1125] rpmlint: Fix 'Summary not capitalized' warnings Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 2 +- SPECS/xenopsd.spec | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 6be5fd58..572f57bb 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -244,7 +244,7 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- %package rawhba Group: System/Hypervisor -Summary: rawhba SR type capability +Summary: XCP rawhba SR type capability #Requires: sm = @SM_VERSION@-@SM_RELEASE@ %description rawhba diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 5c40b1e1..0e18c48a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -28,7 +28,7 @@ Requires: message-switch xenops-cli redhat-lsb-core Simple VM manager for the xapi toolstack. %package libvirt -Summary: %{name} using libvirt +Summary: Xenopsd using libvirt Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: libvirt @@ -38,7 +38,7 @@ Simple VM manager for Xen and KVM using libvirt. %package xc -Summary: %{name} using xc +Summary: Xenopsd using xc Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: xen-libs vncterm forkexecd @@ -47,7 +47,7 @@ Requires: xen-libs vncterm forkexecd Simple VM manager for Xen using libxc. %package simulator -Summary: %{name} using libvirt +Summary: Xenopsd simulator Group: Development/Other Requires: %{name} = %{version}-%{release} @@ -55,7 +55,7 @@ Requires: %{name} = %{version}-%{release} A synthetic VM manager for testing. #%package xenlight -#Summary: %{name} using libxenlight +#Summary: Xenopsd using libxenlight #Group: Development/Other #Requires: %{name} = %{version}-%{release} #%description xenlight From ad1c31c501fcc1e31d465cb3d6aec3990f62d3dc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 6 Jan 2014 11:08:58 +0000 Subject: [PATCH 0677/1125] README: Point at the OCaml PPA we actually use in the build AVSM's PPA has moved on to provide a newer version of OCaml, which then conflicts with the packages we build using an older OCaml in the pbuilder chroot. Works around issue #346 Signed-off-by: Euan Harris --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ffb56bc..91f000ee 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ On Debian-based distributions, the packages are built using `pbuilder`. The build also depends on a more modern OCaml compiler than the version in Ubuntu, available from this PPA: ``` -deb http://ppa.launchpad.net/avsm/ppa/ubuntu raring main -deb-src http://ppa.launchpad.net/avsm/ppa/ubuntu raring main +deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main +deb-src http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main ``` The steps to build Debian packages are the same as those to build RPMs: From 18c6b64720beaa25dfd991f9d56da3ea70f58d5c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 7 Jan 2014 11:04:22 +0000 Subject: [PATCH 0678/1125] Mock: Store mock's cache and chroot in the workspace By default mock creates chroots in /var/lib/mock and keeps a cache of the chroot in /var/cache/mock. Two mock jobs with the same name can't run simultaneously because the chroot directory in /var/lib/mock is locked. Even if the chroots have different names, they may still share the same cache, which can lead to conflicts. The conflict shows up as one build complaining that 'repomd.xml' from the chroot (installed from the cache) is newer than repomd.xml from the repository being built. This seems to be because one of the builds writes its repomd.xml back into the cache before the other. This change stores chroots and caches in the mock subdirectory of the local workspace. This means that the chroots and caches can't conflict, so multiple different builds (from different workspaces) can run simultaneously. It does not make it possible to run multiple simultaneous builds in the same workspace. There are a few other practical effects of this change: * A workspace will be about 300MB larger permanently (the size of the cache) and will grow by another 300MB or so transiently during the build (the size of the temporary chroot). * Builds on NFS-mounted filesystems with 'root squash' enabled will not work. The cache and chroot directories created by mock are owned by root. * A non-root user cannot delete the contents of the mock/cache and mock/root directories directly using 'rm'. The directories have 'mock' group ownership and so can be deleted, but the files inside them are owned by root. To delete mock's files, use mock --scrub as follows: mock --configdir mock -r xenserver --scrub=all Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 6 +++++- scripts/rpm/xenserver.cfg.in | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 47ff17a4..02314c40 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -7,10 +7,14 @@ rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build echo -n "Writing mock configuration..." mkdir -p mock -sed "s|@PWD@|$PWD|" scripts/rpm/xenserver.cfg.in > mock/xenserver.cfg +sed -e "s|@PWD@|$PWD|g" scripts/rpm/xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ +mkdir -p mock/cache +mkdir -p mock/root +chgrp mock mock/cache +chgrp mock mock/root echo " done" echo -n "Initializing repository..." diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in index f6564643..38623e3c 100644 --- a/scripts/rpm/xenserver.cfg.in +++ b/scripts/rpm/xenserver.cfg.in @@ -3,6 +3,8 @@ config_opts['target_arch'] = 'x86_64' config_opts['legal_host_arches'] = ('x86_64',) config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build' config_opts['dist'] = 'el6' # only useful for --resultdir variable subst +config_opts['basedir'] = '@PWD@/mock/root' +config_opts['cache_topdir'] = '@PWD@/mock/cache' config_opts['yum.conf'] = """ [main] From 0c2279ab2c99b9d5d56e5862b89b24094fdbf32f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 15 Jan 2014 18:13:20 +0000 Subject: [PATCH 0679/1125] xenserver-install-wizard: Update source location Signed-off-by: Euan Harris --- SPECS/xenserver-install-wizard.spec | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index fc20a387..d81f61c1 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,11 +3,11 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.28 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception -URL: http://github.com/djs55/xenserver-install-wizard -Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +URL: http://github.com/xenserver/xenserver-install-wizard +Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Requires: python newt xapi-python-devel python-argparse %description @@ -29,6 +29,9 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog +* Wed Jan 15 2014 Euan Harris - 0.2.28-2 +- Source moved to https://github.com/xenserver/xenserver-install-wizard + * Wed Dec 4 2013 Euan Harris - 0.2.28-1 - Update to 0.2.28, with fixes for RHEL @@ -65,8 +68,3 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo * Sat Jun 8 2013 David Scott - Initial package - - - - - From cfa3476595d7a999ac4756dac263a26906d9fd8d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 16 Jan 2014 13:35:46 +0000 Subject: [PATCH 0680/1125] ffs: Update to 0.9.24, with vdi-clone fix Signed-off-by: Euan Harris --- SPECS/ffs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 5a05137e..05f73819 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.23 +Version: 0.9.24 Release: 1 Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -47,6 +47,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Jan 16 2014 Euan Harris - 0.9.24-1 +- Update to 0.9.24, with VDI.clone fix + * Thu Oct 31 2013 David Scott - 0.9.23-1 - Update to 0.9.23, with VDI.copy fix From 2eed31fe84bee46b515fcb296ba328e58f702c83 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 16 Jan 2014 16:48:55 +0000 Subject: [PATCH 0681/1125] xenopsd: Update to 0.9.33 again Fixed the problem which was causing us to see OpenStack test failures. It had nothing to do with xenopsd. Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 0e18c48a..cf9d064b 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.32 +Version: 0.9.33 Release: 1 Summary: Simple VM manager License: LGPL @@ -176,6 +176,9 @@ fi #fi %changelog +* Wed Dec 4 2013 Euan Harris - 0.9.33-1 +- Update to 0.9.33, with fixes for suspending and resuming HVM guests + * Mon Oct 28 2013 David Scott - 0.9.32-1 - Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") From eb6f0ae565515e7de41662bd6ec2746f1aef6e13 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 17 Jan 2014 11:51:22 +0000 Subject: [PATCH 0682/1125] blktap: Switch to upstream source repository Signed-off-by: Euan Harris --- SPECS/blktap.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 04f0ba8a..6cb863a3 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,11 +1,11 @@ Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.0 -Release: 1 +Release: 2 Group: System/Hypervisor License: LGPL+linking exception -URL: https://github.com/djs55/blktap -Source0: https://github.com/djs55/blktap/archive/%{version}/blktap-%{version}.tar.gz +URL: https://github.com/xapi-project/blktap +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: autoconf automake libtool libaio-devel xen-devel libuuid-devel %description @@ -44,5 +44,8 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog +* Fri Jan 17 2014 Euan Harris - 0.9.0-2 +- Change to upstream source repository + * Thu Oct 24 2013 David Scott - 0.9.0-1 - Initial package From c84027d9f144512c156f2fd0df3218deef76158f Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Fri, 17 Jan 2014 09:45:44 -0700 Subject: [PATCH 0683/1125] Update gitignore Signed-off-by: Mike McClurg --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 7fad6320..1900f6a7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,10 @@ *.cmxs *.cmxa *.swp +*.pyc SOURCES/*.tar.gz SOURCES/*.tbz +RPMS/ +SRPMS/ +deps +mock/ From 0872f24e95d94eb947d0ef3a8090a94cf815ae4b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 17 Jan 2014 17:53:59 +0000 Subject: [PATCH 0684/1125] xenopsd: Update to 0.9.34 Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index cf9d064b..1e3e803b 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,11 +1,11 @@ Name: xenopsd -Version: 0.9.33 +Version: 0.9.34 Release: 1 Summary: Simple VM manager License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xenopsd -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/euanh/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init @@ -176,6 +176,10 @@ fi #fi %changelog +* Fri Jan 17 2014 Euan Harris - 0.9.34-1 +- Update to 0.9.34, restoring fixes from the 0.9.32 line which were + not merged to trunk before 0.9.33 was tagged + * Wed Dec 4 2013 Euan Harris - 0.9.33-1 - Update to 0.9.33, with fixes for suspending and resuming HVM guests From 64828e054b2047d275fab3416164a07fef5b4901 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 21 Jan 2014 14:29:41 +0000 Subject: [PATCH 0685/1125] xenopsd: Switch back to trunk Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 1e3e803b..178b20a6 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -5,7 +5,7 @@ Summary: Simple VM manager License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xenopsd -Source0: https://github.com/euanh/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init From 2527fdf16e6848da9c9b61f21e4e4878059ffb27 Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Wed, 22 Jan 2014 14:21:13 -0700 Subject: [PATCH 0686/1125] Replace eliloader with linux-guest-loader Signed-off-by: Mike McClurg --- SPECS/linux-guest-loader.spec | 55 +++++++++++++++++++++++++++++++++++ SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core.spec | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 SPECS/linux-guest-loader.spec diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec new file mode 100644 index 00000000..09e8cade --- /dev/null +++ b/SPECS/linux-guest-loader.spec @@ -0,0 +1,55 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Summary: Bootloader for EL-based distros that support Xen +Name: linux-guest-loader +Version: 0.9.1 +Release: 1 +URL: https://github.com/xenserver/linux-guest-loader +Source0: https://github.com/mcclurmc/%{name}/archive/%{version}.tar.gz +%if 0%{?_with_data:1} +Source1: data.tar.gz +%endif +License: GPL +Group: Applications/System +BuildArch: noarch +BuildRequires: python-devel python-setuptools + +%description +Bootloader for EL-based distros that support Xen. + +%prep +%setup -q -n %{name}-%{version} + +%build +%{__python} setup.py build + +%install +mkdir -p %{buildroot}/%{_sbindir} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_sbindir} +ln -s %{_sbindir}/eliloader.py %{buildroot}/%{_sbindir}/eliloader +%if 0%{?_with_data:1} +mkdir -p %{buildroot}/opt/xensource/packages/files/guest-installer +cp -fp data/*/* %{buildroot}/opt/xensource/packages/files/guest-installer +%endif +rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info + +%files +%{_sbindir}/eliloader +%{_sbindir}/eliloader.py +%if 0%{?_with_data:1} +%dir /opt/xensource/packages/files/guest-installer/ +%endif + +%changelog +* Wed Jan 22 2014 Mike McClurg - 0.9.1-1 +- Convert package from eliloader to upstream linux-guest-loader. + +* Mon Jun 24 2013 David Scott - 0.3-1 +- Update to eliloader 0.3 + +* Sat Jun 22 2013 David Scott - 0.2-1 +- Update to eliloader 0.2 (doesn't assume data file directory is present) + +* Sat Jun 22 2013 David Scott - 0.1-1 +- Initial package + diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 178b20a6..e836a74d 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -20,7 +20,7 @@ BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel -BuildRequires: vncterm eliloader ocaml-xcp-idl-devel +BuildRequires: vncterm linux-guest-loader ocaml-xcp-idl-devel BuildRequires: ocaml-uutf-devel Requires: message-switch xenops-cli redhat-lsb-core diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index e379ac6d..f6176fa1 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -14,7 +14,7 @@ Requires: ffs xapi-libvirt-storage sm-cli xcp-sm Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed -Requires: eliloader +Requires: linux-guest-loader Requires: kernel >= 3.4.46 kernel-firmware Requires: xen From 7d82f7d3a821e8951ddeb2430407287e04f0ca8b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 09:44:01 +0000 Subject: [PATCH 0687/1125] xcp-python-libs: Initial package Signed-off-by: Euan Harris --- SPECS/xcp-python-libs.spec | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 SPECS/xcp-python-libs.spec diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec new file mode 100644 index 00000000..8022553f --- /dev/null +++ b/SPECS/xcp-python-libs.spec @@ -0,0 +1,42 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Summary: Common XenServer Python classes +Name: xcp-python-libs +Version: 0.9.0 +Release: 1 +Source: https://github.com/euanh/python-libs/archive/%{version}/%{name}-%{version}.tar.gz +License: GPL +Group: Applications/System +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +BuildArch: noarch + +BuildRequires: python-devel python-setuptools + +%description +Common XenServer Python classes. + +%prep +%setup -q -n python-libs-%{version} + +%build +mkdir -p xcp +cp *.py xcp +cp -r net xcp +%{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O2 --skip-build --root %{buildroot} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{python_sitelib} + + +%changelog +* Thu Jan 23 2014 Euan Harris - 0.9.0-1 +- Initial package + From 6c3ff1e936739763895ea7eb045ff31243d37dee Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 09:50:01 +0000 Subject: [PATCH 0688/1125] xcp-python-libs: Tidy up imported spec file Signed-off-by: Euan Harris --- SPECS/xcp-python-libs.spec | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index 8022553f..36c225ca 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -1,13 +1,11 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - Summary: Common XenServer Python classes Name: xcp-python-libs Version: 0.9.0 Release: 1 +URL: https://github.com/xenserver/python-libs Source: https://github.com/euanh/python-libs/archive/%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch BuildRequires: python-devel python-setuptools @@ -25,15 +23,11 @@ cp -r net xcp %{__python} setup.py build %install -rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O2 --skip-build --root %{buildroot} - -%clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info %files -%defattr(-,root,root) -%{python_sitelib} +%{python_sitelib}/xcp %changelog From a9913bc9987e82d70ba9a087281054da9f762b58 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:08:02 +0000 Subject: [PATCH 0689/1125] linux-guest-loader: Set name of downloaded tarball correctly Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 09e8cade..1f7a210d 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -5,7 +5,7 @@ Name: linux-guest-loader Version: 0.9.1 Release: 1 URL: https://github.com/xenserver/linux-guest-loader -Source0: https://github.com/mcclurmc/%{name}/archive/%{version}.tar.gz +Source0: https://github.com/mcclurmc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz %if 0%{?_with_data:1} Source1: data.tar.gz %endif @@ -18,7 +18,7 @@ BuildRequires: python-devel python-setuptools Bootloader for EL-based distros that support Xen. %prep -%setup -q -n %{name}-%{version} +%setup -q %build %{__python} setup.py build From b9f831bd2b8f2fef457347fb5f0d674d75f95cdc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:08:29 +0000 Subject: [PATCH 0690/1125] linux-guest-loader: Remove unnecessary python_sitelib definition Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 1f7a210d..09b9484f 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -1,5 +1,3 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - Summary: Bootloader for EL-based distros that support Xen Name: linux-guest-loader Version: 0.9.1 From 296ad297441ed40c979519b7e388dff02f3e5393 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:11:39 +0000 Subject: [PATCH 0691/1125] linux-guest-loader: Add dependency on xcp-python-libs Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 09b9484f..8fdd0bbf 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -11,6 +11,7 @@ License: GPL Group: Applications/System BuildArch: noarch BuildRequires: python-devel python-setuptools +Requires: xcp-python-libs %description Bootloader for EL-based distros that support Xen. From 58d77ab65b2a38844e1534aa8ce0dc22ebd043a0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:43:34 +0000 Subject: [PATCH 0692/1125] linux-guest-loader: Get rid of data tarball We did not use the data tarball with eliloader, it is currently disabled in linux-guest-loader's upstream spec file, and makedeb can't handle the %if condition used to disable it. Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 8fdd0bbf..adcbe91f 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -4,9 +4,6 @@ Version: 0.9.1 Release: 1 URL: https://github.com/xenserver/linux-guest-loader Source0: https://github.com/mcclurmc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -%if 0%{?_with_data:1} -Source1: data.tar.gz -%endif License: GPL Group: Applications/System BuildArch: noarch @@ -26,18 +23,11 @@ Bootloader for EL-based distros that support Xen. mkdir -p %{buildroot}/%{_sbindir} %{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_sbindir} ln -s %{_sbindir}/eliloader.py %{buildroot}/%{_sbindir}/eliloader -%if 0%{?_with_data:1} -mkdir -p %{buildroot}/opt/xensource/packages/files/guest-installer -cp -fp data/*/* %{buildroot}/opt/xensource/packages/files/guest-installer -%endif rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info %files %{_sbindir}/eliloader %{_sbindir}/eliloader.py -%if 0%{?_with_data:1} -%dir /opt/xensource/packages/files/guest-installer/ -%endif %changelog * Wed Jan 22 2014 Mike McClurg - 0.9.1-1 From 6e57976dcc071146b2ce3ee091d8a43ee8a81bf6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:47:22 +0000 Subject: [PATCH 0693/1125] eliloader: Remove package Signed-off-by: Euan Harris --- SPECS/eliloader.spec | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 SPECS/eliloader.spec diff --git a/SPECS/eliloader.spec b/SPECS/eliloader.spec deleted file mode 100644 index dce29375..00000000 --- a/SPECS/eliloader.spec +++ /dev/null @@ -1,36 +0,0 @@ -Summary: Bootloader for EL-based distros that support Xen -Name: eliloader -Version: 0.3 -Release: 1 -URL: https://github.com/djs55/xcp-eliloader -Source0: https://github.com/djs55/xcp-%{name}/archive/master/%{version}/%{name}-%{version}.tar.gz -License: GPL -Group: Applications/System -BuildArch: noarch - -%description -Bootloader for EL-based distros that support Xen. - -%prep -%setup -q -n xcp-%{name}-master-%{version} - -%build - -%install -mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 eliloader.py %{buildroot}%{_sbindir}/eliloader - - -%files -%{_sbindir}/eliloader - -%changelog -* Mon Jun 24 2013 David Scott - 0.3-1 -- Update to eliloader 0.3 - -* Sat Jun 22 2013 David Scott - 0.2-1 -- Update to eliloader 0.2 (doesn't assume data file directory is present) - -* Sat Jun 22 2013 David Scott - 0.1-1 -- Initial package - From 31f289f95cc006bce8ec6634d88bdde13a3ee3d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 10:51:21 +0000 Subject: [PATCH 0694/1125] makedeb: Add mappings for linux-guest-loader and xcp-python-libs Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 0645f44c..21939cb9 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -12,7 +12,8 @@ "cppo": ["cppo"], "deriving-ocsigen": ["libderiving-ocsigen-ocaml"], "easy-format": ["libeasy-format-ocaml"], - "eliloader": ["eliloader"], + "linux-guest-loader": ["linux-guest-loader"], + "xcp-python-libs": ["xcp-python-libs"], "ffs": ["ffs"], "forkexecd": ["forkexecd"], "iscsi-initiator-utils": ["open-iscsi"], From c9a653d2bc0f9d68b3ad73f7f84210e3712e9471 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 13:27:55 +0000 Subject: [PATCH 0695/1125] makedeb: Force Python setuptools to use Debian layout By default, setuptools on Debian installs to /usr/local/lib instead of /usr/lib - see https://wiki.debian.org/Python/Packaging: Python interpreter in Debian (since Python 2.6) is modified to use /usr/lib/pythonX.Y/dist-packages instead of site-packages. This way we can avoid conflicts with manually installed interpreter. It will also use /usr/local as --prefix by default (everyone who had to uninstall something ez_install installed (and overwrote our files), knows how important this change is), you can pass --install-layout=deb to setup.py's install to set all the Debian's defaults (f.e. --prefix=/usr). This change writes a setup.cfg file to the root of the source package, overriding the default. Signed-off-by: Euan Harris --- scripts/lib/debianrules.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/lib/debianrules.py b/scripts/lib/debianrules.py index 054f5472..351ce3f9 100755 --- a/scripts/lib/debianrules.py +++ b/scripts/lib/debianrules.py @@ -17,6 +17,7 @@ def rules_from_spec(spec, specpath): rules_dh_install_from_spec(spec, res, specpath) rules_clean_from_spec(spec, res) rules_test_from_spec(spec, res) + python_setuptools_cfg(spec, res) return res @@ -125,3 +126,12 @@ def rules_test_from_spec(_spec, tree): tree.append('debian/rules', rule) + +def python_setuptools_cfg(_spec, tree): + # Configuration file for python setuptools, which defaults to installing + # in /usr/local/lib instead of /usr/lib + content = "[install]\n" + content += "install-layout=deb\n" + + tree.append('setup.cfg', content) + From b1fec2b29464fbe6910a4a37df4215b3ae990816 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 23 Jan 2014 13:33:05 +0000 Subject: [PATCH 0696/1125] linux-guest-loader: Add build requirement on xcp-python-libs linux-guest-loader does not require xcp-python-libs to be installed in order to build it, but it does depend on it at run time. xcp-python-libs will still be built because it is a dependency of the 'all 'target, but some other packages buildrequire linux-guest-loader, and since there is no build dependency between linux-guest-loader and xcp-python-libs, xcp-python-libs might not have been built at the time linux-guest-loader is installed, so the installation will fail and stop the build. Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index adcbe91f..3db8dabc 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -8,6 +8,7 @@ License: GPL Group: Applications/System BuildArch: noarch BuildRequires: python-devel python-setuptools +BuildRequires: xcp-python-libs Requires: xcp-python-libs %description From 4b7d3606d372e5dc499198900a5c504e9348eaa1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 24 Jan 2014 15:33:40 +0000 Subject: [PATCH 0697/1125] linux-guest-loader: Mark as obsoleting eliloader Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 3db8dabc..a97fb74b 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -10,6 +10,7 @@ BuildArch: noarch BuildRequires: python-devel python-setuptools BuildRequires: xcp-python-libs Requires: xcp-python-libs +Obsoletes: eliloader %description Bootloader for EL-based distros that support Xen. From 10587971905f860a1d83627ac7803585bb272ccc Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 28 Jan 2014 11:37:37 +0000 Subject: [PATCH 0698/1125] linux-guest-loader: Must provide obsoleted package, with versions Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index a97fb74b..fc27c4f0 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -10,7 +10,8 @@ BuildArch: noarch BuildRequires: python-devel python-setuptools BuildRequires: xcp-python-libs Requires: xcp-python-libs -Obsoletes: eliloader +Provides: eliloader > 0.3 +Obsoletes: eliloader <= 0.3 %description Bootloader for EL-based distros that support Xen. From 7421cd05063782eadb506bee2a0c1ffeb8658419 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 28 Jan 2014 13:35:05 +0000 Subject: [PATCH 0699/1125] makedeb: Need mapping for 'eliloader' because 'linux-guest-loader' still provides it Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 4 ++-- scripts/lib/mappkgname.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index fc27c4f0..9708a260 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -1,4 +1,4 @@ -Summary: Bootloader for EL-based distros that support Xen +Summary: Bootloader for EL-based distributions that support Xen Name: linux-guest-loader Version: 0.9.1 Release: 1 @@ -14,7 +14,7 @@ Provides: eliloader > 0.3 Obsoletes: eliloader <= 0.3 %description -Bootloader for EL-based distros that support Xen. +Bootloader for EL-based distributions that support Xen. %prep %setup -q diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 21939cb9..67892006 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -12,6 +12,7 @@ "cppo": ["cppo"], "deriving-ocsigen": ["libderiving-ocsigen-ocaml"], "easy-format": ["libeasy-format-ocaml"], + "eliloader": ["eliloader"], "linux-guest-loader": ["linux-guest-loader"], "xcp-python-libs": ["xcp-python-libs"], "ffs": ["ffs"], From d08c320037a6bf714fe71f0a2b9ec09fe095fc74 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 14:12:42 +0000 Subject: [PATCH 0700/1125] specdep: Use the chroot's %dist when building SRPMs Signed-off-by: Euan Harris --- specdep.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/specdep.py b/specdep.py index a1dcc327..26784174 100755 --- a/specdep.py +++ b/specdep.py @@ -53,18 +53,15 @@ def map_package_name(name): # such as '.el6', so RPMs produced by mock will have that in their # names. However if we generate the dependencies in a Fedora 'host', # the filenames will be generated with a %dist of '.fc18' instead. -# We can override %dist so these dependencies are named correctly, -# but we (currently) run rpmbuild directly in the host to build the -# SRPMS, so we need to make sure those dependencies use the -# host value of %dist. There should not be any problem with building -# the SRPMs in a distribution that is different to the one in -# which we build RPMs, as an SRPM is just a CPIO archive containing -# the spec file and the source tarball. -# -# Annoyingly, the dist interpolation is done when we read the specfile, -# so we either have to read it twice or rewrite the SRPM name appropriately. - -HOST_DIST = rpm.expandMacro('%dist') +# We need to override %dist with the value from the chroot so these +# dependencies are named correctly. + +# The same problem occurs with rpmbuild. We currently run rpmbuild on +# the host to build SRPMs. By default it will use the host's %dist value +# when naming the SRPM. This won't match the patterns in the Makefile, +# so we need to make sure that, whenever we run rpmbuild, we also override +# %dist (on the command line) to have the same value as the chroot. + # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" CHROOT_DIST = '.el6' @@ -111,8 +108,7 @@ def srpm_name_from_spec(spec): rpm.delMacro('RELEASE') rpm.delMacro('ARCH') - # HACK: rewrite %dist if it appears in the filename - return srpmname.replace(CHROOT_DIST, HOST_DIST) + return srpmname def rpm_names_from_spec(spec): @@ -166,7 +162,7 @@ def build_srpm_from_spec(spec, specname): " ".join(sources)) if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet --define "_topdir ." -bs $<' + print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % CHROOT_DIST else: print '\t@echo [MAKEDEB] $@' print '\tscripts/deb/makedeb.py $<' From ba4aa2a1d6fbfea3ddb32f5a49de9f6b65728f14 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 14:33:43 +0000 Subject: [PATCH 0701/1125] SPECS: Add %dist to release number Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/blktap.spec | 2 +- SPECS/cmdliner.spec | 2 +- SPECS/cppo.spec | 2 +- SPECS/deriving-ocsigen.spec | 2 +- SPECS/easy-format.spec | 2 +- SPECS/ffs.spec | 2 +- SPECS/forkexecd.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/linux-guest-loader.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cdrom.spec | 2 +- SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-cstruct.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-lambda-term.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-obuild.spec | 2 +- SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-qmp.spec | 2 +- SPECS/ocaml-re.spec | 2 +- SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sexplib.spec | 2 +- SPECS/ocaml-ssl.spec | 2 +- SPECS/ocaml-stdext.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-tar.spec | 2 +- SPECS/ocaml-type-conv.spec | 2 +- SPECS/ocaml-uri.spec | 2 +- SPECS/ocaml-uuidm.spec | 2 +- SPECS/ocaml-uutf.spec | 2 +- SPECS/ocaml-vhd.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 +- SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-yojson.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- SPECS/omake.spec | 2 +- SPECS/openstack-xapi-plugins.spec | 2 +- SPECS/optcomp.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/squeezed.spec | 2 +- SPECS/utop.spec | 2 +- SPECS/vhd-tool.spec | 2 +- SPECS/vncterm.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xcp-python-libs.spec | 2 +- SPECS/xcp-rrdd.spec | 2 +- SPECS/xcp-sm.spec | 2 +- SPECS/xe-create-templates.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- SPECS/xenserver-core-latest-snapshot.spec | 2 +- SPECS/xenserver-core.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xmlm.spec | 2 +- SPECS/xsconsole.spec | 2 +- SPECS/xsiostat.spec | 2 +- 69 files changed, 69 insertions(+), 69 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 4dcc9ce7..f90f3370 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -2,7 +2,7 @@ Name: biniou Version: 1.0.6 -Release: 1 +Release: 1%{?dist} Summary: Compact, fast and extensible serialization format License: BSD3 Group: Development/Libraries diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 6cb863a3..a7577561 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,7 +1,7 @@ Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.0 -Release: 2 +Release: 2%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/xapi-project/blktap diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index cd4a303a..586bc63b 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -1,6 +1,6 @@ Name: cmdliner Version: 0.9.3 -Release: 1 +Release: 1%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index d8ca7957..6b5d3560 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -1,6 +1,6 @@ Name: cppo Version: 0.9.3 -Release: 1 +Release: 1%{?dist} Summary: Equivalent of the C preprocessor for OCaml License: BSD3 Group: Development/Other diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 4c5e4772..01d64426 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -1,6 +1,6 @@ Name: deriving-ocsigen Version: 0.3c -Release: 1 +Release: 1%{?dist} Summary: Extension to OCaml for deriving functions from type declarations License: MIT Group: Development/Libraries diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 97b47d34..017c145c 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -1,6 +1,6 @@ Name: easy-format Version: 1.0.1 -Release: 1 +Release: 1%{?dist} Summary: Indentation made easy License: BSD3 Group: Development/Libraries diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 05f73819..7f4e36f7 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,6 +1,6 @@ Name: ffs Version: 0.9.24 -Release: 1 +Release: 1%{?dist} Summary: Simple flat file storage manager for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index ef1001ef..89096920 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -1,6 +1,6 @@ Name: forkexecd Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: A subprocess management service License: LGPL Group: Development/Other diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 0a282e46..7af1c49b 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -2,7 +2,7 @@ Name: js_of_ocaml Version: 1.3.2 -Release: 1 +Release: 1%{?dist} Summary: Compile OCaml programs to javascript License: LGPL and others Group: Development/Other diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 9708a260..420072b8 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -1,7 +1,7 @@ Summary: Bootloader for EL-based distributions that support Xen Name: linux-guest-loader Version: 0.9.1 -Release: 1 +Release: 1%{?dist} URL: https://github.com/xenserver/linux-guest-loader Source0: https://github.com/mcclurmc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz License: GPL diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 2f7a9db0..99948f1b 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,6 +1,6 @@ Name: message-switch Version: 0.10.1 -Release: 1 +Release: 1%{?dist} Summary: A store and forward message switch License: FreeBSD Group: Development/Other diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 87760ed7..155a4413 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -2,7 +2,7 @@ Name: ocaml-cdrom Version: 0.9.1 -Release: 2 +Release: 2%{?dist} Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 763831f3..bc174ea5 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -2,7 +2,7 @@ Name: ocaml-cohttp Version: 0.9.8 -Release: 1 +Release: 1%{?dist} Summary: An HTTP library for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index ebbf5839..085f6662 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -2,7 +2,7 @@ Name: ocaml-cstruct Version: 0.7.1 -Release: 2 +Release: 2%{?dist} Summary: Read and write low-level C-style structures in OCaml License: ISC Group: Development/Libraries diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 254cb538..e031b9ab 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -2,7 +2,7 @@ Name: ocaml-fd-send-recv Version: 1.0.1 -Release: 1 +Release: 1%{?dist} Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 460538a2..9a8d7ae6 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -2,7 +2,7 @@ Name: ocaml-lambda-term Version: 1.2 -Release: 1 +Release: 1%{?dist} Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 Group: Development/Libraries diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 9b5e929e..8c0babed 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -2,7 +2,7 @@ Name: ocaml-libvhd Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: VHD manipulation via libvhd License: BSD3 Group: Development/Libraries diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 2534fffb..746a4f3b 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -2,7 +2,7 @@ Name: ocaml-nbd Version: 0.9.2 -Release: 1 +Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 42edfb0b..1f0a2d90 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -2,7 +2,7 @@ Name: ocaml-netdev Version: 0.9.0 -Release: 1 +Release: 1%{?dist} Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 6565e07e..98aa2c91 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -2,7 +2,7 @@ Name: ocaml-obuild Version: 0.0.2 -Release: 1 +Release: 1%{?dist} Summary: Simple build tool for OCaml programs License: BSD2 Group: Development/Other diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 3e940280..70a2cfcf 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -2,7 +2,7 @@ Name: ocaml-oclock Version: 0.3 -Release: 2 +Release: 2%{?dist} Summary: POSIX monotonic clock for OCaml License: ISC Group: Development/Libraries diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 72e08dcf..baf2486e 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -2,7 +2,7 @@ Name: ocaml-ocplib-endian Version: 0.4 -Release: 1 +Release: 1%{?dist} Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index f63358b5..9dfd18d3 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -2,7 +2,7 @@ Name: ocaml-qmp Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 0cdbfbe4..83756660 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -2,7 +2,7 @@ Name: ocaml-re Version: 1.2.1 -Release: 1 +Release: 1%{?dist} Summary: A regular expression library for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 1b2dbf9d..84c19d1f 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -2,7 +2,7 @@ Name: ocaml-rpc Version: 1.4.1 -Release: 1 +Release: 1%{?dist} Summary: An RPC library for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index b8d2d9a5..69ce7f34 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -2,7 +2,7 @@ Name: ocaml-sexplib Version: 109.20.00 -Release: 1 +Release: 1%{?dist} Summary: Convert values to and from s-expressions in OCaml Group: Development/Libraries diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 5be2bca7..81e707f5 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -2,7 +2,7 @@ Name: ocaml-ssl Version: 0.4.6 -Release: 1 +Release: 1%{?dist} Summary: Use OpenSSL from OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 4a746d17..5f456213 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -2,7 +2,7 @@ Name: ocaml-stdext Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 1615dee3..7120dcb7 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -2,7 +2,7 @@ Name: ocaml-tapctl Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: Manipulate running tapdisk instances License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 9456d2a9..311658ce 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -1,6 +1,6 @@ Name: ocaml-tar Version: 0.2.1 -Release: 1 +Release: 1%{?dist} Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index f1f58b47..74915400 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -2,7 +2,7 @@ Name: ocaml-type-conv Version: 109.20.00 -Release: 1 +Release: 1%{?dist} Summary: OCaml base library for type conversion Group: Development/Libraries diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 739f5b6a..ef350a24 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -2,7 +2,7 @@ Name: ocaml-uri Version: 1.3.8 -Release: 1 +Release: 1%{?dist} Summary: A URI library for OCaml License: ISC Group: Development/Libraries diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 0bd13a01..6e9c08af 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -2,7 +2,7 @@ Name: ocaml-uuidm Version: 0.9.5 -Release: 1 +Release: 1%{?dist} Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 Group: Development/Libraries diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 137f627d..73e06495 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -1,6 +1,6 @@ Name: ocaml-uutf Version: 0.9.3 -Release: 2 +Release: 2%{?dist} Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE License: BSD3 Group: Development/Libraries diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index d9a2cded..aba01930 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -2,7 +2,7 @@ Name: ocaml-vhd Version: 0.6.4 -Release: 1 +Release: 1%{?dist} Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 98c1a8f6..3428ab7a 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -2,7 +2,7 @@ Name: ocaml-xcp-idl Version: 0.9.14 -Release: 1 +Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 0b324908..055b6465 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -2,7 +2,7 @@ Name: ocaml-xcp-inventory Version: 0.9.0 -Release: 1 +Release: 1%{?dist} Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 7fcc9489..63f4a8b0 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -2,7 +2,7 @@ Name: ocaml-xcp-rrd Version: 0.9.0 -Release: 1 +Release: 1%{?dist} Summary: Round-Robin Datasources in OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index e2c8663e..14580dec 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-api-client Version: 0.9.4 -Release: 1 +Release: 1%{?dist} Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 Group: Development/Libraries diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index d082b11c..478b8afd 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.3 -Release: 1 +Release: 1%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception Group: Development/Libraries diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 2a1e33d1..d81b5221 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.9 -Release: 3 +Release: 3%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 41f9260b..3c39eb40 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -2,7 +2,7 @@ Name: ocaml-xenops Version: 0.9.2 -Release: 1 +Release: 1%{?dist} Summary: Low-level xen control operations OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 367fc504..c0add444 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -2,7 +2,7 @@ Name: ocaml-xenstore-clients Version: 0.9.2 -Release: 1 +Release: 1%{?dist} Summary: Unix xenstore clients for OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 667d16b1..b8259dd5 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -2,7 +2,7 @@ Name: ocaml-xenstore Version: 1.2.4 -Release: 1 +Release: 1%{?dist} Summary: Xenstore protocol implementation in OCaml License: LGPL Group: Development/Libraries diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index fb3219f3..b6848ead 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -2,7 +2,7 @@ Name: ocaml-yojson Version: 1.1.6 -Release: 1 +Release: 1%{?dist} Summary: A JSON parser and priter for OCaml License: BSD3 Group: Development/Libraries diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 18c3c66c..74c22cb7 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -2,7 +2,7 @@ Name: ocaml-zed Version: 1.2 -Release: 1 +Release: 1%{?dist} Summary: An abstract engine for text editing for OCaml License: BSD3 Group: Development/Libraries diff --git a/SPECS/omake.spec b/SPECS/omake.spec index da0b1d66..a682a7a9 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -1,5 +1,5 @@ Version: 0.9.8.6 -Release: 1 +Release: 1%{?dist} Summary: The omake build system Name: omake URL: http://omake.metaprl.org/ diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 29767459..bf0645f5 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -1,6 +1,6 @@ Name: openstack-xapi-plugins Version: 2013.2 -Release: 1 +Release: 1%{?dist} Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 52d4ed4f..6d32738e 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -1,6 +1,6 @@ Name: optcomp Version: 1.4 -Release: 1 +Release: 1%{?dist} Summary: Optional compilation with cpp-like directives License: BSD3 Group: Development/Other diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index aaeb7331..f9a89b26 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -1,6 +1,6 @@ Name: sm-cli Version: 0.9.4 -Release: 1 +Release: 1%{?dist} Summary: CLI for xapi toolstack storage managers License: LGPL Group: Development/Other diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index afd78f1a..c5dd7850 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,6 +1,6 @@ Name: squeezed Version: 0.10.4 -Release: 1 +Release: 1%{?dist} Summary: Memory ballooning daemon for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 477c1646..8afb44d0 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,6 +1,6 @@ Name: utop Version: 1.5 -Release: 1 +Release: 1%{?dist} Summary: A toplevel for OCaml which can run in a terminal or in Emacs License: BSD Group: Development/Other diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 257c08d6..4d2b3f7d 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -3,7 +3,7 @@ Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool Version: 0.6.4 -Release: 1 +Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/djs55/vhd-tool diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index a1643a93..3a8475b0 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,7 +1,7 @@ Summary: TTY to VNC utility Name: vncterm Version: 0.9.0 -Release: 1 +Release: 1%{?dist} License: GPL Group: System/Hypervisor URL: https://github.com/xenserver/vncterm diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index cbd7c19d..252c7508 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,6 +1,6 @@ Name: xapi-libvirt-storage Version: 0.9.7 -Release: 1 +Release: 1%{?dist} Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL Group: Development/Other diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index ebfaaa16..4f2e81c0 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.38 -Release: 1 +Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 93a2f304..1f840aff 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,6 +1,6 @@ Name: xcp-networkd Version: 0.9.3 -Release: 1 +Release: 1%{?dist} Summary: Simple host network management service for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index 36c225ca..f90a03aa 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -1,7 +1,7 @@ Summary: Common XenServer Python classes Name: xcp-python-libs Version: 0.9.0 -Release: 1 +Release: 1%{?dist} URL: https://github.com/xenserver/python-libs Source: https://github.com/euanh/python-libs/archive/%{version}/%{name}-%{version}.tar.gz License: GPL diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index b883ad59..65d0a82a 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,6 +1,6 @@ Name: xcp-rrdd Version: 0.9.2 -Release: 1 +Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 572f57bb..c3b764c5 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,7 +3,7 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 -Release: 2 +Release: 2%{?dist} Group: System/Hypervisor License: LGPL URL: https://github.com/xapi-project/sm diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 339a2e96..a5ebbfb8 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -1,6 +1,6 @@ Name: xe-create-templates Version: 0.9.2 -Release: 1 +Release: 1%{?dist} Summary: Creates default XenServer templates License: LGPL Group: Development/Other diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index d5a81ad7..bf8de6bd 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -1,6 +1,6 @@ Name: xenops-cli Version: 0.9.1 -Release: 2 +Release: 2%{?dist} Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL Group: Development/Other diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index e836a74d..97aba183 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.34 -Release: 1 +Release: 1%{?dist} Summary: Simple VM manager License: LGPL Group: Development/Other diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index 74dcc42b..f0dafd7a 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -1,6 +1,6 @@ Name: xenserver-core-latest-snapshot Version: 0.1.0 -Release: 2 +Release: 2%{?dist} Summary: Yum repositories for xenserver License: GPL Group: Development/Other diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index f6176fa1..0cd0fa3a 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.10.0 -Release: 1 +Release: 1%{?dist} Summary: A virtual package which installs the xapi toolstack License: LGPL Group: Development/Other diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index d81f61c1..f69697a5 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,7 +3,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.28 -Release: 2 +Release: 2%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/xenserver/xenserver-install-wizard diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 114d8ca8..f7338087 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -1,6 +1,6 @@ Name: xmlm Version: 1.1.1 -Release: 1 +Release: 1%{?dist} Summary: Streaming XML input/output for OCaml License: BSD3 Group: Development/Libraries diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 754da028..1644b8a4 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -1,7 +1,7 @@ Summary: XenServer Host Configuration Console Name: xsconsole Version: 0.9.0 -Release: 2 +Release: 2%{?dist} License: GPL2 Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 680e01bb..a06b0008 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -1,6 +1,6 @@ Name: xsiostat Version: 0.2.0 -Release: 1 +Release: 1%{?dist} Summary: XenServer IO stat thingy License: LGPLv2.1 Group: Development/Other From c3a12b9360ed44e573d5f92cf5e3490eaaf09ed8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 15:19:18 +0000 Subject: [PATCH 0702/1125] specdep: Fix tests to match new %dist handling Signed-off-by: Euan Harris --- tests/test_specdep.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/test_specdep.py b/tests/test_specdep.py index 450e996f..dfe68c44 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -17,8 +17,8 @@ def setUp(self): def test_rpm_names_from_spec(self): assert specdep.rpm_names_from_spec(self.spec) == \ - ["x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm", - "x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm"] + ["x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", + "x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"] def test_buildrequires_from_spec(self): assert specdep.buildrequires_from_spec(self.spec) == \ @@ -29,9 +29,9 @@ def test_build_srpm_from_spec(self): specdep.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") assert sys.stdout.getvalue() == \ -"""./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz +"""./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz @echo [RPMBUILD] $@ - @rpmbuild --quiet --define "_topdir ." -bs $< + @rpmbuild --quiet --define "_topdir ." --define "%dist .el6" -bs $< """ def test_download_rpm_sources(self): @@ -47,12 +47,12 @@ def test_build_rpm_from_srpm(self): specdep.build_rpm_from_srpm(self.spec) assert sys.stdout.getvalue() == \ -"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm +"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm @echo [MOCK] $@ @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< @echo [CREATEREPO] $@ @createrepo --quiet --update ./RPMS -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.src.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm @echo [MOCK] $@ @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< @echo [CREATEREPO] $@ @@ -66,15 +66,15 @@ def test_buildrequires_for_rpm(self): specdep.buildrequires_for_rpm(self.spec, specdep.package_to_rpm_map(specs)) assert sys.stdout.getvalue() == \ -"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm +"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm +./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm """ From f2762a67ca3d4d7daedfddd78c8a538a476c2368 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 09:48:26 +0000 Subject: [PATCH 0703/1125] specdep: Remove libxl-headers from ignore list Signed-off-by: Euan Harris --- specdep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specdep.py b/specdep.py index 26784174..b6c3617a 100755 --- a/specdep.py +++ b/specdep.py @@ -13,7 +13,7 @@ import urlparse -IGNORE_LIST = {"rpm":["libxl-headers","libnl3"], +IGNORE_LIST = {"rpm":["libnl3"], "deb":["libnl3"]} From c97ae8fe56c7878690bb5ab5ee73c70b9cc0a92a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 09:56:08 +0000 Subject: [PATCH 0704/1125] specdep: Import scripts.lib as a proper Python module Signed-off-by: Euan Harris --- scripts/__init__.py | 0 scripts/lib/__init__.py | 0 specdep.py | 5 ++--- 3 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 scripts/__init__.py create mode 100644 scripts/lib/__init__.py diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/lib/__init__.py b/scripts/lib/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/specdep.py b/specdep.py index b6c3617a..255f1929 100755 --- a/specdep.py +++ b/specdep.py @@ -3,15 +3,14 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html import sys -sys.path.append("scripts/lib") - import glob -import mappkgname import os import platform import rpm import urlparse +from scripts.lib import mappkgname + IGNORE_LIST = {"rpm":["libnl3"], "deb":["libnl3"]} From 6a617b508f7fa86eb07d8c6d677e11e00a16cb99 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 31 Jan 2014 13:46:35 +0000 Subject: [PATCH 0705/1125] specdep: Use 'git archive' handle local repositories This replaces the previous hacky 'tar' method. Signed-off-by: Euan Harris --- specdep.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/specdep.py b/specdep.py index 255f1929..bd1fa04d 100755 --- a/specdep.py +++ b/specdep.py @@ -197,13 +197,15 @@ def download_rpm_sources(spec, specname): os.path.join(SRCDIR, os.path.basename(url.fragment)), os.path.join(SPECDIR, specname), url.path) - print '\t@echo [TAR] $@' - # assume that the directory name is already what's expected by the - # spec file, and tag it with the version number in the tarball + + # Assume that the directory name is already what's expected by the + # spec file, and prefix it with the version number in the tarball + print '\t@echo [GIT] $@' dirname = "%s-%s" % (os.path.basename(url.path), spec.sourceHeader['version']) - print '\t@tar zcf $@ -C %s --transform "s,^\./,%s/," .' % (url.path, - dirname) + print '\t@git --git-dir=%s/.git '\ + 'archive --prefix %s/ -o $@ HEAD' % (url.path, dirname) + # Rules to build RPMS from SRPMS (uses information from the SPECs to From 7a1c4d6da4ac4f9f1403bb726ccfaefc33f7cfbe Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 14:52:35 +0000 Subject: [PATCH 0706/1125] specdep: Extract specfile-handling code to a library Signed-off-by: Euan Harris --- pkg.py | 118 ++++++++++++++++++++++++++++++++++++++++++ specdep.py | 114 ++++++++-------------------------------- tests/test_pkg.py | 44 ++++++++++++++++ tests/test_specdep.py | 16 ++---- 4 files changed, 186 insertions(+), 106 deletions(-) create mode 100755 pkg.py create mode 100644 tests/test_pkg.py diff --git a/pkg.py b/pkg.py new file mode 100755 index 00000000..dc5753aa --- /dev/null +++ b/pkg.py @@ -0,0 +1,118 @@ +#!/usr/bin/python + +"""Classes for handling RPM spec files. The classes defined here + are mostly just wrappers around rpm.rpm, adding information which + the rpm library does not currently provide.""" + + +import os +import rpm + + +# Could have a decorator / context manager to set and unset all the RPM macros +# around methods such as 'provides' + +def flatten(lst): + """Flatten a list of lists""" + res = [] + for elt in lst: + res += elt + return res + + +class Spec(object): + """Represents an RPM spec file""" + + def __init__(self, specfile): + # for debugging, make all paths relative to PWD + rpm.addMacro('_topdir', '.') + + # We could avoid hardcoding this by running + # "mock -r xenserver --chroot "rpm --eval '%dist'" + self.chroot_dist = '.el6' + rpm.addMacro('dist', self.chroot_dist) + + self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + + with open(specfile) as spec: + self.spectext = spec.readlines() + + self.spec = rpm.ts().parseSpec(specfile) + + + def provides(self): + """Return a list of package names provided by this spec""" + provides = [pkg.header['provides'] + [pkg.header['name']] + for pkg in self.packages()] + return set(flatten(provides)) + + + def name(self): + """Return the package name""" + return self.spec.sourceHeader['name'] + + + def version(self): + """Return the package version""" + return self.spec.sourceHeader['version'] + + + def packages(self): + """Return package objects for each package the spec defines""" + return self.spec.packages + + + def sources(self): + """Return the sources""" + return [source for (source, _, _) in self.spec.sources] + + + # RPM build dependencies. The 'requires' key for the *source* RPM is + # actually the 'buildrequires' key from the spec + def buildrequires(self): + """Return the set of packages needed to build this spec + (BuildRequires)""" + return set([r for r in self.spec.sourceHeader['requires']]) + + + def source_package_name(self): + """Return the name of the source package which building this + spec will produce""" + hdr = self.spec.sourceHeader + rpm.addMacro('NAME', hdr['name']) + rpm.addMacro('VERSION', hdr['version']) + rpm.addMacro('RELEASE', hdr['release']) + rpm.addMacro('ARCH', 'src') + + # There doesn't seem to be a macro for the name of the source + # rpm, but the name appears to be the same as the rpm name format. + # Unfortunately expanding that macro gives us a leading 'src' that we + # don't want, so we strip that off + + srpmname = os.path.basename(rpm.expandMacro(self.rpmfilenamepat)) + + rpm.delMacro('NAME') + rpm.delMacro('VERSION') + rpm.delMacro('RELEASE') + rpm.delMacro('ARCH') + + return srpmname + + + def binary_package_names(self): + """Return a list of binary packages built by this spec""" + def rpm_name_from_header(hdr): + """Return the name of the binary package file which + will be built from hdr""" + rpm.addMacro('NAME', hdr['name']) + rpm.addMacro('VERSION', hdr['version']) + rpm.addMacro('RELEASE', hdr['release']) + rpm.addMacro('ARCH', hdr['arch']) + rpm.addMacro('ARCH', hdr['arch']) + rpmname = rpm.expandMacro(self.rpmfilenamepat) + rpm.delMacro('NAME') + rpm.delMacro('VERSION') + rpm.delMacro('RELEASE') + rpm.delMacro('ARCH') + return rpmname + return [rpm_name_from_header(pkg.header) for pkg in self.packages()] diff --git a/specdep.py b/specdep.py index bd1fa04d..634fa74c 100755 --- a/specdep.py +++ b/specdep.py @@ -8,6 +8,7 @@ import platform import rpm import urlparse +import pkg from scripts.lib import mappkgname @@ -39,6 +40,7 @@ def map_package_name(name): # for debugging, make all paths relative to PWD rpm.addMacro('_topdir', '.') + # Directories where rpmbuild/mock expects to find inputs # and writes outputs RPMDIR = rpm.expandMacro('%_rpmdir') @@ -61,6 +63,8 @@ def map_package_name(name): # so we need to make sure that, whenever we run rpmbuild, we also override # %dist (on the command line) to have the same value as the chroot. + + # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" CHROOT_DIST = '.el6' @@ -70,77 +74,16 @@ def map_package_name(name): rpm.addMacro('dist', "") -if build_type() == "rpm": - RPMFILENAMEPAT = rpm.expandMacro('%_build_name_fmt') -else: - RPMFILENAMEPAT = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" - - -def spec_from_file(spec): - try: - return rpm.ts().parseSpec(spec) - except Exception, exn: - print >> sys.stderr, "Failed to parse %s" % spec - raise exn - - -def srpm_name_from_spec(spec): - hdr = spec.sourceHeader - rpm.addMacro('NAME', map_package_name(hdr['name'])[0]) - rpm.addMacro('VERSION', hdr['version']) - rpm.addMacro('RELEASE', hdr['release']) - rpm.addMacro('ARCH', 'src') - - # There doesn't seem to be a macro for the name of the source - # rpm, but the name appears to be the same as the rpm name format. - # Unfortunately expanding that macro gives us a leading 'src' that we - # don't want, so we strip that off - - if build_type() == "rpm": - srpmname = os.path.basename(rpm.expandMacro(RPMFILENAMEPAT)) - else: - srpmname = os.path.basename( - rpm.expandMacro("%{NAME}_%{VERSION}-%{RELEASE}.dsc")) - - rpm.delMacro('NAME') - rpm.delMacro('VERSION') - rpm.delMacro('RELEASE') - rpm.delMacro('ARCH') - - return srpmname - - -def rpm_names_from_spec(spec): - def rpm_name_from_header(hdr): - rpm.addMacro('NAME', map_package_name(hdr['name'])[0]) - rpm.addMacro('VERSION', hdr['version']) - rpm.addMacro('RELEASE', hdr['release']) - if build_type() == "rpm": - rpm.addMacro('ARCH', hdr['arch']) - else: - rpm.addMacro( - 'ARCH', "amd64" if hdr['arch'] == "x86_64" - else "all" if hdr['arch'] == "noarch" - else hdr['arch']) - rpmname = rpm.expandMacro(RPMFILENAMEPAT) - rpm.delMacro('NAME') - rpm.delMacro('VERSION') - rpm.delMacro('RELEASE') - rpm.delMacro('ARCH') - return rpmname - return [rpm_name_from_header(pkg.header) for pkg in spec.packages] - - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec, specname): - srpmname = srpm_name_from_spec(spec) + srpmname = spec.source_package_name() # spec.sourceHeader['sources'] and ['patches'] doesn't work # in RPM 4.8 on CentOS 6.4. spec.sources contains both # sources and patches, but with full paths which must be # chopped. sources = [] - for (source, _, _) in spec.sources: + for source in spec.sources(): url = urlparse.urlparse(source) # Source comes from a remote HTTP server @@ -180,7 +123,7 @@ def download_rpm_sources(spec, specname): # available in spec.sources. It's not clear whether or not we # can rely on this as part of the RPM library API. - for (source, _, _) in spec.sources: + for source in spec.sources(): url = urlparse.urlparse(source) # Source comes from a remote HTTP server @@ -201,21 +144,19 @@ def download_rpm_sources(spec, specname): # Assume that the directory name is already what's expected by the # spec file, and prefix it with the version number in the tarball print '\t@echo [GIT] $@' - dirname = "%s-%s" % (os.path.basename(url.path), - spec.sourceHeader['version']) + dirname = "%s-%s" % (os.path.basename(url.path), spec.version()) print '\t@git --git-dir=%s/.git '\ 'archive --prefix %s/ -o $@ HEAD' % (url.path, dirname) - # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) def build_rpm_from_srpm(spec): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly # on a partial build - rpmnames = rpm_names_from_spec(spec) - srpmname = srpm_name_from_spec(spec) + rpmnames = spec.binary_package_names() + srpmname = spec.source_package_name() for rpmname in rpmnames: rpm_path = os.path.join(RPMDIR, rpmname) srpm_path = os.path.join(SRPMDIR, srpmname) @@ -235,46 +176,33 @@ def build_rpm_from_srpm(spec): '--buildresult %s $<' % rpm_outdir -def flatten(lst): - res = [] - for elt in lst: - res += elt - return res - - -# RPM build dependencies. The 'requires' key for the *source* RPM is -# actually the 'buildrequires' key from the spec -def buildrequires_from_spec(spec): - reqs = [map_package_name(r) for r in spec.sourceHeader['requires']] - return set(flatten(reqs)) - def package_to_rpm_map(specs): provides_to_rpm = {} for spec in specs: - for package in spec.packages: - provides = package.header['provides'] + [package.header['name']] - for provided in set(flatten([map_package_name(r) for r in provides])): - for rpmname in rpm_names_from_spec(spec): + for package in spec.packages(): + for provided in spec.provides(): + for rpmname in spec.binary_package_names(): provides_to_rpm[provided] = rpmname return provides_to_rpm def buildrequires_for_rpm(spec, provides_to_rpm): - for rpmname in rpm_names_from_spec(spec): - for buildreq in buildrequires_from_spec(spec): + for rpmname in spec.binary_package_names(): + for buildreq in spec.buildrequires(): # Some buildrequires come from the system repository if provides_to_rpm.has_key(buildreq): buildreqrpm = provides_to_rpm[buildreq] print "%s: %s" % (os.path.join(RPMDIR, rpmname), os.path.join(RPMDIR, buildreqrpm)) + def main(): spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) specs = {} for spec_path in spec_paths: - spec = spec_from_file(spec_path) - pkg_name = spec.sourceHeader['name'] + spec = pkg.Spec(spec_path) + pkg_name = spec.name() if pkg_name in IGNORE_LIST[build_type()]: continue if os.path.splitext(os.path.basename(spec_path))[0] != pkg_name: @@ -300,11 +228,11 @@ def main(): all_rpms = [] all_srpms = [] for spec in specs.values(): - rpms = rpm_names_from_spec(spec) + rpms = spec.binary_package_names() rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) all_rpms += rpm_paths - all_srpms.append(os.path.join(SRPMDIR, srpm_name_from_spec(spec))) - print "%s: %s" % (spec.sourceHeader['name'], " ".join(rpm_paths)) + all_srpms.append(os.path.join(SRPMDIR, spec.source_package_name())) + print "%s: %s" % (spec.name(), " ".join(rpm_paths)) print "" print "rpms: " + " \\\n\t".join(all_rpms) diff --git a/tests/test_pkg.py b/tests/test_pkg.py new file mode 100644 index 00000000..88db0e89 --- /dev/null +++ b/tests/test_pkg.py @@ -0,0 +1,44 @@ +# Run these tests with 'nosetests': +# install the 'python-nose' package (Fedora/CentOS or Ubuntu) +# run 'nosetests' in the root of the repository + +import unittest + +import pkg + +class BasicTests(unittest.TestCase): + def setUp(self): + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") + + def test_name(self): + assert self.spec.name() == "ocaml-cohttp" + + def test_version(self): + assert self.spec.version() == "0.9.8" + + def test_provides(self): + assert self.spec.provides() == \ + set(["ocaml-cohttp", "ocaml-cohttp(x86-64)", + "ocaml-cohttp-devel", "ocaml-cohttp-devel(x86-64)"]) + + def test_sources(self): + assert sorted(self.spec.sources()) == \ + sorted(["https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) + + def test_buildrequires(self): + assert self.spec.buildrequires() == \ + set(["ocaml", "ocaml-findlib", "ocaml-re-devel", + "ocaml-uri-devel", "ocaml-cstruct-devel", + "ocaml-lwt-devel", "ocaml-ounit-devel", + "ocaml-ocamldoc", "ocaml-camlp4-devel", + "openssl", "openssl-devel"]) + + def test_source_package_name(self): + assert self.spec.source_package_name() == \ + "ocaml-cohttp-0.9.8-1.el6.src.rpm" + + def test_binary_package_names(self): + assert sorted(self.spec.binary_package_names()) == \ + sorted(["x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", + "x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"]) + diff --git a/tests/test_specdep.py b/tests/test_specdep.py index dfe68c44..f649bd86 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -9,21 +9,11 @@ import unittest import specdep +import pkg class BasicTests(unittest.TestCase): def setUp(self): - self.spec = specdep.spec_from_file("SPECS/ocaml-cohttp.spec") - self.spec = specdep.spec_from_file("SPECS/ocaml-cohttp.spec") - - def test_rpm_names_from_spec(self): - assert specdep.rpm_names_from_spec(self.spec) == \ - ["x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", - "x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"] - - def test_buildrequires_from_spec(self): - assert specdep.buildrequires_from_spec(self.spec) == \ - set(["ocaml", "ocaml-findlib", "ocaml-re-devel", "ocaml-uri-devel", "ocaml-cstruct-devel", "ocaml-lwt-devel", "ocaml-ounit-devel", "ocaml-ocamldoc", "ocaml-camlp4-devel", "openssl", "openssl-devel"]) - + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") def test_build_srpm_from_spec(self): specdep.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") @@ -62,7 +52,7 @@ def test_build_rpm_from_srpm(self): def test_buildrequires_for_rpm(self): spec_paths = glob.glob(os.path.join("./SPECS", "*.spec")) - specs = [specdep.spec_from_file(spec_path) for spec_path in spec_paths] + specs = [pkg.Spec(spec_path) for spec_path in spec_paths] specdep.buildrequires_for_rpm(self.spec, specdep.package_to_rpm_map(specs)) assert sys.stdout.getvalue() == \ From 465e25785e3391477b19b4ef4f7d33977b876b7c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 17:49:15 +0000 Subject: [PATCH 0707/1125] specdep: Return package paths from library RPM already gives us paths for package files - previously we were removing these and then adding them back on when we wrote the Makefile. Signed-off-by: Euan Harris --- pkg.py | 27 ++++++++++++++++++--------- specdep.py | 35 ++++++++++++----------------------- tests/test_pkg.py | 16 ++++++++-------- 3 files changed, 38 insertions(+), 40 deletions(-) diff --git a/pkg.py b/pkg.py index dc5753aa..d28c0630 100755 --- a/pkg.py +++ b/pkg.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - """Classes for handling RPM spec files. The classes defined here are mostly just wrappers around rpm.rpm, adding information which the rpm library does not currently provide.""" @@ -8,10 +6,21 @@ import os import rpm - # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' + +# for debugging, make all paths relative to PWD +rpm.addMacro('_topdir', '.') + +# Directories where rpmbuild/mock expects to find inputs +# and writes outputs +RPMDIR = rpm.expandMacro('%_rpmdir') +SRPMDIR = rpm.expandMacro('%_srcrpmdir') +SPECDIR = rpm.expandMacro('%_specdir') +SRCDIR = rpm.expandMacro('%_sourcedir') + + def flatten(lst): """Flatten a list of lists""" res = [] @@ -25,7 +34,7 @@ class Spec(object): def __init__(self, specfile): # for debugging, make all paths relative to PWD - rpm.addMacro('_topdir', '.') + #rpm.addMacro('_topdir', '.') # We could avoid hardcoding this by running # "mock -r xenserver --chroot "rpm --eval '%dist'" @@ -75,8 +84,8 @@ def buildrequires(self): return set([r for r in self.spec.sourceHeader['requires']]) - def source_package_name(self): - """Return the name of the source package which building this + def source_package_path(self): + """Return the path of the source package which building this spec will produce""" hdr = self.spec.sourceHeader rpm.addMacro('NAME', hdr['name']) @@ -96,10 +105,10 @@ def source_package_name(self): rpm.delMacro('RELEASE') rpm.delMacro('ARCH') - return srpmname + return os.path.join(SRPMDIR, srpmname) - def binary_package_names(self): + def binary_package_paths(self): """Return a list of binary packages built by this spec""" def rpm_name_from_header(hdr): """Return the name of the binary package file which @@ -114,5 +123,5 @@ def rpm_name_from_header(hdr): rpm.delMacro('VERSION') rpm.delMacro('RELEASE') rpm.delMacro('ARCH') - return rpmname + return os.path.join(RPMDIR, rpmname) return [rpm_name_from_header(pkg.header) for pkg in self.packages()] diff --git a/specdep.py b/specdep.py index 634fa74c..bed97698 100755 --- a/specdep.py +++ b/specdep.py @@ -37,15 +37,9 @@ def map_package_name(name): return mappkgname.map_package(name) -# for debugging, make all paths relative to PWD -rpm.addMacro('_topdir', '.') - - # Directories where rpmbuild/mock expects to find inputs # and writes outputs -RPMDIR = rpm.expandMacro('%_rpmdir') SPECDIR = rpm.expandMacro('%_specdir') -SRPMDIR = rpm.expandMacro('%_srcrpmdir') SRCDIR = rpm.expandMacro('%_sourcedir') @@ -76,7 +70,7 @@ def map_package_name(name): # Rules to build SRPM from SPEC def build_srpm_from_spec(spec, specname): - srpmname = spec.source_package_name() + srpmpath = spec.source_package_path() # spec.sourceHeader['sources'] and ['patches'] doesn't work # in RPM 4.8 on CentOS 6.4. spec.sources contains both @@ -99,8 +93,7 @@ def build_srpm_from_spec(spec, specname): if url.scheme == "": sources.append(os.path.join(SRCDIR, url.path)) - print '%s: %s %s' % (os.path.join(SRPMDIR, srpmname), - os.path.join(SPECDIR, specname), + print '%s: %s %s' % (srpmpath, os.path.join(SPECDIR, specname), " ".join(sources)) if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' @@ -155,11 +148,9 @@ def build_rpm_from_srpm(spec): # This doesn't generate the right Makefile fragment for a multi-target # rule - we may end up building too often, or not rebuilding correctly # on a partial build - rpmnames = spec.binary_package_names() - srpmname = spec.source_package_name() - for rpmname in rpmnames: - rpm_path = os.path.join(RPMDIR, rpmname) - srpm_path = os.path.join(SRPMDIR, srpmname) + rpm_paths = spec.binary_package_paths() + srpm_path = spec.source_package_path() + for rpm_path in rpm_paths: rpm_outdir = os.path.dirname(rpm_path) print '%s: %s' % (rpm_path, srpm_path) if build_type() == "rpm": @@ -167,7 +158,7 @@ def build_rpm_from_srpm(spec): print '\t@mock --configdir=mock --quiet -r xenserver '\ '--resultdir="%s" $<' % rpm_outdir print '\t@echo [CREATEREPO] $@' - print '\t@createrepo --quiet --update %s' % RPMDIR + print '\t@createrepo --quiet --update %s' % pkg.RPMDIR else: print '\t@echo [COWBUILDER] $@' @@ -181,19 +172,18 @@ def package_to_rpm_map(specs): for spec in specs: for package in spec.packages(): for provided in spec.provides(): - for rpmname in spec.binary_package_names(): - provides_to_rpm[provided] = rpmname + for rpmpath in spec.binary_package_paths(): + provides_to_rpm[provided] = rpmpath return provides_to_rpm def buildrequires_for_rpm(spec, provides_to_rpm): - for rpmname in spec.binary_package_names(): + for rpmpath in spec.binary_package_paths(): for buildreq in spec.buildrequires(): # Some buildrequires come from the system repository if provides_to_rpm.has_key(buildreq): buildreqrpm = provides_to_rpm[buildreq] - print "%s: %s" % (os.path.join(RPMDIR, rpmname), - os.path.join(RPMDIR, buildreqrpm)) + print "%s: %s" % (rpmpath, buildreqrpm) def main(): @@ -228,10 +218,9 @@ def main(): all_rpms = [] all_srpms = [] for spec in specs.values(): - rpms = spec.binary_package_names() - rpm_paths = map((lambda rpm: os.path.join(RPMDIR, rpm)), rpms) + rpm_paths = spec.binary_package_paths() all_rpms += rpm_paths - all_srpms.append(os.path.join(SRPMDIR, spec.source_package_name())) + all_srpms.append(spec.source_package_path()) print "%s: %s" % (spec.name(), " ".join(rpm_paths)) print "" diff --git a/tests/test_pkg.py b/tests/test_pkg.py index 88db0e89..cf749d9c 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -33,12 +33,12 @@ def test_buildrequires(self): "ocaml-ocamldoc", "ocaml-camlp4-devel", "openssl", "openssl-devel"]) - def test_source_package_name(self): - assert self.spec.source_package_name() == \ - "ocaml-cohttp-0.9.8-1.el6.src.rpm" - - def test_binary_package_names(self): - assert sorted(self.spec.binary_package_names()) == \ - sorted(["x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", - "x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"]) + def test_source_package_path(self): + assert self.spec.source_package_path() == \ + "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm" + + def test_binary_package_paths(self): + assert sorted(self.spec.binary_package_paths()) == \ + sorted(["./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"]) From b29f915bc20fd7609d73226c4a4a23a7e8fa6193 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 18:03:48 +0000 Subject: [PATCH 0708/1125] specdep: Add 'specpath' to spec object This gets rid of more needless path joining. Signed-off-by: Euan Harris --- pkg.py | 13 ++++++++++--- specdep.py | 21 ++++++++++----------- tests/test_pkg.py | 3 +++ tests/test_specdep.py | 4 ++-- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pkg.py b/pkg.py index d28c0630..255bc7ca 100755 --- a/pkg.py +++ b/pkg.py @@ -32,7 +32,7 @@ def flatten(lst): class Spec(object): """Represents an RPM spec file""" - def __init__(self, specfile): + def __init__(self, path): # for debugging, make all paths relative to PWD #rpm.addMacro('_topdir', '.') @@ -43,10 +43,17 @@ def __init__(self, specfile): self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - with open(specfile) as spec: + self.path = os.path.join(SPECDIR, os.path.basename(path)) + + with open(path) as spec: self.spectext = spec.readlines() - self.spec = rpm.ts().parseSpec(specfile) + self.spec = rpm.ts().parseSpec(path) + + + def specpath(self): + """Return the path to the spec file""" + return self.path def provides(self): diff --git a/specdep.py b/specdep.py index bed97698..511ee975 100755 --- a/specdep.py +++ b/specdep.py @@ -69,7 +69,7 @@ def map_package_name(name): # Rules to build SRPM from SPEC -def build_srpm_from_spec(spec, specname): +def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() # spec.sourceHeader['sources'] and ['patches'] doesn't work @@ -93,8 +93,8 @@ def build_srpm_from_spec(spec, specname): if url.scheme == "": sources.append(os.path.join(SRCDIR, url.path)) - print '%s: %s %s' % (srpmpath, os.path.join(SPECDIR, specname), - " ".join(sources)) + print '%s: %s %s' % (srpmpath, spec.specpath(), " ".join(sources)) + if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % CHROOT_DIST @@ -108,7 +108,7 @@ def build_srpm_from_spec(spec, specname): # Assumes each RPM only needs one download - we have some multi-source # packages but in all cases the additional sources are patches provided # in the Git repository -def download_rpm_sources(spec, specname): +def download_rpm_sources(spec): # The RPM documentation says that RPM only cares about the basename # of the path given in a Source: tag. spec.sourceHeader['url'] # enforces this - even if we have a URL in the source tag, it @@ -123,7 +123,7 @@ def download_rpm_sources(spec, specname): if url.scheme in ["http", "https"]: print '%s: %s' % ( os.path.join(SRCDIR, os.path.basename(url.path)), - os.path.join(SPECDIR, specname)) + spec.specpath()) print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % source @@ -131,8 +131,7 @@ def download_rpm_sources(spec, specname): if url.scheme == "file": print '%s: %s $(shell find %s)' % ( os.path.join(SRCDIR, os.path.basename(url.fragment)), - os.path.join(SPECDIR, specname), - url.path) + spec.specpath(), url.path) # Assume that the directory name is already what's expected by the # spec file, and prefix it with the version number in the tarball @@ -207,9 +206,9 @@ def main(): print "all: rpms" - for specname, spec in specs.iteritems(): - build_srpm_from_spec(spec, specname) - download_rpm_sources(spec, specname) + for spec in specs.itervalues(): + build_srpm_from_spec(spec) + download_rpm_sources(spec) build_rpm_from_srpm(spec) buildrequires_for_rpm(spec, provides_to_rpm) print "" @@ -217,7 +216,7 @@ def main(): # Generate targets to build all srpms and all rpms all_rpms = [] all_srpms = [] - for spec in specs.values(): + for spec in specs.itervalues(): rpm_paths = spec.binary_package_paths() all_rpms += rpm_paths all_srpms.append(spec.source_package_path()) diff --git a/tests/test_pkg.py b/tests/test_pkg.py index cf749d9c..fff9ccd5 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -13,6 +13,9 @@ def setUp(self): def test_name(self): assert self.spec.name() == "ocaml-cohttp" + def test_specpath(self): + assert self.spec.specpath() == "./SPECS/ocaml-cohttp.spec" + def test_version(self): assert self.spec.version() == "0.9.8" diff --git a/tests/test_specdep.py b/tests/test_specdep.py index f649bd86..79c1861f 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -16,7 +16,7 @@ def setUp(self): self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") def test_build_srpm_from_spec(self): - specdep.build_srpm_from_spec(self.spec, "ocaml-cohttp.spec") + specdep.build_srpm_from_spec(self.spec) assert sys.stdout.getvalue() == \ """./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz @@ -25,7 +25,7 @@ def test_build_srpm_from_spec(self): """ def test_download_rpm_sources(self): - specdep.download_rpm_sources(self.spec, "ocaml-cohttp.spec") + specdep.download_rpm_sources(self.spec) assert sys.stdout.getvalue() == \ """./SOURCES/ocaml-cohttp-0.9.8.tar.gz: ./SPECS/ocaml-cohttp.spec From d77fadba221bc639901ef92a2905613a5b80caba Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 18:18:53 +0000 Subject: [PATCH 0709/1125] specdep: Remove unnecessary extra iteration over packages Signed-off-by: Euan Harris --- specdep.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/specdep.py b/specdep.py index 511ee975..8592cd42 100755 --- a/specdep.py +++ b/specdep.py @@ -169,10 +169,9 @@ def build_rpm_from_srpm(spec): def package_to_rpm_map(specs): provides_to_rpm = {} for spec in specs: - for package in spec.packages(): - for provided in spec.provides(): - for rpmpath in spec.binary_package_paths(): - provides_to_rpm[provided] = rpmpath + for provided in spec.provides(): + for rpmpath in spec.binary_package_paths(): + provides_to_rpm[provided] = rpmpath return provides_to_rpm From 147b6da59ec9b25ae403579b341e372fac252228 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 18:24:26 +0000 Subject: [PATCH 0710/1125] specdep: Move CHROOT_DIST to pkg library Signed-off-by: Euan Harris --- pkg.py | 27 +++++++++++++++++++-------- specdep.py | 26 +------------------------- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/pkg.py b/pkg.py index 255bc7ca..5bb7b1d0 100755 --- a/pkg.py +++ b/pkg.py @@ -20,6 +20,25 @@ SPECDIR = rpm.expandMacro('%_specdir') SRCDIR = rpm.expandMacro('%_sourcedir') +# Some RPMs include the value of '%dist' in the release part of the +# filename. In the mock chroot, %dist is set to a CentOS release +# such as '.el6', so RPMs produced by mock will have that in their +# names. However if we generate the dependencies in a Fedora 'host', +# the filenames will be generated with a %dist of '.fc18' instead. +# We need to override %dist with the value from the chroot so these +# dependencies are named correctly. + +# The same problem occurs with rpmbuild. We currently run rpmbuild on +# the host to build SRPMs. By default it will use the host's %dist value +# when naming the SRPM. This won't match the patterns in the Makefile, +# so we need to make sure that, whenever we run rpmbuild, we also override +# %dist (on the command line) to have the same value as the chroot. + +# We could avoid hardcoding this by running +# "mock -r xenserver --chroot "rpm --eval '%dist'" +CHROOT_DIST = '.el6' +rpm.addMacro('dist', CHROOT_DIST) + def flatten(lst): """Flatten a list of lists""" @@ -33,14 +52,6 @@ class Spec(object): """Represents an RPM spec file""" def __init__(self, path): - # for debugging, make all paths relative to PWD - #rpm.addMacro('_topdir', '.') - - # We could avoid hardcoding this by running - # "mock -r xenserver --chroot "rpm --eval '%dist'" - self.chroot_dist = '.el6' - rpm.addMacro('dist', self.chroot_dist) - self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.path = os.path.join(SPECDIR, os.path.basename(path)) diff --git a/specdep.py b/specdep.py index 8592cd42..53e8d184 100755 --- a/specdep.py +++ b/specdep.py @@ -43,30 +43,6 @@ def map_package_name(name): SRCDIR = rpm.expandMacro('%_sourcedir') -# Some RPMs include the value of '%dist' in the release part of the -# filename. In the mock chroot, %dist is set to a CentOS release -# such as '.el6', so RPMs produced by mock will have that in their -# names. However if we generate the dependencies in a Fedora 'host', -# the filenames will be generated with a %dist of '.fc18' instead. -# We need to override %dist with the value from the chroot so these -# dependencies are named correctly. - -# The same problem occurs with rpmbuild. We currently run rpmbuild on -# the host to build SRPMs. By default it will use the host's %dist value -# when naming the SRPM. This won't match the patterns in the Makefile, -# so we need to make sure that, whenever we run rpmbuild, we also override -# %dist (on the command line) to have the same value as the chroot. - - - -# We could avoid hardcoding this by running -# "mock -r xenserver --chroot "rpm --eval '%dist'" -CHROOT_DIST = '.el6' -if build_type() == "rpm": - rpm.addMacro('dist', CHROOT_DIST) -else: - rpm.addMacro('dist', "") - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): @@ -97,7 +73,7 @@ def build_srpm_from_spec(spec): if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % CHROOT_DIST + print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % pkg.CHROOT_DIST else: print '\t@echo [MAKEDEB] $@' print '\tscripts/deb/makedeb.py $<' From 2c525619e43d7d08c6835e5980db3fd39c3a124c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 29 Jan 2014 18:57:51 +0000 Subject: [PATCH 0711/1125] specdep: Move download URL handling to library Signed-off-by: Euan Harris --- pkg.py | 28 +++++++++++++++++++++++-- specdep.py | 53 +++++++++-------------------------------------- tests/test_pkg.py | 8 +++++-- 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/pkg.py b/pkg.py index 5bb7b1d0..44cc2ba6 100755 --- a/pkg.py +++ b/pkg.py @@ -5,6 +5,7 @@ import os import rpm +import urlparse # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' @@ -89,11 +90,34 @@ def packages(self): return self.spec.packages - def sources(self): - """Return the sources""" + def source_urls(self): + """Return the URLs from which the sources can be downloaded""" return [source for (source, _, _) in self.spec.sources] + def source_paths(self): + """Return the filesystem paths to source files""" + sources = [] + for source in self.source_urls(): + url = urlparse.urlparse(source) + + # Source comes from a remote HTTP server + if url.scheme in ["http", "https"]: + sources.append(os.path.join(SRCDIR, os.path.basename(url.path))) + + # Source comes from a local file or directory + if url.scheme == "file": + sources.append( + os.path.join(SRCDIR, os.path.basename(url.fragment))) + + # Source is an otherwise unqualified file, probably a patch + if url.scheme == "": + sources.append(os.path.join(SRCDIR, url.path)) + + return sources + + + # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def buildrequires(self): diff --git a/specdep.py b/specdep.py index 53e8d184..f95e955c 100755 --- a/specdep.py +++ b/specdep.py @@ -40,36 +40,13 @@ def map_package_name(name): # Directories where rpmbuild/mock expects to find inputs # and writes outputs SPECDIR = rpm.expandMacro('%_specdir') -SRCDIR = rpm.expandMacro('%_sourcedir') - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() - - # spec.sourceHeader['sources'] and ['patches'] doesn't work - # in RPM 4.8 on CentOS 6.4. spec.sources contains both - # sources and patches, but with full paths which must be - # chopped. - sources = [] - for source in spec.sources(): - url = urlparse.urlparse(source) - - # Source comes from a remote HTTP server - if url.scheme in ["http", "https"]: - sources.append(os.path.join(SRCDIR, os.path.basename(url.path))) - - # Source comes from a local file or directory - if url.scheme == "file": - sources.append( - os.path.join(SRCDIR, os.path.basename(url.fragment))) - - # Source is an otherwise unqualified file, probably a patch - if url.scheme == "": - sources.append(os.path.join(SRCDIR, url.path)) - - print '%s: %s %s' % (srpmpath, spec.specpath(), " ".join(sources)) + print '%s: %s %s' % (srpmpath, spec.specpath(), + " ".join(spec.source_paths())) if build_type() == "rpm": print '\t@echo [RPMBUILD] $@' @@ -85,36 +62,26 @@ def build_srpm_from_spec(spec): # packages but in all cases the additional sources are patches provided # in the Git repository def download_rpm_sources(spec): - # The RPM documentation says that RPM only cares about the basename - # of the path given in a Source: tag. spec.sourceHeader['url'] - # enforces this - even if we have a URL in the source tag, it - # will only give us the basename. However the full tag text is - # available in spec.sources. It's not clear whether or not we - # can rely on this as part of the RPM library API. - - for source in spec.sources(): - url = urlparse.urlparse(source) + for (url, path) in zip(spec.source_urls(), spec.source_paths()): + source = urlparse.urlparse(url) # Source comes from a remote HTTP server - if url.scheme in ["http", "https"]: - print '%s: %s' % ( - os.path.join(SRCDIR, os.path.basename(url.path)), - spec.specpath()) + if source.scheme in ["http", "https"]: + print '%s: %s' % (path, spec.specpath()) print '\t@echo [CURL] $@' - print '\t@curl --silent --show-error -L -o $@ %s' % source + print '\t@curl --silent --show-error -L -o $@ %s' % url # Source comes from a local file or directory - if url.scheme == "file": + if source.scheme == "file": print '%s: %s $(shell find %s)' % ( - os.path.join(SRCDIR, os.path.basename(url.fragment)), - spec.specpath(), url.path) + path, spec.specpath(), source.path) # Assume that the directory name is already what's expected by the # spec file, and prefix it with the version number in the tarball print '\t@echo [GIT] $@' dirname = "%s-%s" % (os.path.basename(url.path), spec.version()) print '\t@git --git-dir=%s/.git '\ - 'archive --prefix %s/ -o $@ HEAD' % (url.path, dirname) + 'archive --prefix %s/ -o $@ HEAD' % (source.path, dirname) # Rules to build RPMS from SRPMS (uses information from the SPECs to diff --git a/tests/test_pkg.py b/tests/test_pkg.py index fff9ccd5..b384512f 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -24,10 +24,14 @@ def test_provides(self): set(["ocaml-cohttp", "ocaml-cohttp(x86-64)", "ocaml-cohttp-devel", "ocaml-cohttp-devel(x86-64)"]) - def test_sources(self): - assert sorted(self.spec.sources()) == \ + def test_source_urls(self): + assert sorted(self.spec.source_urls()) == \ sorted(["https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) + def test_source_paths(self): + assert sorted(self.spec.source_paths()) == \ + sorted(["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + def test_buildrequires(self): assert self.spec.buildrequires() == \ set(["ocaml", "ocaml-findlib", "ocaml-re-devel", From 6d5f68c42bd7a692b8a55d6b31859579c4411492 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 09:56:45 +0000 Subject: [PATCH 0712/1125] specdep: Move specs and ignore list to command line arguments Signed-off-by: Euan Harris --- Makefile | 2 +- specdep.py | 54 +++++++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 955f31d4..f09829ea 100644 --- a/Makefile +++ b/Makefile @@ -2,5 +2,5 @@ deps: SPECS/*.spec specdep.py @echo Updating dependencies... - @./specdep.py > $@ + @./specdep.py -i libnl3 SPECS/*.spec > $@ diff --git a/specdep.py b/specdep.py index f95e955c..c74e7a40 100755 --- a/specdep.py +++ b/specdep.py @@ -3,20 +3,15 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html import sys -import glob +import argparse import os import platform -import rpm import urlparse import pkg from scripts.lib import mappkgname -IGNORE_LIST = {"rpm":["libnl3"], - "deb":["libnl3"]} - - def build_type(): debian_like = ["ubuntu", "debian"] rhel_like = ["fedora", "redhat", "centos"] @@ -37,19 +32,14 @@ def map_package_name(name): return mappkgname.map_package(name) -# Directories where rpmbuild/mock expects to find inputs -# and writes outputs -SPECDIR = rpm.expandMacro('%_specdir') - - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() - print '%s: %s %s' % (srpmpath, spec.specpath(), + print '%s: %s %s' % (srpmpath, spec.specpath(), " ".join(spec.source_paths())) if build_type() == "rpm": - print '\t@echo [RPMBUILD] $@' + print '\t@echo [RPMBUILD] $@' print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % pkg.CHROOT_DIST else: print '\t@echo [MAKEDEB] $@' @@ -68,7 +58,7 @@ def download_rpm_sources(spec): # Source comes from a remote HTTP server if source.scheme in ["http", "https"]: print '%s: %s' % (path, spec.specpath()) - print '\t@echo [CURL] $@' + print '\t@echo [CURL] $@' print '\t@curl --silent --show-error -L -o $@ %s' % url # Source comes from a local file or directory @@ -79,7 +69,7 @@ def download_rpm_sources(spec): # Assume that the directory name is already what's expected by the # spec file, and prefix it with the version number in the tarball print '\t@echo [GIT] $@' - dirname = "%s-%s" % (os.path.basename(url.path), spec.version()) + dirname = "%s-%s" % (os.path.basename(source.path), spec.version()) print '\t@git --git-dir=%s/.git '\ 'archive --prefix %s/ -o $@ HEAD' % (source.path, dirname) @@ -92,7 +82,7 @@ def build_rpm_from_srpm(spec): # on a partial build rpm_paths = spec.binary_package_paths() srpm_path = spec.source_package_path() - for rpm_path in rpm_paths: + for rpm_path in rpm_paths: rpm_outdir = os.path.dirname(rpm_path) print '%s: %s' % (rpm_path, srpm_path) if build_type() == "rpm": @@ -106,7 +96,7 @@ def build_rpm_from_srpm(spec): print '\t@echo [COWBUILDER] $@' print '\tsudo cowbuilder --build '\ '--configfile pbuilder/pbuilderrc-raring-amd64 '\ - '--buildresult %s $<' % rpm_outdir + '--buildresult %s $<' % rpm_outdir def package_to_rpm_map(specs): @@ -116,7 +106,7 @@ def package_to_rpm_map(specs): for rpmpath in spec.binary_package_paths(): provides_to_rpm[provided] = rpmpath return provides_to_rpm - + def buildrequires_for_rpm(spec, provides_to_rpm): for rpmpath in spec.binary_package_paths(): @@ -127,25 +117,39 @@ def buildrequires_for_rpm(spec, provides_to_rpm): print "%s: %s" % (rpmpath, buildreqrpm) +def parse_cmdline(): + """ + Parse command line options + """ + parser = argparse.ArgumentParser(description= + "Generate Makefile dependencies from RPM Spec files") + parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file") + parser.add_argument("-i", "--ignore", metavar="PKG", action="append", + default=[], help="package name to ignore") + return parser.parse_args() + + def main(): - spec_paths = glob.glob(os.path.join(SPECDIR, "*.spec")) + args = parse_cmdline() + spec_paths = args.specs + ignore_list = args.ignore specs = {} for spec_path in spec_paths: spec = pkg.Spec(spec_path) pkg_name = spec.name() - if pkg_name in IGNORE_LIST[build_type()]: + if pkg_name in ignore_list: continue if os.path.splitext(os.path.basename(spec_path))[0] != pkg_name: sys.stderr.write( - "error: spec file name '%s' does not match package name '%s'\n" % + "error: spec file name '%s' does not match package name '%s'\n" % (spec_path, pkg_name)) sys.exit(1) - + specs[os.path.basename(spec_path)] = spec provides_to_rpm = package_to_rpm_map(specs.values()) - + print "all: rpms" for spec in specs.itervalues(): @@ -164,12 +168,12 @@ def main(): all_srpms.append(spec.source_package_path()) print "%s: %s" % (spec.name(), " ".join(rpm_paths)) print "" - + print "rpms: " + " \\\n\t".join(all_rpms) print "" print "srpms: " + " \\\n\t".join(all_srpms) print "" - print "install: all" + print "install: all" print "\t. scripts/%s/install.sh" % build_type() From 6e94d94528388bca9bebecc6ba84a14beffa465c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 13:39:48 +0000 Subject: [PATCH 0713/1125] specdep: Move build recipes into the Makefile Signed-off-by: Euan Harris --- Makefile | 42 +++++++++++++++++++++++++++++++++++++++++- specdep.py | 22 ---------------------- tests/test_specdep.py | 10 ---------- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index f09829ea..94076490 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,46 @@ --include deps +DIST := .el6 + +.PHONY: all rpms srpms + +all: rpms + + +# RPM build rules + +%.src.rpm: + @echo [RPMBUILD] $@ + @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< + +%.x86_64.rpm: + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="RPMS/x86_64" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS + +%.noarch.rpm: + @echo [MOCK] $@ + @mock --configdir=mock --quiet -r xenserver --resultdir="RPMS/noarch" $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./RPMS + + +# Deb build rules + +%.dsc: + @echo [MAKEDEB] $@ + @scripts/deb/makedeb.py $< + +%.deb: + @echo [COWBUILDER] $@ + @sudo cowbuilder --build \ + --configfile pbuilder/pbuilderrc-raring-amd64 \ + --buildresult RPMS $< + + +# Dependency build rules deps: SPECS/*.spec specdep.py @echo Updating dependencies... @./specdep.py -i libnl3 SPECS/*.spec > $@ +-include deps diff --git a/specdep.py b/specdep.py index c74e7a40..3ee0cddb 100755 --- a/specdep.py +++ b/specdep.py @@ -38,13 +38,6 @@ def build_srpm_from_spec(spec): print '%s: %s %s' % (srpmpath, spec.specpath(), " ".join(spec.source_paths())) - if build_type() == "rpm": - print '\t@echo [RPMBUILD] $@' - print '\t@rpmbuild --quiet --define "_topdir ." --define "%%dist %s" -bs $<' % pkg.CHROOT_DIST - else: - print '\t@echo [MAKEDEB] $@' - print '\tscripts/deb/makedeb.py $<' - # Rules to download sources @@ -83,20 +76,7 @@ def build_rpm_from_srpm(spec): rpm_paths = spec.binary_package_paths() srpm_path = spec.source_package_path() for rpm_path in rpm_paths: - rpm_outdir = os.path.dirname(rpm_path) print '%s: %s' % (rpm_path, srpm_path) - if build_type() == "rpm": - print '\t@echo [MOCK] $@' - print '\t@mock --configdir=mock --quiet -r xenserver '\ - '--resultdir="%s" $<' % rpm_outdir - print '\t@echo [CREATEREPO] $@' - print '\t@createrepo --quiet --update %s' % pkg.RPMDIR - - else: - print '\t@echo [COWBUILDER] $@' - print '\tsudo cowbuilder --build '\ - '--configfile pbuilder/pbuilderrc-raring-amd64 '\ - '--buildresult %s $<' % rpm_outdir def package_to_rpm_map(specs): @@ -150,8 +130,6 @@ def main(): provides_to_rpm = package_to_rpm_map(specs.values()) - print "all: rpms" - for spec in specs.itervalues(): build_srpm_from_spec(spec) download_rpm_sources(spec) diff --git a/tests/test_specdep.py b/tests/test_specdep.py index 79c1861f..9e36ac8e 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -20,8 +20,6 @@ def test_build_srpm_from_spec(self): assert sys.stdout.getvalue() == \ """./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz - @echo [RPMBUILD] $@ - @rpmbuild --quiet --define "_topdir ." --define "%dist .el6" -bs $< """ def test_download_rpm_sources(self): @@ -38,15 +36,7 @@ def test_build_rpm_from_srpm(self): assert sys.stdout.getvalue() == \ """./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm - @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< - @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS ./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm - @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="./RPMS/x86_64" $< - @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS """ From 338eac1dccc4b0e45e18ef22e1674fcfeab7c54e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 14:19:50 +0000 Subject: [PATCH 0714/1125] pkg: Remove 'packages()' method Signed-off-by: Euan Harris --- pkg.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg.py b/pkg.py index 44cc2ba6..c5f883ae 100755 --- a/pkg.py +++ b/pkg.py @@ -71,7 +71,7 @@ def specpath(self): def provides(self): """Return a list of package names provided by this spec""" provides = [pkg.header['provides'] + [pkg.header['name']] - for pkg in self.packages()] + for pkg in self.spec.packages] return set(flatten(provides)) @@ -85,11 +85,6 @@ def version(self): return self.spec.sourceHeader['version'] - def packages(self): - """Return package objects for each package the spec defines""" - return self.spec.packages - - def source_urls(self): """Return the URLs from which the sources can be downloaded""" return [source for (source, _, _) in self.spec.sources] @@ -166,4 +161,4 @@ def rpm_name_from_header(hdr): rpm.delMacro('RELEASE') rpm.delMacro('ARCH') return os.path.join(RPMDIR, rpmname) - return [rpm_name_from_header(pkg.header) for pkg in self.packages()] + return [rpm_name_from_header(pkg.header) for pkg in self.spec.packages] From a2f218a94c66a476090b958c711b12e525c581cf Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 30 Jan 2014 17:43:57 +0000 Subject: [PATCH 0715/1125] specdep/pkg: Add back Debian dependency generation Signed-off-by: Euan Harris --- pkg.py | 80 +++++++++++++++++++++++++++++------------------ specdep.py | 15 +++------ tests/test_pkg.py | 47 ++++++++++++++++++++++++++-- 3 files changed, 98 insertions(+), 44 deletions(-) diff --git a/pkg.py b/pkg.py index c5f883ae..2044c9bf 100755 --- a/pkg.py +++ b/pkg.py @@ -6,6 +6,7 @@ import os import rpm import urlparse +from scripts.lib import mappkgname # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' @@ -21,25 +22,6 @@ SPECDIR = rpm.expandMacro('%_specdir') SRCDIR = rpm.expandMacro('%_sourcedir') -# Some RPMs include the value of '%dist' in the release part of the -# filename. In the mock chroot, %dist is set to a CentOS release -# such as '.el6', so RPMs produced by mock will have that in their -# names. However if we generate the dependencies in a Fedora 'host', -# the filenames will be generated with a %dist of '.fc18' instead. -# We need to override %dist with the value from the chroot so these -# dependencies are named correctly. - -# The same problem occurs with rpmbuild. We currently run rpmbuild on -# the host to build SRPMs. By default it will use the host's %dist value -# when naming the SRPM. This won't match the patterns in the Makefile, -# so we need to make sure that, whenever we run rpmbuild, we also override -# %dist (on the command line) to have the same value as the chroot. - -# We could avoid hardcoding this by running -# "mock -r xenserver --chroot "rpm --eval '%dist'" -CHROOT_DIST = '.el6' -rpm.addMacro('dist', CHROOT_DIST) - def flatten(lst): """Flatten a list of lists""" @@ -49,11 +31,49 @@ def flatten(lst): return res +def identity(name): + """Identity mapping""" + return name + +def map_package_name_deb(name): + """Map RPM package name to Deb name""" + return mappkgname.map_package(name)[0] + +def map_arch_deb(arch): + """Map RPM package architecture to Deb architecture""" + if arch == "x86_64": + return "amd64" + elif arch == "noarch": + return "all" + else: + return arch + + class Spec(object): """Represents an RPM spec file""" - def __init__(self, path): - self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + def __init__(self, path, target="rpm"): + if target == "rpm": + self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.map_package_name = identity + self.map_arch = identity + + # '%dist' in the host (where we build the source package) + # might not match '%dist' in the chroot (where we build + # the binary package). We must override it on the host, + # otherwise the names of packages in the dependencies won't + # match the files actually produced by mock. + self.chroot_dist = ".el6" + rpm.addMacro('dist', self.chroot_dist) + + else: + self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" + self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" + self.map_package_name = map_package_name_deb + self.map_arch = map_arch_deb + self.chroot_dist = "" + rpm.addMacro('dist', self.chroot_dist) self.path = os.path.join(SPECDIR, os.path.basename(path)) @@ -70,9 +90,9 @@ def specpath(self): def provides(self): """Return a list of package names provided by this spec""" - provides = [pkg.header['provides'] + [pkg.header['name']] - for pkg in self.spec.packages] - return set(flatten(provides)) + provides = sum([pkg.header['provides'] + [pkg.header['name']] + for pkg in self.spec.packages], []) + return set([self.map_package_name(p) for p in provides]) def name(self): @@ -118,14 +138,15 @@ def source_paths(self): def buildrequires(self): """Return the set of packages needed to build this spec (BuildRequires)""" - return set([r for r in self.spec.sourceHeader['requires']]) + return set([self.map_package_name(r) for r + in self.spec.sourceHeader['requires']]) def source_package_path(self): """Return the path of the source package which building this spec will produce""" hdr = self.spec.sourceHeader - rpm.addMacro('NAME', hdr['name']) + rpm.addMacro('NAME', self.map_package_name(hdr['name'])) rpm.addMacro('VERSION', hdr['version']) rpm.addMacro('RELEASE', hdr['release']) rpm.addMacro('ARCH', 'src') @@ -135,7 +156,7 @@ def source_package_path(self): # Unfortunately expanding that macro gives us a leading 'src' that we # don't want, so we strip that off - srpmname = os.path.basename(rpm.expandMacro(self.rpmfilenamepat)) + srpmname = os.path.basename(rpm.expandMacro(self.srpmfilenamepat)) rpm.delMacro('NAME') rpm.delMacro('VERSION') @@ -150,11 +171,10 @@ def binary_package_paths(self): def rpm_name_from_header(hdr): """Return the name of the binary package file which will be built from hdr""" - rpm.addMacro('NAME', hdr['name']) + rpm.addMacro('NAME', self.map_package_name(hdr['name'])) rpm.addMacro('VERSION', hdr['version']) rpm.addMacro('RELEASE', hdr['release']) - rpm.addMacro('ARCH', hdr['arch']) - rpm.addMacro('ARCH', hdr['arch']) + rpm.addMacro('ARCH', self.map_arch(hdr['arch'])) rpmname = rpm.expandMacro(self.rpmfilenamepat) rpm.delMacro('NAME') rpm.delMacro('VERSION') diff --git a/specdep.py b/specdep.py index 3ee0cddb..0d7fbcae 100755 --- a/specdep.py +++ b/specdep.py @@ -25,13 +25,6 @@ def build_type(): return "rpm" -def map_package_name(name): - if build_type() == "rpm": - return [name] - else: - return mappkgname.map_package(name) - - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() @@ -116,7 +109,7 @@ def main(): specs = {} for spec_path in spec_paths: - spec = pkg.Spec(spec_path) + spec = pkg.Spec(spec_path, target=build_type()) pkg_name = spec.name() if pkg_name in ignore_list: continue @@ -141,10 +134,10 @@ def main(): all_rpms = [] all_srpms = [] for spec in specs.itervalues(): - rpm_paths = spec.binary_package_paths() - all_rpms += rpm_paths + rpm_path = spec.binary_package_paths()[0] + all_rpms.append(rpm_path) all_srpms.append(spec.source_package_path()) - print "%s: %s" % (spec.name(), " ".join(rpm_paths)) + print "%s: %s" % (spec.name(), rpm_path) print "" print "rpms: " + " \\\n\t".join(all_rpms) diff --git a/tests/test_pkg.py b/tests/test_pkg.py index b384512f..70afd7ac 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -6,7 +6,7 @@ import pkg -class BasicTests(unittest.TestCase): +class RpmTests(unittest.TestCase): def setUp(self): self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") @@ -21,8 +21,7 @@ def test_version(self): def test_provides(self): assert self.spec.provides() == \ - set(["ocaml-cohttp", "ocaml-cohttp(x86-64)", - "ocaml-cohttp-devel", "ocaml-cohttp-devel(x86-64)"]) + set(["ocaml-cohttp", "ocaml-cohttp-devel"]) def test_source_urls(self): assert sorted(self.spec.source_urls()) == \ @@ -49,3 +48,45 @@ def test_binary_package_paths(self): sorted(["./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"]) + +class DebTests(unittest.TestCase): + def setUp(self): + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", target="deb") + + def test_name(self): + assert self.spec.name() == "ocaml-cohttp" + + def test_specpath(self): + assert self.spec.specpath() == "./SPECS/ocaml-cohttp.spec" + + def test_version(self): + assert self.spec.version() == "0.9.8" + + def test_provides(self): + assert self.spec.provides() == \ + set(["libcohttp-ocaml", "libcohttp-ocaml-dev"]) + + def test_source_urls(self): + assert sorted(self.spec.source_urls()) == \ + sorted(["https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) + + def test_source_paths(self): + assert sorted(self.spec.source_paths()) == \ + sorted(["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + + def test_buildrequires(self): + assert self.spec.buildrequires() == \ + set(["ocaml-nox", "ocaml-findlib", "libre-ocaml-dev", + "liburi-ocaml-dev", "libcstruct-ocaml-dev", + "liblwt-ocaml-dev", "libounit-ocaml-dev", + "camlp4", "libssl1.0.0", "libssl-dev"]) + + def test_source_package_path(self): + assert self.spec.source_package_path() == \ + "./SRPMS/libcohttp-ocaml_0.9.8-1.dsc" + + def test_binary_package_paths(self): + assert sorted(self.spec.binary_package_paths()) == \ + sorted(["./RPMS/libcohttp-ocaml_0.9.8-1_amd64.deb", + "./RPMS/libcohttp-ocaml-dev_0.9.8-1_amd64.deb"]) + From 0bcdf5e846e0439780fddbc27263d7a780bd3b7b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 12:32:25 +0000 Subject: [PATCH 0716/1125] pkg: Reinstate one-to-many mapping from RPMs to Debs Signed-off-by: Euan Harris --- pkg.py | 40 ++++++++++++++++++++++------------------ tests/test_pkg.py | 6 ++++-- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/pkg.py b/pkg.py index 2044c9bf..4c88a713 100755 --- a/pkg.py +++ b/pkg.py @@ -25,25 +25,29 @@ def flatten(lst): """Flatten a list of lists""" - res = [] - for elt in lst: - res += elt - return res + return sum(lst, []) def identity(name): """Identity mapping""" - return name + return name + + +def identity_list(name): + """Identity mapping, injected into a list""" + return [name] + def map_package_name_deb(name): - """Map RPM package name to Deb name""" - return mappkgname.map_package(name)[0] + """Map RPM package name to equivalent Deb names""" + return mappkgname.map_package(name) + def map_arch_deb(arch): - """Map RPM package architecture to Deb architecture""" + """Map RPM package architecture to equivalent Deb architecture""" if arch == "x86_64": return "amd64" - elif arch == "noarch": + elif arch == "noarch": return "all" else: return arch @@ -56,7 +60,7 @@ def __init__(self, path, target="rpm"): if target == "rpm": self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.map_package_name = identity + self.map_package_name = identity_list self.map_arch = identity # '%dist' in the host (where we build the source package) @@ -67,7 +71,7 @@ def __init__(self, path, target="rpm"): self.chroot_dist = ".el6" rpm.addMacro('dist', self.chroot_dist) - else: + else: self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" self.map_package_name = map_package_name_deb @@ -90,9 +94,9 @@ def specpath(self): def provides(self): """Return a list of package names provided by this spec""" - provides = sum([pkg.header['provides'] + [pkg.header['name']] - for pkg in self.spec.packages], []) - return set([self.map_package_name(p) for p in provides]) + provides = flatten([pkg.header['provides'] + [pkg.header['name']] + for pkg in self.spec.packages]) + return set(flatten([self.map_package_name(p) for p in provides])) def name(self): @@ -138,15 +142,15 @@ def source_paths(self): def buildrequires(self): """Return the set of packages needed to build this spec (BuildRequires)""" - return set([self.map_package_name(r) for r - in self.spec.sourceHeader['requires']]) + return set(flatten([self.map_package_name(r) for r + in self.spec.sourceHeader['requires']])) def source_package_path(self): """Return the path of the source package which building this spec will produce""" hdr = self.spec.sourceHeader - rpm.addMacro('NAME', self.map_package_name(hdr['name'])) + rpm.addMacro('NAME', self.map_package_name(hdr['name'])[0]) rpm.addMacro('VERSION', hdr['version']) rpm.addMacro('RELEASE', hdr['release']) rpm.addMacro('ARCH', 'src') @@ -171,7 +175,7 @@ def binary_package_paths(self): def rpm_name_from_header(hdr): """Return the name of the binary package file which will be built from hdr""" - rpm.addMacro('NAME', self.map_package_name(hdr['name'])) + rpm.addMacro('NAME', self.map_package_name(hdr['name'])[0]) rpm.addMacro('VERSION', hdr['version']) rpm.addMacro('RELEASE', hdr['release']) rpm.addMacro('ARCH', self.map_arch(hdr['arch'])) diff --git a/tests/test_pkg.py b/tests/test_pkg.py index 70afd7ac..cdd294a1 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -76,10 +76,12 @@ def test_source_paths(self): def test_buildrequires(self): assert self.spec.buildrequires() == \ - set(["ocaml-nox", "ocaml-findlib", "libre-ocaml-dev", + set(["ocaml-nox", "ocaml-native-compilers", + "ocaml-findlib", "libre-ocaml-dev", "liburi-ocaml-dev", "libcstruct-ocaml-dev", "liblwt-ocaml-dev", "libounit-ocaml-dev", - "camlp4", "libssl1.0.0", "libssl-dev"]) + "camlp4", "camlp4-extra", "libssl1.0.0", + "libssl-dev"]) def test_source_package_path(self): assert self.spec.source_package_path() == \ From deaac86d288002dabf463cce657aab25a8e2b98f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 13:09:57 +0000 Subject: [PATCH 0717/1125] pkg: Move RPM to Deb name mapping out of library Signed-off-by: Euan Harris --- pkg.py | 17 +++++++---------- specdep.py | 12 +++++++++++- tests/test_pkg.py | 19 ++++++++++++++++++- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/pkg.py b/pkg.py index 4c88a713..05664990 100755 --- a/pkg.py +++ b/pkg.py @@ -6,7 +6,6 @@ import os import rpm import urlparse -from scripts.lib import mappkgname # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' @@ -38,11 +37,6 @@ def identity_list(name): return [name] -def map_package_name_deb(name): - """Map RPM package name to equivalent Deb names""" - return mappkgname.map_package(name) - - def map_arch_deb(arch): """Map RPM package architecture to equivalent Deb architecture""" if arch == "x86_64": @@ -56,11 +50,10 @@ def map_arch_deb(arch): class Spec(object): """Represents an RPM spec file""" - def __init__(self, path, target="rpm"): + def __init__(self, path, target="rpm", map_name=None): if target == "rpm": self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.map_package_name = identity_list self.map_arch = identity # '%dist' in the host (where we build the source package) @@ -74,11 +67,16 @@ def __init__(self, path, target="rpm"): else: self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" - self.map_package_name = map_package_name_deb self.map_arch = map_arch_deb self.chroot_dist = "" rpm.addMacro('dist', self.chroot_dist) + if map_name: + self.map_package_name = map_name + else: + self.map_package_name = identity_list + + self.path = os.path.join(SPECDIR, os.path.basename(path)) with open(path) as spec: @@ -136,7 +134,6 @@ def source_paths(self): return sources - # RPM build dependencies. The 'requires' key for the *source* RPM is # actually the 'buildrequires' key from the spec def buildrequires(self): diff --git a/specdep.py b/specdep.py index 0d7fbcae..19dfa177 100755 --- a/specdep.py +++ b/specdep.py @@ -25,6 +25,11 @@ def build_type(): return "rpm" +def map_package_name_deb(name): + """Map RPM package name to equivalent Deb names""" + return mappkgname.map_package(name) + + # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() @@ -32,6 +37,7 @@ def build_srpm_from_spec(spec): " ".join(spec.source_paths())) + # Rules to download sources # Assumes each RPM only needs one download - we have some multi-source @@ -109,7 +115,11 @@ def main(): specs = {} for spec_path in spec_paths: - spec = pkg.Spec(spec_path, target=build_type()) + if build_type() == "deb": + spec = pkg.Spec(spec_path, target="deb", + map_name=map_package_name_deb) + else: + spec = pkg.Spec(spec_path, target="rpm") pkg_name = spec.name() if pkg_name in ignore_list: continue diff --git a/tests/test_pkg.py b/tests/test_pkg.py index cdd294a1..e5c536ad 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -51,7 +51,24 @@ def test_binary_package_paths(self): class DebTests(unittest.TestCase): def setUp(self): - self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", target="deb") + def map_rpm_to_deb(name): + mapping = {"ocaml-cohttp": ["libcohttp-ocaml"], + "ocaml-cohttp-devel": ["libcohttp-ocaml-dev"], + "ocaml": ["ocaml-nox", "ocaml-native-compilers"], + "ocaml-findlib": ["ocaml-findlib"], + "ocaml-re-devel": ["libre-ocaml-dev"], + "ocaml-uri-devel": ["liburi-ocaml-dev"], + "ocaml-cstruct-devel": ["libcstruct-ocaml-dev"], + "ocaml-lwt-devel": ["liblwt-ocaml-dev"], + "ocaml-ounit-devel": ["libounit-ocaml-dev"], + "ocaml-ocamldoc": ["ocaml-nox"], + "ocaml-camlp4-devel": ["camlp4", "camlp4-extra"], + "openssl": ["libssl1.0.0"], + "openssl-devel": ["libssl-dev"]} + return mapping[name] + + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", target="deb", + map_name=map_rpm_to_deb) def test_name(self): assert self.spec.name() == "ocaml-cohttp" From c3fdd40cab00754d8d8ccf051cb9ff3f098b9246 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 13:10:24 +0000 Subject: [PATCH 0718/1125] pkg: Strip RPM 4.6's architecture annotations from 'Provides' Signed-off-by: Euan Harris --- pkg.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg.py b/pkg.py index 05664990..21cab317 100755 --- a/pkg.py +++ b/pkg.py @@ -4,6 +4,7 @@ import os +import re import rpm import urlparse @@ -94,6 +95,9 @@ def provides(self): """Return a list of package names provided by this spec""" provides = flatten([pkg.header['provides'] + [pkg.header['name']] for pkg in self.spec.packages]) + + # RPM 4.6 adds architecture constraints to dependencies. Drop them. + provides = [re.sub('\(x86-64\)$', '', pkg) for pkg in provides] return set(flatten([self.map_package_name(p) for p in provides])) From 0bc448fb1ffd10916d1a1cbcc69dfe02ec5ab646 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 13:20:24 +0000 Subject: [PATCH 0719/1125] pkg: Make 'dist' a parameter of Spec constructor Signed-off-by: Euan Harris --- pkg.py | 10 +++++----- tests/test_pkg.py | 2 +- tests/test_specdep.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg.py b/pkg.py index 21cab317..596827be 100755 --- a/pkg.py +++ b/pkg.py @@ -51,7 +51,7 @@ def map_arch_deb(arch): class Spec(object): """Represents an RPM spec file""" - def __init__(self, path, target="rpm", map_name=None): + def __init__(self, path, target="rpm", map_name=None, dist=""): if target == "rpm": self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') @@ -62,15 +62,15 @@ def __init__(self, path, target="rpm", map_name=None): # the binary package). We must override it on the host, # otherwise the names of packages in the dependencies won't # match the files actually produced by mock. - self.chroot_dist = ".el6" - rpm.addMacro('dist', self.chroot_dist) + self.dist = dist else: self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" self.map_arch = map_arch_deb - self.chroot_dist = "" - rpm.addMacro('dist', self.chroot_dist) + self.dist = "" + + rpm.addMacro('dist', self.dist) if map_name: self.map_package_name = map_name diff --git a/tests/test_pkg.py b/tests/test_pkg.py index e5c536ad..03f1f126 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -8,7 +8,7 @@ class RpmTests(unittest.TestCase): def setUp(self): - self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", dist=".el6") def test_name(self): assert self.spec.name() == "ocaml-cohttp" diff --git a/tests/test_specdep.py b/tests/test_specdep.py index 9e36ac8e..0447fcee 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -13,7 +13,7 @@ class BasicTests(unittest.TestCase): def setUp(self): - self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec") + self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", dist=".el6") def test_build_srpm_from_spec(self): specdep.build_srpm_from_spec(self.spec) @@ -42,7 +42,7 @@ def test_build_rpm_from_srpm(self): def test_buildrequires_for_rpm(self): spec_paths = glob.glob(os.path.join("./SPECS", "*.spec")) - specs = [pkg.Spec(spec_path) for spec_path in spec_paths] + specs = [pkg.Spec(spec_path, dist='.el6') for spec_path in spec_paths] specdep.buildrequires_for_rpm(self.spec, specdep.package_to_rpm_map(specs)) assert sys.stdout.getvalue() == \ From 3cd9f07a1e683f598255a332408eb12da7e7bae6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 14:16:36 +0000 Subject: [PATCH 0720/1125] specdep: argparse is not available on CentOS 6.4 Switch to more primitive getopt instead Signed-off-by: Euan Harris --- specdep.py | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/specdep.py b/specdep.py index 19dfa177..8795fe8b 100755 --- a/specdep.py +++ b/specdep.py @@ -3,11 +3,11 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html import sys -import argparse import os import platform import urlparse import pkg +import getopt from scripts.lib import mappkgname @@ -96,22 +96,44 @@ def buildrequires_for_rpm(spec, provides_to_rpm): print "%s: %s" % (rpmpath, buildreqrpm) +def usage(name): + """ + Print usage information + """ + print "usage: %s [-h] [-i PKG] SPEC [SPEC ...]" % name + + def parse_cmdline(): """ Parse command line options """ - parser = argparse.ArgumentParser(description= - "Generate Makefile dependencies from RPM Spec files") - parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file") - parser.add_argument("-i", "--ignore", metavar="PKG", action="append", - default=[], help="package name to ignore") - return parser.parse_args() + + try: + opts, args = getopt.getopt(sys.argv[1:], "hi:", ["help", "ignore="]) + except getopt.GetoptError as err: + usage(sys.argv[0]) + print str(err) + sys.exit(1) + + ignore = [] + for opt, val in opts: + if opt == "-i" or opt == "--ignore": + ignore.append(val) + else: + usage(sys.argv[0]) + print "unknown option: %s" % opt + sys.exit(1) + + if len(args) == 0: + usage(sys.argv[0]) + print "%s: error: too few arguments" % sys.argv[0] + sys.exit(1) + + return (ignore, args) def main(): - args = parse_cmdline() - spec_paths = args.specs - ignore_list = args.ignore + ignore_list, spec_paths = parse_cmdline() specs = {} for spec_path in spec_paths: From 4b2261ba31fcc26c2c1abb605f980b2ea847aad2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 17:45:39 +0000 Subject: [PATCH 0721/1125] planex: Add command line switch for 'dist' Signed-off-by: Euan Harris --- Makefile | 2 +- specdep.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 94076490..254a60a3 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,6 @@ all: rpms deps: SPECS/*.spec specdep.py @echo Updating dependencies... - @./specdep.py -i libnl3 SPECS/*.spec > $@ + @./specdep.py -d .el6 -i libnl3 SPECS/*.spec > $@ -include deps diff --git a/specdep.py b/specdep.py index 8795fe8b..751abbb4 100755 --- a/specdep.py +++ b/specdep.py @@ -109,16 +109,20 @@ def parse_cmdline(): """ try: - opts, args = getopt.getopt(sys.argv[1:], "hi:", ["help", "ignore="]) + opts, args = getopt.getopt(sys.argv[1:], "hi:d:", + ["help", "ignore=", "dist="]) except getopt.GetoptError as err: usage(sys.argv[0]) print str(err) sys.exit(1) ignore = [] + dist = "" for opt, val in opts: if opt == "-i" or opt == "--ignore": ignore.append(val) + elif opt == "-d" or opt == "--dist": + dist = val else: usage(sys.argv[0]) print "unknown option: %s" % opt @@ -129,21 +133,21 @@ def parse_cmdline(): print "%s: error: too few arguments" % sys.argv[0] sys.exit(1) - return (ignore, args) + return {"ignore": ignore, "specs": args, "dist": dist} def main(): - ignore_list, spec_paths = parse_cmdline() + params = parse_cmdline() specs = {} - for spec_path in spec_paths: + for spec_path in params['specs']: if build_type() == "deb": spec = pkg.Spec(spec_path, target="deb", map_name=map_package_name_deb) else: - spec = pkg.Spec(spec_path, target="rpm") + spec = pkg.Spec(spec_path, target="rpm", dist=params['dist']) pkg_name = spec.name() - if pkg_name in ignore_list: + if pkg_name in params['ignore']: continue if os.path.splitext(os.path.basename(spec_path))[0] != pkg_name: sys.stderr.write( From e0414dead1c1da24641077aa6d31e43672494546 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 17:57:46 +0000 Subject: [PATCH 0722/1125] Makefile: Use $(DIST) variable Signed-off-by: Euan Harris --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 254a60a3..171dbbab 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,6 @@ all: rpms deps: SPECS/*.spec specdep.py @echo Updating dependencies... - @./specdep.py -d .el6 -i libnl3 SPECS/*.spec > $@ + @./specdep.py -d $(DIST) -i libnl3 SPECS/*.spec > $@ -include deps From 25e1795312dfe0c388270b2b3baab0edd17a10f3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Feb 2014 18:02:36 +0000 Subject: [PATCH 0723/1125] pkg: Fix pylint warning Signed-off-by: Euan Harris --- pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg.py b/pkg.py index 596827be..8094f139 100755 --- a/pkg.py +++ b/pkg.py @@ -97,7 +97,7 @@ def provides(self): for pkg in self.spec.packages]) # RPM 4.6 adds architecture constraints to dependencies. Drop them. - provides = [re.sub('\(x86-64\)$', '', pkg) for pkg in provides] + provides = [re.sub(r'\(x86-64\)$', '', pkg) for pkg in provides] return set(flatten([self.map_package_name(p) for p in provides])) From ae8b14c63f4d82355d6018f92a4852348d73a666 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 17 Feb 2014 10:10:34 +0000 Subject: [PATCH 0724/1125] xcp-python-libs: Switch to upstream source Signed-off-by: Euan Harris --- SPECS/xcp-python-libs.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index f90a03aa..3db555a3 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -1,9 +1,9 @@ Summary: Common XenServer Python classes Name: xcp-python-libs -Version: 0.9.0 +Version: 1.9.0 Release: 1%{?dist} URL: https://github.com/xenserver/python-libs -Source: https://github.com/euanh/python-libs/archive/%{version}/%{name}-%{version}.tar.gz +Source: https://github.com/xenserver/python-libs/archive/v%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System BuildArch: noarch @@ -31,6 +31,9 @@ rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info %changelog +* Mon Feb 17 2014 Euan Harris - 1.9.0-1 +- Switch to upstream sources + * Thu Jan 23 2014 Euan Harris - 0.9.0-1 - Initial package From 0213cc03fb1a6c8127566ce7e545d0fb778260d7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 17 Feb 2014 10:26:29 +0000 Subject: [PATCH 0725/1125] linux-guest-loader: Switch to upstream source Signed-off-by: Euan Harris --- SPECS/linux-guest-loader.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 420072b8..9f770779 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -1,9 +1,9 @@ Summary: Bootloader for EL-based distributions that support Xen Name: linux-guest-loader -Version: 0.9.1 +Version: 1.9.0 Release: 1%{?dist} URL: https://github.com/xenserver/linux-guest-loader -Source0: https://github.com/mcclurmc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xenserver/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz License: GPL Group: Applications/System BuildArch: noarch @@ -33,8 +33,11 @@ rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info %{_sbindir}/eliloader.py %changelog +* Mon Feb 17 2014 Euan Harris - 1.9.0-1 +- Switch to upstream repository + * Wed Jan 22 2014 Mike McClurg - 0.9.1-1 -- Convert package from eliloader to upstream linux-guest-loader. +- Convert package from eliloader to upstream linux-guest-loader * Mon Jun 24 2013 David Scott - 0.3-1 - Update to eliloader 0.3 From 94af519f5ab1e100d54e649e9e543cbf2613bb32 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 18 Feb 2014 16:25:21 +0000 Subject: [PATCH 0726/1125] Makefile: Combine the build rules for x86_64 and noarch RPMs Signed-off-by: Euan Harris --- Makefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 171dbbab..5ddf713e 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,9 @@ all: rpms @echo [RPMBUILD] $@ @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< -%.x86_64.rpm: +%.rpm: @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="RPMS/x86_64" $< - @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS - -%.noarch.rpm: - @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir="RPMS/noarch" $< + @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --rebuild $< @echo [CREATEREPO] $@ @createrepo --quiet --update ./RPMS From 5ccf29a0bbf54709d0556f68e0d42f69e0549f7d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 25 Feb 2014 11:56:06 +0000 Subject: [PATCH 0727/1125] gitignore: Add *.tar.bz2 and .coverage Signed-off-by: Euan Harris --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1900f6a7..9f34cf67 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,9 @@ *.pyc SOURCES/*.tar.gz SOURCES/*.tbz +SOURCES/*.tar.bz2 RPMS/ SRPMS/ deps mock/ +.coverage From bbdafd0ab2f2dad6e22f72d55e69f3a216ab07db Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 28 Feb 2014 14:35:57 +0000 Subject: [PATCH 0728/1125] Pkg: Check that specfile name matches package when loading spec We only check the first part of the filename, so filenames such as 'foo.spec.in', which must be preprocessed before use, will be accepted. Signed-off-by: Euan Harris --- pkg.py | 11 +++++++ specdep.py | 27 ++++++++-------- tests/SPECS/bad-name.spec | 55 ++++++++++++++++++++++++++++++++ tests/SPECS/bad-name.spec.in | 55 ++++++++++++++++++++++++++++++++ tests/SPECS/ocaml-cohttp.spec.in | 55 ++++++++++++++++++++++++++++++++ tests/test_pkg.py | 9 ++++++ 6 files changed, 199 insertions(+), 13 deletions(-) create mode 100644 tests/SPECS/bad-name.spec create mode 100644 tests/SPECS/bad-name.spec.in create mode 100644 tests/SPECS/ocaml-cohttp.spec.in diff --git a/pkg.py b/pkg.py index 8094f139..7a206ab0 100755 --- a/pkg.py +++ b/pkg.py @@ -48,6 +48,12 @@ def map_arch_deb(arch): return arch +class SpecNameMismatch(Exception): + """Exception raised when a spec file's name does not match the name + of the package defined within it""" + pass + + class Spec(object): """Represents an RPM spec file""" @@ -85,6 +91,11 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): self.spec = rpm.ts().parseSpec(path) + if os.path.basename(path).split(".")[0] != self.name(): + raise SpecNameMismatch( + "spec file name '%s' does not match package name '%s'" % + (path, self.name())) + def specpath(self): """Return the path to the spec file""" diff --git a/specdep.py b/specdep.py index 751abbb4..53fb9964 100755 --- a/specdep.py +++ b/specdep.py @@ -141,21 +141,22 @@ def main(): specs = {} for spec_path in params['specs']: - if build_type() == "deb": - spec = pkg.Spec(spec_path, target="deb", - map_name=map_package_name_deb) - else: - spec = pkg.Spec(spec_path, target="rpm", dist=params['dist']) - pkg_name = spec.name() - if pkg_name in params['ignore']: - continue - if os.path.splitext(os.path.basename(spec_path))[0] != pkg_name: - sys.stderr.write( - "error: spec file name '%s' does not match package name '%s'\n" % - (spec_path, pkg_name)) + try: + if build_type() == "deb": + spec = pkg.Spec(spec_path, target="deb", + map_name=map_package_name_deb) + else: + spec = pkg.Spec(spec_path, target="rpm", dist=params['dist']) + pkg_name = spec.name() + if pkg_name in params['ignore']: + continue + + specs[os.path.basename(spec_path)] = spec + + except pkg.SpecNameMismatch as e: + sys.stderr.write("error: %s\n" % e.message) sys.exit(1) - specs[os.path.basename(spec_path)] = spec provides_to_rpm = package_to_rpm_map(specs.values()) diff --git a/tests/SPECS/bad-name.spec b/tests/SPECS/bad-name.spec new file mode 100644 index 00000000..04f4f6fe --- /dev/null +++ b/tests/SPECS/bad-name.spec @@ -0,0 +1,55 @@ +%global debug_package %{nil} + +Name: ocaml-cohttp +Version: 0.9.8 +Release: 1 +Summary: An HTTP library for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +# should these be inherited from ssl.spec somehow? +BuildRequires: openssl openssl-devel +Requires: ocaml ocaml-findlib + +%description +An HTTP library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +# This space intentionally left blank + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md CHANGES +%{_libdir}/ocaml/cohttp/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + diff --git a/tests/SPECS/bad-name.spec.in b/tests/SPECS/bad-name.spec.in new file mode 100644 index 00000000..04f4f6fe --- /dev/null +++ b/tests/SPECS/bad-name.spec.in @@ -0,0 +1,55 @@ +%global debug_package %{nil} + +Name: ocaml-cohttp +Version: 0.9.8 +Release: 1 +Summary: An HTTP library for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +# should these be inherited from ssl.spec somehow? +BuildRequires: openssl openssl-devel +Requires: ocaml ocaml-findlib + +%description +An HTTP library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +# This space intentionally left blank + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md CHANGES +%{_libdir}/ocaml/cohttp/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + diff --git a/tests/SPECS/ocaml-cohttp.spec.in b/tests/SPECS/ocaml-cohttp.spec.in new file mode 100644 index 00000000..04f4f6fe --- /dev/null +++ b/tests/SPECS/ocaml-cohttp.spec.in @@ -0,0 +1,55 @@ +%global debug_package %{nil} + +Name: ocaml-cohttp +Version: 0.9.8 +Release: 1 +Summary: An HTTP library for OCaml +License: LGPL +Group: Development/Other +URL: https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8.tar.gz +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +# should these be inherited from ssl.spec somehow? +BuildRequires: openssl openssl-devel +Requires: ocaml ocaml-findlib + +%description +An HTTP library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +# This space intentionally left blank + +%files devel +%defattr(-,root,root) +%doc LICENSE README.md CHANGES +%{_libdir}/ocaml/cohttp/* + +%changelog +* Thu May 30 2013 David Scott +- Initial package + diff --git a/tests/test_pkg.py b/tests/test_pkg.py index 03f1f126..8175fae0 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -10,6 +10,15 @@ class RpmTests(unittest.TestCase): def setUp(self): self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", dist=".el6") + def test_good_filename_preprocessor(self): + pkg.Spec("tests/SPECS/ocaml-cohttp.spec.in") + + def test_bad_filename(self): + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/SPECS/bad-name.spec") + + def test_bad_filename_preprocessor(self): + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/SPECS/bad-name.spec.in") + def test_name(self): assert self.spec.name() == "ocaml-cohttp" From 60ffb1a694317ae367e0f1fd90503deedfd74883 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 28 Feb 2014 17:30:51 +0000 Subject: [PATCH 0729/1125] Tests: Copy test spec file to the tests directory Signed-off-by: Euan Harris --- tests/SPECS/ocaml-cohttp.spec | 50 +++++++++++++++++++++++++++++++++++ tests/test_pkg.py | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tests/SPECS/ocaml-cohttp.spec diff --git a/tests/SPECS/ocaml-cohttp.spec b/tests/SPECS/ocaml-cohttp.spec new file mode 100644 index 00000000..bc174ea5 --- /dev/null +++ b/tests/SPECS/ocaml-cohttp.spec @@ -0,0 +1,50 @@ +%global debug_package %{nil} + +Name: ocaml-cohttp +Version: 0.9.8 +Release: 1%{?dist} +Summary: An HTTP library for OCaml +License: LGPL +Group: Development/Libraries +URL: https://github.com/mirage/ocaml-cohttp +Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +# should these be inherited from ssl.spec somehow? +BuildRequires: openssl openssl-devel +Requires: ocaml ocaml-findlib + +%description +An HTTP library for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +#Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%build +make build + +%install +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + + +%files +# This space intentionally left blank + +%files devel +%doc LICENSE README.md CHANGES +%{_libdir}/ocaml/cohttp/* + +%changelog +* Thu May 30 2013 David Scott - 0.9.8-1 +- Initial package + diff --git a/tests/test_pkg.py b/tests/test_pkg.py index 8175fae0..a82e23c8 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -8,7 +8,7 @@ class RpmTests(unittest.TestCase): def setUp(self): - self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", dist=".el6") + self.spec = pkg.Spec("tests/SPECS/ocaml-cohttp.spec", dist=".el6") def test_good_filename_preprocessor(self): pkg.Spec("tests/SPECS/ocaml-cohttp.spec.in") From baf210f3a951bf8f1b6d3e0a3170e908b827b2b0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 13:43:12 +0000 Subject: [PATCH 0730/1125] specdep: Fix Pylint warnings Signed-off-by: Euan Harris --- specdep.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specdep.py b/specdep.py index 53fb9964..33744d0b 100755 --- a/specdep.py +++ b/specdep.py @@ -109,7 +109,7 @@ def parse_cmdline(): """ try: - opts, args = getopt.getopt(sys.argv[1:], "hi:d:", + opts, args = getopt.getopt(sys.argv[1:], "hi:d:", ["help", "ignore=", "dist="]) except getopt.GetoptError as err: usage(sys.argv[0]) @@ -153,8 +153,8 @@ def main(): specs[os.path.basename(spec_path)] = spec - except pkg.SpecNameMismatch as e: - sys.stderr.write("error: %s\n" % e.message) + except pkg.SpecNameMismatch as exn: + sys.stderr.write("error: %s\n" % exn.message) sys.exit(1) From 26c4745382bffaa8952276ec39e6a78849295619 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 14:09:12 +0000 Subject: [PATCH 0731/1125] test_specdep: Fix Pylint line length warnings Signed-off-by: Euan Harris --- tests/test_specdep.py | 64 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/tests/test_specdep.py b/tests/test_specdep.py index 0447fcee..3053c9aa 100644 --- a/tests/test_specdep.py +++ b/tests/test_specdep.py @@ -2,7 +2,6 @@ # install the 'python-nose' package (Fedora/CentOS or Ubuntu) # run 'nosetests' in the root of the repository -from cStringIO import StringIO import glob import os import sys @@ -18,43 +17,56 @@ def setUp(self): def test_build_srpm_from_spec(self): specdep.build_srpm_from_spec(self.spec) - assert sys.stdout.getvalue() == \ -"""./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm: ./SPECS/ocaml-cohttp.spec ./SOURCES/ocaml-cohttp-0.9.8.tar.gz -""" + self.assertEqual(sys.stdout.getvalue(), + "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm: " + "./SPECS/ocaml-cohttp.spec " + "./SOURCES/ocaml-cohttp-0.9.8.tar.gz\n") def test_download_rpm_sources(self): specdep.download_rpm_sources(self.spec) - assert sys.stdout.getvalue() == \ -"""./SOURCES/ocaml-cohttp-0.9.8.tar.gz: ./SPECS/ocaml-cohttp.spec - @echo [CURL] $@ - @curl --silent --show-error -L -o $@ https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz -""" + self.assertEqual(sys.stdout.getvalue(), + "./SOURCES/ocaml-cohttp-0.9.8.tar.gz: ./SPECS/ocaml-cohttp.spec\n" + " @echo [CURL] $@\n" + " @curl --silent --show-error -L -o $@ https://github.com/" + "mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/" + "ocaml-cohttp-0.9.8.tar.gz\n") def test_build_rpm_from_srpm(self): specdep.build_rpm_from_srpm(self.spec) - assert sys.stdout.getvalue() == \ -"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm -""" + self.assertEqual(sys.stdout.getvalue(), + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm\n") def test_buildrequires_for_rpm(self): spec_paths = glob.glob(os.path.join("./SPECS", "*.spec")) specs = [pkg.Spec(spec_path, dist='.el6') for spec_path in spec_paths] - specdep.buildrequires_for_rpm(self.spec, specdep.package_to_rpm_map(specs)) - assert sys.stdout.getvalue() == \ -"""./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm -./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: ./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm -""" + specdep.buildrequires_for_rpm(self.spec, + specdep.package_to_rpm_map(specs)) + self.assertEqual(sys.stdout.getvalue(), + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-uri-devel-1.3.8-1.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-cstruct-devel-0.7.1-2.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-ounit-devel-1.1.2-3.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-re-devel-1.2.1-1.el6.x86_64.rpm\n" + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm: " + "./RPMS/x86_64/ocaml-lwt-devel-2.4.3-1.el6.x86_64.rpm\n") From b1c8ab56dfbf7c208a6efb8642dafa80551b618a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 15:11:20 +0000 Subject: [PATCH 0732/1125] test_pkg: Rename tests/SPECS to tests/data Signed-off-by: Euan Harris --- tests/{SPECS => data}/bad-name.spec | 0 tests/{SPECS => data}/bad-name.spec.in | 0 tests/{SPECS => data}/ocaml-cohttp.spec | 0 tests/{SPECS => data}/ocaml-cohttp.spec.in | 0 tests/test_pkg.py | 10 +++++----- 5 files changed, 5 insertions(+), 5 deletions(-) rename tests/{SPECS => data}/bad-name.spec (100%) rename tests/{SPECS => data}/bad-name.spec.in (100%) rename tests/{SPECS => data}/ocaml-cohttp.spec (100%) rename tests/{SPECS => data}/ocaml-cohttp.spec.in (100%) diff --git a/tests/SPECS/bad-name.spec b/tests/data/bad-name.spec similarity index 100% rename from tests/SPECS/bad-name.spec rename to tests/data/bad-name.spec diff --git a/tests/SPECS/bad-name.spec.in b/tests/data/bad-name.spec.in similarity index 100% rename from tests/SPECS/bad-name.spec.in rename to tests/data/bad-name.spec.in diff --git a/tests/SPECS/ocaml-cohttp.spec b/tests/data/ocaml-cohttp.spec similarity index 100% rename from tests/SPECS/ocaml-cohttp.spec rename to tests/data/ocaml-cohttp.spec diff --git a/tests/SPECS/ocaml-cohttp.spec.in b/tests/data/ocaml-cohttp.spec.in similarity index 100% rename from tests/SPECS/ocaml-cohttp.spec.in rename to tests/data/ocaml-cohttp.spec.in diff --git a/tests/test_pkg.py b/tests/test_pkg.py index a82e23c8..207e3d18 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -8,16 +8,16 @@ class RpmTests(unittest.TestCase): def setUp(self): - self.spec = pkg.Spec("tests/SPECS/ocaml-cohttp.spec", dist=".el6") + self.spec = pkg.Spec("tests/data/ocaml-cohttp.spec", dist=".el6") def test_good_filename_preprocessor(self): - pkg.Spec("tests/SPECS/ocaml-cohttp.spec.in") + pkg.Spec("tests/data/ocaml-cohttp.spec.in") def test_bad_filename(self): - self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/SPECS/bad-name.spec") + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/data/bad-name.spec") def test_bad_filename_preprocessor(self): - self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/SPECS/bad-name.spec.in") + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/data/bad-name.spec.in") def test_name(self): assert self.spec.name() == "ocaml-cohttp" @@ -76,7 +76,7 @@ def map_rpm_to_deb(name): "openssl-devel": ["libssl-dev"]} return mapping[name] - self.spec = pkg.Spec("SPECS/ocaml-cohttp.spec", target="deb", + self.spec = pkg.Spec("./tests/data/ocaml-cohttp.spec", target="deb", map_name=map_rpm_to_deb) def test_name(self): From bd7ef6135fdfbcac44d55973b28ecf9f0a395c2a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 15:45:49 +0000 Subject: [PATCH 0733/1125] test_pkg: Use unittest's assertEqual() instead of plain assert Signed-off-by: Euan Harris --- tests/test_pkg.py | 70 +++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/tests/test_pkg.py b/tests/test_pkg.py index 207e3d18..a0115364 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -8,54 +8,59 @@ class RpmTests(unittest.TestCase): def setUp(self): + # 'setUp' breaks Pylint's naming rules + # pylint: disable=C0103 self.spec = pkg.Spec("tests/data/ocaml-cohttp.spec", dist=".el6") def test_good_filename_preprocessor(self): pkg.Spec("tests/data/ocaml-cohttp.spec.in") def test_bad_filename(self): - self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/data/bad-name.spec") + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, + "tests/data/bad-name.spec") def test_bad_filename_preprocessor(self): - self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, "tests/data/bad-name.spec.in") + self.assertRaises(pkg.SpecNameMismatch, pkg.Spec, + "tests/data/bad-name.spec.in") def test_name(self): - assert self.spec.name() == "ocaml-cohttp" + self.assertEqual(self.spec.name(), "ocaml-cohttp") def test_specpath(self): - assert self.spec.specpath() == "./SPECS/ocaml-cohttp.spec" + self.assertEqual(self.spec.specpath(), "./SPECS/ocaml-cohttp.spec") def test_version(self): - assert self.spec.version() == "0.9.8" + self.assertEqual(self.spec.version(), "0.9.8") def test_provides(self): - assert self.spec.provides() == \ - set(["ocaml-cohttp", "ocaml-cohttp-devel"]) + self.assertEqual(self.spec.provides(), + set(["ocaml-cohttp", "ocaml-cohttp-devel"])) def test_source_urls(self): - assert sorted(self.spec.source_urls()) == \ - sorted(["https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) + self.assertEqual(self.spec.source_urls(), + ["https://github.com/mirage/ocaml-cohttp/archive/" + "ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) def test_source_paths(self): - assert sorted(self.spec.source_paths()) == \ - sorted(["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + self.assertEqual(self.spec.source_paths(), + ["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) def test_buildrequires(self): - assert self.spec.buildrequires() == \ + self.assertEqual(self.spec.buildrequires(), set(["ocaml", "ocaml-findlib", "ocaml-re-devel", "ocaml-uri-devel", "ocaml-cstruct-devel", "ocaml-lwt-devel", "ocaml-ounit-devel", "ocaml-ocamldoc", "ocaml-camlp4-devel", - "openssl", "openssl-devel"]) + "openssl", "openssl-devel"])) def test_source_package_path(self): - assert self.spec.source_package_path() == \ - "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm" + self.assertEqual(self.spec.source_package_path(), + "./SRPMS/ocaml-cohttp-0.9.8-1.el6.src.rpm") def test_binary_package_paths(self): - assert sorted(self.spec.binary_package_paths()) == \ + self.assertEqual(sorted(self.spec.binary_package_paths()), sorted(["./RPMS/x86_64/ocaml-cohttp-0.9.8-1.el6.x86_64.rpm", - "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"]) + "./RPMS/x86_64/ocaml-cohttp-devel-0.9.8-1.el6.x86_64.rpm"])) class DebTests(unittest.TestCase): @@ -80,41 +85,42 @@ def map_rpm_to_deb(name): map_name=map_rpm_to_deb) def test_name(self): - assert self.spec.name() == "ocaml-cohttp" + self.assertEqual(self.spec.name(), "ocaml-cohttp") def test_specpath(self): - assert self.spec.specpath() == "./SPECS/ocaml-cohttp.spec" + self.assertEqual(self.spec.specpath(), "./SPECS/ocaml-cohttp.spec") def test_version(self): - assert self.spec.version() == "0.9.8" + self.assertEqual(self.spec.version(), "0.9.8") def test_provides(self): - assert self.spec.provides() == \ - set(["libcohttp-ocaml", "libcohttp-ocaml-dev"]) + self.assertEqual(self.spec.provides(), + set(["libcohttp-ocaml", "libcohttp-ocaml-dev"])) def test_source_urls(self): - assert sorted(self.spec.source_urls()) == \ - sorted(["https://github.com/mirage/ocaml-cohttp/archive/ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) + self.assertEqual(self.spec.source_urls(), + ["https://github.com/mirage/ocaml-cohttp/archive/" + "ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) def test_source_paths(self): - assert sorted(self.spec.source_paths()) == \ - sorted(["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + self.assertEqual(self.spec.source_paths(), + ["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) def test_buildrequires(self): - assert self.spec.buildrequires() == \ + self.assertEqual(self.spec.buildrequires(), set(["ocaml-nox", "ocaml-native-compilers", "ocaml-findlib", "libre-ocaml-dev", "liburi-ocaml-dev", "libcstruct-ocaml-dev", "liblwt-ocaml-dev", "libounit-ocaml-dev", "camlp4", "camlp4-extra", "libssl1.0.0", - "libssl-dev"]) + "libssl-dev"])) def test_source_package_path(self): - assert self.spec.source_package_path() == \ - "./SRPMS/libcohttp-ocaml_0.9.8-1.dsc" + self.assertEqual(self.spec.source_package_path(), + "./SRPMS/libcohttp-ocaml_0.9.8-1.dsc") def test_binary_package_paths(self): - assert sorted(self.spec.binary_package_paths()) == \ + self.assertEqual(sorted(self.spec.binary_package_paths()), sorted(["./RPMS/libcohttp-ocaml_0.9.8-1_amd64.deb", - "./RPMS/libcohttp-ocaml-dev_0.9.8-1_amd64.deb"]) + "./RPMS/libcohttp-ocaml-dev_0.9.8-1_amd64.deb"])) From f2f53e11066c38bbe0e6f804374c39ffdea24e87 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 15:55:09 +0000 Subject: [PATCH 0734/1125] test_pkg: Disable name warning for Debian suite's setUp method Signed-off-by: Euan Harris --- tests/test_pkg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_pkg.py b/tests/test_pkg.py index a0115364..d61cfabd 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -65,6 +65,8 @@ def test_binary_package_paths(self): class DebTests(unittest.TestCase): def setUp(self): + # 'setUp' breaks Pylint's naming rules + # pylint: disable=C0103 def map_rpm_to_deb(name): mapping = {"ocaml-cohttp": ["libcohttp-ocaml"], "ocaml-cohttp-devel": ["libcohttp-ocaml-dev"], From 5fc430c80153f4b662725354beab84b7d471f790 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 3 Mar 2014 16:50:08 +0000 Subject: [PATCH 0735/1125] test_pkg: Test all forms of source URL Signed-off-by: Euan Harris --- tests/data/ocaml-cohttp.spec | 2 ++ tests/test_pkg.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/data/ocaml-cohttp.spec b/tests/data/ocaml-cohttp.spec index bc174ea5..06ecdb70 100644 --- a/tests/data/ocaml-cohttp.spec +++ b/tests/data/ocaml-cohttp.spec @@ -8,6 +8,8 @@ License: LGPL Group: Development/Libraries URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: file:///code/ocaml-cohttp-extra#ocaml-cohttp-extra-%{version}.tar.gz +Source2: ocaml-cohttp-init BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel # should these be inherited from ssl.spec somehow? BuildRequires: openssl openssl-devel diff --git a/tests/test_pkg.py b/tests/test_pkg.py index d61cfabd..8db71b57 100644 --- a/tests/test_pkg.py +++ b/tests/test_pkg.py @@ -38,12 +38,16 @@ def test_provides(self): def test_source_urls(self): self.assertEqual(self.spec.source_urls(), - ["https://github.com/mirage/ocaml-cohttp/archive/" + ["ocaml-cohttp-init", + "file:///code/ocaml-cohttp-extra#ocaml-cohttp-extra-0.9.8.tar.gz", + "https://github.com/mirage/ocaml-cohttp/archive/" "ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) def test_source_paths(self): self.assertEqual(self.spec.source_paths(), - ["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + ["./SOURCES/ocaml-cohttp-init", + "./SOURCES/ocaml-cohttp-extra-0.9.8.tar.gz", + "./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) def test_buildrequires(self): self.assertEqual(self.spec.buildrequires(), @@ -101,12 +105,16 @@ def test_provides(self): def test_source_urls(self): self.assertEqual(self.spec.source_urls(), - ["https://github.com/mirage/ocaml-cohttp/archive/" + ["ocaml-cohttp-init", + "file:///code/ocaml-cohttp-extra#ocaml-cohttp-extra-0.9.8.tar.gz", + "https://github.com/mirage/ocaml-cohttp/archive/" "ocaml-cohttp-0.9.8/ocaml-cohttp-0.9.8.tar.gz"]) def test_source_paths(self): self.assertEqual(self.spec.source_paths(), - ["./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) + ["./SOURCES/ocaml-cohttp-init", + "./SOURCES/ocaml-cohttp-extra-0.9.8.tar.gz", + "./SOURCES/ocaml-cohttp-0.9.8.tar.gz"]) def test_buildrequires(self): self.assertEqual(self.spec.buildrequires(), From 77b599f9446eebea7fc266da8d8cb820f2efe2be Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 25 Mar 2014 16:31:59 +0000 Subject: [PATCH 0736/1125] oasis: Add oasis, and its dependencies Signed-off-by: Euan Harris --- SPECS/oasis.spec | 97 +++++++++++++++++++ SPECS/ocaml-fileutils.spec | 187 +++++++++++++++++++++++++++++++++++++ SPECS/ocaml-odn.spec | 64 +++++++++++++ SPECS/ocaml-ounit.spec | 9 +- SPECS/ocamlify.spec | 39 ++++++++ SPECS/ocamlmod.spec | 40 ++++++++ 6 files changed, 433 insertions(+), 3 deletions(-) create mode 100644 SPECS/oasis.spec create mode 100644 SPECS/ocaml-fileutils.spec create mode 100644 SPECS/ocaml-odn.spec create mode 100644 SPECS/ocamlify.spec create mode 100644 SPECS/ocamlmod.spec diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec new file mode 100644 index 00000000..b9b32836 --- /dev/null +++ b/SPECS/oasis.spec @@ -0,0 +1,97 @@ +Name: oasis +Version: 0.4.4 +Release: 1%{?dist} +Summary: Architecture for building OCaml libraries and applications + +Group: Development/Tools +License: LGPL +URL: http://oasis.forge.ocamlcore.org/index.html +Source0: https://github.com/ocaml/oasis/archive/%{version}/%{name}-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocamlify +BuildRequires: ocamlmod +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-odn-devel +Requires: ocaml + +%description +OASIS generates a full configure, build and install system for your +application. It starts with a simple `_oasis` file at the toplevel of +your project and creates everything required. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +# The auto-requirements script mistakenly thinks that the Oasis library +# modules depend on OASISAstTypes. +%{?filter_setup: +%filter_from_requires /OASISAstTypes/d +%filter_setup +} + +%prep +%setup -q + + +%build +ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} +ocaml setup.ml -build + + +%install +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + + + +%files +%{_bindir}/oasis + +%{_libdir}/ocaml/plugin-loader/META +%{_libdir}/ocaml/plugin-loader/*.cma +%{_libdir}/ocaml/plugin-loader/*.cmi + +%{_libdir}/ocaml/oasis/META +%{_libdir}/ocaml/oasis/*.cma +%{_libdir}/ocaml/oasis/*.cmi +%{_libdir}/ocaml/oasis/*.mli + +%{_libdir}/ocaml/userconf/META +%{_libdir}/ocaml/userconf/*.cma +%{_libdir}/ocaml/userconf/*.cmi + + + +%files devel +%{_libdir}/ocaml/plugin-loader/*.a +%{_libdir}/ocaml/plugin-loader/*.cmx +%{_libdir}/ocaml/plugin-loader/*.cmxa +%exclude %{_libdir}/ocaml/plugin-loader/*.cmxs +%exclude %{_libdir}/ocaml/plugin-loader/*.ml + +%{_libdir}/ocaml/oasis/*.a +%{_libdir}/ocaml/oasis/*.cmx +%{_libdir}/ocaml/oasis/*.cmxa +%exclude %{_libdir}/ocaml/oasis/*.cmxs +%exclude %{_libdir}/ocaml/oasis/*.ml + +%{_libdir}/ocaml/userconf/*.a +%{_libdir}/ocaml/userconf/*.cmx +%{_libdir}/ocaml/userconf/*.cmxa +%exclude %{_libdir}/ocaml/userconf/*.cmxs +%exclude %{_libdir}/ocaml/userconf/*.ml + + +%changelog +* Wed Mar 26 2014 Euan Harris - 0.4.4-1 +- Initial package + diff --git a/SPECS/ocaml-fileutils.spec b/SPECS/ocaml-fileutils.spec new file mode 100644 index 00000000..d784d8ab --- /dev/null +++ b/SPECS/ocaml-fileutils.spec @@ -0,0 +1,187 @@ +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} + +Name: ocaml-fileutils +Version: 0.4.4 +Release: 6%{?dist} +Summary: OCaml library for common file and filename operations + +License: LGPLv2 with exceptions +URL: https://forge.ocamlcore.org/projects/ocaml-fileutils/ +Source0: https://forge.ocamlcore.org/frs/download.php/892/ocaml-fileutils-0.4.4.tar.gz +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel >= 1.3.3-3 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +%if 0%{?fedora} || 0%{?rhel} <= 6 +BuildRequires: ocaml-ounit-devel +%endif + + +%description +This library is intended to provide a basic interface to the most +common file and filename operations. It provides several different +filename functions: reduce, make_absolute, make_relative... It also +enables you to manipulate real files: cp, mv, rm, touch... + +It is separated into two modules: SysUtil and SysPath. The first one +manipulates real files, the second one is made for manipulating +abstract filenames. + + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q + +# Disable the tests (RHEL 7 only) since they require ocaml-ounit. +%if 0%{?rhel} >= 7 +rm test/test.ml +touch test/test.ml +mv setup.ml setup.ml.old +sed '/oUnit/d' < setup.ml.old > setup.ml +%endif + +ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT + + +%build +make + + +%install +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs + +# Set htmldir to current directory, then copy the docs (in api/) +# as a %doc rule. +make htmldir=. install + + +%check +make test + + +%files +%doc COPYING.txt +%{_libdir}/ocaml/fileutils +%if %opt +%exclude %{_libdir}/ocaml/fileutils/*.a +%exclude %{_libdir}/ocaml/fileutils/*.cmx +%exclude %{_libdir}/ocaml/fileutils/*.cmxa +%endif +%exclude %{_libdir}/ocaml/fileutils/*.ml +%exclude %{_libdir}/ocaml/fileutils/*.mli + + +%files devel +%doc COPYING.txt AUTHORS.txt CHANGELOG.txt README.txt TODO.txt +%if %opt +%{_libdir}/ocaml/fileutils/*.a +%{_libdir}/ocaml/fileutils/*.cmx +%{_libdir}/ocaml/fileutils/*.cmxa +%endif +%{_libdir}/ocaml/fileutils/*.ml +%{_libdir}/ocaml/fileutils/*.mli + + +%changelog +* Sat Aug 03 2013 Fedora Release Engineering - 0.4.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.4.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 27 2012 Richard W.M. Jones - 0.4.4-4 +- BR >= OCaml 4.00.1 so we can't be built against the wrong OCaml. + +* Tue Nov 27 2012 Richard W.M. Jones - 0.4.4-3 +- Disable the tests on RHEL 7, since they require ocaml-ounit. + +* Fri Oct 19 2012 Richard W.M. Jones - 0.4.4-2 +- New upstream version 0.4.4. +- Clean up the spec file. +- Fix homepage and download URLs. +- Don't use configure macro. Upstream are using some sort of non-autoconf + brokenness. +- Rename text files as *.txt. There is no 'api' directory any more. + +* Sat Jul 28 2012 Richard W.M. Jones - 0.4.0-10 +- Bump and rebuild against new OCaml 4.00.0 official release. + +* Fri Jul 20 2012 Fedora Release Engineering - 0.4.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jun 09 2012 Richard W.M. Jones - 0.4.0-8 +- Rebuild for OCaml 4.00.0. + +* Mon May 14 2012 Richard W.M. Jones - 0.4.0-7 +- Bump release and rebuild for new OCaml on ARM. + +* Fri Jan 06 2012 Richard W.M. Jones - 0.4.0-6 +- Rebuild for OCaml 3.12.1. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jan 05 2011 Richard W.M. Jones - 0.4.0-4 +- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). + +* Wed Dec 30 2009 Richard W.M. Jones - 0.4.0-3 +- Rebuild for OCaml 3.11.2. + +* Thu Oct 8 2009 Richard W.M. Jones - 0.4.0-2 +- New upstream version 0.4.0. +- Upstream build system has been rationalized, so remove all the + hacks we were using. +- Upstream now contains tests, run them. +- Needs ounit in order to carry out the tests. + +* Sat Jul 25 2009 Fedora Release Engineering - 0.3.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 23 2009 Richard W.M. Jones - 0.3.0-10 +- Rebuild for OCaml 3.11.1 + +* Thu Apr 16 2009 S390x secondary arch maintainer +- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs + (added sparc64 per request from the sparc maintainer) + +* Wed Feb 25 2009 Fedora Release Engineering - 0.3.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Nov 26 2008 Richard W.M. Jones - 0.3.0-8 +- Rebuild for OCaml 3.11.0+rc1. + +* Wed Nov 19 2008 Richard W.M. Jones - 0.3.0-7 +- Rebuild for OCaml 3.11.0 + +* Wed Apr 23 2008 Richard W.M. Jones - 0.3.0-5 +- Rebuild for OCaml 3.10.2 + +* Sat Mar 1 2008 Richard W.M. Jones - 0.3.0-4 +- Rebuild for ppc64. + +* Thu Feb 21 2008 Richard W.M. Jones - 0.3.0-3 +- Fixed grammar in the description section. +- License is LGPLv2 with exceptions +- Include license file with both RPMs. +- Include other documentation only in the -devel RPM. + +* Tue Feb 12 2008 Richard W.M. Jones - 0.3.0-2 +- Added BR ocaml-camlp4-devel. +- Build into tmp directory under the build root. + +* Wed Aug 8 2007 Richard W.M. Jones - 0.3.0-1 +- Initial RPM release. diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec new file mode 100644 index 00000000..3d76a330 --- /dev/null +++ b/SPECS/ocaml-odn.spec @@ -0,0 +1,64 @@ +Name: ocaml-odn +Version: 0.0.11 +Release: 1%{?dist} +Summary: Dump OCaml data structures using OCaml data notation + +Group: Development/Libraries +License: LGPL +URL: https://forge.ocamlcore.org/projects/odn/ +Source0: https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-%{version}.tar.gz + +BuildRequires: ocaml >= 3.10.2 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv >= 108.07.01 +BuildRequires: ocaml-ounit-devel >= 2.0.0 +BuildRequires: ocaml-fileutils-devel >= 0.4.0 + +Requires: ocaml + +%description + + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n ocaml-data-notation-%{version} + + +%build +ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -build + +%install +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -install + + +%files +%doc COPYING.txt CHANGES.txt +%{_libdir}/ocaml/odn/META +%{_libdir}/ocaml/odn/*.cma +%{_libdir}/ocaml/odn/*.cmi + + +%files devel +%{_libdir}/ocaml/odn/*.a +%{_libdir}/ocaml/odn/*.cmx +%{_libdir}/ocaml/odn/*.cmxa +%exclude %{_libdir}/ocaml/odn/*.cmxs +%exclude %{_libdir}/ocaml/odn/*.ml + +%changelog +* Tue Mar 25 2014 Euan Harris - 0.0.11-1 +- Initial package + diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 37d9505e..80ccc52b 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -2,14 +2,14 @@ %define debug_package %{nil} Name: ocaml-ounit -Version: 1.1.2 -Release: 3%{?dist} +Version: 2.0.0 +Release: 1%{?dist} Summary: Unit test framework for OCaml Group: Development/Libraries License: MIT URL: http://ounit.forge.ocamlcore.org/ -Source0: http://forge.ocamlcore.org/frs/download.php/886/ounit-%{version}.tar.gz +Source0: http://forge.ocamlcore.org/frs/download.php/1258/ounit-%{version}.tar.gz ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %changelog +* Tue Mar 25 2014 Euan Harris - 2.0.0-1 +- Update to version 2.0.0 + * Fri Sep 30 2011 Mike McClurg - 1.1.2-3 - Repackaged for XenSource build system diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec new file mode 100644 index 00000000..26887f85 --- /dev/null +++ b/SPECS/ocamlify.spec @@ -0,0 +1,39 @@ +Name: ocamlify +Version: 0.0.2 +Release: 1%{?dist} +Summary: Create OCaml source code by including whole files into OCaml string or string list + +Group: Development/Tools +License: LGPL +URL: http://forge.ocamlcore.org/projects/ocamlify/ +Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar.gz + +BuildRequires: ocaml >= 3.10.2 +BuildRequires: ocaml-findlib-devel + +Requires: ocaml + +%description + + +%prep +%setup -q + + +%build +ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} +ocaml setup.ml -build + +%install +ocaml setup.ml -install + + +%files +%doc AUTHORS.txt COPYING.txt CHANGES.txt +%{_bindir}/ocamlify + + +%changelog +* Tue Mar 25 2014 Euan Harris - 0.0.2-1 +- Initial package + diff --git a/SPECS/ocamlmod.spec b/SPECS/ocamlmod.spec new file mode 100644 index 00000000..7e7a8c10 --- /dev/null +++ b/SPECS/ocamlmod.spec @@ -0,0 +1,40 @@ +Name: ocamlmod +Version: 0.0.7 +Release: 1%{?dist} +Summary: Generate OCaml modules from source files + +Group: Development/Tools +License: LGPL +URL: http://forge.ocamlcore.org/projects/ocamlmod/ +Source0: http://forge.ocamlcore.org/frs/download.php/1350/%{name}-%{version}.tar.gz + +BuildRequires: ocaml >= 3.10.2 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ounit-devel >= 2.0.0 + +Requires: ocaml + +%description + + +%prep +%setup -q + + +%build +ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} +ocaml setup.ml -build + +%install +ocaml setup.ml -install + + +%files +%doc AUTHORS.txt CHANGES.txt +%{_bindir}/ocamlmod + + +%changelog +* Tue Mar 25 2014 Euan Harris - 0.0.7-1 +- Initial package + From d06d8b22263a4bb465fab05f2869290e77a444b0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 13:35:20 +0000 Subject: [PATCH 0737/1125] mappkgname: Add oasis and its dependencies Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 67892006..2b296803 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -66,7 +66,12 @@ "ocaml-vhd": ["vhd-ocaml"], "ocaml-tar": ["tar-ocaml"], "ocaml-uutf": ["uutf-ocaml"], + "ocaml-odn": ["libodn-ocaml"], + "ocaml-fileutils": ["libfileutils-ocaml"], "omake": ["omake"], + "ocamlmod": ["ocamlmod"], + "ocamlify": ["ocamlify"], + "oasis": ["oasis"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], "xcp-sm": ["xcp-sm"], From d514e39b2debb29c9e64064a67e6b17d382f26f6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 13:35:51 +0000 Subject: [PATCH 0738/1125] ocaml-fileutils: Move configure call into build step Calling configure in the setup step means that makedeb runs it outside the chroot when creating the source deb. This means that paths from outside the chroot are captured in the setup files in the binary, which may cause it not to build inside the chroot. Signed-off-by: Euan Harris --- SPECS/ocaml-fileutils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-fileutils.spec b/SPECS/ocaml-fileutils.spec index d784d8ab..1278637c 100644 --- a/SPECS/ocaml-fileutils.spec +++ b/SPECS/ocaml-fileutils.spec @@ -52,10 +52,10 @@ mv setup.ml setup.ml.old sed '/oUnit/d' < setup.ml.old > setup.ml %endif -ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT %build +ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT make From db027fd9da7b82fbb614ea3af0425e83ec9f74eb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 18:15:34 +0000 Subject: [PATCH 0739/1125] ocaml-qmp: Update to 0.9.2 with 'change' command Signed-off-by: Euan Harris --- Makefile | 2 +- SPECS/oasis.spec | 2 +- SPECS/ocaml-qmp.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5ddf713e..09803e21 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ all: rpms # Dependency build rules -deps: SPECS/*.spec specdep.py +deps: SPECS/*.spec specdep.py scripts/lib/mappkgname.py @echo Updating dependencies... @./specdep.py -d $(DIST) -i libnl3 SPECS/*.spec > $@ diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index b9b32836..005f083a 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -10,7 +10,7 @@ Source0: https://github.com/ocaml/oasis/archive/%{version}/%{name}-%{version}.ta BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib-devel BuildRequires: ocamlify BuildRequires: ocamlmod BuildRequires: ocaml-ocamldoc diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 9dfd18d3..5a4a0d5b 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} Name: ocaml-qmp -Version: 0.9.1 +Version: 0.9.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: file:///local/scratch/euanh/ocaml-qmp#%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib @@ -47,6 +47,10 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %{_libdir}/ocaml/qmp/* %changelog +* Thu Mar 27 2014 Euan Harris - 0.9.2-1 +- Add support for QMP 'change' command, used to change removable media + and reconfigure VNC. + * Fri Aug 09 2013 Euan Harris - 0.9.1-1 - Change representation of message timestamps from a tuple of ints to a float. This avoids problems on 32-bit architectures and follows From e41349e81ca1b33182725544fd378d255f906833 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 18:30:34 +0000 Subject: [PATCH 0740/1125] ocaml-qmp: Fix local source reference Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 5a4a0d5b..2f06a809 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -7,7 +7,7 @@ Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp -Source0: file:///local/scratch/euanh/ocaml-qmp#%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib From 70c42978796bbff4fdef60e87815b7acd7ad344a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 25 Mar 2014 16:31:59 +0000 Subject: [PATCH 0741/1125] oasis: Add oasis, and its dependencies Signed-off-by: Euan Harris --- SPECS/ocaml-fileutils.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SPECS/ocaml-fileutils.spec b/SPECS/ocaml-fileutils.spec index 1278637c..0777cec8 100644 --- a/SPECS/ocaml-fileutils.spec +++ b/SPECS/ocaml-fileutils.spec @@ -52,8 +52,6 @@ mv setup.ml setup.ml.old sed '/oUnit/d' < setup.ml.old > setup.ml %endif - - %build ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT make From 6bb75a7006d66a302409a0a23aa1b2d83f05aad8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 13:35:51 +0000 Subject: [PATCH 0742/1125] ocaml-fileutils: Move configure call into build step Calling configure in the setup step means that makedeb runs it outside the chroot when creating the source deb. This means that paths from outside the chroot are captured in the setup files in the binary, which may cause it not to build inside the chroot. Signed-off-by: Euan Harris --- SPECS/ocaml-fileutils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-fileutils.spec b/SPECS/ocaml-fileutils.spec index 0777cec8..412e76ee 100644 --- a/SPECS/ocaml-fileutils.spec +++ b/SPECS/ocaml-fileutils.spec @@ -52,6 +52,7 @@ mv setup.ml setup.ml.old sed '/oUnit/d' < setup.ml.old > setup.ml %endif + %build ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT make From 99e139737f1affb8c8b4a50e7cc421dd12388462 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 18:15:34 +0000 Subject: [PATCH 0743/1125] ocaml-qmp: Update to 0.9.2 with 'change' command Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 2f06a809..5a4a0d5b 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -7,7 +7,7 @@ Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: file:///local/scratch/euanh/ocaml-qmp#%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib From df95224f065c65cea9c67af8c2a40efc3b6e83b7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 27 Mar 2014 18:30:34 +0000 Subject: [PATCH 0744/1125] ocaml-qmp: Fix local source reference Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 5a4a0d5b..2f06a809 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -7,7 +7,7 @@ Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp -Source0: file:///local/scratch/euanh/ocaml-qmp#%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel Requires: ocaml ocaml-findlib From 170ef14fd22c89487af788b252e67b96d41d2d09 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 2 Apr 2014 09:42:26 +0000 Subject: [PATCH 0745/1125] ocaml-stdext: Update to 0.10.0 This removes the Tar module. Signed-off-by: Euan Harris --- SPECS/ocaml-stdext.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 5f456213..41543030 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} Name: ocaml-stdext -Version: 0.9.1 +Version: 0.10.0 Release: 1%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/stdext -Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel Requires: ocaml ocaml-findlib @@ -47,6 +47,9 @@ make install DESTDIR=${buildroot} %{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner %changelog +* Tue Apr 1 2014 Euan Harris - 0.10.0-1 +- Update to 0.10.0, removing the Tar module (use ocaml-tar instead) + * Tue Sep 10 2013 David Scott - 0.9.1-1 - Update to 0.9.1 From 60235468740b44937af4b4cd4d0fb822d9626595 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 28 Mar 2014 18:13:57 +0000 Subject: [PATCH 0746/1125] ocaml-nbd: Update to 1.0.2 and spring-clean spec file ocaml-nbd no longer uses obuild. Signed-off-by: Euan Harris --- SPECS/ocaml-nbd.spec | 92 ++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 55 deletions(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 746a4f3b..d20f8981 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -1,15 +1,19 @@ -%global debug_package %{nil} - Name: ocaml-nbd -Version: 0.9.2 +Version: 1.0.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/nbd -Source0: https://github.com/xapi-project/nbd/archive/%{version}/nbd-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-obuild ocaml-camlp4-devel ocaml-camlp4 cmdliner-devel -Requires: ocaml ocaml-findlib +Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz + +BuildRequires: cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-lwt-devel + %description An implementation of the Network Block Device protocol for both @@ -19,7 +23,7 @@ access remote block devices. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -30,70 +34,48 @@ developing applications that use %{name}. %build if [ -x ./configure ]; then - ./configure + ./configure --prefix %{_prefix} --destdir %{buildroot} fi make + %install mkdir -p %{buildroot}/%{_libdir}/ocaml -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install %files -# This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_bindir}/nbd-tool +%{_libdir}/ocaml/nbd +%exclude %{_libdir}/ocaml/nbd/*.a +%exclude %{_libdir}/ocaml/nbd/*.cmxa +%exclude %{_libdir}/ocaml/nbd/*.cmx +%exclude %{_libdir}/ocaml/nbd/*.ml +%exclude %{_libdir}/ocaml/nbd/*.mli + %files devel -%doc ChangeLog README.markdown - -%{_libdir}/ocaml/nbd/nbd_lwt.a -%{_libdir}/ocaml/nbd/nbd_lwt.cmxa -%{_libdir}/ocaml/nbd/nbd_lwt_common.cmo -%{_libdir}/ocaml/nbd/nbd_lwt_server.cmi -%{_libdir}/ocaml/nbd/nbd_lwt_client.cmx -%{_libdir}/ocaml/nbd/nbd_lwt_common.cmt -%{_libdir}/ocaml/nbd/lwt_mux.cmx -%{_libdir}/ocaml/nbd/lwt_mux.cmt -%{_libdir}/ocaml/nbd/lwt_mux.cmo -%{_libdir}/ocaml/nbd/nbd_lwt.cma -%{_libdir}/ocaml/nbd/lwt_mux.cmi -%{_libdir}/ocaml/nbd/nbd_lwt_client.cmt -%{_libdir}/ocaml/nbd/nbd_lwt_server.cmo -%{_libdir}/ocaml/nbd/nbd_lwt_client.o -%{_libdir}/ocaml/nbd/nbd_lwt_server.o -%{_libdir}/ocaml/nbd/lwt_mux.o -%{_libdir}/ocaml/nbd/nbd_lwt_common.cmi -%{_libdir}/ocaml/nbd/nbd_lwt_client.cmo -%{_libdir}/ocaml/nbd/nbd_lwt_common.cmti -%{_libdir}/ocaml/nbd/nbd_lwt_client.cmi -%{_libdir}/ocaml/nbd/nbd_lwt_common.cmx -%{_libdir}/ocaml/nbd/nbd_lwt_common.o -%{_libdir}/ocaml/nbd/nbd_lwt_client.cmti -%{_libdir}/ocaml/nbd/nbd_lwt_server.cmti -%{_libdir}/ocaml/nbd/nbd_lwt_server.cmx -%{_libdir}/ocaml/nbd/nbd_lwt_server.cmt -%{_libdir}/ocaml/nbd/result.cmi -%{_libdir}/ocaml/nbd/nbd.a -%{_libdir}/ocaml/nbd/nbd.cmt -%{_libdir}/ocaml/nbd/nbd.o -%{_libdir}/ocaml/nbd/nbd.cmti -%{_libdir}/ocaml/nbd/nbd.cmo -%{_libdir}/ocaml/nbd/result.cmt -%{_libdir}/ocaml/nbd/nbd.cmxa -%{_libdir}/ocaml/nbd/nbd.cmx -%{_libdir}/ocaml/nbd/result.cmo -%{_libdir}/ocaml/nbd/result.o -%{_libdir}/ocaml/nbd/result.cmx -%{_libdir}/ocaml/nbd/nbd.cmi -%{_libdir}/ocaml/nbd/nbd.cma -%{_libdir}/ocaml/nbd/META +%{_libdir}/ocaml/nbd/*.a +%{_libdir}/ocaml/nbd/*.cmx +%{_libdir}/ocaml/nbd/*.cmxa +%{_libdir}/ocaml/nbd/*.mli + %changelog +* Mon Mar 31 2014 Euan Harris - 1.0.2-1 +- Update to 1.0.2, removing dependency on ocaml-obuild + * Thu Nov 21 2013 David Scott - 0.9.2-1 - Update to 0.9.2 -* Mon Sep 23 2013 David Scott +* Mon Sep 23 2013 David Scott - 0.9.1-1 - Update to 0.9.1 -* Wed May 29 2013 David Scott +* Wed May 29 2013 David Scott - 0.9.0-1 - Initial package From 31b759f385f99514bd7a150474af3a63c19864dd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 2 Apr 2014 16:06:42 +0000 Subject: [PATCH 0747/1125] ocaml-mirage-types: Add package and its dependencies Signed-off-by: Euan Harris --- SPECS/ocaml-io-page.spec | 72 +++++++++++++++++++++++++++++++++++ SPECS/ocaml-ipaddr.spec | 61 +++++++++++++++++++++++++++++ SPECS/ocaml-mirage-types.spec | 55 ++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 SPECS/ocaml-io-page.spec create mode 100644 SPECS/ocaml-ipaddr.spec create mode 100644 SPECS/ocaml-mirage-types.spec diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec new file mode 100644 index 00000000..5c4daf23 --- /dev/null +++ b/SPECS/ocaml-io-page.spec @@ -0,0 +1,72 @@ +%define debug_package %{nil} + +Name: ocaml-io-page +Version: 1.1.1 +Release: 1 +Summary: Efficient handling of I/O memory pages on Unix and Xen. +License: ISC +Group: Development/Other +URL: https://github.com/mirage/io-page +Source0: http://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-ounit-devel +Requires: ocaml ocaml-findlib + +%description +This library implements support for efficient handling of I/O memory pages on Unix and Xen. + +IO pages are page-aligned, and wrapped in the Cstruct library to avoid copying the data contained within the page. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n io-page-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_libdir}/ocaml/io-page/META +%{_libdir}/ocaml/io-page/io_page.cma +%{_libdir}/ocaml/io-page/io_page.cmi +%{_libdir}/ocaml/io-page/dllio_page_unix_stubs.so + +%files devel +%defattr(-,root,root) +%doc CHANGES README.md +%{_libdir}/ocaml/io-page/io_page.a +%{_libdir}/ocaml/io-page/io_page.cmx +%{_libdir}/ocaml/io-page/io_page.cmxa +%{_libdir}/ocaml/io-page/io_page.cmxs +%{_libdir}/ocaml/io-page/io_page.mli +%{_libdir}/ocaml/io-page/libio_page_unix_stubs.a +%{_libdir}/ocaml/io-page/io_page_unix.a +%{_libdir}/ocaml/io-page/io_page_unix.cma +%{_libdir}/ocaml/io-page/io_page_unix.cmi +%{_libdir}/ocaml/io-page/io_page_unix.cmx +%{_libdir}/ocaml/io-page/io_page_unix.cmxa +%{_libdir}/ocaml/io-page/io_page_unix.cmxs +%{_libdir}/ocaml/io-page/io_page_unix.ml + +%changelog +* Tue Apr 1 2014 Euan Harris - 1.1.1-1 +- Initial package diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec new file mode 100644 index 00000000..f2cb29d9 --- /dev/null +++ b/SPECS/ocaml-ipaddr.spec @@ -0,0 +1,61 @@ +Name: ocaml-ipaddr +Version: 2.4.0 +Release: 1%{?dist} +Summary: Pure OCaml implementation of the Network Block Device protocol +License: LGPL2.1 + OCaml linking exception +Group: Development/Libraries +URL: http://github.com/mirage/ocaml-ipaddr +Source0: https://github.com/mirage/ocaml-ipaddr/archive/%{version}/ocaml-ipaddr-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib + +%description +An implementation of the Network Block Device protocol for both +regular Unix and Lwt in OCaml. This library allows applications to +access remote block devices. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + + +%install +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/ipaddr +%exclude %{_libdir}/ocaml/ipaddr/*.a +%exclude %{_libdir}/ocaml/ipaddr/*.cmxa +%exclude %{_libdir}/ocaml/ipaddr/*.cmx +%exclude %{_libdir}/ocaml/ipaddr/*.ml +%exclude %{_libdir}/ocaml/ipaddr/*.mli + + +%files devel +%{_libdir}/ocaml/ipaddr/*.a +%{_libdir}/ocaml/ipaddr/*.cmx +%{_libdir}/ocaml/ipaddr/*.cmxa +%{_libdir}/ocaml/ipaddr/*.mli + + +%changelog +* Tue Apr 1 2014 Euan Harris - 2.4.0-1 +- Initial package + diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec new file mode 100644 index 00000000..d8ad45cb --- /dev/null +++ b/SPECS/ocaml-mirage-types.spec @@ -0,0 +1,55 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-types +Version: 1.1.1 +Release: 1 +Summary: MirageOS interfaces +License: ISC +Group: Development/Other +URL: https://github.com/mirage/mirage +Source0: http://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib-devel ocaml-cstruct-devel ocaml-ounit-devel ocaml-lwt-devel ocaml-ipaddr-devel ocaml-io-page-devel +Requires: ocaml ocaml-findlib + +%description +This library contains interfaces to build applications that are compatible with the Mirage operating system. It defines only interfaces, and no concrete modules. + +See http://openmirage.org for more information. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-%{version} + +%build +make build-types + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +#export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install-types + +%clean +rm -rf %{buildroot} + +%files +%{_libdir}/ocaml/mirage-types +%exclude %{_libdir}/ocaml/mirage-types/*.mli + +%files devel +%{_libdir}/ocaml/mirage-types/*.mli + + +%changelog +* Tue Apr 1 2014 Euan Harris - 1.1.1-1 +- Initial package From 1f409d9104465cfb4d5e63d76b2548b0ee459eb2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 2 Apr 2014 16:17:13 +0000 Subject: [PATCH 0748/1125] ocaml-sha: Add package Signed-off-by: Euan Harris --- SPECS/ocaml-sha.spec | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 SPECS/ocaml-sha.spec diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec new file mode 100644 index 00000000..6aa0f957 --- /dev/null +++ b/SPECS/ocaml-sha.spec @@ -0,0 +1,77 @@ +Name: ocaml-sha +Version: 1.9 +Release: 1 +Summary: OCaml SHA +License: LGPL2.1 +Group: Development/Other +URL: http://github.com/vincenthz/ocaml-sha +Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib +Requires: ocaml ocaml-findlib + +%description +This is a set of C bindings for computing SHA digests. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-v%{version} + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install + +%clean +rm -rf %{buildroot} + +%files +# This space intentionally left blank + +%files devel +%defattr(-,root,root) +%doc README + +%{_libdir}/ocaml/sha/META +%{_libdir}/ocaml/sha/libsha.a +%{_libdir}/ocaml/sha/libsha1.a +%{_libdir}/ocaml/sha/libsha256.a +%{_libdir}/ocaml/sha/libsha512.a +%{_libdir}/ocaml/sha/sha.a +%{_libdir}/ocaml/sha/sha.cma +%{_libdir}/ocaml/sha/sha.cmxa +%{_libdir}/ocaml/sha/sha1.a +%{_libdir}/ocaml/sha/sha1.cma +%{_libdir}/ocaml/sha/sha1.cmi +%{_libdir}/ocaml/sha/sha1.cmx +%{_libdir}/ocaml/sha/sha1.cmxa +%{_libdir}/ocaml/sha/sha256.a +%{_libdir}/ocaml/sha/sha256.cma +%{_libdir}/ocaml/sha/sha256.cmi +%{_libdir}/ocaml/sha/sha256.cmx +%{_libdir}/ocaml/sha/sha256.cmxa +%{_libdir}/ocaml/sha/sha512.a +%{_libdir}/ocaml/sha/sha512.cma +%{_libdir}/ocaml/sha/sha512.cmi +%{_libdir}/ocaml/sha/sha512.cmx +%{_libdir}/ocaml/sha/sha512.cmxa +%{_libdir}/ocaml/sha/dllsha.so +%{_libdir}/ocaml/sha/dllsha1.so +%{_libdir}/ocaml/sha/dllsha256.so +%{_libdir}/ocaml/sha/dllsha512.so + +%changelog +* Fri Nov 18 2013 David Scott +- Initial package From 313b90f4313038a9a7c1979f2d87c1e7923b43ea Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 2 Apr 2014 16:18:12 +0000 Subject: [PATCH 0749/1125] vhd-tool, ocaml-vhd: Update to latest versions Signed-off-by: Euan Harris --- SPECS/ocaml-vhd.spec | 39 ++++++++++++++++++++++++++++++++------- SPECS/vhd-tool.spec | 11 +++++++---- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index aba01930..5f393ea6 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -1,14 +1,15 @@ %global debug_package %{nil} Name: ocaml-vhd -Version: 0.6.4 +Version: 0.7.0 Release: 1%{?dist} Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd -Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel ocaml-camlp4-devel +Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel ocaml-camlp4-devel +BuildRequires: ocaml-io-page-devel ocaml-mirage-types-devel Requires: ocaml ocaml-findlib %description @@ -18,11 +19,21 @@ vhd files to be read, written and streamed with on-the-fly format conversion. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. +# The auto-requirements script can't handle packed libraries. +%{?filter_setup: +%filter_from_requires /ocaml(Patterns)/d +%filter_from_requires /ocaml(S)/d +%filter_setup +} + + %prep %setup -q @@ -40,15 +51,29 @@ ocaml setup.ml -install %files -# This space intentionally left blank +%doc CHANGES +%doc LICENSE +%doc README.md +%{_libdir}/ocaml/vhd-format +%{_libdir}/ocaml/stublibs/dllvhd* +%exclude %{_libdir}/ocaml/vhd-format/*.a +%exclude %{_libdir}/ocaml/vhd-format/*.cmxa +%exclude %{_libdir}/ocaml/vhd-format/*.cmx +%exclude %{_libdir}/ocaml/vhd-format/*.ml +%exclude %{_libdir}/ocaml/vhd-format/*.mli + %files devel -%doc CHANGES README.md LICENSE +%{_libdir}/ocaml/vhd-format/*.a +%{_libdir}/ocaml/vhd-format/*.cmx +%{_libdir}/ocaml/vhd-format/*.cmxa +%{_libdir}/ocaml/vhd-format/*.mli -%{_libdir}/ocaml/vhd-format/* -%{_libdir}/ocaml/stublibs/dllvhd* %changelog +* Tue Apr 1 2014 Euan Harris - 0.7.0-1 +- Update to 0.7.0 + * Thu Nov 21 2013 David Scott - 0.6.4-1 - Update to 0.6.4 diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 4d2b3f7d..65612d4d 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,12 +2,12 @@ Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.6.4 +Version: 0.7.3 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception -URL: https://github.com/djs55/vhd-tool -Source0: https://github.com/djs55/vhd-tool/archive/%{version}/vhd-tool-%{version}.tar.gz +URL: https://github.com/xapi-project/vhd-tool +Source0: https://github.com/xapi-project/vhd-tool/archive/v%{version}/%{name}-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel ocaml-obuild @@ -15,7 +15,7 @@ BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-oclock-devel -BuildRequires: libuuid-devel +BuildRequires: libuuid-devel ocaml-tar-devel ocaml-sha-devel ocaml-io-page-devel BuildRequires: ocaml-xenstore-clients-devel message-switch-devel BuildRequires: openssl openssl-devel @@ -45,6 +45,9 @@ make install %{_libexecdir}/xapi/sparse_dd %changelog +* Wed Apr 4 2014 Euan Harris - 0.7.3-1 +- Update to 0.7.3 + * Thu Nov 21 2013 David Scott - 0.6.4-1 - Update to 0.6.4 From aaec8d1d9504205a99c1b06111fbc9a8373bac5d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 2 Apr 2014 16:18:35 +0000 Subject: [PATCH 0750/1125] xapi: Update to latest, removing use of stdext's Tar Signed-off-by: Euan Harris --- SPECS/xapi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 4f2e81c0..4437cffb 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.38 +Version: 1.9.39 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -24,7 +24,7 @@ BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel BuildRequires: libuuid-devel make utop BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -BuildRequires: python2-devel +BuildRequires: python2-devel ocaml-tar-devel Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core vhd-tool %description @@ -141,6 +141,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Wed Apr 2 2014 Euan Harris - 1.9.39-1 +- update to 1.9.39 - switch from stdext's Tar to ocaml-tar + * Wed Oct 30 2013 David Scott - 1.9.38-1 - update to 1.9.38 - import_raw_vdi path fix From 237473f3d1009ec427601ae2c468f36d7560b373 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 4 Apr 2014 10:22:18 +0100 Subject: [PATCH 0751/1125] mappkgname: Add ocaml-mirage-types and dependencies Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 2b296803..aa95334a 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -68,6 +68,10 @@ "ocaml-uutf": ["uutf-ocaml"], "ocaml-odn": ["libodn-ocaml"], "ocaml-fileutils": ["libfileutils-ocaml"], + "ocaml-io-page": ["libio-page-ocaml"], + "ocaml-sha": ["libsha-ocaml"], + "ocaml-ipaddr": ["libipaddr-ocaml"], + "ocaml-mirage-types": ["libmirage-types-ocaml"], "omake": ["omake"], "ocamlmod": ["ocamlmod"], "ocamlify": ["ocamlify"], From f502a8aa7275f40e30d3399315d76a4f15ee275d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 8 Apr 2014 12:43:56 +0000 Subject: [PATCH 0752/1125] mock plugins: Enable tmpfs and disable package_state These changes make chroot operations faster. Signed-off-by: Euan Harris --- scripts/rpm/xenserver.cfg.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in index 38623e3c..53ab90f9 100644 --- a/scripts/rpm/xenserver.cfg.in +++ b/scripts/rpm/xenserver.cfg.in @@ -6,6 +6,9 @@ config_opts['dist'] = 'el6' # only useful for --resultdir variable subst config_opts['basedir'] = '@PWD@/mock/root' config_opts['cache_topdir'] = '@PWD@/mock/cache' +config_opts['plugin_conf']['package_state_enable'] = False +config_opts['plugin_conf']['tmpfs_enable'] = True + config_opts['yum.conf'] = """ [main] cachedir=/var/cache/yum From 9dbbaef86e0f6ea125af0075df0b1d0dd5c6cf45 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 9 Apr 2014 14:34:47 +0000 Subject: [PATCH 0753/1125] vhd-tool: Update to 0.7.4 Signed-off-by: Euan Harris --- SPECS/vhd-tool.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 65612d4d..347fe854 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,7 +2,7 @@ Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.7.3 +Version: 0.7.4 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -45,6 +45,9 @@ make install %{_libexecdir}/xapi/sparse_dd %changelog +* Wed Apr 9 2014 Euan Harris - 0.7.4-1 +- Update to 0.7.4 - fix handling of tar file prefixes + * Wed Apr 4 2014 Euan Harris - 0.7.3-1 - Update to 0.7.3 From 6b9757650e1993bd8dd830301910a2bcb8f91971 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 11 Apr 2014 16:38:55 +0000 Subject: [PATCH 0754/1125] squeezed: Switch build to oasis Signed-off-by: Euan Harris --- SPECS/squeezed.spec | 46 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index c5dd7850..47bc8d73 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.4 +Version: 0.10.5 Release: 1%{?dist} Summary: Memory ballooning daemon for the xapi toolstack License: LGPL @@ -8,39 +8,50 @@ URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init Source2: squeezed-conf -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-stdext-devel ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel +BuildRequires: message-switch-devel +BuildRequires: oasis +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel -BuildRequires: ocaml-oclock-devel xen-devel message-switch-devel -Requires: xen-libs redhat-lsb-core message-switch +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: xen-devel +Requires: xen-libs +Requires: redhat-lsb-core +Requires: message-switch %description Memory ballooning daemon for the xapi toolstack. %prep -%setup -q -n %{name}-%{version} +%setup -q cp %{SOURCE1} squeezed-init cp %{SOURCE2} squeezed-conf %build +oasis setup +./configure --prefix %{_prefix} --destdir %{buildroot} make %install -mkdir -p %{buildroot}/%{_sbindir} -install dist/build/squeezed/squeezed %{buildroot}/%{_sbindir}/squeezed -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed -mkdir -p %{buildroot}/etc -install -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf +install -D -m 0755 squeezed.native %{buildroot}%{_sbindir}/squeezed +install -D -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed +install -D -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf %files -%doc README.md LICENSE MAINTAINERS +%doc README.md +%doc LICENSE +%doc MAINTAINERS %{_sbindir}/squeezed %{_sysconfdir}/init.d/squeezed -%{_sysconfdir}/squeezed.conf +%config %{_sysconfdir}/squeezed.conf %post /sbin/chkconfig --add squeezed @@ -52,6 +63,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Apr 11 2014 Euan Harris - 0.10.5-1 +- Switch build from obuild to oasis + * Wed Sep 24 2013 David Scott - 0.10.4-1 - Update to 0.10.4 From fc96e801cd676001c1b6362212cd28e01428da2c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 14 Apr 2014 15:37:53 +0100 Subject: [PATCH 0755/1125] makedeb: Rewrite _sysconfdir to /etc for configuration files Signed-off-by: Euan Harris --- scripts/lib/rpmextra.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/lib/rpmextra.py b/scripts/lib/rpmextra.py index 7b3f8ce8..05267130 100644 --- a/scripts/lib/rpmextra.py +++ b/scripts/lib/rpmextra.py @@ -74,10 +74,15 @@ def files_from_spec(basename, specpath): continue if tokens[0].lower().startswith("%config"): # dh_install automatically considers files in /etc - # to be config files so we don't have to do anythin - # special for them The spec file documentation says that - # a %config directive can only apply to a single file. + # to be config files so we don't have to do anything + # special for them. The Debian packaging policy says + # that all configuration files must be installed in /etc, + # so we can rewrite _sysconfigdir to /etc. The spec file + # documentation says that # a %config directive can only + # apply to a single file, so there should only be one filename + # to consider. configsection = section + "-%config" + tokens[1] = tokens[1].replace("%{_sysconfdir}", "/etc") if tokens[1].startswith("/etc"): files[section] = files.get(section, []) + tokens[1:] else: From ba3d9d53bdbfb21072d15256fbe0398c66a116de Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 11:40:57 +0100 Subject: [PATCH 0756/1125] specs: Rewrite Requires and BuildRequires to one per line This should reduce merge conflicts in future. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 7 ++- SPECS/blktap.spec | 7 ++- SPECS/cmdliner.spec | 7 ++- SPECS/deriving-ocsigen.spec | 7 ++- SPECS/easy-format.spec | 6 ++- SPECS/ffs.spec | 27 ++++++++--- SPECS/forkexecd.spec | 19 ++++++-- SPECS/js_of_ocaml.spec | 15 +++++- SPECS/libnl3.spec | 3 +- SPECS/linux-guest-loader.spec | 3 +- SPECS/message-switch.spec | 24 +++++++--- SPECS/ocaml-cdrom.spec | 7 ++- SPECS/ocaml-cohttp.spec | 16 +++++-- SPECS/ocaml-cstruct.spec | 11 ++++- SPECS/ocaml-fd-send-recv.spec | 6 ++- SPECS/ocaml-io-page.spec | 8 +++- SPECS/ocaml-lambda-term.spec | 12 ++++- SPECS/ocaml-libvhd.spec | 8 +++- SPECS/ocaml-lwt.spec | 3 +- SPECS/ocaml-mirage-types.spec | 11 ++++- SPECS/ocaml-netdev.spec | 10 +++- SPECS/ocaml-oclock.spec | 6 ++- SPECS/ocaml-ocplib-endian.spec | 9 +++- SPECS/ocaml-ounit.spec | 3 +- SPECS/ocaml-qmp.spec | 10 +++- SPECS/ocaml-re.spec | 7 ++- SPECS/ocaml-rpc.spec | 12 ++++- SPECS/ocaml-sha.spec | 6 ++- SPECS/ocaml-ssl.spec | 8 +++- SPECS/ocaml-stdext.spec | 8 +++- SPECS/ocaml-tapctl.spec | 14 ++++-- SPECS/ocaml-tar.spec | 15 ++++-- SPECS/ocaml-uri.spec | 9 +++- SPECS/ocaml-uuidm.spec | 7 ++- SPECS/ocaml-uutf.spec | 4 +- SPECS/ocaml-vhd.spec | 15 ++++-- SPECS/ocaml-xcp-idl.spec | 15 ++++-- SPECS/ocaml-xcp-inventory.spec | 10 +++- SPECS/ocaml-xcp-rrd.spec | 10 +++- SPECS/ocaml-xen-api-client.spec | 16 ++++++- SPECS/ocaml-xen-api-libs-transitional.spec | 21 +++++++-- SPECS/ocaml-xen-lowlevel-libs.spec | 13 +++-- SPECS/ocaml-xenops.spec | 18 +++++-- SPECS/ocaml-xenstore-clients.spec | 10 ++-- SPECS/ocaml-xenstore.spec | 9 +++- SPECS/ocaml-yojson.spec | 9 +++- SPECS/ocaml-zed.spec | 9 +++- SPECS/omake.spec | 4 +- SPECS/optcomp.spec | 6 ++- SPECS/sm-cli.spec | 9 +++- SPECS/squeezed.spec | 18 +++---- SPECS/utop.spec | 8 +++- SPECS/vhd-tool.spec | 37 +++++++++++---- SPECS/xapi-libvirt-storage.spec | 14 ++++-- SPECS/xapi.spec | 55 +++++++++++++++++----- SPECS/xcp-networkd.spec | 25 +++++++--- SPECS/xcp-python-libs.spec | 3 +- SPECS/xcp-rrdd.spec | 16 +++++-- SPECS/xcp-sm.spec | 4 +- SPECS/xe-create-templates.spec | 15 ++++-- SPECS/xenops-cli.spec | 9 +++- SPECS/xenopsd.spec | 42 ++++++++++++----- SPECS/xenserver-core.spec | 17 +++++-- SPECS/xenserver-install-wizard.spec | 5 +- SPECS/xmlm.spec | 7 ++- SPECS/xsconsole.spec | 3 +- 66 files changed, 596 insertions(+), 191 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index f90f3370..44892e74 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -8,8 +8,11 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib easy-format -Requires: ocaml ocaml-findlib +BuildRequires: easy-format +BuildRequires: ocaml +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Binary data format designed for speed, safety, ease of use and backward diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index a7577561..e35ab0b3 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -6,7 +6,12 @@ Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/xapi-project/blktap Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: autoconf automake libtool libaio-devel xen-devel libuuid-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libaio-devel +BuildRequires: libtool +BuildRequires: libuuid-devel +BuildRequires: xen-devel %description Enhanced version of tapdisk with support for storage mirroring. diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 586bc63b..2a4eac52 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -6,8 +6,11 @@ License: BSD3 Group: Development/Other URL: http://erratique.ch/software/cmdliner Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +Requires: ocaml +Requires: ocaml-findlib %description Cmdliner is an OCaml module for the declarative definition of command line diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 01d64426..8acce239 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -6,8 +6,11 @@ License: MIT Group: Development/Libraries URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Extension to OCaml for deriving functions from type declarations diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 017c145c..99bd04e6 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -6,8 +6,10 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Easy_format: indentation made easy. diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 7f4e36f7..c00182be 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -7,13 +7,26 @@ Group: Development/Other URL: https://github.com/xapi-project/ffs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel -BuildRequires: ocaml-oclock-devel ocaml-libvhd-devel xen-devel libuuid-devel -BuildRequires: ocaml-tapctl-devel message-switch-devel forkexecd-devel -Requires: ocaml-libvhd-devel nfs-utils redhat-lsb-core -Requires: blktap +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-re-devel +BuildRequires: libuuid-devel +BuildRequires: ocaml-libvhd-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: xen-devel +BuildRequires: forkexecd-devel +BuildRequires: message-switch-devel +BuildRequires: ocaml-tapctl-devel +Requires: nfs-utils +Requires: ocaml-libvhd-devel +Requires: redhat-lsb-core +Requires: blktap %description Simple flat file storage manager for the xapi toolstack. diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 89096920..90e7a68d 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -7,9 +7,19 @@ Group: Development/Other URL: https://github.com/xapi-project/forkexecd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-rpc-devel ocaml-fd-send-recv-devel ocaml-re-devel ocaml-uuidm-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel -Requires: ocaml-rpc ocaml-rpc-devel redhat-lsb-core +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-fd-send-recv-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-uuidm-devel +BuildRequires: ocaml-xcp-idl-devel +Requires: ocaml-rpc +Requires: ocaml-rpc-devel +Requires: redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts @@ -55,7 +65,8 @@ fi Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 7af1c49b..a0022132 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -8,8 +8,19 @@ License: LGPL and others Group: Development/Other URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel ocaml-ocamldoc -Requires: ocaml ocaml-findlib ocaml-findlib-devel deriving-ocsigen-devel ocaml-lwt-devel ocaml-camlp4-devel +BuildRequires: deriving-ocsigen-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ocamldoc +Requires: deriving-ocsigen-devel +Requires: ocaml +Requires: ocaml-camlp4-devel +Requires: ocaml-findlib +Requires: ocaml-findlib-devel +Requires: ocaml-lwt-devel %description Compile OCaml programs to Javascript. diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index 3abf9c05..cb987292 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -7,7 +7,8 @@ Release: 1%{?dist} URL: http://www.infradead.org/~tgr/libnl/ Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{version}.tar.gz -BuildRequires: flex bison +BuildRequires: bison +BuildRequires: flex BuildRequires: python %description diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index 9f770779..bdddf1ff 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -7,7 +7,8 @@ Source0: https://github.com/xenserver/%{name}/archive/v%{version}/%{name}-%{vers License: GPL Group: Applications/System BuildArch: noarch -BuildRequires: python-devel python-setuptools +BuildRequires: python-devel +BuildRequires: python-setuptools BuildRequires: xcp-python-libs Requires: xcp-python-libs Provides: eliloader > 0.3 diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 99948f1b..c3522b32 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -7,15 +7,24 @@ Group: Development/Other URL: https://github.com/xapi-project/message-switch Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts -BuildRequires: ocaml-cohttp-devel ocaml-rpc-devel ocaml-xenstore-devel -BuildRequires: ocaml-ounit-devel ocaml-uri-devel -BuildRequires: ocaml-re-devel ocaml-rpc-devel cmdliner-devel -BuildRequires: ocaml-ssl-devel ocaml-oclock-devel -BuildRequires: openssl openssl-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-uri-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-ssl-devel +BuildRequires: openssl +BuildRequires: openssl-devel Requires: redhat-lsb-core # "ocamlfind" # "cohttp" {= "0.9.7"} @@ -70,7 +79,8 @@ fi Summary: Development files for %{name} Group: Development/Other #Requires: %{name} = %{version}-%{release} -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 155a4413..332afbc9 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -8,8 +8,11 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-obuild -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +Requires: ocaml +Requires: ocaml-findlib %description Simple C bindings which allow the state of CDROM devices (and discs diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index bc174ea5..4b3e568a 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -8,10 +8,20 @@ License: LGPL Group: Development/Libraries URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-re-devel ocaml-uri-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-ounit-devel ocaml-ocamldoc ocaml-camlp4-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-uri-devel # should these be inherited from ssl.spec somehow? -BuildRequires: openssl openssl-devel -Requires: ocaml ocaml-findlib +BuildRequires: openssl +BuildRequires: openssl-devel +Requires: ocaml +Requires: ocaml-findlib %description An HTTP library for OCaml. diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 085f6662..f3ddea16 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -8,8 +8,15 @@ License: ISC Group: Development/Libraries URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-ocplib-endian-devel ocaml-camlp4 ocaml-camlp4-devel ocaml-lwt-devel -Requires: ocaml ocaml-findlib ocaml-ocplib-endian-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ocplib-endian-devel +Requires: ocaml +Requires: ocaml-findlib +Requires: ocaml-ocplib-endian-devel #XXX ocaml-cstruct should require caml-ocplib-endian, not -devel %description diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index e031b9ab..4d61d2f3 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -8,8 +8,10 @@ License: LGPL Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Bindings to sendmsg/recvmsg for fd passing under Linux. diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 5c4daf23..a00770ba 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -9,8 +9,12 @@ Group: Development/Other URL: https://github.com/mirage/io-page Source0: http://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-ounit-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ounit-devel +Requires: ocaml +Requires: ocaml-findlib %description This library implements support for efficient handling of I/O memory pages on Unix and Xen. diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 9a8d7ae6..e3c77cfd 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -8,8 +8,16 @@ License: BSD3 Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/lambda-term/ Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc ocaml-zed-devel ocaml-lwt-devel ocaml-camomile-devel ocaml-react-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-camomile-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-react-devel +BuildRequires: ocaml-zed-devel +Requires: ocaml +Requires: ocaml-findlib %description Lambda-Term is a cross-platform library for manipulating the terminal. diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 8c0babed..1b58375a 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -8,8 +8,12 @@ License: BSD3 Group: Development/Libraries URL: http://github.com/xapi-project/libvhd Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib xen-devel libuuid-devel -Requires: ocaml ocaml-findlib +BuildRequires: libuuid-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: xen-devel +Requires: ocaml +Requires: ocaml-findlib %description Simple C bindings which allow .vhd files to be manipulated. diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 1049893f..2c944bfc 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -22,7 +22,8 @@ BuildRequires: ocaml-react-devel >= 0.9.0 #BuildRequires: libev-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-text-devel -BuildRequires: ocaml-camlp4 ocaml-camlp4-devel +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ssl-devel %description diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index d8ad45cb..254f2a44 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -9,8 +9,15 @@ Group: Development/Other URL: https://github.com/mirage/mirage Source0: http://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib-devel ocaml-cstruct-devel ocaml-ounit-devel ocaml-lwt-devel ocaml-ipaddr-devel ocaml-io-page-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-ipaddr-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ounit-devel +Requires: ocaml +Requires: ocaml-findlib %description This library contains interfaces to build applications that are compatible with the Mirage operating system. It defines only interfaces, and no concrete modules. diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 1f0a2d90..7210b93e 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -8,8 +8,14 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/netdev Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib forkexecd-devel ocaml-stdext-devel ocaml-xcp-idl-devel ocaml-oclock-devel -Requires: ocaml ocaml-findlib +BuildRequires: forkexecd-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xcp-idl-devel +Requires: ocaml +Requires: ocaml-findlib %description Manipulate Linux bridges, network devices and openvswitch instances in OCaml. diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 70a2cfcf..c2e93d8f 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -10,8 +10,10 @@ URL: https://github.com/polazarus/oclock Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir -BuildRequires: ocaml ocaml-findlib-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib-devel +Requires: ocaml +Requires: ocaml-findlib %description A POSIX monotonic clock for OCaml diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index baf2486e..8b9585f5 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -8,8 +8,13 @@ License: LGPL Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib optcomp ocaml-camlp4 ocaml-camlp4-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: optcomp +Requires: ocaml +Requires: ocaml-findlib %description Optimised functions to read and write int16/32/64 from strings and diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 80ccc52b..5a8f5d54 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -14,7 +14,8 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4 ocaml-camlp4-devel +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 2f06a809..2b90644f 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -8,8 +8,14 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-yojson-devel cmdliner-devel ocaml-ounit-devel -Requires: ocaml ocaml-findlib +BuildRequires: cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-yojson-devel +Requires: ocaml +Requires: ocaml-findlib %description An implementation of the Qemu Message Protocol (QMP) that allows diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 83756660..dab6fe5f 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -8,8 +8,11 @@ License: LGPL Group: Development/Libraries URL: http://github.com/ocaml/ocaml-re Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +Requires: ocaml +Requires: ocaml-findlib %description A regular expression library for OCaml. diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 84c19d1f..602efb48 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -8,8 +8,16 @@ License: LGPL Group: Development/Libraries URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-type-conv xmlm-devel js_of_ocaml-devel ocaml-camlp4-devel -Requires: ocaml ocaml-findlib ocaml-type-conv ocaml-camlp4-devel +BuildRequires: js_of_ocaml-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-type-conv +BuildRequires: xmlm-devel +Requires: ocaml +Requires: ocaml-camlp4-devel +Requires: ocaml-findlib +Requires: ocaml-type-conv %description Am RPC library for OCaml. diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 6aa0f957..05a76a67 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -7,8 +7,10 @@ Group: Development/Other URL: http://github.com/vincenthz/ocaml-sha Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description This is a set of C bindings for computing SHA digests. diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 81e707f5..fc657287 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -8,8 +8,12 @@ License: LGPL Group: Development/Libraries URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib openssl-devel -Requires: ocaml ocaml-findlib openssl +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: openssl-devel +Requires: ocaml +Requires: ocaml-findlib +Requires: openssl %description Use OpenSSL from OCaml. diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 41543030..356ffc06 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -8,8 +8,12 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/stdext Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-fd-send-recv-devel ocaml-uuidm-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-fd-send-recv-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-uuidm-devel +Requires: ocaml +Requires: ocaml-findlib %description Deprecated misc library functions for OCaml. diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 7120dcb7..c711abaa 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -8,9 +8,17 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/tapctl Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: forkexecd-devel ocaml-stdext-devel ocaml-rpc-devel ocaml-xcp-idl-devel ocaml-oclock-devel -Requires: ocaml ocaml-findlib forkexecd-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: forkexecd-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xcp-idl-devel +Requires: forkexecd-devel +Requires: ocaml +Requires: ocaml-findlib %description Manipulate running tapdisk instances on a xen host. diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 311658ce..58527cae 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -6,13 +6,18 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-tar Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-ounit-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ounit-devel # These are build requires which are also requires of the -devel package -BuildRequires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-re-devel # These are build requires which should be requires of some of the -devel # packages -- update the devel packages later BuildRequires: ocaml-camlp4-devel -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description This is a pure OCaml library for reading and writing tar-format data. @@ -20,7 +25,9 @@ This is a pure OCaml library for reading and writing tar-format data. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: ocaml-re-devel ocaml-cstruct-devel ocaml-lwt-devel +Requires: ocaml-cstruct-devel +Requires: ocaml-lwt-devel +Requires: ocaml-re-devel # These are requires which should be requires of some of the -devel # packages -- update the devel packages later Requires: ocaml-camlp4 diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index ef350a24..05035f1c 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -8,8 +8,13 @@ License: ISC Group: Development/Libraries URL: https://github.com/mirage/ocaml-uri Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml >= 4.00, ocaml-findlib, ocaml-ocamldoc, ocaml-re-devel, ocaml-compiler-libs -Requires: ocaml, ocaml-findlib +BuildRequires: ocaml >= 4.00 +BuildRequires: ocaml-compiler-libs +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-re-devel +Requires: ocaml +Requires: ocaml-findlib %description A URI library for OCaml. diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 6e9c08af..4198687b 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -8,8 +8,11 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uuidm Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +Requires: ocaml +Requires: ocaml-findlib %description Uuidm is an OCaml module implementing 128 bits universally unique diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 73e06495..86915d0c 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -6,7 +6,9 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uutf Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz -BuildRequires: ocaml ocaml-ocamldoc ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc Requires: ocaml %description diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 5f393ea6..45489ad3 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -8,9 +8,18 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib cmdliner-devel ocaml-ounit-devel ocaml-cstruct-devel ocaml-lwt-devel ocaml-uuidm-devel ocaml-camlp4-devel -BuildRequires: ocaml-io-page-devel ocaml-mirage-types-devel -Requires: ocaml ocaml-findlib +BuildRequires: cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-uuidm-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-mirage-types-devel +Requires: ocaml +Requires: ocaml-findlib %description A pure OCaml parser and printer for vhd format data. The library allows diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 3428ab7a..ff7f678f 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -8,8 +8,16 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-cohttp-devel xmlm-devel ocaml-rpc-devel message-switch-devel cmdliner-devel ocaml-fd-send-recv-devel ocaml-xcp-rrd-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: cmdliner-devel +BuildRequires: message-switch-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-fd-send-recv-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-rrd-devel +BuildRequires: xmlm-devel BuildRequires: ocaml-ounit-devel # XXX transitive dependencies of message-switch-devel @@ -23,7 +31,8 @@ BuildRequires: ocaml-oclock-devel # "ocamlfind" # "syslog" # "message_switch" -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Common interface definitions for XCP services. diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 055b6465..19b1704e 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -8,7 +8,12 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib-devel ocaml-obuild cmdliner-devel ocaml-uuidm-devel ocaml-stdext-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-obuild +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-uuidm-devel %description A simple library to read and write the XCP inventory file. @@ -16,7 +21,8 @@ A simple library to read and write the XCP inventory file. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 63f4a8b0..4fea593d 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -8,8 +8,14 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xcp-rrd Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-stdext-devel +Requires: ocaml +Requires: ocaml-findlib %description Round-Robin Datasources in OCaml. diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 14580dec..7ac02b91 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -8,8 +8,20 @@ License: LGPLv2 Group: Development/Libraries URL: https://github.com/xapi-project/xen-api-client Source0: https://github.com/xapi-project/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-lwt-devel ocaml-ssl-devel openssl openssl-devel ocaml-ounit-devel ocaml-cohttp-devel ocaml-uri-devel xmlm-devel ocaml-rpc-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-ssl-devel +BuildRequires: ocaml-uri-devel +BuildRequires: openssl +BuildRequires: openssl-devel +BuildRequires: xmlm-devel +Requires: ocaml +Requires: ocaml-findlib %description XenAPI Client is an OCaml library implementing XenServer's XenAPI. diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 478b8afd..b48bb5f2 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -8,11 +8,22 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-stdext-devel xmlm-devel forkexecd-devel -BuildRequires: ocaml-rpc-devel ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel xen-devel ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-oclock-devel -Requires: ocaml ocaml-findlib xen-libs +BuildRequires: forkexecd-devel +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-stdext-devel +BuildRequires: xmlm-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: xen-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-xcp-idl-devel +Requires: ocaml +Requires: ocaml-findlib +Requires: xen-libs %description A deprecated standard library extension for OCaml. diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index d81b5221..179eeb64 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -8,10 +8,17 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-lwt-devel xen-devel libuuid-devel cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: cmdliner-devel +BuildRequires: libuuid-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: xen-devel BuildRequires: ocaml-cstruct-devel -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description Xen hypercall bindings for OCaml. diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 3c39eb40..b0957c82 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -8,10 +8,20 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xenops Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-obuild ocaml-stdext-devel ocaml-rpc-devel ocaml-camlp4-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-xenstore-devel ocaml-xenstore-clients-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel ocaml-oclock-devel ocaml-xcp-idl-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +Requires: ocaml +Requires: ocaml-findlib %description Low-level xen control operations in OCaml. diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index c0add444..63da8d46 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -8,9 +8,13 @@ License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xenstore-clients Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-lwt-devel ocaml-xenstore-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-xenstore-devel +Requires: ocaml +Requires: ocaml-findlib %description Unix xenstore clients for OCaml. diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index b8259dd5..68f274f9 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -8,9 +8,14 @@ License: LGPL Group: Development/Libraries URL: https://github.com/mirage/ocaml-xenstore Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-cstruct-devel ocaml-lwt-devel ocaml-camlp4-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc -Requires: ocaml ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib Conflicts: xen-ocaml %description diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index b6848ead..133a10a5 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -8,8 +8,13 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib cppo easy-format biniou -Requires: ocaml ocaml-findlib +BuildRequires: biniou +BuildRequires: cppo +BuildRequires: easy-format +BuildRequires: ocaml +BuildRequires: ocaml-findlib +Requires: ocaml +Requires: ocaml-findlib %description A JSON parser and printer for OCaml. diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 74c22cb7..dc69eaf0 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -8,8 +8,13 @@ License: BSD3 Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/zed/ Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camomile-devel ocaml-react-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-camomile-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-react-devel +Requires: ocaml +Requires: ocaml-findlib %description Zed is an abstract engine for text edition. It can be used for writing diff --git a/SPECS/omake.spec b/SPECS/omake.spec index a682a7a9..6d88f62b 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -7,7 +7,9 @@ Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1 Patch0: omake-1-warnings License: GPL Group: Development/Tools -BuildRequires: ocaml >= 3.09.2, make, ncurses-devel +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: ocaml >= 3.09.2 %define debug_package %{nil} diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 6d32738e..a6a7dafd 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -6,7 +6,11 @@ License: BSD3 Group: Development/Other URL: http://forge.ocamlcore.org/projects/optcomp/ Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc ocaml-camlp4 ocaml-camlp4-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc Requires: ocaml %description diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index f9a89b26..58c9b05e 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -6,8 +6,13 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/sm-cli Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: cmdliner-devel +BuildRequires: ocaml-obuild +BuildRequires: ocaml-uuidm-devel +BuildRequires: ocaml-xcp-idl-devel BuildRequires: message-switch-devel Requires: message-switch diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 47bc8d73..fe6b9d30 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -10,20 +10,20 @@ Source1: squeezed-init Source2: squeezed-conf BuildRequires: message-switch-devel BuildRequires: oasis -BuildRequires: ocaml +BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib BuildRequires: ocaml-oclock-devel -BuildRequires: ocaml-re-devel +BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: xen-devel -Requires: xen-libs -Requires: redhat-lsb-core +BuildRequires: ocaml-xenstore-devel +BuildRequires: xen-devel +Requires: xen-libs +Requires: redhat-lsb-core Requires: message-switch %description diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 8afb44d0..c5e7ce2d 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -6,8 +6,12 @@ License: BSD Group: Development/Other URL: https://github.com/diml/utop Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-zed-devel ocaml-lambda-term-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-lambda-term-devel +BuildRequires: ocaml-zed-devel Requires: ocaml-camomile-data %description diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 347fe854..d162a877 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -9,15 +9,34 @@ License: LGPL+linking exception URL: https://github.com/xapi-project/vhd-tool Source0: https://github.com/xapi-project/vhd-tool/archive/v%{version}/%{name}-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: ocaml-xcp-idl-devel ocaml-vhd-devel ocaml-obuild -BuildRequires: ocaml-nbd-devel ocaml-cstruct-devel ocaml-lwt-devel -BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel -BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-oclock-devel -BuildRequires: libuuid-devel ocaml-tar-devel ocaml-sha-devel ocaml-io-page-devel -BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -BuildRequires: openssl openssl-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-obuild +BuildRequires: ocaml-vhd-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-nbd-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-ssl-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-tapctl-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: cmdliner-devel +BuildRequires: git +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: libuuid-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-sha-devel +BuildRequires: ocaml-tar-devel +BuildRequires: message-switch-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: openssl +BuildRequires: openssl-devel %description Simple command-line tools for manipulating and streaming .vhd format file. diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 252c7508..69f67d1d 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -7,9 +7,17 @@ Group: Development/Other URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/%{version}.tar.gz Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel ocaml-libvirt-devel libvirt-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: libvirt-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-libvirt-devel +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-re-devel BuildRequires: ocaml-oclock-devel BuildRequires: message-switch-devel Requires: redhat-lsb-core diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 4437cffb..5e87364b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -13,19 +13,48 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-ocamldoc -BuildRequires: pam-devel tetex-latex ocaml xen-devel zlib-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-xen-api-client-devel omake ocaml-netdev-devel -BuildRequires: ocaml-cdrom-devel ocaml-fd-send-recv-devel forkexecd-devel -BuildRequires: ocaml-libvhd-devel ocaml-nbd-devel ocaml-oclock-devel -BuildRequires: ocaml-ounit-devel ocaml-rpc-devel ocaml-ssl-devel ocaml-stdext-devel -BuildRequires: ocaml-tapctl-devel ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-devel git cmdliner-devel ocaml-xcp-inventory-devel -BuildRequires: libuuid-devel make utop -BuildRequires: ocaml-xenstore-clients-devel message-switch-devel -BuildRequires: python2-devel ocaml-tar-devel -Requires: stunnel ocaml-xcp-inventory hwdata redhat-lsb-core vhd-tool +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml +BuildRequires: pam-devel +BuildRequires: tetex-latex +BuildRequires: xen-devel +BuildRequires: zlib-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-netdev-devel +BuildRequires: ocaml-xen-api-client-devel +BuildRequires: omake +BuildRequires: forkexecd-devel +BuildRequires: ocaml-cdrom-devel +BuildRequires: ocaml-fd-send-recv-devel +BuildRequires: ocaml-libvhd-devel +BuildRequires: ocaml-nbd-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-ssl-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-tapctl-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: cmdliner-devel +BuildRequires: git +BuildRequires: ocaml-xcp-inventory-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: libuuid-devel +BuildRequires: make +BuildRequires: utop +BuildRequires: message-switch-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-tar-devel +BuildRequires: python2-devel +Requires: hwdata +Requires: ocaml-xcp-inventory +Requires: redhat-lsb-core +Requires: stunnel +Requires: vhd-tool %description XCP toolstack. diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 1f840aff..480998ae 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -10,14 +10,25 @@ Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf Source4: xcp-networkd-bridge-conf -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel forkexecd-devel ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-xcp-inventory-devel ocaml-ounit-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: forkexecd-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-xcp-inventory-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-re-devel BuildRequires: ocaml-xen-api-client-devel -BuildRequires: ocaml-oclock-devel message-switch-devel -Requires: ethtool redhat-lsb-core +BuildRequires: message-switch-devel +BuildRequires: ocaml-oclock-devel +Requires: ethtool +Requires: redhat-lsb-core %description Simple host networking management service for the xapi toolstack. diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index 3db555a3..ed8bd276 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -8,7 +8,8 @@ License: GPL Group: Applications/System BuildArch: noarch -BuildRequires: python-devel python-setuptools +BuildRequires: python-devel +BuildRequires: python-setuptools %description Common XenServer Python classes. diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 65d0a82a..669d85de 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -7,14 +7,22 @@ Group: Development/Other URL: https://github.com/xapi-project/xcp-rrdd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel ocaml-xcp-inventory-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel -BuildRequires: xen-devel message-switch-devel forkexecd-devel +BuildRequires: forkexecd-devel +BuildRequires: message-switch-devel +BuildRequires: xen-devel Requires: redhat-lsb-core %description diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index c3b764c5..15ea5170 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -10,7 +10,9 @@ URL: https://github.com/xapi-project/sm Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz Source1: xcp-mpath-scsidev-rules Source2: xcp-mpath-scsidev-script -BuildRequires: swig python-devel xen-devel +BuildRequires: python-devel +BuildRequires: swig +BuildRequires: xen-devel Requires: iscsi-initiator-utils Requires: sg3_utils Requires: xen-runtime diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index a5ebbfb8..62a35ddc 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -6,11 +6,18 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xcp-guest-templates Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-lwt-devel xmlm-devel ocaml-stdext-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: xmlm-devel BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-xen-api-client-devel ocaml-oclock-devel -BuildRequires: openssl-devel ocaml-xcp-idl-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-xen-api-client-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: openssl-devel Requires: openssl %description diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index bf8de6bd..5e7bf019 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -6,8 +6,13 @@ License: LGPL Group: Development/Other URL: https://github.com/xapi-project/xenops-cli Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-obuild ocaml-xcp-idl-devel cmdliner-devel ocaml-uuidm-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: cmdliner-devel +BuildRequires: ocaml-obuild +BuildRequires: ocaml-uuidm-devel +BuildRequires: ocaml-xcp-idl-devel BuildRequires: message-switch-devel Requires: message-switch diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 97aba183..f56efc5a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -12,17 +12,35 @@ Source3: xenopsd-libvirt-init Source4: xenopsd-xenlight-init Source5: make-xsc-xenopsd.conf Source6: xenopsd-network-conf -BuildRequires: ocaml ocaml-obuild ocaml-findlib ocaml-camlp4-devel -BuildRequires: ocaml-xcp-idl-devel ocaml-rpc-devel -BuildRequires: ocaml-re-devel ocaml-cohttp-devel cmdliner-devel -BuildRequires: ocaml-oclock-devel ocaml-uuidm-devel forkexecd-devel -BuildRequires: ocaml-libvirt-devel libvirt-devel ocaml-qmp-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel ocaml-sexplib -BuildRequires: ocaml-xenstore-clients-devel ocaml-xenstore-devel -BuildRequires: xen-devel ocaml-xcp-inventory-devel message-switch-devel -BuildRequires: vncterm linux-guest-loader ocaml-xcp-idl-devel +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-re-devel +BuildRequires: forkexecd-devel +BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-uuidm-devel +BuildRequires: libvirt-devel +BuildRequires: ocaml-libvirt-devel +BuildRequires: ocaml-qmp-devel +BuildRequires: ocaml-sexplib +BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: message-switch-devel +BuildRequires: ocaml-xcp-inventory-devel +BuildRequires: xen-devel +BuildRequires: linux-guest-loader +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: vncterm BuildRequires: ocaml-uutf-devel -Requires: message-switch xenops-cli redhat-lsb-core +Requires: message-switch +Requires: redhat-lsb-core +Requires: xenops-cli %description Simple VM manager for the xapi toolstack. @@ -41,7 +59,9 @@ Simple VM manager for Xen and KVM using libvirt. Summary: Xenopsd using xc Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: xen-libs vncterm forkexecd +Requires: forkexecd +Requires: vncterm +Requires: xen-libs %description xc Simple VM manager for Xen using libxc. diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 0cd0fa3a..ba874669 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -7,15 +7,24 @@ Group: Development/Other URL: http://www.xenserver.org/ Source0: xenserver-readme Requires: xenserver-install-wizard -Requires: xapi xapi-xe xe-create-templates xapi-python-devel -Requires: xenopsd-xc xenopsd-libvirt xenopsd-simulator +Requires: xapi +Requires: xapi-python-devel +Requires: xapi-xe +Requires: xe-create-templates +Requires: xenopsd-libvirt +Requires: xenopsd-simulator +Requires: xenopsd-xc Requires: xenops-cli -Requires: ffs xapi-libvirt-storage sm-cli xcp-sm +Requires: ffs +Requires: sm-cli +Requires: xapi-libvirt-storage +Requires: xcp-sm Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed Requires: linux-guest-loader -Requires: kernel >= 3.4.46 kernel-firmware +Requires: kernel >= 3.4.46 +Requires: kernel-firmware Requires: xen %description diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index f69697a5..ef3801e5 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -8,7 +8,10 @@ Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Requires: python newt xapi-python-devel python-argparse +Requires: newt +Requires: python +Requires: python-argparse +Requires: xapi-python-devel %description A simple wizard to configure a XenServer after install diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index f7338087..3b05f3d2 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -6,8 +6,11 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/xmlm Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz -BuildRequires: ocaml ocaml-findlib ocaml-ocamldoc -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +Requires: ocaml +Requires: ocaml-findlib %description Xmlm is an OCaml module providing streaming XML input/output. It aims at diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 1644b8a4..d49d0320 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -6,7 +6,8 @@ License: GPL2 Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz -Requires: PyPAM xapi-python-devel +Requires: PyPAM +Requires: xapi-python-devel %description Console tool for configuring a XenServer installation. From f794ad38d658a337d21d5242ad0b9ebf80b0a74a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 15:57:47 +0100 Subject: [PATCH 0757/1125] xsisostat: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/xsiostat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index a06b0008..045307c0 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -26,6 +26,6 @@ install -m 0755 xsiostat %{buildroot}/%{_sbindir}/xsiostat %{_sbindir}/xsiostat %changelog -* Tue Jun 19 2013 David Scott - 0.2.0-1 +* Wed Jun 19 2013 David Scott - 0.2.0-1 - Initial package From 7e61070769054d27def6e667269df82b9f29a506 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 15:59:48 +0100 Subject: [PATCH 0758/1125] xenserver-install-wizard: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/xenserver-install-wizard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index f69697a5..37d0947e 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -56,7 +56,7 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo * Mon Sep 2 2013 David Scott - Update to 0.2.19 -* Mon Sep 1 2013 David Scott +* Mon Sep 2 2013 David Scott - Update to 0.2.18 * Mon Jun 10 2013 David Scott From 8c5a4b26bab728dda16c40ab13dea440d38aba4f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:06:42 +0100 Subject: [PATCH 0759/1125] xenospd: Fix bogus dates in changelog Signed-off-by: Euan Harris --- SPECS/xenopsd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 97aba183..e26c2bd4 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -200,12 +200,12 @@ fi * Fri Oct 18 2013 David Scott - update to 0.9.28 -* Wed Sep 24 2013 David Scott +* Wed Sep 25 2013 David Scott - modprobe blk{tap,back} in the xenopsd-xc init.d script since we need these to make virtual disks work - update to 0.9.27 -* Tue Sep 23 2013 David Scott +* Tue Sep 24 2013 David Scott - Update to 0.9.26, which includes fixes for networking and libxl * Fri Sep 20 2013 Euan Harris From c6aef6934934909a84b13dbff69d1d96eca13db4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:17:12 +0100 Subject: [PATCH 0760/1125] xapi: Fix bogus dates in changelog Signed-off-by: Euan Harris --- SPECS/xapi.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 4437cffb..b92fab5f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -168,13 +168,13 @@ fi * Wed Sep 25 2013 David Scott - Update to 1.9.28 -* Tue Sep 23 2013 David Scott - 1.9.27-2 +* Tue Sep 24 2013 David Scott - 1.9.27-2 - Remove dependency on ocaml-bitstring -* Tue Sep 23 2013 David Scott - 1.9.27-1 +* Tue Sep 24 2013 David Scott - 1.9.27-1 - Update to 1.9.27 -* Wed Sep 19 2013 Euan Harris - 1.9.25-2 +* Thu Sep 19 2013 Euan Harris - 1.9.25-2 - Use 'python_sitelib' macro to choose Python install path, instead of hard-coding it. * Wed Sep 11 2013 David Scott - 1.9.25-1 @@ -186,7 +186,7 @@ fi * Wed Sep 4 2013 David Scott - 1.9.21-1 - Update to 1.9.21, switch default xenopsd to the "classic" version -* Mon Sep 1 2013 David Scott - 1.9.20-1 +* Mon Sep 2 2013 David Scott - 1.9.20-1 - Fix XenAPI.py on python2.7 * Tue Aug 20 2013 David Scott - 1.9.19-1 @@ -195,7 +195,7 @@ fi * Tue Jun 18 2013 David Scott - 1.9.6-1 - Update to 1.9.6 -* Sun Jun 8 2013 David Scott - 1.9.2-1 +* Sat Jun 8 2013 David Scott - 1.9.2-1 - Add python-devel for writing python clients * Wed Jun 5 2013 David Scott - 1.9.1-1 From a6929f5cd2b36dca22513f7de43a497dde075494 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:19:36 +0100 Subject: [PATCH 0761/1125] vhd-tool: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/vhd-tool.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 347fe854..136acac3 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -48,7 +48,7 @@ make install * Wed Apr 9 2014 Euan Harris - 0.7.4-1 - Update to 0.7.4 - fix handling of tar file prefixes -* Wed Apr 4 2014 Euan Harris - 0.7.3-1 +* Wed Apr 2 2014 Euan Harris - 0.7.3-1 - Update to 0.7.3 * Thu Nov 21 2013 David Scott - 0.6.4-1 From fe5a05621567aaed2abd07ce7a64f3f94df62754 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:22:27 +0100 Subject: [PATCH 0762/1125] ocaml-sha: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-sha.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 6aa0f957..8c833577 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -73,5 +73,5 @@ rm -rf %{buildroot} %{_libdir}/ocaml/sha/dllsha512.so %changelog -* Fri Nov 18 2013 David Scott +* Mon Nov 18 2013 David Scott - Initial package From be0f88a748b60deb85a606e5a2a21cffe2d3c8a1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:24:56 +0100 Subject: [PATCH 0763/1125] ocaml-xenstore: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-xenstore.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index b8259dd5..9e8e40ff 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -52,6 +52,6 @@ ocaml setup.ml -install * Tue Sep 10 2013 David Scott - Update to 1.2.3 -* Sun May 2 2013 David Scott +* Tue Jul 2 2013 David Scott - Initial package From ab43480508604e261e74a46520c30f6d2a6e591e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:26:08 +0100 Subject: [PATCH 0764/1125] squeezed: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/squeezed.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 47bc8d73..af2fa040 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -66,7 +66,7 @@ fi * Fri Apr 11 2014 Euan Harris - 0.10.5-1 - Switch build from obuild to oasis -* Wed Sep 24 2013 David Scott - 0.10.4-1 +* Wed Sep 25 2013 David Scott - 0.10.4-1 - Update to 0.10.4 * Fri Sep 20 2013 David Scott - 0.10.3-1 From aec6f76573e2940a414e28212ff04a0cdb412861 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 16 Apr 2014 16:44:22 +0100 Subject: [PATCH 0765/1125] ocaml-type-conv: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-type-conv.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 74915400..e7cea4de 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -43,7 +43,7 @@ make install %{_libdir}/ocaml/type_conv %changelog -* Wed Nov 25 2010 Mike McClurg - 109.20.00-1 +* Thu Nov 25 2010 Mike McClurg - 109.20.00-1 - Updated to version 2.0.1 for compatability with OCaml 3.12.0 * Fri May 14 2010 David Scott From b4335eeb157f70941736a273314771c9850396fa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 13:48:38 +0000 Subject: [PATCH 0766/1125] oasis: Remove explicit ocaml requirement - it can be inferred Signed-off-by: Euan Harris --- SPECS/oasis.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index 005f083a..d54bd378 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -15,7 +15,6 @@ BuildRequires: ocamlify BuildRequires: ocamlmod BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-odn-devel -Requires: ocaml %description OASIS generates a full configure, build and install system for your From fce3bca1392a88feacd5b302f59f8855815e6b15 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 13:51:40 +0000 Subject: [PATCH 0767/1125] oasis: Use traditional build entry points Signed-off-by: Euan Harris --- SPECS/oasis.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index d54bd378..32d777d7 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -41,14 +41,14 @@ developing applications that use %{name}. %build -ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} -ocaml setup.ml -build +./configure --prefix %{_prefix} --destdir %{buildroot} +make %install mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install +make install From b521eda137f2bcc4863ef88fe481e9755f12019d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 13:53:43 +0000 Subject: [PATCH 0768/1125] oasis: Get rid of duplicate definition of OCAMLFIND_DESTDIR Signed-off-by: Euan Harris --- SPECS/oasis.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index 32d777d7..be02388d 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -46,12 +46,11 @@ make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install - %files %{_bindir}/oasis From 5627fe0c579231ae8c9a5c09be36cebbc480d5ca Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 14:58:28 +0000 Subject: [PATCH 0769/1125] ocamlify: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocamlify.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec index 26887f85..ef4dac7b 100644 --- a/SPECS/ocamlify.spec +++ b/SPECS/ocamlify.spec @@ -2,18 +2,19 @@ Name: ocamlify Version: 0.0.2 Release: 1%{?dist} Summary: Create OCaml source code by including whole files into OCaml string or string list - Group: Development/Tools License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlify/ Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar.gz + BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib-devel -Requires: ocaml %description +Create OCaml source code by including whole files into OCaml string or +string list. %prep @@ -21,15 +22,18 @@ Requires: ocaml %build -ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} -ocaml setup.ml -build +./configure --prefix %{_prefix} --destdir %{buildroot} +make + %install -ocaml setup.ml -install +make install %files -%doc AUTHORS.txt COPYING.txt CHANGES.txt +%doc AUTHORS.txt +%doc CHANGES.txt +%doc COPYING.txt %{_bindir}/ocamlify From 925ed695ada2f1ea032762ba74e8025b8a94b5ca Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 14:59:45 +0000 Subject: [PATCH 0770/1125] ocamlmod: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocamlmod.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SPECS/ocamlmod.spec b/SPECS/ocamlmod.spec index 7e7a8c10..42bc3650 100644 --- a/SPECS/ocamlmod.spec +++ b/SPECS/ocamlmod.spec @@ -2,19 +2,19 @@ Name: ocamlmod Version: 0.0.7 Release: 1%{?dist} Summary: Generate OCaml modules from source files - Group: Development/Tools License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlmod/ Source0: http://forge.ocamlcore.org/frs/download.php/1350/%{name}-%{version}.tar.gz + BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ounit-devel >= 2.0.0 -Requires: ocaml %description +Generate OCaml modules from source files. %prep @@ -22,15 +22,17 @@ Requires: ocaml %build -ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} -ocaml setup.ml -build +./configure --prefix %{_prefix} --destdir %{buildroot} +make + %install -ocaml setup.ml -install +make install %files -%doc AUTHORS.txt CHANGES.txt +%doc AUTHORS.txt +%doc CHANGES.txt %{_bindir}/ocamlmod From f48a1e3a60a0ee203d355a4e26631776b85414d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 15:05:01 +0000 Subject: [PATCH 0771/1125] ocaml-nbd: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-nbd.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index d20f8981..00109a0c 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -7,6 +7,7 @@ Group: Development/Libraries URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz + BuildRequires: cmdliner-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -20,28 +21,30 @@ An implementation of the Network Block Device protocol for both regular Unix and Lwt in OCaml. This library allows applications to access remote block devices. + %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} + %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. + %prep %setup -q -n nbd-%{version} + %build -if [ -x ./configure ]; then - ./configure --prefix %{_prefix} --destdir %{buildroot} -fi +./configure --prefix %{_prefix} --destdir %{buildroot} make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install From 35f6e0d619fd85316698ebdda1b7114a32951931 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 10:14:15 +0000 Subject: [PATCH 0772/1125] SPECS: Add dependencies from devel packages to base packages First step in cleaning up the inter-package dependencies. This also allows us to split files correctly between base and devel packages. A devel package should require its base package, so that when the devel package is installed as a build requirement the base files are also pulled in. Signed-off-by: Euan Harris --- SPECS/cmdliner.spec | 1 + SPECS/deriving-ocsigen.spec | 2 +- SPECS/js_of_ocaml.spec | 2 +- SPECS/ocaml-cdrom.spec | 1 + SPECS/ocaml-cohttp.spec | 2 +- SPECS/ocaml-cstruct.spec | 1 + SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-lambda-term.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-lwt.spec | 1 + SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 1 + SPECS/ocaml-qmp.spec | 1 + SPECS/ocaml-re.spec | 1 + SPECS/ocaml-react.spec | 1 + SPECS/ocaml-rpc.spec | 2 +- SPECS/ocaml-sha.spec | 1 + SPECS/ocaml-ssl.spec | 1 + SPECS/ocaml-stdext.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-tar.spec | 1 + SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-uri.spec | 1 + SPECS/ocaml-uuidm.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 ++ SPECS/ocaml-xcp-rrd.spec | 2 +- SPECS/ocaml-xen-api-client.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 1 + SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/ocaml-xenops.spec | 2 +- SPECS/ocaml-xenstore-clients.spec | 2 +- SPECS/ocaml-xenstore.spec | 1 + SPECS/ocaml-yojson.spec | 1 + SPECS/ocaml-zed.spec | 2 +- SPECS/xmlm.spec | 1 + 37 files changed, 38 insertions(+), 20 deletions(-) diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index 2a4eac52..aa7b6858 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -23,6 +23,7 @@ man page generation. It supports programs with single or multiple commands %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 8acce239..22191b0c 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -18,7 +18,7 @@ Extension to OCaml for deriving functions from type declarations %package devel Summary: Development files for %{name} Group: Development/Other -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index a0022132..2f69c1b9 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -28,7 +28,7 @@ Compile OCaml programs to Javascript. %package devel Summary: Development files for %{name} Group: Development/Other -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 332afbc9..38a57dca 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -21,6 +21,7 @@ inside) to be queried under Linux. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 4b3e568a..2230952e 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -29,7 +29,7 @@ An HTTP library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index f3ddea16..e56dd5ea 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -25,6 +25,7 @@ Read and write low-level C-style structures in OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 4d61d2f3..b5c68408 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -19,7 +19,7 @@ Bindings to sendmsg/recvmsg for fd passing under Linux. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index e3c77cfd..a51113d3 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -25,7 +25,7 @@ Lambda-Term is a cross-platform library for manipulating the terminal. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 1b58375a..6d8ae3dd 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -21,7 +21,7 @@ Simple C bindings which allow .vhd files to be manipulated. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 2c944bfc..40acfa5e 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -34,6 +34,7 @@ is part of the Ocsigen project. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 7210b93e..6c3c0bb1 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -23,7 +23,7 @@ Manipulate Linux bridges, network devices and openvswitch instances in OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index c2e93d8f..f041b0af 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -21,7 +21,7 @@ A POSIX monotonic clock for OCaml %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8b9585f5..c48226da 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -33,6 +33,7 @@ The library implements two modules: %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} Requires: optcomp %description devel diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 2b90644f..cbfd6adb 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -25,6 +25,7 @@ process. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index dab6fe5f..d89d195e 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -20,6 +20,7 @@ A regular expression library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 31802875..e518956e 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -34,6 +34,7 @@ and provides time stamp events, delayed events and delayed signals. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 602efb48..2970e1b2 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -25,7 +25,7 @@ Am RPC library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 35994c1b..effaf953 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -18,6 +18,7 @@ This is a set of C bindings for computing SHA digests. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index fc657287..5fe589ea 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -21,6 +21,7 @@ Use OpenSSL from OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 356ffc06..23ca892c 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -21,7 +21,7 @@ Deprecated misc library functions for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index c711abaa..8d683df2 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -26,7 +26,7 @@ Manipulate running tapdisk instances on a xen host. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 58527cae..dab8c4c4 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -25,6 +25,7 @@ This is a pure OCaml library for reading and writing tar-format data. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} Requires: ocaml-cstruct-devel Requires: ocaml-lwt-devel Requires: ocaml-re-devel diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 79430500..d07cea6f 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -25,7 +25,7 @@ unicode characters, in a convenient way. %package devel Summary: Development files for %{name} Group: Development/Libraries - +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 05035f1c..86e7be8b 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -22,6 +22,7 @@ A URI library for OCaml. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 4198687b..53c129cb 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -22,7 +22,7 @@ identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index ff7f678f..56d488b0 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -40,7 +40,7 @@ Common interface definitions for XCP services. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: message-switch-devel %description devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 19b1704e..27c1cca0 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -21,6 +21,8 @@ A simple library to read and write the XCP inventory file. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + Requires: ocaml Requires: ocaml-findlib diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 4fea593d..a0056d2a 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -23,7 +23,7 @@ Round-Robin Datasources in OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 7ac02b91..fbaf2674 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -31,7 +31,7 @@ virtualization hosts. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel XenAPI Client is an OCaml library implementing XenServer's XenAPI. diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index b48bb5f2..f3ef8b93 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -31,6 +31,7 @@ A deprecated standard library extension for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 179eeb64..8dfaf772 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -26,7 +26,7 @@ Xen hypercall bindings for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index b0957c82..40e782a3 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -29,7 +29,7 @@ Low-level xen control operations in OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 63da8d46..9d193d33 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -22,7 +22,7 @@ Unix xenstore clients for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 74a284db..171c1c2b 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -24,6 +24,7 @@ An implementation of the xenstore protocol in OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} Conflicts: xen-ocaml-devel %description devel diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 133a10a5..519984a5 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -22,6 +22,7 @@ A JSON parser and printer for OCaml. %package devel Summary: Development files for %{name} Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index dc69eaf0..f52467d8 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -23,7 +23,7 @@ text editors, edition widgets, readlines, ... %package devel Summary: Development files for %{name} Group: Development/Libraries -#Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 3b05f3d2..d27b55fe 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -24,6 +24,7 @@ arborescent data structures to/from XML documents. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for From 34c8eac5c463924dd75e32e0536c0ec954f28844 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 10:40:43 +0000 Subject: [PATCH 0773/1125] SPECS: Remove runtime dependencies which RPM can infer RPM can infer runtime dependencies by scanning package binaries, so we do not need to declare these dependencies explicitly. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 -- SPECS/cmdliner.spec | 2 -- SPECS/cppo.spec | 1 - SPECS/deriving-ocsigen.spec | 2 -- SPECS/easy-format.spec | 2 -- SPECS/forkexecd.spec | 1 - SPECS/js_of_ocaml.spec | 4 ---- SPECS/ocaml-cdrom.spec | 2 -- SPECS/ocaml-cohttp.spec | 2 -- SPECS/ocaml-cstruct.spec | 2 -- SPECS/ocaml-fd-send-recv.spec | 2 -- SPECS/ocaml-io-page.spec | 2 -- SPECS/ocaml-lambda-term.spec | 2 -- SPECS/ocaml-libvhd.spec | 2 -- SPECS/ocaml-mirage-types.spec | 2 -- SPECS/ocaml-netdev.spec | 2 -- SPECS/ocaml-obuild.spec | 1 - SPECS/ocaml-oclock.spec | 2 -- SPECS/ocaml-ocplib-endian.spec | 2 -- SPECS/ocaml-odn.spec | 2 -- SPECS/ocaml-qmp.spec | 2 -- SPECS/ocaml-re.spec | 2 -- SPECS/ocaml-rpc.spec | 4 ---- SPECS/ocaml-sha.spec | 2 -- SPECS/ocaml-ssl.spec | 3 --- SPECS/ocaml-stdext.spec | 2 -- SPECS/ocaml-tapctl.spec | 3 --- SPECS/ocaml-tar.spec | 2 -- SPECS/ocaml-uri.spec | 2 -- SPECS/ocaml-uuidm.spec | 2 -- SPECS/ocaml-uutf.spec | 1 - SPECS/ocaml-vhd.spec | 2 -- SPECS/ocaml-xcp-idl.spec | 11 ----------- SPECS/ocaml-xcp-inventory.spec | 3 --- SPECS/ocaml-xcp-rrd.spec | 2 -- SPECS/ocaml-xen-api-client.spec | 2 -- SPECS/ocaml-xen-api-libs-transitional.spec | 2 -- SPECS/ocaml-xen-lowlevel-libs.spec | 2 -- SPECS/ocaml-xenops.spec | 2 -- SPECS/ocaml-xenstore-clients.spec | 2 -- SPECS/ocaml-xenstore.spec | 2 -- SPECS/ocaml-yojson.spec | 2 -- SPECS/ocaml-zed.spec | 2 -- SPECS/optcomp.spec | 2 -- SPECS/xmlm.spec | 2 -- 45 files changed, 102 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 44892e74..0403a049 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -11,8 +11,6 @@ Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRequires: easy-format BuildRequires: ocaml BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description Binary data format designed for speed, safety, ease of use and backward diff --git a/SPECS/cmdliner.spec b/SPECS/cmdliner.spec index aa7b6858..ad259c97 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/cmdliner.spec @@ -9,8 +9,6 @@ Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version} BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml -Requires: ocaml-findlib %description Cmdliner is an OCaml module for the declarative definition of command line diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 6b5d3560..5e129fd0 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -7,7 +7,6 @@ Group: Development/Other URL: http://mjambon.com/cppo.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRequires: ocaml -Requires: ocaml %description Equivalent of the C preprocessor for OCaml. diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 22191b0c..ad0c334e 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -9,8 +9,6 @@ Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description Extension to OCaml for deriving functions from type declarations diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index 99bd04e6..d8313704 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -8,8 +8,6 @@ URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description Easy_format: indentation made easy. diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 90e7a68d..a9765e9e 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -17,7 +17,6 @@ BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel -Requires: ocaml-rpc Requires: ocaml-rpc-devel Requires: redhat-lsb-core Requires(post): chkconfig diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 2f69c1b9..2ec19b69 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -16,10 +16,6 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc Requires: deriving-ocsigen-devel -Requires: ocaml -Requires: ocaml-camlp4-devel -Requires: ocaml-findlib -Requires: ocaml-findlib-devel Requires: ocaml-lwt-devel %description diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 38a57dca..9be43fa5 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -11,8 +11,6 @@ Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/c BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild -Requires: ocaml -Requires: ocaml-findlib %description Simple C bindings which allow the state of CDROM devices (and discs diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 2230952e..c5a7bb9d 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -20,8 +20,6 @@ BuildRequires: ocaml-uri-devel # should these be inherited from ssl.spec somehow? BuildRequires: openssl BuildRequires: openssl-devel -Requires: ocaml -Requires: ocaml-findlib %description An HTTP library for OCaml. diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index e56dd5ea..c68126b9 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocplib-endian-devel -Requires: ocaml -Requires: ocaml-findlib Requires: ocaml-ocplib-endian-devel #XXX ocaml-cstruct should require caml-ocplib-endian, not -devel diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index b5c68408..5de52ca7 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -10,8 +10,6 @@ URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description Bindings to sendmsg/recvmsg for fd passing under Linux. diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index a00770ba..8f0bebff 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ounit-devel -Requires: ocaml -Requires: ocaml-findlib %description This library implements support for efficient handling of I/O memory pages on Unix and Xen. diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index a51113d3..65b62c5a 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -16,8 +16,6 @@ BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-react-devel BuildRequires: ocaml-zed-devel -Requires: ocaml -Requires: ocaml-findlib %description Lambda-Term is a cross-platform library for manipulating the terminal. diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 6d8ae3dd..04a0f45a 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -12,8 +12,6 @@ BuildRequires: libuuid-devel BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: xen-devel -Requires: ocaml -Requires: ocaml-findlib %description Simple C bindings which allow .vhd files to be manipulated. diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 254f2a44..37f058d5 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -16,8 +16,6 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-ipaddr-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ounit-devel -Requires: ocaml -Requires: ocaml-findlib %description This library contains interfaces to build applications that are compatible with the Mirage operating system. It defines only interfaces, and no concrete modules. diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 6c3c0bb1..25b7f746 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xcp-idl-devel -Requires: ocaml -Requires: ocaml-findlib %description Manipulate Linux bridges, network devices and openvswitch instances in OCaml. diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index 98aa2c91..cf6afe1d 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -9,7 +9,6 @@ Group: Development/Other URL: http://github.com/vincenthz/obuild Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz BuildRequires: ocaml -Requires: ocaml %description The goal is to make a very simple build system for users and developers diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index f041b0af..ef2365c7 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -12,8 +12,6 @@ Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir BuildRequires: ocaml BuildRequires: ocaml-findlib-devel -Requires: ocaml -Requires: ocaml-findlib %description A POSIX monotonic clock for OCaml diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index c48226da..e76d6e25 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml-camlp4 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: optcomp -Requires: ocaml -Requires: ocaml-findlib %description Optimised functions to read and write int16/32/64 from strings and diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index 3d76a330..d9dcbc57 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -15,8 +15,6 @@ BuildRequires: ocaml-type-conv >= 108.07.01 BuildRequires: ocaml-ounit-devel >= 2.0.0 BuildRequires: ocaml-fileutils-devel >= 0.4.0 -Requires: ocaml - %description diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index cbfd6adb..04518b6b 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-yojson-devel -Requires: ocaml -Requires: ocaml-findlib %description An implementation of the Qemu Message Protocol (QMP) that allows diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index d89d195e..16823268 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -11,8 +11,6 @@ Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{nam BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml -Requires: ocaml-findlib %description A regular expression library for OCaml. diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 2970e1b2..d0224c94 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -14,10 +14,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-type-conv BuildRequires: xmlm-devel -Requires: ocaml -Requires: ocaml-camlp4-devel -Requires: ocaml-findlib -Requires: ocaml-type-conv %description Am RPC library for OCaml. diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index effaf953..84524070 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -9,8 +9,6 @@ Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{v BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description This is a set of C bindings for computing SHA digests. diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 5fe589ea..2a3e704e 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -11,9 +11,6 @@ Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{versi BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: openssl-devel -Requires: ocaml -Requires: ocaml-findlib -Requires: openssl %description Use OpenSSL from OCaml. diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 23ca892c..be8d51c4 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -12,8 +12,6 @@ BuildRequires: ocaml BuildRequires: ocaml-fd-send-recv-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-uuidm-devel -Requires: ocaml -Requires: ocaml-findlib %description Deprecated misc library functions for OCaml. diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 8d683df2..989d4325 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -16,9 +16,6 @@ BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xcp-idl-devel -Requires: forkexecd-devel -Requires: ocaml -Requires: ocaml-findlib %description Manipulate running tapdisk instances on a xen host. diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index dab8c4c4..f1572614 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -16,8 +16,6 @@ BuildRequires: ocaml-re-devel # These are build requires which should be requires of some of the -devel # packages -- update the devel packages later BuildRequires: ocaml-camlp4-devel -Requires: ocaml -Requires: ocaml-findlib %description This is a pure OCaml library for reading and writing tar-format data. diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 86e7be8b..77f5a2c0 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-re-devel -Requires: ocaml -Requires: ocaml-findlib %description A URI library for OCaml. diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 53c129cb..af12c686 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -11,8 +11,6 @@ Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml -Requires: ocaml-findlib %description Uuidm is an OCaml module implementing 128 bits universally unique diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 86915d0c..6c486402 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -9,7 +9,6 @@ Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml %description Uutf is an non-blocking streaming Unicode codec for OCaml to decode and diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 45489ad3..9967a87d 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -18,8 +18,6 @@ BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-mirage-types-devel -Requires: ocaml -Requires: ocaml-findlib %description A pure OCaml parser and printer for vhd format data. The library allows diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 56d488b0..78ee0350 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -23,17 +23,6 @@ BuildRequires: ocaml-ounit-devel # XXX transitive dependencies of message-switch-devel BuildRequires: ocaml-oclock-devel -# "uri" -#"re" -# "cohttp" -# "xmlm" -# "rpc" {> "1.4.0"} -# "ocamlfind" -# "syslog" -# "message_switch" -Requires: ocaml -Requires: ocaml-findlib - %description Common interface definitions for XCP services. diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 27c1cca0..2acdd45c 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -23,9 +23,6 @@ Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: ocaml -Requires: ocaml-findlib - %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index a0056d2a..146a9578 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel -Requires: ocaml -Requires: ocaml-findlib %description Round-Robin Datasources in OCaml. diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index fbaf2674..18378602 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -20,8 +20,6 @@ BuildRequires: ocaml-uri-devel BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: xmlm-devel -Requires: ocaml -Requires: ocaml-findlib %description XenAPI Client is an OCaml library implementing XenServer's XenAPI. diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index f3ef8b93..e6477a9b 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -21,8 +21,6 @@ BuildRequires: ocaml-xenstore-clients-devel BuildRequires: xen-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xcp-idl-devel -Requires: ocaml -Requires: ocaml-findlib Requires: xen-libs %description diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 8dfaf772..7e2c801b 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -17,8 +17,6 @@ BuildRequires: libuuid-devel BuildRequires: ocaml-lwt-devel BuildRequires: xen-devel BuildRequires: ocaml-cstruct-devel -Requires: ocaml -Requires: ocaml-findlib %description Xen hypercall bindings for OCaml. diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 40e782a3..404834e0 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -20,8 +20,6 @@ BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel -Requires: ocaml -Requires: ocaml-findlib %description Low-level xen control operations in OCaml. diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 9d193d33..014a95bd 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-xenstore-devel -Requires: ocaml -Requires: ocaml-findlib %description Unix xenstore clients for OCaml. diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 171c1c2b..10595a5c 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc -Requires: ocaml -Requires: ocaml-findlib Conflicts: xen-ocaml %description diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 519984a5..ac71249a 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -13,8 +13,6 @@ BuildRequires: cppo BuildRequires: easy-format BuildRequires: ocaml BuildRequires: ocaml-findlib -Requires: ocaml -Requires: ocaml-findlib %description A JSON parser and printer for OCaml. diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index f52467d8..b2e78bb6 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml-camomile-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-react-devel -Requires: ocaml -Requires: ocaml-findlib %description Zed is an abstract engine for text edition. It can be used for writing diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index a6a7dafd..71cfabcd 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -7,11 +7,9 @@ Group: Development/Other URL: http://forge.ocamlcore.org/projects/optcomp/ Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml %description Optional compilation with cpp-like directives. diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index d27b55fe..0f867c5d 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -9,8 +9,6 @@ Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version} BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Requires: ocaml -Requires: ocaml-findlib %description Xmlm is an OCaml module providing streaming XML input/output. It aims at From 52c508d0e575b3a8ac11bd0c0c45e9f34d6e577b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 10:53:08 +0000 Subject: [PATCH 0774/1125] biniou: Move files to devel package, add empty base package This split between base and devel packages is not correct. It is stopgap to let us fix other packages build requirements. We will fix the package properly in a future commit. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 13 ++++++++++++- SPECS/ocaml-yojson.spec | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index 0403a049..d0721fd6 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -16,6 +16,15 @@ BuildRequires: ocaml-findlib Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + %prep %setup -q @@ -28,8 +37,10 @@ export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} - %files +#This space intentionally left blank + +%files devel %doc LICENSE README.md %{_libdir}/ocaml/biniou/* %{_bindir}/bdump diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index ac71249a..ee69a9ea 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -8,7 +8,7 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -BuildRequires: biniou +BuildRequires: biniou-devel BuildRequires: cppo BuildRequires: easy-format BuildRequires: ocaml From 5d15ca95556cf35c05770b14c71d770432968d42 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 10:55:41 +0000 Subject: [PATCH 0775/1125] easy-format: Move files to devel package, add empty base package This split between base and devel packages is not correct. It is stopgap to let us fix other packages build requirements. We will fix the package properly in a future commit. Signed-off-by: Euan Harris --- SPECS/biniou.spec | 2 +- SPECS/easy-format.spec | 13 ++++++++++++- SPECS/ocaml-yojson.spec | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/SPECS/biniou.spec b/SPECS/biniou.spec index d0721fd6..62547311 100644 --- a/SPECS/biniou.spec +++ b/SPECS/biniou.spec @@ -8,7 +8,7 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz -BuildRequires: easy-format +BuildRequires: easy-format-devel BuildRequires: ocaml BuildRequires: ocaml-findlib diff --git a/SPECS/easy-format.spec b/SPECS/easy-format.spec index d8313704..39a954c1 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/easy-format.spec @@ -12,6 +12,15 @@ BuildRequires: ocaml-findlib %description Easy_format: indentation made easy. +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + %prep %setup -q @@ -23,8 +32,10 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install - %files +#This space intentionally left blank + +%files devel %doc LICENSE README %{_libdir}/ocaml/easy-format/* diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index ee69a9ea..a16aa81f 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -10,7 +10,7 @@ URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRequires: biniou-devel BuildRequires: cppo -BuildRequires: easy-format +BuildRequires: easy-format-devel BuildRequires: ocaml BuildRequires: ocaml-findlib From 08a95424456ed170d11c0431949b730061f91a6d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 10:56:22 +0000 Subject: [PATCH 0776/1125] ocaml-sexplib: Move files to devel package, add empty base package This split between base and devel packages is not correct. It is stopgap to let us fix other packages build requirements. We will fix the package properly in a future commit. Signed-off-by: Euan Harris --- SPECS/ocaml-sexplib.spec | 13 ++++++++++++- SPECS/xenopsd.spec | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 69ce7f34..eaea7c48 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -20,6 +20,15 @@ BuildRequires: ocaml-type-conv %description Convert values to and from s-expressions in OCaml. +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + %prep %setup -q -n sexplib-%{version} @@ -32,8 +41,10 @@ export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install - %files +#This space intentionally left blank + +%files devel %doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt %{_libdir}/ocaml/sexplib diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a5e45b92..a5c118d1 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -27,7 +27,7 @@ BuildRequires: ocaml-uuidm-devel BuildRequires: libvirt-devel BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-qmp-devel -BuildRequires: ocaml-sexplib +BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel From af25172feed4cd26ab110911b6032b96ac4f89f9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 11:11:03 +0000 Subject: [PATCH 0777/1125] SPECS: Fix build dependencies on non-devel packages In general, a package should BuildRequire a -devel package, not a base package. Tools, such as ocaml and ocamlfind, are exceptions to this general rule. Signed-off-by: Euan Harris --- SPECS/js_of_ocaml.spec | 1 - SPECS/message-switch.spec | 7 +++---- SPECS/ocaml-cohttp.spec | 3 +-- SPECS/ocaml-cstruct.spec | 1 - SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 1 - SPECS/ocaml-odn.spec | 2 +- SPECS/ocaml-ounit.spec | 1 - SPECS/ocaml-react.spec | 2 +- SPECS/ocaml-sexplib.spec | 1 - SPECS/ocaml-text.spec | 2 +- SPECS/ocaml-type-conv.spec | 1 - SPECS/ocaml-xen-api-client.spec | 1 - SPECS/ocamlify.spec | 2 +- SPECS/vhd-tool.spec | 1 - SPECS/xapi.spec | 1 - 16 files changed, 9 insertions(+), 20 deletions(-) diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 2ec19b69..5d7ad714 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -11,7 +11,6 @@ Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRequires: deriving-ocsigen-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index c3522b32..2bda6be3 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -10,9 +10,6 @@ Source1: message-switch-init BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xenstore-devel @@ -23,9 +20,11 @@ BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-ssl-devel -BuildRequires: openssl BuildRequires: openssl-devel Requires: redhat-lsb-core +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts # "ocamlfind" # "cohttp" {= "0.9.7"} # "rpc" diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index c5a7bb9d..0bfbf63a 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -17,8 +17,7 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-uri-devel -# should these be inherited from ssl.spec somehow? -BuildRequires: openssl +# should this be inherited from ssl.spec somehow? BuildRequires: openssl-devel %description diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index c68126b9..ddb9f4fc 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -9,7 +9,6 @@ Group: Development/Libraries URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index ef2365c7..ea16e49b 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -11,7 +11,7 @@ Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir BuildRequires: ocaml -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib %description A POSIX monotonic clock for OCaml diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index e76d6e25..8cafb04a 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -9,7 +9,6 @@ Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: optcomp diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index d9dcbc57..dc34410e 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -9,7 +9,7 @@ URL: https://forge.ocamlcore.org/projects/odn/ Source0: https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-%{version}.tar.gz BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-type-conv >= 108.07.01 BuildRequires: ocaml-ounit-devel >= 2.0.0 diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 5a8f5d54..93fceb11 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -14,7 +14,6 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index e518956e..b96156fb 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -15,7 +15,7 @@ Source0: http://erratique.ch/software/react/releases/react-%{version}.tbz Source1: react-LICENSE BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc %description diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index eaea7c48..f063bc06 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -12,7 +12,6 @@ Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/se BuildRequires: ocaml >= 4.00.0 BuildRequires: ocaml-findlib -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-type-conv diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index d07cea6f..49521bca 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -13,7 +13,7 @@ Source0: http://forge.ocamlcore.org/frs/download.php/937/%{name}-%{versio ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index e7cea4de..1630c17c 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -13,7 +13,6 @@ Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/ty BuildRequires: ocaml >= 4.00.0 BuildRequires: ocaml-findlib -BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 18378602..d73734ad 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -17,7 +17,6 @@ BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-uri-devel -BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: xmlm-devel diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec index ef4dac7b..b48adcdb 100644 --- a/SPECS/ocamlify.spec +++ b/SPECS/ocamlify.spec @@ -9,7 +9,7 @@ Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib %description diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 5a197f57..2ec896f4 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -35,7 +35,6 @@ BuildRequires: ocaml-sha-devel BuildRequires: ocaml-tar-devel BuildRequires: message-switch-devel BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: openssl BuildRequires: openssl-devel %description diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index f5285913..117d9f97 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -17,7 +17,6 @@ BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml BuildRequires: pam-devel BuildRequires: tetex-latex BuildRequires: xen-devel From 42a78562c6f1ef9ea2bdfa4dc865865963f73b83 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 12:51:22 +0000 Subject: [PATCH 0778/1125] biniou: Rename to ocaml-biniou Signed-off-by: Euan Harris --- SPECS/{biniou.spec => ocaml-biniou.spec} | 7 ++++--- SPECS/ocaml-yojson.spec | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) rename SPECS/{biniou.spec => ocaml-biniou.spec} (87%) diff --git a/SPECS/biniou.spec b/SPECS/ocaml-biniou.spec similarity index 87% rename from SPECS/biniou.spec rename to SPECS/ocaml-biniou.spec index 62547311..3ed8e117 100644 --- a/SPECS/biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -1,16 +1,17 @@ %define debug_package %{nil} -Name: biniou +Name: ocaml-biniou Version: 1.0.6 Release: 1%{?dist} Summary: Compact, fast and extensible serialization format License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html -Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz +Source0: http://mjambon.com/releases/biniou/biniou-%{version}.tar.gz BuildRequires: easy-format-devel BuildRequires: ocaml BuildRequires: ocaml-findlib +Obsoletes: biniou <= 1.0.6 %description Binary data format designed for speed, safety, ease of use and backward @@ -26,7 +27,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n biniou-%{version} %build make diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index a16aa81f..e952643c 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -8,10 +8,10 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -BuildRequires: biniou-devel BuildRequires: cppo BuildRequires: easy-format-devel BuildRequires: ocaml +BuildRequires: ocaml-biniou-devel BuildRequires: ocaml-findlib %description From 2d14a1b04ed7c02c156a44e0546cfb16cb475c4b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 12:52:39 +0000 Subject: [PATCH 0779/1125] easy-format: Rename to ocaml-easy-format Signed-off-by: Euan Harris --- SPECS/ocaml-biniou.spec | 2 +- SPECS/{easy-format.spec => ocaml-easy-format.spec} | 7 ++++--- SPECS/ocaml-yojson.spec | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) rename SPECS/{easy-format.spec => ocaml-easy-format.spec} (82%) diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec index 3ed8e117..ae2cf21b 100644 --- a/SPECS/ocaml-biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -8,8 +8,8 @@ License: BSD3 Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/biniou/biniou-%{version}.tar.gz -BuildRequires: easy-format-devel BuildRequires: ocaml +BuildRequires: ocaml-easy-format-devel BuildRequires: ocaml-findlib Obsoletes: biniou <= 1.0.6 diff --git a/SPECS/easy-format.spec b/SPECS/ocaml-easy-format.spec similarity index 82% rename from SPECS/easy-format.spec rename to SPECS/ocaml-easy-format.spec index 39a954c1..228c7f38 100644 --- a/SPECS/easy-format.spec +++ b/SPECS/ocaml-easy-format.spec @@ -1,13 +1,14 @@ -Name: easy-format +Name: ocaml-easy-format Version: 1.0.1 Release: 1%{?dist} Summary: Indentation made easy License: BSD3 Group: Development/Libraries URL: http://mjambon.com/easy-format.html -Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz +Source0: http://mjambon.com/releases/easy-format/easy-format-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib +Obsoletes: easy-format <= 1.0.1 %description Easy_format: indentation made easy. @@ -22,7 +23,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n easy-format-%{version} %build make diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index e952643c..ca4731f3 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -9,9 +9,9 @@ Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRequires: cppo -BuildRequires: easy-format-devel BuildRequires: ocaml BuildRequires: ocaml-biniou-devel +BuildRequires: ocaml-easy-format-devel BuildRequires: ocaml-findlib %description From d44ce4f07d93b3082eb8b8040d246c0e3f035787 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 12:57:10 +0000 Subject: [PATCH 0780/1125] cmdliner: Rename to ocaml-cmdliner Signed-off-by: Euan Harris --- SPECS/ffs.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/{cmdliner.spec => ocaml-cmdliner.spec} | 7 ++++--- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-qmp.spec | 2 +- SPECS/ocaml-vhd.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 +- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- SPECS/sm-cli.spec | 2 +- SPECS/vhd-tool.spec | 2 +- SPECS/xapi-libvirt-storage.spec | 2 +- SPECS/xapi.spec | 2 +- SPECS/xcp-networkd.spec | 2 +- SPECS/xenops-cli.spec | 2 +- SPECS/xenopsd.spec | 2 +- 16 files changed, 19 insertions(+), 18 deletions(-) rename SPECS/{cmdliner.spec => ocaml-cmdliner.spec} (88%) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index c00182be..dafc27bd 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -13,7 +13,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel BuildRequires: libuuid-devel diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 2bda6be3..b254b16a 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -15,7 +15,7 @@ BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-uri-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-oclock-devel diff --git a/SPECS/cmdliner.spec b/SPECS/ocaml-cmdliner.spec similarity index 88% rename from SPECS/cmdliner.spec rename to SPECS/ocaml-cmdliner.spec index ad259c97..c28c1c79 100644 --- a/SPECS/cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -1,14 +1,15 @@ -Name: cmdliner +Name: ocaml-cmdliner Version: 0.9.3 Release: 1%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 Group: Development/Other URL: http://erratique.ch/software/cmdliner -Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz +Source0: http://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc +Obsoletes: cmdliner <= 0.9.3 %description Cmdliner is an OCaml module for the declarative definition of command line @@ -28,7 +29,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n cmdliner-%{version} %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 00109a0c..7cd662d9 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -8,9 +8,9 @@ URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz -BuildRequires: cmdliner-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lwt-devel diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 04518b6b..d9a43358 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -8,8 +8,8 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: cmdliner-devel BuildRequires: ocaml +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-ounit-devel diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 9967a87d..ee5b2f70 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -8,9 +8,9 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: cmdliner-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 78ee0350..c5991512 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -10,8 +10,8 @@ URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-findlib -BuildRequires: cmdliner-devel BuildRequires: message-switch-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-fd-send-recv-devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 2acdd45c..85042550 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -8,8 +8,8 @@ License: LGPL2.1 + OCaml linking exception Group: Development/Libraries URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz -BuildRequires: cmdliner-devel BuildRequires: ocaml +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-obuild BuildRequires: ocaml-stdext-devel diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 7e2c801b..22352937 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -10,9 +10,9 @@ URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -BuildRequires: cmdliner-devel BuildRequires: libuuid-devel BuildRequires: ocaml-lwt-devel BuildRequires: xen-devel diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 58c9b05e..c7b5f7a4 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-obuild BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 2ec896f4..a572d290 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -25,7 +25,7 @@ BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: git BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xenstore-devel diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index 69f67d1d..b29192ab 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -15,7 +15,7 @@ BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-oclock-devel diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 117d9f97..49896556 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -38,7 +38,7 @@ BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: git BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xenstore-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 480998ae..42073bf5 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -21,7 +21,7 @@ BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-xen-api-client-devel diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 5e7bf019..25fef957 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -9,7 +9,7 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{versio BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-obuild BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a5c118d1..21adf5f1 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel BuildRequires: forkexecd-devel From 86f6a6d85afd72859afa5e65fcbf8e778fb36034 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 13:13:03 +0000 Subject: [PATCH 0781/1125] mappkgname: Update RPM names for biniou, easy-format and cmdliner Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index aa95334a..3f884dda 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -7,11 +7,11 @@ MAPPING = { # Our packages - "biniou": ["libbiniou-ocaml"], - "cmdliner": ["libcmdliner-ocaml"], + "ocaml-biniou": ["libbiniou-ocaml"], + "ocaml-cmdliner": ["libcmdliner-ocaml"], "cppo": ["cppo"], "deriving-ocsigen": ["libderiving-ocsigen-ocaml"], - "easy-format": ["libeasy-format-ocaml"], + "ocaml-easy-format": ["libeasy-format-ocaml"], "eliloader": ["eliloader"], "linux-guest-loader": ["linux-guest-loader"], "xcp-python-libs": ["xcp-python-libs"], @@ -166,8 +166,6 @@ "camlp4-dev": ["camlp4"], "camlp4-extra-dev": ["camlp4-extra"], # packages with 'ocaml' or 'camlp4' in the name must have a -dev... - "libeasy-format-ocaml": ["libeasy-format-ocaml-dev"], - "libbiniou-ocaml": ["libbiniou-ocaml-dev"], "libssl1.0.0-dev": ["libssl-dev"], "libtype-conv-camlp4": ["libtype-conv-camlp4-dev"], "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], From b427a468e665a4d1edb69d0f1959e2b2eb690818 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 10:23:54 +0100 Subject: [PATCH 0782/1125] README: Remove references to xenserver-core Signed-off-by: Euan Harris --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 91f000ee..62941d60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -xenserver-core -============== +buildroot +========= Buildroot for xen-api and related packages, producing RPM and (experimentally) Debian packages. @@ -30,17 +30,17 @@ passwd su - ``` -You are now ready to clone the xenserver-core repository and build the packages: +You are now ready to clone the buildroot repository and build the packages: ``` -git clone git://github.com/xenserver/xenserver-core.git -cd xenserver-core +git clone git://github.com/xenserver/buildroot.git +cd buildroot ./configure.sh make ``` -Finally, install the packages you have just built, run the install wizard to configure your system to boot Xen and start the xenserver-core components on boot, then reboot: +Finally, install the packages you have just built, run the install wizard to configure your system to boot Xen and start the buildroot components on boot, then reboot: ``` make install xenserver-install-wizard @@ -66,8 +66,8 @@ deb-src http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main The steps to build Debian packages are the same as those to build RPMs: ``` -git clone git://github.com/xenserver/xenserver-core.git -cd xenserver-core +git clone git://github.com/xenserver/buildroot.git +cd buildroot ./configure.sh make From d5536f9ed02e7af9da2c0df717181ac0c6856df7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 12:43:56 +0100 Subject: [PATCH 0783/1125] mappkgname: libsexplib-camlp4 now defines a proper -dev package Previously we artificially renamed ocaml-sexplib to be a -dev package on Debian because the package naming rules required it. Now that ocaml-sexplib defines a proper devel package this is not needed. Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 3f884dda..f87839b5 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -169,7 +169,6 @@ "libssl1.0.0-dev": ["libssl-dev"], "libtype-conv-camlp4": ["libtype-conv-camlp4-dev"], "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], - "libsexplib-camlp4": ["libsexplib-camlp4-dev"], "ocaml-findlib-dev": ["ocaml-findlib", "libfindlib-ocaml-dev"], "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], "libvirt0-dev": ["libvirt-dev"], From cd94fb717e241e837eefe64c54dc51bf407381e1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 12:45:02 +0100 Subject: [PATCH 0784/1125] ocaml-tapctl: Add devel package dependency needed by Debian build Signed-off-by: Euan Harris --- SPECS/ocaml-tapctl.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 989d4325..6714dcdc 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -24,6 +24,7 @@ Manipulate running tapdisk instances on a xen host. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: forkexecd-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for From abc1705b7f114aca5f1951c1e9ef38aa35846a98 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 15:41:27 +0100 Subject: [PATCH 0785/1125] Mock: Don't store cache and chroot in workspace This was originally done to make it possible to run builds from different workspaces simultaneously on the same build machine. However storing the chroot in the workspace has its own problems (several hundred megabytes of root-owned files in the workspace). Container techniques such as Docker or Vagrant are better solutions to this problem. Reverts 18c6b64720beaa25dfd991f9d56da3ea70f58d5c Signed-off-by: Euan Harris --- scripts/rpm/xenserver.cfg.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in index 53ab90f9..06ff7558 100644 --- a/scripts/rpm/xenserver.cfg.in +++ b/scripts/rpm/xenserver.cfg.in @@ -3,8 +3,6 @@ config_opts['target_arch'] = 'x86_64' config_opts['legal_host_arches'] = ('x86_64',) config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build' config_opts['dist'] = 'el6' # only useful for --resultdir variable subst -config_opts['basedir'] = '@PWD@/mock/root' -config_opts['cache_topdir'] = '@PWD@/mock/cache' config_opts['plugin_conf']['package_state_enable'] = False config_opts['plugin_conf']['tmpfs_enable'] = True From b82ce4972daae74b33547f78c06a70144ebad8f6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Apr 2014 17:35:43 +0000 Subject: [PATCH 0786/1125] Update to xcp-idl 0.9.15 Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index c5991512..fc15df11 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,13 +1,14 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.14 +Version: 0.9.15 Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL Group: Development/Libraries URL: https://github.com/xapi-project/xcp-idl -Source0: https://github.com/djs55/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz + BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-cmdliner-devel @@ -58,6 +59,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/xcp/* %changelog +* Fri Apr 25 2014 David Scott - 0.9.15-1 +- Update to 0.9.15, now with vGPU and SR.probe + * Thu Sep 26 2013 David Scott - 0.9.14-1 - Support searching for executables on the XCP_PATH as well as the PATH From 8c4a5b180a2f43f4432004d8a2666fe808409ef6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 24 Apr 2014 21:17:29 +0000 Subject: [PATCH 0787/1125] Add ocaml-{ctypes,opasswd}, dependencies of modern xapi Signed-off-by: David Scott --- SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch | 13 +++++ SOURCES/ocaml-opasswd-ocaml-4.00.1.patch | 39 +++++++++++++ SPECS/ocaml-ctypes.spec | 65 ++++++++++++++++++++++ SPECS/ocaml-opasswd.spec | 65 ++++++++++++++++++++++ SPECS/xapi.spec | 1 + 5 files changed, 183 insertions(+) create mode 100644 SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch create mode 100644 SOURCES/ocaml-opasswd-ocaml-4.00.1.patch create mode 100644 SPECS/ocaml-ctypes.spec create mode 100644 SPECS/ocaml-opasswd.spec diff --git a/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch b/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch new file mode 100644 index 00000000..8924b154 --- /dev/null +++ b/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index ee70aa8..6d6a461 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ VPATH=src examples + BUILDDIR=_build + PROJECTS=configure configured ctypes ctypes-foreign-base ctypes-foreign-threaded ctypes-foreign-unthreaded ctypes-top + GENERATED=src/ctypes_config.h src/ctypes_config.ml setup.data src/ctypes/ctypes_primitives.ml +-CFLAGS=-fPIC -Wall -O3 $(OCAML_FFI_INCOPTS) ++CFLAGS=-std=gnu99 -fPIC -Wall -O3 $(OCAML_FFI_INCOPTS) + OCAML_FFI_INCOPTS=$(libffi_opt) + + # public targets diff --git a/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch b/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch new file mode 100644 index 00000000..9320bf8c --- /dev/null +++ b/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch @@ -0,0 +1,39 @@ +diff -ur ocaml-opasswd-0.9.0/lib/common.ml ocaml-opasswd-0.9.0.new/lib/common.ml +--- ocaml-opasswd-0.9.0/lib/common.ml 2013-10-30 19:25:11.000000000 +0000 ++++ ocaml-opasswd-0.9.0.new/lib/common.ml 2014-04-24 20:53:02.459679143 +0000 +@@ -1,3 +1,5 @@ ++let ( |> ) a b = b a ++ + let get_password name = + if Shadow.shadow_enabled () + then Shadow.(with_lock (fun () -> +diff -ur ocaml-opasswd-0.9.0/lib/passwd.ml ocaml-opasswd-0.9.0.new/lib/passwd.ml +--- ocaml-opasswd-0.9.0/lib/passwd.ml 2013-10-30 19:25:11.000000000 +0000 ++++ ocaml-opasswd-0.9.0.new/lib/passwd.ml 2014-04-24 20:52:04.155679390 +0000 +@@ -1,3 +1,5 @@ ++let ( |> ) a b = b a ++ + let passwd_file = "/etc/passwd" + + type ent = { +diff -ur ocaml-opasswd-0.9.0/lib/shadow.ml ocaml-opasswd-0.9.0.new/lib/shadow.ml +--- ocaml-opasswd-0.9.0/lib/shadow.ml 2013-10-30 19:25:11.000000000 +0000 ++++ ocaml-opasswd-0.9.0.new/lib/shadow.ml 2014-04-24 20:52:34.331682809 +0000 +@@ -1,3 +1,5 @@ ++let ( |> ) a b = b a ++ + let shadow_file = "/etc/shadow" + + type ent = { +Only in ocaml-opasswd-0.9.0.new: opasswd_test.native +Only in ocaml-opasswd-0.9.0.new: setup.bin +Only in ocaml-opasswd-0.9.0.new: setup.data +diff -ur ocaml-opasswd-0.9.0/test/opasswd_test.ml ocaml-opasswd-0.9.0.new/test/opasswd_test.ml +--- ocaml-opasswd-0.9.0/test/opasswd_test.ml 2013-10-30 19:25:11.000000000 +0000 ++++ ocaml-opasswd-0.9.0.new/test/opasswd_test.ml 2014-04-24 20:53:25.451682072 +0000 +@@ -1,3 +1,5 @@ ++let ( |> ) a b = b a ++ + open Unix + + open OPasswd diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec new file mode 100644 index 00000000..dea3f8f3 --- /dev/null +++ b/SPECS/ocaml-ctypes.spec @@ -0,0 +1,65 @@ +Name: ocaml-ctypes +Version: 0.2.2 +Release: 1%{?extrarelease} +Summary: Library for binding to C libraries using pure OCaml +License: MIT +Group: Development/Other +URL: https://github.com/ocamllabs/ocaml-ctypes/ +Source0: https://github.com/ocamllabs/%{name}/archive/%{name}-%{version}.tar.gz +Patch0: ocaml-ctypes-0.2.1-std-gnu99.patch +BuildRoot: %{_tmppath}/%{name}-%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib libffi-devel +Requires: ocaml ocaml-findlib + +%description +Library for binding to C libraries using pure OCaml + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 + +%build +make + +%install +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files +%doc README.md LICENSE CHANGES +%{_libdir}/ocaml/ctypes +%exclude %{_libdir}/ocaml/ctypes/*.a +%exclude %{_libdir}/ocaml/ctypes/*.cmxa +%exclude %{_libdir}/ocaml/ctypes/*.cmx +%exclude %{_libdir}/ocaml/ctypes/*.mli + +%files devel +%{_libdir}/ocaml/ctypes/*.a +%{_libdir}/ocaml/ctypes/*.cmx +%{_libdir}/ocaml/ctypes/*.cmxa +%{_libdir}/ocaml/ctypes/*.mli + +%changelog +* Thu Apr 24 2014 David Scott +- Fix the split between devel and main package, hopefully + +* Wed Nov 13 2013 Mike McClurg +- Initial package + diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec new file mode 100644 index 00000000..e2072de6 --- /dev/null +++ b/SPECS/ocaml-opasswd.spec @@ -0,0 +1,65 @@ +Name: ocaml-opasswd +Version: 0.9.0 +Release: 0 +Summary: OCaml interface to the glibc passwd/shadow password functions +License: ISC +Group: Development/Other +URL: http://github.com/xapi-project/ocaml-opasswd +Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: ocaml-opasswd-ocaml-4.00.1.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml ocaml-findlib ocaml-ctypes-devel +Requires: ocaml ocaml-findlib + +%description +This is an OCaml binding to the glibc passwd file and shadow password +file interface. It can be used to read, parse, manipulate and write +passwd and shadow files on Linux systems. It might also work on other +nixes, but it has not been tested. + +%package devel +Summary: Development files for %{name} +Group: Development/Other + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 + +%build +ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=ignore +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +ocaml setup.ml -install +rm -f %{buildroot}%{_libdir}/ocaml/usr/local/bin/opasswd_test + +%clean +rm -rf %{buildroot} + +%files +%doc README.md +%{_libdir}/ocaml/oPasswd +%exclude %{_libdir}/ocaml/oPasswd/*.a +%exclude %{_libdir}/ocaml/oPasswd/*.cmxa +%exclude %{_libdir}/ocaml/oPasswd/*.mli + +%files devel +%{_libdir}/ocaml/oPasswd/*.a +%{_libdir}/ocaml/oPasswd/*.cmxa +%{_libdir}/ocaml/oPasswd/*.mli + +%changelog +* Thu Apr 24 2014 David Scott +- Fix split between -devel and main package, hopefully + +* Thu Oct 31 2013 Mike McClurg +- Initial package + diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 49896556..b1b6a7ef 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -39,6 +39,7 @@ BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-opasswd-devel BuildRequires: git BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xenstore-devel From 13498c6dc794837cfe7f8fc34ba6b2e4a2c06139 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 25 Apr 2014 21:04:50 +0000 Subject: [PATCH 0788/1125] Update to ocaml-opasswd.0.9.3 Signed-off-by: David Scott --- SOURCES/ocaml-opasswd-ocaml-4.00.1.patch | 5376 +++++++++++++++++++++- SPECS/ocaml-opasswd.spec | 5 +- 2 files changed, 5358 insertions(+), 23 deletions(-) diff --git a/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch b/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch index 9320bf8c..6ff9830e 100644 --- a/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch +++ b/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch @@ -1,38 +1,5372 @@ -diff -ur ocaml-opasswd-0.9.0/lib/common.ml ocaml-opasswd-0.9.0.new/lib/common.ml ---- ocaml-opasswd-0.9.0/lib/common.ml 2013-10-30 19:25:11.000000000 +0000 -+++ ocaml-opasswd-0.9.0.new/lib/common.ml 2014-04-24 20:53:02.459679143 +0000 +diff -ur ocaml-opasswd-0.9.3/lib/common.ml ocaml-opasswd-0.9.3.new/lib/common.ml +--- ocaml-opasswd-0.9.3/lib/common.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/lib/common.ml 2014-04-25 20:40:06.899016589 +0000 @@ -1,3 +1,5 @@ +let ( |> ) a b = b a + let get_password name = if Shadow.shadow_enabled () then Shadow.(with_lock (fun () -> -diff -ur ocaml-opasswd-0.9.0/lib/passwd.ml ocaml-opasswd-0.9.0.new/lib/passwd.ml ---- ocaml-opasswd-0.9.0/lib/passwd.ml 2013-10-30 19:25:11.000000000 +0000 -+++ ocaml-opasswd-0.9.0.new/lib/passwd.ml 2014-04-24 20:52:04.155679390 +0000 +Only in ocaml-opasswd-0.9.3.new/lib: oPasswd.mldylib +Only in ocaml-opasswd-0.9.3.new/lib: oPasswd.mllib +diff -ur ocaml-opasswd-0.9.3/lib/passwd.ml ocaml-opasswd-0.9.3.new/lib/passwd.ml +--- ocaml-opasswd-0.9.3/lib/passwd.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/lib/passwd.ml 2014-04-25 20:40:27.158005796 +0000 @@ -1,3 +1,5 @@ +let ( |> ) a b = b a + - let passwd_file = "/etc/passwd" - - type ent = { -diff -ur ocaml-opasswd-0.9.0/lib/shadow.ml ocaml-opasswd-0.9.0.new/lib/shadow.ml ---- ocaml-opasswd-0.9.0/lib/shadow.ml 2013-10-30 19:25:11.000000000 +0000 -+++ ocaml-opasswd-0.9.0.new/lib/shadow.ml 2014-04-24 20:52:34.331682809 +0000 + open Ctypes + open Foreign + open PosixTypes +Only in ocaml-opasswd-0.9.3.new/lib: passwd.ml.orig +diff -ur ocaml-opasswd-0.9.3/lib/shadow.ml ocaml-opasswd-0.9.3.new/lib/shadow.ml +--- ocaml-opasswd-0.9.3/lib/shadow.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/lib/shadow.ml 2014-04-25 20:40:36.062010242 +0000 @@ -1,3 +1,5 @@ +let ( |> ) a b = b a + - let shadow_file = "/etc/shadow" + open Ctypes + open Foreign + open PosixTypes +Only in ocaml-opasswd-0.9.3.new/lib: shadow.ml.orig +diff -ur ocaml-opasswd-0.9.3/myocamlbuild.ml ocaml-opasswd-0.9.3.new/myocamlbuild.ml +--- ocaml-opasswd-0.9.3/myocamlbuild.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/myocamlbuild.ml 2014-04-25 20:41:58.375009980 +0000 +@@ -1,38 +1,49 @@ + (* OASIS_START *) +-(* DO NOT EDIT (digest: 1c4b57f82fbc5f8ea8a65966af99a4e9) *) ++(* DO NOT EDIT (digest: 7551fa6f61fa1c966dedee8d779fa527) *) + module OASISGettext = struct +-(* # 21 "src/oasis/OASISGettext.ml" *) ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ - type ent = { -Only in ocaml-opasswd-0.9.0.new: opasswd_test.native -Only in ocaml-opasswd-0.9.0.new: setup.bin -Only in ocaml-opasswd-0.9.0.new: setup.data -diff -ur ocaml-opasswd-0.9.0/test/opasswd_test.ml ocaml-opasswd-0.9.0.new/test/opasswd_test.ml ---- ocaml-opasswd-0.9.0/test/opasswd_test.ml 2013-10-30 19:25:11.000000000 +0000 -+++ ocaml-opasswd-0.9.0.new/test/opasswd_test.ml 2014-04-24 20:53:25.451682072 +0000 -@@ -1,3 +1,5 @@ + let ns_ str = + str + ++ + let s_ str = + str + +- let f_ (str : ('a, 'b, 'c, 'd) format4) = ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = + str + ++ + let fn_ fmt1 fmt2 n = + if n = 1 then + fmt1^^"" + else + fmt2^^"" + ++ + let init = + [] + ++ + end + + module OASISExpr = struct +-(* # 21 "src/oasis/OASISExpr.ml" *) ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ + + + + open OASISGettext + +- type test = string + +- type flag = string ++ type test = string ++ ++ ++ type flag = string ++ + + type t = + | EBool of bool +@@ -41,9 +52,11 @@ + | EOr of t * t + | EFlag of flag + | ETest of test * string +- + +- type 'a choices = (t * 'a) list ++ ++ ++ type 'a choices = (t * 'a) list ++ + + let eval var_get t = + let rec eval' = +@@ -75,6 +88,7 @@ + in + eval' t + ++ + let choose ?printer ?name var_get lst = + let rec choose_aux = + function +@@ -111,22 +125,27 @@ + in + choose_aux (List.rev lst) + ++ + end + + +-# 117 "myocamlbuild.ml" ++# 132 "myocamlbuild.ml" + module BaseEnvLight = struct +-(* # 21 "src/base/BaseEnvLight.ml" *) ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ + + module MapString = Map.Make(String) + ++ + type t = string MapString.t + ++ + let default_filename = + Filename.concat + (Sys.getcwd ()) + "setup.data" + ++ + let load ?(allow_empty=false) ?(filename=default_filename) () = + if Sys.file_exists filename then + begin +@@ -184,26 +203,29 @@ + filename) + end + +- let var_get name env = +- let rec var_expand str = +- let buff = +- Buffer.create ((String.length str) * 2) +- in +- Buffer.add_substitute +- buff +- (fun var -> +- try +- var_expand (MapString.find var env) +- with Not_found -> +- failwith +- (Printf.sprintf +- "No variable %s defined when trying to expand %S." +- var +- str)) +- str; +- Buffer.contents buff ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) + in +- var_expand (MapString.find name env) ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ + + let var_choose lst env = + OASISExpr.choose +@@ -212,87 +234,153 @@ + end + + +-# 215 "myocamlbuild.ml" ++# 237 "myocamlbuild.ml" + module MyOCamlbuildFindlib = struct +-(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) + +- (** OCamlbuild extension, copied from ++ ++ (** OCamlbuild extension, copied from + * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild + * by N. Pouillard and others + * + * Updated on 2009/02/28 + * +- * Modified by Sylvain Le Gall ++ * Modified by Sylvain Le Gall + *) + open Ocamlbuild_plugin + ++ + (* these functions are not really officially exported *) +- let run_and_read = ++ let run_and_read = + Ocamlbuild_pack.My_unix.run_and_read + +- let blank_sep_strings = ++ ++ let blank_sep_strings = + Ocamlbuild_pack.Lexers.blank_sep_strings + +- let split s ch = +- let x = +- ref [] ++ ++ let exec_from_conf exec = ++ let exec = ++ let env_filename = Pathname.basename BaseEnvLight.default_filename in ++ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in ++ try ++ BaseEnvLight.var_get exec env ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s\n" exec; ++ exec + in +- let rec go s = +- let pos = +- String.index s ch +- in +- x := (String.before s pos)::!x; +- go (String.after s (pos + 1)) ++ let fix_win32 str = ++ if Sys.os_type = "Win32" then begin ++ let buff = Buffer.create (String.length str) in ++ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. ++ *) ++ String.iter ++ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) ++ str; ++ Buffer.contents buff ++ end else begin ++ str ++ end + in +- try +- go s +- with Not_found -> !x ++ fix_win32 exec ++ ++ let split s ch = ++ let buf = Buffer.create 13 in ++ let x = ref [] in ++ let flush () = ++ x := (Buffer.contents buf) :: !x; ++ Buffer.clear buf ++ in ++ String.iter ++ (fun c -> ++ if c = ch then ++ flush () ++ else ++ Buffer.add_char buf c) ++ s; ++ flush (); ++ List.rev !x ++ + + let split_nl s = split s '\n' + ++ + let before_space s = + try + String.before s (String.index s ' ') + with Not_found -> s + +- (* this lists all supported packages *) ++ (* ocamlfind command *) ++ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] ++ ++ (* This lists all supported packages. *) + let find_packages () = + List.map before_space (split_nl & run_and_read "ocamlfind list") + +- (* this is supposed to list available syntaxes, but I don't know how to do it. *) ++ ++ (* Mock to list available syntaxes. *) + let find_syntaxes () = ["camlp4o"; "camlp4r"] + +- (* ocamlfind command *) +- let ocamlfind x = S[A"ocamlfind"; x] ++ ++ let well_known_syntax = [ ++ "camlp4.quotations.o"; ++ "camlp4.quotations.r"; ++ "camlp4.exceptiontracer"; ++ "camlp4.extend"; ++ "camlp4.foldgenerator"; ++ "camlp4.listcomprehension"; ++ "camlp4.locationstripper"; ++ "camlp4.macro"; ++ "camlp4.mapgenerator"; ++ "camlp4.metagenerator"; ++ "camlp4.profiler"; ++ "camlp4.tracer" ++ ] ++ + + let dispatch = + function +- | Before_options -> +- (* by using Before_options one let command line options have an higher priority *) +- (* on the contrary using After_options will guarantee to have the higher priority *) +- (* override default commands by ocamlfind ones *) ++ | After_options -> ++ (* By using Before_options one let command line options have an higher ++ * priority on the contrary using After_options will guarantee to have ++ * the higher priority override default commands by ocamlfind ones *) + Options.ocamlc := ocamlfind & A"ocamlc"; + Options.ocamlopt := ocamlfind & A"ocamlopt"; + Options.ocamldep := ocamlfind & A"ocamldep"; + Options.ocamldoc := ocamlfind & A"ocamldoc"; +- Options.ocamlmktop := ocamlfind & A"ocamlmktop" +- ++ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; ++ Options.ocamlmklib := ocamlfind & A"ocamlmklib" ++ + | After_rules -> +- +- (* When one link an OCaml library/binary/package, one should use -linkpkg *) ++ ++ (* When one link an OCaml library/binary/package, one should use ++ * -linkpkg *) + flag ["ocaml"; "link"; "program"] & A"-linkpkg"; +- ++ + (* For each ocamlfind package one inject the -package option when + * compiling, computing dependencies, generating documentation and + * linking. *) +- List.iter ++ List.iter + begin fun pkg -> +- flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg]; +- flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg]; +- flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg]; +- flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; +- flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg]; +- end ++ let base_args = [A"-package"; A pkg] in ++ (* TODO: consider how to really choose camlp4o or camlp4r. *) ++ let syn_args = [A"-syntax"; A "camlp4o"] in ++ let args = ++ (* Heuristic to identify syntax extensions: whether they end in ++ ".syntax"; some might not. ++ *) ++ if Filename.check_suffix pkg "syntax" || ++ List.mem pkg well_known_syntax then ++ syn_args @ base_args ++ else ++ base_args ++ in ++ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; ++ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; ++ end + (find_packages ()); + + (* Like -package but for extensions syntax. Morover -syntax is useless +@@ -301,29 +389,34 @@ + flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; +- flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & ++ S[A"-syntax"; A syntax]; + end (find_syntaxes ()); + + (* The default "thread" tag is not compatible with ocamlfind. + * Indeed, the default rules add the "threads.cma" or "threads.cmxa" + * options when using this tag. When using the "-linkpkg" option with + * ocamlfind, this module will then be added twice on the command line. +- * ++ * + * To solve this, one approach is to add the "-thread" option when using + * the "threads" package using the previous plugin. + *) + flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); + flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); + flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); +- flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]) ++ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); + +- | _ -> ++ | _ -> + () +- + end + + module MyOCamlbuildBase = struct +-(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ + + (** Base functions for writing myocamlbuild.ml + @author Sylvain Le Gall +@@ -331,51 +424,61 @@ + + + ++ ++ + open Ocamlbuild_plugin + module OC = Ocamlbuild_pack.Ocaml_compiler + +- type dir = string +- type file = string +- type name = string +- type tag = string + +-(* # 56 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ type dir = string ++ type file = string ++ type name = string ++ type tag = string ++ ++ ++(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ + + type t = + { +- lib_ocaml: (name * dir list) list; +- lib_c: (name * dir * file list) list; ++ lib_ocaml: (name * dir list * string list) list; ++ lib_c: (name * dir * file list) list; + flags: (tag list * (spec OASISExpr.choices)) list; + (* Replace the 'dir: include' from _tags by a precise interdepends in + * directory. + *) +- includes: (dir * dir list) list; +- } ++ includes: (dir * dir list) list; ++ } ++ + + let env_filename = +- Pathname.basename ++ Pathname.basename + BaseEnvLight.default_filename + ++ + let dispatch_combine lst = + fun e -> +- List.iter ++ List.iter + (fun dispatch -> dispatch e) +- lst ++ lst ++ + + let tag_libstubs nm = + "use_lib"^nm^"_stubs" + ++ + let nm_libstubs nm = + nm^"_stubs" + +- let dispatch t e = +- let env = +- BaseEnvLight.load +- ~filename:env_filename ++ ++ let dispatch t e = ++ let env = ++ BaseEnvLight.load ++ ~filename:env_filename + ~allow_empty:true + () + in +- match e with ++ match e with + | Before_options -> + let no_trailing_dot s = + if String.length s >= 1 && s.[0] = '.' then +@@ -385,35 +488,44 @@ + in + List.iter + (fun (opt, var) -> +- try ++ try + opt := no_trailing_dot (BaseEnvLight.var_get var env) + with Not_found -> +- Printf.eprintf "W: Cannot get variable %s" var) ++ Printf.eprintf "W: Cannot get variable %s\n" var) + [ + Options.ext_obj, "ext_obj"; + Options.ext_lib, "ext_lib"; + Options.ext_dll, "ext_dll"; + ] + +- | After_rules -> ++ | After_rules -> + (* Declare OCaml libraries *) +- List.iter ++ List.iter + (function +- | nm, [] -> +- ocaml_lib nm +- | nm, dir :: tl -> ++ | nm, [], intf_modules -> ++ ocaml_lib nm; ++ let cmis = ++ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis ++ | nm, dir :: tl, intf_modules -> + ocaml_lib ~dir:dir (dir^"/"^nm); +- List.iter +- (fun dir -> ++ List.iter ++ (fun dir -> + List.iter + (fun str -> + flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) + ["compile"; "infer_interface"; "doc"]) +- tl) ++ tl; ++ let cmis = ++ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] ++ cmis) + t.lib_ocaml; + + (* Declare directories dependencies, replace "include" in _tags. *) +- List.iter ++ List.iter + (fun (dir, include_dirs) -> + Pathname.define_context dir include_dirs) + t.includes; +@@ -428,7 +540,7 @@ + + flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] + (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); +- ++ + flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] + (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); + +@@ -443,11 +555,11 @@ + + (* TODO: be more specific about what depends on headers *) + (* Depends on .h files *) +- dep ["compile"; "c"] ++ dep ["compile"; "c"] + headers; + + (* Setup search path for lib *) +- flag ["link"; "ocaml"; "use_"^lib] ++ flag ["link"; "ocaml"; "use_"^lib] + (S[A"-I"; P(dir)]); + ) + t.lib_c; +@@ -455,45 +567,48 @@ + (* Add flags *) + List.iter + (fun (tags, cond_specs) -> +- let spec = +- BaseEnvLight.var_choose cond_specs env ++ let spec = BaseEnvLight.var_choose cond_specs env in ++ let rec eval_specs = ++ function ++ | S lst -> S (List.map eval_specs lst) ++ | A str -> A (BaseEnvLight.var_expand str env) ++ | spec -> spec + in +- flag tags & spec) ++ flag tags & (eval_specs spec)) + t.flags +- | _ -> ++ | _ -> + () + ++ + let dispatch_default t = +- dispatch_combine ++ dispatch_combine + [ + dispatch t; + MyOCamlbuildFindlib.dispatch; + ] + ++ + end + + +-# 476 "myocamlbuild.ml" ++# 594 "myocamlbuild.ml" + open Ocamlbuild_plugin;; + let package_default = + { +- MyOCamlbuildBase.lib_ocaml = [("oPasswd", ["lib"])]; ++ MyOCamlbuildBase.lib_ocaml = [("oPasswd", ["lib"], [])]; + lib_c = []; + flags = + [ + (["oasis_library_opasswd_byte"; "ocaml"; "link"; "byte"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -503,16 +618,13 @@ + (["oasis_library_opasswd_native"; "ocaml"; "link"; "native"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -522,16 +634,13 @@ + (["oasis_library_opasswd_byte"; "ocaml"; "ocamldep"; "byte"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -541,16 +650,13 @@ + (["oasis_library_opasswd_native"; "ocaml"; "ocamldep"; "native"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -560,16 +666,13 @@ + (["oasis_library_opasswd_byte"; "ocaml"; "compile"; "byte"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -579,16 +682,13 @@ + (["oasis_library_opasswd_native"; "ocaml"; "compile"; "native"], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -599,16 +699,13 @@ + ], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -623,16 +720,13 @@ + ], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -647,16 +741,13 @@ + ], + [ + (OASISExpr.EBool true, +- S +- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" +- ]); ++ S [A "-warn-error"; A "+a"; A "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + S + [ + A "-warn-error"; + A "+a"; + A "-bin-annot"; +- A "-short-paths"; + A "-g"; + A "-runtime-variant"; + A "d"; +@@ -664,12 +755,12 @@ + ]) + ]) + ]; +- includes = [("test", ["lib"])]; +- } ++ includes = [("test", ["lib"])] ++ } + ;; + + let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; + +-# 674 "myocamlbuild.ml" ++# 765 "myocamlbuild.ml" + (* OASIS_STOP *) + Ocamlbuild_plugin.dispatch dispatch_default;; +diff -ur ocaml-opasswd-0.9.3/_oasis ocaml-opasswd-0.9.3.new/_oasis +--- ocaml-opasswd-0.9.3/_oasis 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/_oasis 2014-04-25 20:41:45.799012042 +0000 +@@ -18,10 +18,10 @@ + Pack: true + Modules: Passwd, Shadow, Common + BuildDepends: unix, ctypes, ctypes.foreign +- ByteOpt: -warn-error +a -bin-annot -short-paths ++ ByteOpt: -warn-error +a -bin-annot + if flag(extra_debugging) + ByteOpt+: -g -runtime-variant d -verbose +- NativeOpt: -warn-error +a -bin-annot -short-paths ++ NativeOpt: -warn-error +a -bin-annot + if flag(extra_debugging) + NativeOpt+: -g -runtime-variant d -verbose + +@@ -30,7 +30,7 @@ + BuildTools: ocamlbuild + MainIs: opasswd_test.ml + BuildDepends: oPasswd +- NativeOpt: -warn-error +a -bin-annot -short-paths ++ NativeOpt: -warn-error +a -bin-annot + if flag(extra_debugging) + NativeOpt+: -g -runtime-variant d -verbose + CompiledObject: best +Only in ocaml-opasswd-0.9.3.new: setup.bin +Only in ocaml-opasswd-0.9.3.new: setup.data +diff -ur ocaml-opasswd-0.9.3/setup.ml ocaml-opasswd-0.9.3.new/setup.ml +--- ocaml-opasswd-0.9.3/setup.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/setup.ml 2014-04-25 20:41:58.402009979 +0000 +@@ -1,48 +1,58 @@ + (* setup.ml generated for the first time by OASIS v0.3.0 *) + + (* OASIS_START *) +-(* DO NOT EDIT (digest: e4385f51bef047875d5db059b6303800) *) ++(* DO NOT EDIT (digest: be7ed81bcd279a8fd27ba01e1807fc49) *) + (* +- Regenerated by OASIS v0.3.0 ++ Regenerated by OASIS v0.4.4 + Visit http://oasis.forge.ocamlcore.org for more information and + documentation about functions used in this file. + *) + module OASISGettext = struct +-(* # 21 "src/oasis/OASISGettext.ml" *) ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ + + let ns_ str = + str + ++ + let s_ str = + str + +- let f_ (str : ('a, 'b, 'c, 'd) format4) = ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = + str + ++ + let fn_ fmt1 fmt2 n = + if n = 1 then + fmt1^^"" + else + fmt2^^"" + ++ + let init = + [] + ++ + end + + module OASISContext = struct +-(* # 21 "src/oasis/OASISContext.ml" *) ++(* # 22 "src/oasis/OASISContext.ml" *) ++ + + open OASISGettext + ++ + type level = + [ `Debug + | `Info + | `Warning + | `Error] + ++ + type t = + { ++ (* TODO: replace this by a proplist. *) + quiet: bool; + info: bool; + debug: bool; +@@ -51,6 +61,7 @@ + printf: level -> string -> unit; + } + ++ + let printf lvl str = + let beg = + match lvl with +@@ -61,6 +72,7 @@ + in + prerr_endline (beg^str) + ++ + let default = + ref + { +@@ -72,37 +84,50 @@ + printf = printf; + } + ++ + let quiet = + {!default with quiet = true} + + +- let args () = ++ let fspecs () = ++ (* TODO: don't act on default. *) ++ let ignore_plugins = ref false in + ["-quiet", + Arg.Unit (fun () -> default := {!default with quiet = true}), +- (s_ " Run quietly"); ++ s_ " Run quietly"; + + "-info", + Arg.Unit (fun () -> default := {!default with info = true}), +- (s_ " Display information message"); ++ s_ " Display information message"; + + + "-debug", + Arg.Unit (fun () -> default := {!default with debug = true}), +- (s_ " Output debug message")] ++ s_ " Output debug message"; ++ ++ "-ignore-plugins", ++ Arg.Set ignore_plugins, ++ s_ " Ignore plugin's field."; ++ ++ "-C", ++ (* TODO: remove this chdir. *) ++ Arg.String (fun str -> Sys.chdir str), ++ s_ "dir Change directory before running."], ++ fun () -> {!default with ignore_plugins = !ignore_plugins} + end + + module OASISString = struct +-(* # 1 "src/oasis/OASISString.ml" *) +- ++(* # 22 "src/oasis/OASISString.ml" *) + + + (** Various string utilities. +- ++ + Mostly inspired by extlib and batteries ExtString and BatString libraries. + + @author Sylvain Le Gall + *) + ++ + let nsplitf str f = + if str = "" then + [] +@@ -123,16 +148,18 @@ + push (); + List.rev !lst + ++ + (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the + separator. + *) + let nsplit str c = + nsplitf str ((=) c) + ++ + let find ~what ?(offset=0) str = + let what_idx = ref 0 in +- let str_idx = ref offset in +- while !str_idx < String.length str && ++ let str_idx = ref offset in ++ while !str_idx < String.length str && + !what_idx < String.length what do + if str.[!str_idx] = what.[!what_idx] then + incr what_idx +@@ -142,16 +169,18 @@ + done; + if !what_idx <> String.length what then + raise Not_found +- else ++ else + !str_idx - !what_idx + +- let sub_start str len = ++ ++ let sub_start str len = + let str_len = String.length str in + if len >= str_len then + "" + else + String.sub str len (str_len - len) + ++ + let sub_end ?(offset=0) str len = + let str_len = String.length str in + if len >= str_len then +@@ -159,12 +188,13 @@ + else + String.sub str 0 (str_len - len) + ++ + let starts_with ~what ?(offset=0) str = + let what_idx = ref 0 in + let str_idx = ref offset in + let ok = ref true in + while !ok && +- !str_idx < String.length str && ++ !str_idx < String.length str && + !what_idx < String.length what do + if str.[!str_idx] = what.[!what_idx] then + incr what_idx +@@ -174,21 +204,23 @@ + done; + if !what_idx = String.length what then + true +- else ++ else + false + ++ + let strip_starts_with ~what str = + if starts_with ~what str then + sub_start str (String.length what) + else + raise Not_found + ++ + let ends_with ~what ?(offset=0) str = + let what_idx = ref ((String.length what) - 1) in + let str_idx = ref ((String.length str) - 1) in + let ok = ref true in + while !ok && +- offset <= !str_idx && ++ offset <= !str_idx && + 0 <= !what_idx do + if str.[!str_idx] = what.[!what_idx] then + decr what_idx +@@ -198,15 +230,17 @@ + done; + if !what_idx = -1 then + true +- else ++ else + false + ++ + let strip_ends_with ~what str = + if ends_with ~what str then + sub_end str (String.length what) + else + raise Not_found + ++ + let replace_chars f s = + let buf = String.make (String.length s) 'X' in + for i = 0 to String.length s - 1 do +@@ -214,37 +248,78 @@ + done; + buf + ++ + end + + module OASISUtils = struct +-(* # 21 "src/oasis/OASISUtils.ml" *) ++(* # 22 "src/oasis/OASISUtils.ml" *) ++ + + open OASISGettext + +- module MapString = Map.Make(String) + +- let map_string_of_assoc assoc = +- List.fold_left +- (fun acc (k, v) -> MapString.add k v acc) +- MapString.empty +- assoc ++ module MapExt = ++ struct ++ module type S = ++ sig ++ include Map.S ++ val add_list: 'a t -> (key * 'a) list -> 'a t ++ val of_list: (key * 'a) list -> 'a t ++ val to_list: 'a t -> (key * 'a) list ++ end ++ ++ module Make (Ord: Map.OrderedType) = ++ struct ++ include Map.Make(Ord) + +- module SetString = Set.Make(String) ++ let rec add_list t = ++ function ++ | (k, v) :: tl -> add_list (add k v t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] ++ end ++ end ++ ++ ++ module MapString = MapExt.Make(String) ++ ++ ++ module SetExt = ++ struct ++ module type S = ++ sig ++ include Set.S ++ val add_list: t -> elt list -> t ++ val of_list: elt list -> t ++ val to_list: t -> elt list ++ end ++ ++ module Make (Ord: Set.OrderedType) = ++ struct ++ include Set.Make(Ord) ++ ++ let rec add_list t = ++ function ++ | e :: tl -> add_list (add e t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list = elements ++ end ++ end + +- let set_string_add_list st lst = +- List.fold_left +- (fun acc e -> SetString.add e acc) +- st +- lst + +- let set_string_of_list = +- set_string_add_list +- SetString.empty ++ module SetString = SetExt.Make(String) + + + let compare_csl s1 s2 = + String.compare (String.lowercase s1) (String.lowercase s2) + ++ + module HashStringCsl = + Hashtbl.Make + (struct +@@ -257,6 +332,14 @@ + Hashtbl.hash (String.lowercase s) + end) + ++ module SetStringCsl = ++ SetExt.Make ++ (struct ++ type t = string ++ let compare = compare_csl ++ end) ++ ++ + let varname_of_string ?(hyphen='_') s = + if String.length s = 0 then + begin +@@ -287,6 +370,7 @@ + String.lowercase buf + end + ++ + let varname_concat ?(hyphen='_') p s = + let what = String.make 1 hyphen in + let p = +@@ -307,42 +391,49 @@ + let is_varname str = + str = varname_of_string str + ++ + let failwithf fmt = Printf.ksprintf failwith fmt + ++ + end + + module PropList = struct +-(* # 21 "src/oasis/PropList.ml" *) ++(* # 22 "src/oasis/PropList.ml" *) ++ + + open OASISGettext + ++ + type name = string + ++ + exception Not_set of name * string option + exception No_printer of name + exception Unknown_field of name * name + ++ + let () = + Printexc.register_printer + (function + | Not_set (nm, Some rsn) -> +- Some ++ Some + (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) + | Not_set (nm, None) -> +- Some ++ Some + (Printf.sprintf (f_ "Field '%s' is not set") nm) + | No_printer nm -> + Some + (Printf.sprintf (f_ "No default printer for value %s") nm) + | Unknown_field (nm, schm) -> +- Some +- (Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm) ++ Some ++ (Printf.sprintf ++ (f_ "Field %s is not defined in schema %s") nm schm) + | _ -> + None) + ++ + module Data = + struct +- + type t = + (name, unit -> unit) Hashtbl.t + +@@ -352,12 +443,13 @@ + let clear t = + Hashtbl.clear t + +-(* # 71 "src/oasis/PropList.ml" *) ++ ++(* # 78 "src/oasis/PropList.ml" *) + end + ++ + module Schema = + struct +- + type ('ctxt, 'extra) value = + { + get: Data.t -> string; +@@ -445,9 +537,9 @@ + t.name + end + ++ + module Field = + struct +- + type ('ctxt, 'value, 'extra) t = + { + set: Data.t -> ?context:'ctxt -> 'value -> unit; +@@ -577,28 +669,27 @@ + + let fgets data t = + t.gets data +- + end + ++ + module FieldRO = + struct +- + let create ?schema ?name ?parse ?print ?default ?update ?help extra = + let fld = + Field.create ?schema ?name ?parse ?print ?default ?update ?help extra + in + fun data -> Field.fget data fld +- + end + end + + module OASISMessage = struct +-(* # 21 "src/oasis/OASISMessage.ml" *) ++(* # 22 "src/oasis/OASISMessage.ml" *) + + + open OASISGettext + open OASISContext + ++ + let generic_message ~ctxt lvl fmt = + let cond = + if ctxt.quiet then +@@ -617,30 +708,39 @@ + end) + fmt + ++ + let debug ~ctxt fmt = + generic_message ~ctxt `Debug fmt + ++ + let info ~ctxt fmt = + generic_message ~ctxt `Info fmt + ++ + let warning ~ctxt fmt = + generic_message ~ctxt `Warning fmt + ++ + let error ~ctxt fmt = + generic_message ~ctxt `Error fmt + + end + + module OASISVersion = struct +-(* # 21 "src/oasis/OASISVersion.ml" *) ++(* # 22 "src/oasis/OASISVersion.ml" *) ++ + + open OASISGettext + + + ++ ++ + type s = string + +- type t = string ++ ++ type t = string ++ + + type comparator = + | VGreater of t +@@ -650,20 +750,24 @@ + | VLesserEqual of t + | VOr of comparator * comparator + | VAnd of comparator * comparator +- ++ ++ + + (* Range of allowed characters *) + let is_digit c = + '0' <= c && c <= '9' + ++ + let is_alpha c = + ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') + ++ + let is_special = + function + | '.' | '+' | '-' | '~' -> true + | _ -> false + ++ + let rec version_compare v1 v2 = + if v1 <> "" || v2 <> "" then + begin +@@ -707,11 +811,11 @@ + while !p < String.length v && is_digit v.[!p] do + incr p + done; +- let substr = ++ let substr = + String.sub v !p ((String.length v) - !p) +- in +- let res = +- match String.sub v start_p (!p - start_p) with ++ in ++ let res = ++ match String.sub v start_p (!p - start_p) with + | "" -> 0 + | s -> int_of_string s + in +@@ -747,8 +851,14 @@ + + let version_of_string str = str + ++ + let string_of_version t = t + ++ ++ let version_compare_string s1 s2 = ++ version_compare (version_of_string s1) (version_of_string s2) ++ ++ + let chop t = + try + let pos = +@@ -758,6 +868,7 @@ + with Not_found -> + t + ++ + let rec comparator_apply v op = + match op with + | VGreater cv -> +@@ -775,6 +886,7 @@ + | VAnd (op1, op2) -> + (comparator_apply v op1) && (comparator_apply v op2) + ++ + let rec string_of_comparator = + function + | VGreater v -> "> "^(string_of_version v) +@@ -787,6 +899,7 @@ + | VAnd (c1, c2) -> + (string_of_comparator c1)^" && "^(string_of_comparator c2) + ++ + let rec varname_of_comparator = + let concat p v = + OASISUtils.varname_concat +@@ -805,13 +918,24 @@ + | VAnd (c1, c2) -> + (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) + +- let version_0_3_or_after t = +- comparator_apply t (VGreaterEqual (string_of_version "0.3")) ++ ++ let rec comparator_ge v' = ++ let cmp v = version_compare v v' >= 0 in ++ function ++ | VEqual v ++ | VGreaterEqual v ++ | VGreater v -> cmp v ++ | VLesserEqual _ ++ | VLesser _ -> false ++ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 ++ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 ++ + + end + + module OASISLicense = struct +-(* # 21 "src/oasis/OASISLicense.ml" *) ++(* # 22 "src/oasis/OASISLicense.ml" *) ++ + + (** License for _oasis fields + @author Sylvain Le Gall +@@ -819,15 +943,20 @@ + + + +- type license = string + +- type license_exception = string ++ ++ type license = string ++ ++ ++ type license_exception = string ++ + + type license_version = + | Version of OASISVersion.t + | VersionOrLater of OASISVersion.t + | NoVersion +- ++ ++ + + type license_dep_5_unit = + { +@@ -835,31 +964,38 @@ + excption: license_exception option; + version: license_version; + } +- ++ ++ + + type license_dep_5 = + | DEP5Unit of license_dep_5_unit + | DEP5Or of license_dep_5 list + | DEP5And of license_dep_5 list +- ++ + + type t = + | DEP5License of license_dep_5 + | OtherLicense of string (* URL *) +- ++ ++ + + end + + module OASISExpr = struct +-(* # 21 "src/oasis/OASISExpr.ml" *) ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ + + + + open OASISGettext + +- type test = string + +- type flag = string ++ type test = string ++ ++ ++ type flag = string ++ + + type t = + | EBool of bool +@@ -868,9 +1004,11 @@ + | EOr of t * t + | EFlag of flag + | ETest of test * string +- + +- type 'a choices = (t * 'a) list ++ ++ ++ type 'a choices = (t * 'a) list ++ + + let eval var_get t = + let rec eval' = +@@ -902,6 +1040,7 @@ + in + eval' t + ++ + let choose ?printer ?name var_get lst = + let rec choose_aux = + function +@@ -938,44 +1077,66 @@ + in + choose_aux (List.rev lst) + ++ ++end ++ ++module OASISText = struct ++(* # 22 "src/oasis/OASISText.ml" *) ++ ++ ++ ++ type elt = ++ | Para of string ++ | Verbatim of string ++ | BlankLine ++ ++ ++ type t = elt list ++ + end + + module OASISTypes = struct +-(* # 21 "src/oasis/OASISTypes.ml" *) ++(* # 22 "src/oasis/OASISTypes.ml" *) ++ ++ + + + ++ type name = string ++ type package_name = string ++ type url = string ++ type unix_dirname = string ++ type unix_filename = string ++ type host_dirname = string ++ type host_filename = string ++ type prog = string ++ type arg = string ++ type args = string list ++ type command_line = (prog * arg list) ++ + +- type name = string +- type package_name = string +- type url = string +- type unix_dirname = string +- type unix_filename = string +- type host_dirname = string +- type host_filename = string +- type prog = string +- type arg = string +- type args = string list +- type command_line = (prog * arg list) ++ type findlib_name = string ++ type findlib_full = string + +- type findlib_name = string +- type findlib_full = string + + type compiled_object = + | Byte + | Native + | Best +- ++ ++ + + type dependency = + | FindlibPackage of findlib_full * OASISVersion.comparator option + | InternalLibrary of name +- ++ ++ + + type tool = + | ExternalTool of name + | InternalExecutable of name +- ++ ++ + + type vcs = + | Darcs +@@ -987,7 +1148,8 @@ + | Arch + | Monotone + | OtherVCS of url +- ++ ++ + + type plugin_kind = + [ `Configure +@@ -998,6 +1160,7 @@ + | `Extra + ] + ++ + type plugin_data_purpose = + [ `Configure + | `Build +@@ -1012,22 +1175,29 @@ + | `Other of string + ] + +- type 'a plugin = 'a * name * OASISVersion.t option ++ ++ type 'a plugin = 'a * name * OASISVersion.t option ++ + + type all_plugin = plugin_kind plugin + ++ + type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list + +-(* # 102 "src/oasis/OASISTypes.ml" *) + +- type 'a conditional = 'a OASISExpr.choices ++(* # 115 "src/oasis/OASISTypes.ml" *) ++ ++ ++ type 'a conditional = 'a OASISExpr.choices ++ + + type custom = + { + pre_command: (command_line option) conditional; + post_command: (command_line option) conditional; + } +- ++ ++ + + type common_section = + { +@@ -1035,7 +1205,8 @@ + cs_data: PropList.Data.t; + cs_plugin_data: plugin_data; + } +- ++ ++ + + type build_section = + { +@@ -1054,7 +1225,8 @@ + bs_byteopt: args conditional; + bs_nativeopt: args conditional; + } +- ++ ++ + + type library = + { +@@ -1064,19 +1236,29 @@ + lib_findlib_parent: findlib_name option; + lib_findlib_name: findlib_name option; + lib_findlib_containers: findlib_name list; +- } ++ } ++ ++ ++ type object_ = ++ { ++ obj_modules: string list; ++ obj_findlib_fullname: findlib_name list option; ++ } ++ + + type executable = + { + exec_custom: bool; + exec_main_is: unix_filename; +- } ++ } ++ + + type flag = + { + flag_description: string option; + flag_default: bool conditional; +- } ++ } ++ + + type source_repository = + { +@@ -1087,7 +1269,8 @@ + src_repo_branch: string option; + src_repo_tag: string option; + src_repo_subdir: unix_filename option; +- } ++ } ++ + + type test = + { +@@ -1097,7 +1280,8 @@ + test_working_directory: unix_filename option; + test_run: bool conditional; + test_tools: tool list; +- } ++ } ++ + + type doc_format = + | HTML of unix_filename +@@ -1107,7 +1291,8 @@ + | Info of unix_filename + | DVI + | OtherDoc +- ++ ++ + + type doc = + { +@@ -1122,75 +1307,452 @@ + doc_format: doc_format; + doc_data_files: (unix_filename * unix_filename option) list; + doc_build_tools: tool list; +- } ++ } ++ + + type section = + | Library of common_section * build_section * library ++ | Object of common_section * build_section * object_ + | Executable of common_section * build_section * executable + | Flag of common_section * flag + | SrcRepo of common_section * source_repository + | Test of common_section * test + | Doc of common_section * doc +- + +- type section_kind = +- [ `Library | `Executable | `Flag | `SrcRepo | `Test | `Doc ] + +- type package = +- { +- oasis_version: OASISVersion.t; +- ocaml_version: OASISVersion.comparator option; +- findlib_version: OASISVersion.comparator option; +- name: package_name; +- version: OASISVersion.t; +- license: OASISLicense.t; +- license_file: unix_filename option; +- copyrights: string list; +- maintainers: string list; +- authors: string list; +- homepage: url option; +- synopsis: string; +- description: string option; +- categories: url list; +- +- conf_type: [`Configure] plugin; +- conf_custom: custom; +- +- build_type: [`Build] plugin; +- build_custom: custom; +- +- install_type: [`Install] plugin; +- install_custom: custom; +- uninstall_custom: custom; +- +- clean_custom: custom; +- distclean_custom: custom; +- +- files_ab: unix_filename list; +- sections: section list; +- plugins: [`Extra] plugin list; +- schema_data: PropList.Data.t; +- plugin_data: plugin_data; +- } + ++ type section_kind = ++ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] ++ ++ ++ type package = ++ { ++ oasis_version: OASISVersion.t; ++ ocaml_version: OASISVersion.comparator option; ++ findlib_version: OASISVersion.comparator option; ++ alpha_features: string list; ++ beta_features: string list; ++ name: package_name; ++ version: OASISVersion.t; ++ license: OASISLicense.t; ++ license_file: unix_filename option; ++ copyrights: string list; ++ maintainers: string list; ++ authors: string list; ++ homepage: url option; ++ synopsis: string; ++ description: OASISText.t option; ++ categories: url list; ++ ++ conf_type: [`Configure] plugin; ++ conf_custom: custom; ++ ++ build_type: [`Build] plugin; ++ build_custom: custom; ++ ++ install_type: [`Install] plugin; ++ install_custom: custom; ++ uninstall_custom: custom; ++ ++ clean_custom: custom; ++ distclean_custom: custom; ++ ++ files_ab: unix_filename list; ++ sections: section list; ++ plugins: [`Extra] plugin list; ++ disable_oasis_section: unix_filename list; ++ schema_data: PropList.Data.t; ++ plugin_data: plugin_data; ++ } ++ ++ ++end ++ ++module OASISFeatures = struct ++(* # 22 "src/oasis/OASISFeatures.ml" *) ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISVersion ++ ++ module MapPlugin = ++ Map.Make ++ (struct ++ type t = plugin_kind * name ++ let compare = Pervasives.compare ++ end) ++ ++ module Data = ++ struct ++ type t = ++ { ++ oasis_version: OASISVersion.t; ++ plugin_versions: OASISVersion.t option MapPlugin.t; ++ alpha_features: string list; ++ beta_features: string list; ++ } ++ ++ let create oasis_version alpha_features beta_features = ++ { ++ oasis_version = oasis_version; ++ plugin_versions = MapPlugin.empty; ++ alpha_features = alpha_features; ++ beta_features = beta_features ++ } ++ ++ let of_package pkg = ++ create ++ pkg.OASISTypes.oasis_version ++ pkg.OASISTypes.alpha_features ++ pkg.OASISTypes.beta_features ++ ++ let add_plugin (plugin_kind, plugin_name, plugin_version) t = ++ {t with ++ plugin_versions = MapPlugin.add ++ (plugin_kind, plugin_name) ++ plugin_version ++ t.plugin_versions} ++ ++ let plugin_version plugin_kind plugin_name t = ++ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions ++ ++ let to_string t = ++ Printf.sprintf ++ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ ++ plugins_version: %s" ++ (OASISVersion.string_of_version t.oasis_version) ++ (String.concat ", " t.alpha_features) ++ (String.concat ", " t.beta_features) ++ (String.concat ", " ++ (MapPlugin.fold ++ (fun (_, plg) ver_opt acc -> ++ (plg^ ++ (match ver_opt with ++ | Some v -> ++ " "^(OASISVersion.string_of_version v) ++ | None -> "")) ++ :: acc) ++ t.plugin_versions [])) ++ end ++ ++ type origin = ++ | Field of string * string ++ | Section of string ++ | NoOrigin ++ ++ type stage = Alpha | Beta ++ ++ ++ let string_of_stage = ++ function ++ | Alpha -> "alpha" ++ | Beta -> "beta" ++ ++ ++ let field_of_stage = ++ function ++ | Alpha -> "AlphaFeatures" ++ | Beta -> "BetaFeatures" ++ ++ type publication = InDev of stage | SinceVersion of OASISVersion.t ++ ++ type t = ++ { ++ name: string; ++ plugin: all_plugin option; ++ publication: publication; ++ description: unit -> string; ++ } ++ ++ (* TODO: mutex protect this. *) ++ let all_features = Hashtbl.create 13 ++ ++ ++ let since_version ver_str = SinceVersion (version_of_string ver_str) ++ let alpha = InDev Alpha ++ let beta = InDev Beta ++ ++ ++ let to_string t = ++ Printf.sprintf ++ "feature: %s; plugin: %s; publication: %s" ++ t.name ++ (match t.plugin with ++ | None -> "" ++ | Some (_, nm, _) -> nm) ++ (match t.publication with ++ | InDev stage -> string_of_stage stage ++ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) ++ ++ let data_check t data origin = ++ let no_message = "no message" in ++ ++ let check_feature features stage = ++ let has_feature = List.mem t.name features in ++ if not has_feature then ++ match origin with ++ | Field (fld, where) -> ++ Some ++ (Printf.sprintf ++ (f_ "Field %s in %s is only available when feature %s \ ++ is in field %s.") ++ fld where t.name (field_of_stage stage)) ++ | Section sct -> ++ Some ++ (Printf.sprintf ++ (f_ "Section %s is only available when features %s \ ++ is in field %s.") ++ sct t.name (field_of_stage stage)) ++ | NoOrigin -> ++ Some no_message ++ else ++ None ++ in ++ ++ let version_is_good ~min_version version fmt = ++ let version_is_good = ++ OASISVersion.comparator_apply ++ version (OASISVersion.VGreaterEqual min_version) ++ in ++ Printf.ksprintf ++ (fun str -> ++ if version_is_good then ++ None ++ else ++ Some str) ++ fmt ++ in ++ ++ match origin, t.plugin, t.publication with ++ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha ++ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta ++ | Field(fld, where), None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Field %s in %s is only valid since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking \ ++ OASIS changelog.") ++ fld where (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Field(fld, where), Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Field %s in %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ fld where plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | Section sct, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Section %s is only valid for since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking OASIS \ ++ changelog.") ++ sct (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Section sct, Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Section %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Section %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ sct plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Section %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | NoOrigin, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version "%s" no_message ++ ++ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> raise Not_found ++ in ++ version_is_good ~min_version plugin_version_current ++ "%s" no_message ++ with Not_found -> ++ Some no_message ++ end ++ ++ ++ let data_assert t data origin = ++ match data_check t data origin with ++ | None -> () ++ | Some str -> failwith str ++ ++ ++ let data_test t data = ++ match data_check t data NoOrigin with ++ | None -> true ++ | Some str -> false ++ ++ ++ let package_test t pkg = ++ data_test t (Data.of_package pkg) ++ ++ ++ let create ?plugin name publication description = ++ let () = ++ if Hashtbl.mem all_features name then ++ failwithf "Feature '%s' is already declared." name ++ in ++ let t = ++ { ++ name = name; ++ plugin = plugin; ++ publication = publication; ++ description = description; ++ } ++ in ++ Hashtbl.add all_features name t; ++ t ++ ++ ++ let get_stage name = ++ try ++ (Hashtbl.find all_features name).publication ++ with Not_found -> ++ failwithf (f_ "Feature %s doesn't exist.") name ++ ++ ++ let list () = ++ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] ++ ++ (* ++ * Real flags. ++ *) ++ ++ ++ let features = ++ create "features_fields" ++ (since_version "0.4") ++ (fun () -> ++ s_ "Enable to experiment not yet official features.") ++ ++ ++ let flag_docs = ++ create "flag_docs" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Building docs require '-docs' flag at configure.") ++ ++ ++ let flag_tests = ++ create "flag_tests" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Running tests require '-tests' flag at configure.") ++ ++ ++ let pack = ++ create "pack" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Allow to create packed library.") ++ ++ ++ let section_object = ++ create "section_object" beta ++ (fun () -> ++ s_ "Implement an object section.") ++ ++ ++ let dynrun_for_release = ++ create "dynrun_for_release" alpha ++ (fun () -> ++ s_ "Make '-setup-update dynamic' suitable for releasing project.") ++ ++ ++ let compiled_setup_ml = ++ create "compiled_setup_ml" alpha ++ (fun () -> ++ s_ "It compiles the setup.ml and speed-up actions done with it.") ++ ++ let disable_oasis_section = ++ create "disable_oasis_section" alpha ++ (fun () -> ++ s_ "Allows the OASIS section comments and digest to be omitted in \ ++ generated files.") + end + + module OASISUnixPath = struct +-(* # 21 "src/oasis/OASISUnixPath.ml" *) ++(* # 22 "src/oasis/OASISUnixPath.ml" *) ++ + + type unix_filename = string + type unix_dirname = string + ++ + type host_filename = string + type host_dirname = string + ++ + let current_dir_name = "." + ++ + let parent_dir_name = ".." + ++ + let is_current_dir fn = + fn = current_dir_name || fn = "" + ++ + let concat f1 f2 = + if is_current_dir f1 then + f2 +@@ -1200,6 +1762,7 @@ + in + f1'^"/"^f2 + ++ + let make = + function + | hd :: tl -> +@@ -1210,12 +1773,14 @@ + | [] -> + invalid_arg "OASISUnixPath.make" + ++ + let dirname f = + try + String.sub f 0 (String.rindex f '/') + with Not_found -> + current_dir_name + ++ + let basename f = + try + let pos_start = +@@ -1225,6 +1790,7 @@ + with Not_found -> + f + ++ + let chop_extension f = + try + let last_dot = +@@ -1247,26 +1813,31 @@ + with Not_found -> + f + ++ + let capitalize_file f = + let dir = dirname f in + let base = basename f in + concat dir (String.capitalize base) + ++ + let uncapitalize_file f = + let dir = dirname f in + let base = basename f in + concat dir (String.uncapitalize base) + ++ + end + + module OASISHostPath = struct +-(* # 21 "src/oasis/OASISHostPath.ml" *) ++(* # 22 "src/oasis/OASISHostPath.ml" *) + + + open Filename + ++ + module Unix = OASISUnixPath + ++ + let make = + function + | [] -> +@@ -1274,6 +1845,7 @@ + | hd :: tl -> + List.fold_left Filename.concat hd tl + ++ + let of_unix ufn = + if Sys.os_type = "Unix" then + ufn +@@ -1293,14 +1865,18 @@ + end + + module OASISSection = struct +-(* # 21 "src/oasis/OASISSection.ml" *) ++(* # 22 "src/oasis/OASISSection.ml" *) ++ + + open OASISTypes + +- let section_kind_common = ++ ++ let section_kind_common = + function +- | Library (cs, _, _) -> ++ | Library (cs, _, _) -> + `Library, cs ++ | Object (cs, _, _) -> ++ `Object, cs + | Executable (cs, _, _) -> + `Executable, cs + | Flag (cs, _) -> +@@ -1312,32 +1888,38 @@ + | Doc (cs, _) -> + `Doc, cs + ++ + let section_common sct = + snd (section_kind_common sct) + ++ + let section_common_set cs = + function + | Library (_, bs, lib) -> Library (cs, bs, lib) ++ | Object (_, bs, obj) -> Object (cs, bs, obj) + | Executable (_, bs, exec) -> Executable (cs, bs, exec) + | Flag (_, flg) -> Flag (cs, flg) + | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) + | Test (_, tst) -> Test (cs, tst) + | Doc (_, doc) -> Doc (cs, doc) + ++ + (** Key used to identify section + *) +- let section_id sct = +- let k, cs = ++ let section_id sct = ++ let k, cs = + section_kind_common sct + in + k, cs.cs_name + ++ + let string_of_section sct = + let k, nm = + section_id sct + in + (match k with +- | `Library -> "library" ++ | `Library -> "library" ++ | `Object -> "object" + | `Executable -> "executable" + | `Flag -> "flag" + | `SrcRepo -> "src repository" +@@ -1345,20 +1927,22 @@ + | `Doc -> "doc") + ^" "^nm + ++ + let section_find id scts = + List.find + (fun sct -> id = section_id sct) + scts + ++ + module CSection = + struct + type t = section + + let id = section_id + +- let compare t1 t2 = ++ let compare t1 t2 = + compare (id t1) (id t2) +- ++ + let equal t1 t2 = + (id t1) = (id t2) + +@@ -1366,28 +1950,33 @@ + Hashtbl.hash (id t) + end + ++ + module MapSection = Map.Make(CSection) + module SetSection = Set.Make(CSection) + ++ + end + + module OASISBuildSection = struct +-(* # 21 "src/oasis/OASISBuildSection.ml" *) ++(* # 22 "src/oasis/OASISBuildSection.ml" *) ++ + + end + + module OASISExecutable = struct +-(* # 21 "src/oasis/OASISExecutable.ml" *) ++(* # 22 "src/oasis/OASISExecutable.ml" *) ++ + + open OASISTypes + +- let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = +- let dir = ++ ++ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = ++ let dir = + OASISUnixPath.concat + bs.bs_path + (OASISUnixPath.dirname exec.exec_main_is) + in +- let is_native_exec = ++ let is_native_exec = + match bs.bs_compiled_object with + | Native -> true + | Best -> is_native () +@@ -1398,40 +1987,28 @@ + dir + (cs.cs_name^(suffix_program ())), + +- if not is_native_exec && +- not exec.exec_custom && ++ if not is_native_exec && ++ not exec.exec_custom && + bs.bs_c_sources <> [] then + Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) + else + None + ++ + end + + module OASISLibrary = struct +-(* # 21 "src/oasis/OASISLibrary.ml" *) ++(* # 22 "src/oasis/OASISLibrary.ml" *) ++ + + open OASISTypes + open OASISUtils + open OASISGettext + open OASISSection + +- type library_name = name +- type findlib_part_name = name +- type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t +- +- exception InternalLibraryNotFound of library_name +- exception FindlibPackageNotFound of findlib_name +- +- type group_t = +- | Container of findlib_name * group_t list +- | Package of (findlib_name * +- common_section * +- build_section * +- library * +- group_t list) + + (* Look for a module file, considering capitalization or not. *) +- let find_module source_file_exists (cs, bs, lib) modul = ++ let find_module source_file_exists bs modul = + let possible_base_fn = + List.map + (OASISUnixPath.concat bs.bs_path) +@@ -1469,10 +2046,11 @@ + (`No_sources possible_base_fn) + possible_base_fn + ++ + let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = + List.fold_left + (fun acc modul -> +- match find_module source_file_exists (cs, bs, lib) modul with ++ match find_module source_file_exists bs modul with + | `Sources (base_fn, lst) -> + (base_fn, lst) :: acc + | `No_sources _ -> +@@ -1485,6 +2063,7 @@ + [] + (lib.lib_modules @ lib.lib_internal_modules) + ++ + let generated_unix_files + ~ctxt + ~is_native +@@ -1494,24 +2073,29 @@ + ~source_file_exists + (cs, bs, lib) = + +- let find_modules lst ext = ++ let find_modules lst ext = + let find_module modul = +- match find_module source_file_exists (cs, bs, lib) modul with ++ match find_module source_file_exists bs modul with ++ | `Sources (base_fn, [fn]) when ext <> "cmi" ++ && Filename.check_suffix fn ".mli" -> ++ None (* No implementation files for pure interface. *) + | `Sources (base_fn, _) -> +- [base_fn] ++ Some [base_fn] + | `No_sources lst -> + OASISMessage.warning + ~ctxt + (f_ "Cannot find source file matching \ + module '%s' in library %s") + modul cs.cs_name; +- lst ++ Some lst + in +- List.map +- (fun nm -> +- List.map +- (fun base_fn -> base_fn ^"."^ext) +- (find_module nm)) ++ List.fold_left ++ (fun acc nm -> ++ match find_module nm with ++ | None -> acc ++ | Some base_fns -> ++ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) ++ [] + lst + in + +@@ -1528,16 +2112,20 @@ + (* The .cmx that be compiled along *) + let cmxs = + let should_be_built = +- (not lib.lib_pack) && (* Do not install .cmx packed submodules *) + match bs.bs_compiled_object with + | Native -> true + | Best -> is_native + | Byte -> false + in + if should_be_built then +- find_modules +- (lib.lib_modules @ lib.lib_internal_modules) +- "cmx" ++ if lib.lib_pack then ++ find_modules ++ [cs.cs_name] ++ "cmx" ++ else ++ find_modules ++ (lib.lib_modules @ lib.lib_internal_modules) ++ "cmx" + else + [] + in +@@ -1559,7 +2147,7 @@ + add_pack_header ([cs.cs_name^".cma"] :: acc) + in + let native acc = +- let acc = ++ let acc = + add_pack_header + (if has_native_dynlink then + [cs.cs_name^".cmxs"] :: acc +@@ -1598,11 +2186,113 @@ + acc_nopath) + (headers @ cmxs) + +- type data = common_section * build_section * library ++ ++end ++ ++module OASISObject = struct ++(* # 22 "src/oasis/OASISObject.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ obj.obj_modules ++ ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~source_file_exists ++ (cs, bs, obj) = ++ ++ let find_module ext modul = ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, _) -> [base_fn ^ ext] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name ; ++ lst ++ in ++ ++ let header, byte, native, c_object, f = ++ match obj.obj_modules with ++ | [ m ] -> (find_module ".cmi" m, ++ find_module ".cmo" m, ++ find_module ".cmx" m, ++ find_module ".o" m, ++ fun x -> x) ++ | _ -> ([cs.cs_name ^ ".cmi"], ++ [cs.cs_name ^ ".cmo"], ++ [cs.cs_name ^ ".cmx"], ++ [cs.cs_name ^ ".o"], ++ OASISUnixPath.concat bs.bs_path) ++ in ++ List.map (List.map f) ( ++ match bs.bs_compiled_object with ++ | Native -> ++ native :: c_object :: byte :: header :: [] ++ | Best when is_native -> ++ native :: c_object :: byte :: header :: [] ++ | Byte | Best -> ++ byte :: header :: []) ++ ++ ++end ++ ++module OASISFindlib = struct ++(* # 22 "src/oasis/OASISFindlib.ml" *) ++ ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ ++ type library_name = name ++ type findlib_part_name = name ++ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t ++ ++ ++ exception InternalLibraryNotFound of library_name ++ exception FindlibPackageNotFound of findlib_name ++ ++ ++ type group_t = ++ | Container of findlib_name * group_t list ++ | Package of (findlib_name * ++ common_section * ++ build_section * ++ [`Library of library | `Object of object_] * ++ group_t list) ++ ++ ++ type data = common_section * ++ build_section * ++ [`Library of library | `Object of object_] + type tree = + | Node of (data option) * (tree MapString.t) + | Leaf of data + ++ + let findlib_mapping pkg = + (* Map from library name to either full findlib name or parts + parent. *) + let fndlb_parts_of_lib_name = +@@ -1641,6 +2331,23 @@ + mp + end + ++ | Object (cs, _, obj) -> ++ begin ++ let obj_name = cs.cs_name in ++ if MapString.mem obj_name mp then ++ failwithf ++ (f_ "The object name '%s' is used more than once.") ++ obj_name; ++ let findlib_full_name = match obj.obj_findlib_fullname with ++ | Some ns -> String.concat "." ns ++ | None -> obj_name ++ in ++ MapString.add ++ obj_name ++ (`Solved findlib_full_name) ++ mp ++ end ++ + | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> + mp) + MapString.empty +@@ -1708,7 +2415,7 @@ + let lib_name = cs.cs_name in + findlib_name_of_library_name lib_name + in +- let rec add_children nm_lst (children : tree MapString.t) = ++ let rec add_children nm_lst (children: tree MapString.t) = + match nm_lst with + | (hd :: tl) -> + begin +@@ -1778,7 +2485,9 @@ + (fun mp -> + function + | Library (cs, bs, lib) -> +- add (cs, bs, lib) mp ++ add (cs, bs, `Library lib) mp ++ | Object (cs, bs, obj) -> ++ add (cs, bs, `Object obj) mp + | _ -> + mp) + MapString.empty +@@ -1809,11 +2518,13 @@ + findlib_name_of_library_name, + library_name_of_findlib_name + ++ + let findlib_of_group = + function + | Container (fndlb_nm, _) + | Package (fndlb_nm, _, _, _, _) -> fndlb_nm + ++ + let root_of_group grp = + let rec root_lib_aux = + (* We do a DFS in the group. *) +@@ -1838,40 +2549,48 @@ + (f_ "Unable to determine root library of findlib library '%s'") + (findlib_of_group grp) + ++ + end + + module OASISFlag = struct +-(* # 21 "src/oasis/OASISFlag.ml" *) ++(* # 22 "src/oasis/OASISFlag.ml" *) ++ + + end + + module OASISPackage = struct +-(* # 21 "src/oasis/OASISPackage.ml" *) ++(* # 22 "src/oasis/OASISPackage.ml" *) ++ + + end + + module OASISSourceRepository = struct +-(* # 21 "src/oasis/OASISSourceRepository.ml" *) ++(* # 22 "src/oasis/OASISSourceRepository.ml" *) ++ + + end + + module OASISTest = struct +-(* # 21 "src/oasis/OASISTest.ml" *) ++(* # 22 "src/oasis/OASISTest.ml" *) ++ + + end + + module OASISDocument = struct +-(* # 21 "src/oasis/OASISDocument.ml" *) ++(* # 22 "src/oasis/OASISDocument.ml" *) ++ + + end + + module OASISExec = struct +-(* # 21 "src/oasis/OASISExec.ml" *) ++(* # 22 "src/oasis/OASISExec.ml" *) ++ + + open OASISGettext + open OASISUtils + open OASISMessage + ++ + (* TODO: I don't like this quote, it is there because $(rm) foo expands to + * 'rm -f' foo... + *) +@@ -1902,6 +2621,7 @@ + | Some f, i -> + f i + ++ + let run_read_output ~ctxt ?f_exit_code cmd args = + let fn = + Filename.temp_file "oasis-" ".txt" +@@ -1933,6 +2653,7 @@ + (try Sys.remove fn with _ -> ()); + raise e + ++ + let run_read_one_line ~ctxt ?f_exit_code cmd args = + match run_read_output ~ctxt ?f_exit_code cmd args with + | [fst] -> +@@ -1944,10 +2665,12 @@ + end + + module OASISFileUtil = struct +-(* # 21 "src/oasis/OASISFileUtil.ml" *) ++(* # 22 "src/oasis/OASISFileUtil.ml" *) ++ + + open OASISGettext + ++ + let file_exists_case fn = + let dirname = Filename.dirname fn in + let basename = Filename.basename fn in +@@ -1961,6 +2684,7 @@ + else + false + ++ + let find_file ?(case_sensitive=true) paths exts = + + (* Cardinal product of two list *) +@@ -1969,7 +2693,7 @@ + (List.map + (fun a -> + List.map +- (fun b -> a,b) ++ (fun b -> a, b) + lst2) + lst1) + in +@@ -1979,7 +2703,7 @@ + | p1 :: p2 :: tl -> + let acc = + (List.map +- (fun (a,b) -> Filename.concat a b) ++ (fun (a, b) -> Filename.concat a b) + (p1 * p2)) + in + combined_paths (acc :: tl) +@@ -1991,19 +2715,21 @@ + + let alternatives = + List.map +- (fun (p,e) -> ++ (fun (p, e) -> + if String.length e > 0 && e.[0] <> '.' then + p ^ "." ^ e + else + p ^ e) + ((combined_paths paths) * exts) + in +- List.find ++ List.find (fun file -> + (if case_sensitive then +- file_exists_case ++ file_exists_case file + else +- Sys.file_exists) +- alternatives ++ Sys.file_exists file) ++ && not (Sys.is_directory file) ++ ) alternatives ++ + + let which ~ctxt prg = + let path_sep = +@@ -2023,6 +2749,7 @@ + in + find_file ~case_sensitive:false [path_lst; [prg]] exec_ext + ++ + (**/**) + let rec fix_dir dn = + (* Windows hack because Sys.file_exists "src\\" = false when +@@ -2036,9 +2763,11 @@ + else + dn + ++ + let q = Filename.quote + (**/**) + ++ + let cp ~ctxt ?(recurse=false) src tgt = + if recurse then + match Sys.os_type with +@@ -2055,6 +2784,7 @@ + | _ -> "cp") + [q src; q tgt] + ++ + let mkdir ~ctxt tgt = + OASISExec.run ~ctxt + (match Sys.os_type with +@@ -2062,6 +2792,7 @@ + | _ -> "mkdir") + [q tgt] + ++ + let rec mkdir_parent ~ctxt f tgt = + let tgt = + fix_dir tgt +@@ -2084,15 +2815,20 @@ + end + end + ++ + let rmdir ~ctxt tgt = +- if Sys.readdir tgt = [||] then +- begin +- match Sys.os_type with +- | "Win32" -> +- OASISExec.run ~ctxt "rd" [q tgt] +- | _ -> +- OASISExec.run ~ctxt "rm" ["-r"; q tgt] +- end ++ if Sys.readdir tgt = [||] then begin ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt "rd" [q tgt] ++ | _ -> ++ OASISExec.run ~ctxt "rm" ["-r"; q tgt] ++ end else begin ++ OASISMessage.error ~ctxt ++ (f_ "Cannot remove directory '%s': not empty.") ++ tgt ++ end ++ + + let glob ~ctxt fn = + let basename = +@@ -2139,19 +2875,23 @@ + end + + +-# 2142 "setup.ml" ++# 2878 "setup.ml" + module BaseEnvLight = struct +-(* # 21 "src/base/BaseEnvLight.ml" *) ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ + + module MapString = Map.Make(String) + ++ + type t = string MapString.t + ++ + let default_filename = + Filename.concat + (Sys.getcwd ()) + "setup.data" + ++ + let load ?(allow_empty=false) ?(filename=default_filename) () = + if Sys.file_exists filename then + begin +@@ -2209,26 +2949,29 @@ + filename) + end + +- let var_get name env = +- let rec var_expand str = +- let buff = +- Buffer.create ((String.length str) * 2) +- in +- Buffer.add_substitute +- buff +- (fun var -> +- try +- var_expand (MapString.find var env) +- with Not_found -> +- failwith +- (Printf.sprintf +- "No variable %s defined when trying to expand %S." +- var +- str)) +- str; +- Buffer.contents buff ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) + in +- var_expand (MapString.find name env) ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ + + let var_choose lst env = + OASISExpr.choose +@@ -2237,20 +2980,24 @@ + end + + +-# 2240 "setup.ml" ++# 2983 "setup.ml" + module BaseContext = struct +-(* # 21 "src/base/BaseContext.ml" *) ++(* # 22 "src/base/BaseContext.ml" *) + ++ (* TODO: get rid of this module. *) + open OASISContext + +- let args = args ++ ++ let args () = fst (fspecs ()) ++ + + let default = default + + end + + module BaseMessage = struct +-(* # 21 "src/base/BaseMessage.ml" *) ++(* # 22 "src/base/BaseMessage.ml" *) ++ + + (** Message to user, overrid for Base + @author Sylvain Le Gall +@@ -2258,31 +3005,38 @@ + open OASISMessage + open BaseContext + ++ + let debug fmt = debug ~ctxt:!default fmt + ++ + let info fmt = info ~ctxt:!default fmt + ++ + let warning fmt = warning ~ctxt:!default fmt + ++ + let error fmt = error ~ctxt:!default fmt + + end + + module BaseEnv = struct +-(* # 21 "src/base/BaseEnv.ml" *) ++(* # 22 "src/base/BaseEnv.ml" *) + + open OASISGettext + open OASISUtils + open PropList + ++ + module MapString = BaseEnvLight.MapString + ++ + type origin_t = + | ODefault + | OGetEnv + | OFileLoad + | OCommandLine + ++ + type cli_handle_t = + | CLINone + | CLIAuto +@@ -2290,6 +3044,7 @@ + | CLIEnable + | CLIUser of (Arg.key * Arg.spec * Arg.doc) list + ++ + type definition_t = + { + hide: bool; +@@ -2299,21 +3054,26 @@ + group: string option; + } + ++ + let schema = + Schema.create "environment" + ++ + (* Environment data *) + let env = + Data.create () + ++ + (* Environment data from file *) + let env_from_file = + ref MapString.empty + ++ + (* Lexer for var *) + let var_lxr = + Genlex.make_lexer [] + ++ + let rec var_expand str = + let buff = + Buffer.create ((String.length str) * 2) +@@ -2364,6 +3124,7 @@ + str; + Buffer.contents buff + ++ + and var_get name = + let vl = + try +@@ -2378,6 +3139,7 @@ + in + var_expand vl + ++ + let var_choose ?printer ?name lst = + OASISExpr.choose + ?printer +@@ -2385,6 +3147,7 @@ + var_get + lst + ++ + let var_protect vl = + let buff = + Buffer.create (String.length vl) +@@ -2396,6 +3159,7 @@ + vl; + Buffer.contents buff + ++ + let var_define + ?(hide=false) + ?(dump=true) +@@ -2481,6 +3245,7 @@ + fun () -> + var_expand (var_get_low (var_get_lst env)) + ++ + let var_redefine + ?hide + ?dump +@@ -2509,8 +3274,9 @@ + dflt + end + +- let var_ignore (e : unit -> string) = +- () ++ ++ let var_ignore (e: unit -> string) = () ++ + + let print_hidden = + var_define +@@ -2521,6 +3287,7 @@ + "print_hidden" + (fun () -> "false") + ++ + let var_all () = + List.rev + (Schema.fold +@@ -2532,24 +3299,28 @@ + [] + schema) + ++ + let default_filename = + BaseEnvLight.default_filename + ++ + let load ?allow_empty ?filename () = + env_from_file := BaseEnvLight.load ?allow_empty ?filename () + ++ + let unload () = + env_from_file := MapString.empty; + Data.clear env + ++ + let dump ?(filename=default_filename) () = + let chn = + open_out_bin filename + in +- let output nm value = ++ let output nm value = + Printf.fprintf chn "%s=%S\n" nm value + in +- let mp_todo = ++ let mp_todo = + (* Dump data from schema *) + Schema.fold + (fun mp_todo nm def _ -> +@@ -2576,6 +3347,7 @@ + (* End of the dump *) + close_out chn + ++ + let print () = + let printable_vars = + Schema.fold +@@ -2614,11 +3386,12 @@ + + Printf.printf "\nConfiguration: \n"; + List.iter +- (fun (name,value) -> ++ (fun (name, value) -> + Printf.printf "%s: %s %s\n" name (dot_pad name) value) + (List.rev printable_vars); + Printf.printf "\n%!" + ++ + let args () = + let arg_concat = + OASISUtils.varname_concat ~hyphen:'-' +@@ -2729,11 +3502,13 @@ + end + + module BaseArgExt = struct +-(* # 21 "src/base/BaseArgExt.ml" *) ++(* # 22 "src/base/BaseArgExt.ml" *) ++ + + open OASISUtils + open OASISGettext + ++ + let parse argv args = + (* Simulate command line for Arg *) + let current = +@@ -2757,13 +3532,15 @@ + end + + module BaseCheck = struct +-(* # 21 "src/base/BaseCheck.ml" *) ++(* # 22 "src/base/BaseCheck.ml" *) ++ + + open BaseEnv + open BaseMessage + open OASISUtils + open OASISGettext + ++ + let prog_best prg prg_lst = + var_redefine + prg +@@ -2786,15 +3563,19 @@ + | Some prg -> prg + | None -> raise Not_found) + ++ + let prog prg = + prog_best prg [prg] + ++ + let prog_opt prg = + prog_best prg [prg^".opt"; prg] + ++ + let ocamlfind = + prog "ocamlfind" + ++ + let version + var_prefix + cmp +@@ -2836,11 +3617,13 @@ + version_str) + () + ++ + let package_version pkg = + OASISExec.run_read_one_line ~ctxt:!BaseContext.default + (ocamlfind ()) + ["query"; "-format"; "%v"; pkg] + ++ + let package ?version_comparator pkg () = + let var = + OASISUtils.varname_concat +@@ -2883,18 +3666,21 @@ + end + + module BaseOCamlcConfig = struct +-(* # 21 "src/base/BaseOCamlcConfig.ml" *) ++(* # 22 "src/base/BaseOCamlcConfig.ml" *) + + + open BaseEnv + open OASISUtils + open OASISGettext + ++ + module SMap = Map.Make(String) + ++ + let ocamlc = + BaseCheck.prog_opt "ocamlc" + ++ + let ocamlc_config_map = + (* Map name to value for ocamlc -config output + (name ^": "^value) +@@ -2940,7 +3726,7 @@ + mp + in + +- let cache = ++ let cache = + lazy + (var_protect + (Marshal.to_string +@@ -2959,6 +3745,7 @@ + (* TODO: update if ocamlc change !!! *) + Lazy.force cache) + ++ + let var_define nm = + (* Extract data from ocamlc -config *) + let avlbl_config_get () = +@@ -2967,15 +3754,15 @@ + 0 + in + let chop_version_suffix s = +- try ++ try + String.sub s 0 (String.index s '+') +- with _ -> ++ with _ -> + s + in + + let nm_config, value_config = + match nm with +- | "ocaml_version" -> ++ | "ocaml_version" -> + "version", chop_version_suffix + | _ -> nm, (fun x -> x) + in +@@ -2999,7 +3786,7 @@ + end + + module BaseStandardVar = struct +-(* # 21 "src/base/BaseStandardVar.ml" *) ++(* # 22 "src/base/BaseStandardVar.ml" *) + + + open OASISGettext +@@ -3008,6 +3795,7 @@ + open BaseCheck + open BaseEnv + ++ + let ocamlfind = BaseCheck.ocamlfind + let ocamlc = BaseOCamlcConfig.ocamlc + let ocamlopt = prog_opt "ocamlopt" +@@ -3018,13 +3806,16 @@ + let rpkg = + ref None + ++ + let pkg_get () = + match !rpkg with + | Some pkg -> pkg + | None -> failwith (s_ "OASIS Package is not set") + ++ + let var_cond = ref [] + ++ + let var_define_cond ~since_version f dflt = + let holder = ref (fun () -> dflt) in + let since_version = +@@ -3036,14 +3827,17 @@ + holder := f ()) :: !var_cond; + fun () -> !holder () + ++ + (**/**) + ++ + let pkg_name = + var_define + ~short_desc:(fun () -> s_ "Package name") + "pkg_name" + (fun () -> (pkg_get ()).name) + ++ + let pkg_version = + var_define + ~short_desc:(fun () -> s_ "Package version") +@@ -3051,16 +3845,20 @@ + (fun () -> + (OASISVersion.string_of_version (pkg_get ()).version)) + ++ + let c = BaseOCamlcConfig.var_define + ++ + let os_type = c "os_type" + let system = c "system" + let architecture = c "architecture" + let ccomp_type = c "ccomp_type" + let ocaml_version = c "ocaml_version" + ++ + (* TODO: Check standard variable presence at runtime *) + ++ + let standard_library_default = c "standard_library_default" + let standard_library = c "standard_library" + let standard_runtime = c "standard_runtime" +@@ -3074,24 +3872,27 @@ + let default_executable_name = c "default_executable_name" + let systhread_supported = c "systhread_supported" + +- let flexlink = ++ ++ let flexlink = + BaseCheck.prog "flexlink" + ++ + let flexdll_version = + var_define + ~short_desc:(fun () -> "FlexDLL version (Win32)") + "flexdll_version" + (fun () -> +- let lst = ++ let lst = + OASISExec.run_read_output ~ctxt:!BaseContext.default + (flexlink ()) ["-help"] + in +- match lst with ++ match lst with + | line :: _ -> + Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) + | [] -> + raise Not_found) + ++ + (**/**) + let p name hlp dflt = + var_define +@@ -3101,6 +3902,7 @@ + name + dflt + ++ + let (/) a b = + if os_type () = Sys.os_type then + Filename.concat a b +@@ -3111,6 +3913,7 @@ + (os_type ()) + (**/**) + ++ + let prefix = + p "prefix" + (fun () -> s_ "Install architecture-independent files dir") +@@ -3124,96 +3927,115 @@ + | _ -> + "/usr/local") + ++ + let exec_prefix = + p "exec_prefix" + (fun () -> s_ "Install architecture-dependent files in dir") + (fun () -> "$prefix") + ++ + let bindir = + p "bindir" + (fun () -> s_ "User executables") + (fun () -> "$exec_prefix"/"bin") + ++ + let sbindir = + p "sbindir" + (fun () -> s_ "System admin executables") + (fun () -> "$exec_prefix"/"sbin") + ++ + let libexecdir = + p "libexecdir" + (fun () -> s_ "Program executables") + (fun () -> "$exec_prefix"/"libexec") + ++ + let sysconfdir = + p "sysconfdir" + (fun () -> s_ "Read-only single-machine data") + (fun () -> "$prefix"/"etc") + ++ + let sharedstatedir = + p "sharedstatedir" + (fun () -> s_ "Modifiable architecture-independent data") + (fun () -> "$prefix"/"com") + ++ + let localstatedir = + p "localstatedir" + (fun () -> s_ "Modifiable single-machine data") + (fun () -> "$prefix"/"var") + ++ + let libdir = + p "libdir" + (fun () -> s_ "Object code libraries") + (fun () -> "$exec_prefix"/"lib") + ++ + let datarootdir = + p "datarootdir" + (fun () -> s_ "Read-only arch-independent data root") + (fun () -> "$prefix"/"share") + ++ + let datadir = + p "datadir" + (fun () -> s_ "Read-only architecture-independent data") + (fun () -> "$datarootdir") + ++ + let infodir = + p "infodir" + (fun () -> s_ "Info documentation") + (fun () -> "$datarootdir"/"info") + ++ + let localedir = + p "localedir" + (fun () -> s_ "Locale-dependent data") + (fun () -> "$datarootdir"/"locale") + ++ + let mandir = + p "mandir" + (fun () -> s_ "Man documentation") + (fun () -> "$datarootdir"/"man") + ++ + let docdir = + p "docdir" + (fun () -> s_ "Documentation root") + (fun () -> "$datarootdir"/"doc"/"$pkg_name") + ++ + let htmldir = + p "htmldir" + (fun () -> s_ "HTML documentation") + (fun () -> "$docdir") + ++ + let dvidir = + p "dvidir" + (fun () -> s_ "DVI documentation") + (fun () -> "$docdir") + ++ + let pdfdir = + p "pdfdir" + (fun () -> s_ "PDF documentation") + (fun () -> "$docdir") + ++ + let psdir = + p "psdir" + (fun () -> s_ "PS documentation") + (fun () -> "$docdir") + ++ + let destdir = + p "destdir" + (fun () -> s_ "Prepend a path when installing package") +@@ -3223,35 +4045,39 @@ + ("destdir", + Some (s_ "undefined by construct")))) + ++ + let findlib_version = + var_define + "findlib_version" + (fun () -> + BaseCheck.package_version "findlib") + ++ + let is_native = + var_define + "is_native" + (fun () -> + try +- let _s : string = ++ let _s: string = + ocamlopt () + in + "true" + with PropList.Not_set _ -> +- let _s : string = ++ let _s: string = + ocamlc () + in + "false") + ++ + let ext_program = + var_define + "suffix_program" + (fun () -> + match os_type () with +- | "Win32" -> ".exe" ++ | "Win32" | "Cygwin" -> ".exe" + | _ -> "") + ++ + let rm = + var_define + ~short_desc:(fun () -> s_ "Remove a file.") +@@ -3261,6 +4087,7 @@ + | "Win32" -> "del" + | _ -> "rm -f") + ++ + let rmdir = + var_define + ~short_desc:(fun () -> s_ "Remove a directory.") +@@ -3270,6 +4097,7 @@ + | "Win32" -> "rd" + | _ -> "rm -rf") + ++ + let debug = + var_define + ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") +@@ -3277,6 +4105,7 @@ + "debug" + (fun () -> "true") + ++ + let profile = + var_define + ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") +@@ -3284,6 +4113,7 @@ + "profile" + (fun () -> "false") + ++ + let tests = + var_define_cond ~since_version:"0.3" + (fun () -> +@@ -3295,6 +4125,7 @@ + (fun () -> "false")) + "true" + ++ + let docs = + var_define_cond ~since_version:"0.3" + (fun () -> +@@ -3305,6 +4136,7 @@ + (fun () -> "true")) + "true" + ++ + let native_dynlink = + var_define + ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") +@@ -3312,7 +4144,7 @@ + "native_dynlink" + (fun () -> + let res = +- let ocaml_lt_312 () = ++ let ocaml_lt_312 () = + OASISVersion.comparator_apply + (OASISVersion.version_of_string (ocaml_version ())) + (OASISVersion.VLesser +@@ -3324,7 +4156,7 @@ + (OASISVersion.VLesser + (OASISVersion.version_of_string "0.30")) + in +- let has_native_dynlink = ++ let has_native_dynlink = + let ocamlfind = ocamlfind () in + try + let fn = +@@ -3342,10 +4174,10 @@ + false + else if ocaml_lt_312 () then + false +- else if (os_type () = "Win32" || os_type () = "Cygwin") ++ else if (os_type () = "Win32" || os_type () = "Cygwin") + && flexdll_lt_030 () then + begin +- BaseMessage.warning ++ BaseMessage.warning + (f_ ".cmxs generation disabled because FlexDLL needs to be \ + at least 0.30. Please upgrade FlexDLL from %s to 0.30.") + (flexdll_version ()); +@@ -3356,6 +4188,7 @@ + in + string_of_bool res) + ++ + let init pkg = + rpkg := Some pkg; + List.iter (fun f -> f pkg.oasis_version) !var_cond +@@ -3363,12 +4196,14 @@ + end + + module BaseFileAB = struct +-(* # 21 "src/base/BaseFileAB.ml" *) ++(* # 22 "src/base/BaseFileAB.ml" *) ++ + + open BaseEnv + open OASISGettext + open BaseMessage + ++ + let to_filename fn = + let fn = + OASISHostPath.of_unix fn +@@ -3379,6 +4214,7 @@ + fn; + Filename.chop_extension fn + ++ + let replace fn_lst = + let buff = + Buffer.create 13 +@@ -3411,15 +4247,18 @@ + end + + module BaseLog = struct +-(* # 21 "src/base/BaseLog.ml" *) ++(* # 22 "src/base/BaseLog.ml" *) ++ + + open OASISUtils + ++ + let default_filename = + Filename.concat + (Filename.dirname BaseEnv.default_filename) + "setup.log" + ++ + module SetTupleString = + Set.Make + (struct +@@ -3430,6 +4269,7 @@ + | n -> n + end) + ++ + let load () = + if Sys.file_exists default_filename then + begin +@@ -3479,6 +4319,7 @@ + [] + end + ++ + let register event data = + let chn_out = + open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename +@@ -3486,6 +4327,7 @@ + Printf.fprintf chn_out "%S %S\n" event data; + close_out chn_out + ++ + let unregister event data = + if Sys.file_exists default_filename then + begin +@@ -3511,6 +4353,7 @@ + Sys.remove default_filename + end + ++ + let filter events = + let st_events = + List.fold_left +@@ -3523,6 +4366,7 @@ + (fun (e, _) -> SetString.mem e st_events) + (load ()) + ++ + let exists event data = + List.exists + (fun v -> (event, data) = v) +@@ -3530,31 +4374,38 @@ + end + + module BaseBuilt = struct +-(* # 21 "src/base/BaseBuilt.ml" *) ++(* # 22 "src/base/BaseBuilt.ml" *) ++ + + open OASISTypes + open OASISGettext + open BaseStandardVar + open BaseMessage + ++ + type t = + | BExec (* Executable *) + | BExecLib (* Library coming with executable *) + | BLib (* Library *) ++ | BObj (* Library *) + | BDoc (* Document *) + ++ + let to_log_event_file t nm = + "built_"^ + (match t with + | BExec -> "exec" + | BExecLib -> "exec_lib" + | BLib -> "lib" ++ | BObj -> "obj" + | BDoc -> "doc")^ + "_"^nm + ++ + let to_log_event_done t nm = + "is_"^(to_log_event_file t nm) + ++ + let register t nm lst = + BaseLog.register + (to_log_event_done t nm) +@@ -3585,6 +4436,7 @@ + (String.concat (s_ ", ") alt)) + lst + ++ + let unregister t nm = + List.iter + (fun (e, d) -> +@@ -3593,6 +4445,7 @@ + [to_log_event_file t nm; + to_log_event_done t nm]) + ++ + let fold t nm f acc = + List.fold_left + (fun acc (_, fn) -> +@@ -3612,6 +4465,8 @@ + (f_ "executable %s") + | BLib -> + (f_ "library %s") ++ | BObj -> ++ (f_ "object %s") + | BDoc -> + (f_ "documentation %s")) + nm); +@@ -3621,6 +4476,7 @@ + (BaseLog.filter + [to_log_event_file t nm]) + ++ + let is_built t nm = + List.fold_left + (fun is_built (_, d) -> +@@ -3632,6 +4488,7 @@ + (BaseLog.filter + [to_log_event_done t nm]) + ++ + let of_executable ffn (cs, bs, exec) = + let unix_exec_is, unix_dll_opt = + OASISExecutable.unix_exec_is +@@ -3655,6 +4512,7 @@ + unix_exec_is, + unix_dll_opt + ++ + let of_library ffn (cs, bs, lib) = + let unix_lst = + OASISLibrary.generated_unix_files +@@ -3674,16 +4532,35 @@ + in + evs, unix_lst + ++ ++ let of_object ffn (cs, bs, obj) = ++ let unix_lst = ++ OASISObject.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ (cs, bs, obj) ++ in ++ let evs = ++ [BObj, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ + end + + module BaseCustom = struct +-(* # 21 "src/base/BaseCustom.ml" *) ++(* # 22 "src/base/BaseCustom.ml" *) ++ + + open BaseEnv + open BaseMessage + open OASISTypes + open OASISGettext + ++ + let run cmd args extra_args = + OASISExec.run ~ctxt:!BaseContext.default ~quote:false + (var_expand cmd) +@@ -3691,6 +4568,7 @@ + var_expand + (args @ (Array.to_list extra_args))) + ++ + let hook ?(failsafe=false) cstm f e = + let optional_command lst = + let printer = +@@ -3727,7 +4605,7 @@ + end + + module BaseDynVar = struct +-(* # 21 "src/base/BaseDynVar.ml" *) ++(* # 22 "src/base/BaseDynVar.ml" *) + + + open OASISTypes +@@ -3735,6 +4613,7 @@ + open BaseEnv + open BaseBuilt + ++ + let init pkg = + (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) + (* TODO: provide compile option for library libary_byte_args_VARNAME... *) +@@ -3768,13 +4647,14 @@ + (f_ "Executable '%s' not yet built.") + cs.cs_name))))) + +- | Library _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> ++ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> + ()) + pkg.sections + end + + module BaseTest = struct +-(* # 21 "src/base/BaseTest.ml" *) ++(* # 22 "src/base/BaseTest.ml" *) ++ + + open BaseEnv + open BaseMessage +@@ -3782,6 +4662,7 @@ + open OASISExpr + open OASISGettext + ++ + let test lst pkg extra_args = + + let one_test (failure, n) (test_plugin, cs, test) = +@@ -3832,7 +4713,7 @@ + (failure, n) + end + in +- let (failed, n) = ++ let failed, n = + List.fold_left + one_test + (0.0, 0) +@@ -3855,7 +4736,7 @@ + info "%s" msg; + + (* Possible explanation why the tests where not run. *) +- if OASISVersion.version_0_3_or_after pkg.oasis_version && ++ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && + not (bool_of_string (BaseStandardVar.tests ())) && + lst <> [] then + BaseMessage.warning +@@ -3864,13 +4745,15 @@ + end + + module BaseDoc = struct +-(* # 21 "src/base/BaseDoc.ml" *) ++(* # 22 "src/base/BaseDoc.ml" *) ++ + + open BaseEnv + open BaseMessage + open OASISTypes + open OASISGettext + ++ + let doc lst pkg extra_args = + + let one_doc (doc_plugin, cs, doc) = +@@ -3890,7 +4773,7 @@ + in + List.iter one_doc lst; + +- if OASISVersion.version_0_3_or_after pkg.oasis_version && ++ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && + not (bool_of_string (BaseStandardVar.docs ())) && + lst <> [] then + BaseMessage.warning +@@ -3899,7 +4782,7 @@ + end + + module BaseSetup = struct +-(* # 21 "src/base/BaseSetup.ml" *) ++(* # 22 "src/base/BaseSetup.ml" *) + + open BaseEnv + open BaseMessage +@@ -3908,12 +4791,15 @@ + open OASISGettext + open OASISUtils + ++ + type std_args_fun = + package -> string array -> unit + ++ + type ('a, 'b) section_args_fun = + name * (package -> (common_section * 'a) -> string array -> 'b) + ++ + type t = + { + configure: std_args_fun; +@@ -3937,6 +4823,7 @@ + setup_update: bool; + } + ++ + (* Associate a plugin function with data from package *) + let join_plugin_sections filter_map lst = + List.rev +@@ -3950,6 +4837,7 @@ + [] + lst) + ++ + (* Search for plugin data associated with a section name *) + let lookup_plugin_section plugin action nm lst = + try +@@ -3961,11 +4849,12 @@ + nm + action + ++ + let configure t args = + (* Run configure *) + BaseCustom.hook + t.package.conf_custom +- (fun () -> ++ (fun () -> + (* Reload if preconf has changed it *) + begin + try +@@ -3992,12 +4881,14 @@ + (* Replace data in file *) + BaseFileAB.replace t.package.files_ab + ++ + let build t args = + BaseCustom.hook + t.package.build_custom + (t.build t.package) + args + ++ + let doc t args = + BaseDoc.doc + (join_plugin_sections +@@ -4017,6 +4908,7 @@ + t.package + args + ++ + let test t args = + BaseTest.test + (join_plugin_sections +@@ -4036,6 +4928,7 @@ + t.package + args + ++ + let all t args = + let rno_doc = + ref false +@@ -4043,6 +4936,9 @@ + let rno_test = + ref false + in ++ let arg_rest = ++ ref [] ++ in + Arg.parse_argv + ~current:(ref 0) + (Array.of_list +@@ -4056,12 +4952,16 @@ + "-no-test", + Arg.Set rno_test, + s_ "Don't run test target"; ++ ++ "--", ++ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), ++ s_ "All arguments for configure."; + ] + (failwithf (f_ "Don't know what to do with '%s'")) + ""; + + info "Running configure step"; +- configure t [||]; ++ configure t (Array.of_list (List.rev !arg_rest)); + + info "Running build step"; + build t [||]; +@@ -4089,22 +4989,26 @@ + info "Skipping test step" + end + ++ + let install t args = + BaseCustom.hook + t.package.install_custom + (t.install t.package) + args + ++ + let uninstall t args = + BaseCustom.hook + t.package.uninstall_custom + (t.uninstall t.package) + args + ++ + let reinstall t args = + uninstall t args; + install t args + ++ + let clean, distclean = + let failsafe f a = + try +@@ -4146,6 +5050,7 @@ + (f t.package (cs, doc)) + args + | Library _ ++ | Object _ + | Executable _ + | Flag _ + | SrcRepo _ -> +@@ -4201,9 +5106,11 @@ + + clean, distclean + ++ + let version t _ = + print_endline t.oasis_version + ++ + let update_setup_ml, no_update_setup_ml_cli = + let b = ref true in + b, +@@ -4211,11 +5118,15 @@ + Arg.Clear b, + s_ " Don't try to update setup.ml, even if _oasis has changed.") + ++ ++ let default_oasis_fn = "_oasis" ++ ++ + let update_setup_ml t = + let oasis_fn = + match t.oasis_fn with + | Some fn -> fn +- | None -> "_oasis" ++ | None -> default_oasis_fn + in + let oasis_exec = + match t.oasis_exec with +@@ -4313,7 +5224,8 @@ + try + match t.oasis_digest with + | Some dgst -> +- if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then ++ if Sys.file_exists oasis_fn && ++ dgst <> Digest.file default_oasis_fn then + begin + do_update (); + true +@@ -4333,6 +5245,7 @@ + else + false + ++ + let setup t = + let catch_exn = + ref true +@@ -4474,41 +5387,34 @@ + error "%s" (Printexc.to_string e); + exit 1 + ++ + end + + +-# 4480 "setup.ml" ++# 5394 "setup.ml" + module InternalConfigurePlugin = struct +-(* # 21 "src/plugins/internal/InternalConfigurePlugin.ml" *) ++(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) ++ + + (** Configure using internal scheme + @author Sylvain Le Gall + *) + ++ + open BaseEnv + open OASISTypes + open OASISUtils + open OASISGettext + open BaseMessage + ++ + (** Configure build using provided series of check to be done + * and then output corresponding file. + *) + let configure pkg argv = +- let var_ignore_eval var = +- let _s : string = +- var () +- in +- () +- in +- +- let errors = +- ref SetString.empty +- in +- +- let buff = +- Buffer.create 13 +- in ++ let var_ignore_eval var = let _s: string = var () in () in ++ let errors = ref SetString.empty in ++ let buff = Buffer.create 13 in + + let add_errors fmt = + Printf.kbprintf +@@ -4656,6 +5562,20 @@ + | None -> + () + end; ++ (* Make sure the findlib version is fine for the OCaml compiler. *) ++ begin ++ let ocaml_ge4 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) ++ (OASISVersion.version_of_string "4.0.0") >= 0 in ++ if ocaml_ge4 then ++ let findlib_lt132 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) ++ (OASISVersion.version_of_string "1.3.2") < 0 in ++ if findlib_lt132 then ++ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" ++ end; + + (* FlexDLL *) + if BaseStandardVar.os_type () = "Win32" || +@@ -4718,43 +5638,58 @@ + (SetString.cardinal !errors) + end + ++ + end + + module InternalInstallPlugin = struct +-(* # 21 "src/plugins/internal/InternalInstallPlugin.ml" *) ++(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) ++ + + (** Install using internal scheme + @author Sylvain Le Gall + *) + ++ + open BaseEnv + open BaseStandardVar + open BaseMessage + open OASISTypes +- open OASISLibrary ++ open OASISFindlib + open OASISGettext + open OASISUtils + ++ + let exec_hook = + ref (fun (cs, bs, exec) -> cs, bs, exec) + ++ + let lib_hook = + ref (fun (cs, bs, lib) -> cs, bs, lib, []) + ++ ++ let obj_hook = ++ ref (fun (cs, bs, obj) -> cs, bs, obj, []) ++ ++ + let doc_hook = + ref (fun (cs, doc) -> cs, doc) + ++ + let install_file_ev = + "install-file" + ++ + let install_dir_ev = + "install-dir" + ++ + let install_findlib_ev = + "install-findlib" + ++ + let win32_max_command_line_length = 8000 + ++ + let split_install_command ocamlfind findlib_name meta files = + if Sys.os_type = "Win32" then + (* Arguments for the first command: *) +@@ -4794,20 +5729,21 @@ + | (firsts, others) -> + let cmd = args @ firsts in + (* Use -add for remaining commands: *) +- let () = ++ let () = + let findlib_ge_132 = + OASISVersion.comparator_apply +- (OASISVersion.version_of_string ++ (OASISVersion.version_of_string + (BaseStandardVar.findlib_version ())) +- (OASISVersion.VGreaterEqual ++ (OASISVersion.VGreaterEqual + (OASISVersion.version_of_string "1.3.2")) + in + if not findlib_ge_132 then + failwithf +- (f_ "Installing the library %s require to use the flag \ +- '-add' of ocamlfind because the command line is too \ +- long. This flag is only available for findlib 1.3.2. \ +- Please upgrade findlib from %s to 1.3.2") ++ (f_ "Installing the library %s require to use the \ ++ flag '-add' of ocamlfind because the command \ ++ line is too long. This flag is only available \ ++ for findlib 1.3.2. Please upgrade findlib from \ ++ %s to 1.3.2") + findlib_name (BaseStandardVar.findlib_version ()) + in + let cmds = split other_args others in +@@ -4818,6 +5754,7 @@ + else + ["install" :: findlib_name :: meta :: files] + ++ + let install pkg argv = + + let in_destdir = +@@ -4961,6 +5898,75 @@ + begin + (f_data, acc) + end ++ and files_of_object (f_data, acc) data_obj = ++ let cs, bs, obj, obj_extra = ++ !obj_hook data_obj ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + obj_extra *) ++ List.rev_append obj_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in object %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ obj.obj_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BObj ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the object *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ + in + + (* Install one group of library *) +@@ -4971,8 +5977,10 @@ + match grp with + | Container (_, children) -> + data_and_files, children +- | Package (_, cs, bs, lib, children) -> ++ | Package (_, cs, bs, `Library lib, children) -> + files_of_library data_and_files (cs, bs, lib), children ++ | Package (_, cs, bs, `Object obj, children) -> ++ files_of_object data_and_files (cs, bs, obj), children + in + List.fold_left + install_group_lib_aux +@@ -5006,7 +6014,7 @@ + begin + let meta = + (* Search META file *) +- let (_, bs, _) = ++ let _, bs, _ = + root_lib + in + let res = +@@ -5019,7 +6027,7 @@ + findlib_name; + res + in +- let files = ++ let files = + (* Make filename shorter to avoid hitting command max line length + * too early, esp. on Windows. + *) +@@ -5028,24 +6036,24 @@ + let nlen = String.length n in + if plen <= nlen && String.sub n 0 plen = p then + begin +- let fn_sep = ++ let fn_sep = + if Sys.os_type = "Win32" then + '\\' + else + '/' + in + let cutpoint = plen + +- (if plen < nlen && n.[plen] = fn_sep then ++ (if plen < nlen && n.[plen] = fn_sep then + 1 +- else ++ else + 0) + in + String.sub n cutpoint (nlen - cutpoint) + end +- else ++ else + n + in +- List.map (remove_prefix (Sys.getcwd ())) files ++ List.map (remove_prefix (Sys.getcwd ())) files + in + info + (f_ "Installing findlib library '%s'") +@@ -5079,7 +6087,7 @@ + + let install_execs pkg = + let install_exec data_exec = +- let (cs, bs, exec) = ++ let cs, bs, exec = + !exec_hook data_exec + in + if var_choose bs.bs_install && +@@ -5126,7 +6134,7 @@ + + let install_docs pkg = + let install_doc data = +- let (cs, doc) = ++ let cs, doc = + !doc_hook data + in + if var_choose doc.doc_install && +@@ -5162,6 +6170,7 @@ + install_execs pkg; + install_docs pkg + ++ + (* Uninstall already installed data *) + let uninstall _ argv = + List.iter +@@ -5225,24 +6234,34 @@ + (BaseLog.filter + [install_file_ev; + install_dir_ev; +- install_findlib_ev;])) ++ install_findlib_ev])) ++ + + end + + +-# 5233 "setup.ml" ++# 6243 "setup.ml" + module OCamlbuildCommon = struct +-(* # 21 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) ++ + + (** Functions common to OCamlbuild build and doc plugin + *) + ++ + open OASISGettext + open BaseEnv + open BaseStandardVar ++ open OASISTypes ++ ++ ++ ++ ++ type extra_args = string list ++ ++ ++ let ocamlbuild_clean_ev = "ocamlbuild-clean" + +- let ocamlbuild_clean_ev = +- "ocamlbuild-clean" + + let ocamlbuildflags = + var_define +@@ -5250,6 +6269,7 @@ + "ocamlbuildflags" + (fun () -> "") + ++ + (** Fix special arguments depending on environment *) + let fix_args args extra_argv = + List.flatten +@@ -5288,6 +6308,7 @@ + Array.to_list extra_argv; + ] + ++ + (** Run 'ocamlbuild -clean' if not already done *) + let run_clean extra_argv = + let extra_cli = +@@ -5307,6 +6328,7 @@ + ()) + end + ++ + (** Run ocamlbuild, unregister all clean events *) + let run_ocamlbuild args extra_argv = + (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html +@@ -5318,6 +6340,7 @@ + (fun (e, d) -> BaseLog.unregister e d) + (BaseLog.filter [ocamlbuild_clean_ev]) + ++ + (** Determine real build directory *) + let build_dir extra_argv = + let rec search_args dir = +@@ -5331,28 +6354,36 @@ + in + search_args "_build" (fix_args [] extra_argv) + ++ + end + + module OCamlbuildPlugin = struct +-(* # 21 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) ++ + + (** Build using ocamlbuild + @author Sylvain Le Gall + *) + ++ + open OASISTypes + open OASISGettext + open OASISUtils ++ open OASISString + open BaseEnv + open OCamlbuildCommon + open BaseStandardVar + open BaseMessage + ++ ++ ++ ++ + let cond_targets_hook = + ref (fun lst -> lst) + +- let build pkg argv = + ++ let build extra_args pkg argv = + (* Return the filename in build directory *) + let in_build_dir fn = + Filename.concat +@@ -5377,16 +6408,36 @@ + (cs, bs, lib) + in + +- let ends_with nd fn = +- let nd_len = +- String.length nd +- in +- (String.length fn >= nd_len) +- && +- (String.sub +- fn +- (String.length fn - nd_len) +- nd_len) = nd ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ~what:".cma" fn ++ || ends_with ~what:".cmxs" fn ++ || ends_with ~what:".cmxa" fn ++ || ends_with ~what:(ext_lib ()) fn ++ || ends_with ~what:(ext_dll ()) fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for library %s") ++ cs.cs_name ++ end ++ ++ | Object (cs, bs, obj) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_object ++ in_build_dir_of_unix ++ (cs, bs, obj) + in + + let tgts = +@@ -5396,11 +6447,8 @@ + (List.map + (List.filter + (fun fn -> +- ends_with ".cma" fn +- || ends_with ".cmxs" fn +- || ends_with ".cmxa" fn +- || ends_with (ext_lib ()) fn +- || ends_with (ext_dll ()) fn)) ++ ends_with ".cmo" fn ++ || ends_with ".cmx" fn)) + unix_files)) + in + +@@ -5409,7 +6457,7 @@ + (evs, tgts) :: acc + | [] -> + failwithf +- (f_ "No possible ocamlbuild targets for library %s") ++ (f_ "No possible ocamlbuild targets for object %s") + cs.cs_name + end + +@@ -5428,12 +6476,13 @@ + (OASISUnixPath.chop_extension + exec.exec_main_is))^ext + in +- let evs = ++ let evs = + (* Fix evs, we want to use the unix_tgt, without copying *) + List.map + (function + | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> +- BaseBuilt.BExec, nm, [[in_build_dir_of_unix unix_tgt]] ++ BaseBuilt.BExec, nm, ++ [[in_build_dir_of_unix unix_tgt]] + | ev -> + ev) + evs +@@ -5455,7 +6504,7 @@ + acc + end + +- | Library _ | Executable _ | Test _ ++ | Library _ | Object _ | Executable _ | Test _ + | SrcRepo _ | Flag _ | Doc _ -> + acc) + [] +@@ -5469,26 +6518,22 @@ + (fun fns -> + if not (List.exists OASISFileUtil.file_exists_case fns) then + failwithf +- (f_ "No one of expected built files %s exists") +- (String.concat (s_ ", ") (List.map (Printf.sprintf "'%s'") fns))) ++ (fn_ ++ "Expected built file %s doesn't exist." ++ "None of expected built files %s exists." ++ (List.length fns)) ++ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) + lst; + (BaseBuilt.register bt bnm lst) + in + +- let cond_targets = +- (* Run the hook *) +- !cond_targets_hook cond_targets +- in ++ (* Run the hook *) ++ let cond_targets = !cond_targets_hook cond_targets in + +- (* Run a list of target... *) +- run_ocamlbuild +- (List.flatten +- (List.map snd cond_targets)) +- argv; +- (* ... and register events *) +- List.iter +- check_and_register +- (List.flatten (List.map fst cond_targets)) ++ (* Run a list of target... *) ++ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; ++ (* ... and register events *) ++ List.iter check_and_register (List.flatten (List.map fst cond_targets)) + + + let clean pkg extra_args = +@@ -5504,15 +6549,18 @@ + ()) + pkg.sections + ++ + end + + module OCamlbuildDocPlugin = struct +-(* # 21 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) ++ + + (* Create documentation using ocamlbuild .odocl files + @author Sylvain Le Gall + *) + ++ + open OASISTypes + open OASISGettext + open OASISMessage +@@ -5521,11 +6569,19 @@ + + + +- let doc_build path pkg (cs, doc) argv = ++ ++ type run_t = ++ { ++ extra_args: string list; ++ run_path: unix_filename; ++ } ++ ++ ++ let doc_build run pkg (cs, doc) argv = + let index_html = + OASISUnixPath.make + [ +- path; ++ run.run_path; + cs.cs_name^".docdir"; + "index.html"; + ] +@@ -5534,11 +6590,11 @@ + OASISHostPath.make + [ + build_dir argv; +- OASISHostPath.of_unix path; ++ OASISHostPath.of_unix run.run_path; + cs.cs_name^".docdir"; + ] + in +- run_ocamlbuild [index_html] argv; ++ run_ocamlbuild (index_html :: run.extra_args) argv; + List.iter + (fun glb -> + BaseBuilt.register +@@ -5548,43 +6604,52 @@ + (Filename.concat tgt_dir glb)]) + ["*.html"; "*.css"] + +- let doc_clean t pkg (cs, doc) argv = ++ ++ let doc_clean run pkg (cs, doc) argv = + run_clean argv; + BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name + ++ + end + + +-# 5558 "setup.ml" ++# 6616 "setup.ml" + module CustomPlugin = struct +-(* # 21 "src/plugins/custom/CustomPlugin.ml" *) ++(* # 22 "src/plugins/custom/CustomPlugin.ml" *) ++ + + (** Generate custom configure/build/doc/test/install system + @author + *) + ++ + open BaseEnv + open OASISGettext + open OASISTypes + + + ++ ++ + type t = + { + cmd_main: command_line conditional; + cmd_clean: (command_line option) conditional; + cmd_distclean: (command_line option) conditional; +- } ++ } ++ ++ ++ let run = BaseCustom.run + +- let run = BaseCustom.run + + let main t _ extra_args = + let cmd, args = +- var_choose +- ~name:(s_ "main command") ++ var_choose ++ ~name:(s_ "main command") + t.cmd_main + in +- run cmd args extra_args ++ run cmd args extra_args ++ + + let clean t pkg extra_args = + match var_choose t.cmd_clean with +@@ -5593,6 +6658,7 @@ + | _ -> + () + ++ + let distclean t pkg extra_args = + match var_choose t.cmd_distclean with + | Some (cmd, args) -> +@@ -5600,20 +6666,21 @@ + | _ -> + () + ++ + module Build = +- struct ++ struct + let main t pkg extra_args = + main t pkg extra_args; + List.iter + (fun sct -> + let evs = +- match sct with ++ match sct with + | Library (cs, bs, lib) when var_choose bs.bs_build -> + begin +- let evs, _ = +- BaseBuilt.of_library ++ let evs, _ = ++ BaseBuilt.of_library + OASISHostPath.of_unix +- (cs, bs, lib) ++ (cs, bs, lib) + in + evs + end +@@ -5654,6 +6721,7 @@ + distclean t pkg extra_args + end + ++ + module Test = + struct + let main t pkg (cs, test) extra_args = +@@ -5661,7 +6729,7 @@ + main t pkg extra_args; + 0.0 + with Failure s -> +- BaseMessage.warning ++ BaseMessage.warning + (f_ "Test '%s' fails: %s") + cs.cs_name + s; +@@ -5671,9 +6739,10 @@ + clean t pkg extra_args + + let distclean t pkg (cs, test) extra_args = +- distclean t pkg extra_args ++ distclean t pkg extra_args + end + ++ + module Doc = + struct + let main t pkg (cs, _) extra_args = +@@ -5688,16 +6757,17 @@ + distclean t pkg extra_args + end + ++ + end + + +-# 5694 "setup.ml" ++# 6764 "setup.ml" + open OASISTypes;; + + let setup_t = + { + BaseSetup.configure = InternalConfigurePlugin.configure; +- build = OCamlbuildPlugin.build; ++ build = OCamlbuildPlugin.build []; + test = + [ + ("opasswd_test", +@@ -5709,8 +6779,8 @@ + ("sudo", ["_build/test/opasswd_test.native"])) + ]; + cmd_clean = [(OASISExpr.EBool true, None)]; +- cmd_distclean = [(OASISExpr.EBool true, None)]; +- }) ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) + ]; + doc = []; + install = InternalInstallPlugin.install; +@@ -5727,8 +6797,8 @@ + ("sudo", ["_build/test/opasswd_test.native"])) + ]; + cmd_clean = [(OASISExpr.EBool true, None)]; +- cmd_distclean = [(OASISExpr.EBool true, None)]; +- }) ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) + ]; + clean_doc = []; + distclean = []; +@@ -5743,8 +6813,8 @@ + ("sudo", ["_build/test/opasswd_test.native"])) + ]; + cmd_clean = [(OASISExpr.EBool true, None)]; +- cmd_distclean = [(OASISExpr.EBool true, None)]; +- }) ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) + ]; + distclean_doc = []; + package = +@@ -5752,6 +6822,8 @@ + oasis_version = "0.3"; + ocaml_version = None; + findlib_version = None; ++ alpha_features = []; ++ beta_features = []; + name = "passwd"; + version = "0.9.3"; + license = +@@ -5760,8 +6832,8 @@ + { + OASISLicense.license = "ISC"; + excption = None; +- version = OASISLicense.NoVersion; +- }); ++ version = OASISLicense.NoVersion ++ }); + license_file = Some "LICENSE"; + copyrights = []; + maintainers = []; +@@ -5770,39 +6842,39 @@ + synopsis = "OCaml interface to Unix password library"; + description = None; + categories = []; +- conf_type = (`Configure, "internal", Some "0.3"); ++ conf_type = (`Configure, "internal", Some "0.4"); + conf_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; +- build_type = (`Build, "ocamlbuild", Some "0.3"); ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ build_type = (`Build, "ocamlbuild", Some "0.4"); + build_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; +- install_type = (`Install, "internal", Some "0.3"); ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ install_type = (`Install, "internal", Some "0.4"); + install_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; + uninstall_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; + clean_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; + distclean_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; + files_ab = []; + sections = + [ +@@ -5810,19 +6882,19 @@ + ({ + cs_name = "extra_debugging"; + cs_data = PropList.Data.create (); +- cs_plugin_data = []; +- }, ++ cs_plugin_data = [] ++ }, + { + flag_description = + Some "Build ocaml-opasswd with debugging"; +- flag_default = [(OASISExpr.EBool true, false)]; +- }); ++ flag_default = [(OASISExpr.EBool true, false)] ++ }); + Library + ({ + cs_name = "oPasswd"; + cs_data = PropList.Data.create (); +- cs_plugin_data = []; +- }, ++ cs_plugin_data = [] ++ }, + { + bs_build = [(OASISExpr.EBool true, true)]; + bs_install = [(OASISExpr.EBool true, true)]; +@@ -5844,18 +6916,12 @@ + bs_byteopt = + [ + (OASISExpr.EBool true, +- [ +- "-warn-error"; +- "+a"; +- "-bin-annot"; +- "-short-paths" +- ]); ++ ["-warn-error"; "+a"; "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + [ + "-warn-error"; + "+a"; + "-bin-annot"; +- "-short-paths"; + "-g"; + "-runtime-variant"; + "d"; +@@ -5865,39 +6931,33 @@ + bs_nativeopt = + [ + (OASISExpr.EBool true, +- [ +- "-warn-error"; +- "+a"; +- "-bin-annot"; +- "-short-paths" +- ]); ++ ["-warn-error"; "+a"; "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + [ + "-warn-error"; + "+a"; + "-bin-annot"; +- "-short-paths"; + "-g"; + "-runtime-variant"; + "d"; + "-verbose" + ]) +- ]; +- }, ++ ] ++ }, + { + lib_modules = ["Passwd"; "Shadow"; "Common"]; + lib_pack = true; + lib_internal_modules = []; + lib_findlib_parent = None; + lib_findlib_name = Some "oPasswd"; +- lib_findlib_containers = []; +- }); ++ lib_findlib_containers = [] ++ }); + Executable + ({ + cs_name = "opasswd_test"; + cs_data = PropList.Data.create (); +- cs_plugin_data = []; +- }, ++ cs_plugin_data = [] ++ }, + { + bs_build = [(OASISExpr.EBool true, true)]; + bs_install = [(OASISExpr.EBool true, false)]; +@@ -5917,34 +6977,28 @@ + bs_nativeopt = + [ + (OASISExpr.EBool true, +- [ +- "-warn-error"; +- "+a"; +- "-bin-annot"; +- "-short-paths" +- ]); ++ ["-warn-error"; "+a"; "-bin-annot"]); + (OASISExpr.EFlag "extra_debugging", + [ + "-warn-error"; + "+a"; + "-bin-annot"; +- "-short-paths"; + "-g"; + "-runtime-variant"; + "d"; + "-verbose" + ]) +- ]; +- }, +- {exec_custom = false; exec_main_is = "opasswd_test.ml"; }); ++ ] ++ }, ++ {exec_custom = false; exec_main_is = "opasswd_test.ml"}); + Test + ({ + cs_name = "opasswd_test"; + cs_data = PropList.Data.create (); +- cs_plugin_data = []; +- }, ++ cs_plugin_data = [] ++ }, + { +- test_type = (`Test, "custom", Some "0.3"); ++ test_type = (`Test, "custom", Some "0.4"); + test_command = + [ + (OASISExpr.EBool true, +@@ -5953,31 +7007,33 @@ + test_custom = + { + pre_command = [(OASISExpr.EBool true, None)]; +- post_command = [(OASISExpr.EBool true, None)]; +- }; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; + test_working_directory = None; + test_run = + [ + (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); + (OASISExpr.EFlag "tests", true) + ]; +- test_tools = [ExternalTool "ocamlbuild"]; +- }) ++ test_tools = [ExternalTool "ocamlbuild"] ++ }) + ]; + plugins = [(`Extra, "META", Some "0.3")]; ++ disable_oasis_section = []; + schema_data = PropList.Data.create (); +- plugin_data = []; +- }; ++ plugin_data = [] ++ }; + oasis_fn = Some "_oasis"; +- oasis_version = "0.3.0"; +- oasis_digest = Some "p\025\132.\132¿¶\014{±\"\146zcSË"; ++ oasis_version = "0.4.4"; ++ oasis_digest = ++ Some "\145\179+\198\149\174\233\140\251\2349\252\240Y\011\143"; + oasis_exec = None; + oasis_setup_args = []; +- setup_update = false; +- };; ++ setup_update = false ++ };; + + let setup () = BaseSetup.setup setup_t;; + +-# 5982 "setup.ml" ++# 7038 "setup.ml" + (* OASIS_STOP *) + let () = setup ();; +diff -ur ocaml-opasswd-0.9.3/_tags ocaml-opasswd-0.9.3.new/_tags +--- ocaml-opasswd-0.9.3/_tags 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/_tags 2014-04-25 20:41:58.370009980 +0000 +@@ -1,7 +1,7 @@ + # OASIS_START +-# DO NOT EDIT (digest: f7068c987d6ff7f2e61743700395dd7a) +-# Ignore VCS directories, you can use the same kind of rule outside +-# OASIS_START/STOP if you want to exclude directories that contains ++# DO NOT EDIT (digest: ca98e66e72f6561afc39e8f9decb3ee2) ++# Ignore VCS directories, you can use the same kind of rule outside ++# OASIS_START/STOP if you want to exclude directories that contains + # useless stuff for the build process + <**/.svn>: -traverse + <**/.svn>: not_hygienic +@@ -22,18 +22,18 @@ + : oasis_library_opasswd_byte + : oasis_library_opasswd_native + : oasis_library_opasswd_native +-: pkg_unix + : pkg_ctypes + : pkg_ctypes.foreign ++: pkg_unix + # Executable opasswd_test + : oasis_executable_opasswd_test_native + : oasis_executable_opasswd_test_native +-: use_oPasswd +-: pkg_unix + : pkg_ctypes + : pkg_ctypes.foreign +-: use_oPasswd +-: pkg_unix ++: pkg_unix ++: use_oPasswd + : pkg_ctypes + : pkg_ctypes.foreign ++: pkg_unix ++: use_oPasswd + # OASIS_STOP +diff -ur ocaml-opasswd-0.9.3/test/opasswd_test.ml ocaml-opasswd-0.9.3.new/test/opasswd_test.ml +--- ocaml-opasswd-0.9.3/test/opasswd_test.ml 2013-11-14 21:48:05.000000000 +0000 ++++ ocaml-opasswd-0.9.3.new/test/opasswd_test.ml 2014-04-25 20:43:01.037009187 +0000 +@@ -1,3 +1,6 @@ +let ( |> ) a b = b a ++let ( @@ ) a b = a b + open Unix diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index e2072de6..a74b2b30 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -1,5 +1,5 @@ Name: ocaml-opasswd -Version: 0.9.0 +Version: 0.9.3 Release: 0 Summary: OCaml interface to the glibc passwd/shadow password functions License: ISC @@ -8,7 +8,7 @@ URL: http://github.com/xapi-project/ocaml-opasswd Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz Patch0: ocaml-opasswd-ocaml-4.00.1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-ctypes-devel +BuildRequires: ocaml ocaml-findlib ocaml-ctypes-devel libffi-devel Requires: ocaml ocaml-findlib %description @@ -20,6 +20,7 @@ nixes, but it has not been tested. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: libffi %description devel The %{name}-devel package contains libraries and signature files for From 42e04c752362ddbf350beacca26e4591b23037c4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 26 Apr 2014 18:29:07 +0000 Subject: [PATCH 0789/1125] Resync with xen-api-libs-specs In particular we're now using ocaml-gnt for grant tables, we have updated xcp-idl to include SR.probe and we have explicitly disabled xenlight. Signed-off-by: David Scott --- SPECS/message-switch.spec | 1 + SPECS/ocaml-crc.spec | 72 ++++++++++++++++++++++ SPECS/ocaml-gnt.spec | 75 +++++++++++++++++++++++ SPECS/ocaml-rrd-transport.spec | 97 ++++++++++++++++++++++++++++++ SPECS/ocaml-xen-lowlevel-libs.spec | 31 +++------- SPECS/xapi-libvirt-storage.spec | 8 ++- SPECS/xapi.spec | 5 +- SPECS/xcp-rrdd.spec | 7 ++- 8 files changed, 266 insertions(+), 30 deletions(-) create mode 100644 SPECS/ocaml-crc.spec create mode 100644 SPECS/ocaml-gnt.spec create mode 100644 SPECS/ocaml-rrd-transport.spec diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index b254b16a..d7d900ed 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -80,6 +80,7 @@ Group: Development/Other #Requires: %{name} = %{version}-%{release} Requires: ocaml Requires: ocaml-findlib +Requires: ocaml-oclock-devel %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec new file mode 100644 index 00000000..08ea8013 --- /dev/null +++ b/SPECS/ocaml-crc.spec @@ -0,0 +1,72 @@ +%define debug_package %{nil} + +Name: ocaml-crc +Version: 0.9.1 +Release: 1 +Summary: CRC implementation for OCaml +License: ISC +Group: Development/Other +URL: https://github.com/xapi-project/ocaml-crc/ +Source0: https://github.com/xapi-project/ocaml-crc/archive/%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-ounit-devel +Requires: ocaml +Requires: ocaml-findlib + +%description +CRC implementation for OCaml, allowing you to compute checksums of cstructs +and strings. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_libdir}/ocaml/crc/META +%{_libdir}/ocaml/crc/crc.cma +%{_libdir}/ocaml/crc/crc.cmi +%{_libdir}/ocaml/crc/dllcrc_stubs.so + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md +%{_libdir}/ocaml/crc/crc.a +%{_libdir}/ocaml/crc/crc.cmx +%{_libdir}/ocaml/crc/crc.cmxa +%{_libdir}/ocaml/crc/crc.cmxs +%{_libdir}/ocaml/crc/crc.mli +%{_libdir}/ocaml/crc/libcrc_stubs.a + +%changelog +* Sat Apr 26 2014 David Scott - 0.9.1-1 +- Update to 0.9.1 + +* Thu Dec 12 2013 John Else - 0.9.0-1 +- Initial package diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec new file mode 100644 index 00000000..559040c7 --- /dev/null +++ b/SPECS/ocaml-gnt.spec @@ -0,0 +1,75 @@ +%define debug_package %{nil} + +Name: ocaml-gnt +Version: 1.0.0 +Release: 1 +Summary: OCaml bindings for userspace Xen grant table controls +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: https://github.com/xapi-project/ocaml-gnt/ +Source0: https://github.com/xapi-project/ocaml-gnt/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: xen-devel +Requires: ocaml +Requires: ocaml-findlib + +%description +These APIs allow programs running in userspace to share memory with other +domains on the same host. This can be used to (for example) implement disk +or network backends. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel +Requires: xen-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE +%doc ChangeLog README.md +%{_libdir}/ocaml/xen-gnt +%exclude %{_libdir}/ocaml/xen-gnt/*.a +%exclude %{_libdir}/ocaml/xen-gnt/*.cmxa +%exclude %{_libdir}/ocaml/xen-gnt/*.cmx +%exclude %{_libdir}/ocaml/xen-gnt/*.ml +%exclude %{_libdir}/ocaml/xen-gnt/*.mli + +%files devel +%{_libdir}/ocaml/xen-gnt/*.a +%{_libdir}/ocaml/xen-gnt/*.cmx +%{_libdir}/ocaml/xen-gnt/*.cmxa +%{_libdir}/ocaml/xen-gnt/*.mli + +%changelog +* Sat Apr 26 2014 David Scott - 1.0.0-1 +- Initial package diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec new file mode 100644 index 00000000..dd62bbcf --- /dev/null +++ b/SPECS/ocaml-rrd-transport.spec @@ -0,0 +1,97 @@ +%define debug_package %{nil} + +Name: ocaml-rrd-transport +Version: 0.7.1 +Release: 1 +Summary: Shared-memory protocols for transmitting RRD data +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: https://github.com/xapi-project/rrd-transport/ +Source0: https://github.com/xapi-project/rrd-transport/archive/%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-crc-devel +BuildRequires: ocaml-xcp-rrd-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: cmdliner-devel +BuildRequires: ocaml-gnt-devel +Requires: ocaml +Requires: ocaml-findlib + +%description +Shared-memory protocol for transmitting RRD data, supporting in-memory files +and shared Xen pages. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} +Requires: ocaml-gnt-devel +Requires: ocaml-crc-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n rrd-transport-%{version} + +%build +ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml +ocaml setup.ml -build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE +%{_libdir}/ocaml/rrd-transport/META +%{_libdir}/ocaml/rrd-transport/rrd_transport.cma +%{_libdir}/ocaml/rrd-transport/rrd_io.cmi +%{_libdir}/ocaml/rrd-transport/rrd_json.cmi +%{_libdir}/ocaml/rrd-transport/rrd_protocol.cmi +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.cmi +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.cmi +%{_libdir}/ocaml/rrd-transport/rrd_reader.cmi +%{_libdir}/ocaml/rrd-transport/rrd_rpc.cmi +%{_libdir}/ocaml/rrd-transport/rrd_writer.cmi + +%files devel +%defattr(-,root,root) +%doc ChangeLog README.md +%{_libdir}/ocaml/rrd-transport/rrd_transport.a +%{_libdir}/ocaml/rrd-transport/rrd_transport.cmxa +%{_libdir}/ocaml/rrd-transport/rrd_transport.cmxs +%{_libdir}/ocaml/rrd-transport/rrd_io.cmx +%{_libdir}/ocaml/rrd-transport/rrd_io.mli +%{_libdir}/ocaml/rrd-transport/rrd_json.cmx +%{_libdir}/ocaml/rrd-transport/rrd_json.mli +%{_libdir}/ocaml/rrd-transport/rrd_protocol.cmx +%{_libdir}/ocaml/rrd-transport/rrd_protocol.mli +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.cmx +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.mli +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.cmx +%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.mli +%{_libdir}/ocaml/rrd-transport/rrd_reader.cmx +%{_libdir}/ocaml/rrd-transport/rrd_reader.mli +%{_libdir}/ocaml/rrd-transport/rrd_rpc.cmx +%{_libdir}/ocaml/rrd-transport/rrd_rpc.mli +%{_libdir}/ocaml/rrd-transport/rrd_writer.cmx +%{_libdir}/ocaml/rrd-transport/rrd_writer.mli + +%changelog +* Sat Apr 26 2014 David Scott - 0.7.0-1 +- Update to 0.7.0 + +* Mon Dec 16 2013 John Else - 0.5.0-1 +- Initial package diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 22352937..e9e94a5f 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.9 -Release: 3%{?dist} +Version: 0.9.14 +Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL Group: Development/Libraries @@ -34,6 +34,8 @@ developing applications that use %{name}. %setup -q %build +make configure +./configure --disable-xenlight make %install @@ -58,30 +60,11 @@ make install DESTDIR=${buildroot} #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner -%exclude %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so -%exclude %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner -%exclude %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so -%exclude %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner -%exclude %{_libdir}/ocaml/xenlight/META -%exclude %{_libdir}/ocaml/xenlight/libxenlight_stubs.a -%exclude %{_libdir}/ocaml/xenlight/libxentoollog_stubs.a -%exclude %{_libdir}/ocaml/xenlight/xenlight.a -%exclude %{_libdir}/ocaml/xenlight/xenlight.cma -%exclude %{_libdir}/ocaml/xenlight/xenlight.cmi -%exclude %{_libdir}/ocaml/xenlight/xenlight.cmx -%exclude %{_libdir}/ocaml/xenlight/xenlight.cmxa -%exclude %{_libdir}/ocaml/xenlight/xenlight.cmxs -%exclude %{_libdir}/ocaml/xenlight/xenlight.mli -%exclude %{_libdir}/ocaml/xenlight/xentoollog.a -%exclude %{_libdir}/ocaml/xenlight/xentoollog.cma -%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmi -%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmx -%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmxa -%exclude %{_libdir}/ocaml/xenlight/xentoollog.cmxs -%exclude %{_libdir}/ocaml/xenlight/xentoollog.mli - %changelog +* Sat Apr 26 2014 David Scott - 0.9.12-1 +- Update to 0.9.14 + * Mon Oct 21 2013 David Scott - 0.9.9-3 - Exclude the xenlight stuff in case it manages to build diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index b29192ab..b65704c9 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -1,5 +1,5 @@ Name: xapi-libvirt-storage -Version: 0.9.7 +Version: 0.9.8 Release: 1%{?dist} Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL @@ -12,7 +12,6 @@ BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-libvirt-devel -BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel @@ -34,7 +33,7 @@ make %install mkdir -p %{buildroot}/%{_sbindir} -install dist/build/sm-libvirt/sm-libvirt %{buildroot}/%{_sbindir}/xapi-libvirt-storage +install main.native %{buildroot}/%{_sbindir}/xapi-libvirt-storage mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage @@ -54,6 +53,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Sat Apr 26 2014 David Scott - 0.9.8-1 +- Update to 0.9.8 + * Wed Sep 25 2013 David Scott - 0.9.7-1 - Update to 0.9.7 diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index b1b6a7ef..c6243b5b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.39 +Version: 1.9.40 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -170,6 +170,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Sat Apr 26 2014 David Scott - 1.9.40-1 +- update to new xcp-idl interface with SR.probe + * Wed Apr 2 2014 Euan Harris - 1.9.39-1 - update to 1.9.39 - switch from stdext's Tar to ocaml-tar diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 669d85de..30c5d2f3 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,5 +1,5 @@ Name: xcp-rrdd -Version: 0.9.2 +Version: 0.9.4 Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL @@ -17,9 +17,9 @@ BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-rrd-transport-devel BuildRequires: forkexecd-devel BuildRequires: message-switch-devel BuildRequires: xen-devel @@ -57,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Sat Apr 26 2014 David Scott - 0.9.3-1 +- Update to 0.9.4, now depends on rrdd-transport + * Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 From a28606839ea06cabdb6842434572155921ad5b7e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Apr 2014 15:33:48 +0100 Subject: [PATCH 0790/1125] mappkgname: Add mappings for new packages Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index f87839b5..ca690700 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -22,6 +22,7 @@ "libnl3-cli": ["libnl-3-cli"], "libnl3-doc": ["libnl-3-doc"], "libnl3": ["libnl-3"], + "libffi": ["libffi"], "message-switch": ["message-switch"], "ocaml-bitstring": ["libbitstring-ocaml"], "ocaml-camomile-data": ["libcamomile-data"], @@ -29,7 +30,10 @@ "ocaml-cdrom": ["libcdrom-ocaml"], "ocaml-cohttp": ["libcohttp-ocaml"], "ocaml-cstruct": ["libcstruct-ocaml"], + "ocaml-ctypes": ["libctypes-ocaml"], + "ocaml-crc": ["libcrc-ocaml"], "ocaml-fd-send-recv": ["libfd-send-recv-ocaml"], + "ocaml-gnt": ["libgnt-ocaml"], "ocaml-lambda-term": ["liblambda-term-ocaml"], "ocaml-libvhd": ["libvhd-ocaml"], "ocaml-libvirt": ["libvirt-ocaml"], @@ -40,10 +44,12 @@ "ocaml-oclock": ["liboclock-ocaml"], "ocaml-ocplib-endian": ["ocplib-endian-ocaml"], "ocaml-ounit": ["libounit-ocaml"], + "ocaml-opasswd": ["libopasswd-ocaml"], "ocaml-qmp": ["libqmp-ocaml"], "ocaml-react": ["libreact-ocaml"], "ocaml-re": ["libre-ocaml"], "ocaml-rpc": ["librpc-ocaml"], + "ocaml-rrd-transport": ["librrd-transport-ocaml"], "ocaml-sexplib": ["libsexplib-camlp4"], "ocaml-ssl": ["libssl-ocaml"], "ocaml-stdext": ["libstdext-ocaml"], From 6392b3ae2d55c1f76883c7d36e62b8d35553cef8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 18:46:17 +0100 Subject: [PATCH 0791/1125] specdep: Only generate rules for the first binary RPM defined by each spec file We only generate a rule for the first binary RPM produced by the specfile. If we generate multiple rules (one for the base package, one for -devel and so on), make will interpret these as completely separate targets which must be built separately. At best, this means that the same package will be built more than once; at worst, in a concurrent build, there is a risk that the targets might not be rebuilt correctly. Make does understand the concept of multiple targets being built by a single rule invocation, but only for pattern rules (e.g. %.h %.c: %.y). It is tricky to generate correct pattern rules for RPM builds. Signed-off-by: Euan Harris --- specdep.py | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/specdep.py b/specdep.py index 33744d0b..0452f671 100755 --- a/specdep.py +++ b/specdep.py @@ -69,31 +69,38 @@ def download_rpm_sources(spec): # Rules to build RPMS from SRPMS (uses information from the SPECs to # get packages) def build_rpm_from_srpm(spec): - # This doesn't generate the right Makefile fragment for a multi-target - # rule - we may end up building too often, or not rebuilding correctly - # on a partial build - rpm_paths = spec.binary_package_paths() + # We only generate a rule for the first binary RPM produced by the + # specfile. If we generate multiple rules (one for the base package, + # one for -devel and so on), make will interpret these as completely + # separate targets which must be built separately. At best, this means + # that the same package will be built more than once; at worst, in a + # concurrent build, there is a risk that the targets might not be rebuilt + # correctly. + # + # Make does understand the concept of multiple targets being built by + # a single rule invocation, but only for pattern rules (e.g. %.h %.c: %.y). + # It is tricky to generate correct pattern rules for RPM builds. + + rpm_path = spec.binary_package_paths()[0] srpm_path = spec.source_package_path() - for rpm_path in rpm_paths: - print '%s: %s' % (rpm_path, srpm_path) + print '%s: %s' % (rpm_path, srpm_path) def package_to_rpm_map(specs): provides_to_rpm = {} for spec in specs: for provided in spec.provides(): - for rpmpath in spec.binary_package_paths(): - provides_to_rpm[provided] = rpmpath + provides_to_rpm[provided] = spec.binary_package_paths()[0] return provides_to_rpm def buildrequires_for_rpm(spec, provides_to_rpm): - for rpmpath in spec.binary_package_paths(): - for buildreq in spec.buildrequires(): - # Some buildrequires come from the system repository - if provides_to_rpm.has_key(buildreq): - buildreqrpm = provides_to_rpm[buildreq] - print "%s: %s" % (rpmpath, buildreqrpm) + rpmpath = spec.binary_package_paths()[0] + for buildreq in spec.buildrequires(): + # Some buildrequires come from the system repository + if provides_to_rpm.has_key(buildreq): + buildreqrpm = provides_to_rpm[buildreq] + print "%s: %s" % (rpmpath, buildreqrpm) def usage(name): From a96747ad37479d733a558af7dcdfb6fba849434c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Apr 2014 15:47:19 +0100 Subject: [PATCH 0792/1125] makedeb: Work in a temporary directory makedeb currently works in the %_builddir directory, and expects to be able to clear it out completely when it is finished. This makes it difficult to prevent concurrent instances of makedeb from interfering with each other. For simplicity, change makedeb to build each package in its own temporary directory. Signed-off-by: Euan Harris --- scripts/deb/makedeb.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/deb/makedeb.py b/scripts/deb/makedeb.py index 614ed3ef..05ccdf20 100755 --- a/scripts/deb/makedeb.py +++ b/scripts/deb/makedeb.py @@ -7,6 +7,7 @@ import shutil import subprocess import sys +import tempfile SCRIPTDIR=os.path.dirname(os.path.abspath(__file__)) LIBDIR=os.path.normpath(os.path.join(SCRIPTDIR, "../lib")) @@ -33,8 +34,11 @@ # Directories where rpmbuild expects to find inputs # and writes outputs +TMPDIR = tempfile.mkdtemp(prefix="makedeb") + SRPM_DIR = rpm.expandMacro('%_srcrpmdir') SRC_DIR = rpm.expandMacro('%_sourcedir') +rpm.addMacro("_builddir", TMPDIR) BUILD_DIR = rpm.expandMacro('%_builddir') @@ -162,14 +166,16 @@ def main(): (BUILD_DIR, build_subdir), shell=True) assert res == 0 - if clean: - shutil.rmtree(os.path.join(BUILD_DIR, build_subdir)) for i in glob.glob(os.path.join(BUILD_DIR, "*")): if build_subdir in i: continue shutil.copy2(i, SRPM_DIR) if clean: os.unlink(i) + if clean: + shutil.rmtree(TMPDIR) + else: + print "makedeb: dpkg input files in %s" % TMPDIR # At this point we have a debian source package (at least 3 files) in SRPMS. # To build: From 56433c25f726494aa84e986f7f3f60b650413e59 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Apr 2014 18:14:27 +0100 Subject: [PATCH 0793/1125] ocaml-rrd-transport: Fix cmdliner dependency Signed-off-by: Euan Harris --- SPECS/ocaml-rrd-transport.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index dd62bbcf..9afec421 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -15,7 +15,7 @@ BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-crc-devel BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: cmdliner-devel +BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-gnt-devel Requires: ocaml Requires: ocaml-findlib From b9549b077f6eec0d84835d807179ad4e626e43e4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 15:05:01 +0000 Subject: [PATCH 0794/1125] ocaml-nbd: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-nbd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 7cd662d9..db0950ca 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -8,6 +8,7 @@ URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz +BuildRequires: cmdliner-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-cmdliner-devel From eacf1b65bd70795a47425d70b048589d845116d3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 12:57:10 +0000 Subject: [PATCH 0795/1125] cmdliner: Rename to ocaml-cmdliner Signed-off-by: Euan Harris --- SPECS/ocaml-nbd.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index db0950ca..7cd662d9 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -8,7 +8,6 @@ URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz -BuildRequires: cmdliner-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-cmdliner-devel From ec27955145863a48bdbca5f9efef5a847ba0bb73 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 24 Apr 2014 17:10:15 +0000 Subject: [PATCH 0796/1125] SPECS: Great dependency spring-cleaning In general, an OCaml package's BuildRequires are based on the dependencies declared in its _oasis file (or similar), and its -devel package's Requires are based on the dependencies declared in its META file. * Remove unneeded dependencies * Add runtime dependencies for -devel packages Signed-off-by: Euan Harris --- SPECS/ffs.spec | 7 ------ SPECS/forkexecd.spec | 10 ++++----- SPECS/js_of_ocaml.spec | 3 +-- SPECS/message-switch.spec | 26 +++++----------------- SPECS/oasis.spec | 1 + SPECS/ocaml-biniou.spec | 1 + SPECS/ocaml-cohttp.spec | 4 +++- SPECS/ocaml-cstruct.spec | 3 +-- SPECS/ocaml-io-page.spec | 1 + SPECS/ocaml-lambda-term.spec | 2 ++ SPECS/ocaml-libvhd.spec | 2 ++ SPECS/ocaml-mirage-types.spec | 2 ++ SPECS/ocaml-nbd.spec | 1 + SPECS/ocaml-netdev.spec | 4 ++-- SPECS/ocaml-odn.spec | 1 + SPECS/ocaml-qmp.spec | 1 + SPECS/ocaml-rpc.spec | 3 +++ SPECS/ocaml-sexplib.spec | 2 ++ SPECS/ocaml-ssl.spec | 1 + SPECS/ocaml-stdext.spec | 2 ++ SPECS/ocaml-tapctl.spec | 4 ++-- SPECS/ocaml-tar.spec | 12 +++------- SPECS/ocaml-uri.spec | 1 + SPECS/ocaml-vhd.spec | 8 +++++-- SPECS/ocaml-xcp-idl.spec | 11 +++++---- SPECS/ocaml-xcp-inventory.spec | 2 ++ SPECS/ocaml-xcp-rrd.spec | 2 ++ SPECS/ocaml-xen-api-client.spec | 8 +++++-- SPECS/ocaml-xen-api-libs-transitional.spec | 1 - SPECS/ocaml-xenops.spec | 8 ++++--- SPECS/ocaml-xenstore-clients.spec | 2 ++ SPECS/ocaml-xenstore.spec | 2 ++ SPECS/ocaml-yojson.spec | 2 ++ SPECS/ocaml-zed.spec | 2 ++ SPECS/sm-cli.spec | 9 ++------ SPECS/squeezed.spec | 4 ---- SPECS/utop.spec | 1 - SPECS/vhd-tool.spec | 13 ----------- SPECS/xapi-libvirt-storage.spec | 3 --- SPECS/xcp-networkd.spec | 6 ----- SPECS/xcp-rrdd.spec | 5 ----- SPECS/xe-create-templates.spec | 5 +---- SPECS/xenops-cli.spec | 8 +------ SPECS/xenopsd.spec | 9 ++------ 44 files changed, 85 insertions(+), 120 deletions(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index dafc27bd..cd55be5a 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -8,7 +8,6 @@ URL: https://github.com/xapi-project/ffs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel @@ -16,15 +15,9 @@ BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel -BuildRequires: libuuid-devel BuildRequires: ocaml-libvhd-devel -BuildRequires: ocaml-oclock-devel -BuildRequires: xen-devel -BuildRequires: forkexecd-devel -BuildRequires: message-switch-devel BuildRequires: ocaml-tapctl-devel Requires: nfs-utils -Requires: ocaml-libvhd-devel Requires: redhat-lsb-core Requires: blktap diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index a9765e9e..b064bf34 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -8,16 +8,13 @@ URL: https://github.com/xapi-project/forkexecd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel -Requires: ocaml-rpc-devel Requires: redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig @@ -64,8 +61,11 @@ fi Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: ocaml -Requires: ocaml-findlib +Requires: ocaml-fd-send-recv-devel%{?_isa} +Requires: ocaml-rpc-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} +Requires: ocaml-uuidm-devel%{?_isa} +Requires: ocaml-xcp-idl-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec index 5d7ad714..ab73e39b 100644 --- a/SPECS/js_of_ocaml.spec +++ b/SPECS/js_of_ocaml.spec @@ -14,8 +14,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc -Requires: deriving-ocsigen-devel -Requires: ocaml-lwt-devel %description Compile OCaml programs to Javascript. @@ -24,6 +22,7 @@ Compile OCaml programs to Javascript. Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: ocaml-lwt-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index d7d900ed..91dd2cb3 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -12,31 +12,14 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-uri-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-oclock-devel -BuildRequires: ocaml-ssl-devel -BuildRequires: openssl-devel Requires: redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts -# "ocamlfind" -# "cohttp" {= "0.9.7"} -# "rpc" -# "xenstore" -# "ounit" -# "syslog" -# "uri" -# "re" -# "rpc" -# "cmdliner" -# "ssl" -# "oclock" %description A store and forward message switch for OCaml. @@ -77,10 +60,11 @@ fi %package devel Summary: Development files for %{name} Group: Development/Other -#Requires: %{name} = %{version}-%{release} -Requires: ocaml -Requires: ocaml-findlib -Requires: ocaml-oclock-devel +Requires: %{name} = %{version}-%{release} +Requires: ocaml-cohttp-devel%{?_isa} +Requires: ocaml-oclock-devel%{?_isa} +Requires: ocaml-re-devel%{?_isa} +Requires: ocaml-rpc-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index be02388d..886f7d3e 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -24,6 +24,7 @@ your project and creates everything required. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +Requires: ocaml-odn-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec index ae2cf21b..b3d662f2 100644 --- a/SPECS/ocaml-biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -21,6 +21,7 @@ compatibility as protocols evolve. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-easy-format-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 0bfbf63a..7935da3a 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -10,7 +10,6 @@ URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc @@ -27,6 +26,9 @@ An HTTP library for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-re-devel%{?_isa} +Requires: ocaml-uri-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index ddb9f4fc..a86aca17 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -13,8 +13,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocplib-endian-devel -Requires: ocaml-ocplib-endian-devel -#XXX ocaml-cstruct should require caml-ocplib-endian, not -devel %description Read and write low-level C-style structures in OCaml. @@ -23,6 +21,7 @@ Read and write low-level C-style structures in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-ocplib-endian-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 8f0bebff..85a61be7 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -23,6 +23,7 @@ IO pages are page-aligned, and wrapped in the Cstruct library to avoid copying t Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: ocaml-cstruct-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 65b62c5a..92e833a5 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -24,6 +24,8 @@ Lambda-Term is a cross-platform library for manipulating the terminal. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-zed-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 04a0f45a..893c78cb 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -20,6 +20,8 @@ Simple C bindings which allow .vhd files to be manipulated. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: libuuid-devel%{?_isa} +Requires: xen-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 37f058d5..2d454ba6 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -26,6 +26,8 @@ See http://openmirage.org for more information. Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} +BuildRequires: ocaml-ipaddr-devel%{?_isa} +BuildRequires: ocaml-lwt-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 7cd662d9..cb450084 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -26,6 +26,7 @@ access remote block devices. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +BuildRequires: ocaml-cstruct-devel%{?_isa} %description devel diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 25b7f746..22e5764b 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -11,9 +11,7 @@ Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version} BuildRequires: forkexecd-devel BuildRequires: ocaml BuildRequires: ocaml-findlib -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xcp-idl-devel %description Manipulate Linux bridges, network devices and openvswitch instances in OCaml. @@ -22,6 +20,8 @@ Manipulate Linux bridges, network devices and openvswitch instances in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +BuildRequires: forkexecd-devel%{?_isa} +BuildRequires: ocaml-stdext-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index dc34410e..e6fb1ccb 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -21,6 +21,7 @@ BuildRequires: ocaml-fileutils-devel >= 0.4.0 %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +BuildRequires: ocaml-type-conv%{_isa} >= 108.07.01 %description devel diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index d9a43358..31c0c042 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -24,6 +24,7 @@ process. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-yojson-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index d0224c94..a27f178e 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -22,6 +22,9 @@ Am RPC library for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-camlp4-devel%{?_isa} +Requires: ocaml-type-conv%{?_isa} +Requires: xmlm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index f063bc06..d4b961f4 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -23,6 +23,8 @@ Convert values to and from s-expressions in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-camlp4-devel%{?_isa} +Requires: ocaml-type-conv%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 2a3e704e..36c54cca 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -19,6 +19,7 @@ Use OpenSSL from OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: openssl-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index be8d51c4..2a9b5ae4 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -20,6 +20,8 @@ Deprecated misc library functions for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-fd-send-recv-devel%{?_isa} +BuildRequires: ocaml-uuidm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 6714dcdc..1d5b3784 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -12,10 +12,8 @@ BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: forkexecd-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xcp-idl-devel %description Manipulate running tapdisk instances on a xen host. @@ -25,6 +23,8 @@ Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: forkexecd-devel%{?_isa} +Requires: ocaml-rpc-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index f1572614..5353364f 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -9,12 +9,9 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ounit-devel -# These are build requires which are also requires of the -devel package BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-re-devel -# These are build requires which should be requires of some of the -devel -# packages -- update the devel packages later BuildRequires: ocaml-camlp4-devel %description @@ -24,12 +21,9 @@ This is a pure OCaml library for reading and writing tar-format data. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel -Requires: ocaml-lwt-devel -Requires: ocaml-re-devel -# These are requires which should be requires of some of the -devel -# packages -- update the devel packages later -Requires: ocaml-camlp4 +Requires: ocaml-cstruct-devel%{?_isa} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-re-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 77f5a2c0..578475eb 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -21,6 +21,7 @@ A URI library for OCaml. Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} +Requires: ocaml-re-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index ee5b2f70..6b6f064a 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -10,7 +10,6 @@ URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel @@ -27,7 +26,12 @@ vhd files to be read, written and streamed with on-the-fly format conversion. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-cstruct-devel%{?_isa} +Requires: ocaml-io-page-devel%{?_isa} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-ounit-devel%{?_isa} +Requires: ocaml-mirage-types-devel%{?_isa} +Requires: ocaml-uuidm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index fc15df11..dd4abcb9 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -21,9 +21,6 @@ BuildRequires: ocaml-xcp-rrd-devel BuildRequires: xmlm-devel BuildRequires: ocaml-ounit-devel -# XXX transitive dependencies of message-switch-devel -BuildRequires: ocaml-oclock-devel - %description Common interface definitions for XCP services. @@ -31,7 +28,13 @@ Common interface definitions for XCP services. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: message-switch-devel +Requires: message-switch-devel%{?_isa} +Requires: ocaml-uri-devel%{?_isa} +Requires: ocaml-re-devel%{?_isa} +Requires: ocaml-cohttp-devel%{?_isa} +Requires: ocaml-rpc-devel%{?_isa} +Requires: ocaml-fd-send-recv-devel%{?_isa} +Requires: xmlm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 85042550..77ad2efd 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -22,6 +22,8 @@ A simple library to read and write the XCP inventory file. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-stdext-devel%{?_isa} +Requires: ocaml-uuidm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 146a9578..caa892cf 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -22,6 +22,8 @@ Round-Robin Datasources in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-rpc-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index d73734ad..1463899b 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -15,9 +15,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-uri-devel -BuildRequires: openssl-devel BuildRequires: xmlm-devel %description @@ -29,6 +27,12 @@ virtualization hosts. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: xmlm-devel%{?_isa} +Requires: ocaml-cohttp-devel%{?_isa} +Requires: ocaml-rpc-devel%{?_isa} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-uri-devel%{?_isa} +Requires: ocaml-cstruct-devel%{?_isa} %description devel XenAPI Client is an OCaml library implementing XenServer's XenAPI. diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index e6477a9b..5a74df06 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -19,7 +19,6 @@ BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: xen-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xcp-idl-devel Requires: xen-libs diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 404834e0..83e4fff1 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -12,12 +12,9 @@ BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel @@ -28,6 +25,11 @@ Low-level xen control operations in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-xcp-idl-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} +Requires: ocaml-xen-lowlevel-libs-devel%{?_isa} +Requires: ocaml-xenstore-devel%{?_isa} +Requires: ocaml-xenstore-clients-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 014a95bd..b77d3707 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -21,6 +21,8 @@ Unix xenstore clients for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-lwt-devel%{?_isa} +Requires: ocaml-xenstore-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 10595a5c..5c273ae4 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -23,6 +23,8 @@ An implementation of the xenstore protocol in OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-cstruct-devel%{?_isa} +Requires: ocaml-lwt-devel%{?_isa} Conflicts: xen-ocaml-devel %description devel diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index ca4731f3..03127a1e 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -21,6 +21,8 @@ A JSON parser and printer for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-biniou-devel%{?_isa} +Requires: ocaml-easy-format-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index b2e78bb6..4340e977 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -22,6 +22,8 @@ text editors, edition widgets, readlines, ... Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-camomile-devel%{?_isa} +Requires: ocaml-react-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index c7b5f7a4..97678764 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -7,17 +7,12 @@ Group: Development/Other URL: https://github.com/xapi-project/sm-cli Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-obuild -BuildRequires: ocaml-uuidm-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: message-switch-devel -Requires: message-switch - -# XXX transitively required by message_switch -BuildRequires: ocaml-oclock-devel %description Command-line interface for xapi toolstack storage managers. diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 2a00b905..81290e41 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -8,12 +8,9 @@ URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init Source2: squeezed-conf -BuildRequires: message-switch-devel BuildRequires: oasis BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel @@ -22,7 +19,6 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel BuildRequires: xen-devel -Requires: xen-libs Requires: redhat-lsb-core Requires: message-switch diff --git a/SPECS/utop.spec b/SPECS/utop.spec index c5e7ce2d..45c533df 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -11,7 +11,6 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-lambda-term-devel -BuildRequires: ocaml-zed-devel Requires: ocaml-camomile-data %description diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index a572d290..1abcbb23 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -10,32 +10,19 @@ URL: https://github.com/xapi-project/vhd-tool Source0: https://github.com/xapi-project/vhd-tool/archive/v%{version}/%{name}-%{version}.tar.gz Source1: vhd-tool-sparse_dd-conf BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-obuild BuildRequires: ocaml-vhd-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-nbd-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-ssl-devel -BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-tapctl-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-cmdliner-devel -BuildRequires: git -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xenstore-devel -BuildRequires: libuuid-devel BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-sha-devel BuildRequires: ocaml-tar-devel -BuildRequires: message-switch-devel BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: openssl-devel %description Simple command-line tools for manipulating and streaming .vhd format file. diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index b65704c9..e55340c6 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -9,7 +9,6 @@ Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{nam Source1: xapi-libvirt-storage-init BuildRequires: libvirt-devel BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-rpc-devel @@ -17,8 +16,6 @@ BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel -BuildRequires: ocaml-oclock-devel -BuildRequires: message-switch-devel Requires: redhat-lsb-core %description diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 42073bf5..7467fe32 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -11,7 +11,6 @@ Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf Source4: xcp-networkd-bridge-conf BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel @@ -21,12 +20,7 @@ BuildRequires: ocaml-stdext-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-re-devel BuildRequires: ocaml-xen-api-client-devel -BuildRequires: message-switch-devel -BuildRequires: ocaml-oclock-devel Requires: ethtool Requires: redhat-lsb-core diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 30c5d2f3..8f26c534 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -13,15 +13,10 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-re-devel BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xenops-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-rrd-transport-devel BuildRequires: forkexecd-devel -BuildRequires: message-switch-devel BuildRequires: xen-devel Requires: redhat-lsb-core diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 62a35ddc..c4f7e98b 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -13,12 +13,9 @@ BuildRequires: ocaml-obuild BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-stdext-devel BuildRequires: xmlm-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-xen-api-client-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: openssl-devel -Requires: openssl +BuildRequires: ocaml-xen-api-libs-transitional-devel %description A utility to create the default XenServer templates. diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 25fef957..6724d8b9 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -7,17 +7,11 @@ Group: Development/Other URL: https://github.com/xapi-project/xenops-cli Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-obuild +BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel -BuildRequires: message-switch-devel -Requires: message-switch - -# XXX transitively required by message_switch -BuildRequires: ocaml-oclock-devel %description Command-line interface for xenopsd, the xapi toolstack domain manager. diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 21adf5f1..8e2dda46 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -13,14 +13,11 @@ Source4: xenopsd-xenlight-init Source5: make-xsc-xenopsd.conf Source6: xenopsd-network-conf BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-re-devel BuildRequires: forkexecd-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-uuidm-devel @@ -31,16 +28,14 @@ BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel -BuildRequires: message-switch-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: xen-devel -BuildRequires: linux-guest-loader -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: vncterm BuildRequires: ocaml-uutf-devel Requires: message-switch Requires: redhat-lsb-core Requires: xenops-cli +Requires: vncterm +Requires: linux-guest-loader %description Simple VM manager for the xapi toolstack. From abeb0b4fc9103667b30beff85f084c573b3af518 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Mon, 14 Apr 2014 11:34:51 +0100 Subject: [PATCH 0797/1125] Ignore backup files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9f34cf67..848c9036 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ SRPMS/ deps mock/ .coverage +*~ From 390baae8a04fedd1d1f8cddac81a7270885cd878 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 29 Apr 2014 13:31:52 +0100 Subject: [PATCH 0798/1125] Fix changelog for debian builds --- SPECS/ocaml-xen-lowlevel-libs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index e9e94a5f..cac13cad 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -62,7 +62,7 @@ make install DESTDIR=${buildroot} %changelog -* Sat Apr 26 2014 David Scott - 0.9.12-1 +* Sat Apr 26 2014 David Scott - 0.9.14-1 - Update to 0.9.14 * Mon Oct 21 2013 David Scott - 0.9.9-3 From cd54d7114f18cdc453ca73334819e943abebb227 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 29 Apr 2014 14:33:32 +0100 Subject: [PATCH 0799/1125] Update xenserver-install-wizard to latest release --- SPECS/xenserver-install-wizard.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 8db005cc..18721094 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,8 +2,8 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.28 -Release: 2%{?dist} +Version: 0.2.29 +Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/xenserver/xenserver-install-wizard @@ -32,6 +32,9 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog +* Tue Apr 29 2014 Bob Ball - 0.2.29-1 +- Update to 0.2.29, with fixes for static IP on debian/ubuntu + * Wed Jan 15 2014 Euan Harris - 0.2.28-2 - Source moved to https://github.com/xenserver/xenserver-install-wizard From 582acb80399070f73b43a7c308c4641dc07dbbe2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 29 Apr 2014 17:00:44 +0100 Subject: [PATCH 0800/1125] mappkgname: Fix mapping for libffi Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index ca690700..86942f04 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -22,7 +22,7 @@ "libnl3-cli": ["libnl-3-cli"], "libnl3-doc": ["libnl-3-doc"], "libnl3": ["libnl-3"], - "libffi": ["libffi"], + "libffi": ["libffi6"], "message-switch": ["message-switch"], "ocaml-bitstring": ["libbitstring-ocaml"], "ocaml-camomile-data": ["libcamomile-data"], @@ -179,6 +179,7 @@ "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], "libvirt0-dev": ["libvirt-dev"], "libxen-4.2-dev": ["libxen-dev"], + "libffi6-dev": ["libffi-dev"], "libvirt-bin-dev": ["libvirt-bin"], "blktap-utils-dev": ["blktap-utils"], "qemu-system-x86-dev": ["qemu-system-x86"], From 21845c28129d00f6f4cb848a61735ccefeaa8603 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 29 Apr 2014 17:28:00 +0100 Subject: [PATCH 0801/1125] ocaml-rrd-transport: Fix version number in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-rrd-transport.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index 9afec421..319fd717 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -90,8 +90,8 @@ rm -rf %{buildroot} %{_libdir}/ocaml/rrd-transport/rrd_writer.mli %changelog -* Sat Apr 26 2014 David Scott - 0.7.0-1 -- Update to 0.7.0 +* Sat Apr 26 2014 David Scott - 0.7.1-1 +- Update to 0.7.1 * Mon Dec 16 2013 John Else - 0.5.0-1 - Initial package From 231bdfe4d70ea32f9742912356c51c01989dfc8d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 29 Apr 2014 17:31:06 +0100 Subject: [PATCH 0802/1125] xcp-rrdd: Fix version number in changelog Signed-off-by: Euan Harris --- SPECS/xcp-rrdd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 30c5d2f3..c7322a59 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -57,7 +57,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Sat Apr 26 2014 David Scott - 0.9.3-1 +* Sat Apr 26 2014 David Scott - 0.9.4-1 - Update to 0.9.4, now depends on rrdd-transport * Wed Sep 25 2013 David Scott - 0.9.2-1 From 36e84ada16485f5c8dfc7eec3700d875b52ff792 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 29 Apr 2014 17:38:07 +0100 Subject: [PATCH 0803/1125] xcp-rrdd: Add missing build dependency on ocaml-xen-lowlevel-libs-devel Signed-off-by: Euan Harris --- SPECS/xcp-rrdd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index c7322a59..37504bd3 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -20,6 +20,7 @@ BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-rrd-transport-devel +BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: forkexecd-devel BuildRequires: message-switch-devel BuildRequires: xen-devel From aa4e3ad07e34d5c3f8a5d020e366043ea1e944f0 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Mon, 24 Feb 2014 14:49:22 +0000 Subject: [PATCH 0804/1125] Allow diffierent DISTs with added parameterisation "Native" packages should not have a revision - fix dependency generation --- Makefile | 2 +- pkg.py | 46 ++++++++++--------- scripts/deb/configure.sh | 34 ++++++++------ scripts/deb/makedeb.py | 24 ++++------ scripts/deb/pbuilder-login.sh | 2 +- scripts/deb/{D05deps.in => templates/D05deps} | 0 scripts/deb/{ => templates}/D10mandb | 0 scripts/deb/{ => templates}/D15nofsync | 0 .../{pbuilderrc.in => templates/pbuilderrc} | 5 +- scripts/lib/debianchangelog.py | 11 +++-- scripts/lib/debianmisc.py | 10 ++++ 11 files changed, 74 insertions(+), 60 deletions(-) rename scripts/deb/{D05deps.in => templates/D05deps} (100%) rename scripts/deb/{ => templates}/D10mandb (100%) rename scripts/deb/{ => templates}/D15nofsync (100%) rename scripts/deb/{pbuilderrc.in => templates/pbuilderrc} (65%) diff --git a/Makefile b/Makefile index 09803e21..096b22bd 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ all: rpms %.deb: @echo [COWBUILDER] $@ @sudo cowbuilder --build \ - --configfile pbuilder/pbuilderrc-raring-amd64 \ + --configfile pbuilder/pbuilderrc \ --buildresult RPMS $< diff --git a/pkg.py b/pkg.py index 7a206ab0..0106f1fd 100755 --- a/pkg.py +++ b/pkg.py @@ -7,6 +7,7 @@ import re import rpm import urlparse +from scripts.lib import debianmisc # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' @@ -58,32 +59,11 @@ class Spec(object): """Represents an RPM spec file""" def __init__(self, path, target="rpm", map_name=None, dist=""): - if target == "rpm": - self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.map_arch = identity - - # '%dist' in the host (where we build the source package) - # might not match '%dist' in the chroot (where we build - # the binary package). We must override it on the host, - # otherwise the names of packages in the dependencies won't - # match the files actually produced by mock. - self.dist = dist - - else: - self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" - self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" - self.map_arch = map_arch_deb - self.dist = "" - - rpm.addMacro('dist', self.dist) - if map_name: self.map_package_name = map_name else: self.map_package_name = identity_list - self.path = os.path.join(SPECDIR, os.path.basename(path)) with open(path) as spec: @@ -96,6 +76,30 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): "spec file name '%s' does not match package name '%s'" % (path, self.name())) + if target == "rpm": + self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.map_arch = identity + + # '%dist' in the host (where we build the source package) + # might not match '%dist' in the chroot (where we build + # the binary package). We must override it on the host, + # otherwise the names of packages in the dependencies won't + # match the files actually produced by mock. + self.dist = dist + + else: + sep = '.' if debianmisc.is_native(self.spec) else '-' + if debianmisc.is_native(self.spec): + self.rpmfilenamepat = "%{NAME}_%{VERSION}.%{RELEASE}_%{ARCH}.deb" + self.srpmfilenamepat = "%{NAME}_%{VERSION}.%{RELEASE}.dsc" + else: + self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" + self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" + self.map_arch = map_arch_deb + self.dist = "" + + rpm.addMacro('dist', self.dist) def specpath(self): """Return the path to the spec file""" diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index e5512cb3..66d3a4ac 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -3,9 +3,11 @@ set -eu echo "Configuring DEB-based build" -ARCH=amd64 -DIST=raring -BASEPATH=/var/cache/pbuilder/base-$DIST-$ARCH.cow +ARCH=${ARCH:-amd64} +DIST=${DIST:-raring} +BASEPATH=/var/cache/pbuilder/base.cow +MIRROR=${MIRROR:-http://gb.archive.ubuntu.com/ubuntu/} +APT_REPOS=${APT_REPOS:-|deb $MIRROR $DIST universe |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu $DIST main} dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common @@ -13,13 +15,15 @@ mkdir -p BUILD echo -n "Writing pbuilder configuration..." mkdir -p pbuilder -sed -e "s|@PWD@|$PWD|g" -e "s|@ARCH@|$ARCH|g" -e "s|@BASEPATH@|$BASEPATH|g" -e "s|@DIST@|$DIST|g" scripts/deb/pbuilderrc.in > pbuilder/pbuilderrc-$DIST-$ARCH -sed -e "s|@PWD@|$PWD|g" scripts/deb/D05deps.in > pbuilder/D05deps -chmod 755 pbuilder/D05deps -cp scripts/deb/D10mandb pbuilder/D10mandb -chmod 755 pbuilder/D10mandb -cp scripts/deb/D15nofsync pbuilder/D15nofsync -chmod 755 pbuilder/D15nofsync +for file in scripts/deb/templates/*; do + filename=`basename $file` + cp $file pbuilder/${filename} + for replace_var in "APT_REPOS" "PWD" "ARCH" "BASEPATH" "DIST" "MIRROR" ; do + sed -ie "s~@$replace_var@~${!replace_var}~g" pbuilder/${filename} + done + chmod 755 pbuilder/${filename} +done + echo " done" echo -n "Initializing repository..." @@ -30,13 +34,13 @@ echo " done" if [ -e $BASEPATH ] ; then echo $BASEPATH exists - updating - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc else echo $BASEPATH does not exist - creating - sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH + sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc + sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc # inject Keyfile for Launchpad PPA for Louis Gesbert - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc --save-after-exec -- /usr/bin/apt-key add - << KEYFILE -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 Comment: Hostname: keyserver.ubuntu.com @@ -52,7 +56,7 @@ KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= -----END PGP PUBLIC KEY BLOCK----- KEYFILE # inject Keyfile for Launchpad PPA for Anil Madhavapeddy - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc-$DIST-$ARCH --save-after-exec -- /usr/bin/apt-key add - << KEYFILE + sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc --save-after-exec -- /usr/bin/apt-key add - << KEYFILE -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 Comment: Hostname: keyserver.ubuntu.com diff --git a/scripts/deb/makedeb.py b/scripts/deb/makedeb.py index 05ccdf20..78db683a 100755 --- a/scripts/deb/makedeb.py +++ b/scripts/deb/makedeb.py @@ -74,7 +74,7 @@ def debian_dir_from_spec(spec, path, specpath, isnative): copyright_file = debianmisc.copyright_from_spec(spec) copyright_file.apply(path) - changelog = debianchangelog.changelog_from_spec(spec) + changelog = debianchangelog.changelog_from_spec(spec, isnative) changelog.apply(path) filelists = debianmisc.filelists_from_spec(spec, specpath) @@ -87,12 +87,6 @@ def debian_dir_from_spec(spec, path, specpath, isnative): conffiles.apply(path) -def principal_source_file(spec): - return os.path.basename([name for (name, seq, filetype) - in spec.sources - if seq == 0 and filetype == 1][0]) - - def prepare_build_dir(spec, build_subdir): # To prepare the build dir, RPM cds into $TOPDIR/BUILD # and expands all paths in the prep script with $TOPDIR. @@ -113,7 +107,7 @@ def prepare_build_dir(spec, build_subdir): def rename_source(spec, pkgname, pkgversion): # Debian source package name should probably match the tarball name - origfilename = principal_source_file(spec) + origfilename = debianmisc.principal_source_file(spec) if origfilename.endswith(".tbz"): filename = origfilename[:-len(".tbz")] + ".tar.bz2" else: @@ -146,12 +140,9 @@ def main(): shutil.rmtree(os.path.join(BUILD_DIR, build_subdir, "debian")) # a package with no original tarball is built as a 'native debian package' - native = True - tarball = principal_source_file(spec) - match = re.match("^(.+)((\.tar\.(gz|bz2|lzma|xz)|\.tbz)$)", tarball) - if match: - native = False - + native = debianmisc.is_native(spec) + + if not native: # copy over the source, run the prep rule to unpack it, then # rename it as deb expects this should be based on the rewritten # (or not) source name in the debian package - build the debian @@ -162,8 +153,9 @@ def main(): debian_dir_from_spec(spec, os.path.join(BUILD_DIR, build_subdir), sys.argv[1], native) - res = subprocess.call("cd %s\ndpkg-source -b --auto-commit %s" % - (BUILD_DIR, build_subdir), shell=True) + cmd = "cd %s\ndpkg-source -b --auto-commit %s" % (BUILD_DIR, build_subdir) + print cmd + res = subprocess.call(cmd, shell=True) assert res == 0 for i in glob.glob(os.path.join(BUILD_DIR, "*")): diff --git a/scripts/deb/pbuilder-login.sh b/scripts/deb/pbuilder-login.sh index bff13b93..ddb7858e 100755 --- a/scripts/deb/pbuilder-login.sh +++ b/scripts/deb/pbuilder-login.sh @@ -1,3 +1,3 @@ #!/bin/bash -sudo cowbuilder --login --configfile pbuilder/pbuilderrc-raring-amd64 +sudo cowbuilder --login --configfile pbuilder/pbuilderrc diff --git a/scripts/deb/D05deps.in b/scripts/deb/templates/D05deps similarity index 100% rename from scripts/deb/D05deps.in rename to scripts/deb/templates/D05deps diff --git a/scripts/deb/D10mandb b/scripts/deb/templates/D10mandb similarity index 100% rename from scripts/deb/D10mandb rename to scripts/deb/templates/D10mandb diff --git a/scripts/deb/D15nofsync b/scripts/deb/templates/D15nofsync similarity index 100% rename from scripts/deb/D15nofsync rename to scripts/deb/templates/D15nofsync diff --git a/scripts/deb/pbuilderrc.in b/scripts/deb/templates/pbuilderrc similarity index 65% rename from scripts/deb/pbuilderrc.in rename to scripts/deb/templates/pbuilderrc index ad163863..e032a59d 100644 --- a/scripts/deb/pbuilderrc.in +++ b/scripts/deb/templates/pbuilderrc @@ -1,7 +1,6 @@ -MIRRORSITE="http://gb.archive.ubuntu.com/ubuntu/" +MIRRORSITE="@MIRROR@" OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ -|deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main\ -|deb http://gb.archive.ubuntu.com/ubuntu/ raring universe" +@APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" EXTRAPACKAGES="apt-utils" diff --git a/scripts/lib/debianchangelog.py b/scripts/lib/debianchangelog.py index 5cc49f74..1830eba3 100644 --- a/scripts/lib/debianchangelog.py +++ b/scripts/lib/debianchangelog.py @@ -3,7 +3,7 @@ import re import time -def changelog_from_spec(spec): +def changelog_from_spec(spec, isnative): res = Tree() hdr = spec.sourceHeader @@ -23,10 +23,15 @@ def changelog_from_spec(spec): if match: author = match.group(1) version = match.group(2) + if isnative: + version = re.sub('-', '.', version) else: author = name - version = "%s-%s" % (spec.sourceHeader['version'], - spec.sourceHeader['release']) + sep = '.' if isnative else '-' + version = "%s%s%s" % (spec.sourceHeader['version'], + sep, + spec.sourceHeader['release']) + print version package_name = mappkgname.map_package(hdr['name'])[0] log += "%s (%s) UNRELEASED; urgency=low\n" % (package_name, version) diff --git a/scripts/lib/debianmisc.py b/scripts/lib/debianmisc.py index cdb8c040..bb87e2e4 100644 --- a/scripts/lib/debianmisc.py +++ b/scripts/lib/debianmisc.py @@ -2,6 +2,7 @@ from tree import Tree import mappkgname import os +import re import rpmextra def conffiles_from_spec(spec, specpath): @@ -95,3 +96,12 @@ def copyright_from_spec(_spec): res.append("debian/copyright", "FIXME") return res +def principal_source_file(spec): + return os.path.basename([name for (name, seq, filetype) + in spec.sources + if seq == 0 and filetype == 1][0]) + +def is_native(_spec): + tarball = principal_source_file(_spec) + match = re.match("^(.+)((\.tar\.(gz|bz2|lzma|xz)|\.tbz)$)", tarball) + return match == None From b5bf901fce532eccfadb36a011819e6d50dbfb70 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 9 Apr 2014 17:37:38 +0100 Subject: [PATCH 0805/1125] Add target specific mapping to enable compilation on Ubuntu and Debian in parallel --- SPECS/xenserver-core.spec | 2 +- scripts/lib/mappkgname.py | 79 +++++++++++---------------------------- specdep.py | 9 ++--- 3 files changed, 26 insertions(+), 64 deletions(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index ba874669..e94e3be8 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -23,7 +23,7 @@ Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed Requires: linux-guest-loader -Requires: kernel >= 3.4.46 +Requires: kernel >= 3.0 Requires: kernel-firmware Requires: xen diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 86942f04..1b345ecd 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -1,29 +1,32 @@ #!/usr/bin/python +import platform + """Maps an RPM package name to the equivalent DEB. The MAPPING is static, but in future will be made dynamically by querying the package databases.""" +TARGET_SPECIFIC_MAPPING = { + 'jessie/sid': { + 'kernel': ['linux-image-amd64'], + 'kernel-firmware': ['firmware-linux-free'], + "xen-libs": ["libxen-4.3"], + }, + } MAPPING = { # Our packages "ocaml-biniou": ["libbiniou-ocaml"], "ocaml-cmdliner": ["libcmdliner-ocaml"], - "cppo": ["cppo"], "deriving-ocsigen": ["libderiving-ocsigen-ocaml"], "ocaml-easy-format": ["libeasy-format-ocaml"], - "eliloader": ["eliloader"], "linux-guest-loader": ["linux-guest-loader"], - "xcp-python-libs": ["xcp-python-libs"], - "ffs": ["ffs"], - "forkexecd": ["forkexecd"], "iscsi-initiator-utils": ["open-iscsi"], "js_of_ocaml": ["libjs-of-ocaml"], "libnl3-cli": ["libnl-3-cli"], "libnl3-doc": ["libnl-3-doc"], "libnl3": ["libnl-3"], "libffi": ["libffi6"], - "message-switch": ["message-switch"], "ocaml-bitstring": ["libbitstring-ocaml"], "ocaml-camomile-data": ["libcamomile-data"], "ocaml-camomile": ["libcamomile-ocaml"], @@ -78,42 +81,13 @@ "ocaml-sha": ["libsha-ocaml"], "ocaml-ipaddr": ["libipaddr-ocaml"], "ocaml-mirage-types": ["libmirage-types-ocaml"], - "omake": ["omake"], - "ocamlmod": ["ocamlmod"], - "ocamlify": ["ocamlify"], - "oasis": ["oasis"], "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], - "xcp-sm": ["xcp-sm"], - "sm-cli": ["sm-cli"], - "xcp-sm-rawhba": ["xcp-sm-rawhba"], - "squeezed": ["squeezed"], - "utop": ["utop"], - "vncterm": ["vncterm"], "xapi-libvirt-storage": ["libxapi-libvirt-storage-ocaml"], - "xapi-python": ["xapi-python"], - "xapi": ["xapi"], - "xapi-xe": ["xapi-xe"], - "xcp-networkd": ["xcp-networkd"], - "xcp-rrdd": ["xcp-rrdd"], - "xe-create-templates": ["xe-create-templates"], - "xenops-cli": ["xenops-cli"], - "xenopsd-libvirt": ["xenopsd-libvirt"], - "xenopsd-simulator": ["xenopsd-simulator"], - "xenopsd-xc": ["xenopsd-xc"], - "xenopsd-xenlight": ["xenopsd-xenlight"], - "xenopsd": ["xenopsd"], - "xenserver-core": ["xenserver-core"], - "xenserver-install-wizard": ["xenserver-install-wizard"], - "xenserver-tech-preview-release": ["xenserver-tech-preview-release"], "xmlm": ["libxmlm-ocaml"], - "xsconsole": ["xsconsole"], "xsconsole0": ["xsconsole"], - "xsiostat": ["xsiostat"], "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], "python-setuptools": ["python-setuptools", "python-setuptools-git"], - "vhd-tool": ["vhd-tool"], - "blktap": ["blktap"], # Distribution packages "ocaml": ["ocaml-nox", "ocaml-native-compilers"], @@ -126,46 +100,28 @@ "libuuid": ["uuid"], "libvirt": ["libvirt0", "libvirt-bin"], "xen-libs": ["libxen-4.2"], - "make": ["make"], "ncurses": ["libncurses5"], "chkconfig": [], "initscripts": [], "PyPAM": ["python-pam"], - "perl": ["perl"], - "gawk": ["gawk"], "pam": ["libpam0g"], "tetex-latex": ["texlive-base"], "zlib": ["zlib1g"], - "git": ["git"], "stunnel": ["stunnel"], "bash-completion": ["bash-completion"], - "python": ["python"], "python2": ["python"], - "time": ["time"], "newt": ["libnewt0.52"], - "flex": ["flex"], - "bison": ["bison"], "/sbin/ldconfig": ["/sbin/ldconfig"], "kernel-headers": ["linux-headers-3.2.0-51-generic"], "libvirt-docs": ["libvirt-doc"], - "chrpath": ["chrpath"], "kernel": ["linux-image"], "kernel-firmware": ["linux-firmware"], - "swig": ["swig"], "/bin/sh": [], - "xen-utils": ["xen-utils"], "xen-runtime": ["xen-utils"], "nfs-utils": ["nfs-common"], - "hwdata": ["hwdata"], "redhat-lsb-core": ["lsb-base"], "sg3_utils": ["sg3-utils"], - "ethtool": ["ethtool"], - "qemu-system-x86": ["qemu-system-x86"], "python-argparse": ["libpython2.7-stdlib"], - "autoconf": ["autoconf"], - "automake": ["automake"], - "libtool": ["libtool"], - "libaio": ["libaio"], } SECONDARY_MAPPING = { @@ -185,17 +141,26 @@ "qemu-system-x86-dev": ["qemu-system-x86"], } -def map_package(name): +def map_package(name, target=None): """map an rpm to a corresponding deb, based on file contents""" is_devel = False + if target is None: + target = platform.linux_distribution(full_distribution_name=False)[1].lower() + # RPM 4.6 adds architecture constraints to dependencies. Drop them. if name.endswith( "(x86-64)" ): name = name[ :-len("(x86-64)") ] if name.endswith( "-devel" ): is_devel = True name = name[ :-len("-devel") ] - mapped = MAPPING[name] + + default = [name] + mapped = MAPPING.get(name, default) + + if target in TARGET_SPECIFIC_MAPPING: + mapped = TARGET_SPECIFIC_MAPPING[target].get(name, mapped) + res = [] for debname in mapped: if is_devel: @@ -204,7 +169,7 @@ def map_package(name): return res -def map_package_name(hdr): +def map_package_name(hdr, target=None): """rewrite an rpm name to fit with debian standards""" name = hdr['name'] @@ -218,7 +183,7 @@ def map_package_name(hdr): # Debian prefixes library packag names with 'lib' #if "Libraries" in hdr['group'] or "library" in hdr['summary'].lower(): # name = "lib" + name - name = name.replace( name, map_package(name)[0] ) + name = name.replace( name, map_package(name, target)[0] ) if is_devel: name += "-dev" diff --git a/specdep.py b/specdep.py index 0452f671..676039a1 100755 --- a/specdep.py +++ b/specdep.py @@ -25,11 +25,6 @@ def build_type(): return "rpm" -def map_package_name_deb(name): - """Map RPM package name to equivalent Deb names""" - return mappkgname.map_package(name) - - # Rules to build SRPM from SPEC def build_srpm_from_spec(spec): srpmpath = spec.source_package_path() @@ -150,8 +145,10 @@ def main(): for spec_path in params['specs']: try: if build_type() == "deb": + os_type = platform.linux_distribution(full_distribution_name=False)[1].lower() + map_name_fn=lambda name: mappkgname.map_package(name, os_type) spec = pkg.Spec(spec_path, target="deb", - map_name=map_package_name_deb) + map_name=map_name_fn) else: spec = pkg.Spec(spec_path, target="rpm", dist=params['dist']) pkg_name = spec.name() From 09bd57fd87378dfa5ea8774ee87ebb72d82d110d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 6 May 2014 14:33:52 +0100 Subject: [PATCH 0806/1125] pkg: Fix setting of %dist when building RPMs Signed-off-by: Euan Harris --- pkg.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg.py b/pkg.py index 0106f1fd..0a9c989b 100755 --- a/pkg.py +++ b/pkg.py @@ -69,6 +69,16 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): with open(path) as spec: self.spectext = spec.readlines() + # '%dist' in the host (where we build the source package) + # might not match '%dist' in the chroot (where we build + # the binary package). We must override it on the host, + # otherwise the names of packages in the dependencies won't + # match the files actually produced by mock. + self.dist = "" + if target == "rpm": + self.dist = dist + + rpm.addMacro('dist', self.dist) self.spec = rpm.ts().parseSpec(path) if os.path.basename(path).split(".")[0] != self.name(): @@ -81,13 +91,6 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.map_arch = identity - # '%dist' in the host (where we build the source package) - # might not match '%dist' in the chroot (where we build - # the binary package). We must override it on the host, - # otherwise the names of packages in the dependencies won't - # match the files actually produced by mock. - self.dist = dist - else: sep = '.' if debianmisc.is_native(self.spec) else '-' if debianmisc.is_native(self.spec): @@ -97,9 +100,6 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" self.map_arch = map_arch_deb - self.dist = "" - - rpm.addMacro('dist', self.dist) def specpath(self): """Return the path to the spec file""" From 4b330483321f656dafffeb6f9a881dfbe4befe1a Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 1 May 2014 18:29:55 +0000 Subject: [PATCH 0807/1125] ocaml-opasswd-devel: Require ocaml-ctypes-devel --- SPECS/ocaml-opasswd.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index dcc70eb1..e7e42fcb 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -20,6 +20,8 @@ nixes, but it has not been tested. %package devel Summary: Development files for %{name} Group: Development/Other +Requires: %{name} = %{version}-%{release} +Requires: ocaml-ctypes-devel Requires: libffi %description devel @@ -58,7 +60,10 @@ rm -rf %{buildroot} %{_libdir}/ocaml/oPasswd/*.mli %changelog -* Thu Apr 24 2014 David Scott - 0.9.3-1 +* Thu May 1 2014 David Scott - 0.9.3-1 +- For -devel package add dependency on ocaml-ctypes-devel + +* Thu Apr 24 2014 David Scott - Fix split between -devel and main package, hopefully * Thu Oct 31 2013 Mike McClurg From 13810bf86a2c11c6eafed4ea0daa2e6cb8ed0883 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 1 May 2014 18:30:48 +0000 Subject: [PATCH 0808/1125] Build xapi from master 1.9.41 Signed-off-by: David Scott --- ...i.211c042934ecca68b622aef8b7bcf910320a1a61 | 33 +++++++++ ...i.a9f563a89e2b27d394573f8d542fc7e7a9068f5f | 68 +++++++++++++++++++ SPECS/xapi.spec | 25 +++---- 3 files changed, 114 insertions(+), 12 deletions(-) create mode 100644 SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 create mode 100644 SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f diff --git a/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 b/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 new file mode 100644 index 00000000..fcb6586c --- /dev/null +++ b/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 @@ -0,0 +1,33 @@ +commit 211c042934ecca68b622aef8b7bcf910320a1a61 +Author: David Scott +Date: Tue Apr 29 13:51:32 2014 +0000 + + The Makefile shouldn't call 'configure' + + The build 'standard' is that the caller should run + ./configure + make + + Signed-off-by: David Scott + +diff --git a/Makefile b/Makefile +index cf9e9d3..5b775f9 100644 +--- a/Makefile ++++ b/Makefile +@@ -31,15 +31,12 @@ EXTRA_INSTALL_PATH= + export ETCDIR OPTDIR PLUGINDIR HOOKSDIR INVENTORY VARPATCHDIR LIBEXECDIR XAPICONF SCRIPTSDIR SHAREDIR WEBDIR XHADIR BINDIR SBINDIR UDEVDIR OCAMLPATH EXTRA_INSTALL_PATH + + .PHONY: all +-all: version ocaml/fhs.ml ++all: version + omake -j 8 phase1 + omake -j 8 phase2 + omake -j 8 phase3 + @make test + +-config.mk ocaml/fhs.ml: configure +- ./configure +- + .PHONY: phase3 + phase3: + omake phase3 diff --git a/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f b/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f new file mode 100644 index 00000000..50d43d0c --- /dev/null +++ b/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f @@ -0,0 +1,68 @@ +commit a9f563a89e2b27d394573f8d542fc7e7a9068f5f +Author: David Scott +Date: Thu May 1 14:49:43 2014 +0000 + + configure: add '--disable-tests' option + + Unfortunately the unit tests don't work when run as unpriviledged + users inside unprepared chroots. This allows them to be skipped. + + By default "./configure && make" will run the unit tests as before. + + Signed-off-by: David Scott + +diff --git a/Makefile b/Makefile +index 5b775f9..b712035 100644 +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,9 @@ all: version + omake -j 8 phase1 + omake -j 8 phase2 + omake -j 8 phase3 ++ifeq ($(DISABLE_TESTS),false) + @make test ++endif + + .PHONY: phase3 + phase3: +diff --git a/configure b/configure +index 034cfdd..ba095e6 100755 +--- a/configure ++++ b/configure +@@ -17,6 +17,10 @@ let path name default docv doc = + let doc = Printf.sprintf "Set the path for %s" doc in + Arg.(value & opt string default & info [name] ~docv ~doc) + ++let disable_tests = ++ let doc = "Disable the unit tests" in ++ Arg.(value & flag & info [ "disable-tests" ] ~doc) ++ + let varpatchdir = dir "varpatchdir" "/var/patch" "VARPATCHDIR" "hotfixes" + let etcdir = dir "etcdir" "/etc/xensource" "ETCDIR" "configuration files" + let optdir = dir "optdir" "/opt/xensource" "OPTDIR" "system files" +@@ -43,13 +47,14 @@ let output_file filename lines = + List.iter (output_string oc) lines; + close_out oc + +-let configure varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir = +- Printf.printf "Configuring with the following params:\n\tvarpatchdir=%s\n\tetcdir=%s\n\toptdir=%s\n\tplugindir=%s\n\thooksdir=%s\n\tinventory=%s\n\txapiconf=%s\n\tlibexecdir=%s\n\tscriptsdir=%s\n\tsharedir=%s\n\twebdir=%s\n\txhadir=%s\n\tbindir=%s\n\tsbindir=%s\n\tudevdir=%s\n\n" varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir; ++let configure disable_tests varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir = ++ Printf.printf "Configuring with the following params:\n\tdisable_tests=%b\n\tvarpatchdir=%s\n\tetcdir=%s\n\toptdir=%s\n\tplugindir=%s\n\thooksdir=%s\n\tinventory=%s\n\txapiconf=%s\n\tlibexecdir=%s\n\tscriptsdir=%s\n\tsharedir=%s\n\twebdir=%s\n\txhadir=%s\n\tbindir=%s\n\tsbindir=%s\n\tudevdir=%s\n\n" disable_tests varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir; + + (* Write config.mk *) + let lines = + [ "# Warning - this file is autogenerated by the configure script"; + "# Do not edit"; ++ Printf.sprintf "DISABLE_TESTS=%b" disable_tests; + Printf.sprintf "VARPATCHDIR=%s" varpatchdir; + Printf.sprintf "ETCDIR=%s" etcdir; + Printf.sprintf "OPTDIR=%s" optdir; +@@ -88,7 +93,7 @@ let configure varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf li + in + output_file fhs_ml fhs_lines + +-let configure_t = Term.(pure configure $ varpatchdir $ etcdir $ optdir $ plugindir $ hooksdir $ inventory $ xapiconf $ libexecdir $ scriptsdir $ sharedir $ webdir $ xhadir $ bindir $ sbindir $ udevdir ) ++let configure_t = Term.(pure configure $ disable_tests $ varpatchdir $ etcdir $ optdir $ plugindir $ hooksdir $ inventory $ xapiconf $ libexecdir $ scriptsdir $ sharedir $ webdir $ xhadir $ bindir $ sbindir $ udevdir ) + + let () = + match diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index c6243b5b..635a77b6 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,17 +2,19 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.40 +Version: 1.9.41 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org -Source0: https://github.com/djs55/xen-api/archive/%{version}/xen-api-%{version}.tar.gz +Source0: https://github.com/xapi-project/xen-api/archive/%{version}/xen-api-%{version}.tar.gz Source1: xen-api-xapi-conf.in Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam +Patch0: xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 +Patch1: xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -20,6 +22,7 @@ BuildRequires: ocaml-ocamldoc BuildRequires: pam-devel BuildRequires: tetex-latex BuildRequires: xen-devel +BuildRequires: libffi-devel BuildRequires: zlib-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel @@ -55,6 +58,7 @@ Requires: ocaml-xcp-inventory Requires: redhat-lsb-core Requires: stunnel Requires: vhd-tool +Requires: libffi %description XCP toolstack. @@ -80,6 +84,8 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} +%patch0 -p1 +%patch1 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl @@ -88,14 +94,8 @@ cp %{SOURCE5} xen-api-pam %build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins --optdir=/usr/lib/xapi - -export COMPILE_JAVA=no -make version -omake phase1 -omake phase2 -omake ocaml/xapi/xapi -omake ocaml/xe-cli/xe +./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins --optdir=/usr/lib/xapi --disable-tests +make sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xen-api-xapi-conf.in > xen-api-xapi-conf @@ -109,7 +109,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi mkdir -p %{buildroot}/%{_libexecdir}/xapi install -m 0755 xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl -install -m 0755 scripts/pci-info %{buildroot}/%{_libexecdir}/xapi/pci-info install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info mkdir -p %{buildroot}/etc/xapi install -m 0644 xen-api-xapi-conf %{buildroot}/etc/xapi.conf @@ -148,7 +147,6 @@ fi %config(noreplace) /etc/xapi.conf %config(noreplace) /etc/xcp/pool.conf %{_libexecdir}/xapi/xapissl -%{_libexecdir}/xapi/pci-info %{_libexecdir}/xapi/update-mh-info /etc/xapi/db.conf /etc/xapi/hook-scripts @@ -170,6 +168,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Mon Apr 28 2014 David Scott - 1.9.41-1 +- first release from master + * Sat Apr 26 2014 David Scott - 1.9.40-1 - update to new xcp-idl interface with SR.probe From 8c21e7280815cb55b7ef74077ce3e55c7284daa0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 2 May 2014 00:48:20 +0000 Subject: [PATCH 0809/1125] Update the xapi.conf Signed-off-by: David Scott --- SOURCES/xen-api-xapi-conf.in | 193 +++++++++++++++++++++++++++++++++-- 1 file changed, 186 insertions(+), 7 deletions(-) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index fb7c9f4c..500dff8e 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -1,14 +1,193 @@ -# The xapi config file +# The xapi config file has 3 sections: a global policy section; +# a section for paths to helper utilities; and a timeout tweak section. -use-xenopsd = true -disable-logging-for = http db_write redo_log api_readonly -xapissl=@LIBEXECDIR@/xapi/xapissl -pci-info=@LIBEXECDIR@/xapi/pci-info - -udhcpd=/bin/true +# Global policy: ################################################# # The full list of xenopsd instances to manage. These must all be running. xenopsd-queues = org.xen.xcp.xenops.classic # The default xenopsd to use for VMs, unless a per-VM override is specified xenopsd-default = org.xen.xcp.xenops.classic + +# Configure the logging policy: +# logconfig = @ETCDIR@/log.conf + +# The pool configuration file contains either 'master' or +# 'slave:': +# pool_config_file = @ETCDIR@/pool.conf + +# The pool secret (or pool token) is shared on pool join and used +# to authenticate the slave to the master. +# pool_secret_path = @ETCDIR@/ptoken + +# Enable/disable the watchdog +# nowatchdog = false + +# Allow storage migration when SRs have been mirrored out-of-band +# and the SR uuids match +# relax-xsm-sr-check = true + +# Disable logging for the following modules +disable-logging-for = http db_write redo_log api_readonly + +# Paths to utilities: ############################################ + +# Used to start/restart/stop the stunnel listening for management +# traffic over HTTPS +# xapissl = @LIBEXECDIR@/xapissl + +# Path to the udhcpd program, used to hand out IP addresses on the +# host internal management network. +# udhcpd = @LIBEXECDIR@/udhcpd +udhcpd = /bin/true + +# Tweak timeouts: ################################################ + +# If the slave's connection to the master blocks for longer than +# this then we forcibly reset it: +# master_connection_reset_timeout = 120 + +# amount of time to retry master_connection before restarting xapi; +# -ve means don't timeout +# master_connection_retry_timeout = -1 # disabled + +# time to wait for qemu-dm to signal "ready" in xenstore +# qemu_dm_ready_timeout = 300 + +# time to wait for the hotplug scripts to complete +# hotplug_timeout = 300 + +# time to wait during a PIF.reconfigure_ip for the connection to +# the master to re-establish before concluding that it's broken and failing +# pif_reconfigure_ip_timeout = 300 + +# time between invocations of the pool database sync; every interval +# the pool database will be backed up to one host +# pool_db_sync_interval = 300 + +# time between attempts to synchronise the RRD archives to other +# hosts +# pool_data_sync_interval = 86400 # a day in seconds + +# time to wait for in-guest PV drivers to acknowledge a shutdown request +# before we conclude that the drivers have failed +# domain_shutdown_ack_timeout = 10 + +# time to wait for a domain to shutdown before we conclude the operation +# has failed. Note it can take a long time to shutdown if (for example) +# the OS has decided to install a large set of patches. +# domain_shutdown_total_timeout = 1200 + +# time between invocations of the "xapi healthcheck" script by xhad +# ha_xapi_healthcheck_interval = 60 + +# time after which we assume the "xapi healthcheck" has failed and xapi +# should be restarted +# ha_xapi_healthcheck_timeout = 120 + +# total number of times to attempt to restart a xapi which has failed +# a healthcheck +# ha_xapi_restart_attempts = 1 + +# time after which we assume a xapi restart attempt has failed +# ha_xapi_restart_timeout = 300 + +# time between writing RRD data to disk (the data is primarily stored in +# RAM) +# rrd_backup_interval = 86400 # 1 day in seconds + +# time between checks against an external authentication service (such as AD). +# If a user account associated with a session has been removed from a +# necessary group or otherwise disabled, the session will be destroyed. +# session_revalidation_interval = 300 + +# time between attempts to resychronise the subjects list with an external +# authentication service (such as AD) +# update_all_subjects_interval = 900 + +# time to wait for a domain to hit its balloon target before concluding that +# the balloon driver has failed +# wait_memory_target_timeout = 256 + +# time to wait for a response from the VSS agent before concluding the agent +# has failed +# snapshot_with_quiesce_timeout = 600 + +# time between master - slave heartbeats +# host_heartbeat_interval = 30 + +# time after the last heartbeat we wait before assuming the host is dead. +# Note we cannot safely restart VMs on other hosts because it might be +# simply a network partition. Turn HA on if you want VM restart. +# host_assumed_dead_interval = 600 + +# time after asking xapi to restart before it actually exits(). This delay +# allows the current API call to succeed. +# fuse_time = 10 + +# time after receiving a pool database restore before automatically restarting +# xapi to read it. +# db_restore_fuse_time = 30 + +# time after receiving the last API call before automatically logging out +# a session +# inactive_session_timeout = 86400 # 1 day in seconds + +# time after receiving the last task progress update before we assume the +# task has leaked and destroying it +# pending_task_timeout = 86400 # 1 day in seconds + +# time after a task has been completed before we assume the client has failed, +# leaked the task, requiring xapi to destroy it +# completed_task_timeout = 3900 # 64 minutes in seconds + +# minimum time between a VM starting and the next reboot (used to avoid +# a VM crashing in a reboot loop) +# minimum_time_between_bounces = 120 + +# If a domain is rebooted (from inside) in less than this time since it last +# started, then insert an artificial delay +# minimum_time_between_reboot_with_no_added_delay = 60 + +# ha_monitor_interval = 20 + +# Unconditionally replan every once in a while just in case the overcommit +# protection is buggy and we don't notice +# ha_monitor_plan_interval = 1800 + +# ha_monitor_startup_timeout = 1800 + +# ha_default_timeout_base = 60 + +# guest_liveness_timeout = 300 + +# permanent_master_failure_retry_interval = 60 + +# The maximum time, in seconds, for which we are prepared to wait for +# a response from the block device I/O process before assuming that it +# has died while emptying +# redo_log_max_block_time_empty = 2 + +# The maximum time, in seconds, for which we are prepared to wait for +# a response from the block device I/O process before assuming that it +# has died while reading +# redo_log_max_block_time_read = 30 + +# The maximum time, in seconds, for which we are prepared to wait for +# a response from the block device I/O process before assuming that +# it has died while writing a delta +# redo_log_max_block_time_writedelta = 2 + +# The maximum time, in seconds, for which we are prepared to wait for +# a response from the block device I/O process before assuming that +# it has died while writing a database +# redo_log_max_block_time_writedb = 30 + +# The maximum time, in seconds, for which we are prepared to wait for +# a response from the block device I/O process before assuming that +# it has died while initially connecting to it +# redo_log_max_startup_time = 5 + +# The delay between each attempt to connect to the block device I/O +# process +# redo_log_connect_delay = 0.1 From 60d7bc72c0596378281f8490351ff6b86023c2aa Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 2 May 2014 08:46:16 +0000 Subject: [PATCH 0810/1125] Actually set the pool.conf path in xapi.conf Signed-off-by: David Scott --- SOURCES/xen-api-xapi-conf.in | 1 + 1 file changed, 1 insertion(+) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index 500dff8e..93c9e8f0 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -15,6 +15,7 @@ xenopsd-default = org.xen.xcp.xenops.classic # The pool configuration file contains either 'master' or # 'slave:': # pool_config_file = @ETCDIR@/pool.conf +pool_config_file = /etc/xcp/pool.conf # The pool secret (or pool token) is shared on pool join and used # to authenticate the slave to the master. From 129ec9baf4926969a8f734ed2fce93bb1b4d598d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 6 May 2014 11:41:45 +0000 Subject: [PATCH 0811/1125] Update xapi to 1.9.42 Signed-off-by: David Scott --- SPECS/xapi.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 635a77b6..787539bf 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.41 +Version: 1.9.42 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -13,8 +13,6 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam -Patch0: xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 -Patch1: xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -84,8 +82,6 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} -%patch0 -p1 -%patch1 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl From 456b73be3d6fd6f9a1c97d471eddc224dfb508d1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 6 May 2014 13:39:08 +0000 Subject: [PATCH 0812/1125] Add changelog entry for 1.9.42 Signed-off-by: David Scott --- SPECS/xapi.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 787539bf..f4159dba 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -164,6 +164,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Wed May 7 2014 David Scott - 1.9.42-1 +- update to 1.9.42 + * Mon Apr 28 2014 David Scott - 1.9.41-1 - first release from master From 3388d682164653194bb4b7b50261d770a466ffc7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 6 May 2014 19:48:04 +0000 Subject: [PATCH 0813/1125] xapi: backport proposed patch from master Signed-off-by: David Scott --- ...i-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 | 230 ++++++++++++++++++ SPECS/xapi.spec | 2 + 2 files changed, 232 insertions(+) create mode 100644 SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 diff --git a/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 b/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 new file mode 100644 index 00000000..884de55b --- /dev/null +++ b/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 @@ -0,0 +1,230 @@ +commit 66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 +Author: David Scott +Date: Tue May 6 19:45:20 2014 +0000 + + pool.conf: always use the path from the config file + + Previously we had cached a copy in Pool_role for no obvious reason. + Also, consolidate Pool_role and Pool_role_shared into Pool_role. + + Signed-off-by: David Scott + +diff --git a/ocaml/idl/ocaml_backend/OMakefile b/ocaml/idl/ocaml_backend/OMakefile +index a7b2a41..c0b7233 100644 +--- a/ocaml/idl/ocaml_backend/OMakefile ++++ b/ocaml/idl/ocaml_backend/OMakefile +@@ -103,7 +103,6 @@ SERVER_OBJS = ../../database/escaping locking_helpers \ + ../datamodel ../datamodel_utils ../datamodel_values \ + gen_client ocaml_syntax ocaml_utils taskHelper exnHelper \ + server_helpers session_check context \ +- ../../pool_role_shared \ + ../../xapi/pool_role \ + ../../xapi/xapi_inventory \ + ../../xapi/hashtbl_xml \ +diff --git a/ocaml/pool_role_shared.ml b/ocaml/pool_role_shared.ml +deleted file mode 100644 +index c210fdc..0000000 +--- a/ocaml/pool_role_shared.ml ++++ /dev/null +@@ -1,89 +0,0 @@ +-(* +- * Copyright (C) Citrix Systems Inc. +- * +- * This program 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; version 2.1 only. with the special +- * exception on linking described in file LICENSE. +- * +- * This program 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. +- *) +-(** +- * @group Pool Management +- *) +- +-open Stringext +-open Threadext +- +-module D=Debug.Make(struct let name="pool_role" end) +-open D +- +-(** The role of this node *) +-type t = +- | Master +- | Slave of string (* IP address *) +- | Broken +- +-let role = ref None +-let role_unit_tests = ref false +-let role_m = Mutex.create () +-let filename = ref (Filename.concat Fhs.etcdir "pool.conf") +- +-let set_pool_role_for_test () = +- Mutex.execute role_m (fun _ -> role := Some Master; +- role_unit_tests := true) +- +-let is_unit_test () = +- Mutex.execute role_m (fun _ -> !role_unit_tests) +- +-let string_of = function +- | Master -> "master" +- | Slave x -> "slave:" ^ x +- | Broken -> "broken" +- +-let read_pool_role () = +- try +- let s = String.strip String.isspace +- (Unixext.string_of_file !filename) in +- match String.split ~limit:2 ':' s with +- | [ "master" ] -> Master +- | [ "slave"; m_ip ] -> Slave m_ip +- | [ "broken" ] -> Broken +- | _ -> failwith "cannot parse pool_role from pool config file" +- with _ -> +- (* If exec name is suite.opt, we're running as unit tests *) +- if "xapi" <> Filename.basename Sys.executable_name +- then (debug "Executable name is not 'xapi', so we must be running \ +- in unit-test mode; setting pool-role to 'Master'"; +- Master) +- else (error "Failed to read pool role from %s" !filename; +- Broken) +- +-let get_role () = +- Mutex.execute role_m (fun _ -> +- match !role with +- | Some x -> x +- | None -> +- let r = read_pool_role () in +- role := Some r; +- r +- ) +- +-let is_master () = get_role () = Master +- +-let is_slave () = match get_role () with +- | Slave _ -> true +- | _ -> false +- +-let is_broken () = get_role () = Broken +- +-exception This_host_is_a_master +-exception This_host_is_broken +- +-let get_master_address () = match get_role () with +- | Slave ip -> ip +- | Master -> raise This_host_is_a_master +- | Broken -> raise This_host_is_broken +diff --git a/ocaml/test/suite.ml b/ocaml/test/suite.ml +index 2926395..8e00c49 100644 +--- a/ocaml/test/suite.ml ++++ b/ocaml/test/suite.ml +@@ -59,7 +59,7 @@ let start_server handlers = + + let harness_init () = + Printexc.record_backtrace true; +- Pool_role_shared.set_pool_role_for_test (); ++ Pool_role.set_pool_role_for_test (); + Xapi.register_callback_fns (); + start_server handlers + +diff --git a/ocaml/xapi/pool_role.ml b/ocaml/xapi/pool_role.ml +index 2c736eb..c9aafee 100644 +--- a/ocaml/xapi/pool_role.ml ++++ b/ocaml/xapi/pool_role.ml +@@ -15,12 +15,79 @@ + * @group Pool Management + *) + ++open Stringext + open Threadext + +-include Pool_role_shared ++module D=Debug.Make(struct let name="pool_role" end) ++open D ++ ++(** The role of this node *) ++type t = ++ | Master ++ | Slave of string (* IP address *) ++ | Broken ++ ++let role = ref None ++let role_unit_tests = ref false ++let role_m = Mutex.create () ++ ++let set_pool_role_for_test () = ++ Mutex.execute role_m (fun _ -> role := Some Master; ++ role_unit_tests := true) ++ ++let is_unit_test () = ++ Mutex.execute role_m (fun _ -> !role_unit_tests) ++ ++let string_of = function ++ | Master -> "master" ++ | Slave x -> "slave:" ^ x ++ | Broken -> "broken" ++ ++let read_pool_role () = ++ try ++ let s = String.strip String.isspace ++ (Unixext.string_of_file !Xapi_globs.pool_config_file) in ++ match String.split ~limit:2 ':' s with ++ | [ "master" ] -> Master ++ | [ "slave"; m_ip ] -> Slave m_ip ++ | [ "broken" ] -> Broken ++ | _ -> failwith "cannot parse pool_role from pool config file" ++ with _ -> ++ (* If exec name is suite.opt, we're running as unit tests *) ++ if "xapi" <> Filename.basename Sys.executable_name ++ then (debug "Executable name is not 'xapi', so we must be running \ ++ in unit-test mode; setting pool-role to 'Master'"; ++ Master) ++ else (error "Failed to read pool role from %s" !Xapi_globs.pool_config_file; ++ Broken) ++ ++let get_role () = ++ Mutex.execute role_m (fun _ -> ++ match !role with ++ | Some x -> x ++ | None -> ++ let r = read_pool_role () in ++ role := Some r; ++ r ++ ) ++ ++let is_master () = get_role () = Master ++ ++let is_slave () = match get_role () with ++ | Slave _ -> true ++ | _ -> false ++ ++let is_broken () = get_role () = Broken ++ ++exception This_host_is_a_master ++exception This_host_is_broken ++ ++let get_master_address () = match get_role () with ++ | Slave ip -> ip ++ | Master -> raise This_host_is_a_master ++ | Broken -> raise This_host_is_broken + + let set_role r = +- filename := !Xapi_globs.pool_config_file; + let old_role = get_role () in + Mutex.execute role_m + (fun () -> +diff --git a/ocaml/xapi/pool_role.mli b/ocaml/xapi/pool_role.mli +index 80f41b7..932c89c 100644 +--- a/ocaml/xapi/pool_role.mli ++++ b/ocaml/xapi/pool_role.mli +@@ -34,6 +34,8 @@ val is_broken: unit -> bool + (** Returns true if this is a unit test *) + val is_unit_test: unit -> bool + ++val set_pool_role_for_test: unit -> unit ++ + exception This_host_is_a_master + exception This_host_is_broken + diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index f4159dba..233868f1 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -13,6 +13,7 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam +Patch0: xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -82,6 +83,7 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} +%patch0 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl From 473c4c59e715a5001716ba4da4bc03d2010a5ed8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 7 May 2014 11:47:17 +0100 Subject: [PATCH 0814/1125] SPECS: Fix packages which don't have %{?dist} in their Release tags Signed-off-by: Euan Harris --- SPECS/ocaml-crc.spec | 2 +- SPECS/ocaml-ctypes.spec | 2 +- SPECS/ocaml-gnt.spec | 2 +- SPECS/ocaml-io-page.spec | 2 +- SPECS/ocaml-mirage-types.spec | 2 +- SPECS/ocaml-opasswd.spec | 4 ++-- SPECS/ocaml-rrd-transport.spec | 2 +- SPECS/ocaml-sha.spec | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec index 08ea8013..38a20ed9 100644 --- a/SPECS/ocaml-crc.spec +++ b/SPECS/ocaml-crc.spec @@ -2,7 +2,7 @@ Name: ocaml-crc Version: 0.9.1 -Release: 1 +Release: 1%{?dist} Summary: CRC implementation for OCaml License: ISC Group: Development/Other diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec index dea3f8f3..42a4ec01 100644 --- a/SPECS/ocaml-ctypes.spec +++ b/SPECS/ocaml-ctypes.spec @@ -1,6 +1,6 @@ Name: ocaml-ctypes Version: 0.2.2 -Release: 1%{?extrarelease} +Release: 1%{?dist} Summary: Library for binding to C libraries using pure OCaml License: MIT Group: Development/Other diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index 559040c7..00969135 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -2,7 +2,7 @@ Name: ocaml-gnt Version: 1.0.0 -Release: 1 +Release: 1%{?dist} Summary: OCaml bindings for userspace Xen grant table controls License: LGPL2.1 + OCaml linking exception Group: Development/Other diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 85a61be7..b54f61e1 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -2,7 +2,7 @@ Name: ocaml-io-page Version: 1.1.1 -Release: 1 +Release: 1%{?dist} Summary: Efficient handling of I/O memory pages on Unix and Xen. License: ISC Group: Development/Other diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 2d454ba6..52f6c500 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -2,7 +2,7 @@ Name: ocaml-mirage-types Version: 1.1.1 -Release: 1 +Release: 1%{?dist} Summary: MirageOS interfaces License: ISC Group: Development/Other diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index a74b2b30..dcc70eb1 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -1,6 +1,6 @@ Name: ocaml-opasswd Version: 0.9.3 -Release: 0 +Release: 1%{?dist} Summary: OCaml interface to the glibc passwd/shadow password functions License: ISC Group: Development/Other @@ -58,7 +58,7 @@ rm -rf %{buildroot} %{_libdir}/ocaml/oPasswd/*.mli %changelog -* Thu Apr 24 2014 David Scott +* Thu Apr 24 2014 David Scott - 0.9.3-1 - Fix split between -devel and main package, hopefully * Thu Oct 31 2013 Mike McClurg diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index 319fd717..e47dae01 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -2,7 +2,7 @@ Name: ocaml-rrd-transport Version: 0.7.1 -Release: 1 +Release: 1%{?dist} Summary: Shared-memory protocols for transmitting RRD data License: LGPL2.1 + OCaml linking exception Group: Development/Other diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 84524070..bd95dcdb 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -1,6 +1,6 @@ Name: ocaml-sha Version: 1.9 -Release: 1 +Release: 1%{?dist} Summary: OCaml SHA License: LGPL2.1 Group: Development/Other From 2ace4cc007fddf522078cd3c43b2f1e5017cb961 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 7 May 2014 14:32:53 +0100 Subject: [PATCH 0815/1125] Add a missing build dependency which caught ubuntu builds out --- SPECS/xcp-rrdd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 2602448b..94a19a9a 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -17,6 +17,7 @@ BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-rrd-transport-devel BuildRequires: ocaml-xen-lowlevel-libs-devel +BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: forkexecd-devel BuildRequires: xen-devel Requires: redhat-lsb-core From 30fadfdbf359fcdaa71ecc5cc831bb9f62aa400d Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 8 May 2014 02:42:24 +0000 Subject: [PATCH 0816/1125] Update ocaml-xenops to 0.9.4 Signed-off-by: David Scott --- SPECS/ocaml-xenops.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 83e4fff1..8b74cbd6 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xenops -Version: 0.9.2 +Version: 0.9.4 Release: 1%{?dist} Summary: Low-level xen control operations OCaml License: LGPL @@ -35,6 +35,15 @@ Requires: ocaml-xenstore-clients-devel%{?_isa} The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. +%package tools +Summary: Debugging tools for %{name} +Group: Development/Libraries +Requires: xen-libs +BuildRequires: xen-devel + +%description tools +A set of debugging tools which showcase the features of %{name}-devel. + %prep %setup -q -n xenops-%{version} @@ -45,7 +54,8 @@ make mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore -make install +mkdir -p %{buildroot}/%{_bindir} +make install BINDIR=%{buildroot}/%{_bindir} %files @@ -55,7 +65,13 @@ make install %doc LICENSE README.md ChangeLog MAINTAINERS %{_libdir}/ocaml/xenops/* +%files tools +%{_bindir}/list_domains + %changelog +* Thu May 8 2014 David Scott - 0.9.4-1 +- Update to 0.9.4, add list_domains binary + * Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 From f157e4ddf80ae7c476cae6055c985df15e83d787 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 8 May 2014 02:42:37 +0000 Subject: [PATCH 0817/1125] Update xapi to 1.9.43 Signed-off-by: David Scott --- ...i-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 | 230 ------------------ SPECS/xapi.spec | 8 +- 2 files changed, 3 insertions(+), 235 deletions(-) delete mode 100644 SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 diff --git a/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 b/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 deleted file mode 100644 index 884de55b..00000000 --- a/SOURCES/xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 +++ /dev/null @@ -1,230 +0,0 @@ -commit 66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 -Author: David Scott -Date: Tue May 6 19:45:20 2014 +0000 - - pool.conf: always use the path from the config file - - Previously we had cached a copy in Pool_role for no obvious reason. - Also, consolidate Pool_role and Pool_role_shared into Pool_role. - - Signed-off-by: David Scott - -diff --git a/ocaml/idl/ocaml_backend/OMakefile b/ocaml/idl/ocaml_backend/OMakefile -index a7b2a41..c0b7233 100644 ---- a/ocaml/idl/ocaml_backend/OMakefile -+++ b/ocaml/idl/ocaml_backend/OMakefile -@@ -103,7 +103,6 @@ SERVER_OBJS = ../../database/escaping locking_helpers \ - ../datamodel ../datamodel_utils ../datamodel_values \ - gen_client ocaml_syntax ocaml_utils taskHelper exnHelper \ - server_helpers session_check context \ -- ../../pool_role_shared \ - ../../xapi/pool_role \ - ../../xapi/xapi_inventory \ - ../../xapi/hashtbl_xml \ -diff --git a/ocaml/pool_role_shared.ml b/ocaml/pool_role_shared.ml -deleted file mode 100644 -index c210fdc..0000000 ---- a/ocaml/pool_role_shared.ml -+++ /dev/null -@@ -1,89 +0,0 @@ --(* -- * Copyright (C) Citrix Systems Inc. -- * -- * This program 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; version 2.1 only. with the special -- * exception on linking described in file LICENSE. -- * -- * This program 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. -- *) --(** -- * @group Pool Management -- *) -- --open Stringext --open Threadext -- --module D=Debug.Make(struct let name="pool_role" end) --open D -- --(** The role of this node *) --type t = -- | Master -- | Slave of string (* IP address *) -- | Broken -- --let role = ref None --let role_unit_tests = ref false --let role_m = Mutex.create () --let filename = ref (Filename.concat Fhs.etcdir "pool.conf") -- --let set_pool_role_for_test () = -- Mutex.execute role_m (fun _ -> role := Some Master; -- role_unit_tests := true) -- --let is_unit_test () = -- Mutex.execute role_m (fun _ -> !role_unit_tests) -- --let string_of = function -- | Master -> "master" -- | Slave x -> "slave:" ^ x -- | Broken -> "broken" -- --let read_pool_role () = -- try -- let s = String.strip String.isspace -- (Unixext.string_of_file !filename) in -- match String.split ~limit:2 ':' s with -- | [ "master" ] -> Master -- | [ "slave"; m_ip ] -> Slave m_ip -- | [ "broken" ] -> Broken -- | _ -> failwith "cannot parse pool_role from pool config file" -- with _ -> -- (* If exec name is suite.opt, we're running as unit tests *) -- if "xapi" <> Filename.basename Sys.executable_name -- then (debug "Executable name is not 'xapi', so we must be running \ -- in unit-test mode; setting pool-role to 'Master'"; -- Master) -- else (error "Failed to read pool role from %s" !filename; -- Broken) -- --let get_role () = -- Mutex.execute role_m (fun _ -> -- match !role with -- | Some x -> x -- | None -> -- let r = read_pool_role () in -- role := Some r; -- r -- ) -- --let is_master () = get_role () = Master -- --let is_slave () = match get_role () with -- | Slave _ -> true -- | _ -> false -- --let is_broken () = get_role () = Broken -- --exception This_host_is_a_master --exception This_host_is_broken -- --let get_master_address () = match get_role () with -- | Slave ip -> ip -- | Master -> raise This_host_is_a_master -- | Broken -> raise This_host_is_broken -diff --git a/ocaml/test/suite.ml b/ocaml/test/suite.ml -index 2926395..8e00c49 100644 ---- a/ocaml/test/suite.ml -+++ b/ocaml/test/suite.ml -@@ -59,7 +59,7 @@ let start_server handlers = - - let harness_init () = - Printexc.record_backtrace true; -- Pool_role_shared.set_pool_role_for_test (); -+ Pool_role.set_pool_role_for_test (); - Xapi.register_callback_fns (); - start_server handlers - -diff --git a/ocaml/xapi/pool_role.ml b/ocaml/xapi/pool_role.ml -index 2c736eb..c9aafee 100644 ---- a/ocaml/xapi/pool_role.ml -+++ b/ocaml/xapi/pool_role.ml -@@ -15,12 +15,79 @@ - * @group Pool Management - *) - -+open Stringext - open Threadext - --include Pool_role_shared -+module D=Debug.Make(struct let name="pool_role" end) -+open D -+ -+(** The role of this node *) -+type t = -+ | Master -+ | Slave of string (* IP address *) -+ | Broken -+ -+let role = ref None -+let role_unit_tests = ref false -+let role_m = Mutex.create () -+ -+let set_pool_role_for_test () = -+ Mutex.execute role_m (fun _ -> role := Some Master; -+ role_unit_tests := true) -+ -+let is_unit_test () = -+ Mutex.execute role_m (fun _ -> !role_unit_tests) -+ -+let string_of = function -+ | Master -> "master" -+ | Slave x -> "slave:" ^ x -+ | Broken -> "broken" -+ -+let read_pool_role () = -+ try -+ let s = String.strip String.isspace -+ (Unixext.string_of_file !Xapi_globs.pool_config_file) in -+ match String.split ~limit:2 ':' s with -+ | [ "master" ] -> Master -+ | [ "slave"; m_ip ] -> Slave m_ip -+ | [ "broken" ] -> Broken -+ | _ -> failwith "cannot parse pool_role from pool config file" -+ with _ -> -+ (* If exec name is suite.opt, we're running as unit tests *) -+ if "xapi" <> Filename.basename Sys.executable_name -+ then (debug "Executable name is not 'xapi', so we must be running \ -+ in unit-test mode; setting pool-role to 'Master'"; -+ Master) -+ else (error "Failed to read pool role from %s" !Xapi_globs.pool_config_file; -+ Broken) -+ -+let get_role () = -+ Mutex.execute role_m (fun _ -> -+ match !role with -+ | Some x -> x -+ | None -> -+ let r = read_pool_role () in -+ role := Some r; -+ r -+ ) -+ -+let is_master () = get_role () = Master -+ -+let is_slave () = match get_role () with -+ | Slave _ -> true -+ | _ -> false -+ -+let is_broken () = get_role () = Broken -+ -+exception This_host_is_a_master -+exception This_host_is_broken -+ -+let get_master_address () = match get_role () with -+ | Slave ip -> ip -+ | Master -> raise This_host_is_a_master -+ | Broken -> raise This_host_is_broken - - let set_role r = -- filename := !Xapi_globs.pool_config_file; - let old_role = get_role () in - Mutex.execute role_m - (fun () -> -diff --git a/ocaml/xapi/pool_role.mli b/ocaml/xapi/pool_role.mli -index 80f41b7..932c89c 100644 ---- a/ocaml/xapi/pool_role.mli -+++ b/ocaml/xapi/pool_role.mli -@@ -34,6 +34,8 @@ val is_broken: unit -> bool - (** Returns true if this is a unit test *) - val is_unit_test: unit -> bool - -+val set_pool_role_for_test: unit -> unit -+ - exception This_host_is_a_master - exception This_host_is_broken - diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 233868f1..4b2d3c5d 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.42 +Version: 1.9.43 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -13,7 +13,6 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam -Patch0: xen-api-66a9e416ba8e2e88a2114efb1266e6a4fa0b3806 BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -83,7 +82,6 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} -%patch0 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl @@ -166,8 +164,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Wed May 7 2014 David Scott - 1.9.42-1 -- update to 1.9.42 +* Thu May 8 2014 David Scott - 1.9.43-1 +- update to 1.9.43 * Mon Apr 28 2014 David Scott - 1.9.41-1 - first release from master From 77ee0f9420202ff6dba16e3aba2d68af7e008ab3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 15:14:08 +0100 Subject: [PATCH 0818/1125] Update instructions for ubuntu (work in progress) Signed-off-by: David Scott --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 62941d60..0e4be777 100644 --- a/README.md +++ b/README.md @@ -53,16 +53,15 @@ Debian-based distributions (experimental) Building Debian packages is experimental! -On Debian-based distributions, the packages are built using `pbuilder`. -`pbuilder` is available in the main Ubuntu and Debian package repositories, so there is no need to add extra ones. -`pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. - -The build also depends on a more modern OCaml compiler than the version in Ubuntu, available from this PPA: +Install dependencies: ``` -deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main -deb-src http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main +sudo apt-get install build-essential pbuilder python-rpm ``` +Note `pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. + +The build also depends on OCaml 4.01.0, available in Ubuntu trusty. + The steps to build Debian packages are the same as those to build RPMs: ``` From d9a8bb11b2954649e86a5e0a1bacadc649c9f75c Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 14:20:10 +0000 Subject: [PATCH 0819/1125] 'linaro' is a Debian-like distribution Signed-off-by: David Scott --- specdep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specdep.py b/specdep.py index 676039a1..c79028fd 100755 --- a/specdep.py +++ b/specdep.py @@ -13,7 +13,7 @@ def build_type(): - debian_like = ["ubuntu", "debian"] + debian_like = ["ubuntu", "debian", "linaro"] rhel_like = ["fedora", "redhat", "centos"] dist = platform.linux_distribution(full_distribution_name=False)[0].lower() From e7dd4487cc9cde0c8cdd61873adb41905dfb2662 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 15:55:29 +0100 Subject: [PATCH 0820/1125] configure: detect 'Linaro' as Debian-like Signed-off-by: David Scott --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 08218e79..879755e8 100755 --- a/configure.sh +++ b/configure.sh @@ -4,6 +4,6 @@ set -eu if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" -o `lsb_release -si` == "RedHatEnterpriseServer" ] ; then . scripts/rpm/configure.sh -elif [ `lsb_release -si` == "Ubuntu" -o `lsb_release -si` == "Debian" ] ; then +elif [ `lsb_release -si` == "Ubuntu" -o `lsb_release -si` == "Debian" -o `lsb_release -si` == "Linaro" ] ; then . scripts/deb/configure.sh fi From ba164b508822c32d38262c30817e01dc22d3d35b Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 16:57:58 +0100 Subject: [PATCH 0821/1125] We use cowbuilder not pbuilder Signed-off-by: David Scott --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0e4be777..0575a078 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,9 @@ Debian-based distributions (experimental) Building Debian packages is experimental! -Install dependencies: -``` -sudo apt-get install build-essential pbuilder python-rpm -``` - -Note `pbuilder` does run as root, so you may wish to add your user to the `sudoers` list. +The Debian/Ubuntu package build uses [cowbuilder](https://wiki.debian.org/cowbuilder), which needs to run as root, so you may wish to add your user to the `sudoers` list. -The build also depends on OCaml 4.01.0, available in Ubuntu trusty. +The build also depends on OCaml 4.01.0, now available in Ubuntu trusty. The steps to build Debian packages are the same as those to build RPMs: From ac5e45f6007db011aea5d0a796d6618856210e8c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 9 May 2014 17:28:14 +0100 Subject: [PATCH 0822/1125] Update Debian build instructions to mention Debian Jessie --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0575a078..85794e3a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Building Debian packages is experimental! The Debian/Ubuntu package build uses [cowbuilder](https://wiki.debian.org/cowbuilder), which needs to run as root, so you may wish to add your user to the `sudoers` list. -The build also depends on OCaml 4.01.0, now available in Ubuntu trusty. +The build also depends on OCaml 4.01.0, now available in Ubuntu Trusty and Debian Jessie. The steps to build Debian packages are the same as those to build RPMs: From e005e5e4417530e08ec35a95fae053633b0c9842 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 9 May 2014 17:37:24 +0100 Subject: [PATCH 0823/1125] Makefile: Create repository metadata in SRPMS This is needed to make yum-builddep work. Signed-off-by: Euan Harris --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 096b22bd..f0cdbe1c 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ all: rpms %.src.rpm: @echo [RPMBUILD] $@ @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< + @echo [CREATEREPO] $@ + @createrepo --quiet --update ./SRPMS %.rpm: @echo [MOCK] $@ From ddfc5b248716b2a127f4c24796b65ce218dab6c4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 20:13:06 +0000 Subject: [PATCH 0824/1125] Update to ocaml-xenstore-clients 0.9.3 Signed-off-by: David Scott --- SPECS/ocaml-xenstore-clients.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index b77d3707..2c6014ac 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xenstore-clients -Version: 0.9.2 +Version: 0.9.3 Release: 1%{?dist} Summary: Unix xenstore clients for OCaml License: LGPL @@ -49,6 +49,9 @@ make install DESTDIR=${buildroot} %{_libdir}/ocaml/xenstore_transport/* %changelog +* Fri May 9 2014 David Scott - 0.9.3-1 +- Update to 0.9.3 + * Tue Sep 10 2013 David Scott - 0.9.2-1 - Update to 0.9.2 From c92854d1b29e2bdafe12007170d6b7d671a04be1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 21:09:46 +0000 Subject: [PATCH 0825/1125] Update ocaml-xcp-idl to 0.9.16 Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index dd4abcb9..9cc17d35 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.15 +Version: 0.9.16 Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL @@ -62,6 +62,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/xcp/* %changelog +* Fri May 9 2014 David Scott - 0.9.16-1 +- Update to 0.9.16, with RRD fixes + * Fri Apr 25 2014 David Scott - 0.9.15-1 - Update to 0.9.15, now with vGPU and SR.probe From 25fa4e847e287218049b889f7acf7440544f9c03 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 21:14:48 +0000 Subject: [PATCH 0826/1125] Update xcp-rrdd to 0.9.5 Signed-off-by: David Scott --- SPECS/xcp-rrdd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 94a19a9a..b2b94ec1 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,5 +1,5 @@ Name: xcp-rrdd -Version: 0.9.4 +Version: 0.9.5 Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL @@ -54,6 +54,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri May 9 2014 David Scott - 0.9.5-1 +- Update to 0.9.5, now will start without xen + * Sat Apr 26 2014 David Scott - 0.9.4-1 - Update to 0.9.4, now depends on rrdd-transport From ab896fc52d4725a067abb5950c77c4e5ecad9830 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 21:34:13 +0000 Subject: [PATCH 0827/1125] Update xapi to 1.9.44 Signed-off-by: David Scott --- SPECS/xapi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 4b2d3c5d..e27f2a22 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.43 +Version: 1.9.44 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -164,8 +164,8 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog -* Thu May 8 2014 David Scott - 1.9.43-1 -- update to 1.9.43 +* Fri May 9 2014 David Scott - 1.9.44-1 +- update to 1.9.44 * Mon Apr 28 2014 David Scott - 1.9.41-1 - first release from master From abeac697365798ffb96075ff930b2bcc3e64a526 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 10 May 2014 17:36:59 +0000 Subject: [PATCH 0828/1125] Update to xenserver-install-wizard 0.2.30 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 18721094..ecab271a 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.29 +Version: 0.2.30 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -32,6 +32,9 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog +* Sat May 10 2014 David Scott - 0.2.30-1 +- Update to 0.2.30, now starts xcp-rrdd + * Tue Apr 29 2014 Bob Ball - 0.2.29-1 - Update to 0.2.29, with fixes for static IP on debian/ubuntu From d311814de0f38e97c81dad43c55ea191fbb17a9f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 10 May 2014 20:23:54 +0000 Subject: [PATCH 0829/1125] Update xapi to 1.9.45 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index e27f2a22..ec7ab993 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.44 +Version: 1.9.45 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -164,6 +164,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Sat May 10 2014 David Scott - 1.9.45-1 +- update to 1.9.45 + * Fri May 9 2014 David Scott - 1.9.44-1 - update to 1.9.44 From bc58aa0f883715a2681c7072c49a2a86eb49fb66 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 11 May 2014 15:12:27 +0000 Subject: [PATCH 0830/1125] Update to xapi 1.9.46 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index ec7ab993..a3a85509 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.45 +Version: 1.9.46 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -164,6 +164,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Sun May 11 2014 David Scott - 1.9.46-1 +- update to 1.9.46 + * Sat May 10 2014 David Scott - 1.9.45-1 - update to 1.9.45 From 90f2ffe156459cafe3b507ff543793ceba230c65 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 May 2014 21:03:19 +0000 Subject: [PATCH 0831/1125] Update xapi to 1.9.47 Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index a3a85509..fec5e9c8 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.46 +Version: 1.9.47 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -164,6 +164,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Tue May 13 2014 David Scott - 1.9.47-1 +- update to 1.9.47 + * Sun May 11 2014 David Scott - 1.9.46-1 - update to 1.9.46 From 5068c43c26d2a9a6b991e92dac823bb91fb66186 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 11 Mar 2014 16:35:07 +0000 Subject: [PATCH 0832/1125] Bump ocaml-lwt to fix ocaml4 issue on debian jesse --- SPECS/ocaml-lwt.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 40acfa5e..7771561b 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -2,14 +2,14 @@ %define debug_package %{nil} Name: ocaml-lwt -Version: 2.4.3 +Version: 2.4.4 Release: 1%{?dist} Summary: OCaml lightweight thread library Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://ocsigen.org/lwt -Source0: http://ocsigen.org/download/lwt-%{version}.tar.gz +Source0: https://github.com/ocsigen/lwt/archive/%{version}/%{name}-%{version}.tar.gz ExcludeArch: sparc64 s390 s390x # Location of libev headers on Fedora is in /usr/include/libev/ev.h @@ -79,6 +79,9 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so %{_libdir}/ocaml/stublibs/*.so.owner %changelog +* Mon Mar 10 2014 Bob Ball - 2.4.4-1 +- Update to 2.4.4 + * Sat Jun 1 2013 David Scott - 2.4.3-1 - Update to 2.4.3 From 71fe62fbf529dfa3443be032df1a2b4e3ce30451 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 12 Mar 2014 19:27:26 +0000 Subject: [PATCH 0833/1125] Update blktap to fix ubuntu compile failures --- SPECS/blktap.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index e35ab0b3..a3281523 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,7 +1,7 @@ Summary: Enhanced version of tapdisk Name: blktap -Version: 0.9.0 -Release: 2%{?dist} +Version: 0.9.1 +Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/xapi-project/blktap @@ -12,6 +12,7 @@ BuildRequires: libaio-devel BuildRequires: libtool BuildRequires: libuuid-devel BuildRequires: xen-devel +BuildRequires: openssl-devel %description Enhanced version of tapdisk with support for storage mirroring. @@ -42,6 +43,8 @@ make install DESTDIR=%{buildroot} %files %{_libdir}/%{name}/bin/* %{_libdir}/%{name}/etc/udev/rules.d/blktap.rules +%{_libdir}/%{name}/etc/cron.daily/blktap-log-cleanup +%{_libdir}/%{name}/etc/logrotate.d/blktap %{_libdir}/%{name}/include/blktap/* %{_libdir}/%{name}/include/vhd/* %{_libdir}/%{name}/lib/* @@ -49,6 +52,9 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog +* Wed Mar 12 2014 Bob Ball - 0.9.0-2 - Change to upstream source repository From ebfb8ea40929d7f4c9ea5ce14a149fe77a02c723 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 23 Apr 2014 14:43:23 +0100 Subject: [PATCH 0834/1125] Update xenopsd-xc path to support xen 4.3 --- SOURCES/xenopsd-xc-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index ac1ae984..5f390c9e 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -36,7 +36,7 @@ if [ -f /etc/sysconfig/$prog ] ; then fi # ensure that all the possible xen directories are on the XCP_PATH -export XCP_PATH=/usr/lib/xen/bin:/usr/lib/xen-4.2/bin:/usr/lib/xen-4.1/bin:/usr/lib/xen/boot:/usr/lib/xen-4.2/boot:/usr/lib/xen-4.1/boot +export XCP_PATH=/usr/lib/xen/bin:/usr/lib/xen-4.3/bin:/usr/lib/xen-4.2/bin:/usr/lib/xen-4.1/bin:/usr/lib/xen/boot:/usr/lib/xen-4.3/boot:/usr/lib/xen-4.2/boot:/usr/lib/xen-4.1/boot start() { [ -x $exec ] || exit 5 From f74b1fb6b47c3f000e2c80192d1e1811201f1761 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 15 May 2014 11:19:08 +0100 Subject: [PATCH 0835/1125] blktap: Add release to the version number in the changelog Signed-off-by: Euan Harris --- SPECS/blktap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index a3281523..4a1967e2 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -52,8 +52,8 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog -* Wed Mar 12 2014 Bob Ball - 0.9.0-2 - Change to upstream source repository From bb157a2ba139c081d0f1f93c1fd02fe62cfdfba0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 15 May 2014 14:45:25 +0100 Subject: [PATCH 0836/1125] blktap: Really fix changelog Signed-off-by: Euan Harris --- SPECS/blktap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 4a1967e2..9bef43c3 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -52,7 +52,7 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog -* Wed Mar 12 2014 Bob Ball - 0.9.1-1 - Update blktap to avoid Debian Jessie compile failure * Fri Jan 17 2014 Euan Harris - 0.9.0-2 From 8010598a55c75282da16ea20eb9fb90c33e325b9 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 30 Apr 2014 15:30:51 +0100 Subject: [PATCH 0837/1125] Fix paths for SM --- SOURCES/sm-path-fix.patch | 45 +++++++++++++++++++++++++++++++++++++++ SPECS/xcp-sm.spec | 10 ++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 SOURCES/sm-path-fix.patch diff --git a/SOURCES/sm-path-fix.patch b/SOURCES/sm-path-fix.patch new file mode 100644 index 00000000..117a0755 --- /dev/null +++ b/SOURCES/sm-path-fix.patch @@ -0,0 +1,45 @@ +diff -urN sm-0.9.6-orig/drivers/blktap2.py sm-0.9.6/drivers/blktap2.py +--- sm-0.9.6-orig/drivers/blktap2.py 2013-11-01 19:10:26.000000000 +0000 ++++ sm-0.9.6/drivers/blktap2.py 2014-04-30 14:44:08.496171595 +0000 +@@ -112,7 +112,7 @@ + class TapCtl(object): + """Tapdisk IPC utility calls.""" + +- PATH = "/usr/sbin/tap-ctl" ++ PATH = "@LIBDIR@/blktap/sbin/tap-ctl" + + def __init__(self, cmd, p): + self.cmd = cmd +diff -urN sm-0.9.6-orig/drivers/SR.py sm-0.9.6/drivers/SR.py +--- sm-0.9.6-orig/drivers/SR.py 2013-11-01 19:10:26.000000000 +0000 ++++ sm-0.9.6/drivers/SR.py 2014-04-30 14:43:49.056171573 +0000 +@@ -27,7 +27,7 @@ + + MOUNT_BASE = '/var/run/sr-mount' + DEFAULT_TAP = 'vhd' +-TAPDISK_UTIL = '/usr/sbin/td-util' ++TAPDISK_UTIL = '@LIBDIR@/blktap/sbin/td-util' + + # LUN per VDI key for XenCenter + LUNPERVDI = "LUNperVDI" +diff -urN sm-0.9.6-orig/drivers/vhdutil.py sm-0.9.6/drivers/vhdutil.py +--- sm-0.9.6-orig/drivers/vhdutil.py 2013-11-01 19:10:26.000000000 +0000 ++++ sm-0.9.6/drivers/vhdutil.py 2014-04-30 14:44:39.792171865 +0000 +@@ -28,7 +28,7 @@ + + MAX_VHD_JOURNAL_SIZE = 6 * 1024 * 1024 # 2MB VHD block size, max 2TB VHD size + MAX_CHAIN_SIZE = 30 # max VHD parent chain size +-VHD_UTIL = "/usr/bin/vhd-util" ++VHD_UTIL = "@LIBDIR@/blktap/bin/vhd-util" + OPT_LOG_ERR = "--debug" + VHD_BLOCK_SIZE = 2 * 1024 * 1024 + VHD_FOOTER_SIZE = 512 +@@ -324,7 +324,7 @@ + return vhdInfo + + def _getVHDParentNoCheck(path): +- cmd = ["vhd-util", "read", "-p", "-n", "%s" % path] ++ cmd = [VHD_UTIL, "read", "-p", "-n", "%s" % path] + text = util.pread(cmd) + util.SMlog(text) + for line in text.split('\n'): diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 15ea5170..f3ca673e 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,13 +3,14 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 -Release: 2%{?dist} +Release: 3%{?dist} Group: System/Hypervisor License: LGPL URL: https://github.com/xapi-project/sm Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz Source1: xcp-mpath-scsidev-rules Source2: xcp-mpath-scsidev-script +Patch0: sm-path-fix.patch BuildRequires: python-devel BuildRequires: swig BuildRequires: xen-devel @@ -22,10 +23,14 @@ This package contains storage backends used in XCP %prep %setup -q -n sm-%{version} +%patch0 -p1 cp %{SOURCE1} xcp-mpath-scsidev-rules cp %{SOURCE2} xcp-mpath-scsidev-script %build +sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/SR.py +sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/blktap2.py +sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/vhdutil.py DESTDIR=$RPM_BUILD_ROOT make %install @@ -263,6 +268,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Wed Apr 30 2014 Bob Ball - 0.9.6-3 +- Added fix for paths to blktap to use buildroot versions + * Tue Dec 10 2013 Euan Harris - 0.9.6-2 - Add dependency on xen-runtime From 1a118bc1f4ed1eb6b3a2f84a0671d79b6ff36b46 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 18:18:07 +0100 Subject: [PATCH 0838/1125] rpm/configure: Initialize repository metadata in SRPMS directory We now generate repository metadata after building SRPMs - this change silences a warning about missing metadata printed because the metadata does not exist and can't be updated after the first SRPM is built. Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 02314c40..aedde9bb 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -21,5 +21,6 @@ echo -n "Initializing repository..." mkdir -p RPMS createrepo --quiet RPMS mkdir -p SRPMS +createrepo --quiet SRPMS echo " done" From dfda7c72d06599cf3b7920e5c8a958f99a0f4aca Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 17:39:57 +0100 Subject: [PATCH 0839/1125] ocaml-react: Switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/ocaml-react.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index b96156fb..1389f781 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -3,7 +3,7 @@ Name: ocaml-react Version: 0.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) @@ -11,9 +11,10 @@ Group: Development/Libraries License: BSD URL: http://erratique.ch/software/react -Source0: http://erratique.ch/software/react/releases/react-%{version}.tbz +Source0: https://github.com/dbuenzli/react/archive/v%{version}/react-%{version}.tar.gz Source1: react-LICENSE +BuildRequires: oasis BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -47,6 +48,7 @@ developing applications that use %{name}. cp %{SOURCE1} LICENSE %build +oasis setup ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build @@ -65,6 +67,9 @@ ocaml setup.ml -install %changelog +* Mon May 19 2014 Euan Harris - 0.9.4-2 +- Switch to GitHub mirror + * Sat Jun 01 2013 David Scott - 0.9.4-1 - Update for 0.9.4 From b5bcaaae583ecebb75685c80c25c500c48416b19 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 17:42:32 +0100 Subject: [PATCH 0840/1125] ocaml-cmdliner: Switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/ocaml-cmdliner.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index c28c1c79..ca304878 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -1,11 +1,12 @@ Name: ocaml-cmdliner Version: 0.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 Group: Development/Other URL: http://erratique.ch/software/cmdliner -Source0: http://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz +Source0: https://github.com/dbuenzli/cmdliner/archive/v%{version}/cmdliner-%{version}.tar.gz +BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -32,6 +33,7 @@ developing applications that use %{name}. %setup -q -n cmdliner-%{version} %build +oasis setup ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build @@ -49,6 +51,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/cmdliner/* %changelog +* Mon May 19 2014 Euan Harris - 0.9.3-2 +- Switch to GitHub mirror + * Thu May 30 2013 David Scott - 0.9.3-1 - Initial package From 747a90343c538bcda3bd4d63380669406cc3e52b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 18:05:13 +0100 Subject: [PATCH 0841/1125] ocaml-uuidm: Switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/ocaml-uuidm.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index af12c686..7a670a44 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -2,12 +2,13 @@ Name: ocaml-uuidm Version: 0.9.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uuidm -Source0: http://erratique.ch/software/uuidm/releases/uuidm-%{version}.tbz +Source0: https://github.com/dbuenzli/uuidm/archive/v%{version}/uuidm-%{version}.tar.gz +BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -30,6 +31,7 @@ developing applications that use %{name}. %setup -q -n uuidm-%{version} %build +oasis setup ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build @@ -55,6 +57,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip %{_libdir}/ocaml/uuidm/META %changelog +* Mon May 19 2014 Euan Harris - 0.9.5-2 +- Switch to GitHub mirror + * Wed May 29 2013 David Scott - 0.9.5-1 - Initial package From d9d5928a8c38b238951a958fe126254fb421016d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 18:08:06 +0100 Subject: [PATCH 0842/1125] ocaml-uutf: Switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/ocaml-uutf.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 6c486402..69602185 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -1,11 +1,11 @@ Name: ocaml-uutf Version: 0.9.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/uutf -Source0: http://erratique.ch/software/uutf/releases/uutf-%{version}.tbz +Source0: https://github.com/dbuenzli/uutf/archive/v%{version}/uutf-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -60,6 +60,9 @@ mkdir -p %{buildroot}%{_libdir}/ocaml/uutf %changelog +* Mon May 19 2014 Euan Harris - 0.9.3-3 +- Switch to GitHub mirror + * Fri Oct 18 2013 David Scott - 0.9.3-2 - 'Ported' from xen-dist-ocaml to xenserver-core From e6fe4074510d7766298baaaeacbc5639f4841540 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 19 May 2014 18:10:28 +0100 Subject: [PATCH 0843/1125] xmlm: Switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/xmlm.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SPECS/xmlm.spec b/SPECS/xmlm.spec index 0f867c5d..0003a32b 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/xmlm.spec @@ -1,11 +1,12 @@ Name: xmlm Version: 1.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Streaming XML input/output for OCaml License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/xmlm -Source0: http://erratique.ch/software/%{name}/releases/%{name}-%{version}.tbz +Source0: https://github.com/dbuenzli/xmlm/archive/v%{version}/xmlm-%{version}.tar.gz +BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -32,6 +33,7 @@ developing applications that use %{name}. %setup -q %build +oasis setup ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build @@ -50,6 +52,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip %{_libdir}/ocaml/xmlm/* %changelog +* Mon May 19 2014 Euan Harris - 1.1.1-2 +- Switch to GitHub mirror + * Thu May 30 2013 David Scott - 1.1.1-1 - Initial package From 68b3c2e087d93047888bbcbe4bf00dad6cbfe9ac Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 20 May 2014 10:03:55 +0100 Subject: [PATCH 0844/1125] ocaml-opasswd: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-opasswd.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index e7e42fcb..f927dfd7 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -8,8 +8,10 @@ URL: http://github.com/xapi-project/ocaml-opasswd Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz Patch0: ocaml-opasswd-ocaml-4.00.1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml ocaml-findlib ocaml-ctypes-devel libffi-devel -Requires: ocaml ocaml-findlib +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ctypes-devel +BuildRequires: libffi-devel %description This is an OCaml binding to the glibc passwd file and shadow password @@ -21,8 +23,8 @@ nixes, but it has not been tested. Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} -Requires: ocaml-ctypes-devel -Requires: libffi +Requires: ocaml-ctypes-devel%{?_isa} +Requires: libffi%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for From ec878b2ff8329f4433ea969e8117b6a6c3d5681f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 May 2014 18:14:12 +0100 Subject: [PATCH 0845/1125] Debian: Move repository metadata generation into Makefile Debian package-building documents suggest that the chroot (pbuilder or cowbuilder) should contain a startup script which regenerates the package repository metadata. In our case, the D05deps script runs apt-ftparchive on the source and binary package directories. This approach has the advantage that the repository metadata is guaranteed to be up to date before the build starts. In contrast, when building RPMs we have to remember to call createrepo after building each package. However the disadvantage is that regenerating the package metadata is a side effect of building the package. This will make it more difficult to add a cache around Debian package building. For this reason, we will move the metadata regeneration step out of the chroot startup sequence and into the Makefile, mirroring the way we build RPMs. Signed-off-by: Euan Harris --- Makefile | 5 +++++ scripts/deb/templates/D05deps | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f0cdbe1c..574f14ff 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,17 @@ all: rpms %.dsc: @echo [MAKEDEB] $@ @scripts/deb/makedeb.py $< + @echo [APT-FTPARCHIVE] $@ + @cd ./SRPMS && apt-ftparchive sources . > Sources %.deb: @echo [COWBUILDER] $@ @sudo cowbuilder --build \ --configfile pbuilder/pbuilderrc \ --buildresult RPMS $< + @echo [APT-FTPARCHIVE] $@ + @cd ./RPMS && apt-ftparchive packages . > Packages + # Dependency build rules diff --git a/scripts/deb/templates/D05deps b/scripts/deb/templates/D05deps index 8be9d93f..1afc0701 100644 --- a/scripts/deb/templates/D05deps +++ b/scripts/deb/templates/D05deps @@ -1,7 +1,3 @@ #!/bin/sh -echo "I: Updating Packages file" -(cd @PWD@/RPMS; apt-ftparchive packages . > Packages) -echo "I: Updating Sources file" -(cd @PWD@/SRPMS; apt-ftparchive sources . > Sources) apt-get update From 9b9ac09ce756468cc5e258ddcfe05d902fc59ea6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 21 May 2014 18:42:09 +0100 Subject: [PATCH 0846/1125] scripts/deb/configure: Don't create sed backup files sed -ie means 'rewrite place using and keep a backup called e'. I think sed -i -e is probably what was meant. Signed-off-by: Euan Harris --- scripts/deb/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index 66d3a4ac..716e89e2 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -19,7 +19,7 @@ for file in scripts/deb/templates/*; do filename=`basename $file` cp $file pbuilder/${filename} for replace_var in "APT_REPOS" "PWD" "ARCH" "BASEPATH" "DIST" "MIRROR" ; do - sed -ie "s~@$replace_var@~${!replace_var}~g" pbuilder/${filename} + sed -i -e "s~@$replace_var@~${!replace_var}~g" pbuilder/${filename} done chmod 755 pbuilder/${filename} done From e42977ddd8e31c015c45c2472d0287eb799d5237 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 25 Apr 2014 18:47:30 +0100 Subject: [PATCH 0847/1125] Makefile: Enable concurrent RPM builds Two problems prevent us from building RPMs concurrently: * By default, mock can only run one instance of a given chroot environment at a time. This is easily fixed by using the --uniqueext option to name instances uniquely. * Createrepo needs to update the repository database files in SRPMS and RPMS after each package is built. It's not clear whether it's safe to run two instances of createrepo against the same database concurrently. To prevent this, we wrap the call to createrepo with flock. Copying build products back to the RPMS and SRPMS directories concurrently should be safe because each job builds a different package with a different filename. An exception to this is the build log file, which is common to all jobs. We should switch to separate logging for each package. Signed-off-by: Euan Harris --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 574f14ff..ac323266 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,13 @@ all: rpms @echo [RPMBUILD] $@ @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< @echo [CREATEREPO] $@ - @createrepo --quiet --update ./SRPMS + @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS %.rpm: @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --rebuild $< + @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< @echo [CREATEREPO] $@ - @createrepo --quiet --update ./RPMS + @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS # Deb build rules From bc92dd8c8556d3490e2a0c885a77de314364bdde Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 28 Apr 2014 15:51:38 +0100 Subject: [PATCH 0848/1125] pbuilder: Enable concurrent Deb builds Unlike mock, multiple instances of pbuilder or cowbuilder seem to be able to coexist peacefully. The main point of contention in a concurrent Debian build comes when updating the repository metadata file, which also occurs in the RPM build. The solution for Debian is slightly more complicated because of the way the Debian repository metadata tools work. apt-ftparchive writes the new metadata to standard output, which is then redirected to the appropriate file. This causes problems for concurrent builds because the script takes time to print the new metadata, but the executing shell truncates the old metadata file immediately. This means there is a short period of time during which the metadata file is empty, and if a concurrently-running build tries to run apt during that period it will fail. To avoid this problem, we add a wrapper script which writes the new metadata file to a temporary file, then moves that into the correct place. The wrapper script is run under flock, which prevents concurrent update runs from interfering with each other. Signed-off-by: Euan Harris --- Makefile | 12 +++++++----- scripts/deb/updaterepo | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100755 scripts/deb/updaterepo diff --git a/Makefile b/Makefile index ac323266..0f4b5b5c 100644 --- a/Makefile +++ b/Makefile @@ -25,17 +25,18 @@ all: rpms %.dsc: @echo [MAKEDEB] $@ @scripts/deb/makedeb.py $< - @echo [APT-FTPARCHIVE] $@ - @cd ./SRPMS && apt-ftparchive sources . > Sources + @echo [UPDATEREPO] $@ + @flock --timeout 30 ./SRPMS scripts/deb/updaterepo sources SRPMS %.deb: @echo [COWBUILDER] $@ + @mkdir -p logs + @touch RPMS/Packages @sudo cowbuilder --build \ --configfile pbuilder/pbuilderrc \ --buildresult RPMS $< - @echo [APT-FTPARCHIVE] $@ - @cd ./RPMS && apt-ftparchive packages . > Packages - + @echo [UPDATEREPO] $@ + @flock --timeout 30 ./RPMS scripts/deb/updaterepo packages RPMS # Dependency build rules @@ -45,3 +46,4 @@ deps: SPECS/*.spec specdep.py scripts/lib/mappkgname.py @./specdep.py -d $(DIST) -i libnl3 SPECS/*.spec > $@ -include deps + diff --git a/scripts/deb/updaterepo b/scripts/deb/updaterepo new file mode 100755 index 00000000..2e4b8173 --- /dev/null +++ b/scripts/deb/updaterepo @@ -0,0 +1,32 @@ +#!/bin/bash + +# Update the Debian repository metadata files. +# apt-ftparchive writes the new metadata to standard +# output, which is then redirected to the appropriate +# file. This causes problems for concurrent builds +# because the script takes time to print the new +# metadata, but the executing shell truncates the +# old metadata file immediately. This means there +# is a short period of time during which the metadata +# file is empty, and if a concurrently-running build +# tries to run apt during that period it will fail. +# +# To avoid this problem, we write the new metadata +# file to a temporary file, then move that into the +# correct place. +# +# Usage: updaterepo + +cd $2 +PID=$BASHPID + +case $1 in +sources) + apt-ftparchive sources . > Sources.$PID + mv Sources.$PID Sources + ;; +packages) + apt-ftparchive packages . > Packages.$PID + mv Packages.$PID Packages + ;; +esac From 6b5a03deb8b669a838ed5a3d918aaa65d427d017 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Thu, 22 May 2014 22:08:40 -0500 Subject: [PATCH 0849/1125] Bumping up openstack-xapi-plugins to Icehouse release --- SPECS/openstack-xapi-plugins.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index bf0645f5..e8a5ce80 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -1,11 +1,11 @@ Name: openstack-xapi-plugins -Version: 2013.2 +Version: 2014.1 Release: 1%{?dist} Summary: XenAPI plugins from OpenStack License: ASL 2.0 Group: System/Hypervisor -URL: https://launchpad.net/nova/havana -Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz +URL: https://launchpad.net/nova/icehouse +Source0: https://launchpad.net/nova/icehouse/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools @@ -29,6 +29,9 @@ cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/pl /usr/lib/xapi/plugins/* %changelog +* Thu May 22 2014 Antony Messerli - 2014.1-1 +- Update to Icehouse release + * Wed Nov 20 2013 Euan Harris - 2013.2-1 - Update to Havana release From 65a7d8fc8fce573d5d5696faa49d8423a2fd498a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 23 May 2014 13:45:33 +0100 Subject: [PATCH 0850/1125] ocaml-rpc: Update to 1.5.1, remove js-of-ocaml dependency Signed-off-by: Euan Harris --- SPECS/js_of_ocaml.spec | 59 ------------------------------------------ SPECS/ocaml-rpc.spec | 16 +++++++----- 2 files changed, 10 insertions(+), 65 deletions(-) delete mode 100644 SPECS/js_of_ocaml.spec diff --git a/SPECS/js_of_ocaml.spec b/SPECS/js_of_ocaml.spec deleted file mode 100644 index ab73e39b..00000000 --- a/SPECS/js_of_ocaml.spec +++ /dev/null @@ -1,59 +0,0 @@ -%define debug_package %{nil} - -Name: js_of_ocaml -Version: 1.3.2 -Release: 1%{?dist} -Summary: Compile OCaml programs to javascript -License: LGPL and others -Group: Development/Other -URL: http://ocsigen.org/download/js_of_ocaml-1.3.2.tar.gz -Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRequires: deriving-ocsigen-devel -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ocamldoc - -%description -Compile OCaml programs to Javascript. - -%package devel -Summary: Development files for %{name} -Group: Development/Other -Requires: %{name} = %{version}-%{release} -Requires: ocaml-lwt-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -mkdir -p %{buildroot}/%{_bindir} -make install BINDIR=%{buildroot}/%{_bindir}/ - - -%files -# This space intentionally left blank - -%files devel -%doc LICENSE README CHANGES -%{_libdir}/ocaml/js_of_ocaml/* -%{_libdir}/ocaml/stublibs/dlljs_of_ocaml.so -%{_libdir}/ocaml/stublibs/dlljs_of_ocaml.so.owner -%{_bindir}/js_of_ocaml - -%changelog -* Sun Jun 2 2013 David Scott - 1.3.2-1 -- Initial package - diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index a27f178e..d7de0534 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -1,17 +1,17 @@ %global debug_package %{nil} Name: ocaml-rpc -Version: 1.4.1 +Version: 1.5.1 Release: 1%{?dist} Summary: An RPC library for OCaml License: LGPL Group: Development/Libraries URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: js_of_ocaml-devel BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib +BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-type-conv BuildRequires: xmlm-devel @@ -24,6 +24,7 @@ Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-camlp4-devel%{?_isa} Requires: ocaml-type-conv%{?_isa} +Requires: ocaml-lwt%{?_isa} Requires: xmlm-devel%{?_isa} %description devel @@ -42,15 +43,18 @@ export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} - %files -# This space intentionally left blank +%doc README.md +%{_libdir}/ocaml/rpclib +%exclude %{_libdir}/ocaml/rpclib/*.cmx %files devel -%doc README.md -%{_libdir}/ocaml/rpclib/* +%{_libdir}/ocaml/rpclib/*.cmx %changelog +* Fri May 23 2014 Euan Harris - 1.5.1-1 +- Update to 1.5.1, removing dependency on js-of-ocaml + * Thu May 30 2013 David Scott - 1.4.1-1 - Initial package From 913d944eb703ee9d554057a8579f11da284eafad Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Thu, 22 May 2014 13:44:23 +0100 Subject: [PATCH 0851/1125] Configure for current environment by default --- scripts/deb/configure.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index 716e89e2..9c17b1b7 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -4,10 +4,17 @@ set -eu echo "Configuring DEB-based build" ARCH=${ARCH:-amd64} -DIST=${DIST:-raring} +DIST=${DIST:-`lsb_release -sc`} BASEPATH=/var/cache/pbuilder/base.cow -MIRROR=${MIRROR:-http://gb.archive.ubuntu.com/ubuntu/} -APT_REPOS=${APT_REPOS:-|deb $MIRROR $DIST universe |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu $DIST main} +APT_REPOS=${APT_REPOS:-} +DEFAULT_MIRROR=$(grep "^deb .*$DIST .*main" /etc/apt/sources.list | cut -d' ' -f 2 | head -n1) +MIRROR=${MIRROR:-$DEFAULT_MIRROR} +if [ `lsb_release -si` == "Ubuntu" ] ; then + APT_REPOS="$APT_REPOS |deb $MIRROR $DIST universe" + if [ "$DIST" == "raring" ] ; then + APT_REPOS="$APT_REPOS |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu $DIST main" + fi +fi dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common From 7b0276976fdd87136f7d8bb2b290bf3103fb5309 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 May 2014 12:55:11 +0000 Subject: [PATCH 0852/1125] ocaml-libvirt: bump the release number to prefer our package Note the backports in the patchqueue are all from master, so the next upstream release should include them. Signed-off-by: David Scott --- SPECS/ocaml-libvirt.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index dd137c5b..884dcc70 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -6,7 +6,7 @@ Name: ocaml-libvirt Version: 0.6.1.2 -Release: 1%{?dist}%{?extra_release} +Release: 100%{?dist}%{?extra_release} Summary: OCaml binding for libvirt Group: Development/Libraries @@ -139,6 +139,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh %changelog +* Tue May 13 2014 David Scott - 0.6.1.2-100 +- Bump release number to 100 to override upstream. Next release will + have our patches applied. + * Fri Mar 23 2012 Richard W.M. Jones - 0.6.1.2-1 - New upstream version 0.6.1.2. From d6d37eacd48b7c66b688d06759aad893c86459b5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 15:15:04 +0000 Subject: [PATCH 0853/1125] Update xapi to 1.9.49 (memory fix) Signed-off-by: David Scott --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index fec5e9c8..24e01f0e 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.47 +Version: 1.9.49 Release: 1%{?dist} Group: System/Hypervisor License: LGPL+linking exception @@ -164,6 +164,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri May 23 2014 David Scott - 1.9.49-1 +- update to 1.9.49 + * Tue May 13 2014 David Scott - 1.9.47-1 - update to 1.9.47 From b1dea477e438e565a7353a61853a09ba1ae2bb63 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 19:03:09 +0000 Subject: [PATCH 0854/1125] Add ocaml-evtchn.1.0.1 Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 SPECS/ocaml-evtchn.spec diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec new file mode 100644 index 00000000..c56ddf39 --- /dev/null +++ b/SPECS/ocaml-evtchn.spec @@ -0,0 +1,67 @@ +%define debug_package %{nil} + +Name: ocaml-evtchn +Version: 1.0.1 +Release: 1%{?dist} +Summary: OCaml bindings for userspace Xen event channel controls +License: ISC +URL: https://github.com/xapi-project/ocaml-evtchn/ +Source0: https://github.com/xapi-project/ocaml-evtchn/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: xen-devel +Requires: ocaml +Requires: ocaml-findlib + +%description +These APIs allow programs running in userspace to signal other domains +on the same host. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel +Requires: xen-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +ocaml setup.ml -install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/xen-evtchn +%exclude %{_libdir}/ocaml/xen-evtchn/*.a +%exclude %{_libdir}/ocaml/xen-evtchn/*.cmxa +%exclude %{_libdir}/ocaml/xen-evtchn/*.cmx +%exclude %{_libdir}/ocaml/xen-evtchn/*.ml +%exclude %{_libdir}/ocaml/xen-evtchn/*.mli + +%files devel +%{_libdir}/ocaml/xen-evtchn/*.a +%{_libdir}/ocaml/xen-evtchn/*.cmx +%{_libdir}/ocaml/xen-evtchn/*.cmxa +%{_libdir}/ocaml/xen-evtchn/*.mli + +%changelog +* Tue Jun 02 2014 David Scott - 1.0.1-1 +- Initial package From 7e5b9bf24132604051dab8cca51a7690ecf1bea8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 20:29:14 +0000 Subject: [PATCH 0855/1125] Remove Requires: lines which will be inferred Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index c56ddf39..8aec53ce 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -16,8 +16,6 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: xen-devel -Requires: ocaml -Requires: ocaml-findlib %description These APIs allow programs running in userspace to signal other domains From b13059d37bfacf3254cccf47e8c5b6c92cdce273 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 20:31:02 +0000 Subject: [PATCH 0856/1125] Add %{?_isa} to the end of Requires: I excluded the %{name} = %{version}-%{release} line since no other package had it. Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index 8aec53ce..edcc811f 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -24,8 +24,8 @@ on the same host. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel -Requires: xen-devel +Requires: ocaml-io-page-devel%{?_isa} +Requires: xen-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for From d3619b67d19b5bb48b45a143ffecaf7366d4121e Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 20:59:53 +0000 Subject: [PATCH 0857/1125] Remove unnecessary rm -rf %{buildroot} Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index edcc811f..5ab1e1e5 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -38,7 +38,6 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf From be1e75dfebd2dd68b59c8b799ac16914557ca7cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 21:02:19 +0000 Subject: [PATCH 0858/1125] Add mkdir -p %{OCAMLFIND_DESTDIR} Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index 5ab1e1e5..bfdb3028 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -38,8 +38,8 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install From 7ad950a7909a93c8068a1dc00cbdf98bf8fe26cf Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 21:04:14 +0000 Subject: [PATCH 0859/1125] Replace ocaml setup.ml -install with 'make install' Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index bfdb3028..606bb803 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -41,7 +41,7 @@ make export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p ${OCAMLFIND_DESTDIR} export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install +make install %files %doc CHANGES From eb8a28cbd18a14fb6cfa7175d994d522a31dbe21 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 23 May 2014 21:16:22 +0000 Subject: [PATCH 0860/1125] Add shared-memory-ring.1.0.0 Signed-off-by: David Scott --- SPECS/ocaml-shared-memory-ring.spec | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 SPECS/ocaml-shared-memory-ring.spec diff --git a/SPECS/ocaml-shared-memory-ring.spec b/SPECS/ocaml-shared-memory-ring.spec new file mode 100644 index 00000000..ed1e5cec --- /dev/null +++ b/SPECS/ocaml-shared-memory-ring.spec @@ -0,0 +1,62 @@ +%define debug_package %{nil} + +Name: ocaml-shared-memory-ring +Version: 1.0.0 +Release: 1%{?dist} +Summary: OCaml implementation of Xen memory protocols +License: ISC +URL: https://github.com/mirage/shared-memory-ring/ +Source0: https://github.com/mirage/shared-memory-ring/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ounit-devel + +%description +This is a pure OCaml implementation of Xen-style shared memory rings. +These can be used for RPCs (disk requests, network packets) and for streaming +(xenstore, consoles) + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n shared-memory-ring-%{version} + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/shared-memory-ring +%exclude %{_libdir}/ocaml/shared-memory-ring/*.a +%exclude %{_libdir}/ocaml/shared-memory-ring/*.cmxa +%exclude %{_libdir}/ocaml/shared-memory-ring/*.cmx +%exclude %{_libdir}/ocaml/shared-memory-ring/*.mli + +%files devel +%{_libdir}/ocaml/shared-memory-ring/*.a +%{_libdir}/ocaml/shared-memory-ring/*.cmx +%{_libdir}/ocaml/shared-memory-ring/*.cmxa +%{_libdir}/ocaml/shared-memory-ring/*.mli + +%changelog +* Wed Jun 04 2014 David Scott - 1.0.0-1 +- Initial package From 8a5278903a557752df00746dd6a7007f2d9eb636 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 5 Jun 2014 21:37:10 +0100 Subject: [PATCH 0861/1125] Upgrade to cohttp-0.11.2 and stdext-0.11.0 This has plenty of fallout across a lot of packages! Signed-off-by: Jon Ludlam --- SPECS/forkexecd.spec | 5 +- SPECS/message-switch.spec | 7 ++- SPECS/ocaml-cohttp.spec | 33 +++++++++++-- SPECS/ocaml-conduit.spec | 57 ++++++++++++++++++++++ SPECS/ocaml-fieldslib.spec | 55 +++++++++++++++++++++ SPECS/ocaml-netdev.spec | 11 +++-- SPECS/ocaml-stdext.spec | 9 ++-- SPECS/ocaml-stringext.spec | 56 +++++++++++++++++++++ SPECS/ocaml-tapctl.spec | 9 ++-- SPECS/ocaml-uri.spec | 15 ++++-- SPECS/ocaml-xcp-idl.spec | 9 ++-- SPECS/ocaml-xcp-inventory.spec | 9 ++-- SPECS/ocaml-xen-api-client.spec | 8 ++- SPECS/ocaml-xen-api-libs-transitional.spec | 9 ++-- SPECS/ocaml-xenops.spec | 9 ++-- SPECS/squeezed.spec | 2 +- SPECS/vhd-tool.spec | 2 +- SPECS/xapi.spec | 4 +- SPECS/xcp-networkd.spec | 13 +++-- SPECS/xcp-rrdd.spec | 31 +++++++++++- SPECS/xe-create-templates.spec | 4 +- SPECS/xenopsd.spec | 5 +- 22 files changed, 312 insertions(+), 50 deletions(-) create mode 100644 SPECS/ocaml-conduit.spec create mode 100644 SPECS/ocaml-fieldslib.spec create mode 100644 SPECS/ocaml-stringext.spec diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index 9bc0a8a7..60f87abb 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -1,5 +1,5 @@ Name: forkexecd -Version: 0.9.1 +Version: 0.9.2 Release: 1%{?dist} Summary: A subprocess management service License: LGPL @@ -74,6 +74,9 @@ developing applications that use %{name}. %{_libdir}/ocaml/forkexec/* %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.9.2-1 +- Update to 0.9.2 + * Wed Sep 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index bc153666..d2bf0776 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,10 +1,10 @@ Name: message-switch -Version: 0.10.1 +Version: 0.10.2 Release: 1%{?dist} Summary: A store and forward message switch License: FreeBSD URL: https://github.com/xapi-project/message-switch -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -73,6 +73,9 @@ developing applications that use %{name}. %{_libdir}/ocaml/message_switch/* %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.10.2-1 +- Update to 0.10.2 + * Fri Oct 18 2013 David Scott - 0.10.1-1 - Update to 0.10.1 which is more tolerant of startup orderings diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 50180c64..2306d919 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-cohttp -Version: 0.9.8 -Release: 2%{?dist} +Version: 0.11.2 +Release: 1%{?dist} Summary: An HTTP library for OCaml License: LGPL URL: https://github.com/mirage/ocaml-cohttp -Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -16,6 +16,10 @@ BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-uri-devel +BuildRequires: ocaml-stringext-devel +BuildRequires: ocaml-conduit-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-sexplib-devel %description An HTTP library for OCaml. @@ -27,21 +31,34 @@ Requires: ocaml-lwt-devel%{?_isa} Requires: ocaml-re-devel%{?_isa} Requires: ocaml-ssl-devel%{?_isa} Requires: ocaml-uri-devel%{?_isa} +Requires: ocaml-stringext-devel%{?_isa} +Requires: ocaml-conduit-devel%{?_isa} +Requires: ocaml-fieldslib-devel%{?_isa} +Requires: ocaml-sexplib-devel%{?_isa} + +%package bin +Summary: Example binaries for %{name} + +%description bin +The %{name}-bin package contains the compiled example files +for %{name}. %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build +# Dirty hack +export PREFIX=%{buildroot}/usr make build %install export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install +make install %files %doc CHANGES @@ -59,7 +76,13 @@ ocaml setup.ml -install %{_libdir}/ocaml/cohttp/*.cmxa %{_libdir}/ocaml/cohttp/*.mli +%files bin +/usr/bin/cohttp-server-lwt + %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.11.2-1 +- Update to 0.11.2 + * Fri May 30 2014 Euan Harris - 0.9.8-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-conduit.spec b/SPECS/ocaml-conduit.spec new file mode 100644 index 00000000..dfbc89be --- /dev/null +++ b/SPECS/ocaml-conduit.spec @@ -0,0 +1,57 @@ +Name: ocaml-conduit +Version: 0.5.0 +Release: 1%{?dist} +Summary: OCaml network conduit library +License: Unknown +Group: Development/Libraries +URL: http://github.com/mirage/ocaml-conduit +Source0: https://github.com/mirage/ocaml-conduit/archive/v%{version}/ocaml-conduit-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-lwt-devel + +%description +The conduit library takes care of establishing and listening for TCP and SSL/TLS connections for the Lwt and Async libraries. + +The reason this library exists is to provide a degree of abstraction from the precise SSL library used, since there are a variety of ways to bind to a library (e.g. the C FFI, or the Ctypes library), as well as well as which library is used (just OpenSSL for now). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n ocaml-conduit-%{version} + + +%build +make all + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/conduit +%exclude %{_libdir}/ocaml/conduit/*.a +%exclude %{_libdir}/ocaml/conduit/*.cmxa +%exclude %{_libdir}/ocaml/conduit/*.cmx + + +%files devel +%{_libdir}/ocaml/conduit/*.a +%{_libdir}/ocaml/conduit/*.cmx +%{_libdir}/ocaml/conduit/*.cmxa + +%changelog +* Fri May 2 2014 Jon Ludlam - 0.5.0-1 +- Initial package + diff --git a/SPECS/ocaml-fieldslib.spec b/SPECS/ocaml-fieldslib.spec new file mode 100644 index 00000000..2ab4177d --- /dev/null +++ b/SPECS/ocaml-fieldslib.spec @@ -0,0 +1,55 @@ +%global debug_package %{nil} + +Name: ocaml-fieldslib +Version: 109.20.00 +Release: 1%{?dist} +Summary: OCaml record fields as first class values + +Group: Development/Libraries +License: LGPLv2+ with exceptions and BSD +URL: https://ocaml.janestreet.com +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/fieldslib-%{version}.tar.gz + +BuildRequires: ocaml >= 4.00.0 +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv + +%description +OCaml record fields as first class values + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: ocaml-camlp4-devel%{?_isa} +Requires: ocaml-type-conv%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n fieldslib-%{version} + +%build +make + +%install +export DESTDIR=%{buildroot} +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +#This space intentionally left blank + +%files devel +%doc COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE.txt THIRD-PARTY.txt +%{_libdir}/ocaml/fieldslib + +%changelog +* Tue May 6 2014 Jon Ludlam - 109.20.00-1 +- Initial package + diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index b97676ba..d56febd9 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-netdev -Version: 0.9.0 -Release: 2%{?dist} +Version: 0.9.1 +Release: 1%{?dist} Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL URL: https://github.com/xapi-project/netdev -Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz +Source0: https://github.com/xapi-project/netdev/archive/v%{version}/netdev-%{version}.tar.gz BuildRequires: forkexecd-devel BuildRequires: ocaml BuildRequires: ocaml-findlib @@ -26,7 +26,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n netdev-netdev-%{version} +%setup -q -n netdev-%{version} %build ./configure @@ -59,6 +59,9 @@ make install %{_libdir}/ocaml/netdev/*.mli %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.9.1-1 +- Update to 0.9.1 + * Fri May 30 2014 Euan Harris - 0.9.0-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index e66d991a..105ec4af 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-stdext -Version: 0.10.0 -Release: 2%{?dist} +Version: 0.11.0 +Release: 1%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL URL: https://github.com/xapi-project/stdext -Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-fd-send-recv-devel BuildRequires: ocaml-findlib @@ -55,6 +55,9 @@ make install DESTDIR=${buildroot} %{_libdir}/ocaml/stdext/*.mli %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.11.0-1 +- Update to 0.11.0 + * Fri May 30 2014 Euan Harris - 0.10.0-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-stringext.spec b/SPECS/ocaml-stringext.spec new file mode 100644 index 00000000..34872a39 --- /dev/null +++ b/SPECS/ocaml-stringext.spec @@ -0,0 +1,56 @@ +Name: ocaml-stringext +Version: 0.0.1 +Release: 1%{?dist} +Summary: String manipulation functions +License: Unknown +Group: Development/Libraries +URL: http://github.com/rgrinberg/stringext +Source0: https://github.com/rgrinberg/stringext/archive/v%{version}/stringext-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib + +%description +Extra string functions for OCaml + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n stringext-%{version} + + +%build +ocaml setup.ml -configure +ocaml setup.ml -build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +ocaml setup.ml -install + +%files +%{_libdir}/ocaml/stringext +%exclude %{_libdir}/ocaml/stringext/*.a +%exclude %{_libdir}/ocaml/stringext/*.cmxa +%exclude %{_libdir}/ocaml/stringext/*.cmx +%exclude %{_libdir}/ocaml/stringext/*.mli + + +%files devel +%{_libdir}/ocaml/stringext/*.a +%{_libdir}/ocaml/stringext/*.cmx +%{_libdir}/ocaml/stringext/*.cmxa +%{_libdir}/ocaml/stringext/*.mli + +%changelog +* Fri May 2 2014 Jon Ludlam - 0.0.1-1 +- Initial package + diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index dfee7061..521a32cb 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-tapctl -Version: 0.9.1 -Release: 2%{?dist} +Version: 0.9.2 +Release: 1%{?dist} Summary: Manipulate running tapdisk instances License: LGPL URL: https://github.com/xapi-project/tapctl -Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/tapctl/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -59,6 +59,9 @@ make install %{_libdir}/ocaml/tapctl/*.mli %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.9.2-1 +- Update to 0.9.2 + * Fri May 30 2014 Euan Harris - 0.9.1-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index a5263c8d..be0ef32f 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -1,18 +1,20 @@ %global debug_package %{nil} Name: ocaml-uri -Version: 1.3.8 -Release: 2%{?dist} +Version: 1.6.0 +Release: 1%{?dist} Summary: A URI library for OCaml License: ISC URL: https://github.com/mirage/ocaml-uri -Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml >= 4.00 BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-re-devel +BuildRequires: ocaml-stringext-devel +BuildRequires: ocaml-sexplib-devel %description A URI library for OCaml. @@ -21,13 +23,15 @@ A URI library for OCaml. Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-re-devel%{?_isa} +Requires: ocaml-stringext-devel%{?_isa} +Requires: ocaml-sexplib-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml @@ -57,6 +61,9 @@ make install %{_libdir}/ocaml/uri/*.mli %changelog +* Fri Jun 06 2014 Jon Ludlam - 1.6.0-1 +- Update to 1.6.0 + * Mon Jun 02 2014 David Scott - 1.3.8-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 24a5fecd..c88c6c1c 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.16 -Release: 2%{?dist} +Version: 0.9.17 +Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL URL: https://github.com/xapi-project/xcp-idl -Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-idl/archive/v%{version}/xcp-idl-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -69,6 +69,9 @@ make install %{_libdir}/ocaml/xcp/*.mli %changelog +* Fri Jun 06 2014 Jon Ludlam - 0.9.17-1 +- Update to 0.9.17 + * Mon Jun 02 2014 Euan Harris - 0.9.16-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 5c7f093b..9d2fc8d7 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-xcp-inventory -Version: 0.9.0 +Version: 0.9.1 Release: 1%{?dist} Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/xcp-inventory -Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-inventory/archive/v%{version}/xcp-inventory-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-findlib-devel @@ -28,7 +28,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n xcp-inventory-xcp-inventory-%{version} +%setup -q -n xcp-inventory-%{version} %build if [ -x ./configure ]; then @@ -53,6 +53,9 @@ mkdir -p %{buildroot}/etc/xcp %{_libdir}/ocaml/xcp-inventory/* %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.9.1-1 +- Update to 0.9.1 + * Wed Jun 5 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index a3a4f98e..35c26c7f 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ocaml-xen-api-client -Version: 0.9.4 -Release: 2%{?dist} +Version: 0.9.6 +Release: 1%{?dist} Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 URL: https://github.com/xapi-project/xen-api-client @@ -16,6 +16,7 @@ BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-uri-devel BuildRequires: ocaml-xmlm-devel +BuildRequires: ocaml-cstruct-devel %description XenAPI Client is an OCaml library implementing XenServer's XenAPI. @@ -67,6 +68,9 @@ make install %{_libdir}/ocaml/xen-api-client/*.mli %changelog +* Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 +- Update to 0.9.6 + * Mon Jun 2 2014 Euan Harris - 0.9.4-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 2013cbf2..201742d8 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-xen-api-libs-transitional -Version: 0.9.3 -Release: 2%{?dist} +Version: 0.9.6 +Release: 1%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/xen-api-libs-transitional -Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: forkexecd-devel BuildRequires: ocaml BuildRequires: ocaml-findlib @@ -187,6 +187,9 @@ make install DESTDIR=$OCAMLFIND_DESTDIR %{_libdir}/ocaml/xml-light2/*.mli %changelog +* Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 +- Update to 0.9.6 release + * Mon Jun 2 2014 Euan Harris - 0.9.3-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 86c70fea..1cd8f586 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-xenops -Version: 0.9.4 -Release: 2%{?dist} +Version: 0.9.6 +Release: 1%{?dist} Summary: Low-level xen control operations OCaml License: LGPL URL: https://github.com/xapi-project/xenops -Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/xenops/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -73,6 +73,9 @@ make install BINDIR=%{buildroot}/%{_bindir} %{_bindir}/list_domains %changelog +* Fri Jun 6 2014 Jon Ludlam - 0.9.6-1 +- Update to 0.9.6 + * Mon Jun 2 2014 Euan Harris - 0.9.4-2 - Split files correctly between base and devel packages diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 463aec2a..60d7055c 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,5 +1,5 @@ Name: squeezed -Version: 0.10.5 +Version: 0.10.6 Release: 1%{?dist} Summary: Memory ballooning daemon for the xapi toolstack License: LGPL diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index edc46efd..7ccb965a 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -2,7 +2,7 @@ Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool -Version: 0.7.4 +Version: 0.7.5 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xapi-project/vhd-tool diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index a8324bef..e2774b81 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,11 +2,11 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.49 +Version: 1.9.50 Release: 1%{?dist} License: LGPL+linking exception URL: http://www.xen.org -Source0: https://github.com/xapi-project/xen-api/archive/%{version}/xen-api-%{version}.tar.gz +Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz Source1: xen-api-xapi-conf.in Source2: xen-api-init Source3: xen-api-xapissl diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 9ed5b76c..f0f7819a 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,10 +1,10 @@ Name: xcp-networkd -Version: 0.9.3 +Version: 0.9.4 Release: 1%{?dist} Summary: Simple host network management service for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/xcp-networkd -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init Source2: xcp-networkd-conf Source3: xcp-networkd-network-conf @@ -38,7 +38,8 @@ make %install mkdir -p %{buildroot}/%{_sbindir} -install dist/build/xcp-networkd/xcp-networkd %{buildroot}/%{_sbindir}/xcp-networkd +mkdir -p %{buildroot}/%{_bindir} +make install DESTDIR=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd mkdir -p %{buildroot}/etc/xcp @@ -47,10 +48,10 @@ install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf mkdir -p %{buildroot}/etc/modprobe.d install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf - %files %doc README.markdown LICENSE MAINTAINERS %{_sbindir}/xcp-networkd +%{_bindir}/networkd_db %{_sysconfdir}/init.d/xcp-networkd /etc/modprobe.d/bridge.conf %config(noreplace) /etc/xcp/network.conf @@ -66,6 +67,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Jun 4 2014 Jon Ludlam - 0.9.4-1 +- Update to 0.9.4 +- Add networkd_db CLI + * Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 0c1b0093..08bc4433 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,10 +1,10 @@ Name: xcp-rrdd -Version: 0.9.5 +Version: 0.9.7 Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/xcp-rrdd -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -25,6 +25,16 @@ Requires: redhat-lsb-core %description Statistics gathering daemon for the xapi toolstack. +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-xcp-idl-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + %prep %setup -q cp %{SOURCE1} xcp-rrdd-init @@ -34,6 +44,8 @@ make %install mkdir -p %{buildroot}/%{_sbindir} +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd @@ -43,6 +55,17 @@ install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd %doc README.markdown LICENSE %{_sbindir}/xcp-rrdd %{_sysconfdir}/init.d/xcp-rrdd +%{_libdir}/ocaml/rrdd-libs +%exclude %{_libdir}/ocaml/rrdd-libs/*.a +%exclude %{_libdir}/ocaml/rrdd-libs/*.cmx +%exclude %{_libdir}/ocaml/rrdd-libs/*.cmxa +%exclude %{_libdir}/ocaml/rrdd-libs/*.mli + +%files devel +%{_libdir}/ocaml/rrdd-libs/*.a +%{_libdir}/ocaml/rrdd-libs/*.cmx +%{_libdir}/ocaml/rrdd-libs/*.cmxa +%{_libdir}/ocaml/rrdd-libs/*.mli %post /sbin/chkconfig --add xcp-rrdd @@ -54,6 +77,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Jun 4 2014 Jon Ludlam - 0.9.7-1 +- Update to 0.9.7 +- Create new subpackage for the devel libraries now installed + * Fri May 9 2014 David Scott - 0.9.5-1 - Update to 0.9.5, now will start without xen diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index dc0fce50..6a62bba4 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -1,10 +1,10 @@ Name: xe-create-templates -Version: 0.9.2 +Version: 0.9.3 Release: 1%{?dist} Summary: Creates default XenServer templates License: LGPL URL: https://github.com/xapi-project/xcp-guest-templates -Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/xcp-guest-templates/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index de57b8c0..224e80a6 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,10 +1,10 @@ Name: xenopsd -Version: 0.9.34 +Version: 0.9.37 Release: 1%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init Source2: xenopsd-simulator-init Source3: xenopsd-libvirt-init @@ -30,6 +30,7 @@ BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: xen-devel BuildRequires: ocaml-uutf-devel +BuildRequires: ocaml-xcp-rrd-devel Requires: message-switch Requires: redhat-lsb-core Requires: xenops-cli From c89b522a3d92aad08f23da66addaa54b930b37e0 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 6 Jun 2014 13:41:59 +0100 Subject: [PATCH 0862/1125] Fix issues noted by Euan Harris on PR#465 Signed-off-by: Jon Ludlam --- SPECS/ocaml-cohttp.spec | 4 ++-- SPECS/ocaml-conduit.spec | 4 ++-- SPECS/ocaml-fieldslib.spec | 18 +++++++++++++++--- SPECS/ocaml-stdext.spec | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 2306d919..0cb8e075 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -52,7 +52,7 @@ developing applications that use %{name}. %build # Dirty hack -export PREFIX=%{buildroot}/usr +export PREFIX=%{buildroot}%{_prefix} make build %install @@ -77,7 +77,7 @@ make install %{_libdir}/ocaml/cohttp/*.mli %files bin -/usr/bin/cohttp-server-lwt +%{_prefix}/bin/cohttp-server-lwt %changelog * Fri Jun 6 2014 Jon Ludlam - 0.11.2-1 diff --git a/SPECS/ocaml-conduit.spec b/SPECS/ocaml-conduit.spec index dfbc89be..ab780fa0 100644 --- a/SPECS/ocaml-conduit.spec +++ b/SPECS/ocaml-conduit.spec @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: OCaml network conduit library License: Unknown Group: Development/Libraries -URL: http://github.com/mirage/ocaml-conduit +URL: https://github.com/mirage/ocaml-conduit Source0: https://github.com/mirage/ocaml-conduit/archive/v%{version}/ocaml-conduit-%{version}.tar.gz BuildRequires: ocaml @@ -28,7 +28,7 @@ developing applications that use %{name}. %prep -%setup -q -n ocaml-conduit-%{version} +%setup -q %build diff --git a/SPECS/ocaml-fieldslib.spec b/SPECS/ocaml-fieldslib.spec index 2ab4177d..8dd1e35d 100644 --- a/SPECS/ocaml-fieldslib.spec +++ b/SPECS/ocaml-fieldslib.spec @@ -43,11 +43,23 @@ mkdir -p $OCAMLFIND_DESTDIR make install %files -#This space intentionally left blank +%doc README.txt +%doc LICENSE.txt +%doc COPYRIGHT.txt +%doc THIRD-PARTY.txt +%doc INRIA-DISCLAIMER.txt +%doc INSTALL.txt +%{_libdir}/ocaml/fieldslib +%exclude %{_libdir}/ocaml/fieldslib/*.a +%exclude %{_libdir}/ocaml/fieldslib/*.cmxa +%exclude %{_libdir}/ocaml/fieldslib/*.cmx +%exclude %{_libdir}/ocaml/fieldslib/*.mli %files devel -%doc COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE.txt THIRD-PARTY.txt -%{_libdir}/ocaml/fieldslib +%{_libdir}/ocaml/fieldslib/*.a +%{_libdir}/ocaml/fieldslib/*.cmxa +%{_libdir}/ocaml/fieldslib/*.cmx +%{_libdir}/ocaml/fieldslib/*.mli %changelog * Tue May 6 2014 Jon Ludlam - 109.20.00-1 diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 105ec4af..0dba6a72 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -6,7 +6,7 @@ Release: 1%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL URL: https://github.com/xapi-project/stdext -Source0: https://github.com/xapi-project/stdext/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-fd-send-recv-devel BuildRequires: ocaml-findlib From 4f82a642871f5a0c4bec0e7720214f99252f5c11 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 24 May 2014 22:44:00 +0000 Subject: [PATCH 0863/1125] Resync the changelogs Signed-off-by: David Scott --- SPECS/squeezed.spec | 3 +++ SPECS/vhd-tool.spec | 3 +++ SPECS/xapi.spec | 3 +++ SPECS/xe-create-templates.spec | 3 +++ SPECS/xenopsd.spec | 3 +++ 5 files changed, 15 insertions(+) diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 60d7055c..fdad606f 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -59,6 +59,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Jun 6 2014 Jonathan Ludlam - 0.10.6-1 +- Update to 0.10.6 + * Fri Apr 11 2014 Euan Harris - 0.10.5-1 - Switch build from obuild to oasis diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 7ccb965a..e0552af7 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -49,6 +49,9 @@ make install %{_libexecdir}/xapi/sparse_dd %changelog +* Fri Jun 6 2014 Jonathan Ludlam - 0.7.5-1 +- Update to 0.7.5 + * Wed Apr 9 2014 Euan Harris - 0.7.4-1 - Update to 0.7.4 - fix handling of tar file prefixes diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index e2774b81..25b6403c 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -162,6 +162,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Jun 6 2014 David Scott - 1.9.50-1 +- update 1.9.50 + * Fri May 23 2014 David Scott - 1.9.49-1 - update to 1.9.49 diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index 6a62bba4..e7eaf058 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -36,6 +36,9 @@ install -m 0755 dist/build/xe-create-templates/xe-create-templates %{buildroot}/ %{_bindir}/xe-create-templates %changelog +* Fri Jun 6 2014 Jonathan Ludlam - 0.9.3-1 +- Update to 0.9.3 + * Wed Sep 25 2013 David Scott - 0.9.2-1 - Update to 0.9.2 diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 224e80a6..a36779e1 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -188,6 +188,9 @@ fi #fi %changelog +* Fri Jun 6 2014 Jonathan Ludlam - 0.9.37-1 +- Update to 0.9.37 + * Fri Jan 17 2014 Euan Harris - 0.9.34-1 - Update to 0.9.34, restoring fixes from the 0.9.32 line which were not merged to trunk before 0.9.33 was tagged From 2c38b1cc80e42dd6f373667bf17759f23f6ca3f1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 27 May 2014 18:19:36 +0100 Subject: [PATCH 0864/1125] configure: Tidy up distribution-type dispatch Signed-off-by: Euan Harris --- configure.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/configure.sh b/configure.sh index 879755e8..3f7995fe 100755 --- a/configure.sh +++ b/configure.sh @@ -1,9 +1,18 @@ #!/bin/bash set -eu -if [ `lsb_release -si` == "Fedora" -o `lsb_release -si` == "CentOS" -o `lsb_release -si` == "RedHatEnterpriseServer" ] ; then - . scripts/rpm/configure.sh +DISTRIBUTION=`lsb_release -si` +case "$DISTRIBUTION" in + Fedora|CentOS|RedHatEnterpriseServer) + . scripts/rpm/configure.sh + ;; -elif [ `lsb_release -si` == "Ubuntu" -o `lsb_release -si` == "Debian" -o `lsb_release -si` == "Linaro" ] ; then + Ubuntu|Debian|Linaro) . scripts/deb/configure.sh -fi + ;; + + *) + echo "Unknown distribution: $DISTRIBUTION" + exit 1 + ;; +esac From b958be0d3401133ed21f40c0aab28f0769040562 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 29 May 2014 10:59:22 +0100 Subject: [PATCH 0865/1125] xmlm: Rename to ocaml-xmlm Signed-off-by: Euan Harris --- SPECS/ocaml-rpc.spec | 4 ++-- SPECS/ocaml-xcp-idl.spec | 4 ++-- SPECS/ocaml-xen-api-client.spec | 4 ++-- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/{xmlm.spec => ocaml-xmlm.spec} | 5 +++-- SPECS/xe-create-templates.spec | 2 +- scripts/lib/mappkgname.py | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) rename SPECS/{xmlm.spec => ocaml-xmlm.spec} (95%) diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index d7de0534..99df21e6 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -13,7 +13,7 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-type-conv -BuildRequires: xmlm-devel +BuildRequires: ocaml-xmlm-devel %description Am RPC library for OCaml. @@ -25,7 +25,7 @@ Requires: %{name} = %{version}-%{release} Requires: ocaml-camlp4-devel%{?_isa} Requires: ocaml-type-conv%{?_isa} Requires: ocaml-lwt%{?_isa} -Requires: xmlm-devel%{?_isa} +Requires: ocaml-xmlm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 9cc17d35..9ad89238 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -18,7 +18,7 @@ BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-fd-send-recv-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: xmlm-devel +BuildRequires: ocaml-xmlm-devel BuildRequires: ocaml-ounit-devel %description @@ -34,7 +34,7 @@ Requires: ocaml-re-devel%{?_isa} Requires: ocaml-cohttp-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-fd-send-recv-devel%{?_isa} -Requires: xmlm-devel%{?_isa} +Requires: ocaml-xmlm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 1463899b..6569da86 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -16,7 +16,7 @@ BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-uri-devel -BuildRequires: xmlm-devel +BuildRequires: ocaml-xmlm-devel %description XenAPI Client is an OCaml library implementing XenServer's XenAPI. @@ -27,7 +27,7 @@ virtualization hosts. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: xmlm-devel%{?_isa} +Requires: ocaml-xmlm-devel%{?_isa} Requires: ocaml-cohttp-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-lwt-devel%{?_isa} diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 5a74df06..b33afc7c 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -12,7 +12,7 @@ BuildRequires: forkexecd-devel BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-stdext-devel -BuildRequires: xmlm-devel +BuildRequires: ocaml-xmlm-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-devel diff --git a/SPECS/xmlm.spec b/SPECS/ocaml-xmlm.spec similarity index 95% rename from SPECS/xmlm.spec rename to SPECS/ocaml-xmlm.spec index 0003a32b..64b9a24c 100644 --- a/SPECS/xmlm.spec +++ b/SPECS/ocaml-xmlm.spec @@ -1,4 +1,4 @@ -Name: xmlm +Name: ocaml-xmlm Version: 1.1.1 Release: 2%{?dist} Summary: Streaming XML input/output for OCaml @@ -6,6 +6,7 @@ License: BSD3 Group: Development/Libraries URL: http://erratique.ch/software/xmlm Source0: https://github.com/dbuenzli/xmlm/archive/v%{version}/xmlm-%{version}.tar.gz +Obsoletes: xmlm <= 1.1.1 BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib @@ -30,7 +31,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q +%setup -q -n xmlm-%{version} %build oasis setup diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index c4f7e98b..d559e079 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -12,7 +12,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-stdext-devel -BuildRequires: xmlm-devel +BuildRequires: ocaml-xmlm-devel BuildRequires: ocaml-xen-api-client-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 1b345ecd..1b602576 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -84,7 +84,7 @@ "openstack-xapi-plugins": ["openstack-xapi-plugins"], "optcomp": ["optcomp-ocaml"], "xapi-libvirt-storage": ["libxapi-libvirt-storage-ocaml"], - "xmlm": ["libxmlm-ocaml"], + "ocaml-xmlm": ["libxmlm-ocaml"], "xsconsole0": ["xsconsole"], "xenserver-core-latest-snapshot": ["xenserver-core-latest-snapshot"], "python-setuptools": ["python-setuptools", "python-setuptools-git"], From 849460ba8dcb043e96589aff52f44e5d860f4564 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 29 May 2014 11:00:26 +0100 Subject: [PATCH 0866/1125] SPECS: Remove Group tags The Group tag is no longer required: https://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files/ Furthermore, many of our packages use non-standard groups which cause rpmlint to complain. Older versions of rpmlint may complain about the lack of the Group tag, but this should not cause problems on modern Fedora or CentOS (>5) systems. Signed-off-by: Euan Harris --- SPECS/blktap.spec | 1 - SPECS/cppo.spec | 1 - SPECS/deriving-ocsigen.spec | 2 -- SPECS/ffs.spec | 1 - SPECS/forkexecd.spec | 2 -- SPECS/libnl3.spec | 4 ---- SPECS/linux-guest-loader.spec | 1 - SPECS/message-switch.spec | 2 -- SPECS/oasis.spec | 1 - SPECS/ocaml-biniou.spec | 2 -- SPECS/ocaml-cdrom.spec | 2 -- SPECS/ocaml-cmdliner.spec | 2 -- SPECS/ocaml-cohttp.spec | 2 -- SPECS/ocaml-crc.spec | 2 -- SPECS/ocaml-cstruct.spec | 2 -- SPECS/ocaml-ctypes.spec | 2 -- SPECS/ocaml-easy-format.spec | 2 -- SPECS/ocaml-fd-send-recv.spec | 2 -- SPECS/ocaml-gnt.spec | 2 -- SPECS/ocaml-io-page.spec | 2 -- SPECS/ocaml-ipaddr.spec | 2 -- SPECS/ocaml-lambda-term.spec | 2 -- SPECS/ocaml-libvhd.spec | 2 -- SPECS/ocaml-libvirt.spec | 3 --- SPECS/ocaml-lwt.spec | 2 -- SPECS/ocaml-mirage-types.spec | 2 -- SPECS/ocaml-nbd.spec | 2 -- SPECS/ocaml-netdev.spec | 2 -- SPECS/ocaml-obuild.spec | 1 - SPECS/ocaml-oclock.spec | 2 -- SPECS/ocaml-ocplib-endian.spec | 2 -- SPECS/ocaml-odn.spec | 1 - SPECS/ocaml-opasswd.spec | 2 -- SPECS/ocaml-ounit.spec | 2 -- SPECS/ocaml-qmp.spec | 2 -- SPECS/ocaml-re.spec | 2 -- SPECS/ocaml-react.spec | 2 -- SPECS/ocaml-rpc.spec | 2 -- SPECS/ocaml-rrd-transport.spec | 2 -- SPECS/ocaml-sexplib.spec | 2 -- SPECS/ocaml-sha.spec | 2 -- SPECS/ocaml-ssl.spec | 2 -- SPECS/ocaml-stdext.spec | 2 -- SPECS/ocaml-tapctl.spec | 2 -- SPECS/ocaml-tar.spec | 2 -- SPECS/ocaml-text.spec | 2 -- SPECS/ocaml-type-conv.spec | 1 - SPECS/ocaml-uri.spec | 2 -- SPECS/ocaml-uuidm.spec | 2 -- SPECS/ocaml-uutf.spec | 2 -- SPECS/ocaml-vhd.spec | 2 -- SPECS/ocaml-xcp-idl.spec | 2 -- SPECS/ocaml-xcp-inventory.spec | 2 -- SPECS/ocaml-xcp-rrd.spec | 2 -- SPECS/ocaml-xen-api-client.spec | 2 -- SPECS/ocaml-xen-api-libs-transitional.spec | 2 -- SPECS/ocaml-xen-lowlevel-libs.spec | 2 -- SPECS/ocaml-xenops.spec | 3 --- SPECS/ocaml-xenstore-clients.spec | 2 -- SPECS/ocaml-xenstore.spec | 2 -- SPECS/ocaml-xmlm.spec | 2 -- SPECS/ocaml-yojson.spec | 2 -- SPECS/ocaml-zed.spec | 2 -- SPECS/ocamlify.spec | 1 - SPECS/ocamlmod.spec | 1 - SPECS/omake.spec | 1 - SPECS/openstack-xapi-plugins.spec | 1 - SPECS/optcomp.spec | 1 - SPECS/sm-cli.spec | 1 - SPECS/squeezed.spec | 1 - SPECS/utop.spec | 1 - SPECS/vhd-tool.spec | 1 - SPECS/vncterm.spec | 1 - SPECS/xapi-libvirt-storage.spec | 1 - SPECS/xapi.spec | 3 --- SPECS/xcp-networkd.spec | 1 - SPECS/xcp-python-libs.spec | 1 - SPECS/xcp-rrdd.spec | 1 - SPECS/xcp-sm.spec | 2 -- SPECS/xe-create-templates.spec | 1 - SPECS/xenops-cli.spec | 1 - SPECS/xenopsd.spec | 4 ---- SPECS/xenserver-core-latest-snapshot.spec | 1 - SPECS/xenserver-core.spec | 1 - SPECS/xenserver-install-wizard.spec | 1 - SPECS/xsconsole.spec | 1 - SPECS/xsiostat.spec | 1 - 87 files changed, 152 deletions(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 9bef43c3..e9487731 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -2,7 +2,6 @@ Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.1 Release: 1%{?dist} -Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/xapi-project/blktap Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 5e129fd0..02fe183a 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -3,7 +3,6 @@ Version: 0.9.3 Release: 1%{?dist} Summary: Equivalent of the C preprocessor for OCaml License: BSD3 -Group: Development/Other URL: http://mjambon.com/cppo.html Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index ad0c334e..5768ca14 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -3,7 +3,6 @@ Version: 0.3c Release: 1%{?dist} Summary: Extension to OCaml for deriving functions from type declarations License: MIT -Group: Development/Libraries URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -15,7 +14,6 @@ Extension to OCaml for deriving functions from type declarations %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index cd55be5a..f52dbdca 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -3,7 +3,6 @@ Version: 0.9.24 Release: 1%{?dist} Summary: Simple flat file storage manager for the xapi toolstack License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/ffs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: ffs-init diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index b064bf34..bd04e4dc 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -3,7 +3,6 @@ Version: 0.9.1 Release: 1%{?dist} Summary: A subprocess management service License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/forkexecd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: forkexecd-init @@ -59,7 +58,6 @@ fi %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-fd-send-recv-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index cb987292..b519adca 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -1,5 +1,4 @@ Summary: Convenience library for kernel netlink sockets -Group: Development/Libraries License: LGPLv2 Name: libnl3 Version: 3.2.22 @@ -18,7 +17,6 @@ network manipulation %package devel Summary: Libraries and headers for using libnl3 -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release} Requires: kernel-headers @@ -28,7 +26,6 @@ This package contains various headers for using libnl3 %package cli Summary: Command line interface utils for libnl3 -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description cli @@ -37,7 +34,6 @@ libraries on which they depend %package doc Summary: API documentation for libnl3 -Group: Documentation Requires: %{name} = %{version}-%{release} %description doc diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec index bdddf1ff..c91ba9ac 100644 --- a/SPECS/linux-guest-loader.spec +++ b/SPECS/linux-guest-loader.spec @@ -5,7 +5,6 @@ Release: 1%{?dist} URL: https://github.com/xenserver/linux-guest-loader Source0: https://github.com/xenserver/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz License: GPL -Group: Applications/System BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 91dd2cb3..107c697e 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -3,7 +3,6 @@ Version: 0.10.1 Release: 1%{?dist} Summary: A store and forward message switch License: FreeBSD -Group: Development/Other URL: https://github.com/xapi-project/message-switch Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init @@ -59,7 +58,6 @@ fi %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-cohttp-devel%{?_isa} Requires: ocaml-oclock-devel%{?_isa} diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec index 886f7d3e..849987c9 100644 --- a/SPECS/oasis.spec +++ b/SPECS/oasis.spec @@ -3,7 +3,6 @@ Version: 0.4.4 Release: 1%{?dist} Summary: Architecture for building OCaml libraries and applications -Group: Development/Tools License: LGPL URL: http://oasis.forge.ocamlcore.org/index.html Source0: https://github.com/ocaml/oasis/archive/%{version}/%{name}-%{version}.tar.gz diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec index b3d662f2..82f45103 100644 --- a/SPECS/ocaml-biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -5,7 +5,6 @@ Version: 1.0.6 Release: 1%{?dist} Summary: Compact, fast and extensible serialization format License: BSD3 -Group: Development/Libraries URL: http://mjambon.com/biniou.html Source0: http://mjambon.com/releases/biniou/biniou-%{version}.tar.gz BuildRequires: ocaml @@ -19,7 +18,6 @@ compatibility as protocols evolve. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-easy-format-devel%{?_isa} diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 9be43fa5..b0b8c323 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -5,7 +5,6 @@ Version: 0.9.1 Release: 2%{?dist} Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRequires: ocaml @@ -18,7 +17,6 @@ inside) to be queried under Linux. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index ca304878..3ad77f73 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -3,7 +3,6 @@ Version: 0.9.3 Release: 2%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 -Group: Development/Other URL: http://erratique.ch/software/cmdliner Source0: https://github.com/dbuenzli/cmdliner/archive/v%{version}/cmdliner-%{version}.tar.gz BuildRequires: oasis @@ -22,7 +21,6 @@ man page generation. It supports programs with single or multiple commands %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 7935da3a..54548d34 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -5,7 +5,6 @@ Version: 0.9.8 Release: 1%{?dist} Summary: An HTTP library for OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/mirage/ocaml-cohttp Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -24,7 +23,6 @@ An HTTP library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-lwt-devel%{?_isa} Requires: ocaml-re-devel%{?_isa} diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec index 38a20ed9..9a622469 100644 --- a/SPECS/ocaml-crc.spec +++ b/SPECS/ocaml-crc.spec @@ -5,7 +5,6 @@ Version: 0.9.1 Release: 1%{?dist} Summary: CRC implementation for OCaml License: ISC -Group: Development/Other URL: https://github.com/xapi-project/ocaml-crc/ Source0: https://github.com/xapi-project/ocaml-crc/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -23,7 +22,6 @@ and strings. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index a86aca17..25cad8d0 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -5,7 +5,6 @@ Version: 0.7.1 Release: 2%{?dist} Summary: Read and write low-level C-style structures in OCaml License: ISC -Group: Development/Libraries URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -19,7 +18,6 @@ Read and write low-level C-style structures in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-ocplib-endian-devel%{?_isa} diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec index 42a4ec01..0c4cd559 100644 --- a/SPECS/ocaml-ctypes.spec +++ b/SPECS/ocaml-ctypes.spec @@ -3,7 +3,6 @@ Version: 0.2.2 Release: 1%{?dist} Summary: Library for binding to C libraries using pure OCaml License: MIT -Group: Development/Other URL: https://github.com/ocamllabs/ocaml-ctypes/ Source0: https://github.com/ocamllabs/%{name}/archive/%{name}-%{version}.tar.gz Patch0: ocaml-ctypes-0.2.1-std-gnu99.patch @@ -16,7 +15,6 @@ Library for binding to C libraries using pure OCaml %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-easy-format.spec b/SPECS/ocaml-easy-format.spec index 228c7f38..0669c845 100644 --- a/SPECS/ocaml-easy-format.spec +++ b/SPECS/ocaml-easy-format.spec @@ -3,7 +3,6 @@ Version: 1.0.1 Release: 1%{?dist} Summary: Indentation made easy License: BSD3 -Group: Development/Libraries URL: http://mjambon.com/easy-format.html Source0: http://mjambon.com/releases/easy-format/easy-format-%{version}.tar.gz BuildRequires: ocaml @@ -15,7 +14,6 @@ Easy_format: indentation made easy. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 5de52ca7..9ccb118a 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -5,7 +5,6 @@ Version: 1.0.1 Release: 1%{?dist} Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL -Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -16,7 +15,6 @@ Bindings to sendmsg/recvmsg for fd passing under Linux. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index 00969135..cc167b9d 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -5,7 +5,6 @@ Version: 1.0.0 Release: 1%{?dist} Summary: OCaml bindings for userspace Xen grant table controls License: LGPL2.1 + OCaml linking exception -Group: Development/Other URL: https://github.com/xapi-project/ocaml-gnt/ Source0: https://github.com/xapi-project/ocaml-gnt/archive/v%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -28,7 +27,6 @@ or network backends. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-io-page-devel Requires: xen-devel diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index b54f61e1..cce9f7e2 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -5,7 +5,6 @@ Version: 1.1.1 Release: 1%{?dist} Summary: Efficient handling of I/O memory pages on Unix and Xen. License: ISC -Group: Development/Other URL: https://github.com/mirage/io-page Source0: http://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -21,7 +20,6 @@ IO pages are page-aligned, and wrapped in the Cstruct library to avoid copying t %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-cstruct-devel%{?_isa} diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec index f2cb29d9..d7a3cdf9 100644 --- a/SPECS/ocaml-ipaddr.spec +++ b/SPECS/ocaml-ipaddr.spec @@ -3,7 +3,6 @@ Version: 2.4.0 Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/mirage/ocaml-ipaddr Source0: https://github.com/mirage/ocaml-ipaddr/archive/%{version}/ocaml-ipaddr-%{version}.tar.gz @@ -17,7 +16,6 @@ access remote block devices. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 92e833a5..9e04a13a 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -5,7 +5,6 @@ Version: 1.2 Release: 1%{?dist} Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 -Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/lambda-term/ Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz BuildRequires: ocaml @@ -22,7 +21,6 @@ Lambda-Term is a cross-platform library for manipulating the terminal. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-lwt-devel%{?_isa} Requires: ocaml-zed-devel%{?_isa} diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 893c78cb..b001360a 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -5,7 +5,6 @@ Version: 0.9.1 Release: 1%{?dist} Summary: VHD manipulation via libvhd License: BSD3 -Group: Development/Libraries URL: http://github.com/xapi-project/libvhd Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz BuildRequires: libuuid-devel @@ -18,7 +17,6 @@ Simple C bindings which allow .vhd files to be manipulated. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libuuid-devel%{?_isa} Requires: xen-devel%{?_isa} diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec index 884dcc70..45a5a593 100644 --- a/SPECS/ocaml-libvirt.spec +++ b/SPECS/ocaml-libvirt.spec @@ -9,7 +9,6 @@ Version: 0.6.1.2 Release: 100%{?dist}%{?extra_release} Summary: OCaml binding for libvirt -Group: Development/Libraries License: LGPLv2+ URL: http://libvirt.org/ocaml/ Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz @@ -43,7 +42,6 @@ OCaml binding for libvirt. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} @@ -55,7 +53,6 @@ developing applications that use %{name}. %if %build_mlvirsh %package -n mlvirsh Summary: OCaml virsh utility -Group: Applications/Emulators License: GPLv2+ diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index 7771561b..f503abf9 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -6,7 +6,6 @@ Version: 2.4.4 Release: 1%{?dist} Summary: OCaml lightweight thread library -Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://ocsigen.org/lwt Source0: https://github.com/ocsigen/lwt/archive/%{version}/%{name}-%{version}.tar.gz @@ -33,7 +32,6 @@ is part of the Ocsigen project. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 52f6c500..d0c8b774 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -5,7 +5,6 @@ Version: 1.1.1 Release: 1%{?dist} Summary: MirageOS interfaces License: ISC -Group: Development/Other URL: https://github.com/mirage/mirage Source0: http://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -24,7 +23,6 @@ See http://openmirage.org for more information. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} BuildRequires: ocaml-ipaddr-devel%{?_isa} BuildRequires: ocaml-lwt-devel%{?_isa} diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index cb450084..e57e6964 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -3,7 +3,6 @@ Version: 1.0.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz @@ -24,7 +23,6 @@ access remote block devices. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} BuildRequires: ocaml-cstruct-devel%{?_isa} diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 22e5764b..5b2f7da5 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -5,7 +5,6 @@ Version: 0.9.0 Release: 1%{?dist} Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/netdev Source0: https://github.com/xapi-project/netdev/archive/netdev-%{version}/netdev-%{version}.tar.gz BuildRequires: forkexecd-devel @@ -18,7 +17,6 @@ Manipulate Linux bridges, network devices and openvswitch instances in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} BuildRequires: forkexecd-devel%{?_isa} BuildRequires: ocaml-stdext-devel%{?_isa} diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index cf6afe1d..ed1dda9c 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -5,7 +5,6 @@ Version: 0.0.2 Release: 1%{?dist} Summary: Simple build tool for OCaml programs License: BSD2 -Group: Development/Other URL: http://github.com/vincenthz/obuild Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index ea16e49b..68d34da1 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -5,7 +5,6 @@ Version: 0.3 Release: 2%{?dist} Summary: POSIX monotonic clock for OCaml License: ISC -Group: Development/Libraries URL: https://github.com/polazarus/oclock Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers @@ -18,7 +17,6 @@ A POSIX monotonic clock for OCaml %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 8cafb04a..2da2011c 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -5,7 +5,6 @@ Version: 0.4 Release: 1%{?dist} Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays License: LGPL -Group: Development/Libraries URL: https://github.com/OCamlPro/ocplib-endian Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz BuildRequires: ocaml @@ -29,7 +28,6 @@ The library implements two modules: %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: optcomp diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index e6fb1ccb..33190b45 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -3,7 +3,6 @@ Version: 0.0.11 Release: 1%{?dist} Summary: Dump OCaml data structures using OCaml data notation -Group: Development/Libraries License: LGPL URL: https://forge.ocamlcore.org/projects/odn/ Source0: https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-%{version}.tar.gz diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index f927dfd7..0741169d 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -3,7 +3,6 @@ Version: 0.9.3 Release: 1%{?dist} Summary: OCaml interface to the glibc passwd/shadow password functions License: ISC -Group: Development/Other URL: http://github.com/xapi-project/ocaml-opasswd Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz Patch0: ocaml-opasswd-ocaml-4.00.1.patch @@ -21,7 +20,6 @@ nixes, but it has not been tested. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-ctypes-devel%{?_isa} Requires: libffi%{?_isa} diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index 93fceb11..febf4420 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -6,7 +6,6 @@ Version: 2.0.0 Release: 1%{?dist} Summary: Unit test framework for OCaml -Group: Development/Libraries License: MIT URL: http://ounit.forge.ocamlcore.org/ Source0: http://forge.ocamlcore.org/frs/download.php/1258/ounit-%{version}.tar.gz @@ -27,7 +26,6 @@ frameworks. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 31c0c042..c1f86035 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -5,7 +5,6 @@ Version: 0.9.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -22,7 +21,6 @@ process. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-yojson-devel%{?_isa} diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index 16823268..f84cd5d5 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -5,7 +5,6 @@ Version: 1.2.1 Release: 1%{?dist} Summary: A regular expression library for OCaml License: LGPL -Group: Development/Libraries URL: http://github.com/ocaml/ocaml-re Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -17,7 +16,6 @@ A regular expression library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 1389f781..681a8f26 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -7,7 +7,6 @@ Release: 2%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) -Group: Development/Libraries License: BSD URL: http://erratique.ch/software/react @@ -34,7 +33,6 @@ and provides time stamp events, delayed events and delayed signals. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 99df21e6..68fc56af 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -5,7 +5,6 @@ Version: 1.5.1 Release: 1%{?dist} Summary: An RPC library for OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/samoht/ocaml-rpc Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -20,7 +19,6 @@ Am RPC library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-camlp4-devel%{?_isa} Requires: ocaml-type-conv%{?_isa} diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index e47dae01..871c8131 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -5,7 +5,6 @@ Version: 0.7.1 Release: 1%{?dist} Summary: Shared-memory protocols for transmitting RRD data License: LGPL2.1 + OCaml linking exception -Group: Development/Other URL: https://github.com/xapi-project/rrd-transport/ Source0: https://github.com/xapi-project/rrd-transport/archive/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -26,7 +25,6 @@ and shared Xen pages. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-gnt-devel Requires: ocaml-crc-devel diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index d4b961f4..ad39e356 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -5,7 +5,6 @@ Version: 109.20.00 Release: 1%{?dist} Summary: Convert values to and from s-expressions in OCaml -Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: https://ocaml.janestreet.com Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz @@ -21,7 +20,6 @@ Convert values to and from s-expressions in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-camlp4-devel%{?_isa} Requires: ocaml-type-conv%{?_isa} diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index bd95dcdb..fc680bda 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -3,7 +3,6 @@ Version: 1.9 Release: 1%{?dist} Summary: OCaml SHA License: LGPL2.1 -Group: Development/Other URL: http://github.com/vincenthz/ocaml-sha Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -15,7 +14,6 @@ This is a set of C bindings for computing SHA digests. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 36c54cca..91355a59 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -5,7 +5,6 @@ Version: 0.4.6 Release: 1%{?dist} Summary: Use OpenSSL from OCaml License: LGPL -Group: Development/Libraries URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -17,7 +16,6 @@ Use OpenSSL from OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: openssl-devel%{?_isa} diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 2a9b5ae4..2933f1d1 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -5,7 +5,6 @@ Version: 0.10.0 Release: 1%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/stdext Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -18,7 +17,6 @@ Deprecated misc library functions for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-fd-send-recv-devel%{?_isa} BuildRequires: ocaml-uuidm-devel%{?_isa} diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 1d5b3784..eb68f4b8 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -5,7 +5,6 @@ Version: 0.9.1 Release: 1%{?dist} Summary: Manipulate running tapdisk instances License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/tapctl Source0: https://github.com/xapi-project/tapctl/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -20,7 +19,6 @@ Manipulate running tapdisk instances on a xen host. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: forkexecd-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 5353364f..287d5f30 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -3,7 +3,6 @@ Version: 0.2.1 Release: 1%{?dist} Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/djs55/ocaml-tar Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -19,7 +18,6 @@ This is a pure OCaml library for reading and writing tar-format data. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-cstruct-devel%{?_isa} Requires: ocaml-lwt-devel%{?_isa} diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 49521bca..38ef6bcb 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -6,7 +6,6 @@ Version: 0.6 Release: 1%{?dist} Summary: Library for dealing with unicode text conveniently -Group: Development/Libraries License: BSD URL: http://forge.ocamlcore.org/projects/ocaml-text Source0: http://forge.ocamlcore.org/frs/download.php/937/%{name}-%{version}.tar.gz @@ -24,7 +23,6 @@ unicode characters, in a convenient way. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 1630c17c..857f9331 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -5,7 +5,6 @@ Version: 109.20.00 Release: 1%{?dist} Summary: OCaml base library for type conversion -Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: http://www.ocaml.info/software.html#type_driven Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 578475eb..5911ff09 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -5,7 +5,6 @@ Version: 1.3.8 Release: 1%{?dist} Summary: A URI library for OCaml License: ISC -Group: Development/Libraries URL: https://github.com/mirage/ocaml-uri Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml >= 4.00 @@ -19,7 +18,6 @@ A URI library for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: ocaml-re-devel%{?_isa} diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 7a670a44..ce00faf7 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -5,7 +5,6 @@ Version: 0.9.5 Release: 2%{?dist} Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 -Group: Development/Libraries URL: http://erratique.ch/software/uuidm Source0: https://github.com/dbuenzli/uuidm/archive/v%{version}/uuidm-%{version}.tar.gz BuildRequires: oasis @@ -20,7 +19,6 @@ identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec index 69602185..715b1a00 100644 --- a/SPECS/ocaml-uutf.spec +++ b/SPECS/ocaml-uutf.spec @@ -3,7 +3,6 @@ Version: 0.9.3 Release: 3%{?dist} Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE License: BSD3 -Group: Development/Libraries URL: http://erratique.ch/software/uutf Source0: https://github.com/dbuenzli/uutf/archive/v%{version}/uutf-%{version}.tar.gz BuildRequires: ocaml @@ -25,7 +24,6 @@ BSD3 license. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 6b6f064a..48544eb7 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -5,7 +5,6 @@ Version: 0.7.0 Release: 1%{?dist} Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -24,7 +23,6 @@ vhd files to be read, written and streamed with on-the-fly format conversion. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-cstruct-devel%{?_isa} Requires: ocaml-io-page-devel%{?_isa} diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 9ad89238..21acb0ac 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -5,7 +5,6 @@ Version: 0.9.16 Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/xcp-idl Source0: https://github.com/xapi-project/xcp-idl/archive/%{version}/xcp-idl-%{version}.tar.gz @@ -26,7 +25,6 @@ Common interface definitions for XCP services. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: message-switch-devel%{?_isa} Requires: ocaml-uri-devel%{?_isa} diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index 77ad2efd..a912e71c 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -5,7 +5,6 @@ Version: 0.9.0 Release: 1%{?dist} Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRequires: ocaml @@ -20,7 +19,6 @@ A simple library to read and write the XCP inventory file. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-stdext-devel%{?_isa} Requires: ocaml-uuidm-devel%{?_isa} diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index caa892cf..3acefd13 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -5,7 +5,6 @@ Version: 0.9.0 Release: 1%{?dist} Summary: Round-Robin Datasources in OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/xcp-rrd Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz BuildRequires: ocaml @@ -20,7 +19,6 @@ Round-Robin Datasources in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-stdext-devel%{?_isa} diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 6569da86..bd2d3979 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -5,7 +5,6 @@ Version: 0.9.4 Release: 1%{?dist} Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 -Group: Development/Libraries URL: https://github.com/xapi-project/xen-api-client Source0: https://github.com/xapi-project/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz BuildRequires: ocaml @@ -25,7 +24,6 @@ virtualization hosts. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-xmlm-devel%{?_isa} Requires: ocaml-cohttp-devel%{?_isa} diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index b33afc7c..ff51ec5b 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -5,7 +5,6 @@ Version: 0.9.3 Release: 1%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception -Group: Development/Libraries URL: http://github.com/xapi-project/xen-api-libs-transitional Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: forkexecd-devel @@ -27,7 +26,6 @@ A deprecated standard library extension for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index cac13cad..24f6c172 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -5,7 +5,6 @@ Version: 0.9.14 Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -23,7 +22,6 @@ Xen hypercall bindings for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 8b74cbd6..5b58269e 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -5,7 +5,6 @@ Version: 0.9.4 Release: 1%{?dist} Summary: Low-level xen control operations OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/xenops Source0: https://github.com/xapi-project/xenops/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -23,7 +22,6 @@ Low-level xen control operations in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-xcp-idl-devel%{?_isa} Requires: ocaml-stdext-devel%{?_isa} @@ -37,7 +35,6 @@ developing applications that use %{name}. %package tools Summary: Debugging tools for %{name} -Group: Development/Libraries Requires: xen-libs BuildRequires: xen-devel diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 2c6014ac..123a1074 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -5,7 +5,6 @@ Version: 0.9.3 Release: 1%{?dist} Summary: Unix xenstore clients for OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/xapi-project/ocaml-xenstore-clients Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -19,7 +18,6 @@ Unix xenstore clients for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-lwt-devel%{?_isa} Requires: ocaml-xenstore-devel%{?_isa} diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 5c273ae4..e65e9545 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -5,7 +5,6 @@ Version: 1.2.4 Release: 1%{?dist} Summary: Xenstore protocol implementation in OCaml License: LGPL -Group: Development/Libraries URL: https://github.com/mirage/ocaml-xenstore Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml @@ -21,7 +20,6 @@ An implementation of the xenstore protocol in OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-cstruct-devel%{?_isa} Requires: ocaml-lwt-devel%{?_isa} diff --git a/SPECS/ocaml-xmlm.spec b/SPECS/ocaml-xmlm.spec index 64b9a24c..8aefaf86 100644 --- a/SPECS/ocaml-xmlm.spec +++ b/SPECS/ocaml-xmlm.spec @@ -3,7 +3,6 @@ Version: 1.1.1 Release: 2%{?dist} Summary: Streaming XML input/output for OCaml License: BSD3 -Group: Development/Libraries URL: http://erratique.ch/software/xmlm Source0: https://github.com/dbuenzli/xmlm/archive/v%{version}/xmlm-%{version}.tar.gz Obsoletes: xmlm <= 1.1.1 @@ -23,7 +22,6 @@ arborescent data structures to/from XML documents. %package devel Summary: Development files for %{name} -Group: Development/Other Requires: %{name} = %{version}-%{release} %description devel diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 03127a1e..14717788 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -5,7 +5,6 @@ Version: 1.1.6 Release: 1%{?dist} Summary: A JSON parser and priter for OCaml License: BSD3 -Group: Development/Libraries URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz BuildRequires: cppo @@ -19,7 +18,6 @@ A JSON parser and printer for OCaml. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-biniou-devel%{?_isa} Requires: ocaml-easy-format-devel%{?_isa} diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 4340e977..571b152b 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -5,7 +5,6 @@ Version: 1.2 Release: 1%{?dist} Summary: An abstract engine for text editing for OCaml License: BSD3 -Group: Development/Libraries URL: http://forge.ocamlcore.org/projects/zed/ Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz BuildRequires: ocaml @@ -20,7 +19,6 @@ text editors, edition widgets, readlines, ... %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ocaml-camomile-devel%{?_isa} Requires: ocaml-react-devel%{?_isa} diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec index b48adcdb..0e0dcea4 100644 --- a/SPECS/ocamlify.spec +++ b/SPECS/ocamlify.spec @@ -2,7 +2,6 @@ Name: ocamlify Version: 0.0.2 Release: 1%{?dist} Summary: Create OCaml source code by including whole files into OCaml string or string list -Group: Development/Tools License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlify/ Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar.gz diff --git a/SPECS/ocamlmod.spec b/SPECS/ocamlmod.spec index 42bc3650..9e035f02 100644 --- a/SPECS/ocamlmod.spec +++ b/SPECS/ocamlmod.spec @@ -2,7 +2,6 @@ Name: ocamlmod Version: 0.0.7 Release: 1%{?dist} Summary: Generate OCaml modules from source files -Group: Development/Tools License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlmod/ Source0: http://forge.ocamlcore.org/frs/download.php/1350/%{name}-%{version}.tar.gz diff --git a/SPECS/omake.spec b/SPECS/omake.spec index 6d88f62b..18d8cd7f 100644 --- a/SPECS/omake.spec +++ b/SPECS/omake.spec @@ -6,7 +6,6 @@ URL: http://omake.metaprl.org/ Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1.tar.gz/fe39a476ef4e33b7ba2ca77a6bcaded2/omake-0.9.8.6-0.rc1.tar.gz Patch0: omake-1-warnings License: GPL -Group: Development/Tools BuildRequires: make BuildRequires: ncurses-devel BuildRequires: ocaml >= 3.09.2 diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index e8a5ce80..9d83c621 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -3,7 +3,6 @@ Version: 2014.1 Release: 1%{?dist} Summary: XenAPI plugins from OpenStack License: ASL 2.0 -Group: System/Hypervisor URL: https://launchpad.net/nova/icehouse Source0: https://launchpad.net/nova/icehouse/%{version}/+download/nova-%{version}.tar.gz BuildArch: noarch diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index 71cfabcd..b4e85fc2 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -3,7 +3,6 @@ Version: 1.4 Release: 1%{?dist} Summary: Optional compilation with cpp-like directives License: BSD3 -Group: Development/Other URL: http://forge.ocamlcore.org/projects/optcomp/ Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec index 97678764..3d0691da 100644 --- a/SPECS/sm-cli.spec +++ b/SPECS/sm-cli.spec @@ -3,7 +3,6 @@ Version: 0.9.4 Release: 1%{?dist} Summary: CLI for xapi toolstack storage managers License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/sm-cli Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 81290e41..8fc1a222 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -3,7 +3,6 @@ Version: 0.10.5 Release: 1%{?dist} Summary: Memory ballooning daemon for the xapi toolstack License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 45c533df..684e9c9d 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -3,7 +3,6 @@ Version: 1.5 Release: 1%{?dist} Summary: A toplevel for OCaml which can run in a terminal or in Emacs License: BSD -Group: Development/Other URL: https://github.com/diml/utop Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec index 1abcbb23..edc46efd 100644 --- a/SPECS/vhd-tool.spec +++ b/SPECS/vhd-tool.spec @@ -4,7 +4,6 @@ Summary: Command-line tools for manipulating and streaming .vhd format files Name: vhd-tool Version: 0.7.4 Release: 1%{?dist} -Group: System/Hypervisor License: LGPL+linking exception URL: https://github.com/xapi-project/vhd-tool Source0: https://github.com/xapi-project/vhd-tool/archive/v%{version}/%{name}-%{version}.tar.gz diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3a8475b0..3081bb2f 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -3,7 +3,6 @@ Name: vncterm Version: 0.9.0 Release: 1%{?dist} License: GPL -Group: System/Hypervisor URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec index e55340c6..75b52b2d 100644 --- a/SPECS/xapi-libvirt-storage.spec +++ b/SPECS/xapi-libvirt-storage.spec @@ -3,7 +3,6 @@ Version: 0.9.8 Release: 1%{?dist} Summary: Allows the manipulation of libvirt storage pools and volumes via xapi License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/%{version}.tar.gz Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xapi-libvirt-storage-init diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 24e01f0e..bbbbf444 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -4,7 +4,6 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.49 Release: 1%{?dist} -Group: System/Hypervisor License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/%{version}/xen-api-%{version}.tar.gz @@ -66,7 +65,6 @@ This package contains the xapi toolstack. %package xe Summary: The xapi toolstack CLI -Group: System/Hypervisor Requires: bash-completion %description xe @@ -74,7 +72,6 @@ The command-line interface for controlling XCP hosts. %package python-devel Summary: XenAPI client support in python -Group: System/Hypervisor Requires: python %description python-devel diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 7467fe32..9ed5b76c 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -3,7 +3,6 @@ Version: 0.9.3 Release: 1%{?dist} Summary: Simple host network management service for the xapi toolstack License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xcp-networkd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-networkd-init diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index ed8bd276..7b71352c 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -5,7 +5,6 @@ Release: 1%{?dist} URL: https://github.com/xenserver/python-libs Source: https://github.com/xenserver/python-libs/archive/v%{version}/%{name}-%{version}.tar.gz License: GPL -Group: Applications/System BuildArch: noarch BuildRequires: python-devel diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index b2b94ec1..5d1f05a2 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -3,7 +3,6 @@ Version: 0.9.5 Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xcp-rrdd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xcp-rrdd-init diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index f3ca673e..aeaa33b1 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -4,7 +4,6 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.6 Release: 3%{?dist} -Group: System/Hypervisor License: LGPL URL: https://github.com/xapi-project/sm Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz @@ -250,7 +249,6 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- %package rawhba -Group: System/Hypervisor Summary: XCP rawhba SR type capability #Requires: sm = @SM_VERSION@-@SM_RELEASE@ diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec index d559e079..dc0fce50 100644 --- a/SPECS/xe-create-templates.spec +++ b/SPECS/xe-create-templates.spec @@ -3,7 +3,6 @@ Version: 0.9.2 Release: 1%{?dist} Summary: Creates default XenServer templates License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xcp-guest-templates Source0: https://github.com/xapi-project/xcp-guest-templates/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec index 6724d8b9..57f5f2fd 100644 --- a/SPECS/xenops-cli.spec +++ b/SPECS/xenops-cli.spec @@ -3,7 +3,6 @@ Version: 0.9.1 Release: 2%{?dist} Summary: CLI for xenopsd, the xapi toolstack domain manager License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xenops-cli Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 8e2dda46..de57b8c0 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -3,7 +3,6 @@ Version: 0.9.34 Release: 1%{?dist} Summary: Simple VM manager License: LGPL -Group: Development/Other URL: https://github.com/xapi-project/xenopsd Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: xenopsd-xc-init @@ -42,7 +41,6 @@ Simple VM manager for the xapi toolstack. %package libvirt Summary: Xenopsd using libvirt -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: libvirt @@ -52,7 +50,6 @@ Simple VM manager for Xen and KVM using libvirt. %package xc Summary: Xenopsd using xc -Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: forkexecd Requires: vncterm @@ -63,7 +60,6 @@ Simple VM manager for Xen using libxc. %package simulator Summary: Xenopsd simulator -Group: Development/Other Requires: %{name} = %{version}-%{release} %description simulator diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec index f0dafd7a..548203b7 100644 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ b/SPECS/xenserver-core-latest-snapshot.spec @@ -3,7 +3,6 @@ Version: 0.1.0 Release: 2%{?dist} Summary: Yum repositories for xenserver License: GPL -Group: Development/Other URL: http://www.xenserver.org/ Source0: fusion-release-xapi.repo Source1: fusion-release-xen-c6.repo diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index e94e3be8..b392ec39 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -3,7 +3,6 @@ Version: 0.10.0 Release: 1%{?dist} Summary: A virtual package which installs the xapi toolstack License: LGPL -Group: Development/Other URL: http://www.xenserver.org/ Source0: xenserver-readme Requires: xenserver-install-wizard diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index ecab271a..af0da5b4 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -4,7 +4,6 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.30 Release: 1%{?dist} -Group: System/Hypervisor License: LGPL+linking exception URL: http://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index d49d0320..7467162d 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -3,7 +3,6 @@ Name: xsconsole Version: 0.9.0 Release: 2%{?dist} License: GPL2 -Group: Administration/System URL: http://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz Requires: PyPAM diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec index 045307c0..6b3f00e4 100644 --- a/SPECS/xsiostat.spec +++ b/SPECS/xsiostat.spec @@ -3,7 +3,6 @@ Version: 0.2.0 Release: 1%{?dist} Summary: XenServer IO stat thingy License: LGPLv2.1 -Group: Development/Other URL: https://github.com/xenserver/xsiostat Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From 18f47e31a27a3f673289d16e8bb3364f96ce326a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 29 May 2014 11:18:59 +0100 Subject: [PATCH 0867/1125] SPECS: Remove BuildRoot tags The BuildRoot tag is no longer required: https://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files/ Signed-off-by: Euan Harris --- SPECS/ocaml-crc.spec | 1 - SPECS/ocaml-ctypes.spec | 1 - SPECS/ocaml-gnt.spec | 1 - SPECS/ocaml-io-page.spec | 1 - SPECS/ocaml-mirage-types.spec | 1 - SPECS/ocaml-opasswd.spec | 1 - SPECS/ocaml-rrd-transport.spec | 1 - SPECS/ocaml-sha.spec | 1 - 8 files changed, 8 deletions(-) diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec index 9a622469..333e4a49 100644 --- a/SPECS/ocaml-crc.spec +++ b/SPECS/ocaml-crc.spec @@ -7,7 +7,6 @@ Summary: CRC implementation for OCaml License: ISC URL: https://github.com/xapi-project/ocaml-crc/ Source0: https://github.com/xapi-project/ocaml-crc/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec index 0c4cd559..c3615e7c 100644 --- a/SPECS/ocaml-ctypes.spec +++ b/SPECS/ocaml-ctypes.spec @@ -6,7 +6,6 @@ License: MIT URL: https://github.com/ocamllabs/ocaml-ctypes/ Source0: https://github.com/ocamllabs/%{name}/archive/%{name}-%{version}.tar.gz Patch0: ocaml-ctypes-0.2.1-std-gnu99.patch -BuildRoot: %{_tmppath}/%{name}-%{name}-%{version}-%{release} BuildRequires: ocaml ocaml-findlib libffi-devel Requires: ocaml ocaml-findlib diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index cc167b9d..4c02270d 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -7,7 +7,6 @@ Summary: OCaml bindings for userspace Xen grant table controls License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/ocaml-gnt/ Source0: https://github.com/xapi-project/ocaml-gnt/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index cce9f7e2..08ac204e 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -7,7 +7,6 @@ Summary: Efficient handling of I/O memory pages on Unix and Xen. License: ISC URL: https://github.com/mirage/io-page Source0: http://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index d0c8b774..c03c963d 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -7,7 +7,6 @@ Summary: MirageOS interfaces License: ISC URL: https://github.com/mirage/mirage Source0: http://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib-devel diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index 0741169d..ecc2f045 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -6,7 +6,6 @@ License: ISC URL: http://github.com/xapi-project/ocaml-opasswd Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz Patch0: ocaml-opasswd-ocaml-4.00.1.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ctypes-devel diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index 871c8131..52f26306 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -7,7 +7,6 @@ Summary: Shared-memory protocols for transmitting RRD data License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/rrd-transport/ Source0: https://github.com/xapi-project/rrd-transport/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-cstruct-devel diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index fc680bda..6ba85126 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -5,7 +5,6 @@ Summary: OCaml SHA License: LGPL2.1 URL: http://github.com/vincenthz/ocaml-sha Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-findlib From 8f4de54964023bbc591d2307695ff20ec13374b7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 29 May 2014 11:20:51 +0100 Subject: [PATCH 0868/1125] SPECS: Remove %clean tags The %clean tag is no longer required: https://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files/ Signed-off-by: Euan Harris --- SPECS/ocaml-crc.spec | 3 --- SPECS/ocaml-ctypes.spec | 3 --- SPECS/ocaml-gnt.spec | 3 --- SPECS/ocaml-io-page.spec | 3 --- SPECS/ocaml-mirage-types.spec | 3 --- SPECS/ocaml-opasswd.spec | 3 --- SPECS/ocaml-rrd-transport.spec | 3 --- SPECS/ocaml-sha.spec | 3 --- 8 files changed, 24 deletions(-) diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec index 333e4a49..1c4c6189 100644 --- a/SPECS/ocaml-crc.spec +++ b/SPECS/ocaml-crc.spec @@ -41,9 +41,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install -%clean -rm -rf %{buildroot} - %files %defattr(-,root,root) %{_libdir}/ocaml/crc/META diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec index c3615e7c..02bc3465 100644 --- a/SPECS/ocaml-ctypes.spec +++ b/SPECS/ocaml-ctypes.spec @@ -36,9 +36,6 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install -%clean -rm -rf %{buildroot} - %files %doc README.md LICENSE CHANGES %{_libdir}/ocaml/ctypes diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index 4c02270d..ac4e0866 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -47,9 +47,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install -%clean -rm -rf %{buildroot} - %files %defattr(-,root,root) %doc LICENSE diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 08ac204e..18b7c1a9 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -40,9 +40,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install -%clean -rm -rf %{buildroot} - %files %defattr(-,root,root) %{_libdir}/ocaml/io-page/META diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index c03c963d..fce6d67e 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -43,9 +43,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml #export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf make install-types -%clean -rm -rf %{buildroot} - %files %{_libdir}/ocaml/mirage-types %exclude %{_libdir}/ocaml/mirage-types/*.mli diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index ecc2f045..03fbd2c2 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -43,9 +43,6 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml ocaml setup.ml -install rm -f %{buildroot}%{_libdir}/ocaml/usr/local/bin/opasswd_test -%clean -rm -rf %{buildroot} - %files %doc README.md %{_libdir}/ocaml/oPasswd diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index 52f26306..c7e5350b 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -46,9 +46,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install -%clean -rm -rf %{buildroot} - %files %defattr(-,root,root) %doc LICENSE diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 6ba85126..95da5f12 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -32,9 +32,6 @@ export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf make install -%clean -rm -rf %{buildroot} - %files # This space intentionally left blank From 3536ad3dcd60c6ff23682f20083ba4a00413da00 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 29 May 2014 11:22:40 +0100 Subject: [PATCH 0869/1125] SPECS: Remove %defattr tags The %defattr tag is no longer required: https://rwmj.wordpress.com/2012/10/12/clean-up-your-spec-files/ Signed-off-by: Euan Harris --- SPECS/ocaml-crc.spec | 2 -- SPECS/ocaml-gnt.spec | 1 - SPECS/ocaml-io-page.spec | 2 -- SPECS/ocaml-rrd-transport.spec | 2 -- SPECS/ocaml-sha.spec | 1 - 5 files changed, 8 deletions(-) diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec index 1c4c6189..0bbfc0e4 100644 --- a/SPECS/ocaml-crc.spec +++ b/SPECS/ocaml-crc.spec @@ -42,14 +42,12 @@ export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install %files -%defattr(-,root,root) %{_libdir}/ocaml/crc/META %{_libdir}/ocaml/crc/crc.cma %{_libdir}/ocaml/crc/crc.cmi %{_libdir}/ocaml/crc/dllcrc_stubs.so %files devel -%defattr(-,root,root) %doc ChangeLog README.md %{_libdir}/ocaml/crc/crc.a %{_libdir}/ocaml/crc/crc.cmx diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index ac4e0866..f843252e 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -48,7 +48,6 @@ export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install %files -%defattr(-,root,root) %doc LICENSE %doc ChangeLog README.md %{_libdir}/ocaml/xen-gnt diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 18b7c1a9..a3c48fc2 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -41,14 +41,12 @@ export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install %files -%defattr(-,root,root) %{_libdir}/ocaml/io-page/META %{_libdir}/ocaml/io-page/io_page.cma %{_libdir}/ocaml/io-page/io_page.cmi %{_libdir}/ocaml/io-page/dllio_page_unix_stubs.so %files devel -%defattr(-,root,root) %doc CHANGES README.md %{_libdir}/ocaml/io-page/io_page.a %{_libdir}/ocaml/io-page/io_page.cmx diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index c7e5350b..2effe0dd 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -47,7 +47,6 @@ export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install %files -%defattr(-,root,root) %doc LICENSE %{_libdir}/ocaml/rrd-transport/META %{_libdir}/ocaml/rrd-transport/rrd_transport.cma @@ -61,7 +60,6 @@ ocaml setup.ml -install %{_libdir}/ocaml/rrd-transport/rrd_writer.cmi %files devel -%defattr(-,root,root) %doc ChangeLog README.md %{_libdir}/ocaml/rrd-transport/rrd_transport.a %{_libdir}/ocaml/rrd-transport/rrd_transport.cmxa diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 95da5f12..c8a741cd 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -36,7 +36,6 @@ make install # This space intentionally left blank %files devel -%defattr(-,root,root) %doc README %{_libdir}/ocaml/sha/META From eb03067d0ebf378b63f75022c771a0a1248b613a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 12:01:04 +0100 Subject: [PATCH 0870/1125] SPECS: Make sure GitHub URLs use HTTPS Signed-off-by: Euan Harris --- SPECS/ocaml-cdrom.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-io-page.spec | 2 +- SPECS/ocaml-ipaddr.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-mirage-types.spec | 2 +- SPECS/ocaml-nbd.spec | 2 +- SPECS/ocaml-obuild.spec | 2 +- SPECS/ocaml-oclock.spec | 2 +- SPECS/ocaml-opasswd.spec | 2 +- SPECS/ocaml-qmp.spec | 2 +- SPECS/ocaml-re.spec | 4 ++-- SPECS/ocaml-sha.spec | 2 +- SPECS/ocaml-tar.spec | 2 +- SPECS/ocaml-vhd.spec | 2 +- SPECS/ocaml-xcp-inventory.spec | 2 +- SPECS/ocaml-xen-api-libs-transitional.spec | 2 +- SPECS/xenserver-install-wizard.spec | 2 +- SPECS/xsconsole.spec | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index b0b8c323..f3a4cffc 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 2%{?dist} Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception -URL: http://github.com/xapi-project/cdrom +URL: https://github.com/xapi-project/cdrom Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 9ccb118a..e8f9fbc2 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -5,7 +5,7 @@ Version: 1.0.1 Release: 1%{?dist} Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL -URL: http://github.com/xapi-project/ocaml-fd-send-recv +URL: https://github.com/xapi-project/ocaml-fd-send-recv Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index a3c48fc2..42d0c188 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -6,7 +6,7 @@ Release: 1%{?dist} Summary: Efficient handling of I/O memory pages on Unix and Xen. License: ISC URL: https://github.com/mirage/io-page -Source0: http://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz +Source0: https://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec index d7a3cdf9..c9539ff5 100644 --- a/SPECS/ocaml-ipaddr.spec +++ b/SPECS/ocaml-ipaddr.spec @@ -3,7 +3,7 @@ Version: 2.4.0 Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception -URL: http://github.com/mirage/ocaml-ipaddr +URL: https://github.com/mirage/ocaml-ipaddr Source0: https://github.com/mirage/ocaml-ipaddr/archive/%{version}/ocaml-ipaddr-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index b001360a..a0cadd21 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -5,7 +5,7 @@ Version: 0.9.1 Release: 1%{?dist} Summary: VHD manipulation via libvhd License: BSD3 -URL: http://github.com/xapi-project/libvhd +URL: https://github.com/xapi-project/libvhd Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz BuildRequires: libuuid-devel BuildRequires: ocaml diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index fce6d67e..68806355 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -6,7 +6,7 @@ Release: 1%{?dist} Summary: MirageOS interfaces License: ISC URL: https://github.com/mirage/mirage -Source0: http://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz +Source0: https://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib-devel diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index e57e6964..0b1101db 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -3,7 +3,7 @@ Version: 1.0.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Network Block Device protocol License: LGPL2.1 + OCaml linking exception -URL: http://github.com/xapi-project/nbd +URL: https://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec index ed1dda9c..bbdba566 100644 --- a/SPECS/ocaml-obuild.spec +++ b/SPECS/ocaml-obuild.spec @@ -5,7 +5,7 @@ Version: 0.0.2 Release: 1%{?dist} Summary: Simple build tool for OCaml programs License: BSD2 -URL: http://github.com/vincenthz/obuild +URL: https://github.com/vincenthz/obuild Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz BuildRequires: ocaml diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 68d34da1..7aa0ae65 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -6,7 +6,7 @@ Release: 2%{?dist} Summary: POSIX monotonic clock for OCaml License: ISC URL: https://github.com/polazarus/oclock -Source0: http://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz +Source0: https://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz Patch0: oclock-1-cc-headers Patch1: oclock-2-destdir BuildRequires: ocaml diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec index 03fbd2c2..7744c0c6 100644 --- a/SPECS/ocaml-opasswd.spec +++ b/SPECS/ocaml-opasswd.spec @@ -3,7 +3,7 @@ Version: 0.9.3 Release: 1%{?dist} Summary: OCaml interface to the glibc passwd/shadow password functions License: ISC -URL: http://github.com/xapi-project/ocaml-opasswd +URL: https://github.com/xapi-project/ocaml-opasswd Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz Patch0: ocaml-opasswd-ocaml-4.00.1.patch BuildRequires: ocaml diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index c1f86035..5ab6079f 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -5,7 +5,7 @@ Version: 0.9.2 Release: 1%{?dist} Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception -URL: http://github.com/xapi-project/ocaml-qmp +URL: https://github.com/xapi-project/ocaml-qmp Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cmdliner-devel diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index f84cd5d5..da869f45 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -5,8 +5,8 @@ Version: 1.2.1 Release: 1%{?dist} Summary: A regular expression library for OCaml License: LGPL -URL: http://github.com/ocaml/ocaml-re -Source0: http://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/ocaml/ocaml-re +Source0: https://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index c8a741cd..f3b60610 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -3,7 +3,7 @@ Version: 1.9 Release: 1%{?dist} Summary: OCaml SHA License: LGPL2.1 -URL: http://github.com/vincenthz/ocaml-sha +URL: https://github.com/vincenthz/ocaml-sha Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index 287d5f30..dbebaa39 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -3,7 +3,7 @@ Version: 0.2.1 Release: 1%{?dist} Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception -URL: http://github.com/djs55/ocaml-tar +URL: https://github.com/djs55/ocaml-tar Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 48544eb7..92c2a634 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -5,7 +5,7 @@ Version: 0.7.0 Release: 1%{?dist} Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception -URL: http://github.com/djs55/ocaml-vhd +URL: https://github.com/djs55/ocaml-vhd Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec index a912e71c..5c7f093b 100644 --- a/SPECS/ocaml-xcp-inventory.spec +++ b/SPECS/ocaml-xcp-inventory.spec @@ -5,7 +5,7 @@ Version: 0.9.0 Release: 1%{?dist} Summary: OCaml library to read and write the XCP inventory file License: LGPL2.1 + OCaml linking exception -URL: http://github.com/xapi-project/xcp-inventory +URL: https://github.com/xapi-project/xcp-inventory Source0: https://github.com/xapi-project/xcp-inventory/archive/xcp-inventory-%{version}/xcp-inventory-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cmdliner-devel diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index ff51ec5b..bead2c46 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -5,7 +5,7 @@ Version: 0.9.3 Release: 1%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception -URL: http://github.com/xapi-project/xen-api-libs-transitional +URL: https://github.com/xapi-project/xen-api-libs-transitional Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: forkexecd-devel BuildRequires: ocaml diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index af0da5b4..31aa8079 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -5,7 +5,7 @@ Name: xenserver-install-wizard Version: 0.2.30 Release: 1%{?dist} License: LGPL+linking exception -URL: http://github.com/xenserver/xenserver-install-wizard +URL: https://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Requires: newt Requires: python diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index 7467162d..b6b9a82b 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -3,7 +3,7 @@ Name: xsconsole Version: 0.9.0 Release: 2%{?dist} License: GPL2 -URL: http://github.com/jamesbulpin/xsconsole +URL: https://github.com/jamesbulpin/xsconsole Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz Requires: PyPAM Requires: xapi-python-devel From e805bef75acfdb9596d3d13a039a3b1765422eba Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 16:36:46 +0000 Subject: [PATCH 0871/1125] cmdliner: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-cmdliner.spec | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index 3ad77f73..0806ae6e 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -1,6 +1,6 @@ Name: ocaml-cmdliner Version: 0.9.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 URL: http://erratique.ch/software/cmdliner @@ -36,19 +36,30 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install %files -# This space intentionally left blank +%doc CHANGES +%doc README +%{_libdir}/ocaml/cmdliner +%exclude %{_libdir}/ocaml/cmdliner/*.a +%exclude %{_libdir}/ocaml/cmdliner/*.cmxa +%exclude %{_libdir}/ocaml/cmdliner/*.cmx +%exclude %{_libdir}/ocaml/cmdliner/*.mli %files devel -%doc README CHANGES -%{_libdir}/ocaml/cmdliner/* +%{_libdir}/ocaml/cmdliner/*.a +%{_libdir}/ocaml/cmdliner/*.cmx +%{_libdir}/ocaml/cmdliner/*.cmxa +%{_libdir}/ocaml/cmdliner/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.9.3-3 +- Split files correctly between base and devel packages + * Mon May 19 2014 Euan Harris - 0.9.3-2 - Switch to GitHub mirror From 19b6cf5966be28a4a55c70fee5b6749acd2f5c40 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 16:37:36 +0000 Subject: [PATCH 0872/1125] cppo: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/cppo.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index 02fe183a..d0c4edb8 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -20,9 +20,9 @@ make mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} - %files -%doc LICENSE README +%doc LICENSE +%doc README %{_bindir}/cppo %changelog From b416fe78fba0f7fde2988568c16569b0c2b98c50 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 16:41:32 +0000 Subject: [PATCH 0873/1125] deriving-ocsigen: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/deriving-ocsigen.spec | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec index 5768ca14..a8d5c514 100644 --- a/SPECS/deriving-ocsigen.spec +++ b/SPECS/deriving-ocsigen.spec @@ -1,9 +1,9 @@ Name: deriving-ocsigen Version: 0.3c -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extension to OCaml for deriving functions from type declarations License: MIT -URL: http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz +URL: http://ocsigen.org Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -27,19 +27,30 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install - %files -# This space intentionally left blank +%doc CHANGES +%doc COPYING +%doc README +%{_libdir}/ocaml/deriving-ocsigen +%exclude %{_libdir}/ocaml/deriving-ocsigen/*.a +%exclude %{_libdir}/ocaml/deriving-ocsigen/*.cmxa +%exclude %{_libdir}/ocaml/deriving-ocsigen/*.cmx +%exclude %{_libdir}/ocaml/deriving-ocsigen/*.mli %files devel -%doc COPYING README CHANGES -%{_libdir}/ocaml/deriving-ocsigen/* +%{_libdir}/ocaml/deriving-ocsigen/*.a +%{_libdir}/ocaml/deriving-ocsigen/*.cmx +%{_libdir}/ocaml/deriving-ocsigen/*.cmxa +%{_libdir}/ocaml/deriving-ocsigen/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.3c-2 +- Split files correctly between base and devel packages + * Fri May 31 2013 David Scott - 0.3c-1 - Initial package From feb5451a8cd3aec7455d5b9a663f749547d4b229 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 17 Apr 2014 16:56:51 +0000 Subject: [PATCH 0874/1125] ocaml-cdrom: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-cdrom.spec | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index f3a4cffc..423dfdb0 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -2,7 +2,7 @@ Name: ocaml-cdrom Version: 0.9.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Query the state of CDROM devices License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/cdrom @@ -27,9 +27,6 @@ developing applications that use %{name}. %setup -q -n cdrom-cdrom-%{version} %build -if [ -x ./configure ]; then - ./configure -fi make %install @@ -38,17 +35,27 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - %files -# This space intentionally left blank - -%files devel -%doc ChangeLog README.md -%{_libdir}/ocaml/cdrom/* +%doc ChangeLog +%doc README.md +%{_libdir}/ocaml/cdrom +%exclude %{_libdir}/ocaml/cdrom/*.a +%exclude %{_libdir}/ocaml/cdrom/*.cmxa +%exclude %{_libdir}/ocaml/cdrom/*.cmx +%exclude %{_libdir}/ocaml/cdrom/*.mli %{_libdir}/ocaml/stublibs/dllstubs_cdrom.so %{_libdir}/ocaml/stublibs/dllstubs_cdrom.so.owner +%files devel +%{_libdir}/ocaml/cdrom/*.a +%{_libdir}/ocaml/cdrom/*.cmx +%{_libdir}/ocaml/cdrom/*.cmxa +%{_libdir}/ocaml/cdrom/*.mli + %changelog +* Fri Apr 17 2014 Euan Harris - 0.9.1-3 +- Split files correctly between base and devel packages + * Tue May 28 2013 David Scott - 0.9.1-2 - Initial package From 60444f858f36c4a34d22341e160be642932ddb34 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:37:25 +0000 Subject: [PATCH 0875/1125] ocamlify: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocamlify.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec index 0e0dcea4..a81757e0 100644 --- a/SPECS/ocamlify.spec +++ b/SPECS/ocamlify.spec @@ -6,36 +6,29 @@ License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlify/ Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar.gz - BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib - %description Create OCaml source code by including whole files into OCaml string or string list. - %prep %setup -q - %build ./configure --prefix %{_prefix} --destdir %{buildroot} make - %install make install - %files %doc AUTHORS.txt %doc CHANGES.txt %doc COPYING.txt %{_bindir}/ocamlify - %changelog * Tue Mar 25 2014 Euan Harris - 0.0.2-1 - Initial package From 51f3262ab84b5617cd8457e03f5f2dd4449247a3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:40:43 +0000 Subject: [PATCH 0876/1125] ocaml-io-page: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-io-page.spec | 44 ++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec index 42d0c188..aaf74906 100644 --- a/SPECS/ocaml-io-page.spec +++ b/SPECS/ocaml-io-page.spec @@ -2,7 +2,7 @@ Name: ocaml-io-page Version: 1.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Efficient handling of I/O memory pages on Unix and Xen. License: ISC URL: https://github.com/mirage/io-page @@ -30,38 +30,34 @@ developing applications that use %{name}. %setup -q -n io-page-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}%{_libdir}/ocaml +make %install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install +make install %files -%{_libdir}/ocaml/io-page/META -%{_libdir}/ocaml/io-page/io_page.cma -%{_libdir}/ocaml/io-page/io_page.cmi -%{_libdir}/ocaml/io-page/dllio_page_unix_stubs.so +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/io-page +%exclude %{_libdir}/ocaml/io-page/*.a +%exclude %{_libdir}/ocaml/io-page/*.cmxa +%exclude %{_libdir}/ocaml/io-page/*.cmx +%exclude %{_libdir}/ocaml/io-page/*.mli %files devel -%doc CHANGES README.md -%{_libdir}/ocaml/io-page/io_page.a -%{_libdir}/ocaml/io-page/io_page.cmx -%{_libdir}/ocaml/io-page/io_page.cmxa -%{_libdir}/ocaml/io-page/io_page.cmxs -%{_libdir}/ocaml/io-page/io_page.mli -%{_libdir}/ocaml/io-page/libio_page_unix_stubs.a -%{_libdir}/ocaml/io-page/io_page_unix.a -%{_libdir}/ocaml/io-page/io_page_unix.cma -%{_libdir}/ocaml/io-page/io_page_unix.cmi -%{_libdir}/ocaml/io-page/io_page_unix.cmx -%{_libdir}/ocaml/io-page/io_page_unix.cmxa -%{_libdir}/ocaml/io-page/io_page_unix.cmxs -%{_libdir}/ocaml/io-page/io_page_unix.ml +%{_libdir}/ocaml/io-page/*.a +%{_libdir}/ocaml/io-page/*.cmx +%{_libdir}/ocaml/io-page/*.cmxa +%{_libdir}/ocaml/io-page/*.mli %changelog +* Fri May 30 2014 Euan Harris - 1.1.1-2 +- Split files corrrectly between base and devel packages + * Tue Apr 1 2014 Euan Harris - 1.1.1-1 - Initial package + From 618feb0d81b61d4d7bbed1ba6938ca4de8451552 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:41:29 +0000 Subject: [PATCH 0877/1125] ocaml-ipaddr: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-ipaddr.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec index c9539ff5..7fc10709 100644 --- a/SPECS/ocaml-ipaddr.spec +++ b/SPECS/ocaml-ipaddr.spec @@ -28,13 +28,11 @@ developing applications that use %{name}. %build make - %install mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install - %files %doc CHANGES %doc README.md @@ -45,14 +43,12 @@ make install %exclude %{_libdir}/ocaml/ipaddr/*.ml %exclude %{_libdir}/ocaml/ipaddr/*.mli - %files devel %{_libdir}/ocaml/ipaddr/*.a %{_libdir}/ocaml/ipaddr/*.cmx %{_libdir}/ocaml/ipaddr/*.cmxa %{_libdir}/ocaml/ipaddr/*.mli - %changelog * Tue Apr 1 2014 Euan Harris - 2.4.0-1 - Initial package From d45157bb1b13a88d3d6acad4e6b1ee8d430628a2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:52:19 +0000 Subject: [PATCH 0878/1125] ocaml-mirage-types: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-mirage-types.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 68806355..65cde14e 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -40,7 +40,6 @@ make build-types rm -rf %{buildroot} mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -#export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf make install-types %files @@ -50,7 +49,7 @@ make install-types %files devel %{_libdir}/ocaml/mirage-types/*.mli - %changelog * Tue Apr 1 2014 Euan Harris - 1.1.1-1 - Initial package + From cde371d62269f1a2c16632308d06eb29c95f834a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:52:47 +0000 Subject: [PATCH 0879/1125] ocamlmod: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocamlmod.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/SPECS/ocamlmod.spec b/SPECS/ocamlmod.spec index 9e035f02..1af359ca 100644 --- a/SPECS/ocamlmod.spec +++ b/SPECS/ocamlmod.spec @@ -6,35 +6,28 @@ License: LGPL URL: http://forge.ocamlcore.org/projects/ocamlmod/ Source0: http://forge.ocamlcore.org/frs/download.php/1350/%{name}-%{version}.tar.gz - BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ounit-devel >= 2.0.0 - %description Generate OCaml modules from source files. - %prep %setup -q - %build ./configure --prefix %{_prefix} --destdir %{buildroot} make - %install make install - %files %doc AUTHORS.txt %doc CHANGES.txt %{_bindir}/ocamlmod - %changelog * Tue Mar 25 2014 Euan Harris - 0.0.7-1 - Initial package From e6c1ec5d464aeeda29d3290c9013668b9a008825 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 10:54:03 +0000 Subject: [PATCH 0880/1125] ocaml-ounit: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-ounit.spec | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec index febf4420..9484212d 100644 --- a/SPECS/ocaml-ounit.spec +++ b/SPECS/ocaml-ounit.spec @@ -16,38 +16,31 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc - %description OUnit is a unit test framework for OCaml. It allows one to easily create unit-tests for OCaml code. It is based on HUnit, a unit testing framework for Haskell. It is similar to JUnit, and other xUnit testing frameworks. - %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} - %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. - %prep %setup -q -n ounit-%{version} - %build sh ./configure --destdir $RPM_BUILD_ROOT make all make doc - %check make test - %install export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs @@ -56,7 +49,6 @@ make install # Remove this, reinstall it properly with a %%doc rule below. rm -rf $RPM_BUILD_ROOT/usr/local/share/doc - %files %doc LICENSE.txt %{_libdir}/ocaml/oUnit @@ -66,7 +58,6 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %endif %exclude %{_libdir}/ocaml/oUnit/*.mli - %files devel %doc LICENSE.txt README.txt %doc _build/src/api-ounit.docdir/* @@ -76,7 +67,6 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %endif %{_libdir}/ocaml/oUnit/*.mli - %changelog * Tue Mar 25 2014 Euan Harris - 2.0.0-1 - Update to version 2.0.0 @@ -128,3 +118,4 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc * Sat May 3 2008 Richard W.M. Jones - 1.0.2-1 - Initial RPM release. + From 5f48f6818321cfa977b015981df3cc8a6db0a1df Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 14:57:33 +0000 Subject: [PATCH 0881/1125] ocaml-odn: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-odn.spec | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index 33190b45..16c326c7 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -15,46 +15,43 @@ BuildRequires: ocaml-ounit-devel >= 2.0.0 BuildRequires: ocaml-fileutils-devel >= 0.4.0 %description - +This library uses type-conv to dump OCaml data structure using OCaml data +notation. This kind of data dumping helps to write OCaml code generator, +like OASIS. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} BuildRequires: ocaml-type-conv%{_isa} >= 108.07.01 - %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. - %prep %setup -q -n ocaml-data-notation-%{version} - %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}/%{_libdir}/ocaml +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install - +mkdir -p $OCAMLFIND_DESTDIR +make install %files -%doc COPYING.txt CHANGES.txt -%{_libdir}/ocaml/odn/META -%{_libdir}/ocaml/odn/*.cma -%{_libdir}/ocaml/odn/*.cmi - +%doc CHANGES.txt +%doc COPYING.txt +%{_libdir}/ocaml/odn +%exclude %{_libdir}/ocaml/odn/*.a +%exclude %{_libdir}/ocaml/odn/*.cmxa +%exclude %{_libdir}/ocaml/odn/*.cmx %files devel %{_libdir}/ocaml/odn/*.a %{_libdir}/ocaml/odn/*.cmx %{_libdir}/ocaml/odn/*.cmxa -%exclude %{_libdir}/ocaml/odn/*.cmxs -%exclude %{_libdir}/ocaml/odn/*.ml %changelog * Tue Mar 25 2014 Euan Harris - 0.0.11-1 From 08e14a774220ba48e5542a4b395347bf77a83671 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 16:12:46 +0000 Subject: [PATCH 0882/1125] ocaml-react: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-react.spec | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 681a8f26..6d806bd3 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -3,13 +3,10 @@ Name: ocaml-react Version: 0.9.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) - - License: BSD URL: http://erratique.ch/software/react - Source0: https://github.com/dbuenzli/react/archive/v%{version}/react-%{version}.tar.gz Source1: react-LICENSE @@ -30,17 +27,14 @@ the new BSD license. Given an absolute notion of time Rtime helps you to manage a timeline and provides time stamp events, delayed events and delayed signals. - %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} - %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. - %prep %setup -q -n react-%{version} cp %{SOURCE1} LICENSE @@ -51,20 +45,30 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install %files -# This space intentionally left blank +%doc CHANGES +%doc README +%{_libdir}/ocaml/react +%exclude %{_libdir}/ocaml/react/*.a +%exclude %{_libdir}/ocaml/react/*.cmxa +%exclude %{_libdir}/ocaml/react/*.cmx +%exclude %{_libdir}/ocaml/react/*.mli %files devel -%doc CHANGES README -%{_libdir}/ocaml/react/* - +%{_libdir}/ocaml/react/*.a +%{_libdir}/ocaml/react/*.cmx +%{_libdir}/ocaml/react/*.cmxa +%{_libdir}/ocaml/react/*.mli %changelog +* Thu May 29 2014 Euan Harris - 0.9.4-3 +- Split files correctly between base and devel packages + * Mon May 19 2014 Euan Harris - 0.9.4-2 - Switch to GitHub mirror From 57edbc32529ea09be7091d38baf82cfe00d6f496 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 16:16:59 +0000 Subject: [PATCH 0883/1125] ocaml-rpc: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-rpc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec index 68fc56af..b5dd4225 100644 --- a/SPECS/ocaml-rpc.spec +++ b/SPECS/ocaml-rpc.spec @@ -36,8 +36,8 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} From ec4dc709efc2f27d2586e4c3d96531671c4d46c3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 22 Apr 2014 16:25:05 +0000 Subject: [PATCH 0884/1125] ocaml-sha: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-sha.spec | 49 ++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index f3b60610..70466c03 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -1,6 +1,6 @@ Name: ocaml-sha Version: 1.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml SHA License: LGPL2.1 URL: https://github.com/vincenthz/ocaml-sha @@ -26,46 +26,27 @@ developing applications that use %{name}. make %install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +mkdir -p $OCAMLFIND_DESTDIR make install %files -# This space intentionally left blank - -%files devel %doc README +%{_libdir}/ocaml/sha +%exclude %{_libdir}/ocaml/sha/*.a +%exclude %{_libdir}/ocaml/sha/*.cmxa +%exclude %{_libdir}/ocaml/sha/*.cmx -%{_libdir}/ocaml/sha/META -%{_libdir}/ocaml/sha/libsha.a -%{_libdir}/ocaml/sha/libsha1.a -%{_libdir}/ocaml/sha/libsha256.a -%{_libdir}/ocaml/sha/libsha512.a -%{_libdir}/ocaml/sha/sha.a -%{_libdir}/ocaml/sha/sha.cma -%{_libdir}/ocaml/sha/sha.cmxa -%{_libdir}/ocaml/sha/sha1.a -%{_libdir}/ocaml/sha/sha1.cma -%{_libdir}/ocaml/sha/sha1.cmi -%{_libdir}/ocaml/sha/sha1.cmx -%{_libdir}/ocaml/sha/sha1.cmxa -%{_libdir}/ocaml/sha/sha256.a -%{_libdir}/ocaml/sha/sha256.cma -%{_libdir}/ocaml/sha/sha256.cmi -%{_libdir}/ocaml/sha/sha256.cmx -%{_libdir}/ocaml/sha/sha256.cmxa -%{_libdir}/ocaml/sha/sha512.a -%{_libdir}/ocaml/sha/sha512.cma -%{_libdir}/ocaml/sha/sha512.cmi -%{_libdir}/ocaml/sha/sha512.cmx -%{_libdir}/ocaml/sha/sha512.cmxa -%{_libdir}/ocaml/sha/dllsha.so -%{_libdir}/ocaml/sha/dllsha1.so -%{_libdir}/ocaml/sha/dllsha256.so -%{_libdir}/ocaml/sha/dllsha512.so +%files devel +%{_libdir}/ocaml/sha/*.a +%{_libdir}/ocaml/sha/*.cmx +%{_libdir}/ocaml/sha/*.cmxa %changelog -* Mon Nov 18 2013 David Scott +* Tue Apr 22 2014 Euan Harris - 1.9-2 +- Split files correctly between base and devel packages + +* Mon Nov 18 2013 David Scott - 1.9-1 - Initial package + From d0124ba91e07aecc2c4adaa9418092841025d662 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:12:51 +0100 Subject: [PATCH 0885/1125] ocaml-biniou: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-biniou.spec | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec index 82f45103..70d1c4a0 100644 --- a/SPECS/ocaml-biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -2,7 +2,7 @@ Name: ocaml-biniou Version: 1.0.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Compact, fast and extensible serialization format License: BSD3 URL: http://mjambon.com/biniou.html @@ -32,20 +32,31 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} %files -#This space intentionally left blank +%doc LICENSE +%doc README.md +%{_bindir}/bdump +%{_libdir}/ocaml/biniou +%exclude %{_libdir}/ocaml/biniou/*.a +%exclude %{_libdir}/ocaml/biniou/*.cmxa +%exclude %{_libdir}/ocaml/biniou/*.cmx +%exclude %{_libdir}/ocaml/biniou/*.mli %files devel -%doc LICENSE README.md -%{_libdir}/ocaml/biniou/* -%{_bindir}/bdump +%{_libdir}/ocaml/biniou/*.a +%{_libdir}/ocaml/biniou/*.cmx +%{_libdir}/ocaml/biniou/*.cmxa +%{_libdir}/ocaml/biniou/*.mli %changelog +* Fri May 30 2014 Euan Harris - 1.0.6-2 +- Split files correctly between base and devel packages + * Fri May 31 2013 David Scott - 1.0.6-1 - Initial package From ba55b6a8207ec90d91f4053ce06f70417da1eb97 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:14:30 +0100 Subject: [PATCH 0886/1125] ocaml-easy-format: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-easy-format.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-easy-format.spec b/SPECS/ocaml-easy-format.spec index 0669c845..e23c775e 100644 --- a/SPECS/ocaml-easy-format.spec +++ b/SPECS/ocaml-easy-format.spec @@ -1,6 +1,6 @@ Name: ocaml-easy-format Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Indentation made easy License: BSD3 URL: http://mjambon.com/easy-format.html @@ -27,18 +27,25 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install %files -#This space intentionally left blank +%doc LICENSE +%doc README +%{_libdir}/ocaml/easy-format +%exclude %{_libdir}/ocaml/easy-format/*.cmx +%exclude %{_libdir}/ocaml/easy-format/*.mli %files devel -%doc LICENSE README -%{_libdir}/ocaml/easy-format/* +%{_libdir}/ocaml/easy-format/*.cmx +%{_libdir}/ocaml/easy-format/*.mli %changelog +* Fri May 30 2014 Euan Harris - 1.0.1-2 +- Split files correctly between base and devel packages + * Fri May 31 2013 David Scott - 1.0.1-1 - Initial package From 12d2b7015ae876bbba7b28b57a1ec2d7b97b147f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:16:44 +0100 Subject: [PATCH 0887/1125] ocaml-cohttp: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-cohttp.spec | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 54548d34..50180c64 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -2,7 +2,7 @@ Name: ocaml-cohttp Version: 0.9.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An HTTP library for OCaml License: LGPL URL: https://github.com/mirage/ocaml-cohttp @@ -14,9 +14,8 @@ BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-re-devel +BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-uri-devel -# should this be inherited from ssl.spec somehow? -BuildRequires: openssl-devel %description An HTTP library for OCaml. @@ -26,6 +25,7 @@ Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-lwt-devel%{?_isa} Requires: ocaml-re-devel%{?_isa} +Requires: ocaml-ssl-devel%{?_isa} Requires: ocaml-uri-devel%{?_isa} %description devel @@ -39,19 +39,30 @@ developing applications that use %{name}. make build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install - %files -# This space intentionally left blank +%doc CHANGES +%doc LICENSE +%doc README.md +%{_libdir}/ocaml/cohttp +%exclude %{_libdir}/ocaml/cohttp/*.a +%exclude %{_libdir}/ocaml/cohttp/*.cmxa +%exclude %{_libdir}/ocaml/cohttp/*.cmx +%exclude %{_libdir}/ocaml/cohttp/*.mli %files devel -%doc LICENSE README.md CHANGES -%{_libdir}/ocaml/cohttp/* +%{_libdir}/ocaml/cohttp/*.a +%{_libdir}/ocaml/cohttp/*.cmx +%{_libdir}/ocaml/cohttp/*.cmxa +%{_libdir}/ocaml/cohttp/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.9.8-2 +- Split files correctly between base and devel packages + * Thu May 30 2013 David Scott - 0.9.8-1 - Initial package From c9111bf3444cd1ee8a32a79f0a8b1346a106d24d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:18:08 +0100 Subject: [PATCH 0888/1125] ocaml-ocplib-endian: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-ocplib-endian.spec | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 2da2011c..1a0d8832 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -2,7 +2,7 @@ Name: ocaml-ocplib-endian Version: 0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays License: LGPL URL: https://github.com/OCamlPro/ocplib-endian @@ -43,19 +43,29 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install - %files -# This space intentionally left blank +%doc COPYING.txt +%doc README.md +%{_libdir}/ocaml/ocplib-endian +%exclude %{_libdir}/ocaml/ocplib-endian/*.a +%exclude %{_libdir}/ocaml/ocplib-endian/*.cmxa +%exclude %{_libdir}/ocaml/ocplib-endian/*.cmx +%exclude %{_libdir}/ocaml/ocplib-endian/*.mli %files devel -%doc COPYING.txt README.md -%{_libdir}/ocaml/ocplib-endian/* +%{_libdir}/ocaml/ocplib-endian/*.a +%{_libdir}/ocaml/ocplib-endian/*.cmx +%{_libdir}/ocaml/ocplib-endian/*.cmxa +%{_libdir}/ocaml/ocplib-endian/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.4-2 +- Split files correctly between base and devel packages + * Fri May 31 2013 David Scott - 0.4-1 - Initial package From dfdfeea7c10703bb27b775281ae4618447f7eb05 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:19:41 +0100 Subject: [PATCH 0889/1125] ocaml-cstruct: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-cstruct.spec | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 25cad8d0..cf267d89 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -2,7 +2,7 @@ Name: ocaml-cstruct Version: 0.7.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Read and write low-level C-style structures in OCaml License: ISC URL: https://github.com/mirage/ocaml-cstruct @@ -33,24 +33,33 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml --enable-lwt ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs - export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore ocaml setup.ml -install DESTDIR=%{buildroot} - %files -# This space intentionally left blank - -%files devel -%doc README.md CHANGES -%{_libdir}/ocaml/cstruct/* +%doc README.md +%doc CHANGES +%{_libdir}/ocaml/cstruct +%exclude %{_libdir}/ocaml/cstruct/*.a +%exclude %{_libdir}/ocaml/cstruct/*.cmxa +%exclude %{_libdir}/ocaml/cstruct/*.cmx +%exclude %{_libdir}/ocaml/cstruct/*.mli %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so %{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner +%files devel +%{_libdir}/ocaml/cstruct/*.a +%{_libdir}/ocaml/cstruct/*.cmx +%{_libdir}/ocaml/cstruct/*.cmxa +%{_libdir}/ocaml/cstruct/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 0.7.1-3 +- Split files correctly between base and devel packages + * Mon Sep 23 2013 David Scott - 0.7.1-2 - Add dependency on lwt so the cstruct.lwt package is built From 7f29836e101a142261566a02fbc9dd6cf1dccfe0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:37:30 +0100 Subject: [PATCH 0890/1125] ocaml-fd-send-recv: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-fd-send-recv.spec | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index e8f9fbc2..86830e0d 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -2,7 +2,7 @@ Name: ocaml-fd-send-recv Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Bindings to sendmsg/recvmsg for fd passing under Linux License: LGPL URL: https://github.com/xapi-project/ocaml-fd-send-recv @@ -29,23 +29,33 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +make install %files -# This space intentionally left blank - -%files devel -%doc README.md LICENSE -%{_libdir}/ocaml/fd-send-recv/* +%doc LICENSE +%doc README.md +%{_libdir}/ocaml/fd-send-recv +%exclude %{_libdir}/ocaml/fd-send-recv/*.a +%exclude %{_libdir}/ocaml/fd-send-recv/*.cmxa +%exclude %{_libdir}/ocaml/fd-send-recv/*.cmx +%exclude %{_libdir}/ocaml/fd-send-recv/*.mli %{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so %{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so.owner +%files devel +%{_libdir}/ocaml/fd-send-recv/*.a +%{_libdir}/ocaml/fd-send-recv/*.cmx +%{_libdir}/ocaml/fd-send-recv/*.cmxa +%{_libdir}/ocaml/fd-send-recv/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 1.0.1-2 +- Split files correctly between base and devel packages + * Fri May 31 2013 David Scott - 1.0.1-1 - Initial package From e16d2e1d210087f0402a5def0fa13435905e414d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:40:46 +0100 Subject: [PATCH 0891/1125] ocaml-lambda-term: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-lambda-term.spec | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 9e04a13a..60e198ca 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -2,7 +2,7 @@ Name: ocaml-lambda-term Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 URL: http://forge.ocamlcore.org/projects/lambda-term/ @@ -33,29 +33,39 @@ developing applications that use %{name}. %setup -q -n lambda-term-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}/%{_libdir}/ocaml +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs - export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install +make install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions %files -# This space intentionally left blank - -%files devel -%doc LICENSE CHANGES -%{_libdir}/ocaml/lambda-term/* +%doc CHANGES +%doc LICENSE +%{_libdir}/ocaml/lambda-term +%exclude %{_libdir}/ocaml/lambda-term/*.a +%exclude %{_libdir}/ocaml/lambda-term/*.cmxa +%exclude %{_libdir}/ocaml/lambda-term/*.cmx +%exclude %{_libdir}/ocaml/lambda-term/*.mli %{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so %{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner +%files devel +%{_libdir}/ocaml/lambda-term/*.a +%{_libdir}/ocaml/lambda-term/*.cmx +%{_libdir}/ocaml/lambda-term/*.cmxa +%{_libdir}/ocaml/lambda-term/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 1.2-2 +- Split files correctly between base and devel packages + * Thu Jun 6 2013 David Scott - 1.2-1 - Initial package From a70541e19be6fe1d5db02b372b7d74304473bd7c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:42:38 +0100 Subject: [PATCH 0892/1125] ocaml-libvhd: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-libvhd.spec | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index a0cadd21..e7f00046 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -2,7 +2,7 @@ Name: ocaml-libvhd Version: 0.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: VHD manipulation via libvhd License: BSD3 URL: https://github.com/xapi-project/libvhd @@ -30,26 +30,36 @@ developing applications that use %{name}. %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +make install %files -# This space intentionally left blank - -%files devel -%doc ChangeLog README.md -%{_libdir}/ocaml/vhdlib/* +%doc ChangeLog +%doc README.md +%{_libdir}/ocaml/vhdlib +%exclude %{_libdir}/ocaml/vhdlib/*.a +%exclude %{_libdir}/ocaml/vhdlib/*.cmxa +%exclude %{_libdir}/ocaml/vhdlib/*.cmx +%exclude %{_libdir}/ocaml/vhdlib/*.mli %{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so %{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so.owner +%files devel +%{_libdir}/ocaml/vhdlib/*.a +%{_libdir}/ocaml/vhdlib/*.cmx +%{_libdir}/ocaml/vhdlib/*.cmxa +%{_libdir}/ocaml/vhdlib/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 0.9.1-2 +- Split files correctly between base and devel packages + * Wed May 29 2013 David Scott - 0.9.1-1 - Initial package From 84d26c724f08b6cd49b1df88454571a581484721 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:44:09 +0100 Subject: [PATCH 0893/1125] ocaml-nbd: Tidy up spec file Signed-off-by: Euan Harris --- SPECS/ocaml-nbd.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec index 0b1101db..ace030b6 100644 --- a/SPECS/ocaml-nbd.spec +++ b/SPECS/ocaml-nbd.spec @@ -6,7 +6,6 @@ License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/nbd Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz - BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-cmdliner-devel @@ -14,39 +13,32 @@ BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lwt-devel - %description An implementation of the Network Block Device protocol for both regular Unix and Lwt in OCaml. This library allows applications to access remote block devices. - %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} BuildRequires: ocaml-cstruct-devel%{?_isa} - %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. - %prep %setup -q -n nbd-%{version} - %build ./configure --prefix %{_prefix} --destdir %{buildroot} make - %install export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install - %files %doc ChangeLog %doc LICENSE @@ -60,14 +52,12 @@ make install %exclude %{_libdir}/ocaml/nbd/*.ml %exclude %{_libdir}/ocaml/nbd/*.mli - %files devel %{_libdir}/ocaml/nbd/*.a %{_libdir}/ocaml/nbd/*.cmx %{_libdir}/ocaml/nbd/*.cmxa %{_libdir}/ocaml/nbd/*.mli - %changelog * Mon Mar 31 2014 Euan Harris - 1.0.2-1 - Update to 1.0.2, removing dependency on ocaml-obuild From 078d2b882b55116ff7c74dcbbf0733d69a94b858 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:45:53 +0100 Subject: [PATCH 0894/1125] ocaml-qmp: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-qmp.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec index 5ab6079f..8279e918 100644 --- a/SPECS/ocaml-qmp.spec +++ b/SPECS/ocaml-qmp.spec @@ -2,7 +2,7 @@ Name: ocaml-qmp Version: 0.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/ocaml-qmp @@ -32,25 +32,31 @@ developing applications that use %{name}. %setup -q %build -if [ -x ./configure ]; then - ./configure -fi make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - %files -# This space intentionally left blank +%doc ChangeLog +%doc README.md +%doc LICENSE +%{_libdir}/ocaml/qmp +%exclude %{_libdir}/ocaml/qmp/*.a +%exclude %{_libdir}/ocaml/qmp/*.cmxa +%exclude %{_libdir}/ocaml/qmp/*.cmx %files devel -%doc ChangeLog README.md LICENSE - -%{_libdir}/ocaml/qmp/* +%{_libdir}/ocaml/qmp/*.a +%{_libdir}/ocaml/qmp/*.cmx +%{_libdir}/ocaml/qmp/*.cmxa %changelog +* Fri May 30 2014 Euan Harris - 0.9.2-2 +- Split files correctly between base and devel packages + * Thu Mar 27 2014 Euan Harris - 0.9.2-1 - Add support for QMP 'change' command, used to change removable media and reconfigure VNC. From a7c2fe9583a3932e830115c679cda03b134a0526 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:48:07 +0100 Subject: [PATCH 0895/1125] ocaml-netdev: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-netdev.spec | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index 5b2f7da5..eba903da 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -2,7 +2,7 @@ Name: ocaml-netdev Version: 0.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml License: LGPL URL: https://github.com/xapi-project/netdev @@ -29,27 +29,39 @@ developing applications that use %{name}. %setup -q -n netdev-netdev-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}/%{_libdir}/ocaml +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +make install %files -# This space intentionally left blank - -%files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/netdev/* +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/netdev +%exclude %{_libdir}/ocaml/netdev/*.a +%exclude %{_libdir}/ocaml/netdev/*.cmxa +%exclude %{_libdir}/ocaml/netdev/*.cmx +%exclude %{_libdir}/ocaml/netdev/*.mli %{_libdir}/ocaml/stublibs/dllnetdev_stubs.so %{_libdir}/ocaml/stublibs/dllnetdev_stubs.so.owner +%files devel +%{_libdir}/ocaml/netdev/*.a +%{_libdir}/ocaml/netdev/*.cmx +%{_libdir}/ocaml/netdev/*.cmxa +%{_libdir}/ocaml/netdev/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 0.9.0-2 +- Split files correctly between base and devel packages + * Thu May 30 2013 David Scott - 0.9.0-1 - Initial package From 8802fda4b6e1a7883104ddb151f6ee6d7382fd87 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:51:00 +0100 Subject: [PATCH 0896/1125] ocaml-oclock: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-oclock.spec | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec index 7aa0ae65..92b39500 100644 --- a/SPECS/ocaml-oclock.spec +++ b/SPECS/ocaml-oclock.spec @@ -2,7 +2,7 @@ Name: ocaml-oclock Version: 0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: POSIX monotonic clock for OCaml License: ISC URL: https://github.com/polazarus/oclock @@ -29,28 +29,32 @@ developing applications that use %{name}. %patch1 -p1 %build -if [ -x ./configure ]; then - ./configure -fi make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs +export OCAMLFIND_DISTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DISTDIR +mkdir -p $OCAMLFIND_DISTDIR/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - %files -# This space intentionally left blank - -%files devel -%doc LICENSE README.markdown -%{_libdir}/ocaml/oclock/* +%doc LICENSE +%doc README.markdown +%{_libdir}/ocaml/oclock +%exclude %{_libdir}/ocaml/oclock/*.a +%exclude %{_libdir}/ocaml/oclock/*.cmxa %{_libdir}/ocaml/stublibs/dlloclock.so %{_libdir}/ocaml/stublibs/dlloclock.so.owner +%files devel +%{_libdir}/ocaml/oclock/*.a +%{_libdir}/ocaml/oclock/*.cmxa + %changelog +* Fri May 30 2014 Euan Harris - 0.3-3 +- Split files correctly between base and devel packages + * Wed May 29 2013 David Scott - 0.3-2 - Initial package From 42ac5ab8349997fda47915f36beb4c4686602251 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:53:41 +0100 Subject: [PATCH 0897/1125] ocaml-re: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-re.spec | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index da869f45..cbde5d7e 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -2,7 +2,7 @@ Name: ocaml-re Version: 1.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A regular expression library for OCaml License: LGPL URL: https://github.com/ocaml/ocaml-re @@ -26,23 +26,36 @@ developing applications that use %{name}. %setup -q -n %{name}-%{name}-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +ocaml setup.ml -configure --destdir %{buildroot} +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install - +mkdir -p $OCAMLFIND_DESTDIR +make install %files -# This space intentionally left blank +%doc CHANGES +%doc LICENSE +%doc README +%{_libdir}/ocaml/re +%exclude %{_libdir}/ocaml/re/*.a +%exclude %{_libdir}/ocaml/re/*.cmxa +%exclude %{_libdir}/ocaml/re/*.cmx +%exclude %{_libdir}/ocaml/re/*.mli %files devel -%doc LICENSE README CHANGES -%{_libdir}/ocaml/re/* +%doc re-api.docdir/* +%exclude /usr/local/share/doc/re/ +%{_libdir}/ocaml/re/*.a +%{_libdir}/ocaml/re/*.cmx +%{_libdir}/ocaml/re/*.cmxa +%{_libdir}/ocaml/re/*.mli %changelog +* Fri May 30 2014 Euan Harris - 1.2.1-2 +- Split files correctly between base and devel packages + * Thu May 30 2013 David Scott - 1.2.1-1 - Initial package From cc4da52040e8e857371f673886bbbec3de3ac87b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:56:01 +0100 Subject: [PATCH 0898/1125] ocaml-sexplib: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-sexplib.spec | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index ad39e356..246469b8 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -2,7 +2,7 @@ Name: ocaml-sexplib Version: 109.20.00 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert values to and from s-expressions in OCaml License: LGPLv2+ with exceptions and BSD @@ -41,13 +41,30 @@ mkdir -p $OCAMLFIND_DESTDIR make install %files -#This space intentionally left blank +%doc CHANGES.txt +%doc COPYRIGHT.txt +%doc INRIA-DISCLAIMER.txt +%doc INSTALL.txt +%doc LICENSE.txt +%doc LICENSE-Tywith.txt +%doc README.md +%doc THIRD-PARTY.txt +%{_libdir}/ocaml/sexplib +%exclude %{_libdir}/ocaml/sexplib/*.a +%exclude %{_libdir}/ocaml/sexplib/*.cmxa +%exclude %{_libdir}/ocaml/sexplib/*.cmx +%exclude %{_libdir}/ocaml/sexplib/*.mli %files devel -%doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt -%{_libdir}/ocaml/sexplib +%{_libdir}/ocaml/sexplib/*.a +%{_libdir}/ocaml/sexplib/*.cmx +%{_libdir}/ocaml/sexplib/*.cmxa +%{_libdir}/ocaml/sexplib/*.mli %changelog +* Fri May 30 2014 Euan Harris - 109.20.00-2 +- Split files correctly between base and devel packages + * Mon Jun 3 2013 David Scott - 109.20.00-1 - Initial package From a89c7ff4f7a77a1e3b9ce37e3cdd1ad36bd61bc2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 11:57:50 +0100 Subject: [PATCH 0899/1125] ocaml-ssl: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-ssl.spec | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 91355a59..3137eb99 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -2,7 +2,7 @@ Name: ocaml-ssl Version: 0.4.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Use OpenSSL from OCaml License: LGPL URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl @@ -28,30 +28,39 @@ developing applications that use %{name}. %build ./configure -# --disable-ldconf make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=%{buildroot} - %files -#This space intentionally left blank - -%files devel -%doc CHANGES COPYING README -%{_libdir}/ocaml/ssl/* +%doc CHANGES +%doc COPYING +%doc README +%{_libdir}/ocaml/ssl +%exclude %{_libdir}/ocaml/ssl/*.a +%exclude %{_libdir}/ocaml/ssl/*.cmxa +%exclude %{_libdir}/ocaml/ssl/*.cmx +%exclude %{_libdir}/ocaml/ssl/*.mli %{_libdir}/ocaml/stublibs/dllssl_stubs.so %{_libdir}/ocaml/stublibs/dllssl_stubs.so.owner - %{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so %{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so.owner +%files devel +%{_libdir}/ocaml/ssl/*.a +%{_libdir}/ocaml/ssl/*.cmx +%{_libdir}/ocaml/ssl/*.cmxa +%{_libdir}/ocaml/ssl/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 0.4.6-2 +- Split files correctly between base and devel packages + * Sun Jun 2 2013 David Scott - 0.4.6-1 - Initial package From c1dbe63643b27b2f5775200b7a76bfa29fd55310 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 12:03:21 +0100 Subject: [PATCH 0900/1125] ocaml-stdext: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-stdext.spec | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec index 2933f1d1..e66d991a 100644 --- a/SPECS/ocaml-stdext.spec +++ b/SPECS/ocaml-stdext.spec @@ -2,7 +2,7 @@ Name: ocaml-stdext Version: 0.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Deprecated misc library functions for OCaml License: LGPL URL: https://github.com/xapi-project/stdext @@ -32,23 +32,32 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} - %files -#This space intentionally left blank - -%files devel %doc README.md -%{_libdir}/ocaml/stdext/* +%{_libdir}/ocaml/stdext +%exclude %{_libdir}/ocaml/stdext/*.a +%exclude %{_libdir}/ocaml/stdext/*.cmxa +%exclude %{_libdir}/ocaml/stdext/*.cmx +%exclude %{_libdir}/ocaml/stdext/*.mli %{_libdir}/ocaml/stublibs/dllstdext_stubs.so %{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner +%files devel +%{_libdir}/ocaml/stdext/*.a +%{_libdir}/ocaml/stdext/*.cmx +%{_libdir}/ocaml/stdext/*.cmxa +%{_libdir}/ocaml/stdext/*.mli + %changelog +* Fri May 30 2014 Euan Harris - 0.10.0-2 +- Split files correctly between base and devel packages + * Tue Apr 1 2014 Euan Harris - 0.10.0-1 - Update to 0.10.0, removing the Tar module (use ocaml-tar instead) From 9b652d1c279de7f16e35707ebf553964e53818b8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 12:05:05 +0100 Subject: [PATCH 0901/1125] ocaml-tapctl: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-tapctl.spec | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index eb68f4b8..773c7501 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -2,7 +2,7 @@ Name: ocaml-tapctl Version: 0.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manipulate running tapdisk instances License: LGPL URL: https://github.com/xapi-project/tapctl @@ -32,24 +32,36 @@ developing applications that use %{name}. %setup -q -n tapctl-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}/%{_libdir}/ocaml +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +make install %files -#This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/tapctl +%exclude %{_libdir}/ocaml/tapctl/*.a +%exclude %{_libdir}/ocaml/tapctl/*.cmxa +%exclude %{_libdir}/ocaml/tapctl/*.cmx +%exclude %{_libdir}/ocaml/tapctl/*.mli %files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/tapctl/* +%{_libdir}/ocaml/tapctl/*.a +%{_libdir}/ocaml/tapctl/*.cmx +%{_libdir}/ocaml/tapctl/*.cmxa +%{_libdir}/ocaml/tapctl/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.9.1-2 +- Split files correctly between base and devel packages + * Fri Oct 25 2013 David Scott - 0.9.1-1 - Update to 0.9.1 From 396d298ed892f8fc7afb499f2839b2f54a7e0cfd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 12:08:29 +0100 Subject: [PATCH 0902/1125] ocaml-tar: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-tar.spec | 45 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index dbebaa39..e9dc29a1 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -1,6 +1,6 @@ Name: ocaml-tar Version: 0.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception URL: https://github.com/djs55/ocaml-tar @@ -28,48 +28,35 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{version} +%setup -q %build ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf ocaml setup.ml -install - %files -# This space intentionally left blank - -%files devel %doc README.md +%{_libdir}/ocaml/tar +%exclude %{_libdir}/ocaml/tar/*.a +%exclude %{_libdir}/ocaml/tar/*.cmxa +%exclude %{_libdir}/ocaml/tar/*.cmx +%exclude %{_libdir}/ocaml/tar/*.mli -%{_libdir}/ocaml/tar/META -%{_libdir}/ocaml/tar/tar.a -%{_libdir}/ocaml/tar/tar.cma -%{_libdir}/ocaml/tar/tar.cmi -%{_libdir}/ocaml/tar/tar.cmx -%{_libdir}/ocaml/tar/tar.cmxa -%{_libdir}/ocaml/tar/tar.cmxs -%{_libdir}/ocaml/tar/tar.mli -%{_libdir}/ocaml/tar/tar_lwt_unix.a -%{_libdir}/ocaml/tar/tar_lwt_unix.cma -%{_libdir}/ocaml/tar/tar_lwt_unix.cmi -%{_libdir}/ocaml/tar/tar_lwt_unix.cmx -%{_libdir}/ocaml/tar/tar_lwt_unix.cmxa -%{_libdir}/ocaml/tar/tar_lwt_unix.cmxs -%{_libdir}/ocaml/tar/tar_lwt_unix.mli -%{_libdir}/ocaml/tar/tar_unix.a -%{_libdir}/ocaml/tar/tar_unix.cma -%{_libdir}/ocaml/tar/tar_unix.cmi -%{_libdir}/ocaml/tar/tar_unix.cmx -%{_libdir}/ocaml/tar/tar_unix.cmxa -%{_libdir}/ocaml/tar/tar_unix.cmxs -%{_libdir}/ocaml/tar/tar_unix.mli +%files devel +%{_libdir}/ocaml/tar/*.a +%{_libdir}/ocaml/tar/*.cmx +%{_libdir}/ocaml/tar/*.cmxa +%{_libdir}/ocaml/tar/*.mli %changelog +* Fri May 30 2014 Euan Harris - 0.2.1-2 +- Split files correctly between base and devel packages + * Fri Nov 15 2013 David Scott - 0.2.1-1 - Initial package From 6828d0d4718bf845a8aa4ee235a11d9977a8977f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 30 May 2014 12:09:45 +0100 Subject: [PATCH 0903/1125] ocaml-yojson: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-yojson.spec | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 14717788..1e271ab1 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -2,8 +2,8 @@ Name: ocaml-yojson Version: 1.1.6 -Release: 1%{?dist} -Summary: A JSON parser and priter for OCaml +Release: 2%{?dist} +Summary: A JSON parser and printer for OCaml License: BSD3 URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz @@ -33,21 +33,27 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR mkdir -p %{buildroot}/%{_bindir} make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} - %files -#This space intentionally left blank +%doc README.md +%doc LICENSE +%{_bindir}/ydump +%{_libdir}/ocaml/yojson +%exclude %{_libdir}/ocaml/yojson/*.cmx +%exclude %{_libdir}/ocaml/yojson/*.mli %files devel -%doc README.md LICENSE -%{_libdir}/ocaml/yojson/* -%{_bindir}/ydump +%{_libdir}/ocaml/yojson/*.cmx +%{_libdir}/ocaml/yojson/*.mli %changelog +* Fri May 30 2014 Euan Harris - 1.1.6-2 +- Split files correctly between base and devel packages + * Thu May 30 2013 David Scott - 1.1.6-1 - Initial package From 0917f8e399b536cb3de05abe67443b3083447037 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 11:15:21 +0100 Subject: [PATCH 0904/1125] ocaml-text: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-text.spec | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 38ef6bcb..7fa8178e 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -3,7 +3,7 @@ Name: ocaml-text Version: 0.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for dealing with unicode text conveniently License: BSD @@ -16,7 +16,6 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-camlp4 BuildRequires: ocaml-ocamldoc - %description OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. @@ -29,34 +28,44 @@ Requires: %{name} = %{version}-%{release} The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. - %prep %setup -q %build -ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr -ocaml setup.ml -build -ocaml setup.ml -doc +./configure --destdir $RPM_BUILD_ROOT --prefix /usr +make +make doc %install export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install +make install # Remove this, reinstall it properly with a %%doc rule below. rm -rf $RPM_BUILD_ROOT/usr/local/share/doc - - %files -#This space intentionally left blank +%{_libdir}/ocaml/text +%exclude %{_libdir}/ocaml/text/*.a +%exclude %{_libdir}/ocaml/text/*.cmxa +%exclude %{_libdir}/ocaml/text/*.cmx +%exclude %{_libdir}/ocaml/text/*.mli +%{_libdir}/ocaml/stublibs/dlltext-bigarray_stubs.so +%{_libdir}/ocaml/stublibs/dlltext-bigarray_stubs.so.owner +%{_libdir}/ocaml/stublibs/dlltext_stubs.so +%{_libdir}/ocaml/stublibs/dlltext_stubs.so.owner %files devel -%doc /usr/share/doc/ocaml-text/* -%{_libdir}/ocaml/text/* -%{_libdir}/ocaml/stublibs/* +%doc /usr/share/doc/ocaml-text +%{_libdir}/ocaml/text/*.a +%{_libdir}/ocaml/text/*.cmx +%{_libdir}/ocaml/text/*.cmxa +%{_libdir}/ocaml/text/*.mli %changelog +* Mon Jun 02 2014 Euan Harris - 0.6-2 +- Split files correctly between base and devel packages + * Sat Jun 01 2013 David Scott - 0.6-1 - Initial package From d306f6995e161f6ed6e01d5992f109dc8f18f850 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 11:17:09 +0100 Subject: [PATCH 0905/1125] ocaml-uri: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-uri.spec | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec index 5911ff09..a5263c8d 100644 --- a/SPECS/ocaml-uri.spec +++ b/SPECS/ocaml-uri.spec @@ -2,7 +2,7 @@ Name: ocaml-uri Version: 1.3.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A URI library for OCaml License: ISC URL: https://github.com/mirage/ocaml-uri @@ -11,6 +11,7 @@ BuildRequires: ocaml >= 4.00 BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-re-devel %description @@ -30,22 +31,35 @@ developing applications that use %{name}. %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install - +mkdir -p $OCAMLFIND_DESTDIR +make install %files -#This space intentionally left blank +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/uri +%exclude %{_libdir}/ocaml/uri/*.a +%exclude %{_libdir}/ocaml/uri/*.cmxa +%exclude %{_libdir}/ocaml/uri/*.cmx +%exclude %{_libdir}/ocaml/uri/*.mli %files devel -%doc README.md CHANGES -%{_libdir}/ocaml/uri/* +%doc uri.docdir/* +%exclude %{_libdir}/ocaml/usr/local/share/doc/uri/ +%exclude /usr/share/doc/%{name}-%{version}/ +%{_libdir}/ocaml/uri/*.a +%{_libdir}/ocaml/uri/*.cmx +%{_libdir}/ocaml/uri/*.cmxa +%{_libdir}/ocaml/uri/*.mli %changelog +* Mon Jun 02 2014 David Scott - 1.3.8-2 +- Split files correctly between base and devel packages + * Thu May 30 2013 David Scott - 1.3.8-1 - Initial package From 829228cf25f9bb4b30690ba01b78150e26916a5a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 11:59:40 +0100 Subject: [PATCH 0906/1125] ocaml-uuidm: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-uuidm.spec | 29 ++++++++++++++++------------- SPECS/ocaml-xcp-rrd.spec | 2 ++ SPECS/squeezed.spec | 1 + 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index ce00faf7..2e609b33 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -2,7 +2,7 @@ Name: ocaml-uuidm Version: 0.9.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 URL: http://erratique.ch/software/uuidm @@ -34,27 +34,30 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip - %files -#This space intentionally left blank +%doc CHANGES +%doc README +%{_libdir}/ocaml/uuidm +%exclude %{_libdir}/ocaml/uuidm/*.a +%exclude %{_libdir}/ocaml/uuidm/*.cmxa +%exclude %{_libdir}/ocaml/uuidm/*.cmx +%exclude %{_libdir}/ocaml/uuidm/*.mli %files devel -%doc README CHANGES -%{_libdir}/ocaml/uuidm/uuidm.mli -%{_libdir}/ocaml/uuidm/uuidm.cma -%{_libdir}/ocaml/uuidm/uuidm.cmxa -%{_libdir}/ocaml/uuidm/uuidm.a -%{_libdir}/ocaml/uuidm/uuidm.cmxs -%{_libdir}/ocaml/uuidm/uuidm.cmi -%{_libdir}/ocaml/uuidm/uuidm.cmx -%{_libdir}/ocaml/uuidm/META +%{_libdir}/ocaml/uuidm/*.a +%{_libdir}/ocaml/uuidm/*.cmx +%{_libdir}/ocaml/uuidm/*.cmxa +%{_libdir}/ocaml/uuidm/*.mli %changelog +* Mon Jun 02 2014 Euan Harris - 0.9.5-3 +- Split files correctly between base and devel packages + * Mon May 19 2014 Euan Harris - 0.9.5-2 - Switch to GitHub mirror diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 3acefd13..643782bd 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -13,6 +13,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-obuild BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-uuidm-devel %description Round-Robin Datasources in OCaml. @@ -22,6 +23,7 @@ Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-stdext-devel%{?_isa} +Requires: ocaml-uuidm-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 8fc1a222..463aec2a 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -13,6 +13,7 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-uuidm-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel From ccfdfa46f48d48a9f47d5d0c4e1c613a2dc2b324 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 12:02:58 +0100 Subject: [PATCH 0907/1125] ocaml-xcp-idl: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xcp-idl.spec | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 21acb0ac..7dead2d6 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -2,7 +2,7 @@ Name: ocaml-xcp-idl Version: 0.9.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Common interface definitions for XCP services License: LGPL URL: https://github.com/xapi-project/xcp-idl @@ -43,23 +43,35 @@ developing applications that use %{name}. %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +make install %files -#This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/xcp +%exclude %{_libdir}/ocaml/xcp/*.a +%exclude %{_libdir}/ocaml/xcp/*.cmxa +%exclude %{_libdir}/ocaml/xcp/*.cmx +%exclude %{_libdir}/ocaml/xcp/*.mli %files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/xcp/* +%{_libdir}/ocaml/xcp/*.a +%{_libdir}/ocaml/xcp/*.cmx +%{_libdir}/ocaml/xcp/*.cmxa +%{_libdir}/ocaml/xcp/*.mli %changelog +* Mon Jun 02 2014 Euan Harris - 0.9.16-2 +- Split files correctly between base and devel packages + * Fri May 9 2014 David Scott - 0.9.16-1 - Update to 0.9.16, with RRD fixes From d02057f83603a6e3245068b1a6782eebc1e588a0 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 13:49:38 +0100 Subject: [PATCH 0908/1125] ocaml-xen-api-client: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xen-api-client.spec | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index bd2d3979..a3a4f98e 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-api-client Version: 0.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 URL: https://github.com/xapi-project/xen-api-client @@ -42,24 +42,34 @@ virtualization hosts. %build ocaml setup.ml -configure --disable-tests --enable-lwt -ocaml setup.ml -build -ocaml setup.ml -doc +make +make doc %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml ocaml setup.ml -install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install %files -#This space intentionally left blank +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/xen-api-client +%exclude %{_libdir}/ocaml/xen-api-client/*.a +%exclude %{_libdir}/ocaml/xen-api-client/*.cmxa +%exclude %{_libdir}/ocaml/xen-api-client/*.cmx +%exclude %{_libdir}/ocaml/xen-api-client/*.mli %files devel -%doc README.md CHANGES -%{_libdir}/ocaml/xen-api-client/* - +%{_libdir}/ocaml/xen-api-client/*.a +%{_libdir}/ocaml/xen-api-client/*.cmx +%{_libdir}/ocaml/xen-api-client/*.cmxa +%{_libdir}/ocaml/xen-api-client/*.mli %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.4-2 +- Split files correctly between base and devel packages + * Wed Jun 5 2013 David Scott - 0.9.4-1 - Update to 0.9.3 From 34f2a97fcb819e780178259285da37a788ab9530 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 13:59:10 +0100 Subject: [PATCH 0909/1125] ocaml-xen-api-libs-transitional: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xen-api-libs-transitional.spec | 164 ++++++++++++++++++--- 1 file changed, 141 insertions(+), 23 deletions(-) diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index bead2c46..2013cbf2 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/xen-api-libs-transitional @@ -36,42 +36,160 @@ developing applications that use %{name}. %setup -q -n xen-api-libs-transitional-%{version} %build -if [ -x ./configure ]; then - ./configure -fi +./configure make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - +make install DESTDIR=$OCAMLFIND_DESTDIR %files -#This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc README.md -%files devel -%doc ChangeLog README.md LICENSE -%{_libdir}/ocaml/cpuid/* -%{_libdir}/ocaml/gzip/* -%{_libdir}/ocaml/http-svr/* -%{_libdir}/ocaml/pciutil/* -%{_libdir}/ocaml/sexpr/* -%{_libdir}/ocaml/sha1/* -%{_libdir}/ocaml/stunnel/* -%{_libdir}/ocaml/uuid/* -%{_libdir}/ocaml/xenctrlext/* -%{_libdir}/ocaml/xenstore-compat/* -%{_libdir}/ocaml/xen-utils/* -%{_libdir}/ocaml/xml-light2/* +%{_libdir}/ocaml/cpuid +%exclude %{_libdir}/ocaml/cpuid/*.a +%exclude %{_libdir}/ocaml/cpuid/*.cmxa +%exclude %{_libdir}/ocaml/cpuid/*.cmx +%exclude %{_libdir}/ocaml/cpuid/*.mli %{_libdir}/ocaml/stublibs/dllcpuid_stubs.so %{_libdir}/ocaml/stublibs/dllcpuid_stubs.so.owner + +%{_libdir}/ocaml/gzip +%exclude %{_libdir}/ocaml/gzip/*.a +%exclude %{_libdir}/ocaml/gzip/*.cmxa +%exclude %{_libdir}/ocaml/gzip/*.cmx +%exclude %{_libdir}/ocaml/gzip/*.mli + +%{_libdir}/ocaml/http-svr +%exclude %{_libdir}/ocaml/http-svr/*.a +%exclude %{_libdir}/ocaml/http-svr/*.cmxa +%exclude %{_libdir}/ocaml/http-svr/*.cmx +%exclude %{_libdir}/ocaml/http-svr/*.mli + +%{_libdir}/ocaml/pciutil +%exclude %{_libdir}/ocaml/pciutil/*.a +%exclude %{_libdir}/ocaml/pciutil/*.cmxa +%exclude %{_libdir}/ocaml/pciutil/*.cmx +%exclude %{_libdir}/ocaml/pciutil/*.mli + +%{_libdir}/ocaml/sexpr +%exclude %{_libdir}/ocaml/sexpr/*.a +%exclude %{_libdir}/ocaml/sexpr/*.cmxa +%exclude %{_libdir}/ocaml/sexpr/*.cmx +%exclude %{_libdir}/ocaml/sexpr/*.mli + +%{_libdir}/ocaml/sha1 +%exclude %{_libdir}/ocaml/sha1/*.a +%exclude %{_libdir}/ocaml/sha1/*.cmxa +%exclude %{_libdir}/ocaml/sha1/*.cmx +%exclude %{_libdir}/ocaml/sha1/*.mli + +%{_libdir}/ocaml/stunnel +%exclude %{_libdir}/ocaml/stunnel/*.a +%exclude %{_libdir}/ocaml/stunnel/*.cmxa +%exclude %{_libdir}/ocaml/stunnel/*.cmx +%exclude %{_libdir}/ocaml/stunnel/*.mli + +%{_libdir}/ocaml/uuid +%exclude %{_libdir}/ocaml/uuid/*.a +%exclude %{_libdir}/ocaml/uuid/*.cmxa +%exclude %{_libdir}/ocaml/uuid/*.cmx +%exclude %{_libdir}/ocaml/uuid/*.mli + +%{_libdir}/ocaml/xenctrlext +%exclude %{_libdir}/ocaml/xenctrlext/*.a +%exclude %{_libdir}/ocaml/xenctrlext/*.cmxa +%exclude %{_libdir}/ocaml/xenctrlext/*.cmx +%exclude %{_libdir}/ocaml/xenctrlext/*.mli %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner +%{_libdir}/ocaml/xenstore-compat +%exclude %{_libdir}/ocaml/xenstore-compat/*.a +%exclude %{_libdir}/ocaml/xenstore-compat/*.cmxa +%exclude %{_libdir}/ocaml/xenstore-compat/*.cmx + +%{_libdir}/ocaml/xen-utils +%exclude %{_libdir}/ocaml/xen-utils/*.a +%exclude %{_libdir}/ocaml/xen-utils/*.cmxa +%exclude %{_libdir}/ocaml/xen-utils/*.cmx +%exclude %{_libdir}/ocaml/xen-utils/*.mli + +%{_libdir}/ocaml/xml-light2 +%exclude %{_libdir}/ocaml/xml-light2/*.a +%exclude %{_libdir}/ocaml/xml-light2/*.cmxa +%exclude %{_libdir}/ocaml/xml-light2/*.cmx +%exclude %{_libdir}/ocaml/xml-light2/*.mli + + +%files devel +%{_libdir}/ocaml/cpuid/*.a +%{_libdir}/ocaml/cpuid/*.cmxa +%{_libdir}/ocaml/cpuid/*.cmx +%{_libdir}/ocaml/cpuid/*.mli + +%{_libdir}/ocaml/gzip/*.a +%{_libdir}/ocaml/gzip/*.cmxa +%{_libdir}/ocaml/gzip/*.cmx +%{_libdir}/ocaml/gzip/*.mli + +%{_libdir}/ocaml/http-svr/*.a +%{_libdir}/ocaml/http-svr/*.cmxa +%{_libdir}/ocaml/http-svr/*.cmx +%{_libdir}/ocaml/http-svr/*.mli + +%{_libdir}/ocaml/pciutil/*.a +%{_libdir}/ocaml/pciutil/*.cmxa +%{_libdir}/ocaml/pciutil/*.cmx +%{_libdir}/ocaml/pciutil/*.mli + +%{_libdir}/ocaml/sexpr/*.a +%{_libdir}/ocaml/sexpr/*.cmxa +%{_libdir}/ocaml/sexpr/*.cmx +%{_libdir}/ocaml/sexpr/*.mli + +%{_libdir}/ocaml/sha1/*.a +%{_libdir}/ocaml/sha1/*.cmxa +%{_libdir}/ocaml/sha1/*.cmx +%{_libdir}/ocaml/sha1/*.mli + +%{_libdir}/ocaml/stunnel/*.a +%{_libdir}/ocaml/stunnel/*.cmxa +%{_libdir}/ocaml/stunnel/*.cmx +%{_libdir}/ocaml/stunnel/*.mli + +%{_libdir}/ocaml/uuid/*.a +%{_libdir}/ocaml/uuid/*.cmxa +%{_libdir}/ocaml/uuid/*.cmx +%{_libdir}/ocaml/uuid/*.mli + +%{_libdir}/ocaml/xenctrlext/*.a +%{_libdir}/ocaml/xenctrlext/*.cmxa +%{_libdir}/ocaml/xenctrlext/*.cmx +%{_libdir}/ocaml/xenctrlext/*.mli + +%{_libdir}/ocaml/xenstore-compat/*.a +%{_libdir}/ocaml/xenstore-compat/*.cmxa +%{_libdir}/ocaml/xenstore-compat/*.cmx + +%{_libdir}/ocaml/xen-utils/*.a +%{_libdir}/ocaml/xen-utils/*.cmxa +%{_libdir}/ocaml/xen-utils/*.cmx +%{_libdir}/ocaml/xen-utils/*.mli + +%{_libdir}/ocaml/xml-light2/*.a +%{_libdir}/ocaml/xml-light2/*.cmxa +%{_libdir}/ocaml/xml-light2/*.cmx +%{_libdir}/ocaml/xml-light2/*.mli + %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.3-2 +- Split files correctly between base and devel packages + * Wed Sep 25 2013 David Scott - 0.9.3-1 - Update to 0.9.3 From 34a44b93d65903bb7ec899b77dcdee2b52cdd798 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 14:01:41 +0100 Subject: [PATCH 0910/1125] ocaml-xmlm: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xmlm.spec | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-xmlm.spec b/SPECS/ocaml-xmlm.spec index 8aefaf86..6928d420 100644 --- a/SPECS/ocaml-xmlm.spec +++ b/SPECS/ocaml-xmlm.spec @@ -1,6 +1,6 @@ Name: ocaml-xmlm Version: 1.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Streaming XML input/output for OCaml License: BSD3 URL: http://erratique.ch/software/xmlm @@ -37,20 +37,31 @@ ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip %files -#This space intentionally left blank +%doc CHANGES +%doc README +%{_libdir}/ocaml/xmlm +%exclude %{_libdir}/ocaml/xmlm/*.a +%exclude %{_libdir}/ocaml/xmlm/*.cmxa +%exclude %{_libdir}/ocaml/xmlm/*.cmx +%exclude %{_libdir}/ocaml/xmlm/*.mli %files devel -%doc README CHANGES -%{_libdir}/ocaml/xmlm/* +%{_libdir}/ocaml/xmlm/*.a +%{_libdir}/ocaml/xmlm/*.cmxa +%{_libdir}/ocaml/xmlm/*.cmx +%{_libdir}/ocaml/xmlm/*.mli %changelog +* Mon Jun 2 2014 Euan Harris - 1.1.1-3 +- Split files correctly between base and devel packages + * Mon May 19 2014 Euan Harris - 1.1.1-2 - Switch to GitHub mirror From 1b259850b6e7087dcb7e99f96f131c9fc5c43ca5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 14:03:48 +0100 Subject: [PATCH 0911/1125] ocaml-zed: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-zed.spec | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index 571b152b..d118f0df 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -2,7 +2,7 @@ Name: ocaml-zed Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An abstract engine for text editing for OCaml License: BSD3 URL: http://forge.ocamlcore.org/projects/zed/ @@ -14,8 +14,8 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-react-devel %description -Zed is an abstract engine for text edition. It can be used for writing -text editors, edition widgets, readlines, ... +Zed is an abstract engine for text editing. It can be used for writing +text editors, editing widgets, readlines... %package devel Summary: Development files for %{name} @@ -31,24 +31,33 @@ developing applications that use %{name}. %setup -q -n zed-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./configure --destdir %{buildroot}/%{_libdir}/ocaml +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - +mkdir -p $OCAMLFIND_DESTDIR +make install %files -#This space intentionally left blank +%doc CHANGES +%doc LICENSE +%{_libdir}/ocaml/zed +%exclude %{_libdir}/ocaml/zed/*.a +%exclude %{_libdir}/ocaml/zed/*.cmxa +%exclude %{_libdir}/ocaml/zed/*.cmx +%exclude %{_libdir}/ocaml/zed/*.mli %files devel -%doc LICENSE CHANGES -%{_libdir}/ocaml/zed/* +%{_libdir}/ocaml/zed/*.a +%{_libdir}/ocaml/zed/*.cmxa +%{_libdir}/ocaml/zed/*.cmx +%{_libdir}/ocaml/zed/*.mli %changelog +* Mon Jun 2 2014 Euan Harris - 1.2-2 +- Split files correctly between base and devel packages + * Thu Jun 6 2013 David Scott - 1.2-1 - Initial package From b1b77f781a735a89cd7ca5868e0d32c990604c25 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 14:04:56 +0100 Subject: [PATCH 0912/1125] ocaml-cdrom: Fix bogus date in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-cdrom.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec index 423dfdb0..795594bc 100644 --- a/SPECS/ocaml-cdrom.spec +++ b/SPECS/ocaml-cdrom.spec @@ -53,7 +53,7 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %{_libdir}/ocaml/cdrom/*.mli %changelog -* Fri Apr 17 2014 Euan Harris - 0.9.1-3 +* Fri May 30 2014 Euan Harris - 0.9.1-3 - Split files correctly between base and devel packages * Tue May 28 2013 David Scott - 0.9.1-2 From adae6b0346998dab8a9c70369c2f98418bf8b6b4 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:32:44 +0100 Subject: [PATCH 0913/1125] ocaml-xen-lowlevel-libs: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xen-lowlevel-libs.spec | 34 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 24f6c172..3af87031 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs @@ -37,29 +37,47 @@ make configure make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore make install DESTDIR=${buildroot} %files -#This space intentionally left blank - -%files devel %doc README.md -%{_libdir}/ocaml/xenctrl/* -#%{_libdir}/ocaml/xenlight/* +%{_libdir}/ocaml/xenctrl +%exclude %{_libdir}/ocaml/xenctrl/*.a +%exclude %{_libdir}/ocaml/xenctrl/*.cmxa +%exclude %{_libdir}/ocaml/xenctrl/*.cmx +%exclude %{_libdir}/ocaml/xenctrl/*.mli %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner + +#%{_libdir}/ocaml/xenlight +#%exclude %{_libdir}/ocaml/xenlight/*.a +#%exclude %{_libdir}/ocaml/xenlight/*.cmxa +#%exclude %{_libdir}/ocaml/xenlight/*.cmx +#%exclude %{_libdir}/ocaml/xenlight/*.mli #%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so #%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so #%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +%files devel +%{_libdir}/ocaml/xenctrl/*.a +%{_libdir}/ocaml/xenctrl/*.cmxa +%{_libdir}/ocaml/xenctrl/*.cmx +%{_libdir}/ocaml/xenctrl/*.mli + +#%{_libdir}/ocaml/xenlight/*.a +#%{_libdir}/ocaml/xenlight/*.cmxa +#%{_libdir}/ocaml/xenlight/*.cmx +#%{_libdir}/ocaml/xenlight/*.mli %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.14-2 +- Split files correctly between base and devel packages + * Sat Apr 26 2014 David Scott - 0.9.14-1 - Update to 0.9.14 From 45d157f6198fa9071df324418cb9f5442dd1ff3f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:39:05 +0100 Subject: [PATCH 0914/1125] ocaml-xenops: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xenops.spec | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec index 5b58269e..86c70fea 100644 --- a/SPECS/ocaml-xenops.spec +++ b/SPECS/ocaml-xenops.spec @@ -2,7 +2,7 @@ Name: ocaml-xenops Version: 0.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Low-level xen control operations OCaml License: LGPL URL: https://github.com/xapi-project/xenops @@ -48,24 +48,34 @@ A set of debugging tools which showcase the features of %{name}-devel. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml export OCAMLFIND_LDCONF=ignore +mkdir -p $OCAMLFIND_DESTDIR mkdir -p %{buildroot}/%{_bindir} make install BINDIR=%{buildroot}/%{_bindir} - %files -#This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/xenops +%exclude %{_libdir}/ocaml/xenops/*.a +%exclude %{_libdir}/ocaml/xenops/*.cmxa +%exclude %{_libdir}/ocaml/xenops/*.cmx %files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/xenops/* +%{_libdir}/ocaml/xenops/*.a +%{_libdir}/ocaml/xenops/*.cmxa +%{_libdir}/ocaml/xenops/*.cmx %files tools %{_bindir}/list_domains %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.4-2 +- Split files correctly between base and devel packages + * Thu May 8 2014 David Scott - 0.9.4-1 - Update to 0.9.4, add list_domains binary From bda81a98ba10daf729caa1fdb1cd640d92005153 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:41:21 +0100 Subject: [PATCH 0915/1125] ocaml-xenstore-clients: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xenstore-clients.spec | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec index 123a1074..1302b8bf 100644 --- a/SPECS/ocaml-xenstore-clients.spec +++ b/SPECS/ocaml-xenstore-clients.spec @@ -2,7 +2,7 @@ Name: ocaml-xenstore-clients Version: 0.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Unix xenstore clients for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xenstore-clients @@ -33,20 +33,29 @@ developing applications that use %{name}. make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore +mkdir -p $OCAMLFIND_DESTDIR make install DESTDIR=${buildroot} %files -#This space intentionally left blank +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/xenstore_transport +%exclude %{_libdir}/ocaml/xenstore_transport/*.a +%exclude %{_libdir}/ocaml/xenstore_transport/*.cmxa +%exclude %{_libdir}/ocaml/xenstore_transport/*.cmx %files devel -%doc README.md LICENSE MAINTAINERS -%{_libdir}/ocaml/xenstore_transport/* +%{_libdir}/ocaml/xenstore_transport/*.a +%{_libdir}/ocaml/xenstore_transport/*.cmxa +%{_libdir}/ocaml/xenstore_transport/*.cmx %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.3-2 +- Split files correctly between base and devel packages + * Fri May 9 2014 David Scott - 0.9.3-1 - Update to 0.9.3 From 75cd5c5d2418e6b2601f0bfab36d76916bc655d2 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:44:36 +0100 Subject: [PATCH 0916/1125] ocaml-xenstore: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xenstore.spec | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index e65e9545..1f42ac44 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -2,7 +2,7 @@ Name: ocaml-xenstore Version: 1.2.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Xenstore protocol implementation in OCaml License: LGPL URL: https://github.com/mirage/ocaml-xenstore @@ -13,6 +13,7 @@ BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-ounit-devel Conflicts: xen-ocaml %description @@ -34,22 +35,33 @@ developing applications that use %{name}. %build ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +make %install -mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install - +mkdir -p $OCAMLFIND_DESTDIR +make install %files -#This space intentionally left blank +%doc CHANGES +%doc LICENSE +%doc README +%{_libdir}/ocaml/xenstore +%exclude %{_libdir}/ocaml/xenstore/*.a +%exclude %{_libdir}/ocaml/xenstore/*.cmxa +%exclude %{_libdir}/ocaml/xenstore/*.cmx +%exclude %{_libdir}/ocaml/xenstore/*.mli %files devel -%doc README CHANGES LICENSE -%{_libdir}/ocaml/xenstore/* +%{_libdir}/ocaml/xenstore/*.a +%{_libdir}/ocaml/xenstore/*.cmxa +%{_libdir}/ocaml/xenstore/*.cmx +%{_libdir}/ocaml/xenstore/*.mli %changelog +* Mon Jun 2 2014 Euan Harris - 1.2.4-2 +- Split files correctly between base and devel packages + * Wed Sep 11 2013 David Scott - 1.2.4-1 - Update to 1.2.4 (fixes critical watching bug) From ca07122bfc9e550b34b6ee05c5d36ae426da5c87 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:46:31 +0100 Subject: [PATCH 0917/1125] ocaml-xcp-rrd: Split into base and devel packages Signed-off-by: Euan Harris --- SPECS/ocaml-xcp-rrd.spec | 20 +++++++++++++++----- SPECS/xapi.spec | 1 + SPECS/xcp-rrdd.spec | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec index 643782bd..86b08e66 100644 --- a/SPECS/ocaml-xcp-rrd.spec +++ b/SPECS/ocaml-xcp-rrd.spec @@ -2,7 +2,7 @@ Name: ocaml-xcp-rrd Version: 0.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Round-Robin Datasources in OCaml License: LGPL URL: https://github.com/xapi-project/xcp-rrd @@ -40,15 +40,25 @@ mkdir -p %{buildroot}/%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml make install - %files -#This space intentionally left blank +%doc ChangeLog +%doc LICENSE +%doc MAINTAINERS +%doc README.md +%{_libdir}/ocaml/xcp-rrd +%exclude %{_libdir}/ocaml/xcp-rrd/*.a +%exclude %{_libdir}/ocaml/xcp-rrd/*.cmxa +%exclude %{_libdir}/ocaml/xcp-rrd/*.cmx %files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/xcp-rrd/* +%{_libdir}/ocaml/xcp-rrd/*.a +%{_libdir}/ocaml/xcp-rrd/*.cmxa +%{_libdir}/ocaml/xcp-rrd/*.cmx %changelog +* Mon Jun 2 2014 Euan Harris - 0.9.0-2 +- Split files correctly between base and devel packages + * Thu Jun 6 2013 David Scott - 0.9.0-1 - Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index bbbbf444..a8324bef 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -48,6 +48,7 @@ BuildRequires: make BuildRequires: utop BuildRequires: message-switch-devel BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-tar-devel BuildRequires: python2-devel Requires: hwdata diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 5d1f05a2..0c1b0093 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -15,6 +15,7 @@ BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xenops-devel BuildRequires: ocaml-rrd-transport-devel +BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: forkexecd-devel From 17d57c9fea3e2473bee27bc283557cfbdd83fea6 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 2 Jun 2014 15:50:43 +0100 Subject: [PATCH 0918/1125] openstack-xapi-plugins, xsconsole: Clarify why %build is empty Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 7 +++---- SPECS/xsconsole.spec | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec index 9d83c621..c86d75c0 100644 --- a/SPECS/openstack-xapi-plugins.spec +++ b/SPECS/openstack-xapi-plugins.spec @@ -16,14 +16,13 @@ XenAPI plugins used by OpenStack to control XenServer. %prep %setup -q -n nova-%{version} +%build +# This package does not have a build step + %install mkdir -p %{buildroot}/usr/lib/xapi/plugins cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ -%build -#This space intentionally left blank - - %files /usr/lib/xapi/plugins/* diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index b6b9a82b..1e24ee2a 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -14,15 +14,14 @@ Console tool for configuring a XenServer installation. %prep %setup -q +%build +# This package does not have a build step + %install mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_libdir} make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} -%build -#This space intentionally left blank - - %files %{_libdir}/xsconsole/*.py %{_libdir}/xsconsole/*.pyc From c80c0edbaa1b4007f4fcf9754067e47305aced50 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 4 Jun 2014 17:21:11 +0100 Subject: [PATCH 0919/1125] SPECS: Remove unnecessary --destdir arguments from configure scripts Signed-off-by: Euan Harris --- SPECS/forkexecd.spec | 2 +- SPECS/message-switch.spec | 2 +- SPECS/ocaml-cmdliner.spec | 2 +- SPECS/ocaml-cstruct.spec | 2 +- SPECS/ocaml-fd-send-recv.spec | 2 +- SPECS/ocaml-libvhd.spec | 2 +- SPECS/ocaml-netdev.spec | 2 +- SPECS/ocaml-ocplib-endian.spec | 2 +- SPECS/ocaml-odn.spec | 2 +- SPECS/ocaml-react.spec | 2 +- SPECS/ocaml-tapctl.spec | 2 +- SPECS/ocaml-xcp-idl.spec | 2 +- SPECS/ocaml-xenstore.spec | 2 +- SPECS/ocaml-zed.spec | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec index bd04e4dc..9bc0a8a7 100644 --- a/SPECS/forkexecd.spec +++ b/SPECS/forkexecd.spec @@ -28,7 +28,7 @@ fork() and exec() in a multithreaded program. cp %{SOURCE1} forkexecd-init %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 107c697e..bc153666 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -28,7 +28,7 @@ A store and forward message switch for OCaml. cp %{SOURCE1} message-switch-init %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index 0806ae6e..03235e89 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -32,7 +32,7 @@ developing applications that use %{name}. %build oasis setup -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index cf267d89..94e745c1 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -29,7 +29,7 @@ developing applications that use %{name}. %setup -q -n %{name}-%{name}-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml --enable-lwt +ocaml setup.ml -configure --enable-lwt ocaml setup.ml -build %install diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec index 86830e0d..e5e3a6ff 100644 --- a/SPECS/ocaml-fd-send-recv.spec +++ b/SPECS/ocaml-fd-send-recv.spec @@ -25,7 +25,7 @@ developing applications that use %{name}. %setup -q -n %{name}-%{name}-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index e7f00046..1a540d1d 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -29,7 +29,7 @@ developing applications that use %{name}. %setup -q -n libvhd-libvhd-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure make %install diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec index eba903da..b97676ba 100644 --- a/SPECS/ocaml-netdev.spec +++ b/SPECS/ocaml-netdev.spec @@ -29,7 +29,7 @@ developing applications that use %{name}. %setup -q -n netdev-netdev-%{version} %build -./configure --destdir %{buildroot}/%{_libdir}/ocaml +./configure make %install diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec index 1a0d8832..6a6649cb 100644 --- a/SPECS/ocaml-ocplib-endian.spec +++ b/SPECS/ocaml-ocplib-endian.spec @@ -39,7 +39,7 @@ developing applications that use %{name}. %setup -q -n ocplib-endian-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec index 16c326c7..147f6970 100644 --- a/SPECS/ocaml-odn.spec +++ b/SPECS/ocaml-odn.spec @@ -32,7 +32,7 @@ developing applications that use %{name}. %setup -q -n ocaml-data-notation-%{version} %build -./configure --destdir %{buildroot}/%{_libdir}/ocaml +./configure make %install diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 6d806bd3..2543f902 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -41,7 +41,7 @@ cp %{SOURCE1} LICENSE %build oasis setup -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure ocaml setup.ml -build %install diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec index 773c7501..dfee7061 100644 --- a/SPECS/ocaml-tapctl.spec +++ b/SPECS/ocaml-tapctl.spec @@ -32,7 +32,7 @@ developing applications that use %{name}. %setup -q -n tapctl-%{version} %build -./configure --destdir %{buildroot}/%{_libdir}/ocaml +./configure make %install diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 7dead2d6..24a5fecd 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -42,7 +42,7 @@ developing applications that use %{name}. %setup -q -n xcp-idl-%{version} %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure make %install diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec index 1f42ac44..eca0bb5c 100644 --- a/SPECS/ocaml-xenstore.spec +++ b/SPECS/ocaml-xenstore.spec @@ -34,7 +34,7 @@ developing applications that use %{name}. %setup -q %build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml +ocaml setup.ml -configure make %install diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index d118f0df..d545fae4 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -31,7 +31,7 @@ developing applications that use %{name}. %setup -q -n zed-%{version} %build -./configure --destdir %{buildroot}/%{_libdir}/ocaml +./configure make %install From 1e202cbf5317a35783b37775fd77b8f0dcc57fc2 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 4 Jun 2014 13:41:27 +0100 Subject: [PATCH 0920/1125] Update blktap to 0.9.2 --- SPECS/blktap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index e9487731..6e10e9aa 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,6 +1,6 @@ Summary: Enhanced version of tapdisk Name: blktap -Version: 0.9.1 +Version: 0.9.2 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xapi-project/blktap @@ -51,6 +51,9 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog +* Wed Jun 04 2014 Bob Ball - 0.9.2-1 +- Update blktap to latest release + * Wed Mar 12 2014 Bob Ball - 0.9.1-1 - Update blktap to avoid Debian Jessie compile failure From b31d5a5205684fe7b2767f08813786315522caaa Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 7 Jun 2014 14:08:48 +0000 Subject: [PATCH 0921/1125] Add downloader script * detects non-archives and deletes them (e.g. HTML error pages etc) * retries failed downloads several times * canonicalise github.com URLs The github.com URLs we're using are of the form https://github.com/org/project/archive/tag/filename-we-want.ext unfortunately these URLs don't always work, so we rewrite them to the standard URL of the form https://github.com/org/project/archive/tag.ext Signed-off-by: David Scott --- scripts/downloader.py | 72 +++++++++++++++++++++++++++++++++++++++++++ specdep.py | 4 +-- 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100755 scripts/downloader.py diff --git a/scripts/downloader.py b/scripts/downloader.py new file mode 100755 index 00000000..aaa7055f --- /dev/null +++ b/scripts/downloader.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +import sys +import urlparse +import os +import subprocess +import time + +def guess_file_type(path): + line = subprocess.check_output(["file", path]) + # file: description + if len(line) < (len(path) + 2): + print >>sys.stderr, "Malformed output from 'file %s': '%s'" % (path, line) + exit(1) + return line[len(path) + 2:].strip() + +def looks_like_an_archive(path): + ty = guess_file_type(path) + if ty.startswith("ASCII") or ty.startswith("HTML"): + return False + if ty.startswith("gzip") or ty.startswith("bzip"): + return True + print >>sys.stderr, "%s has an unrecognised file type: %s" % (path, ty) + print >>sys.stderr, "Please extend %s:looks_like_an_archive to include this case." + exit(1) + +def download(url, destination): + args = ["curl", "--silent", "--show-error", "-L", "-o", destination, url] + print >>sys.stderr, "Running %s" % (" ".join(args)) + returncode = subprocess.call(args) + if returncode <> 0: + print >>sys.stderr, "Downloading %s failed: sleeping 5s" % url + time.sleep(5) + +def look_for_it(url, destination): + for attempt in [5, 4, 3, 2, 1, 0]: + if os.path.exists(destination): + if looks_like_an_archive(destination): + print >>sys.stderr, "%s exists and looks like an archive" % destination + return + else: + print >>sys.stderr, "%s is not an archive, deleting it" % destination + os.unlink(destination) + if attempt == 0: + print >>sys.stderr, "That was our last attempt so giving up." + exit(1) + else: + print >>sys.stderr, "%s does not exist: downloading" % destination + download(url, destination) + +if __name__ == "__main__": + if len(sys.argv) <> 3: + print >>sys.stderr, "Wrong number of arguments. Use %s " % sys.argv[0] + exit(1) + url_string = sys.argv[1] + destination = sys.argv[2] + url = urlparse.urlparse(url_string) + path = url.path.split('/') + # Avoid relying on github to set the destination filename + if url.netloc == "github.com" and path[-3] == "archive": + ext = None + possible_exts = [ ".tar", ".tar.gz", ".zip", ".tbz", "tar.bz2" ] + for e in possible_exts: + if url.path.endswith(e): + ext = e + break + if not ext: + print >>sys.stderr, "I did not recognise extension of %s. I know about: %s" % (url.path, ", ".join(possible_exts)) + exit(1) + url_path = "/".join(path[0:-2] + [ path[-2] + ext ]) + url_string = str(urlparse.urlunsplit((url.scheme, url.netloc, url_path, url.query, url.fragment),)) + look_for_it(url_string, destination) diff --git a/specdep.py b/specdep.py index c79028fd..cc50d648 100755 --- a/specdep.py +++ b/specdep.py @@ -45,8 +45,8 @@ def download_rpm_sources(spec): # Source comes from a remote HTTP server if source.scheme in ["http", "https"]: print '%s: %s' % (path, spec.specpath()) - print '\t@echo [CURL] $@' - print '\t@curl --silent --show-error -L -o $@ %s' % url + print '\t@echo [DOWNLOADER] $@' + print '\t@./scripts/downloader.py %s %s' % (url, path) # Source comes from a local file or directory if source.scheme == "file": From 839ca0a9b18b40e6d46b9d70b99609d8e83eb37d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 7 Jun 2014 21:53:28 +0000 Subject: [PATCH 0922/1125] Don't rely on subprocess.check_output: it's only in python2.7 Signed-off-by: David Scott --- scripts/downloader.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/downloader.py b/scripts/downloader.py index aaa7055f..a281247c 100755 --- a/scripts/downloader.py +++ b/scripts/downloader.py @@ -7,7 +7,14 @@ import time def guess_file_type(path): - line = subprocess.check_output(["file", path]) + # If we have python2.7: + #line = subprocess.check_output(["file", path]) + p = subprocess.Popen(["file", path], stdout = subprocess.PIPE) + line = p.stdout.read() + p.communicate() + if p.returncode <> 0: + print >>sys.stderr, "file %s: failed with exit code %d" % (path, p.returncode) + exit(1) # file: description if len(line) < (len(path) + 2): print >>sys.stderr, "Malformed output from 'file %s': '%s'" % (path, line) From 59b6ff4db88e500480f502b9cdf17274601bbe34 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Mon, 9 Jun 2014 17:54:47 +0100 Subject: [PATCH 0923/1125] Jessie fixes xenstored is actually started by the 'xen' init script uuidgen isn't installed by default --- SOURCES/squeezed-init | 2 +- SOURCES/xenopsd-xc-init | 2 +- SOURCES/xenopsd-xenlight-init | 2 +- SPECS/xenserver-install-wizard.spec | 1 + scripts/lib/mappkgname.py | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init index 6e89cebf..6426e38a 100755 --- a/SOURCES/squeezed-init +++ b/SOURCES/squeezed-init @@ -6,7 +6,7 @@ # description: Manages host memory by ballooning VMs ### BEGIN INIT INFO # Provides: squeezed -# Required-Start: $local_fs $network $syslog message-switch xenstored +# Required-Start: $local_fs $network $syslog message-switch xen # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 5f390c9e..fd06c61e 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -6,7 +6,7 @@ # description: Manages xen domains via libxc ### BEGIN INIT INFO # Provides: xenopsd-xc -# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored +# Required-Start: $local_fs $network $syslog message-switch forkexecd xen # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch forkexecd # Should-Stop: $network $syslog diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 0acdaff3..59c8b356 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -6,7 +6,7 @@ # description: Manages VMs via libxl ### BEGIN INIT INFO # Provides: xenopsd-xenlight -# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored +# Required-Start: $local_fs $network $syslog message-switch forkexecd xen # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 31aa8079..88442e2c 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -11,6 +11,7 @@ Requires: newt Requires: python Requires: python-argparse Requires: xapi-python-devel +Requires: util-linux-ng %description A simple wizard to configure a XenServer after install diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 1b602576..12b4ef39 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -122,6 +122,7 @@ "redhat-lsb-core": ["lsb-base"], "sg3_utils": ["sg3-utils"], "python-argparse": ["libpython2.7-stdlib"], + "util-linux-ng": ["uuid-runtime"], } SECONDARY_MAPPING = { From 53de8f3978bbe43c2c9764c01cef5c6488242993 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 13 Jun 2014 15:07:59 +0100 Subject: [PATCH 0924/1125] Revert 59b6ff4db88e500480f502b9cdf17274601bbe34; was Ubuntu specific --- SOURCES/squeezed-init | 2 +- SOURCES/xenopsd-xc-init | 2 +- SOURCES/xenopsd-xenlight-init | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init index 6426e38a..6e89cebf 100755 --- a/SOURCES/squeezed-init +++ b/SOURCES/squeezed-init @@ -6,7 +6,7 @@ # description: Manages host memory by ballooning VMs ### BEGIN INIT INFO # Provides: squeezed -# Required-Start: $local_fs $network $syslog message-switch xen +# Required-Start: $local_fs $network $syslog message-switch xenstored # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index fd06c61e..5f390c9e 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -6,7 +6,7 @@ # description: Manages xen domains via libxc ### BEGIN INIT INFO # Provides: xenopsd-xc -# Required-Start: $local_fs $network $syslog message-switch forkexecd xen +# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch forkexecd # Should-Stop: $network $syslog diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 59c8b356..0acdaff3 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -6,7 +6,7 @@ # description: Manages VMs via libxl ### BEGIN INIT INFO # Provides: xenopsd-xenlight -# Required-Start: $local_fs $network $syslog message-switch forkexecd xen +# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored # Required-Stop: $local_fs $syslog # Should-Start: $syslog message-switch # Should-Stop: $network $syslog From a013a444e1e64aec0e1b8b99ae3055bef96fcc09 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 17 Jun 2014 21:00:05 +0000 Subject: [PATCH 0925/1125] xenserver-install-wizard: add an init script Signed-off-by: David Scott --- SOURCES/xenserver-install-wizard-init | 42 +++++++++++++++++++++++++++ SPECS/xenserver-install-wizard.spec | 20 +++++++++++-- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 SOURCES/xenserver-install-wizard-init diff --git a/SOURCES/xenserver-install-wizard-init b/SOURCES/xenserver-install-wizard-init new file mode 100755 index 00000000..21d509f4 --- /dev/null +++ b/SOURCES/xenserver-install-wizard-init @@ -0,0 +1,42 @@ +#!/bin/bash +# +# xenserver-first-boot Complete XenServer installation +# +# chkconfig: 2345 1 99 +# description: Complete XenServer setup +### BEGIN INIT INFO +# Required-Start: $local_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Complete XenServer installation +# Description: Complete XenServer installation +### END INIT INFO + +# Source function library. +. /lib/lsb/init-functions + +STAMPFILE=/var/xenserver/trigger-wizard + +start() { + if [ -e $STAMPFILE ]; then + rm -f $STAMPFILE + /usr/share/xenserver-install-wizard/xenserver-install-wizard.py --yes-to-all + fi +} +stop() { + echo . +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + *) + echo $"Usage: $0 {start|stop}" + exit 3 +esac + +exit $? diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 31aa8079..13a534c7 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -3,10 +3,11 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard Version: 0.2.30 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source1: xenserver-install-wizard-init Requires: newt Requires: python Requires: python-argparse @@ -17,6 +18,7 @@ A simple wizard to configure a XenServer after install %prep %setup -q +cp %{SOURCE1} xenserver-install-wizard-init %build @@ -24,13 +26,27 @@ A simple wizard to configure a XenServer after install make DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_bindir} ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroot}%{_bindir}/xenserver-install-wizard - +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 xenserver-install-wizard-init %{buildroot}%{_sysconfdir}/init.d/xenserver-install-wizard %files /usr/share/xenserver-install-wizard/* %{_bindir}/xenserver-install-wizard +%{_sysconfdir}/init.d/xenserver-install-wizard + +%post +[ ! -x /sbin/chkconfig ] || chkconfig --add xenserver-install-wizard + +%preun +if [ $1 -eq 0 ]; then + /sbin/service xenserver-install-wizard stop > /dev/null 2>&1 + /sbin/chkconfig --del xenserver-install-wizard +fi %changelog +* Tue Jun 17 2014 David Scott - 0.2.30-2 +- Add init script + * Sat May 10 2014 David Scott - 0.2.30-1 - Update to 0.2.30, now starts xcp-rrdd From 26e4ca8fe1739b2893cdc7b063d1d858506fabc1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 17 Jun 2014 21:06:27 +0000 Subject: [PATCH 0926/1125] Update wizard to 0.2.32 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 13a534c7..f89a1ef3 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,8 +2,8 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.30 -Release: 2%{?dist} +Version: 0.2.32 +Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -44,8 +44,9 @@ if [ $1 -eq 0 ]; then fi %changelog -* Tue Jun 17 2014 David Scott - 0.2.30-2 +* Tue Jun 17 2014 David Scott - 0.2.32-1 - Add init script +- Update to 0.2.32 * Sat May 10 2014 David Scott - 0.2.30-1 - Update to 0.2.30, now starts xcp-rrdd From 58d5cea9f4cafaa4121ea130f160ebb2d371484f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 18 Jun 2014 09:38:46 +0000 Subject: [PATCH 0927/1125] Update wizard to 0.2.33 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index f89a1ef3..3fffd41a 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.32 +Version: 0.2.33 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard @@ -44,6 +44,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Wed Jun 18 2014 David Scott - 0.2.33-1 +- Update to 0.2.33 + * Tue Jun 17 2014 David Scott - 0.2.32-1 - Add init script - Update to 0.2.32 From 2ef836871d3ac54b3c267a838968006bceb6a108 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 18 Jun 2014 19:01:01 +0000 Subject: [PATCH 0928/1125] Update the wizard to 0.2.35 Signed-off-by: David Scott --- SOURCES/xenserver-install-wizard-init | 42 --------------------------- SPECS/xenserver-install-wizard.spec | 19 +++--------- 2 files changed, 4 insertions(+), 57 deletions(-) delete mode 100755 SOURCES/xenserver-install-wizard-init diff --git a/SOURCES/xenserver-install-wizard-init b/SOURCES/xenserver-install-wizard-init deleted file mode 100755 index 21d509f4..00000000 --- a/SOURCES/xenserver-install-wizard-init +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -# xenserver-first-boot Complete XenServer installation -# -# chkconfig: 2345 1 99 -# description: Complete XenServer setup -### BEGIN INIT INFO -# Required-Start: $local_fs $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Complete XenServer installation -# Description: Complete XenServer installation -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -STAMPFILE=/var/xenserver/trigger-wizard - -start() { - if [ -e $STAMPFILE ]; then - rm -f $STAMPFILE - /usr/share/xenserver-install-wizard/xenserver-install-wizard.py --yes-to-all - fi -} -stop() { - echo . -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - *) - echo $"Usage: $0 {start|stop}" - exit 3 -esac - -exit $? diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 3fffd41a..f5b79a70 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,12 +2,11 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.33 +Version: 0.2.35 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: xenserver-install-wizard-init Requires: newt Requires: python Requires: python-argparse @@ -18,7 +17,6 @@ A simple wizard to configure a XenServer after install %prep %setup -q -cp %{SOURCE1} xenserver-install-wizard-init %build @@ -26,24 +24,15 @@ cp %{SOURCE1} xenserver-install-wizard-init make DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_bindir} ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroot}%{_bindir}/xenserver-install-wizard -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xenserver-install-wizard-init %{buildroot}%{_sysconfdir}/init.d/xenserver-install-wizard %files /usr/share/xenserver-install-wizard/* %{_bindir}/xenserver-install-wizard -%{_sysconfdir}/init.d/xenserver-install-wizard - -%post -[ ! -x /sbin/chkconfig ] || chkconfig --add xenserver-install-wizard - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xenserver-install-wizard stop > /dev/null 2>&1 - /sbin/chkconfig --del xenserver-install-wizard -fi %changelog +* Thu Jun 19 2014 David Scott - 0.2.35-1 +- Update to 0.2.35 + * Wed Jun 18 2014 David Scott - 0.2.33-1 - Update to 0.2.33 From 69926b981e57af186e79306bf279167b381a9550 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 19 Jun 2014 02:35:33 +0000 Subject: [PATCH 0929/1125] Update message-switch to 0.10.3 Signed-off-by: David Scott --- SPECS/message-switch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index d2bf0776..1904047a 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,5 +1,5 @@ Name: message-switch -Version: 0.10.2 +Version: 0.10.3 Release: 1%{?dist} Summary: A store and forward message switch License: FreeBSD @@ -73,6 +73,9 @@ developing applications that use %{name}. %{_libdir}/ocaml/message_switch/* %changelog +* Thu Jun 19 2014 David Scott - 0.10.3-1 +- Update to 0.10.3 + * Fri Jun 6 2014 Jon Ludlam - 0.10.2-1 - Update to 0.10.2 From 9e4d1c0c2c9b4d9075193eb29fe4c5df6ad4410d Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 20 Jun 2014 13:47:28 +0100 Subject: [PATCH 0930/1125] Update SM to latest trunk Pulls in CP-6697 to let us bind mount FileSRs to /var/run/sr-mount This is useful for Ubuntu which clears /var/run on boot --- SOURCES/sm-path-fix.patch | 45 ++++++++++++++++--------------- SOURCES/xcp-sm-pylint-fix.patch | 44 ++++++++++++++++++++++++++++++ SPECS/xcp-sm.spec | 48 ++++++++++++++++++++++++++++++--- 3 files changed, 112 insertions(+), 25 deletions(-) create mode 100644 SOURCES/xcp-sm-pylint-fix.patch diff --git a/SOURCES/sm-path-fix.patch b/SOURCES/sm-path-fix.patch index 117a0755..01cd4b18 100644 --- a/SOURCES/sm-path-fix.patch +++ b/SOURCES/sm-path-fix.patch @@ -1,7 +1,21 @@ -diff -urN sm-0.9.6-orig/drivers/blktap2.py sm-0.9.6/drivers/blktap2.py ---- sm-0.9.6-orig/drivers/blktap2.py 2013-11-01 19:10:26.000000000 +0000 -+++ sm-0.9.6/drivers/blktap2.py 2014-04-30 14:44:08.496171595 +0000 -@@ -112,7 +112,7 @@ +diff --git a/drivers/SR.py b/drivers/SR.py +index 41c6ce7..c8ec2c8 100755 +--- a/drivers/SR.py ++++ b/drivers/SR.py +@@ -27,7 +27,7 @@ import copy, os + + MOUNT_BASE = '/var/run/sr-mount' + DEFAULT_TAP = 'vhd' +-TAPDISK_UTIL = '/usr/sbin/td-util' ++TAPDISK_UTIL = '@LIBDIR@/blktap/sbin/td-util' + MASTER_LVM_CONF = '/etc/lvm/master' + + # LUN per VDI key for XenCenter +diff --git a/drivers/blktap2.py b/drivers/blktap2.py +index a0a25b3..f3029f7 100755 +--- a/drivers/blktap2.py ++++ b/drivers/blktap2.py +@@ -135,7 +135,7 @@ def retried(**args): return RetryLoop(**args) class TapCtl(object): """Tapdisk IPC utility calls.""" @@ -10,22 +24,11 @@ diff -urN sm-0.9.6-orig/drivers/blktap2.py sm-0.9.6/drivers/blktap2.py def __init__(self, cmd, p): self.cmd = cmd -diff -urN sm-0.9.6-orig/drivers/SR.py sm-0.9.6/drivers/SR.py ---- sm-0.9.6-orig/drivers/SR.py 2013-11-01 19:10:26.000000000 +0000 -+++ sm-0.9.6/drivers/SR.py 2014-04-30 14:43:49.056171573 +0000 -@@ -27,7 +27,7 @@ - - MOUNT_BASE = '/var/run/sr-mount' - DEFAULT_TAP = 'vhd' --TAPDISK_UTIL = '/usr/sbin/td-util' -+TAPDISK_UTIL = '@LIBDIR@/blktap/sbin/td-util' - - # LUN per VDI key for XenCenter - LUNPERVDI = "LUNperVDI" -diff -urN sm-0.9.6-orig/drivers/vhdutil.py sm-0.9.6/drivers/vhdutil.py ---- sm-0.9.6-orig/drivers/vhdutil.py 2013-11-01 19:10:26.000000000 +0000 -+++ sm-0.9.6/drivers/vhdutil.py 2014-04-30 14:44:39.792171865 +0000 -@@ -28,7 +28,7 @@ +diff --git a/drivers/vhdutil.py b/drivers/vhdutil.py +index 94696f7..ab6d444 100755 +--- a/drivers/vhdutil.py ++++ b/drivers/vhdutil.py +@@ -28,7 +28,7 @@ import re MAX_VHD_JOURNAL_SIZE = 6 * 1024 * 1024 # 2MB VHD block size, max 2TB VHD size MAX_CHAIN_SIZE = 30 # max VHD parent chain size @@ -34,7 +37,7 @@ diff -urN sm-0.9.6-orig/drivers/vhdutil.py sm-0.9.6/drivers/vhdutil.py OPT_LOG_ERR = "--debug" VHD_BLOCK_SIZE = 2 * 1024 * 1024 VHD_FOOTER_SIZE = 512 -@@ -324,7 +324,7 @@ +@@ -324,7 +324,7 @@ def _parseVHDInfo(line, extractUuidFunction): return vhdInfo def _getVHDParentNoCheck(path): diff --git a/SOURCES/xcp-sm-pylint-fix.patch b/SOURCES/xcp-sm-pylint-fix.patch new file mode 100644 index 00000000..69d6920b --- /dev/null +++ b/SOURCES/xcp-sm-pylint-fix.patch @@ -0,0 +1,44 @@ +diff -ur a/drivers/cleanup.py b/drivers/cleanup.py +--- a/drivers/cleanup.py 2014-03-21 12:41:04.000000000 +0000 ++++ b/drivers/cleanup.py 2014-04-02 15:35:37.396329000 +0100 +@@ -115,7 +115,7 @@ + (stdout, stderr) = proc.communicate(inputtext) + stdout = str(stdout) + stderr = str(stderr) +- rc = proc.returncode ++ rc = proc.returncode # pylint: disable=E1101 + if log: + Util.log("`%s`: %s" % (args, rc)) + if type(expectedRC) != type([]): +diff --git a/drivers/util.py b/drivers/util.py +index 65b86e2..a0b8361 100755 +--- a/drivers/util.py ++++ b/drivers/util.py +@@ -138,7 +138,7 @@ def doexec(args, inputtext=None): + # python 3.x or maybe a newer version of pylint in the future + stdout = str(stdout) + stderr = str(stderr) +- rc = proc.returncode ++ rc = proc.returncode # pylint: disable=E1101 + return (rc,stdout,stderr) + + def is_string(value): +@@ -1381,6 +1381,7 @@ class extractXVA: + # returns filename, checksum content. Returns filename, '' in case + # of checksum file missing. e.g. ova.xml + def getTuple(self): ++ # pylint: disable=E1101 + zerod_record = 0 + ret_f_name = '' + ret_base_f_name = '' + +diff -ur a/tests/pylintrc b/tests/pylintrc +--- a/tests/pylintrc 2014-03-21 12:41:04.000000000 +0000 ++++ b/tests/pylintrc 2014-04-02 14:21:59.592322566 +0000 +@@ -40,7 +40,7 @@ + # append the F0401 code at the end of the "disable" config variable to temporarily + # disable it from complaining missing libraries and get some useful information + # from a partial run at least. +-disable=design,rpython,newstyle,R,C,W,I ++disable=design,rpython,newstyle,R,C,W,I,F0401 + #,F0401 diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index aeaa33b1..2dea7cc6 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -2,17 +2,19 @@ Summary: XCP storage managers Name: xcp-sm -Version: 0.9.6 -Release: 3%{?dist} +Version: 0.9.7 +Release: 1%{?dist} License: LGPL URL: https://github.com/xapi-project/sm -Source0: https://github.com/euanh/sm/archive/%{version}/sm-%{version}.tar.gz +Source0: https://github.com/BobBall/sm/archive/%{version}/sm-%{version}.tar.gz Source1: xcp-mpath-scsidev-rules Source2: xcp-mpath-scsidev-script Patch0: sm-path-fix.patch +Patch1: xcp-sm-pylint-fix.patch BuildRequires: python-devel BuildRequires: swig BuildRequires: xen-devel +BuildRequires: pylint Requires: iscsi-initiator-utils Requires: sg3_utils Requires: xen-runtime @@ -23,6 +25,7 @@ This package contains storage backends used in XCP %prep %setup -q -n sm-%{version} %patch0 -p1 +%patch1 -p1 cp %{SOURCE1} xcp-mpath-scsidev-rules cp %{SOURCE2} xcp-mpath-scsidev-script @@ -42,6 +45,35 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- %post [ ! -x /sbin/chkconfig ] || chkconfig --add mpathroot +[ ! -x /sbin/chkconfig ] || chkconfig --add sm-multipath +service sm-multipath start + +[ -f /etc/lvm/lvm.conf.orig ] || cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf.orig || exit $? +[ -d /etc/lvm/master ] || mkdir /etc/lvm/master || exit $? +mv -f /etc/lvm/lvm.conf /etc/lvm/master/lvm.conf || exit $? +sed -i 's/metadata_read_only =.*/metadata_read_only = 0/' /etc/lvm/master/lvm.conf || exit $? +sed -i 's/archive = .*/archive = 0/' /etc/lvm/master/lvm.conf || exit $? +sed -i 's/filter \= \[ \"a\/\.\*\/\" \]/filter = \[ \"r\|\/dev\/xvd\.\|\"\, \"r\|\/dev\/VG\_Xen\.\*\/\*\|\"\]/g' /etc/lvm/master/lvm.conf || exit $? +cp /etc/lvm/master/lvm.conf /etc/lvm/lvm.conf || exit $? +sed -i 's/metadata_read_only =.*/metadata_read_only = 1/' /etc/lvm/lvm.conf || exit $? +# We try to be "update-alternatives" ready. +# If a file exists and it is not a symlink we back it up +if [ -e /etc/multipath.conf -a ! -h /etc/multipath.conf ]; then + mv -f /etc/multipath.conf /etc/multipath.conf.$(date +%F_%T) +fi +update-alternatives --install /etc/multipath.conf multipath.conf /etc/multipath.xenserver/multipath.conf 90 + +%preun +[ ! -x /sbin/chkconfig ] || chkconfig --del sm-multipath +#only remove in case of erase (but not at upgrade) +if [ $1 -eq 0 ] ; then + update-alternatives --remove multipath.conf /etc/multipath.xenserver/multipath.conf +fi +exit 0 + +%postun +[ ! -d /etc/lvm/master ] || rm -Rf /etc/lvm/master || exit $? +cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? %files /etc/cron.d/* @@ -217,7 +249,6 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- /usr/lib/xapi/sm/scsi_host_rescan.py /usr/lib/xapi/sm/scsi_host_rescan.pyc /usr/lib/xapi/sm/scsi_host_rescan.pyo -/opt/xensource/sm/snapwatchd/_xslib.so /opt/xensource/sm/snapwatchd/snapwatchd /opt/xensource/sm/snapwatchd/xslib.py /opt/xensource/sm/snapwatchd/xslib.pyc @@ -245,7 +276,13 @@ install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath- /usr/lib/xapi/sm/xs_errors.py /usr/lib/xapi/sm/xs_errors.pyc /usr/lib/xapi/sm/xs_errors.pyo +/usr/lib/xapi/sm/wwid_conf.py +/usr/lib/xapi/sm/wwid_conf.pyc +/usr/lib/xapi/sm/wwid_conf.pyo /sbin/mpathutil +/etc/rc.d/init.d/sm-multipath +%config /etc/udev/rules.d/40-multipath.rules +%config /etc/multipath.xenserver/multipath.conf %package rawhba @@ -266,6 +303,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Fri Jun 20 2014 Bob Ball - 0.9.7-1 +- Update to 0.9.7: Rebase to xapi-project/sm b890746ea3b64058654947a6b74caf578cc11311 + * Wed Apr 30 2014 Bob Ball - 0.9.6-3 - Added fix for paths to blktap to use buildroot versions From b08c85ad6e92133245d77fe5337fc709faee55b9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 19 Jun 2014 12:05:41 +0000 Subject: [PATCH 0931/1125] xcp-sm: update file list Signed-off-by: David Scott --- SPECS/xcp-sm.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 2dea7cc6..8a01e7b8 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,7 +3,7 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL URL: https://github.com/xapi-project/sm Source0: https://github.com/BobBall/sm/archive/%{version}/sm-%{version}.tar.gz @@ -80,7 +80,6 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /etc/rc.d/init.d/snapwatchd /etc/rc.d/init.d/mpathroot /etc/rc.d/init.d/sm-multipath -/etc/udev/rules.d/40-multipath.rules /etc/udev/rules.d/55-xs-mpath-scsidev.rules /etc/udev/scripts/xs-mpath-scsidev.sh /usr/lib/xapi/plugins/coalesce-leaf @@ -253,6 +252,9 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /opt/xensource/sm/snapwatchd/xslib.py /opt/xensource/sm/snapwatchd/xslib.pyc /opt/xensource/sm/snapwatchd/xslib.pyo +/opt/xensource/sm/snapwatchd/snapdebug.py +/opt/xensource/sm/snapwatchd/snapdebug.pyc +/opt/xensource/sm/snapwatchd/snapdebug.pyo /usr/lib/xapi/sm/sysdevice.py /usr/lib/xapi/sm/sysdevice.pyc /usr/lib/xapi/sm/sysdevice.pyo @@ -280,7 +282,6 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /usr/lib/xapi/sm/wwid_conf.pyc /usr/lib/xapi/sm/wwid_conf.pyo /sbin/mpathutil -/etc/rc.d/init.d/sm-multipath %config /etc/udev/rules.d/40-multipath.rules %config /etc/multipath.xenserver/multipath.conf @@ -303,6 +304,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Fri Jun 20 2014 David Scott - 0.9.7-2 +- Update file list + * Fri Jun 20 2014 Bob Ball - 0.9.7-1 - Update to 0.9.7: Rebase to xapi-project/sm b890746ea3b64058654947a6b74caf578cc11311 From 4e9f698e292f22aa2b520d01fdca34d6ca862ae3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 12 May 2014 13:14:41 +0000 Subject: [PATCH 0932/1125] Update ocaml-re to 1.2.2 Note: ocaml-re has a README.md (not simply a boring old README) Signed-off-by: David Scott --- SPECS/ocaml-re.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec index cbde5d7e..f1cb905a 100644 --- a/SPECS/ocaml-re.spec +++ b/SPECS/ocaml-re.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ocaml-re -Version: 1.2.1 -Release: 2%{?dist} +Version: 1.2.2 +Release: 1%{?dist} Summary: A regular expression library for OCaml License: LGPL URL: https://github.com/ocaml/ocaml-re @@ -37,7 +37,7 @@ make install %files %doc CHANGES %doc LICENSE -%doc README +%doc README.md %{_libdir}/ocaml/re %exclude %{_libdir}/ocaml/re/*.a %exclude %{_libdir}/ocaml/re/*.cmxa @@ -53,6 +53,9 @@ make install %{_libdir}/ocaml/re/*.mli %changelog +* Sat Jun 7 2014 David Scott - 1.2.2-1 +- Update to 1.2.2 + * Fri May 30 2014 Euan Harris - 1.2.1-2 - Split files correctly between base and devel packages From 08321681707d6e47dafc785d99e104e18c2422f7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 12 May 2014 13:53:13 +0000 Subject: [PATCH 0933/1125] Update ocaml-lambda-term to 1.6, utop to 1.12 Signed-off-by: David Scott --- SPECS/ocaml-lambda-term.spec | 22 ++++++++++++++++------ SPECS/utop.spec | 5 ++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 60e198ca..15333fc1 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-lambda-term -Version: 1.2 -Release: 2%{?dist} +Version: 1.6 +Release: 1%{?dist} Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml License: BSD3 URL: http://forge.ocamlcore.org/projects/lambda-term/ -Source0: http://forge.ocamlcore.org/frs/download.php/945/lambda-term-%{version}.tar.gz +Source0: https://github.com/diml/lambda-term/archive/%{version}/lambda-term-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-camomile-devel @@ -46,15 +46,22 @@ make install rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions %files -%doc CHANGES +%doc CHANGES.md %doc LICENSE %{_libdir}/ocaml/lambda-term +%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so +%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner %exclude %{_libdir}/ocaml/lambda-term/*.a %exclude %{_libdir}/ocaml/lambda-term/*.cmxa %exclude %{_libdir}/ocaml/lambda-term/*.cmx +%exclude %{_libdir}/ocaml/lambda-term/*.ml %exclude %{_libdir}/ocaml/lambda-term/*.mli -%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so -%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner + +%files devel +%{_libdir}/ocaml/lambda-term/*.a +%{_libdir}/ocaml/lambda-term/*.cmx +%{_libdir}/ocaml/lambda-term/*.cmxa +%{_libdir}/ocaml/lambda-term/*.mli %files devel %{_libdir}/ocaml/lambda-term/*.a @@ -63,6 +70,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions %{_libdir}/ocaml/lambda-term/*.mli %changelog +* Sat Jun 7 2014 David Scott - 1.6-1 +- Update to 1.6 + * Fri May 30 2014 Euan Harris - 1.2-2 - Split files correctly between base and devel packages diff --git a/SPECS/utop.spec b/SPECS/utop.spec index 684e9c9d..4789bddd 100644 --- a/SPECS/utop.spec +++ b/SPECS/utop.spec @@ -1,5 +1,5 @@ Name: utop -Version: 1.5 +Version: 1.12 Release: 1%{?dist} Summary: A toplevel for OCaml which can run in a terminal or in Emacs License: BSD @@ -39,6 +39,9 @@ ocaml setup.ml -install /usr/share/emacs/site-lisp/utop.el %changelog +* Mon May 12 2014 David Scott - 1.12-1 +- Update to 1.12 + * Fri Jun 21 2013 David Scott - 1.5-1 - Update to version 1.5 (discovered lurking in plain sight on github) From 04362d2263a1a5a1ca6ffa222dea89b5f352c696 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 11 May 2014 12:48:33 +0000 Subject: [PATCH 0934/1125] Update react to 1.1.0 and lwt to 2.4.5 Note: ocaml-react has CHANGES.md (not a boring CHANGES) Signed-off-by: David Scott --- SPECS/ocaml-lwt.spec | 7 +++++-- SPECS/ocaml-react.spec | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec index f503abf9..df471135 100644 --- a/SPECS/ocaml-lwt.spec +++ b/SPECS/ocaml-lwt.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-lwt -Version: 2.4.4 +Version: 2.4.5 Release: 1%{?dist} Summary: OCaml lightweight thread library @@ -17,7 +17,7 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-react-devel >= 0.9.0 +BuildRequires: ocaml-react-devel >= 1.0.0 #BuildRequires: libev-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-text-devel @@ -77,6 +77,9 @@ strip $OCAMLFIND_DESTDIR/stublibs/dll*.so %{_libdir}/ocaml/stublibs/*.so.owner %changelog +* Sun May 11 2014 David Scott - 2.4.5-1 +- Update to 2.4.5 + * Mon Mar 10 2014 Bob Ball - 2.4.4-1 - Update to 2.4.4 diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 2543f902..97077ecf 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -2,16 +2,15 @@ %global debug_package %{nil} Name: ocaml-react -Version: 0.9.4 -Release: 3%{?dist} +Version: 1.1.0 +Release: 2%{?dist} Summary: OCaml framework for Functional Reactive Programming (FRP) License: BSD URL: http://erratique.ch/software/react Source0: https://github.com/dbuenzli/react/archive/v%{version}/react-%{version}.tar.gz Source1: react-LICENSE -BuildRequires: oasis -BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml >= 3.11.0 BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -40,18 +39,14 @@ developing applications that use %{name}. cp %{SOURCE1} LICENSE %build -oasis setup -ocaml setup.ml -configure -ocaml setup.ml -build +ocaml pkg/build.ml native=true native-dynlink=true %install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install - +mkdir -p %{buildroot}/%{_libdir}/ocaml/react +cp _build/pkg/META _build/src/react.a _build/src/react.cma _build/src/react.cmi _build/src/react.cmx _build/src/react.cmxa _build/src/react.cmxs _build/src/react.mli %{buildroot}/%{_libdir}/ocaml/react %files -%doc CHANGES +%doc CHANGES.md %doc README %{_libdir}/ocaml/react %exclude %{_libdir}/ocaml/react/*.a @@ -66,6 +61,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/react/*.mli %changelog +* Sat Jun 7 2014 David Scott - 1.1.0-2 +- Update for 1.1.0 + * Thu May 29 2014 Euan Harris - 0.9.4-3 - Split files correctly between base and devel packages From eb4545ce63c37f94f2edbdba74aa454885b89701 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 19 Jun 2014 12:22:06 +0000 Subject: [PATCH 0935/1125] ocaml-react: the README is now README.md Signed-off-by: David Scott --- SPECS/ocaml-react.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec index 97077ecf..2162bb14 100644 --- a/SPECS/ocaml-react.spec +++ b/SPECS/ocaml-react.spec @@ -47,7 +47,7 @@ cp _build/pkg/META _build/src/react.a _build/src/react.cma _build/src/react.cmi %files %doc CHANGES.md -%doc README +%doc README.md %{_libdir}/ocaml/react %exclude %{_libdir}/ocaml/react/*.a %exclude %{_libdir}/ocaml/react/*.cmxa From 740a2ed094e772b61ec782a19aa6a1892deb4349 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 19 Jun 2014 12:49:43 +0000 Subject: [PATCH 0936/1125] ocaml-lambda-term: remove unused %exclude Signed-off-by: David Scott --- SPECS/ocaml-lambda-term.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec index 15333fc1..310de73e 100644 --- a/SPECS/ocaml-lambda-term.spec +++ b/SPECS/ocaml-lambda-term.spec @@ -54,7 +54,6 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions %exclude %{_libdir}/ocaml/lambda-term/*.a %exclude %{_libdir}/ocaml/lambda-term/*.cmxa %exclude %{_libdir}/ocaml/lambda-term/*.cmx -%exclude %{_libdir}/ocaml/lambda-term/*.ml %exclude %{_libdir}/ocaml/lambda-term/*.mli %files devel From e67970fc9c23831b74cbe85bc7e6dc87731d227f Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 May 2014 08:20:20 +0000 Subject: [PATCH 0937/1125] Update to ocaml-xen-lowlevel-libs.0.9.16, with support for xen-4.2 and 4.4 Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 27 +++++++++++++++++++++++---- SPECS/xenopsd.spec | 4 ++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 3af87031..385fc171 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.14 +Version: 0.9.16 Release: 2%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL @@ -28,6 +28,14 @@ Requires: %{name} = %{version}-%{release} The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. +%package runtime +Summary: Runtime binaries for users of %{name} +Group: Development/Libraries + +%description runtime +The %{name}-runtime package contains binaries which must be present +at runtime when executing programs that use %{name}. + %prep %setup -q @@ -40,11 +48,11 @@ make export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR/stublibs export OCAMLFIND_LDCONF=ignore -make install DESTDIR=${buildroot} - +make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %files %doc README.md +%{_libexecdir}/xenopsd/xenguest %{_libdir}/ocaml/xenctrl %exclude %{_libdir}/ocaml/xenctrl/*.a %exclude %{_libdir}/ocaml/xenctrl/*.cmxa @@ -68,13 +76,24 @@ make install DESTDIR=${buildroot} %{_libdir}/ocaml/xenctrl/*.cmxa %{_libdir}/ocaml/xenctrl/*.cmx %{_libdir}/ocaml/xenctrl/*.mli - #%{_libdir}/ocaml/xenlight/*.a #%{_libdir}/ocaml/xenlight/*.cmxa #%{_libdir}/ocaml/xenlight/*.cmx #%{_libdir}/ocaml/xenlight/*.mli +%files runtime +%{_libexecdir}/xenopsd/xenguest + %changelog +* Sat Jun 7 2014 David Scott - 0.9.16-2 +- Place xenguest in %{name}-runtime + +* Sat Jun 7 2014 David Scott - 0.9.16-1 +- Update to 0.9.16 + +* Sat Jun 7 2014 David Scott - 0.9.15-1 +- Update to 0.9.15 + * Mon Jun 2 2014 Euan Harris - 0.9.14-2 - Split files correctly between base and devel packages diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index a36779e1..7bc3bc01 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -36,6 +36,7 @@ Requires: redhat-lsb-core Requires: xenops-cli Requires: vncterm Requires: linux-guest-loader +Requires: ocaml-xen-lowlevel-libs-runtime %description Simple VM manager for the xapi toolstack. @@ -188,6 +189,9 @@ fi #fi %changelog +* Sat Jun 20 2014 David Scott - 0.9.37-1 +- Depend on the ocaml-xen-lowlevel-libs-runtime package + * Fri Jun 6 2014 Jonathan Ludlam - 0.9.37-1 - Update to 0.9.37 From 75ecb10f839e587f452a1b65443ba5a2809df13a Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 13 May 2014 12:55:44 +0000 Subject: [PATCH 0938/1125] xenopsd: build and use xenguest from ocaml-xen-lowlevel-libs Signed-off-by: David Scott --- SPECS/xenopsd.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 7bc3bc01..56fb0cad 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -85,7 +85,7 @@ cp %{SOURCE6} xenopsd-network-conf %build make configure -./configure --libexecdir %{_libexecdir}/%{name} +./configure --libexecdir %{_libexecdir}/%{name} --disable-xenguestbin make %install @@ -96,7 +96,6 @@ install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc #install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight mkdir -p %{buildroot}/%{_libexecdir}/%{name} -install -D _build/xenguest/xenguest_main.native %{buildroot}/%{_libexecdir}/%{name}/xenguest install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl @@ -150,7 +149,6 @@ fi %files xc %{_sbindir}/xenopsd-xc %{_sysconfdir}/init.d/xenopsd-xc -%{_libexecdir}/%{name}/xenguest %post xc /sbin/chkconfig --add xenopsd-xc @@ -191,6 +189,7 @@ fi %changelog * Sat Jun 20 2014 David Scott - 0.9.37-1 - Depend on the ocaml-xen-lowlevel-libs-runtime package +- Don't include xenguest: this now comes from ocaml-xen-lowlevel-libs * Fri Jun 6 2014 Jonathan Ludlam - 0.9.37-1 - Update to 0.9.37 From fa9ffa30cd55f45e39fed18bb8e5972419c91939 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 21 Jun 2014 12:05:28 +0000 Subject: [PATCH 0939/1125] xenopsd: remove --disable-xenguestbin from configure This relies on the configure script automatically disabling xenguest. Signed-off-by: David Scott --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 56fb0cad..783b1cfc 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -85,7 +85,7 @@ cp %{SOURCE6} xenopsd-network-conf %build make configure -./configure --libexecdir %{_libexecdir}/%{name} --disable-xenguestbin +./configure --libexecdir %{_libexecdir}/%{name} make %install From 0a7f9a7748a92be5c4d2a1b89c61c43a0f6514c2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 21 Jun 2014 13:20:03 +0000 Subject: [PATCH 0940/1125] ocaml-xen-lowlevel-libs.0.9.17 Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 385fc171..be3d89c3 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.16 -Release: 2%{?dist} +Version: 0.9.17 +Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs @@ -85,6 +85,9 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libexecdir}/xenopsd/xenguest %changelog +* Sat Jun 21 2014 David Scott - 0.9.17-1 +- Update to 0.9.17 + * Sat Jun 7 2014 David Scott - 0.9.16-2 - Place xenguest in %{name}-runtime From 7c7d21ce30b762e8609a7858406532abd12dbe7d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 21 Jun 2014 16:09:23 +0000 Subject: [PATCH 0941/1125] Update ocaml-xen-lowlevel-libs.0.9.18 Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index be3d89c3..0a7f5948 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.17 +Version: 0.9.18 Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL @@ -85,8 +85,8 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libexecdir}/xenopsd/xenguest %changelog -* Sat Jun 21 2014 David Scott - 0.9.17-1 -- Update to 0.9.17 +* Sat Jun 21 2014 David Scott - 0.9.18-1 +- Update to 0.9.18 * Sat Jun 7 2014 David Scott - 0.9.16-2 - Place xenguest in %{name}-runtime From 8c24812b610a74d94f66fbd4cff2af2bac3e709b Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 24 Jun 2014 13:55:24 +0100 Subject: [PATCH 0942/1125] ocaml-evtchn, xenopsd: Fix bogus dates in changelogs Signed-off-by: Euan Harris --- SPECS/ocaml-evtchn.spec | 2 +- SPECS/xenopsd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index 606bb803..7a984ecc 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -60,5 +60,5 @@ make install %{_libdir}/ocaml/xen-evtchn/*.mli %changelog -* Tue Jun 02 2014 David Scott - 1.0.1-1 +* Fri May 23 2014 David Scott - 1.0.1-1 - Initial package diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 783b1cfc..ef3eba52 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -187,7 +187,7 @@ fi #fi %changelog -* Sat Jun 20 2014 David Scott - 0.9.37-1 +* Sat Jun 21 2014 David Scott - 0.9.37-1 - Depend on the ocaml-xen-lowlevel-libs-runtime package - Don't include xenguest: this now comes from ocaml-xen-lowlevel-libs From 1461756de0916550aecfeb1ee1fead11052ca3a3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 25 Jun 2014 17:04:00 +0100 Subject: [PATCH 0943/1125] mappkgname: Add overrides needed by Ubuntu Trusty Signed-off-by: Euan Harris --- scripts/lib/mappkgname.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 12b4ef39..92b2b0a5 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -7,11 +7,14 @@ made dynamically by querying the package databases.""" TARGET_SPECIFIC_MAPPING = { - 'jessie/sid': { + 'debian:jessie/sid': { 'kernel': ['linux-image-amd64'], 'kernel-firmware': ['firmware-linux-free'], "xen-libs": ["libxen-4.3"], }, + 'ubuntu:14.04': { + "xen-libs": ["libxen-4.4"], + }, } MAPPING = { @@ -147,7 +150,8 @@ def map_package(name, target=None): is_devel = False if target is None: - target = platform.linux_distribution(full_distribution_name=False)[1].lower() + dist = platform.linux_distribution(full_distribution_name=False) + target = "%s:%s" % (dist[0].lower(), dist[1].lower()) # RPM 4.6 adds architecture constraints to dependencies. Drop them. if name.endswith( "(x86-64)" ): From 81b4dc2bfebc8c18209c5584b4dc31aadd9497c4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 9 May 2014 16:45:13 +0000 Subject: [PATCH 0944/1125] If on ARM, default to building ARM Signed-off-by: David Scott --- scripts/deb/configure.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index 9c17b1b7..8b6de7af 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -3,7 +3,13 @@ set -eu echo "Configuring DEB-based build" -ARCH=${ARCH:-amd64} +if [ $(arch | grep arm) ]; then + echo Running on an $(arch) so targetting armhf + ARCH=${ARCH:-armhf} +else + echo Running on an $(arch) so targetting amd64 + ARCH=${ARCH:-amd64} +fi DIST=${DIST:-`lsb_release -sc`} BASEPATH=/var/cache/pbuilder/base.cow APT_REPOS=${APT_REPOS:-} From ff0eb4b67835d48d0612df847ed5a40ce2036dc0 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 15 May 2014 10:46:30 +0100 Subject: [PATCH 0945/1125] Add package containing missing header Signed-off-by: David Scott --- ...eaders_usr_include_xen_arch-arm_hvm_save.h | 1 + SPECS/blktap.spec | 1 + SPECS/ocaml-gnt.spec | 1 + SPECS/ocaml-libvhd.spec | 1 + SPECS/ocaml-xen-api-libs-transitional.spec | 1 + SPECS/ocaml-xen-lowlevel-libs.spec | 1 + SPECS/squeezed.spec | 1 + SPECS/vncterm.spec | 1 + SPECS/xapi.spec | 1 + SPECS/xcp-rrdd.spec | 1 + SPECS/xcp-sm.spec | 1 + SPECS/xen-missing-headers.spec | 29 +++++++++++++++++++ SPECS/xenopsd.spec | 1 + 13 files changed, 41 insertions(+) create mode 100644 SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h create mode 100644 SPECS/xen-missing-headers.spec diff --git a/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h b/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h new file mode 100644 index 00000000..d1ab56ad --- /dev/null +++ b/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h @@ -0,0 +1 @@ +/* This file intentionally left blank */ diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 6e10e9aa..2a38b439 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -11,6 +11,7 @@ BuildRequires: libaio-devel BuildRequires: libtool BuildRequires: libuuid-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers BuildRequires: openssl-devel %description diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index f843252e..94dde3cb 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -16,6 +16,7 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers Requires: ocaml Requires: ocaml-findlib diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index 1a540d1d..aec5e8d2 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -11,6 +11,7 @@ BuildRequires: libuuid-devel BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: xen-devel +BuildRequires: xen-missing-headers %description Simple C bindings which allow .vhd files to be manipulated. diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index 201742d8..a6dc8fc4 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -18,6 +18,7 @@ BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers BuildRequires: ocaml-xcp-idl-devel Requires: xen-libs diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 0a7f5948..34a54242 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -15,6 +15,7 @@ BuildRequires: ocaml-ocamldoc BuildRequires: libuuid-devel BuildRequires: ocaml-lwt-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers BuildRequires: ocaml-cstruct-devel %description diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index fdad606f..42e17644 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -19,6 +19,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers Requires: redhat-lsb-core Requires: message-switch diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index 3081bb2f..da9f1ef7 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -7,6 +7,7 @@ URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRequires: xen-devel +BuildRequires: xen-missing-headers %description This package contains the vncterm utility diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 25b6403c..3eb3de69 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -20,6 +20,7 @@ BuildRequires: pam-devel BuildRequires: tetex-latex BuildRequires: xen-devel BuildRequires: libffi-devel +BuildRequires: xen-missing-headers BuildRequires: zlib-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 08bc4433..ac735681 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -20,6 +20,7 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: forkexecd-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers Requires: redhat-lsb-core %description diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 8a01e7b8..36b44143 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -15,6 +15,7 @@ BuildRequires: python-devel BuildRequires: swig BuildRequires: xen-devel BuildRequires: pylint +BuildRequires: xen-missing-headers Requires: iscsi-initiator-utils Requires: sg3_utils Requires: xen-runtime diff --git a/SPECS/xen-missing-headers.spec b/SPECS/xen-missing-headers.spec new file mode 100644 index 00000000..740555ef --- /dev/null +++ b/SPECS/xen-missing-headers.spec @@ -0,0 +1,29 @@ +Name: xen-missing-headers +Version: 4.4 +Release: 3%{?dist} +Summary: Headers missing from the ARM xen-4.4 package +License: GPL +Group: Development/Libraries +URL: http://xenproject.org/ +Source0: xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h + +%description +Headers missing from the ARM xen-4.4 package. + +%prep +cp ${SOURCE0} save.h + +%build +touch save.h + +%install +mkdir -p %{buildroot}/usr/include/xen/arch-arm/hvm +cp save.h %{buildroot}/usr/include/xen/arch-arm/hvm/save.h + +%files +/usr/include/xen/arch-arm/hvm/save.h + +%changelog +* Thu May 15 2014 David Scott - 4.4-3 +- Initial package + diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index ef3eba52..d4737f3f 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -29,6 +29,7 @@ BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers BuildRequires: ocaml-uutf-devel BuildRequires: ocaml-xcp-rrd-devel Requires: message-switch From a1e79788a70e90e870b254f6e82de66d88f1a016 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 15 May 2014 20:14:01 +0000 Subject: [PATCH 0946/1125] specdep: if we're building on armv7l, build armhf packages armhf is the architecture of the ARM trusty port. Signed-off-by: David Scott --- pkg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg.py b/pkg.py index 0a9c989b..61cd44ec 100755 --- a/pkg.py +++ b/pkg.py @@ -43,6 +43,8 @@ def map_arch_deb(arch): """Map RPM package architecture to equivalent Deb architecture""" if arch == "x86_64": return "amd64" + elif arch == "armv7l": + return "armhf" elif arch == "noarch": return "all" else: From b83786daf2e6a408e36b5e695d6ddac2144a63f6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 29 Jun 2014 21:16:10 +0000 Subject: [PATCH 0947/1125] debiancontrol: add armhf to x86_64 and i686 Signed-off-by: David Scott --- scripts/lib/debiancontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/debiancontrol.py b/scripts/lib/debiancontrol.py index acb0ccd7..602db8e7 100644 --- a/scripts/lib/debiancontrol.py +++ b/scripts/lib/debiancontrol.py @@ -41,7 +41,7 @@ def source_deb_from_spec(spec, tree): def binary_deb_from_spec(spec, tree): res = "" res += "Package: %s\n" % mappkgname.map_package_name(spec.header) - if spec.header['arch'] in ["x86_64", "i686"]: + if spec.header['arch'] in ["x86_64", "i686", "armhf"]: res += "Architecture: any\n" else: res += "Architecture: all\n" From 9fb5d3a0a23f058c73c6387718a67477a112ef90 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 1 Jul 2014 14:10:33 +0100 Subject: [PATCH 0948/1125] rpm/configure: Explicitly install createrepo Installing mock on CentOS 6.5 pulls in createrepo_c. Install the old createrepo explicitly so we can still use it. Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index aedde9bb..f0669198 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -3,7 +3,7 @@ set -eu echo "Configuring RPM-based build" -rpm -q mock rpm-build >/dev/null 2>&1 || sudo yum install -y mock rpm-build +rpm -q mock rpm-build createrepo >/dev/null 2>&1 || sudo yum install -y mock rpm-build createrepo echo -n "Writing mock configuration..." mkdir -p mock From 931d567c25131cac541765080d89028e8465d655 Mon Sep 17 00:00:00 2001 From: Si Beaumont Date: Tue, 1 Jul 2014 15:18:32 +0100 Subject: [PATCH 0949/1125] Update README to reflect the need for 64-bit build env Signed-off-by: Si Beaumont --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85794e3a..83fc9ee7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ RPM-based distributions ----------------------- On RPM-based distributions, the packages are built using `mock`. -To install it on a RHEL/CentOS system then you will need to add the +To install it on a 64-bit RHEL/CentOS system then you will need to add the [EPEL repositories](http://fedoraproject.org/wiki/EPEL). Here is a useful article for [CentOS](http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x). From 03c854cced1258552d4e7a3261c72b7f95153534 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Jul 2014 11:16:29 +0100 Subject: [PATCH 0950/1125] specdep: Switch back to using argparse Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 2 +- specdep.py | 56 +++++++++++----------------------------- 2 files changed, 16 insertions(+), 42 deletions(-) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index f0669198..32ec7c8f 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -3,7 +3,7 @@ set -eu echo "Configuring RPM-based build" -rpm -q mock rpm-build createrepo >/dev/null 2>&1 || sudo yum install -y mock rpm-build createrepo +rpm -q mock rpm-build createrepo python-argparse >/dev/null 2>&1 || sudo yum install -y mock rpm-build createrepo python-argparse echo -n "Writing mock configuration..." mkdir -p mock diff --git a/specdep.py b/specdep.py index cc50d648..56049b1b 100755 --- a/specdep.py +++ b/specdep.py @@ -2,12 +2,12 @@ # see http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch16s04.html -import sys +import argparse import os +import pkg import platform +import sys import urlparse -import pkg -import getopt from scripts.lib import mappkgname @@ -98,51 +98,25 @@ def buildrequires_for_rpm(spec, provides_to_rpm): print "%s: %s" % (rpmpath, buildreqrpm) -def usage(name): - """ - Print usage information - """ - print "usage: %s [-h] [-i PKG] SPEC [SPEC ...]" % name - - def parse_cmdline(): """ Parse command line options """ - - try: - opts, args = getopt.getopt(sys.argv[1:], "hi:d:", - ["help", "ignore=", "dist="]) - except getopt.GetoptError as err: - usage(sys.argv[0]) - print str(err) - sys.exit(1) - - ignore = [] - dist = "" - for opt, val in opts: - if opt == "-i" or opt == "--ignore": - ignore.append(val) - elif opt == "-d" or opt == "--dist": - dist = val - else: - usage(sys.argv[0]) - print "unknown option: %s" % opt - sys.exit(1) - - if len(args) == 0: - usage(sys.argv[0]) - print "%s: error: too few arguments" % sys.argv[0] - sys.exit(1) - - return {"ignore": ignore, "specs": args, "dist": dist} + parser = argparse.ArgumentParser(description= + "Generate Makefile dependencies from RPM Spec files") + parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file") + parser.add_argument("-i", "--ignore", metavar="PKG", action="append", + default=[], help="package name to ignore") + parser.add_argument("-d", "--dist", metavar="DIST", + default=[], help="distribution tag (used in RPM filenames)") + return parser.parse_args() def main(): - params = parse_cmdline() + args = parse_cmdline() specs = {} - for spec_path in params['specs']: + for spec_path in args.specs: try: if build_type() == "deb": os_type = platform.linux_distribution(full_distribution_name=False)[1].lower() @@ -150,9 +124,9 @@ def main(): spec = pkg.Spec(spec_path, target="deb", map_name=map_name_fn) else: - spec = pkg.Spec(spec_path, target="rpm", dist=params['dist']) + spec = pkg.Spec(spec_path, target="rpm", dist=args.dist) pkg_name = spec.name() - if pkg_name in params['ignore']: + if pkg_name in args.ignore: continue specs[os.path.basename(spec_path)] = spec From 03e9085d0e8cc2d9e82cf9d39fcd9e26f7c3bd69 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 11 Jul 2014 17:20:57 +0100 Subject: [PATCH 0951/1125] specdep: Fix default value for --dist argument Signed-off-by: Euan Harris --- specdep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specdep.py b/specdep.py index 56049b1b..1c6e9984 100755 --- a/specdep.py +++ b/specdep.py @@ -108,7 +108,7 @@ def parse_cmdline(): parser.add_argument("-i", "--ignore", metavar="PKG", action="append", default=[], help="package name to ignore") parser.add_argument("-d", "--dist", metavar="DIST", - default=[], help="distribution tag (used in RPM filenames)") + default="", help="distribution tag (used in RPM filenames)") return parser.parse_args() From a722e5b9f8ce154e2b9e99d5c572ee619416b01e Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 15 Jul 2014 23:26:13 +0000 Subject: [PATCH 0952/1125] Upgrade type-conv and sexplib to Mirage compatible versions Signed-off-by: David Scott --- SPECS/ocaml-sexplib.spec | 25 ++++++++++++++++++++++--- SPECS/ocaml-type-conv.spec | 5 ++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 246469b8..783d6728 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ocaml-sexplib -Version: 109.20.00 -Release: 2%{?dist} +Version: 111.17.00 +Release: 1%{?dist} Summary: Convert values to and from s-expressions in OCaml License: LGPLv2+ with exceptions and BSD @@ -41,7 +41,7 @@ mkdir -p $OCAMLFIND_DESTDIR make install %files -%doc CHANGES.txt +%doc CHANGES.md %doc COPYRIGHT.txt %doc INRIA-DISCLAIMER.txt %doc INSTALL.txt @@ -54,14 +54,33 @@ make install %exclude %{_libdir}/ocaml/sexplib/*.cmxa %exclude %{_libdir}/ocaml/sexplib/*.cmx %exclude %{_libdir}/ocaml/sexplib/*.mli +%{_libdir}/ocaml/sexplib_num +%exclude %{_libdir}/ocaml/sexplib_num/*.a +%exclude %{_libdir}/ocaml/sexplib_num/*.cmxa +%exclude %{_libdir}/ocaml/sexplib_num/*.cmx +%exclude %{_libdir}/ocaml/sexplib_num/*.mli +%{_libdir}/ocaml/sexplib_unix +%exclude %{_libdir}/ocaml/sexplib_unix/*.a +%exclude %{_libdir}/ocaml/sexplib_unix/*.cmxa +%exclude %{_libdir}/ocaml/sexplib_unix/*.cmx %files devel %{_libdir}/ocaml/sexplib/*.a %{_libdir}/ocaml/sexplib/*.cmx %{_libdir}/ocaml/sexplib/*.cmxa %{_libdir}/ocaml/sexplib/*.mli +%{_libdir}/ocaml/sexplib_num/*.a +%{_libdir}/ocaml/sexplib_num/*.cmx +%{_libdir}/ocaml/sexplib_num/*.cmxa +%{_libdir}/ocaml/sexplib_num/*.mli +%{_libdir}/ocaml/sexplib_unix/*.a +%{_libdir}/ocaml/sexplib_unix/*.cmx +%{_libdir}/ocaml/sexplib_unix/*.cmxa %changelog +* Wed Jul 16 2014 David Scott - 111.17.00-1 +- Update to 111.17.00 for Mirage compat + * Fri May 30 2014 Euan Harris - 109.20.00-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec index 857f9331..3c190a3a 100644 --- a/SPECS/ocaml-type-conv.spec +++ b/SPECS/ocaml-type-conv.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-type-conv -Version: 109.20.00 +Version: 111.13.00 Release: 1%{?dist} Summary: OCaml base library for type conversion @@ -41,6 +41,9 @@ make install %{_libdir}/ocaml/type_conv %changelog +* Wed Jul 16 2014 David Scott - 111.13.00-1 +- Updated to 111.13.00 for Mirage compatibility + * Thu Nov 25 2010 Mike McClurg - 109.20.00-1 - Updated to version 2.0.1 for compatability with OCaml 3.12.0 From 53d948dabd3d22adc28e46f7ec23f28909f04cc9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 15 Jul 2014 23:26:39 +0000 Subject: [PATCH 0953/1125] Update evtchn to 1.0.5 Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index 7a984ecc..4daafd53 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -1,12 +1,12 @@ %define debug_package %{nil} Name: ocaml-evtchn -Version: 1.0.1 +Version: 1.0.5 Release: 1%{?dist} Summary: OCaml bindings for userspace Xen event channel controls License: ISC -URL: https://github.com/xapi-project/ocaml-evtchn/ -Source0: https://github.com/xapi-project/ocaml-evtchn/archive/v%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/mirage/ocaml-evtchn/ +Source0: https://github.com/mirage/ocaml-evtchn/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel @@ -60,5 +60,8 @@ make install %{_libdir}/ocaml/xen-evtchn/*.mli %changelog +* Wed Jul 16 2014 David Scott - 1.0.5-1 +- Update to 1.0.5 + * Fri May 23 2014 David Scott - 1.0.1-1 - Initial package From 7384f8cd218e864391607fe020f0c72170508f0d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 15 Jul 2014 23:26:51 +0000 Subject: [PATCH 0954/1125] Update mirage-types to 1.2.0 Signed-off-by: David Scott --- SPECS/ocaml-mirage-types.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec index 65cde14e..f4f32f07 100644 --- a/SPECS/ocaml-mirage-types.spec +++ b/SPECS/ocaml-mirage-types.spec @@ -1,12 +1,12 @@ %define debug_package %{nil} Name: ocaml-mirage-types -Version: 1.1.1 +Version: 1.2.0 Release: 1%{?dist} Summary: MirageOS interfaces License: ISC URL: https://github.com/mirage/mirage -Source0: https://github.com/mirage/mirage/archive/%{version}/mirage-%{version}.tar.gz +Source0: https://github.com/mirage/mirage/archive/v%{version}/mirage-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-cstruct-devel BuildRequires: ocaml-findlib-devel @@ -50,6 +50,9 @@ make install-types %{_libdir}/ocaml/mirage-types/*.mli %changelog +* Wed Jul 16 2014 David Scott - 1.2.0-1 +- Update to 1.2.0 + * Tue Apr 1 2014 Euan Harris - 1.1.1-1 - Initial package From 85d22feca3c5aeb2ecbcd23f29b554a7997640b9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 15 Jul 2014 23:27:06 +0000 Subject: [PATCH 0955/1125] Update shared-memory-ring to 1.1.0 Signed-off-by: David Scott --- SPECS/ocaml-shared-memory-ring.spec | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/SPECS/ocaml-shared-memory-ring.spec b/SPECS/ocaml-shared-memory-ring.spec index ed1e5cec..167bafa7 100644 --- a/SPECS/ocaml-shared-memory-ring.spec +++ b/SPECS/ocaml-shared-memory-ring.spec @@ -1,9 +1,9 @@ %define debug_package %{nil} Name: ocaml-shared-memory-ring -Version: 1.0.0 +Version: 1.1.0 Release: 1%{?dist} -Summary: OCaml implementation of Xen memory protocols +Summary: OCaml implementation of Xen shared memory rings License: ISC URL: https://github.com/mirage/shared-memory-ring/ Source0: https://github.com/mirage/shared-memory-ring/archive/%{version}/%{name}-%{version}.tar.gz @@ -12,19 +12,17 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-lwt-devel %description -This is a pure OCaml implementation of Xen-style shared memory rings. -These can be used for RPCs (disk requests, network packets) and for streaming -(xenstore, consoles) +The shared memory ring protocols are used for: xenstore, console, disk and network devices. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel%{?_isa} +Requires: ocaml-cstruct-devel%{?_isa} +Requires: ocaml-lwt-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for @@ -58,5 +56,5 @@ make install %{_libdir}/ocaml/shared-memory-ring/*.mli %changelog -* Wed Jun 04 2014 David Scott - 1.0.0-1 +* Wed Jun 16 2014 David Scott - 1.1.0-1 - Initial package From 62560ecf2efde0fa6438fe6d9f9c2f24a60149f5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 15 Jul 2014 23:27:20 +0000 Subject: [PATCH 0956/1125] Add mirage-testvm and dependencies Signed-off-by: David Scott --- SPECS/mirage-testvm.spec | 56 ++++++++++++++++++++ SPECS/ocaml-mirage-block-xen.spec | 65 +++++++++++++++++++++++ SPECS/ocaml-mirage-clock-unix.spec | 53 +++++++++++++++++++ SPECS/ocaml-mirage-clock-xen.spec | 53 +++++++++++++++++++ SPECS/ocaml-mirage-console-xen.spec | 55 +++++++++++++++++++ SPECS/ocaml-mirage-xen.spec | 82 +++++++++++++++++++++++++++++ SPECS/ocaml-mirage.spec | 69 ++++++++++++++++++++++++ SPECS/ocaml-testvmlib.spec | 78 +++++++++++++++++++++++++++ SPECS/ocaml-vchan.spec | 68 ++++++++++++++++++++++++ 9 files changed, 579 insertions(+) create mode 100644 SPECS/mirage-testvm.spec create mode 100644 SPECS/ocaml-mirage-block-xen.spec create mode 100644 SPECS/ocaml-mirage-clock-unix.spec create mode 100644 SPECS/ocaml-mirage-clock-xen.spec create mode 100644 SPECS/ocaml-mirage-console-xen.spec create mode 100644 SPECS/ocaml-mirage-xen.spec create mode 100644 SPECS/ocaml-mirage.spec create mode 100644 SPECS/ocaml-testvmlib.spec create mode 100644 SPECS/ocaml-vchan.spec diff --git a/SPECS/mirage-testvm.spec b/SPECS/mirage-testvm.spec new file mode 100644 index 00000000..3a99e44f --- /dev/null +++ b/SPECS/mirage-testvm.spec @@ -0,0 +1,56 @@ +%define debug_package %{nil} + +Name: mirage-testvm +Version: 0.2 +Release: 1%{?dist} +Summary: Simple Mirage test VM +License: ISC +URL: https://github.com/mirage/xen-testvm +Source0: https://github.com/mirage/xen-testvm/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-mirage-block-xen-devel +BuildRequires: ocaml-mirage-console-xen-devel +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-testvmlib-devel +BuildRequires: ocaml-vchan-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-mirage-xen-devel +BuildRequires: ocaml-mirage-clock-xen-devel +BuildRequires: ocaml-shared-memory-ring-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-ipaddr-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-gnt-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel + +%description +This is a simple Mirage test VM. + +%prep +%setup -q -n xen-testvm-%{version} + +%build +./manual-build.sh + +%install +mkdir -p %{buildroot}/boot/guest +cp mir-test.xen %{buildroot}/boot/guest/mirage-testvm.xen + +%files +%doc CHANGES +%doc README.md +/boot/guest/mirage-testvm.xen + +%changelog +* Wed Jul 16 2014 David Scott - 0.2-1 +- Update to 0.2 + +* Wed Jul 16 2014 David Scott - 0.1-1 +- Initial package diff --git a/SPECS/ocaml-mirage-block-xen.spec b/SPECS/ocaml-mirage-block-xen.spec new file mode 100644 index 00000000..8a2578cf --- /dev/null +++ b/SPECS/ocaml-mirage-block-xen.spec @@ -0,0 +1,65 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-block-xen +Version: 1.1.0 +Release: 1%{?dist} +Summary: Mirage block driver for Xen that implements the blkfront/back protocol +License: ISC +URL: https://github.com/mirage/mirage-block-xen/ +Source0: https://github.com/mirage/mirage-block-xen/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-shared-memory-ring-devel +BuildRequires: ocaml-ipaddr-devel +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-mirage-xen-devel + +%description +Mirage block driver for Xen that implements the blkfront/back protocol + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-block-xen-%{version} + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage-block-xen +%exclude %{_libdir}/ocaml/mirage-block-xen/*.a +%exclude %{_libdir}/ocaml/mirage-block-xen/*.cmxa +%exclude %{_libdir}/ocaml/mirage-block-xen/*.cmx +%exclude %{_libdir}/ocaml/mirage-block-xen/*.ml +%exclude %{_libdir}/ocaml/mirage-block-xen/*.mli + +%files devel +%{_libdir}/ocaml/mirage-block-xen/*.a +%{_libdir}/ocaml/mirage-block-xen/*.cmx +%{_libdir}/ocaml/mirage-block-xen/*.cmxa +%{_libdir}/ocaml/mirage-block-xen/*.mli + +%changelog +* Wed Jul 16 2014 David Scott - 1.0.5-1 +- Initial package diff --git a/SPECS/ocaml-mirage-clock-unix.spec b/SPECS/ocaml-mirage-clock-unix.spec new file mode 100644 index 00000000..12a1cf73 --- /dev/null +++ b/SPECS/ocaml-mirage-clock-unix.spec @@ -0,0 +1,53 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-clock-unix +Version: 1.0.0 +Release: 1%{?dist} +Summary: A Mirage-compatible Clock library for Unix +License: ISC +URL: https://github.com/mirage/mirage-clock/ +Source0: https://github.com/mirage/mirage-clock/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-mirage-types-devel + +%description +A Mirage-compatible Clock library for Xen + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-clock-%{version} + +%build +make unix-build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +make unix-install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage-clock-unix +%exclude %{_libdir}/ocaml/mirage-clock-unix/*.a +%exclude %{_libdir}/ocaml/mirage-clock-unix/*.cmxa +%exclude %{_libdir}/ocaml/mirage-clock-unix/*.cmx + +%files devel +%{_libdir}/ocaml/mirage-clock-unix/*.a +%{_libdir}/ocaml/mirage-clock-unix/*.cmx +%{_libdir}/ocaml/mirage-clock-unix/*.cmxa + +%changelog +* Wed Jul 16 2014 David Scott - 1.0.0-1 +- Initial package diff --git a/SPECS/ocaml-mirage-clock-xen.spec b/SPECS/ocaml-mirage-clock-xen.spec new file mode 100644 index 00000000..d14bdbd2 --- /dev/null +++ b/SPECS/ocaml-mirage-clock-xen.spec @@ -0,0 +1,53 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-clock-xen +Version: 1.0.0 +Release: 1%{?dist} +Summary: A Mirage-compatible Clock library for Xen +License: ISC +URL: https://github.com/mirage/mirage-clock/ +Source0: https://github.com/mirage/mirage-clock/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-mirage-types-devel + +%description +A Mirage-compatible Clock library for Xen + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-clock-%{version} + +%build +make xen-build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +make xen-install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage-clock-xen +%exclude %{_libdir}/ocaml/mirage-clock-xen/*.a +%exclude %{_libdir}/ocaml/mirage-clock-xen/*.cmxa +%exclude %{_libdir}/ocaml/mirage-clock-xen/*.cmx + +%files devel +%{_libdir}/ocaml/mirage-clock-xen/*.a +%{_libdir}/ocaml/mirage-clock-xen/*.cmx +%{_libdir}/ocaml/mirage-clock-xen/*.cmxa + +%changelog +* Wed Jul 16 2014 David Scott - 1.0.0-1 +- Initial package diff --git a/SPECS/ocaml-mirage-console-xen.spec b/SPECS/ocaml-mirage-console-xen.spec new file mode 100644 index 00000000..7025a5f9 --- /dev/null +++ b/SPECS/ocaml-mirage-console-xen.spec @@ -0,0 +1,55 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-console-xen +Version: 1.0.2 +Release: 1%{?dist} +Summary: A Mirage-compatible Console library for Xen +License: ISC +URL: https://github.com/mirage/mirage-console/ +Source0: https://github.com/mirage/mirage-console/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-mirage-xen-devel + +%description +A Mirage-compatible Console library for Xen + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-console-%{version} + +%build +make xen-build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make xen-install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage-console-xen +%exclude %{_libdir}/ocaml/mirage-console-xen/*.a +%exclude %{_libdir}/ocaml/mirage-console-xen/*.cmxa +%exclude %{_libdir}/ocaml/mirage-console-xen/*.cmx + +%files devel +%{_libdir}/ocaml/mirage-console-xen/*.a +%{_libdir}/ocaml/mirage-console-xen/*.cmx +%{_libdir}/ocaml/mirage-console-xen/*.cmxa + +%changelog +* Wed Jul 16 2014 David Scott - 1.0.2-1 +- Initial package diff --git a/SPECS/ocaml-mirage-xen.spec b/SPECS/ocaml-mirage-xen.spec new file mode 100644 index 00000000..44f86146 --- /dev/null +++ b/SPECS/ocaml-mirage-xen.spec @@ -0,0 +1,82 @@ +%define debug_package %{nil} + +Name: ocaml-mirage-xen +Version: 1.1.1 +Release: 1%{?dist} +Summary: Mirage OS library for Xen compilation +License: ISC +URL: https://github.com/mirage/mirage-platform/ +Source0: https://github.com/mirage/mirage-platform/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-mirage-clock-xen +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-shared-memory-ring-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-gnt-devel +BuildRequires: ocaml-mirage-types-devel + +%description +Mirage OS library for Xen compilation + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel%{?_isa} +Requires: xen-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-platform-%{version} + +%build +make xen-build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +cd xen +MIRAGE_OS=xen ./cmd install +find %{buildroot} +cp _build/runtime/kernel/libxencaml.a ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/ocaml.4.00.1/libocaml.a ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/dietlibc/libdiet.a ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/libm/libm.a ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/kernel/libxen.a ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/kernel/longjmp.o ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/kernel/x86_64.o ${OCAMLFIND_DESTDIR}/mirage-xen +cp _build/runtime/kernel/mirage-x86_64.lds ${OCAMLFIND_DESTDIR}/mirage-xen + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage-xen +%exclude %{_libdir}/ocaml/mirage-xen/*.a +%exclude %{_libdir}/ocaml/mirage-xen/*.cmxa +%exclude %{_libdir}/ocaml/mirage-xen/*.cmx + +%files devel +%{_libdir}/ocaml/mirage-xen/*.a +%{_libdir}/ocaml/mirage-xen/*.cmx +%{_libdir}/ocaml/mirage-xen/*.cmxa +%{_libdir}/ocaml/mirage-xen/libxencaml.a +%{_libdir}/ocaml/mirage-xen/libocaml.a +%{_libdir}/ocaml/mirage-xen/libdiet.a +%{_libdir}/ocaml/mirage-xen/libm.a +%{_libdir}/ocaml/mirage-xen/libxen.a +%{_libdir}/ocaml/mirage-xen/longjmp.o +%{_libdir}/ocaml/mirage-xen/x86_64.o +%{_libdir}/ocaml/mirage-xen/mirage-x86_64.lds + +%changelog +* Wed Jul 16 2014 David Scott - 1.1.1-1 +- Initial package diff --git a/SPECS/ocaml-mirage.spec b/SPECS/ocaml-mirage.spec new file mode 100644 index 00000000..f6a412f4 --- /dev/null +++ b/SPECS/ocaml-mirage.spec @@ -0,0 +1,69 @@ +%define debug_package %{nil} + +Name: ocaml-mirage +Version: 1.2.0 +Release: 1%{?dist} +Summary: MirageOS interfaces +License: ISC +URL: https://github.com/mirage/mirage +Source0: https://github.com/mirage/mirage/archive/v%{version}/mirage-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-ipaddr-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-cmdliner-devel + +%description +A library and a command-line tool for building Mirage applications. +See http://openmirage.org for more information. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +BuildRequires: ocaml-ipaddr-devel%{?_isa} +BuildRequires: ocaml-lwt-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n mirage-%{version} + +%build +make PREFIX=%{buildroot} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p %{buildroot}/bin +make install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/mirage +%exclude %{_libdir}/ocaml/mirage/*.a +%exclude %{_libdir}/ocaml/mirage/*.cmxa +%exclude %{_libdir}/ocaml/mirage/*.cmx +%exclude %{_libdir}/ocaml/mirage/*.mli +/bin/mirage + +%files devel +%{_libdir}/ocaml/mirage/*.a +%{_libdir}/ocaml/mirage/*.cmx +%{_libdir}/ocaml/mirage/*.cmxa +%{_libdir}/ocaml/mirage/*.mli + +%changelog +* Wed Jul 16 2014 David Scott - 1.2.0-1 +- Initial package + +* Tue Apr 1 2014 Euan Harris - 1.1.1-1 +- Initial package + diff --git a/SPECS/ocaml-testvmlib.spec b/SPECS/ocaml-testvmlib.spec new file mode 100644 index 00000000..68f80e90 --- /dev/null +++ b/SPECS/ocaml-testvmlib.spec @@ -0,0 +1,78 @@ +%define debug_package %{nil} + +Name: ocaml-testvmlib +Version: 0.3 +Release: 1%{?dist} +Summary: Mirage test VM library +License: ISC +URL: https://github.com/mirage/testvm-idl/ +Source0: https://github.com/mirage/testvm-idl/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: xen-devel +BuildRequires: ocaml-gnt-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-vchan-devel +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-cohttp-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: ocaml-mirage-devel +BuildRequires: ocaml-ipaddr-devel + +%description +An interface definition, library and command-line tool for Mirage VM testing. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel%{?_isa} +Requires: ocaml-mirage-devel%{?_isa} +Requires: xen-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n testvm-idl-%{version} + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install +mkdir %{buildroot}%{_bindir} +cp client.native %{buildroot}%{_bindir}/mirage-testvm-cli + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/testvmlib +%exclude %{_libdir}/ocaml/testvmlib/*.a +%exclude %{_libdir}/ocaml/testvmlib/*.cmxa +%exclude %{_libdir}/ocaml/testvmlib/*.cmx +%exclude %{_libdir}/ocaml/testvmlib/*.ml +%{_bindir}/mirage-testvm-cli + +%files devel +%{_libdir}/ocaml/testvmlib/*.a +%{_libdir}/ocaml/testvmlib/*.cmx +%{_libdir}/ocaml/testvmlib/*.cmxa + +%changelog +* Wed Jul 16 2014 David Scott - 0.3-1 +- Update to 0.3 + +* Wed Jul 16 2014 David Scott - 0.2-1 +- Initial package diff --git a/SPECS/ocaml-vchan.spec b/SPECS/ocaml-vchan.spec new file mode 100644 index 00000000..c0d9896e --- /dev/null +++ b/SPECS/ocaml-vchan.spec @@ -0,0 +1,68 @@ +%define debug_package %{nil} + +Name: ocaml-vchan +Version: 1.0.0 +Release: 1%{?dist} +Summary: OCaml implementation of the Xen Vchan protocol +License: ISC +URL: https://github.com/mirage/ocaml-vchan/ +Source0: https://github.com/mirage/ocaml-vchan/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cstruct-devel +BuildRequires: ocaml-io-page-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-mirage-types-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-gnt-devel +BuildRequires: ocaml-ipaddr-devel +BuildRequires: ocaml-sexplib-devel + +%description +The Xen Vchan protocol allows high-bandwidth private communication channels +between VMs over shared memory. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-io-page-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +make install + +%files +%doc CHANGES +%doc README.md +%{_libdir}/ocaml/vchan +%exclude %{_libdir}/ocaml/vchan/*.a +%exclude %{_libdir}/ocaml/vchan/*.cmxa +%exclude %{_libdir}/ocaml/vchan/*.cmx +%exclude %{_libdir}/ocaml/vchan/*.mli + +%files devel +%{_libdir}/ocaml/vchan/*.a +%{_libdir}/ocaml/vchan/*.cmx +%{_libdir}/ocaml/vchan/*.cmxa +%{_libdir}/ocaml/vchan/*.mli + +%changelog +* Wed Jul 16 2014 David Scott - 1.0.0-1 +- Initial package From f5049575762749d5cbd31083fc2bda5da454fb22 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 3 Jul 2014 18:10:52 +0100 Subject: [PATCH 0957/1125] scripts: Remove workarounds needed to support Ubuntu Raring Signed-off-by: Euan Harris --- scripts/deb/configure.sh | 36 ------------------------------------ scripts/deb/install.sh | 10 +--------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index 9c17b1b7..2bbeef1d 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -11,9 +11,6 @@ DEFAULT_MIRROR=$(grep "^deb .*$DIST .*main" /etc/apt/sources.list | cut -d' ' -f MIRROR=${MIRROR:-$DEFAULT_MIRROR} if [ `lsb_release -si` == "Ubuntu" ] ; then APT_REPOS="$APT_REPOS |deb $MIRROR $DIST universe" - if [ "$DIST" == "raring" ] ; then - APT_REPOS="$APT_REPOS |deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu $DIST main" - fi fi dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ @@ -46,39 +43,6 @@ else echo $BASEPATH does not exist - creating sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc - # inject Keyfile for Launchpad PPA for Louis Gesbert - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc --save-after-exec -- /usr/bin/apt-key add - << KEYFILE ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.1.4 -Comment: Hostname: keyserver.ubuntu.com - -mI0EUgJE5QEEANHD2l6yuvqffhqTcJd4nOQVax6m9i4SKb/IpXqOh40PYzG17bc0rbGaM7CU -+nD9vDAtP6Wjjc5aatMyYOQ1aPzAmPtFfvjg9NyR88r9GK7G8sR6N2YzarUblrxI0yEmfc9X -409JOejfgv7s1D/Jmsoo5GqYQihXiSBS7juJk6ihABEBAAG0H0xhdW5jaHBhZCBQUEEgZm9y -IExvdWlzIEdlc2JlcnSIuAQTAQIAIgUCUgJE5QIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC -F4AACgkQrWm///0xBNZrugQAqEz0xu6FmNSvCtn9vVghI8/UAoYla87qHSjEY1gmQ9oC4/0Y -hPh2pBmI475HlPvESksjApsUHh9ksc9SkLiNS9rPE5rFp/gEDjFA6arFcaPcNmAu51x3lDfh -KQ3afU1hlF6EsITRd5qGry7ftxoLKOrVp8qSw9O/PdFgBTTGvgE= -=ZOqF ------END PGP PUBLIC KEY BLOCK----- -KEYFILE - # inject Keyfile for Launchpad PPA for Anil Madhavapeddy - sudo cowbuilder --execute --configfile $PWD/pbuilder/pbuilderrc --save-after-exec -- /usr/bin/apt-key add - << KEYFILE ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.1.4 -Comment: Hostname: keyserver.ubuntu.com - -mI0EUd0+wQEEAMOeX/cGrgub9dEn9xjViAQub7w94JhGYKEpS2w79N3nQKA5NLBxpwvwH9xb -R7tjVJ11g/feZ+xKkbtcDNHc+BW8IpKf4x7qPy1JrDZ0c8KQhGA6TJY61Wgg4Rwzzi9l1n7L -G+EkIPotbHY0D27zqzFqwIKj+SbJFPZ9Ty1Z2VCLABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y -IEFuaWwgTWFkaGF2YXBlZGR5iLgEEwECACIFAlHdPsECGwMGCwkIBwMCBhUIAgkKCwQWAgMB -Ah4BAheAAAoJEFstDFVhcHsJryAD/01EFC2zz8LjmEvJX3hPBkkDipD+NCPsuxe78H1QR7AV -MLzqar1aYcQk/zVUGJDdIcbJnHJ2OnyeeJ0wOVOmJKSrch+jePUkLzM3bWdx5fbK5b4o2nYW -Xp9mmv8bABlmMr5PDd6/G9y5HTBeImUe7v6a4EtFnF3LnBY0Nkmh9QGq -=4ul6 ------END PGP PUBLIC KEY BLOCK----- -KEYFILE - fi echo " done" diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh index 02e383b9..170dea63 100644 --- a/scripts/deb/install.sh +++ b/scripts/deb/install.sh @@ -1,8 +1,5 @@ #!/bin/bash -x -# Add the OCaml 4 PPA -install -m 0644 scripts/deb/ocp-ppa.list /etc/apt/sources.list.d/ocp-ppa.list - DEBURL=${PKG_REPO_LOCATION:-file:$PWD/RPMS/} DEBSRCURL=${SRC_REPO_LOCATION:-file:$PWD/SRPMS/} @@ -18,12 +15,7 @@ sed \ scripts/deb/xapi.list.in > scripts/deb/xapi.list install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list -# Configure apt to prefer packages from the xenserver-core repository -sed \ - -e "s,@REPOHOST@,${REPOHOST},g" \ - scripts/deb/xapi.pref.in > scripts/deb/xapi.pref -install -m 0644 scripts/deb/xapi.pref /etc/apt/preferences.d/xapi - +# Rebuild repository metadata (mkdir -p RPMS && cd RPMS && apt-ftparchive packages . > Packages) (mkdir -p SRPMS && cd SRPMS && apt-ftparchive sources . > Sources ) From 55d5ac3dae68bb50c5c23adc041d875816d408b6 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 16 Jul 2014 19:26:43 +0000 Subject: [PATCH 0958/1125] shared-memory-ring: correct a bogus changelog date Signed-off-by: David Scott --- SPECS/ocaml-shared-memory-ring.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-shared-memory-ring.spec b/SPECS/ocaml-shared-memory-ring.spec index 167bafa7..07c2e06e 100644 --- a/SPECS/ocaml-shared-memory-ring.spec +++ b/SPECS/ocaml-shared-memory-ring.spec @@ -56,5 +56,5 @@ make install %{_libdir}/ocaml/shared-memory-ring/*.mli %changelog -* Wed Jun 16 2014 David Scott - 1.1.0-1 +* Wed Jul 16 2014 David Scott - 1.1.0-1 - Initial package From b528bb177f65264ad1b9e418d9ffb9ae33489d2c Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 17 Jul 2014 13:25:17 +0100 Subject: [PATCH 0959/1125] Remove kernel dependency Signed-off-by: Jon Ludlam --- SPECS/xenserver-core.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index b392ec39..3db35936 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -22,8 +22,6 @@ Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed Requires: linux-guest-loader -Requires: kernel >= 3.0 -Requires: kernel-firmware Requires: xen %description From b397d069321131c717f5ff3d98dd05b04bd129f9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 17 Jul 2014 16:38:28 +0000 Subject: [PATCH 0960/1125] Make everything build on trusty Signed-off-by: David Scott --- SOURCES/ocaml-mirage-xen.install.sh | 22 + SOURCES/uuidm.oasis.patch | 6603 +++++++++++++++++++++++++++ SPECS/ocaml-cmdliner.spec | 24 +- SPECS/ocaml-mirage-block-xen.spec | 4 +- SPECS/ocaml-mirage-console-xen.spec | 4 +- SPECS/ocaml-mirage-xen.spec | 24 +- SPECS/ocaml-uuidm.spec | 4 +- SPECS/ocaml-xmlm.spec | 21 +- SPECS/squeezed.spec | 1 - 9 files changed, 6667 insertions(+), 40 deletions(-) create mode 100755 SOURCES/ocaml-mirage-xen.install.sh create mode 100644 SOURCES/uuidm.oasis.patch diff --git a/SOURCES/ocaml-mirage-xen.install.sh b/SOURCES/ocaml-mirage-xen.install.sh new file mode 100755 index 00000000..f569eed7 --- /dev/null +++ b/SOURCES/ocaml-mirage-xen.install.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e +set -x + +# The make install target in mirage-platform doesn't yet support DESTDIR so +# we perform a manual install. + +cd xen +export OCAMLFIND_DESTDIR=$1 +echo Installing into $OCAMLFIND_DESTDIR +mkdir -p $OCAMLFIND_DESTDIR/mirage-xen +# Why does ocamlfind ignore me and delete that directory?? +MIRAGE_OS=xen ./cmd install +mkdir -p $OCAMLFIND_DESTDIR/mirage-xen +cp $2/mirage-xen/* $OCAMLFIND_DESTDIR/mirage-xen +find . -name "*.a" -exec cp {} $1/mirage-xen \; +cp _build/runtime/kernel/libxen.a $1/mirage-xen +cp _build/runtime/kernel/longjmp.o $1/mirage-xen +cp _build/runtime/kernel/x86_64.o $1/mirage-xen +cp _build/runtime/kernel/mirage-x86_64.lds $1/mirage-xen + diff --git a/SOURCES/uuidm.oasis.patch b/SOURCES/uuidm.oasis.patch new file mode 100644 index 00000000..d2b9e0a6 --- /dev/null +++ b/SOURCES/uuidm.oasis.patch @@ -0,0 +1,6603 @@ +commit 039de2a1b73d78d64a9eaca73caf31153e1f256c +Author: David Scott +Date: Thu Jul 17 13:26:15 2014 +0000 + + oasis setup + + Signed-off-by: David Scott + +diff --git a/myocamlbuild.ml b/myocamlbuild.ml +new file mode 100644 +index 0000000..0fb9c7a +--- /dev/null ++++ b/myocamlbuild.ml +@@ -0,0 +1,491 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 8a78a525f77580f9184e934558bad2c6) *) ++module OASISGettext = struct ++(* # 21 "src/oasis/OASISGettext.ml" *) ++ ++ let ns_ str = ++ str ++ ++ let s_ str = ++ str ++ ++ let f_ (str : ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ let init = ++ [] ++ ++end ++ ++module OASISExpr = struct ++(* # 21 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ open OASISGettext ++ ++ type test = string ++ ++ type flag = string ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++end ++ ++ ++# 117 "myocamlbuild.ml" ++module BaseEnvLight = struct ++(* # 21 "src/base/BaseEnvLight.ml" *) ++ ++ module MapString = Map.Make(String) ++ ++ type t = string MapString.t ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ let var_get name env = ++ let rec var_expand str = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ in ++ var_expand (MapString.find name env) ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 215 "myocamlbuild.ml" ++module MyOCamlbuildFindlib = struct ++(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) ++ ++ (** OCamlbuild extension, copied from ++ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild ++ * by N. Pouillard and others ++ * ++ * Updated on 2009/02/28 ++ * ++ * Modified by Sylvain Le Gall ++ *) ++ open Ocamlbuild_plugin ++ ++ (* these functions are not really officially exported *) ++ let run_and_read = ++ Ocamlbuild_pack.My_unix.run_and_read ++ ++ let blank_sep_strings = ++ Ocamlbuild_pack.Lexers.blank_sep_strings ++ ++ let split s ch = ++ let x = ++ ref [] ++ in ++ let rec go s = ++ let pos = ++ String.index s ch ++ in ++ x := (String.before s pos)::!x; ++ go (String.after s (pos + 1)) ++ in ++ try ++ go s ++ with Not_found -> !x ++ ++ let split_nl s = split s '\n' ++ ++ let before_space s = ++ try ++ String.before s (String.index s ' ') ++ with Not_found -> s ++ ++ (* this lists all supported packages *) ++ let find_packages () = ++ List.map before_space (split_nl & run_and_read "ocamlfind list") ++ ++ (* this is supposed to list available syntaxes, but I don't know how to do it. *) ++ let find_syntaxes () = ["camlp4o"; "camlp4r"] ++ ++ (* ocamlfind command *) ++ let ocamlfind x = S[A"ocamlfind"; x] ++ ++ let dispatch = ++ function ++ | Before_options -> ++ (* by using Before_options one let command line options have an higher priority *) ++ (* on the contrary using After_options will guarantee to have the higher priority *) ++ (* override default commands by ocamlfind ones *) ++ Options.ocamlc := ocamlfind & A"ocamlc"; ++ Options.ocamlopt := ocamlfind & A"ocamlopt"; ++ Options.ocamldep := ocamlfind & A"ocamldep"; ++ Options.ocamldoc := ocamlfind & A"ocamldoc"; ++ Options.ocamlmktop := ocamlfind & A"ocamlmktop" ++ ++ | After_rules -> ++ ++ (* When one link an OCaml library/binary/package, one should use -linkpkg *) ++ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; ++ ++ (* For each ocamlfind package one inject the -package option when ++ * compiling, computing dependencies, generating documentation and ++ * linking. *) ++ List.iter ++ begin fun pkg -> ++ flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg]; ++ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg]; ++ flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg]; ++ flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; ++ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg]; ++ end ++ (find_packages ()); ++ ++ (* Like -package but for extensions syntax. Morover -syntax is useless ++ * when linking. *) ++ List.iter begin fun syntax -> ++ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ end (find_syntaxes ()); ++ ++ (* The default "thread" tag is not compatible with ocamlfind. ++ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" ++ * options when using this tag. When using the "-linkpkg" option with ++ * ocamlfind, this module will then be added twice on the command line. ++ * ++ * To solve this, one approach is to add the "-thread" option when using ++ * the "threads" package using the previous plugin. ++ *) ++ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]) ++ ++ | _ -> ++ () ++ ++end ++ ++module MyOCamlbuildBase = struct ++(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ (** Base functions for writing myocamlbuild.ml ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ open Ocamlbuild_plugin ++ module OC = Ocamlbuild_pack.Ocaml_compiler ++ ++ type dir = string ++ type file = string ++ type name = string ++ type tag = string ++ ++(* # 56 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ type t = ++ { ++ lib_ocaml: (name * dir list) list; ++ lib_c: (name * dir * file list) list; ++ flags: (tag list * (spec OASISExpr.choices)) list; ++ (* Replace the 'dir: include' from _tags by a precise interdepends in ++ * directory. ++ *) ++ includes: (dir * dir list) list; ++ } ++ ++ let env_filename = ++ Pathname.basename ++ BaseEnvLight.default_filename ++ ++ let dispatch_combine lst = ++ fun e -> ++ List.iter ++ (fun dispatch -> dispatch e) ++ lst ++ ++ let tag_libstubs nm = ++ "use_lib"^nm^"_stubs" ++ ++ let nm_libstubs nm = ++ nm^"_stubs" ++ ++ let dispatch t e = ++ let env = ++ BaseEnvLight.load ++ ~filename:env_filename ++ ~allow_empty:true ++ () ++ in ++ match e with ++ | Before_options -> ++ let no_trailing_dot s = ++ if String.length s >= 1 && s.[0] = '.' then ++ String.sub s 1 ((String.length s) - 1) ++ else ++ s ++ in ++ List.iter ++ (fun (opt, var) -> ++ try ++ opt := no_trailing_dot (BaseEnvLight.var_get var env) ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s" var) ++ [ ++ Options.ext_obj, "ext_obj"; ++ Options.ext_lib, "ext_lib"; ++ Options.ext_dll, "ext_dll"; ++ ] ++ ++ | After_rules -> ++ (* Declare OCaml libraries *) ++ List.iter ++ (function ++ | nm, [] -> ++ ocaml_lib nm ++ | nm, dir :: tl -> ++ ocaml_lib ~dir:dir (dir^"/"^nm); ++ List.iter ++ (fun dir -> ++ List.iter ++ (fun str -> ++ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) ++ ["compile"; "infer_interface"; "doc"]) ++ tl) ++ t.lib_ocaml; ++ ++ (* Declare directories dependencies, replace "include" in _tags. *) ++ List.iter ++ (fun (dir, include_dirs) -> ++ Pathname.define_context dir include_dirs) ++ t.includes; ++ ++ (* Declare C libraries *) ++ List.iter ++ (fun (lib, dir, headers) -> ++ (* Handle C part of library *) ++ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; ++ A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] ++ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); ++ ++ (* When ocaml link something that use the C library, then one ++ need that file to be up to date. ++ *) ++ dep ["link"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ (* TODO: be more specific about what depends on headers *) ++ (* Depends on .h files *) ++ dep ["compile"; "c"] ++ headers; ++ ++ (* Setup search path for lib *) ++ flag ["link"; "ocaml"; "use_"^lib] ++ (S[A"-I"; P(dir)]); ++ ) ++ t.lib_c; ++ ++ (* Add flags *) ++ List.iter ++ (fun (tags, cond_specs) -> ++ let spec = ++ BaseEnvLight.var_choose cond_specs env ++ in ++ flag tags & spec) ++ t.flags ++ | _ -> ++ () ++ ++ let dispatch_default t = ++ dispatch_combine ++ [ ++ dispatch t; ++ MyOCamlbuildFindlib.dispatch; ++ ] ++ ++end ++ ++ ++# 476 "myocamlbuild.ml" ++open Ocamlbuild_plugin;; ++let package_default = ++ { ++ MyOCamlbuildBase.lib_ocaml = [("uuidm", ["src"])]; ++ lib_c = []; ++ flags = []; ++ includes = [("test", ["src"])] ++ } ++ ;; ++ ++let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; ++ ++# 490 "myocamlbuild.ml" ++(* OASIS_STOP *) ++Ocamlbuild_plugin.dispatch dispatch_default;; +diff --git a/setup.ml b/setup.ml +new file mode 100644 +index 0000000..2cfe53d +--- /dev/null ++++ b/setup.ml +@@ -0,0 +1,6065 @@ ++(* setup.ml generated for the first time by OASIS v0.3.0 *) ++ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 5005cd3dc663da22ce3c2b75ec873020) *) ++(* ++ Regenerated by OASIS v0.3.0 ++ Visit http://oasis.forge.ocamlcore.org for more information and ++ documentation about functions used in this file. ++*) ++module OASISGettext = struct ++(* # 21 "src/oasis/OASISGettext.ml" *) ++ ++ let ns_ str = ++ str ++ ++ let s_ str = ++ str ++ ++ let f_ (str : ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ let init = ++ [] ++ ++end ++ ++module OASISContext = struct ++(* # 21 "src/oasis/OASISContext.ml" *) ++ ++ open OASISGettext ++ ++ type level = ++ [ `Debug ++ | `Info ++ | `Warning ++ | `Error] ++ ++ type t = ++ { ++ quiet: bool; ++ info: bool; ++ debug: bool; ++ ignore_plugins: bool; ++ ignore_unknown_fields: bool; ++ printf: level -> string -> unit; ++ } ++ ++ let printf lvl str = ++ let beg = ++ match lvl with ++ | `Error -> s_ "E: " ++ | `Warning -> s_ "W: " ++ | `Info -> s_ "I: " ++ | `Debug -> s_ "D: " ++ in ++ prerr_endline (beg^str) ++ ++ let default = ++ ref ++ { ++ quiet = false; ++ info = false; ++ debug = false; ++ ignore_plugins = false; ++ ignore_unknown_fields = false; ++ printf = printf; ++ } ++ ++ let quiet = ++ {!default with quiet = true} ++ ++ ++ let args () = ++ ["-quiet", ++ Arg.Unit (fun () -> default := {!default with quiet = true}), ++ (s_ " Run quietly"); ++ ++ "-info", ++ Arg.Unit (fun () -> default := {!default with info = true}), ++ (s_ " Display information message"); ++ ++ ++ "-debug", ++ Arg.Unit (fun () -> default := {!default with debug = true}), ++ (s_ " Output debug message")] ++end ++ ++module OASISString = struct ++(* # 1 "src/oasis/OASISString.ml" *) ++ ++ ++ ++ (** Various string utilities. ++ ++ Mostly inspired by extlib and batteries ExtString and BatString libraries. ++ ++ @author Sylvain Le Gall ++ *) ++ ++ let nsplitf str f = ++ if str = "" then ++ [] ++ else ++ let buf = Buffer.create 13 in ++ let lst = ref [] in ++ let push () = ++ lst := Buffer.contents buf :: !lst; ++ Buffer.clear buf ++ in ++ let str_len = String.length str in ++ for i = 0 to str_len - 1 do ++ if f str.[i] then ++ push () ++ else ++ Buffer.add_char buf str.[i] ++ done; ++ push (); ++ List.rev !lst ++ ++ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the ++ separator. ++ *) ++ let nsplit str c = ++ nsplitf str ((=) c) ++ ++ let find ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ while !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ what_idx := 0; ++ incr str_idx ++ done; ++ if !what_idx <> String.length what then ++ raise Not_found ++ else ++ !str_idx - !what_idx ++ ++ let sub_start str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str len (str_len - len) ++ ++ let sub_end ?(offset=0) str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str 0 (str_len - len) ++ ++ let starts_with ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ let ok = ref true in ++ while !ok && ++ !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ ok := false; ++ incr str_idx ++ done; ++ if !what_idx = String.length what then ++ true ++ else ++ false ++ ++ let strip_starts_with ~what str = ++ if starts_with ~what str then ++ sub_start str (String.length what) ++ else ++ raise Not_found ++ ++ let ends_with ~what ?(offset=0) str = ++ let what_idx = ref ((String.length what) - 1) in ++ let str_idx = ref ((String.length str) - 1) in ++ let ok = ref true in ++ while !ok && ++ offset <= !str_idx && ++ 0 <= !what_idx do ++ if str.[!str_idx] = what.[!what_idx] then ++ decr what_idx ++ else ++ ok := false; ++ decr str_idx ++ done; ++ if !what_idx = -1 then ++ true ++ else ++ false ++ ++ let strip_ends_with ~what str = ++ if ends_with ~what str then ++ sub_end str (String.length what) ++ else ++ raise Not_found ++ ++ let replace_chars f s = ++ let buf = String.make (String.length s) 'X' in ++ for i = 0 to String.length s - 1 do ++ buf.[i] <- f s.[i] ++ done; ++ buf ++ ++end ++ ++module OASISUtils = struct ++(* # 21 "src/oasis/OASISUtils.ml" *) ++ ++ open OASISGettext ++ ++ module MapString = Map.Make(String) ++ ++ let map_string_of_assoc assoc = ++ List.fold_left ++ (fun acc (k, v) -> MapString.add k v acc) ++ MapString.empty ++ assoc ++ ++ module SetString = Set.Make(String) ++ ++ let set_string_add_list st lst = ++ List.fold_left ++ (fun acc e -> SetString.add e acc) ++ st ++ lst ++ ++ let set_string_of_list = ++ set_string_add_list ++ SetString.empty ++ ++ ++ let compare_csl s1 s2 = ++ String.compare (String.lowercase s1) (String.lowercase s2) ++ ++ module HashStringCsl = ++ Hashtbl.Make ++ (struct ++ type t = string ++ ++ let equal s1 s2 = ++ (String.lowercase s1) = (String.lowercase s2) ++ ++ let hash s = ++ Hashtbl.hash (String.lowercase s) ++ end) ++ ++ let varname_of_string ?(hyphen='_') s = ++ if String.length s = 0 then ++ begin ++ invalid_arg "varname_of_string" ++ end ++ else ++ begin ++ let buf = ++ OASISString.replace_chars ++ (fun c -> ++ if ('a' <= c && c <= 'z') ++ || ++ ('A' <= c && c <= 'Z') ++ || ++ ('0' <= c && c <= '9') then ++ c ++ else ++ hyphen) ++ s; ++ in ++ let buf = ++ (* Start with a _ if digit *) ++ if '0' <= s.[0] && s.[0] <= '9' then ++ "_"^buf ++ else ++ buf ++ in ++ String.lowercase buf ++ end ++ ++ let varname_concat ?(hyphen='_') p s = ++ let what = String.make 1 hyphen in ++ let p = ++ try ++ OASISString.strip_ends_with ~what p ++ with Not_found -> ++ p ++ in ++ let s = ++ try ++ OASISString.strip_starts_with ~what s ++ with Not_found -> ++ s ++ in ++ p^what^s ++ ++ ++ let is_varname str = ++ str = varname_of_string str ++ ++ let failwithf fmt = Printf.ksprintf failwith fmt ++ ++end ++ ++module PropList = struct ++(* # 21 "src/oasis/PropList.ml" *) ++ ++ open OASISGettext ++ ++ type name = string ++ ++ exception Not_set of name * string option ++ exception No_printer of name ++ exception Unknown_field of name * name ++ ++ let () = ++ Printexc.register_printer ++ (function ++ | Not_set (nm, Some rsn) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) ++ | Not_set (nm, None) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set") nm) ++ | No_printer nm -> ++ Some ++ (Printf.sprintf (f_ "No default printer for value %s") nm) ++ | Unknown_field (nm, schm) -> ++ Some ++ (Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm) ++ | _ -> ++ None) ++ ++ module Data = ++ struct ++ ++ type t = ++ (name, unit -> unit) Hashtbl.t ++ ++ let create () = ++ Hashtbl.create 13 ++ ++ let clear t = ++ Hashtbl.clear t ++ ++(* # 71 "src/oasis/PropList.ml" *) ++ end ++ ++ module Schema = ++ struct ++ ++ type ('ctxt, 'extra) value = ++ { ++ get: Data.t -> string; ++ set: Data.t -> ?context:'ctxt -> string -> unit; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ type ('ctxt, 'extra) t = ++ { ++ name: name; ++ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; ++ order: name Queue.t; ++ name_norm: string -> string; ++ } ++ ++ let create ?(case_insensitive=false) nm = ++ { ++ name = nm; ++ fields = Hashtbl.create 13; ++ order = Queue.create (); ++ name_norm = ++ (if case_insensitive then ++ String.lowercase ++ else ++ fun s -> s); ++ } ++ ++ let add t nm set get extra help = ++ let key = ++ t.name_norm nm ++ in ++ ++ if Hashtbl.mem t.fields key then ++ failwith ++ (Printf.sprintf ++ (f_ "Field '%s' is already defined in schema '%s'") ++ nm t.name); ++ Hashtbl.add ++ t.fields ++ key ++ { ++ set = set; ++ get = get; ++ help = help; ++ extra = extra; ++ }; ++ Queue.add nm t.order ++ ++ let mem t nm = ++ Hashtbl.mem t.fields nm ++ ++ let find t nm = ++ try ++ Hashtbl.find t.fields (t.name_norm nm) ++ with Not_found -> ++ raise (Unknown_field (nm, t.name)) ++ ++ let get t data nm = ++ (find t nm).get data ++ ++ let set t data nm ?context x = ++ (find t nm).set ++ data ++ ?context ++ x ++ ++ let fold f acc t = ++ Queue.fold ++ (fun acc k -> ++ let v = ++ find t k ++ in ++ f acc k v.extra v.help) ++ acc ++ t.order ++ ++ let iter f t = ++ fold ++ (fun () -> f) ++ () ++ t ++ ++ let name t = ++ t.name ++ end ++ ++ module Field = ++ struct ++ ++ type ('ctxt, 'value, 'extra) t = ++ { ++ set: Data.t -> ?context:'ctxt -> 'value -> unit; ++ get: Data.t -> 'value; ++ sets: Data.t -> ?context:'ctxt -> string -> unit; ++ gets: Data.t -> string; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ let new_id = ++ let last_id = ++ ref 0 ++ in ++ fun () -> incr last_id; !last_id ++ ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ (* Default value container *) ++ let v = ++ ref None ++ in ++ ++ (* If name is not given, create unique one *) ++ let nm = ++ match name with ++ | Some s -> s ++ | None -> Printf.sprintf "_anon_%d" (new_id ()) ++ in ++ ++ (* Last chance to get a value: the default *) ++ let default () = ++ match default with ++ | Some d -> d ++ | None -> raise (Not_set (nm, Some (s_ "no default value"))) ++ in ++ ++ (* Get data *) ++ let get data = ++ (* Get value *) ++ try ++ (Hashtbl.find data nm) (); ++ match !v with ++ | Some x -> x ++ | None -> default () ++ with Not_found -> ++ default () ++ in ++ ++ (* Set data *) ++ let set data ?context x = ++ let x = ++ match update with ++ | Some f -> ++ begin ++ try ++ f ?context (get data) x ++ with Not_set _ -> ++ x ++ end ++ | None -> ++ x ++ in ++ Hashtbl.replace ++ data ++ nm ++ (fun () -> v := Some x) ++ in ++ ++ (* Parse string value, if possible *) ++ let parse = ++ match parse with ++ | Some f -> ++ f ++ | None -> ++ fun ?context s -> ++ failwith ++ (Printf.sprintf ++ (f_ "Cannot parse field '%s' when setting value %S") ++ nm ++ s) ++ in ++ ++ (* Set data, from string *) ++ let sets data ?context s = ++ set ?context data (parse ?context s) ++ in ++ ++ (* Output value as string, if possible *) ++ let print = ++ match print with ++ | Some f -> ++ f ++ | None -> ++ fun _ -> raise (No_printer nm) ++ in ++ ++ (* Get data, as a string *) ++ let gets data = ++ print (get data) ++ in ++ ++ begin ++ match schema with ++ | Some t -> ++ Schema.add t nm sets gets extra help ++ | None -> ++ () ++ end; ++ ++ { ++ set = set; ++ get = get; ++ sets = sets; ++ gets = gets; ++ help = help; ++ extra = extra; ++ } ++ ++ let fset data t ?context x = ++ t.set data ?context x ++ ++ let fget data t = ++ t.get data ++ ++ let fsets data t ?context s = ++ t.sets data ?context s ++ ++ let fgets data t = ++ t.gets data ++ ++ end ++ ++ module FieldRO = ++ struct ++ ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ let fld = ++ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra ++ in ++ fun data -> Field.fget data fld ++ ++ end ++end ++ ++module OASISMessage = struct ++(* # 21 "src/oasis/OASISMessage.ml" *) ++ ++ ++ open OASISGettext ++ open OASISContext ++ ++ let generic_message ~ctxt lvl fmt = ++ let cond = ++ if ctxt.quiet then ++ false ++ else ++ match lvl with ++ | `Debug -> ctxt.debug ++ | `Info -> ctxt.info ++ | _ -> true ++ in ++ Printf.ksprintf ++ (fun str -> ++ if cond then ++ begin ++ ctxt.printf lvl str ++ end) ++ fmt ++ ++ let debug ~ctxt fmt = ++ generic_message ~ctxt `Debug fmt ++ ++ let info ~ctxt fmt = ++ generic_message ~ctxt `Info fmt ++ ++ let warning ~ctxt fmt = ++ generic_message ~ctxt `Warning fmt ++ ++ let error ~ctxt fmt = ++ generic_message ~ctxt `Error fmt ++ ++end ++ ++module OASISVersion = struct ++(* # 21 "src/oasis/OASISVersion.ml" *) ++ ++ open OASISGettext ++ ++ ++ ++ type s = string ++ ++ type t = string ++ ++ type comparator = ++ | VGreater of t ++ | VGreaterEqual of t ++ | VEqual of t ++ | VLesser of t ++ | VLesserEqual of t ++ | VOr of comparator * comparator ++ | VAnd of comparator * comparator ++ ++ ++ (* Range of allowed characters *) ++ let is_digit c = ++ '0' <= c && c <= '9' ++ ++ let is_alpha c = ++ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ++ ++ let is_special = ++ function ++ | '.' | '+' | '-' | '~' -> true ++ | _ -> false ++ ++ let rec version_compare v1 v2 = ++ if v1 <> "" || v2 <> "" then ++ begin ++ (* Compare ascii string, using special meaning for version ++ * related char ++ *) ++ let val_ascii c = ++ if c = '~' then -1 ++ else if is_digit c then 0 ++ else if c = '\000' then 0 ++ else if is_alpha c then Char.code c ++ else (Char.code c) + 256 ++ in ++ ++ let len1 = String.length v1 in ++ let len2 = String.length v2 in ++ ++ let p = ref 0 in ++ ++ (** Compare ascii part *) ++ let compare_vascii () = ++ let cmp = ref 0 in ++ while !cmp = 0 && ++ !p < len1 && !p < len2 && ++ not (is_digit v1.[!p] && is_digit v2.[!p]) do ++ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); ++ incr p ++ done; ++ if !cmp = 0 && !p < len1 && !p = len2 then ++ val_ascii v1.[!p] ++ else if !cmp = 0 && !p = len1 && !p < len2 then ++ - (val_ascii v2.[!p]) ++ else ++ !cmp ++ in ++ ++ (** Compare digit part *) ++ let compare_digit () = ++ let extract_int v p = ++ let start_p = !p in ++ while !p < String.length v && is_digit v.[!p] do ++ incr p ++ done; ++ let substr = ++ String.sub v !p ((String.length v) - !p) ++ in ++ let res = ++ match String.sub v start_p (!p - start_p) with ++ | "" -> 0 ++ | s -> int_of_string s ++ in ++ res, substr ++ in ++ let i1, tl1 = extract_int v1 (ref !p) in ++ let i2, tl2 = extract_int v2 (ref !p) in ++ i1 - i2, tl1, tl2 ++ in ++ ++ match compare_vascii () with ++ | 0 -> ++ begin ++ match compare_digit () with ++ | 0, tl1, tl2 -> ++ if tl1 <> "" && is_digit tl1.[0] then ++ 1 ++ else if tl2 <> "" && is_digit tl2.[0] then ++ -1 ++ else ++ version_compare tl1 tl2 ++ | n, _, _ -> ++ n ++ end ++ | n -> ++ n ++ end ++ else ++ begin ++ 0 ++ end ++ ++ ++ let version_of_string str = str ++ ++ let string_of_version t = t ++ ++ let chop t = ++ try ++ let pos = ++ String.rindex t '.' ++ in ++ String.sub t 0 pos ++ with Not_found -> ++ t ++ ++ let rec comparator_apply v op = ++ match op with ++ | VGreater cv -> ++ (version_compare v cv) > 0 ++ | VGreaterEqual cv -> ++ (version_compare v cv) >= 0 ++ | VLesser cv -> ++ (version_compare v cv) < 0 ++ | VLesserEqual cv -> ++ (version_compare v cv) <= 0 ++ | VEqual cv -> ++ (version_compare v cv) = 0 ++ | VOr (op1, op2) -> ++ (comparator_apply v op1) || (comparator_apply v op2) ++ | VAnd (op1, op2) -> ++ (comparator_apply v op1) && (comparator_apply v op2) ++ ++ let rec string_of_comparator = ++ function ++ | VGreater v -> "> "^(string_of_version v) ++ | VEqual v -> "= "^(string_of_version v) ++ | VLesser v -> "< "^(string_of_version v) ++ | VGreaterEqual v -> ">= "^(string_of_version v) ++ | VLesserEqual v -> "<= "^(string_of_version v) ++ | VOr (c1, c2) -> ++ (string_of_comparator c1)^" || "^(string_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (string_of_comparator c1)^" && "^(string_of_comparator c2) ++ ++ let rec varname_of_comparator = ++ let concat p v = ++ OASISUtils.varname_concat ++ p ++ (OASISUtils.varname_of_string ++ (string_of_version v)) ++ in ++ function ++ | VGreater v -> concat "gt" v ++ | VLesser v -> concat "lt" v ++ | VEqual v -> concat "eq" v ++ | VGreaterEqual v -> concat "ge" v ++ | VLesserEqual v -> concat "le" v ++ | VOr (c1, c2) -> ++ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) ++ ++ let version_0_3_or_after t = ++ comparator_apply t (VGreaterEqual (string_of_version "0.3")) ++ ++end ++ ++module OASISLicense = struct ++(* # 21 "src/oasis/OASISLicense.ml" *) ++ ++ (** License for _oasis fields ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ type license = string ++ ++ type license_exception = string ++ ++ type license_version = ++ | Version of OASISVersion.t ++ | VersionOrLater of OASISVersion.t ++ | NoVersion ++ ++ ++ type license_dep_5_unit = ++ { ++ license: license; ++ excption: license_exception option; ++ version: license_version; ++ } ++ ++ ++ type license_dep_5 = ++ | DEP5Unit of license_dep_5_unit ++ | DEP5Or of license_dep_5 list ++ | DEP5And of license_dep_5 list ++ ++ ++ type t = ++ | DEP5License of license_dep_5 ++ | OtherLicense of string (* URL *) ++ ++ ++end ++ ++module OASISExpr = struct ++(* # 21 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ open OASISGettext ++ ++ type test = string ++ ++ type flag = string ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++end ++ ++module OASISTypes = struct ++(* # 21 "src/oasis/OASISTypes.ml" *) ++ ++ ++ ++ ++ type name = string ++ type package_name = string ++ type url = string ++ type unix_dirname = string ++ type unix_filename = string ++ type host_dirname = string ++ type host_filename = string ++ type prog = string ++ type arg = string ++ type args = string list ++ type command_line = (prog * arg list) ++ ++ type findlib_name = string ++ type findlib_full = string ++ ++ type compiled_object = ++ | Byte ++ | Native ++ | Best ++ ++ ++ type dependency = ++ | FindlibPackage of findlib_full * OASISVersion.comparator option ++ | InternalLibrary of name ++ ++ ++ type tool = ++ | ExternalTool of name ++ | InternalExecutable of name ++ ++ ++ type vcs = ++ | Darcs ++ | Git ++ | Svn ++ | Cvs ++ | Hg ++ | Bzr ++ | Arch ++ | Monotone ++ | OtherVCS of url ++ ++ ++ type plugin_kind = ++ [ `Configure ++ | `Build ++ | `Doc ++ | `Test ++ | `Install ++ | `Extra ++ ] ++ ++ type plugin_data_purpose = ++ [ `Configure ++ | `Build ++ | `Install ++ | `Clean ++ | `Distclean ++ | `Install ++ | `Uninstall ++ | `Test ++ | `Doc ++ | `Extra ++ | `Other of string ++ ] ++ ++ type 'a plugin = 'a * name * OASISVersion.t option ++ ++ type all_plugin = plugin_kind plugin ++ ++ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list ++ ++(* # 102 "src/oasis/OASISTypes.ml" *) ++ ++ type 'a conditional = 'a OASISExpr.choices ++ ++ type custom = ++ { ++ pre_command: (command_line option) conditional; ++ post_command: (command_line option) conditional; ++ } ++ ++ ++ type common_section = ++ { ++ cs_name: name; ++ cs_data: PropList.Data.t; ++ cs_plugin_data: plugin_data; ++ } ++ ++ ++ type build_section = ++ { ++ bs_build: bool conditional; ++ bs_install: bool conditional; ++ bs_path: unix_dirname; ++ bs_compiled_object: compiled_object; ++ bs_build_depends: dependency list; ++ bs_build_tools: tool list; ++ bs_c_sources: unix_filename list; ++ bs_data_files: (unix_filename * unix_filename option) list; ++ bs_ccopt: args conditional; ++ bs_cclib: args conditional; ++ bs_dlllib: args conditional; ++ bs_dllpath: args conditional; ++ bs_byteopt: args conditional; ++ bs_nativeopt: args conditional; ++ } ++ ++ ++ type library = ++ { ++ lib_modules: string list; ++ lib_pack: bool; ++ lib_internal_modules: string list; ++ lib_findlib_parent: findlib_name option; ++ lib_findlib_name: findlib_name option; ++ lib_findlib_containers: findlib_name list; ++ } ++ ++ type executable = ++ { ++ exec_custom: bool; ++ exec_main_is: unix_filename; ++ } ++ ++ type flag = ++ { ++ flag_description: string option; ++ flag_default: bool conditional; ++ } ++ ++ type source_repository = ++ { ++ src_repo_type: vcs; ++ src_repo_location: url; ++ src_repo_browser: url option; ++ src_repo_module: string option; ++ src_repo_branch: string option; ++ src_repo_tag: string option; ++ src_repo_subdir: unix_filename option; ++ } ++ ++ type test = ++ { ++ test_type: [`Test] plugin; ++ test_command: command_line conditional; ++ test_custom: custom; ++ test_working_directory: unix_filename option; ++ test_run: bool conditional; ++ test_tools: tool list; ++ } ++ ++ type doc_format = ++ | HTML of unix_filename ++ | DocText ++ | PDF ++ | PostScript ++ | Info of unix_filename ++ | DVI ++ | OtherDoc ++ ++ ++ type doc = ++ { ++ doc_type: [`Doc] plugin; ++ doc_custom: custom; ++ doc_build: bool conditional; ++ doc_install: bool conditional; ++ doc_install_dir: unix_filename; ++ doc_title: string; ++ doc_authors: string list; ++ doc_abstract: string option; ++ doc_format: doc_format; ++ doc_data_files: (unix_filename * unix_filename option) list; ++ doc_build_tools: tool list; ++ } ++ ++ type section = ++ | Library of common_section * build_section * library ++ | Executable of common_section * build_section * executable ++ | Flag of common_section * flag ++ | SrcRepo of common_section * source_repository ++ | Test of common_section * test ++ | Doc of common_section * doc ++ ++ ++ type section_kind = ++ [ `Library | `Executable | `Flag | `SrcRepo | `Test | `Doc ] ++ ++ type package = ++ { ++ oasis_version: OASISVersion.t; ++ ocaml_version: OASISVersion.comparator option; ++ findlib_version: OASISVersion.comparator option; ++ name: package_name; ++ version: OASISVersion.t; ++ license: OASISLicense.t; ++ license_file: unix_filename option; ++ copyrights: string list; ++ maintainers: string list; ++ authors: string list; ++ homepage: url option; ++ synopsis: string; ++ description: string option; ++ categories: url list; ++ ++ conf_type: [`Configure] plugin; ++ conf_custom: custom; ++ ++ build_type: [`Build] plugin; ++ build_custom: custom; ++ ++ install_type: [`Install] plugin; ++ install_custom: custom; ++ uninstall_custom: custom; ++ ++ clean_custom: custom; ++ distclean_custom: custom; ++ ++ files_ab: unix_filename list; ++ sections: section list; ++ plugins: [`Extra] plugin list; ++ schema_data: PropList.Data.t; ++ plugin_data: plugin_data; ++ } ++ ++end ++ ++module OASISUnixPath = struct ++(* # 21 "src/oasis/OASISUnixPath.ml" *) ++ ++ type unix_filename = string ++ type unix_dirname = string ++ ++ type host_filename = string ++ type host_dirname = string ++ ++ let current_dir_name = "." ++ ++ let parent_dir_name = ".." ++ ++ let is_current_dir fn = ++ fn = current_dir_name || fn = "" ++ ++ let concat f1 f2 = ++ if is_current_dir f1 then ++ f2 ++ else ++ let f1' = ++ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 ++ in ++ f1'^"/"^f2 ++ ++ let make = ++ function ++ | hd :: tl -> ++ List.fold_left ++ (fun f p -> concat f p) ++ hd ++ tl ++ | [] -> ++ invalid_arg "OASISUnixPath.make" ++ ++ let dirname f = ++ try ++ String.sub f 0 (String.rindex f '/') ++ with Not_found -> ++ current_dir_name ++ ++ let basename f = ++ try ++ let pos_start = ++ (String.rindex f '/') + 1 ++ in ++ String.sub f pos_start ((String.length f) - pos_start) ++ with Not_found -> ++ f ++ ++ let chop_extension f = ++ try ++ let last_dot = ++ String.rindex f '.' ++ in ++ let sub = ++ String.sub f 0 last_dot ++ in ++ try ++ let last_slash = ++ String.rindex f '/' ++ in ++ if last_slash < last_dot then ++ sub ++ else ++ f ++ with Not_found -> ++ sub ++ ++ with Not_found -> ++ f ++ ++ let capitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.capitalize base) ++ ++ let uncapitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.uncapitalize base) ++ ++end ++ ++module OASISHostPath = struct ++(* # 21 "src/oasis/OASISHostPath.ml" *) ++ ++ ++ open Filename ++ ++ module Unix = OASISUnixPath ++ ++ let make = ++ function ++ | [] -> ++ invalid_arg "OASISHostPath.make" ++ | hd :: tl -> ++ List.fold_left Filename.concat hd tl ++ ++ let of_unix ufn = ++ if Sys.os_type = "Unix" then ++ ufn ++ else ++ make ++ (List.map ++ (fun p -> ++ if p = Unix.current_dir_name then ++ current_dir_name ++ else if p = Unix.parent_dir_name then ++ parent_dir_name ++ else ++ p) ++ (OASISString.nsplit ufn '/')) ++ ++ ++end ++ ++module OASISSection = struct ++(* # 21 "src/oasis/OASISSection.ml" *) ++ ++ open OASISTypes ++ ++ let section_kind_common = ++ function ++ | Library (cs, _, _) -> ++ `Library, cs ++ | Executable (cs, _, _) -> ++ `Executable, cs ++ | Flag (cs, _) -> ++ `Flag, cs ++ | SrcRepo (cs, _) -> ++ `SrcRepo, cs ++ | Test (cs, _) -> ++ `Test, cs ++ | Doc (cs, _) -> ++ `Doc, cs ++ ++ let section_common sct = ++ snd (section_kind_common sct) ++ ++ let section_common_set cs = ++ function ++ | Library (_, bs, lib) -> Library (cs, bs, lib) ++ | Executable (_, bs, exec) -> Executable (cs, bs, exec) ++ | Flag (_, flg) -> Flag (cs, flg) ++ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) ++ | Test (_, tst) -> Test (cs, tst) ++ | Doc (_, doc) -> Doc (cs, doc) ++ ++ (** Key used to identify section ++ *) ++ let section_id sct = ++ let k, cs = ++ section_kind_common sct ++ in ++ k, cs.cs_name ++ ++ let string_of_section sct = ++ let k, nm = ++ section_id sct ++ in ++ (match k with ++ | `Library -> "library" ++ | `Executable -> "executable" ++ | `Flag -> "flag" ++ | `SrcRepo -> "src repository" ++ | `Test -> "test" ++ | `Doc -> "doc") ++ ^" "^nm ++ ++ let section_find id scts = ++ List.find ++ (fun sct -> id = section_id sct) ++ scts ++ ++ module CSection = ++ struct ++ type t = section ++ ++ let id = section_id ++ ++ let compare t1 t2 = ++ compare (id t1) (id t2) ++ ++ let equal t1 t2 = ++ (id t1) = (id t2) ++ ++ let hash t = ++ Hashtbl.hash (id t) ++ end ++ ++ module MapSection = Map.Make(CSection) ++ module SetSection = Set.Make(CSection) ++ ++end ++ ++module OASISBuildSection = struct ++(* # 21 "src/oasis/OASISBuildSection.ml" *) ++ ++end ++ ++module OASISExecutable = struct ++(* # 21 "src/oasis/OASISExecutable.ml" *) ++ ++ open OASISTypes ++ ++ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = ++ let dir = ++ OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.dirname exec.exec_main_is) ++ in ++ let is_native_exec = ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native () ++ | Byte -> false ++ in ++ ++ OASISUnixPath.concat ++ dir ++ (cs.cs_name^(suffix_program ())), ++ ++ if not is_native_exec && ++ not exec.exec_custom && ++ bs.bs_c_sources <> [] then ++ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) ++ else ++ None ++ ++end ++ ++module OASISLibrary = struct ++(* # 21 "src/oasis/OASISLibrary.ml" *) ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ type library_name = name ++ type findlib_part_name = name ++ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t ++ ++ exception InternalLibraryNotFound of library_name ++ exception FindlibPackageNotFound of findlib_name ++ ++ type group_t = ++ | Container of findlib_name * group_t list ++ | Package of (findlib_name * ++ common_section * ++ build_section * ++ library * ++ group_t list) ++ ++ (* Look for a module file, considering capitalization or not. *) ++ let find_module source_file_exists (cs, bs, lib) modul = ++ let possible_base_fn = ++ List.map ++ (OASISUnixPath.concat bs.bs_path) ++ [modul; ++ OASISUnixPath.uncapitalize_file modul; ++ OASISUnixPath.capitalize_file modul] ++ in ++ (* TODO: we should be able to be able to determine the source for every ++ * files. Hence we should introduce a Module(source: fn) for the fields ++ * Modules and InternalModules ++ *) ++ List.fold_left ++ (fun acc base_fn -> ++ match acc with ++ | `No_sources _ -> ++ begin ++ let file_found = ++ List.fold_left ++ (fun acc ext -> ++ if source_file_exists (base_fn^ext) then ++ (base_fn^ext) :: acc ++ else ++ acc) ++ [] ++ [".ml"; ".mli"; ".mll"; ".mly"] ++ in ++ match file_found with ++ | [] -> ++ acc ++ | lst -> ++ `Sources (base_fn, lst) ++ end ++ | `Sources _ -> ++ acc) ++ (`No_sources possible_base_fn) ++ possible_base_fn ++ ++ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match find_module source_file_exists (cs, bs, lib) modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ (lib.lib_modules @ lib.lib_internal_modules) ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~has_native_dynlink ++ ~ext_lib ++ ~ext_dll ++ ~source_file_exists ++ (cs, bs, lib) = ++ ++ let find_modules lst ext = ++ let find_module modul = ++ match find_module source_file_exists (cs, bs, lib) modul with ++ | `Sources (base_fn, _) -> ++ [base_fn] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ lst ++ in ++ List.map ++ (fun nm -> ++ List.map ++ (fun base_fn -> base_fn ^"."^ext) ++ (find_module nm)) ++ lst ++ in ++ ++ (* The headers that should be compiled along *) ++ let headers = ++ if lib.lib_pack then ++ [] ++ else ++ find_modules ++ lib.lib_modules ++ "cmi" ++ in ++ ++ (* The .cmx that be compiled along *) ++ let cmxs = ++ let should_be_built = ++ (not lib.lib_pack) && (* Do not install .cmx packed submodules *) ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native ++ | Byte -> false ++ in ++ if should_be_built then ++ find_modules ++ (lib.lib_modules @ lib.lib_internal_modules) ++ "cmx" ++ else ++ [] ++ in ++ ++ let acc_nopath = ++ [] ++ in ++ ++ (* Compute what libraries should be built *) ++ let acc_nopath = ++ (* Add the packed header file if required *) ++ let add_pack_header acc = ++ if lib.lib_pack then ++ [cs.cs_name^".cmi"] :: acc ++ else ++ acc ++ in ++ let byte acc = ++ add_pack_header ([cs.cs_name^".cma"] :: acc) ++ in ++ let native acc = ++ let acc = ++ add_pack_header ++ (if has_native_dynlink then ++ [cs.cs_name^".cmxs"] :: acc ++ else acc) ++ in ++ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc ++ in ++ match bs.bs_compiled_object with ++ | Native -> ++ byte (native acc_nopath) ++ | Best when is_native -> ++ byte (native acc_nopath) ++ | Byte | Best -> ++ byte acc_nopath ++ in ++ ++ (* Add C library to be built *) ++ let acc_nopath = ++ if bs.bs_c_sources <> [] then ++ begin ++ ["lib"^cs.cs_name^"_stubs"^ext_lib] ++ :: ++ ["dll"^cs.cs_name^"_stubs"^ext_dll] ++ :: ++ acc_nopath ++ end ++ else ++ acc_nopath ++ in ++ ++ (* All the files generated *) ++ List.rev_append ++ (List.rev_map ++ (List.rev_map ++ (OASISUnixPath.concat bs.bs_path)) ++ acc_nopath) ++ (headers @ cmxs) ++ ++ type data = common_section * build_section * library ++ type tree = ++ | Node of (data option) * (tree MapString.t) ++ | Leaf of data ++ ++ let findlib_mapping pkg = ++ (* Map from library name to either full findlib name or parts + parent. *) ++ let fndlb_parts_of_lib_name = ++ let fndlb_parts cs lib = ++ let name = ++ match lib.lib_findlib_name with ++ | Some nm -> nm ++ | None -> cs.cs_name ++ in ++ let name = ++ String.concat "." (lib.lib_findlib_containers @ [name]) ++ in ++ name ++ in ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, _, lib) -> ++ begin ++ let lib_name = cs.cs_name in ++ let fndlb_parts = fndlb_parts cs lib in ++ if MapString.mem lib_name mp then ++ failwithf ++ (f_ "The library name '%s' is used more than once.") ++ lib_name; ++ match lib.lib_findlib_parent with ++ | Some lib_name_parent -> ++ MapString.add ++ lib_name ++ (`Unsolved (lib_name_parent, fndlb_parts)) ++ mp ++ | None -> ++ MapString.add ++ lib_name ++ (`Solved fndlb_parts) ++ mp ++ end ++ ++ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ (* Solve the above graph to be only library name to full findlib name. *) ++ let fndlb_name_of_lib_name = ++ let rec solve visited mp lib_name lib_name_child = ++ if SetString.mem lib_name visited then ++ failwithf ++ (f_ "Library '%s' is involved in a cycle \ ++ with regard to findlib naming.") ++ lib_name; ++ let visited = SetString.add lib_name visited in ++ try ++ match MapString.find lib_name mp with ++ | `Solved fndlb_nm -> ++ fndlb_nm, mp ++ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> ++ let pre_fndlb_nm, mp = ++ solve visited mp lib_nm_parent lib_name ++ in ++ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in ++ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp ++ with Not_found -> ++ failwithf ++ (f_ "Library '%s', which is defined as the findlib parent of \ ++ library '%s', doesn't exist.") ++ lib_name lib_name_child ++ in ++ let mp = ++ MapString.fold ++ (fun lib_name status mp -> ++ match status with ++ | `Solved _ -> ++ (* Solved initialy, no need to go further *) ++ mp ++ | `Unsolved _ -> ++ let _, mp = solve SetString.empty mp lib_name "" in ++ mp) ++ fndlb_parts_of_lib_name ++ fndlb_parts_of_lib_name ++ in ++ MapString.map ++ (function ++ | `Solved fndlb_nm -> fndlb_nm ++ | `Unsolved _ -> assert false) ++ mp ++ in ++ ++ (* Convert an internal library name to a findlib name. *) ++ let findlib_name_of_library_name lib_nm = ++ try ++ MapString.find lib_nm fndlb_name_of_lib_name ++ with Not_found -> ++ raise (InternalLibraryNotFound lib_nm) ++ in ++ ++ (* Add a library to the tree. ++ *) ++ let add sct mp = ++ let fndlb_fullname = ++ let cs, _, _ = sct in ++ let lib_name = cs.cs_name in ++ findlib_name_of_library_name lib_name ++ in ++ let rec add_children nm_lst (children : tree MapString.t) = ++ match nm_lst with ++ | (hd :: tl) -> ++ begin ++ let node = ++ try ++ add_node tl (MapString.find hd children) ++ with Not_found -> ++ (* New node *) ++ new_node tl ++ in ++ MapString.add hd node children ++ end ++ | [] -> ++ (* Should not have a nameless library. *) ++ assert false ++ and add_node tl node = ++ if tl = [] then ++ begin ++ match node with ++ | Node (None, children) -> ++ Node (Some sct, children) ++ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> ++ (* TODO: allow to merge Package, i.e. ++ * archive(byte) = "foo.cma foo_init.cmo" ++ *) ++ let cs, _, _ = sct in ++ failwithf ++ (f_ "Library '%s' and '%s' have the same findlib name '%s'") ++ cs.cs_name cs'.cs_name fndlb_fullname ++ end ++ else ++ begin ++ match node with ++ | Leaf data -> ++ Node (Some data, add_children tl MapString.empty) ++ | Node (data_opt, children) -> ++ Node (data_opt, add_children tl children) ++ end ++ and new_node = ++ function ++ | [] -> ++ Leaf sct ++ | hd :: tl -> ++ Node (None, MapString.add hd (new_node tl) MapString.empty) ++ in ++ add_children (OASISString.nsplit fndlb_fullname '.') mp ++ in ++ ++ let rec group_of_tree mp = ++ MapString.fold ++ (fun nm node acc -> ++ let cur = ++ match node with ++ | Node (Some (cs, bs, lib), children) -> ++ Package (nm, cs, bs, lib, group_of_tree children) ++ | Node (None, children) -> ++ Container (nm, group_of_tree children) ++ | Leaf (cs, bs, lib) -> ++ Package (nm, cs, bs, lib, []) ++ in ++ cur :: acc) ++ mp [] ++ in ++ ++ let group_mp = ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, bs, lib) -> ++ add (cs, bs, lib) mp ++ | _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ let groups = ++ group_of_tree group_mp ++ in ++ ++ let library_name_of_findlib_name = ++ Lazy.lazy_from_fun ++ (fun () -> ++ (* Revert findlib_name_of_library_name. *) ++ MapString.fold ++ (fun k v mp -> MapString.add v k mp) ++ fndlb_name_of_lib_name ++ MapString.empty) ++ in ++ let library_name_of_findlib_name fndlb_nm = ++ try ++ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) ++ with Not_found -> ++ raise (FindlibPackageNotFound fndlb_nm) ++ in ++ ++ groups, ++ findlib_name_of_library_name, ++ library_name_of_findlib_name ++ ++ let findlib_of_group = ++ function ++ | Container (fndlb_nm, _) ++ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm ++ ++ let root_of_group grp = ++ let rec root_lib_aux = ++ (* We do a DFS in the group. *) ++ function ++ | Container (_, children) -> ++ List.fold_left ++ (fun res grp -> ++ if res = None then ++ root_lib_aux grp ++ else ++ res) ++ None ++ children ++ | Package (_, cs, bs, lib, _) -> ++ Some (cs, bs, lib) ++ in ++ match root_lib_aux grp with ++ | Some res -> ++ res ++ | None -> ++ failwithf ++ (f_ "Unable to determine root library of findlib library '%s'") ++ (findlib_of_group grp) ++ ++end ++ ++module OASISFlag = struct ++(* # 21 "src/oasis/OASISFlag.ml" *) ++ ++end ++ ++module OASISPackage = struct ++(* # 21 "src/oasis/OASISPackage.ml" *) ++ ++end ++ ++module OASISSourceRepository = struct ++(* # 21 "src/oasis/OASISSourceRepository.ml" *) ++ ++end ++ ++module OASISTest = struct ++(* # 21 "src/oasis/OASISTest.ml" *) ++ ++end ++ ++module OASISDocument = struct ++(* # 21 "src/oasis/OASISDocument.ml" *) ++ ++end ++ ++module OASISExec = struct ++(* # 21 "src/oasis/OASISExec.ml" *) ++ ++ open OASISGettext ++ open OASISUtils ++ open OASISMessage ++ ++ (* TODO: I don't like this quote, it is there because $(rm) foo expands to ++ * 'rm -f' foo... ++ *) ++ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = ++ let cmd = ++ if quote then ++ if Sys.os_type = "Win32" then ++ if String.contains cmd ' ' then ++ (* Double the 1st double quote... win32... sigh *) ++ "\""^(Filename.quote cmd) ++ else ++ cmd ++ else ++ Filename.quote cmd ++ else ++ cmd ++ in ++ let cmdline = ++ String.concat " " (cmd :: args) ++ in ++ info ~ctxt (f_ "Running command '%s'") cmdline; ++ match f_exit_code, Sys.command cmdline with ++ | None, 0 -> () ++ | None, i -> ++ failwithf ++ (f_ "Command '%s' terminated with error code %d") ++ cmdline i ++ | Some f, i -> ++ f i ++ ++ let run_read_output ~ctxt ?f_exit_code cmd args = ++ let fn = ++ Filename.temp_file "oasis-" ".txt" ++ in ++ try ++ begin ++ let () = ++ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) ++ in ++ let chn = ++ open_in fn ++ in ++ let routput = ++ ref [] ++ in ++ begin ++ try ++ while true do ++ routput := (input_line chn) :: !routput ++ done ++ with End_of_file -> ++ () ++ end; ++ close_in chn; ++ Sys.remove fn; ++ List.rev !routput ++ end ++ with e -> ++ (try Sys.remove fn with _ -> ()); ++ raise e ++ ++ let run_read_one_line ~ctxt ?f_exit_code cmd args = ++ match run_read_output ~ctxt ?f_exit_code cmd args with ++ | [fst] -> ++ fst ++ | lst -> ++ failwithf ++ (f_ "Command return unexpected output %S") ++ (String.concat "\n" lst) ++end ++ ++module OASISFileUtil = struct ++(* # 21 "src/oasis/OASISFileUtil.ml" *) ++ ++ open OASISGettext ++ ++ let file_exists_case fn = ++ let dirname = Filename.dirname fn in ++ let basename = Filename.basename fn in ++ if Sys.file_exists dirname then ++ if basename = Filename.current_dir_name then ++ true ++ else ++ List.mem ++ basename ++ (Array.to_list (Sys.readdir dirname)) ++ else ++ false ++ ++ let find_file ?(case_sensitive=true) paths exts = ++ ++ (* Cardinal product of two list *) ++ let ( * ) lst1 lst2 = ++ List.flatten ++ (List.map ++ (fun a -> ++ List.map ++ (fun b -> a,b) ++ lst2) ++ lst1) ++ in ++ ++ let rec combined_paths lst = ++ match lst with ++ | p1 :: p2 :: tl -> ++ let acc = ++ (List.map ++ (fun (a,b) -> Filename.concat a b) ++ (p1 * p2)) ++ in ++ combined_paths (acc :: tl) ++ | [e] -> ++ e ++ | [] -> ++ [] ++ in ++ ++ let alternatives = ++ List.map ++ (fun (p,e) -> ++ if String.length e > 0 && e.[0] <> '.' then ++ p ^ "." ^ e ++ else ++ p ^ e) ++ ((combined_paths paths) * exts) ++ in ++ List.find ++ (if case_sensitive then ++ file_exists_case ++ else ++ Sys.file_exists) ++ alternatives ++ ++ let which ~ctxt prg = ++ let path_sep = ++ match Sys.os_type with ++ | "Win32" -> ++ ';' ++ | _ -> ++ ':' ++ in ++ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in ++ let exec_ext = ++ match Sys.os_type with ++ | "Win32" -> ++ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) ++ | _ -> ++ [""] ++ in ++ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext ++ ++ (**/**) ++ let rec fix_dir dn = ++ (* Windows hack because Sys.file_exists "src\\" = false when ++ * Sys.file_exists "src" = true ++ *) ++ let ln = ++ String.length dn ++ in ++ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then ++ fix_dir (String.sub dn 0 (ln - 1)) ++ else ++ dn ++ ++ let q = Filename.quote ++ (**/**) ++ ++ let cp ~ctxt ?(recurse=false) src tgt = ++ if recurse then ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt ++ "xcopy" [q src; q tgt; "/E"] ++ | _ -> ++ OASISExec.run ~ctxt ++ "cp" ["-r"; q src; q tgt] ++ else ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "copy" ++ | _ -> "cp") ++ [q src; q tgt] ++ ++ let mkdir ~ctxt tgt = ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "md" ++ | _ -> "mkdir") ++ [q tgt] ++ ++ let rec mkdir_parent ~ctxt f tgt = ++ let tgt = ++ fix_dir tgt ++ in ++ if Sys.file_exists tgt then ++ begin ++ if not (Sys.is_directory tgt) then ++ OASISUtils.failwithf ++ (f_ "Cannot create directory '%s', a file of the same name already \ ++ exists") ++ tgt ++ end ++ else ++ begin ++ mkdir_parent ~ctxt f (Filename.dirname tgt); ++ if not (Sys.file_exists tgt) then ++ begin ++ f tgt; ++ mkdir ~ctxt tgt ++ end ++ end ++ ++ let rmdir ~ctxt tgt = ++ if Sys.readdir tgt = [||] then ++ begin ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt "rd" [q tgt] ++ | _ -> ++ OASISExec.run ~ctxt "rm" ["-r"; q tgt] ++ end ++ ++ let glob ~ctxt fn = ++ let basename = ++ Filename.basename fn ++ in ++ if String.length basename >= 2 && ++ basename.[0] = '*' && ++ basename.[1] = '.' then ++ begin ++ let ext_len = ++ (String.length basename) - 2 ++ in ++ let ext = ++ String.sub basename 2 ext_len ++ in ++ let dirname = ++ Filename.dirname fn ++ in ++ Array.fold_left ++ (fun acc fn -> ++ try ++ let fn_ext = ++ String.sub ++ fn ++ ((String.length fn) - ext_len) ++ ext_len ++ in ++ if fn_ext = ext then ++ (Filename.concat dirname fn) :: acc ++ else ++ acc ++ with Invalid_argument _ -> ++ acc) ++ [] ++ (Sys.readdir dirname) ++ end ++ else ++ begin ++ if file_exists_case fn then ++ [fn] ++ else ++ [] ++ end ++end ++ ++ ++# 2142 "setup.ml" ++module BaseEnvLight = struct ++(* # 21 "src/base/BaseEnvLight.ml" *) ++ ++ module MapString = Map.Make(String) ++ ++ type t = string MapString.t ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ let var_get name env = ++ let rec var_expand str = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ in ++ var_expand (MapString.find name env) ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 2240 "setup.ml" ++module BaseContext = struct ++(* # 21 "src/base/BaseContext.ml" *) ++ ++ open OASISContext ++ ++ let args = args ++ ++ let default = default ++ ++end ++ ++module BaseMessage = struct ++(* # 21 "src/base/BaseMessage.ml" *) ++ ++ (** Message to user, overrid for Base ++ @author Sylvain Le Gall ++ *) ++ open OASISMessage ++ open BaseContext ++ ++ let debug fmt = debug ~ctxt:!default fmt ++ ++ let info fmt = info ~ctxt:!default fmt ++ ++ let warning fmt = warning ~ctxt:!default fmt ++ ++ let error fmt = error ~ctxt:!default fmt ++ ++end ++ ++module BaseEnv = struct ++(* # 21 "src/base/BaseEnv.ml" *) ++ ++ open OASISGettext ++ open OASISUtils ++ open PropList ++ ++ module MapString = BaseEnvLight.MapString ++ ++ type origin_t = ++ | ODefault ++ | OGetEnv ++ | OFileLoad ++ | OCommandLine ++ ++ type cli_handle_t = ++ | CLINone ++ | CLIAuto ++ | CLIWith ++ | CLIEnable ++ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list ++ ++ type definition_t = ++ { ++ hide: bool; ++ dump: bool; ++ cli: cli_handle_t; ++ arg_help: string option; ++ group: string option; ++ } ++ ++ let schema = ++ Schema.create "environment" ++ ++ (* Environment data *) ++ let env = ++ Data.create () ++ ++ (* Environment data from file *) ++ let env_from_file = ++ ref MapString.empty ++ ++ (* Lexer for var *) ++ let var_lxr = ++ Genlex.make_lexer [] ++ ++ let rec var_expand str = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ (* TODO: this is a quick hack to allow calling Test.Command ++ * without defining executable name really. I.e. if there is ++ * an exec Executable toto, then $(toto) should be replace ++ * by its real name. It is however useful to have this function ++ * for other variable that depend on the host and should be ++ * written better than that. ++ *) ++ let st = ++ var_lxr (Stream.of_string var) ++ in ++ match Stream.npeek 3 st with ++ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> ++ OASISHostPath.of_unix (var_get nm) ++ | [Genlex.Ident "utoh"; Genlex.String s] -> ++ OASISHostPath.of_unix s ++ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> ++ String.escaped (var_get nm) ++ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> ++ String.escaped s ++ | [Genlex.Ident nm] -> ++ var_get nm ++ | _ -> ++ failwithf ++ (f_ "Unknown expression '%s' in variable expansion of %s.") ++ var ++ str ++ with ++ | Unknown_field (_, _) -> ++ failwithf ++ (f_ "No variable %s defined when trying to expand %S.") ++ var ++ str ++ | Stream.Error e -> ++ failwithf ++ (f_ "Syntax error when parsing '%s' when trying to \ ++ expand %S: %s") ++ var ++ str ++ e) ++ str; ++ Buffer.contents buff ++ ++ and var_get name = ++ let vl = ++ try ++ Schema.get schema env name ++ with Unknown_field _ as e -> ++ begin ++ try ++ MapString.find name !env_from_file ++ with Not_found -> ++ raise e ++ end ++ in ++ var_expand vl ++ ++ let var_choose ?printer ?name lst = ++ OASISExpr.choose ++ ?printer ++ ?name ++ var_get ++ lst ++ ++ let var_protect vl = ++ let buff = ++ Buffer.create (String.length vl) ++ in ++ String.iter ++ (function ++ | '$' -> Buffer.add_string buff "\\$" ++ | c -> Buffer.add_char buff c) ++ vl; ++ Buffer.contents buff ++ ++ let var_define ++ ?(hide=false) ++ ?(dump=true) ++ ?short_desc ++ ?(cli=CLINone) ++ ?arg_help ++ ?group ++ name (* TODO: type constraint on the fact that name must be a valid OCaml ++ id *) ++ dflt = ++ ++ let default = ++ [ ++ OFileLoad, (fun () -> MapString.find name !env_from_file); ++ ODefault, dflt; ++ OGetEnv, (fun () -> Sys.getenv name); ++ ] ++ in ++ ++ let extra = ++ { ++ hide = hide; ++ dump = dump; ++ cli = cli; ++ arg_help = arg_help; ++ group = group; ++ } ++ in ++ ++ (* Try to find a value that can be defined ++ *) ++ let var_get_low lst = ++ let errors, res = ++ List.fold_left ++ (fun (errors, res) (o, v) -> ++ if res = None then ++ begin ++ try ++ errors, Some (v ()) ++ with ++ | Not_found -> ++ errors, res ++ | Failure rsn -> ++ (rsn :: errors), res ++ | e -> ++ (Printexc.to_string e) :: errors, res ++ end ++ else ++ errors, res) ++ ([], None) ++ (List.sort ++ (fun (o1, _) (o2, _) -> ++ Pervasives.compare o2 o1) ++ lst) ++ in ++ match res, errors with ++ | Some v, _ -> ++ v ++ | None, [] -> ++ raise (Not_set (name, None)) ++ | None, lst -> ++ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) ++ in ++ ++ let help = ++ match short_desc with ++ | Some fs -> Some fs ++ | None -> None ++ in ++ ++ let var_get_lst = ++ FieldRO.create ++ ~schema ++ ~name ++ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) ++ ~print:var_get_low ++ ~default ++ ~update:(fun ?context x old_x -> x @ old_x) ++ ?help ++ extra ++ in ++ ++ fun () -> ++ var_expand (var_get_low (var_get_lst env)) ++ ++ let var_redefine ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt = ++ if Schema.mem schema name then ++ begin ++ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) ++ Schema.set schema env ~context:ODefault name (dflt ()); ++ fun () -> var_get name ++ end ++ else ++ begin ++ var_define ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt ++ end ++ ++ let var_ignore (e : unit -> string) = ++ () ++ ++ let print_hidden = ++ var_define ++ ~hide:true ++ ~dump:false ++ ~cli:CLIAuto ++ ~arg_help:"Print even non-printable variable. (debug)" ++ "print_hidden" ++ (fun () -> "false") ++ ++ let var_all () = ++ List.rev ++ (Schema.fold ++ (fun acc nm def _ -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ nm :: acc ++ else ++ acc) ++ [] ++ schema) ++ ++ let default_filename = ++ BaseEnvLight.default_filename ++ ++ let load ?allow_empty ?filename () = ++ env_from_file := BaseEnvLight.load ?allow_empty ?filename () ++ ++ let unload () = ++ env_from_file := MapString.empty; ++ Data.clear env ++ ++ let dump ?(filename=default_filename) () = ++ let chn = ++ open_out_bin filename ++ in ++ let output nm value = ++ Printf.fprintf chn "%s=%S\n" nm value ++ in ++ let mp_todo = ++ (* Dump data from schema *) ++ Schema.fold ++ (fun mp_todo nm def _ -> ++ if def.dump then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ output nm value ++ with Not_set _ -> ++ () ++ end; ++ MapString.remove nm mp_todo) ++ !env_from_file ++ schema ++ in ++ (* Dump data defined outside of schema *) ++ MapString.iter output mp_todo; ++ ++ (* End of the dump *) ++ close_out chn ++ ++ let print () = ++ let printable_vars = ++ Schema.fold ++ (fun acc nm def short_descr_opt -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ let txt = ++ match short_descr_opt with ++ | Some s -> s () ++ | None -> nm ++ in ++ (txt, value) :: acc ++ with Not_set _ -> ++ acc ++ end ++ else ++ acc) ++ [] ++ schema ++ in ++ let max_length = ++ List.fold_left max 0 ++ (List.rev_map String.length ++ (List.rev_map fst printable_vars)) ++ in ++ let dot_pad str = ++ String.make ((max_length - (String.length str)) + 3) '.' ++ in ++ ++ Printf.printf "\nConfiguration: \n"; ++ List.iter ++ (fun (name,value) -> ++ Printf.printf "%s: %s %s\n" name (dot_pad name) value) ++ (List.rev printable_vars); ++ Printf.printf "\n%!" ++ ++ let args () = ++ let arg_concat = ++ OASISUtils.varname_concat ~hyphen:'-' ++ in ++ [ ++ "--override", ++ Arg.Tuple ++ ( ++ let rvr = ref "" ++ in ++ let rvl = ref "" ++ in ++ [ ++ Arg.Set_string rvr; ++ Arg.Set_string rvl; ++ Arg.Unit ++ (fun () -> ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ !rvr ++ !rvl) ++ ] ++ ), ++ "var+val Override any configuration variable."; ++ ++ ] ++ @ ++ List.flatten ++ (Schema.fold ++ (fun acc name def short_descr_opt -> ++ let var_set s = ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ name ++ s ++ in ++ ++ let arg_name = ++ OASISUtils.varname_of_string ~hyphen:'-' name ++ in ++ ++ let hlp = ++ match short_descr_opt with ++ | Some txt -> txt () ++ | None -> "" ++ in ++ ++ let arg_hlp = ++ match def.arg_help with ++ | Some s -> s ++ | None -> "str" ++ in ++ ++ let default_value = ++ try ++ Printf.sprintf ++ (f_ " [%s]") ++ (Schema.get ++ schema ++ env ++ name) ++ with Not_set _ -> ++ "" ++ in ++ ++ let args = ++ match def.cli with ++ | CLINone -> ++ [] ++ | CLIAuto -> ++ [ ++ arg_concat "--" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIWith -> ++ [ ++ arg_concat "--with-" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIEnable -> ++ let dflt = ++ if default_value = " [true]" then ++ s_ " [default: enabled]" ++ else ++ s_ " [default: disabled]" ++ in ++ [ ++ arg_concat "--enable-" arg_name, ++ Arg.Unit (fun () -> var_set "true"), ++ Printf.sprintf (f_ " %s%s") hlp dflt; ++ ++ arg_concat "--disable-" arg_name, ++ Arg.Unit (fun () -> var_set "false"), ++ Printf.sprintf (f_ " %s%s") hlp dflt ++ ] ++ | CLIUser lst -> ++ lst ++ in ++ args :: acc) ++ [] ++ schema) ++end ++ ++module BaseArgExt = struct ++(* # 21 "src/base/BaseArgExt.ml" *) ++ ++ open OASISUtils ++ open OASISGettext ++ ++ let parse argv args = ++ (* Simulate command line for Arg *) ++ let current = ++ ref 0 ++ in ++ ++ try ++ Arg.parse_argv ++ ~current:current ++ (Array.concat [[|"none"|]; argv]) ++ (Arg.align args) ++ (failwithf (f_ "Don't know what to do with arguments: '%s'")) ++ (s_ "configure options:") ++ with ++ | Arg.Help txt -> ++ print_endline txt; ++ exit 0 ++ | Arg.Bad txt -> ++ prerr_endline txt; ++ exit 1 ++end ++ ++module BaseCheck = struct ++(* # 21 "src/base/BaseCheck.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISUtils ++ open OASISGettext ++ ++ let prog_best prg prg_lst = ++ var_redefine ++ prg ++ (fun () -> ++ let alternate = ++ List.fold_left ++ (fun res e -> ++ match res with ++ | Some _ -> ++ res ++ | None -> ++ try ++ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) ++ with Not_found -> ++ None) ++ None ++ prg_lst ++ in ++ match alternate with ++ | Some prg -> prg ++ | None -> raise Not_found) ++ ++ let prog prg = ++ prog_best prg [prg] ++ ++ let prog_opt prg = ++ prog_best prg [prg^".opt"; prg] ++ ++ let ocamlfind = ++ prog "ocamlfind" ++ ++ let version ++ var_prefix ++ cmp ++ fversion ++ () = ++ (* Really compare version provided *) ++ let var = ++ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) ++ in ++ var_redefine ++ ~hide:true ++ var ++ (fun () -> ++ let version_str = ++ match fversion () with ++ | "[Distributed with OCaml]" -> ++ begin ++ try ++ (var_get "ocaml_version") ++ with Not_found -> ++ warning ++ (f_ "Variable ocaml_version not defined, fallback \ ++ to default"); ++ Sys.ocaml_version ++ end ++ | res -> ++ res ++ in ++ let version = ++ OASISVersion.version_of_string version_str ++ in ++ if OASISVersion.comparator_apply version cmp then ++ version_str ++ else ++ failwithf ++ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") ++ var_prefix ++ (OASISVersion.string_of_comparator cmp) ++ version_str) ++ () ++ ++ let package_version pkg = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%v"; pkg] ++ ++ let package ?version_comparator pkg () = ++ let var = ++ OASISUtils.varname_concat ++ "pkg_" ++ (OASISUtils.varname_of_string pkg) ++ in ++ let findlib_dir pkg = ++ let dir = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%d"; pkg] ++ in ++ if Sys.file_exists dir && Sys.is_directory dir then ++ dir ++ else ++ failwithf ++ (f_ "When looking for findlib package %s, \ ++ directory %s return doesn't exist") ++ pkg dir ++ in ++ let vl = ++ var_redefine ++ var ++ (fun () -> findlib_dir pkg) ++ () ++ in ++ ( ++ match version_comparator with ++ | Some ver_cmp -> ++ ignore ++ (version ++ var ++ ver_cmp ++ (fun _ -> package_version pkg) ++ ()) ++ | None -> ++ () ++ ); ++ vl ++end ++ ++module BaseOCamlcConfig = struct ++(* # 21 "src/base/BaseOCamlcConfig.ml" *) ++ ++ ++ open BaseEnv ++ open OASISUtils ++ open OASISGettext ++ ++ module SMap = Map.Make(String) ++ ++ let ocamlc = ++ BaseCheck.prog_opt "ocamlc" ++ ++ let ocamlc_config_map = ++ (* Map name to value for ocamlc -config output ++ (name ^": "^value) ++ *) ++ let rec split_field mp lst = ++ match lst with ++ | line :: tl -> ++ let mp = ++ try ++ let pos_semicolon = ++ String.index line ':' ++ in ++ if pos_semicolon > 1 then ++ ( ++ let name = ++ String.sub line 0 pos_semicolon ++ in ++ let linelen = ++ String.length line ++ in ++ let value = ++ if linelen > pos_semicolon + 2 then ++ String.sub ++ line ++ (pos_semicolon + 2) ++ (linelen - pos_semicolon - 2) ++ else ++ "" ++ in ++ SMap.add name value mp ++ ) ++ else ++ ( ++ mp ++ ) ++ with Not_found -> ++ ( ++ mp ++ ) ++ in ++ split_field mp tl ++ | [] -> ++ mp ++ in ++ ++ let cache = ++ lazy ++ (var_protect ++ (Marshal.to_string ++ (split_field ++ SMap.empty ++ (OASISExec.run_read_output ++ ~ctxt:!BaseContext.default ++ (ocamlc ()) ["-config"])) ++ [])) ++ in ++ var_redefine ++ "ocamlc_config_map" ++ ~hide:true ++ ~dump:false ++ (fun () -> ++ (* TODO: update if ocamlc change !!! *) ++ Lazy.force cache) ++ ++ let var_define nm = ++ (* Extract data from ocamlc -config *) ++ let avlbl_config_get () = ++ Marshal.from_string ++ (ocamlc_config_map ()) ++ 0 ++ in ++ let chop_version_suffix s = ++ try ++ String.sub s 0 (String.index s '+') ++ with _ -> ++ s ++ in ++ ++ let nm_config, value_config = ++ match nm with ++ | "ocaml_version" -> ++ "version", chop_version_suffix ++ | _ -> nm, (fun x -> x) ++ in ++ var_redefine ++ nm ++ (fun () -> ++ try ++ let map = ++ avlbl_config_get () ++ in ++ let value = ++ SMap.find nm_config map ++ in ++ value_config value ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find field '%s' in '%s -config' output") ++ nm ++ (ocamlc ())) ++ ++end ++ ++module BaseStandardVar = struct ++(* # 21 "src/base/BaseStandardVar.ml" *) ++ ++ ++ open OASISGettext ++ open OASISTypes ++ open OASISExpr ++ open BaseCheck ++ open BaseEnv ++ ++ let ocamlfind = BaseCheck.ocamlfind ++ let ocamlc = BaseOCamlcConfig.ocamlc ++ let ocamlopt = prog_opt "ocamlopt" ++ let ocamlbuild = prog "ocamlbuild" ++ ++ ++ (**/**) ++ let rpkg = ++ ref None ++ ++ let pkg_get () = ++ match !rpkg with ++ | Some pkg -> pkg ++ | None -> failwith (s_ "OASIS Package is not set") ++ ++ let var_cond = ref [] ++ ++ let var_define_cond ~since_version f dflt = ++ let holder = ref (fun () -> dflt) in ++ let since_version = ++ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) ++ in ++ var_cond := ++ (fun ver -> ++ if OASISVersion.comparator_apply ver since_version then ++ holder := f ()) :: !var_cond; ++ fun () -> !holder () ++ ++ (**/**) ++ ++ let pkg_name = ++ var_define ++ ~short_desc:(fun () -> s_ "Package name") ++ "pkg_name" ++ (fun () -> (pkg_get ()).name) ++ ++ let pkg_version = ++ var_define ++ ~short_desc:(fun () -> s_ "Package version") ++ "pkg_version" ++ (fun () -> ++ (OASISVersion.string_of_version (pkg_get ()).version)) ++ ++ let c = BaseOCamlcConfig.var_define ++ ++ let os_type = c "os_type" ++ let system = c "system" ++ let architecture = c "architecture" ++ let ccomp_type = c "ccomp_type" ++ let ocaml_version = c "ocaml_version" ++ ++ (* TODO: Check standard variable presence at runtime *) ++ ++ let standard_library_default = c "standard_library_default" ++ let standard_library = c "standard_library" ++ let standard_runtime = c "standard_runtime" ++ let bytecomp_c_compiler = c "bytecomp_c_compiler" ++ let native_c_compiler = c "native_c_compiler" ++ let model = c "model" ++ let ext_obj = c "ext_obj" ++ let ext_asm = c "ext_asm" ++ let ext_lib = c "ext_lib" ++ let ext_dll = c "ext_dll" ++ let default_executable_name = c "default_executable_name" ++ let systhread_supported = c "systhread_supported" ++ ++ let flexlink = ++ BaseCheck.prog "flexlink" ++ ++ let flexdll_version = ++ var_define ++ ~short_desc:(fun () -> "FlexDLL version (Win32)") ++ "flexdll_version" ++ (fun () -> ++ let lst = ++ OASISExec.run_read_output ~ctxt:!BaseContext.default ++ (flexlink ()) ["-help"] ++ in ++ match lst with ++ | line :: _ -> ++ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) ++ | [] -> ++ raise Not_found) ++ ++ (**/**) ++ let p name hlp dflt = ++ var_define ++ ~short_desc:hlp ++ ~cli:CLIAuto ++ ~arg_help:"dir" ++ name ++ dflt ++ ++ let (/) a b = ++ if os_type () = Sys.os_type then ++ Filename.concat a b ++ else if os_type () = "Unix" then ++ OASISUnixPath.concat a b ++ else ++ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") ++ (os_type ()) ++ (**/**) ++ ++ let prefix = ++ p "prefix" ++ (fun () -> s_ "Install architecture-independent files dir") ++ (fun () -> ++ match os_type () with ++ | "Win32" -> ++ let program_files = ++ Sys.getenv "PROGRAMFILES" ++ in ++ program_files/(pkg_name ()) ++ | _ -> ++ "/usr/local") ++ ++ let exec_prefix = ++ p "exec_prefix" ++ (fun () -> s_ "Install architecture-dependent files in dir") ++ (fun () -> "$prefix") ++ ++ let bindir = ++ p "bindir" ++ (fun () -> s_ "User executables") ++ (fun () -> "$exec_prefix"/"bin") ++ ++ let sbindir = ++ p "sbindir" ++ (fun () -> s_ "System admin executables") ++ (fun () -> "$exec_prefix"/"sbin") ++ ++ let libexecdir = ++ p "libexecdir" ++ (fun () -> s_ "Program executables") ++ (fun () -> "$exec_prefix"/"libexec") ++ ++ let sysconfdir = ++ p "sysconfdir" ++ (fun () -> s_ "Read-only single-machine data") ++ (fun () -> "$prefix"/"etc") ++ ++ let sharedstatedir = ++ p "sharedstatedir" ++ (fun () -> s_ "Modifiable architecture-independent data") ++ (fun () -> "$prefix"/"com") ++ ++ let localstatedir = ++ p "localstatedir" ++ (fun () -> s_ "Modifiable single-machine data") ++ (fun () -> "$prefix"/"var") ++ ++ let libdir = ++ p "libdir" ++ (fun () -> s_ "Object code libraries") ++ (fun () -> "$exec_prefix"/"lib") ++ ++ let datarootdir = ++ p "datarootdir" ++ (fun () -> s_ "Read-only arch-independent data root") ++ (fun () -> "$prefix"/"share") ++ ++ let datadir = ++ p "datadir" ++ (fun () -> s_ "Read-only architecture-independent data") ++ (fun () -> "$datarootdir") ++ ++ let infodir = ++ p "infodir" ++ (fun () -> s_ "Info documentation") ++ (fun () -> "$datarootdir"/"info") ++ ++ let localedir = ++ p "localedir" ++ (fun () -> s_ "Locale-dependent data") ++ (fun () -> "$datarootdir"/"locale") ++ ++ let mandir = ++ p "mandir" ++ (fun () -> s_ "Man documentation") ++ (fun () -> "$datarootdir"/"man") ++ ++ let docdir = ++ p "docdir" ++ (fun () -> s_ "Documentation root") ++ (fun () -> "$datarootdir"/"doc"/"$pkg_name") ++ ++ let htmldir = ++ p "htmldir" ++ (fun () -> s_ "HTML documentation") ++ (fun () -> "$docdir") ++ ++ let dvidir = ++ p "dvidir" ++ (fun () -> s_ "DVI documentation") ++ (fun () -> "$docdir") ++ ++ let pdfdir = ++ p "pdfdir" ++ (fun () -> s_ "PDF documentation") ++ (fun () -> "$docdir") ++ ++ let psdir = ++ p "psdir" ++ (fun () -> s_ "PS documentation") ++ (fun () -> "$docdir") ++ ++ let destdir = ++ p "destdir" ++ (fun () -> s_ "Prepend a path when installing package") ++ (fun () -> ++ raise ++ (PropList.Not_set ++ ("destdir", ++ Some (s_ "undefined by construct")))) ++ ++ let findlib_version = ++ var_define ++ "findlib_version" ++ (fun () -> ++ BaseCheck.package_version "findlib") ++ ++ let is_native = ++ var_define ++ "is_native" ++ (fun () -> ++ try ++ let _s : string = ++ ocamlopt () ++ in ++ "true" ++ with PropList.Not_set _ -> ++ let _s : string = ++ ocamlc () ++ in ++ "false") ++ ++ let ext_program = ++ var_define ++ "suffix_program" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> ".exe" ++ | _ -> "") ++ ++ let rm = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a file.") ++ "rm" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "del" ++ | _ -> "rm -f") ++ ++ let rmdir = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a directory.") ++ "rmdir" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "rd" ++ | _ -> "rm -rf") ++ ++ let debug = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") ++ ~cli:CLIEnable ++ "debug" ++ (fun () -> "true") ++ ++ let profile = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") ++ ~cli:CLIEnable ++ "profile" ++ (fun () -> "false") ++ ++ let tests = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> ++ s_ "Compile tests executable and library and run them") ++ ~cli:CLIEnable ++ "tests" ++ (fun () -> "false")) ++ "true" ++ ++ let docs = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> s_ "Create documentations") ++ ~cli:CLIEnable ++ "docs" ++ (fun () -> "true")) ++ "true" ++ ++ let native_dynlink = ++ var_define ++ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") ++ ~cli:CLINone ++ "native_dynlink" ++ (fun () -> ++ let res = ++ let ocaml_lt_312 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (ocaml_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "3.12.0")) ++ in ++ let flexdll_lt_030 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (flexdll_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "0.30")) ++ in ++ let has_native_dynlink = ++ let ocamlfind = ocamlfind () in ++ try ++ let fn = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ocamlfind ++ ["query"; "-predicates"; "native"; "dynlink"; ++ "-format"; "%d/%a"] ++ in ++ Sys.file_exists fn ++ with _ -> ++ false ++ in ++ if not has_native_dynlink then ++ false ++ else if ocaml_lt_312 () then ++ false ++ else if (os_type () = "Win32" || os_type () = "Cygwin") ++ && flexdll_lt_030 () then ++ begin ++ BaseMessage.warning ++ (f_ ".cmxs generation disabled because FlexDLL needs to be \ ++ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") ++ (flexdll_version ()); ++ false ++ end ++ else ++ true ++ in ++ string_of_bool res) ++ ++ let init pkg = ++ rpkg := Some pkg; ++ List.iter (fun f -> f pkg.oasis_version) !var_cond ++ ++end ++ ++module BaseFileAB = struct ++(* # 21 "src/base/BaseFileAB.ml" *) ++ ++ open BaseEnv ++ open OASISGettext ++ open BaseMessage ++ ++ let to_filename fn = ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ if not (Filename.check_suffix fn ".ab") then ++ warning ++ (f_ "File '%s' doesn't have '.ab' extension") ++ fn; ++ Filename.chop_extension fn ++ ++ let replace fn_lst = ++ let buff = ++ Buffer.create 13 ++ in ++ List.iter ++ (fun fn -> ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ let chn_in = ++ open_in fn ++ in ++ let chn_out = ++ open_out (to_filename fn) ++ in ++ ( ++ try ++ while true do ++ Buffer.add_string buff (var_expand (input_line chn_in)); ++ Buffer.add_char buff '\n' ++ done ++ with End_of_file -> ++ () ++ ); ++ Buffer.output_buffer chn_out buff; ++ Buffer.clear buff; ++ close_in chn_in; ++ close_out chn_out) ++ fn_lst ++end ++ ++module BaseLog = struct ++(* # 21 "src/base/BaseLog.ml" *) ++ ++ open OASISUtils ++ ++ let default_filename = ++ Filename.concat ++ (Filename.dirname BaseEnv.default_filename) ++ "setup.log" ++ ++ module SetTupleString = ++ Set.Make ++ (struct ++ type t = string * string ++ let compare (s11, s12) (s21, s22) = ++ match String.compare s11 s21 with ++ | 0 -> String.compare s12 s22 ++ | n -> n ++ end) ++ ++ let load () = ++ if Sys.file_exists default_filename then ++ begin ++ let chn = ++ open_in default_filename ++ in ++ let scbuf = ++ Scanf.Scanning.from_file default_filename ++ in ++ let rec read_aux (st, lst) = ++ if not (Scanf.Scanning.end_of_input scbuf) then ++ begin ++ let acc = ++ try ++ Scanf.bscanf scbuf "%S %S\n" ++ (fun e d -> ++ let t = ++ e, d ++ in ++ if SetTupleString.mem t st then ++ st, lst ++ else ++ SetTupleString.add t st, ++ t :: lst) ++ with Scanf.Scan_failure _ -> ++ failwith ++ (Scanf.bscanf scbuf ++ "%l" ++ (fun line -> ++ Printf.sprintf ++ "Malformed log file '%s' at line %d" ++ default_filename ++ line)) ++ in ++ read_aux acc ++ end ++ else ++ begin ++ close_in chn; ++ List.rev lst ++ end ++ in ++ read_aux (SetTupleString.empty, []) ++ end ++ else ++ begin ++ [] ++ end ++ ++ let register event data = ++ let chn_out = ++ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename ++ in ++ Printf.fprintf chn_out "%S %S\n" event data; ++ close_out chn_out ++ ++ let unregister event data = ++ if Sys.file_exists default_filename then ++ begin ++ let lst = ++ load () ++ in ++ let chn_out = ++ open_out default_filename ++ in ++ let write_something = ++ ref false ++ in ++ List.iter ++ (fun (e, d) -> ++ if e <> event || d <> data then ++ begin ++ write_something := true; ++ Printf.fprintf chn_out "%S %S\n" e d ++ end) ++ lst; ++ close_out chn_out; ++ if not !write_something then ++ Sys.remove default_filename ++ end ++ ++ let filter events = ++ let st_events = ++ List.fold_left ++ (fun st e -> ++ SetString.add e st) ++ SetString.empty ++ events ++ in ++ List.filter ++ (fun (e, _) -> SetString.mem e st_events) ++ (load ()) ++ ++ let exists event data = ++ List.exists ++ (fun v -> (event, data) = v) ++ (load ()) ++end ++ ++module BaseBuilt = struct ++(* # 21 "src/base/BaseBuilt.ml" *) ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseStandardVar ++ open BaseMessage ++ ++ type t = ++ | BExec (* Executable *) ++ | BExecLib (* Library coming with executable *) ++ | BLib (* Library *) ++ | BDoc (* Document *) ++ ++ let to_log_event_file t nm = ++ "built_"^ ++ (match t with ++ | BExec -> "exec" ++ | BExecLib -> "exec_lib" ++ | BLib -> "lib" ++ | BDoc -> "doc")^ ++ "_"^nm ++ ++ let to_log_event_done t nm = ++ "is_"^(to_log_event_file t nm) ++ ++ let register t nm lst = ++ BaseLog.register ++ (to_log_event_done t nm) ++ "true"; ++ List.iter ++ (fun alt -> ++ let registered = ++ List.fold_left ++ (fun registered fn -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ BaseLog.register ++ (to_log_event_file t nm) ++ (if Filename.is_relative fn then ++ Filename.concat (Sys.getcwd ()) fn ++ else ++ fn); ++ true ++ end ++ else ++ registered) ++ false ++ alt ++ in ++ if not registered then ++ warning ++ (f_ "Cannot find an existing alternative files among: %s") ++ (String.concat (s_ ", ") alt)) ++ lst ++ ++ let unregister t nm = ++ List.iter ++ (fun (e, d) -> ++ BaseLog.unregister e d) ++ (BaseLog.filter ++ [to_log_event_file t nm; ++ to_log_event_done t nm]) ++ ++ let fold t nm f acc = ++ List.fold_left ++ (fun acc (_, fn) -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ f acc fn ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' has been marked as built \ ++ for %s but doesn't exist") ++ fn ++ (Printf.sprintf ++ (match t with ++ | BExec | BExecLib -> ++ (f_ "executable %s") ++ | BLib -> ++ (f_ "library %s") ++ | BDoc -> ++ (f_ "documentation %s")) ++ nm); ++ acc ++ end) ++ acc ++ (BaseLog.filter ++ [to_log_event_file t nm]) ++ ++ let is_built t nm = ++ List.fold_left ++ (fun is_built (_, d) -> ++ (try ++ bool_of_string d ++ with _ -> ++ false)) ++ false ++ (BaseLog.filter ++ [to_log_event_done t nm]) ++ ++ let of_executable ffn (cs, bs, exec) = ++ let unix_exec_is, unix_dll_opt = ++ OASISExecutable.unix_exec_is ++ (cs, bs, exec) ++ (fun () -> ++ bool_of_string ++ (is_native ())) ++ ext_dll ++ ext_program ++ in ++ let evs = ++ (BExec, cs.cs_name, [[ffn unix_exec_is]]) ++ :: ++ (match unix_dll_opt with ++ | Some fn -> ++ [BExecLib, cs.cs_name, [[ffn fn]]] ++ | None -> ++ []) ++ in ++ evs, ++ unix_exec_is, ++ unix_dll_opt ++ ++ let of_library ffn (cs, bs, lib) = ++ let unix_lst = ++ OASISLibrary.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ ~has_native_dynlink:(bool_of_string (native_dynlink ())) ++ ~ext_lib:(ext_lib ()) ++ ~ext_dll:(ext_dll ()) ++ (cs, bs, lib) ++ in ++ let evs = ++ [BLib, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ ++end ++ ++module BaseCustom = struct ++(* # 21 "src/base/BaseCustom.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ let run cmd args extra_args = ++ OASISExec.run ~ctxt:!BaseContext.default ~quote:false ++ (var_expand cmd) ++ (List.map ++ var_expand ++ (args @ (Array.to_list extra_args))) ++ ++ let hook ?(failsafe=false) cstm f e = ++ let optional_command lst = ++ let printer = ++ function ++ | Some (cmd, args) -> String.concat " " (cmd :: args) ++ | None -> s_ "No command" ++ in ++ match ++ var_choose ++ ~name:(s_ "Pre/Post Command") ++ ~printer ++ lst with ++ | Some (cmd, args) -> ++ begin ++ try ++ run cmd args [||] ++ with e when failsafe -> ++ warning ++ (f_ "Command '%s' fail with error: %s") ++ (String.concat " " (cmd :: args)) ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ end ++ | None -> ++ () ++ in ++ let res = ++ optional_command cstm.pre_command; ++ f e ++ in ++ optional_command cstm.post_command; ++ res ++end ++ ++module BaseDynVar = struct ++(* # 21 "src/base/BaseDynVar.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseEnv ++ open BaseBuilt ++ ++ let init pkg = ++ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) ++ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) ++ List.iter ++ (function ++ | Executable (cs, bs, exec) -> ++ if var_choose bs.bs_build then ++ var_ignore ++ (var_redefine ++ (* We don't save this variable *) ++ ~dump:false ++ ~short_desc:(fun () -> ++ Printf.sprintf ++ (f_ "Filename of executable '%s'") ++ cs.cs_name) ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ let fn_opt = ++ fold ++ BExec cs.cs_name ++ (fun _ fn -> Some fn) ++ None ++ in ++ match fn_opt with ++ | Some fn -> fn ++ | None -> ++ raise ++ (PropList.Not_set ++ (cs.cs_name, ++ Some (Printf.sprintf ++ (f_ "Executable '%s' not yet built.") ++ cs.cs_name))))) ++ ++ | Library _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> ++ ()) ++ pkg.sections ++end ++ ++module BaseTest = struct ++(* # 21 "src/base/BaseTest.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISExpr ++ open OASISGettext ++ ++ let test lst pkg extra_args = ++ ++ let one_test (failure, n) (test_plugin, cs, test) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "test %s run") ++ cs.cs_name) ++ ~printer:string_of_bool ++ test.test_run then ++ begin ++ let () = ++ info (f_ "Running test '%s'") cs.cs_name ++ in ++ let back_cwd = ++ match test.test_working_directory with ++ | Some dir -> ++ let cwd = ++ Sys.getcwd () ++ in ++ let chdir d = ++ info (f_ "Changing directory to '%s'") d; ++ Sys.chdir d ++ in ++ chdir dir; ++ fun () -> chdir cwd ++ ++ | None -> ++ fun () -> () ++ in ++ try ++ let failure_percent = ++ BaseCustom.hook ++ test.test_custom ++ (test_plugin pkg (cs, test)) ++ extra_args ++ in ++ back_cwd (); ++ (failure_percent +. failure, n + 1) ++ with e -> ++ begin ++ back_cwd (); ++ raise e ++ end ++ end ++ else ++ begin ++ info (f_ "Skipping test '%s'") cs.cs_name; ++ (failure, n) ++ end ++ in ++ let (failed, n) = ++ List.fold_left ++ one_test ++ (0.0, 0) ++ lst ++ in ++ let failure_percent = ++ if n = 0 then ++ 0.0 ++ else ++ failed /. (float_of_int n) ++ in ++ let msg = ++ Printf.sprintf ++ (f_ "Tests had a %.2f%% failure rate") ++ (100. *. failure_percent) ++ in ++ if failure_percent > 0.0 then ++ failwith msg ++ else ++ info "%s" msg; ++ ++ (* Possible explanation why the tests where not run. *) ++ if OASISVersion.version_0_3_or_after pkg.oasis_version && ++ not (bool_of_string (BaseStandardVar.tests ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Tests are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-tests'" ++end ++ ++module BaseDoc = struct ++(* # 21 "src/base/BaseDoc.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ let doc lst pkg extra_args = ++ ++ let one_doc (doc_plugin, cs, doc) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "documentation %s build") ++ cs.cs_name) ++ ~printer:string_of_bool ++ doc.doc_build then ++ begin ++ info (f_ "Building documentation '%s'") cs.cs_name; ++ BaseCustom.hook ++ doc.doc_custom ++ (doc_plugin pkg (cs, doc)) ++ extra_args ++ end ++ in ++ List.iter one_doc lst; ++ ++ if OASISVersion.version_0_3_or_after pkg.oasis_version && ++ not (bool_of_string (BaseStandardVar.docs ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Docs are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-docs'" ++end ++ ++module BaseSetup = struct ++(* # 21 "src/base/BaseSetup.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISSection ++ open OASISGettext ++ open OASISUtils ++ ++ type std_args_fun = ++ package -> string array -> unit ++ ++ type ('a, 'b) section_args_fun = ++ name * (package -> (common_section * 'a) -> string array -> 'b) ++ ++ type t = ++ { ++ configure: std_args_fun; ++ build: std_args_fun; ++ doc: ((doc, unit) section_args_fun) list; ++ test: ((test, float) section_args_fun) list; ++ install: std_args_fun; ++ uninstall: std_args_fun; ++ clean: std_args_fun list; ++ clean_doc: (doc, unit) section_args_fun list; ++ clean_test: (test, unit) section_args_fun list; ++ distclean: std_args_fun list; ++ distclean_doc: (doc, unit) section_args_fun list; ++ distclean_test: (test, unit) section_args_fun list; ++ package: package; ++ oasis_fn: string option; ++ oasis_version: string; ++ oasis_digest: Digest.t option; ++ oasis_exec: string option; ++ oasis_setup_args: string list; ++ setup_update: bool; ++ } ++ ++ (* Associate a plugin function with data from package *) ++ let join_plugin_sections filter_map lst = ++ List.rev ++ (List.fold_left ++ (fun acc sct -> ++ match filter_map sct with ++ | Some e -> ++ e :: acc ++ | None -> ++ acc) ++ [] ++ lst) ++ ++ (* Search for plugin data associated with a section name *) ++ let lookup_plugin_section plugin action nm lst = ++ try ++ List.assoc nm lst ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find plugin %s matching section %s for %s action") ++ plugin ++ nm ++ action ++ ++ let configure t args = ++ (* Run configure *) ++ BaseCustom.hook ++ t.package.conf_custom ++ (fun () -> ++ (* Reload if preconf has changed it *) ++ begin ++ try ++ unload (); ++ load (); ++ with _ -> ++ () ++ end; ++ ++ (* Run plugin's configure *) ++ t.configure t.package args; ++ ++ (* Dump to allow postconf to change it *) ++ dump ()) ++ (); ++ ++ (* Reload environment *) ++ unload (); ++ load (); ++ ++ (* Save environment *) ++ print (); ++ ++ (* Replace data in file *) ++ BaseFileAB.replace t.package.files_ab ++ ++ let build t args = ++ BaseCustom.hook ++ t.package.build_custom ++ (t.build t.package) ++ args ++ ++ let doc t args = ++ BaseDoc.doc ++ (join_plugin_sections ++ (function ++ | Doc (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "documentation" ++ (s_ "build") ++ cs.cs_name ++ t.doc, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ let test t args = ++ BaseTest.test ++ (join_plugin_sections ++ (function ++ | Test (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "test" ++ (s_ "run") ++ cs.cs_name ++ t.test, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ let all t args = ++ let rno_doc = ++ ref false ++ in ++ let rno_test = ++ ref false ++ in ++ Arg.parse_argv ++ ~current:(ref 0) ++ (Array.of_list ++ ((Sys.executable_name^" all") :: ++ (Array.to_list args))) ++ [ ++ "-no-doc", ++ Arg.Set rno_doc, ++ s_ "Don't run doc target"; ++ ++ "-no-test", ++ Arg.Set rno_test, ++ s_ "Don't run test target"; ++ ] ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ ""; ++ ++ info "Running configure step"; ++ configure t [||]; ++ ++ info "Running build step"; ++ build t [||]; ++ ++ (* Load setup.log dynamic variables *) ++ BaseDynVar.init t.package; ++ ++ if not !rno_doc then ++ begin ++ info "Running doc step"; ++ doc t [||]; ++ end ++ else ++ begin ++ info "Skipping doc step" ++ end; ++ ++ if not !rno_test then ++ begin ++ info "Running test step"; ++ test t [||] ++ end ++ else ++ begin ++ info "Skipping test step" ++ end ++ ++ let install t args = ++ BaseCustom.hook ++ t.package.install_custom ++ (t.install t.package) ++ args ++ ++ let uninstall t args = ++ BaseCustom.hook ++ t.package.uninstall_custom ++ (t.uninstall t.package) ++ args ++ ++ let reinstall t args = ++ uninstall t args; ++ install t args ++ ++ let clean, distclean = ++ let failsafe f a = ++ try ++ f a ++ with e -> ++ warning ++ (f_ "Action fail with error: %s") ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ in ++ ++ let generic_clean t cstm mains docs tests args = ++ BaseCustom.hook ++ ~failsafe:true ++ cstm ++ (fun () -> ++ (* Clean section *) ++ List.iter ++ (function ++ | Test (cs, test) -> ++ let f = ++ try ++ List.assoc cs.cs_name tests ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, test)) ++ args ++ | Doc (cs, doc) -> ++ let f = ++ try ++ List.assoc cs.cs_name docs ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, doc)) ++ args ++ | Library _ ++ | Executable _ ++ | Flag _ ++ | SrcRepo _ -> ++ ()) ++ t.package.sections; ++ (* Clean whole package *) ++ List.iter ++ (fun f -> ++ failsafe ++ (f t.package) ++ args) ++ mains) ++ () ++ in ++ ++ let clean t args = ++ generic_clean ++ t ++ t.package.clean_custom ++ t.clean ++ t.clean_doc ++ t.clean_test ++ args ++ in ++ ++ let distclean t args = ++ (* Call clean *) ++ clean t args; ++ ++ (* Call distclean code *) ++ generic_clean ++ t ++ t.package.distclean_custom ++ t.distclean ++ t.distclean_doc ++ t.distclean_test ++ args; ++ ++ (* Remove generated file *) ++ List.iter ++ (fun fn -> ++ if Sys.file_exists fn then ++ begin ++ info (f_ "Remove '%s'") fn; ++ Sys.remove fn ++ end) ++ (BaseEnv.default_filename ++ :: ++ BaseLog.default_filename ++ :: ++ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) ++ in ++ ++ clean, distclean ++ ++ let version t _ = ++ print_endline t.oasis_version ++ ++ let update_setup_ml, no_update_setup_ml_cli = ++ let b = ref true in ++ b, ++ ("-no-update-setup-ml", ++ Arg.Clear b, ++ s_ " Don't try to update setup.ml, even if _oasis has changed.") ++ ++ let update_setup_ml t = ++ let oasis_fn = ++ match t.oasis_fn with ++ | Some fn -> fn ++ | None -> "_oasis" ++ in ++ let oasis_exec = ++ match t.oasis_exec with ++ | Some fn -> fn ++ | None -> "oasis" ++ in ++ let ocaml = ++ Sys.executable_name ++ in ++ let setup_ml, args = ++ match Array.to_list Sys.argv with ++ | setup_ml :: args -> ++ setup_ml, args ++ | [] -> ++ failwith ++ (s_ "Expecting non-empty command line arguments.") ++ in ++ let ocaml, setup_ml = ++ if Sys.executable_name = Sys.argv.(0) then ++ (* We are not running in standard mode, probably the script ++ * is precompiled. ++ *) ++ "ocaml", "setup.ml" ++ else ++ ocaml, setup_ml ++ in ++ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in ++ let do_update () = ++ let oasis_exec_version = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | 1 -> ++ failwithf ++ (f_ "Executable '%s' is probably an old version \ ++ of oasis (< 0.3.0), please update to version \ ++ v%s.") ++ oasis_exec t.oasis_version ++ | 127 -> ++ failwithf ++ (f_ "Cannot find executable '%s', please install \ ++ oasis v%s.") ++ oasis_exec t.oasis_version ++ | n -> ++ failwithf ++ (f_ "Command '%s version' exited with code %d.") ++ oasis_exec n) ++ oasis_exec ["version"] ++ in ++ if OASISVersion.comparator_apply ++ (OASISVersion.version_of_string oasis_exec_version) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string t.oasis_version)) then ++ begin ++ (* We have a version >= for the executable oasis, proceed with ++ * update. ++ *) ++ (* TODO: delegate this check to 'oasis setup'. *) ++ if Sys.os_type = "Win32" then ++ failwithf ++ (f_ "It is not possible to update the running script \ ++ setup.ml on Windows. Please update setup.ml by \ ++ running '%s'.") ++ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) ++ else ++ begin ++ OASISExec.run ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | n -> ++ failwithf ++ (f_ "Unable to update setup.ml using '%s', \ ++ please fix the problem and retry.") ++ oasis_exec) ++ oasis_exec ("setup" :: t.oasis_setup_args); ++ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) ++ end ++ end ++ else ++ failwithf ++ (f_ "The version of '%s' (v%s) doesn't match the version of \ ++ oasis used to generate the %s file. Please install at \ ++ least oasis v%s.") ++ oasis_exec oasis_exec_version setup_ml t.oasis_version ++ in ++ ++ if !update_setup_ml then ++ begin ++ try ++ match t.oasis_digest with ++ | Some dgst -> ++ if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then ++ begin ++ do_update (); ++ true ++ end ++ else ++ false ++ | None -> ++ false ++ with e -> ++ error ++ (f_ "Error when updating setup.ml. If you want to avoid this error, \ ++ you can bypass the update of %s by running '%s %s %s %s'") ++ setup_ml ocaml setup_ml no_update_setup_ml_cli ++ (String.concat " " args); ++ raise e ++ end ++ else ++ false ++ ++ let setup t = ++ let catch_exn = ++ ref true ++ in ++ try ++ let act_ref = ++ ref (fun _ -> ++ failwithf ++ (f_ "No action defined, run '%s %s -help'") ++ Sys.executable_name ++ Sys.argv.(0)) ++ ++ in ++ let extra_args_ref = ++ ref [] ++ in ++ let allow_empty_env_ref = ++ ref false ++ in ++ let arg_handle ?(allow_empty_env=false) act = ++ Arg.Tuple ++ [ ++ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); ++ ++ Arg.Unit ++ (fun () -> ++ allow_empty_env_ref := allow_empty_env; ++ act_ref := act); ++ ] ++ in ++ ++ Arg.parse ++ (Arg.align ++ ([ ++ "-configure", ++ arg_handle ~allow_empty_env:true configure, ++ s_ "[options*] Configure the whole build process."; ++ ++ "-build", ++ arg_handle build, ++ s_ "[options*] Build executables and libraries."; ++ ++ "-doc", ++ arg_handle doc, ++ s_ "[options*] Build documents."; ++ ++ "-test", ++ arg_handle test, ++ s_ "[options*] Run tests."; ++ ++ "-all", ++ arg_handle ~allow_empty_env:true all, ++ s_ "[options*] Run configure, build, doc and test targets."; ++ ++ "-install", ++ arg_handle install, ++ s_ "[options*] Install libraries, data, executables \ ++ and documents."; ++ ++ "-uninstall", ++ arg_handle uninstall, ++ s_ "[options*] Uninstall libraries, data, executables \ ++ and documents."; ++ ++ "-reinstall", ++ arg_handle reinstall, ++ s_ "[options*] Uninstall and install libraries, data, \ ++ executables and documents."; ++ ++ "-clean", ++ arg_handle ~allow_empty_env:true clean, ++ s_ "[options*] Clean files generated by a build."; ++ ++ "-distclean", ++ arg_handle ~allow_empty_env:true distclean, ++ s_ "[options*] Clean files generated by a build and configure."; ++ ++ "-version", ++ arg_handle ~allow_empty_env:true version, ++ s_ " Display version of OASIS used to generate this setup.ml."; ++ ++ "-no-catch-exn", ++ Arg.Clear catch_exn, ++ s_ " Don't catch exception, useful for debugging."; ++ ] ++ @ ++ (if t.setup_update then ++ [no_update_setup_ml_cli] ++ else ++ []) ++ @ (BaseContext.args ()))) ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ (s_ "Setup and run build process current package\n"); ++ ++ (* Build initial environment *) ++ load ~allow_empty:!allow_empty_env_ref (); ++ ++ (** Initialize flags *) ++ List.iter ++ (function ++ | Flag (cs, {flag_description = hlp; ++ flag_default = choices}) -> ++ begin ++ let apply ?short_desc () = ++ var_ignore ++ (var_define ++ ~cli:CLIEnable ++ ?short_desc ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ string_of_bool ++ (var_choose ++ ~name:(Printf.sprintf ++ (f_ "default value of flag %s") ++ cs.cs_name) ++ ~printer:string_of_bool ++ choices))) ++ in ++ match hlp with ++ | Some hlp -> ++ apply ~short_desc:(fun () -> hlp) () ++ | None -> ++ apply () ++ end ++ | _ -> ++ ()) ++ t.package.sections; ++ ++ BaseStandardVar.init t.package; ++ ++ BaseDynVar.init t.package; ++ ++ if t.setup_update && update_setup_ml t then ++ () ++ else ++ !act_ref t (Array.of_list (List.rev !extra_args_ref)) ++ ++ with e when !catch_exn -> ++ error "%s" (Printexc.to_string e); ++ exit 1 ++ ++end ++ ++ ++# 4480 "setup.ml" ++module InternalConfigurePlugin = struct ++(* # 21 "src/plugins/internal/InternalConfigurePlugin.ml" *) ++ ++ (** Configure using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ open BaseEnv ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open BaseMessage ++ ++ (** Configure build using provided series of check to be done ++ * and then output corresponding file. ++ *) ++ let configure pkg argv = ++ let var_ignore_eval var = ++ let _s : string = ++ var () ++ in ++ () ++ in ++ ++ let errors = ++ ref SetString.empty ++ in ++ ++ let buff = ++ Buffer.create 13 ++ in ++ ++ let add_errors fmt = ++ Printf.kbprintf ++ (fun b -> ++ errors := SetString.add (Buffer.contents b) !errors; ++ Buffer.clear b) ++ buff ++ fmt ++ in ++ ++ let warn_exception e = ++ warning "%s" (Printexc.to_string e) ++ in ++ ++ (* Check tools *) ++ let check_tools lst = ++ List.iter ++ (function ++ | ExternalTool tool -> ++ begin ++ try ++ var_ignore_eval (BaseCheck.prog tool) ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find external tool '%s'") tool ++ end ++ | InternalExecutable nm1 -> ++ (* Check that matching tool is built *) ++ List.iter ++ (function ++ | Executable ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal executable \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ lst ++ in ++ ++ let build_checks sct bs = ++ if var_choose bs.bs_build then ++ begin ++ if bs.bs_compiled_object = Native then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.ocamlopt ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Section %s requires native compilation") ++ (OASISSection.string_of_section sct) ++ end; ++ ++ (* Check tools *) ++ check_tools bs.bs_build_tools; ++ ++ (* Check depends *) ++ List.iter ++ (function ++ | FindlibPackage (findlib_pkg, version_comparator) -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.package ?version_comparator findlib_pkg) ++ with e -> ++ warn_exception e; ++ match version_comparator with ++ | None -> ++ add_errors ++ (f_ "Cannot find findlib package %s") ++ findlib_pkg ++ | Some ver_cmp -> ++ add_errors ++ (f_ "Cannot find findlib package %s (%s)") ++ findlib_pkg ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | InternalLibrary nm1 -> ++ (* Check that matching library is built *) ++ List.iter ++ (function ++ | Library ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal library \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ bs.bs_build_depends ++ end ++ in ++ ++ (* Parse command line *) ++ BaseArgExt.parse argv (BaseEnv.args ()); ++ ++ (* OCaml version *) ++ begin ++ match pkg.ocaml_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "ocaml" ++ ver_cmp ++ BaseStandardVar.ocaml_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "OCaml version %s doesn't match version constraint %s") ++ (BaseStandardVar.ocaml_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ ++ (* Findlib version *) ++ begin ++ match pkg.findlib_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "findlib" ++ ver_cmp ++ BaseStandardVar.findlib_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Findlib version %s doesn't match version constraint %s") ++ (BaseStandardVar.findlib_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ ++ (* FlexDLL *) ++ if BaseStandardVar.os_type () = "Win32" || ++ BaseStandardVar.os_type () = "Cygwin" then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.flexlink ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find 'flexlink'") ++ end; ++ ++ (* Check build depends *) ++ List.iter ++ (function ++ | Executable (_, bs, _) ++ | Library (_, bs, _) as sct -> ++ build_checks sct bs ++ | Doc (_, doc) -> ++ if var_choose doc.doc_build then ++ check_tools doc.doc_build_tools ++ | Test (_, test) -> ++ if var_choose test.test_run then ++ check_tools test.test_tools ++ | _ -> ++ ()) ++ pkg.sections; ++ ++ (* Check if we need native dynlink (presence of libraries that compile to ++ * native) ++ *) ++ begin ++ let has_cmxa = ++ List.exists ++ (function ++ | Library (_, bs, _) -> ++ var_choose bs.bs_build && ++ (bs.bs_compiled_object = Native || ++ (bs.bs_compiled_object = Best && ++ bool_of_string (BaseStandardVar.is_native ()))) ++ | _ -> ++ false) ++ pkg.sections ++ in ++ if has_cmxa then ++ var_ignore_eval BaseStandardVar.native_dynlink ++ end; ++ ++ (* Check errors *) ++ if SetString.empty != !errors then ++ begin ++ List.iter ++ (fun e -> error "%s" e) ++ (SetString.elements !errors); ++ failwithf ++ (fn_ ++ "%d configuration error" ++ "%d configuration errors" ++ (SetString.cardinal !errors)) ++ (SetString.cardinal !errors) ++ end ++ ++end ++ ++module InternalInstallPlugin = struct ++(* # 21 "src/plugins/internal/InternalInstallPlugin.ml" *) ++ ++ (** Install using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ open BaseEnv ++ open BaseStandardVar ++ open BaseMessage ++ open OASISTypes ++ open OASISLibrary ++ open OASISGettext ++ open OASISUtils ++ ++ let exec_hook = ++ ref (fun (cs, bs, exec) -> cs, bs, exec) ++ ++ let lib_hook = ++ ref (fun (cs, bs, lib) -> cs, bs, lib, []) ++ ++ let doc_hook = ++ ref (fun (cs, doc) -> cs, doc) ++ ++ let install_file_ev = ++ "install-file" ++ ++ let install_dir_ev = ++ "install-dir" ++ ++ let install_findlib_ev = ++ "install-findlib" ++ ++ let win32_max_command_line_length = 8000 ++ ++ let split_install_command ocamlfind findlib_name meta files = ++ if Sys.os_type = "Win32" then ++ (* Arguments for the first command: *) ++ let first_args = ["install"; findlib_name; meta] in ++ (* Arguments for remaining commands: *) ++ let other_args = ["install"; findlib_name; "-add"] in ++ (* Extract as much files as possible from [files], [len] is ++ the current command line length: *) ++ let rec get_files len acc files = ++ match files with ++ | [] -> ++ (List.rev acc, []) ++ | file :: rest -> ++ let len = len + 1 + String.length file in ++ if len > win32_max_command_line_length then ++ (List.rev acc, files) ++ else ++ get_files len (file :: acc) rest ++ in ++ (* Split the command into several commands. *) ++ let rec split args files = ++ match files with ++ | [] -> ++ [] ++ | _ -> ++ (* Length of "ocamlfind install [META|-add]" *) ++ let len = ++ List.fold_left ++ (fun len arg -> ++ len + 1 (* for the space *) + String.length arg) ++ (String.length ocamlfind) ++ args ++ in ++ match get_files len [] files with ++ | ([], _) -> ++ failwith (s_ "Command line too long.") ++ | (firsts, others) -> ++ let cmd = args @ firsts in ++ (* Use -add for remaining commands: *) ++ let () = ++ let findlib_ge_132 = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string ++ (BaseStandardVar.findlib_version ())) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string "1.3.2")) ++ in ++ if not findlib_ge_132 then ++ failwithf ++ (f_ "Installing the library %s require to use the flag \ ++ '-add' of ocamlfind because the command line is too \ ++ long. This flag is only available for findlib 1.3.2. \ ++ Please upgrade findlib from %s to 1.3.2") ++ findlib_name (BaseStandardVar.findlib_version ()) ++ in ++ let cmds = split other_args others in ++ cmd :: cmds ++ in ++ (* The first command does not use -add: *) ++ split first_args files ++ else ++ ["install" :: findlib_name :: meta :: files] ++ ++ let install pkg argv = ++ ++ let in_destdir = ++ try ++ let destdir = ++ destdir () ++ in ++ (* Practically speaking destdir is prepended ++ * at the beginning of the target filename ++ *) ++ fun fn -> destdir^fn ++ with PropList.Not_set _ -> ++ fun fn -> fn ++ in ++ ++ let install_file ?tgt_fn src_file envdir = ++ let tgt_dir = ++ in_destdir (envdir ()) ++ in ++ let tgt_file = ++ Filename.concat ++ tgt_dir ++ (match tgt_fn with ++ | Some fn -> ++ fn ++ | None -> ++ Filename.basename src_file) ++ in ++ (* Create target directory if needed *) ++ OASISFileUtil.mkdir_parent ++ ~ctxt:!BaseContext.default ++ (fun dn -> ++ info (f_ "Creating directory '%s'") dn; ++ BaseLog.register install_dir_ev dn) ++ tgt_dir; ++ ++ (* Really install files *) ++ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; ++ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; ++ BaseLog.register install_file_ev tgt_file ++ in ++ ++ (* Install data into defined directory *) ++ let install_data srcdir lst tgtdir = ++ let tgtdir = ++ OASISHostPath.of_unix (var_expand tgtdir) ++ in ++ List.iter ++ (fun (src, tgt_opt) -> ++ let real_srcs = ++ OASISFileUtil.glob ++ ~ctxt:!BaseContext.default ++ (Filename.concat srcdir src) ++ in ++ if real_srcs = [] then ++ failwithf ++ (f_ "Wildcard '%s' doesn't match any files") ++ src; ++ List.iter ++ (fun fn -> ++ install_file ++ fn ++ (fun () -> ++ match tgt_opt with ++ | Some s -> ++ OASISHostPath.of_unix (var_expand s) ++ | None -> ++ tgtdir)) ++ real_srcs) ++ lst ++ in ++ ++ (** Install all libraries *) ++ let install_libs pkg = ++ ++ let files_of_library (f_data, acc) data_lib = ++ let cs, bs, lib, lib_extra = ++ !lib_hook data_lib ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + lib_extra *) ++ List.rev_append lib_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in library %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ lib.lib_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BLib ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the library *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ in ++ ++ (* Install one group of library *) ++ let install_group_lib grp = ++ (* Iterate through all group nodes *) ++ let rec install_group_lib_aux data_and_files grp = ++ let data_and_files, children = ++ match grp with ++ | Container (_, children) -> ++ data_and_files, children ++ | Package (_, cs, bs, lib, children) -> ++ files_of_library data_and_files (cs, bs, lib), children ++ in ++ List.fold_left ++ install_group_lib_aux ++ data_and_files ++ children ++ in ++ ++ (* Findlib name of the root library *) ++ let findlib_name = ++ findlib_of_group grp ++ in ++ ++ (* Determine root library *) ++ let root_lib = ++ root_of_group grp ++ in ++ ++ (* All files to install for this library *) ++ let f_data, files = ++ install_group_lib_aux (ignore, []) grp ++ in ++ ++ (* Really install, if there is something to install *) ++ if files = [] then ++ begin ++ warning ++ (f_ "Nothing to install for findlib library '%s'") ++ findlib_name ++ end ++ else ++ begin ++ let meta = ++ (* Search META file *) ++ let (_, bs, _) = ++ root_lib ++ in ++ let res = ++ Filename.concat bs.bs_path "META" ++ in ++ if not (OASISFileUtil.file_exists_case res) then ++ failwithf ++ (f_ "Cannot find file '%s' for findlib library %s") ++ res ++ findlib_name; ++ res ++ in ++ let files = ++ (* Make filename shorter to avoid hitting command max line length ++ * too early, esp. on Windows. ++ *) ++ let remove_prefix p n = ++ let plen = String.length p in ++ let nlen = String.length n in ++ if plen <= nlen && String.sub n 0 plen = p then ++ begin ++ let fn_sep = ++ if Sys.os_type = "Win32" then ++ '\\' ++ else ++ '/' ++ in ++ let cutpoint = plen + ++ (if plen < nlen && n.[plen] = fn_sep then ++ 1 ++ else ++ 0) ++ in ++ String.sub n cutpoint (nlen - cutpoint) ++ end ++ else ++ n ++ in ++ List.map (remove_prefix (Sys.getcwd ())) files ++ in ++ info ++ (f_ "Installing findlib library '%s'") ++ findlib_name; ++ let ocamlfind = ocamlfind () in ++ let commands = ++ split_install_command ++ ocamlfind ++ findlib_name ++ meta ++ files ++ in ++ List.iter ++ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) ++ commands; ++ BaseLog.register install_findlib_ev findlib_name ++ end; ++ ++ (* Install data files *) ++ f_data (); ++ ++ in ++ ++ let group_libs, _, _ = ++ findlib_mapping pkg ++ in ++ ++ (* We install libraries in groups *) ++ List.iter install_group_lib group_libs ++ in ++ ++ let install_execs pkg = ++ let install_exec data_exec = ++ let (cs, bs, exec) = ++ !exec_hook data_exec ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then ++ begin ++ let exec_libdir () = ++ Filename.concat ++ (libdir ()) ++ pkg.name ++ in ++ BaseBuilt.fold ++ BaseBuilt.BExec ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ ~tgt_fn:(cs.cs_name ^ ext_program ()) ++ fn ++ bindir) ++ (); ++ BaseBuilt.fold ++ BaseBuilt.BExecLib ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ exec_libdir) ++ (); ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name) ++ end ++ in ++ List.iter ++ (function ++ | Executable (cs, bs, exec)-> ++ install_exec (cs, bs, exec) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ let install_docs pkg = ++ let install_doc data = ++ let (cs, doc) = ++ !doc_hook data ++ in ++ if var_choose doc.doc_install && ++ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then ++ begin ++ let tgt_dir = ++ OASISHostPath.of_unix (var_expand doc.doc_install_dir) ++ in ++ BaseBuilt.fold ++ BaseBuilt.BDoc ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ (fun () -> tgt_dir)) ++ (); ++ install_data ++ Filename.current_dir_name ++ doc.doc_data_files ++ doc.doc_install_dir ++ end ++ in ++ List.iter ++ (function ++ | Doc (cs, doc) -> ++ install_doc (cs, doc) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ install_libs pkg; ++ install_execs pkg; ++ install_docs pkg ++ ++ (* Uninstall already installed data *) ++ let uninstall _ argv = ++ List.iter ++ (fun (ev, data) -> ++ if ev = install_file_ev then ++ begin ++ if OASISFileUtil.file_exists_case data then ++ begin ++ info ++ (f_ "Removing file '%s'") ++ data; ++ Sys.remove data ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_dir_ev then ++ begin ++ if Sys.file_exists data && Sys.is_directory data then ++ begin ++ if Sys.readdir data = [||] then ++ begin ++ info ++ (f_ "Removing directory '%s'") ++ data; ++ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' is not empty (%s)") ++ data ++ (String.concat ++ ", " ++ (Array.to_list ++ (Sys.readdir data))) ++ end ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_findlib_ev then ++ begin ++ info (f_ "Removing findlib library '%s'") data; ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlfind ()) ["remove"; data] ++ end ++ else ++ failwithf (f_ "Unknown log event '%s'") ev; ++ BaseLog.unregister ev data) ++ (* We process event in reverse order *) ++ (List.rev ++ (BaseLog.filter ++ [install_file_ev; ++ install_dir_ev; ++ install_findlib_ev;])) ++ ++end ++ ++ ++# 5233 "setup.ml" ++module OCamlbuildCommon = struct ++(* # 21 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) ++ ++ (** Functions common to OCamlbuild build and doc plugin ++ *) ++ ++ open OASISGettext ++ open BaseEnv ++ open BaseStandardVar ++ ++ let ocamlbuild_clean_ev = ++ "ocamlbuild-clean" ++ ++ let ocamlbuildflags = ++ var_define ++ ~short_desc:(fun () -> "OCamlbuild additional flags") ++ "ocamlbuildflags" ++ (fun () -> "") ++ ++ (** Fix special arguments depending on environment *) ++ let fix_args args extra_argv = ++ List.flatten ++ [ ++ if (os_type ()) = "Win32" then ++ [ ++ "-classic-display"; ++ "-no-log"; ++ "-no-links"; ++ "-install-lib-dir"; ++ (Filename.concat (standard_library ()) "ocamlbuild") ++ ] ++ else ++ []; ++ ++ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then ++ [ ++ "-byte-plugin" ++ ] ++ else ++ []; ++ args; ++ ++ if bool_of_string (debug ()) then ++ ["-tag"; "debug"] ++ else ++ []; ++ ++ if bool_of_string (profile ()) then ++ ["-tag"; "profile"] ++ else ++ []; ++ ++ OASISString.nsplit (ocamlbuildflags ()) ' '; ++ ++ Array.to_list extra_argv; ++ ] ++ ++ (** Run 'ocamlbuild -clean' if not already done *) ++ let run_clean extra_argv = ++ let extra_cli = ++ String.concat " " (Array.to_list extra_argv) ++ in ++ (* Run if never called with these args *) ++ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then ++ begin ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); ++ BaseLog.register ocamlbuild_clean_ev extra_cli; ++ at_exit ++ (fun () -> ++ try ++ BaseLog.unregister ocamlbuild_clean_ev extra_cli ++ with _ -> ++ ()) ++ end ++ ++ (** Run ocamlbuild, unregister all clean events *) ++ let run_ocamlbuild args extra_argv = ++ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html ++ *) ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args args extra_argv); ++ (* Remove any clean event, we must run it again *) ++ List.iter ++ (fun (e, d) -> BaseLog.unregister e d) ++ (BaseLog.filter [ocamlbuild_clean_ev]) ++ ++ (** Determine real build directory *) ++ let build_dir extra_argv = ++ let rec search_args dir = ++ function ++ | "-build-dir" :: dir :: tl -> ++ search_args dir tl ++ | _ :: tl -> ++ search_args dir tl ++ | [] -> ++ dir ++ in ++ search_args "_build" (fix_args [] extra_argv) ++ ++end ++ ++module OCamlbuildPlugin = struct ++(* # 21 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) ++ ++ (** Build using ocamlbuild ++ @author Sylvain Le Gall ++ *) ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISUtils ++ open BaseEnv ++ open OCamlbuildCommon ++ open BaseStandardVar ++ open BaseMessage ++ ++ let cond_targets_hook = ++ ref (fun lst -> lst) ++ ++ let build pkg argv = ++ ++ (* Return the filename in build directory *) ++ let in_build_dir fn = ++ Filename.concat ++ (build_dir argv) ++ fn ++ in ++ ++ (* Return the unix filename in host build directory *) ++ let in_build_dir_of_unix fn = ++ in_build_dir (OASISHostPath.of_unix fn) ++ in ++ ++ let cond_targets = ++ List.fold_left ++ (fun acc -> ++ function ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_library ++ in_build_dir_of_unix ++ (cs, bs, lib) ++ in ++ ++ let ends_with nd fn = ++ let nd_len = ++ String.length nd ++ in ++ (String.length fn >= nd_len) ++ && ++ (String.sub ++ fn ++ (String.length fn - nd_len) ++ nd_len) = nd ++ in ++ ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ".cma" fn ++ || ends_with ".cmxs" fn ++ || ends_with ".cmxa" fn ++ || ends_with (ext_lib ()) fn ++ || ends_with (ext_dll ()) fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for library %s") ++ cs.cs_name ++ end ++ ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_exec_is, unix_dll_opt = ++ BaseBuilt.of_executable ++ in_build_dir_of_unix ++ (cs, bs, exec) ++ in ++ ++ let target ext = ++ let unix_tgt = ++ (OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.chop_extension ++ exec.exec_main_is))^ext ++ in ++ let evs = ++ (* Fix evs, we want to use the unix_tgt, without copying *) ++ List.map ++ (function ++ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> ++ BaseBuilt.BExec, nm, [[in_build_dir_of_unix unix_tgt]] ++ | ev -> ++ ev) ++ evs ++ in ++ evs, [unix_tgt] ++ in ++ ++ (* Add executable *) ++ let acc = ++ match bs.bs_compiled_object with ++ | Native -> ++ (target ".native") :: acc ++ | Best when bool_of_string (is_native ()) -> ++ (target ".native") :: acc ++ | Byte ++ | Best -> ++ (target ".byte") :: acc ++ in ++ acc ++ end ++ ++ | Library _ | Executable _ | Test _ ++ | SrcRepo _ | Flag _ | Doc _ -> ++ acc) ++ [] ++ (* Keep the pkg.sections ordered *) ++ (List.rev pkg.sections); ++ in ++ ++ (* Check and register built files *) ++ let check_and_register (bt, bnm, lst) = ++ List.iter ++ (fun fns -> ++ if not (List.exists OASISFileUtil.file_exists_case fns) then ++ failwithf ++ (f_ "No one of expected built files %s exists") ++ (String.concat (s_ ", ") (List.map (Printf.sprintf "'%s'") fns))) ++ lst; ++ (BaseBuilt.register bt bnm lst) ++ in ++ ++ let cond_targets = ++ (* Run the hook *) ++ !cond_targets_hook cond_targets ++ in ++ ++ (* Run a list of target... *) ++ run_ocamlbuild ++ (List.flatten ++ (List.map snd cond_targets)) ++ argv; ++ (* ... and register events *) ++ List.iter ++ check_and_register ++ (List.flatten (List.map fst cond_targets)) ++ ++ ++ let clean pkg extra_args = ++ run_clean extra_args; ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++end ++ ++module OCamlbuildDocPlugin = struct ++(* # 21 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) ++ ++ (* Create documentation using ocamlbuild .odocl files ++ @author Sylvain Le Gall ++ *) ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISMessage ++ open OCamlbuildCommon ++ open BaseStandardVar ++ ++ ++ ++ let doc_build path pkg (cs, doc) argv = ++ let index_html = ++ OASISUnixPath.make ++ [ ++ path; ++ cs.cs_name^".docdir"; ++ "index.html"; ++ ] ++ in ++ let tgt_dir = ++ OASISHostPath.make ++ [ ++ build_dir argv; ++ OASISHostPath.of_unix path; ++ cs.cs_name^".docdir"; ++ ] ++ in ++ run_ocamlbuild [index_html] argv; ++ List.iter ++ (fun glb -> ++ BaseBuilt.register ++ BaseBuilt.BDoc ++ cs.cs_name ++ [OASISFileUtil.glob ~ctxt:!BaseContext.default ++ (Filename.concat tgt_dir glb)]) ++ ["*.html"; "*.css"] ++ ++ let doc_clean t pkg (cs, doc) argv = ++ run_clean argv; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++end ++ ++ ++# 5558 "setup.ml" ++module NonePlugin = struct ++(* # 21 "src/plugins/none/NonePlugin.ml" *) ++ ++ (** Plugin to handle "none" generation ++ @author Sylvain Le Gall ++ *) ++ ++ open OASISGettext ++ open OASISUtils ++ ++ let not_implemented str _ _ = ++ failwithf (f_ "No implementation for %s") str ++ ++ let section_not_implemented str pkg _ _ extra_args = ++ not_implemented str pkg extra_args ++ ++end ++ ++ ++# 5578 "setup.ml" ++module CustomPlugin = struct ++(* # 21 "src/plugins/custom/CustomPlugin.ml" *) ++ ++ (** Generate custom configure/build/doc/test/install system ++ @author ++ *) ++ ++ open BaseEnv ++ open OASISGettext ++ open OASISTypes ++ ++ ++ ++ type t = ++ { ++ cmd_main: command_line conditional; ++ cmd_clean: (command_line option) conditional; ++ cmd_distclean: (command_line option) conditional; ++ } ++ ++ let run = BaseCustom.run ++ ++ let main t _ extra_args = ++ let cmd, args = ++ var_choose ++ ~name:(s_ "main command") ++ t.cmd_main ++ in ++ run cmd args extra_args ++ ++ let clean t pkg extra_args = ++ match var_choose t.cmd_clean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ let distclean t pkg extra_args = ++ match var_choose t.cmd_distclean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ module Build = ++ struct ++ let main t pkg extra_args = ++ main t pkg extra_args; ++ List.iter ++ (fun sct -> ++ let evs = ++ match sct with ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, _ = ++ BaseBuilt.of_library ++ OASISHostPath.of_unix ++ (cs, bs, lib) ++ in ++ evs ++ end ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, _, _ = ++ BaseBuilt.of_executable ++ OASISHostPath.of_unix ++ (cs, bs, exec) ++ in ++ evs ++ end ++ | _ -> ++ [] ++ in ++ List.iter ++ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) ++ evs) ++ pkg.sections ++ ++ let clean t pkg extra_args = ++ clean t pkg extra_args; ++ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild ++ * considering moving this to BaseSetup? ++ *) ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++ let distclean t pkg extra_args = ++ distclean t pkg extra_args ++ end ++ ++ module Test = ++ struct ++ let main t pkg (cs, test) extra_args = ++ try ++ main t pkg extra_args; ++ 0.0 ++ with Failure s -> ++ BaseMessage.warning ++ (f_ "Test '%s' fails: %s") ++ cs.cs_name ++ s; ++ 1.0 ++ ++ let clean t pkg (cs, test) extra_args = ++ clean t pkg extra_args ++ ++ let distclean t pkg (cs, test) extra_args = ++ distclean t pkg extra_args ++ end ++ ++ module Doc = ++ struct ++ let main t pkg (cs, _) extra_args = ++ main t pkg extra_args; ++ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] ++ ++ let clean t pkg (cs, _) extra_args = ++ clean t pkg extra_args; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++ let distclean t pkg (cs, _) extra_args = ++ distclean t pkg extra_args ++ end ++ ++end ++ ++ ++# 5714 "setup.ml" ++open OASISTypes;; ++ ++let setup_t = ++ { ++ BaseSetup.configure = InternalConfigurePlugin.configure; ++ build = OCamlbuildPlugin.build; ++ test = ++ [ ++ ("test", ++ CustomPlugin.Test.main ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ doc = ++ [ ++ ("api", OCamlbuildDocPlugin.doc_build "doc"); ++ ("distribution", ++ NonePlugin.not_implemented "doc of section distribution"); ++ ("samples", NonePlugin.not_implemented "doc of section samples") ++ ]; ++ install = InternalInstallPlugin.install; ++ uninstall = InternalInstallPlugin.uninstall; ++ clean = [OCamlbuildPlugin.clean]; ++ clean_test = ++ [ ++ ("test", ++ CustomPlugin.Test.clean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ clean_doc = [("api", OCamlbuildDocPlugin.doc_clean "doc")]; ++ distclean = []; ++ distclean_test = ++ [ ++ ("test", ++ CustomPlugin.Test.distclean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ distclean_doc = []; ++ package = ++ { ++ oasis_version = "0.3"; ++ ocaml_version = Some (OASISVersion.VGreaterEqual "3.10.0"); ++ findlib_version = None; ++ name = "uuidm"; ++ version = "0.9.5"; ++ license = ++ OASISLicense.DEP5License ++ (OASISLicense.DEP5Unit ++ { ++ OASISLicense.license = "BSD3"; ++ excption = None; ++ version = OASISLicense.NoVersion ++ }); ++ license_file = None; ++ copyrights = ["(c) 2008-2012 Daniel C. B\195\188nzli"]; ++ maintainers = []; ++ authors = ["Daniel B\195\188nzli "]; ++ homepage = Some "http://erratique.ch/software/uuidm"; ++ synopsis = "Universally unique identifiers (UUIDs) for OCaml"; ++ description = ++ Some ++ "Uuidm is an OCaml module implementing 128 bits universally unique\nidentifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4\n(random based) according to RFC 4122.\n\nUuidm is made of a single, independent, module and distributed under\nthe BSD3 license."; ++ categories = []; ++ conf_type = (`Configure, "internal", Some "0.3"); ++ conf_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ build_type = (`Build, "ocamlbuild", Some "0.3"); ++ build_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ install_type = (`Install, "internal", Some "0.3"); ++ install_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ uninstall_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ clean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ distclean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ files_ab = []; ++ sections = ++ [ ++ Library ++ ({ ++ cs_name = "uuidm"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "src"; ++ bs_compiled_object = Best; ++ bs_build_depends = []; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ { ++ lib_modules = ["Uuidm"]; ++ lib_pack = false; ++ lib_internal_modules = []; ++ lib_findlib_parent = None; ++ lib_findlib_name = None; ++ lib_findlib_containers = [] ++ }); ++ Executable ++ ({ ++ cs_name = "test"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, false)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "uuidm"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "test.ml"}); ++ Executable ++ ({ ++ cs_name = "perf"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, false)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "uuidm"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "perf.ml"}); ++ Executable ++ ({ ++ cs_name = "uuidtrip"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "uuidm"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "uuidtrip.ml"}); ++ Test ++ ({ ++ cs_name = "test"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ test_type = (`Test, "custom", Some "0.3"); ++ test_command = [(OASISExpr.EBool true, ("$test", []))]; ++ test_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ test_working_directory = None; ++ test_run = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); ++ (OASISExpr.EFlag "tests", true) ++ ]; ++ test_tools = [ExternalTool "ocamlbuild"] ++ }); ++ Doc ++ ({ ++ cs_name = "api"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "ocamlbuild", Some "0.3"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "Uuidm's documentation and API reference"; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = []; ++ doc_build_tools = ++ [ExternalTool "ocamlbuild"; ExternalTool "ocamldoc"] ++ }); ++ Doc ++ ({ ++ cs_name = "distribution"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "none", Some "0.3"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "\"Uuidm's README and CHANGES files\""; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = [("README CHANGES", None)]; ++ doc_build_tools = [ExternalTool "ocamlbuild"] ++ }); ++ Doc ++ ({ ++ cs_name = "samples"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "none", Some "0.3"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "\"Uuidm's sample code\""; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = [("test/*.ml", None)]; ++ doc_build_tools = [ExternalTool "ocamlbuild"] ++ }); ++ SrcRepo ++ ({ ++ cs_name = "head"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ src_repo_type = Git; ++ src_repo_location = ++ "git://erratique.ch/repos/uuidm.git"; ++ src_repo_browser = ++ Some "http://erratique.ch/repos/uuidm"; ++ src_repo_module = None; ++ src_repo_branch = None; ++ src_repo_tag = None; ++ src_repo_subdir = None ++ }) ++ ]; ++ plugins = [(`Extra, "META", Some "0.3")]; ++ schema_data = PropList.Data.create (); ++ plugin_data = [] ++ }; ++ oasis_fn = Some "_oasis"; ++ oasis_version = "0.3.0"; ++ oasis_digest = Some "\1667\158\208\168\029:\129\174\150K\202\184V\1600"; ++ oasis_exec = None; ++ oasis_setup_args = []; ++ setup_update = false ++ };; ++ ++let setup () = BaseSetup.setup setup_t;; ++ ++# 6064 "setup.ml" ++(* OASIS_STOP *) ++let () = setup ();; +diff --git a/src/META b/src/META +new file mode 100644 +index 0000000..b77b78c +--- /dev/null ++++ b/src/META +@@ -0,0 +1,11 @@ ++# OASIS_START ++# DO NOT EDIT (digest: 52230559625da323c970d483320cb81c) ++version = "0.9.5" ++description = "Universally unique identifiers (UUIDs) for OCaml" ++archive(byte) = "uuidm.cma" ++archive(byte, plugin) = "uuidm.cma" ++archive(native) = "uuidm.cmxa" ++archive(native, plugin) = "uuidm.cmxs" ++exists_if = "uuidm.cma" ++# OASIS_STOP ++ +diff --git a/src/uuidm.mllib b/src/uuidm.mllib +new file mode 100644 +index 0000000..f232c0b +--- /dev/null ++++ b/src/uuidm.mllib +@@ -0,0 +1,4 @@ ++# OASIS_START ++# DO NOT EDIT (digest: b483eb8cb8e9c6bb94332c476d743edc) ++Uuidm ++# OASIS_STOP diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index 03235e89..a2e1c30b 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -1,15 +1,14 @@ Name: ocaml-cmdliner -Version: 0.9.3 -Release: 3%{?dist} +Version: 0.9.5 +Release: 1%{?dist} Summary: Declarative definition of commandline interfaces for OCaml License: BSD3 URL: http://erratique.ch/software/cmdliner -Source0: https://github.com/dbuenzli/cmdliner/archive/v%{version}/cmdliner-%{version}.tar.gz -BuildRequires: oasis +Source0: http://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -Obsoletes: cmdliner <= 0.9.3 +Obsoletes: cmdliner <= 0.9.5 %description Cmdliner is an OCaml module for the declarative definition of command line @@ -31,15 +30,13 @@ developing applications that use %{name}. %setup -q -n cmdliner-%{version} %build -oasis setup -ocaml setup.ml -configure -ocaml setup.ml -build +ocaml pkg/git.ml +ocaml pkg/build.ml native=true native-dynlink=true %install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install - +mkdir -p %{buildroot}/%{_libdir}/ocaml/cmdliner +find . +cp _build/src/cmdliner.a _build/src/cmdliner.cma _build/src/cmdliner.cmi _build/src/cmdliner.cmx _build/src/cmdliner.cmxa _build/src/cmdliner.cmxs _build/src/cmdliner.mli _build/pkg/META %{buildroot}/%{_libdir}/ocaml/cmdliner %files %doc CHANGES @@ -57,6 +54,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/cmdliner/*.mli %changelog +* Thu Jul 17 2014 David Scott - 0.9.5-1 +- Update to 0.9.5 + * Fri May 30 2014 Euan Harris - 0.9.3-3 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-mirage-block-xen.spec b/SPECS/ocaml-mirage-block-xen.spec index 8a2578cf..815623c0 100644 --- a/SPECS/ocaml-mirage-block-xen.spec +++ b/SPECS/ocaml-mirage-block-xen.spec @@ -20,6 +20,8 @@ BuildRequires: ocaml-shared-memory-ring-devel BuildRequires: ocaml-ipaddr-devel BuildRequires: ocaml-mirage-types-devel BuildRequires: ocaml-mirage-xen-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-gnt-devel %description Mirage block driver for Xen that implements the blkfront/back protocol @@ -61,5 +63,5 @@ make install %{_libdir}/ocaml/mirage-block-xen/*.mli %changelog -* Wed Jul 16 2014 David Scott - 1.0.5-1 +* Wed Jul 16 2014 David Scott - 1.1.0-1 - Initial package diff --git a/SPECS/ocaml-mirage-console-xen.spec b/SPECS/ocaml-mirage-console-xen.spec index 7025a5f9..f7ac4d0b 100644 --- a/SPECS/ocaml-mirage-console-xen.spec +++ b/SPECS/ocaml-mirage-console-xen.spec @@ -13,6 +13,8 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-mirage-types-devel BuildRequires: ocaml-mirage-xen-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-gnt-devel %description A Mirage-compatible Console library for Xen @@ -34,7 +36,7 @@ make xen-build %install export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf +export OCAMLFIND_LDCONF=ignore make xen-install %files diff --git a/SPECS/ocaml-mirage-xen.spec b/SPECS/ocaml-mirage-xen.spec index 44f86146..6f65680c 100644 --- a/SPECS/ocaml-mirage-xen.spec +++ b/SPECS/ocaml-mirage-xen.spec @@ -7,6 +7,7 @@ Summary: Mirage OS library for Xen compilation License: ISC URL: https://github.com/mirage/mirage-platform/ Source0: https://github.com/mirage/mirage-platform/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: ocaml-mirage-xen.install.sh BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel @@ -28,6 +29,8 @@ Mirage OS library for Xen compilation Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-io-page-devel%{?_isa} +Requires: ocaml-mirage-clock-xen-devel%{?_isa} +Requires: ocaml-shared-memory-ring-devel%{?_isa} Requires: xen-devel%{?_isa} %description devel @@ -36,25 +39,18 @@ developing applications that use %{name}. %prep %setup -q -n mirage-platform-%{version} +cp %{SOURCE1} ocaml-mirage-xen.install.sh %build make xen-build %install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -cd xen -MIRAGE_OS=xen ./cmd install +mkdir -p %{buildroot}%{_libdir}/ocaml +sh ./ocaml-mirage-xen.install.sh %{buildroot}%{_libdir}/ocaml %{buildroot} +echo Files in _build: +find _build -name "*.a" +echo Files in buildroot: find %{buildroot} -cp _build/runtime/kernel/libxencaml.a ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/ocaml.4.00.1/libocaml.a ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/dietlibc/libdiet.a ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/libm/libm.a ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/kernel/libxen.a ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/kernel/longjmp.o ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/kernel/x86_64.o ${OCAMLFIND_DESTDIR}/mirage-xen -cp _build/runtime/kernel/mirage-x86_64.lds ${OCAMLFIND_DESTDIR}/mirage-xen %files %doc CHANGES @@ -63,6 +59,8 @@ cp _build/runtime/kernel/mirage-x86_64.lds ${OCAMLFIND_DESTDIR}/mirage-xen %exclude %{_libdir}/ocaml/mirage-xen/*.a %exclude %{_libdir}/ocaml/mirage-xen/*.cmxa %exclude %{_libdir}/ocaml/mirage-xen/*.cmx +%exclude %{_libdir}/ocaml/mirage-xen/*.o +%exclude %{_libdir}/ocaml/mirage-xen/*.lds %files devel %{_libdir}/ocaml/mirage-xen/*.a diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec index 2e609b33..14073d44 100644 --- a/SPECS/ocaml-uuidm.spec +++ b/SPECS/ocaml-uuidm.spec @@ -7,7 +7,7 @@ Summary: Universally Unique IDentifiers (UUIDs) for OCaml License: BSD3 URL: http://erratique.ch/software/uuidm Source0: https://github.com/dbuenzli/uuidm/archive/v%{version}/uuidm-%{version}.tar.gz -BuildRequires: oasis +Patch0: uuidm.oasis.patch BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -27,9 +27,9 @@ developing applications that use %{name}. %prep %setup -q -n uuidm-%{version} +%patch0 -p1 %build -oasis setup ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml ocaml setup.ml -build diff --git a/SPECS/ocaml-xmlm.spec b/SPECS/ocaml-xmlm.spec index 6928d420..ec004efa 100644 --- a/SPECS/ocaml-xmlm.spec +++ b/SPECS/ocaml-xmlm.spec @@ -1,12 +1,11 @@ Name: ocaml-xmlm -Version: 1.1.1 -Release: 3%{?dist} +Version: 1.2.0 +Release: 1%{?dist} Summary: Streaming XML input/output for OCaml License: BSD3 URL: http://erratique.ch/software/xmlm Source0: https://github.com/dbuenzli/xmlm/archive/v%{version}/xmlm-%{version}.tar.gz Obsoletes: xmlm <= 1.1.1 -BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc @@ -32,15 +31,14 @@ developing applications that use %{name}. %setup -q -n xmlm-%{version} %build -oasis setup -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build +./pkg/pkg-git +./pkg/build true %install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install -rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip +find . +mkdir -p %{buildroot}/%{_libdir}/ocaml/xmlm +cp _build/pkg/META _build/src/xmlm.a _build/src/xmlm.cma _build/src/xmlm.cmi _build/src/xmlm.cmx _build/src/xmlm.cmxa _build/src/xmlm.cmxs _build/src/xmlm.mli %{buildroot}/%{_libdir}/ocaml/xmlm + %files @@ -59,6 +57,9 @@ rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/xmltrip %{_libdir}/ocaml/xmlm/*.mli %changelog +* Thu Jul 17 2014 David Scott - 1.2.0-1 +- Update to 1.2.0 + * Mon Jun 2 2014 Euan Harris - 1.1.1-3 - Split files correctly between base and devel packages diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index fdad606f..4ece3a15 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -7,7 +7,6 @@ URL: https://github.com/xapi-project/squeezed Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: squeezed-init Source2: squeezed-conf -BuildRequires: oasis BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-re-devel From 8abfc74215ff748c8d327d243977acae3c10a191 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 17 Jul 2014 17:37:23 +0000 Subject: [PATCH 0961/1125] And it builds on CentOS again Signed-off-by: David Scott --- SOURCES/ocaml-mirage-xen.install.sh | 4 +++- SPECS/ocaml-cmdliner.spec | 4 ++-- SPECS/ocaml-mirage-xen.spec | 4 ---- SPECS/ocaml-xmlm.spec | 4 ++-- SPECS/squeezed.spec | 1 - 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/SOURCES/ocaml-mirage-xen.install.sh b/SOURCES/ocaml-mirage-xen.install.sh index f569eed7..70b118d1 100755 --- a/SOURCES/ocaml-mirage-xen.install.sh +++ b/SOURCES/ocaml-mirage-xen.install.sh @@ -13,7 +13,9 @@ mkdir -p $OCAMLFIND_DESTDIR/mirage-xen # Why does ocamlfind ignore me and delete that directory?? MIRAGE_OS=xen ./cmd install mkdir -p $OCAMLFIND_DESTDIR/mirage-xen -cp $2/mirage-xen/* $OCAMLFIND_DESTDIR/mirage-xen +if [ -e $2/mirage-xen ]; then + cp $2/mirage-xen/* $OCAMLFIND_DESTDIR/mirage-xen +fi find . -name "*.a" -exec cp {} $1/mirage-xen \; cp _build/runtime/kernel/libxen.a $1/mirage-xen cp _build/runtime/kernel/longjmp.o $1/mirage-xen diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec index a2e1c30b..d413c05c 100644 --- a/SPECS/ocaml-cmdliner.spec +++ b/SPECS/ocaml-cmdliner.spec @@ -39,8 +39,8 @@ find . cp _build/src/cmdliner.a _build/src/cmdliner.cma _build/src/cmdliner.cmi _build/src/cmdliner.cmx _build/src/cmdliner.cmxa _build/src/cmdliner.cmxs _build/src/cmdliner.mli _build/pkg/META %{buildroot}/%{_libdir}/ocaml/cmdliner %files -%doc CHANGES -%doc README +%doc CHANGES.md +%doc README.md %{_libdir}/ocaml/cmdliner %exclude %{_libdir}/ocaml/cmdliner/*.a %exclude %{_libdir}/ocaml/cmdliner/*.cmxa diff --git a/SPECS/ocaml-mirage-xen.spec b/SPECS/ocaml-mirage-xen.spec index 6f65680c..5cfddd13 100644 --- a/SPECS/ocaml-mirage-xen.spec +++ b/SPECS/ocaml-mirage-xen.spec @@ -47,10 +47,6 @@ make xen-build %install mkdir -p %{buildroot}%{_libdir}/ocaml sh ./ocaml-mirage-xen.install.sh %{buildroot}%{_libdir}/ocaml %{buildroot} -echo Files in _build: -find _build -name "*.a" -echo Files in buildroot: -find %{buildroot} %files %doc CHANGES diff --git a/SPECS/ocaml-xmlm.spec b/SPECS/ocaml-xmlm.spec index ec004efa..7afeb560 100644 --- a/SPECS/ocaml-xmlm.spec +++ b/SPECS/ocaml-xmlm.spec @@ -42,8 +42,8 @@ cp _build/pkg/META _build/src/xmlm.a _build/src/xmlm.cma _build/src/xmlm.cmi %files -%doc CHANGES -%doc README +%doc CHANGES.md +%doc README.md %{_libdir}/ocaml/xmlm %exclude %{_libdir}/ocaml/xmlm/*.a %exclude %{_libdir}/ocaml/xmlm/*.cmxa diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 4ece3a15..90fc374f 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -30,7 +30,6 @@ cp %{SOURCE1} squeezed-init cp %{SOURCE2} squeezed-conf %build -oasis setup ./configure --prefix %{_prefix} --destdir %{buildroot} make From 3418dc8b1f0af8e5781b3f569a6c419e392977aa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 10 Jul 2014 14:43:26 +0100 Subject: [PATCH 0962/1125] specdep: Add '--ignore-from' argument specdep.py --ignore-from ignore.txt SPECS/*.spec prints the dependencies of the supplied spec files, but ignores any package names in ignore.txt Signed-off-by: Euan Harris --- specdep.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/specdep.py b/specdep.py index 1c6e9984..6a96c615 100755 --- a/specdep.py +++ b/specdep.py @@ -107,6 +107,8 @@ def parse_cmdline(): parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file") parser.add_argument("-i", "--ignore", metavar="PKG", action="append", default=[], help="package name to ignore") + parser.add_argument("-I", "--ignore-from", metavar="FILE", action="append", + default=[], help="file of package names to be ignored") parser.add_argument("-d", "--dist", metavar="DIST", default="", help="distribution tag (used in RPM filenames)") return parser.parse_args() @@ -115,14 +117,18 @@ def parse_cmdline(): def main(): args = parse_cmdline() specs = {} + + pkgs_to_ignore = args.ignore + for ignore_from in args.ignore_from: + with open(ignore_from) as f: + pkgs_to_ignore.extend(f.readlines()) for spec_path in args.specs: try: if build_type() == "deb": os_type = platform.linux_distribution(full_distribution_name=False)[1].lower() map_name_fn=lambda name: mappkgname.map_package(name, os_type) - spec = pkg.Spec(spec_path, target="deb", - map_name=map_name_fn) + spec = pkg.Spec(spec_path, target="deb", map_name=map_name_fn) else: spec = pkg.Spec(spec_path, target="rpm", dist=args.dist) pkg_name = spec.name() @@ -135,7 +141,6 @@ def main(): sys.stderr.write("error: %s\n" % exn.message) sys.exit(1) - provides_to_rpm = package_to_rpm_map(specs.values()) for spec in specs.itervalues(): From aea24db076761873f75704bd3843f1db55ca0154 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 19 Jul 2014 09:31:34 +0000 Subject: [PATCH 0963/1125] specdep: --ignore-from should remove newlines in ignore file Otherwise the names don't match. To make it clear what has been ignored, we now emit comments into the deps output. Signed-off-by: David Scott --- specdep.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specdep.py b/specdep.py index 6a96c615..d1e54754 100755 --- a/specdep.py +++ b/specdep.py @@ -121,7 +121,10 @@ def main(): pkgs_to_ignore = args.ignore for ignore_from in args.ignore_from: with open(ignore_from) as f: - pkgs_to_ignore.extend(f.readlines()) + for name in f.readlines(): + pkgs_to_ignore.append(name.strip()) + for i in pkgs_to_ignore: + print "# Will ignore: %s" % i for spec_path in args.specs: try: @@ -132,7 +135,7 @@ def main(): else: spec = pkg.Spec(spec_path, target="rpm", dist=args.dist) pkg_name = spec.name() - if pkg_name in args.ignore: + if pkg_name in pkgs_to_ignore: continue specs[os.path.basename(spec_path)] = spec From bed8ede2e3d553d0283131157aaf14a730aa1859 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 19 Jul 2014 09:33:16 +0000 Subject: [PATCH 0964/1125] configure: detect the distro and use a pre-configured ignore-file If a specific distro ignore file exists then we use it, otherwise we fall back to a default list. The actual ignore file in use is a symlink called 'ignore'. Signed-off-by: David Scott --- .gitignore | 1 + Makefile | 2 +- configure.sh | 12 ++++++++++++ ignore.Ubuntu.trusty | 4 ++++ ignore.default | 1 + 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ignore.Ubuntu.trusty create mode 100644 ignore.default diff --git a/.gitignore b/.gitignore index 848c9036..a37d92bc 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ deps mock/ .coverage *~ +ignore diff --git a/Makefile b/Makefile index 0f4b5b5c..ac7ab36e 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ all: rpms deps: SPECS/*.spec specdep.py scripts/lib/mappkgname.py @echo Updating dependencies... - @./specdep.py -d $(DIST) -i libnl3 SPECS/*.spec > $@ + @./specdep.py -d $(DIST) --ignore-from ignore SPECS/*.spec > $@ -include deps diff --git a/configure.sh b/configure.sh index 3f7995fe..34ca07cb 100755 --- a/configure.sh +++ b/configure.sh @@ -1,6 +1,18 @@ #!/bin/bash set -eu +# Each distribution comes with a different set of existing +# packages. +rm -f ignore +VERSION=`lsb_release -si`.`lsb_release -sc` +IGNORE=ignore.$VERSION +echo Looking for a file called $IGNORE +if [ -e $IGNORE ]; then + ln -s $IGNORE ignore +else + ln -s ignore.default ignore +fi + DISTRIBUTION=`lsb_release -si` case "$DISTRIBUTION" in Fedora|CentOS|RedHatEnterpriseServer) diff --git a/ignore.Ubuntu.trusty b/ignore.Ubuntu.trusty new file mode 100644 index 00000000..ee5fa619 --- /dev/null +++ b/ignore.Ubuntu.trusty @@ -0,0 +1,4 @@ +oasis +ocaml-odn +ocamlify +ocamlmod diff --git a/ignore.default b/ignore.default new file mode 100644 index 00000000..29ee9bc9 --- /dev/null +++ b/ignore.default @@ -0,0 +1 @@ +libnl3 From 7dcd0d9133e781f069153828170eebe4c1f45b5e Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 19 Jul 2014 10:33:11 +0000 Subject: [PATCH 0965/1125] trusty: don't build libnl3 Signed-off-by: David Scott --- ignore.Ubuntu.trusty | 1 + 1 file changed, 1 insertion(+) diff --git a/ignore.Ubuntu.trusty b/ignore.Ubuntu.trusty index ee5fa619..852659b8 100644 --- a/ignore.Ubuntu.trusty +++ b/ignore.Ubuntu.trusty @@ -2,3 +2,4 @@ oasis ocaml-odn ocamlify ocamlmod +libnl3 From 7e5e2b7b3ce3c99907a935eefbba57876066d88e Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 19 Jul 2014 17:21:44 +0000 Subject: [PATCH 0966/1125] Upgrade our ocaml-ipaddr to a newer version than in jessie Unfortunately jessie has an old sexplib but a new ipaddr. Since we need to rebuild sexplib this means we need to rebuild ipaddr too. Signed-off-by: Vagrant User --- SPECS/ocaml-ipaddr.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec index 7fc10709..82f119ec 100644 --- a/SPECS/ocaml-ipaddr.spec +++ b/SPECS/ocaml-ipaddr.spec @@ -1,18 +1,18 @@ Name: ocaml-ipaddr -Version: 2.4.0 -Release: 1%{?dist} -Summary: Pure OCaml implementation of the Network Block Device protocol -License: LGPL2.1 + OCaml linking exception +Version: 2.5.0 +Release: 1000%{?dist} +Summary: Pure OCaml parsers and printers for IP addresses +License: ISC URL: https://github.com/mirage/ocaml-ipaddr Source0: https://github.com/mirage/ocaml-ipaddr/archive/%{version}/ocaml-ipaddr-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-camlp4 %description -An implementation of the Network Block Device protocol for both -regular Unix and Lwt in OCaml. This library allows applications to -access remote block devices. +A library for manipulation of IP (and MAC) address representations %package devel Summary: Development files for %{name} @@ -50,6 +50,9 @@ make install %{_libdir}/ocaml/ipaddr/*.mli %changelog +* Sat Jul 19 2014 David Scott - 2.5.0-1000 +- Update to 2.5.0; override upstream package + * Tue Apr 1 2014 Euan Harris - 2.4.0-1 - Initial package From 53797ef1e2e4c106edccf8496f49f468c1a8a50d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 19 Jul 2014 17:43:11 +0000 Subject: [PATCH 0967/1125] ipaddr: if you install the devel package you also need sexplib (otherwise it doesn't work) Signed-off-by: David Scott --- SPECS/ocaml-ipaddr.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec index 82f119ec..5de6069b 100644 --- a/SPECS/ocaml-ipaddr.spec +++ b/SPECS/ocaml-ipaddr.spec @@ -17,6 +17,7 @@ A library for manipulation of IP (and MAC) address representations %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +Requires: ocaml-sexplib-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for From 3041c88cefffcc0adb6c6f9d5ea4728ead026bf8 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 23 Jul 2014 01:03:35 +0100 Subject: [PATCH 0968/1125] Switch to correct source for ocaml-sha Signed-off-by: Jon Ludlam --- SPECS/ocaml-sha.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec index 70466c03..ee9e3caf 100644 --- a/SPECS/ocaml-sha.spec +++ b/SPECS/ocaml-sha.spec @@ -4,7 +4,7 @@ Release: 2%{?dist} Summary: OCaml SHA License: LGPL2.1 URL: https://github.com/vincenthz/ocaml-sha -Source0: https://github.com/xapi-project/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/vincenthz/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib From 92c67d31907bb96979ccddc051c1b36c1b4ba313 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 23 Jul 2014 01:13:01 +0100 Subject: [PATCH 0969/1125] Use correct upstream URL for ocaml-tar Signed-off-by: Jon Ludlam --- SPECS/ocaml-tar.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec index e9dc29a1..95a4eb4f 100644 --- a/SPECS/ocaml-tar.spec +++ b/SPECS/ocaml-tar.spec @@ -4,7 +4,7 @@ Release: 2%{?dist} Summary: OCaml parser and printer for tar-format data License: LGPL2.1 + OCaml linking exception URL: https://github.com/djs55/ocaml-tar -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ounit-devel From b16a4718bce2188dada250ca067ba42b5adf9108 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 23 Jul 2014 15:53:38 +0100 Subject: [PATCH 0970/1125] Add a quicktest RPM Signed-off-by: Jon Ludlam --- SPECS/xapi-quicktest.spec | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 SPECS/xapi-quicktest.spec diff --git a/SPECS/xapi-quicktest.spec b/SPECS/xapi-quicktest.spec new file mode 100644 index 00000000..9c4c0eeb --- /dev/null +++ b/SPECS/xapi-quicktest.spec @@ -0,0 +1,42 @@ +%define debug_package %{nil} + +Name: xapi-quicktest +Version: 0.0.0 +Release: 1%{?dist} +Summary: Simple xapi-project test suite +License: ISC +URL: https://github.com/xapi-project/quicktest +Source0: https://github.com/xapi-project/quicktest/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-testvmlib-devel +BuildRequires: ocaml-vchan-devel +BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-xen-api-client-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-gnt-devel +BuildRequires: ocaml-evtchn-devel +BuildRequires: ocaml-ipaddr-devel +%description +This is a simple test suite for the xapi-project components + +%prep +%setup -q -n quicktest-%{version} + +%build +make + +%install +mkdir -p %{buildroot}%{_bindir} +cp quicktest.native %{buildroot}%{_bindir} + +%files +%doc README.md +%{_bindir}/quicktest.native + +%changelog +* Wed Jul 23 2014 Jon Ludlam - 0.0.0-1 +- Initial package From d3d000f4306bd4e50229dbcfe9a6f231b7c41c29 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Thu, 24 Jul 2014 12:21:07 +0100 Subject: [PATCH 0971/1125] Add xen-4.4 to path --- SOURCES/xenopsd-xc-init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 5f390c9e..3a787eef 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -36,7 +36,10 @@ if [ -f /etc/sysconfig/$prog ] ; then fi # ensure that all the possible xen directories are on the XCP_PATH -export XCP_PATH=/usr/lib/xen/bin:/usr/lib/xen-4.3/bin:/usr/lib/xen-4.2/bin:/usr/lib/xen-4.1/bin:/usr/lib/xen/boot:/usr/lib/xen-4.3/boot:/usr/lib/xen-4.2/boot:/usr/lib/xen-4.1/boot +for xenpath in xen xen-4.4 xen-4.3 xen-4.2 xen-4.1; do + XCP_PATH="$XCP_PATH:/usr/lib/$xenpath/bin:/usr/lib/$xenpath/boot" +done +export XCP_PATH start() { [ -x $exec ] || exit 5 From b6f18b7665385b24cfb95ea53397cb35a34e417d Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 25 Jul 2014 14:30:06 +0100 Subject: [PATCH 0972/1125] Upgrade to xapi 1.9.52 Signed-off-by: Jon Ludlam --- SPECS/xapi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 25b6403c..2f47d35b 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,7 +2,7 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.50 +Version: 1.9.52 Release: 1%{?dist} License: LGPL+linking exception URL: http://www.xen.org @@ -162,6 +162,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Tue Jul 29 2014 Jon Ludlam - 1.9.52-1 +- update 1.9.52 + * Fri Jun 6 2014 David Scott - 1.9.50-1 - update 1.9.50 From a4ea0b1885f991654d3fec401a462d130a0889d4 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 30 Jul 2014 12:49:21 +0100 Subject: [PATCH 0973/1125] Cache more packages for the ubuntu build --- scripts/deb/templates/pbuilderrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index e032a59d..e0c36fb2 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -3,7 +3,7 @@ OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" -EXTRAPACKAGES="apt-utils" +EXTRAPACKAGES="apt-utils fakeroot gettext intltool-debian python bsdmainutils debhelper dh-apparmor dh-ocaml file gettext-base groff-base man-db" ALLOWUNTRUSTED=yes DISTRIBUTION=@DIST@ PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-gdebi" From 95d7ac549a3f499d4e485b58e58526441492e1a8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 30 Jul 2014 18:06:46 +0100 Subject: [PATCH 0974/1125] xapi-quicktest: quicktest requires mirage-testvm Signed-off-by: Euan Harris --- SPECS/xapi-quicktest.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi-quicktest.spec b/SPECS/xapi-quicktest.spec index 9c4c0eeb..8b4404d2 100644 --- a/SPECS/xapi-quicktest.spec +++ b/SPECS/xapi-quicktest.spec @@ -2,7 +2,7 @@ Name: xapi-quicktest Version: 0.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple xapi-project test suite License: ISC URL: https://github.com/xapi-project/quicktest @@ -20,6 +20,8 @@ BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-gnt-devel BuildRequires: ocaml-evtchn-devel BuildRequires: ocaml-ipaddr-devel +Requires: mirage-testvm + %description This is a simple test suite for the xapi-project components @@ -38,5 +40,8 @@ cp quicktest.native %{buildroot}%{_bindir} %{_bindir}/quicktest.native %changelog +* Wed Jul 30 2014 Jon Ludlam - 0.0.0-2 +- Add runtime dependency on mirage-testvm + * Wed Jul 23 2014 Jon Ludlam - 0.0.0-1 - Initial package From fcd3560638f6af01c4cd332ff8b4a18a09f673d8 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 1 Aug 2014 16:49:39 +0100 Subject: [PATCH 0975/1125] downloader: Update access time for existing archives If a spec file is updated, make will call the downloader script to get the source archives mentioned in the spec file. If the source file name has not changed and the file already exists, we need to update its access time otherwise the spec file will always be newer than the archives. Otherwise make will always consider the source archives to be out of date and will run the downloader to refresh them. Signed-off-by: Euan Harris --- scripts/downloader.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/downloader.py b/scripts/downloader.py index a281247c..db05a061 100755 --- a/scripts/downloader.py +++ b/scripts/downloader.py @@ -44,6 +44,11 @@ def look_for_it(url, destination): if os.path.exists(destination): if looks_like_an_archive(destination): print >>sys.stderr, "%s exists and looks like an archive" % destination + # Refresh the archive's last access time. + # If the spec file which depends on this archive has been modified, it will have a later access time than the archive and make will continually rebuild it. 'Touch' the archive, to prevent this happening + # There is a potential race here: http://stackoverflow.com/questions/1158076/implement-touch-using-python + with open(destination, 'a'): + os.utime(destination, None) return else: print >>sys.stderr, "%s is not an archive, deleting it" % destination From 80976ce66ea6538bed48fd3e9bd61c2ee99751f1 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 4 Aug 2014 13:53:49 +0100 Subject: [PATCH 0976/1125] opam: Add initial spec file Signed-off-by: Euan Harris --- SPECS/opam.spec | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 SPECS/opam.spec diff --git a/SPECS/opam.spec b/SPECS/opam.spec new file mode 100644 index 00000000..7f9b8c84 --- /dev/null +++ b/SPECS/opam.spec @@ -0,0 +1,36 @@ +Name: opam +Version: 1.1.2 +Release: 1%{?dist} +Summary: Source-based OCaml package manager +License: LGPLv3 +URL: http://opam.ocaml.org/ +Source0: https://github.com/ocaml/%{name}/releases/download/%{version}/%{name}-full-%{version}.tar.gz +BuildRequires: ocaml + +%description +Source-based OCaml package manager + +%prep +%setup -q -n %{name}-full-%{version} + +%build +%configure +make lib-ext +make + +%install +make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}/%{_mandir} +mv %{buildroot}/usr/man/* %{buildroot}/%{_mandir} +rm -rf %{buildroot}/usr/man + +%files +%{_mandir}/man1/opam* +%{_bindir}/opam +%{_bindir}/opam-admin +%{_bindir}/opam-installer + +%changelog +* Fri Aug 01 2014 Euan Harris 1.1.2-1 +- Initial package + From a55dacbb8a3aa10c2de4c6305ae4cdf1700c9064 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 4 Aug 2014 14:30:23 +0100 Subject: [PATCH 0977/1125] opam: Add documentation and remove opam-installer Signed-off-by: Euan Harris --- SPECS/opam.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/opam.spec b/SPECS/opam.spec index 7f9b8c84..42015d6e 100644 --- a/SPECS/opam.spec +++ b/SPECS/opam.spec @@ -25,10 +25,15 @@ mv %{buildroot}/usr/man/* %{buildroot}/%{_mandir} rm -rf %{buildroot}/usr/man %files +%doc AUTHORS +%doc CHANGES +%doc CONTRIBUTING.md +%doc LICENSE +%doc README.md %{_mandir}/man1/opam* %{_bindir}/opam %{_bindir}/opam-admin -%{_bindir}/opam-installer +%exclude %{_bindir}/opam-installer %changelog * Fri Aug 01 2014 Euan Harris 1.1.2-1 From 165a0d5616117feef0885eddfa39e7c74de89806 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 4 Aug 2014 14:35:40 +0100 Subject: [PATCH 0978/1125] opam: Put back opam-installer! Signed-off-by: Euan Harris --- SPECS/opam.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/opam.spec b/SPECS/opam.spec index 42015d6e..64dbca20 100644 --- a/SPECS/opam.spec +++ b/SPECS/opam.spec @@ -33,7 +33,7 @@ rm -rf %{buildroot}/usr/man %{_mandir}/man1/opam* %{_bindir}/opam %{_bindir}/opam-admin -%exclude %{_bindir}/opam-installer +%{_bindir}/opam-installer %changelog * Fri Aug 01 2014 Euan Harris 1.1.2-1 From 67b5dcf42a569091be3b7dd8a3e7811e17fcea77 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Aug 2014 09:58:07 +0100 Subject: [PATCH 0979/1125] opam: Fix typo in changelog Signed-off-by: Euan Harris --- SPECS/opam.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/opam.spec b/SPECS/opam.spec index 64dbca20..96ee1892 100644 --- a/SPECS/opam.spec +++ b/SPECS/opam.spec @@ -36,6 +36,6 @@ rm -rf %{buildroot}/usr/man %{_bindir}/opam-installer %changelog -* Fri Aug 01 2014 Euan Harris 1.1.2-1 +* Fri Aug 01 2014 Euan Harris - 1.1.2-1 - Initial package From ea1a7b3df71f4310f6c39a5f12bb45293459796e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 6 Aug 2014 14:17:19 +0100 Subject: [PATCH 0980/1125] opam: Add build dependency on curl We use the full release tarball so no sources have to be downloaded, but the configure script fails if curl is not installed. Signed-off-by: Euan Harris --- SPECS/opam.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/opam.spec b/SPECS/opam.spec index 96ee1892..23049223 100644 --- a/SPECS/opam.spec +++ b/SPECS/opam.spec @@ -5,6 +5,7 @@ Summary: Source-based OCaml package manager License: LGPLv3 URL: http://opam.ocaml.org/ Source0: https://github.com/ocaml/%{name}/releases/download/%{version}/%{name}-full-%{version}.tar.gz +BuildRequires: curl BuildRequires: ocaml %description From 035f197d59b6c2f7d24c331e3b3db877b1ac6004 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 13:55:18 +0100 Subject: [PATCH 0981/1125] rpm/configure.sh: Remove unnecessary directories These were introduced in change 18c6b647 to support storing Mock's cache and chroot in the workspace. Most of this was reverted in commit abc1705b. Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 32ec7c8f..d170946a 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -11,10 +11,6 @@ sed -e "s|@PWD@|$PWD|g" scripts/rpm/xenserver.cfg.in > mock/xenserver.cfg ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ -mkdir -p mock/cache -mkdir -p mock/root -chgrp mock mock/cache -chgrp mock mock/root echo " done" echo -n "Initializing repository..." From a70b1f77521b92695e52ba2894fc23f91f6d569a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 13:58:31 +0100 Subject: [PATCH 0982/1125] rpm/configure.sh: Tidy up script Signed-off-by: Euan Harris --- scripts/rpm/configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index d170946a..8ede0d6f 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -3,7 +3,8 @@ set -eu echo "Configuring RPM-based build" -rpm -q mock rpm-build createrepo python-argparse >/dev/null 2>&1 || sudo yum install -y mock rpm-build createrepo python-argparse +DEPS="mock rpm-build createrepo python-argparse" +rpm -q $DEPS >/dev/null 2>&1 || sudo yum install -y $DEPS echo -n "Writing mock configuration..." mkdir -p mock @@ -14,9 +15,8 @@ ln -fs /etc/mock/logging.ini mock/ echo " done" echo -n "Initializing repository..." -mkdir -p RPMS +mkdir -p RPMS SRPMS createrepo --quiet RPMS -mkdir -p SRPMS createrepo --quiet SRPMS echo " done" From 71f622a1d0eefd1966c2520f5703a20f20020549 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 14:04:54 +0100 Subject: [PATCH 0983/1125] rpms/upload.sh: Remove unused script Signed-off-by: Euan Harris --- scripts/rpm/upload.sh | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 scripts/rpm/upload.sh diff --git a/scripts/rpm/upload.sh b/scripts/rpm/upload.sh deleted file mode 100755 index 93fe796d..00000000 --- a/scripts/rpm/upload.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -URL=dscott@drall.uk.xensource.com:public_html/xapi/ - -rm -f RPMS/x86_64/*.log -rm -f RPMS/x86_64/*_pkgs -createrepo SRPMS -mkdir -p debug/x86_64 -mv RPMS/x86_64/*-debuginfo-*rpm debug/x86_64 -createrepo RPMS/x86_64 -createrepo debug/x86_64 -rsync -avrz --delete xapi.repo RPMS debug SRPMS $URL From 43b9d1ad3afd1f97aa08c61f22de9ef9ee612deb Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 14:07:37 +0100 Subject: [PATCH 0984/1125] deb: Remove unused ocp-ppa repository configuration Signed-off-by: Euan Harris --- scripts/deb/ocp-ppa.list | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 scripts/deb/ocp-ppa.list diff --git a/scripts/deb/ocp-ppa.list b/scripts/deb/ocp-ppa.list deleted file mode 100644 index d7f342d6..00000000 --- a/scripts/deb/ocp-ppa.list +++ /dev/null @@ -1,3 +0,0 @@ -deb http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main -deb-src http://ppa.launchpad.net/louis-gesbert/ocp/ubuntu raring main - From f424d6cdce9043e0713e7c8eb2cf944a283607e3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 14:09:51 +0100 Subject: [PATCH 0985/1125] deb: Remove unused apt-repository config files and update script Signed-off-by: Euan Harris --- scripts/deb/apt-ftparchive.conf | 27 -------------------- scripts/deb/apt-raring-release.conf | 7 ------ scripts/deb/archive.conf | 8 ------ scripts/deb/update-debian-dist.sh | 39 ----------------------------- 4 files changed, 81 deletions(-) delete mode 100644 scripts/deb/apt-ftparchive.conf delete mode 100644 scripts/deb/apt-raring-release.conf delete mode 100644 scripts/deb/archive.conf delete mode 100755 scripts/deb/update-debian-dist.sh diff --git a/scripts/deb/apt-ftparchive.conf b/scripts/deb/apt-ftparchive.conf deleted file mode 100644 index 64d3e4ce..00000000 --- a/scripts/deb/apt-ftparchive.conf +++ /dev/null @@ -1,27 +0,0 @@ -Dir { - ArchiveDir "."; - CacheDir "."; -}; - -Default { - Packages::Compress ". gzip bzip2"; - Sources::Compress "gzip bzip2"; - Contents::Compress "gzip bzip2"; -}; - -BinDirectory "dists/raring/main/binary-amd64" { - Packages "dists/raring/main/binary-amd64/Packages"; - Contents "dists/raring/Contents-amd64"; - SrcPackages "dists/raring/main/source/Sources"; -}; - -Tree "dists/raring" { - Sections "main"; - Architectures "amd64 source"; -}; - -Default { - Packages { - Extensions ".deb"; - }; -}; diff --git a/scripts/deb/apt-raring-release.conf b/scripts/deb/apt-raring-release.conf deleted file mode 100644 index 679587f8..00000000 --- a/scripts/deb/apt-raring-release.conf +++ /dev/null @@ -1,7 +0,0 @@ -APT::FTPArchive::Release::Origin "Euan Harris "; -APT::FTPArchive::Release::Label "xenserver-core"; -APT::FTPArchive::Release::Suite "experimental"; -APT::FTPArchive::Release::Codename "raring"; -APT::FTPArchive::Release::Architectures "amd64 i386 source"; -APT::FTPArchive::Release::Components "main"; -APT::FTPArchive::Release::Description "xenserver-core for Debian"; diff --git a/scripts/deb/archive.conf b/scripts/deb/archive.conf deleted file mode 100644 index b98bf9c8..00000000 --- a/scripts/deb/archive.conf +++ /dev/null @@ -1,8 +0,0 @@ -Dir { - ArchiveDir "."; -}; - -BinDirectory "dists/raring" { - Packages "dists/raring/main/binary-amd64/Packages"; - SrcPackages "dists/raring/main/source/Sources"; -}; diff --git a/scripts/deb/update-debian-dist.sh b/scripts/deb/update-debian-dist.sh deleted file mode 100755 index fb3acc53..00000000 --- a/scripts/deb/update-debian-dist.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -rm -rf dists -mkdir -p dists/raring/main/binary-amd64 -mkdir -p dists/raring/main/binary-i386 -mkdir -p dists/raring/main/source - -rsync --delete -avu SRPMS/* dists/raring/main/source -rsync --delete -avu RPMS/*.deb dists/raring/main/binary-amd64 - -cat >dists/raring/main/binary-amd64/Release <dists/raring/main/source/Release <dists/raring/main/binary-amd64/Packages -#apt-ftparchive -c apt-raring-release.conf release dists/raring/ >dists/raring/Release - - -# https://enc.com.au/2007/08/07/creating-an-apt-archive/ -apt-ftparchive generate scripts/deb/archive.conf - -echo "now run: rsync -avu --delete dists/ ~/public_html/dists/" From 41bb9dd9663d55f8f891d3ecdfdb589843812281 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 14:34:04 +0100 Subject: [PATCH 0986/1125] xenserver-core-latest-snapshot: Remove unused metapackage Signed-off-by: Euan Harris --- SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 | 29 --------- SOURCES/fusion-release-RPM-GPG-KEY-remi | 24 -------- SOURCES/fusion-release-epel-testing.repo | 26 -------- SOURCES/fusion-release-epel.repo | 26 -------- SOURCES/fusion-release-remi.repo | 30 ---------- SOURCES/fusion-release-xapi.repo | 13 ---- SOURCES/fusion-release-xen-c6-RC1.repo | 13 ---- SOURCES/fusion-release-xen-c6-tweaked.repo | 21 ------- SOURCES/fusion-release-xen-c6.repo | 13 ---- SPECS/xenserver-core-latest-snapshot.spec | 69 ---------------------- 10 files changed, 264 deletions(-) delete mode 100644 SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 delete mode 100644 SOURCES/fusion-release-RPM-GPG-KEY-remi delete mode 100644 SOURCES/fusion-release-epel-testing.repo delete mode 100644 SOURCES/fusion-release-epel.repo delete mode 100644 SOURCES/fusion-release-remi.repo delete mode 100644 SOURCES/fusion-release-xapi.repo delete mode 100644 SOURCES/fusion-release-xen-c6-RC1.repo delete mode 100644 SOURCES/fusion-release-xen-c6-tweaked.repo delete mode 100644 SOURCES/fusion-release-xen-c6.repo delete mode 100644 SPECS/xenserver-core-latest-snapshot.spec diff --git a/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 b/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 deleted file mode 100644 index 7a203048..00000000 --- a/SOURCES/fusion-release-RPM-GPG-KEY-EPEL-6 +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/SOURCES/fusion-release-RPM-GPG-KEY-remi b/SOURCES/fusion-release-RPM-GPG-KEY-remi deleted file mode 100644 index 32833860..00000000 --- a/SOURCES/fusion-release-RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/SOURCES/fusion-release-epel-testing.repo b/SOURCES/fusion-release-epel-testing.repo deleted file mode 100644 index 97703b2c..00000000 --- a/SOURCES/fusion-release-epel-testing.repo +++ /dev/null @@ -1,26 +0,0 @@ -[epel-testing] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 - -[epel-testing-debuginfo] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 - -[epel-testing-source] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 diff --git a/SOURCES/fusion-release-epel.repo b/SOURCES/fusion-release-epel.repo deleted file mode 100644 index 0160dfec..00000000 --- a/SOURCES/fusion-release-epel.repo +++ /dev/null @@ -1,26 +0,0 @@ -[epel] -name=Extra Packages for Enterprise Linux 6 - $basearch -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch -failovermethod=priority -enabled=1 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 - -[epel-debuginfo] -name=Extra Packages for Enterprise Linux 6 - $basearch - Debug -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 - -[epel-source] -name=Extra Packages for Enterprise Linux 6 - $basearch - Source -#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 diff --git a/SOURCES/fusion-release-remi.repo b/SOURCES/fusion-release-remi.repo deleted file mode 100644 index b9472d8c..00000000 --- a/SOURCES/fusion-release-remi.repo +++ /dev/null @@ -1,30 +0,0 @@ -[remi] -name=Les RPM de remi pour Enterprise Linux 6 - $basearch -#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/ -mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-test] -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch -#baseurl=http://rpms.famillecollet.com/enterprise/6/test/$basearch/ -mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-debuginfo] -name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-test-debuginfo] -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-test/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - diff --git a/SOURCES/fusion-release-xapi.repo b/SOURCES/fusion-release-xapi.repo deleted file mode 100644 index d5884493..00000000 --- a/SOURCES/fusion-release-xapi.repo +++ /dev/null @@ -1,13 +0,0 @@ -[xapi] -name=CentOS-$releasever - xenserver-core snapshot -baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/CentOS-$releasever/RPMS -gpgcheck=0 -Priority=1 -enabled=1 - -[xapi-source] -name=CentOS-$releasever - xenserver-core snapshot Source -baseurl=http://downloadns.citrix.com.edgesuite.net/akdlm/8453/xenserver-core/CentOS-$releasever/SRPMS -gpgcheck=0 -Priority=1 -enabled=0 diff --git a/SOURCES/fusion-release-xen-c6-RC1.repo b/SOURCES/fusion-release-xen-c6-RC1.repo deleted file mode 100644 index 88337c66..00000000 --- a/SOURCES/fusion-release-xen-c6-RC1.repo +++ /dev/null @@ -1,13 +0,0 @@ -[xen-c6-RC1] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 diff --git a/SOURCES/fusion-release-xen-c6-tweaked.repo b/SOURCES/fusion-release-xen-c6-tweaked.repo deleted file mode 100644 index 5f9f49d1..00000000 --- a/SOURCES/fusion-release-xen-c6-tweaked.repo +++ /dev/null @@ -1,21 +0,0 @@ -[xen-c6-tweaked] -name=CentOS-$releasever - XenServer temporary Xen override -baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 - diff --git a/SOURCES/fusion-release-xen-c6.repo b/SOURCES/fusion-release-xen-c6.repo deleted file mode 100644 index a172c2ce..00000000 --- a/SOURCES/fusion-release-xen-c6.repo +++ /dev/null @@ -1,13 +0,0 @@ -[xen-c6] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 diff --git a/SPECS/xenserver-core-latest-snapshot.spec b/SPECS/xenserver-core-latest-snapshot.spec deleted file mode 100644 index 548203b7..00000000 --- a/SPECS/xenserver-core-latest-snapshot.spec +++ /dev/null @@ -1,69 +0,0 @@ -Name: xenserver-core-latest-snapshot -Version: 0.1.0 -Release: 2%{?dist} -Summary: Yum repositories for xenserver -License: GPL -URL: http://www.xenserver.org/ -Source0: fusion-release-xapi.repo -Source1: fusion-release-xen-c6.repo -Source2: fusion-release-xen-c6-RC1.repo -Source3: fusion-release-epel.repo -Source4: fusion-release-epel-testing.repo -Source5: fusion-release-remi.repo -Source6: fusion-release-RPM-GPG-KEY-EPEL-6 -Source7: fusion-release-RPM-GPG-KEY-remi -Source8: fusion-release-xen-c6-tweaked.repo - - -%description -A virtual package which installs the xenserver yum repos. - -%prep -%setup -c -T -cp %{SOURCE0} fusion-release-xapi.repo -cp %{SOURCE1} fusion-release-xen-c6.repo -cp %{SOURCE2} fusion-release-xen-c6-RC1.repo -cp %{SOURCE3} fusion-release-epel.repo -cp %{SOURCE4} fusion-release-epel-testing.repo -cp %{SOURCE5} fusion-release-remi.repo -cp %{SOURCE6} fusion-release-RPM-GPG-KEY-EPEL-6 -cp %{SOURCE7} fusion-release-RPM-GPG-KEY-remi -cp %{SOURCE8} fusion-release-xen-c6-tweaked.repo - -%build - -%install -mkdir -p %{buildroot}/etc/yum.repos.d -install -m 0644 fusion-release-xapi.repo %{buildroot}/etc/yum.repos.d/xapi.repo -install -m 0644 fusion-release-xen-c6-tweaked.repo %{buildroot}/etc/yum.repos.d/xen-c6-tweaked.repo -#install -m 0644 fusion-release-xen-c6.repo %{buildroot}/etc/yum.repos.d/xen-c6.repo -#install -m 0644 fusion-release-xen-c6-RC1.repo %{buildroot}/etc/yum.repos.d/xen-c6-RC1.repo -install -m 0644 fusion-release-epel.repo %{buildroot}/etc/yum.repos.d/epel.repo -install -m 0644 fusion-release-epel-testing.repo %{buildroot}/etc/yum.repos.d/epel-testing.repo -install -m 0644 fusion-release-remi.repo %{buildroot}/etc/yum.repos.d/remi.repo -mkdir -p %{buildroot}/etc/pki/rpm-gpg/ -install -m 0644 fusion-release-RPM-GPG-KEY-EPEL-6 %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -install -m 0644 fusion-release-RPM-GPG-KEY-remi %{buildroot}/etc/pki/rpm-gpg/RPM-GPG-KEY-remi - - -%post -yum repolist - -%postun -yum repolist - -%files -/etc/yum.repos.d/xapi.repo -/etc/yum.repos.d/xen-c6-tweaked.repo -#/etc/yum.repos.d/xen-c6.repo -#/etc/yum.repos.d/xen-c6-RC1.repo -/etc/yum.repos.d/epel.repo -/etc/yum.repos.d/epel-testing.repo -/etc/yum.repos.d/remi.repo -/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -/etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -%changelog -* Sun Jun 9 2013 David Scott - 0.1.0-2 -- Initial package - From f2dd79039610c9b6bc3a1e1ef4b137bce18449f3 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 19 Aug 2014 14:51:02 +0100 Subject: [PATCH 0987/1125] Fix specfile typo --- SPECS/xen-missing-headers.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xen-missing-headers.spec b/SPECS/xen-missing-headers.spec index 740555ef..284503c2 100644 --- a/SPECS/xen-missing-headers.spec +++ b/SPECS/xen-missing-headers.spec @@ -1,6 +1,6 @@ Name: xen-missing-headers Version: 4.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Headers missing from the ARM xen-4.4 package License: GPL Group: Development/Libraries @@ -11,7 +11,7 @@ Source0: xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h Headers missing from the ARM xen-4.4 package. %prep -cp ${SOURCE0} save.h +cp %{SOURCE0} save.h %build touch save.h @@ -24,6 +24,9 @@ cp save.h %{buildroot}/usr/include/xen/arch-arm/hvm/save.h /usr/include/xen/arch-arm/hvm/save.h %changelog +* Tue Aug 18 2014 Bob Ball - 4.4-4 +- Fix spec file typo + * Thu May 15 2014 David Scott - 4.4-3 - Initial package From 94df2507c7a70237f06ff7d94aa8d32d6ef51a3f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:03:24 +0100 Subject: [PATCH 0988/1125] Add an ignore file for Linaro/trusty: don't build OASIS or Mirage Signed-off-by: David Scott --- ignore.Linaro.trusty | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ignore.Linaro.trusty diff --git a/ignore.Linaro.trusty b/ignore.Linaro.trusty new file mode 100644 index 00000000..3c784180 --- /dev/null +++ b/ignore.Linaro.trusty @@ -0,0 +1,11 @@ +oasis +ocaml-odn +ocamlify +ocamlmod +libnl3 +mirage-testvm +ocaml-mirage-block-xen +ocaml-mirage-clock-xen +ocaml-mirage-console-xen +ocaml-mirage-xen +ocaml-mirage From 8c57729423d65dcca4ac5b6d0d527672a5703e24 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:04:18 +0100 Subject: [PATCH 0989/1125] ocaml-evtchn: we need the xen-missing-headers Otherwise we fail to build the unix.activations subpackage, which will be needed by other tools. Signed-off-by: David Scott --- SPECS/ocaml-evtchn.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index 4daafd53..a37770f8 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -2,7 +2,7 @@ Name: ocaml-evtchn Version: 1.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml bindings for userspace Xen event channel controls License: ISC URL: https://github.com/mirage/ocaml-evtchn/ @@ -16,6 +16,7 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: xen-devel +BuildRequires: xen-missing-headers %description These APIs allow programs running in userspace to signal other domains @@ -60,6 +61,9 @@ make install %{_libdir}/ocaml/xen-evtchn/*.mli %changelog +* Tue Aug 19 2014 David Scott - 1.0.5-2 +- Add dependency on xen-missing-headers + * Wed Jul 16 2014 David Scott - 1.0.5-1 - Update to 1.0.5 From cc48dc425cc4bf2d9e1759e5c96d06fd7f452523 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:05:18 +0100 Subject: [PATCH 0990/1125] pbuilder: add universe, because cowdancer on armhf has migrated there (!) Signed-off-by: David Scott --- scripts/deb/templates/pbuilderrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index e0c36fb2..0e11bff2 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -1,5 +1,5 @@ MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ +OTHERMIRROR="deb @MIRROR@ trusty restricted universe | deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From 9245f3d38f965dc29db37ae0ea999728f4b56d0f Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:06:24 +0100 Subject: [PATCH 0991/1125] debian: the reported arch could be armhf or maybe armv7l In both cases this should be "any" rather than "all" (where "any" is like '_a i.e. a monomorphic variable which gets unified later) Signed-off-by: David Scott --- scripts/lib/debiancontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/debiancontrol.py b/scripts/lib/debiancontrol.py index 602db8e7..ea40baf2 100644 --- a/scripts/lib/debiancontrol.py +++ b/scripts/lib/debiancontrol.py @@ -41,7 +41,7 @@ def source_deb_from_spec(spec, tree): def binary_deb_from_spec(spec, tree): res = "" res += "Package: %s\n" % mappkgname.map_package_name(spec.header) - if spec.header['arch'] in ["x86_64", "i686", "armhf"]: + if spec.header['arch'] in ["x86_64", "i686", "armhf", "armv7l"]: res += "Architecture: any\n" else: res += "Architecture: all\n" From aa30de97ccbc9410e4ffd672c695ac0aeaa5489e Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:08:14 +0100 Subject: [PATCH 0992/1125] mappkgname: treat Linaro the same as Ubuntu Signed-off-by: David Scott --- scripts/lib/mappkgname.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 92b2b0a5..15dcbe39 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -15,6 +15,9 @@ 'ubuntu:14.04': { "xen-libs": ["libxen-4.4"], }, + 'linaro:14.04': { + "xen-libs": ["libxen-4.4"], + }, } MAPPING = { From a2f5340a3095dbf7be2652b4747a6a129b6feb7a Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:09:11 +0100 Subject: [PATCH 0993/1125] xcp-idl: update to 0.9.18 This is needed by the newer xenopsd. Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index c88c6c1c..377eaff6 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.17 +Version: 0.9.18 Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL @@ -19,6 +19,7 @@ BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-xmlm-devel BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-sexplib-devel %description Common interface definitions for XCP services. @@ -33,6 +34,7 @@ Requires: ocaml-cohttp-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-fd-send-recv-devel%{?_isa} Requires: ocaml-xmlm-devel%{?_isa} +Requires: ocaml-sexplib-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for @@ -69,6 +71,9 @@ make install %{_libdir}/ocaml/xcp/*.mli %changelog +* Wed Aug 20 2014 Jon Ludlam - 0.9.18-1 +- Update to 0.9.18 + * Fri Jun 06 2014 Jon Ludlam - 0.9.17-1 - Update to 0.9.17 From 2c1496f7a5be7cf407444107c1be6a0a80fbd8a9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:09:45 +0100 Subject: [PATCH 0994/1125] Update to xenopsd 0.9.39, with libxl support Signed-off-by: David Scott --- SPECS/xenopsd.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index d4737f3f..3db33957 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.37 +Version: 0.9.39 Release: 1%{?dist} Summary: Simple VM manager License: LGPL @@ -99,7 +99,6 @@ install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real -install -D scripts/vif-xl %{buildroot}/%{_libexecdir}/%{name}/vif-xl install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules @@ -123,7 +122,6 @@ install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf %doc README.md LICENSE %{_libexecdir}/%{name}/vif %{_libexecdir}/%{name}/vif-real -%{_libexecdir}/%{name}/vif-xl %{_libexecdir}/%{name}/qemu-dm-wrapper %{_libexecdir}/%{name}/qemu-vif-script %{_libexecdir}/%{name}/setup-vif-rules @@ -188,6 +186,12 @@ fi #fi %changelog +* Wed Aug 20 2014 Jon Ludlam - 0.9.39-1 +- Update to 0.9.39 which compiles without warnings + +* Tue Aug 19 2014 David Scott - 0.9.38-1 +- Update to 0.9.38 with better libxl support + * Sat Jun 21 2014 David Scott - 0.9.37-1 - Depend on the ocaml-xen-lowlevel-libs-runtime package - Don't include xenguest: this now comes from ocaml-xen-lowlevel-libs From a794a54bfa3dfec44d3b4cf7328442055f1b07ae Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 20 Aug 2014 22:29:27 +0100 Subject: [PATCH 0995/1125] xenserver-core: depend on xenopsd-xenlight Signed-off-by: David Scott --- SPECS/xenserver-core.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index 3db35936..b99caa2a 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A virtual package which installs the xapi toolstack License: LGPL URL: http://www.xenserver.org/ @@ -13,6 +13,7 @@ Requires: xe-create-templates Requires: xenopsd-libvirt Requires: xenopsd-simulator Requires: xenopsd-xc +Requires: xenopsd-xenlight Requires: xenops-cli Requires: ffs Requires: sm-cli @@ -42,6 +43,9 @@ install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README /usr/share/doc/xenserver/README %changelog +* Wed Aug 20 2014 David Scott - 0.10.0-2 +- Add dependency on xenopsd-xenlight + * Fri Nov 1 2013 Euan Harris - 0.10.0-1 - Bump version to 0.10.0 From 6c3dfc3031f67754c04400d156992090361a22f4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 00:13:53 +0100 Subject: [PATCH 0996/1125] ocaml-xen-lowlevel-libs: update to 0.9.21, package xenlight Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 33 ++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 34a54242..fb1f75df 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.18 +Version: 0.9.21 Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL @@ -42,7 +42,7 @@ at runtime when executing programs that use %{name}. %build make configure -./configure --disable-xenlight +./configure make %install @@ -62,30 +62,33 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner -#%{_libdir}/ocaml/xenlight -#%exclude %{_libdir}/ocaml/xenlight/*.a -#%exclude %{_libdir}/ocaml/xenlight/*.cmxa -#%exclude %{_libdir}/ocaml/xenlight/*.cmx -#%exclude %{_libdir}/ocaml/xenlight/*.mli -#%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so -#%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner -#%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so -#%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +%{_libdir}/ocaml/xenlight +%exclude %{_libdir}/ocaml/xenlight/*.a +%exclude %{_libdir}/ocaml/xenlight/*.cmxa +%exclude %{_libdir}/ocaml/xenlight/*.cmx +%exclude %{_libdir}/ocaml/xenlight/*.mli +%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so +%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so +%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner %files devel %{_libdir}/ocaml/xenctrl/*.a %{_libdir}/ocaml/xenctrl/*.cmxa %{_libdir}/ocaml/xenctrl/*.cmx %{_libdir}/ocaml/xenctrl/*.mli -#%{_libdir}/ocaml/xenlight/*.a -#%{_libdir}/ocaml/xenlight/*.cmxa -#%{_libdir}/ocaml/xenlight/*.cmx -#%{_libdir}/ocaml/xenlight/*.mli +%{_libdir}/ocaml/xenlight/*.a +%{_libdir}/ocaml/xenlight/*.cmxa +%{_libdir}/ocaml/xenlight/*.cmx +%{_libdir}/ocaml/xenlight/*.mli %files runtime %{_libexecdir}/xenopsd/xenguest %changelog +* Wed Aug 20 2014 David Scott - 0.9.21-1 +- Update to 0.9.21, re-activate xenlight + * Sat Jun 21 2014 David Scott - 0.9.18-1 - Update to 0.9.18 From 98125cc44945d67934e363f4dfcc03ca8773cd1f Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 00:14:23 +0100 Subject: [PATCH 0997/1125] xenopsd: create xenopsd-xenlight subpackage Signed-off-by: David Scott --- SPECS/xenopsd.spec | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 3db33957..925fa418 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.39 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -68,12 +68,12 @@ Requires: %{name} = %{version}-%{release} %description simulator A synthetic VM manager for testing. -#%package xenlight -#Summary: Xenopsd using libxenlight -#Group: Development/Other -#Requires: %{name} = %{version}-%{release} -#%description xenlight -#Simple VM manager for Xen using libxenlight +%package xenlight +Summary: Xenopsd using libxenlight +Group: Development/Other +Requires: %{name} = %{version}-%{release} +%description xenlight +Simple VM manager for Xen using libxenlight %prep %setup -q @@ -95,7 +95,7 @@ mkdir -p %{buildroot}/%{_sbindir} install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc -#install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight +install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real @@ -109,7 +109,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator -#install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight +install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight mkdir -p %{buildroot}/etc/xapi chmod 755 make-xsc-xenopsd.conf @@ -171,21 +171,24 @@ if [ $1 -eq 0 ]; then /sbin/chkconfig --del xenopsd-simulator fi -#%files xenlight -#%defattr(-,root,root) -#%{_sbindir}/xenopsd-xenlight -#%{_sysconfdir}/init.d/xenopsd-xenlight +%files xenlight +%defattr(-,root,root) +%{_sbindir}/xenopsd-xenlight +%{_sysconfdir}/init.d/xenopsd-xenlight -#%post xenlight -#/sbin/chkconfig --add xenopsd-xenlight +%post xenlight +/sbin/chkconfig --add xenopsd-xenlight -#%preun xenlight -#if [ $1 -eq 0 ]; then -# /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 -# /sbin/chkconfig --del xenopsd-xenlight -#fi +%preun xenlight +if [ $1 -eq 0 ]; then + /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 + /sbin/chkconfig --del xenopsd-xenlight +fi %changelog +* Wed Aug 20 2014 David Scott - 0.9.39-2 +- Package xenopsd-xenlight + * Wed Aug 20 2014 Jon Ludlam - 0.9.39-1 - Update to 0.9.39 which compiles without warnings From 2dc1669a05c2a2d0ca39cef768e2a48d106d075e Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 00:14:47 +0100 Subject: [PATCH 0998/1125] xapi: switch to xenopsd-xenlight by default Signed-off-by: David Scott --- SOURCES/xen-api-xapi-conf.in | 4 ++-- SPECS/xapi.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index 93c9e8f0..0d8fae70 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -4,10 +4,10 @@ # Global policy: ################################################# # The full list of xenopsd instances to manage. These must all be running. -xenopsd-queues = org.xen.xcp.xenops.classic +xenopsd-queues = org.xen.xcp.xenops.xenlight # The default xenopsd to use for VMs, unless a per-VM override is specified -xenopsd-default = org.xen.xcp.xenops.classic +xenopsd-default = org.xen.xcp.xenops.xenlight # Configure the logging policy: # logconfig = @ETCDIR@/log.conf diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 0ba7de32..d702a5bd 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.52 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz @@ -163,6 +163,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Thu Aug 21 2014 David Scott - 1.9.52-2 +- switch to xenlight xenopsd by default + * Tue Jul 29 2014 Jon Ludlam - 1.9.52-1 - update 1.9.52 From deb37c8ac549031f784d14bfa4d93e323063103d Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 00:15:06 +0100 Subject: [PATCH 0999/1125] xenserver-install-wizard: Update to 0.9.36 which starts xenopsd-xenlight Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index a4460d99..9c26beca 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.35 +Version: 0.2.36 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard @@ -31,6 +31,9 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog +* Thu Aug 21 2014 David Scott - 0.2.36-1 +- Update to 0.2.36 + * Thu Jun 19 2014 David Scott - 0.2.35-1 - Update to 0.2.35 From cb099eed185e9f3aef93f360a8596630269f9b42 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 09:11:04 +0100 Subject: [PATCH 1000/1125] xenopsd: adapt to new converged hotplug scripts Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 4 +++- SPECS/xenopsd.spec | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index edb64d4b..5d7098e3 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -18,8 +18,10 @@ qemu-dm-wrapper=${LIBEXECDIR}/qemu-dm-wrapper qemu-vif-script=${SCRIPTSDIR}/qemu-vif-script setup-vif-rules=${LIBEXECDIR}/setup-vif-rules sockets-group=$group +block-script=${SCRIPTSDIR}/block +block-xl-script=${SCRIPTSDIR}/block vif-script=${SCRIPTSDIR}/vif -vif-xl-script=${SCRIPTSDIR}/vif-xl +vif-xl-script=${SCRIPTSDIR}/vif xenguest=${LIBEXECDIR}/xenguest disable-logging-for=http diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 925fa418..56b7684b 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.39 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -99,6 +99,7 @@ install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real +install -D scripts/block %{buildroot}/%{_libexecdir}/%{name}/block install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules @@ -122,6 +123,7 @@ install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf %doc README.md LICENSE %{_libexecdir}/%{name}/vif %{_libexecdir}/%{name}/vif-real +%{_libexecdir}/%{name}/block %{_libexecdir}/%{name}/qemu-dm-wrapper %{_libexecdir}/%{name}/qemu-vif-script %{_libexecdir}/%{name}/setup-vif-rules @@ -186,6 +188,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Aug 21 2014 David Scott - 0.9.39-2 +- Include {vbd,vif}-xl in the package + * Wed Aug 20 2014 David Scott - 0.9.39-2 - Package xenopsd-xenlight From 3cb6d603aa4e87b100a3ff0c43587793c90523f9 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 22:04:16 +0000 Subject: [PATCH 1001/1125] xapi: new stunnel doesn't accept the 'compression=' argument It's not clear whether burning dom0 CPU on compression to reduce network bandwidth is really a good tradeoff. Signed-off-by: David Scott --- SOURCES/xen-api-xapissl | 1 - 1 file changed, 1 deletion(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index 9a8e64d3..498f93bd 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -52,7 +52,6 @@ socket = r:TCP_NODELAY=1 socket = a:TCP_NODELAY=1 socket = l:TCP_NODELAY=1 socket = r:SO_KEEPALIVE=1 -compression = zlib [xapi] accept = ${ACCEPT} From 7245a455ab16f16f0a4471e18c78bc06993d223e Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 22:05:48 +0000 Subject: [PATCH 1002/1125] xapi: listen on port 443 The $ACCEPT (=$2) argument will be IPv6 if the host has any kind of IPv6 enabled, even if we're not using it. Signed-off-by: David Scott --- SOURCES/xen-api-xapissl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl index 498f93bd..d6bca616 100755 --- a/SOURCES/xen-api-xapissl +++ b/SOURCES/xen-api-xapissl @@ -54,7 +54,7 @@ socket = l:TCP_NODELAY=1 socket = r:SO_KEEPALIVE=1 [xapi] -accept = ${ACCEPT} +accept = 443 connect = 80 cert = ${PEMFILE} ciphers = !SSLv2:RSA+AES256-SHA:RSA+AES128-SHA:RSA+RC4-SHA:RSA+RC4-MD5:RSA+DES-CBC3-SHA From e67fda7c07bba9b8e959f60ab7f5032997ef95b5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 21 Aug 2014 23:26:32 +0000 Subject: [PATCH 1003/1125] xenopsd: add a vncterm-wrapper to work around the hardcoded keymaps path The wrapper will search around for the keymaps and make a symlink so that they matches where vncterm thinks they should be. Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 2 +- SOURCES/xenopsd-vncterm-wrapper | 36 +++++++++++++++++++++++++++++++++ SPECS/xenopsd.spec | 9 ++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100755 SOURCES/xenopsd-vncterm-wrapper diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index 5d7098e3..b860a6d5 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -10,7 +10,7 @@ cat < - 0.9.39-4 +- Add a vncterm-wrapper: needed to locate the qemu keymaps + * Thu Aug 21 2014 David Scott - 0.9.39-2 - Include {vbd,vif}-xl in the package From 5de5a20cc8cb46868ff0837e9845ad26b93ed456 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 22 Aug 2014 10:58:52 +0000 Subject: [PATCH 1004/1125] xenopsd: the keys in the config file are 'vbd-' not 'block-' Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index b860a6d5..c6e3a23f 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -18,8 +18,8 @@ qemu-dm-wrapper=${LIBEXECDIR}/qemu-dm-wrapper qemu-vif-script=${SCRIPTSDIR}/qemu-vif-script setup-vif-rules=${LIBEXECDIR}/setup-vif-rules sockets-group=$group -block-script=${SCRIPTSDIR}/block -block-xl-script=${SCRIPTSDIR}/block +vbd-script=${SCRIPTSDIR}/block +vbd-xl-script=${SCRIPTSDIR}/block vif-script=${SCRIPTSDIR}/vif vif-xl-script=${SCRIPTSDIR}/vif xenguest=${LIBEXECDIR}/xenguest From d222c29fe91a04a47b17cd59257a44caab011f8e Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 22 Aug 2014 10:59:10 +0000 Subject: [PATCH 1005/1125] xenopsd: work around lack of vncterm user and groups On Ubuntu, the post-install actions don't seem to work and the necessary groups don't exist. We check for them on every invocation in a wrapper script. Signed-off-by: David Scott --- SOURCES/xenopsd-vncterm-wrapper | 7 +++++++ SPECS/xenopsd.spec | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SOURCES/xenopsd-vncterm-wrapper b/SOURCES/xenopsd-vncterm-wrapper index 61c721d3..25282ef3 100755 --- a/SOURCES/xenopsd-vncterm-wrapper +++ b/SOURCES/xenopsd-vncterm-wrapper @@ -12,6 +12,13 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. +# this is a horrible hack: the vncterm deb fails to set the user and +# group properly: +getent group vncterm >/dev/null || groupadd -r vncterm +getent group vncterm_base >/dev/null || groupadd -r vncterm_base +getent passwd vncterm >/dev/null || useradd -r -g vncterm -d /none -s /sbin/nologin -c 'for vncterm' vncterm +getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s /sbin/nologin -c 'for vncterm' vncterm_base + # vncterm is like a qemu parasite, using it's keymap files. The exact # location of qemu keymap files depends on the distro, while the vncterm # source code hard-codes /usr/share/xen/qemu diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 051979fd..d325f572 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.39 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -192,6 +192,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Aug 22 2014 David Scott - 0.9.39-5 +- vncterm-wrapper: ensure the groups are added on startup. + * Fri Aug 22 2014 David Scott - 0.9.39-4 - Add a vncterm-wrapper: needed to locate the qemu keymaps From 255685b59754b7909b16281fe8ab44fe48aa8d3a Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 22 Aug 2014 12:17:46 +0000 Subject: [PATCH 1006/1125] xenopsd: update to 0.9.41 Signed-off-by: David Scott --- SPECS/xenopsd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index d325f572..b2b32832 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.39 -Release: 5%{?dist} +Version: 0.9.41 +Release: 1%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -192,6 +192,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Fri Aug 22 2014 David Scott - 0.9.41-1 +- Update to 0.9.41: now pygrub, eliloader, hvmloader and vncterm + are optional + * Fri Aug 22 2014 David Scott - 0.9.39-5 - vncterm-wrapper: ensure the groups are added on startup. From 9bd0c0347a5f21f999ab0191402e1be68e02cbaa Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 22 Aug 2014 12:47:55 +0000 Subject: [PATCH 1007/1125] xenopsd: update init.d scripts using new cmdliner syntax Signed-off-by: David Scott --- SOURCES/xenopsd-libvirt-init | 2 +- SOURCES/xenopsd-simulator-init | 2 +- SOURCES/xenopsd-xc-init | 2 +- SOURCES/xenopsd-xenlight-init | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init index f753257d..38bcf661 100755 --- a/SOURCES/xenopsd-libvirt-init +++ b/SOURCES/xenopsd-libvirt-init @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-libvirt: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_LIBVIRT_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_LIBVIRT_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init index 257a9892..1f3597bc 100755 --- a/SOURCES/xenopsd-simulator-init +++ b/SOURCES/xenopsd-simulator-init @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-simulator: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_SIMULATOR_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_SIMULATOR_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init index 3a787eef..6d9b1a5c 100755 --- a/SOURCES/xenopsd-xc-init +++ b/SOURCES/xenopsd-xc-init @@ -49,7 +49,7 @@ start() { modprobe blktap 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blktap: vhd-based disks will not work" modprobe blkback 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blkback: virtual disks will not work" echo -n $"Starting xenopsd-xc: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XC_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_XC_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init index 0acdaff3..313aeafd 100755 --- a/SOURCES/xenopsd-xenlight-init +++ b/SOURCES/xenopsd-xenlight-init @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xenopsd-xenlight: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -config /etc/xenopsd.conf -daemon true $XENOPSD_XENLIGHT_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_XENLIGHT_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From 20c9e2b0884df1c9e68307b72eca88b64f85c36b Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 22 Aug 2014 13:25:24 +0000 Subject: [PATCH 1008/1125] xcp-idl: ChangeLog -> CHANGES Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 377eaff6..0013165d 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -54,7 +54,7 @@ export OCAMLFIND_LDCONF=ignore make install %files -%doc ChangeLog +%doc CHANGES %doc LICENSE %doc MAINTAINERS %doc README.md From 4de8d0556ea7d5e2a164c7fa6da54b44286e6c9d Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 23 Aug 2014 18:42:31 +0000 Subject: [PATCH 1009/1125] ocaml-xen-lowlevel-libs: bump to 0.9.22 Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 1 + SPECS/ocaml-xen-lowlevel-libs.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 0013165d..0ea752d4 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -27,6 +27,7 @@ Common interface definitions for XCP services. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +Requires: ocaml-cmdliner-devel%{?_isa} Requires: message-switch-devel%{?_isa} Requires: ocaml-uri-devel%{?_isa} Requires: ocaml-re-devel%{?_isa} diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index fb1f75df..ec6aa28e 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.21 +Version: 0.9.22 Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL @@ -86,6 +86,9 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libexecdir}/xenopsd/xenguest %changelog +* Sat Aug 22 2014 David Scott - 0.9.22-1 +- Update to 0.9.22, only build xenlight on xen-4.4 and xen-4.5 + * Wed Aug 20 2014 David Scott - 0.9.21-1 - Update to 0.9.21, re-activate xenlight From 5bdf5bf67708fcd74bccc4eee4232a7b5aa43df2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 24 Aug 2014 02:08:40 +0000 Subject: [PATCH 1010/1125] Build xenlight if dist is not set to 'el6' CentOS Xen is still 4.2 which is too old for libxl. Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 13 +++++++++++-- SPECS/xenopsd.spec | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index ec6aa28e..1565a655 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-lowlevel-libs -Version: 0.9.22 +Version: 0.9.25 Release: 1%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL @@ -41,7 +41,6 @@ at runtime when executing programs that use %{name}. %setup -q %build -make configure ./configure make @@ -62,6 +61,7 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner +%if "%{dist}" != ".el6" %{_libdir}/ocaml/xenlight %exclude %{_libdir}/ocaml/xenlight/*.a %exclude %{_libdir}/ocaml/xenlight/*.cmxa @@ -71,21 +71,30 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner +%endif %files devel %{_libdir}/ocaml/xenctrl/*.a %{_libdir}/ocaml/xenctrl/*.cmxa %{_libdir}/ocaml/xenctrl/*.cmx %{_libdir}/ocaml/xenctrl/*.mli +%if "%{dist}" != ".el6" %{_libdir}/ocaml/xenlight/*.a %{_libdir}/ocaml/xenlight/*.cmxa %{_libdir}/ocaml/xenlight/*.cmx %{_libdir}/ocaml/xenlight/*.mli +%endif %files runtime %{_libexecdir}/xenopsd/xenguest %changelog +* Sun Aug 23 2014 David Scott - 0.9.25-1 +- Update to 0.9.25 + +* Sun Aug 23 2014 David Scott - 0.9.23-1 +- Update to 0.9.23, improved configure script + * Sat Aug 22 2014 David Scott - 0.9.22-1 - Update to 0.9.22, only build xenlight on xen-4.4 and xen-4.5 diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index b2b32832..feec4e3a 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.41 +Version: 0.9.43 Release: 1%{?dist} Summary: Simple VM manager License: LGPL @@ -14,6 +14,7 @@ Source6: xenopsd-network-conf Source7: xenopsd-vncterm-wrapper BuildRequires: ocaml BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel @@ -69,12 +70,14 @@ Requires: %{name} = %{version}-%{release} %description simulator A synthetic VM manager for testing. +%if "%{dist}" != ".el6" %package xenlight Summary: Xenopsd using libxenlight Group: Development/Other Requires: %{name} = %{version}-%{release} %description xenlight Simple VM manager for Xen using libxenlight +%endif %prep %setup -q @@ -87,7 +90,6 @@ cp %{SOURCE6} xenopsd-network-conf cp %{SOURCE7} xenopsd-vncterm-wrapper %build -make configure ./configure --libexecdir %{_libexecdir}/%{name} make @@ -97,7 +99,10 @@ mkdir -p %{buildroot}/%{_sbindir} install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc +%if "%{dist}" != ".el6" install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight +install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight +%endif mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real @@ -113,7 +118,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator -install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight mkdir -p %{buildroot}/etc/xapi chmod 755 make-xsc-xenopsd.conf @@ -177,6 +181,7 @@ if [ $1 -eq 0 ]; then /sbin/chkconfig --del xenopsd-simulator fi +%if "%{dist}" != ".el6" %files xenlight %defattr(-,root,root) %{_sbindir}/xenopsd-xenlight @@ -190,8 +195,12 @@ if [ $1 -eq 0 ]; then /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 /sbin/chkconfig --del xenopsd-xenlight fi +%endif %changelog +* Sun Aug 24 2014 David Scott - 0.9.43-1 +- Update to 0.9.43 which supports OCaml 4.01.0 + * Fri Aug 22 2014 David Scott - 0.9.41-1 - Update to 0.9.41: now pygrub, eliloader, hvmloader and vncterm are optional From 92ab71c17db7446ce4cb87d91cbec49d61658c6a Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 24 Aug 2014 20:37:04 +0000 Subject: [PATCH 1011/1125] xenopsd: make sure to create the init.d directory Signed-off-by: David Scott --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index feec4e3a..76b45859 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -101,7 +101,7 @@ install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc %if "%{dist}" != ".el6" install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight -install -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight +install -D -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight %endif mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif From 97d5eaed1be634a5737ecab827415b47e6a105a7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 27 Aug 2014 13:46:11 +0000 Subject: [PATCH 1012/1125] Xen 4.4 CentOS v2 Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 10 ++++------ SPECS/xenopsd.spec | 11 ++++------- .../rpm/{xen-c6-tweaked.repo => centos-xen-4-4.repo} | 6 +++--- scripts/rpm/install.sh | 2 +- scripts/rpm/xenserver.cfg.in | 6 +++--- 5 files changed, 15 insertions(+), 20 deletions(-) rename scripts/rpm/{xen-c6-tweaked.repo => centos-xen-4-4.repo} (69%) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 1565a655..37995f48 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.25 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs @@ -60,8 +60,6 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %exclude %{_libdir}/ocaml/xenctrl/*.mli %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so %{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner - -%if "%{dist}" != ".el6" %{_libdir}/ocaml/xenlight %exclude %{_libdir}/ocaml/xenlight/*.a %exclude %{_libdir}/ocaml/xenlight/*.cmxa @@ -71,24 +69,24 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so %{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner -%endif %files devel %{_libdir}/ocaml/xenctrl/*.a %{_libdir}/ocaml/xenctrl/*.cmxa %{_libdir}/ocaml/xenctrl/*.cmx %{_libdir}/ocaml/xenctrl/*.mli -%if "%{dist}" != ".el6" %{_libdir}/ocaml/xenlight/*.a %{_libdir}/ocaml/xenlight/*.cmxa %{_libdir}/ocaml/xenlight/*.cmx %{_libdir}/ocaml/xenlight/*.mli -%endif %files runtime %{_libexecdir}/xenopsd/xenguest %changelog +* Tue Sep 2 2014 Jon Ludlam - 0.9.25-2 +- Reinstate xenlight in CentOS + * Sun Aug 23 2014 David Scott - 0.9.25-1 - Update to 0.9.25 diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 76b45859..8b3efa3c 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.43 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -70,14 +70,12 @@ Requires: %{name} = %{version}-%{release} %description simulator A synthetic VM manager for testing. -%if "%{dist}" != ".el6" %package xenlight Summary: Xenopsd using libxenlight Group: Development/Other Requires: %{name} = %{version}-%{release} %description xenlight Simple VM manager for Xen using libxenlight -%endif %prep %setup -q @@ -99,10 +97,8 @@ mkdir -p %{buildroot}/%{_sbindir} install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc -%if "%{dist}" != ".el6" install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight install -D -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight -%endif mkdir -p %{buildroot}/%{_libexecdir}/%{name} install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real @@ -181,7 +177,6 @@ if [ $1 -eq 0 ]; then /sbin/chkconfig --del xenopsd-simulator fi -%if "%{dist}" != ".el6" %files xenlight %defattr(-,root,root) %{_sbindir}/xenopsd-xenlight @@ -195,9 +190,11 @@ if [ $1 -eq 0 ]; then /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 /sbin/chkconfig --del xenopsd-xenlight fi -%endif %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.43-2 +- Reinstate xenlight package in CentOS + * Sun Aug 24 2014 David Scott - 0.9.43-1 - Update to 0.9.43 which supports OCaml 4.01.0 diff --git a/scripts/rpm/xen-c6-tweaked.repo b/scripts/rpm/centos-xen-4-4.repo similarity index 69% rename from scripts/rpm/xen-c6-tweaked.repo rename to scripts/rpm/centos-xen-4-4.repo index 5f9f49d1..afd152ac 100644 --- a/scripts/rpm/xen-c6-tweaked.repo +++ b/scripts/rpm/centos-xen-4-4.repo @@ -1,6 +1,6 @@ -[xen-c6-tweaked] -name=CentOS-$releasever - XenServer temporary Xen override -baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ +[centos-xen-4-4] +name=CentOS-$releasever - snapshot of Xen 4.4 +baseurl=http://xenbits.xen.org/djs/centos-xen-4-4/ gpgcheck=0 Priority=1 enabled=1 diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index a5ae8fea..3f3335e5 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -13,7 +13,7 @@ install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo #install -m 0644 scripts/rpm/xen-c6.repo /etc/yum.repos.d/xen-c6.repo #install -m 0644 scripts/rpm/xen-c6-RC1.repo /etc/yum.repos.d/xen-c6-RC1.repo -install -m 0644 scripts/rpm/xen-c6-tweaked.repo /etc/yum.repos.d/xen-c6-tweaked.repo +install -m 0644 scripts/rpm/centos-xen-4-4.repo /etc/yum.repos.d/centos-xen-4-4.repo install -m 0644 scripts/rpm/epel.repo /etc/yum.repos.d/epel.repo install -m 0644 scripts/rpm/epel-testing.repo /etc/yum.repos.d/epel-testing.repo diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in index 06ff7558..92c37534 100644 --- a/scripts/rpm/xenserver.cfg.in +++ b/scripts/rpm/xenserver.cfg.in @@ -63,9 +63,9 @@ gpgcheck=0 Priority=1 enabled=1 -[xen-c6-tweaked] -name=CentOS-$releasever - XenServer temporary Xen override -baseurl=http://xenbits.xen.org/djs/xen-c6-tweaked/RPMS/ +[centos-xen-4-4] +name=CentOS-$releasever - snapshot of Xen 4.4 +baseurl=http://xenbits.xen.org/djs/centos-xen-4-4/ gpgcheck=0 Priority=1 enabled=1 From e09c496e96328acca13fb99e0562a96fe48abfad Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 27 Aug 2014 13:49:15 +0000 Subject: [PATCH 1013/1125] Incorporate jonludlam's cleanups Signed-off-by: David Scott --- scripts/rpm/RPM-GPG-KEY-remi | 24 ------------------------ scripts/rpm/epel-testing.repo | 26 -------------------------- scripts/rpm/install.sh | 5 ----- scripts/rpm/remi.repo | 30 ------------------------------ scripts/rpm/xen-c6-RC1.repo | 13 ------------- scripts/rpm/xenserver.cfg.in | 25 ------------------------- 6 files changed, 123 deletions(-) delete mode 100644 scripts/rpm/RPM-GPG-KEY-remi delete mode 100644 scripts/rpm/epel-testing.repo delete mode 100644 scripts/rpm/remi.repo delete mode 100644 scripts/rpm/xen-c6-RC1.repo diff --git a/scripts/rpm/RPM-GPG-KEY-remi b/scripts/rpm/RPM-GPG-KEY-remi deleted file mode 100644 index 32833860..00000000 --- a/scripts/rpm/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/scripts/rpm/epel-testing.repo b/scripts/rpm/epel-testing.repo deleted file mode 100644 index 97703b2c..00000000 --- a/scripts/rpm/epel-testing.repo +++ /dev/null @@ -1,26 +0,0 @@ -[epel-testing] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 - -[epel-testing-debuginfo] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 - -[epel-testing-source] -name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source -#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh index 3f3335e5..b0e654bc 100755 --- a/scripts/rpm/install.sh +++ b/scripts/rpm/install.sh @@ -11,16 +11,11 @@ sed \ scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo -#install -m 0644 scripts/rpm/xen-c6.repo /etc/yum.repos.d/xen-c6.repo -#install -m 0644 scripts/rpm/xen-c6-RC1.repo /etc/yum.repos.d/xen-c6-RC1.repo install -m 0644 scripts/rpm/centos-xen-4-4.repo /etc/yum.repos.d/centos-xen-4-4.repo install -m 0644 scripts/rpm/epel.repo /etc/yum.repos.d/epel.repo -install -m 0644 scripts/rpm/epel-testing.repo /etc/yum.repos.d/epel-testing.repo -install -m 0644 scripts/rpm/remi.repo /etc/yum.repos.d/remi.repo install -m 0644 scripts/rpm/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -install -m 0644 scripts/rpm/RPM-GPG-KEY-remi /etc/pki/rpm-gpg/RPM-GPG-KEY-remi yum repolist yum install -y xenserver-core diff --git a/scripts/rpm/remi.repo b/scripts/rpm/remi.repo deleted file mode 100644 index b9472d8c..00000000 --- a/scripts/rpm/remi.repo +++ /dev/null @@ -1,30 +0,0 @@ -[remi] -name=Les RPM de remi pour Enterprise Linux 6 - $basearch -#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/ -mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-test] -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch -#baseurl=http://rpms.famillecollet.com/enterprise/6/test/$basearch/ -mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-debuginfo] -name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - -[remi-test-debuginfo] -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-test/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi - diff --git a/scripts/rpm/xen-c6-RC1.repo b/scripts/rpm/xen-c6-RC1.repo deleted file mode 100644 index 88337c66..00000000 --- a/scripts/rpm/xen-c6-RC1.repo +++ /dev/null @@ -1,13 +0,0 @@ -[xen-c6-RC1] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6-RC1/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/xenserver.cfg.in index 92c37534..97948d94 100644 --- a/scripts/rpm/xenserver.cfg.in +++ b/scripts/rpm/xenserver.cfg.in @@ -38,24 +38,6 @@ name=epel mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64 failovermethod=priority -[testing] -name=epel-testing -enabled=0 -mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel6&arch=x86_64 -failovermethod=priority - -[local] -name=local -baseurl=http://kojipkgs.fedoraproject.org/repos/dist-6E-epel-build/latest/x86_64/ -cost=2000 -enabled=0 - -[epel-debug] -name=epel-debug -mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-6&arch=x86_64 -failovermethod=priority -enabled=0 - [xen-c6] name=CentOS-$releasever - Xen baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ @@ -70,13 +52,6 @@ gpgcheck=0 Priority=1 enabled=1 -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 - [mock] name=Mock output baseurl=file://@PWD@/RPMS From d36f9b3e6f0db8f055e255a2296dd9ff86b9ac66 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 3 Sep 2014 12:15:53 +0100 Subject: [PATCH 1014/1125] Must not specify a fixed distribution --- scripts/deb/templates/pbuilderrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index 0e11bff2..fef21db1 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -1,5 +1,5 @@ MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb @MIRROR@ trusty restricted universe | deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ +OTHERMIRROR="deb @MIRROR@ @DIST@ restricted universe | deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From 2bb09e8241b4715e19abea3ec7d1ae0cb48759ed Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 3 Sep 2014 12:32:25 +0100 Subject: [PATCH 1015/1125] Don't depend on ubuntu repo names in template --- scripts/deb/configure.sh | 4 ++++ scripts/deb/templates/pbuilderrc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh index e4551b07..f9075a67 100755 --- a/scripts/deb/configure.sh +++ b/scripts/deb/configure.sh @@ -15,9 +15,13 @@ BASEPATH=/var/cache/pbuilder/base.cow APT_REPOS=${APT_REPOS:-} DEFAULT_MIRROR=$(grep "^deb .*$DIST .*main" /etc/apt/sources.list | cut -d' ' -f 2 | head -n1) MIRROR=${MIRROR:-$DEFAULT_MIRROR} + if [ `lsb_release -si` == "Ubuntu" ] ; then APT_REPOS="$APT_REPOS |deb $MIRROR $DIST universe" fi +if [ $ARCH == 'armhf' ]; then + APT_REPOS="$APT_REPOS |deb $MIRROR $DIST restricted universe" +fi dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index fef21db1..e0c36fb2 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -1,5 +1,5 @@ MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb @MIRROR@ @DIST@ restricted universe | deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ +OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From 020076e7ff42545407501f2a9564a0c145928b1f Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 5 Sep 2014 14:10:06 +0100 Subject: [PATCH 1016/1125] Use xen-4.4.9 debs based on Thomas Leonard's ARM branch Signed-off-by: Jon Ludlam --- SPECS/blktap.spec | 6 ++-- SPECS/ocaml-evtchn.spec | 6 ++-- SPECS/ocaml-gnt.spec | 6 ++-- SPECS/ocaml-libvhd.spec | 6 ++-- SPECS/ocaml-xen-api-libs-transitional.spec | 6 ++-- SPECS/ocaml-xen-lowlevel-libs.spec | 6 ++-- SPECS/squeezed.spec | 6 ++-- SPECS/vncterm.spec | 6 ++-- SPECS/xapi.spec | 6 ++-- SPECS/xcp-rrdd.spec | 6 ++-- SPECS/xcp-sm.spec | 6 ++-- SPECS/xen-missing-headers.spec | 32 ---------------------- SPECS/xenopsd.spec | 6 ++-- scripts/deb/templates/pbuilderrc | 2 +- 14 files changed, 49 insertions(+), 57 deletions(-) delete mode 100644 SPECS/xen-missing-headers.spec diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec index 2a38b439..7f57b442 100644 --- a/SPECS/blktap.spec +++ b/SPECS/blktap.spec @@ -1,7 +1,7 @@ Summary: Enhanced version of tapdisk Name: blktap Version: 0.9.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL+linking exception URL: https://github.com/xapi-project/blktap Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -11,7 +11,6 @@ BuildRequires: libaio-devel BuildRequires: libtool BuildRequires: libuuid-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers BuildRequires: openssl-devel %description @@ -52,6 +51,9 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{name}/sbin/* %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.2-2 +- Remove xen-missing-headers dependency + * Wed Jun 04 2014 Bob Ball - 0.9.2-1 - Update blktap to latest release diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec index a37770f8..b5c470cd 100644 --- a/SPECS/ocaml-evtchn.spec +++ b/SPECS/ocaml-evtchn.spec @@ -2,7 +2,7 @@ Name: ocaml-evtchn Version: 1.0.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: OCaml bindings for userspace Xen event channel controls License: ISC URL: https://github.com/mirage/ocaml-evtchn/ @@ -16,7 +16,6 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers %description These APIs allow programs running in userspace to signal other domains @@ -61,6 +60,9 @@ make install %{_libdir}/ocaml/xen-evtchn/*.mli %changelog +* Thu Sep 4 2014 Jon Ludlam - 1.0.5-3 +- Remove dependency on xen-missing-headers + * Tue Aug 19 2014 David Scott - 1.0.5-2 - Add dependency on xen-missing-headers diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec index 94dde3cb..2dbbfe6d 100644 --- a/SPECS/ocaml-gnt.spec +++ b/SPECS/ocaml-gnt.spec @@ -2,7 +2,7 @@ Name: ocaml-gnt Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml bindings for userspace Xen grant table controls License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/ocaml-gnt/ @@ -16,7 +16,6 @@ BuildRequires: ocaml-io-page-devel BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers Requires: ocaml Requires: ocaml-findlib @@ -65,5 +64,8 @@ ocaml setup.ml -install %{_libdir}/ocaml/xen-gnt/*.mli %changelog +* Thu Sep 4 2014 Jon Ludlam - 1.0.0-2 +- Remove dependency on xen-missing-headers + * Sat Apr 26 2014 David Scott - 1.0.0-1 - Initial package diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec index aec5e8d2..034d55c6 100644 --- a/SPECS/ocaml-libvhd.spec +++ b/SPECS/ocaml-libvhd.spec @@ -2,7 +2,7 @@ Name: ocaml-libvhd Version: 0.9.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: VHD manipulation via libvhd License: BSD3 URL: https://github.com/xapi-project/libvhd @@ -11,7 +11,6 @@ BuildRequires: libuuid-devel BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: xen-devel -BuildRequires: xen-missing-headers %description Simple C bindings which allow .vhd files to be manipulated. @@ -58,6 +57,9 @@ make install %{_libdir}/ocaml/vhdlib/*.mli %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.1-3 +- Remove dependency on xen-missing-headers + * Fri May 30 2014 Euan Harris - 0.9.1-2 - Split files correctly between base and devel packages diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec index a6dc8fc4..45f147cc 100644 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ b/SPECS/ocaml-xen-api-libs-transitional.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-api-libs-transitional Version: 0.9.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Deprecated standard library extension for OCaml License: LGPL2.1 + OCaml linking exception URL: https://github.com/xapi-project/xen-api-libs-transitional @@ -18,7 +18,6 @@ BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers BuildRequires: ocaml-xcp-idl-devel Requires: xen-libs @@ -188,6 +187,9 @@ make install DESTDIR=$OCAMLFIND_DESTDIR %{_libdir}/ocaml/xml-light2/*.mli %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.6-2 +- Remove xen-missing-headers dependency + * Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 - Update to 0.9.6 release diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 37995f48..5ad40fde 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.25 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs @@ -15,7 +15,6 @@ BuildRequires: ocaml-ocamldoc BuildRequires: libuuid-devel BuildRequires: ocaml-lwt-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers BuildRequires: ocaml-cstruct-devel %description @@ -84,6 +83,9 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libexecdir}/xenopsd/xenguest %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.25-3 +- Remove dependency on xen-missing-headers + * Tue Sep 2 2014 Jon Ludlam - 0.9.25-2 - Reinstate xenlight in CentOS diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec index 238a4c1e..994a5819 100644 --- a/SPECS/squeezed.spec +++ b/SPECS/squeezed.spec @@ -1,6 +1,6 @@ Name: squeezed Version: 0.10.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Memory ballooning daemon for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/squeezed @@ -18,7 +18,6 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers Requires: redhat-lsb-core Requires: message-switch @@ -58,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.10.6-2 +- Remove dependency on xen-missing-headers + * Fri Jun 6 2014 Jonathan Ludlam - 0.10.6-1 - Update to 0.10.6 diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec index da9f1ef7..1f4bded4 100644 --- a/SPECS/vncterm.spec +++ b/SPECS/vncterm.spec @@ -1,13 +1,12 @@ Summary: TTY to VNC utility Name: vncterm Version: 0.9.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL URL: https://github.com/xenserver/vncterm Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: vncterm-1-fix-build BuildRequires: xen-devel -BuildRequires: xen-missing-headers %description This package contains the vncterm utility @@ -34,6 +33,9 @@ getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s %{_bindir}/vncterm %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.0-2 +- Remove xen-missing-headers dependency + * Thu Aug 22 2013 Euan Harris - 0.9.0-1 - Update to latest version of upstream package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index d702a5bd..60202639 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.52 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz @@ -20,7 +20,6 @@ BuildRequires: pam-devel BuildRequires: tetex-latex BuildRequires: xen-devel BuildRequires: libffi-devel -BuildRequires: xen-missing-headers BuildRequires: zlib-devel BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-xen-api-libs-transitional-devel @@ -163,6 +162,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Thu Sep 4 2014 Jon Ludlam - 1.9.52-3 +- Remove xen-missing-headers dependency + * Thu Aug 21 2014 David Scott - 1.9.52-2 - switch to xenlight xenopsd by default diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index ac735681..b0bf0251 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,6 +1,6 @@ Name: xcp-rrdd Version: 0.9.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/xcp-rrdd @@ -20,7 +20,6 @@ BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: forkexecd-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers Requires: redhat-lsb-core %description @@ -78,6 +77,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.7-2 +- Remove xen-missing-headers dependency + * Wed Jun 4 2014 Jon Ludlam - 0.9.7-1 - Update to 0.9.7 - Create new subpackage for the devel libraries now installed diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index 36b44143..b7739c50 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -3,7 +3,7 @@ Summary: XCP storage managers Name: xcp-sm Version: 0.9.7 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL URL: https://github.com/xapi-project/sm Source0: https://github.com/BobBall/sm/archive/%{version}/sm-%{version}.tar.gz @@ -15,7 +15,6 @@ BuildRequires: python-devel BuildRequires: swig BuildRequires: xen-devel BuildRequires: pylint -BuildRequires: xen-missing-headers Requires: iscsi-initiator-utils Requires: sg3_utils Requires: xen-runtime @@ -305,6 +304,9 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) /usr/lib/xapi/sm/B_util.pyo %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.7-3 +- Remove xen-missing-headers dependency + * Fri Jun 20 2014 David Scott - 0.9.7-2 - Update file list diff --git a/SPECS/xen-missing-headers.spec b/SPECS/xen-missing-headers.spec deleted file mode 100644 index 284503c2..00000000 --- a/SPECS/xen-missing-headers.spec +++ /dev/null @@ -1,32 +0,0 @@ -Name: xen-missing-headers -Version: 4.4 -Release: 4%{?dist} -Summary: Headers missing from the ARM xen-4.4 package -License: GPL -Group: Development/Libraries -URL: http://xenproject.org/ -Source0: xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h - -%description -Headers missing from the ARM xen-4.4 package. - -%prep -cp %{SOURCE0} save.h - -%build -touch save.h - -%install -mkdir -p %{buildroot}/usr/include/xen/arch-arm/hvm -cp save.h %{buildroot}/usr/include/xen/arch-arm/hvm/save.h - -%files -/usr/include/xen/arch-arm/hvm/save.h - -%changelog -* Tue Aug 18 2014 Bob Ball - 4.4-4 -- Fix spec file typo - -* Thu May 15 2014 David Scott - 4.4-3 -- Initial package - diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 8b3efa3c..3b38f711 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.43 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -31,7 +31,6 @@ BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xenstore-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: xen-devel -BuildRequires: xen-missing-headers BuildRequires: ocaml-uutf-devel BuildRequires: ocaml-xcp-rrd-devel Requires: message-switch @@ -192,6 +191,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Sep 4 2014 Jon Ludlam - 0.9.43-3 +- Remove xen-missing-headers dependency + * Thu Sep 4 2014 Jon Ludlam - 0.9.43-2 - Reinstate xenlight package in CentOS diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index e0c36fb2..c7c09cf1 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -1,5 +1,5 @@ MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./|deb-src file:@PWD@/SRPMS/ ./\ +OTHERMIRROR="deb file:@PWD@/RPMS/ ./ |deb http://xenbits.xenproject.org/djs/linaro-xen-4-5-preview/ ./ |deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From 48e50d1461b0b6f50ae941ab74d8e4e142706bd3 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 5 Sep 2014 14:10:43 +0100 Subject: [PATCH 1017/1125] xen-utils isn't a development package Signed-off-by: Jon Ludlam --- scripts/lib/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 15dcbe39..39156e89 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -139,7 +139,7 @@ "libtype-conv-camlp4": ["libtype-conv-camlp4-dev"], "libxapi-libvirt-storage-ocaml": ["libxapi-libvirt-storage-ocaml-dev"], "ocaml-findlib-dev": ["ocaml-findlib", "libfindlib-ocaml-dev"], - "xen-hypervisor-dev": ["libxen-dev", "xen-utils", "blktap-dev"], + "xen-hypervisor-dev": ["libxen-dev", "blktap-dev"], "libvirt0-dev": ["libvirt-dev"], "libxen-4.2-dev": ["libxen-dev"], "libffi6-dev": ["libffi-dev"], From 74b85eb06e479f22e1f49ce2374ed08950fed488 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 5 Sep 2014 14:11:14 +0100 Subject: [PATCH 1018/1125] Don't try to build mirage stuff on ARM Signed-off-by: Jon Ludlam --- ignore.Linaro.trusty | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ignore.Linaro.trusty b/ignore.Linaro.trusty index 3c784180..5d68a719 100644 --- a/ignore.Linaro.trusty +++ b/ignore.Linaro.trusty @@ -4,8 +4,10 @@ ocamlify ocamlmod libnl3 mirage-testvm +ocaml-testvmlib ocaml-mirage-block-xen ocaml-mirage-clock-xen ocaml-mirage-console-xen ocaml-mirage-xen ocaml-mirage +xapi-quicktest From c5b40520c610809e78b68ddce60cb346ff993f2d Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 5 Sep 2014 14:36:27 +0100 Subject: [PATCH 1019/1125] Fix parallel make Flock does not have queueing, so it's very possible that multiple threads will cause a timeout of one of the threads. Further, the createrepos only needs to be run once to pull in all SRPMs or all RPMs. This change creates a queue which will run createrepos a minimum number of times, blocking make until createrepos has been run for that particular (S)RPM. --- Makefile | 35 ++++++++++++++------ scripts/rpm/configure.sh | 7 ---- scripts/runonce_queue.sh | 70 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 17 deletions(-) create mode 100755 scripts/runonce_queue.sh diff --git a/Makefile b/Makefile index ac7ab36e..501aa71a 100644 --- a/Makefile +++ b/Makefile @@ -4,29 +4,44 @@ DIST := .el6 all: rpms +clean: + [ ! -e srpm_output.log ] || rm srpm_output.log + [ ! -e rpm_output.log ] || rm rpm_output.log + [ ! -e deps ] || rm deps + rm -rf RPMS SRPMS + +SRPMS/.stamp: + mkdir -p SRPMS + createrepo --quiet SRPMS + touch $@ + +RPMS/.stamp: + mkdir -p RPMS + createrepo --quiet RPMS + touch $@ # RPM build rules -%.src.rpm: +%.src.rpm: SRPMS/.stamp @echo [RPMBUILD] $@ - @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< + @rpmbuild --define "_topdir ." --define "%dist $(DIST)" -bs $(word 2,$^) >> srpm_output.log 2>&1 @echo [CREATEREPO] $@ - @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS + @scripts/runonce_queue.sh SRPMS 30 $@ createrepo --update ./SRPMS >> srpm_output.log 2>&1 -%.rpm: +%.rpm: RPMS/.stamp @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< + @mock --configdir=mock -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $(word 2,$^) >> rpm_output.log 2>&1 @echo [CREATEREPO] $@ - @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS + @scripts/runonce_queue.sh RPMS 30 $@ createrepo --update ./RPMS >> rpm_output.log 2>&1 # Deb build rules %.dsc: @echo [MAKEDEB] $@ - @scripts/deb/makedeb.py $< + @scripts/deb/makedeb.py $< >> srpm_output.log 2>&1 @echo [UPDATEREPO] $@ - @flock --timeout 30 ./SRPMS scripts/deb/updaterepo sources SRPMS + @scripts/runonce_queue.sh SRPMS 30 $@ scripts/deb/updaterepo sources SRPMS >> srpm_output.log 2>&1 %.deb: @echo [COWBUILDER] $@ @@ -34,9 +49,9 @@ all: rpms @touch RPMS/Packages @sudo cowbuilder --build \ --configfile pbuilder/pbuilderrc \ - --buildresult RPMS $< + --buildresult RPMS $< >> rpm_output.log 2>&1 @echo [UPDATEREPO] $@ - @flock --timeout 30 ./RPMS scripts/deb/updaterepo packages RPMS + @scripts/runonce_queue.sh RPMS 30 $@ scripts/deb/updaterepo packages RPMS >> rpm_output.log 2>&1 # Dependency build rules diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 8ede0d6f..b1b985c5 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -13,10 +13,3 @@ ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ echo " done" - -echo -n "Initializing repository..." -mkdir -p RPMS SRPMS -createrepo --quiet RPMS -createrepo --quiet SRPMS -echo " done" - diff --git a/scripts/runonce_queue.sh b/scripts/runonce_queue.sh new file mode 100755 index 00000000..224e828f --- /dev/null +++ b/scripts/runonce_queue.sh @@ -0,0 +1,70 @@ +#!/bin/bash +set -eu + +# Ensures only one process can call 'command' at any time +# Implements a FIFO queue so process starvation does not occur +# +# Use case is to run a command which processes everything +# in the queue at once, so when a job runs it clears out the +# queue to prevent multiple-processing +# +# Syntax: +# $0 [ ...] +# +# NOTE: the script may wait for 2 x timeout as the first timeout +# is waiting to become the head of the queue and the second +# timeout is waiting for to be available + +# Consume args as we go so we can use $* to run later +lockfile=.${1//\//_} +shift +timeout=$1 +shift +token=${1//\//_} +shift + +queue_lockfile=${lockfile}.queue + +flock -w 1 $queue_lockfile -c "echo $token >> $queue_lockfile" + +# Wait for either us to be the head of the queue, or the queue to be empty +# (which can happen if someone else has run for us while we were waiting) +timeout $timeout bash << EOT +set -eux +head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") +while [ -s $queue_lockfile -a "\$head" != "$token" ]; do + sleep 1; + head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") + + # Remove the head if it's not running + kill -0 \$head >/dev/null 2>&1 || flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" +done +EOT + +# We only need to run this command once for all in the queue +# Use the actual lock now, so it doesn't matter if we change the queue, no one else +# will get in here. +( +# Use flock to protect this whole block of code; fd 9 is redirected to $lockfile at the end of the block +# Use a custom exit code so it's clear where the failure occured +flock -w $timeout 9 || exit 76 + +# Make sure we're still at the head of the queue; a previous run_once lock might have run for us +head=$(head -n1 $queue_lockfile) +if [ "$head" == "$token" ]; then + + # We're running for the whole queue here, so remove the queue + ( + # Use flock to protect this whole block of code; fd 8 is redirected to $queue_lockfile at the end of the block + flock -w 1 8 || exit 74 + mv -f $queue_lockfile ${queue_lockfile}.running + touch $queue_lockfile + ) 8>$queue_lockfile + + # Log (if we're logging) who we are running the jobs for, then actually run it + echo "Running jobs for:" + cat ${queue_lockfile}.running + $* +fi +) 9>$lockfile + From 5cdd8e6b198c08c6c667789b699024c269e29648 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 5 Sep 2014 17:30:15 +0100 Subject: [PATCH 1020/1125] Fix potential 'race' where the first timeout would be hit Process A writes to the queue Process B executes + clears the queue Process C writes to the queue Process A will now never be head and will just sit until the queue is empty again or the timeout is hit. Also fix definite race where the queue could get broken because part of the code was expecting PIDs --- scripts/runonce_queue.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/runonce_queue.sh b/scripts/runonce_queue.sh index 224e828f..84cffbbf 100755 --- a/scripts/runonce_queue.sh +++ b/scripts/runonce_queue.sh @@ -23,21 +23,29 @@ shift token=${1//\//_} shift +PID=$$ queue_lockfile=${lockfile}.queue -flock -w 1 $queue_lockfile -c "echo $token >> $queue_lockfile" +flock -w 1 $queue_lockfile -c "echo $PID:$token >> $queue_lockfile" # Wait for either us to be the head of the queue, or the queue to be empty # (which can happen if someone else has run for us while we were waiting) timeout $timeout bash << EOT set -eux -head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") -while [ -s $queue_lockfile -a "\$head" != "$token" ]; do +head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") # PID:token +head_pid=\${head%%:*} +head_token=\${head#*:} +in_queue=\$(grep -c $token $queue_lockfile) +while [ \$in_queue -gt 0 -a "\$head_token" != "$token" ]; do sleep 1; head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") + in_queue=\$(grep -c $token $queue_lockfile) + + head_pid=\${head%%:*} + head_token=\${head#*:} # Remove the head if it's not running - kill -0 \$head >/dev/null 2>&1 || flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" + kill -0 \$head_pid >/dev/null 2>&1 || flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" done EOT @@ -51,7 +59,8 @@ flock -w $timeout 9 || exit 76 # Make sure we're still at the head of the queue; a previous run_once lock might have run for us head=$(head -n1 $queue_lockfile) -if [ "$head" == "$token" ]; then +head_token=\${head#:*} +if [ "$head_token" == "$token" ]; then # We're running for the whole queue here, so remove the queue ( From e18bf214248ffafb1cf95c296b778028dcddbeed Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 8 Sep 2014 20:30:06 +0000 Subject: [PATCH 1021/1125] xenopsd: populate the search-path in the xenopsd.conf file Related to [xenserver/buildroot#519]: it helps find pygrub Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 3 ++- SPECS/xenopsd.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index c6e3a23f..9a3b54e9 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -6,7 +6,8 @@ for i in wheel root xapi xendev; do done cat < - 0.9.43-4 +- Add a search-path to the xenopsd.conf + * Thu Sep 4 2014 Jon Ludlam - 0.9.43-3 - Remove xen-missing-headers dependency From 565299bc3b81fb04c853486d3d6b56cb423316a5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 13 Sep 2014 21:35:07 +0100 Subject: [PATCH 1022/1125] Fix date in xenopsd spec Signed-off-by: David Scott --- SPECS/xenopsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index 199a4ac5..aa041e5e 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -191,7 +191,7 @@ if [ $1 -eq 0 ]; then fi %changelog -* Mon Aug 8 2014 David Scott - 0.9.43-4 +* Mon Sep 8 2014 David Scott - 0.9.43-4 - Add a search-path to the xenopsd.conf * Thu Sep 4 2014 Jon Ludlam - 0.9.43-3 From 1644eaedbe7f72c5976909dca6c9c3c159d90c5d Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Mon, 15 Sep 2014 13:40:42 +0100 Subject: [PATCH 1023/1125] Add logging and re-write the locking mechanism to use wait for PIDs --- Makefile | 2 +- scripts/runonce_queue.sh | 73 ++++++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 501aa71a..3cd91807 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ clean: [ ! -e srpm_output.log ] || rm srpm_output.log [ ! -e rpm_output.log ] || rm rpm_output.log [ ! -e deps ] || rm deps - rm -rf RPMS SRPMS + rm -rf RPMS SRPMS .RPMS* .SRPMS* SRPMS/.stamp: mkdir -p SRPMS diff --git a/scripts/runonce_queue.sh b/scripts/runonce_queue.sh index 84cffbbf..686501e6 100755 --- a/scripts/runonce_queue.sh +++ b/scripts/runonce_queue.sh @@ -15,6 +15,9 @@ set -eu # is waiting to become the head of the queue and the second # timeout is waiting for to be available +PID=$$ +echo "[$PID] $(date): $0 $*" + # Consume args as we go so we can use $* to run later lockfile=.${1//\//_} shift @@ -23,57 +26,75 @@ shift token=${1//\//_} shift -PID=$$ queue_lockfile=${lockfile}.queue -flock -w 1 $queue_lockfile -c "echo $PID:$token >> $queue_lockfile" +lock_entry="$PID:$token" +flock -w 1 $queue_lockfile -c "echo $lock_entry >> $queue_lockfile" # Wait for either us to be the head of the queue, or the queue to be empty # (which can happen if someone else has run for us while we were waiting) timeout $timeout bash << EOT -set -eux -head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") # PID:token -head_pid=\${head%%:*} -head_token=\${head#*:} -in_queue=\$(grep -c $token $queue_lockfile) -while [ \$in_queue -gt 0 -a "\$head_token" != "$token" ]; do - sleep 1; - head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") - in_queue=\$(grep -c $token $queue_lockfile) - - head_pid=\${head%%:*} - head_token=\${head#*:} +set -eu +while \$(flock -w 1 $queue_lockfile -c "grep -q $token $queue_lockfile") ; do + head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") # PID:token + head_pid=\${head%%:*} + head_token=\${head#*:} + if [ "\$head_token" == "$token" ] ; then + echo "[$PID] $token is now head" + exit 0 + fi + echo "[$PID] Not head yet (\$head_token) is head. Waiting for \$head_pid to complete" + set +e + wait \$head_pid + set -e - # Remove the head if it's not running - kill -0 \$head_pid >/dev/null 2>&1 || flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" + # Remove the head now it's not running + flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" done +echo "[$PID] $token not in the queue any more" EOT +if $(flock -w 1 $queue_lockfile -c "grep -q $token ${queue_lockfile}.completed"); then + echo "[$PID] Now present in completed file thanks" + exit 0 +fi +echo "[$PID] Not run by anyone else yet" + # We only need to run this command once for all in the queue # Use the actual lock now, so it doesn't matter if we change the queue, no one else # will get in here. +echo "[$PID] $(date) wants lock $lockfile" ( # Use flock to protect this whole block of code; fd 9 is redirected to $lockfile at the end of the block # Use a custom exit code so it's clear where the failure occured flock -w $timeout 9 || exit 76 +echo "[$PID] $(date) got lock $lockfile" # Make sure we're still at the head of the queue; a previous run_once lock might have run for us head=$(head -n1 $queue_lockfile) -head_token=\${head#:*} -if [ "$head_token" == "$token" ]; then +if [ "$head" == "$lock_entry" ]; then - # We're running for the whole queue here, so remove the queue - ( # Use flock to protect this whole block of code; fd 8 is redirected to $queue_lockfile at the end of the block + ( flock -w 1 8 || exit 74 - mv -f $queue_lockfile ${queue_lockfile}.running - touch $queue_lockfile - ) 8>$queue_lockfile + cat $queue_lockfile > ${queue_lockfile}.running + ) 8>>$queue_lockfile # Log (if we're logging) who we are running the jobs for, then actually run it - echo "Running jobs for:" + echo "[$PID] Running jobs for:" cat ${queue_lockfile}.running $* -fi -) 9>$lockfile + # Use flock to protect this whole block of code; fd 8 is redirected to $queue_lockfile at the end of the block + ( + flock -w 1 8 || exit 75 + set +e + # Grep will 'fail' if there are no lines left after removing those running + grep -v -f ${queue_lockfile}.running ${queue_lockfile} > ${queue_lockfile}.new + set -e + mv ${queue_lockfile}.new ${queue_lockfile} + cat ${queue_lockfile}.running >> ${queue_lockfile}.completed + ) 8>>$queue_lockfile +fi +) 9>>$lockfile +echo "[$PID] $(date) released lock $lockfile" From 8e3dad65a228165d9765a39bf4b4e12e1887f1e7 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 29 Sep 2014 15:45:59 +0100 Subject: [PATCH 1024/1125] ocaml-xen-lowlevel-libs: Fix bogus dates in changelog Signed-off-by: Euan Harris --- SPECS/ocaml-xen-lowlevel-libs.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index 5ad40fde..b86104b8 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -89,13 +89,13 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ * Tue Sep 2 2014 Jon Ludlam - 0.9.25-2 - Reinstate xenlight in CentOS -* Sun Aug 23 2014 David Scott - 0.9.25-1 +* Sun Aug 24 2014 David Scott - 0.9.25-1 - Update to 0.9.25 -* Sun Aug 23 2014 David Scott - 0.9.23-1 +* Sun Aug 24 2014 David Scott - 0.9.23-1 - Update to 0.9.23, improved configure script -* Sat Aug 22 2014 David Scott - 0.9.22-1 +* Sat Aug 23 2014 David Scott - 0.9.22-1 - Update to 0.9.22, only build xenlight on xen-4.4 and xen-4.5 * Wed Aug 20 2014 David Scott - 0.9.21-1 From 551ab3e3f107dd5a3a6975057970907fd924766a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 15 Aug 2014 14:42:27 +0100 Subject: [PATCH 1025/1125] xcp-sm: Fix rpmlint errors Signed-off-by: Euan Harris --- SPECS/xcp-sm.spec | 390 +++++++++++++++++++++++----------------------- 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec index b7739c50..7aad7285 100644 --- a/SPECS/xcp-sm.spec +++ b/SPECS/xcp-sm.spec @@ -36,7 +36,7 @@ sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/vhdutil.py DESTDIR=$RPM_BUILD_ROOT make %install -make PLUGIN_SCRIPT_DEST=/usr/lib/xapi/plugins/ SM_DEST=/usr/lib/xapi/sm/ DESTDIR=$RPM_BUILD_ROOT install +make PLUGIN_SCRIPT_DEST=%{_libdir}/xapi/plugins/ SM_DEST=%{_libdir}/xapi/sm/ DESTDIR=$RPM_BUILD_ROOT install mkdir -p %{buildroot}/etc/udev/rules.d install -m 0644 xcp-mpath-scsidev-rules %{buildroot}/etc/udev/rules.d/55-xs-mpath-scsidev.rules mkdir -p %{buildroot}/etc/udev/scripts @@ -67,7 +67,7 @@ update-alternatives --install /etc/multipath.conf multipath.conf /etc/multipath. [ ! -x /sbin/chkconfig ] || chkconfig --del sm-multipath #only remove in case of erase (but not at upgrade) if [ $1 -eq 0 ] ; then - update-alternatives --remove multipath.conf /etc/multipath.xenserver/multipath.conf + update-alternatives --remove multipath.conf /etc/multipath.xenserver/multipath.conf fi exit 0 @@ -82,14 +82,14 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /etc/rc.d/init.d/sm-multipath /etc/udev/rules.d/55-xs-mpath-scsidev.rules /etc/udev/scripts/xs-mpath-scsidev.sh -/usr/lib/xapi/plugins/coalesce-leaf -/usr/lib/xapi/plugins/lvhd-thin -/usr/lib/xapi/plugins/nfs-on-slave -/usr/lib/xapi/plugins/on-slave -/usr/lib/xapi/plugins/tapdisk-pause -/usr/lib/xapi/plugins/testing-hooks -/usr/lib/xapi/plugins/vss_control -/usr/lib/xapi/plugins/intellicache-clean +%{_libdir}/xapi/plugins/coalesce-leaf +%{_libdir}/xapi/plugins/lvhd-thin +%{_libdir}/xapi/plugins/nfs-on-slave +%{_libdir}/xapi/plugins/on-slave +%{_libdir}/xapi/plugins/tapdisk-pause +%{_libdir}/xapi/plugins/testing-hooks +%{_libdir}/xapi/plugins/vss_control +%{_libdir}/xapi/plugins/intellicache-clean /etc/xensource/master.d/02-vhdcleanup /opt/xensource/bin/blktap2 /opt/xensource/bin/tapdisk-cache-stats @@ -97,157 +97,157 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /opt/xensource/libexec/check-device-sharing /opt/xensource/libexec/dcopy /opt/xensource/libexec/local-device-change -/usr/lib/xapi/sm/DummySR -/usr/lib/xapi/sm/DummySR.py -/usr/lib/xapi/sm/DummySR.pyc -/usr/lib/xapi/sm/DummySR.pyo -/usr/lib/xapi/sm/EXTSR -/usr/lib/xapi/sm/EXTSR.py -/usr/lib/xapi/sm/EXTSR.pyc -/usr/lib/xapi/sm/EXTSR.pyo -/usr/lib/xapi/sm/FileSR -/usr/lib/xapi/sm/FileSR.py -/usr/lib/xapi/sm/FileSR.pyc -/usr/lib/xapi/sm/FileSR.pyo -/usr/lib/xapi/sm/HBASR -/usr/lib/xapi/sm/HBASR.py -/usr/lib/xapi/sm/HBASR.pyc -/usr/lib/xapi/sm/HBASR.pyo -/usr/lib/xapi/sm/ISCSISR -/usr/lib/xapi/sm/ISCSISR.py -/usr/lib/xapi/sm/ISCSISR.pyc -/usr/lib/xapi/sm/ISCSISR.pyo -/usr/lib/xapi/sm/ISOSR -/usr/lib/xapi/sm/ISOSR.py -/usr/lib/xapi/sm/ISOSR.pyc -/usr/lib/xapi/sm/ISOSR.pyo -/usr/lib/xapi/sm/OCFSSR.py -/usr/lib/xapi/sm/OCFSSR.pyc -/usr/lib/xapi/sm/OCFSSR.pyo -/usr/lib/xapi/sm/OCFSoISCSISR -/usr/lib/xapi/sm/OCFSoISCSISR.py -/usr/lib/xapi/sm/OCFSoISCSISR.pyc -/usr/lib/xapi/sm/OCFSoISCSISR.pyo -/usr/lib/xapi/sm/OCFSoHBASR -/usr/lib/xapi/sm/OCFSoHBASR.py -/usr/lib/xapi/sm/OCFSoHBASR.pyc -/usr/lib/xapi/sm/OCFSoHBASR.pyo -/usr/lib/xapi/sm/LUNperVDI.py -/usr/lib/xapi/sm/LUNperVDI.pyc -/usr/lib/xapi/sm/LUNperVDI.pyo -/usr/lib/xapi/sm/LVHDSR.py -/usr/lib/xapi/sm/LVHDSR.pyc -/usr/lib/xapi/sm/LVHDSR.pyo -/usr/lib/xapi/sm/LVHDoHBASR.py -/usr/lib/xapi/sm/LVHDoHBASR.pyc -/usr/lib/xapi/sm/LVHDoHBASR.pyo -/usr/lib/xapi/sm/LVHDoISCSISR.py -/usr/lib/xapi/sm/LVHDoISCSISR.pyc -/usr/lib/xapi/sm/LVHDoISCSISR.pyo -/usr/lib/xapi/sm/LVMSR -/usr/lib/xapi/sm/LVMoHBASR -/usr/lib/xapi/sm/LVMoISCSISR -/usr/lib/xapi/sm/NFSSR -/usr/lib/xapi/sm/NFSSR.py -/usr/lib/xapi/sm/NFSSR.pyc -/usr/lib/xapi/sm/NFSSR.pyo -/usr/lib/xapi/sm/SHMSR.py -/usr/lib/xapi/sm/SHMSR.pyc -/usr/lib/xapi/sm/SHMSR.pyo -/usr/lib/xapi/sm/SR.py -/usr/lib/xapi/sm/SR.pyc -/usr/lib/xapi/sm/SR.pyo -/usr/lib/xapi/sm/SRCommand.py -/usr/lib/xapi/sm/SRCommand.pyc -/usr/lib/xapi/sm/SRCommand.pyo -/usr/lib/xapi/sm/VDI.py -/usr/lib/xapi/sm/VDI.pyc -/usr/lib/xapi/sm/VDI.pyo -/usr/lib/xapi/sm/XE_SR_ERRORCODES.xml -/usr/lib/xapi/sm/blktap2.py -/usr/lib/xapi/sm/blktap2.pyc -/usr/lib/xapi/sm/blktap2.pyo -/usr/lib/xapi/sm/cleanup.py -/usr/lib/xapi/sm/cleanup.pyc -/usr/lib/xapi/sm/cleanup.pyo -/usr/lib/xapi/sm/devscan.py -/usr/lib/xapi/sm/devscan.pyc -/usr/lib/xapi/sm/devscan.pyo -/usr/lib/xapi/sm/fjournaler.py -/usr/lib/xapi/sm/fjournaler.pyc -/usr/lib/xapi/sm/fjournaler.pyo -/usr/lib/xapi/sm/flock.py -/usr/lib/xapi/sm/flock.pyc -/usr/lib/xapi/sm/flock.pyo -/usr/lib/xapi/sm/ipc.py -/usr/lib/xapi/sm/ipc.pyc -/usr/lib/xapi/sm/ipc.pyo -/usr/lib/xapi/sm/iscsilib.py -/usr/lib/xapi/sm/iscsilib.pyc -/usr/lib/xapi/sm/iscsilib.pyo -/usr/lib/xapi/sm/journaler.py -/usr/lib/xapi/sm/journaler.pyc -/usr/lib/xapi/sm/journaler.pyo -/usr/lib/xapi/sm/lcache.py -/usr/lib/xapi/sm/lcache.pyc -/usr/lib/xapi/sm/lcache.pyo -/usr/lib/xapi/sm/lock.py -/usr/lib/xapi/sm/lock.pyc -/usr/lib/xapi/sm/lock.pyo -/usr/lib/xapi/sm/lvhdutil.py -/usr/lib/xapi/sm/lvhdutil.pyc -/usr/lib/xapi/sm/lvhdutil.pyo -/usr/lib/xapi/sm/lvmanager.py -/usr/lib/xapi/sm/lvmanager.pyc -/usr/lib/xapi/sm/lvmanager.pyo -/usr/lib/xapi/sm/lvmcache.py -/usr/lib/xapi/sm/lvmcache.pyc -/usr/lib/xapi/sm/lvmcache.pyo -/usr/lib/xapi/sm/lvutil.py -/usr/lib/xapi/sm/lvutil.pyc -/usr/lib/xapi/sm/lvutil.pyo -/usr/lib/xapi/sm/metadata.py -/usr/lib/xapi/sm/metadata.pyc -/usr/lib/xapi/sm/metadata.pyo -/usr/lib/xapi/sm/srmetadata.py -/usr/lib/xapi/sm/srmetadata.pyc -/usr/lib/xapi/sm/srmetadata.pyo -/usr/lib/xapi/sm/mpath_cli.py -/usr/lib/xapi/sm/mpath_cli.pyc -/usr/lib/xapi/sm/mpath_cli.pyo -/usr/lib/xapi/sm/mpath_dmp.py -/usr/lib/xapi/sm/mpath_dmp.pyc -/usr/lib/xapi/sm/mpath_dmp.pyo -/usr/lib/xapi/sm/mpath_null.py -/usr/lib/xapi/sm/mpath_null.pyc -/usr/lib/xapi/sm/mpath_null.pyo -/usr/lib/xapi/sm/mpathcount.py -/usr/lib/xapi/sm/mpathcount.pyc -/usr/lib/xapi/sm/mpathcount.pyo -/usr/lib/xapi/sm/mpathutil.py -/usr/lib/xapi/sm/mpathutil.pyc -/usr/lib/xapi/sm/mpathutil.pyo -/usr/lib/xapi/sm/mpp_luncheck.py -/usr/lib/xapi/sm/mpp_luncheck.pyc -/usr/lib/xapi/sm/mpp_luncheck.pyo -/usr/lib/xapi/sm/mpp_mpathutil.py -/usr/lib/xapi/sm/mpp_mpathutil.pyc -/usr/lib/xapi/sm/mpp_mpathutil.pyo -/usr/lib/xapi/sm/nfs.py -/usr/lib/xapi/sm/nfs.pyc -/usr/lib/xapi/sm/nfs.pyo -/usr/lib/xapi/sm/refcounter.py -/usr/lib/xapi/sm/refcounter.pyc -/usr/lib/xapi/sm/refcounter.pyo -/usr/lib/xapi/sm/resetvdis.py -/usr/lib/xapi/sm/resetvdis.pyc -/usr/lib/xapi/sm/resetvdis.pyo -/usr/lib/xapi/sm/scsiutil.py -/usr/lib/xapi/sm/scsiutil.pyc -/usr/lib/xapi/sm/scsiutil.pyo -/usr/lib/xapi/sm/scsi_host_rescan.py -/usr/lib/xapi/sm/scsi_host_rescan.pyc -/usr/lib/xapi/sm/scsi_host_rescan.pyo +%{_libdir}/xapi/sm/DummySR +%{_libdir}/xapi/sm/DummySR.py +%{_libdir}/xapi/sm/DummySR.pyc +%{_libdir}/xapi/sm/DummySR.pyo +%{_libdir}/xapi/sm/EXTSR +%{_libdir}/xapi/sm/EXTSR.py +%{_libdir}/xapi/sm/EXTSR.pyc +%{_libdir}/xapi/sm/EXTSR.pyo +%{_libdir}/xapi/sm/FileSR +%{_libdir}/xapi/sm/FileSR.py +%{_libdir}/xapi/sm/FileSR.pyc +%{_libdir}/xapi/sm/FileSR.pyo +%{_libdir}/xapi/sm/HBASR +%{_libdir}/xapi/sm/HBASR.py +%{_libdir}/xapi/sm/HBASR.pyc +%{_libdir}/xapi/sm/HBASR.pyo +%{_libdir}/xapi/sm/ISCSISR +%{_libdir}/xapi/sm/ISCSISR.py +%{_libdir}/xapi/sm/ISCSISR.pyc +%{_libdir}/xapi/sm/ISCSISR.pyo +%{_libdir}/xapi/sm/ISOSR +%{_libdir}/xapi/sm/ISOSR.py +%{_libdir}/xapi/sm/ISOSR.pyc +%{_libdir}/xapi/sm/ISOSR.pyo +%{_libdir}/xapi/sm/OCFSSR.py +%{_libdir}/xapi/sm/OCFSSR.pyc +%{_libdir}/xapi/sm/OCFSSR.pyo +%{_libdir}/xapi/sm/OCFSoISCSISR +%{_libdir}/xapi/sm/OCFSoISCSISR.py +%{_libdir}/xapi/sm/OCFSoISCSISR.pyc +%{_libdir}/xapi/sm/OCFSoISCSISR.pyo +%{_libdir}/xapi/sm/OCFSoHBASR +%{_libdir}/xapi/sm/OCFSoHBASR.py +%{_libdir}/xapi/sm/OCFSoHBASR.pyc +%{_libdir}/xapi/sm/OCFSoHBASR.pyo +%{_libdir}/xapi/sm/LUNperVDI.py +%{_libdir}/xapi/sm/LUNperVDI.pyc +%{_libdir}/xapi/sm/LUNperVDI.pyo +%{_libdir}/xapi/sm/LVHDSR.py +%{_libdir}/xapi/sm/LVHDSR.pyc +%{_libdir}/xapi/sm/LVHDSR.pyo +%{_libdir}/xapi/sm/LVHDoHBASR.py +%{_libdir}/xapi/sm/LVHDoHBASR.pyc +%{_libdir}/xapi/sm/LVHDoHBASR.pyo +%{_libdir}/xapi/sm/LVHDoISCSISR.py +%{_libdir}/xapi/sm/LVHDoISCSISR.pyc +%{_libdir}/xapi/sm/LVHDoISCSISR.pyo +%{_libdir}/xapi/sm/LVMSR +%{_libdir}/xapi/sm/LVMoHBASR +%{_libdir}/xapi/sm/LVMoISCSISR +%{_libdir}/xapi/sm/NFSSR +%{_libdir}/xapi/sm/NFSSR.py +%{_libdir}/xapi/sm/NFSSR.pyc +%{_libdir}/xapi/sm/NFSSR.pyo +%{_libdir}/xapi/sm/SHMSR.py +%{_libdir}/xapi/sm/SHMSR.pyc +%{_libdir}/xapi/sm/SHMSR.pyo +%{_libdir}/xapi/sm/SR.py +%{_libdir}/xapi/sm/SR.pyc +%{_libdir}/xapi/sm/SR.pyo +%{_libdir}/xapi/sm/SRCommand.py +%{_libdir}/xapi/sm/SRCommand.pyc +%{_libdir}/xapi/sm/SRCommand.pyo +%{_libdir}/xapi/sm/VDI.py +%{_libdir}/xapi/sm/VDI.pyc +%{_libdir}/xapi/sm/VDI.pyo +%{_libdir}/xapi/sm/XE_SR_ERRORCODES.xml +%{_libdir}/xapi/sm/blktap2.py +%{_libdir}/xapi/sm/blktap2.pyc +%{_libdir}/xapi/sm/blktap2.pyo +%{_libdir}/xapi/sm/cleanup.py +%{_libdir}/xapi/sm/cleanup.pyc +%{_libdir}/xapi/sm/cleanup.pyo +%{_libdir}/xapi/sm/devscan.py +%{_libdir}/xapi/sm/devscan.pyc +%{_libdir}/xapi/sm/devscan.pyo +%{_libdir}/xapi/sm/fjournaler.py +%{_libdir}/xapi/sm/fjournaler.pyc +%{_libdir}/xapi/sm/fjournaler.pyo +%{_libdir}/xapi/sm/flock.py +%{_libdir}/xapi/sm/flock.pyc +%{_libdir}/xapi/sm/flock.pyo +%{_libdir}/xapi/sm/ipc.py +%{_libdir}/xapi/sm/ipc.pyc +%{_libdir}/xapi/sm/ipc.pyo +%{_libdir}/xapi/sm/iscsilib.py +%{_libdir}/xapi/sm/iscsilib.pyc +%{_libdir}/xapi/sm/iscsilib.pyo +%{_libdir}/xapi/sm/journaler.py +%{_libdir}/xapi/sm/journaler.pyc +%{_libdir}/xapi/sm/journaler.pyo +%{_libdir}/xapi/sm/lcache.py +%{_libdir}/xapi/sm/lcache.pyc +%{_libdir}/xapi/sm/lcache.pyo +%{_libdir}/xapi/sm/lock.py +%{_libdir}/xapi/sm/lock.pyc +%{_libdir}/xapi/sm/lock.pyo +%{_libdir}/xapi/sm/lvhdutil.py +%{_libdir}/xapi/sm/lvhdutil.pyc +%{_libdir}/xapi/sm/lvhdutil.pyo +%{_libdir}/xapi/sm/lvmanager.py +%{_libdir}/xapi/sm/lvmanager.pyc +%{_libdir}/xapi/sm/lvmanager.pyo +%{_libdir}/xapi/sm/lvmcache.py +%{_libdir}/xapi/sm/lvmcache.pyc +%{_libdir}/xapi/sm/lvmcache.pyo +%{_libdir}/xapi/sm/lvutil.py +%{_libdir}/xapi/sm/lvutil.pyc +%{_libdir}/xapi/sm/lvutil.pyo +%{_libdir}/xapi/sm/metadata.py +%{_libdir}/xapi/sm/metadata.pyc +%{_libdir}/xapi/sm/metadata.pyo +%{_libdir}/xapi/sm/srmetadata.py +%{_libdir}/xapi/sm/srmetadata.pyc +%{_libdir}/xapi/sm/srmetadata.pyo +%{_libdir}/xapi/sm/mpath_cli.py +%{_libdir}/xapi/sm/mpath_cli.pyc +%{_libdir}/xapi/sm/mpath_cli.pyo +%{_libdir}/xapi/sm/mpath_dmp.py +%{_libdir}/xapi/sm/mpath_dmp.pyc +%{_libdir}/xapi/sm/mpath_dmp.pyo +%{_libdir}/xapi/sm/mpath_null.py +%{_libdir}/xapi/sm/mpath_null.pyc +%{_libdir}/xapi/sm/mpath_null.pyo +%{_libdir}/xapi/sm/mpathcount.py +%{_libdir}/xapi/sm/mpathcount.pyc +%{_libdir}/xapi/sm/mpathcount.pyo +%{_libdir}/xapi/sm/mpathutil.py +%{_libdir}/xapi/sm/mpathutil.pyc +%{_libdir}/xapi/sm/mpathutil.pyo +%{_libdir}/xapi/sm/mpp_luncheck.py +%{_libdir}/xapi/sm/mpp_luncheck.pyc +%{_libdir}/xapi/sm/mpp_luncheck.pyo +%{_libdir}/xapi/sm/mpp_mpathutil.py +%{_libdir}/xapi/sm/mpp_mpathutil.pyc +%{_libdir}/xapi/sm/mpp_mpathutil.pyo +%{_libdir}/xapi/sm/nfs.py +%{_libdir}/xapi/sm/nfs.pyc +%{_libdir}/xapi/sm/nfs.pyo +%{_libdir}/xapi/sm/refcounter.py +%{_libdir}/xapi/sm/refcounter.pyc +%{_libdir}/xapi/sm/refcounter.pyo +%{_libdir}/xapi/sm/resetvdis.py +%{_libdir}/xapi/sm/resetvdis.pyc +%{_libdir}/xapi/sm/resetvdis.pyo +%{_libdir}/xapi/sm/scsiutil.py +%{_libdir}/xapi/sm/scsiutil.pyc +%{_libdir}/xapi/sm/scsiutil.pyo +%{_libdir}/xapi/sm/scsi_host_rescan.py +%{_libdir}/xapi/sm/scsi_host_rescan.pyc +%{_libdir}/xapi/sm/scsi_host_rescan.pyo /opt/xensource/sm/snapwatchd/snapwatchd /opt/xensource/sm/snapwatchd/xslib.py /opt/xensource/sm/snapwatchd/xslib.pyc @@ -255,32 +255,32 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? /opt/xensource/sm/snapwatchd/snapdebug.py /opt/xensource/sm/snapwatchd/snapdebug.pyc /opt/xensource/sm/snapwatchd/snapdebug.pyo -/usr/lib/xapi/sm/sysdevice.py -/usr/lib/xapi/sm/sysdevice.pyc -/usr/lib/xapi/sm/sysdevice.pyo -/usr/lib/xapi/sm/udevSR -/usr/lib/xapi/sm/udevSR.py -/usr/lib/xapi/sm/udevSR.pyc -/usr/lib/xapi/sm/udevSR.pyo -/usr/lib/xapi/sm/updatempppathd.py -/usr/lib/xapi/sm/updatempppathd.pyc -/usr/lib/xapi/sm/updatempppathd.pyo -/usr/lib/xapi/sm/util.py -/usr/lib/xapi/sm/util.pyc -/usr/lib/xapi/sm/util.pyo -/usr/lib/xapi/sm/verifyVHDsOnSR.py -/usr/lib/xapi/sm/verifyVHDsOnSR.pyc -/usr/lib/xapi/sm/verifyVHDsOnSR.pyo -/usr/lib/xapi/sm/vhdutil.py -/usr/lib/xapi/sm/vhdutil.pyc -/usr/lib/xapi/sm/vhdutil.pyo -/usr/lib/xapi/sm/vss_control -/usr/lib/xapi/sm/xs_errors.py -/usr/lib/xapi/sm/xs_errors.pyc -/usr/lib/xapi/sm/xs_errors.pyo -/usr/lib/xapi/sm/wwid_conf.py -/usr/lib/xapi/sm/wwid_conf.pyc -/usr/lib/xapi/sm/wwid_conf.pyo +%{_libdir}/xapi/sm/sysdevice.py +%{_libdir}/xapi/sm/sysdevice.pyc +%{_libdir}/xapi/sm/sysdevice.pyo +%{_libdir}/xapi/sm/udevSR +%{_libdir}/xapi/sm/udevSR.py +%{_libdir}/xapi/sm/udevSR.pyc +%{_libdir}/xapi/sm/udevSR.pyo +%{_libdir}/xapi/sm/updatempppathd.py +%{_libdir}/xapi/sm/updatempppathd.pyc +%{_libdir}/xapi/sm/updatempppathd.pyo +%{_libdir}/xapi/sm/util.py +%{_libdir}/xapi/sm/util.pyc +%{_libdir}/xapi/sm/util.pyo +%{_libdir}/xapi/sm/verifyVHDsOnSR.py +%{_libdir}/xapi/sm/verifyVHDsOnSR.pyc +%{_libdir}/xapi/sm/verifyVHDsOnSR.pyo +%{_libdir}/xapi/sm/vhdutil.py +%{_libdir}/xapi/sm/vhdutil.pyc +%{_libdir}/xapi/sm/vhdutil.pyo +%{_libdir}/xapi/sm/vss_control +%{_libdir}/xapi/sm/xs_errors.py +%{_libdir}/xapi/sm/xs_errors.pyc +%{_libdir}/xapi/sm/xs_errors.pyo +%{_libdir}/xapi/sm/wwid_conf.py +%{_libdir}/xapi/sm/wwid_conf.pyc +%{_libdir}/xapi/sm/wwid_conf.pyo /sbin/mpathutil %config /etc/udev/rules.d/40-multipath.rules %config /etc/multipath.xenserver/multipath.conf @@ -295,13 +295,13 @@ This package adds a new rawhba SR type. This SR type allows utilization of Fiber Channel raw LUNs as separate VDIs (LUN per VDI) %files rawhba -/usr/lib/xapi/sm/RawHBASR -/usr/lib/xapi/sm/RawHBASR.py -/usr/lib/xapi/sm/RawHBASR.pyc -/usr/lib/xapi/sm/RawHBASR.pyo -/usr/lib/xapi/sm/B_util.py -/usr/lib/xapi/sm/B_util.pyc -/usr/lib/xapi/sm/B_util.pyo +%{_libdir}/xapi/sm/RawHBASR +%{_libdir}/xapi/sm/RawHBASR.py +%{_libdir}/xapi/sm/RawHBASR.pyc +%{_libdir}/xapi/sm/RawHBASR.pyo +%{_libdir}/xapi/sm/B_util.py +%{_libdir}/xapi/sm/B_util.pyc +%{_libdir}/xapi/sm/B_util.pyo %changelog * Thu Sep 4 2014 Jon Ludlam - 0.9.7-3 @@ -332,7 +332,7 @@ Fiber Channel raw LUNs as separate VDIs (LUN per VDI) - Update to 0.9.3 * Wed Sep 11 2013 Euan Harris -- Move drivers to /usr/lib/xapi/sm +- Move drivers to _libdir/xapi/sm * Mon Sep 09 2013 Euan Harris - Initial package From 87f9e0cf34cdb1d9aab7addcc430b2d020c93eaa Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 11:01:58 +0100 Subject: [PATCH 1026/1125] Remove empty xapi.repo file Signed-off-by: Euan Harris --- xapi.repo | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 xapi.repo diff --git a/xapi.repo b/xapi.repo deleted file mode 100644 index e69de29b..00000000 From 17589be7786c8698a486d336ce25bb394e35e6b5 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 14:50:57 +0100 Subject: [PATCH 1027/1125] ocaml-ssl: Update to 0.4.7 and switch to GitHub mirror Signed-off-by: Euan Harris --- SPECS/ocaml-ssl.spec | 12 +++++++++--- scripts/lib/mappkgname.py | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec index 3137eb99..3215b512 100644 --- a/SPECS/ocaml-ssl.spec +++ b/SPECS/ocaml-ssl.spec @@ -1,12 +1,14 @@ %global debug_package %{nil} Name: ocaml-ssl -Version: 0.4.6 -Release: 2%{?dist} +Version: 0.4.7 +Release: 1%{?dist} Summary: Use OpenSSL from OCaml License: LGPL URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl -Source0: http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/savonet/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: autoconf +BuildRequires: automake BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: openssl-devel @@ -27,6 +29,7 @@ developing applications that use %{name}. %setup -q %build +./bootstrap ./configure make @@ -58,6 +61,9 @@ make install DESTDIR=%{buildroot} %{_libdir}/ocaml/ssl/*.mli %changelog +* Thu Oct 2 2014 Euan Harris - 0.4.7-1 +- Update to 0.4.7 and get source from GitHub + * Fri May 30 2014 Euan Harris - 0.4.6-2 - Split files correctly between base and devel packages diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 39156e89..63702cd6 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -129,6 +129,8 @@ "sg3_utils": ["sg3-utils"], "python-argparse": ["libpython2.7-stdlib"], "util-linux-ng": ["uuid-runtime"], + "autoconf": ["autoconf"], + "automake": ["automake"], } SECONDARY_MAPPING = { From 36661a75a8fa736307560315bfb72b105f71e070 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 14:58:17 +0100 Subject: [PATCH 1028/1125] optcomp: Update to 1.6 and get sources from GitHub. Signed-off-by: Euan Harris --- SPECS/optcomp.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec index b4e85fc2..abdb800e 100644 --- a/SPECS/optcomp.spec +++ b/SPECS/optcomp.spec @@ -1,10 +1,10 @@ Name: optcomp -Version: 1.4 +Version: 1.6 Release: 1%{?dist} Summary: Optional compilation with cpp-like directives License: BSD3 -URL: http://forge.ocamlcore.org/projects/optcomp/ -Source0: https://forge.ocamlcore.org/frs/download.php/1011/%{name}-%{version}.tar.gz +URL: https://github.com/diml/optcomp +Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -30,12 +30,16 @@ mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-o %{buildroot}/%{_bindir} %files -%doc LICENSE README -%{_libdir}/ocaml/optcomp/* +%doc LICENSE +%doc README.md +%{_libdir}/ocaml/optcomp %{_bindir}/optcomp-r %{_bindir}/optcomp-o %changelog +* Thu Oct 2 2014 Euan Harris - 1.6-1 +- Update to 1.6 and switch to GitHub sources + * Fri May 31 2013 David Scott - 1.4-1 - Initial package From a890b081f463ebd7791e4c8464b4fe22f9e0fe0e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 15:05:16 +0100 Subject: [PATCH 1029/1125] ocaml-zed: Update to 1.6 and get sources from GitHub Signed-off-by: Euan Harris --- SPECS/ocaml-zed.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec index d545fae4..552e8897 100644 --- a/SPECS/ocaml-zed.spec +++ b/SPECS/ocaml-zed.spec @@ -1,12 +1,12 @@ %global debug_package %{nil} Name: ocaml-zed -Version: 1.2 -Release: 2%{?dist} +Version: 1.3 +Release: 1%{?dist} Summary: An abstract engine for text editing for OCaml License: BSD3 -URL: http://forge.ocamlcore.org/projects/zed/ -Source0: http://forge.ocamlcore.org/frs/download.php/944/zed-%{version}.tar.gz +URL: https://github.com/diml/zed +Source0: https://github.com/diml/zed/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camomile-devel BuildRequires: ocaml-findlib @@ -40,8 +40,9 @@ mkdir -p $OCAMLFIND_DESTDIR make install %files -%doc CHANGES +%doc CHANGES.md %doc LICENSE +%doc README.md %{_libdir}/ocaml/zed %exclude %{_libdir}/ocaml/zed/*.a %exclude %{_libdir}/ocaml/zed/*.cmxa @@ -55,6 +56,9 @@ make install %{_libdir}/ocaml/zed/*.mli %changelog +* Thu Oct 2 2014 Euan Harris - 1.3-1 +- Update to 1.3 and switch to GitHub sources + * Mon Jun 2 2014 Euan Harris - 1.2-2 - Split files correctly between base and devel packages From 36e5a91a6c9195b3c069c25b0de6fefbd46006bd Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 15:22:09 +0100 Subject: [PATCH 1030/1125] ocaml-text: Update to 0.7.1 and get sources from GitHub. Signed-off-by: Euan Harris --- SPECS/ocaml-text.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec index 7fa8178e..272f6889 100644 --- a/SPECS/ocaml-text.spec +++ b/SPECS/ocaml-text.spec @@ -2,13 +2,13 @@ %define debug_package %{nil} Name: ocaml-text -Version: 0.6 -Release: 2%{?dist} +Version: 0.7.1 +Release: 1%{?dist} Summary: Library for dealing with unicode text conveniently License: BSD -URL: http://forge.ocamlcore.org/projects/ocaml-text -Source0: http://forge.ocamlcore.org/frs/download.php/937/%{name}-%{version}.tar.gz +URL: https://github.com/vbmithr/ocaml-text +Source0: https://github.com/vbmithr/%{name}/archive/%{version}/%{name}-%{version}.tar.gz ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 @@ -32,9 +32,8 @@ developing applications that use %{name}. %setup -q %build -./configure --destdir $RPM_BUILD_ROOT --prefix /usr +ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr make -make doc %install export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml @@ -50,19 +49,21 @@ rm -rf $RPM_BUILD_ROOT/usr/local/share/doc %exclude %{_libdir}/ocaml/text/*.cmxa %exclude %{_libdir}/ocaml/text/*.cmx %exclude %{_libdir}/ocaml/text/*.mli -%{_libdir}/ocaml/stublibs/dlltext-bigarray_stubs.so -%{_libdir}/ocaml/stublibs/dlltext-bigarray_stubs.so.owner +%{_libdir}/ocaml/stublibs/dllbigarray_stubs.so +%{_libdir}/ocaml/stublibs/dllbigarray_stubs.so.owner %{_libdir}/ocaml/stublibs/dlltext_stubs.so %{_libdir}/ocaml/stublibs/dlltext_stubs.so.owner %files devel -%doc /usr/share/doc/ocaml-text %{_libdir}/ocaml/text/*.a %{_libdir}/ocaml/text/*.cmx %{_libdir}/ocaml/text/*.cmxa %{_libdir}/ocaml/text/*.mli %changelog +* Thu Oct 2 2014 Euan Harris - 0.7.1-1 +- Update to 0.7.1 and get source from GitHub + * Mon Jun 02 2014 Euan Harris - 0.6-2 - Split files correctly between base and devel packages From d0788babc821bdd69c33c827faf9eb1404e8eac3 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 16:03:59 +0100 Subject: [PATCH 1031/1125] downloader: Don't verify SSL certificates for forge.ocamlcore.org OCaml Forge's SSL certificate has expired. Signed-off-by: Euan Harris --- scripts/downloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/downloader.py b/scripts/downloader.py index db05a061..64bd3cb1 100755 --- a/scripts/downloader.py +++ b/scripts/downloader.py @@ -33,6 +33,8 @@ def looks_like_an_archive(path): def download(url, destination): args = ["curl", "--silent", "--show-error", "-L", "-o", destination, url] + if "forge.ocamlcore.org" in url: + args.append("--insecure") print >>sys.stderr, "Running %s" % (" ".join(args)) returncode = subprocess.call(args) if returncode <> 0: From dcefd658d20d97fbe7c4ff36a274c1ee7a976587 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 22 Sep 2014 20:49:57 +0000 Subject: [PATCH 1032/1125] Update xenopsd Signed-off-by: David Scott --- SPECS/xenopsd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index aa041e5e..ed5cbfa6 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd -Version: 0.9.43 -Release: 4%{?dist} +Version: 0.9.44 +Release: 1%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -191,6 +191,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Mon Sep 22 2014 David Scott - 0.9.44-1 +- Update to 0.9.44 + * Mon Sep 8 2014 David Scott - 0.9.43-4 - Add a search-path to the xenopsd.conf From cffdf35f7f3cf19c56d2fa3ce28b79150370f0bf Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 25 Sep 2014 13:47:23 +0100 Subject: [PATCH 1033/1125] xenopsd: try to enable upstream qemu Signed-off-by: David Scott --- SOURCES/make-xsc-xenopsd.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf index 9a3b54e9..ab42858f 100755 --- a/SOURCES/make-xsc-xenopsd.conf +++ b/SOURCES/make-xsc-xenopsd.conf @@ -11,6 +11,7 @@ search-path=/usr/lib/xen-4.5/bin:/usr/lib/xen-4.4/bin:${LIBEXECDIR}:${SCRIPTSDIR eliloader=eliloader pygrub=pygrub qemu-system-i386=qemu-system-i386 +use-upstream-qemu=true vncterm=${LIBEXECDIR}/vncterm-wrapper hvmloader=hvmloader From a337c15047900fbd8fa7e8ede3240a96e2a2f47c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 27 Sep 2014 15:34:39 +0100 Subject: [PATCH 1034/1125] Add ocaml-netlink, needed by new xcp-networkd Signed-off-by: David Scott --- SPECS/ocaml-netlink.spec | 62 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 SPECS/ocaml-netlink.spec diff --git a/SPECS/ocaml-netlink.spec b/SPECS/ocaml-netlink.spec new file mode 100644 index 00000000..39d1a32a --- /dev/null +++ b/SPECS/ocaml-netlink.spec @@ -0,0 +1,62 @@ +%define planex_version 0.1.0 +%define planex_release 1 + +Name: ocaml-netlink +Version: %{planex_version} +Release: %{planex_release} +Summary: OCaml bindings to libnl +License: LGPL +URL: https://github.com/xapi-project/ocaml-netlink +Source0: https://github.com/xapi-project/ocaml-netlink/archive/v%{planex_version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: libffi-devel +BuildRequires: libnl3 +BuildRequires: ocaml +BuildRequires: ocaml-ctypes-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-obuild + +%description +The Netlink Protocol Library Suite (libnl) provides APIs to the netlink +protocol, allowing you to interact with network devices in the Linux kernel. +This library provides OCaml bindings to libnl. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-ctypes-devel%{?_isa} +Requires: libffi%{?_isa} +Requires: libnl3%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR/stublibs +export OCAMLFIND_LDCONF=ignore +make install DESTDIR=%{buildroot}/%{_libdir}/ocaml + +%files +%doc README.md +%{_libdir}/ocaml/netlink +%exclude %{_libdir}/ocaml/netlink/*.a +%exclude %{_libdir}/ocaml/netlink/*.cmxa +%exclude %{_libdir}/ocaml/netlink/*.cmx + +%files devel +%{_libdir}/ocaml/netlink/*.a +%{_libdir}/ocaml/netlink/*.cmx +%{_libdir}/ocaml/netlink/*.cmxa + +%changelog +* Thu Jun 05 2014 Rob Hoes - 0.1.0-1 +- Initial package + From 2df7a195f1b75e01beacae56e1876bc43d621c70 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 27 Sep 2014 16:25:02 +0100 Subject: [PATCH 1035/1125] mappkgname: libnl3 appears to be libnl-3-200 (for some reason) --- scripts/lib/mappkgname.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 63702cd6..27537c03 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -29,9 +29,9 @@ "linux-guest-loader": ["linux-guest-loader"], "iscsi-initiator-utils": ["open-iscsi"], "js_of_ocaml": ["libjs-of-ocaml"], - "libnl3-cli": ["libnl-3-cli"], - "libnl3-doc": ["libnl-3-doc"], - "libnl3": ["libnl-3"], + "libnl3-cli": ["libnl-cli-3-200"], + "libnl3-doc": ["libnl-doc"], + "libnl3": ["libnl-3-200"], "libffi": ["libffi6"], "ocaml-bitstring": ["libbitstring-ocaml"], "ocaml-camomile-data": ["libcamomile-data"], From 6168f8403da7241d97713f0955e501e13d6e1314 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 27 Sep 2014 16:26:33 +0100 Subject: [PATCH 1036/1125] xcp-networkd: update to 0.9.5 This fixes a problem with (not using) the message-switch. This introduces a dependency on libnl3 and libffi-dev at runtime, which could be problematic. Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index f0f7819a..792bdb3f 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -1,5 +1,5 @@ Name: xcp-networkd -Version: 0.9.4 +Version: 0.9.5 Release: 1%{?dist} Summary: Simple host network management service for the xapi toolstack License: LGPL @@ -20,8 +20,11 @@ BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-client-devel +BuildRequires: ocaml-netlink-devel Requires: ethtool Requires: redhat-lsb-core +Requires: libffi-dev +Requires: libnl3 %description Simple host networking management service for the xapi toolstack. @@ -67,6 +70,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Sat Sep 27 2014 David Scott - 0.9.5-1 +- Update to 0.9.5 (now uses libnl) + * Wed Jun 4 2014 Jon Ludlam - 0.9.4-1 - Update to 0.9.4 - Add networkd_db CLI From 465c8d9478d540718925dbc6ddcd2094fc8674ac Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 1 Oct 2014 22:12:25 +0000 Subject: [PATCH 1037/1125] Update ocaml-netlink to 0.2.0 This one has better Debian support Signed-off-by: David Scott --- SPECS/ocaml-netlink.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-netlink.spec b/SPECS/ocaml-netlink.spec index 39d1a32a..a92682b2 100644 --- a/SPECS/ocaml-netlink.spec +++ b/SPECS/ocaml-netlink.spec @@ -1,4 +1,4 @@ -%define planex_version 0.1.0 +%define planex_version 0.2.0 %define planex_release 1 Name: ocaml-netlink @@ -57,6 +57,9 @@ make install DESTDIR=%{buildroot}/%{_libdir}/ocaml %{_libdir}/ocaml/netlink/*.cmxa %changelog +* Wed Oct 01 2014 David Scott - 0.2.0-1 +- Update to 0.2.0 + * Thu Jun 05 2014 Rob Hoes - 0.1.0-1 - Initial package From f57ccfec12b60b17a7cb259dc70531d550f69e75 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 1 Oct 2014 22:13:01 +0000 Subject: [PATCH 1038/1125] netlink: we need both libnl-3-200 and libnl-route-3-200 Signed-off-by: David Scott --- scripts/lib/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index 27537c03..f11f4dcf 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -31,7 +31,7 @@ "js_of_ocaml": ["libjs-of-ocaml"], "libnl3-cli": ["libnl-cli-3-200"], "libnl3-doc": ["libnl-doc"], - "libnl3": ["libnl-3-200"], + "libnl3": ["libnl-3-200", "libnl-route-3-200"], "libffi": ["libffi6"], "ocaml-bitstring": ["libbitstring-ocaml"], "ocaml-camomile-data": ["libcamomile-data"], From 701362731f58ba9070dd6d9fac4cbd3e7999d411 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 1 Oct 2014 22:13:28 +0000 Subject: [PATCH 1039/1125] xcp-networkd needs libffi-dev Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 792bdb3f..eb6b1060 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -20,6 +20,7 @@ BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-client-devel +BuildRequires: libffi-dev BuildRequires: ocaml-netlink-devel Requires: ethtool Requires: redhat-lsb-core From 576dfa9f07c2da1a1c1920bed5b9620abcace0d2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 16:31:29 +0000 Subject: [PATCH 1040/1125] xcp-networkd: update to new command-line syntax Signed-off-by: David Scott --- SOURCES/xcp-networkd-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/xcp-networkd-init b/SOURCES/xcp-networkd-init index 54f31c87..24adee4a 100755 --- a/SOURCES/xcp-networkd-init +++ b/SOURCES/xcp-networkd-init @@ -41,7 +41,7 @@ start() { umask 077 echo -n $"Starting xcp-networkd: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_NETWORKD_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $XCP_NETWORKD_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From 9f0ddec0dae2c9987ed40214d66b64e128bc73d8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 20:15:17 +0000 Subject: [PATCH 1041/1125] libffi-dev should be libffi-devel Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index eb6b1060..84140004 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -20,11 +20,11 @@ BuildRequires: ocaml-xen-api-libs-transitional-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-xcp-inventory-devel BuildRequires: ocaml-xen-api-client-devel -BuildRequires: libffi-dev +BuildRequires: libffi-devel BuildRequires: ocaml-netlink-devel Requires: ethtool Requires: redhat-lsb-core -Requires: libffi-dev +Requires: libffi-devel Requires: libnl3 %description From 26dfc942f74c2f2783b4624780e648abbb7705d3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 20:15:39 +0000 Subject: [PATCH 1042/1125] xcp-networkd: add the manpage Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 84140004..044c48bf 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -60,6 +60,7 @@ install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf /etc/modprobe.d/bridge.conf %config(noreplace) /etc/xcp/network.conf %config(noreplace) /etc/xcp-networkd.conf +%{_mandir}/man1/xcp-networkd.1.gz %post /sbin/chkconfig --add xcp-networkd From d8a205732985963f3197cc662d599b0b567eacef Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 20:15:53 +0000 Subject: [PATCH 1043/1125] Build libnl3 by default If a distro has it, then it should be placed in the per-distro exclude file. Signed-off-by: David Scott --- ignore.default | 1 - 1 file changed, 1 deletion(-) diff --git a/ignore.default b/ignore.default index 29ee9bc9..e69de29b 100644 --- a/ignore.default +++ b/ignore.default @@ -1 +0,0 @@ -libnl3 From 10af53462bf917a8edfec3d7361bd843092a0ce2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 21:26:56 +0000 Subject: [PATCH 1044/1125] xcp-networkd: install the manpage Signed-off-by: David Scott --- SPECS/xcp-networkd.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec index 044c48bf..7223ed7b 100644 --- a/SPECS/xcp-networkd.spec +++ b/SPECS/xcp-networkd.spec @@ -51,6 +51,9 @@ install -m 0644 xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf mkdir -p %{buildroot}/etc/modprobe.d install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf +mkdir -p %{buildroot}%{_mandir}/man1 +cp xcp-networkd.1 %{buildroot}%{_mandir}/man1/xcp-networkd.1 +gzip %{buildroot}%{_mandir}/man1/xcp-networkd.1 %files %doc README.markdown LICENSE MAINTAINERS From 9380fd3fcefd303f2fcb7b836613894f72314bf5 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 09:51:53 +0000 Subject: [PATCH 1045/1125] Remove ocaml-libvhd dependency from xapi Partial workaround for [xapi-project/libvhd#4] Signed-off-by: David Scott --- SPECS/xapi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 60202639..01f8bf08 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.52 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz @@ -29,7 +29,7 @@ BuildRequires: omake BuildRequires: forkexecd-devel BuildRequires: ocaml-cdrom-devel BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-libvhd-devel +#BuildRequires: ocaml-libvhd-devel BuildRequires: ocaml-nbd-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-ounit-devel @@ -162,6 +162,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Thu Oct 2 2014 David Scott - 1.9.52-4 +- Remove ocaml-libvhd dependency + * Thu Sep 4 2014 Jon Ludlam - 1.9.52-3 - Remove xen-missing-headers dependency From 5d58b626ba36a8e42d3d45f9ce43e6cbb46b4122 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 09:57:32 +0000 Subject: [PATCH 1046/1125] xapi: remove ocaml-libvhd dependency rather than comment it out Signed-off-by: David Scott --- SPECS/xapi.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 01f8bf08..7a33f43f 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -29,7 +29,6 @@ BuildRequires: omake BuildRequires: forkexecd-devel BuildRequires: ocaml-cdrom-devel BuildRequires: ocaml-fd-send-recv-devel -#BuildRequires: ocaml-libvhd-devel BuildRequires: ocaml-nbd-devel BuildRequires: ocaml-oclock-devel BuildRequires: ocaml-ounit-devel From d2358690fda05b5b20da8a2243fe317c41b20ffe Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 2 Oct 2014 16:18:53 +0000 Subject: [PATCH 1047/1125] Remove ocaml-libvhd since it is hard to build. Completes workaround for [xapi-project/libvhd#4] Signed-off-by: David Scott --- SPECS/ffs.spec | 11 +++++-- SPECS/ocaml-libvhd.spec | 68 ----------------------------------------- SPECS/ocaml-vhd.spec | 5 ++- 3 files changed, 12 insertions(+), 72 deletions(-) delete mode 100644 SPECS/ocaml-libvhd.spec diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index f52dbdca..b8864b3f 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -1,5 +1,5 @@ Name: ffs -Version: 0.9.24 +Version: 0.9.25 Release: 1%{?dist} Summary: Simple flat file storage manager for the xapi toolstack License: LGPL @@ -14,7 +14,7 @@ BuildRequires: ocaml-xcp-idl-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cohttp-devel BuildRequires: ocaml-re-devel -BuildRequires: ocaml-libvhd-devel +BuildRequires: ocaml-vhd-devel BuildRequires: ocaml-tapctl-devel Requires: nfs-utils Requires: redhat-lsb-core @@ -32,7 +32,8 @@ make %install mkdir -p %{buildroot}/%{_sbindir} -install dist/build/ffs/ffs %{buildroot}/%{_sbindir}/ffs +mkdir -p %{buildroot}/%{_mandir}/man1 +make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} MANDIR=%{_mandir} mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs @@ -40,6 +41,7 @@ install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs %files %doc README.md LICENSE MAINTAINERS %{_sbindir}/ffs +%{_mandir}/man1/ffs.1.gz %{_sysconfdir}/init.d/ffs %post @@ -52,6 +54,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Thu Oct 2 2014 David Scott - 0.9.25-1 +- Update to 0.9.25 + * Thu Jan 16 2014 Euan Harris - 0.9.24-1 - Update to 0.9.24, with VDI.clone fix diff --git a/SPECS/ocaml-libvhd.spec b/SPECS/ocaml-libvhd.spec deleted file mode 100644 index 034d55c6..00000000 --- a/SPECS/ocaml-libvhd.spec +++ /dev/null @@ -1,68 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-libvhd -Version: 0.9.1 -Release: 3%{?dist} -Summary: VHD manipulation via libvhd -License: BSD3 -URL: https://github.com/xapi-project/libvhd -Source0: https://github.com/xapi-project/libvhd/archive/libvhd-%{version}/libvhd-%{version}.tar.gz -BuildRequires: libuuid-devel -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: xen-devel - -%description -Simple C bindings which allow .vhd files to be manipulated. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: libuuid-devel%{?_isa} -Requires: xen-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n libvhd-libvhd-%{version} - -%build -ocaml setup.ml -configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install - -%files -%doc ChangeLog -%doc README.md -%{_libdir}/ocaml/vhdlib -%exclude %{_libdir}/ocaml/vhdlib/*.a -%exclude %{_libdir}/ocaml/vhdlib/*.cmxa -%exclude %{_libdir}/ocaml/vhdlib/*.cmx -%exclude %{_libdir}/ocaml/vhdlib/*.mli -%{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so -%{_libdir}/ocaml/stublibs/dllvhdlib_stubs.so.owner - -%files devel -%{_libdir}/ocaml/vhdlib/*.a -%{_libdir}/ocaml/vhdlib/*.cmx -%{_libdir}/ocaml/vhdlib/*.cmxa -%{_libdir}/ocaml/vhdlib/*.mli - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.9.1-3 -- Remove dependency on xen-missing-headers - -* Fri May 30 2014 Euan Harris - 0.9.1-2 -- Split files correctly between base and devel packages - -* Wed May 29 2013 David Scott - 0.9.1-1 -- Initial package - diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec index 92c2a634..27357026 100644 --- a/SPECS/ocaml-vhd.spec +++ b/SPECS/ocaml-vhd.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-vhd -Version: 0.7.0 +Version: 0.7.2 Release: 1%{?dist} Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files License: LGPL2.1 + OCaml linking exception @@ -80,6 +80,9 @@ ocaml setup.ml -install %changelog +* Thu Oct 2 2014 David Scott - 0.7.2-1 +- Update to 0.7.2 + * Tue Apr 1 2014 Euan Harris - 0.7.0-1 - Update to 0.7.0 From c6ed35339c0fec9742726ad4dce6042206784347 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 3 Oct 2014 06:48:17 +0000 Subject: [PATCH 1048/1125] ffs: correct the tag name (v0.9.25) Signed-off-by: David Scott --- SPECS/ffs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index b8864b3f..8011426e 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: Simple flat file storage manager for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/ffs -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: ffs-init BuildRequires: ocaml BuildRequires: ocaml-findlib From 0cb2769cbaeb51e93fc01c592ec1b832ba8099cb Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 3 Oct 2014 08:29:33 +0000 Subject: [PATCH 1049/1125] ffs: install and compress the manpage This seems to be automatic on CentOS but not on Debian/Ubuntu Signed-off-by: David Scott --- SPECS/ffs.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec index 8011426e..8e89a907 100644 --- a/SPECS/ffs.spec +++ b/SPECS/ffs.spec @@ -36,7 +36,8 @@ mkdir -p %{buildroot}/%{_mandir}/man1 make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} MANDIR=%{_mandir} mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs - +cp ffs.1 %{buildroot}%{_mandir}/man1/ffs.1 +gzip %{buildroot}%{_mandir}/man1/ffs.1 %files %doc README.md LICENSE MAINTAINERS From ad16ea3283dcde47f7a7e224f1476421de2af2cf Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 3 Oct 2014 10:18:05 +0000 Subject: [PATCH 1050/1125] ffs: update init.d following cmdliner change Signed-off-by: David Scott --- SOURCES/ffs-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init index a0c34985..fca5251a 100755 --- a/SOURCES/ffs-init +++ b/SOURCES/ffs-init @@ -51,7 +51,7 @@ start() { umask 077 echo -n $"Starting ffs: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $FFS_OPTIONS + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $FFS_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile From 3e4354e9d5b02ccbe1c9d724bd73082ac064770e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 29 Sep 2014 15:23:13 +0100 Subject: [PATCH 1051/1125] Makefile: Remove queueing script for repository database updates --- Makefile | 35 ++++---------- scripts/rpm/configure.sh | 7 +++ scripts/runonce_queue.sh | 100 --------------------------------------- 3 files changed, 17 insertions(+), 125 deletions(-) delete mode 100755 scripts/runonce_queue.sh diff --git a/Makefile b/Makefile index 3cd91807..ac7ab36e 100644 --- a/Makefile +++ b/Makefile @@ -4,44 +4,29 @@ DIST := .el6 all: rpms -clean: - [ ! -e srpm_output.log ] || rm srpm_output.log - [ ! -e rpm_output.log ] || rm rpm_output.log - [ ! -e deps ] || rm deps - rm -rf RPMS SRPMS .RPMS* .SRPMS* - -SRPMS/.stamp: - mkdir -p SRPMS - createrepo --quiet SRPMS - touch $@ - -RPMS/.stamp: - mkdir -p RPMS - createrepo --quiet RPMS - touch $@ # RPM build rules -%.src.rpm: SRPMS/.stamp +%.src.rpm: @echo [RPMBUILD] $@ - @rpmbuild --define "_topdir ." --define "%dist $(DIST)" -bs $(word 2,$^) >> srpm_output.log 2>&1 + @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< @echo [CREATEREPO] $@ - @scripts/runonce_queue.sh SRPMS 30 $@ createrepo --update ./SRPMS >> srpm_output.log 2>&1 + @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS -%.rpm: RPMS/.stamp +%.rpm: @echo [MOCK] $@ - @mock --configdir=mock -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $(word 2,$^) >> rpm_output.log 2>&1 + @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< @echo [CREATEREPO] $@ - @scripts/runonce_queue.sh RPMS 30 $@ createrepo --update ./RPMS >> rpm_output.log 2>&1 + @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS # Deb build rules %.dsc: @echo [MAKEDEB] $@ - @scripts/deb/makedeb.py $< >> srpm_output.log 2>&1 + @scripts/deb/makedeb.py $< @echo [UPDATEREPO] $@ - @scripts/runonce_queue.sh SRPMS 30 $@ scripts/deb/updaterepo sources SRPMS >> srpm_output.log 2>&1 + @flock --timeout 30 ./SRPMS scripts/deb/updaterepo sources SRPMS %.deb: @echo [COWBUILDER] $@ @@ -49,9 +34,9 @@ RPMS/.stamp: @touch RPMS/Packages @sudo cowbuilder --build \ --configfile pbuilder/pbuilderrc \ - --buildresult RPMS $< >> rpm_output.log 2>&1 + --buildresult RPMS $< @echo [UPDATEREPO] $@ - @scripts/runonce_queue.sh RPMS 30 $@ scripts/deb/updaterepo packages RPMS >> rpm_output.log 2>&1 + @flock --timeout 30 ./RPMS scripts/deb/updaterepo packages RPMS # Dependency build rules diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index b1b985c5..8ede0d6f 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -13,3 +13,10 @@ ln -fs /etc/mock/default.cfg mock/ ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ echo " done" + +echo -n "Initializing repository..." +mkdir -p RPMS SRPMS +createrepo --quiet RPMS +createrepo --quiet SRPMS +echo " done" + diff --git a/scripts/runonce_queue.sh b/scripts/runonce_queue.sh deleted file mode 100755 index 686501e6..00000000 --- a/scripts/runonce_queue.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -set -eu - -# Ensures only one process can call 'command' at any time -# Implements a FIFO queue so process starvation does not occur -# -# Use case is to run a command which processes everything -# in the queue at once, so when a job runs it clears out the -# queue to prevent multiple-processing -# -# Syntax: -# $0 [ ...] -# -# NOTE: the script may wait for 2 x timeout as the first timeout -# is waiting to become the head of the queue and the second -# timeout is waiting for to be available - -PID=$$ -echo "[$PID] $(date): $0 $*" - -# Consume args as we go so we can use $* to run later -lockfile=.${1//\//_} -shift -timeout=$1 -shift -token=${1//\//_} -shift - -queue_lockfile=${lockfile}.queue - -lock_entry="$PID:$token" -flock -w 1 $queue_lockfile -c "echo $lock_entry >> $queue_lockfile" - -# Wait for either us to be the head of the queue, or the queue to be empty -# (which can happen if someone else has run for us while we were waiting) -timeout $timeout bash << EOT -set -eu -while \$(flock -w 1 $queue_lockfile -c "grep -q $token $queue_lockfile") ; do - head=\$(flock -w 1 $queue_lockfile -c "head -n1 $queue_lockfile") # PID:token - head_pid=\${head%%:*} - head_token=\${head#*:} - if [ "\$head_token" == "$token" ] ; then - echo "[$PID] $token is now head" - exit 0 - fi - echo "[$PID] Not head yet (\$head_token) is head. Waiting for \$head_pid to complete" - set +e - wait \$head_pid - set -e - - # Remove the head now it's not running - flock -w 1 $queue_lockfile -c "sed -i '/^\$head\\\$/d' $queue_lockfile" -done -echo "[$PID] $token not in the queue any more" -EOT - -if $(flock -w 1 $queue_lockfile -c "grep -q $token ${queue_lockfile}.completed"); then - echo "[$PID] Now present in completed file thanks" - exit 0 -fi -echo "[$PID] Not run by anyone else yet" - -# We only need to run this command once for all in the queue -# Use the actual lock now, so it doesn't matter if we change the queue, no one else -# will get in here. -echo "[$PID] $(date) wants lock $lockfile" -( -# Use flock to protect this whole block of code; fd 9 is redirected to $lockfile at the end of the block -# Use a custom exit code so it's clear where the failure occured -flock -w $timeout 9 || exit 76 -echo "[$PID] $(date) got lock $lockfile" - -# Make sure we're still at the head of the queue; a previous run_once lock might have run for us -head=$(head -n1 $queue_lockfile) -if [ "$head" == "$lock_entry" ]; then - - # Use flock to protect this whole block of code; fd 8 is redirected to $queue_lockfile at the end of the block - ( - flock -w 1 8 || exit 74 - cat $queue_lockfile > ${queue_lockfile}.running - ) 8>>$queue_lockfile - - # Log (if we're logging) who we are running the jobs for, then actually run it - echo "[$PID] Running jobs for:" - cat ${queue_lockfile}.running - $* - - # Use flock to protect this whole block of code; fd 8 is redirected to $queue_lockfile at the end of the block - ( - flock -w 1 8 || exit 75 - set +e - # Grep will 'fail' if there are no lines left after removing those running - grep -v -f ${queue_lockfile}.running ${queue_lockfile} > ${queue_lockfile}.new - set -e - mv ${queue_lockfile}.new ${queue_lockfile} - cat ${queue_lockfile}.running >> ${queue_lockfile}.completed - ) 8>>$queue_lockfile -fi -) 9>>$lockfile -echo "[$PID] $(date) released lock $lockfile" From 9874186f910bd914364978d52e9034446e26858d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 11:12:51 +0100 Subject: [PATCH 1052/1125] Makefile: Create SRPM repository metadata after all SRPMS are created It is not necessary to rebuild the SRPM repository metadata after each SRPM is built. Build it once, at the end. Signed-off-by: Euan Harris --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ac7ab36e..67ffd2b5 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,17 @@ DIST := .el6 -.PHONY: all rpms srpms - -all: rpms +.PHONY: all rpms srpms srpm_repo +all: rpms srpm_repo # RPM build rules %.src.rpm: @echo [RPMBUILD] $@ @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< - @echo [CREATEREPO] $@ + +srpm_repo: srpms + echo [CREATEREPO] SRPMS @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS %.rpm: @@ -20,6 +21,7 @@ all: rpms @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS + # Deb build rules %.dsc: @@ -30,8 +32,7 @@ all: rpms %.deb: @echo [COWBUILDER] $@ - @mkdir -p logs - @touch RPMS/Packages + @touch RPMS/Packages @sudo cowbuilder --build \ --configfile pbuilder/pbuilderrc \ --buildresult RPMS $< From e56abec9e1a5b67f21cc5323e7dff0600531e77f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 2 Oct 2014 12:05:25 +0100 Subject: [PATCH 1053/1125] Makefile: Add documentation Signed-off-by: Euan Harris --- Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 67ffd2b5..ca9b272a 100644 --- a/Makefile +++ b/Makefile @@ -4,32 +4,62 @@ DIST := .el6 all: rpms srpm_repo -# RPM build rules - -%.src.rpm: - @echo [RPMBUILD] $@ - @rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $< +############################################################################ +# RPM build rules +############################################################################ + +# Build a source RPM from a Spec file and a tarball. We define %dist +# to ensure that the names of the source RPMs, which are built outside the +# mock chroot, match the names of the binary RPMs, which are built inside +# the chroot. Without this we might generate foo-1.0.fc20.src.rpm +# (Fedora host) and foo-1.0.el6.x86_64.rpm (CentOS chroot). +%.src.rpm: + @echo [RPMBUILD] $@ + @rpmbuild --quiet --define "_topdir ." \ + --define "%dist $(DIST)" -bs $< + +# Phony target to create repository metadata for the SRPMs. This makes +# it possible to add the SRPMS directory to yum.conf and use yumdownloader +# to install source RPMs. srpm_repo: srpms echo [CREATEREPO] SRPMS @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS +# Build one or more binary RPMs from a source RPM. A typical source RPM +# might produce a base binary RPM, a -devel binary RPM containing library +# and header files and a -debuginfo binary RPM containing debug symbols. +# The repository metadata is updated after building a binary package so that +# a subsequent mock build for a package which depend on this one is able +# to find and install it. %.rpm: @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< + @mock --configdir=mock --quiet -r xenserver \ + --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< @echo [CREATEREPO] $@ @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS - +############################################################################ # Deb build rules +############################################################################ +# Build a Debian source package from a Spec file and a tarball. +# makedeb.py loads the Spec file, generates an equivalent Debian source +# directory structure, then runs 'dpkg-source' to create the .dsc file. +# The conversion is basic, but works fairly well for straightforward Spec +# files. %.dsc: @echo [MAKEDEB] $@ @scripts/deb/makedeb.py $< @echo [UPDATEREPO] $@ @flock --timeout 30 ./SRPMS scripts/deb/updaterepo sources SRPMS +# Build one or more binary Debian packages from from a source package. +# As with the RPM build, a typical source package might produce several +# binary packages. The repository metadata is updated after building a +# binary package so that a subsequent build for a package which depends +# on this one is able to find and install it. %.deb: @echo [COWBUILDER] $@ @touch RPMS/Packages @@ -40,8 +70,13 @@ srpm_repo: srpms @flock --timeout 30 ./RPMS scripts/deb/updaterepo packages RPMS +############################################################################ # Dependency build rules +############################################################################ +# Generate dependency rules linking spec files to tarballs, source +# packages and binary packages. specdep.py generates rules suitable +# for RPM or Debian builds depending on the host distribution. deps: SPECS/*.spec specdep.py scripts/lib/mappkgname.py @echo Updating dependencies... @./specdep.py -d $(DIST) --ignore-from ignore SPECS/*.spec > $@ From 832612f5b5fd9abaf7a850b348738eb8c8b3aa57 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 20 Jul 2014 09:45:06 +0000 Subject: [PATCH 1054/1125] Add ocamlscript.2.0.3 Signed-off-by: David Scott --- SPECS/ocamlscript.spec | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 SPECS/ocamlscript.spec diff --git a/SPECS/ocamlscript.spec b/SPECS/ocamlscript.spec new file mode 100644 index 00000000..5ff2bef6 --- /dev/null +++ b/SPECS/ocamlscript.spec @@ -0,0 +1,46 @@ +%define debug_package %{nil} + +Name: ocamlscript +Version: 2.0.3 +Release: 1%{?dist} +Summary: OCamlscript is a tool which compiles OCaml scripts into native code, thus combining mthe flexibility of scripts and the speed provided by ocamlopt. +License: Boost +URL: http://mjambon.com/ocamlscript.html +Source0: https://github.com/mjambon/ocamlscript/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib + +%description +OCamlscript is a tool which compiles OCaml scripts into native code, thus combining mthe flexibility of scripts and the speed provided by ocamlopt. + +%prep +%setup -q + +%build +make + +%install +mkdir -p %{buildroot}%{_bindir} +install -m 0755 ocamlscript %{buildroot}%{_bindir}/ocamlscript + +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +mkdir -p ${OCAMLFIND_DESTDIR} +export OCAMLFIND_LDCONF=ignore +ocamlfind install ocamlscript META ocamlscript.cmi ocamlscript.cmo ocamlscript.cmx ocamlscript.o + +%files +%doc Changes +%doc README.md +%{_bindir}/ocamlscript +%{_libdir}/ocaml/ocamlscript +%{_libdir}/ocaml/ocamlscript/META +%{_libdir}/ocaml/ocamlscript/ocamlscript.cmi +%{_libdir}/ocaml/ocamlscript/ocamlscript.cmo +%{_libdir}/ocaml/ocamlscript/ocamlscript.cmx +%{_libdir}/ocaml/ocamlscript/ocamlscript.o + +%changelog +* Sun Jul 20 2014 David Scott - 2.0.3-1 +- Initial package From c992e84adfa8c64d84da37400d1dec60b5f2c8f2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 20 Jul 2014 10:25:11 +0000 Subject: [PATCH 1055/1125] ocamlscript: README.md -> README Signed-off-by: David Scott --- SPECS/ocamlscript.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/ocamlscript.spec b/SPECS/ocamlscript.spec index 5ff2bef6..9da7f5bd 100644 --- a/SPECS/ocamlscript.spec +++ b/SPECS/ocamlscript.spec @@ -32,7 +32,7 @@ ocamlfind install ocamlscript META ocamlscript.cmi ocamlscript.cmo ocamlscript.c %files %doc Changes -%doc README.md +%doc README %{_bindir}/ocamlscript %{_libdir}/ocaml/ocamlscript %{_libdir}/ocaml/ocamlscript/META From ffd24cf966e1b2091b9d1e6bbae6826eb85d7b79 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 3 Oct 2014 17:42:49 +0100 Subject: [PATCH 1056/1125] Use the talex5's stable 4.4 branch of xen rather than 4.5 Signed-off-by: Jon Ludlam --- scripts/deb/templates/pbuilderrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc index c7c09cf1..86393056 100644 --- a/scripts/deb/templates/pbuilderrc +++ b/scripts/deb/templates/pbuilderrc @@ -1,5 +1,5 @@ MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./ |deb http://xenbits.xenproject.org/djs/linaro-xen-4-5-preview/ ./ |deb-src file:@PWD@/SRPMS/ ./\ +OTHERMIRROR="deb file:@PWD@/RPMS/ ./ |deb http://xenbits.xenproject.org/djs/linaro-xen-4-4-talex5/ ./ |deb-src file:@PWD@/SRPMS/ ./\ @APT_REPOS@" BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" HOOKDIR="@PWD@/pbuilder" From b9b00b7bdd1367fce2e4df0bd3d99a59e985d83f Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 9 Oct 2014 14:33:14 +0100 Subject: [PATCH 1057/1125] Makefile: Don't build the srpms repository by default Currently the Debian and RPM builds share the rpms and srpms targets, and the srpms_repo rule tries to run createrepo which is not appropriate and will fail on Debian. The srpms_repo target is a convenience, not needed for building binary packages. It will return after we separate the targets used for building .debs and .rpms. Signed-off-by: Euan Harris --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ca9b272a..0e23b3ce 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ DIST := .el6 .PHONY: all rpms srpms srpm_repo -all: rpms srpm_repo +all: rpms ############################################################################ From b00611db00ee8ad79781ca0a8cf72645ccf46d1c Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 9 Oct 2014 16:33:32 +0100 Subject: [PATCH 1058/1125] configure: Make xenserver.cfg the default in our mock configuration Previously we installed our mock configuration as mock/xenserver.cfg and linked mock/default.cfg to /mock/default.cfg. We don't need the system's default.cfg, so we can install our configuration as mock/default.cfg. This means we no longer have to pass the -r flag to mock. Signed-off-by: Euan Harris --- Makefile | 2 +- scripts/rpm/configure.sh | 3 +-- scripts/rpm/{xenserver.cfg.in => mock-default.cfg.in} | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename scripts/rpm/{xenserver.cfg.in => mock-default.cfg.in} (100%) diff --git a/Makefile b/Makefile index 0e23b3ce..7a1f4afd 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ srpm_repo: srpms # to find and install it. %.rpm: @echo [MOCK] $@ - @mock --configdir=mock --quiet -r xenserver \ + @mock --configdir=mock --quiet \ --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $< @echo [CREATEREPO] $@ @flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh index 8ede0d6f..cce619d5 100755 --- a/scripts/rpm/configure.sh +++ b/scripts/rpm/configure.sh @@ -8,8 +8,7 @@ rpm -q $DEPS >/dev/null 2>&1 || sudo yum install -y $DEPS echo -n "Writing mock configuration..." mkdir -p mock -sed -e "s|@PWD@|$PWD|g" scripts/rpm/xenserver.cfg.in > mock/xenserver.cfg -ln -fs /etc/mock/default.cfg mock/ +sed -e "s|@PWD@|$PWD|g" scripts/rpm/mock-default.cfg.in > mock/default.cfg ln -fs /etc/mock/site-defaults.cfg mock/ ln -fs /etc/mock/logging.ini mock/ echo " done" diff --git a/scripts/rpm/xenserver.cfg.in b/scripts/rpm/mock-default.cfg.in similarity index 100% rename from scripts/rpm/xenserver.cfg.in rename to scripts/rpm/mock-default.cfg.in From 9d360586f79b0936aa637043bb2ffa335974ff38 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 9 Oct 2014 16:52:58 +0100 Subject: [PATCH 1059/1125] Makefile: Restore clean target Signed-off-by: Euan Harris --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 7a1f4afd..fd2733ce 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,11 @@ DIST := .el6 all: rpms +.PHONY: clean +clean: + rm -rf deps RPMS SRPMS + + ############################################################################ # RPM build rules From 482e4584befc93fe6bc4a8fae15796cb573a158a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 9 Oct 2014 17:09:26 +0100 Subject: [PATCH 1060/1125] libnl3, xcp-python-libs: Use Source0: instead of Source: Signed-off-by: Euan Harris --- SPECS/libnl3.spec | 2 +- SPECS/xcp-python-libs.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index b519adca..f7d2d87d 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -4,7 +4,7 @@ Name: libnl3 Version: 3.2.22 Release: 1%{?dist} URL: http://www.infradead.org/~tgr/libnl/ -Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz +Source0: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{version}.tar.gz BuildRequires: bison BuildRequires: flex diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec index 7b71352c..1c55ecec 100644 --- a/SPECS/xcp-python-libs.spec +++ b/SPECS/xcp-python-libs.spec @@ -3,7 +3,7 @@ Name: xcp-python-libs Version: 1.9.0 Release: 1%{?dist} URL: https://github.com/xenserver/python-libs -Source: https://github.com/xenserver/python-libs/archive/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/xenserver/python-libs/archive/v%{version}/%{name}-%{version}.tar.gz License: GPL BuildArch: noarch From af7bba95d506274e446f218f667d1b7b9d071740 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 10 Oct 2014 09:30:17 +0100 Subject: [PATCH 1061/1125] openstack-xapi-plugins: Remove package We don't need to carry this package as anyone wanting to run OpenStack can install the plugins from upstream, for example by using devstack. Signed-off-by: Euan Harris --- SPECS/openstack-xapi-plugins.spec | 41 ------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 SPECS/openstack-xapi-plugins.spec diff --git a/SPECS/openstack-xapi-plugins.spec b/SPECS/openstack-xapi-plugins.spec deleted file mode 100644 index c86d75c0..00000000 --- a/SPECS/openstack-xapi-plugins.spec +++ /dev/null @@ -1,41 +0,0 @@ -Name: openstack-xapi-plugins -Version: 2014.1 -Release: 1%{?dist} -Summary: XenAPI plugins from OpenStack -License: ASL 2.0 -URL: https://launchpad.net/nova/icehouse -Source0: https://launchpad.net/nova/icehouse/%{version}/+download/nova-%{version}.tar.gz -BuildArch: noarch -BuildRequires: python-setuptools - -%define debug_package %{nil} - -%description -XenAPI plugins used by OpenStack to control XenServer. - -%prep -%setup -q -n nova-%{version} - -%build -# This package does not have a build step - -%install -mkdir -p %{buildroot}/usr/lib/xapi/plugins -cp -r plugins/xenserver/xenapi/etc/xapi.d/plugins/* %{buildroot}/usr/lib/xapi/plugins/ - -%files -/usr/lib/xapi/plugins/* - -%changelog -* Thu May 22 2014 Antony Messerli - 2014.1-1 -- Update to Icehouse release - -* Wed Nov 20 2013 Euan Harris - 2013.2-1 -- Update to Havana release - -* Wed Jul 3 2013 David Scott -- Tweak plugins directory to match xapi - -* Fri Jun 28 2013 Euan Harris -- Initial package - From 1ba6aa8cc9165804777cc2d428857abe2b96b771 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 14 Oct 2014 17:12:40 +0000 Subject: [PATCH 1062/1125] Import Core from Fedora From: http://hans.math.upenn.edu/~edvardf/fedora-ocaml/SPECS/ Signed-off-by: David Scott --- SPECS/ocaml-async-core.spec | 103 +++++++++++++++++++ SPECS/ocaml-async-extra.spec | 106 ++++++++++++++++++++ SPECS/ocaml-async-find.spec | 95 ++++++++++++++++++ SPECS/ocaml-async-inotify.spec | 95 ++++++++++++++++++ SPECS/ocaml-async-unix.spec | 105 ++++++++++++++++++++ SPECS/ocaml-async.spec | 97 ++++++++++++++++++ SPECS/ocaml-bin-prot.spec | 174 +++++++++++++++++++++++++++++++++ SPECS/ocaml-comparelib.spec | 98 +++++++++++++++++++ SPECS/ocaml-core-bench.spec | 114 +++++++++++++++++++++ SPECS/ocaml-core-kernel.spec | 118 ++++++++++++++++++++++ SPECS/ocaml-core.spec | 121 +++++++++++++++++++++++ SPECS/ocaml-herelib.spec | 100 +++++++++++++++++++ SPECS/ocaml-inotify.spec | 101 +++++++++++++++++++ SPECS/ocaml-pa-bench.spec | 100 +++++++++++++++++++ SPECS/ocaml-pa-ounit.spec | 100 +++++++++++++++++++ SPECS/ocaml-pa-pipebang.spec | 100 +++++++++++++++++++ SPECS/ocaml-pa-test.spec | 101 +++++++++++++++++++ SPECS/ocaml-textutils.spec | 104 ++++++++++++++++++++ SPECS/ocaml-typerep.spec | 117 ++++++++++++++++++++++ SPECS/ocaml-variantslib.spec | 97 ++++++++++++++++++ 20 files changed, 2146 insertions(+) create mode 100644 SPECS/ocaml-async-core.spec create mode 100644 SPECS/ocaml-async-extra.spec create mode 100644 SPECS/ocaml-async-find.spec create mode 100644 SPECS/ocaml-async-inotify.spec create mode 100644 SPECS/ocaml-async-unix.spec create mode 100644 SPECS/ocaml-async.spec create mode 100644 SPECS/ocaml-bin-prot.spec create mode 100644 SPECS/ocaml-comparelib.spec create mode 100644 SPECS/ocaml-core-bench.spec create mode 100644 SPECS/ocaml-core-kernel.spec create mode 100644 SPECS/ocaml-core.spec create mode 100644 SPECS/ocaml-herelib.spec create mode 100644 SPECS/ocaml-inotify.spec create mode 100644 SPECS/ocaml-pa-bench.spec create mode 100644 SPECS/ocaml-pa-ounit.spec create mode 100644 SPECS/ocaml-pa-pipebang.spec create mode 100644 SPECS/ocaml-pa-test.spec create mode 100644 SPECS/ocaml-textutils.spec create mode 100644 SPECS/ocaml-typerep.spec create mode 100644 SPECS/ocaml-variantslib.spec diff --git a/SPECS/ocaml-async-core.spec b/SPECS/ocaml-async-core.spec new file mode 100644 index 00000000..6fdb546d --- /dev/null +++ b/SPECS/ocaml-async-core.spec @@ -0,0 +1,103 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async-core +Version: 109.55.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async_kernel +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_core-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-bin-prot-devel +BuildRequires: ocaml-core-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-herelib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async_core-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async_core +%if %opt +%exclude %{_libdir}/ocaml/async_core/*.a +%exclude %{_libdir}/ocaml/async_core/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async_core/*.ml +%exclude %{_libdir}/ocaml/async_core/*.mli + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async_core/*.a +%{_libdir}/ocaml/async_core/*.cmxa +%endif +%{_libdir}/ocaml/async_core/*.ml +%{_libdir}/ocaml/async_core/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-extra.spec b/SPECS/ocaml-async-extra.spec new file mode 100644 index 00000000..5ddac818 --- /dev/null +++ b/SPECS/ocaml-async-extra.spec @@ -0,0 +1,106 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async-extra +Version: 109.55.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async_extra +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_extra-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-async-core-devel +BuildRequires: ocaml-async-unix-devel +BuildRequires: ocaml-bin-prot-devel +BuildRequires: ocaml-core-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-pa-pipebang-devel +BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-sexplib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async_extra-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async_extra +%if %opt +%exclude %{_libdir}/ocaml/async_extra/*.a +%exclude %{_libdir}/ocaml/async_extra/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async_extra/*.ml +%exclude %{_libdir}/ocaml/async_extra/*.mli + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async_extra/*.a +%{_libdir}/ocaml/async_extra/*.cmxa +%endif +%{_libdir}/ocaml/async_extra/*.ml +%{_libdir}/ocaml/async_extra/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-find.spec b/SPECS/ocaml-async-find.spec new file mode 100644 index 00000000..8680e492 --- /dev/null +++ b/SPECS/ocaml-async-find.spec @@ -0,0 +1,95 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async-find +Version: 109.15.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async_find +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_find-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-async-devel +BuildRequires: ocaml-sexplib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async_find-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async_find +%if %opt +%exclude %{_libdir}/ocaml/async_find/*.a +%exclude %{_libdir}/ocaml/async_find/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async_find/*.mli + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async_find/*.a +%{_libdir}/ocaml/async_find/*.cmxa +%endif +%{_libdir}/ocaml/async_find/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.15.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec new file mode 100644 index 00000000..608f57c9 --- /dev/null +++ b/SPECS/ocaml-async-inotify.spec @@ -0,0 +1,95 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async-inotify +Version: 109.34.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async_inotify +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_inotify-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-async-devel +BuildRequires: ocaml-sexplib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async_inotify-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async_inotify +%if %opt +%exclude %{_libdir}/ocaml/async_inotify/*.a +%exclude %{_libdir}/ocaml/async_inotify/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async_inotify/*.mli + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async_inotify/*.a +%{_libdir}/ocaml/async_inotify/*.cmxa +%endif +%{_libdir}/ocaml/async_inotify/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.34.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-unix.spec b/SPECS/ocaml-async-unix.spec new file mode 100644 index 00000000..da833caf --- /dev/null +++ b/SPECS/ocaml-async-unix.spec @@ -0,0 +1,105 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async-unix +Version: 109.55.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async_unix +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_unix-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-async-core-devel +BuildRequires: ocaml-bin-prot-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-core-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-sexplib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async_unix-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async_unix +%if %opt +%exclude %{_libdir}/ocaml/async_unix/*.a +%exclude %{_libdir}/ocaml/async_unix/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async_unix/*.ml +%exclude %{_libdir}/ocaml/async_unix/*.mli + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async_unix/*.a +%{_libdir}/ocaml/async_unix/*.cmxa +%endif +%{_libdir}/ocaml/async_unix/*.ml +%{_libdir}/ocaml/async_unix/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec new file mode 100644 index 00000000..a04b1646 --- /dev/null +++ b/SPECS/ocaml-async.spec @@ -0,0 +1,97 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-async +Version: 109.53.02 +Release: 1%{?dist} +Summary: Jane Street Capital's asynchronous execution library (core) + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/async +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-async-core-devel +BuildRequires: ocaml-async-unix-devel +BuildRequires: ocaml-async-extra-devel +BuildRequires: ocaml-ounit-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street Capital's asynchronous execution library (core). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n async-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/async +%if %opt +%exclude %{_libdir}/ocaml/async/*.a +%exclude %{_libdir}/ocaml/async/*.cmxa +%endif +%exclude %{_libdir}/ocaml/async/*.ml + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/async/*.a +%{_libdir}/ocaml/async/*.cmxa +%endif +%{_libdir}/ocaml/async/*.ml + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-bin-prot.spec b/SPECS/ocaml-bin-prot.spec new file mode 100644 index 00000000..48292a76 --- /dev/null +++ b/SPECS/ocaml-bin-prot.spec @@ -0,0 +1,174 @@ +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} + +Name: ocaml-bin-prot +Version: 109.53.02 +Release: 1%{?dist} +Summary: Read and write OCaml values in a type-safe binary protocol + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: http://forge.ocamlcore.org/projects/bin_prot +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/bin_prot-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: ocaml >= 3.12.0 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-type-conv >= 109.53.02 +BuildRequires: chrpath + + +%description +This library contains functionality for reading and writing OCaml +values in a type-safe binary protocol. These functions are extremely +efficient and provide users with a convenient and safe way of +performing I/O on any extensionally defined data type. This means that +functions, objects, and values whose type is bound through a +polymorphic record field are not supported, but everything else is. + +As of now, there is no support for cyclic or shared values. Cyclic +values will lead to non-termination whereas shared values, besides +requiring significantly more space when encoded, may lead to a +substantial increase in memory footprint when they are read back in. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n bin_prot-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt LICENSE-Tywith.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/bin_prot +%if %opt +%exclude %{_libdir}/ocaml/bin_prot/*.a +%exclude %{_libdir}/ocaml/bin_prot/*.cmxa +%endif +%exclude %{_libdir}/ocaml/bin_prot/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + + +%files devel +%defattr(-,root,root,-) +%doc CHANGES.txt README.md TODO.txt +%if %opt +%{_libdir}/ocaml/bin_prot/*.a +%{_libdir}/ocaml/bin_prot/*.cmxa +%endif +%{_libdir}/ocaml/bin_prot/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 +- Update to version 109.53.02. + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 30 2012 Richard W.M. Jones - 2.0.9-3 +- Rebuild for OCaml 4.00.1. + +* Fri Jul 20 2012 Fedora Release Engineering - 2.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Richard W.M. Jones - 2.0.9-1 +- New upstream version 2.0.9. +- Recompile for OCaml 4.00.0. + +* Thu Jan 12 2012 Richard W.M. Jones - 2.0.7-1 +- New upstream version 2.0.7. +- Rebuild for OCaml 3.12.1. + +* Wed Sep 28 2011 Michael Ekstrand - 2.0.6-1 +- New upstream version from forge.ocamlcore.org (#741484) + +* Tue Feb 08 2011 Fedora Release Engineering - 1.2.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 6 2011 Richard W.M. Jones - 1.2.24-1 +- New upstream version 1.2.24. +- Fix upstream URL. +- Rebuild for OCaml 3.12.0. + +* Mon Jan 11 2010 Richard W.M. Jones - 1.2.21-1 +- New upstream version 1.2.21. +- Change %%define to %%global. +- Use upstream RPM 4.8 OCaml dependency generator. + +* Mon Nov 9 2009 Richard W.M. Jones - 1.2.20-2 +- The final license of the code is LGPLv2+ with the OCaml linking + exception. It was derived from earlier BSD code. +- Don't duplicate the license files across base and -devel packages. +- Add note to spec about inclusion of *.ml file in -devel package. + +* Mon Oct 12 2009 Richard W.M. Jones - 1.2.20-1 +- New upstream version 1.2.20. + +* Sat Sep 5 2009 Richard W.M. Jones - 1.2.18-1 +- New upstream version 1.2.18. + +* Fri May 16 2008 Richard W.M. Jones - 1.0.5-3 +- Force signed chars when compiling, as per comment from upstream author. +- Remove the part in the description which says this is only + supported on little endian architectures. + +* Mon May 12 2008 Richard W.M. Jones - 1.0.5-2 +- Remove ExclusiveArch, but add a Fedora README file warning about + shortcomings on non-x86 architectures. +- Added missing dependency ocaml-type-conv. +- Move *.ml file to devel package. + +* Sat May 3 2008 Richard W.M. Jones - 1.0.5-1 +- Initial RPM release. diff --git a/SPECS/ocaml-comparelib.spec b/SPECS/ocaml-comparelib.spec new file mode 100644 index 00000000..41874d25 --- /dev/null +++ b/SPECS/ocaml-comparelib.spec @@ -0,0 +1,98 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-comparelib +Version: 109.27.02 +Release: 1%{?dist} +Summary: Syntax extension that derives comparison functions from type representations. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/comparelib +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/comparelib-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv >= 109.53.02 + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description + + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n comparelib-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/comparelib +%if %opt +%exclude %{_libdir}/ocaml/comparelib/*.a +%exclude %{_libdir}/ocaml/comparelib/*.cmxa +%endif +%exclude %{_libdir}/ocaml/comparelib/*.ml + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/comparelib/*.a +%{_libdir}/ocaml/comparelib/*.cmxa +%endif +%{_libdir}/ocaml/comparelib/*.ml + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.27.02-1 +- Initial package for Fedora 20 diff --git a/SPECS/ocaml-core-bench.spec b/SPECS/ocaml-core-bench.spec new file mode 100644 index 00000000..06bb5af6 --- /dev/null +++ b/SPECS/ocaml-core-bench.spec @@ -0,0 +1,114 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-core-bench +Version: 109.55.02 +Release: 1%{?dist} +Summary: System-independent part of Jane Street's Core. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/core_bench +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core_bench-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-core-devel +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-textutils-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-core-extended-devel +BuildRequires: chrpath + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Core is an industrial-strength alternative to the OCaml standard +library. It was developed by Jane Street, which is the largest +industrial user of OCaml. Core_kernel is the system-independent +part of Core. It is aimed for cases when the full Core is not +available, such as in Javascript. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n core_bench-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README.md +%{_libdir}/ocaml/core_bench +%if %opt +%exclude %{_libdir}/ocaml/core_bench/*.a +%exclude %{_libdir}/ocaml/core_bench/*.cmxa +%endif +%exclude %{_libdir}/ocaml/core_bench/*.ml +%exclude %{_libdir}/ocaml/core_bench/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + +%files devel +%defattr(-,root,root,-) +%doc README.md +%if %opt +%{_libdir}/ocaml/core_bench/*.a +%{_libdir}/ocaml/core_bench/*.cmxa +%endif +%{_libdir}/ocaml/core_bench/*.ml +%{_libdir}/ocaml/core_bench/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-core-kernel.spec b/SPECS/ocaml-core-kernel.spec new file mode 100644 index 00000000..a2a21ba7 --- /dev/null +++ b/SPECS/ocaml-core-kernel.spec @@ -0,0 +1,118 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-core-kernel +Version: 109.55.02 +Release: 1%{?dist} +Summary: System-independent part of Jane Street's Core. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/core_kernel +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core_kernel-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-bin-prot-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-pa-bench-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-pa-pipebang-devel +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-typerep-devel +BuildRequires: ocaml-variantslib-devel +BuildRequires: ocaml-res-devel +BuildRequires: chrpath + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Core is an industrial-strength alternative to the OCaml standard +library. It was developed by Jane Street, which is the largest +industrial user of OCaml. Core_kernel is the system-independent +part of Core. It is aimed for cases when the full Core is not +available, such as in Javascript. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n core_kernel-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt MLton-license.txt +%{_libdir}/ocaml/core_kernel +%if %opt +%exclude %{_libdir}/ocaml/core_kernel/*.a +%exclude %{_libdir}/ocaml/core_kernel/*.cmxa +%endif +%exclude %{_libdir}/ocaml/core_kernel/*.ml +%exclude %{_libdir}/ocaml/core_kernel/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + +%files devel +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.md MLton-license.txt +%if %opt +%{_libdir}/ocaml/core_kernel/*.a +%{_libdir}/ocaml/core_kernel/*.cmxa +%endif +%{_libdir}/ocaml/core_kernel/*.ml +%{_libdir}/ocaml/core_kernel/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec new file mode 100644 index 00000000..f8a54acc --- /dev/null +++ b/SPECS/ocaml-core.spec @@ -0,0 +1,121 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-core +Version: 109.55.02 +Release: 1%{?dist} +Summary: System-independent part of Jane Street's Core. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/core_kernel +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-bin-prot-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-fieldslib-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-pa-bench-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-pa-pipebang-devel +BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-typerep-devel +BuildRequires: ocaml-variantslib-devel +BuildRequires: ocaml-compiler-libs +BuildRequires: ocaml-core-kernel-devel +BuildRequires: ocaml-res-devel +BuildRequires: chrpath + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Core is an industrial-strength alternative to the OCaml standard +library. It was developed by Jane Street, which is the largest +industrial user of OCaml. Core_kernel is the system-independent +part of Core. It is aimed for cases when the full Core is not +available, such as in Javascript. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n core-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt MLton-license.txt +%{_libdir}/ocaml/core +%if %opt +%exclude %{_libdir}/ocaml/core/*.a +%exclude %{_libdir}/ocaml/core/*.cmxa +%endif +%exclude %{_libdir}/ocaml/core/*.ml +%exclude %{_libdir}/ocaml/core/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + +%files devel +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.md MLton-license.txt +%if %opt +%{_libdir}/ocaml/core/*.a +%{_libdir}/ocaml/core/*.cmxa +%endif +%{_libdir}/ocaml/core/*.ml +%{_libdir}/ocaml/core/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-herelib.spec b/SPECS/ocaml-herelib.spec new file mode 100644 index 00000000..ce339109 --- /dev/null +++ b/SPECS/ocaml-herelib.spec @@ -0,0 +1,100 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-herelib +Version: 109.35.02 +Release: 1%{?dist} +Summary: Syntax extension for inserting the current location. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/herelib +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/herelib-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Syntax extension for inserting the current location. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n herelib-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/herelib +%if %opt +%exclude %{_libdir}/ocaml/herelib/*.a +%exclude %{_libdir}/ocaml/herelib/*.cmxa +%endif +%exclude %{_libdir}/ocaml/herelib/*.ml +%exclude %{_libdir}/ocaml/herelib/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/herelib/*.a +%{_libdir}/ocaml/herelib/*.cmxa +%endif +%{_libdir}/ocaml/herelib/*.ml +%{_libdir}/ocaml/herelib/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.35.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-inotify.spec b/SPECS/ocaml-inotify.spec new file mode 100644 index 00000000..ceabb18f --- /dev/null +++ b/SPECS/ocaml-inotify.spec @@ -0,0 +1,101 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-inotify +Version: 1.3 +Release: 1%{?dist} +Summary: Inotify bindings for OCaml. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://bitbucket.org/seanmcl/ocaml-inotify +Source0: https://bitbucket.org/seanmcl/ocaml-inotify/get/%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: chrpath + + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Inotify bindings for OCaml. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n seanmcl-ocaml-inotify-97ffca4c739e +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + +strip $OCAMLFIND_DESTDIR/stublibs/dll*.so +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{_libdir}/ocaml/inotify +%if %opt +%exclude %{_libdir}/ocaml/inotify/*.a +%exclude %{_libdir}/ocaml/inotify/*.cmxa +%endif +%exclude %{_libdir}/ocaml/inotify/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner +%{_bindir}/test-inotify + +%files devel +%defattr(-,root,root,-) +%doc LICENSE +%if %opt +%{_libdir}/ocaml/inotify/*.a +%{_libdir}/ocaml/inotify/*.cmxa +%endif +%{_libdir}/ocaml/inotify/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 1.3-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-pa-bench.spec b/SPECS/ocaml-pa-bench.spec new file mode 100644 index 00000000..be5fbe6a --- /dev/null +++ b/SPECS/ocaml-pa-bench.spec @@ -0,0 +1,100 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-pa-bench +Version: 109.55.02 +Release: 1%{?dist} +Summary: Syntax extension for inline benchmarks. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/pa_bench +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_bench-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-pa-ounit-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Syntax extension for inline benchmarks. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n pa_bench-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/pa_bench +%if %opt +%exclude %{_libdir}/ocaml/pa_bench/*.a +%exclude %{_libdir}/ocaml/pa_bench/*.cmxa +%endif +%exclude %{_libdir}/ocaml/pa_bench/*.ml +%exclude %{_libdir}/ocaml/pa_bench/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/pa_bench/*.a +%{_libdir}/ocaml/pa_bench/*.cmxa +%endif +%{_libdir}/ocaml/pa_bench/*.ml +%{_libdir}/ocaml/pa_bench/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-pa-ounit.spec b/SPECS/ocaml-pa-ounit.spec new file mode 100644 index 00000000..8cd0938b --- /dev/null +++ b/SPECS/ocaml-pa-ounit.spec @@ -0,0 +1,100 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-pa-ounit +Version: 109.53.02 +Release: 1%{?dist} +Summary: Syntax extension for in-line tests in code. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/pa_ounit +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_ounit-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ounit-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Pa_ounit is a syntax extension that helps writing in-line tests in ocaml code. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n pa_ounit-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt readme.md +%{_libdir}/ocaml/pa_ounit +%if %opt +%exclude %{_libdir}/ocaml/pa_ounit/*.a +%exclude %{_libdir}/ocaml/pa_ounit/*.cmxa +%endif +%exclude %{_libdir}/ocaml/pa_ounit/*.ml +%exclude %{_libdir}/ocaml/pa_ounit/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt readme.md +%if %opt +%{_libdir}/ocaml/pa_ounit/*.a +%{_libdir}/ocaml/pa_ounit/*.cmxa +%endif +%{_libdir}/ocaml/pa_ounit/*.ml +%{_libdir}/ocaml/pa_ounit/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 +- Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec new file mode 100644 index 00000000..99496975 --- /dev/null +++ b/SPECS/ocaml-pa-pipebang.spec @@ -0,0 +1,100 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +%define dlnode 832 + +Name: ocaml-pa-pipebang +Version: 109.28.02 +Release: 1%{?dist} +Summary: Syntax extension to transform x |! f into f x + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/pipebang +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pipebang-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +This package contains a simple syntax extension that transforms +x |! f onto f x. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n pipebang-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/pa_pipebang +%if %opt +%exclude %{_libdir}/ocaml/pa_pipebang/*.a +%exclude %{_libdir}/ocaml/pa_pipebang/*.cmxa +%endif +%exclude %{_libdir}/ocaml/pa_pipebang/*.ml + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/pa_pipebang/*.a +%{_libdir}/ocaml/pa_pipebang/*.cmxa +%endif +%{_libdir}/ocaml/pa_pipebang/*.ml + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.28.02-1 +- Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-test.spec b/SPECS/ocaml-pa-test.spec new file mode 100644 index 00000000..d7f0b4df --- /dev/null +++ b/SPECS/ocaml-pa-test.spec @@ -0,0 +1,101 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-pa-test +Version: 109.53.02 +Release: 1%{?dist} +Summary: Jane Street's pa_test + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/pa_test +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_test-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-type-conv +BuildRequires: ocaml-core-kernel-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Jane Street's pa_test. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n pa_test-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/pa_test +%if %opt +%exclude %{_libdir}/ocaml/pa_test/*.a +%exclude %{_libdir}/ocaml/pa_test/*.cmxa +%endif +%exclude %{_libdir}/ocaml/pa_test/*.ml +%exclude %{_libdir}/ocaml/pa_test/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/pa_test/*.a +%{_libdir}/ocaml/pa_test/*.cmxa +%endif +%{_libdir}/ocaml/pa_test/*.ml +%{_libdir}/ocaml/pa_test/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-textutils.spec b/SPECS/ocaml-textutils.spec new file mode 100644 index 00000000..1b191f45 --- /dev/null +++ b/SPECS/ocaml-textutils.spec @@ -0,0 +1,104 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-textutils +Version: 109.53.02 +Release: 1%{?dist} +Summary: Syntax extension for inserting the current location. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/textutils +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/textutils-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-async-devel +BuildRequires: ocaml-core-devel +BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-sexplib-devel + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Syntax extension for inserting the current location. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n textutils-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/textutils +%if %opt +%exclude %{_libdir}/ocaml/textutils/*.a +%exclude %{_libdir}/ocaml/textutils/*.cmxa +%endif +%exclude %{_libdir}/ocaml/textutils/*.ml +%exclude %{_libdir}/ocaml/textutils/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/textutils/*.a +%{_libdir}/ocaml/textutils/*.cmxa +%endif +%{_libdir}/ocaml/textutils/*.ml +%{_libdir}/ocaml/textutils/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.35.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-typerep.spec b/SPECS/ocaml-typerep.spec new file mode 100644 index 00000000..fd14f3c3 --- /dev/null +++ b/SPECS/ocaml-typerep.spec @@ -0,0 +1,117 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-typerep +Version: 109.55.02 +Release: 1%{?dist} +Summary: Runtime types for OCaml. + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/typerep +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/typerep-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-bin-prot >= 109.53.02 +BuildRequires: ocaml-sexplib >= 109.55.02 + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +Runtime types for OCaml. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n typerep-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/ +%if %opt +%exclude %{_libdir}/ocaml/typerep_kernel/*.a +%exclude %{_libdir}/ocaml/typerep_kernel/*.cmxa +%exclude %{_libdir}/ocaml/typerep_core/*.a +%exclude %{_libdir}/ocaml/typerep_core/*.cmxa +%exclude %{_libdir}/ocaml/typerep_kernel/*.a +%exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa +%endif +%exclude %{_libdir}/ocaml/typerep_kernel/*.ml +%exclude %{_libdir}/ocaml/typerep_kernel/*.mli +%exclude %{_libdir}/ocaml/typerep_core/*.ml +%exclude %{_libdir}/ocaml/typerep_core/*.mli +%exclude %{_libdir}/ocaml/typerep_kernel/*.ml +%exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%if %opt +%{_libdir}/ocaml/typerep_kernel/*.a +%{_libdir}/ocaml/typerep_kernel/*.cmxa +%{_libdir}/ocaml/typerep_core/*.a +%{_libdir}/ocaml/typerep_core/*.cmxa +%{_libdir}/ocaml/typerep_kernel/*.a +%{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa +%endif +%{_libdir}/ocaml/typerep_kernel/*.ml +%{_libdir}/ocaml/typerep_kernel/*.mli +%{_libdir}/ocaml/typerep_core/*.ml +%{_libdir}/ocaml/typerep_core/*.mli +%{_libdir}/ocaml/typerep_kernel/*.ml +%{_libdir}/ocaml/typerep_generics_sexprep/*.mli + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 +- Initial package for Fedora 20. diff --git a/SPECS/ocaml-variantslib.spec b/SPECS/ocaml-variantslib.spec new file mode 100644 index 00000000..c6c24d5d --- /dev/null +++ b/SPECS/ocaml-variantslib.spec @@ -0,0 +1,97 @@ +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%define debug_package %{nil} + +Name: ocaml-variantslib +Version: 109.15.02 +Release: 1%{?dist} +Summary: OCaml variants as first class values + +Group: Development/Libraries +License: Apache Software License 2.0 +URL: https://github.com/janestreet/variantslib +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/variantslib-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExcludeArch: sparc64 s390 s390x + +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv >= 109.53.02 + +%define _use_internal_dependency_generator 0 +%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh +%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh + + +%description +OCaml variants as first class values. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%setup -q -n variantslib-%{version} +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT + +%build +ocaml setup.ml -build + + +%check +ocaml setup.ml -test + + +%install +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +ocaml setup.ml -install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/variantslib +%if %opt +%exclude %{_libdir}/ocaml/variantslib/*.a +%exclude %{_libdir}/ocaml/variantslib/*.cmxa +%endif +%exclude %{_libdir}/ocaml/variantslib/*.mli + + +%files devel +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.txt +%if %opt +%{_libdir}/ocaml/variantslib/*.a +%{_libdir}/ocaml/variantslib/*.cmxa +%endif +%{_libdir}/ocaml/variantslib/*.mli + + +%changelog +* Wed Jan 01 2014 Edvard Fagerholm - 109.15.02-1 +- Initial package for Fedora 20. From d40a106290d5ced6d70d2d850fd0952548a7db62 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 14 Oct 2014 17:43:57 +0000 Subject: [PATCH 1063/1125] Update to a more recent version Signed-off-by: David Scott --- SPECS/ocaml-async-core.spec | 5 ++++- SPECS/ocaml-async-extra.spec | 5 ++++- SPECS/ocaml-async-find.spec | 5 ++++- SPECS/ocaml-async-inotify.spec | 5 ++++- SPECS/ocaml-async-unix.spec | 5 ++++- SPECS/ocaml-async.spec | 5 ++++- SPECS/ocaml-bin-prot.spec | 5 ++++- SPECS/ocaml-comparelib.spec | 5 ++++- SPECS/ocaml-core-bench.spec | 5 ++++- SPECS/ocaml-core-kernel.spec | 5 ++++- SPECS/ocaml-core.spec | 5 ++++- SPECS/ocaml-herelib.spec | 2 +- SPECS/ocaml-inotify.spec | 5 ++++- SPECS/ocaml-pa-bench.spec | 5 ++++- SPECS/ocaml-pa-ounit.spec | 5 ++++- SPECS/ocaml-pa-pipebang.spec | 5 ++++- SPECS/ocaml-pa-test.spec | 5 ++++- SPECS/ocaml-textutils.spec | 5 ++++- SPECS/ocaml-typerep.spec | 5 ++++- SPECS/ocaml-variantslib.spec | 2 +- 20 files changed, 74 insertions(+), 20 deletions(-) diff --git a/SPECS/ocaml-async-core.spec b/SPECS/ocaml-async-core.spec index 6fdb546d..6c115dd7 100644 --- a/SPECS/ocaml-async-core.spec +++ b/SPECS/ocaml-async-core.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async-core -Version: 109.55.02 +Version: 111.25.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -99,5 +99,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async_core/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.25.00-1 +- Update to 111.25.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-extra.spec b/SPECS/ocaml-async-extra.spec index 5ddac818..6f5d6215 100644 --- a/SPECS/ocaml-async-extra.spec +++ b/SPECS/ocaml-async-extra.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async-extra -Version: 109.55.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -102,5 +102,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async_extra/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-find.spec b/SPECS/ocaml-async-find.spec index 8680e492..4177776d 100644 --- a/SPECS/ocaml-async-find.spec +++ b/SPECS/ocaml-async-find.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async-find -Version: 109.15.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -91,5 +91,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async_find/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.15.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec index 608f57c9..c0804649 100644 --- a/SPECS/ocaml-async-inotify.spec +++ b/SPECS/ocaml-async-inotify.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async-inotify -Version: 109.34.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -91,5 +91,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async_inotify/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.34.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-unix.spec b/SPECS/ocaml-async-unix.spec index da833caf..00c11b04 100644 --- a/SPECS/ocaml-async-unix.spec +++ b/SPECS/ocaml-async-unix.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async-unix -Version: 109.55.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -101,5 +101,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async_unix/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec index a04b1646..67d9538c 100644 --- a/SPECS/ocaml-async.spec +++ b/SPECS/ocaml-async.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-async -Version: 109.53.02 +Version: 111.25.00 Release: 1%{?dist} Summary: Jane Street Capital's asynchronous execution library (core) @@ -93,5 +93,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/async/*.ml %changelog +* Tue Oct 14 2014 David Scott - 111.25.00-1 +- Update to 111.25.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-bin-prot.spec b/SPECS/ocaml-bin-prot.spec index 48292a76..63cefdee 100644 --- a/SPECS/ocaml-bin-prot.spec +++ b/SPECS/ocaml-bin-prot.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Name: ocaml-bin-prot -Version: 109.53.02 +Version: 111.03.00 Release: 1%{?dist} Summary: Read and write OCaml values in a type-safe binary protocol @@ -108,6 +108,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 111.03.00-1 +- Update to 111.03.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 - Update to version 109.53.02. diff --git a/SPECS/ocaml-comparelib.spec b/SPECS/ocaml-comparelib.spec index 41874d25..435c397b 100644 --- a/SPECS/ocaml-comparelib.spec +++ b/SPECS/ocaml-comparelib.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-comparelib -Version: 109.27.02 +Version: 109.60.00 Release: 1%{?dist} Summary: Syntax extension that derives comparison functions from type representations. @@ -94,5 +94,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 109.60.00-1 +- Update to 109.60.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.27.02-1 - Initial package for Fedora 20 diff --git a/SPECS/ocaml-core-bench.spec b/SPECS/ocaml-core-bench.spec index 06bb5af6..a5329e35 100644 --- a/SPECS/ocaml-core-bench.spec +++ b/SPECS/ocaml-core-bench.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-core-bench -Version: 109.55.02 +Version: 109.58.00 Release: 1%{?dist} Summary: System-independent part of Jane Street's Core. @@ -110,5 +110,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/core_bench/*.mli %changelog +* Tue Oct 14 2014 David Scott - 109.58.00-1 +- Update to 109.58.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-core-kernel.spec b/SPECS/ocaml-core-kernel.spec index a2a21ba7..36851337 100644 --- a/SPECS/ocaml-core-kernel.spec +++ b/SPECS/ocaml-core-kernel.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-core-kernel -Version: 109.55.02 +Version: 111.28.00 Release: 1%{?dist} Summary: System-independent part of Jane Street's Core. @@ -114,5 +114,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/core_kernel/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec index f8a54acc..d6f3c782 100644 --- a/SPECS/ocaml-core.spec +++ b/SPECS/ocaml-core.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-core -Version: 109.55.02 +Version: 111.28.00 Release: 1%{?dist} Summary: System-independent part of Jane Street's Core. @@ -117,5 +117,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/core/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-herelib.spec b/SPECS/ocaml-herelib.spec index ce339109..0db773ad 100644 --- a/SPECS/ocaml-herelib.spec +++ b/SPECS/ocaml-herelib.spec @@ -9,7 +9,7 @@ Summary: Syntax extension for inserting the current location. Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/herelib -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/herelib-%{version}.tar.gz +Source0: https://ocaml.janestreet.com/ocaml-core/109.35.00/individual/herelib-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x diff --git a/SPECS/ocaml-inotify.spec b/SPECS/ocaml-inotify.spec index ceabb18f..f4b91c39 100644 --- a/SPECS/ocaml-inotify.spec +++ b/SPECS/ocaml-inotify.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-inotify -Version: 1.3 +Version: 2.0 Release: 1%{?dist} Summary: Inotify bindings for OCaml. @@ -97,5 +97,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/inotify/*.mli %changelog +* Tue Oct 14 2014 David Scott - 2.0-1 +- Update to 2.0 + * Wed Jan 01 2014 Edvard Fagerholm - 1.3-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-pa-bench.spec b/SPECS/ocaml-pa-bench.spec index be5fbe6a..ec9d81af 100644 --- a/SPECS/ocaml-pa-bench.spec +++ b/SPECS/ocaml-pa-bench.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-pa-bench -Version: 109.55.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Syntax extension for inline benchmarks. @@ -96,5 +96,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-pa-ounit.spec b/SPECS/ocaml-pa-ounit.spec index 8cd0938b..1132c780 100644 --- a/SPECS/ocaml-pa-ounit.spec +++ b/SPECS/ocaml-pa-ounit.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-pa-ounit -Version: 109.53.02 +Version: 111.28.00 Release: 1%{?dist} Summary: Syntax extension for in-line tests in code. @@ -96,5 +96,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Update to 111.28.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 - Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec index 99496975..b1e3a6bd 100644 --- a/SPECS/ocaml-pa-pipebang.spec +++ b/SPECS/ocaml-pa-pipebang.spec @@ -4,7 +4,7 @@ %define dlnode 832 Name: ocaml-pa-pipebang -Version: 109.28.02 +Version: 110.08.00 Release: 1%{?dist} Summary: Syntax extension to transform x |! f into f x @@ -96,5 +96,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 111.08.00-1 +- Update to 111.08.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.28.02-1 - Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-test.spec b/SPECS/ocaml-pa-test.spec index d7f0b4df..66419ab8 100644 --- a/SPECS/ocaml-pa-test.spec +++ b/SPECS/ocaml-pa-test.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-pa-test -Version: 109.53.02 +Version: 111.08.00 Release: 1%{?dist} Summary: Jane Street's pa_test @@ -97,5 +97,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/pa_test/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.08.00-1 +- Update to 111.08.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-textutils.spec b/SPECS/ocaml-textutils.spec index 1b191f45..6fce0348 100644 --- a/SPECS/ocaml-textutils.spec +++ b/SPECS/ocaml-textutils.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-textutils -Version: 109.53.02 +Version: 112.01.00 Release: 1%{?dist} Summary: Syntax extension for inserting the current location. @@ -100,5 +100,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 14 2014 David Scott - 112.01.00-1 +- Update to 112.01.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.35.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-typerep.spec b/SPECS/ocaml-typerep.spec index fd14f3c3..a763d3ae 100644 --- a/SPECS/ocaml-typerep.spec +++ b/SPECS/ocaml-typerep.spec @@ -2,7 +2,7 @@ %define debug_package %{nil} Name: ocaml-typerep -Version: 109.55.02 +Version: 111.17.00 Release: 1%{?dist} Summary: Runtime types for OCaml. @@ -113,5 +113,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/typerep_generics_sexprep/*.mli %changelog +* Tue Oct 14 2014 David Scott - 111.17.00-1 +- Update to 111.17.00 + * Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 - Initial package for Fedora 20. diff --git a/SPECS/ocaml-variantslib.spec b/SPECS/ocaml-variantslib.spec index c6c24d5d..c7d6fe61 100644 --- a/SPECS/ocaml-variantslib.spec +++ b/SPECS/ocaml-variantslib.spec @@ -9,7 +9,7 @@ Summary: OCaml variants as first class values Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/variantslib -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/variantslib-%{version}.tar.gz +Source0: https://ocaml.janestreet.com/ocaml-core/109.15.00/individual/variantslib-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x From 8115ed2131162e580a2e63af7382e6ecc79e8d26 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 14 Oct 2014 20:24:53 +0000 Subject: [PATCH 1064/1125] Fix the Core .specs They now build on CentOS Signed-off-by: David Scott --- SPECS/ocaml-async-extra.spec | 4 +- SPECS/ocaml-async-find.spec | 5 ++ SPECS/ocaml-async-inotify.spec | 7 ++ ...sync-core.spec => ocaml-async-kernel.spec} | 42 ++++++------ SPECS/ocaml-async-unix.spec | 4 +- SPECS/ocaml-async.spec | 6 +- SPECS/ocaml-core-kernel.spec | 3 +- SPECS/ocaml-core.spec | 2 +- ...re-bench.spec => ocaml-custom-printf.spec} | 67 ++++++++----------- SPECS/ocaml-enumerate.spec | 67 +++++++++++++++++++ SPECS/ocaml-inotify.spec | 14 ++-- SPECS/ocaml-pa-bench.spec | 1 + SPECS/ocaml-pa-pipebang.spec | 6 +- SPECS/ocaml-pa-test.spec | 3 - SPECS/ocaml-textutils.spec | 1 + SPECS/ocaml-typerep.spec | 36 +++++----- SPECS/ocaml-variantslib.spec | 1 + 17 files changed, 172 insertions(+), 97 deletions(-) rename SPECS/{ocaml-async-core.spec => ocaml-async-kernel.spec} (71%) rename SPECS/{ocaml-core-bench.spec => ocaml-custom-printf.spec} (54%) create mode 100644 SPECS/ocaml-enumerate.spec diff --git a/SPECS/ocaml-async-extra.spec b/SPECS/ocaml-async-extra.spec index 6f5d6215..d132cc30 100644 --- a/SPECS/ocaml-async-extra.spec +++ b/SPECS/ocaml-async-extra.spec @@ -17,7 +17,6 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-async-core-devel BuildRequires: ocaml-async-unix-devel BuildRequires: ocaml-bin-prot-devel BuildRequires: ocaml-core-devel @@ -27,6 +26,9 @@ BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-pa-pipebang-devel BuildRequires: ocaml-pa-test-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-custom-printf-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-enumerate-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-async-find.spec b/SPECS/ocaml-async-find.spec index 4177776d..02d92738 100644 --- a/SPECS/ocaml-async-find.spec +++ b/SPECS/ocaml-async-find.spec @@ -18,6 +18,11 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-async-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-enumerate-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-custom-printf-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec index c0804649..59a98d55 100644 --- a/SPECS/ocaml-async-inotify.spec +++ b/SPECS/ocaml-async-inotify.spec @@ -18,6 +18,13 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-async-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-enumerate-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-custom-printf-devel +BuildRequires: ocaml-async-find-devel +BuildRequires: ocaml-inotify-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-async-core.spec b/SPECS/ocaml-async-kernel.spec similarity index 71% rename from SPECS/ocaml-async-core.spec rename to SPECS/ocaml-async-kernel.spec index 6c115dd7..5d79837a 100644 --- a/SPECS/ocaml-async-core.spec +++ b/SPECS/ocaml-async-kernel.spec @@ -1,15 +1,15 @@ %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} -Name: ocaml-async-core -Version: 111.25.00 +Name: ocaml-async-kernel +Version: 111.28.00 Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) +Summary: Monad concurrency library Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/async_kernel -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_core-%{version}.tar.gz +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_kernel-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x @@ -24,6 +24,8 @@ BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-pa-test-devel BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-enumerate-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh @@ -31,7 +33,10 @@ BuildRequires: ocaml-herelib-devel %description -Jane Street Capital's asynchronous execution library (core). +Part of Jane Street’s Core library +The Core suite of libraries is an industrial strength alternative to +OCaml's standard library that was developed by Jane Street, the +largest industrial user of OCaml. %package devel Summary: Development files for %{name} @@ -45,7 +50,7 @@ developing applications that use %{name}. %prep -%setup -q -n async_core-%{version} +%setup -q -n async_kernel-%{version} ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -80,27 +85,24 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_core +%{_libdir}/ocaml/async_kernel %if %opt -%exclude %{_libdir}/ocaml/async_core/*.a -%exclude %{_libdir}/ocaml/async_core/*.cmxa +%exclude %{_libdir}/ocaml/async_kernel/*.a +%exclude %{_libdir}/ocaml/async_kernel/*.cmxa %endif -%exclude %{_libdir}/ocaml/async_core/*.ml -%exclude %{_libdir}/ocaml/async_core/*.mli +%exclude %{_libdir}/ocaml/async_kernel/*.ml +%exclude %{_libdir}/ocaml/async_kernel/*.mli %files devel %defattr(-,root,root,-) %doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt %if %opt -%{_libdir}/ocaml/async_core/*.a -%{_libdir}/ocaml/async_core/*.cmxa +%{_libdir}/ocaml/async_kernel/*.a +%{_libdir}/ocaml/async_kernel/*.cmxa %endif -%{_libdir}/ocaml/async_core/*.ml -%{_libdir}/ocaml/async_core/*.mli +%{_libdir}/ocaml/async_kernel/*.ml +%{_libdir}/ocaml/async_kernel/*.mli %changelog -* Tue Oct 14 2014 David Scott - 111.25.00-1 -- Update to 111.25.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. +* Tue Oct 14 2014 David Scott - 111.28.00-1 +- Initial package diff --git a/SPECS/ocaml-async-unix.spec b/SPECS/ocaml-async-unix.spec index 00c11b04..7f6f281f 100644 --- a/SPECS/ocaml-async-unix.spec +++ b/SPECS/ocaml-async-unix.spec @@ -17,7 +17,6 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-async-core-devel BuildRequires: ocaml-bin-prot-devel BuildRequires: ocaml-comparelib-devel BuildRequires: ocaml-core-devel @@ -25,7 +24,10 @@ BuildRequires: ocaml-fieldslib-devel BuildRequires: ocaml-herelib-devel BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-pa-pipebang-devel +BuildRequires: ocaml-async-kernel-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-enumerate-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec index 67d9538c..c22781a8 100644 --- a/SPECS/ocaml-async.spec +++ b/SPECS/ocaml-async.spec @@ -16,10 +16,14 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-async-core-devel BuildRequires: ocaml-async-unix-devel BuildRequires: ocaml-async-extra-devel BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-comparelib-devel +BuildRequires: ocaml-enumerate-devel +BuildRequires: ocaml-herelib-devel +BuildRequires: ocaml-custom-printf-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-core-kernel.spec b/SPECS/ocaml-core-kernel.spec index 36851337..7e7615f8 100644 --- a/SPECS/ocaml-core-kernel.spec +++ b/SPECS/ocaml-core-kernel.spec @@ -24,10 +24,11 @@ BuildRequires: ocaml-herelib-devel BuildRequires: ocaml-pa-bench-devel BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-pa-pipebang-devel +BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-enumerate-devel BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-typerep-devel BuildRequires: ocaml-variantslib-devel -BuildRequires: ocaml-res-devel BuildRequires: chrpath %define _use_internal_dependency_generator 0 diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec index d6f3c782..f9498fe7 100644 --- a/SPECS/ocaml-core.spec +++ b/SPECS/ocaml-core.spec @@ -25,12 +25,12 @@ BuildRequires: ocaml-pa-bench-devel BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-pa-pipebang-devel BuildRequires: ocaml-pa-test-devel +BuildRequires: ocaml-enumerate-devel BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-typerep-devel BuildRequires: ocaml-variantslib-devel BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-core-kernel-devel -BuildRequires: ocaml-res-devel BuildRequires: chrpath %define _use_internal_dependency_generator 0 diff --git a/SPECS/ocaml-core-bench.spec b/SPECS/ocaml-custom-printf.spec similarity index 54% rename from SPECS/ocaml-core-bench.spec rename to SPECS/ocaml-custom-printf.spec index a5329e35..dd2bc929 100644 --- a/SPECS/ocaml-core-bench.spec +++ b/SPECS/ocaml-custom-printf.spec @@ -1,30 +1,24 @@ %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} -Name: ocaml-core-bench -Version: 109.58.00 +Name: ocaml-custom-printf +Version: 111.25.00 Release: 1%{?dist} -Summary: System-independent part of Jane Street's Core. +Summary: Syntax extension for printf format strings Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/core_bench -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core_bench-%{version}.tar.gz +License: ASL 2.0 +URL: https://github.com/janestreet/custom_printf +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/custom_printf-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-core-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-textutils-devel +BuildRequires: ocaml-type-conv >= 109.53.02 +BuildRequires: ocaml-sexplib-devel >= 109.55.02 BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-core-extended-devel -BuildRequires: chrpath %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh @@ -32,12 +26,7 @@ BuildRequires: chrpath %description -Core is an industrial-strength alternative to the OCaml standard -library. It was developed by Jane Street, which is the largest -industrial user of OCaml. Core_kernel is the system-independent -part of Core. It is aimed for cases when the full Core is not -available, such as in Javascript. - +Syntax extension for printf format strings. %package devel Summary: Development files for %{name} @@ -51,7 +40,7 @@ developing applications that use %{name}. %prep -%setup -q -n core_bench-%{version} +%setup -q -n custom_printf-%{version} ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -79,8 +68,6 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs ocaml setup.ml -install -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so %clean rm -rf $RPM_BUILD_ROOT @@ -88,30 +75,30 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc README.md -%{_libdir}/ocaml/core_bench +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt +%{_libdir}/ocaml/custom_printf %if %opt -%exclude %{_libdir}/ocaml/core_bench/*.a -%exclude %{_libdir}/ocaml/core_bench/*.cmxa +%exclude %{_libdir}/ocaml/custom_printf/*.a +%exclude %{_libdir}/ocaml/custom_printf/*.cmxa %endif -%exclude %{_libdir}/ocaml/core_bench/*.ml -%exclude %{_libdir}/ocaml/core_bench/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner +%exclude %{_libdir}/ocaml/custom_printf/*.ml +%exclude %{_libdir}/ocaml/custom_printf/*.mli + %files devel %defattr(-,root,root,-) -%doc README.md +%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt %if %opt -%{_libdir}/ocaml/core_bench/*.a -%{_libdir}/ocaml/core_bench/*.cmxa +%{_libdir}/ocaml/custom_printf/*.a +%{_libdir}/ocaml/custom_printf/*.cmxa %endif -%{_libdir}/ocaml/core_bench/*.ml -%{_libdir}/ocaml/core_bench/*.mli +%{_libdir}/ocaml/custom_printf/*.ml +%{_libdir}/ocaml/custom_printf/*.mli + %changelog -* Tue Oct 14 2014 David Scott - 109.58.00-1 -- Update to 109.58.00 +* Tue Oct 14 2014 David Scott - 111.25.00-1 +- Update to 111.25.00 -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. +* Wed Jan 01 2014 Edvard Fagerholm - 109.27.02-1 +- Initial package for Fedora 20 diff --git a/SPECS/ocaml-enumerate.spec b/SPECS/ocaml-enumerate.spec new file mode 100644 index 00000000..9c287dc3 --- /dev/null +++ b/SPECS/ocaml-enumerate.spec @@ -0,0 +1,67 @@ +%global debug_package %{nil} + +Name: ocaml-enumerate +Version: 111.08.00 +Release: 1%{?dist} +Summary: Quotation expanders for enumerating finite types. + +Group: Development/Libraries +License: Apache-2.0 +URL: https://ocaml.janestreet.com +Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/enumerate-%{version}.tar.gz + +BuildRequires: ocaml >= 4.00.0 +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-type-conv + +%description +Quotation expanders for enumerating finite types. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: ocaml-camlp4-devel%{?_isa} +Requires: ocaml-type-conv%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n enumerate-%{version} +ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} + +%build +make + +%install +export DESTDIR=%{buildroot} +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%doc README.md +%doc LICENSE.txt +%doc THIRD-PARTY.txt +%doc INRIA-DISCLAIMER.txt +%doc INSTALL.txt +%{_libdir}/ocaml/enumerate +%exclude %{_libdir}/ocaml/enumerate/*.a +%exclude %{_libdir}/ocaml/enumerate/*.cmxa +%exclude %{_libdir}/ocaml/enumerate/*.cmx +%exclude %{_libdir}/ocaml/enumerate/*.mli + +%files devel +%{_libdir}/ocaml/enumerate/*.a +%{_libdir}/ocaml/enumerate/*.cmxa +%{_libdir}/ocaml/enumerate/*.cmx +%{_libdir}/ocaml/enumerate/*.mli + +%changelog +* Tue Oct 14 2014 David Scott - 111.03.00-1 +- Initial package + diff --git a/SPECS/ocaml-inotify.spec b/SPECS/ocaml-inotify.spec index f4b91c39..741beed6 100644 --- a/SPECS/ocaml-inotify.spec +++ b/SPECS/ocaml-inotify.spec @@ -8,14 +8,15 @@ Summary: Inotify bindings for OCaml. Group: Development/Libraries License: Apache Software License 2.0 -URL: https://bitbucket.org/seanmcl/ocaml-inotify -Source0: https://bitbucket.org/seanmcl/ocaml-inotify/get/%{version}.tar.gz +URL: https://github.com/whitequark/ocaml-inotify +Source0: https://github.com/whitequark/ocaml-inotify/archive/%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib-devel BuildRequires: chrpath @@ -39,7 +40,7 @@ developing applications that use %{name}. %prep -%setup -q -n seanmcl-ocaml-inotify-97ffca4c739e +%setup -q -n %{name}-%{version} ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -76,7 +77,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc LICENSE +%doc LICENSE.txt +%doc README.md %{_libdir}/ocaml/inotify %if %opt %exclude %{_libdir}/ocaml/inotify/*.a @@ -85,11 +87,11 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_libdir}/ocaml/inotify/*.mli %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner -%{_bindir}/test-inotify %files devel %defattr(-,root,root,-) -%doc LICENSE +%doc LICENSE.txt +%doc README.md %if %opt %{_libdir}/ocaml/inotify/*.a %{_libdir}/ocaml/inotify/*.cmxa diff --git a/SPECS/ocaml-pa-bench.spec b/SPECS/ocaml-pa-bench.spec index ec9d81af..04cf18e8 100644 --- a/SPECS/ocaml-pa-bench.spec +++ b/SPECS/ocaml-pa-bench.spec @@ -17,6 +17,7 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-pa-ounit-devel +BuildRequires: ocaml-type-conv %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec index b1e3a6bd..8007dd31 100644 --- a/SPECS/ocaml-pa-pipebang.spec +++ b/SPECS/ocaml-pa-pipebang.spec @@ -4,7 +4,7 @@ %define dlnode 832 Name: ocaml-pa-pipebang -Version: 110.08.00 +Version: 110.01.00 Release: 1%{?dist} Summary: Syntax extension to transform x |! f into f x @@ -96,8 +96,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Tue Oct 14 2014 David Scott - 111.08.00-1 -- Update to 111.08.00 +* Tue Oct 14 2014 David Scott - 111.01.00-1 +- Update to 111.01.00 * Wed Jan 01 2014 Edvard Fagerholm - 109.28.02-1 - Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-test.spec b/SPECS/ocaml-pa-test.spec index 66419ab8..d9211d81 100644 --- a/SPECS/ocaml-pa-test.spec +++ b/SPECS/ocaml-pa-test.spec @@ -18,7 +18,6 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-type-conv -BuildRequires: ocaml-core-kernel-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh @@ -82,7 +81,6 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_libdir}/ocaml/pa_test/*.a %exclude %{_libdir}/ocaml/pa_test/*.cmxa %endif -%exclude %{_libdir}/ocaml/pa_test/*.ml %exclude %{_libdir}/ocaml/pa_test/*.mli @@ -93,7 +91,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/pa_test/*.a %{_libdir}/ocaml/pa_test/*.cmxa %endif -%{_libdir}/ocaml/pa_test/*.ml %{_libdir}/ocaml/pa_test/*.mli %changelog diff --git a/SPECS/ocaml-textutils.spec b/SPECS/ocaml-textutils.spec index 6fce0348..3c559e0e 100644 --- a/SPECS/ocaml-textutils.spec +++ b/SPECS/ocaml-textutils.spec @@ -21,6 +21,7 @@ BuildRequires: ocaml-async-devel BuildRequires: ocaml-core-devel BuildRequires: ocaml-pa-ounit-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-enumerate-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh diff --git a/SPECS/ocaml-typerep.spec b/SPECS/ocaml-typerep.spec index a763d3ae..f2485fe2 100644 --- a/SPECS/ocaml-typerep.spec +++ b/SPECS/ocaml-typerep.spec @@ -79,18 +79,16 @@ rm -rf $RPM_BUILD_ROOT %doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt %{_libdir}/ocaml/ %if %opt -%exclude %{_libdir}/ocaml/typerep_kernel/*.a -%exclude %{_libdir}/ocaml/typerep_kernel/*.cmxa -%exclude %{_libdir}/ocaml/typerep_core/*.a -%exclude %{_libdir}/ocaml/typerep_core/*.cmxa -%exclude %{_libdir}/ocaml/typerep_kernel/*.a +%exclude %{_libdir}/ocaml/typerep_lib/*.a +%exclude %{_libdir}/ocaml/typerep_lib/*.cmxa +%exclude %{_libdir}/ocaml/typerep_extended/*.a +%exclude %{_libdir}/ocaml/typerep_extended/*.cmxa %exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa %endif -%exclude %{_libdir}/ocaml/typerep_kernel/*.ml -%exclude %{_libdir}/ocaml/typerep_kernel/*.mli -%exclude %{_libdir}/ocaml/typerep_core/*.ml -%exclude %{_libdir}/ocaml/typerep_core/*.mli -%exclude %{_libdir}/ocaml/typerep_kernel/*.ml +%exclude %{_libdir}/ocaml/typerep_lib/*.ml +%exclude %{_libdir}/ocaml/typerep_lib/*.mli +%exclude %{_libdir}/ocaml/typerep_extended/*.ml +%exclude %{_libdir}/ocaml/typerep_extended/*.mli %exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.mli @@ -98,18 +96,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt %if %opt -%{_libdir}/ocaml/typerep_kernel/*.a -%{_libdir}/ocaml/typerep_kernel/*.cmxa -%{_libdir}/ocaml/typerep_core/*.a -%{_libdir}/ocaml/typerep_core/*.cmxa -%{_libdir}/ocaml/typerep_kernel/*.a +%{_libdir}/ocaml/typerep_lib/*.a +%{_libdir}/ocaml/typerep_lib/*.cmxa +%{_libdir}/ocaml/typerep_extended/*.a +%{_libdir}/ocaml/typerep_extended/*.cmxa %{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa %endif -%{_libdir}/ocaml/typerep_kernel/*.ml -%{_libdir}/ocaml/typerep_kernel/*.mli -%{_libdir}/ocaml/typerep_core/*.ml -%{_libdir}/ocaml/typerep_core/*.mli -%{_libdir}/ocaml/typerep_kernel/*.ml +%{_libdir}/ocaml/typerep_lib/*.ml +%{_libdir}/ocaml/typerep_lib/*.mli +%{_libdir}/ocaml/typerep_extended/*.ml +%{_libdir}/ocaml/typerep_extended/*.mli %{_libdir}/ocaml/typerep_generics_sexprep/*.mli %changelog diff --git a/SPECS/ocaml-variantslib.spec b/SPECS/ocaml-variantslib.spec index c7d6fe61..3638ad68 100644 --- a/SPECS/ocaml-variantslib.spec +++ b/SPECS/ocaml-variantslib.spec @@ -17,6 +17,7 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-type-conv >= 109.53.02 +BuildRequires: ocaml-ocamldoc %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh From ecc03ef86e21c676868edabeaebfefe31391f49d Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 14 Oct 2014 21:38:39 +0000 Subject: [PATCH 1065/1125] Enable support for core/async through the stack Signed-off-by: David Scott --- SPECS/message-switch.spec | 13 ++++++++----- SPECS/ocaml-async-kernel.spec | 10 +++++++++- SPECS/ocaml-async.spec | 9 ++++++++- SPECS/ocaml-cohttp.spec | 10 +++++++--- SPECS/ocaml-conduit.spec | 9 ++++++++- SPECS/ocaml-core.spec | 15 ++++++++++++++- SPECS/ocaml-xen-api-client.spec | 5 ++++- 7 files changed, 58 insertions(+), 13 deletions(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 1904047a..7038cc30 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -1,10 +1,10 @@ Name: message-switch -Version: 0.10.3 +Version: 0.10.4 Release: 1%{?dist} Summary: A store and forward message switch License: FreeBSD -URL: https://github.com/xapi-project/message-switch -Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/djs55/message-switch +Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: message-switch-init BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel @@ -14,7 +14,7 @@ BuildRequires: ocaml-rpc-devel BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-oclock-devel +BuildRequires: ocaml-async-devel Requires: redhat-lsb-core Requires(post): chkconfig Requires(preun): chkconfig @@ -69,10 +69,13 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %files devel -%doc LICENSE README.md ChangeLog +%doc LICENSE README.md CHANGES %{_libdir}/ocaml/message_switch/* %changelog +* Tue Oct 14 2014 David Scott - 0.10.4-1 +- Update to 0.10.4, enable core/async + * Thu Jun 19 2014 David Scott - 0.10.3-1 - Update to 0.10.3 diff --git a/SPECS/ocaml-async-kernel.spec b/SPECS/ocaml-async-kernel.spec index 5d79837a..fdf1d3ad 100644 --- a/SPECS/ocaml-async-kernel.spec +++ b/SPECS/ocaml-async-kernel.spec @@ -42,7 +42,15 @@ largest industrial user of OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-bin-prot-devel +Requires: ocaml-core-devel +Requires: ocaml-fieldslib-devel +Requires: ocaml-pa-ounit-devel +Requires: ocaml-pa-test-devel +Requires: ocaml-sexplib-devel +Requires: ocaml-herelib-devel +Requires: ocaml-comparelib-devel +Requires: ocaml-enumerate-devel %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec index c22781a8..4d2aaae0 100644 --- a/SPECS/ocaml-async.spec +++ b/SPECS/ocaml-async.spec @@ -37,7 +37,14 @@ Jane Street Capital's asynchronous execution library (core). Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-async-unix-devel +Requires: ocaml-async-extra-devel +Requires: ocaml-ounit-devel +Requires: ocaml-findlib-devel +Requires: ocaml-comparelib-devel +Requires: ocaml-enumerate-devel +Requires: ocaml-herelib-devel +Requires: ocaml-custom-printf-devel %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index 0cb8e075..b5e438b4 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -2,7 +2,7 @@ Name: ocaml-cohttp Version: 0.11.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An HTTP library for OCaml License: LGPL URL: https://github.com/mirage/ocaml-cohttp @@ -18,8 +18,7 @@ BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-uri-devel BuildRequires: ocaml-stringext-devel BuildRequires: ocaml-conduit-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-async-kernel-devel %description An HTTP library for OCaml. @@ -35,6 +34,7 @@ Requires: ocaml-stringext-devel%{?_isa} Requires: ocaml-conduit-devel%{?_isa} Requires: ocaml-fieldslib-devel%{?_isa} Requires: ocaml-sexplib-devel%{?_isa} +Requires: ocaml-async-kernel-devel %package bin Summary: Example binaries for %{name} @@ -69,6 +69,7 @@ make install %exclude %{_libdir}/ocaml/cohttp/*.cmxa %exclude %{_libdir}/ocaml/cohttp/*.cmx %exclude %{_libdir}/ocaml/cohttp/*.mli +%{_bindir}/cohttp-server-async %files devel %{_libdir}/ocaml/cohttp/*.a @@ -80,6 +81,9 @@ make install %{_prefix}/bin/cohttp-server-lwt %changelog +* Tue Oct 14 2014 David Scott - 0.11.2-2 +- Add dependency on core/async + * Fri Jun 6 2014 Jon Ludlam - 0.11.2-1 - Update to 0.11.2 diff --git a/SPECS/ocaml-conduit.spec b/SPECS/ocaml-conduit.spec index ab780fa0..d479c912 100644 --- a/SPECS/ocaml-conduit.spec +++ b/SPECS/ocaml-conduit.spec @@ -1,6 +1,6 @@ Name: ocaml-conduit Version: 0.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml network conduit library License: Unknown Group: Development/Libraries @@ -11,6 +11,7 @@ BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-sexplib-devel BuildRequires: ocaml-lwt-devel +BuildRequires: ocaml-async-devel %description The conduit library takes care of establishing and listening for TCP and SSL/TLS connections for the Lwt and Async libraries. @@ -21,6 +22,9 @@ The reason this library exists is to provide a degree of abstraction from the pr Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-sexplib-devel +Requires: ocaml-lwt-devel +Requires: ocaml-async-devel %description devel The %{name}-devel package contains libraries and signature files for @@ -52,6 +56,9 @@ make install %{_libdir}/ocaml/conduit/*.cmxa %changelog +* Tue Oct 14 2014 David Scott - 0.5.0-2 +- Add dependency on core/async + * Fri May 2 2014 Jon Ludlam - 0.5.0-1 - Initial package diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec index f9498fe7..80706db4 100644 --- a/SPECS/ocaml-core.spec +++ b/SPECS/ocaml-core.spec @@ -50,7 +50,20 @@ available, such as in Javascript. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-bin-prot-devel +Requires: ocaml-comparelib-devel +Requires: ocaml-fieldslib-devel +Requires: ocaml-herelib-devel +Requires: ocaml-pa-bench-devel +Requires: ocaml-pa-ounit-devel +Requires: ocaml-pa-pipebang-devel +Requires: ocaml-pa-test-devel +Requires: ocaml-enumerate-devel +Requires: ocaml-sexplib-devel +Requires: ocaml-typerep-devel +Requires: ocaml-variantslib-devel +Requires: ocaml-compiler-libs +Requires: ocaml-core-kernel-devel %description devel The %{name}-devel package contains libraries and signature files for diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec index 35c26c7f..c40464be 100644 --- a/SPECS/ocaml-xen-api-client.spec +++ b/SPECS/ocaml-xen-api-client.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xen-api-client -Version: 0.9.6 +Version: 0.9.7 Release: 1%{?dist} Summary: XenServer XenAPI Client Library for OCaml License: LGPLv2 @@ -68,6 +68,9 @@ make install %{_libdir}/ocaml/xen-api-client/*.mli %changelog +* Tue Oct 14 2014 David Scott - 0.9.7-1 +- Update to 0.9.7 + * Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 - Update to 0.9.6 From 79d6c4cd3c449b872e0c7a9051ffeeb4bc45f6f4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 14 Oct 2014 22:11:11 +0000 Subject: [PATCH 1066/1125] Update xcp-idl, xcp-rrdd, xenopsd Signed-off-by: David Scott --- SPECS/ocaml-xcp-idl.spec | 7 ++++++- SPECS/xcp-rrdd.spec | 27 +++++---------------------- SPECS/xenopsd.spec | 6 +++++- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec index 0ea752d4..b318fd4f 100644 --- a/SPECS/ocaml-xcp-idl.spec +++ b/SPECS/ocaml-xcp-idl.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-xcp-idl -Version: 0.9.18 +Version: 0.9.20 Release: 1%{?dist} Summary: Common interface definitions for XCP services License: LGPL @@ -20,6 +20,7 @@ BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-xmlm-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-sexplib-devel +BuildRequires: ocaml-xcp-inventory-devel %description Common interface definitions for XCP services. @@ -36,6 +37,7 @@ Requires: ocaml-rpc-devel%{?_isa} Requires: ocaml-fd-send-recv-devel%{?_isa} Requires: ocaml-xmlm-devel%{?_isa} Requires: ocaml-sexplib-devel%{?_isa} +Requires: ocaml-xcp-inventory-devel %description devel The %{name}-devel package contains libraries and signature files for @@ -72,6 +74,9 @@ make install %{_libdir}/ocaml/xcp/*.mli %changelog +* Tue Oct 14 2014 David Scott - 0.9.20-1 +- Update to 0.9.20 + * Wed Aug 20 2014 Jon Ludlam - 0.9.18-1 - Update to 0.9.18 diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index b0bf0251..9a01391e 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,5 +1,5 @@ Name: xcp-rrdd -Version: 0.9.7 +Version: 0.9.8 Release: 2%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL @@ -18,6 +18,7 @@ BuildRequires: ocaml-rrd-transport-devel BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-xen-lowlevel-libs-devel BuildRequires: ocaml-xen-api-libs-transitional-devel +BuildRequires: ocaml-oclock-devel BuildRequires: forkexecd-devel BuildRequires: xen-devel Requires: redhat-lsb-core @@ -25,16 +26,6 @@ Requires: redhat-lsb-core %description Statistics gathering daemon for the xapi toolstack. -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-xcp-idl-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - %prep %setup -q cp %{SOURCE1} xcp-rrdd-init @@ -55,17 +46,6 @@ install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd %doc README.markdown LICENSE %{_sbindir}/xcp-rrdd %{_sysconfdir}/init.d/xcp-rrdd -%{_libdir}/ocaml/rrdd-libs -%exclude %{_libdir}/ocaml/rrdd-libs/*.a -%exclude %{_libdir}/ocaml/rrdd-libs/*.cmx -%exclude %{_libdir}/ocaml/rrdd-libs/*.cmxa -%exclude %{_libdir}/ocaml/rrdd-libs/*.mli - -%files devel -%{_libdir}/ocaml/rrdd-libs/*.a -%{_libdir}/ocaml/rrdd-libs/*.cmx -%{_libdir}/ocaml/rrdd-libs/*.cmxa -%{_libdir}/ocaml/rrdd-libs/*.mli %post /sbin/chkconfig --add xcp-rrdd @@ -77,6 +57,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Oct 14 2014 David Scott - 0.9.8-1 +- Update to 0.9.8 + * Thu Sep 4 2014 Jon Ludlam - 0.9.7-2 - Remove xen-missing-headers dependency diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index ed5cbfa6..bf397458 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,5 +1,5 @@ Name: xenopsd -Version: 0.9.44 +Version: 0.9.45 Release: 1%{?dist} Summary: Simple VM manager License: LGPL @@ -33,6 +33,7 @@ BuildRequires: ocaml-xcp-inventory-devel BuildRequires: xen-devel BuildRequires: ocaml-uutf-devel BuildRequires: ocaml-xcp-rrd-devel +BuildRequires: ocaml-oclock-devel Requires: message-switch Requires: redhat-lsb-core Requires: xenops-cli @@ -191,6 +192,9 @@ if [ $1 -eq 0 ]; then fi %changelog +* Tue Oct 14 2014 David Scott - 0.9.45-1 +- Update to 0.9.45 + * Mon Sep 22 2014 David Scott - 0.9.44-1 - Update to 0.9.44 From 04972636588308a7a49b239510e4662944b3249e Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 10:49:48 +0000 Subject: [PATCH 1067/1125] Core now builds on ubuntu Mainly this involves: - running setup.ml -configure in the %build phase. It would generate the setup.data in the %prep phase and then lose it - fixing typos in the changelog - adding some missing builddepends Signed-off-by: David Scott --- SPECS/ocaml-async-extra.spec | 5 +++-- SPECS/ocaml-async-find.spec | 4 ++-- SPECS/ocaml-async-inotify.spec | 4 ++-- SPECS/ocaml-async-kernel.spec | 4 ++-- SPECS/ocaml-async-unix.spec | 4 ++-- SPECS/ocaml-async.spec | 6 ++++-- SPECS/ocaml-core-kernel.spec | 5 +++-- SPECS/ocaml-core.spec | 4 ++-- SPECS/ocaml-custom-printf.spec | 4 ++-- SPECS/ocaml-enumerate.spec | 9 +++++---- SPECS/ocaml-pa-bench.spec | 8 +++----- SPECS/ocaml-pa-ounit.spec | 4 +--- SPECS/ocaml-pa-pipebang.spec | 4 ++-- SPECS/ocaml-typerep.spec | 18 ++++++++++-------- 14 files changed, 43 insertions(+), 40 deletions(-) diff --git a/SPECS/ocaml-async-extra.spec b/SPECS/ocaml-async-extra.spec index d132cc30..916a0f17 100644 --- a/SPECS/ocaml-async-extra.spec +++ b/SPECS/ocaml-async-extra.spec @@ -17,6 +17,7 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-async-kernel-devel BuildRequires: ocaml-async-unix-devel BuildRequires: ocaml-bin-prot-devel BuildRequires: ocaml-core-devel @@ -51,6 +52,8 @@ developing applications that use %{name}. %prep %setup -q -n async_extra-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -62,8 +65,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-async-find.spec b/SPECS/ocaml-async-find.spec index 02d92738..a7dba0b3 100644 --- a/SPECS/ocaml-async-find.spec +++ b/SPECS/ocaml-async-find.spec @@ -45,6 +45,8 @@ developing applications that use %{name}. %prep %setup -q -n async_find-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -56,8 +58,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec index 59a98d55..fe66cd5a 100644 --- a/SPECS/ocaml-async-inotify.spec +++ b/SPECS/ocaml-async-inotify.spec @@ -47,6 +47,8 @@ developing applications that use %{name}. %prep %setup -q -n async_inotify-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -58,8 +60,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-async-kernel.spec b/SPECS/ocaml-async-kernel.spec index fdf1d3ad..20c6f0b3 100644 --- a/SPECS/ocaml-async-kernel.spec +++ b/SPECS/ocaml-async-kernel.spec @@ -59,6 +59,8 @@ developing applications that use %{name}. %prep %setup -q -n async_kernel-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -70,8 +72,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-async-unix.spec b/SPECS/ocaml-async-unix.spec index 7f6f281f..790670ba 100644 --- a/SPECS/ocaml-async-unix.spec +++ b/SPECS/ocaml-async-unix.spec @@ -50,6 +50,8 @@ developing applications that use %{name}. %prep %setup -q -n async_unix-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -61,8 +63,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec index 4d2aaae0..e62be856 100644 --- a/SPECS/ocaml-async.spec +++ b/SPECS/ocaml-async.spec @@ -16,6 +16,7 @@ ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-async-kernel-devel BuildRequires: ocaml-async-unix-devel BuildRequires: ocaml-async-extra-devel BuildRequires: ocaml-ounit-devel @@ -37,6 +38,7 @@ Jane Street Capital's asynchronous execution library (core). Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: ocaml-async-kernel-devel Requires: ocaml-async-unix-devel Requires: ocaml-async-extra-devel Requires: ocaml-ounit-devel @@ -53,6 +55,8 @@ developing applications that use %{name}. %prep %setup -q -n async-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -64,8 +68,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-core-kernel.spec b/SPECS/ocaml-core-kernel.spec index 7e7615f8..4c10b9fa 100644 --- a/SPECS/ocaml-core-kernel.spec +++ b/SPECS/ocaml-core-kernel.spec @@ -14,6 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-findlib BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc @@ -57,6 +58,8 @@ developing applications that use %{name}. %prep %setup -q -n core_kernel-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -68,8 +71,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec index 80706db4..73862c2a 100644 --- a/SPECS/ocaml-core.spec +++ b/SPECS/ocaml-core.spec @@ -72,6 +72,8 @@ developing applications that use %{name}. %prep %setup -q -n core-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -83,8 +85,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-custom-printf.spec b/SPECS/ocaml-custom-printf.spec index dd2bc929..2b237555 100644 --- a/SPECS/ocaml-custom-printf.spec +++ b/SPECS/ocaml-custom-printf.spec @@ -41,6 +41,8 @@ developing applications that use %{name}. %prep %setup -q -n custom_printf-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -52,8 +54,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-enumerate.spec b/SPECS/ocaml-enumerate.spec index 9c287dc3..e6910014 100644 --- a/SPECS/ocaml-enumerate.spec +++ b/SPECS/ocaml-enumerate.spec @@ -7,8 +7,8 @@ Summary: Quotation expanders for enumerating finite types. Group: Development/Libraries License: Apache-2.0 -URL: https://ocaml.janestreet.com -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/enumerate-%{version}.tar.gz +URL: https://ocaml.janestreet.com/ +Source0: https://github.com/janestreet/enumerate/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml >= 4.00.0 BuildRequires: ocaml-findlib @@ -32,7 +32,8 @@ developing applications that use %{name}. %prep %setup -q -n enumerate-%{version} -ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} +ocaml setup.ml -configure --prefix %{_prefix} +# --destdir %{buildroot} %build make @@ -62,6 +63,6 @@ make install %{_libdir}/ocaml/enumerate/*.mli %changelog -* Tue Oct 14 2014 David Scott - 111.03.00-1 +* Tue Oct 14 2014 David Scott - 111.08.00-1 - Initial package diff --git a/SPECS/ocaml-pa-bench.spec b/SPECS/ocaml-pa-bench.spec index 04cf18e8..881e3a11 100644 --- a/SPECS/ocaml-pa-bench.spec +++ b/SPECS/ocaml-pa-bench.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/pa_bench Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_bench-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 @@ -41,6 +40,8 @@ developing applications that use %{name}. %prep %setup -q -n pa_bench-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -50,10 +51,7 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --mandir %{_mandir} \ --datadir %{_datadir} \ --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT - -%build + --sharedstatedir %{_sharedstatedir} ocaml setup.ml -build diff --git a/SPECS/ocaml-pa-ounit.spec b/SPECS/ocaml-pa-ounit.spec index 1132c780..8bfef63b 100644 --- a/SPECS/ocaml-pa-ounit.spec +++ b/SPECS/ocaml-pa-ounit.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/pa_ounit Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_ounit-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 @@ -49,8 +48,7 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --mandir %{_mandir} \ --datadir %{_datadir} \ --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT + --sharedstatedir %{_sharedstatedir} %build ocaml setup.ml -build diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec index 8007dd31..bad876b8 100644 --- a/SPECS/ocaml-pa-pipebang.spec +++ b/SPECS/ocaml-pa-pipebang.spec @@ -96,8 +96,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Tue Oct 14 2014 David Scott - 111.01.00-1 -- Update to 111.01.00 +* Tue Oct 14 2014 David Scott - 110.01.00-1 +- Update to 110.01.00 * Wed Jan 01 2014 Edvard Fagerholm - 109.28.02-1 - Initial package for Fedora 20 diff --git a/SPECS/ocaml-typerep.spec b/SPECS/ocaml-typerep.spec index f2485fe2..8b86e6ce 100644 --- a/SPECS/ocaml-typerep.spec +++ b/SPECS/ocaml-typerep.spec @@ -10,7 +10,6 @@ Group: Development/Libraries License: Apache Software License 2.0 URL: https://github.com/janestreet/typerep Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/typerep-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 4.00.1 @@ -19,6 +18,7 @@ BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-bin-prot >= 109.53.02 BuildRequires: ocaml-sexplib >= 109.55.02 +BuildRequires: ocaml-type-conv %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh @@ -33,7 +33,9 @@ Runtime types for OCaml. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-sexplib +Requires: ocaml-bin-prot +Requires: ocaml-type-conv %description devel The %{name}-devel package contains libraries and signature files for @@ -42,6 +44,8 @@ developing applications that use %{name}. %prep %setup -q -n typerep-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -51,10 +55,7 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --mandir %{_mandir} \ --datadir %{_datadir} \ --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT - -%build + --sharedstatedir %{_sharedstatedir} ocaml setup.ml -build @@ -69,7 +70,6 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs ocaml setup.ml -install - %clean rm -rf $RPM_BUILD_ROOT @@ -77,7 +77,9 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/ +%{_libdir}/ocaml/typerep_lib +%{_libdir}/ocaml/typerep_extended +%{_libdir}/ocaml/typerep_generics_sexprep %if %opt %exclude %{_libdir}/ocaml/typerep_lib/*.a %exclude %{_libdir}/ocaml/typerep_lib/*.cmxa From fe834a2eba2493181783a0193329965f1fd81af8 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 15 Oct 2014 11:15:12 +0100 Subject: [PATCH 1068/1125] Remove libvirt as a requirement --- SPECS/xenserver-core.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index b99caa2a..eefdd9b4 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -10,14 +10,12 @@ Requires: xapi Requires: xapi-python-devel Requires: xapi-xe Requires: xe-create-templates -Requires: xenopsd-libvirt Requires: xenopsd-simulator Requires: xenopsd-xc Requires: xenopsd-xenlight Requires: xenops-cli Requires: ffs Requires: sm-cli -Requires: xapi-libvirt-storage Requires: xcp-sm Requires: xcp-networkd Requires: xcp-rrdd From db036fab231aa633db1c2d773c46321c1deac1fd Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 11:07:48 +0000 Subject: [PATCH 1069/1125] xcp-rrdd: changelog and release must match Signed-off-by: David Scott --- SPECS/xcp-rrdd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec index 9a01391e..b05f2db4 100644 --- a/SPECS/xcp-rrdd.spec +++ b/SPECS/xcp-rrdd.spec @@ -1,6 +1,6 @@ Name: xcp-rrdd Version: 0.9.8 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Statistics gathering daemon for the xapi toolstack License: LGPL URL: https://github.com/xapi-project/xcp-rrdd From 6f52c6e507400b604e12c8c7276599d40e6ba327 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 11:08:05 +0000 Subject: [PATCH 1070/1125] textutils: move 'setup.ml -configure' to the %build (from %prep) Signed-off-by: David Scott --- SPECS/ocaml-textutils.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-textutils.spec b/SPECS/ocaml-textutils.spec index 3c559e0e..1437a68d 100644 --- a/SPECS/ocaml-textutils.spec +++ b/SPECS/ocaml-textutils.spec @@ -45,6 +45,8 @@ developing applications that use %{name}. %prep %setup -q -n textutils-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -56,8 +58,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build From 5dc3fc683449749c192efc3c2b5e0545a4deb580 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 13:45:08 +0000 Subject: [PATCH 1071/1125] Move more 'setup.ml -configure' to the %build phase (from %prep) Signed-off-by: David Scott --- SPECS/ocaml-pa-ounit.spec | 4 ++-- SPECS/ocaml-pa-pipebang.spec | 4 ++-- SPECS/ocaml-pa-test.spec | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-pa-ounit.spec b/SPECS/ocaml-pa-ounit.spec index 8bfef63b..21cda4d7 100644 --- a/SPECS/ocaml-pa-ounit.spec +++ b/SPECS/ocaml-pa-ounit.spec @@ -39,6 +39,8 @@ developing applications that use %{name}. %prep %setup -q -n pa_ounit-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -49,8 +51,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --datadir %{_datadir} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec index bad876b8..fde2c43c 100644 --- a/SPECS/ocaml-pa-pipebang.spec +++ b/SPECS/ocaml-pa-pipebang.spec @@ -42,6 +42,8 @@ developing applications that use %{name}. %prep %setup -q -n pipebang-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -53,8 +55,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-pa-test.spec b/SPECS/ocaml-pa-test.spec index d9211d81..3eabe454 100644 --- a/SPECS/ocaml-pa-test.spec +++ b/SPECS/ocaml-pa-test.spec @@ -41,6 +41,8 @@ developing applications that use %{name}. %prep %setup -q -n pa_test-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -52,8 +54,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build From ccd1909230ff666848b454ae39181bb30c049bfc Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 17:51:23 +0000 Subject: [PATCH 1072/1125] Remove spurious 'Require' Signed-off-by: David Scott --- SPECS/message-switch.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec index 7038cc30..4a629c86 100644 --- a/SPECS/message-switch.spec +++ b/SPECS/message-switch.spec @@ -60,7 +60,6 @@ fi Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-cohttp-devel%{?_isa} -Requires: ocaml-oclock-devel%{?_isa} Requires: ocaml-re-devel%{?_isa} Requires: ocaml-rpc-devel%{?_isa} From c53a97796fb2d104cca9817eb9965d71b96817f1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Wed, 15 Oct 2014 23:24:53 +0000 Subject: [PATCH 1073/1125] Add ocaml-dyntype 0.9.0 Signed-off-by: David Scott --- SPECS/ocaml-dyntype.spec | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 SPECS/ocaml-dyntype.spec diff --git a/SPECS/ocaml-dyntype.spec b/SPECS/ocaml-dyntype.spec new file mode 100644 index 00000000..ba306022 --- /dev/null +++ b/SPECS/ocaml-dyntype.spec @@ -0,0 +1,47 @@ +Name: ocaml-dyntype +Version: 0.9.0 +Release: 1%{?dist} +Summary: syntax extension which makes OCaml types and values easier to manipulate programmatically +License: ISC +URL: https://github.com/mirage/dyntype/ +Source0: https://github.com/mirage/dyntype/archive/dyntype-0.9.0.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-type-conv +BuildRequires: ocaml-camlp4-devel + +%description +syntax extension which makes OCaml types and values easier to manipulate programmatically + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n dyntype-dyntype-%{version} + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/dyntype +%exclude %{_libdir}/ocaml/dyntype/*.a +%exclude %{_libdir}/ocaml/dyntype/*.cmxa + +%files devel +%{_libdir}/ocaml/dyntype/*.a +%{_libdir}/ocaml/dyntype/*.cmxa + +%changelog +* Thu Oct 16 2014 David Scott - 0.9.0-1 +- Initial package From 1236805bf7097b475ceab5709ddb73d1a2e01d86 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 00:05:15 +0000 Subject: [PATCH 1074/1125] Add ocaml-jsonm, a dependency of ocaml-ezjsonm Signed-off-by: David Scott --- SPECS/ocaml-jsonm.spec | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 SPECS/ocaml-jsonm.spec diff --git a/SPECS/ocaml-jsonm.spec b/SPECS/ocaml-jsonm.spec new file mode 100644 index 00000000..c8fbf2ce --- /dev/null +++ b/SPECS/ocaml-jsonm.spec @@ -0,0 +1,79 @@ +Name: ocaml-jsonm +Version: 0.9.1 +Release: 1%{?dist} +Summary: Non-blocking streaming JSON codec for OCaml +License: BSD3 +URL: http://erratique.ch/software/jsonm +Source0: https://github.com/dbuenzli/jsonm/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-uutf-devel +BuildRequires: oasis + +%description +Jsonm is a non-blocking streaming codec to decode and encode the JSON +data format. It can process JSON text without blocking on IO and +without a complete in-memory representation of the data. + +The alternative "uncut" codec also processes whitespace and +(non-standard) JSON with JavaScript comments. + +Jsonm is made of a single module and depends on [Uutf][1]. It is +distributed under the BSD3 license. + +[1]: http://erratique.ch/software/uutf + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n jsonm-%{version} + +%build +rm _tags +oasis setup +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT +ocaml setup.ml -build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +mkdir -p %{buildroot}/%{_bindir} +ocaml setup.ml -install + +%files +%doc CHANGES +%doc README +%{_libdir}/ocaml/jsonm +%exclude %{_libdir}/ocaml/jsonm/*.a +%exclude %{_libdir}/ocaml/jsonm/*.cmxa +%exclude %{_libdir}/ocaml/jsonm/*.cmx +%exclude %{_libdir}/ocaml/jsonm/*.mli +%{_bindir}/jsontrip +%{_bindir}/ocamltweets + +%files devel +%{_libdir}/ocaml/jsonm/*.a +%{_libdir}/ocaml/jsonm/*.cmxa +%{_libdir}/ocaml/jsonm/*.cmx +%{_libdir}/ocaml/jsonm/*.mli + +%changelog +* Thu Oct 16 2014 David Scott - 0.9.1-1 +- Initial package From 6f73ddf4234e16ea3d2f4967087e2ce57e193dee Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 00:05:31 +0000 Subject: [PATCH 1075/1125] Add ocaml-ezjsonm, a dependency of ocaml-cow Signed-off-by: David Scott --- SPECS/ocaml-ezjsonm.spec | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 SPECS/ocaml-ezjsonm.spec diff --git a/SPECS/ocaml-ezjsonm.spec b/SPECS/ocaml-ezjsonm.spec new file mode 100644 index 00000000..5c6f36de --- /dev/null +++ b/SPECS/ocaml-ezjsonm.spec @@ -0,0 +1,57 @@ +Name: ocaml-ezjsonm +Version: 0.2.0 +Release: 1%{?dist} +Summary: An easy interface on top of the Jsonm library +License: ISC +URL: https://github.com/samoht/ezjsonm +Source0: https://github.com/samoht/ezjsonm/archive/0.2.0/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-jsonm-devel + +%description +This version provides more convenient (but far less flexible) +input and output functions that go to and from [string] values. +This avoids the need to write signal code, which is useful for +quick scripts that manipulate JSON. + +More advanced users should go straight to the Jsonm library and +use it directly, rather than be saddled with the Ezjsonm interface. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-jsonm-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ezjsonm-%{version} + +%build +make + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/ezjsonm +%exclude %{_libdir}/ocaml/ezjsonm/*.a +%exclude %{_libdir}/ocaml/ezjsonm/*.cmxa +%exclude %{_libdir}/ocaml/ezjsonm/*.cmx +%exclude %{_libdir}/ocaml/ezjsonm/*.mli + +%files devel +%{_libdir}/ocaml/ezjsonm/*.a +%{_libdir}/ocaml/ezjsonm/*.cmxa +%{_libdir}/ocaml/ezjsonm/*.cmx +%{_libdir}/ocaml/ezjsonm/*.mli + +%changelog +* Thu Oct 16 2014 David Scott - 0.2.0-1 +- Initial package From 75fca27c987114d7424c73e1328e7d87bf096ec1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 00:05:48 +0000 Subject: [PATCH 1076/1125] Add ocaml-omd, a dependency of ocaml-cow Signed-off-by: David Scott --- SPECS/ocaml-omd.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 SPECS/ocaml-omd.spec diff --git a/SPECS/ocaml-omd.spec b/SPECS/ocaml-omd.spec new file mode 100644 index 00000000..875440fe --- /dev/null +++ b/SPECS/ocaml-omd.spec @@ -0,0 +1,72 @@ +Name: ocaml-omd +Version: 1.0.2 +Release: 1%{?dist} +Summary: A Markdown frontend in pure OCaml. +License: ISC +URL: https://github.com/ocaml/omd +Source0: https://github.com/ocaml/omd/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: oasis + +%description +This Markdown library is implemented using only pure OCaml (including +I/O operations provided by the standard OCaml compiler distribution). +OMD is meant to be as faithful as possible to the original Markdown. +Additionally, OMD implements a few Github markdown features, an +extension mechanism, and a few other features. Note that the opam +package installs both the OMD library and the command line tool `omd`. +Note that The library interface of 1.0.x is only partially compatible +with 0.9.x. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n omd-%{version} + +%build +oasis setup +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT +ocaml setup.ml -build + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/omd +%exclude %{_libdir}/ocaml/omd/*.a +%exclude %{_libdir}/ocaml/omd/*.cmxa +%exclude %{_libdir}/ocaml/omd/*.cmx +%exclude %{_libdir}/ocaml/omd/*.mli +%{_bindir}/omd +%{_bindir}/test_cow +%{_bindir}/test_spec + +%files devel +%{_libdir}/ocaml/omd/*.a +%{_libdir}/ocaml/omd/*.cmxa +%{_libdir}/ocaml/omd/*.cmx +%{_libdir}/ocaml/omd/*.mli + +%changelog +* Thu Oct 16 2014 David Scott - 1.0.2-1 +- Initial package From eb0aed83ba8227809c3b1ad1fe934dc446fd3a38 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 00:06:03 +0000 Subject: [PATCH 1077/1125] Add ocaml-ulex, a dependency of ocaml-cow Signed-off-by: David Scott --- SPECS/ocaml-ulex.spec | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 SPECS/ocaml-ulex.spec diff --git a/SPECS/ocaml-ulex.spec b/SPECS/ocaml-ulex.spec new file mode 100644 index 00000000..ece0599c --- /dev/null +++ b/SPECS/ocaml-ulex.spec @@ -0,0 +1,51 @@ +Name: ocaml-ulex +Version: 1.1 +Release: 1%{?dist} +Summary: lexer generator for Unicode and OCaml +License: ISC +URL: http://ftp.de.debian.org/debian/pool/main/u/ulex/ulex_1.1.orig.tar.gz +Source0: http://ftp.de.debian.org/debian/pool/main/u/ulex/ulex_1.1.orig.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-camlp4-devel + +%description +lexer generator for Unicode and OCaml + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n ulex-%{version} + +%build +make +make all.opt + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/ulex +%exclude %{_libdir}/ocaml/ulex/*.a +%exclude %{_libdir}/ocaml/ulex/*.cmxa +%exclude %{_libdir}/ocaml/ulex/*.cmx +%exclude %{_libdir}/ocaml/ulex/*.mli + +%files devel +%{_libdir}/ocaml/ulex/*.a +%{_libdir}/ocaml/ulex/*.cmxa +%{_libdir}/ocaml/ulex/*.cmx +%{_libdir}/ocaml/ulex/*.mli + +%changelog +* Thu Oct 16 2014 David Scott - 1.1-1 +- Initial package From 6ef48167d325fc3f98932a5ba9c2f72bcbf295be Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 00:06:17 +0000 Subject: [PATCH 1078/1125] Add ocaml-cow, a dependency of xapi-storage Signed-off-by: David Scott --- SPECS/ocaml-cow.spec | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 SPECS/ocaml-cow.spec diff --git a/SPECS/ocaml-cow.spec b/SPECS/ocaml-cow.spec new file mode 100644 index 00000000..728c0ad4 --- /dev/null +++ b/SPECS/ocaml-cow.spec @@ -0,0 +1,81 @@ +Name: ocaml-cow +Version: 1.0.0 +Release: 1%{?dist} +Summary: XML, JSON, HTML, CSS, and Markdown syntax and libraries +License: ISC +URL: https://github.com/mirage/ocaml-cow +Source0: https://github.com/mirage/ocaml-cow/archive/v1.0.0/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-type-conv +BuildRequires: ocaml-ulex-devel +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-uri-devel +BuildRequires: ocaml-xmlm-devel +BuildRequires: ocaml-omd-devel +BuildRequires: ocaml-ezjsonm-devel +BuildRequires: ocaml-dyntype-devel + +%description + +Writing web-applications requires a lot of skills: HTML, CSS, XML, +JSON and Markdown, to name but a few! This library provides OCaml +syntax extensions for these web formats by: + +* extending standard OCaml syntax with embedded web DSLs. It has a + quotation mechanism which parses HTML, CSS or XML to OCaml, and + also anti-quotations that form a template mechanism. + +* using type-driven code generation to generate markup directly from + OCaml type declarations. It is possible to mix hand-written and + generated code to deal with special-cases. Most of the work is done + at pre-processing time, so there is no runtime costs and the generated + OCaml code can be manually inspected if desired. + +Mre documentation at + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: ocaml-findlib +Requires: ocaml-ocamldoc +Requires: ocaml-type-conv +Requires: ocaml-ulex-devel +Requires: ocaml-re-devel +Requires: ocaml-ounit-devel +Requires: ocaml-uri-devel +Requires: ocaml-xmlm-devel +Requires: ocaml-omd-devel +Requires: ocaml-ezjsonm-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} + +%build +make all + +%install +export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +make install + +%files +%{_libdir}/ocaml/cow +%exclude %{_libdir}/ocaml/cow/*.a +%exclude %{_libdir}/ocaml/cow/*.cmxa +%exclude %{_libdir}/ocaml/cow/*.mli + +%files devel +%{_libdir}/ocaml/cow/*.a +%{_libdir}/ocaml/cow/*.cmxa +%{_libdir}/ocaml/cow/*.mli + +%changelog +* Thu Oct 16 2014 David Scott - 1.0.0-1 +- Initial package From 151005b36240df128bc110e889e72f28beb5fcd3 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 01:42:55 +0000 Subject: [PATCH 1079/1125] ocaml-cow-devel needs ocaml-dyntype-devel Signed-off-by: David Scott --- SPECS/ocaml-cow.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-cow.spec b/SPECS/ocaml-cow.spec index 728c0ad4..c3be625e 100644 --- a/SPECS/ocaml-cow.spec +++ b/SPECS/ocaml-cow.spec @@ -49,6 +49,7 @@ Requires: ocaml-uri-devel Requires: ocaml-xmlm-devel Requires: ocaml-omd-devel Requires: ocaml-ezjsonm-devel +Requires: ocaml-dyntype-devel %description devel The %{name}-devel package contains libraries and signature files for From 6a622ab2216f87c30da96a97751c6959d39e56a1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 01:44:49 +0000 Subject: [PATCH 1080/1125] ocaml-jsonm-devel needs ocaml-uutf-devel Signed-off-by: David Scott --- SPECS/ocaml-jsonm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-jsonm.spec b/SPECS/ocaml-jsonm.spec index c8fbf2ce..d325ec3d 100644 --- a/SPECS/ocaml-jsonm.spec +++ b/SPECS/ocaml-jsonm.spec @@ -27,6 +27,7 @@ distributed under the BSD3 license. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +Requires: ocaml-uutf-devel %description devel The %{name}-devel package contains libraries and signature files for From eefbb56d0601467264c13eda5cf723654e3380ad Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 01:45:04 +0000 Subject: [PATCH 1081/1125] Add initial version of xapi-storage Signed-off-by: David Scott --- SPECS/xapi-storage.spec | 84 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 SPECS/xapi-storage.spec diff --git a/SPECS/xapi-storage.spec b/SPECS/xapi-storage.spec new file mode 100644 index 00000000..39b39df0 --- /dev/null +++ b/SPECS/xapi-storage.spec @@ -0,0 +1,84 @@ +Summary: Xapi storage interface +Name: xapi-storage +Version: 0.1 +Release: 1%{?dist} +URL: https://github.com/djs55/xapi-storage +Source0: https://github.com/djs55/xapi-storage/archive/v%{version}/%{name}-%{version}.tar.gz +License: LGPL+linking exception + +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-cow-devel +BuildRequires: ocaml-xmlm-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-rpc-devel + +%description +Xapi storage inteface libraries + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: ocaml-findlib +Requires: ocaml-cow-devel +Requires: ocaml-xmlm-devel +Requires: ocaml-cmdliner-devel +Requires: ocaml-rpc-devel + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} + +%build +make +cd ocaml +ocaml setup.ml -configure --prefix %{_prefix} \ + --libdir %{_libdir} \ + --libexecdir %{_libexecdir} \ + --exec-prefix %{_exec_prefix} \ + --bindir %{_bindir} \ + --sbindir %{_sbindir} \ + --mandir %{_mandir} \ + --datadir %{_datadir} \ + --localstatedir %{_localstatedir} \ + --sharedstatedir %{_sharedstatedir} \ + --destdir $RPM_BUILD_ROOT +ocaml setup.ml -build + +%install +cd ocaml +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR +ocaml setup.ml -install +cd ../python +%{__python} setup.py install -O2 --root %{buildroot} +rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info + +%files +%defattr(-,root,root,-) +%{_libdir}/ocaml/xapi-storage +%exclude %{_libdir}/ocaml/xapi-storage/*.a +%exclude %{_libdir}/ocaml/xapi-storage/*.cmxa +%exclude %{_libdir}/ocaml/xapi-storage/*.ml +%{python_sitelib}/xapi.py* +%{python_sitelib}/d.py* +%{python_sitelib}/v.py* +%{python_sitelib}/p.py* + +%files devel +%defattr(-,root,root,-) +%{_libdir}/ocaml/xapi-storage/*.a +%{_libdir}/ocaml/xapi-storage/*.cmxa +%{_libdir}/ocaml/xapi-storage/*.ml + +%changelog +* Thu Oct 16 2014 David Scott - 0.1-1 +- Initial package From 6ccc32c8a7121db3209b8974754e081ccb625447 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 09:04:21 +0000 Subject: [PATCH 1082/1125] Move more 'setup.ml' running to %build Running it in %prep will fail if you don't have the tools installed on the host. Signed-off-by: David Scott --- SPECS/ocaml-bin-prot.spec | 5 ++--- SPECS/ocaml-comparelib.spec | 4 ++-- SPECS/ocaml-enumerate.spec | 4 ++-- SPECS/ocaml-herelib.spec | 4 ++-- SPECS/ocaml-variantslib.spec | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/SPECS/ocaml-bin-prot.spec b/SPECS/ocaml-bin-prot.spec index 63cefdee..d43811b6 100644 --- a/SPECS/ocaml-bin-prot.spec +++ b/SPECS/ocaml-bin-prot.spec @@ -48,6 +48,8 @@ developing applications that use %{name}. %prep %setup -q -n bin_prot-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -59,9 +61,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-comparelib.spec b/SPECS/ocaml-comparelib.spec index 435c397b..5e93bc8b 100644 --- a/SPECS/ocaml-comparelib.spec +++ b/SPECS/ocaml-comparelib.spec @@ -40,6 +40,8 @@ developing applications that use %{name}. %prep %setup -q -n comparelib-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -51,8 +53,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-enumerate.spec b/SPECS/ocaml-enumerate.spec index e6910014..15b3e4e1 100644 --- a/SPECS/ocaml-enumerate.spec +++ b/SPECS/ocaml-enumerate.spec @@ -32,10 +32,10 @@ developing applications that use %{name}. %prep %setup -q -n enumerate-%{version} -ocaml setup.ml -configure --prefix %{_prefix} -# --destdir %{buildroot} %build +ocaml setup.ml -configure --prefix %{_prefix} +# --destdir %{buildroot} make %install diff --git a/SPECS/ocaml-herelib.spec b/SPECS/ocaml-herelib.spec index 0db773ad..61b383d1 100644 --- a/SPECS/ocaml-herelib.spec +++ b/SPECS/ocaml-herelib.spec @@ -40,6 +40,8 @@ developing applications that use %{name}. %prep %setup -q -n herelib-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -51,8 +53,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build diff --git a/SPECS/ocaml-variantslib.spec b/SPECS/ocaml-variantslib.spec index 3638ad68..82af22b8 100644 --- a/SPECS/ocaml-variantslib.spec +++ b/SPECS/ocaml-variantslib.spec @@ -40,6 +40,8 @@ developing applications that use %{name}. %prep %setup -q -n variantslib-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -51,8 +53,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build From 50982a2649bbc736eecc2a9e7cd7768ca22f08db Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 16 Oct 2014 10:48:28 +0100 Subject: [PATCH 1083/1125] Makefile: Add missing @ to echo line Signed-off-by: Euan Harris --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fd2733ce..5e5244d6 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ clean: # it possible to add the SRPMS directory to yum.conf and use yumdownloader # to install source RPMs. srpm_repo: srpms - echo [CREATEREPO] SRPMS + @echo [CREATEREPO] SRPMS @flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS # Build one or more binary RPMs from a source RPM. A typical source RPM From 8b24dd7ca78ba79d355511d9cf2455dd4eba16c1 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 10:56:27 +0000 Subject: [PATCH 1084/1125] Move ocaml-inotify %prep to %build Signed-off-by: David Scott --- SPECS/ocaml-inotify.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-inotify.spec b/SPECS/ocaml-inotify.spec index 741beed6..3d3d4da8 100644 --- a/SPECS/ocaml-inotify.spec +++ b/SPECS/ocaml-inotify.spec @@ -41,6 +41,8 @@ developing applications that use %{name}. %prep %setup -q -n %{name}-%{version} + +%build ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ @@ -52,8 +54,6 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --localstatedir %{_localstatedir} \ --sharedstatedir %{_sharedstatedir} \ --destdir $RPM_BUILD_ROOT - -%build ocaml setup.ml -build From 15733e9f4cf42673ccbd4c8aad0d33d8223a1aae Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 20:05:38 +0000 Subject: [PATCH 1085/1125] ocaml-jsonm: check in the OASIS files as a patch Signed-off-by: David Scott --- SOURCES/ocaml-jsonm-setup.ml.patch | 7918 ++++++++++++++++++++++++++++ SPECS/ocaml-jsonm.spec | 5 +- 2 files changed, 7920 insertions(+), 3 deletions(-) create mode 100644 SOURCES/ocaml-jsonm-setup.ml.patch diff --git a/SOURCES/ocaml-jsonm-setup.ml.patch b/SOURCES/ocaml-jsonm-setup.ml.patch new file mode 100644 index 00000000..a08bea44 --- /dev/null +++ b/SOURCES/ocaml-jsonm-setup.ml.patch @@ -0,0 +1,7918 @@ +diff -urN jsonm-0.9.1.orig/myocamlbuild.ml jsonm-0.9.1/myocamlbuild.ml +--- jsonm-0.9.1.orig/myocamlbuild.ml 1970-01-01 00:00:00.000000000 +0000 ++++ jsonm-0.9.1/myocamlbuild.ml 2014-10-16 17:13:44.041481372 +0000 +@@ -0,0 +1,609 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: be3f4d01d5bd3b6bdd731700ef928e30) *) ++module OASISGettext = struct ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ ++ ++ let ns_ str = ++ str ++ ++ ++ let s_ str = ++ str ++ ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ ++ let init = ++ [] ++ ++ ++end ++ ++module OASISExpr = struct ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ ++ ++ open OASISGettext ++ ++ ++ type test = string ++ ++ ++ type flag = string ++ ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++ ++end ++ ++ ++# 132 "myocamlbuild.ml" ++module BaseEnvLight = struct ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ ++ ++ module MapString = Map.Make(String) ++ ++ ++ type t = string MapString.t ++ ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 237 "myocamlbuild.ml" ++module MyOCamlbuildFindlib = struct ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) ++ ++ ++ (** OCamlbuild extension, copied from ++ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild ++ * by N. Pouillard and others ++ * ++ * Updated on 2009/02/28 ++ * ++ * Modified by Sylvain Le Gall ++ *) ++ open Ocamlbuild_plugin ++ ++ ++ (* these functions are not really officially exported *) ++ let run_and_read = ++ Ocamlbuild_pack.My_unix.run_and_read ++ ++ ++ let blank_sep_strings = ++ Ocamlbuild_pack.Lexers.blank_sep_strings ++ ++ ++ let exec_from_conf exec = ++ let exec = ++ let env_filename = Pathname.basename BaseEnvLight.default_filename in ++ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in ++ try ++ BaseEnvLight.var_get exec env ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s\n" exec; ++ exec ++ in ++ let fix_win32 str = ++ if Sys.os_type = "Win32" then begin ++ let buff = Buffer.create (String.length str) in ++ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. ++ *) ++ String.iter ++ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) ++ str; ++ Buffer.contents buff ++ end else begin ++ str ++ end ++ in ++ fix_win32 exec ++ ++ let split s ch = ++ let buf = Buffer.create 13 in ++ let x = ref [] in ++ let flush () = ++ x := (Buffer.contents buf) :: !x; ++ Buffer.clear buf ++ in ++ String.iter ++ (fun c -> ++ if c = ch then ++ flush () ++ else ++ Buffer.add_char buf c) ++ s; ++ flush (); ++ List.rev !x ++ ++ ++ let split_nl s = split s '\n' ++ ++ ++ let before_space s = ++ try ++ String.before s (String.index s ' ') ++ with Not_found -> s ++ ++ (* ocamlfind command *) ++ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] ++ ++ (* This lists all supported packages. *) ++ let find_packages () = ++ List.map before_space (split_nl & run_and_read "ocamlfind list") ++ ++ ++ (* Mock to list available syntaxes. *) ++ let find_syntaxes () = ["camlp4o"; "camlp4r"] ++ ++ ++ let well_known_syntax = [ ++ "camlp4.quotations.o"; ++ "camlp4.quotations.r"; ++ "camlp4.exceptiontracer"; ++ "camlp4.extend"; ++ "camlp4.foldgenerator"; ++ "camlp4.listcomprehension"; ++ "camlp4.locationstripper"; ++ "camlp4.macro"; ++ "camlp4.mapgenerator"; ++ "camlp4.metagenerator"; ++ "camlp4.profiler"; ++ "camlp4.tracer" ++ ] ++ ++ ++ let dispatch = ++ function ++ | After_options -> ++ (* By using Before_options one let command line options have an higher ++ * priority on the contrary using After_options will guarantee to have ++ * the higher priority override default commands by ocamlfind ones *) ++ Options.ocamlc := ocamlfind & A"ocamlc"; ++ Options.ocamlopt := ocamlfind & A"ocamlopt"; ++ Options.ocamldep := ocamlfind & A"ocamldep"; ++ Options.ocamldoc := ocamlfind & A"ocamldoc"; ++ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; ++ Options.ocamlmklib := ocamlfind & A"ocamlmklib" ++ ++ | After_rules -> ++ ++ (* When one link an OCaml library/binary/package, one should use ++ * -linkpkg *) ++ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; ++ ++ (* For each ocamlfind package one inject the -package option when ++ * compiling, computing dependencies, generating documentation and ++ * linking. *) ++ List.iter ++ begin fun pkg -> ++ let base_args = [A"-package"; A pkg] in ++ (* TODO: consider how to really choose camlp4o or camlp4r. *) ++ let syn_args = [A"-syntax"; A "camlp4o"] in ++ let args = ++ (* Heuristic to identify syntax extensions: whether they end in ++ ".syntax"; some might not. ++ *) ++ if Filename.check_suffix pkg "syntax" || ++ List.mem pkg well_known_syntax then ++ syn_args @ base_args ++ else ++ base_args ++ in ++ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; ++ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; ++ end ++ (find_packages ()); ++ ++ (* Like -package but for extensions syntax. Morover -syntax is useless ++ * when linking. *) ++ List.iter begin fun syntax -> ++ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & ++ S[A"-syntax"; A syntax]; ++ end (find_syntaxes ()); ++ ++ (* The default "thread" tag is not compatible with ocamlfind. ++ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" ++ * options when using this tag. When using the "-linkpkg" option with ++ * ocamlfind, this module will then be added twice on the command line. ++ * ++ * To solve this, one approach is to add the "-thread" option when using ++ * the "threads" package using the previous plugin. ++ *) ++ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); ++ ++ | _ -> ++ () ++end ++ ++module MyOCamlbuildBase = struct ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ ++ (** Base functions for writing myocamlbuild.ml ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ ++ ++ open Ocamlbuild_plugin ++ module OC = Ocamlbuild_pack.Ocaml_compiler ++ ++ ++ type dir = string ++ type file = string ++ type name = string ++ type tag = string ++ ++ ++(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ ++ type t = ++ { ++ lib_ocaml: (name * dir list * string list) list; ++ lib_c: (name * dir * file list) list; ++ flags: (tag list * (spec OASISExpr.choices)) list; ++ (* Replace the 'dir: include' from _tags by a precise interdepends in ++ * directory. ++ *) ++ includes: (dir * dir list) list; ++ } ++ ++ ++ let env_filename = ++ Pathname.basename ++ BaseEnvLight.default_filename ++ ++ ++ let dispatch_combine lst = ++ fun e -> ++ List.iter ++ (fun dispatch -> dispatch e) ++ lst ++ ++ ++ let tag_libstubs nm = ++ "use_lib"^nm^"_stubs" ++ ++ ++ let nm_libstubs nm = ++ nm^"_stubs" ++ ++ ++ let dispatch t e = ++ let env = ++ BaseEnvLight.load ++ ~filename:env_filename ++ ~allow_empty:true ++ () ++ in ++ match e with ++ | Before_options -> ++ let no_trailing_dot s = ++ if String.length s >= 1 && s.[0] = '.' then ++ String.sub s 1 ((String.length s) - 1) ++ else ++ s ++ in ++ List.iter ++ (fun (opt, var) -> ++ try ++ opt := no_trailing_dot (BaseEnvLight.var_get var env) ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s\n" var) ++ [ ++ Options.ext_obj, "ext_obj"; ++ Options.ext_lib, "ext_lib"; ++ Options.ext_dll, "ext_dll"; ++ ] ++ ++ | After_rules -> ++ (* Declare OCaml libraries *) ++ List.iter ++ (function ++ | nm, [], intf_modules -> ++ ocaml_lib nm; ++ let cmis = ++ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis ++ | nm, dir :: tl, intf_modules -> ++ ocaml_lib ~dir:dir (dir^"/"^nm); ++ List.iter ++ (fun dir -> ++ List.iter ++ (fun str -> ++ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) ++ ["compile"; "infer_interface"; "doc"]) ++ tl; ++ let cmis = ++ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] ++ cmis) ++ t.lib_ocaml; ++ ++ (* Declare directories dependencies, replace "include" in _tags. *) ++ List.iter ++ (fun (dir, include_dirs) -> ++ Pathname.define_context dir include_dirs) ++ t.includes; ++ ++ (* Declare C libraries *) ++ List.iter ++ (fun (lib, dir, headers) -> ++ (* Handle C part of library *) ++ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; ++ A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] ++ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); ++ ++ (* When ocaml link something that use the C library, then one ++ need that file to be up to date. ++ *) ++ dep ["link"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ (* TODO: be more specific about what depends on headers *) ++ (* Depends on .h files *) ++ dep ["compile"; "c"] ++ headers; ++ ++ (* Setup search path for lib *) ++ flag ["link"; "ocaml"; "use_"^lib] ++ (S[A"-I"; P(dir)]); ++ ) ++ t.lib_c; ++ ++ (* Add flags *) ++ List.iter ++ (fun (tags, cond_specs) -> ++ let spec = BaseEnvLight.var_choose cond_specs env in ++ let rec eval_specs = ++ function ++ | S lst -> S (List.map eval_specs lst) ++ | A str -> A (BaseEnvLight.var_expand str env) ++ | spec -> spec ++ in ++ flag tags & (eval_specs spec)) ++ t.flags ++ | _ -> ++ () ++ ++ ++ let dispatch_default t = ++ dispatch_combine ++ [ ++ dispatch t; ++ MyOCamlbuildFindlib.dispatch; ++ ] ++ ++ ++end ++ ++ ++# 594 "myocamlbuild.ml" ++open Ocamlbuild_plugin;; ++let package_default = ++ { ++ MyOCamlbuildBase.lib_ocaml = [("jsonm", ["src"], [])]; ++ lib_c = []; ++ flags = []; ++ includes = [("test", ["src"])] ++ } ++ ;; ++ ++let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; ++ ++# 608 "myocamlbuild.ml" ++(* OASIS_STOP *) ++Ocamlbuild_plugin.dispatch dispatch_default;; +diff -urN jsonm-0.9.1.orig/setup.ml jsonm-0.9.1/setup.ml +--- jsonm-0.9.1.orig/setup.ml 1970-01-01 00:00:00.000000000 +0000 ++++ jsonm-0.9.1/setup.ml 2014-10-16 17:13:44.065481470 +0000 +@@ -0,0 +1,7216 @@ ++(* setup.ml generated for the first time by OASIS v0.4.4 *) ++ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 030dd5e26bb3625af0af2ceb9fe537a2) *) ++(* ++ Regenerated by OASIS v0.4.4 ++ Visit http://oasis.forge.ocamlcore.org for more information and ++ documentation about functions used in this file. ++*) ++module OASISGettext = struct ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ ++ ++ let ns_ str = ++ str ++ ++ ++ let s_ str = ++ str ++ ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ ++ let init = ++ [] ++ ++ ++end ++ ++module OASISContext = struct ++(* # 22 "src/oasis/OASISContext.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ type level = ++ [ `Debug ++ | `Info ++ | `Warning ++ | `Error] ++ ++ ++ type t = ++ { ++ (* TODO: replace this by a proplist. *) ++ quiet: bool; ++ info: bool; ++ debug: bool; ++ ignore_plugins: bool; ++ ignore_unknown_fields: bool; ++ printf: level -> string -> unit; ++ } ++ ++ ++ let printf lvl str = ++ let beg = ++ match lvl with ++ | `Error -> s_ "E: " ++ | `Warning -> s_ "W: " ++ | `Info -> s_ "I: " ++ | `Debug -> s_ "D: " ++ in ++ prerr_endline (beg^str) ++ ++ ++ let default = ++ ref ++ { ++ quiet = false; ++ info = false; ++ debug = false; ++ ignore_plugins = false; ++ ignore_unknown_fields = false; ++ printf = printf; ++ } ++ ++ ++ let quiet = ++ {!default with quiet = true} ++ ++ ++ let fspecs () = ++ (* TODO: don't act on default. *) ++ let ignore_plugins = ref false in ++ ["-quiet", ++ Arg.Unit (fun () -> default := {!default with quiet = true}), ++ s_ " Run quietly"; ++ ++ "-info", ++ Arg.Unit (fun () -> default := {!default with info = true}), ++ s_ " Display information message"; ++ ++ ++ "-debug", ++ Arg.Unit (fun () -> default := {!default with debug = true}), ++ s_ " Output debug message"; ++ ++ "-ignore-plugins", ++ Arg.Set ignore_plugins, ++ s_ " Ignore plugin's field."; ++ ++ "-C", ++ (* TODO: remove this chdir. *) ++ Arg.String (fun str -> Sys.chdir str), ++ s_ "dir Change directory before running."], ++ fun () -> {!default with ignore_plugins = !ignore_plugins} ++end ++ ++module OASISString = struct ++(* # 22 "src/oasis/OASISString.ml" *) ++ ++ ++ (** Various string utilities. ++ ++ Mostly inspired by extlib and batteries ExtString and BatString libraries. ++ ++ @author Sylvain Le Gall ++ *) ++ ++ ++ let nsplitf str f = ++ if str = "" then ++ [] ++ else ++ let buf = Buffer.create 13 in ++ let lst = ref [] in ++ let push () = ++ lst := Buffer.contents buf :: !lst; ++ Buffer.clear buf ++ in ++ let str_len = String.length str in ++ for i = 0 to str_len - 1 do ++ if f str.[i] then ++ push () ++ else ++ Buffer.add_char buf str.[i] ++ done; ++ push (); ++ List.rev !lst ++ ++ ++ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the ++ separator. ++ *) ++ let nsplit str c = ++ nsplitf str ((=) c) ++ ++ ++ let find ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ while !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ what_idx := 0; ++ incr str_idx ++ done; ++ if !what_idx <> String.length what then ++ raise Not_found ++ else ++ !str_idx - !what_idx ++ ++ ++ let sub_start str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str len (str_len - len) ++ ++ ++ let sub_end ?(offset=0) str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str 0 (str_len - len) ++ ++ ++ let starts_with ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ let ok = ref true in ++ while !ok && ++ !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ ok := false; ++ incr str_idx ++ done; ++ if !what_idx = String.length what then ++ true ++ else ++ false ++ ++ ++ let strip_starts_with ~what str = ++ if starts_with ~what str then ++ sub_start str (String.length what) ++ else ++ raise Not_found ++ ++ ++ let ends_with ~what ?(offset=0) str = ++ let what_idx = ref ((String.length what) - 1) in ++ let str_idx = ref ((String.length str) - 1) in ++ let ok = ref true in ++ while !ok && ++ offset <= !str_idx && ++ 0 <= !what_idx do ++ if str.[!str_idx] = what.[!what_idx] then ++ decr what_idx ++ else ++ ok := false; ++ decr str_idx ++ done; ++ if !what_idx = -1 then ++ true ++ else ++ false ++ ++ ++ let strip_ends_with ~what str = ++ if ends_with ~what str then ++ sub_end str (String.length what) ++ else ++ raise Not_found ++ ++ ++ let replace_chars f s = ++ let buf = String.make (String.length s) 'X' in ++ for i = 0 to String.length s - 1 do ++ buf.[i] <- f s.[i] ++ done; ++ buf ++ ++ ++end ++ ++module OASISUtils = struct ++(* # 22 "src/oasis/OASISUtils.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ module MapExt = ++ struct ++ module type S = ++ sig ++ include Map.S ++ val add_list: 'a t -> (key * 'a) list -> 'a t ++ val of_list: (key * 'a) list -> 'a t ++ val to_list: 'a t -> (key * 'a) list ++ end ++ ++ module Make (Ord: Map.OrderedType) = ++ struct ++ include Map.Make(Ord) ++ ++ let rec add_list t = ++ function ++ | (k, v) :: tl -> add_list (add k v t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] ++ end ++ end ++ ++ ++ module MapString = MapExt.Make(String) ++ ++ ++ module SetExt = ++ struct ++ module type S = ++ sig ++ include Set.S ++ val add_list: t -> elt list -> t ++ val of_list: elt list -> t ++ val to_list: t -> elt list ++ end ++ ++ module Make (Ord: Set.OrderedType) = ++ struct ++ include Set.Make(Ord) ++ ++ let rec add_list t = ++ function ++ | e :: tl -> add_list (add e t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list = elements ++ end ++ end ++ ++ ++ module SetString = SetExt.Make(String) ++ ++ ++ let compare_csl s1 s2 = ++ String.compare (String.lowercase s1) (String.lowercase s2) ++ ++ ++ module HashStringCsl = ++ Hashtbl.Make ++ (struct ++ type t = string ++ ++ let equal s1 s2 = ++ (String.lowercase s1) = (String.lowercase s2) ++ ++ let hash s = ++ Hashtbl.hash (String.lowercase s) ++ end) ++ ++ module SetStringCsl = ++ SetExt.Make ++ (struct ++ type t = string ++ let compare = compare_csl ++ end) ++ ++ ++ let varname_of_string ?(hyphen='_') s = ++ if String.length s = 0 then ++ begin ++ invalid_arg "varname_of_string" ++ end ++ else ++ begin ++ let buf = ++ OASISString.replace_chars ++ (fun c -> ++ if ('a' <= c && c <= 'z') ++ || ++ ('A' <= c && c <= 'Z') ++ || ++ ('0' <= c && c <= '9') then ++ c ++ else ++ hyphen) ++ s; ++ in ++ let buf = ++ (* Start with a _ if digit *) ++ if '0' <= s.[0] && s.[0] <= '9' then ++ "_"^buf ++ else ++ buf ++ in ++ String.lowercase buf ++ end ++ ++ ++ let varname_concat ?(hyphen='_') p s = ++ let what = String.make 1 hyphen in ++ let p = ++ try ++ OASISString.strip_ends_with ~what p ++ with Not_found -> ++ p ++ in ++ let s = ++ try ++ OASISString.strip_starts_with ~what s ++ with Not_found -> ++ s ++ in ++ p^what^s ++ ++ ++ let is_varname str = ++ str = varname_of_string str ++ ++ ++ let failwithf fmt = Printf.ksprintf failwith fmt ++ ++ ++end ++ ++module PropList = struct ++(* # 22 "src/oasis/PropList.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ type name = string ++ ++ ++ exception Not_set of name * string option ++ exception No_printer of name ++ exception Unknown_field of name * name ++ ++ ++ let () = ++ Printexc.register_printer ++ (function ++ | Not_set (nm, Some rsn) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) ++ | Not_set (nm, None) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set") nm) ++ | No_printer nm -> ++ Some ++ (Printf.sprintf (f_ "No default printer for value %s") nm) ++ | Unknown_field (nm, schm) -> ++ Some ++ (Printf.sprintf ++ (f_ "Field %s is not defined in schema %s") nm schm) ++ | _ -> ++ None) ++ ++ ++ module Data = ++ struct ++ type t = ++ (name, unit -> unit) Hashtbl.t ++ ++ let create () = ++ Hashtbl.create 13 ++ ++ let clear t = ++ Hashtbl.clear t ++ ++ ++(* # 78 "src/oasis/PropList.ml" *) ++ end ++ ++ ++ module Schema = ++ struct ++ type ('ctxt, 'extra) value = ++ { ++ get: Data.t -> string; ++ set: Data.t -> ?context:'ctxt -> string -> unit; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ type ('ctxt, 'extra) t = ++ { ++ name: name; ++ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; ++ order: name Queue.t; ++ name_norm: string -> string; ++ } ++ ++ let create ?(case_insensitive=false) nm = ++ { ++ name = nm; ++ fields = Hashtbl.create 13; ++ order = Queue.create (); ++ name_norm = ++ (if case_insensitive then ++ String.lowercase ++ else ++ fun s -> s); ++ } ++ ++ let add t nm set get extra help = ++ let key = ++ t.name_norm nm ++ in ++ ++ if Hashtbl.mem t.fields key then ++ failwith ++ (Printf.sprintf ++ (f_ "Field '%s' is already defined in schema '%s'") ++ nm t.name); ++ Hashtbl.add ++ t.fields ++ key ++ { ++ set = set; ++ get = get; ++ help = help; ++ extra = extra; ++ }; ++ Queue.add nm t.order ++ ++ let mem t nm = ++ Hashtbl.mem t.fields nm ++ ++ let find t nm = ++ try ++ Hashtbl.find t.fields (t.name_norm nm) ++ with Not_found -> ++ raise (Unknown_field (nm, t.name)) ++ ++ let get t data nm = ++ (find t nm).get data ++ ++ let set t data nm ?context x = ++ (find t nm).set ++ data ++ ?context ++ x ++ ++ let fold f acc t = ++ Queue.fold ++ (fun acc k -> ++ let v = ++ find t k ++ in ++ f acc k v.extra v.help) ++ acc ++ t.order ++ ++ let iter f t = ++ fold ++ (fun () -> f) ++ () ++ t ++ ++ let name t = ++ t.name ++ end ++ ++ ++ module Field = ++ struct ++ type ('ctxt, 'value, 'extra) t = ++ { ++ set: Data.t -> ?context:'ctxt -> 'value -> unit; ++ get: Data.t -> 'value; ++ sets: Data.t -> ?context:'ctxt -> string -> unit; ++ gets: Data.t -> string; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ let new_id = ++ let last_id = ++ ref 0 ++ in ++ fun () -> incr last_id; !last_id ++ ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ (* Default value container *) ++ let v = ++ ref None ++ in ++ ++ (* If name is not given, create unique one *) ++ let nm = ++ match name with ++ | Some s -> s ++ | None -> Printf.sprintf "_anon_%d" (new_id ()) ++ in ++ ++ (* Last chance to get a value: the default *) ++ let default () = ++ match default with ++ | Some d -> d ++ | None -> raise (Not_set (nm, Some (s_ "no default value"))) ++ in ++ ++ (* Get data *) ++ let get data = ++ (* Get value *) ++ try ++ (Hashtbl.find data nm) (); ++ match !v with ++ | Some x -> x ++ | None -> default () ++ with Not_found -> ++ default () ++ in ++ ++ (* Set data *) ++ let set data ?context x = ++ let x = ++ match update with ++ | Some f -> ++ begin ++ try ++ f ?context (get data) x ++ with Not_set _ -> ++ x ++ end ++ | None -> ++ x ++ in ++ Hashtbl.replace ++ data ++ nm ++ (fun () -> v := Some x) ++ in ++ ++ (* Parse string value, if possible *) ++ let parse = ++ match parse with ++ | Some f -> ++ f ++ | None -> ++ fun ?context s -> ++ failwith ++ (Printf.sprintf ++ (f_ "Cannot parse field '%s' when setting value %S") ++ nm ++ s) ++ in ++ ++ (* Set data, from string *) ++ let sets data ?context s = ++ set ?context data (parse ?context s) ++ in ++ ++ (* Output value as string, if possible *) ++ let print = ++ match print with ++ | Some f -> ++ f ++ | None -> ++ fun _ -> raise (No_printer nm) ++ in ++ ++ (* Get data, as a string *) ++ let gets data = ++ print (get data) ++ in ++ ++ begin ++ match schema with ++ | Some t -> ++ Schema.add t nm sets gets extra help ++ | None -> ++ () ++ end; ++ ++ { ++ set = set; ++ get = get; ++ sets = sets; ++ gets = gets; ++ help = help; ++ extra = extra; ++ } ++ ++ let fset data t ?context x = ++ t.set data ?context x ++ ++ let fget data t = ++ t.get data ++ ++ let fsets data t ?context s = ++ t.sets data ?context s ++ ++ let fgets data t = ++ t.gets data ++ end ++ ++ ++ module FieldRO = ++ struct ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ let fld = ++ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra ++ in ++ fun data -> Field.fget data fld ++ end ++end ++ ++module OASISMessage = struct ++(* # 22 "src/oasis/OASISMessage.ml" *) ++ ++ ++ open OASISGettext ++ open OASISContext ++ ++ ++ let generic_message ~ctxt lvl fmt = ++ let cond = ++ if ctxt.quiet then ++ false ++ else ++ match lvl with ++ | `Debug -> ctxt.debug ++ | `Info -> ctxt.info ++ | _ -> true ++ in ++ Printf.ksprintf ++ (fun str -> ++ if cond then ++ begin ++ ctxt.printf lvl str ++ end) ++ fmt ++ ++ ++ let debug ~ctxt fmt = ++ generic_message ~ctxt `Debug fmt ++ ++ ++ let info ~ctxt fmt = ++ generic_message ~ctxt `Info fmt ++ ++ ++ let warning ~ctxt fmt = ++ generic_message ~ctxt `Warning fmt ++ ++ ++ let error ~ctxt fmt = ++ generic_message ~ctxt `Error fmt ++ ++end ++ ++module OASISVersion = struct ++(* # 22 "src/oasis/OASISVersion.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ ++ ++ ++ type s = string ++ ++ ++ type t = string ++ ++ ++ type comparator = ++ | VGreater of t ++ | VGreaterEqual of t ++ | VEqual of t ++ | VLesser of t ++ | VLesserEqual of t ++ | VOr of comparator * comparator ++ | VAnd of comparator * comparator ++ ++ ++ ++ (* Range of allowed characters *) ++ let is_digit c = ++ '0' <= c && c <= '9' ++ ++ ++ let is_alpha c = ++ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ++ ++ ++ let is_special = ++ function ++ | '.' | '+' | '-' | '~' -> true ++ | _ -> false ++ ++ ++ let rec version_compare v1 v2 = ++ if v1 <> "" || v2 <> "" then ++ begin ++ (* Compare ascii string, using special meaning for version ++ * related char ++ *) ++ let val_ascii c = ++ if c = '~' then -1 ++ else if is_digit c then 0 ++ else if c = '\000' then 0 ++ else if is_alpha c then Char.code c ++ else (Char.code c) + 256 ++ in ++ ++ let len1 = String.length v1 in ++ let len2 = String.length v2 in ++ ++ let p = ref 0 in ++ ++ (** Compare ascii part *) ++ let compare_vascii () = ++ let cmp = ref 0 in ++ while !cmp = 0 && ++ !p < len1 && !p < len2 && ++ not (is_digit v1.[!p] && is_digit v2.[!p]) do ++ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); ++ incr p ++ done; ++ if !cmp = 0 && !p < len1 && !p = len2 then ++ val_ascii v1.[!p] ++ else if !cmp = 0 && !p = len1 && !p < len2 then ++ - (val_ascii v2.[!p]) ++ else ++ !cmp ++ in ++ ++ (** Compare digit part *) ++ let compare_digit () = ++ let extract_int v p = ++ let start_p = !p in ++ while !p < String.length v && is_digit v.[!p] do ++ incr p ++ done; ++ let substr = ++ String.sub v !p ((String.length v) - !p) ++ in ++ let res = ++ match String.sub v start_p (!p - start_p) with ++ | "" -> 0 ++ | s -> int_of_string s ++ in ++ res, substr ++ in ++ let i1, tl1 = extract_int v1 (ref !p) in ++ let i2, tl2 = extract_int v2 (ref !p) in ++ i1 - i2, tl1, tl2 ++ in ++ ++ match compare_vascii () with ++ | 0 -> ++ begin ++ match compare_digit () with ++ | 0, tl1, tl2 -> ++ if tl1 <> "" && is_digit tl1.[0] then ++ 1 ++ else if tl2 <> "" && is_digit tl2.[0] then ++ -1 ++ else ++ version_compare tl1 tl2 ++ | n, _, _ -> ++ n ++ end ++ | n -> ++ n ++ end ++ else ++ begin ++ 0 ++ end ++ ++ ++ let version_of_string str = str ++ ++ ++ let string_of_version t = t ++ ++ ++ let version_compare_string s1 s2 = ++ version_compare (version_of_string s1) (version_of_string s2) ++ ++ ++ let chop t = ++ try ++ let pos = ++ String.rindex t '.' ++ in ++ String.sub t 0 pos ++ with Not_found -> ++ t ++ ++ ++ let rec comparator_apply v op = ++ match op with ++ | VGreater cv -> ++ (version_compare v cv) > 0 ++ | VGreaterEqual cv -> ++ (version_compare v cv) >= 0 ++ | VLesser cv -> ++ (version_compare v cv) < 0 ++ | VLesserEqual cv -> ++ (version_compare v cv) <= 0 ++ | VEqual cv -> ++ (version_compare v cv) = 0 ++ | VOr (op1, op2) -> ++ (comparator_apply v op1) || (comparator_apply v op2) ++ | VAnd (op1, op2) -> ++ (comparator_apply v op1) && (comparator_apply v op2) ++ ++ ++ let rec string_of_comparator = ++ function ++ | VGreater v -> "> "^(string_of_version v) ++ | VEqual v -> "= "^(string_of_version v) ++ | VLesser v -> "< "^(string_of_version v) ++ | VGreaterEqual v -> ">= "^(string_of_version v) ++ | VLesserEqual v -> "<= "^(string_of_version v) ++ | VOr (c1, c2) -> ++ (string_of_comparator c1)^" || "^(string_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (string_of_comparator c1)^" && "^(string_of_comparator c2) ++ ++ ++ let rec varname_of_comparator = ++ let concat p v = ++ OASISUtils.varname_concat ++ p ++ (OASISUtils.varname_of_string ++ (string_of_version v)) ++ in ++ function ++ | VGreater v -> concat "gt" v ++ | VLesser v -> concat "lt" v ++ | VEqual v -> concat "eq" v ++ | VGreaterEqual v -> concat "ge" v ++ | VLesserEqual v -> concat "le" v ++ | VOr (c1, c2) -> ++ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) ++ ++ ++ let rec comparator_ge v' = ++ let cmp v = version_compare v v' >= 0 in ++ function ++ | VEqual v ++ | VGreaterEqual v ++ | VGreater v -> cmp v ++ | VLesserEqual _ ++ | VLesser _ -> false ++ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 ++ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 ++ ++ ++end ++ ++module OASISLicense = struct ++(* # 22 "src/oasis/OASISLicense.ml" *) ++ ++ ++ (** License for _oasis fields ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ ++ ++ type license = string ++ ++ ++ type license_exception = string ++ ++ ++ type license_version = ++ | Version of OASISVersion.t ++ | VersionOrLater of OASISVersion.t ++ | NoVersion ++ ++ ++ ++ type license_dep_5_unit = ++ { ++ license: license; ++ excption: license_exception option; ++ version: license_version; ++ } ++ ++ ++ ++ type license_dep_5 = ++ | DEP5Unit of license_dep_5_unit ++ | DEP5Or of license_dep_5 list ++ | DEP5And of license_dep_5 list ++ ++ ++ type t = ++ | DEP5License of license_dep_5 ++ | OtherLicense of string (* URL *) ++ ++ ++ ++end ++ ++module OASISExpr = struct ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ ++ ++ open OASISGettext ++ ++ ++ type test = string ++ ++ ++ type flag = string ++ ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++ ++end ++ ++module OASISText = struct ++(* # 22 "src/oasis/OASISText.ml" *) ++ ++ ++ ++ type elt = ++ | Para of string ++ | Verbatim of string ++ | BlankLine ++ ++ ++ type t = elt list ++ ++end ++ ++module OASISTypes = struct ++(* # 22 "src/oasis/OASISTypes.ml" *) ++ ++ ++ ++ ++ ++ type name = string ++ type package_name = string ++ type url = string ++ type unix_dirname = string ++ type unix_filename = string ++ type host_dirname = string ++ type host_filename = string ++ type prog = string ++ type arg = string ++ type args = string list ++ type command_line = (prog * arg list) ++ ++ ++ type findlib_name = string ++ type findlib_full = string ++ ++ ++ type compiled_object = ++ | Byte ++ | Native ++ | Best ++ ++ ++ ++ type dependency = ++ | FindlibPackage of findlib_full * OASISVersion.comparator option ++ | InternalLibrary of name ++ ++ ++ ++ type tool = ++ | ExternalTool of name ++ | InternalExecutable of name ++ ++ ++ ++ type vcs = ++ | Darcs ++ | Git ++ | Svn ++ | Cvs ++ | Hg ++ | Bzr ++ | Arch ++ | Monotone ++ | OtherVCS of url ++ ++ ++ ++ type plugin_kind = ++ [ `Configure ++ | `Build ++ | `Doc ++ | `Test ++ | `Install ++ | `Extra ++ ] ++ ++ ++ type plugin_data_purpose = ++ [ `Configure ++ | `Build ++ | `Install ++ | `Clean ++ | `Distclean ++ | `Install ++ | `Uninstall ++ | `Test ++ | `Doc ++ | `Extra ++ | `Other of string ++ ] ++ ++ ++ type 'a plugin = 'a * name * OASISVersion.t option ++ ++ ++ type all_plugin = plugin_kind plugin ++ ++ ++ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list ++ ++ ++(* # 115 "src/oasis/OASISTypes.ml" *) ++ ++ ++ type 'a conditional = 'a OASISExpr.choices ++ ++ ++ type custom = ++ { ++ pre_command: (command_line option) conditional; ++ post_command: (command_line option) conditional; ++ } ++ ++ ++ ++ type common_section = ++ { ++ cs_name: name; ++ cs_data: PropList.Data.t; ++ cs_plugin_data: plugin_data; ++ } ++ ++ ++ ++ type build_section = ++ { ++ bs_build: bool conditional; ++ bs_install: bool conditional; ++ bs_path: unix_dirname; ++ bs_compiled_object: compiled_object; ++ bs_build_depends: dependency list; ++ bs_build_tools: tool list; ++ bs_c_sources: unix_filename list; ++ bs_data_files: (unix_filename * unix_filename option) list; ++ bs_ccopt: args conditional; ++ bs_cclib: args conditional; ++ bs_dlllib: args conditional; ++ bs_dllpath: args conditional; ++ bs_byteopt: args conditional; ++ bs_nativeopt: args conditional; ++ } ++ ++ ++ ++ type library = ++ { ++ lib_modules: string list; ++ lib_pack: bool; ++ lib_internal_modules: string list; ++ lib_findlib_parent: findlib_name option; ++ lib_findlib_name: findlib_name option; ++ lib_findlib_containers: findlib_name list; ++ } ++ ++ ++ type object_ = ++ { ++ obj_modules: string list; ++ obj_findlib_fullname: findlib_name list option; ++ } ++ ++ ++ type executable = ++ { ++ exec_custom: bool; ++ exec_main_is: unix_filename; ++ } ++ ++ ++ type flag = ++ { ++ flag_description: string option; ++ flag_default: bool conditional; ++ } ++ ++ ++ type source_repository = ++ { ++ src_repo_type: vcs; ++ src_repo_location: url; ++ src_repo_browser: url option; ++ src_repo_module: string option; ++ src_repo_branch: string option; ++ src_repo_tag: string option; ++ src_repo_subdir: unix_filename option; ++ } ++ ++ ++ type test = ++ { ++ test_type: [`Test] plugin; ++ test_command: command_line conditional; ++ test_custom: custom; ++ test_working_directory: unix_filename option; ++ test_run: bool conditional; ++ test_tools: tool list; ++ } ++ ++ ++ type doc_format = ++ | HTML of unix_filename ++ | DocText ++ | PDF ++ | PostScript ++ | Info of unix_filename ++ | DVI ++ | OtherDoc ++ ++ ++ ++ type doc = ++ { ++ doc_type: [`Doc] plugin; ++ doc_custom: custom; ++ doc_build: bool conditional; ++ doc_install: bool conditional; ++ doc_install_dir: unix_filename; ++ doc_title: string; ++ doc_authors: string list; ++ doc_abstract: string option; ++ doc_format: doc_format; ++ doc_data_files: (unix_filename * unix_filename option) list; ++ doc_build_tools: tool list; ++ } ++ ++ ++ type section = ++ | Library of common_section * build_section * library ++ | Object of common_section * build_section * object_ ++ | Executable of common_section * build_section * executable ++ | Flag of common_section * flag ++ | SrcRepo of common_section * source_repository ++ | Test of common_section * test ++ | Doc of common_section * doc ++ ++ ++ ++ type section_kind = ++ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] ++ ++ ++ type package = ++ { ++ oasis_version: OASISVersion.t; ++ ocaml_version: OASISVersion.comparator option; ++ findlib_version: OASISVersion.comparator option; ++ alpha_features: string list; ++ beta_features: string list; ++ name: package_name; ++ version: OASISVersion.t; ++ license: OASISLicense.t; ++ license_file: unix_filename option; ++ copyrights: string list; ++ maintainers: string list; ++ authors: string list; ++ homepage: url option; ++ synopsis: string; ++ description: OASISText.t option; ++ categories: url list; ++ ++ conf_type: [`Configure] plugin; ++ conf_custom: custom; ++ ++ build_type: [`Build] plugin; ++ build_custom: custom; ++ ++ install_type: [`Install] plugin; ++ install_custom: custom; ++ uninstall_custom: custom; ++ ++ clean_custom: custom; ++ distclean_custom: custom; ++ ++ files_ab: unix_filename list; ++ sections: section list; ++ plugins: [`Extra] plugin list; ++ disable_oasis_section: unix_filename list; ++ schema_data: PropList.Data.t; ++ plugin_data: plugin_data; ++ } ++ ++ ++end ++ ++module OASISFeatures = struct ++(* # 22 "src/oasis/OASISFeatures.ml" *) ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISVersion ++ ++ module MapPlugin = ++ Map.Make ++ (struct ++ type t = plugin_kind * name ++ let compare = Pervasives.compare ++ end) ++ ++ module Data = ++ struct ++ type t = ++ { ++ oasis_version: OASISVersion.t; ++ plugin_versions: OASISVersion.t option MapPlugin.t; ++ alpha_features: string list; ++ beta_features: string list; ++ } ++ ++ let create oasis_version alpha_features beta_features = ++ { ++ oasis_version = oasis_version; ++ plugin_versions = MapPlugin.empty; ++ alpha_features = alpha_features; ++ beta_features = beta_features ++ } ++ ++ let of_package pkg = ++ create ++ pkg.OASISTypes.oasis_version ++ pkg.OASISTypes.alpha_features ++ pkg.OASISTypes.beta_features ++ ++ let add_plugin (plugin_kind, plugin_name, plugin_version) t = ++ {t with ++ plugin_versions = MapPlugin.add ++ (plugin_kind, plugin_name) ++ plugin_version ++ t.plugin_versions} ++ ++ let plugin_version plugin_kind plugin_name t = ++ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions ++ ++ let to_string t = ++ Printf.sprintf ++ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ ++ plugins_version: %s" ++ (OASISVersion.string_of_version t.oasis_version) ++ (String.concat ", " t.alpha_features) ++ (String.concat ", " t.beta_features) ++ (String.concat ", " ++ (MapPlugin.fold ++ (fun (_, plg) ver_opt acc -> ++ (plg^ ++ (match ver_opt with ++ | Some v -> ++ " "^(OASISVersion.string_of_version v) ++ | None -> "")) ++ :: acc) ++ t.plugin_versions [])) ++ end ++ ++ type origin = ++ | Field of string * string ++ | Section of string ++ | NoOrigin ++ ++ type stage = Alpha | Beta ++ ++ ++ let string_of_stage = ++ function ++ | Alpha -> "alpha" ++ | Beta -> "beta" ++ ++ ++ let field_of_stage = ++ function ++ | Alpha -> "AlphaFeatures" ++ | Beta -> "BetaFeatures" ++ ++ type publication = InDev of stage | SinceVersion of OASISVersion.t ++ ++ type t = ++ { ++ name: string; ++ plugin: all_plugin option; ++ publication: publication; ++ description: unit -> string; ++ } ++ ++ (* TODO: mutex protect this. *) ++ let all_features = Hashtbl.create 13 ++ ++ ++ let since_version ver_str = SinceVersion (version_of_string ver_str) ++ let alpha = InDev Alpha ++ let beta = InDev Beta ++ ++ ++ let to_string t = ++ Printf.sprintf ++ "feature: %s; plugin: %s; publication: %s" ++ t.name ++ (match t.plugin with ++ | None -> "" ++ | Some (_, nm, _) -> nm) ++ (match t.publication with ++ | InDev stage -> string_of_stage stage ++ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) ++ ++ let data_check t data origin = ++ let no_message = "no message" in ++ ++ let check_feature features stage = ++ let has_feature = List.mem t.name features in ++ if not has_feature then ++ match origin with ++ | Field (fld, where) -> ++ Some ++ (Printf.sprintf ++ (f_ "Field %s in %s is only available when feature %s \ ++ is in field %s.") ++ fld where t.name (field_of_stage stage)) ++ | Section sct -> ++ Some ++ (Printf.sprintf ++ (f_ "Section %s is only available when features %s \ ++ is in field %s.") ++ sct t.name (field_of_stage stage)) ++ | NoOrigin -> ++ Some no_message ++ else ++ None ++ in ++ ++ let version_is_good ~min_version version fmt = ++ let version_is_good = ++ OASISVersion.comparator_apply ++ version (OASISVersion.VGreaterEqual min_version) ++ in ++ Printf.ksprintf ++ (fun str -> ++ if version_is_good then ++ None ++ else ++ Some str) ++ fmt ++ in ++ ++ match origin, t.plugin, t.publication with ++ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha ++ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta ++ | Field(fld, where), None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Field %s in %s is only valid since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking \ ++ OASIS changelog.") ++ fld where (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Field(fld, where), Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Field %s in %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ fld where plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | Section sct, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Section %s is only valid for since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking OASIS \ ++ changelog.") ++ sct (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Section sct, Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Section %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Section %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ sct plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Section %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | NoOrigin, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version "%s" no_message ++ ++ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> raise Not_found ++ in ++ version_is_good ~min_version plugin_version_current ++ "%s" no_message ++ with Not_found -> ++ Some no_message ++ end ++ ++ ++ let data_assert t data origin = ++ match data_check t data origin with ++ | None -> () ++ | Some str -> failwith str ++ ++ ++ let data_test t data = ++ match data_check t data NoOrigin with ++ | None -> true ++ | Some str -> false ++ ++ ++ let package_test t pkg = ++ data_test t (Data.of_package pkg) ++ ++ ++ let create ?plugin name publication description = ++ let () = ++ if Hashtbl.mem all_features name then ++ failwithf "Feature '%s' is already declared." name ++ in ++ let t = ++ { ++ name = name; ++ plugin = plugin; ++ publication = publication; ++ description = description; ++ } ++ in ++ Hashtbl.add all_features name t; ++ t ++ ++ ++ let get_stage name = ++ try ++ (Hashtbl.find all_features name).publication ++ with Not_found -> ++ failwithf (f_ "Feature %s doesn't exist.") name ++ ++ ++ let list () = ++ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] ++ ++ (* ++ * Real flags. ++ *) ++ ++ ++ let features = ++ create "features_fields" ++ (since_version "0.4") ++ (fun () -> ++ s_ "Enable to experiment not yet official features.") ++ ++ ++ let flag_docs = ++ create "flag_docs" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Building docs require '-docs' flag at configure.") ++ ++ ++ let flag_tests = ++ create "flag_tests" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Running tests require '-tests' flag at configure.") ++ ++ ++ let pack = ++ create "pack" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Allow to create packed library.") ++ ++ ++ let section_object = ++ create "section_object" beta ++ (fun () -> ++ s_ "Implement an object section.") ++ ++ ++ let dynrun_for_release = ++ create "dynrun_for_release" alpha ++ (fun () -> ++ s_ "Make '-setup-update dynamic' suitable for releasing project.") ++ ++ ++ let compiled_setup_ml = ++ create "compiled_setup_ml" alpha ++ (fun () -> ++ s_ "It compiles the setup.ml and speed-up actions done with it.") ++ ++ let disable_oasis_section = ++ create "disable_oasis_section" alpha ++ (fun () -> ++ s_ "Allows the OASIS section comments and digest to be omitted in \ ++ generated files.") ++end ++ ++module OASISUnixPath = struct ++(* # 22 "src/oasis/OASISUnixPath.ml" *) ++ ++ ++ type unix_filename = string ++ type unix_dirname = string ++ ++ ++ type host_filename = string ++ type host_dirname = string ++ ++ ++ let current_dir_name = "." ++ ++ ++ let parent_dir_name = ".." ++ ++ ++ let is_current_dir fn = ++ fn = current_dir_name || fn = "" ++ ++ ++ let concat f1 f2 = ++ if is_current_dir f1 then ++ f2 ++ else ++ let f1' = ++ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 ++ in ++ f1'^"/"^f2 ++ ++ ++ let make = ++ function ++ | hd :: tl -> ++ List.fold_left ++ (fun f p -> concat f p) ++ hd ++ tl ++ | [] -> ++ invalid_arg "OASISUnixPath.make" ++ ++ ++ let dirname f = ++ try ++ String.sub f 0 (String.rindex f '/') ++ with Not_found -> ++ current_dir_name ++ ++ ++ let basename f = ++ try ++ let pos_start = ++ (String.rindex f '/') + 1 ++ in ++ String.sub f pos_start ((String.length f) - pos_start) ++ with Not_found -> ++ f ++ ++ ++ let chop_extension f = ++ try ++ let last_dot = ++ String.rindex f '.' ++ in ++ let sub = ++ String.sub f 0 last_dot ++ in ++ try ++ let last_slash = ++ String.rindex f '/' ++ in ++ if last_slash < last_dot then ++ sub ++ else ++ f ++ with Not_found -> ++ sub ++ ++ with Not_found -> ++ f ++ ++ ++ let capitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.capitalize base) ++ ++ ++ let uncapitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.uncapitalize base) ++ ++ ++end ++ ++module OASISHostPath = struct ++(* # 22 "src/oasis/OASISHostPath.ml" *) ++ ++ ++ open Filename ++ ++ ++ module Unix = OASISUnixPath ++ ++ ++ let make = ++ function ++ | [] -> ++ invalid_arg "OASISHostPath.make" ++ | hd :: tl -> ++ List.fold_left Filename.concat hd tl ++ ++ ++ let of_unix ufn = ++ if Sys.os_type = "Unix" then ++ ufn ++ else ++ make ++ (List.map ++ (fun p -> ++ if p = Unix.current_dir_name then ++ current_dir_name ++ else if p = Unix.parent_dir_name then ++ parent_dir_name ++ else ++ p) ++ (OASISString.nsplit ufn '/')) ++ ++ ++end ++ ++module OASISSection = struct ++(* # 22 "src/oasis/OASISSection.ml" *) ++ ++ ++ open OASISTypes ++ ++ ++ let section_kind_common = ++ function ++ | Library (cs, _, _) -> ++ `Library, cs ++ | Object (cs, _, _) -> ++ `Object, cs ++ | Executable (cs, _, _) -> ++ `Executable, cs ++ | Flag (cs, _) -> ++ `Flag, cs ++ | SrcRepo (cs, _) -> ++ `SrcRepo, cs ++ | Test (cs, _) -> ++ `Test, cs ++ | Doc (cs, _) -> ++ `Doc, cs ++ ++ ++ let section_common sct = ++ snd (section_kind_common sct) ++ ++ ++ let section_common_set cs = ++ function ++ | Library (_, bs, lib) -> Library (cs, bs, lib) ++ | Object (_, bs, obj) -> Object (cs, bs, obj) ++ | Executable (_, bs, exec) -> Executable (cs, bs, exec) ++ | Flag (_, flg) -> Flag (cs, flg) ++ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) ++ | Test (_, tst) -> Test (cs, tst) ++ | Doc (_, doc) -> Doc (cs, doc) ++ ++ ++ (** Key used to identify section ++ *) ++ let section_id sct = ++ let k, cs = ++ section_kind_common sct ++ in ++ k, cs.cs_name ++ ++ ++ let string_of_section sct = ++ let k, nm = ++ section_id sct ++ in ++ (match k with ++ | `Library -> "library" ++ | `Object -> "object" ++ | `Executable -> "executable" ++ | `Flag -> "flag" ++ | `SrcRepo -> "src repository" ++ | `Test -> "test" ++ | `Doc -> "doc") ++ ^" "^nm ++ ++ ++ let section_find id scts = ++ List.find ++ (fun sct -> id = section_id sct) ++ scts ++ ++ ++ module CSection = ++ struct ++ type t = section ++ ++ let id = section_id ++ ++ let compare t1 t2 = ++ compare (id t1) (id t2) ++ ++ let equal t1 t2 = ++ (id t1) = (id t2) ++ ++ let hash t = ++ Hashtbl.hash (id t) ++ end ++ ++ ++ module MapSection = Map.Make(CSection) ++ module SetSection = Set.Make(CSection) ++ ++ ++end ++ ++module OASISBuildSection = struct ++(* # 22 "src/oasis/OASISBuildSection.ml" *) ++ ++ ++end ++ ++module OASISExecutable = struct ++(* # 22 "src/oasis/OASISExecutable.ml" *) ++ ++ ++ open OASISTypes ++ ++ ++ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = ++ let dir = ++ OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.dirname exec.exec_main_is) ++ in ++ let is_native_exec = ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native () ++ | Byte -> false ++ in ++ ++ OASISUnixPath.concat ++ dir ++ (cs.cs_name^(suffix_program ())), ++ ++ if not is_native_exec && ++ not exec.exec_custom && ++ bs.bs_c_sources <> [] then ++ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) ++ else ++ None ++ ++ ++end ++ ++module OASISLibrary = struct ++(* # 22 "src/oasis/OASISLibrary.ml" *) ++ ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ ++ (* Look for a module file, considering capitalization or not. *) ++ let find_module source_file_exists bs modul = ++ let possible_base_fn = ++ List.map ++ (OASISUnixPath.concat bs.bs_path) ++ [modul; ++ OASISUnixPath.uncapitalize_file modul; ++ OASISUnixPath.capitalize_file modul] ++ in ++ (* TODO: we should be able to be able to determine the source for every ++ * files. Hence we should introduce a Module(source: fn) for the fields ++ * Modules and InternalModules ++ *) ++ List.fold_left ++ (fun acc base_fn -> ++ match acc with ++ | `No_sources _ -> ++ begin ++ let file_found = ++ List.fold_left ++ (fun acc ext -> ++ if source_file_exists (base_fn^ext) then ++ (base_fn^ext) :: acc ++ else ++ acc) ++ [] ++ [".ml"; ".mli"; ".mll"; ".mly"] ++ in ++ match file_found with ++ | [] -> ++ acc ++ | lst -> ++ `Sources (base_fn, lst) ++ end ++ | `Sources _ -> ++ acc) ++ (`No_sources possible_base_fn) ++ possible_base_fn ++ ++ ++ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match find_module source_file_exists bs modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ (lib.lib_modules @ lib.lib_internal_modules) ++ ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~has_native_dynlink ++ ~ext_lib ++ ~ext_dll ++ ~source_file_exists ++ (cs, bs, lib) = ++ ++ let find_modules lst ext = ++ let find_module modul = ++ match find_module source_file_exists bs modul with ++ | `Sources (base_fn, [fn]) when ext <> "cmi" ++ && Filename.check_suffix fn ".mli" -> ++ None (* No implementation files for pure interface. *) ++ | `Sources (base_fn, _) -> ++ Some [base_fn] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ Some lst ++ in ++ List.fold_left ++ (fun acc nm -> ++ match find_module nm with ++ | None -> acc ++ | Some base_fns -> ++ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) ++ [] ++ lst ++ in ++ ++ (* The headers that should be compiled along *) ++ let headers = ++ if lib.lib_pack then ++ [] ++ else ++ find_modules ++ lib.lib_modules ++ "cmi" ++ in ++ ++ (* The .cmx that be compiled along *) ++ let cmxs = ++ let should_be_built = ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native ++ | Byte -> false ++ in ++ if should_be_built then ++ if lib.lib_pack then ++ find_modules ++ [cs.cs_name] ++ "cmx" ++ else ++ find_modules ++ (lib.lib_modules @ lib.lib_internal_modules) ++ "cmx" ++ else ++ [] ++ in ++ ++ let acc_nopath = ++ [] ++ in ++ ++ (* Compute what libraries should be built *) ++ let acc_nopath = ++ (* Add the packed header file if required *) ++ let add_pack_header acc = ++ if lib.lib_pack then ++ [cs.cs_name^".cmi"] :: acc ++ else ++ acc ++ in ++ let byte acc = ++ add_pack_header ([cs.cs_name^".cma"] :: acc) ++ in ++ let native acc = ++ let acc = ++ add_pack_header ++ (if has_native_dynlink then ++ [cs.cs_name^".cmxs"] :: acc ++ else acc) ++ in ++ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc ++ in ++ match bs.bs_compiled_object with ++ | Native -> ++ byte (native acc_nopath) ++ | Best when is_native -> ++ byte (native acc_nopath) ++ | Byte | Best -> ++ byte acc_nopath ++ in ++ ++ (* Add C library to be built *) ++ let acc_nopath = ++ if bs.bs_c_sources <> [] then ++ begin ++ ["lib"^cs.cs_name^"_stubs"^ext_lib] ++ :: ++ ["dll"^cs.cs_name^"_stubs"^ext_dll] ++ :: ++ acc_nopath ++ end ++ else ++ acc_nopath ++ in ++ ++ (* All the files generated *) ++ List.rev_append ++ (List.rev_map ++ (List.rev_map ++ (OASISUnixPath.concat bs.bs_path)) ++ acc_nopath) ++ (headers @ cmxs) ++ ++ ++end ++ ++module OASISObject = struct ++(* # 22 "src/oasis/OASISObject.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ obj.obj_modules ++ ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~source_file_exists ++ (cs, bs, obj) = ++ ++ let find_module ext modul = ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, _) -> [base_fn ^ ext] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name ; ++ lst ++ in ++ ++ let header, byte, native, c_object, f = ++ match obj.obj_modules with ++ | [ m ] -> (find_module ".cmi" m, ++ find_module ".cmo" m, ++ find_module ".cmx" m, ++ find_module ".o" m, ++ fun x -> x) ++ | _ -> ([cs.cs_name ^ ".cmi"], ++ [cs.cs_name ^ ".cmo"], ++ [cs.cs_name ^ ".cmx"], ++ [cs.cs_name ^ ".o"], ++ OASISUnixPath.concat bs.bs_path) ++ in ++ List.map (List.map f) ( ++ match bs.bs_compiled_object with ++ | Native -> ++ native :: c_object :: byte :: header :: [] ++ | Best when is_native -> ++ native :: c_object :: byte :: header :: [] ++ | Byte | Best -> ++ byte :: header :: []) ++ ++ ++end ++ ++module OASISFindlib = struct ++(* # 22 "src/oasis/OASISFindlib.ml" *) ++ ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ ++ type library_name = name ++ type findlib_part_name = name ++ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t ++ ++ ++ exception InternalLibraryNotFound of library_name ++ exception FindlibPackageNotFound of findlib_name ++ ++ ++ type group_t = ++ | Container of findlib_name * group_t list ++ | Package of (findlib_name * ++ common_section * ++ build_section * ++ [`Library of library | `Object of object_] * ++ group_t list) ++ ++ ++ type data = common_section * ++ build_section * ++ [`Library of library | `Object of object_] ++ type tree = ++ | Node of (data option) * (tree MapString.t) ++ | Leaf of data ++ ++ ++ let findlib_mapping pkg = ++ (* Map from library name to either full findlib name or parts + parent. *) ++ let fndlb_parts_of_lib_name = ++ let fndlb_parts cs lib = ++ let name = ++ match lib.lib_findlib_name with ++ | Some nm -> nm ++ | None -> cs.cs_name ++ in ++ let name = ++ String.concat "." (lib.lib_findlib_containers @ [name]) ++ in ++ name ++ in ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, _, lib) -> ++ begin ++ let lib_name = cs.cs_name in ++ let fndlb_parts = fndlb_parts cs lib in ++ if MapString.mem lib_name mp then ++ failwithf ++ (f_ "The library name '%s' is used more than once.") ++ lib_name; ++ match lib.lib_findlib_parent with ++ | Some lib_name_parent -> ++ MapString.add ++ lib_name ++ (`Unsolved (lib_name_parent, fndlb_parts)) ++ mp ++ | None -> ++ MapString.add ++ lib_name ++ (`Solved fndlb_parts) ++ mp ++ end ++ ++ | Object (cs, _, obj) -> ++ begin ++ let obj_name = cs.cs_name in ++ if MapString.mem obj_name mp then ++ failwithf ++ (f_ "The object name '%s' is used more than once.") ++ obj_name; ++ let findlib_full_name = match obj.obj_findlib_fullname with ++ | Some ns -> String.concat "." ns ++ | None -> obj_name ++ in ++ MapString.add ++ obj_name ++ (`Solved findlib_full_name) ++ mp ++ end ++ ++ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ (* Solve the above graph to be only library name to full findlib name. *) ++ let fndlb_name_of_lib_name = ++ let rec solve visited mp lib_name lib_name_child = ++ if SetString.mem lib_name visited then ++ failwithf ++ (f_ "Library '%s' is involved in a cycle \ ++ with regard to findlib naming.") ++ lib_name; ++ let visited = SetString.add lib_name visited in ++ try ++ match MapString.find lib_name mp with ++ | `Solved fndlb_nm -> ++ fndlb_nm, mp ++ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> ++ let pre_fndlb_nm, mp = ++ solve visited mp lib_nm_parent lib_name ++ in ++ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in ++ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp ++ with Not_found -> ++ failwithf ++ (f_ "Library '%s', which is defined as the findlib parent of \ ++ library '%s', doesn't exist.") ++ lib_name lib_name_child ++ in ++ let mp = ++ MapString.fold ++ (fun lib_name status mp -> ++ match status with ++ | `Solved _ -> ++ (* Solved initialy, no need to go further *) ++ mp ++ | `Unsolved _ -> ++ let _, mp = solve SetString.empty mp lib_name "" in ++ mp) ++ fndlb_parts_of_lib_name ++ fndlb_parts_of_lib_name ++ in ++ MapString.map ++ (function ++ | `Solved fndlb_nm -> fndlb_nm ++ | `Unsolved _ -> assert false) ++ mp ++ in ++ ++ (* Convert an internal library name to a findlib name. *) ++ let findlib_name_of_library_name lib_nm = ++ try ++ MapString.find lib_nm fndlb_name_of_lib_name ++ with Not_found -> ++ raise (InternalLibraryNotFound lib_nm) ++ in ++ ++ (* Add a library to the tree. ++ *) ++ let add sct mp = ++ let fndlb_fullname = ++ let cs, _, _ = sct in ++ let lib_name = cs.cs_name in ++ findlib_name_of_library_name lib_name ++ in ++ let rec add_children nm_lst (children: tree MapString.t) = ++ match nm_lst with ++ | (hd :: tl) -> ++ begin ++ let node = ++ try ++ add_node tl (MapString.find hd children) ++ with Not_found -> ++ (* New node *) ++ new_node tl ++ in ++ MapString.add hd node children ++ end ++ | [] -> ++ (* Should not have a nameless library. *) ++ assert false ++ and add_node tl node = ++ if tl = [] then ++ begin ++ match node with ++ | Node (None, children) -> ++ Node (Some sct, children) ++ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> ++ (* TODO: allow to merge Package, i.e. ++ * archive(byte) = "foo.cma foo_init.cmo" ++ *) ++ let cs, _, _ = sct in ++ failwithf ++ (f_ "Library '%s' and '%s' have the same findlib name '%s'") ++ cs.cs_name cs'.cs_name fndlb_fullname ++ end ++ else ++ begin ++ match node with ++ | Leaf data -> ++ Node (Some data, add_children tl MapString.empty) ++ | Node (data_opt, children) -> ++ Node (data_opt, add_children tl children) ++ end ++ and new_node = ++ function ++ | [] -> ++ Leaf sct ++ | hd :: tl -> ++ Node (None, MapString.add hd (new_node tl) MapString.empty) ++ in ++ add_children (OASISString.nsplit fndlb_fullname '.') mp ++ in ++ ++ let rec group_of_tree mp = ++ MapString.fold ++ (fun nm node acc -> ++ let cur = ++ match node with ++ | Node (Some (cs, bs, lib), children) -> ++ Package (nm, cs, bs, lib, group_of_tree children) ++ | Node (None, children) -> ++ Container (nm, group_of_tree children) ++ | Leaf (cs, bs, lib) -> ++ Package (nm, cs, bs, lib, []) ++ in ++ cur :: acc) ++ mp [] ++ in ++ ++ let group_mp = ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, bs, lib) -> ++ add (cs, bs, `Library lib) mp ++ | Object (cs, bs, obj) -> ++ add (cs, bs, `Object obj) mp ++ | _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ let groups = ++ group_of_tree group_mp ++ in ++ ++ let library_name_of_findlib_name = ++ Lazy.lazy_from_fun ++ (fun () -> ++ (* Revert findlib_name_of_library_name. *) ++ MapString.fold ++ (fun k v mp -> MapString.add v k mp) ++ fndlb_name_of_lib_name ++ MapString.empty) ++ in ++ let library_name_of_findlib_name fndlb_nm = ++ try ++ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) ++ with Not_found -> ++ raise (FindlibPackageNotFound fndlb_nm) ++ in ++ ++ groups, ++ findlib_name_of_library_name, ++ library_name_of_findlib_name ++ ++ ++ let findlib_of_group = ++ function ++ | Container (fndlb_nm, _) ++ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm ++ ++ ++ let root_of_group grp = ++ let rec root_lib_aux = ++ (* We do a DFS in the group. *) ++ function ++ | Container (_, children) -> ++ List.fold_left ++ (fun res grp -> ++ if res = None then ++ root_lib_aux grp ++ else ++ res) ++ None ++ children ++ | Package (_, cs, bs, lib, _) -> ++ Some (cs, bs, lib) ++ in ++ match root_lib_aux grp with ++ | Some res -> ++ res ++ | None -> ++ failwithf ++ (f_ "Unable to determine root library of findlib library '%s'") ++ (findlib_of_group grp) ++ ++ ++end ++ ++module OASISFlag = struct ++(* # 22 "src/oasis/OASISFlag.ml" *) ++ ++ ++end ++ ++module OASISPackage = struct ++(* # 22 "src/oasis/OASISPackage.ml" *) ++ ++ ++end ++ ++module OASISSourceRepository = struct ++(* # 22 "src/oasis/OASISSourceRepository.ml" *) ++ ++ ++end ++ ++module OASISTest = struct ++(* # 22 "src/oasis/OASISTest.ml" *) ++ ++ ++end ++ ++module OASISDocument = struct ++(* # 22 "src/oasis/OASISDocument.ml" *) ++ ++ ++end ++ ++module OASISExec = struct ++(* # 22 "src/oasis/OASISExec.ml" *) ++ ++ ++ open OASISGettext ++ open OASISUtils ++ open OASISMessage ++ ++ ++ (* TODO: I don't like this quote, it is there because $(rm) foo expands to ++ * 'rm -f' foo... ++ *) ++ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = ++ let cmd = ++ if quote then ++ if Sys.os_type = "Win32" then ++ if String.contains cmd ' ' then ++ (* Double the 1st double quote... win32... sigh *) ++ "\""^(Filename.quote cmd) ++ else ++ cmd ++ else ++ Filename.quote cmd ++ else ++ cmd ++ in ++ let cmdline = ++ String.concat " " (cmd :: args) ++ in ++ info ~ctxt (f_ "Running command '%s'") cmdline; ++ match f_exit_code, Sys.command cmdline with ++ | None, 0 -> () ++ | None, i -> ++ failwithf ++ (f_ "Command '%s' terminated with error code %d") ++ cmdline i ++ | Some f, i -> ++ f i ++ ++ ++ let run_read_output ~ctxt ?f_exit_code cmd args = ++ let fn = ++ Filename.temp_file "oasis-" ".txt" ++ in ++ try ++ begin ++ let () = ++ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) ++ in ++ let chn = ++ open_in fn ++ in ++ let routput = ++ ref [] ++ in ++ begin ++ try ++ while true do ++ routput := (input_line chn) :: !routput ++ done ++ with End_of_file -> ++ () ++ end; ++ close_in chn; ++ Sys.remove fn; ++ List.rev !routput ++ end ++ with e -> ++ (try Sys.remove fn with _ -> ()); ++ raise e ++ ++ ++ let run_read_one_line ~ctxt ?f_exit_code cmd args = ++ match run_read_output ~ctxt ?f_exit_code cmd args with ++ | [fst] -> ++ fst ++ | lst -> ++ failwithf ++ (f_ "Command return unexpected output %S") ++ (String.concat "\n" lst) ++end ++ ++module OASISFileUtil = struct ++(* # 22 "src/oasis/OASISFileUtil.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ let file_exists_case fn = ++ let dirname = Filename.dirname fn in ++ let basename = Filename.basename fn in ++ if Sys.file_exists dirname then ++ if basename = Filename.current_dir_name then ++ true ++ else ++ List.mem ++ basename ++ (Array.to_list (Sys.readdir dirname)) ++ else ++ false ++ ++ ++ let find_file ?(case_sensitive=true) paths exts = ++ ++ (* Cardinal product of two list *) ++ let ( * ) lst1 lst2 = ++ List.flatten ++ (List.map ++ (fun a -> ++ List.map ++ (fun b -> a, b) ++ lst2) ++ lst1) ++ in ++ ++ let rec combined_paths lst = ++ match lst with ++ | p1 :: p2 :: tl -> ++ let acc = ++ (List.map ++ (fun (a, b) -> Filename.concat a b) ++ (p1 * p2)) ++ in ++ combined_paths (acc :: tl) ++ | [e] -> ++ e ++ | [] -> ++ [] ++ in ++ ++ let alternatives = ++ List.map ++ (fun (p, e) -> ++ if String.length e > 0 && e.[0] <> '.' then ++ p ^ "." ^ e ++ else ++ p ^ e) ++ ((combined_paths paths) * exts) ++ in ++ List.find (fun file -> ++ (if case_sensitive then ++ file_exists_case file ++ else ++ Sys.file_exists file) ++ && not (Sys.is_directory file) ++ ) alternatives ++ ++ ++ let which ~ctxt prg = ++ let path_sep = ++ match Sys.os_type with ++ | "Win32" -> ++ ';' ++ | _ -> ++ ':' ++ in ++ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in ++ let exec_ext = ++ match Sys.os_type with ++ | "Win32" -> ++ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) ++ | _ -> ++ [""] ++ in ++ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext ++ ++ ++ (**/**) ++ let rec fix_dir dn = ++ (* Windows hack because Sys.file_exists "src\\" = false when ++ * Sys.file_exists "src" = true ++ *) ++ let ln = ++ String.length dn ++ in ++ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then ++ fix_dir (String.sub dn 0 (ln - 1)) ++ else ++ dn ++ ++ ++ let q = Filename.quote ++ (**/**) ++ ++ ++ let cp ~ctxt ?(recurse=false) src tgt = ++ if recurse then ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt ++ "xcopy" [q src; q tgt; "/E"] ++ | _ -> ++ OASISExec.run ~ctxt ++ "cp" ["-r"; q src; q tgt] ++ else ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "copy" ++ | _ -> "cp") ++ [q src; q tgt] ++ ++ ++ let mkdir ~ctxt tgt = ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "md" ++ | _ -> "mkdir") ++ [q tgt] ++ ++ ++ let rec mkdir_parent ~ctxt f tgt = ++ let tgt = ++ fix_dir tgt ++ in ++ if Sys.file_exists tgt then ++ begin ++ if not (Sys.is_directory tgt) then ++ OASISUtils.failwithf ++ (f_ "Cannot create directory '%s', a file of the same name already \ ++ exists") ++ tgt ++ end ++ else ++ begin ++ mkdir_parent ~ctxt f (Filename.dirname tgt); ++ if not (Sys.file_exists tgt) then ++ begin ++ f tgt; ++ mkdir ~ctxt tgt ++ end ++ end ++ ++ ++ let rmdir ~ctxt tgt = ++ if Sys.readdir tgt = [||] then begin ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt "rd" [q tgt] ++ | _ -> ++ OASISExec.run ~ctxt "rm" ["-r"; q tgt] ++ end else begin ++ OASISMessage.error ~ctxt ++ (f_ "Cannot remove directory '%s': not empty.") ++ tgt ++ end ++ ++ ++ let glob ~ctxt fn = ++ let basename = ++ Filename.basename fn ++ in ++ if String.length basename >= 2 && ++ basename.[0] = '*' && ++ basename.[1] = '.' then ++ begin ++ let ext_len = ++ (String.length basename) - 2 ++ in ++ let ext = ++ String.sub basename 2 ext_len ++ in ++ let dirname = ++ Filename.dirname fn ++ in ++ Array.fold_left ++ (fun acc fn -> ++ try ++ let fn_ext = ++ String.sub ++ fn ++ ((String.length fn) - ext_len) ++ ext_len ++ in ++ if fn_ext = ext then ++ (Filename.concat dirname fn) :: acc ++ else ++ acc ++ with Invalid_argument _ -> ++ acc) ++ [] ++ (Sys.readdir dirname) ++ end ++ else ++ begin ++ if file_exists_case fn then ++ [fn] ++ else ++ [] ++ end ++end ++ ++ ++# 2878 "setup.ml" ++module BaseEnvLight = struct ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ ++ ++ module MapString = Map.Make(String) ++ ++ ++ type t = string MapString.t ++ ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 2983 "setup.ml" ++module BaseContext = struct ++(* # 22 "src/base/BaseContext.ml" *) ++ ++ (* TODO: get rid of this module. *) ++ open OASISContext ++ ++ ++ let args () = fst (fspecs ()) ++ ++ ++ let default = default ++ ++end ++ ++module BaseMessage = struct ++(* # 22 "src/base/BaseMessage.ml" *) ++ ++ ++ (** Message to user, overrid for Base ++ @author Sylvain Le Gall ++ *) ++ open OASISMessage ++ open BaseContext ++ ++ ++ let debug fmt = debug ~ctxt:!default fmt ++ ++ ++ let info fmt = info ~ctxt:!default fmt ++ ++ ++ let warning fmt = warning ~ctxt:!default fmt ++ ++ ++ let error fmt = error ~ctxt:!default fmt ++ ++end ++ ++module BaseEnv = struct ++(* # 22 "src/base/BaseEnv.ml" *) ++ ++ open OASISGettext ++ open OASISUtils ++ open PropList ++ ++ ++ module MapString = BaseEnvLight.MapString ++ ++ ++ type origin_t = ++ | ODefault ++ | OGetEnv ++ | OFileLoad ++ | OCommandLine ++ ++ ++ type cli_handle_t = ++ | CLINone ++ | CLIAuto ++ | CLIWith ++ | CLIEnable ++ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list ++ ++ ++ type definition_t = ++ { ++ hide: bool; ++ dump: bool; ++ cli: cli_handle_t; ++ arg_help: string option; ++ group: string option; ++ } ++ ++ ++ let schema = ++ Schema.create "environment" ++ ++ ++ (* Environment data *) ++ let env = ++ Data.create () ++ ++ ++ (* Environment data from file *) ++ let env_from_file = ++ ref MapString.empty ++ ++ ++ (* Lexer for var *) ++ let var_lxr = ++ Genlex.make_lexer [] ++ ++ ++ let rec var_expand str = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ (* TODO: this is a quick hack to allow calling Test.Command ++ * without defining executable name really. I.e. if there is ++ * an exec Executable toto, then $(toto) should be replace ++ * by its real name. It is however useful to have this function ++ * for other variable that depend on the host and should be ++ * written better than that. ++ *) ++ let st = ++ var_lxr (Stream.of_string var) ++ in ++ match Stream.npeek 3 st with ++ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> ++ OASISHostPath.of_unix (var_get nm) ++ | [Genlex.Ident "utoh"; Genlex.String s] -> ++ OASISHostPath.of_unix s ++ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> ++ String.escaped (var_get nm) ++ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> ++ String.escaped s ++ | [Genlex.Ident nm] -> ++ var_get nm ++ | _ -> ++ failwithf ++ (f_ "Unknown expression '%s' in variable expansion of %s.") ++ var ++ str ++ with ++ | Unknown_field (_, _) -> ++ failwithf ++ (f_ "No variable %s defined when trying to expand %S.") ++ var ++ str ++ | Stream.Error e -> ++ failwithf ++ (f_ "Syntax error when parsing '%s' when trying to \ ++ expand %S: %s") ++ var ++ str ++ e) ++ str; ++ Buffer.contents buff ++ ++ ++ and var_get name = ++ let vl = ++ try ++ Schema.get schema env name ++ with Unknown_field _ as e -> ++ begin ++ try ++ MapString.find name !env_from_file ++ with Not_found -> ++ raise e ++ end ++ in ++ var_expand vl ++ ++ ++ let var_choose ?printer ?name lst = ++ OASISExpr.choose ++ ?printer ++ ?name ++ var_get ++ lst ++ ++ ++ let var_protect vl = ++ let buff = ++ Buffer.create (String.length vl) ++ in ++ String.iter ++ (function ++ | '$' -> Buffer.add_string buff "\\$" ++ | c -> Buffer.add_char buff c) ++ vl; ++ Buffer.contents buff ++ ++ ++ let var_define ++ ?(hide=false) ++ ?(dump=true) ++ ?short_desc ++ ?(cli=CLINone) ++ ?arg_help ++ ?group ++ name (* TODO: type constraint on the fact that name must be a valid OCaml ++ id *) ++ dflt = ++ ++ let default = ++ [ ++ OFileLoad, (fun () -> MapString.find name !env_from_file); ++ ODefault, dflt; ++ OGetEnv, (fun () -> Sys.getenv name); ++ ] ++ in ++ ++ let extra = ++ { ++ hide = hide; ++ dump = dump; ++ cli = cli; ++ arg_help = arg_help; ++ group = group; ++ } ++ in ++ ++ (* Try to find a value that can be defined ++ *) ++ let var_get_low lst = ++ let errors, res = ++ List.fold_left ++ (fun (errors, res) (o, v) -> ++ if res = None then ++ begin ++ try ++ errors, Some (v ()) ++ with ++ | Not_found -> ++ errors, res ++ | Failure rsn -> ++ (rsn :: errors), res ++ | e -> ++ (Printexc.to_string e) :: errors, res ++ end ++ else ++ errors, res) ++ ([], None) ++ (List.sort ++ (fun (o1, _) (o2, _) -> ++ Pervasives.compare o2 o1) ++ lst) ++ in ++ match res, errors with ++ | Some v, _ -> ++ v ++ | None, [] -> ++ raise (Not_set (name, None)) ++ | None, lst -> ++ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) ++ in ++ ++ let help = ++ match short_desc with ++ | Some fs -> Some fs ++ | None -> None ++ in ++ ++ let var_get_lst = ++ FieldRO.create ++ ~schema ++ ~name ++ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) ++ ~print:var_get_low ++ ~default ++ ~update:(fun ?context x old_x -> x @ old_x) ++ ?help ++ extra ++ in ++ ++ fun () -> ++ var_expand (var_get_low (var_get_lst env)) ++ ++ ++ let var_redefine ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt = ++ if Schema.mem schema name then ++ begin ++ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) ++ Schema.set schema env ~context:ODefault name (dflt ()); ++ fun () -> var_get name ++ end ++ else ++ begin ++ var_define ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt ++ end ++ ++ ++ let var_ignore (e: unit -> string) = () ++ ++ ++ let print_hidden = ++ var_define ++ ~hide:true ++ ~dump:false ++ ~cli:CLIAuto ++ ~arg_help:"Print even non-printable variable. (debug)" ++ "print_hidden" ++ (fun () -> "false") ++ ++ ++ let var_all () = ++ List.rev ++ (Schema.fold ++ (fun acc nm def _ -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ nm :: acc ++ else ++ acc) ++ [] ++ schema) ++ ++ ++ let default_filename = ++ BaseEnvLight.default_filename ++ ++ ++ let load ?allow_empty ?filename () = ++ env_from_file := BaseEnvLight.load ?allow_empty ?filename () ++ ++ ++ let unload () = ++ env_from_file := MapString.empty; ++ Data.clear env ++ ++ ++ let dump ?(filename=default_filename) () = ++ let chn = ++ open_out_bin filename ++ in ++ let output nm value = ++ Printf.fprintf chn "%s=%S\n" nm value ++ in ++ let mp_todo = ++ (* Dump data from schema *) ++ Schema.fold ++ (fun mp_todo nm def _ -> ++ if def.dump then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ output nm value ++ with Not_set _ -> ++ () ++ end; ++ MapString.remove nm mp_todo) ++ !env_from_file ++ schema ++ in ++ (* Dump data defined outside of schema *) ++ MapString.iter output mp_todo; ++ ++ (* End of the dump *) ++ close_out chn ++ ++ ++ let print () = ++ let printable_vars = ++ Schema.fold ++ (fun acc nm def short_descr_opt -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ let txt = ++ match short_descr_opt with ++ | Some s -> s () ++ | None -> nm ++ in ++ (txt, value) :: acc ++ with Not_set _ -> ++ acc ++ end ++ else ++ acc) ++ [] ++ schema ++ in ++ let max_length = ++ List.fold_left max 0 ++ (List.rev_map String.length ++ (List.rev_map fst printable_vars)) ++ in ++ let dot_pad str = ++ String.make ((max_length - (String.length str)) + 3) '.' ++ in ++ ++ Printf.printf "\nConfiguration: \n"; ++ List.iter ++ (fun (name, value) -> ++ Printf.printf "%s: %s %s\n" name (dot_pad name) value) ++ (List.rev printable_vars); ++ Printf.printf "\n%!" ++ ++ ++ let args () = ++ let arg_concat = ++ OASISUtils.varname_concat ~hyphen:'-' ++ in ++ [ ++ "--override", ++ Arg.Tuple ++ ( ++ let rvr = ref "" ++ in ++ let rvl = ref "" ++ in ++ [ ++ Arg.Set_string rvr; ++ Arg.Set_string rvl; ++ Arg.Unit ++ (fun () -> ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ !rvr ++ !rvl) ++ ] ++ ), ++ "var+val Override any configuration variable."; ++ ++ ] ++ @ ++ List.flatten ++ (Schema.fold ++ (fun acc name def short_descr_opt -> ++ let var_set s = ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ name ++ s ++ in ++ ++ let arg_name = ++ OASISUtils.varname_of_string ~hyphen:'-' name ++ in ++ ++ let hlp = ++ match short_descr_opt with ++ | Some txt -> txt () ++ | None -> "" ++ in ++ ++ let arg_hlp = ++ match def.arg_help with ++ | Some s -> s ++ | None -> "str" ++ in ++ ++ let default_value = ++ try ++ Printf.sprintf ++ (f_ " [%s]") ++ (Schema.get ++ schema ++ env ++ name) ++ with Not_set _ -> ++ "" ++ in ++ ++ let args = ++ match def.cli with ++ | CLINone -> ++ [] ++ | CLIAuto -> ++ [ ++ arg_concat "--" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIWith -> ++ [ ++ arg_concat "--with-" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIEnable -> ++ let dflt = ++ if default_value = " [true]" then ++ s_ " [default: enabled]" ++ else ++ s_ " [default: disabled]" ++ in ++ [ ++ arg_concat "--enable-" arg_name, ++ Arg.Unit (fun () -> var_set "true"), ++ Printf.sprintf (f_ " %s%s") hlp dflt; ++ ++ arg_concat "--disable-" arg_name, ++ Arg.Unit (fun () -> var_set "false"), ++ Printf.sprintf (f_ " %s%s") hlp dflt ++ ] ++ | CLIUser lst -> ++ lst ++ in ++ args :: acc) ++ [] ++ schema) ++end ++ ++module BaseArgExt = struct ++(* # 22 "src/base/BaseArgExt.ml" *) ++ ++ ++ open OASISUtils ++ open OASISGettext ++ ++ ++ let parse argv args = ++ (* Simulate command line for Arg *) ++ let current = ++ ref 0 ++ in ++ ++ try ++ Arg.parse_argv ++ ~current:current ++ (Array.concat [[|"none"|]; argv]) ++ (Arg.align args) ++ (failwithf (f_ "Don't know what to do with arguments: '%s'")) ++ (s_ "configure options:") ++ with ++ | Arg.Help txt -> ++ print_endline txt; ++ exit 0 ++ | Arg.Bad txt -> ++ prerr_endline txt; ++ exit 1 ++end ++ ++module BaseCheck = struct ++(* # 22 "src/base/BaseCheck.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISUtils ++ open OASISGettext ++ ++ ++ let prog_best prg prg_lst = ++ var_redefine ++ prg ++ (fun () -> ++ let alternate = ++ List.fold_left ++ (fun res e -> ++ match res with ++ | Some _ -> ++ res ++ | None -> ++ try ++ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) ++ with Not_found -> ++ None) ++ None ++ prg_lst ++ in ++ match alternate with ++ | Some prg -> prg ++ | None -> raise Not_found) ++ ++ ++ let prog prg = ++ prog_best prg [prg] ++ ++ ++ let prog_opt prg = ++ prog_best prg [prg^".opt"; prg] ++ ++ ++ let ocamlfind = ++ prog "ocamlfind" ++ ++ ++ let version ++ var_prefix ++ cmp ++ fversion ++ () = ++ (* Really compare version provided *) ++ let var = ++ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) ++ in ++ var_redefine ++ ~hide:true ++ var ++ (fun () -> ++ let version_str = ++ match fversion () with ++ | "[Distributed with OCaml]" -> ++ begin ++ try ++ (var_get "ocaml_version") ++ with Not_found -> ++ warning ++ (f_ "Variable ocaml_version not defined, fallback \ ++ to default"); ++ Sys.ocaml_version ++ end ++ | res -> ++ res ++ in ++ let version = ++ OASISVersion.version_of_string version_str ++ in ++ if OASISVersion.comparator_apply version cmp then ++ version_str ++ else ++ failwithf ++ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") ++ var_prefix ++ (OASISVersion.string_of_comparator cmp) ++ version_str) ++ () ++ ++ ++ let package_version pkg = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%v"; pkg] ++ ++ ++ let package ?version_comparator pkg () = ++ let var = ++ OASISUtils.varname_concat ++ "pkg_" ++ (OASISUtils.varname_of_string pkg) ++ in ++ let findlib_dir pkg = ++ let dir = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%d"; pkg] ++ in ++ if Sys.file_exists dir && Sys.is_directory dir then ++ dir ++ else ++ failwithf ++ (f_ "When looking for findlib package %s, \ ++ directory %s return doesn't exist") ++ pkg dir ++ in ++ let vl = ++ var_redefine ++ var ++ (fun () -> findlib_dir pkg) ++ () ++ in ++ ( ++ match version_comparator with ++ | Some ver_cmp -> ++ ignore ++ (version ++ var ++ ver_cmp ++ (fun _ -> package_version pkg) ++ ()) ++ | None -> ++ () ++ ); ++ vl ++end ++ ++module BaseOCamlcConfig = struct ++(* # 22 "src/base/BaseOCamlcConfig.ml" *) ++ ++ ++ open BaseEnv ++ open OASISUtils ++ open OASISGettext ++ ++ ++ module SMap = Map.Make(String) ++ ++ ++ let ocamlc = ++ BaseCheck.prog_opt "ocamlc" ++ ++ ++ let ocamlc_config_map = ++ (* Map name to value for ocamlc -config output ++ (name ^": "^value) ++ *) ++ let rec split_field mp lst = ++ match lst with ++ | line :: tl -> ++ let mp = ++ try ++ let pos_semicolon = ++ String.index line ':' ++ in ++ if pos_semicolon > 1 then ++ ( ++ let name = ++ String.sub line 0 pos_semicolon ++ in ++ let linelen = ++ String.length line ++ in ++ let value = ++ if linelen > pos_semicolon + 2 then ++ String.sub ++ line ++ (pos_semicolon + 2) ++ (linelen - pos_semicolon - 2) ++ else ++ "" ++ in ++ SMap.add name value mp ++ ) ++ else ++ ( ++ mp ++ ) ++ with Not_found -> ++ ( ++ mp ++ ) ++ in ++ split_field mp tl ++ | [] -> ++ mp ++ in ++ ++ let cache = ++ lazy ++ (var_protect ++ (Marshal.to_string ++ (split_field ++ SMap.empty ++ (OASISExec.run_read_output ++ ~ctxt:!BaseContext.default ++ (ocamlc ()) ["-config"])) ++ [])) ++ in ++ var_redefine ++ "ocamlc_config_map" ++ ~hide:true ++ ~dump:false ++ (fun () -> ++ (* TODO: update if ocamlc change !!! *) ++ Lazy.force cache) ++ ++ ++ let var_define nm = ++ (* Extract data from ocamlc -config *) ++ let avlbl_config_get () = ++ Marshal.from_string ++ (ocamlc_config_map ()) ++ 0 ++ in ++ let chop_version_suffix s = ++ try ++ String.sub s 0 (String.index s '+') ++ with _ -> ++ s ++ in ++ ++ let nm_config, value_config = ++ match nm with ++ | "ocaml_version" -> ++ "version", chop_version_suffix ++ | _ -> nm, (fun x -> x) ++ in ++ var_redefine ++ nm ++ (fun () -> ++ try ++ let map = ++ avlbl_config_get () ++ in ++ let value = ++ SMap.find nm_config map ++ in ++ value_config value ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find field '%s' in '%s -config' output") ++ nm ++ (ocamlc ())) ++ ++end ++ ++module BaseStandardVar = struct ++(* # 22 "src/base/BaseStandardVar.ml" *) ++ ++ ++ open OASISGettext ++ open OASISTypes ++ open OASISExpr ++ open BaseCheck ++ open BaseEnv ++ ++ ++ let ocamlfind = BaseCheck.ocamlfind ++ let ocamlc = BaseOCamlcConfig.ocamlc ++ let ocamlopt = prog_opt "ocamlopt" ++ let ocamlbuild = prog "ocamlbuild" ++ ++ ++ (**/**) ++ let rpkg = ++ ref None ++ ++ ++ let pkg_get () = ++ match !rpkg with ++ | Some pkg -> pkg ++ | None -> failwith (s_ "OASIS Package is not set") ++ ++ ++ let var_cond = ref [] ++ ++ ++ let var_define_cond ~since_version f dflt = ++ let holder = ref (fun () -> dflt) in ++ let since_version = ++ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) ++ in ++ var_cond := ++ (fun ver -> ++ if OASISVersion.comparator_apply ver since_version then ++ holder := f ()) :: !var_cond; ++ fun () -> !holder () ++ ++ ++ (**/**) ++ ++ ++ let pkg_name = ++ var_define ++ ~short_desc:(fun () -> s_ "Package name") ++ "pkg_name" ++ (fun () -> (pkg_get ()).name) ++ ++ ++ let pkg_version = ++ var_define ++ ~short_desc:(fun () -> s_ "Package version") ++ "pkg_version" ++ (fun () -> ++ (OASISVersion.string_of_version (pkg_get ()).version)) ++ ++ ++ let c = BaseOCamlcConfig.var_define ++ ++ ++ let os_type = c "os_type" ++ let system = c "system" ++ let architecture = c "architecture" ++ let ccomp_type = c "ccomp_type" ++ let ocaml_version = c "ocaml_version" ++ ++ ++ (* TODO: Check standard variable presence at runtime *) ++ ++ ++ let standard_library_default = c "standard_library_default" ++ let standard_library = c "standard_library" ++ let standard_runtime = c "standard_runtime" ++ let bytecomp_c_compiler = c "bytecomp_c_compiler" ++ let native_c_compiler = c "native_c_compiler" ++ let model = c "model" ++ let ext_obj = c "ext_obj" ++ let ext_asm = c "ext_asm" ++ let ext_lib = c "ext_lib" ++ let ext_dll = c "ext_dll" ++ let default_executable_name = c "default_executable_name" ++ let systhread_supported = c "systhread_supported" ++ ++ ++ let flexlink = ++ BaseCheck.prog "flexlink" ++ ++ ++ let flexdll_version = ++ var_define ++ ~short_desc:(fun () -> "FlexDLL version (Win32)") ++ "flexdll_version" ++ (fun () -> ++ let lst = ++ OASISExec.run_read_output ~ctxt:!BaseContext.default ++ (flexlink ()) ["-help"] ++ in ++ match lst with ++ | line :: _ -> ++ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) ++ | [] -> ++ raise Not_found) ++ ++ ++ (**/**) ++ let p name hlp dflt = ++ var_define ++ ~short_desc:hlp ++ ~cli:CLIAuto ++ ~arg_help:"dir" ++ name ++ dflt ++ ++ ++ let (/) a b = ++ if os_type () = Sys.os_type then ++ Filename.concat a b ++ else if os_type () = "Unix" then ++ OASISUnixPath.concat a b ++ else ++ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") ++ (os_type ()) ++ (**/**) ++ ++ ++ let prefix = ++ p "prefix" ++ (fun () -> s_ "Install architecture-independent files dir") ++ (fun () -> ++ match os_type () with ++ | "Win32" -> ++ let program_files = ++ Sys.getenv "PROGRAMFILES" ++ in ++ program_files/(pkg_name ()) ++ | _ -> ++ "/usr/local") ++ ++ ++ let exec_prefix = ++ p "exec_prefix" ++ (fun () -> s_ "Install architecture-dependent files in dir") ++ (fun () -> "$prefix") ++ ++ ++ let bindir = ++ p "bindir" ++ (fun () -> s_ "User executables") ++ (fun () -> "$exec_prefix"/"bin") ++ ++ ++ let sbindir = ++ p "sbindir" ++ (fun () -> s_ "System admin executables") ++ (fun () -> "$exec_prefix"/"sbin") ++ ++ ++ let libexecdir = ++ p "libexecdir" ++ (fun () -> s_ "Program executables") ++ (fun () -> "$exec_prefix"/"libexec") ++ ++ ++ let sysconfdir = ++ p "sysconfdir" ++ (fun () -> s_ "Read-only single-machine data") ++ (fun () -> "$prefix"/"etc") ++ ++ ++ let sharedstatedir = ++ p "sharedstatedir" ++ (fun () -> s_ "Modifiable architecture-independent data") ++ (fun () -> "$prefix"/"com") ++ ++ ++ let localstatedir = ++ p "localstatedir" ++ (fun () -> s_ "Modifiable single-machine data") ++ (fun () -> "$prefix"/"var") ++ ++ ++ let libdir = ++ p "libdir" ++ (fun () -> s_ "Object code libraries") ++ (fun () -> "$exec_prefix"/"lib") ++ ++ ++ let datarootdir = ++ p "datarootdir" ++ (fun () -> s_ "Read-only arch-independent data root") ++ (fun () -> "$prefix"/"share") ++ ++ ++ let datadir = ++ p "datadir" ++ (fun () -> s_ "Read-only architecture-independent data") ++ (fun () -> "$datarootdir") ++ ++ ++ let infodir = ++ p "infodir" ++ (fun () -> s_ "Info documentation") ++ (fun () -> "$datarootdir"/"info") ++ ++ ++ let localedir = ++ p "localedir" ++ (fun () -> s_ "Locale-dependent data") ++ (fun () -> "$datarootdir"/"locale") ++ ++ ++ let mandir = ++ p "mandir" ++ (fun () -> s_ "Man documentation") ++ (fun () -> "$datarootdir"/"man") ++ ++ ++ let docdir = ++ p "docdir" ++ (fun () -> s_ "Documentation root") ++ (fun () -> "$datarootdir"/"doc"/"$pkg_name") ++ ++ ++ let htmldir = ++ p "htmldir" ++ (fun () -> s_ "HTML documentation") ++ (fun () -> "$docdir") ++ ++ ++ let dvidir = ++ p "dvidir" ++ (fun () -> s_ "DVI documentation") ++ (fun () -> "$docdir") ++ ++ ++ let pdfdir = ++ p "pdfdir" ++ (fun () -> s_ "PDF documentation") ++ (fun () -> "$docdir") ++ ++ ++ let psdir = ++ p "psdir" ++ (fun () -> s_ "PS documentation") ++ (fun () -> "$docdir") ++ ++ ++ let destdir = ++ p "destdir" ++ (fun () -> s_ "Prepend a path when installing package") ++ (fun () -> ++ raise ++ (PropList.Not_set ++ ("destdir", ++ Some (s_ "undefined by construct")))) ++ ++ ++ let findlib_version = ++ var_define ++ "findlib_version" ++ (fun () -> ++ BaseCheck.package_version "findlib") ++ ++ ++ let is_native = ++ var_define ++ "is_native" ++ (fun () -> ++ try ++ let _s: string = ++ ocamlopt () ++ in ++ "true" ++ with PropList.Not_set _ -> ++ let _s: string = ++ ocamlc () ++ in ++ "false") ++ ++ ++ let ext_program = ++ var_define ++ "suffix_program" ++ (fun () -> ++ match os_type () with ++ | "Win32" | "Cygwin" -> ".exe" ++ | _ -> "") ++ ++ ++ let rm = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a file.") ++ "rm" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "del" ++ | _ -> "rm -f") ++ ++ ++ let rmdir = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a directory.") ++ "rmdir" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "rd" ++ | _ -> "rm -rf") ++ ++ ++ let debug = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") ++ ~cli:CLIEnable ++ "debug" ++ (fun () -> "true") ++ ++ ++ let profile = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") ++ ~cli:CLIEnable ++ "profile" ++ (fun () -> "false") ++ ++ ++ let tests = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> ++ s_ "Compile tests executable and library and run them") ++ ~cli:CLIEnable ++ "tests" ++ (fun () -> "false")) ++ "true" ++ ++ ++ let docs = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> s_ "Create documentations") ++ ~cli:CLIEnable ++ "docs" ++ (fun () -> "true")) ++ "true" ++ ++ ++ let native_dynlink = ++ var_define ++ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") ++ ~cli:CLINone ++ "native_dynlink" ++ (fun () -> ++ let res = ++ let ocaml_lt_312 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (ocaml_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "3.12.0")) ++ in ++ let flexdll_lt_030 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (flexdll_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "0.30")) ++ in ++ let has_native_dynlink = ++ let ocamlfind = ocamlfind () in ++ try ++ let fn = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ocamlfind ++ ["query"; "-predicates"; "native"; "dynlink"; ++ "-format"; "%d/%a"] ++ in ++ Sys.file_exists fn ++ with _ -> ++ false ++ in ++ if not has_native_dynlink then ++ false ++ else if ocaml_lt_312 () then ++ false ++ else if (os_type () = "Win32" || os_type () = "Cygwin") ++ && flexdll_lt_030 () then ++ begin ++ BaseMessage.warning ++ (f_ ".cmxs generation disabled because FlexDLL needs to be \ ++ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") ++ (flexdll_version ()); ++ false ++ end ++ else ++ true ++ in ++ string_of_bool res) ++ ++ ++ let init pkg = ++ rpkg := Some pkg; ++ List.iter (fun f -> f pkg.oasis_version) !var_cond ++ ++end ++ ++module BaseFileAB = struct ++(* # 22 "src/base/BaseFileAB.ml" *) ++ ++ ++ open BaseEnv ++ open OASISGettext ++ open BaseMessage ++ ++ ++ let to_filename fn = ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ if not (Filename.check_suffix fn ".ab") then ++ warning ++ (f_ "File '%s' doesn't have '.ab' extension") ++ fn; ++ Filename.chop_extension fn ++ ++ ++ let replace fn_lst = ++ let buff = ++ Buffer.create 13 ++ in ++ List.iter ++ (fun fn -> ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ let chn_in = ++ open_in fn ++ in ++ let chn_out = ++ open_out (to_filename fn) ++ in ++ ( ++ try ++ while true do ++ Buffer.add_string buff (var_expand (input_line chn_in)); ++ Buffer.add_char buff '\n' ++ done ++ with End_of_file -> ++ () ++ ); ++ Buffer.output_buffer chn_out buff; ++ Buffer.clear buff; ++ close_in chn_in; ++ close_out chn_out) ++ fn_lst ++end ++ ++module BaseLog = struct ++(* # 22 "src/base/BaseLog.ml" *) ++ ++ ++ open OASISUtils ++ ++ ++ let default_filename = ++ Filename.concat ++ (Filename.dirname BaseEnv.default_filename) ++ "setup.log" ++ ++ ++ module SetTupleString = ++ Set.Make ++ (struct ++ type t = string * string ++ let compare (s11, s12) (s21, s22) = ++ match String.compare s11 s21 with ++ | 0 -> String.compare s12 s22 ++ | n -> n ++ end) ++ ++ ++ let load () = ++ if Sys.file_exists default_filename then ++ begin ++ let chn = ++ open_in default_filename ++ in ++ let scbuf = ++ Scanf.Scanning.from_file default_filename ++ in ++ let rec read_aux (st, lst) = ++ if not (Scanf.Scanning.end_of_input scbuf) then ++ begin ++ let acc = ++ try ++ Scanf.bscanf scbuf "%S %S\n" ++ (fun e d -> ++ let t = ++ e, d ++ in ++ if SetTupleString.mem t st then ++ st, lst ++ else ++ SetTupleString.add t st, ++ t :: lst) ++ with Scanf.Scan_failure _ -> ++ failwith ++ (Scanf.bscanf scbuf ++ "%l" ++ (fun line -> ++ Printf.sprintf ++ "Malformed log file '%s' at line %d" ++ default_filename ++ line)) ++ in ++ read_aux acc ++ end ++ else ++ begin ++ close_in chn; ++ List.rev lst ++ end ++ in ++ read_aux (SetTupleString.empty, []) ++ end ++ else ++ begin ++ [] ++ end ++ ++ ++ let register event data = ++ let chn_out = ++ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename ++ in ++ Printf.fprintf chn_out "%S %S\n" event data; ++ close_out chn_out ++ ++ ++ let unregister event data = ++ if Sys.file_exists default_filename then ++ begin ++ let lst = ++ load () ++ in ++ let chn_out = ++ open_out default_filename ++ in ++ let write_something = ++ ref false ++ in ++ List.iter ++ (fun (e, d) -> ++ if e <> event || d <> data then ++ begin ++ write_something := true; ++ Printf.fprintf chn_out "%S %S\n" e d ++ end) ++ lst; ++ close_out chn_out; ++ if not !write_something then ++ Sys.remove default_filename ++ end ++ ++ ++ let filter events = ++ let st_events = ++ List.fold_left ++ (fun st e -> ++ SetString.add e st) ++ SetString.empty ++ events ++ in ++ List.filter ++ (fun (e, _) -> SetString.mem e st_events) ++ (load ()) ++ ++ ++ let exists event data = ++ List.exists ++ (fun v -> (event, data) = v) ++ (load ()) ++end ++ ++module BaseBuilt = struct ++(* # 22 "src/base/BaseBuilt.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseStandardVar ++ open BaseMessage ++ ++ ++ type t = ++ | BExec (* Executable *) ++ | BExecLib (* Library coming with executable *) ++ | BLib (* Library *) ++ | BObj (* Library *) ++ | BDoc (* Document *) ++ ++ ++ let to_log_event_file t nm = ++ "built_"^ ++ (match t with ++ | BExec -> "exec" ++ | BExecLib -> "exec_lib" ++ | BLib -> "lib" ++ | BObj -> "obj" ++ | BDoc -> "doc")^ ++ "_"^nm ++ ++ ++ let to_log_event_done t nm = ++ "is_"^(to_log_event_file t nm) ++ ++ ++ let register t nm lst = ++ BaseLog.register ++ (to_log_event_done t nm) ++ "true"; ++ List.iter ++ (fun alt -> ++ let registered = ++ List.fold_left ++ (fun registered fn -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ BaseLog.register ++ (to_log_event_file t nm) ++ (if Filename.is_relative fn then ++ Filename.concat (Sys.getcwd ()) fn ++ else ++ fn); ++ true ++ end ++ else ++ registered) ++ false ++ alt ++ in ++ if not registered then ++ warning ++ (f_ "Cannot find an existing alternative files among: %s") ++ (String.concat (s_ ", ") alt)) ++ lst ++ ++ ++ let unregister t nm = ++ List.iter ++ (fun (e, d) -> ++ BaseLog.unregister e d) ++ (BaseLog.filter ++ [to_log_event_file t nm; ++ to_log_event_done t nm]) ++ ++ ++ let fold t nm f acc = ++ List.fold_left ++ (fun acc (_, fn) -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ f acc fn ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' has been marked as built \ ++ for %s but doesn't exist") ++ fn ++ (Printf.sprintf ++ (match t with ++ | BExec | BExecLib -> ++ (f_ "executable %s") ++ | BLib -> ++ (f_ "library %s") ++ | BObj -> ++ (f_ "object %s") ++ | BDoc -> ++ (f_ "documentation %s")) ++ nm); ++ acc ++ end) ++ acc ++ (BaseLog.filter ++ [to_log_event_file t nm]) ++ ++ ++ let is_built t nm = ++ List.fold_left ++ (fun is_built (_, d) -> ++ (try ++ bool_of_string d ++ with _ -> ++ false)) ++ false ++ (BaseLog.filter ++ [to_log_event_done t nm]) ++ ++ ++ let of_executable ffn (cs, bs, exec) = ++ let unix_exec_is, unix_dll_opt = ++ OASISExecutable.unix_exec_is ++ (cs, bs, exec) ++ (fun () -> ++ bool_of_string ++ (is_native ())) ++ ext_dll ++ ext_program ++ in ++ let evs = ++ (BExec, cs.cs_name, [[ffn unix_exec_is]]) ++ :: ++ (match unix_dll_opt with ++ | Some fn -> ++ [BExecLib, cs.cs_name, [[ffn fn]]] ++ | None -> ++ []) ++ in ++ evs, ++ unix_exec_is, ++ unix_dll_opt ++ ++ ++ let of_library ffn (cs, bs, lib) = ++ let unix_lst = ++ OASISLibrary.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ ~has_native_dynlink:(bool_of_string (native_dynlink ())) ++ ~ext_lib:(ext_lib ()) ++ ~ext_dll:(ext_dll ()) ++ (cs, bs, lib) ++ in ++ let evs = ++ [BLib, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ ++ ++ let of_object ffn (cs, bs, obj) = ++ let unix_lst = ++ OASISObject.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ (cs, bs, obj) ++ in ++ let evs = ++ [BObj, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ ++end ++ ++module BaseCustom = struct ++(* # 22 "src/base/BaseCustom.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let run cmd args extra_args = ++ OASISExec.run ~ctxt:!BaseContext.default ~quote:false ++ (var_expand cmd) ++ (List.map ++ var_expand ++ (args @ (Array.to_list extra_args))) ++ ++ ++ let hook ?(failsafe=false) cstm f e = ++ let optional_command lst = ++ let printer = ++ function ++ | Some (cmd, args) -> String.concat " " (cmd :: args) ++ | None -> s_ "No command" ++ in ++ match ++ var_choose ++ ~name:(s_ "Pre/Post Command") ++ ~printer ++ lst with ++ | Some (cmd, args) -> ++ begin ++ try ++ run cmd args [||] ++ with e when failsafe -> ++ warning ++ (f_ "Command '%s' fail with error: %s") ++ (String.concat " " (cmd :: args)) ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ end ++ | None -> ++ () ++ in ++ let res = ++ optional_command cstm.pre_command; ++ f e ++ in ++ optional_command cstm.post_command; ++ res ++end ++ ++module BaseDynVar = struct ++(* # 22 "src/base/BaseDynVar.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseEnv ++ open BaseBuilt ++ ++ ++ let init pkg = ++ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) ++ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) ++ List.iter ++ (function ++ | Executable (cs, bs, exec) -> ++ if var_choose bs.bs_build then ++ var_ignore ++ (var_redefine ++ (* We don't save this variable *) ++ ~dump:false ++ ~short_desc:(fun () -> ++ Printf.sprintf ++ (f_ "Filename of executable '%s'") ++ cs.cs_name) ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ let fn_opt = ++ fold ++ BExec cs.cs_name ++ (fun _ fn -> Some fn) ++ None ++ in ++ match fn_opt with ++ | Some fn -> fn ++ | None -> ++ raise ++ (PropList.Not_set ++ (cs.cs_name, ++ Some (Printf.sprintf ++ (f_ "Executable '%s' not yet built.") ++ cs.cs_name))))) ++ ++ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> ++ ()) ++ pkg.sections ++end ++ ++module BaseTest = struct ++(* # 22 "src/base/BaseTest.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISExpr ++ open OASISGettext ++ ++ ++ let test lst pkg extra_args = ++ ++ let one_test (failure, n) (test_plugin, cs, test) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "test %s run") ++ cs.cs_name) ++ ~printer:string_of_bool ++ test.test_run then ++ begin ++ let () = ++ info (f_ "Running test '%s'") cs.cs_name ++ in ++ let back_cwd = ++ match test.test_working_directory with ++ | Some dir -> ++ let cwd = ++ Sys.getcwd () ++ in ++ let chdir d = ++ info (f_ "Changing directory to '%s'") d; ++ Sys.chdir d ++ in ++ chdir dir; ++ fun () -> chdir cwd ++ ++ | None -> ++ fun () -> () ++ in ++ try ++ let failure_percent = ++ BaseCustom.hook ++ test.test_custom ++ (test_plugin pkg (cs, test)) ++ extra_args ++ in ++ back_cwd (); ++ (failure_percent +. failure, n + 1) ++ with e -> ++ begin ++ back_cwd (); ++ raise e ++ end ++ end ++ else ++ begin ++ info (f_ "Skipping test '%s'") cs.cs_name; ++ (failure, n) ++ end ++ in ++ let failed, n = ++ List.fold_left ++ one_test ++ (0.0, 0) ++ lst ++ in ++ let failure_percent = ++ if n = 0 then ++ 0.0 ++ else ++ failed /. (float_of_int n) ++ in ++ let msg = ++ Printf.sprintf ++ (f_ "Tests had a %.2f%% failure rate") ++ (100. *. failure_percent) ++ in ++ if failure_percent > 0.0 then ++ failwith msg ++ else ++ info "%s" msg; ++ ++ (* Possible explanation why the tests where not run. *) ++ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && ++ not (bool_of_string (BaseStandardVar.tests ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Tests are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-tests'" ++end ++ ++module BaseDoc = struct ++(* # 22 "src/base/BaseDoc.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let doc lst pkg extra_args = ++ ++ let one_doc (doc_plugin, cs, doc) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "documentation %s build") ++ cs.cs_name) ++ ~printer:string_of_bool ++ doc.doc_build then ++ begin ++ info (f_ "Building documentation '%s'") cs.cs_name; ++ BaseCustom.hook ++ doc.doc_custom ++ (doc_plugin pkg (cs, doc)) ++ extra_args ++ end ++ in ++ List.iter one_doc lst; ++ ++ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && ++ not (bool_of_string (BaseStandardVar.docs ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Docs are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-docs'" ++end ++ ++module BaseSetup = struct ++(* # 22 "src/base/BaseSetup.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISSection ++ open OASISGettext ++ open OASISUtils ++ ++ ++ type std_args_fun = ++ package -> string array -> unit ++ ++ ++ type ('a, 'b) section_args_fun = ++ name * (package -> (common_section * 'a) -> string array -> 'b) ++ ++ ++ type t = ++ { ++ configure: std_args_fun; ++ build: std_args_fun; ++ doc: ((doc, unit) section_args_fun) list; ++ test: ((test, float) section_args_fun) list; ++ install: std_args_fun; ++ uninstall: std_args_fun; ++ clean: std_args_fun list; ++ clean_doc: (doc, unit) section_args_fun list; ++ clean_test: (test, unit) section_args_fun list; ++ distclean: std_args_fun list; ++ distclean_doc: (doc, unit) section_args_fun list; ++ distclean_test: (test, unit) section_args_fun list; ++ package: package; ++ oasis_fn: string option; ++ oasis_version: string; ++ oasis_digest: Digest.t option; ++ oasis_exec: string option; ++ oasis_setup_args: string list; ++ setup_update: bool; ++ } ++ ++ ++ (* Associate a plugin function with data from package *) ++ let join_plugin_sections filter_map lst = ++ List.rev ++ (List.fold_left ++ (fun acc sct -> ++ match filter_map sct with ++ | Some e -> ++ e :: acc ++ | None -> ++ acc) ++ [] ++ lst) ++ ++ ++ (* Search for plugin data associated with a section name *) ++ let lookup_plugin_section plugin action nm lst = ++ try ++ List.assoc nm lst ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find plugin %s matching section %s for %s action") ++ plugin ++ nm ++ action ++ ++ ++ let configure t args = ++ (* Run configure *) ++ BaseCustom.hook ++ t.package.conf_custom ++ (fun () -> ++ (* Reload if preconf has changed it *) ++ begin ++ try ++ unload (); ++ load (); ++ with _ -> ++ () ++ end; ++ ++ (* Run plugin's configure *) ++ t.configure t.package args; ++ ++ (* Dump to allow postconf to change it *) ++ dump ()) ++ (); ++ ++ (* Reload environment *) ++ unload (); ++ load (); ++ ++ (* Save environment *) ++ print (); ++ ++ (* Replace data in file *) ++ BaseFileAB.replace t.package.files_ab ++ ++ ++ let build t args = ++ BaseCustom.hook ++ t.package.build_custom ++ (t.build t.package) ++ args ++ ++ ++ let doc t args = ++ BaseDoc.doc ++ (join_plugin_sections ++ (function ++ | Doc (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "documentation" ++ (s_ "build") ++ cs.cs_name ++ t.doc, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ ++ let test t args = ++ BaseTest.test ++ (join_plugin_sections ++ (function ++ | Test (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "test" ++ (s_ "run") ++ cs.cs_name ++ t.test, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ ++ let all t args = ++ let rno_doc = ++ ref false ++ in ++ let rno_test = ++ ref false ++ in ++ let arg_rest = ++ ref [] ++ in ++ Arg.parse_argv ++ ~current:(ref 0) ++ (Array.of_list ++ ((Sys.executable_name^" all") :: ++ (Array.to_list args))) ++ [ ++ "-no-doc", ++ Arg.Set rno_doc, ++ s_ "Don't run doc target"; ++ ++ "-no-test", ++ Arg.Set rno_test, ++ s_ "Don't run test target"; ++ ++ "--", ++ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), ++ s_ "All arguments for configure."; ++ ] ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ ""; ++ ++ info "Running configure step"; ++ configure t (Array.of_list (List.rev !arg_rest)); ++ ++ info "Running build step"; ++ build t [||]; ++ ++ (* Load setup.log dynamic variables *) ++ BaseDynVar.init t.package; ++ ++ if not !rno_doc then ++ begin ++ info "Running doc step"; ++ doc t [||]; ++ end ++ else ++ begin ++ info "Skipping doc step" ++ end; ++ ++ if not !rno_test then ++ begin ++ info "Running test step"; ++ test t [||] ++ end ++ else ++ begin ++ info "Skipping test step" ++ end ++ ++ ++ let install t args = ++ BaseCustom.hook ++ t.package.install_custom ++ (t.install t.package) ++ args ++ ++ ++ let uninstall t args = ++ BaseCustom.hook ++ t.package.uninstall_custom ++ (t.uninstall t.package) ++ args ++ ++ ++ let reinstall t args = ++ uninstall t args; ++ install t args ++ ++ ++ let clean, distclean = ++ let failsafe f a = ++ try ++ f a ++ with e -> ++ warning ++ (f_ "Action fail with error: %s") ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ in ++ ++ let generic_clean t cstm mains docs tests args = ++ BaseCustom.hook ++ ~failsafe:true ++ cstm ++ (fun () -> ++ (* Clean section *) ++ List.iter ++ (function ++ | Test (cs, test) -> ++ let f = ++ try ++ List.assoc cs.cs_name tests ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, test)) ++ args ++ | Doc (cs, doc) -> ++ let f = ++ try ++ List.assoc cs.cs_name docs ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, doc)) ++ args ++ | Library _ ++ | Object _ ++ | Executable _ ++ | Flag _ ++ | SrcRepo _ -> ++ ()) ++ t.package.sections; ++ (* Clean whole package *) ++ List.iter ++ (fun f -> ++ failsafe ++ (f t.package) ++ args) ++ mains) ++ () ++ in ++ ++ let clean t args = ++ generic_clean ++ t ++ t.package.clean_custom ++ t.clean ++ t.clean_doc ++ t.clean_test ++ args ++ in ++ ++ let distclean t args = ++ (* Call clean *) ++ clean t args; ++ ++ (* Call distclean code *) ++ generic_clean ++ t ++ t.package.distclean_custom ++ t.distclean ++ t.distclean_doc ++ t.distclean_test ++ args; ++ ++ (* Remove generated file *) ++ List.iter ++ (fun fn -> ++ if Sys.file_exists fn then ++ begin ++ info (f_ "Remove '%s'") fn; ++ Sys.remove fn ++ end) ++ (BaseEnv.default_filename ++ :: ++ BaseLog.default_filename ++ :: ++ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) ++ in ++ ++ clean, distclean ++ ++ ++ let version t _ = ++ print_endline t.oasis_version ++ ++ ++ let update_setup_ml, no_update_setup_ml_cli = ++ let b = ref true in ++ b, ++ ("-no-update-setup-ml", ++ Arg.Clear b, ++ s_ " Don't try to update setup.ml, even if _oasis has changed.") ++ ++ ++ let default_oasis_fn = "_oasis" ++ ++ ++ let update_setup_ml t = ++ let oasis_fn = ++ match t.oasis_fn with ++ | Some fn -> fn ++ | None -> default_oasis_fn ++ in ++ let oasis_exec = ++ match t.oasis_exec with ++ | Some fn -> fn ++ | None -> "oasis" ++ in ++ let ocaml = ++ Sys.executable_name ++ in ++ let setup_ml, args = ++ match Array.to_list Sys.argv with ++ | setup_ml :: args -> ++ setup_ml, args ++ | [] -> ++ failwith ++ (s_ "Expecting non-empty command line arguments.") ++ in ++ let ocaml, setup_ml = ++ if Sys.executable_name = Sys.argv.(0) then ++ (* We are not running in standard mode, probably the script ++ * is precompiled. ++ *) ++ "ocaml", "setup.ml" ++ else ++ ocaml, setup_ml ++ in ++ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in ++ let do_update () = ++ let oasis_exec_version = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | 1 -> ++ failwithf ++ (f_ "Executable '%s' is probably an old version \ ++ of oasis (< 0.3.0), please update to version \ ++ v%s.") ++ oasis_exec t.oasis_version ++ | 127 -> ++ failwithf ++ (f_ "Cannot find executable '%s', please install \ ++ oasis v%s.") ++ oasis_exec t.oasis_version ++ | n -> ++ failwithf ++ (f_ "Command '%s version' exited with code %d.") ++ oasis_exec n) ++ oasis_exec ["version"] ++ in ++ if OASISVersion.comparator_apply ++ (OASISVersion.version_of_string oasis_exec_version) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string t.oasis_version)) then ++ begin ++ (* We have a version >= for the executable oasis, proceed with ++ * update. ++ *) ++ (* TODO: delegate this check to 'oasis setup'. *) ++ if Sys.os_type = "Win32" then ++ failwithf ++ (f_ "It is not possible to update the running script \ ++ setup.ml on Windows. Please update setup.ml by \ ++ running '%s'.") ++ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) ++ else ++ begin ++ OASISExec.run ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | n -> ++ failwithf ++ (f_ "Unable to update setup.ml using '%s', \ ++ please fix the problem and retry.") ++ oasis_exec) ++ oasis_exec ("setup" :: t.oasis_setup_args); ++ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) ++ end ++ end ++ else ++ failwithf ++ (f_ "The version of '%s' (v%s) doesn't match the version of \ ++ oasis used to generate the %s file. Please install at \ ++ least oasis v%s.") ++ oasis_exec oasis_exec_version setup_ml t.oasis_version ++ in ++ ++ if !update_setup_ml then ++ begin ++ try ++ match t.oasis_digest with ++ | Some dgst -> ++ if Sys.file_exists oasis_fn && ++ dgst <> Digest.file default_oasis_fn then ++ begin ++ do_update (); ++ true ++ end ++ else ++ false ++ | None -> ++ false ++ with e -> ++ error ++ (f_ "Error when updating setup.ml. If you want to avoid this error, \ ++ you can bypass the update of %s by running '%s %s %s %s'") ++ setup_ml ocaml setup_ml no_update_setup_ml_cli ++ (String.concat " " args); ++ raise e ++ end ++ else ++ false ++ ++ ++ let setup t = ++ let catch_exn = ++ ref true ++ in ++ try ++ let act_ref = ++ ref (fun _ -> ++ failwithf ++ (f_ "No action defined, run '%s %s -help'") ++ Sys.executable_name ++ Sys.argv.(0)) ++ ++ in ++ let extra_args_ref = ++ ref [] ++ in ++ let allow_empty_env_ref = ++ ref false ++ in ++ let arg_handle ?(allow_empty_env=false) act = ++ Arg.Tuple ++ [ ++ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); ++ ++ Arg.Unit ++ (fun () -> ++ allow_empty_env_ref := allow_empty_env; ++ act_ref := act); ++ ] ++ in ++ ++ Arg.parse ++ (Arg.align ++ ([ ++ "-configure", ++ arg_handle ~allow_empty_env:true configure, ++ s_ "[options*] Configure the whole build process."; ++ ++ "-build", ++ arg_handle build, ++ s_ "[options*] Build executables and libraries."; ++ ++ "-doc", ++ arg_handle doc, ++ s_ "[options*] Build documents."; ++ ++ "-test", ++ arg_handle test, ++ s_ "[options*] Run tests."; ++ ++ "-all", ++ arg_handle ~allow_empty_env:true all, ++ s_ "[options*] Run configure, build, doc and test targets."; ++ ++ "-install", ++ arg_handle install, ++ s_ "[options*] Install libraries, data, executables \ ++ and documents."; ++ ++ "-uninstall", ++ arg_handle uninstall, ++ s_ "[options*] Uninstall libraries, data, executables \ ++ and documents."; ++ ++ "-reinstall", ++ arg_handle reinstall, ++ s_ "[options*] Uninstall and install libraries, data, \ ++ executables and documents."; ++ ++ "-clean", ++ arg_handle ~allow_empty_env:true clean, ++ s_ "[options*] Clean files generated by a build."; ++ ++ "-distclean", ++ arg_handle ~allow_empty_env:true distclean, ++ s_ "[options*] Clean files generated by a build and configure."; ++ ++ "-version", ++ arg_handle ~allow_empty_env:true version, ++ s_ " Display version of OASIS used to generate this setup.ml."; ++ ++ "-no-catch-exn", ++ Arg.Clear catch_exn, ++ s_ " Don't catch exception, useful for debugging."; ++ ] ++ @ ++ (if t.setup_update then ++ [no_update_setup_ml_cli] ++ else ++ []) ++ @ (BaseContext.args ()))) ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ (s_ "Setup and run build process current package\n"); ++ ++ (* Build initial environment *) ++ load ~allow_empty:!allow_empty_env_ref (); ++ ++ (** Initialize flags *) ++ List.iter ++ (function ++ | Flag (cs, {flag_description = hlp; ++ flag_default = choices}) -> ++ begin ++ let apply ?short_desc () = ++ var_ignore ++ (var_define ++ ~cli:CLIEnable ++ ?short_desc ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ string_of_bool ++ (var_choose ++ ~name:(Printf.sprintf ++ (f_ "default value of flag %s") ++ cs.cs_name) ++ ~printer:string_of_bool ++ choices))) ++ in ++ match hlp with ++ | Some hlp -> ++ apply ~short_desc:(fun () -> hlp) () ++ | None -> ++ apply () ++ end ++ | _ -> ++ ()) ++ t.package.sections; ++ ++ BaseStandardVar.init t.package; ++ ++ BaseDynVar.init t.package; ++ ++ if t.setup_update && update_setup_ml t then ++ () ++ else ++ !act_ref t (Array.of_list (List.rev !extra_args_ref)) ++ ++ with e when !catch_exn -> ++ error "%s" (Printexc.to_string e); ++ exit 1 ++ ++ ++end ++ ++ ++# 5394 "setup.ml" ++module InternalConfigurePlugin = struct ++(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) ++ ++ ++ (** Configure using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open BaseEnv ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open BaseMessage ++ ++ ++ (** Configure build using provided series of check to be done ++ * and then output corresponding file. ++ *) ++ let configure pkg argv = ++ let var_ignore_eval var = let _s: string = var () in () in ++ let errors = ref SetString.empty in ++ let buff = Buffer.create 13 in ++ ++ let add_errors fmt = ++ Printf.kbprintf ++ (fun b -> ++ errors := SetString.add (Buffer.contents b) !errors; ++ Buffer.clear b) ++ buff ++ fmt ++ in ++ ++ let warn_exception e = ++ warning "%s" (Printexc.to_string e) ++ in ++ ++ (* Check tools *) ++ let check_tools lst = ++ List.iter ++ (function ++ | ExternalTool tool -> ++ begin ++ try ++ var_ignore_eval (BaseCheck.prog tool) ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find external tool '%s'") tool ++ end ++ | InternalExecutable nm1 -> ++ (* Check that matching tool is built *) ++ List.iter ++ (function ++ | Executable ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal executable \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ lst ++ in ++ ++ let build_checks sct bs = ++ if var_choose bs.bs_build then ++ begin ++ if bs.bs_compiled_object = Native then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.ocamlopt ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Section %s requires native compilation") ++ (OASISSection.string_of_section sct) ++ end; ++ ++ (* Check tools *) ++ check_tools bs.bs_build_tools; ++ ++ (* Check depends *) ++ List.iter ++ (function ++ | FindlibPackage (findlib_pkg, version_comparator) -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.package ?version_comparator findlib_pkg) ++ with e -> ++ warn_exception e; ++ match version_comparator with ++ | None -> ++ add_errors ++ (f_ "Cannot find findlib package %s") ++ findlib_pkg ++ | Some ver_cmp -> ++ add_errors ++ (f_ "Cannot find findlib package %s (%s)") ++ findlib_pkg ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | InternalLibrary nm1 -> ++ (* Check that matching library is built *) ++ List.iter ++ (function ++ | Library ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal library \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ bs.bs_build_depends ++ end ++ in ++ ++ (* Parse command line *) ++ BaseArgExt.parse argv (BaseEnv.args ()); ++ ++ (* OCaml version *) ++ begin ++ match pkg.ocaml_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "ocaml" ++ ver_cmp ++ BaseStandardVar.ocaml_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "OCaml version %s doesn't match version constraint %s") ++ (BaseStandardVar.ocaml_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ ++ (* Findlib version *) ++ begin ++ match pkg.findlib_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "findlib" ++ ver_cmp ++ BaseStandardVar.findlib_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Findlib version %s doesn't match version constraint %s") ++ (BaseStandardVar.findlib_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ (* Make sure the findlib version is fine for the OCaml compiler. *) ++ begin ++ let ocaml_ge4 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) ++ (OASISVersion.version_of_string "4.0.0") >= 0 in ++ if ocaml_ge4 then ++ let findlib_lt132 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) ++ (OASISVersion.version_of_string "1.3.2") < 0 in ++ if findlib_lt132 then ++ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" ++ end; ++ ++ (* FlexDLL *) ++ if BaseStandardVar.os_type () = "Win32" || ++ BaseStandardVar.os_type () = "Cygwin" then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.flexlink ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find 'flexlink'") ++ end; ++ ++ (* Check build depends *) ++ List.iter ++ (function ++ | Executable (_, bs, _) ++ | Library (_, bs, _) as sct -> ++ build_checks sct bs ++ | Doc (_, doc) -> ++ if var_choose doc.doc_build then ++ check_tools doc.doc_build_tools ++ | Test (_, test) -> ++ if var_choose test.test_run then ++ check_tools test.test_tools ++ | _ -> ++ ()) ++ pkg.sections; ++ ++ (* Check if we need native dynlink (presence of libraries that compile to ++ * native) ++ *) ++ begin ++ let has_cmxa = ++ List.exists ++ (function ++ | Library (_, bs, _) -> ++ var_choose bs.bs_build && ++ (bs.bs_compiled_object = Native || ++ (bs.bs_compiled_object = Best && ++ bool_of_string (BaseStandardVar.is_native ()))) ++ | _ -> ++ false) ++ pkg.sections ++ in ++ if has_cmxa then ++ var_ignore_eval BaseStandardVar.native_dynlink ++ end; ++ ++ (* Check errors *) ++ if SetString.empty != !errors then ++ begin ++ List.iter ++ (fun e -> error "%s" e) ++ (SetString.elements !errors); ++ failwithf ++ (fn_ ++ "%d configuration error" ++ "%d configuration errors" ++ (SetString.cardinal !errors)) ++ (SetString.cardinal !errors) ++ end ++ ++ ++end ++ ++module InternalInstallPlugin = struct ++(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) ++ ++ ++ (** Install using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open BaseEnv ++ open BaseStandardVar ++ open BaseMessage ++ open OASISTypes ++ open OASISFindlib ++ open OASISGettext ++ open OASISUtils ++ ++ ++ let exec_hook = ++ ref (fun (cs, bs, exec) -> cs, bs, exec) ++ ++ ++ let lib_hook = ++ ref (fun (cs, bs, lib) -> cs, bs, lib, []) ++ ++ ++ let obj_hook = ++ ref (fun (cs, bs, obj) -> cs, bs, obj, []) ++ ++ ++ let doc_hook = ++ ref (fun (cs, doc) -> cs, doc) ++ ++ ++ let install_file_ev = ++ "install-file" ++ ++ ++ let install_dir_ev = ++ "install-dir" ++ ++ ++ let install_findlib_ev = ++ "install-findlib" ++ ++ ++ let win32_max_command_line_length = 8000 ++ ++ ++ let split_install_command ocamlfind findlib_name meta files = ++ if Sys.os_type = "Win32" then ++ (* Arguments for the first command: *) ++ let first_args = ["install"; findlib_name; meta] in ++ (* Arguments for remaining commands: *) ++ let other_args = ["install"; findlib_name; "-add"] in ++ (* Extract as much files as possible from [files], [len] is ++ the current command line length: *) ++ let rec get_files len acc files = ++ match files with ++ | [] -> ++ (List.rev acc, []) ++ | file :: rest -> ++ let len = len + 1 + String.length file in ++ if len > win32_max_command_line_length then ++ (List.rev acc, files) ++ else ++ get_files len (file :: acc) rest ++ in ++ (* Split the command into several commands. *) ++ let rec split args files = ++ match files with ++ | [] -> ++ [] ++ | _ -> ++ (* Length of "ocamlfind install [META|-add]" *) ++ let len = ++ List.fold_left ++ (fun len arg -> ++ len + 1 (* for the space *) + String.length arg) ++ (String.length ocamlfind) ++ args ++ in ++ match get_files len [] files with ++ | ([], _) -> ++ failwith (s_ "Command line too long.") ++ | (firsts, others) -> ++ let cmd = args @ firsts in ++ (* Use -add for remaining commands: *) ++ let () = ++ let findlib_ge_132 = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string ++ (BaseStandardVar.findlib_version ())) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string "1.3.2")) ++ in ++ if not findlib_ge_132 then ++ failwithf ++ (f_ "Installing the library %s require to use the \ ++ flag '-add' of ocamlfind because the command \ ++ line is too long. This flag is only available \ ++ for findlib 1.3.2. Please upgrade findlib from \ ++ %s to 1.3.2") ++ findlib_name (BaseStandardVar.findlib_version ()) ++ in ++ let cmds = split other_args others in ++ cmd :: cmds ++ in ++ (* The first command does not use -add: *) ++ split first_args files ++ else ++ ["install" :: findlib_name :: meta :: files] ++ ++ ++ let install pkg argv = ++ ++ let in_destdir = ++ try ++ let destdir = ++ destdir () ++ in ++ (* Practically speaking destdir is prepended ++ * at the beginning of the target filename ++ *) ++ fun fn -> destdir^fn ++ with PropList.Not_set _ -> ++ fun fn -> fn ++ in ++ ++ let install_file ?tgt_fn src_file envdir = ++ let tgt_dir = ++ in_destdir (envdir ()) ++ in ++ let tgt_file = ++ Filename.concat ++ tgt_dir ++ (match tgt_fn with ++ | Some fn -> ++ fn ++ | None -> ++ Filename.basename src_file) ++ in ++ (* Create target directory if needed *) ++ OASISFileUtil.mkdir_parent ++ ~ctxt:!BaseContext.default ++ (fun dn -> ++ info (f_ "Creating directory '%s'") dn; ++ BaseLog.register install_dir_ev dn) ++ tgt_dir; ++ ++ (* Really install files *) ++ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; ++ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; ++ BaseLog.register install_file_ev tgt_file ++ in ++ ++ (* Install data into defined directory *) ++ let install_data srcdir lst tgtdir = ++ let tgtdir = ++ OASISHostPath.of_unix (var_expand tgtdir) ++ in ++ List.iter ++ (fun (src, tgt_opt) -> ++ let real_srcs = ++ OASISFileUtil.glob ++ ~ctxt:!BaseContext.default ++ (Filename.concat srcdir src) ++ in ++ if real_srcs = [] then ++ failwithf ++ (f_ "Wildcard '%s' doesn't match any files") ++ src; ++ List.iter ++ (fun fn -> ++ install_file ++ fn ++ (fun () -> ++ match tgt_opt with ++ | Some s -> ++ OASISHostPath.of_unix (var_expand s) ++ | None -> ++ tgtdir)) ++ real_srcs) ++ lst ++ in ++ ++ (** Install all libraries *) ++ let install_libs pkg = ++ ++ let files_of_library (f_data, acc) data_lib = ++ let cs, bs, lib, lib_extra = ++ !lib_hook data_lib ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + lib_extra *) ++ List.rev_append lib_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in library %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ lib.lib_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BLib ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the library *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ and files_of_object (f_data, acc) data_obj = ++ let cs, bs, obj, obj_extra = ++ !obj_hook data_obj ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + obj_extra *) ++ List.rev_append obj_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in object %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ obj.obj_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BObj ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the object *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ ++ in ++ ++ (* Install one group of library *) ++ let install_group_lib grp = ++ (* Iterate through all group nodes *) ++ let rec install_group_lib_aux data_and_files grp = ++ let data_and_files, children = ++ match grp with ++ | Container (_, children) -> ++ data_and_files, children ++ | Package (_, cs, bs, `Library lib, children) -> ++ files_of_library data_and_files (cs, bs, lib), children ++ | Package (_, cs, bs, `Object obj, children) -> ++ files_of_object data_and_files (cs, bs, obj), children ++ in ++ List.fold_left ++ install_group_lib_aux ++ data_and_files ++ children ++ in ++ ++ (* Findlib name of the root library *) ++ let findlib_name = ++ findlib_of_group grp ++ in ++ ++ (* Determine root library *) ++ let root_lib = ++ root_of_group grp ++ in ++ ++ (* All files to install for this library *) ++ let f_data, files = ++ install_group_lib_aux (ignore, []) grp ++ in ++ ++ (* Really install, if there is something to install *) ++ if files = [] then ++ begin ++ warning ++ (f_ "Nothing to install for findlib library '%s'") ++ findlib_name ++ end ++ else ++ begin ++ let meta = ++ (* Search META file *) ++ let _, bs, _ = ++ root_lib ++ in ++ let res = ++ Filename.concat bs.bs_path "META" ++ in ++ if not (OASISFileUtil.file_exists_case res) then ++ failwithf ++ (f_ "Cannot find file '%s' for findlib library %s") ++ res ++ findlib_name; ++ res ++ in ++ let files = ++ (* Make filename shorter to avoid hitting command max line length ++ * too early, esp. on Windows. ++ *) ++ let remove_prefix p n = ++ let plen = String.length p in ++ let nlen = String.length n in ++ if plen <= nlen && String.sub n 0 plen = p then ++ begin ++ let fn_sep = ++ if Sys.os_type = "Win32" then ++ '\\' ++ else ++ '/' ++ in ++ let cutpoint = plen + ++ (if plen < nlen && n.[plen] = fn_sep then ++ 1 ++ else ++ 0) ++ in ++ String.sub n cutpoint (nlen - cutpoint) ++ end ++ else ++ n ++ in ++ List.map (remove_prefix (Sys.getcwd ())) files ++ in ++ info ++ (f_ "Installing findlib library '%s'") ++ findlib_name; ++ let ocamlfind = ocamlfind () in ++ let commands = ++ split_install_command ++ ocamlfind ++ findlib_name ++ meta ++ files ++ in ++ List.iter ++ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) ++ commands; ++ BaseLog.register install_findlib_ev findlib_name ++ end; ++ ++ (* Install data files *) ++ f_data (); ++ ++ in ++ ++ let group_libs, _, _ = ++ findlib_mapping pkg ++ in ++ ++ (* We install libraries in groups *) ++ List.iter install_group_lib group_libs ++ in ++ ++ let install_execs pkg = ++ let install_exec data_exec = ++ let cs, bs, exec = ++ !exec_hook data_exec ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then ++ begin ++ let exec_libdir () = ++ Filename.concat ++ (libdir ()) ++ pkg.name ++ in ++ BaseBuilt.fold ++ BaseBuilt.BExec ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ ~tgt_fn:(cs.cs_name ^ ext_program ()) ++ fn ++ bindir) ++ (); ++ BaseBuilt.fold ++ BaseBuilt.BExecLib ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ exec_libdir) ++ (); ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name) ++ end ++ in ++ List.iter ++ (function ++ | Executable (cs, bs, exec)-> ++ install_exec (cs, bs, exec) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ let install_docs pkg = ++ let install_doc data = ++ let cs, doc = ++ !doc_hook data ++ in ++ if var_choose doc.doc_install && ++ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then ++ begin ++ let tgt_dir = ++ OASISHostPath.of_unix (var_expand doc.doc_install_dir) ++ in ++ BaseBuilt.fold ++ BaseBuilt.BDoc ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ (fun () -> tgt_dir)) ++ (); ++ install_data ++ Filename.current_dir_name ++ doc.doc_data_files ++ doc.doc_install_dir ++ end ++ in ++ List.iter ++ (function ++ | Doc (cs, doc) -> ++ install_doc (cs, doc) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ install_libs pkg; ++ install_execs pkg; ++ install_docs pkg ++ ++ ++ (* Uninstall already installed data *) ++ let uninstall _ argv = ++ List.iter ++ (fun (ev, data) -> ++ if ev = install_file_ev then ++ begin ++ if OASISFileUtil.file_exists_case data then ++ begin ++ info ++ (f_ "Removing file '%s'") ++ data; ++ Sys.remove data ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_dir_ev then ++ begin ++ if Sys.file_exists data && Sys.is_directory data then ++ begin ++ if Sys.readdir data = [||] then ++ begin ++ info ++ (f_ "Removing directory '%s'") ++ data; ++ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' is not empty (%s)") ++ data ++ (String.concat ++ ", " ++ (Array.to_list ++ (Sys.readdir data))) ++ end ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_findlib_ev then ++ begin ++ info (f_ "Removing findlib library '%s'") data; ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlfind ()) ["remove"; data] ++ end ++ else ++ failwithf (f_ "Unknown log event '%s'") ev; ++ BaseLog.unregister ev data) ++ (* We process event in reverse order *) ++ (List.rev ++ (BaseLog.filter ++ [install_file_ev; ++ install_dir_ev; ++ install_findlib_ev])) ++ ++ ++end ++ ++ ++# 6243 "setup.ml" ++module OCamlbuildCommon = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) ++ ++ ++ (** Functions common to OCamlbuild build and doc plugin ++ *) ++ ++ ++ open OASISGettext ++ open BaseEnv ++ open BaseStandardVar ++ open OASISTypes ++ ++ ++ ++ ++ type extra_args = string list ++ ++ ++ let ocamlbuild_clean_ev = "ocamlbuild-clean" ++ ++ ++ let ocamlbuildflags = ++ var_define ++ ~short_desc:(fun () -> "OCamlbuild additional flags") ++ "ocamlbuildflags" ++ (fun () -> "") ++ ++ ++ (** Fix special arguments depending on environment *) ++ let fix_args args extra_argv = ++ List.flatten ++ [ ++ if (os_type ()) = "Win32" then ++ [ ++ "-classic-display"; ++ "-no-log"; ++ "-no-links"; ++ "-install-lib-dir"; ++ (Filename.concat (standard_library ()) "ocamlbuild") ++ ] ++ else ++ []; ++ ++ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then ++ [ ++ "-byte-plugin" ++ ] ++ else ++ []; ++ args; ++ ++ if bool_of_string (debug ()) then ++ ["-tag"; "debug"] ++ else ++ []; ++ ++ if bool_of_string (profile ()) then ++ ["-tag"; "profile"] ++ else ++ []; ++ ++ OASISString.nsplit (ocamlbuildflags ()) ' '; ++ ++ Array.to_list extra_argv; ++ ] ++ ++ ++ (** Run 'ocamlbuild -clean' if not already done *) ++ let run_clean extra_argv = ++ let extra_cli = ++ String.concat " " (Array.to_list extra_argv) ++ in ++ (* Run if never called with these args *) ++ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then ++ begin ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); ++ BaseLog.register ocamlbuild_clean_ev extra_cli; ++ at_exit ++ (fun () -> ++ try ++ BaseLog.unregister ocamlbuild_clean_ev extra_cli ++ with _ -> ++ ()) ++ end ++ ++ ++ (** Run ocamlbuild, unregister all clean events *) ++ let run_ocamlbuild args extra_argv = ++ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html ++ *) ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args args extra_argv); ++ (* Remove any clean event, we must run it again *) ++ List.iter ++ (fun (e, d) -> BaseLog.unregister e d) ++ (BaseLog.filter [ocamlbuild_clean_ev]) ++ ++ ++ (** Determine real build directory *) ++ let build_dir extra_argv = ++ let rec search_args dir = ++ function ++ | "-build-dir" :: dir :: tl -> ++ search_args dir tl ++ | _ :: tl -> ++ search_args dir tl ++ | [] -> ++ dir ++ in ++ search_args "_build" (fix_args [] extra_argv) ++ ++ ++end ++ ++module OCamlbuildPlugin = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) ++ ++ ++ (** Build using ocamlbuild ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISUtils ++ open OASISString ++ open BaseEnv ++ open OCamlbuildCommon ++ open BaseStandardVar ++ open BaseMessage ++ ++ ++ ++ ++ ++ let cond_targets_hook = ++ ref (fun lst -> lst) ++ ++ ++ let build extra_args pkg argv = ++ (* Return the filename in build directory *) ++ let in_build_dir fn = ++ Filename.concat ++ (build_dir argv) ++ fn ++ in ++ ++ (* Return the unix filename in host build directory *) ++ let in_build_dir_of_unix fn = ++ in_build_dir (OASISHostPath.of_unix fn) ++ in ++ ++ let cond_targets = ++ List.fold_left ++ (fun acc -> ++ function ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_library ++ in_build_dir_of_unix ++ (cs, bs, lib) ++ in ++ ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ~what:".cma" fn ++ || ends_with ~what:".cmxs" fn ++ || ends_with ~what:".cmxa" fn ++ || ends_with ~what:(ext_lib ()) fn ++ || ends_with ~what:(ext_dll ()) fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for library %s") ++ cs.cs_name ++ end ++ ++ | Object (cs, bs, obj) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_object ++ in_build_dir_of_unix ++ (cs, bs, obj) ++ in ++ ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ".cmo" fn ++ || ends_with ".cmx" fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for object %s") ++ cs.cs_name ++ end ++ ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_exec_is, unix_dll_opt = ++ BaseBuilt.of_executable ++ in_build_dir_of_unix ++ (cs, bs, exec) ++ in ++ ++ let target ext = ++ let unix_tgt = ++ (OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.chop_extension ++ exec.exec_main_is))^ext ++ in ++ let evs = ++ (* Fix evs, we want to use the unix_tgt, without copying *) ++ List.map ++ (function ++ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> ++ BaseBuilt.BExec, nm, ++ [[in_build_dir_of_unix unix_tgt]] ++ | ev -> ++ ev) ++ evs ++ in ++ evs, [unix_tgt] ++ in ++ ++ (* Add executable *) ++ let acc = ++ match bs.bs_compiled_object with ++ | Native -> ++ (target ".native") :: acc ++ | Best when bool_of_string (is_native ()) -> ++ (target ".native") :: acc ++ | Byte ++ | Best -> ++ (target ".byte") :: acc ++ in ++ acc ++ end ++ ++ | Library _ | Object _ | Executable _ | Test _ ++ | SrcRepo _ | Flag _ | Doc _ -> ++ acc) ++ [] ++ (* Keep the pkg.sections ordered *) ++ (List.rev pkg.sections); ++ in ++ ++ (* Check and register built files *) ++ let check_and_register (bt, bnm, lst) = ++ List.iter ++ (fun fns -> ++ if not (List.exists OASISFileUtil.file_exists_case fns) then ++ failwithf ++ (fn_ ++ "Expected built file %s doesn't exist." ++ "None of expected built files %s exists." ++ (List.length fns)) ++ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) ++ lst; ++ (BaseBuilt.register bt bnm lst) ++ in ++ ++ (* Run the hook *) ++ let cond_targets = !cond_targets_hook cond_targets in ++ ++ (* Run a list of target... *) ++ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; ++ (* ... and register events *) ++ List.iter check_and_register (List.flatten (List.map fst cond_targets)) ++ ++ ++ let clean pkg extra_args = ++ run_clean extra_args; ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++ ++end ++ ++module OCamlbuildDocPlugin = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) ++ ++ ++ (* Create documentation using ocamlbuild .odocl files ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISMessage ++ open OCamlbuildCommon ++ open BaseStandardVar ++ ++ ++ ++ ++ type run_t = ++ { ++ extra_args: string list; ++ run_path: unix_filename; ++ } ++ ++ ++ let doc_build run pkg (cs, doc) argv = ++ let index_html = ++ OASISUnixPath.make ++ [ ++ run.run_path; ++ cs.cs_name^".docdir"; ++ "index.html"; ++ ] ++ in ++ let tgt_dir = ++ OASISHostPath.make ++ [ ++ build_dir argv; ++ OASISHostPath.of_unix run.run_path; ++ cs.cs_name^".docdir"; ++ ] ++ in ++ run_ocamlbuild (index_html :: run.extra_args) argv; ++ List.iter ++ (fun glb -> ++ BaseBuilt.register ++ BaseBuilt.BDoc ++ cs.cs_name ++ [OASISFileUtil.glob ~ctxt:!BaseContext.default ++ (Filename.concat tgt_dir glb)]) ++ ["*.html"; "*.css"] ++ ++ ++ let doc_clean run pkg (cs, doc) argv = ++ run_clean argv; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++ ++end ++ ++ ++# 6616 "setup.ml" ++module NonePlugin = struct ++(* # 22 "src/plugins/none/NonePlugin.ml" *) ++ ++ ++ (** Plugin to handle "none" generation ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open OASISGettext ++ open OASISUtils ++ ++ ++ let not_implemented str _ _ = ++ failwithf (f_ "No implementation for %s") str ++ ++ ++ let section_not_implemented str pkg _ _ extra_args = ++ not_implemented str pkg extra_args ++ ++ ++end ++ ++ ++# 6641 "setup.ml" ++module CustomPlugin = struct ++(* # 22 "src/plugins/custom/CustomPlugin.ml" *) ++ ++ ++ (** Generate custom configure/build/doc/test/install system ++ @author ++ *) ++ ++ ++ open BaseEnv ++ open OASISGettext ++ open OASISTypes ++ ++ ++ ++ ++ ++ type t = ++ { ++ cmd_main: command_line conditional; ++ cmd_clean: (command_line option) conditional; ++ cmd_distclean: (command_line option) conditional; ++ } ++ ++ ++ let run = BaseCustom.run ++ ++ ++ let main t _ extra_args = ++ let cmd, args = ++ var_choose ++ ~name:(s_ "main command") ++ t.cmd_main ++ in ++ run cmd args extra_args ++ ++ ++ let clean t pkg extra_args = ++ match var_choose t.cmd_clean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ ++ let distclean t pkg extra_args = ++ match var_choose t.cmd_distclean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ ++ module Build = ++ struct ++ let main t pkg extra_args = ++ main t pkg extra_args; ++ List.iter ++ (fun sct -> ++ let evs = ++ match sct with ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, _ = ++ BaseBuilt.of_library ++ OASISHostPath.of_unix ++ (cs, bs, lib) ++ in ++ evs ++ end ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, _, _ = ++ BaseBuilt.of_executable ++ OASISHostPath.of_unix ++ (cs, bs, exec) ++ in ++ evs ++ end ++ | _ -> ++ [] ++ in ++ List.iter ++ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) ++ evs) ++ pkg.sections ++ ++ let clean t pkg extra_args = ++ clean t pkg extra_args; ++ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild ++ * considering moving this to BaseSetup? ++ *) ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++ let distclean t pkg extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++ module Test = ++ struct ++ let main t pkg (cs, test) extra_args = ++ try ++ main t pkg extra_args; ++ 0.0 ++ with Failure s -> ++ BaseMessage.warning ++ (f_ "Test '%s' fails: %s") ++ cs.cs_name ++ s; ++ 1.0 ++ ++ let clean t pkg (cs, test) extra_args = ++ clean t pkg extra_args ++ ++ let distclean t pkg (cs, test) extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++ module Doc = ++ struct ++ let main t pkg (cs, _) extra_args = ++ main t pkg extra_args; ++ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] ++ ++ let clean t pkg (cs, _) extra_args = ++ clean t pkg extra_args; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++ let distclean t pkg (cs, _) extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++end ++ ++ ++# 6789 "setup.ml" ++open OASISTypes;; ++ ++let setup_t = ++ { ++ BaseSetup.configure = InternalConfigurePlugin.configure; ++ build = OCamlbuildPlugin.build []; ++ test = ++ [ ++ ("test", ++ CustomPlugin.Test.main ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ doc = ++ [ ++ ("api", ++ OCamlbuildDocPlugin.doc_build ++ {OCamlbuildDocPlugin.extra_args = []; run_path = "doc"}); ++ ("distribution", ++ NonePlugin.not_implemented "doc of section distribution"); ++ ("samples", NonePlugin.not_implemented "doc of section samples") ++ ]; ++ install = InternalInstallPlugin.install; ++ uninstall = InternalInstallPlugin.uninstall; ++ clean = [OCamlbuildPlugin.clean]; ++ clean_test = ++ [ ++ ("test", ++ CustomPlugin.Test.clean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ clean_doc = ++ [ ++ ("api", ++ OCamlbuildDocPlugin.doc_clean ++ {OCamlbuildDocPlugin.extra_args = []; run_path = "doc"}) ++ ]; ++ distclean = []; ++ distclean_test = ++ [ ++ ("test", ++ CustomPlugin.Test.distclean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ distclean_doc = []; ++ package = ++ { ++ oasis_version = "0.3"; ++ ocaml_version = Some (OASISVersion.VGreaterEqual "3.12.0"); ++ findlib_version = None; ++ alpha_features = []; ++ beta_features = []; ++ name = "jsonm"; ++ version = "0.9.1"; ++ license = ++ OASISLicense.DEP5License ++ (OASISLicense.DEP5Unit ++ { ++ OASISLicense.license = "BSD-3-clause"; ++ excption = None; ++ version = OASISLicense.NoVersion ++ }); ++ license_file = None; ++ copyrights = ["(c) 2012 Daniel C. B\195\188nzli"]; ++ maintainers = []; ++ authors = ["Daniel B\195\188nzli "]; ++ homepage = Some "http://erratique.ch/software/jsonm"; ++ synopsis = "Non-blocking streaming JSON codec for OCaml"; ++ description = ++ Some ++ [ ++ OASISText.Para ++ "Jsonm is a non-blocking streaming codec to decode and encode the JSON data format. It can process JSON text without blocking on IO and without a complete in-memory representation of the data."; ++ OASISText.Para ++ "The alternative \"uncut\" codec also processes whitespace and (non-standard) JSON with JavaScript comments."; ++ OASISText.Para ++ "Jsonm is made of a single module and depends on [Uutf][1]. It is distributed under the BSD3 license."; ++ OASISText.Para "[1]: http://erratique.ch/software/uutf" ++ ]; ++ categories = []; ++ conf_type = (`Configure, "internal", Some "0.4"); ++ conf_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ build_type = (`Build, "ocamlbuild", Some "0.4"); ++ build_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ install_type = (`Install, "internal", Some "0.4"); ++ install_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ uninstall_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ clean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ distclean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ files_ab = []; ++ sections = ++ [ ++ Library ++ ({ ++ cs_name = "jsonm"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "src"; ++ bs_compiled_object = Best; ++ bs_build_depends = [FindlibPackage ("uutf", None)]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ { ++ lib_modules = ["Jsonm"]; ++ lib_pack = false; ++ lib_internal_modules = []; ++ lib_findlib_parent = None; ++ lib_findlib_name = None; ++ lib_findlib_containers = [] ++ }); ++ Executable ++ ({ ++ cs_name = "jsontrip"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = ++ [ ++ InternalLibrary "jsonm"; ++ FindlibPackage ("unix", None) ++ ]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "jsontrip.ml"}); ++ Executable ++ ({ ++ cs_name = "ocamltweets"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = ++ [ ++ InternalLibrary "jsonm"; ++ FindlibPackage ("unix", None) ++ ]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "ocamltweets.ml"}); ++ Executable ++ ({ ++ cs_name = "test"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, false)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "jsonm"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "test.ml"}); ++ Executable ++ ({ ++ cs_name = "jtree"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, false)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "jsonm"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "jtree.ml"}); ++ Executable ++ ({ ++ cs_name = "examples"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, false)]; ++ bs_path = "test"; ++ bs_compiled_object = Best; ++ bs_build_depends = ++ [ ++ FindlibPackage ("unix", None); ++ InternalLibrary "jsonm" ++ ]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "examples.ml"}); ++ Test ++ ({ ++ cs_name = "test"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ test_type = (`Test, "custom", Some "0.4"); ++ test_command = [(OASISExpr.EBool true, ("$test", []))]; ++ test_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ test_working_directory = None; ++ test_run = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); ++ (OASISExpr.EFlag "tests", true) ++ ]; ++ test_tools = [ExternalTool "ocamlbuild"] ++ }); ++ Doc ++ ({ ++ cs_name = "api"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "ocamlbuild", Some "0.3"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "Jsonm's documentation and API reference"; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = []; ++ doc_build_tools = ++ [ExternalTool "ocamlbuild"; ExternalTool "ocamldoc"] ++ }); ++ Doc ++ ({ ++ cs_name = "distribution"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "none", Some "0.4"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "\"Jsonm's README and CHANGES files\""; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = [("README CHANGES", None)]; ++ doc_build_tools = [ExternalTool "ocamlbuild"] ++ }); ++ Doc ++ ({ ++ cs_name = "samples"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ doc_type = (`Doc, "none", Some "0.4"); ++ doc_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ doc_build = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); ++ (OASISExpr.EFlag "docs", true) ++ ]; ++ doc_install = [(OASISExpr.EBool true, true)]; ++ doc_install_dir = "$docdir"; ++ doc_title = "\"Jsonm's sample code\""; ++ doc_authors = []; ++ doc_abstract = None; ++ doc_format = OtherDoc; ++ doc_data_files = [("test/*.ml", None)]; ++ doc_build_tools = [ExternalTool "ocamlbuild"] ++ }); ++ SrcRepo ++ ({ ++ cs_name = "head"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ src_repo_type = Git; ++ src_repo_location = ++ "git://erratique.ch/repos/jsonm.git"; ++ src_repo_browser = ++ Some "http://erratique.ch/repos/jsonm"; ++ src_repo_module = None; ++ src_repo_branch = None; ++ src_repo_tag = None; ++ src_repo_subdir = None ++ }) ++ ]; ++ plugins = [(`Extra, "META", Some "0.3")]; ++ disable_oasis_section = []; ++ schema_data = PropList.Data.create (); ++ plugin_data = [] ++ }; ++ oasis_fn = Some "_oasis"; ++ oasis_version = "0.4.4"; ++ oasis_digest = Some "}V\026>\185\210EZaU\170%.\174bk"; ++ oasis_exec = None; ++ oasis_setup_args = []; ++ setup_update = false ++ };; ++ ++let setup () = BaseSetup.setup setup_t;; ++ ++# 7215 "setup.ml" ++(* OASIS_STOP *) ++let () = setup ();; +diff -urN jsonm-0.9.1.orig/src/jsonm.mldylib jsonm-0.9.1/src/jsonm.mldylib +--- jsonm-0.9.1.orig/src/jsonm.mldylib 1970-01-01 00:00:00.000000000 +0000 ++++ jsonm-0.9.1/src/jsonm.mldylib 2014-10-16 17:13:44.065481470 +0000 +@@ -0,0 +1,4 @@ ++# OASIS_START ++# DO NOT EDIT (digest: efa57c59bea23b0b78f5f708b180f123) ++Jsonm ++# OASIS_STOP +diff -urN jsonm-0.9.1.orig/src/jsonm.mllib jsonm-0.9.1/src/jsonm.mllib +--- jsonm-0.9.1.orig/src/jsonm.mllib 1970-01-01 00:00:00.000000000 +0000 ++++ jsonm-0.9.1/src/jsonm.mllib 2014-10-16 17:13:44.065481470 +0000 +@@ -0,0 +1,4 @@ ++# OASIS_START ++# DO NOT EDIT (digest: efa57c59bea23b0b78f5f708b180f123) ++Jsonm ++# OASIS_STOP +diff -urN jsonm-0.9.1.orig/src/META jsonm-0.9.1/src/META +--- jsonm-0.9.1.orig/src/META 1970-01-01 00:00:00.000000000 +0000 ++++ jsonm-0.9.1/src/META 2014-10-16 17:13:44.065481470 +0000 +@@ -0,0 +1,12 @@ ++# OASIS_START ++# DO NOT EDIT (digest: 0e79d1afefe3ab546b86a338e9656203) ++version = "0.9.1" ++description = "Non-blocking streaming JSON codec for OCaml" ++requires = "uutf" ++archive(byte) = "jsonm.cma" ++archive(byte, plugin) = "jsonm.cma" ++archive(native) = "jsonm.cmxa" ++archive(native, plugin) = "jsonm.cmxs" ++exists_if = "jsonm.cma" ++# OASIS_STOP ++ +diff -urN jsonm-0.9.1.orig/_tags jsonm-0.9.1/_tags +--- jsonm-0.9.1.orig/_tags 2012-08-05 13:44:36.000000000 +0000 ++++ jsonm-0.9.1/_tags 2014-10-16 17:13:44.041481372 +0000 +@@ -1,8 +1,40 @@ +-<**/*.{ml,mli}> : annot, debug, package(uutf) +- : include +- : include +- : package(unix), package(uutf) +- : package(unix), package(uutf) +- : package(unix), package(uutf) +- : package(uutf) +- : package(uutf) +\ No newline at end of file ++# OASIS_START ++# DO NOT EDIT (digest: becd4fca5f7011979b99c0409ea1cddb) ++# Ignore VCS directories, you can use the same kind of rule outside ++# OASIS_START/STOP if you want to exclude directories that contains ++# useless stuff for the build process ++<**/.svn>: -traverse ++<**/.svn>: not_hygienic ++".bzr": -traverse ++".bzr": not_hygienic ++".hg": -traverse ++".hg": not_hygienic ++".git": -traverse ++".git": not_hygienic ++"_darcs": -traverse ++"_darcs": not_hygienic ++# Library jsonm ++"src/jsonm.cmxs": use_jsonm ++: pkg_uutf ++# Executable jsontrip ++: pkg_unix ++: pkg_uutf ++: use_jsonm ++# Executable ocamltweets ++: pkg_unix ++: pkg_uutf ++: use_jsonm ++# Executable test ++: pkg_uutf ++: use_jsonm ++# Executable jtree ++: pkg_uutf ++: use_jsonm ++# Executable examples ++: pkg_unix ++: pkg_uutf ++: use_jsonm ++: pkg_unix ++: pkg_uutf ++: use_jsonm ++# OASIS_STOP diff --git a/SPECS/ocaml-jsonm.spec b/SPECS/ocaml-jsonm.spec index d325ec3d..b02fa62b 100644 --- a/SPECS/ocaml-jsonm.spec +++ b/SPECS/ocaml-jsonm.spec @@ -5,11 +5,11 @@ Summary: Non-blocking streaming JSON codec for OCaml License: BSD3 URL: http://erratique.ch/software/jsonm Source0: https://github.com/dbuenzli/jsonm/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: ocaml-jsonm-setup.ml.patch BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-uutf-devel -BuildRequires: oasis %description Jsonm is a non-blocking streaming codec to decode and encode the JSON @@ -35,10 +35,9 @@ developing applications that use %{name}. %prep %setup -q -n jsonm-%{version} +%patch0 -p1 %build -rm _tags -oasis setup ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ From 27648fbbd63162aafe8853cba574442aa39923a4 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 20:06:08 +0000 Subject: [PATCH 1086/1125] ocaml-omd: check in the OASIS files as a patch Signed-off-by: David Scott --- SOURCES/ocaml-omd-setup.ml.patch | 7877 ++++++++++++++++++++++++++++++ SPECS/ocaml-omd.spec | 4 +- 2 files changed, 7879 insertions(+), 2 deletions(-) create mode 100644 SOURCES/ocaml-omd-setup.ml.patch diff --git a/SOURCES/ocaml-omd-setup.ml.patch b/SOURCES/ocaml-omd-setup.ml.patch new file mode 100644 index 00000000..63bd65a9 --- /dev/null +++ b/SOURCES/ocaml-omd-setup.ml.patch @@ -0,0 +1,7877 @@ +diff -urN omd-1.0.2.orig/AUTHORS.txt omd-1.0.2/AUTHORS.txt +--- omd-1.0.2.orig/AUTHORS.txt 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/AUTHORS.txt 2014-10-16 17:35:14.037877273 +0000 +@@ -0,0 +1,12 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 3710988688c65f6e4b9bb9bb6fbd1a7a) *) ++ ++Authors of omd: ++ ++* Philippe Wang ++ ++Current maintainers of omd: ++ ++* Philippe Wang ++ ++(* OASIS_STOP *) +diff -urN omd-1.0.2.orig/INSTALL.txt omd-1.0.2/INSTALL.txt +--- omd-1.0.2.orig/INSTALL.txt 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/INSTALL.txt 2014-10-16 17:35:14.037877273 +0000 +@@ -0,0 +1,37 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 379b4e3ccfb8def9d0ba6eae56ab345d) *) ++ ++This is the INSTALL file for the omd distribution. ++ ++This package uses OASIS to generate its build system. See section OASIS for ++full information. ++ ++Dependencies ++============ ++ ++In order to compile this package, you will need: ++ * ocaml ++ * findlib ++ ++Installing ++========== ++ ++1. Uncompress the source archive and go to the root of the package ++2. Run 'ocaml setup.ml -configure' ++3. Run 'ocaml setup.ml -build' ++4. Run 'ocaml setup.ml -install' ++ ++Uninstalling ++============ ++ ++1. Go to the root of the package ++2. Run 'ocaml setup.ml -uninstall' ++ ++OASIS ++===== ++ ++OASIS is a program that generates a setup.ml file using a simple '_oasis' ++configuration file. The generated setup only depends on the standard OCaml ++installation: no additional library is required. ++ ++(* OASIS_STOP *) +diff -urN omd-1.0.2.orig/myocamlbuild.ml omd-1.0.2/myocamlbuild.ml +--- omd-1.0.2.orig/myocamlbuild.ml 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/myocamlbuild.ml 2014-10-16 17:35:14.037877273 +0000 +@@ -0,0 +1,609 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: 6186b4fe96f28bfcb79728ea0831b575) *) ++module OASISGettext = struct ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ ++ ++ let ns_ str = ++ str ++ ++ ++ let s_ str = ++ str ++ ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ ++ let init = ++ [] ++ ++ ++end ++ ++module OASISExpr = struct ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ ++ ++ open OASISGettext ++ ++ ++ type test = string ++ ++ ++ type flag = string ++ ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++ ++end ++ ++ ++# 132 "myocamlbuild.ml" ++module BaseEnvLight = struct ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ ++ ++ module MapString = Map.Make(String) ++ ++ ++ type t = string MapString.t ++ ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 237 "myocamlbuild.ml" ++module MyOCamlbuildFindlib = struct ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) ++ ++ ++ (** OCamlbuild extension, copied from ++ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild ++ * by N. Pouillard and others ++ * ++ * Updated on 2009/02/28 ++ * ++ * Modified by Sylvain Le Gall ++ *) ++ open Ocamlbuild_plugin ++ ++ ++ (* these functions are not really officially exported *) ++ let run_and_read = ++ Ocamlbuild_pack.My_unix.run_and_read ++ ++ ++ let blank_sep_strings = ++ Ocamlbuild_pack.Lexers.blank_sep_strings ++ ++ ++ let exec_from_conf exec = ++ let exec = ++ let env_filename = Pathname.basename BaseEnvLight.default_filename in ++ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in ++ try ++ BaseEnvLight.var_get exec env ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s\n" exec; ++ exec ++ in ++ let fix_win32 str = ++ if Sys.os_type = "Win32" then begin ++ let buff = Buffer.create (String.length str) in ++ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. ++ *) ++ String.iter ++ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) ++ str; ++ Buffer.contents buff ++ end else begin ++ str ++ end ++ in ++ fix_win32 exec ++ ++ let split s ch = ++ let buf = Buffer.create 13 in ++ let x = ref [] in ++ let flush () = ++ x := (Buffer.contents buf) :: !x; ++ Buffer.clear buf ++ in ++ String.iter ++ (fun c -> ++ if c = ch then ++ flush () ++ else ++ Buffer.add_char buf c) ++ s; ++ flush (); ++ List.rev !x ++ ++ ++ let split_nl s = split s '\n' ++ ++ ++ let before_space s = ++ try ++ String.before s (String.index s ' ') ++ with Not_found -> s ++ ++ (* ocamlfind command *) ++ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] ++ ++ (* This lists all supported packages. *) ++ let find_packages () = ++ List.map before_space (split_nl & run_and_read "ocamlfind list") ++ ++ ++ (* Mock to list available syntaxes. *) ++ let find_syntaxes () = ["camlp4o"; "camlp4r"] ++ ++ ++ let well_known_syntax = [ ++ "camlp4.quotations.o"; ++ "camlp4.quotations.r"; ++ "camlp4.exceptiontracer"; ++ "camlp4.extend"; ++ "camlp4.foldgenerator"; ++ "camlp4.listcomprehension"; ++ "camlp4.locationstripper"; ++ "camlp4.macro"; ++ "camlp4.mapgenerator"; ++ "camlp4.metagenerator"; ++ "camlp4.profiler"; ++ "camlp4.tracer" ++ ] ++ ++ ++ let dispatch = ++ function ++ | After_options -> ++ (* By using Before_options one let command line options have an higher ++ * priority on the contrary using After_options will guarantee to have ++ * the higher priority override default commands by ocamlfind ones *) ++ Options.ocamlc := ocamlfind & A"ocamlc"; ++ Options.ocamlopt := ocamlfind & A"ocamlopt"; ++ Options.ocamldep := ocamlfind & A"ocamldep"; ++ Options.ocamldoc := ocamlfind & A"ocamldoc"; ++ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; ++ Options.ocamlmklib := ocamlfind & A"ocamlmklib" ++ ++ | After_rules -> ++ ++ (* When one link an OCaml library/binary/package, one should use ++ * -linkpkg *) ++ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; ++ ++ (* For each ocamlfind package one inject the -package option when ++ * compiling, computing dependencies, generating documentation and ++ * linking. *) ++ List.iter ++ begin fun pkg -> ++ let base_args = [A"-package"; A pkg] in ++ (* TODO: consider how to really choose camlp4o or camlp4r. *) ++ let syn_args = [A"-syntax"; A "camlp4o"] in ++ let args = ++ (* Heuristic to identify syntax extensions: whether they end in ++ ".syntax"; some might not. ++ *) ++ if Filename.check_suffix pkg "syntax" || ++ List.mem pkg well_known_syntax then ++ syn_args @ base_args ++ else ++ base_args ++ in ++ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; ++ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; ++ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; ++ end ++ (find_packages ()); ++ ++ (* Like -package but for extensions syntax. Morover -syntax is useless ++ * when linking. *) ++ List.iter begin fun syntax -> ++ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; ++ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & ++ S[A"-syntax"; A syntax]; ++ end (find_syntaxes ()); ++ ++ (* The default "thread" tag is not compatible with ocamlfind. ++ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" ++ * options when using this tag. When using the "-linkpkg" option with ++ * ocamlfind, this module will then be added twice on the command line. ++ * ++ * To solve this, one approach is to add the "-thread" option when using ++ * the "threads" package using the previous plugin. ++ *) ++ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); ++ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); ++ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); ++ ++ | _ -> ++ () ++end ++ ++module MyOCamlbuildBase = struct ++(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ ++ (** Base functions for writing myocamlbuild.ml ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ ++ ++ open Ocamlbuild_plugin ++ module OC = Ocamlbuild_pack.Ocaml_compiler ++ ++ ++ type dir = string ++ type file = string ++ type name = string ++ type tag = string ++ ++ ++(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) ++ ++ ++ type t = ++ { ++ lib_ocaml: (name * dir list * string list) list; ++ lib_c: (name * dir * file list) list; ++ flags: (tag list * (spec OASISExpr.choices)) list; ++ (* Replace the 'dir: include' from _tags by a precise interdepends in ++ * directory. ++ *) ++ includes: (dir * dir list) list; ++ } ++ ++ ++ let env_filename = ++ Pathname.basename ++ BaseEnvLight.default_filename ++ ++ ++ let dispatch_combine lst = ++ fun e -> ++ List.iter ++ (fun dispatch -> dispatch e) ++ lst ++ ++ ++ let tag_libstubs nm = ++ "use_lib"^nm^"_stubs" ++ ++ ++ let nm_libstubs nm = ++ nm^"_stubs" ++ ++ ++ let dispatch t e = ++ let env = ++ BaseEnvLight.load ++ ~filename:env_filename ++ ~allow_empty:true ++ () ++ in ++ match e with ++ | Before_options -> ++ let no_trailing_dot s = ++ if String.length s >= 1 && s.[0] = '.' then ++ String.sub s 1 ((String.length s) - 1) ++ else ++ s ++ in ++ List.iter ++ (fun (opt, var) -> ++ try ++ opt := no_trailing_dot (BaseEnvLight.var_get var env) ++ with Not_found -> ++ Printf.eprintf "W: Cannot get variable %s\n" var) ++ [ ++ Options.ext_obj, "ext_obj"; ++ Options.ext_lib, "ext_lib"; ++ Options.ext_dll, "ext_dll"; ++ ] ++ ++ | After_rules -> ++ (* Declare OCaml libraries *) ++ List.iter ++ (function ++ | nm, [], intf_modules -> ++ ocaml_lib nm; ++ let cmis = ++ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis ++ | nm, dir :: tl, intf_modules -> ++ ocaml_lib ~dir:dir (dir^"/"^nm); ++ List.iter ++ (fun dir -> ++ List.iter ++ (fun str -> ++ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) ++ ["compile"; "infer_interface"; "doc"]) ++ tl; ++ let cmis = ++ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") ++ intf_modules in ++ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] ++ cmis) ++ t.lib_ocaml; ++ ++ (* Declare directories dependencies, replace "include" in _tags. *) ++ List.iter ++ (fun (dir, include_dirs) -> ++ Pathname.define_context dir include_dirs) ++ t.includes; ++ ++ (* Declare C libraries *) ++ List.iter ++ (fun (lib, dir, headers) -> ++ (* Handle C part of library *) ++ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; ++ A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] ++ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); ++ ++ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] ++ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); ++ ++ (* When ocaml link something that use the C library, then one ++ need that file to be up to date. ++ *) ++ dep ["link"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] ++ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; ++ ++ (* TODO: be more specific about what depends on headers *) ++ (* Depends on .h files *) ++ dep ["compile"; "c"] ++ headers; ++ ++ (* Setup search path for lib *) ++ flag ["link"; "ocaml"; "use_"^lib] ++ (S[A"-I"; P(dir)]); ++ ) ++ t.lib_c; ++ ++ (* Add flags *) ++ List.iter ++ (fun (tags, cond_specs) -> ++ let spec = BaseEnvLight.var_choose cond_specs env in ++ let rec eval_specs = ++ function ++ | S lst -> S (List.map eval_specs lst) ++ | A str -> A (BaseEnvLight.var_expand str env) ++ | spec -> spec ++ in ++ flag tags & (eval_specs spec)) ++ t.flags ++ | _ -> ++ () ++ ++ ++ let dispatch_default t = ++ dispatch_combine ++ [ ++ dispatch t; ++ MyOCamlbuildFindlib.dispatch; ++ ] ++ ++ ++end ++ ++ ++# 594 "myocamlbuild.ml" ++open Ocamlbuild_plugin;; ++let package_default = ++ { ++ MyOCamlbuildBase.lib_ocaml = [("omd", ["src"], [])]; ++ lib_c = []; ++ flags = []; ++ includes = [("tests/cow", ["src"]); ("tests", ["src"])] ++ } ++ ;; ++ ++let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; ++ ++# 608 "myocamlbuild.ml" ++(* OASIS_STOP *) ++Ocamlbuild_plugin.dispatch dispatch_default;; +diff -urN omd-1.0.2.orig/README.txt omd-1.0.2/README.txt +--- omd-1.0.2.orig/README.txt 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/README.txt 2014-10-16 17:35:14.037877273 +0000 +@@ -0,0 +1,26 @@ ++(* OASIS_START *) ++(* DO NOT EDIT (digest: aed56791947dcb6f267f1f4c0dd47ab1) *) ++ ++omd - A Markdown frontend in pure OCaml. ++======================================== ++ ++This Markdown library is implemented using only pure OCaml (including I/O ++operations provided by the standard OCaml compiler distribution). OMD is ++meant to be as faithful as possible to the original Markdown. Additionally, ++OMD implements a few Github markdown features, an extension mechanism, and a ++few other features. Note that the opam package installs both the OMD library ++and the command line tool `omd`. Note that The library interface of 1.0.x is ++only partially compatible with 0.9.x. ++ ++See the file [INSTALL.txt](INSTALL.txt) for building and installation ++instructions. ++ ++[Home page](https://github.com/ocaml/omd) ++ ++Copyright and license ++--------------------- ++ ++omd is distributed under the terms of the Internet Software Consortium's ++license. ++ ++(* OASIS_STOP *) +diff -urN omd-1.0.2.orig/setup.ml omd-1.0.2/setup.ml +--- omd-1.0.2.orig/setup.ml 2014-10-06 15:10:21.000000000 +0000 ++++ omd-1.0.2/setup.ml 2014-10-16 17:35:14.057877135 +0000 +@@ -3,9 +3,7088 @@ + with Not_found -> ();; + + (* OASIS_START *) +-(* DO NOT EDIT (digest: 7f47a529f70709161149c201ccd90f0b) *) +-#use "topfind";; +-#require "oasis.dynrun";; +-open OASISDynRun;; ++(* DO NOT EDIT (digest: 2b0de67708d24e260e7c5c20b1fb4ca5) *) ++(* ++ Regenerated by OASIS v0.4.4 ++ Visit http://oasis.forge.ocamlcore.org for more information and ++ documentation about functions used in this file. ++*) ++module OASISGettext = struct ++(* # 22 "src/oasis/OASISGettext.ml" *) ++ ++ ++ let ns_ str = ++ str ++ ++ ++ let s_ str = ++ str ++ ++ ++ let f_ (str: ('a, 'b, 'c, 'd) format4) = ++ str ++ ++ ++ let fn_ fmt1 fmt2 n = ++ if n = 1 then ++ fmt1^^"" ++ else ++ fmt2^^"" ++ ++ ++ let init = ++ [] ++ ++ ++end ++ ++module OASISContext = struct ++(* # 22 "src/oasis/OASISContext.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ type level = ++ [ `Debug ++ | `Info ++ | `Warning ++ | `Error] ++ ++ ++ type t = ++ { ++ (* TODO: replace this by a proplist. *) ++ quiet: bool; ++ info: bool; ++ debug: bool; ++ ignore_plugins: bool; ++ ignore_unknown_fields: bool; ++ printf: level -> string -> unit; ++ } ++ ++ ++ let printf lvl str = ++ let beg = ++ match lvl with ++ | `Error -> s_ "E: " ++ | `Warning -> s_ "W: " ++ | `Info -> s_ "I: " ++ | `Debug -> s_ "D: " ++ in ++ prerr_endline (beg^str) ++ ++ ++ let default = ++ ref ++ { ++ quiet = false; ++ info = false; ++ debug = false; ++ ignore_plugins = false; ++ ignore_unknown_fields = false; ++ printf = printf; ++ } ++ ++ ++ let quiet = ++ {!default with quiet = true} ++ ++ ++ let fspecs () = ++ (* TODO: don't act on default. *) ++ let ignore_plugins = ref false in ++ ["-quiet", ++ Arg.Unit (fun () -> default := {!default with quiet = true}), ++ s_ " Run quietly"; ++ ++ "-info", ++ Arg.Unit (fun () -> default := {!default with info = true}), ++ s_ " Display information message"; ++ ++ ++ "-debug", ++ Arg.Unit (fun () -> default := {!default with debug = true}), ++ s_ " Output debug message"; ++ ++ "-ignore-plugins", ++ Arg.Set ignore_plugins, ++ s_ " Ignore plugin's field."; ++ ++ "-C", ++ (* TODO: remove this chdir. *) ++ Arg.String (fun str -> Sys.chdir str), ++ s_ "dir Change directory before running."], ++ fun () -> {!default with ignore_plugins = !ignore_plugins} ++end ++ ++module OASISString = struct ++(* # 22 "src/oasis/OASISString.ml" *) ++ ++ ++ (** Various string utilities. ++ ++ Mostly inspired by extlib and batteries ExtString and BatString libraries. ++ ++ @author Sylvain Le Gall ++ *) ++ ++ ++ let nsplitf str f = ++ if str = "" then ++ [] ++ else ++ let buf = Buffer.create 13 in ++ let lst = ref [] in ++ let push () = ++ lst := Buffer.contents buf :: !lst; ++ Buffer.clear buf ++ in ++ let str_len = String.length str in ++ for i = 0 to str_len - 1 do ++ if f str.[i] then ++ push () ++ else ++ Buffer.add_char buf str.[i] ++ done; ++ push (); ++ List.rev !lst ++ ++ ++ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the ++ separator. ++ *) ++ let nsplit str c = ++ nsplitf str ((=) c) ++ ++ ++ let find ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ while !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ what_idx := 0; ++ incr str_idx ++ done; ++ if !what_idx <> String.length what then ++ raise Not_found ++ else ++ !str_idx - !what_idx ++ ++ ++ let sub_start str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str len (str_len - len) ++ ++ ++ let sub_end ?(offset=0) str len = ++ let str_len = String.length str in ++ if len >= str_len then ++ "" ++ else ++ String.sub str 0 (str_len - len) ++ ++ ++ let starts_with ~what ?(offset=0) str = ++ let what_idx = ref 0 in ++ let str_idx = ref offset in ++ let ok = ref true in ++ while !ok && ++ !str_idx < String.length str && ++ !what_idx < String.length what do ++ if str.[!str_idx] = what.[!what_idx] then ++ incr what_idx ++ else ++ ok := false; ++ incr str_idx ++ done; ++ if !what_idx = String.length what then ++ true ++ else ++ false ++ ++ ++ let strip_starts_with ~what str = ++ if starts_with ~what str then ++ sub_start str (String.length what) ++ else ++ raise Not_found ++ ++ ++ let ends_with ~what ?(offset=0) str = ++ let what_idx = ref ((String.length what) - 1) in ++ let str_idx = ref ((String.length str) - 1) in ++ let ok = ref true in ++ while !ok && ++ offset <= !str_idx && ++ 0 <= !what_idx do ++ if str.[!str_idx] = what.[!what_idx] then ++ decr what_idx ++ else ++ ok := false; ++ decr str_idx ++ done; ++ if !what_idx = -1 then ++ true ++ else ++ false ++ ++ ++ let strip_ends_with ~what str = ++ if ends_with ~what str then ++ sub_end str (String.length what) ++ else ++ raise Not_found ++ ++ ++ let replace_chars f s = ++ let buf = String.make (String.length s) 'X' in ++ for i = 0 to String.length s - 1 do ++ buf.[i] <- f s.[i] ++ done; ++ buf ++ ++ ++end ++ ++module OASISUtils = struct ++(* # 22 "src/oasis/OASISUtils.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ module MapExt = ++ struct ++ module type S = ++ sig ++ include Map.S ++ val add_list: 'a t -> (key * 'a) list -> 'a t ++ val of_list: (key * 'a) list -> 'a t ++ val to_list: 'a t -> (key * 'a) list ++ end ++ ++ module Make (Ord: Map.OrderedType) = ++ struct ++ include Map.Make(Ord) ++ ++ let rec add_list t = ++ function ++ | (k, v) :: tl -> add_list (add k v t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] ++ end ++ end ++ ++ ++ module MapString = MapExt.Make(String) ++ ++ ++ module SetExt = ++ struct ++ module type S = ++ sig ++ include Set.S ++ val add_list: t -> elt list -> t ++ val of_list: elt list -> t ++ val to_list: t -> elt list ++ end ++ ++ module Make (Ord: Set.OrderedType) = ++ struct ++ include Set.Make(Ord) ++ ++ let rec add_list t = ++ function ++ | e :: tl -> add_list (add e t) tl ++ | [] -> t ++ ++ let of_list lst = add_list empty lst ++ ++ let to_list = elements ++ end ++ end ++ ++ ++ module SetString = SetExt.Make(String) ++ ++ ++ let compare_csl s1 s2 = ++ String.compare (String.lowercase s1) (String.lowercase s2) ++ ++ ++ module HashStringCsl = ++ Hashtbl.Make ++ (struct ++ type t = string ++ ++ let equal s1 s2 = ++ (String.lowercase s1) = (String.lowercase s2) ++ ++ let hash s = ++ Hashtbl.hash (String.lowercase s) ++ end) ++ ++ module SetStringCsl = ++ SetExt.Make ++ (struct ++ type t = string ++ let compare = compare_csl ++ end) ++ ++ ++ let varname_of_string ?(hyphen='_') s = ++ if String.length s = 0 then ++ begin ++ invalid_arg "varname_of_string" ++ end ++ else ++ begin ++ let buf = ++ OASISString.replace_chars ++ (fun c -> ++ if ('a' <= c && c <= 'z') ++ || ++ ('A' <= c && c <= 'Z') ++ || ++ ('0' <= c && c <= '9') then ++ c ++ else ++ hyphen) ++ s; ++ in ++ let buf = ++ (* Start with a _ if digit *) ++ if '0' <= s.[0] && s.[0] <= '9' then ++ "_"^buf ++ else ++ buf ++ in ++ String.lowercase buf ++ end ++ ++ ++ let varname_concat ?(hyphen='_') p s = ++ let what = String.make 1 hyphen in ++ let p = ++ try ++ OASISString.strip_ends_with ~what p ++ with Not_found -> ++ p ++ in ++ let s = ++ try ++ OASISString.strip_starts_with ~what s ++ with Not_found -> ++ s ++ in ++ p^what^s ++ ++ ++ let is_varname str = ++ str = varname_of_string str ++ ++ ++ let failwithf fmt = Printf.ksprintf failwith fmt ++ ++ ++end ++ ++module PropList = struct ++(* # 22 "src/oasis/PropList.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ type name = string ++ ++ ++ exception Not_set of name * string option ++ exception No_printer of name ++ exception Unknown_field of name * name ++ ++ ++ let () = ++ Printexc.register_printer ++ (function ++ | Not_set (nm, Some rsn) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) ++ | Not_set (nm, None) -> ++ Some ++ (Printf.sprintf (f_ "Field '%s' is not set") nm) ++ | No_printer nm -> ++ Some ++ (Printf.sprintf (f_ "No default printer for value %s") nm) ++ | Unknown_field (nm, schm) -> ++ Some ++ (Printf.sprintf ++ (f_ "Field %s is not defined in schema %s") nm schm) ++ | _ -> ++ None) ++ ++ ++ module Data = ++ struct ++ type t = ++ (name, unit -> unit) Hashtbl.t ++ ++ let create () = ++ Hashtbl.create 13 ++ ++ let clear t = ++ Hashtbl.clear t ++ ++ ++(* # 78 "src/oasis/PropList.ml" *) ++ end ++ ++ ++ module Schema = ++ struct ++ type ('ctxt, 'extra) value = ++ { ++ get: Data.t -> string; ++ set: Data.t -> ?context:'ctxt -> string -> unit; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ type ('ctxt, 'extra) t = ++ { ++ name: name; ++ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; ++ order: name Queue.t; ++ name_norm: string -> string; ++ } ++ ++ let create ?(case_insensitive=false) nm = ++ { ++ name = nm; ++ fields = Hashtbl.create 13; ++ order = Queue.create (); ++ name_norm = ++ (if case_insensitive then ++ String.lowercase ++ else ++ fun s -> s); ++ } ++ ++ let add t nm set get extra help = ++ let key = ++ t.name_norm nm ++ in ++ ++ if Hashtbl.mem t.fields key then ++ failwith ++ (Printf.sprintf ++ (f_ "Field '%s' is already defined in schema '%s'") ++ nm t.name); ++ Hashtbl.add ++ t.fields ++ key ++ { ++ set = set; ++ get = get; ++ help = help; ++ extra = extra; ++ }; ++ Queue.add nm t.order ++ ++ let mem t nm = ++ Hashtbl.mem t.fields nm ++ ++ let find t nm = ++ try ++ Hashtbl.find t.fields (t.name_norm nm) ++ with Not_found -> ++ raise (Unknown_field (nm, t.name)) ++ ++ let get t data nm = ++ (find t nm).get data ++ ++ let set t data nm ?context x = ++ (find t nm).set ++ data ++ ?context ++ x ++ ++ let fold f acc t = ++ Queue.fold ++ (fun acc k -> ++ let v = ++ find t k ++ in ++ f acc k v.extra v.help) ++ acc ++ t.order ++ ++ let iter f t = ++ fold ++ (fun () -> f) ++ () ++ t ++ ++ let name t = ++ t.name ++ end ++ ++ ++ module Field = ++ struct ++ type ('ctxt, 'value, 'extra) t = ++ { ++ set: Data.t -> ?context:'ctxt -> 'value -> unit; ++ get: Data.t -> 'value; ++ sets: Data.t -> ?context:'ctxt -> string -> unit; ++ gets: Data.t -> string; ++ help: (unit -> string) option; ++ extra: 'extra; ++ } ++ ++ let new_id = ++ let last_id = ++ ref 0 ++ in ++ fun () -> incr last_id; !last_id ++ ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ (* Default value container *) ++ let v = ++ ref None ++ in ++ ++ (* If name is not given, create unique one *) ++ let nm = ++ match name with ++ | Some s -> s ++ | None -> Printf.sprintf "_anon_%d" (new_id ()) ++ in ++ ++ (* Last chance to get a value: the default *) ++ let default () = ++ match default with ++ | Some d -> d ++ | None -> raise (Not_set (nm, Some (s_ "no default value"))) ++ in ++ ++ (* Get data *) ++ let get data = ++ (* Get value *) ++ try ++ (Hashtbl.find data nm) (); ++ match !v with ++ | Some x -> x ++ | None -> default () ++ with Not_found -> ++ default () ++ in ++ ++ (* Set data *) ++ let set data ?context x = ++ let x = ++ match update with ++ | Some f -> ++ begin ++ try ++ f ?context (get data) x ++ with Not_set _ -> ++ x ++ end ++ | None -> ++ x ++ in ++ Hashtbl.replace ++ data ++ nm ++ (fun () -> v := Some x) ++ in ++ ++ (* Parse string value, if possible *) ++ let parse = ++ match parse with ++ | Some f -> ++ f ++ | None -> ++ fun ?context s -> ++ failwith ++ (Printf.sprintf ++ (f_ "Cannot parse field '%s' when setting value %S") ++ nm ++ s) ++ in ++ ++ (* Set data, from string *) ++ let sets data ?context s = ++ set ?context data (parse ?context s) ++ in ++ ++ (* Output value as string, if possible *) ++ let print = ++ match print with ++ | Some f -> ++ f ++ | None -> ++ fun _ -> raise (No_printer nm) ++ in ++ ++ (* Get data, as a string *) ++ let gets data = ++ print (get data) ++ in ++ ++ begin ++ match schema with ++ | Some t -> ++ Schema.add t nm sets gets extra help ++ | None -> ++ () ++ end; ++ ++ { ++ set = set; ++ get = get; ++ sets = sets; ++ gets = gets; ++ help = help; ++ extra = extra; ++ } ++ ++ let fset data t ?context x = ++ t.set data ?context x ++ ++ let fget data t = ++ t.get data ++ ++ let fsets data t ?context s = ++ t.sets data ?context s ++ ++ let fgets data t = ++ t.gets data ++ end ++ ++ ++ module FieldRO = ++ struct ++ let create ?schema ?name ?parse ?print ?default ?update ?help extra = ++ let fld = ++ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra ++ in ++ fun data -> Field.fget data fld ++ end ++end ++ ++module OASISMessage = struct ++(* # 22 "src/oasis/OASISMessage.ml" *) ++ ++ ++ open OASISGettext ++ open OASISContext ++ ++ ++ let generic_message ~ctxt lvl fmt = ++ let cond = ++ if ctxt.quiet then ++ false ++ else ++ match lvl with ++ | `Debug -> ctxt.debug ++ | `Info -> ctxt.info ++ | _ -> true ++ in ++ Printf.ksprintf ++ (fun str -> ++ if cond then ++ begin ++ ctxt.printf lvl str ++ end) ++ fmt ++ ++ ++ let debug ~ctxt fmt = ++ generic_message ~ctxt `Debug fmt ++ ++ ++ let info ~ctxt fmt = ++ generic_message ~ctxt `Info fmt ++ ++ ++ let warning ~ctxt fmt = ++ generic_message ~ctxt `Warning fmt ++ ++ ++ let error ~ctxt fmt = ++ generic_message ~ctxt `Error fmt ++ ++end ++ ++module OASISVersion = struct ++(* # 22 "src/oasis/OASISVersion.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ ++ ++ ++ type s = string ++ ++ ++ type t = string ++ ++ ++ type comparator = ++ | VGreater of t ++ | VGreaterEqual of t ++ | VEqual of t ++ | VLesser of t ++ | VLesserEqual of t ++ | VOr of comparator * comparator ++ | VAnd of comparator * comparator ++ ++ ++ ++ (* Range of allowed characters *) ++ let is_digit c = ++ '0' <= c && c <= '9' ++ ++ ++ let is_alpha c = ++ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ++ ++ ++ let is_special = ++ function ++ | '.' | '+' | '-' | '~' -> true ++ | _ -> false ++ ++ ++ let rec version_compare v1 v2 = ++ if v1 <> "" || v2 <> "" then ++ begin ++ (* Compare ascii string, using special meaning for version ++ * related char ++ *) ++ let val_ascii c = ++ if c = '~' then -1 ++ else if is_digit c then 0 ++ else if c = '\000' then 0 ++ else if is_alpha c then Char.code c ++ else (Char.code c) + 256 ++ in ++ ++ let len1 = String.length v1 in ++ let len2 = String.length v2 in ++ ++ let p = ref 0 in ++ ++ (** Compare ascii part *) ++ let compare_vascii () = ++ let cmp = ref 0 in ++ while !cmp = 0 && ++ !p < len1 && !p < len2 && ++ not (is_digit v1.[!p] && is_digit v2.[!p]) do ++ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); ++ incr p ++ done; ++ if !cmp = 0 && !p < len1 && !p = len2 then ++ val_ascii v1.[!p] ++ else if !cmp = 0 && !p = len1 && !p < len2 then ++ - (val_ascii v2.[!p]) ++ else ++ !cmp ++ in ++ ++ (** Compare digit part *) ++ let compare_digit () = ++ let extract_int v p = ++ let start_p = !p in ++ while !p < String.length v && is_digit v.[!p] do ++ incr p ++ done; ++ let substr = ++ String.sub v !p ((String.length v) - !p) ++ in ++ let res = ++ match String.sub v start_p (!p - start_p) with ++ | "" -> 0 ++ | s -> int_of_string s ++ in ++ res, substr ++ in ++ let i1, tl1 = extract_int v1 (ref !p) in ++ let i2, tl2 = extract_int v2 (ref !p) in ++ i1 - i2, tl1, tl2 ++ in ++ ++ match compare_vascii () with ++ | 0 -> ++ begin ++ match compare_digit () with ++ | 0, tl1, tl2 -> ++ if tl1 <> "" && is_digit tl1.[0] then ++ 1 ++ else if tl2 <> "" && is_digit tl2.[0] then ++ -1 ++ else ++ version_compare tl1 tl2 ++ | n, _, _ -> ++ n ++ end ++ | n -> ++ n ++ end ++ else ++ begin ++ 0 ++ end ++ ++ ++ let version_of_string str = str ++ ++ ++ let string_of_version t = t ++ ++ ++ let version_compare_string s1 s2 = ++ version_compare (version_of_string s1) (version_of_string s2) ++ ++ ++ let chop t = ++ try ++ let pos = ++ String.rindex t '.' ++ in ++ String.sub t 0 pos ++ with Not_found -> ++ t ++ ++ ++ let rec comparator_apply v op = ++ match op with ++ | VGreater cv -> ++ (version_compare v cv) > 0 ++ | VGreaterEqual cv -> ++ (version_compare v cv) >= 0 ++ | VLesser cv -> ++ (version_compare v cv) < 0 ++ | VLesserEqual cv -> ++ (version_compare v cv) <= 0 ++ | VEqual cv -> ++ (version_compare v cv) = 0 ++ | VOr (op1, op2) -> ++ (comparator_apply v op1) || (comparator_apply v op2) ++ | VAnd (op1, op2) -> ++ (comparator_apply v op1) && (comparator_apply v op2) ++ ++ ++ let rec string_of_comparator = ++ function ++ | VGreater v -> "> "^(string_of_version v) ++ | VEqual v -> "= "^(string_of_version v) ++ | VLesser v -> "< "^(string_of_version v) ++ | VGreaterEqual v -> ">= "^(string_of_version v) ++ | VLesserEqual v -> "<= "^(string_of_version v) ++ | VOr (c1, c2) -> ++ (string_of_comparator c1)^" || "^(string_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (string_of_comparator c1)^" && "^(string_of_comparator c2) ++ ++ ++ let rec varname_of_comparator = ++ let concat p v = ++ OASISUtils.varname_concat ++ p ++ (OASISUtils.varname_of_string ++ (string_of_version v)) ++ in ++ function ++ | VGreater v -> concat "gt" v ++ | VLesser v -> concat "lt" v ++ | VEqual v -> concat "eq" v ++ | VGreaterEqual v -> concat "ge" v ++ | VLesserEqual v -> concat "le" v ++ | VOr (c1, c2) -> ++ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) ++ | VAnd (c1, c2) -> ++ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) ++ ++ ++ let rec comparator_ge v' = ++ let cmp v = version_compare v v' >= 0 in ++ function ++ | VEqual v ++ | VGreaterEqual v ++ | VGreater v -> cmp v ++ | VLesserEqual _ ++ | VLesser _ -> false ++ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 ++ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 ++ ++ ++end ++ ++module OASISLicense = struct ++(* # 22 "src/oasis/OASISLicense.ml" *) ++ ++ ++ (** License for _oasis fields ++ @author Sylvain Le Gall ++ *) ++ ++ ++ ++ ++ ++ type license = string ++ ++ ++ type license_exception = string ++ ++ ++ type license_version = ++ | Version of OASISVersion.t ++ | VersionOrLater of OASISVersion.t ++ | NoVersion ++ ++ ++ ++ type license_dep_5_unit = ++ { ++ license: license; ++ excption: license_exception option; ++ version: license_version; ++ } ++ ++ ++ ++ type license_dep_5 = ++ | DEP5Unit of license_dep_5_unit ++ | DEP5Or of license_dep_5 list ++ | DEP5And of license_dep_5 list ++ ++ ++ type t = ++ | DEP5License of license_dep_5 ++ | OtherLicense of string (* URL *) ++ ++ ++ ++end ++ ++module OASISExpr = struct ++(* # 22 "src/oasis/OASISExpr.ml" *) ++ ++ ++ ++ ++ ++ open OASISGettext ++ ++ ++ type test = string ++ ++ ++ type flag = string ++ ++ ++ type t = ++ | EBool of bool ++ | ENot of t ++ | EAnd of t * t ++ | EOr of t * t ++ | EFlag of flag ++ | ETest of test * string ++ ++ ++ ++ type 'a choices = (t * 'a) list ++ ++ ++ let eval var_get t = ++ let rec eval' = ++ function ++ | EBool b -> ++ b ++ ++ | ENot e -> ++ not (eval' e) ++ ++ | EAnd (e1, e2) -> ++ (eval' e1) && (eval' e2) ++ ++ | EOr (e1, e2) -> ++ (eval' e1) || (eval' e2) ++ ++ | EFlag nm -> ++ let v = ++ var_get nm ++ in ++ assert(v = "true" || v = "false"); ++ (v = "true") ++ ++ | ETest (nm, vl) -> ++ let v = ++ var_get nm ++ in ++ (v = vl) ++ in ++ eval' t ++ ++ ++ let choose ?printer ?name var_get lst = ++ let rec choose_aux = ++ function ++ | (cond, vl) :: tl -> ++ if eval var_get cond then ++ vl ++ else ++ choose_aux tl ++ | [] -> ++ let str_lst = ++ if lst = [] then ++ s_ "" ++ else ++ String.concat ++ (s_ ", ") ++ (List.map ++ (fun (cond, vl) -> ++ match printer with ++ | Some p -> p vl ++ | None -> s_ "") ++ lst) ++ in ++ match name with ++ | Some nm -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for the choice list '%s': %s") ++ nm str_lst) ++ | None -> ++ failwith ++ (Printf.sprintf ++ (f_ "No result for a choice list: %s") ++ str_lst) ++ in ++ choose_aux (List.rev lst) ++ ++ ++end ++ ++module OASISText = struct ++(* # 22 "src/oasis/OASISText.ml" *) ++ ++ ++ ++ type elt = ++ | Para of string ++ | Verbatim of string ++ | BlankLine ++ ++ ++ type t = elt list ++ ++end ++ ++module OASISTypes = struct ++(* # 22 "src/oasis/OASISTypes.ml" *) ++ ++ ++ ++ ++ ++ type name = string ++ type package_name = string ++ type url = string ++ type unix_dirname = string ++ type unix_filename = string ++ type host_dirname = string ++ type host_filename = string ++ type prog = string ++ type arg = string ++ type args = string list ++ type command_line = (prog * arg list) ++ ++ ++ type findlib_name = string ++ type findlib_full = string ++ ++ ++ type compiled_object = ++ | Byte ++ | Native ++ | Best ++ ++ ++ ++ type dependency = ++ | FindlibPackage of findlib_full * OASISVersion.comparator option ++ | InternalLibrary of name ++ ++ ++ ++ type tool = ++ | ExternalTool of name ++ | InternalExecutable of name ++ ++ ++ ++ type vcs = ++ | Darcs ++ | Git ++ | Svn ++ | Cvs ++ | Hg ++ | Bzr ++ | Arch ++ | Monotone ++ | OtherVCS of url ++ ++ ++ ++ type plugin_kind = ++ [ `Configure ++ | `Build ++ | `Doc ++ | `Test ++ | `Install ++ | `Extra ++ ] ++ ++ ++ type plugin_data_purpose = ++ [ `Configure ++ | `Build ++ | `Install ++ | `Clean ++ | `Distclean ++ | `Install ++ | `Uninstall ++ | `Test ++ | `Doc ++ | `Extra ++ | `Other of string ++ ] ++ ++ ++ type 'a plugin = 'a * name * OASISVersion.t option ++ ++ ++ type all_plugin = plugin_kind plugin ++ ++ ++ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list ++ ++ ++(* # 115 "src/oasis/OASISTypes.ml" *) ++ ++ ++ type 'a conditional = 'a OASISExpr.choices ++ ++ ++ type custom = ++ { ++ pre_command: (command_line option) conditional; ++ post_command: (command_line option) conditional; ++ } ++ ++ ++ ++ type common_section = ++ { ++ cs_name: name; ++ cs_data: PropList.Data.t; ++ cs_plugin_data: plugin_data; ++ } ++ ++ ++ ++ type build_section = ++ { ++ bs_build: bool conditional; ++ bs_install: bool conditional; ++ bs_path: unix_dirname; ++ bs_compiled_object: compiled_object; ++ bs_build_depends: dependency list; ++ bs_build_tools: tool list; ++ bs_c_sources: unix_filename list; ++ bs_data_files: (unix_filename * unix_filename option) list; ++ bs_ccopt: args conditional; ++ bs_cclib: args conditional; ++ bs_dlllib: args conditional; ++ bs_dllpath: args conditional; ++ bs_byteopt: args conditional; ++ bs_nativeopt: args conditional; ++ } ++ ++ ++ ++ type library = ++ { ++ lib_modules: string list; ++ lib_pack: bool; ++ lib_internal_modules: string list; ++ lib_findlib_parent: findlib_name option; ++ lib_findlib_name: findlib_name option; ++ lib_findlib_containers: findlib_name list; ++ } ++ ++ ++ type object_ = ++ { ++ obj_modules: string list; ++ obj_findlib_fullname: findlib_name list option; ++ } ++ ++ ++ type executable = ++ { ++ exec_custom: bool; ++ exec_main_is: unix_filename; ++ } ++ ++ ++ type flag = ++ { ++ flag_description: string option; ++ flag_default: bool conditional; ++ } ++ ++ ++ type source_repository = ++ { ++ src_repo_type: vcs; ++ src_repo_location: url; ++ src_repo_browser: url option; ++ src_repo_module: string option; ++ src_repo_branch: string option; ++ src_repo_tag: string option; ++ src_repo_subdir: unix_filename option; ++ } ++ ++ ++ type test = ++ { ++ test_type: [`Test] plugin; ++ test_command: command_line conditional; ++ test_custom: custom; ++ test_working_directory: unix_filename option; ++ test_run: bool conditional; ++ test_tools: tool list; ++ } ++ ++ ++ type doc_format = ++ | HTML of unix_filename ++ | DocText ++ | PDF ++ | PostScript ++ | Info of unix_filename ++ | DVI ++ | OtherDoc ++ ++ ++ ++ type doc = ++ { ++ doc_type: [`Doc] plugin; ++ doc_custom: custom; ++ doc_build: bool conditional; ++ doc_install: bool conditional; ++ doc_install_dir: unix_filename; ++ doc_title: string; ++ doc_authors: string list; ++ doc_abstract: string option; ++ doc_format: doc_format; ++ doc_data_files: (unix_filename * unix_filename option) list; ++ doc_build_tools: tool list; ++ } ++ ++ ++ type section = ++ | Library of common_section * build_section * library ++ | Object of common_section * build_section * object_ ++ | Executable of common_section * build_section * executable ++ | Flag of common_section * flag ++ | SrcRepo of common_section * source_repository ++ | Test of common_section * test ++ | Doc of common_section * doc ++ ++ ++ ++ type section_kind = ++ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] ++ ++ ++ type package = ++ { ++ oasis_version: OASISVersion.t; ++ ocaml_version: OASISVersion.comparator option; ++ findlib_version: OASISVersion.comparator option; ++ alpha_features: string list; ++ beta_features: string list; ++ name: package_name; ++ version: OASISVersion.t; ++ license: OASISLicense.t; ++ license_file: unix_filename option; ++ copyrights: string list; ++ maintainers: string list; ++ authors: string list; ++ homepage: url option; ++ synopsis: string; ++ description: OASISText.t option; ++ categories: url list; ++ ++ conf_type: [`Configure] plugin; ++ conf_custom: custom; ++ ++ build_type: [`Build] plugin; ++ build_custom: custom; ++ ++ install_type: [`Install] plugin; ++ install_custom: custom; ++ uninstall_custom: custom; ++ ++ clean_custom: custom; ++ distclean_custom: custom; ++ ++ files_ab: unix_filename list; ++ sections: section list; ++ plugins: [`Extra] plugin list; ++ disable_oasis_section: unix_filename list; ++ schema_data: PropList.Data.t; ++ plugin_data: plugin_data; ++ } ++ ++ ++end ++ ++module OASISFeatures = struct ++(* # 22 "src/oasis/OASISFeatures.ml" *) ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISVersion ++ ++ module MapPlugin = ++ Map.Make ++ (struct ++ type t = plugin_kind * name ++ let compare = Pervasives.compare ++ end) ++ ++ module Data = ++ struct ++ type t = ++ { ++ oasis_version: OASISVersion.t; ++ plugin_versions: OASISVersion.t option MapPlugin.t; ++ alpha_features: string list; ++ beta_features: string list; ++ } ++ ++ let create oasis_version alpha_features beta_features = ++ { ++ oasis_version = oasis_version; ++ plugin_versions = MapPlugin.empty; ++ alpha_features = alpha_features; ++ beta_features = beta_features ++ } ++ ++ let of_package pkg = ++ create ++ pkg.OASISTypes.oasis_version ++ pkg.OASISTypes.alpha_features ++ pkg.OASISTypes.beta_features ++ ++ let add_plugin (plugin_kind, plugin_name, plugin_version) t = ++ {t with ++ plugin_versions = MapPlugin.add ++ (plugin_kind, plugin_name) ++ plugin_version ++ t.plugin_versions} ++ ++ let plugin_version plugin_kind plugin_name t = ++ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions ++ ++ let to_string t = ++ Printf.sprintf ++ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ ++ plugins_version: %s" ++ (OASISVersion.string_of_version t.oasis_version) ++ (String.concat ", " t.alpha_features) ++ (String.concat ", " t.beta_features) ++ (String.concat ", " ++ (MapPlugin.fold ++ (fun (_, plg) ver_opt acc -> ++ (plg^ ++ (match ver_opt with ++ | Some v -> ++ " "^(OASISVersion.string_of_version v) ++ | None -> "")) ++ :: acc) ++ t.plugin_versions [])) ++ end ++ ++ type origin = ++ | Field of string * string ++ | Section of string ++ | NoOrigin ++ ++ type stage = Alpha | Beta ++ ++ ++ let string_of_stage = ++ function ++ | Alpha -> "alpha" ++ | Beta -> "beta" ++ ++ ++ let field_of_stage = ++ function ++ | Alpha -> "AlphaFeatures" ++ | Beta -> "BetaFeatures" ++ ++ type publication = InDev of stage | SinceVersion of OASISVersion.t ++ ++ type t = ++ { ++ name: string; ++ plugin: all_plugin option; ++ publication: publication; ++ description: unit -> string; ++ } ++ ++ (* TODO: mutex protect this. *) ++ let all_features = Hashtbl.create 13 ++ ++ ++ let since_version ver_str = SinceVersion (version_of_string ver_str) ++ let alpha = InDev Alpha ++ let beta = InDev Beta ++ ++ ++ let to_string t = ++ Printf.sprintf ++ "feature: %s; plugin: %s; publication: %s" ++ t.name ++ (match t.plugin with ++ | None -> "" ++ | Some (_, nm, _) -> nm) ++ (match t.publication with ++ | InDev stage -> string_of_stage stage ++ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) ++ ++ let data_check t data origin = ++ let no_message = "no message" in ++ ++ let check_feature features stage = ++ let has_feature = List.mem t.name features in ++ if not has_feature then ++ match origin with ++ | Field (fld, where) -> ++ Some ++ (Printf.sprintf ++ (f_ "Field %s in %s is only available when feature %s \ ++ is in field %s.") ++ fld where t.name (field_of_stage stage)) ++ | Section sct -> ++ Some ++ (Printf.sprintf ++ (f_ "Section %s is only available when features %s \ ++ is in field %s.") ++ sct t.name (field_of_stage stage)) ++ | NoOrigin -> ++ Some no_message ++ else ++ None ++ in ++ ++ let version_is_good ~min_version version fmt = ++ let version_is_good = ++ OASISVersion.comparator_apply ++ version (OASISVersion.VGreaterEqual min_version) ++ in ++ Printf.ksprintf ++ (fun str -> ++ if version_is_good then ++ None ++ else ++ Some str) ++ fmt ++ in ++ ++ match origin, t.plugin, t.publication with ++ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha ++ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta ++ | Field(fld, where), None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Field %s in %s is only valid since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking \ ++ OASIS changelog.") ++ fld where (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Field(fld, where), Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Field %s in %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ fld where plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ fld where plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | Section sct, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version ++ (f_ "Section %s is only valid for since OASIS v%s, update \ ++ OASISFormat field from '%s' to '%s' after checking OASIS \ ++ changelog.") ++ sct (string_of_version min_version) ++ (string_of_version data.Data.oasis_version) ++ (string_of_version min_version) ++ ++ | Section sct, Some(plugin_knd, plugin_name, _), ++ SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ try ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> ++ failwithf ++ (f_ "Section %s is only valid for the OASIS \ ++ plugin %s since v%s, but no plugin version is \ ++ defined in the _oasis file, change '%s' to \ ++ '%s (%s)' in your _oasis file.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name ++ plugin_name (string_of_version min_version) ++ with Not_found -> ++ failwithf ++ (f_ "Section %s is only valid when the OASIS plugin %s \ ++ is defined.") ++ sct plugin_name ++ in ++ version_is_good ~min_version plugin_version_current ++ (f_ "Section %s is only valid for the OASIS plugin %s \ ++ since v%s, update your plugin from '%s (%s)' to \ ++ '%s (%s)' after checking the plugin's changelog.") ++ sct plugin_name (string_of_version min_version) ++ plugin_name (string_of_version plugin_version_current) ++ plugin_name (string_of_version min_version) ++ with Failure msg -> ++ Some msg ++ end ++ ++ | NoOrigin, None, SinceVersion min_version -> ++ version_is_good ~min_version data.Data.oasis_version "%s" no_message ++ ++ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> ++ begin ++ try ++ let plugin_version_current = ++ match Data.plugin_version plugin_knd plugin_name data with ++ | Some ver -> ver ++ | None -> raise Not_found ++ in ++ version_is_good ~min_version plugin_version_current ++ "%s" no_message ++ with Not_found -> ++ Some no_message ++ end ++ ++ ++ let data_assert t data origin = ++ match data_check t data origin with ++ | None -> () ++ | Some str -> failwith str ++ ++ ++ let data_test t data = ++ match data_check t data NoOrigin with ++ | None -> true ++ | Some str -> false ++ ++ ++ let package_test t pkg = ++ data_test t (Data.of_package pkg) ++ ++ ++ let create ?plugin name publication description = ++ let () = ++ if Hashtbl.mem all_features name then ++ failwithf "Feature '%s' is already declared." name ++ in ++ let t = ++ { ++ name = name; ++ plugin = plugin; ++ publication = publication; ++ description = description; ++ } ++ in ++ Hashtbl.add all_features name t; ++ t ++ ++ ++ let get_stage name = ++ try ++ (Hashtbl.find all_features name).publication ++ with Not_found -> ++ failwithf (f_ "Feature %s doesn't exist.") name ++ ++ ++ let list () = ++ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] ++ ++ (* ++ * Real flags. ++ *) ++ ++ ++ let features = ++ create "features_fields" ++ (since_version "0.4") ++ (fun () -> ++ s_ "Enable to experiment not yet official features.") ++ ++ ++ let flag_docs = ++ create "flag_docs" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Building docs require '-docs' flag at configure.") ++ ++ ++ let flag_tests = ++ create "flag_tests" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Running tests require '-tests' flag at configure.") ++ ++ ++ let pack = ++ create "pack" ++ (since_version "0.3") ++ (fun () -> ++ s_ "Allow to create packed library.") ++ ++ ++ let section_object = ++ create "section_object" beta ++ (fun () -> ++ s_ "Implement an object section.") ++ ++ ++ let dynrun_for_release = ++ create "dynrun_for_release" alpha ++ (fun () -> ++ s_ "Make '-setup-update dynamic' suitable for releasing project.") ++ ++ ++ let compiled_setup_ml = ++ create "compiled_setup_ml" alpha ++ (fun () -> ++ s_ "It compiles the setup.ml and speed-up actions done with it.") ++ ++ let disable_oasis_section = ++ create "disable_oasis_section" alpha ++ (fun () -> ++ s_ "Allows the OASIS section comments and digest to be omitted in \ ++ generated files.") ++end ++ ++module OASISUnixPath = struct ++(* # 22 "src/oasis/OASISUnixPath.ml" *) ++ ++ ++ type unix_filename = string ++ type unix_dirname = string ++ ++ ++ type host_filename = string ++ type host_dirname = string ++ ++ ++ let current_dir_name = "." ++ ++ ++ let parent_dir_name = ".." ++ ++ ++ let is_current_dir fn = ++ fn = current_dir_name || fn = "" ++ ++ ++ let concat f1 f2 = ++ if is_current_dir f1 then ++ f2 ++ else ++ let f1' = ++ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 ++ in ++ f1'^"/"^f2 ++ ++ ++ let make = ++ function ++ | hd :: tl -> ++ List.fold_left ++ (fun f p -> concat f p) ++ hd ++ tl ++ | [] -> ++ invalid_arg "OASISUnixPath.make" ++ ++ ++ let dirname f = ++ try ++ String.sub f 0 (String.rindex f '/') ++ with Not_found -> ++ current_dir_name ++ ++ ++ let basename f = ++ try ++ let pos_start = ++ (String.rindex f '/') + 1 ++ in ++ String.sub f pos_start ((String.length f) - pos_start) ++ with Not_found -> ++ f ++ ++ ++ let chop_extension f = ++ try ++ let last_dot = ++ String.rindex f '.' ++ in ++ let sub = ++ String.sub f 0 last_dot ++ in ++ try ++ let last_slash = ++ String.rindex f '/' ++ in ++ if last_slash < last_dot then ++ sub ++ else ++ f ++ with Not_found -> ++ sub ++ ++ with Not_found -> ++ f ++ ++ ++ let capitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.capitalize base) ++ ++ ++ let uncapitalize_file f = ++ let dir = dirname f in ++ let base = basename f in ++ concat dir (String.uncapitalize base) ++ ++ ++end ++ ++module OASISHostPath = struct ++(* # 22 "src/oasis/OASISHostPath.ml" *) ++ ++ ++ open Filename ++ ++ ++ module Unix = OASISUnixPath ++ ++ ++ let make = ++ function ++ | [] -> ++ invalid_arg "OASISHostPath.make" ++ | hd :: tl -> ++ List.fold_left Filename.concat hd tl ++ ++ ++ let of_unix ufn = ++ if Sys.os_type = "Unix" then ++ ufn ++ else ++ make ++ (List.map ++ (fun p -> ++ if p = Unix.current_dir_name then ++ current_dir_name ++ else if p = Unix.parent_dir_name then ++ parent_dir_name ++ else ++ p) ++ (OASISString.nsplit ufn '/')) ++ ++ ++end ++ ++module OASISSection = struct ++(* # 22 "src/oasis/OASISSection.ml" *) ++ ++ ++ open OASISTypes ++ ++ ++ let section_kind_common = ++ function ++ | Library (cs, _, _) -> ++ `Library, cs ++ | Object (cs, _, _) -> ++ `Object, cs ++ | Executable (cs, _, _) -> ++ `Executable, cs ++ | Flag (cs, _) -> ++ `Flag, cs ++ | SrcRepo (cs, _) -> ++ `SrcRepo, cs ++ | Test (cs, _) -> ++ `Test, cs ++ | Doc (cs, _) -> ++ `Doc, cs ++ ++ ++ let section_common sct = ++ snd (section_kind_common sct) ++ ++ ++ let section_common_set cs = ++ function ++ | Library (_, bs, lib) -> Library (cs, bs, lib) ++ | Object (_, bs, obj) -> Object (cs, bs, obj) ++ | Executable (_, bs, exec) -> Executable (cs, bs, exec) ++ | Flag (_, flg) -> Flag (cs, flg) ++ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) ++ | Test (_, tst) -> Test (cs, tst) ++ | Doc (_, doc) -> Doc (cs, doc) ++ ++ ++ (** Key used to identify section ++ *) ++ let section_id sct = ++ let k, cs = ++ section_kind_common sct ++ in ++ k, cs.cs_name ++ ++ ++ let string_of_section sct = ++ let k, nm = ++ section_id sct ++ in ++ (match k with ++ | `Library -> "library" ++ | `Object -> "object" ++ | `Executable -> "executable" ++ | `Flag -> "flag" ++ | `SrcRepo -> "src repository" ++ | `Test -> "test" ++ | `Doc -> "doc") ++ ^" "^nm ++ ++ ++ let section_find id scts = ++ List.find ++ (fun sct -> id = section_id sct) ++ scts ++ ++ ++ module CSection = ++ struct ++ type t = section ++ ++ let id = section_id ++ ++ let compare t1 t2 = ++ compare (id t1) (id t2) ++ ++ let equal t1 t2 = ++ (id t1) = (id t2) ++ ++ let hash t = ++ Hashtbl.hash (id t) ++ end ++ ++ ++ module MapSection = Map.Make(CSection) ++ module SetSection = Set.Make(CSection) ++ ++ ++end ++ ++module OASISBuildSection = struct ++(* # 22 "src/oasis/OASISBuildSection.ml" *) ++ ++ ++end ++ ++module OASISExecutable = struct ++(* # 22 "src/oasis/OASISExecutable.ml" *) ++ ++ ++ open OASISTypes ++ ++ ++ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = ++ let dir = ++ OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.dirname exec.exec_main_is) ++ in ++ let is_native_exec = ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native () ++ | Byte -> false ++ in ++ ++ OASISUnixPath.concat ++ dir ++ (cs.cs_name^(suffix_program ())), ++ ++ if not is_native_exec && ++ not exec.exec_custom && ++ bs.bs_c_sources <> [] then ++ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) ++ else ++ None ++ ++ ++end ++ ++module OASISLibrary = struct ++(* # 22 "src/oasis/OASISLibrary.ml" *) ++ ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ ++ (* Look for a module file, considering capitalization or not. *) ++ let find_module source_file_exists bs modul = ++ let possible_base_fn = ++ List.map ++ (OASISUnixPath.concat bs.bs_path) ++ [modul; ++ OASISUnixPath.uncapitalize_file modul; ++ OASISUnixPath.capitalize_file modul] ++ in ++ (* TODO: we should be able to be able to determine the source for every ++ * files. Hence we should introduce a Module(source: fn) for the fields ++ * Modules and InternalModules ++ *) ++ List.fold_left ++ (fun acc base_fn -> ++ match acc with ++ | `No_sources _ -> ++ begin ++ let file_found = ++ List.fold_left ++ (fun acc ext -> ++ if source_file_exists (base_fn^ext) then ++ (base_fn^ext) :: acc ++ else ++ acc) ++ [] ++ [".ml"; ".mli"; ".mll"; ".mly"] ++ in ++ match file_found with ++ | [] -> ++ acc ++ | lst -> ++ `Sources (base_fn, lst) ++ end ++ | `Sources _ -> ++ acc) ++ (`No_sources possible_base_fn) ++ possible_base_fn ++ ++ ++ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match find_module source_file_exists bs modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ (lib.lib_modules @ lib.lib_internal_modules) ++ ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~has_native_dynlink ++ ~ext_lib ++ ~ext_dll ++ ~source_file_exists ++ (cs, bs, lib) = ++ ++ let find_modules lst ext = ++ let find_module modul = ++ match find_module source_file_exists bs modul with ++ | `Sources (base_fn, [fn]) when ext <> "cmi" ++ && Filename.check_suffix fn ".mli" -> ++ None (* No implementation files for pure interface. *) ++ | `Sources (base_fn, _) -> ++ Some [base_fn] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in library %s") ++ modul cs.cs_name; ++ Some lst ++ in ++ List.fold_left ++ (fun acc nm -> ++ match find_module nm with ++ | None -> acc ++ | Some base_fns -> ++ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) ++ [] ++ lst ++ in ++ ++ (* The headers that should be compiled along *) ++ let headers = ++ if lib.lib_pack then ++ [] ++ else ++ find_modules ++ lib.lib_modules ++ "cmi" ++ in ++ ++ (* The .cmx that be compiled along *) ++ let cmxs = ++ let should_be_built = ++ match bs.bs_compiled_object with ++ | Native -> true ++ | Best -> is_native ++ | Byte -> false ++ in ++ if should_be_built then ++ if lib.lib_pack then ++ find_modules ++ [cs.cs_name] ++ "cmx" ++ else ++ find_modules ++ (lib.lib_modules @ lib.lib_internal_modules) ++ "cmx" ++ else ++ [] ++ in ++ ++ let acc_nopath = ++ [] ++ in ++ ++ (* Compute what libraries should be built *) ++ let acc_nopath = ++ (* Add the packed header file if required *) ++ let add_pack_header acc = ++ if lib.lib_pack then ++ [cs.cs_name^".cmi"] :: acc ++ else ++ acc ++ in ++ let byte acc = ++ add_pack_header ([cs.cs_name^".cma"] :: acc) ++ in ++ let native acc = ++ let acc = ++ add_pack_header ++ (if has_native_dynlink then ++ [cs.cs_name^".cmxs"] :: acc ++ else acc) ++ in ++ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc ++ in ++ match bs.bs_compiled_object with ++ | Native -> ++ byte (native acc_nopath) ++ | Best when is_native -> ++ byte (native acc_nopath) ++ | Byte | Best -> ++ byte acc_nopath ++ in ++ ++ (* Add C library to be built *) ++ let acc_nopath = ++ if bs.bs_c_sources <> [] then ++ begin ++ ["lib"^cs.cs_name^"_stubs"^ext_lib] ++ :: ++ ["dll"^cs.cs_name^"_stubs"^ext_dll] ++ :: ++ acc_nopath ++ end ++ else ++ acc_nopath ++ in ++ ++ (* All the files generated *) ++ List.rev_append ++ (List.rev_map ++ (List.rev_map ++ (OASISUnixPath.concat bs.bs_path)) ++ acc_nopath) ++ (headers @ cmxs) ++ ++ ++end ++ ++module OASISObject = struct ++(* # 22 "src/oasis/OASISObject.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = ++ List.fold_left ++ (fun acc modul -> ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, lst) -> ++ (base_fn, lst) :: acc ++ | `No_sources _ -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name; ++ acc) ++ [] ++ obj.obj_modules ++ ++ ++ let generated_unix_files ++ ~ctxt ++ ~is_native ++ ~source_file_exists ++ (cs, bs, obj) = ++ ++ let find_module ext modul = ++ match OASISLibrary.find_module source_file_exists bs modul with ++ | `Sources (base_fn, _) -> [base_fn ^ ext] ++ | `No_sources lst -> ++ OASISMessage.warning ++ ~ctxt ++ (f_ "Cannot find source file matching \ ++ module '%s' in object %s") ++ modul cs.cs_name ; ++ lst ++ in ++ ++ let header, byte, native, c_object, f = ++ match obj.obj_modules with ++ | [ m ] -> (find_module ".cmi" m, ++ find_module ".cmo" m, ++ find_module ".cmx" m, ++ find_module ".o" m, ++ fun x -> x) ++ | _ -> ([cs.cs_name ^ ".cmi"], ++ [cs.cs_name ^ ".cmo"], ++ [cs.cs_name ^ ".cmx"], ++ [cs.cs_name ^ ".o"], ++ OASISUnixPath.concat bs.bs_path) ++ in ++ List.map (List.map f) ( ++ match bs.bs_compiled_object with ++ | Native -> ++ native :: c_object :: byte :: header :: [] ++ | Best when is_native -> ++ native :: c_object :: byte :: header :: [] ++ | Byte | Best -> ++ byte :: header :: []) ++ ++ ++end ++ ++module OASISFindlib = struct ++(* # 22 "src/oasis/OASISFindlib.ml" *) ++ ++ ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open OASISSection ++ ++ ++ type library_name = name ++ type findlib_part_name = name ++ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t ++ ++ ++ exception InternalLibraryNotFound of library_name ++ exception FindlibPackageNotFound of findlib_name ++ ++ ++ type group_t = ++ | Container of findlib_name * group_t list ++ | Package of (findlib_name * ++ common_section * ++ build_section * ++ [`Library of library | `Object of object_] * ++ group_t list) ++ ++ ++ type data = common_section * ++ build_section * ++ [`Library of library | `Object of object_] ++ type tree = ++ | Node of (data option) * (tree MapString.t) ++ | Leaf of data ++ ++ ++ let findlib_mapping pkg = ++ (* Map from library name to either full findlib name or parts + parent. *) ++ let fndlb_parts_of_lib_name = ++ let fndlb_parts cs lib = ++ let name = ++ match lib.lib_findlib_name with ++ | Some nm -> nm ++ | None -> cs.cs_name ++ in ++ let name = ++ String.concat "." (lib.lib_findlib_containers @ [name]) ++ in ++ name ++ in ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, _, lib) -> ++ begin ++ let lib_name = cs.cs_name in ++ let fndlb_parts = fndlb_parts cs lib in ++ if MapString.mem lib_name mp then ++ failwithf ++ (f_ "The library name '%s' is used more than once.") ++ lib_name; ++ match lib.lib_findlib_parent with ++ | Some lib_name_parent -> ++ MapString.add ++ lib_name ++ (`Unsolved (lib_name_parent, fndlb_parts)) ++ mp ++ | None -> ++ MapString.add ++ lib_name ++ (`Solved fndlb_parts) ++ mp ++ end ++ ++ | Object (cs, _, obj) -> ++ begin ++ let obj_name = cs.cs_name in ++ if MapString.mem obj_name mp then ++ failwithf ++ (f_ "The object name '%s' is used more than once.") ++ obj_name; ++ let findlib_full_name = match obj.obj_findlib_fullname with ++ | Some ns -> String.concat "." ns ++ | None -> obj_name ++ in ++ MapString.add ++ obj_name ++ (`Solved findlib_full_name) ++ mp ++ end ++ ++ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ (* Solve the above graph to be only library name to full findlib name. *) ++ let fndlb_name_of_lib_name = ++ let rec solve visited mp lib_name lib_name_child = ++ if SetString.mem lib_name visited then ++ failwithf ++ (f_ "Library '%s' is involved in a cycle \ ++ with regard to findlib naming.") ++ lib_name; ++ let visited = SetString.add lib_name visited in ++ try ++ match MapString.find lib_name mp with ++ | `Solved fndlb_nm -> ++ fndlb_nm, mp ++ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> ++ let pre_fndlb_nm, mp = ++ solve visited mp lib_nm_parent lib_name ++ in ++ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in ++ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp ++ with Not_found -> ++ failwithf ++ (f_ "Library '%s', which is defined as the findlib parent of \ ++ library '%s', doesn't exist.") ++ lib_name lib_name_child ++ in ++ let mp = ++ MapString.fold ++ (fun lib_name status mp -> ++ match status with ++ | `Solved _ -> ++ (* Solved initialy, no need to go further *) ++ mp ++ | `Unsolved _ -> ++ let _, mp = solve SetString.empty mp lib_name "" in ++ mp) ++ fndlb_parts_of_lib_name ++ fndlb_parts_of_lib_name ++ in ++ MapString.map ++ (function ++ | `Solved fndlb_nm -> fndlb_nm ++ | `Unsolved _ -> assert false) ++ mp ++ in ++ ++ (* Convert an internal library name to a findlib name. *) ++ let findlib_name_of_library_name lib_nm = ++ try ++ MapString.find lib_nm fndlb_name_of_lib_name ++ with Not_found -> ++ raise (InternalLibraryNotFound lib_nm) ++ in ++ ++ (* Add a library to the tree. ++ *) ++ let add sct mp = ++ let fndlb_fullname = ++ let cs, _, _ = sct in ++ let lib_name = cs.cs_name in ++ findlib_name_of_library_name lib_name ++ in ++ let rec add_children nm_lst (children: tree MapString.t) = ++ match nm_lst with ++ | (hd :: tl) -> ++ begin ++ let node = ++ try ++ add_node tl (MapString.find hd children) ++ with Not_found -> ++ (* New node *) ++ new_node tl ++ in ++ MapString.add hd node children ++ end ++ | [] -> ++ (* Should not have a nameless library. *) ++ assert false ++ and add_node tl node = ++ if tl = [] then ++ begin ++ match node with ++ | Node (None, children) -> ++ Node (Some sct, children) ++ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> ++ (* TODO: allow to merge Package, i.e. ++ * archive(byte) = "foo.cma foo_init.cmo" ++ *) ++ let cs, _, _ = sct in ++ failwithf ++ (f_ "Library '%s' and '%s' have the same findlib name '%s'") ++ cs.cs_name cs'.cs_name fndlb_fullname ++ end ++ else ++ begin ++ match node with ++ | Leaf data -> ++ Node (Some data, add_children tl MapString.empty) ++ | Node (data_opt, children) -> ++ Node (data_opt, add_children tl children) ++ end ++ and new_node = ++ function ++ | [] -> ++ Leaf sct ++ | hd :: tl -> ++ Node (None, MapString.add hd (new_node tl) MapString.empty) ++ in ++ add_children (OASISString.nsplit fndlb_fullname '.') mp ++ in ++ ++ let rec group_of_tree mp = ++ MapString.fold ++ (fun nm node acc -> ++ let cur = ++ match node with ++ | Node (Some (cs, bs, lib), children) -> ++ Package (nm, cs, bs, lib, group_of_tree children) ++ | Node (None, children) -> ++ Container (nm, group_of_tree children) ++ | Leaf (cs, bs, lib) -> ++ Package (nm, cs, bs, lib, []) ++ in ++ cur :: acc) ++ mp [] ++ in ++ ++ let group_mp = ++ List.fold_left ++ (fun mp -> ++ function ++ | Library (cs, bs, lib) -> ++ add (cs, bs, `Library lib) mp ++ | Object (cs, bs, obj) -> ++ add (cs, bs, `Object obj) mp ++ | _ -> ++ mp) ++ MapString.empty ++ pkg.sections ++ in ++ ++ let groups = ++ group_of_tree group_mp ++ in ++ ++ let library_name_of_findlib_name = ++ Lazy.lazy_from_fun ++ (fun () -> ++ (* Revert findlib_name_of_library_name. *) ++ MapString.fold ++ (fun k v mp -> MapString.add v k mp) ++ fndlb_name_of_lib_name ++ MapString.empty) ++ in ++ let library_name_of_findlib_name fndlb_nm = ++ try ++ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) ++ with Not_found -> ++ raise (FindlibPackageNotFound fndlb_nm) ++ in ++ ++ groups, ++ findlib_name_of_library_name, ++ library_name_of_findlib_name ++ ++ ++ let findlib_of_group = ++ function ++ | Container (fndlb_nm, _) ++ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm ++ ++ ++ let root_of_group grp = ++ let rec root_lib_aux = ++ (* We do a DFS in the group. *) ++ function ++ | Container (_, children) -> ++ List.fold_left ++ (fun res grp -> ++ if res = None then ++ root_lib_aux grp ++ else ++ res) ++ None ++ children ++ | Package (_, cs, bs, lib, _) -> ++ Some (cs, bs, lib) ++ in ++ match root_lib_aux grp with ++ | Some res -> ++ res ++ | None -> ++ failwithf ++ (f_ "Unable to determine root library of findlib library '%s'") ++ (findlib_of_group grp) ++ ++ ++end ++ ++module OASISFlag = struct ++(* # 22 "src/oasis/OASISFlag.ml" *) ++ ++ ++end ++ ++module OASISPackage = struct ++(* # 22 "src/oasis/OASISPackage.ml" *) ++ ++ ++end ++ ++module OASISSourceRepository = struct ++(* # 22 "src/oasis/OASISSourceRepository.ml" *) ++ ++ ++end ++ ++module OASISTest = struct ++(* # 22 "src/oasis/OASISTest.ml" *) ++ ++ ++end ++ ++module OASISDocument = struct ++(* # 22 "src/oasis/OASISDocument.ml" *) ++ ++ ++end ++ ++module OASISExec = struct ++(* # 22 "src/oasis/OASISExec.ml" *) ++ ++ ++ open OASISGettext ++ open OASISUtils ++ open OASISMessage ++ ++ ++ (* TODO: I don't like this quote, it is there because $(rm) foo expands to ++ * 'rm -f' foo... ++ *) ++ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = ++ let cmd = ++ if quote then ++ if Sys.os_type = "Win32" then ++ if String.contains cmd ' ' then ++ (* Double the 1st double quote... win32... sigh *) ++ "\""^(Filename.quote cmd) ++ else ++ cmd ++ else ++ Filename.quote cmd ++ else ++ cmd ++ in ++ let cmdline = ++ String.concat " " (cmd :: args) ++ in ++ info ~ctxt (f_ "Running command '%s'") cmdline; ++ match f_exit_code, Sys.command cmdline with ++ | None, 0 -> () ++ | None, i -> ++ failwithf ++ (f_ "Command '%s' terminated with error code %d") ++ cmdline i ++ | Some f, i -> ++ f i ++ ++ ++ let run_read_output ~ctxt ?f_exit_code cmd args = ++ let fn = ++ Filename.temp_file "oasis-" ".txt" ++ in ++ try ++ begin ++ let () = ++ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) ++ in ++ let chn = ++ open_in fn ++ in ++ let routput = ++ ref [] ++ in ++ begin ++ try ++ while true do ++ routput := (input_line chn) :: !routput ++ done ++ with End_of_file -> ++ () ++ end; ++ close_in chn; ++ Sys.remove fn; ++ List.rev !routput ++ end ++ with e -> ++ (try Sys.remove fn with _ -> ()); ++ raise e ++ ++ ++ let run_read_one_line ~ctxt ?f_exit_code cmd args = ++ match run_read_output ~ctxt ?f_exit_code cmd args with ++ | [fst] -> ++ fst ++ | lst -> ++ failwithf ++ (f_ "Command return unexpected output %S") ++ (String.concat "\n" lst) ++end ++ ++module OASISFileUtil = struct ++(* # 22 "src/oasis/OASISFileUtil.ml" *) ++ ++ ++ open OASISGettext ++ ++ ++ let file_exists_case fn = ++ let dirname = Filename.dirname fn in ++ let basename = Filename.basename fn in ++ if Sys.file_exists dirname then ++ if basename = Filename.current_dir_name then ++ true ++ else ++ List.mem ++ basename ++ (Array.to_list (Sys.readdir dirname)) ++ else ++ false ++ ++ ++ let find_file ?(case_sensitive=true) paths exts = ++ ++ (* Cardinal product of two list *) ++ let ( * ) lst1 lst2 = ++ List.flatten ++ (List.map ++ (fun a -> ++ List.map ++ (fun b -> a, b) ++ lst2) ++ lst1) ++ in ++ ++ let rec combined_paths lst = ++ match lst with ++ | p1 :: p2 :: tl -> ++ let acc = ++ (List.map ++ (fun (a, b) -> Filename.concat a b) ++ (p1 * p2)) ++ in ++ combined_paths (acc :: tl) ++ | [e] -> ++ e ++ | [] -> ++ [] ++ in ++ ++ let alternatives = ++ List.map ++ (fun (p, e) -> ++ if String.length e > 0 && e.[0] <> '.' then ++ p ^ "." ^ e ++ else ++ p ^ e) ++ ((combined_paths paths) * exts) ++ in ++ List.find (fun file -> ++ (if case_sensitive then ++ file_exists_case file ++ else ++ Sys.file_exists file) ++ && not (Sys.is_directory file) ++ ) alternatives ++ ++ ++ let which ~ctxt prg = ++ let path_sep = ++ match Sys.os_type with ++ | "Win32" -> ++ ';' ++ | _ -> ++ ':' ++ in ++ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in ++ let exec_ext = ++ match Sys.os_type with ++ | "Win32" -> ++ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) ++ | _ -> ++ [""] ++ in ++ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext ++ ++ ++ (**/**) ++ let rec fix_dir dn = ++ (* Windows hack because Sys.file_exists "src\\" = false when ++ * Sys.file_exists "src" = true ++ *) ++ let ln = ++ String.length dn ++ in ++ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then ++ fix_dir (String.sub dn 0 (ln - 1)) ++ else ++ dn ++ ++ ++ let q = Filename.quote ++ (**/**) ++ ++ ++ let cp ~ctxt ?(recurse=false) src tgt = ++ if recurse then ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt ++ "xcopy" [q src; q tgt; "/E"] ++ | _ -> ++ OASISExec.run ~ctxt ++ "cp" ["-r"; q src; q tgt] ++ else ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "copy" ++ | _ -> "cp") ++ [q src; q tgt] ++ ++ ++ let mkdir ~ctxt tgt = ++ OASISExec.run ~ctxt ++ (match Sys.os_type with ++ | "Win32" -> "md" ++ | _ -> "mkdir") ++ [q tgt] ++ ++ ++ let rec mkdir_parent ~ctxt f tgt = ++ let tgt = ++ fix_dir tgt ++ in ++ if Sys.file_exists tgt then ++ begin ++ if not (Sys.is_directory tgt) then ++ OASISUtils.failwithf ++ (f_ "Cannot create directory '%s', a file of the same name already \ ++ exists") ++ tgt ++ end ++ else ++ begin ++ mkdir_parent ~ctxt f (Filename.dirname tgt); ++ if not (Sys.file_exists tgt) then ++ begin ++ f tgt; ++ mkdir ~ctxt tgt ++ end ++ end ++ ++ ++ let rmdir ~ctxt tgt = ++ if Sys.readdir tgt = [||] then begin ++ match Sys.os_type with ++ | "Win32" -> ++ OASISExec.run ~ctxt "rd" [q tgt] ++ | _ -> ++ OASISExec.run ~ctxt "rm" ["-r"; q tgt] ++ end else begin ++ OASISMessage.error ~ctxt ++ (f_ "Cannot remove directory '%s': not empty.") ++ tgt ++ end ++ ++ ++ let glob ~ctxt fn = ++ let basename = ++ Filename.basename fn ++ in ++ if String.length basename >= 2 && ++ basename.[0] = '*' && ++ basename.[1] = '.' then ++ begin ++ let ext_len = ++ (String.length basename) - 2 ++ in ++ let ext = ++ String.sub basename 2 ext_len ++ in ++ let dirname = ++ Filename.dirname fn ++ in ++ Array.fold_left ++ (fun acc fn -> ++ try ++ let fn_ext = ++ String.sub ++ fn ++ ((String.length fn) - ext_len) ++ ext_len ++ in ++ if fn_ext = ext then ++ (Filename.concat dirname fn) :: acc ++ else ++ acc ++ with Invalid_argument _ -> ++ acc) ++ [] ++ (Sys.readdir dirname) ++ end ++ else ++ begin ++ if file_exists_case fn then ++ [fn] ++ else ++ [] ++ end ++end ++ ++ ++# 2878 "setup.ml" ++module BaseEnvLight = struct ++(* # 22 "src/base/BaseEnvLight.ml" *) ++ ++ ++ module MapString = Map.Make(String) ++ ++ ++ type t = string MapString.t ++ ++ ++ let default_filename = ++ Filename.concat ++ (Sys.getcwd ()) ++ "setup.data" ++ ++ ++ let load ?(allow_empty=false) ?(filename=default_filename) () = ++ if Sys.file_exists filename then ++ begin ++ let chn = ++ open_in_bin filename ++ in ++ let st = ++ Stream.of_channel chn ++ in ++ let line = ++ ref 1 ++ in ++ let st_line = ++ Stream.from ++ (fun _ -> ++ try ++ match Stream.next st with ++ | '\n' -> incr line; Some '\n' ++ | c -> Some c ++ with Stream.Failure -> None) ++ in ++ let lexer = ++ Genlex.make_lexer ["="] st_line ++ in ++ let rec read_file mp = ++ match Stream.npeek 3 lexer with ++ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> ++ Stream.junk lexer; ++ Stream.junk lexer; ++ Stream.junk lexer; ++ read_file (MapString.add nm value mp) ++ | [] -> ++ mp ++ | _ -> ++ failwith ++ (Printf.sprintf ++ "Malformed data file '%s' line %d" ++ filename !line) ++ in ++ let mp = ++ read_file MapString.empty ++ in ++ close_in chn; ++ mp ++ end ++ else if allow_empty then ++ begin ++ MapString.empty ++ end ++ else ++ begin ++ failwith ++ (Printf.sprintf ++ "Unable to load environment, the file '%s' doesn't exist." ++ filename) ++ end ++ ++ ++ let rec var_expand str env = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ var_expand (MapString.find var env) env ++ with Not_found -> ++ failwith ++ (Printf.sprintf ++ "No variable %s defined when trying to expand %S." ++ var ++ str)) ++ str; ++ Buffer.contents buff ++ ++ ++ let var_get name env = ++ var_expand (MapString.find name env) env ++ ++ ++ let var_choose lst env = ++ OASISExpr.choose ++ (fun nm -> var_get nm env) ++ lst ++end ++ ++ ++# 2983 "setup.ml" ++module BaseContext = struct ++(* # 22 "src/base/BaseContext.ml" *) ++ ++ (* TODO: get rid of this module. *) ++ open OASISContext ++ ++ ++ let args () = fst (fspecs ()) ++ ++ ++ let default = default ++ ++end ++ ++module BaseMessage = struct ++(* # 22 "src/base/BaseMessage.ml" *) ++ ++ ++ (** Message to user, overrid for Base ++ @author Sylvain Le Gall ++ *) ++ open OASISMessage ++ open BaseContext ++ ++ ++ let debug fmt = debug ~ctxt:!default fmt ++ ++ ++ let info fmt = info ~ctxt:!default fmt ++ ++ ++ let warning fmt = warning ~ctxt:!default fmt ++ ++ ++ let error fmt = error ~ctxt:!default fmt ++ ++end ++ ++module BaseEnv = struct ++(* # 22 "src/base/BaseEnv.ml" *) ++ ++ open OASISGettext ++ open OASISUtils ++ open PropList ++ ++ ++ module MapString = BaseEnvLight.MapString ++ ++ ++ type origin_t = ++ | ODefault ++ | OGetEnv ++ | OFileLoad ++ | OCommandLine ++ ++ ++ type cli_handle_t = ++ | CLINone ++ | CLIAuto ++ | CLIWith ++ | CLIEnable ++ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list ++ ++ ++ type definition_t = ++ { ++ hide: bool; ++ dump: bool; ++ cli: cli_handle_t; ++ arg_help: string option; ++ group: string option; ++ } ++ ++ ++ let schema = ++ Schema.create "environment" ++ ++ ++ (* Environment data *) ++ let env = ++ Data.create () ++ ++ ++ (* Environment data from file *) ++ let env_from_file = ++ ref MapString.empty ++ ++ ++ (* Lexer for var *) ++ let var_lxr = ++ Genlex.make_lexer [] ++ ++ ++ let rec var_expand str = ++ let buff = ++ Buffer.create ((String.length str) * 2) ++ in ++ Buffer.add_substitute ++ buff ++ (fun var -> ++ try ++ (* TODO: this is a quick hack to allow calling Test.Command ++ * without defining executable name really. I.e. if there is ++ * an exec Executable toto, then $(toto) should be replace ++ * by its real name. It is however useful to have this function ++ * for other variable that depend on the host and should be ++ * written better than that. ++ *) ++ let st = ++ var_lxr (Stream.of_string var) ++ in ++ match Stream.npeek 3 st with ++ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> ++ OASISHostPath.of_unix (var_get nm) ++ | [Genlex.Ident "utoh"; Genlex.String s] -> ++ OASISHostPath.of_unix s ++ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> ++ String.escaped (var_get nm) ++ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> ++ String.escaped s ++ | [Genlex.Ident nm] -> ++ var_get nm ++ | _ -> ++ failwithf ++ (f_ "Unknown expression '%s' in variable expansion of %s.") ++ var ++ str ++ with ++ | Unknown_field (_, _) -> ++ failwithf ++ (f_ "No variable %s defined when trying to expand %S.") ++ var ++ str ++ | Stream.Error e -> ++ failwithf ++ (f_ "Syntax error when parsing '%s' when trying to \ ++ expand %S: %s") ++ var ++ str ++ e) ++ str; ++ Buffer.contents buff ++ ++ ++ and var_get name = ++ let vl = ++ try ++ Schema.get schema env name ++ with Unknown_field _ as e -> ++ begin ++ try ++ MapString.find name !env_from_file ++ with Not_found -> ++ raise e ++ end ++ in ++ var_expand vl ++ ++ ++ let var_choose ?printer ?name lst = ++ OASISExpr.choose ++ ?printer ++ ?name ++ var_get ++ lst ++ ++ ++ let var_protect vl = ++ let buff = ++ Buffer.create (String.length vl) ++ in ++ String.iter ++ (function ++ | '$' -> Buffer.add_string buff "\\$" ++ | c -> Buffer.add_char buff c) ++ vl; ++ Buffer.contents buff ++ ++ ++ let var_define ++ ?(hide=false) ++ ?(dump=true) ++ ?short_desc ++ ?(cli=CLINone) ++ ?arg_help ++ ?group ++ name (* TODO: type constraint on the fact that name must be a valid OCaml ++ id *) ++ dflt = ++ ++ let default = ++ [ ++ OFileLoad, (fun () -> MapString.find name !env_from_file); ++ ODefault, dflt; ++ OGetEnv, (fun () -> Sys.getenv name); ++ ] ++ in ++ ++ let extra = ++ { ++ hide = hide; ++ dump = dump; ++ cli = cli; ++ arg_help = arg_help; ++ group = group; ++ } ++ in ++ ++ (* Try to find a value that can be defined ++ *) ++ let var_get_low lst = ++ let errors, res = ++ List.fold_left ++ (fun (errors, res) (o, v) -> ++ if res = None then ++ begin ++ try ++ errors, Some (v ()) ++ with ++ | Not_found -> ++ errors, res ++ | Failure rsn -> ++ (rsn :: errors), res ++ | e -> ++ (Printexc.to_string e) :: errors, res ++ end ++ else ++ errors, res) ++ ([], None) ++ (List.sort ++ (fun (o1, _) (o2, _) -> ++ Pervasives.compare o2 o1) ++ lst) ++ in ++ match res, errors with ++ | Some v, _ -> ++ v ++ | None, [] -> ++ raise (Not_set (name, None)) ++ | None, lst -> ++ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) ++ in ++ ++ let help = ++ match short_desc with ++ | Some fs -> Some fs ++ | None -> None ++ in ++ ++ let var_get_lst = ++ FieldRO.create ++ ~schema ++ ~name ++ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) ++ ~print:var_get_low ++ ~default ++ ~update:(fun ?context x old_x -> x @ old_x) ++ ?help ++ extra ++ in ++ ++ fun () -> ++ var_expand (var_get_low (var_get_lst env)) ++ ++ ++ let var_redefine ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt = ++ if Schema.mem schema name then ++ begin ++ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) ++ Schema.set schema env ~context:ODefault name (dflt ()); ++ fun () -> var_get name ++ end ++ else ++ begin ++ var_define ++ ?hide ++ ?dump ++ ?short_desc ++ ?cli ++ ?arg_help ++ ?group ++ name ++ dflt ++ end ++ ++ ++ let var_ignore (e: unit -> string) = () ++ ++ ++ let print_hidden = ++ var_define ++ ~hide:true ++ ~dump:false ++ ~cli:CLIAuto ++ ~arg_help:"Print even non-printable variable. (debug)" ++ "print_hidden" ++ (fun () -> "false") ++ ++ ++ let var_all () = ++ List.rev ++ (Schema.fold ++ (fun acc nm def _ -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ nm :: acc ++ else ++ acc) ++ [] ++ schema) ++ ++ ++ let default_filename = ++ BaseEnvLight.default_filename ++ ++ ++ let load ?allow_empty ?filename () = ++ env_from_file := BaseEnvLight.load ?allow_empty ?filename () ++ ++ ++ let unload () = ++ env_from_file := MapString.empty; ++ Data.clear env ++ ++ ++ let dump ?(filename=default_filename) () = ++ let chn = ++ open_out_bin filename ++ in ++ let output nm value = ++ Printf.fprintf chn "%s=%S\n" nm value ++ in ++ let mp_todo = ++ (* Dump data from schema *) ++ Schema.fold ++ (fun mp_todo nm def _ -> ++ if def.dump then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ output nm value ++ with Not_set _ -> ++ () ++ end; ++ MapString.remove nm mp_todo) ++ !env_from_file ++ schema ++ in ++ (* Dump data defined outside of schema *) ++ MapString.iter output mp_todo; ++ ++ (* End of the dump *) ++ close_out chn ++ ++ ++ let print () = ++ let printable_vars = ++ Schema.fold ++ (fun acc nm def short_descr_opt -> ++ if not def.hide || bool_of_string (print_hidden ()) then ++ begin ++ try ++ let value = ++ Schema.get ++ schema ++ env ++ nm ++ in ++ let txt = ++ match short_descr_opt with ++ | Some s -> s () ++ | None -> nm ++ in ++ (txt, value) :: acc ++ with Not_set _ -> ++ acc ++ end ++ else ++ acc) ++ [] ++ schema ++ in ++ let max_length = ++ List.fold_left max 0 ++ (List.rev_map String.length ++ (List.rev_map fst printable_vars)) ++ in ++ let dot_pad str = ++ String.make ((max_length - (String.length str)) + 3) '.' ++ in ++ ++ Printf.printf "\nConfiguration: \n"; ++ List.iter ++ (fun (name, value) -> ++ Printf.printf "%s: %s %s\n" name (dot_pad name) value) ++ (List.rev printable_vars); ++ Printf.printf "\n%!" ++ ++ ++ let args () = ++ let arg_concat = ++ OASISUtils.varname_concat ~hyphen:'-' ++ in ++ [ ++ "--override", ++ Arg.Tuple ++ ( ++ let rvr = ref "" ++ in ++ let rvl = ref "" ++ in ++ [ ++ Arg.Set_string rvr; ++ Arg.Set_string rvl; ++ Arg.Unit ++ (fun () -> ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ !rvr ++ !rvl) ++ ] ++ ), ++ "var+val Override any configuration variable."; ++ ++ ] ++ @ ++ List.flatten ++ (Schema.fold ++ (fun acc name def short_descr_opt -> ++ let var_set s = ++ Schema.set ++ schema ++ env ++ ~context:OCommandLine ++ name ++ s ++ in ++ ++ let arg_name = ++ OASISUtils.varname_of_string ~hyphen:'-' name ++ in ++ ++ let hlp = ++ match short_descr_opt with ++ | Some txt -> txt () ++ | None -> "" ++ in ++ ++ let arg_hlp = ++ match def.arg_help with ++ | Some s -> s ++ | None -> "str" ++ in ++ ++ let default_value = ++ try ++ Printf.sprintf ++ (f_ " [%s]") ++ (Schema.get ++ schema ++ env ++ name) ++ with Not_set _ -> ++ "" ++ in ++ ++ let args = ++ match def.cli with ++ | CLINone -> ++ [] ++ | CLIAuto -> ++ [ ++ arg_concat "--" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIWith -> ++ [ ++ arg_concat "--with-" arg_name, ++ Arg.String var_set, ++ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value ++ ] ++ | CLIEnable -> ++ let dflt = ++ if default_value = " [true]" then ++ s_ " [default: enabled]" ++ else ++ s_ " [default: disabled]" ++ in ++ [ ++ arg_concat "--enable-" arg_name, ++ Arg.Unit (fun () -> var_set "true"), ++ Printf.sprintf (f_ " %s%s") hlp dflt; ++ ++ arg_concat "--disable-" arg_name, ++ Arg.Unit (fun () -> var_set "false"), ++ Printf.sprintf (f_ " %s%s") hlp dflt ++ ] ++ | CLIUser lst -> ++ lst ++ in ++ args :: acc) ++ [] ++ schema) ++end ++ ++module BaseArgExt = struct ++(* # 22 "src/base/BaseArgExt.ml" *) ++ ++ ++ open OASISUtils ++ open OASISGettext ++ ++ ++ let parse argv args = ++ (* Simulate command line for Arg *) ++ let current = ++ ref 0 ++ in ++ ++ try ++ Arg.parse_argv ++ ~current:current ++ (Array.concat [[|"none"|]; argv]) ++ (Arg.align args) ++ (failwithf (f_ "Don't know what to do with arguments: '%s'")) ++ (s_ "configure options:") ++ with ++ | Arg.Help txt -> ++ print_endline txt; ++ exit 0 ++ | Arg.Bad txt -> ++ prerr_endline txt; ++ exit 1 ++end ++ ++module BaseCheck = struct ++(* # 22 "src/base/BaseCheck.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISUtils ++ open OASISGettext ++ ++ ++ let prog_best prg prg_lst = ++ var_redefine ++ prg ++ (fun () -> ++ let alternate = ++ List.fold_left ++ (fun res e -> ++ match res with ++ | Some _ -> ++ res ++ | None -> ++ try ++ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) ++ with Not_found -> ++ None) ++ None ++ prg_lst ++ in ++ match alternate with ++ | Some prg -> prg ++ | None -> raise Not_found) ++ ++ ++ let prog prg = ++ prog_best prg [prg] ++ ++ ++ let prog_opt prg = ++ prog_best prg [prg^".opt"; prg] ++ ++ ++ let ocamlfind = ++ prog "ocamlfind" ++ ++ ++ let version ++ var_prefix ++ cmp ++ fversion ++ () = ++ (* Really compare version provided *) ++ let var = ++ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) ++ in ++ var_redefine ++ ~hide:true ++ var ++ (fun () -> ++ let version_str = ++ match fversion () with ++ | "[Distributed with OCaml]" -> ++ begin ++ try ++ (var_get "ocaml_version") ++ with Not_found -> ++ warning ++ (f_ "Variable ocaml_version not defined, fallback \ ++ to default"); ++ Sys.ocaml_version ++ end ++ | res -> ++ res ++ in ++ let version = ++ OASISVersion.version_of_string version_str ++ in ++ if OASISVersion.comparator_apply version cmp then ++ version_str ++ else ++ failwithf ++ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") ++ var_prefix ++ (OASISVersion.string_of_comparator cmp) ++ version_str) ++ () ++ ++ ++ let package_version pkg = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%v"; pkg] ++ ++ ++ let package ?version_comparator pkg () = ++ let var = ++ OASISUtils.varname_concat ++ "pkg_" ++ (OASISUtils.varname_of_string pkg) ++ in ++ let findlib_dir pkg = ++ let dir = ++ OASISExec.run_read_one_line ~ctxt:!BaseContext.default ++ (ocamlfind ()) ++ ["query"; "-format"; "%d"; pkg] ++ in ++ if Sys.file_exists dir && Sys.is_directory dir then ++ dir ++ else ++ failwithf ++ (f_ "When looking for findlib package %s, \ ++ directory %s return doesn't exist") ++ pkg dir ++ in ++ let vl = ++ var_redefine ++ var ++ (fun () -> findlib_dir pkg) ++ () ++ in ++ ( ++ match version_comparator with ++ | Some ver_cmp -> ++ ignore ++ (version ++ var ++ ver_cmp ++ (fun _ -> package_version pkg) ++ ()) ++ | None -> ++ () ++ ); ++ vl ++end ++ ++module BaseOCamlcConfig = struct ++(* # 22 "src/base/BaseOCamlcConfig.ml" *) ++ ++ ++ open BaseEnv ++ open OASISUtils ++ open OASISGettext ++ ++ ++ module SMap = Map.Make(String) ++ ++ ++ let ocamlc = ++ BaseCheck.prog_opt "ocamlc" ++ ++ ++ let ocamlc_config_map = ++ (* Map name to value for ocamlc -config output ++ (name ^": "^value) ++ *) ++ let rec split_field mp lst = ++ match lst with ++ | line :: tl -> ++ let mp = ++ try ++ let pos_semicolon = ++ String.index line ':' ++ in ++ if pos_semicolon > 1 then ++ ( ++ let name = ++ String.sub line 0 pos_semicolon ++ in ++ let linelen = ++ String.length line ++ in ++ let value = ++ if linelen > pos_semicolon + 2 then ++ String.sub ++ line ++ (pos_semicolon + 2) ++ (linelen - pos_semicolon - 2) ++ else ++ "" ++ in ++ SMap.add name value mp ++ ) ++ else ++ ( ++ mp ++ ) ++ with Not_found -> ++ ( ++ mp ++ ) ++ in ++ split_field mp tl ++ | [] -> ++ mp ++ in ++ ++ let cache = ++ lazy ++ (var_protect ++ (Marshal.to_string ++ (split_field ++ SMap.empty ++ (OASISExec.run_read_output ++ ~ctxt:!BaseContext.default ++ (ocamlc ()) ["-config"])) ++ [])) ++ in ++ var_redefine ++ "ocamlc_config_map" ++ ~hide:true ++ ~dump:false ++ (fun () -> ++ (* TODO: update if ocamlc change !!! *) ++ Lazy.force cache) ++ ++ ++ let var_define nm = ++ (* Extract data from ocamlc -config *) ++ let avlbl_config_get () = ++ Marshal.from_string ++ (ocamlc_config_map ()) ++ 0 ++ in ++ let chop_version_suffix s = ++ try ++ String.sub s 0 (String.index s '+') ++ with _ -> ++ s ++ in ++ ++ let nm_config, value_config = ++ match nm with ++ | "ocaml_version" -> ++ "version", chop_version_suffix ++ | _ -> nm, (fun x -> x) ++ in ++ var_redefine ++ nm ++ (fun () -> ++ try ++ let map = ++ avlbl_config_get () ++ in ++ let value = ++ SMap.find nm_config map ++ in ++ value_config value ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find field '%s' in '%s -config' output") ++ nm ++ (ocamlc ())) ++ ++end ++ ++module BaseStandardVar = struct ++(* # 22 "src/base/BaseStandardVar.ml" *) ++ ++ ++ open OASISGettext ++ open OASISTypes ++ open OASISExpr ++ open BaseCheck ++ open BaseEnv ++ ++ ++ let ocamlfind = BaseCheck.ocamlfind ++ let ocamlc = BaseOCamlcConfig.ocamlc ++ let ocamlopt = prog_opt "ocamlopt" ++ let ocamlbuild = prog "ocamlbuild" ++ ++ ++ (**/**) ++ let rpkg = ++ ref None ++ ++ ++ let pkg_get () = ++ match !rpkg with ++ | Some pkg -> pkg ++ | None -> failwith (s_ "OASIS Package is not set") ++ ++ ++ let var_cond = ref [] ++ ++ ++ let var_define_cond ~since_version f dflt = ++ let holder = ref (fun () -> dflt) in ++ let since_version = ++ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) ++ in ++ var_cond := ++ (fun ver -> ++ if OASISVersion.comparator_apply ver since_version then ++ holder := f ()) :: !var_cond; ++ fun () -> !holder () ++ ++ ++ (**/**) ++ ++ ++ let pkg_name = ++ var_define ++ ~short_desc:(fun () -> s_ "Package name") ++ "pkg_name" ++ (fun () -> (pkg_get ()).name) ++ ++ ++ let pkg_version = ++ var_define ++ ~short_desc:(fun () -> s_ "Package version") ++ "pkg_version" ++ (fun () -> ++ (OASISVersion.string_of_version (pkg_get ()).version)) ++ ++ ++ let c = BaseOCamlcConfig.var_define ++ ++ ++ let os_type = c "os_type" ++ let system = c "system" ++ let architecture = c "architecture" ++ let ccomp_type = c "ccomp_type" ++ let ocaml_version = c "ocaml_version" ++ ++ ++ (* TODO: Check standard variable presence at runtime *) ++ ++ ++ let standard_library_default = c "standard_library_default" ++ let standard_library = c "standard_library" ++ let standard_runtime = c "standard_runtime" ++ let bytecomp_c_compiler = c "bytecomp_c_compiler" ++ let native_c_compiler = c "native_c_compiler" ++ let model = c "model" ++ let ext_obj = c "ext_obj" ++ let ext_asm = c "ext_asm" ++ let ext_lib = c "ext_lib" ++ let ext_dll = c "ext_dll" ++ let default_executable_name = c "default_executable_name" ++ let systhread_supported = c "systhread_supported" ++ ++ ++ let flexlink = ++ BaseCheck.prog "flexlink" ++ ++ ++ let flexdll_version = ++ var_define ++ ~short_desc:(fun () -> "FlexDLL version (Win32)") ++ "flexdll_version" ++ (fun () -> ++ let lst = ++ OASISExec.run_read_output ~ctxt:!BaseContext.default ++ (flexlink ()) ["-help"] ++ in ++ match lst with ++ | line :: _ -> ++ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) ++ | [] -> ++ raise Not_found) ++ ++ ++ (**/**) ++ let p name hlp dflt = ++ var_define ++ ~short_desc:hlp ++ ~cli:CLIAuto ++ ~arg_help:"dir" ++ name ++ dflt ++ ++ ++ let (/) a b = ++ if os_type () = Sys.os_type then ++ Filename.concat a b ++ else if os_type () = "Unix" then ++ OASISUnixPath.concat a b ++ else ++ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") ++ (os_type ()) ++ (**/**) ++ ++ ++ let prefix = ++ p "prefix" ++ (fun () -> s_ "Install architecture-independent files dir") ++ (fun () -> ++ match os_type () with ++ | "Win32" -> ++ let program_files = ++ Sys.getenv "PROGRAMFILES" ++ in ++ program_files/(pkg_name ()) ++ | _ -> ++ "/usr/local") ++ ++ ++ let exec_prefix = ++ p "exec_prefix" ++ (fun () -> s_ "Install architecture-dependent files in dir") ++ (fun () -> "$prefix") ++ ++ ++ let bindir = ++ p "bindir" ++ (fun () -> s_ "User executables") ++ (fun () -> "$exec_prefix"/"bin") ++ ++ ++ let sbindir = ++ p "sbindir" ++ (fun () -> s_ "System admin executables") ++ (fun () -> "$exec_prefix"/"sbin") ++ ++ ++ let libexecdir = ++ p "libexecdir" ++ (fun () -> s_ "Program executables") ++ (fun () -> "$exec_prefix"/"libexec") ++ ++ ++ let sysconfdir = ++ p "sysconfdir" ++ (fun () -> s_ "Read-only single-machine data") ++ (fun () -> "$prefix"/"etc") ++ ++ ++ let sharedstatedir = ++ p "sharedstatedir" ++ (fun () -> s_ "Modifiable architecture-independent data") ++ (fun () -> "$prefix"/"com") ++ ++ ++ let localstatedir = ++ p "localstatedir" ++ (fun () -> s_ "Modifiable single-machine data") ++ (fun () -> "$prefix"/"var") ++ ++ ++ let libdir = ++ p "libdir" ++ (fun () -> s_ "Object code libraries") ++ (fun () -> "$exec_prefix"/"lib") ++ ++ ++ let datarootdir = ++ p "datarootdir" ++ (fun () -> s_ "Read-only arch-independent data root") ++ (fun () -> "$prefix"/"share") ++ ++ ++ let datadir = ++ p "datadir" ++ (fun () -> s_ "Read-only architecture-independent data") ++ (fun () -> "$datarootdir") ++ ++ ++ let infodir = ++ p "infodir" ++ (fun () -> s_ "Info documentation") ++ (fun () -> "$datarootdir"/"info") ++ ++ ++ let localedir = ++ p "localedir" ++ (fun () -> s_ "Locale-dependent data") ++ (fun () -> "$datarootdir"/"locale") ++ ++ ++ let mandir = ++ p "mandir" ++ (fun () -> s_ "Man documentation") ++ (fun () -> "$datarootdir"/"man") ++ ++ ++ let docdir = ++ p "docdir" ++ (fun () -> s_ "Documentation root") ++ (fun () -> "$datarootdir"/"doc"/"$pkg_name") ++ ++ ++ let htmldir = ++ p "htmldir" ++ (fun () -> s_ "HTML documentation") ++ (fun () -> "$docdir") ++ ++ ++ let dvidir = ++ p "dvidir" ++ (fun () -> s_ "DVI documentation") ++ (fun () -> "$docdir") ++ ++ ++ let pdfdir = ++ p "pdfdir" ++ (fun () -> s_ "PDF documentation") ++ (fun () -> "$docdir") ++ ++ ++ let psdir = ++ p "psdir" ++ (fun () -> s_ "PS documentation") ++ (fun () -> "$docdir") ++ ++ ++ let destdir = ++ p "destdir" ++ (fun () -> s_ "Prepend a path when installing package") ++ (fun () -> ++ raise ++ (PropList.Not_set ++ ("destdir", ++ Some (s_ "undefined by construct")))) ++ ++ ++ let findlib_version = ++ var_define ++ "findlib_version" ++ (fun () -> ++ BaseCheck.package_version "findlib") ++ ++ ++ let is_native = ++ var_define ++ "is_native" ++ (fun () -> ++ try ++ let _s: string = ++ ocamlopt () ++ in ++ "true" ++ with PropList.Not_set _ -> ++ let _s: string = ++ ocamlc () ++ in ++ "false") ++ ++ ++ let ext_program = ++ var_define ++ "suffix_program" ++ (fun () -> ++ match os_type () with ++ | "Win32" | "Cygwin" -> ".exe" ++ | _ -> "") ++ ++ ++ let rm = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a file.") ++ "rm" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "del" ++ | _ -> "rm -f") ++ ++ ++ let rmdir = ++ var_define ++ ~short_desc:(fun () -> s_ "Remove a directory.") ++ "rmdir" ++ (fun () -> ++ match os_type () with ++ | "Win32" -> "rd" ++ | _ -> "rm -rf") ++ ++ ++ let debug = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") ++ ~cli:CLIEnable ++ "debug" ++ (fun () -> "true") ++ ++ ++ let profile = ++ var_define ++ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") ++ ~cli:CLIEnable ++ "profile" ++ (fun () -> "false") ++ ++ ++ let tests = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> ++ s_ "Compile tests executable and library and run them") ++ ~cli:CLIEnable ++ "tests" ++ (fun () -> "false")) ++ "true" ++ ++ ++ let docs = ++ var_define_cond ~since_version:"0.3" ++ (fun () -> ++ var_define ++ ~short_desc:(fun () -> s_ "Create documentations") ++ ~cli:CLIEnable ++ "docs" ++ (fun () -> "true")) ++ "true" ++ ++ ++ let native_dynlink = ++ var_define ++ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") ++ ~cli:CLINone ++ "native_dynlink" ++ (fun () -> ++ let res = ++ let ocaml_lt_312 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (ocaml_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "3.12.0")) ++ in ++ let flexdll_lt_030 () = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string (flexdll_version ())) ++ (OASISVersion.VLesser ++ (OASISVersion.version_of_string "0.30")) ++ in ++ let has_native_dynlink = ++ let ocamlfind = ocamlfind () in ++ try ++ let fn = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ocamlfind ++ ["query"; "-predicates"; "native"; "dynlink"; ++ "-format"; "%d/%a"] ++ in ++ Sys.file_exists fn ++ with _ -> ++ false ++ in ++ if not has_native_dynlink then ++ false ++ else if ocaml_lt_312 () then ++ false ++ else if (os_type () = "Win32" || os_type () = "Cygwin") ++ && flexdll_lt_030 () then ++ begin ++ BaseMessage.warning ++ (f_ ".cmxs generation disabled because FlexDLL needs to be \ ++ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") ++ (flexdll_version ()); ++ false ++ end ++ else ++ true ++ in ++ string_of_bool res) ++ ++ ++ let init pkg = ++ rpkg := Some pkg; ++ List.iter (fun f -> f pkg.oasis_version) !var_cond ++ ++end ++ ++module BaseFileAB = struct ++(* # 22 "src/base/BaseFileAB.ml" *) ++ ++ ++ open BaseEnv ++ open OASISGettext ++ open BaseMessage ++ ++ ++ let to_filename fn = ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ if not (Filename.check_suffix fn ".ab") then ++ warning ++ (f_ "File '%s' doesn't have '.ab' extension") ++ fn; ++ Filename.chop_extension fn ++ ++ ++ let replace fn_lst = ++ let buff = ++ Buffer.create 13 ++ in ++ List.iter ++ (fun fn -> ++ let fn = ++ OASISHostPath.of_unix fn ++ in ++ let chn_in = ++ open_in fn ++ in ++ let chn_out = ++ open_out (to_filename fn) ++ in ++ ( ++ try ++ while true do ++ Buffer.add_string buff (var_expand (input_line chn_in)); ++ Buffer.add_char buff '\n' ++ done ++ with End_of_file -> ++ () ++ ); ++ Buffer.output_buffer chn_out buff; ++ Buffer.clear buff; ++ close_in chn_in; ++ close_out chn_out) ++ fn_lst ++end ++ ++module BaseLog = struct ++(* # 22 "src/base/BaseLog.ml" *) ++ ++ ++ open OASISUtils ++ ++ ++ let default_filename = ++ Filename.concat ++ (Filename.dirname BaseEnv.default_filename) ++ "setup.log" ++ ++ ++ module SetTupleString = ++ Set.Make ++ (struct ++ type t = string * string ++ let compare (s11, s12) (s21, s22) = ++ match String.compare s11 s21 with ++ | 0 -> String.compare s12 s22 ++ | n -> n ++ end) ++ ++ ++ let load () = ++ if Sys.file_exists default_filename then ++ begin ++ let chn = ++ open_in default_filename ++ in ++ let scbuf = ++ Scanf.Scanning.from_file default_filename ++ in ++ let rec read_aux (st, lst) = ++ if not (Scanf.Scanning.end_of_input scbuf) then ++ begin ++ let acc = ++ try ++ Scanf.bscanf scbuf "%S %S\n" ++ (fun e d -> ++ let t = ++ e, d ++ in ++ if SetTupleString.mem t st then ++ st, lst ++ else ++ SetTupleString.add t st, ++ t :: lst) ++ with Scanf.Scan_failure _ -> ++ failwith ++ (Scanf.bscanf scbuf ++ "%l" ++ (fun line -> ++ Printf.sprintf ++ "Malformed log file '%s' at line %d" ++ default_filename ++ line)) ++ in ++ read_aux acc ++ end ++ else ++ begin ++ close_in chn; ++ List.rev lst ++ end ++ in ++ read_aux (SetTupleString.empty, []) ++ end ++ else ++ begin ++ [] ++ end ++ ++ ++ let register event data = ++ let chn_out = ++ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename ++ in ++ Printf.fprintf chn_out "%S %S\n" event data; ++ close_out chn_out ++ ++ ++ let unregister event data = ++ if Sys.file_exists default_filename then ++ begin ++ let lst = ++ load () ++ in ++ let chn_out = ++ open_out default_filename ++ in ++ let write_something = ++ ref false ++ in ++ List.iter ++ (fun (e, d) -> ++ if e <> event || d <> data then ++ begin ++ write_something := true; ++ Printf.fprintf chn_out "%S %S\n" e d ++ end) ++ lst; ++ close_out chn_out; ++ if not !write_something then ++ Sys.remove default_filename ++ end ++ ++ ++ let filter events = ++ let st_events = ++ List.fold_left ++ (fun st e -> ++ SetString.add e st) ++ SetString.empty ++ events ++ in ++ List.filter ++ (fun (e, _) -> SetString.mem e st_events) ++ (load ()) ++ ++ ++ let exists event data = ++ List.exists ++ (fun v -> (event, data) = v) ++ (load ()) ++end ++ ++module BaseBuilt = struct ++(* # 22 "src/base/BaseBuilt.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseStandardVar ++ open BaseMessage ++ ++ ++ type t = ++ | BExec (* Executable *) ++ | BExecLib (* Library coming with executable *) ++ | BLib (* Library *) ++ | BObj (* Library *) ++ | BDoc (* Document *) ++ ++ ++ let to_log_event_file t nm = ++ "built_"^ ++ (match t with ++ | BExec -> "exec" ++ | BExecLib -> "exec_lib" ++ | BLib -> "lib" ++ | BObj -> "obj" ++ | BDoc -> "doc")^ ++ "_"^nm ++ ++ ++ let to_log_event_done t nm = ++ "is_"^(to_log_event_file t nm) ++ ++ ++ let register t nm lst = ++ BaseLog.register ++ (to_log_event_done t nm) ++ "true"; ++ List.iter ++ (fun alt -> ++ let registered = ++ List.fold_left ++ (fun registered fn -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ BaseLog.register ++ (to_log_event_file t nm) ++ (if Filename.is_relative fn then ++ Filename.concat (Sys.getcwd ()) fn ++ else ++ fn); ++ true ++ end ++ else ++ registered) ++ false ++ alt ++ in ++ if not registered then ++ warning ++ (f_ "Cannot find an existing alternative files among: %s") ++ (String.concat (s_ ", ") alt)) ++ lst ++ ++ ++ let unregister t nm = ++ List.iter ++ (fun (e, d) -> ++ BaseLog.unregister e d) ++ (BaseLog.filter ++ [to_log_event_file t nm; ++ to_log_event_done t nm]) ++ ++ ++ let fold t nm f acc = ++ List.fold_left ++ (fun acc (_, fn) -> ++ if OASISFileUtil.file_exists_case fn then ++ begin ++ f acc fn ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' has been marked as built \ ++ for %s but doesn't exist") ++ fn ++ (Printf.sprintf ++ (match t with ++ | BExec | BExecLib -> ++ (f_ "executable %s") ++ | BLib -> ++ (f_ "library %s") ++ | BObj -> ++ (f_ "object %s") ++ | BDoc -> ++ (f_ "documentation %s")) ++ nm); ++ acc ++ end) ++ acc ++ (BaseLog.filter ++ [to_log_event_file t nm]) ++ ++ ++ let is_built t nm = ++ List.fold_left ++ (fun is_built (_, d) -> ++ (try ++ bool_of_string d ++ with _ -> ++ false)) ++ false ++ (BaseLog.filter ++ [to_log_event_done t nm]) ++ ++ ++ let of_executable ffn (cs, bs, exec) = ++ let unix_exec_is, unix_dll_opt = ++ OASISExecutable.unix_exec_is ++ (cs, bs, exec) ++ (fun () -> ++ bool_of_string ++ (is_native ())) ++ ext_dll ++ ext_program ++ in ++ let evs = ++ (BExec, cs.cs_name, [[ffn unix_exec_is]]) ++ :: ++ (match unix_dll_opt with ++ | Some fn -> ++ [BExecLib, cs.cs_name, [[ffn fn]]] ++ | None -> ++ []) ++ in ++ evs, ++ unix_exec_is, ++ unix_dll_opt ++ ++ ++ let of_library ffn (cs, bs, lib) = ++ let unix_lst = ++ OASISLibrary.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ ~has_native_dynlink:(bool_of_string (native_dynlink ())) ++ ~ext_lib:(ext_lib ()) ++ ~ext_dll:(ext_dll ()) ++ (cs, bs, lib) ++ in ++ let evs = ++ [BLib, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ ++ ++ let of_object ffn (cs, bs, obj) = ++ let unix_lst = ++ OASISObject.generated_unix_files ++ ~ctxt:!BaseContext.default ++ ~source_file_exists:(fun fn -> ++ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) ++ ~is_native:(bool_of_string (is_native ())) ++ (cs, bs, obj) ++ in ++ let evs = ++ [BObj, ++ cs.cs_name, ++ List.map (List.map ffn) unix_lst] ++ in ++ evs, unix_lst ++ ++end ++ ++module BaseCustom = struct ++(* # 22 "src/base/BaseCustom.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let run cmd args extra_args = ++ OASISExec.run ~ctxt:!BaseContext.default ~quote:false ++ (var_expand cmd) ++ (List.map ++ var_expand ++ (args @ (Array.to_list extra_args))) ++ ++ ++ let hook ?(failsafe=false) cstm f e = ++ let optional_command lst = ++ let printer = ++ function ++ | Some (cmd, args) -> String.concat " " (cmd :: args) ++ | None -> s_ "No command" ++ in ++ match ++ var_choose ++ ~name:(s_ "Pre/Post Command") ++ ~printer ++ lst with ++ | Some (cmd, args) -> ++ begin ++ try ++ run cmd args [||] ++ with e when failsafe -> ++ warning ++ (f_ "Command '%s' fail with error: %s") ++ (String.concat " " (cmd :: args)) ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ end ++ | None -> ++ () ++ in ++ let res = ++ optional_command cstm.pre_command; ++ f e ++ in ++ optional_command cstm.post_command; ++ res ++end ++ ++module BaseDynVar = struct ++(* # 22 "src/base/BaseDynVar.ml" *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open BaseEnv ++ open BaseBuilt ++ ++ ++ let init pkg = ++ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) ++ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) ++ List.iter ++ (function ++ | Executable (cs, bs, exec) -> ++ if var_choose bs.bs_build then ++ var_ignore ++ (var_redefine ++ (* We don't save this variable *) ++ ~dump:false ++ ~short_desc:(fun () -> ++ Printf.sprintf ++ (f_ "Filename of executable '%s'") ++ cs.cs_name) ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ let fn_opt = ++ fold ++ BExec cs.cs_name ++ (fun _ fn -> Some fn) ++ None ++ in ++ match fn_opt with ++ | Some fn -> fn ++ | None -> ++ raise ++ (PropList.Not_set ++ (cs.cs_name, ++ Some (Printf.sprintf ++ (f_ "Executable '%s' not yet built.") ++ cs.cs_name))))) ++ ++ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> ++ ()) ++ pkg.sections ++end ++ ++module BaseTest = struct ++(* # 22 "src/base/BaseTest.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISExpr ++ open OASISGettext ++ ++ ++ let test lst pkg extra_args = ++ ++ let one_test (failure, n) (test_plugin, cs, test) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "test %s run") ++ cs.cs_name) ++ ~printer:string_of_bool ++ test.test_run then ++ begin ++ let () = ++ info (f_ "Running test '%s'") cs.cs_name ++ in ++ let back_cwd = ++ match test.test_working_directory with ++ | Some dir -> ++ let cwd = ++ Sys.getcwd () ++ in ++ let chdir d = ++ info (f_ "Changing directory to '%s'") d; ++ Sys.chdir d ++ in ++ chdir dir; ++ fun () -> chdir cwd ++ ++ | None -> ++ fun () -> () ++ in ++ try ++ let failure_percent = ++ BaseCustom.hook ++ test.test_custom ++ (test_plugin pkg (cs, test)) ++ extra_args ++ in ++ back_cwd (); ++ (failure_percent +. failure, n + 1) ++ with e -> ++ begin ++ back_cwd (); ++ raise e ++ end ++ end ++ else ++ begin ++ info (f_ "Skipping test '%s'") cs.cs_name; ++ (failure, n) ++ end ++ in ++ let failed, n = ++ List.fold_left ++ one_test ++ (0.0, 0) ++ lst ++ in ++ let failure_percent = ++ if n = 0 then ++ 0.0 ++ else ++ failed /. (float_of_int n) ++ in ++ let msg = ++ Printf.sprintf ++ (f_ "Tests had a %.2f%% failure rate") ++ (100. *. failure_percent) ++ in ++ if failure_percent > 0.0 then ++ failwith msg ++ else ++ info "%s" msg; ++ ++ (* Possible explanation why the tests where not run. *) ++ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && ++ not (bool_of_string (BaseStandardVar.tests ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Tests are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-tests'" ++end ++ ++module BaseDoc = struct ++(* # 22 "src/base/BaseDoc.ml" *) ++ ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISGettext ++ ++ ++ let doc lst pkg extra_args = ++ ++ let one_doc (doc_plugin, cs, doc) = ++ if var_choose ++ ~name:(Printf.sprintf ++ (f_ "documentation %s build") ++ cs.cs_name) ++ ~printer:string_of_bool ++ doc.doc_build then ++ begin ++ info (f_ "Building documentation '%s'") cs.cs_name; ++ BaseCustom.hook ++ doc.doc_custom ++ (doc_plugin pkg (cs, doc)) ++ extra_args ++ end ++ in ++ List.iter one_doc lst; ++ ++ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && ++ not (bool_of_string (BaseStandardVar.docs ())) && ++ lst <> [] then ++ BaseMessage.warning ++ "Docs are turned off, consider enabling with \ ++ 'ocaml setup.ml -configure --enable-docs'" ++end ++ ++module BaseSetup = struct ++(* # 22 "src/base/BaseSetup.ml" *) ++ ++ open BaseEnv ++ open BaseMessage ++ open OASISTypes ++ open OASISSection ++ open OASISGettext ++ open OASISUtils ++ ++ ++ type std_args_fun = ++ package -> string array -> unit ++ ++ ++ type ('a, 'b) section_args_fun = ++ name * (package -> (common_section * 'a) -> string array -> 'b) ++ ++ ++ type t = ++ { ++ configure: std_args_fun; ++ build: std_args_fun; ++ doc: ((doc, unit) section_args_fun) list; ++ test: ((test, float) section_args_fun) list; ++ install: std_args_fun; ++ uninstall: std_args_fun; ++ clean: std_args_fun list; ++ clean_doc: (doc, unit) section_args_fun list; ++ clean_test: (test, unit) section_args_fun list; ++ distclean: std_args_fun list; ++ distclean_doc: (doc, unit) section_args_fun list; ++ distclean_test: (test, unit) section_args_fun list; ++ package: package; ++ oasis_fn: string option; ++ oasis_version: string; ++ oasis_digest: Digest.t option; ++ oasis_exec: string option; ++ oasis_setup_args: string list; ++ setup_update: bool; ++ } ++ ++ ++ (* Associate a plugin function with data from package *) ++ let join_plugin_sections filter_map lst = ++ List.rev ++ (List.fold_left ++ (fun acc sct -> ++ match filter_map sct with ++ | Some e -> ++ e :: acc ++ | None -> ++ acc) ++ [] ++ lst) ++ ++ ++ (* Search for plugin data associated with a section name *) ++ let lookup_plugin_section plugin action nm lst = ++ try ++ List.assoc nm lst ++ with Not_found -> ++ failwithf ++ (f_ "Cannot find plugin %s matching section %s for %s action") ++ plugin ++ nm ++ action ++ ++ ++ let configure t args = ++ (* Run configure *) ++ BaseCustom.hook ++ t.package.conf_custom ++ (fun () -> ++ (* Reload if preconf has changed it *) ++ begin ++ try ++ unload (); ++ load (); ++ with _ -> ++ () ++ end; ++ ++ (* Run plugin's configure *) ++ t.configure t.package args; ++ ++ (* Dump to allow postconf to change it *) ++ dump ()) ++ (); ++ ++ (* Reload environment *) ++ unload (); ++ load (); ++ ++ (* Save environment *) ++ print (); ++ ++ (* Replace data in file *) ++ BaseFileAB.replace t.package.files_ab ++ ++ ++ let build t args = ++ BaseCustom.hook ++ t.package.build_custom ++ (t.build t.package) ++ args ++ ++ ++ let doc t args = ++ BaseDoc.doc ++ (join_plugin_sections ++ (function ++ | Doc (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "documentation" ++ (s_ "build") ++ cs.cs_name ++ t.doc, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ ++ let test t args = ++ BaseTest.test ++ (join_plugin_sections ++ (function ++ | Test (cs, e) -> ++ Some ++ (lookup_plugin_section ++ "test" ++ (s_ "run") ++ cs.cs_name ++ t.test, ++ cs, ++ e) ++ | _ -> ++ None) ++ t.package.sections) ++ t.package ++ args ++ ++ ++ let all t args = ++ let rno_doc = ++ ref false ++ in ++ let rno_test = ++ ref false ++ in ++ let arg_rest = ++ ref [] ++ in ++ Arg.parse_argv ++ ~current:(ref 0) ++ (Array.of_list ++ ((Sys.executable_name^" all") :: ++ (Array.to_list args))) ++ [ ++ "-no-doc", ++ Arg.Set rno_doc, ++ s_ "Don't run doc target"; ++ ++ "-no-test", ++ Arg.Set rno_test, ++ s_ "Don't run test target"; ++ ++ "--", ++ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), ++ s_ "All arguments for configure."; ++ ] ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ ""; ++ ++ info "Running configure step"; ++ configure t (Array.of_list (List.rev !arg_rest)); ++ ++ info "Running build step"; ++ build t [||]; ++ ++ (* Load setup.log dynamic variables *) ++ BaseDynVar.init t.package; ++ ++ if not !rno_doc then ++ begin ++ info "Running doc step"; ++ doc t [||]; ++ end ++ else ++ begin ++ info "Skipping doc step" ++ end; ++ ++ if not !rno_test then ++ begin ++ info "Running test step"; ++ test t [||] ++ end ++ else ++ begin ++ info "Skipping test step" ++ end ++ ++ ++ let install t args = ++ BaseCustom.hook ++ t.package.install_custom ++ (t.install t.package) ++ args ++ ++ ++ let uninstall t args = ++ BaseCustom.hook ++ t.package.uninstall_custom ++ (t.uninstall t.package) ++ args ++ ++ ++ let reinstall t args = ++ uninstall t args; ++ install t args ++ ++ ++ let clean, distclean = ++ let failsafe f a = ++ try ++ f a ++ with e -> ++ warning ++ (f_ "Action fail with error: %s") ++ (match e with ++ | Failure msg -> msg ++ | e -> Printexc.to_string e) ++ in ++ ++ let generic_clean t cstm mains docs tests args = ++ BaseCustom.hook ++ ~failsafe:true ++ cstm ++ (fun () -> ++ (* Clean section *) ++ List.iter ++ (function ++ | Test (cs, test) -> ++ let f = ++ try ++ List.assoc cs.cs_name tests ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, test)) ++ args ++ | Doc (cs, doc) -> ++ let f = ++ try ++ List.assoc cs.cs_name docs ++ with Not_found -> ++ fun _ _ _ -> () ++ in ++ failsafe ++ (f t.package (cs, doc)) ++ args ++ | Library _ ++ | Object _ ++ | Executable _ ++ | Flag _ ++ | SrcRepo _ -> ++ ()) ++ t.package.sections; ++ (* Clean whole package *) ++ List.iter ++ (fun f -> ++ failsafe ++ (f t.package) ++ args) ++ mains) ++ () ++ in ++ ++ let clean t args = ++ generic_clean ++ t ++ t.package.clean_custom ++ t.clean ++ t.clean_doc ++ t.clean_test ++ args ++ in ++ ++ let distclean t args = ++ (* Call clean *) ++ clean t args; ++ ++ (* Call distclean code *) ++ generic_clean ++ t ++ t.package.distclean_custom ++ t.distclean ++ t.distclean_doc ++ t.distclean_test ++ args; ++ ++ (* Remove generated file *) ++ List.iter ++ (fun fn -> ++ if Sys.file_exists fn then ++ begin ++ info (f_ "Remove '%s'") fn; ++ Sys.remove fn ++ end) ++ (BaseEnv.default_filename ++ :: ++ BaseLog.default_filename ++ :: ++ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) ++ in ++ ++ clean, distclean ++ ++ ++ let version t _ = ++ print_endline t.oasis_version ++ ++ ++ let update_setup_ml, no_update_setup_ml_cli = ++ let b = ref true in ++ b, ++ ("-no-update-setup-ml", ++ Arg.Clear b, ++ s_ " Don't try to update setup.ml, even if _oasis has changed.") ++ ++ ++ let default_oasis_fn = "_oasis" ++ ++ ++ let update_setup_ml t = ++ let oasis_fn = ++ match t.oasis_fn with ++ | Some fn -> fn ++ | None -> default_oasis_fn ++ in ++ let oasis_exec = ++ match t.oasis_exec with ++ | Some fn -> fn ++ | None -> "oasis" ++ in ++ let ocaml = ++ Sys.executable_name ++ in ++ let setup_ml, args = ++ match Array.to_list Sys.argv with ++ | setup_ml :: args -> ++ setup_ml, args ++ | [] -> ++ failwith ++ (s_ "Expecting non-empty command line arguments.") ++ in ++ let ocaml, setup_ml = ++ if Sys.executable_name = Sys.argv.(0) then ++ (* We are not running in standard mode, probably the script ++ * is precompiled. ++ *) ++ "ocaml", "setup.ml" ++ else ++ ocaml, setup_ml ++ in ++ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in ++ let do_update () = ++ let oasis_exec_version = ++ OASISExec.run_read_one_line ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | 1 -> ++ failwithf ++ (f_ "Executable '%s' is probably an old version \ ++ of oasis (< 0.3.0), please update to version \ ++ v%s.") ++ oasis_exec t.oasis_version ++ | 127 -> ++ failwithf ++ (f_ "Cannot find executable '%s', please install \ ++ oasis v%s.") ++ oasis_exec t.oasis_version ++ | n -> ++ failwithf ++ (f_ "Command '%s version' exited with code %d.") ++ oasis_exec n) ++ oasis_exec ["version"] ++ in ++ if OASISVersion.comparator_apply ++ (OASISVersion.version_of_string oasis_exec_version) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string t.oasis_version)) then ++ begin ++ (* We have a version >= for the executable oasis, proceed with ++ * update. ++ *) ++ (* TODO: delegate this check to 'oasis setup'. *) ++ if Sys.os_type = "Win32" then ++ failwithf ++ (f_ "It is not possible to update the running script \ ++ setup.ml on Windows. Please update setup.ml by \ ++ running '%s'.") ++ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) ++ else ++ begin ++ OASISExec.run ++ ~ctxt:!BaseContext.default ++ ~f_exit_code: ++ (function ++ | 0 -> ++ () ++ | n -> ++ failwithf ++ (f_ "Unable to update setup.ml using '%s', \ ++ please fix the problem and retry.") ++ oasis_exec) ++ oasis_exec ("setup" :: t.oasis_setup_args); ++ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) ++ end ++ end ++ else ++ failwithf ++ (f_ "The version of '%s' (v%s) doesn't match the version of \ ++ oasis used to generate the %s file. Please install at \ ++ least oasis v%s.") ++ oasis_exec oasis_exec_version setup_ml t.oasis_version ++ in ++ ++ if !update_setup_ml then ++ begin ++ try ++ match t.oasis_digest with ++ | Some dgst -> ++ if Sys.file_exists oasis_fn && ++ dgst <> Digest.file default_oasis_fn then ++ begin ++ do_update (); ++ true ++ end ++ else ++ false ++ | None -> ++ false ++ with e -> ++ error ++ (f_ "Error when updating setup.ml. If you want to avoid this error, \ ++ you can bypass the update of %s by running '%s %s %s %s'") ++ setup_ml ocaml setup_ml no_update_setup_ml_cli ++ (String.concat " " args); ++ raise e ++ end ++ else ++ false ++ ++ ++ let setup t = ++ let catch_exn = ++ ref true ++ in ++ try ++ let act_ref = ++ ref (fun _ -> ++ failwithf ++ (f_ "No action defined, run '%s %s -help'") ++ Sys.executable_name ++ Sys.argv.(0)) ++ ++ in ++ let extra_args_ref = ++ ref [] ++ in ++ let allow_empty_env_ref = ++ ref false ++ in ++ let arg_handle ?(allow_empty_env=false) act = ++ Arg.Tuple ++ [ ++ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); ++ ++ Arg.Unit ++ (fun () -> ++ allow_empty_env_ref := allow_empty_env; ++ act_ref := act); ++ ] ++ in ++ ++ Arg.parse ++ (Arg.align ++ ([ ++ "-configure", ++ arg_handle ~allow_empty_env:true configure, ++ s_ "[options*] Configure the whole build process."; ++ ++ "-build", ++ arg_handle build, ++ s_ "[options*] Build executables and libraries."; ++ ++ "-doc", ++ arg_handle doc, ++ s_ "[options*] Build documents."; ++ ++ "-test", ++ arg_handle test, ++ s_ "[options*] Run tests."; ++ ++ "-all", ++ arg_handle ~allow_empty_env:true all, ++ s_ "[options*] Run configure, build, doc and test targets."; ++ ++ "-install", ++ arg_handle install, ++ s_ "[options*] Install libraries, data, executables \ ++ and documents."; ++ ++ "-uninstall", ++ arg_handle uninstall, ++ s_ "[options*] Uninstall libraries, data, executables \ ++ and documents."; ++ ++ "-reinstall", ++ arg_handle reinstall, ++ s_ "[options*] Uninstall and install libraries, data, \ ++ executables and documents."; ++ ++ "-clean", ++ arg_handle ~allow_empty_env:true clean, ++ s_ "[options*] Clean files generated by a build."; ++ ++ "-distclean", ++ arg_handle ~allow_empty_env:true distclean, ++ s_ "[options*] Clean files generated by a build and configure."; ++ ++ "-version", ++ arg_handle ~allow_empty_env:true version, ++ s_ " Display version of OASIS used to generate this setup.ml."; ++ ++ "-no-catch-exn", ++ Arg.Clear catch_exn, ++ s_ " Don't catch exception, useful for debugging."; ++ ] ++ @ ++ (if t.setup_update then ++ [no_update_setup_ml_cli] ++ else ++ []) ++ @ (BaseContext.args ()))) ++ (failwithf (f_ "Don't know what to do with '%s'")) ++ (s_ "Setup and run build process current package\n"); ++ ++ (* Build initial environment *) ++ load ~allow_empty:!allow_empty_env_ref (); ++ ++ (** Initialize flags *) ++ List.iter ++ (function ++ | Flag (cs, {flag_description = hlp; ++ flag_default = choices}) -> ++ begin ++ let apply ?short_desc () = ++ var_ignore ++ (var_define ++ ~cli:CLIEnable ++ ?short_desc ++ (OASISUtils.varname_of_string cs.cs_name) ++ (fun () -> ++ string_of_bool ++ (var_choose ++ ~name:(Printf.sprintf ++ (f_ "default value of flag %s") ++ cs.cs_name) ++ ~printer:string_of_bool ++ choices))) ++ in ++ match hlp with ++ | Some hlp -> ++ apply ~short_desc:(fun () -> hlp) () ++ | None -> ++ apply () ++ end ++ | _ -> ++ ()) ++ t.package.sections; ++ ++ BaseStandardVar.init t.package; ++ ++ BaseDynVar.init t.package; ++ ++ if t.setup_update && update_setup_ml t then ++ () ++ else ++ !act_ref t (Array.of_list (List.rev !extra_args_ref)) ++ ++ with e when !catch_exn -> ++ error "%s" (Printexc.to_string e); ++ exit 1 ++ ++ ++end ++ ++ ++# 5394 "setup.ml" ++module InternalConfigurePlugin = struct ++(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) ++ ++ ++ (** Configure using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open BaseEnv ++ open OASISTypes ++ open OASISUtils ++ open OASISGettext ++ open BaseMessage ++ ++ ++ (** Configure build using provided series of check to be done ++ * and then output corresponding file. ++ *) ++ let configure pkg argv = ++ let var_ignore_eval var = let _s: string = var () in () in ++ let errors = ref SetString.empty in ++ let buff = Buffer.create 13 in ++ ++ let add_errors fmt = ++ Printf.kbprintf ++ (fun b -> ++ errors := SetString.add (Buffer.contents b) !errors; ++ Buffer.clear b) ++ buff ++ fmt ++ in ++ ++ let warn_exception e = ++ warning "%s" (Printexc.to_string e) ++ in ++ ++ (* Check tools *) ++ let check_tools lst = ++ List.iter ++ (function ++ | ExternalTool tool -> ++ begin ++ try ++ var_ignore_eval (BaseCheck.prog tool) ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find external tool '%s'") tool ++ end ++ | InternalExecutable nm1 -> ++ (* Check that matching tool is built *) ++ List.iter ++ (function ++ | Executable ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal executable \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ lst ++ in ++ ++ let build_checks sct bs = ++ if var_choose bs.bs_build then ++ begin ++ if bs.bs_compiled_object = Native then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.ocamlopt ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Section %s requires native compilation") ++ (OASISSection.string_of_section sct) ++ end; ++ ++ (* Check tools *) ++ check_tools bs.bs_build_tools; ++ ++ (* Check depends *) ++ List.iter ++ (function ++ | FindlibPackage (findlib_pkg, version_comparator) -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.package ?version_comparator findlib_pkg) ++ with e -> ++ warn_exception e; ++ match version_comparator with ++ | None -> ++ add_errors ++ (f_ "Cannot find findlib package %s") ++ findlib_pkg ++ | Some ver_cmp -> ++ add_errors ++ (f_ "Cannot find findlib package %s (%s)") ++ findlib_pkg ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | InternalLibrary nm1 -> ++ (* Check that matching library is built *) ++ List.iter ++ (function ++ | Library ({cs_name = nm2}, ++ {bs_build = build}, ++ _) when nm1 = nm2 -> ++ if not (var_choose build) then ++ add_errors ++ (f_ "Cannot find buildable internal library \ ++ '%s' when checking build depends") ++ nm1 ++ | _ -> ++ ()) ++ pkg.sections) ++ bs.bs_build_depends ++ end ++ in ++ ++ (* Parse command line *) ++ BaseArgExt.parse argv (BaseEnv.args ()); ++ ++ (* OCaml version *) ++ begin ++ match pkg.ocaml_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "ocaml" ++ ver_cmp ++ BaseStandardVar.ocaml_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "OCaml version %s doesn't match version constraint %s") ++ (BaseStandardVar.ocaml_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ ++ (* Findlib version *) ++ begin ++ match pkg.findlib_version with ++ | Some ver_cmp -> ++ begin ++ try ++ var_ignore_eval ++ (BaseCheck.version ++ "findlib" ++ ver_cmp ++ BaseStandardVar.findlib_version) ++ with e -> ++ warn_exception e; ++ add_errors ++ (f_ "Findlib version %s doesn't match version constraint %s") ++ (BaseStandardVar.findlib_version ()) ++ (OASISVersion.string_of_comparator ver_cmp) ++ end ++ | None -> ++ () ++ end; ++ (* Make sure the findlib version is fine for the OCaml compiler. *) ++ begin ++ let ocaml_ge4 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) ++ (OASISVersion.version_of_string "4.0.0") >= 0 in ++ if ocaml_ge4 then ++ let findlib_lt132 = ++ OASISVersion.version_compare ++ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) ++ (OASISVersion.version_of_string "1.3.2") < 0 in ++ if findlib_lt132 then ++ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" ++ end; ++ ++ (* FlexDLL *) ++ if BaseStandardVar.os_type () = "Win32" || ++ BaseStandardVar.os_type () = "Cygwin" then ++ begin ++ try ++ var_ignore_eval BaseStandardVar.flexlink ++ with e -> ++ warn_exception e; ++ add_errors (f_ "Cannot find 'flexlink'") ++ end; ++ ++ (* Check build depends *) ++ List.iter ++ (function ++ | Executable (_, bs, _) ++ | Library (_, bs, _) as sct -> ++ build_checks sct bs ++ | Doc (_, doc) -> ++ if var_choose doc.doc_build then ++ check_tools doc.doc_build_tools ++ | Test (_, test) -> ++ if var_choose test.test_run then ++ check_tools test.test_tools ++ | _ -> ++ ()) ++ pkg.sections; ++ ++ (* Check if we need native dynlink (presence of libraries that compile to ++ * native) ++ *) ++ begin ++ let has_cmxa = ++ List.exists ++ (function ++ | Library (_, bs, _) -> ++ var_choose bs.bs_build && ++ (bs.bs_compiled_object = Native || ++ (bs.bs_compiled_object = Best && ++ bool_of_string (BaseStandardVar.is_native ()))) ++ | _ -> ++ false) ++ pkg.sections ++ in ++ if has_cmxa then ++ var_ignore_eval BaseStandardVar.native_dynlink ++ end; ++ ++ (* Check errors *) ++ if SetString.empty != !errors then ++ begin ++ List.iter ++ (fun e -> error "%s" e) ++ (SetString.elements !errors); ++ failwithf ++ (fn_ ++ "%d configuration error" ++ "%d configuration errors" ++ (SetString.cardinal !errors)) ++ (SetString.cardinal !errors) ++ end ++ ++ ++end ++ ++module InternalInstallPlugin = struct ++(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) ++ ++ ++ (** Install using internal scheme ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open BaseEnv ++ open BaseStandardVar ++ open BaseMessage ++ open OASISTypes ++ open OASISFindlib ++ open OASISGettext ++ open OASISUtils ++ ++ ++ let exec_hook = ++ ref (fun (cs, bs, exec) -> cs, bs, exec) ++ ++ ++ let lib_hook = ++ ref (fun (cs, bs, lib) -> cs, bs, lib, []) ++ ++ ++ let obj_hook = ++ ref (fun (cs, bs, obj) -> cs, bs, obj, []) ++ ++ ++ let doc_hook = ++ ref (fun (cs, doc) -> cs, doc) ++ ++ ++ let install_file_ev = ++ "install-file" ++ ++ ++ let install_dir_ev = ++ "install-dir" ++ ++ ++ let install_findlib_ev = ++ "install-findlib" ++ ++ ++ let win32_max_command_line_length = 8000 ++ ++ ++ let split_install_command ocamlfind findlib_name meta files = ++ if Sys.os_type = "Win32" then ++ (* Arguments for the first command: *) ++ let first_args = ["install"; findlib_name; meta] in ++ (* Arguments for remaining commands: *) ++ let other_args = ["install"; findlib_name; "-add"] in ++ (* Extract as much files as possible from [files], [len] is ++ the current command line length: *) ++ let rec get_files len acc files = ++ match files with ++ | [] -> ++ (List.rev acc, []) ++ | file :: rest -> ++ let len = len + 1 + String.length file in ++ if len > win32_max_command_line_length then ++ (List.rev acc, files) ++ else ++ get_files len (file :: acc) rest ++ in ++ (* Split the command into several commands. *) ++ let rec split args files = ++ match files with ++ | [] -> ++ [] ++ | _ -> ++ (* Length of "ocamlfind install [META|-add]" *) ++ let len = ++ List.fold_left ++ (fun len arg -> ++ len + 1 (* for the space *) + String.length arg) ++ (String.length ocamlfind) ++ args ++ in ++ match get_files len [] files with ++ | ([], _) -> ++ failwith (s_ "Command line too long.") ++ | (firsts, others) -> ++ let cmd = args @ firsts in ++ (* Use -add for remaining commands: *) ++ let () = ++ let findlib_ge_132 = ++ OASISVersion.comparator_apply ++ (OASISVersion.version_of_string ++ (BaseStandardVar.findlib_version ())) ++ (OASISVersion.VGreaterEqual ++ (OASISVersion.version_of_string "1.3.2")) ++ in ++ if not findlib_ge_132 then ++ failwithf ++ (f_ "Installing the library %s require to use the \ ++ flag '-add' of ocamlfind because the command \ ++ line is too long. This flag is only available \ ++ for findlib 1.3.2. Please upgrade findlib from \ ++ %s to 1.3.2") ++ findlib_name (BaseStandardVar.findlib_version ()) ++ in ++ let cmds = split other_args others in ++ cmd :: cmds ++ in ++ (* The first command does not use -add: *) ++ split first_args files ++ else ++ ["install" :: findlib_name :: meta :: files] ++ ++ ++ let install pkg argv = ++ ++ let in_destdir = ++ try ++ let destdir = ++ destdir () ++ in ++ (* Practically speaking destdir is prepended ++ * at the beginning of the target filename ++ *) ++ fun fn -> destdir^fn ++ with PropList.Not_set _ -> ++ fun fn -> fn ++ in ++ ++ let install_file ?tgt_fn src_file envdir = ++ let tgt_dir = ++ in_destdir (envdir ()) ++ in ++ let tgt_file = ++ Filename.concat ++ tgt_dir ++ (match tgt_fn with ++ | Some fn -> ++ fn ++ | None -> ++ Filename.basename src_file) ++ in ++ (* Create target directory if needed *) ++ OASISFileUtil.mkdir_parent ++ ~ctxt:!BaseContext.default ++ (fun dn -> ++ info (f_ "Creating directory '%s'") dn; ++ BaseLog.register install_dir_ev dn) ++ tgt_dir; ++ ++ (* Really install files *) ++ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; ++ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; ++ BaseLog.register install_file_ev tgt_file ++ in ++ ++ (* Install data into defined directory *) ++ let install_data srcdir lst tgtdir = ++ let tgtdir = ++ OASISHostPath.of_unix (var_expand tgtdir) ++ in ++ List.iter ++ (fun (src, tgt_opt) -> ++ let real_srcs = ++ OASISFileUtil.glob ++ ~ctxt:!BaseContext.default ++ (Filename.concat srcdir src) ++ in ++ if real_srcs = [] then ++ failwithf ++ (f_ "Wildcard '%s' doesn't match any files") ++ src; ++ List.iter ++ (fun fn -> ++ install_file ++ fn ++ (fun () -> ++ match tgt_opt with ++ | Some s -> ++ OASISHostPath.of_unix (var_expand s) ++ | None -> ++ tgtdir)) ++ real_srcs) ++ lst ++ in ++ ++ (** Install all libraries *) ++ let install_libs pkg = ++ ++ let files_of_library (f_data, acc) data_lib = ++ let cs, bs, lib, lib_extra = ++ !lib_hook data_lib ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + lib_extra *) ++ List.rev_append lib_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in library %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ lib.lib_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BLib ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the library *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ and files_of_object (f_data, acc) data_obj = ++ let cs, bs, obj, obj_extra = ++ !obj_hook data_obj ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then ++ begin ++ let acc = ++ (* Start with acc + obj_extra *) ++ List.rev_append obj_extra acc ++ in ++ let acc = ++ (* Add uncompiled header from the source tree *) ++ let path = ++ OASISHostPath.of_unix bs.bs_path ++ in ++ List.fold_left ++ (fun acc modul -> ++ try ++ List.find ++ OASISFileUtil.file_exists_case ++ (List.map ++ (Filename.concat path) ++ [modul^".mli"; ++ modul^".ml"; ++ String.uncapitalize modul^".mli"; ++ String.capitalize modul^".mli"; ++ String.uncapitalize modul^".ml"; ++ String.capitalize modul^".ml"]) ++ :: acc ++ with Not_found -> ++ begin ++ warning ++ (f_ "Cannot find source header for module %s \ ++ in object %s") ++ modul cs.cs_name; ++ acc ++ end) ++ acc ++ obj.obj_modules ++ in ++ ++ let acc = ++ (* Get generated files *) ++ BaseBuilt.fold ++ BaseBuilt.BObj ++ cs.cs_name ++ (fun acc fn -> fn :: acc) ++ acc ++ in ++ ++ let f_data () = ++ (* Install data associated with the object *) ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name); ++ f_data () ++ in ++ ++ (f_data, acc) ++ end ++ else ++ begin ++ (f_data, acc) ++ end ++ ++ in ++ ++ (* Install one group of library *) ++ let install_group_lib grp = ++ (* Iterate through all group nodes *) ++ let rec install_group_lib_aux data_and_files grp = ++ let data_and_files, children = ++ match grp with ++ | Container (_, children) -> ++ data_and_files, children ++ | Package (_, cs, bs, `Library lib, children) -> ++ files_of_library data_and_files (cs, bs, lib), children ++ | Package (_, cs, bs, `Object obj, children) -> ++ files_of_object data_and_files (cs, bs, obj), children ++ in ++ List.fold_left ++ install_group_lib_aux ++ data_and_files ++ children ++ in ++ ++ (* Findlib name of the root library *) ++ let findlib_name = ++ findlib_of_group grp ++ in ++ ++ (* Determine root library *) ++ let root_lib = ++ root_of_group grp ++ in ++ ++ (* All files to install for this library *) ++ let f_data, files = ++ install_group_lib_aux (ignore, []) grp ++ in ++ ++ (* Really install, if there is something to install *) ++ if files = [] then ++ begin ++ warning ++ (f_ "Nothing to install for findlib library '%s'") ++ findlib_name ++ end ++ else ++ begin ++ let meta = ++ (* Search META file *) ++ let _, bs, _ = ++ root_lib ++ in ++ let res = ++ Filename.concat bs.bs_path "META" ++ in ++ if not (OASISFileUtil.file_exists_case res) then ++ failwithf ++ (f_ "Cannot find file '%s' for findlib library %s") ++ res ++ findlib_name; ++ res ++ in ++ let files = ++ (* Make filename shorter to avoid hitting command max line length ++ * too early, esp. on Windows. ++ *) ++ let remove_prefix p n = ++ let plen = String.length p in ++ let nlen = String.length n in ++ if plen <= nlen && String.sub n 0 plen = p then ++ begin ++ let fn_sep = ++ if Sys.os_type = "Win32" then ++ '\\' ++ else ++ '/' ++ in ++ let cutpoint = plen + ++ (if plen < nlen && n.[plen] = fn_sep then ++ 1 ++ else ++ 0) ++ in ++ String.sub n cutpoint (nlen - cutpoint) ++ end ++ else ++ n ++ in ++ List.map (remove_prefix (Sys.getcwd ())) files ++ in ++ info ++ (f_ "Installing findlib library '%s'") ++ findlib_name; ++ let ocamlfind = ocamlfind () in ++ let commands = ++ split_install_command ++ ocamlfind ++ findlib_name ++ meta ++ files ++ in ++ List.iter ++ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) ++ commands; ++ BaseLog.register install_findlib_ev findlib_name ++ end; ++ ++ (* Install data files *) ++ f_data (); ++ ++ in ++ ++ let group_libs, _, _ = ++ findlib_mapping pkg ++ in ++ ++ (* We install libraries in groups *) ++ List.iter install_group_lib group_libs ++ in ++ ++ let install_execs pkg = ++ let install_exec data_exec = ++ let cs, bs, exec = ++ !exec_hook data_exec ++ in ++ if var_choose bs.bs_install && ++ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then ++ begin ++ let exec_libdir () = ++ Filename.concat ++ (libdir ()) ++ pkg.name ++ in ++ BaseBuilt.fold ++ BaseBuilt.BExec ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ ~tgt_fn:(cs.cs_name ^ ext_program ()) ++ fn ++ bindir) ++ (); ++ BaseBuilt.fold ++ BaseBuilt.BExecLib ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ exec_libdir) ++ (); ++ install_data ++ bs.bs_path ++ bs.bs_data_files ++ (Filename.concat ++ (datarootdir ()) ++ pkg.name) ++ end ++ in ++ List.iter ++ (function ++ | Executable (cs, bs, exec)-> ++ install_exec (cs, bs, exec) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ let install_docs pkg = ++ let install_doc data = ++ let cs, doc = ++ !doc_hook data ++ in ++ if var_choose doc.doc_install && ++ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then ++ begin ++ let tgt_dir = ++ OASISHostPath.of_unix (var_expand doc.doc_install_dir) ++ in ++ BaseBuilt.fold ++ BaseBuilt.BDoc ++ cs.cs_name ++ (fun () fn -> ++ install_file ++ fn ++ (fun () -> tgt_dir)) ++ (); ++ install_data ++ Filename.current_dir_name ++ doc.doc_data_files ++ doc.doc_install_dir ++ end ++ in ++ List.iter ++ (function ++ | Doc (cs, doc) -> ++ install_doc (cs, doc) ++ | _ -> ++ ()) ++ pkg.sections ++ in ++ ++ install_libs pkg; ++ install_execs pkg; ++ install_docs pkg ++ ++ ++ (* Uninstall already installed data *) ++ let uninstall _ argv = ++ List.iter ++ (fun (ev, data) -> ++ if ev = install_file_ev then ++ begin ++ if OASISFileUtil.file_exists_case data then ++ begin ++ info ++ (f_ "Removing file '%s'") ++ data; ++ Sys.remove data ++ end ++ else ++ begin ++ warning ++ (f_ "File '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_dir_ev then ++ begin ++ if Sys.file_exists data && Sys.is_directory data then ++ begin ++ if Sys.readdir data = [||] then ++ begin ++ info ++ (f_ "Removing directory '%s'") ++ data; ++ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' is not empty (%s)") ++ data ++ (String.concat ++ ", " ++ (Array.to_list ++ (Sys.readdir data))) ++ end ++ end ++ else ++ begin ++ warning ++ (f_ "Directory '%s' doesn't exist anymore") ++ data ++ end ++ end ++ else if ev = install_findlib_ev then ++ begin ++ info (f_ "Removing findlib library '%s'") data; ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlfind ()) ["remove"; data] ++ end ++ else ++ failwithf (f_ "Unknown log event '%s'") ev; ++ BaseLog.unregister ev data) ++ (* We process event in reverse order *) ++ (List.rev ++ (BaseLog.filter ++ [install_file_ev; ++ install_dir_ev; ++ install_findlib_ev])) ++ ++ ++end ++ ++ ++# 6243 "setup.ml" ++module OCamlbuildCommon = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) ++ ++ ++ (** Functions common to OCamlbuild build and doc plugin ++ *) ++ ++ ++ open OASISGettext ++ open BaseEnv ++ open BaseStandardVar ++ open OASISTypes ++ ++ ++ ++ ++ type extra_args = string list ++ ++ ++ let ocamlbuild_clean_ev = "ocamlbuild-clean" ++ ++ ++ let ocamlbuildflags = ++ var_define ++ ~short_desc:(fun () -> "OCamlbuild additional flags") ++ "ocamlbuildflags" ++ (fun () -> "") ++ ++ ++ (** Fix special arguments depending on environment *) ++ let fix_args args extra_argv = ++ List.flatten ++ [ ++ if (os_type ()) = "Win32" then ++ [ ++ "-classic-display"; ++ "-no-log"; ++ "-no-links"; ++ "-install-lib-dir"; ++ (Filename.concat (standard_library ()) "ocamlbuild") ++ ] ++ else ++ []; ++ ++ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then ++ [ ++ "-byte-plugin" ++ ] ++ else ++ []; ++ args; ++ ++ if bool_of_string (debug ()) then ++ ["-tag"; "debug"] ++ else ++ []; ++ ++ if bool_of_string (profile ()) then ++ ["-tag"; "profile"] ++ else ++ []; ++ ++ OASISString.nsplit (ocamlbuildflags ()) ' '; ++ ++ Array.to_list extra_argv; ++ ] ++ ++ ++ (** Run 'ocamlbuild -clean' if not already done *) ++ let run_clean extra_argv = ++ let extra_cli = ++ String.concat " " (Array.to_list extra_argv) ++ in ++ (* Run if never called with these args *) ++ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then ++ begin ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); ++ BaseLog.register ocamlbuild_clean_ev extra_cli; ++ at_exit ++ (fun () -> ++ try ++ BaseLog.unregister ocamlbuild_clean_ev extra_cli ++ with _ -> ++ ()) ++ end ++ ++ ++ (** Run ocamlbuild, unregister all clean events *) ++ let run_ocamlbuild args extra_argv = ++ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html ++ *) ++ OASISExec.run ~ctxt:!BaseContext.default ++ (ocamlbuild ()) (fix_args args extra_argv); ++ (* Remove any clean event, we must run it again *) ++ List.iter ++ (fun (e, d) -> BaseLog.unregister e d) ++ (BaseLog.filter [ocamlbuild_clean_ev]) ++ ++ ++ (** Determine real build directory *) ++ let build_dir extra_argv = ++ let rec search_args dir = ++ function ++ | "-build-dir" :: dir :: tl -> ++ search_args dir tl ++ | _ :: tl -> ++ search_args dir tl ++ | [] -> ++ dir ++ in ++ search_args "_build" (fix_args [] extra_argv) ++ ++ ++end ++ ++module OCamlbuildPlugin = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) ++ ++ ++ (** Build using ocamlbuild ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISUtils ++ open OASISString ++ open BaseEnv ++ open OCamlbuildCommon ++ open BaseStandardVar ++ open BaseMessage ++ ++ ++ ++ ++ ++ let cond_targets_hook = ++ ref (fun lst -> lst) ++ ++ ++ let build extra_args pkg argv = ++ (* Return the filename in build directory *) ++ let in_build_dir fn = ++ Filename.concat ++ (build_dir argv) ++ fn ++ in ++ ++ (* Return the unix filename in host build directory *) ++ let in_build_dir_of_unix fn = ++ in_build_dir (OASISHostPath.of_unix fn) ++ in ++ ++ let cond_targets = ++ List.fold_left ++ (fun acc -> ++ function ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_library ++ in_build_dir_of_unix ++ (cs, bs, lib) ++ in ++ ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ~what:".cma" fn ++ || ends_with ~what:".cmxs" fn ++ || ends_with ~what:".cmxa" fn ++ || ends_with ~what:(ext_lib ()) fn ++ || ends_with ~what:(ext_dll ()) fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for library %s") ++ cs.cs_name ++ end ++ ++ | Object (cs, bs, obj) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_files = ++ BaseBuilt.of_object ++ in_build_dir_of_unix ++ (cs, bs, obj) ++ in ++ ++ let tgts = ++ List.flatten ++ (List.filter ++ (fun l -> l <> []) ++ (List.map ++ (List.filter ++ (fun fn -> ++ ends_with ".cmo" fn ++ || ends_with ".cmx" fn)) ++ unix_files)) ++ in ++ ++ match tgts with ++ | _ :: _ -> ++ (evs, tgts) :: acc ++ | [] -> ++ failwithf ++ (f_ "No possible ocamlbuild targets for object %s") ++ cs.cs_name ++ end ++ ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, unix_exec_is, unix_dll_opt = ++ BaseBuilt.of_executable ++ in_build_dir_of_unix ++ (cs, bs, exec) ++ in ++ ++ let target ext = ++ let unix_tgt = ++ (OASISUnixPath.concat ++ bs.bs_path ++ (OASISUnixPath.chop_extension ++ exec.exec_main_is))^ext ++ in ++ let evs = ++ (* Fix evs, we want to use the unix_tgt, without copying *) ++ List.map ++ (function ++ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> ++ BaseBuilt.BExec, nm, ++ [[in_build_dir_of_unix unix_tgt]] ++ | ev -> ++ ev) ++ evs ++ in ++ evs, [unix_tgt] ++ in ++ ++ (* Add executable *) ++ let acc = ++ match bs.bs_compiled_object with ++ | Native -> ++ (target ".native") :: acc ++ | Best when bool_of_string (is_native ()) -> ++ (target ".native") :: acc ++ | Byte ++ | Best -> ++ (target ".byte") :: acc ++ in ++ acc ++ end ++ ++ | Library _ | Object _ | Executable _ | Test _ ++ | SrcRepo _ | Flag _ | Doc _ -> ++ acc) ++ [] ++ (* Keep the pkg.sections ordered *) ++ (List.rev pkg.sections); ++ in ++ ++ (* Check and register built files *) ++ let check_and_register (bt, bnm, lst) = ++ List.iter ++ (fun fns -> ++ if not (List.exists OASISFileUtil.file_exists_case fns) then ++ failwithf ++ (fn_ ++ "Expected built file %s doesn't exist." ++ "None of expected built files %s exists." ++ (List.length fns)) ++ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) ++ lst; ++ (BaseBuilt.register bt bnm lst) ++ in ++ ++ (* Run the hook *) ++ let cond_targets = !cond_targets_hook cond_targets in ++ ++ (* Run a list of target... *) ++ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; ++ (* ... and register events *) ++ List.iter check_and_register (List.flatten (List.map fst cond_targets)) ++ ++ ++ let clean pkg extra_args = ++ run_clean extra_args; ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++ ++end ++ ++module OCamlbuildDocPlugin = struct ++(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) ++ ++ ++ (* Create documentation using ocamlbuild .odocl files ++ @author Sylvain Le Gall ++ *) ++ ++ ++ open OASISTypes ++ open OASISGettext ++ open OASISMessage ++ open OCamlbuildCommon ++ open BaseStandardVar ++ ++ ++ ++ ++ type run_t = ++ { ++ extra_args: string list; ++ run_path: unix_filename; ++ } ++ ++ ++ let doc_build run pkg (cs, doc) argv = ++ let index_html = ++ OASISUnixPath.make ++ [ ++ run.run_path; ++ cs.cs_name^".docdir"; ++ "index.html"; ++ ] ++ in ++ let tgt_dir = ++ OASISHostPath.make ++ [ ++ build_dir argv; ++ OASISHostPath.of_unix run.run_path; ++ cs.cs_name^".docdir"; ++ ] ++ in ++ run_ocamlbuild (index_html :: run.extra_args) argv; ++ List.iter ++ (fun glb -> ++ BaseBuilt.register ++ BaseBuilt.BDoc ++ cs.cs_name ++ [OASISFileUtil.glob ~ctxt:!BaseContext.default ++ (Filename.concat tgt_dir glb)]) ++ ["*.html"; "*.css"] ++ ++ ++ let doc_clean run pkg (cs, doc) argv = ++ run_clean argv; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++ ++end ++ ++ ++# 6616 "setup.ml" ++module CustomPlugin = struct ++(* # 22 "src/plugins/custom/CustomPlugin.ml" *) ++ ++ ++ (** Generate custom configure/build/doc/test/install system ++ @author ++ *) ++ ++ ++ open BaseEnv ++ open OASISGettext ++ open OASISTypes ++ ++ ++ ++ ++ ++ type t = ++ { ++ cmd_main: command_line conditional; ++ cmd_clean: (command_line option) conditional; ++ cmd_distclean: (command_line option) conditional; ++ } ++ ++ ++ let run = BaseCustom.run ++ ++ ++ let main t _ extra_args = ++ let cmd, args = ++ var_choose ++ ~name:(s_ "main command") ++ t.cmd_main ++ in ++ run cmd args extra_args ++ ++ ++ let clean t pkg extra_args = ++ match var_choose t.cmd_clean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ ++ let distclean t pkg extra_args = ++ match var_choose t.cmd_distclean with ++ | Some (cmd, args) -> ++ run cmd args extra_args ++ | _ -> ++ () ++ ++ ++ module Build = ++ struct ++ let main t pkg extra_args = ++ main t pkg extra_args; ++ List.iter ++ (fun sct -> ++ let evs = ++ match sct with ++ | Library (cs, bs, lib) when var_choose bs.bs_build -> ++ begin ++ let evs, _ = ++ BaseBuilt.of_library ++ OASISHostPath.of_unix ++ (cs, bs, lib) ++ in ++ evs ++ end ++ | Executable (cs, bs, exec) when var_choose bs.bs_build -> ++ begin ++ let evs, _, _ = ++ BaseBuilt.of_executable ++ OASISHostPath.of_unix ++ (cs, bs, exec) ++ in ++ evs ++ end ++ | _ -> ++ [] ++ in ++ List.iter ++ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) ++ evs) ++ pkg.sections ++ ++ let clean t pkg extra_args = ++ clean t pkg extra_args; ++ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild ++ * considering moving this to BaseSetup? ++ *) ++ List.iter ++ (function ++ | Library (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name ++ | Executable (cs, _, _) -> ++ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; ++ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name ++ | _ -> ++ ()) ++ pkg.sections ++ ++ let distclean t pkg extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++ module Test = ++ struct ++ let main t pkg (cs, test) extra_args = ++ try ++ main t pkg extra_args; ++ 0.0 ++ with Failure s -> ++ BaseMessage.warning ++ (f_ "Test '%s' fails: %s") ++ cs.cs_name ++ s; ++ 1.0 ++ ++ let clean t pkg (cs, test) extra_args = ++ clean t pkg extra_args ++ ++ let distclean t pkg (cs, test) extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++ module Doc = ++ struct ++ let main t pkg (cs, _) extra_args = ++ main t pkg extra_args; ++ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] ++ ++ let clean t pkg (cs, _) extra_args = ++ clean t pkg extra_args; ++ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name ++ ++ let distclean t pkg (cs, _) extra_args = ++ distclean t pkg extra_args ++ end ++ ++ ++end ++ ++ ++# 6764 "setup.ml" ++open OASISTypes;; ++ ++let setup_t = ++ { ++ BaseSetup.configure = InternalConfigurePlugin.configure; ++ build = OCamlbuildPlugin.build []; ++ test = ++ [ ++ ("cow", ++ CustomPlugin.Test.main ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_cow", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }); ++ ("spec", ++ CustomPlugin.Test.main ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_spec", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ doc = []; ++ install = InternalInstallPlugin.install; ++ uninstall = InternalInstallPlugin.uninstall; ++ clean = [OCamlbuildPlugin.clean]; ++ clean_test = ++ [ ++ ("cow", ++ CustomPlugin.Test.clean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_cow", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }); ++ ("spec", ++ CustomPlugin.Test.clean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_spec", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ clean_doc = []; ++ distclean = []; ++ distclean_test = ++ [ ++ ("cow", ++ CustomPlugin.Test.distclean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_cow", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }); ++ ("spec", ++ CustomPlugin.Test.distclean ++ { ++ CustomPlugin.cmd_main = ++ [(OASISExpr.EBool true, ("$test_spec", []))]; ++ cmd_clean = [(OASISExpr.EBool true, None)]; ++ cmd_distclean = [(OASISExpr.EBool true, None)] ++ }) ++ ]; ++ distclean_doc = []; ++ package = ++ { ++ oasis_version = "0.3"; ++ ocaml_version = None; ++ findlib_version = None; ++ alpha_features = []; ++ beta_features = []; ++ name = "omd"; ++ version = "1.0.2"; ++ license = ++ OASISLicense.DEP5License ++ (OASISLicense.DEP5Unit ++ { ++ OASISLicense.license = "ISC"; ++ excption = None; ++ version = OASISLicense.NoVersion ++ }); ++ license_file = None; ++ copyrights = []; ++ maintainers = ["Philippe Wang "]; ++ authors = ["Philippe Wang "]; ++ homepage = Some "https://github.com/ocaml/omd"; ++ synopsis = "A Markdown frontend in pure OCaml."; ++ description = ++ Some ++ [ ++ OASISText.Para ++ "This Markdown library is implemented using only pure OCaml (including I/O operations provided by the standard OCaml compiler distribution). OMD is meant to be as faithful as possible to the original Markdown. Additionally, OMD implements a few Github markdown features, an extension mechanism, and a few other features. Note that the opam package installs both the OMD library and the command line tool `omd`. Note that The library interface of 1.0.x is only partially compatible with 0.9.x." ++ ]; ++ categories = []; ++ conf_type = (`Configure, "internal", Some "0.4"); ++ conf_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ build_type = (`Build, "ocamlbuild", Some "0.4"); ++ build_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ install_type = (`Install, "internal", Some "0.4"); ++ install_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ uninstall_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ clean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ distclean_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ files_ab = []; ++ sections = ++ [ ++ Library ++ ({ ++ cs_name = "omd"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "src"; ++ bs_compiled_object = Best; ++ bs_build_depends = [FindlibPackage ("bigarray", None)]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ { ++ lib_modules = ++ [ ++ "Omd_utils"; ++ "Omd_representation"; ++ "Omd_backend"; ++ "Omd_lexer"; ++ "Omd_parser"; ++ "Omd" ++ ]; ++ lib_pack = false; ++ lib_internal_modules = []; ++ lib_findlib_parent = None; ++ lib_findlib_name = None; ++ lib_findlib_containers = [] ++ }); ++ Executable ++ ({ ++ cs_name = "omd"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "src"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "omd"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "omd_main.ml"}); ++ SrcRepo ++ ({ ++ cs_name = "master"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ src_repo_type = Git; ++ src_repo_location = "https://github.com/ocaml/omd.git"; ++ src_repo_browser = Some "https://github.com/ocaml/omd"; ++ src_repo_module = None; ++ src_repo_branch = None; ++ src_repo_tag = None; ++ src_repo_subdir = None ++ }); ++ Executable ++ ({ ++ cs_name = "test_cow"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "tests/cow"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "omd"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "test.ml"}); ++ Test ++ ({ ++ cs_name = "cow"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ test_type = (`Test, "Custom", Some "0.0.1"); ++ test_command = ++ [(OASISExpr.EBool true, ("$test_cow", []))]; ++ test_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ test_working_directory = None; ++ test_run = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); ++ (OASISExpr.EFlag "tests", true) ++ ]; ++ test_tools = [] ++ }); ++ Executable ++ ({ ++ cs_name = "test_spec"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ bs_build = [(OASISExpr.EBool true, true)]; ++ bs_install = [(OASISExpr.EBool true, true)]; ++ bs_path = "tests"; ++ bs_compiled_object = Best; ++ bs_build_depends = [InternalLibrary "omd"]; ++ bs_build_tools = [ExternalTool "ocamlbuild"]; ++ bs_c_sources = []; ++ bs_data_files = []; ++ bs_ccopt = [(OASISExpr.EBool true, [])]; ++ bs_cclib = [(OASISExpr.EBool true, [])]; ++ bs_dlllib = [(OASISExpr.EBool true, [])]; ++ bs_dllpath = [(OASISExpr.EBool true, [])]; ++ bs_byteopt = [(OASISExpr.EBool true, [])]; ++ bs_nativeopt = [(OASISExpr.EBool true, [])] ++ }, ++ {exec_custom = false; exec_main_is = "test_spec.ml"}); ++ Test ++ ({ ++ cs_name = "spec"; ++ cs_data = PropList.Data.create (); ++ cs_plugin_data = [] ++ }, ++ { ++ test_type = (`Test, "Custom", Some "0.0.1"); ++ test_command = ++ [(OASISExpr.EBool true, ("$test_spec", []))]; ++ test_custom = ++ { ++ pre_command = [(OASISExpr.EBool true, None)]; ++ post_command = [(OASISExpr.EBool true, None)] ++ }; ++ test_working_directory = None; ++ test_run = ++ [ ++ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); ++ (OASISExpr.EFlag "tests", true) ++ ]; ++ test_tools = [] ++ }) ++ ]; ++ plugins = ++ [(`Extra, "META", Some "0.3"); (`Extra, "StdFiles", Some "0.3")]; ++ disable_oasis_section = []; ++ schema_data = PropList.Data.create (); ++ plugin_data = [] ++ }; ++ oasis_fn = Some "_oasis"; ++ oasis_version = "0.4.4"; ++ oasis_digest = Some "a\201n\165.\195\bJ\173\219\002\206\025\143\235("; ++ oasis_exec = None; ++ oasis_setup_args = []; ++ setup_update = false ++ };; ++ ++let setup () = BaseSetup.setup setup_t;; ++ ++# 7087 "setup.ml" + (* OASIS_STOP *) + let () = setup ();; +diff -urN omd-1.0.2.orig/src/META omd-1.0.2/src/META +--- omd-1.0.2.orig/src/META 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/src/META 2014-10-16 17:35:14.057877135 +0000 +@@ -0,0 +1,12 @@ ++# OASIS_START ++# DO NOT EDIT (digest: 57908fab5d606629e9b7492bcb72fbeb) ++version = "1.0.2" ++description = "A Markdown frontend in pure OCaml." ++requires = "bigarray" ++archive(byte) = "omd.cma" ++archive(byte, plugin) = "omd.cma" ++archive(native) = "omd.cmxa" ++archive(native, plugin) = "omd.cmxs" ++exists_if = "omd.cma" ++# OASIS_STOP ++ +diff -urN omd-1.0.2.orig/src/omd.mldylib omd-1.0.2/src/omd.mldylib +--- omd-1.0.2.orig/src/omd.mldylib 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/src/omd.mldylib 2014-10-16 17:35:14.057877135 +0000 +@@ -0,0 +1,9 @@ ++# OASIS_START ++# DO NOT EDIT (digest: 80dddf0b053606a303121d581c814f20) ++Omd_utils ++Omd_representation ++Omd_backend ++Omd_lexer ++Omd_parser ++Omd ++# OASIS_STOP +diff -urN omd-1.0.2.orig/src/omd.mllib omd-1.0.2/src/omd.mllib +--- omd-1.0.2.orig/src/omd.mllib 1970-01-01 00:00:00.000000000 +0000 ++++ omd-1.0.2/src/omd.mllib 2014-10-16 17:35:14.057877135 +0000 +@@ -0,0 +1,9 @@ ++# OASIS_START ++# DO NOT EDIT (digest: 80dddf0b053606a303121d581c814f20) ++Omd_utils ++Omd_representation ++Omd_backend ++Omd_lexer ++Omd_parser ++Omd ++# OASIS_STOP +diff -urN omd-1.0.2.orig/_tags omd-1.0.2/_tags +--- omd-1.0.2.orig/_tags 2014-10-06 15:10:21.000000000 +0000 ++++ omd-1.0.2/_tags 2014-10-16 17:35:14.037877273 +0000 +@@ -1,4 +1,35 @@ + # OASIS_START ++# DO NOT EDIT (digest: ba20dcac324520460a05ab94e90df83d) ++# Ignore VCS directories, you can use the same kind of rule outside ++# OASIS_START/STOP if you want to exclude directories that contains ++# useless stuff for the build process ++<**/.svn>: -traverse ++<**/.svn>: not_hygienic ++".bzr": -traverse ++".bzr": not_hygienic ++".hg": -traverse ++".hg": not_hygienic ++".git": -traverse ++".git": not_hygienic ++"_darcs": -traverse ++"_darcs": not_hygienic ++# Library omd ++"src/omd.cmxs": use_omd ++# Executable omd ++: pkg_bigarray ++: use_omd ++: pkg_bigarray ++: use_omd ++# Executable test_cow ++: pkg_bigarray ++: use_omd ++: pkg_bigarray ++: use_omd ++# Executable test_spec ++: pkg_bigarray ++: use_omd ++: pkg_bigarray ++: use_omd + # OASIS_STOP + + true: annot diff --git a/SPECS/ocaml-omd.spec b/SPECS/ocaml-omd.spec index 875440fe..afd8ef85 100644 --- a/SPECS/ocaml-omd.spec +++ b/SPECS/ocaml-omd.spec @@ -5,10 +5,10 @@ Summary: A Markdown frontend in pure OCaml. License: ISC URL: https://github.com/ocaml/omd Source0: https://github.com/ocaml/omd/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: ocaml-omd-setup.ml.patch BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc -BuildRequires: oasis %description This Markdown library is implemented using only pure OCaml (including @@ -30,9 +30,9 @@ developing applications that use %{name}. %prep %setup -q -n omd-%{version} +%patch0 -p1 %build -oasis setup ocaml setup.ml -configure --prefix %{_prefix} \ --libdir %{_libdir} \ --libexecdir %{_libexecdir} \ From 003f8e42bf2e4eb32fecdfb3b980874149907e09 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 20:06:43 +0000 Subject: [PATCH 1087/1125] ocaml-ulex: remove the -dev package to match the conventions of Debian Signed-off-by: David Scott --- SPECS/ocaml-cow.spec | 10 ++++++---- SPECS/ocaml-ulex.spec | 14 -------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/SPECS/ocaml-cow.spec b/SPECS/ocaml-cow.spec index c3be625e..859c052c 100644 --- a/SPECS/ocaml-cow.spec +++ b/SPECS/ocaml-cow.spec @@ -9,7 +9,7 @@ BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-type-conv -BuildRequires: ocaml-ulex-devel +BuildRequires: ocaml-ulex BuildRequires: ocaml-re-devel BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-uri-devel @@ -42,7 +42,7 @@ Requires: %{name} = %{version}-%{release} Requires: ocaml-findlib Requires: ocaml-ocamldoc Requires: ocaml-type-conv -Requires: ocaml-ulex-devel +Requires: ocaml-ulex Requires: ocaml-re-devel Requires: ocaml-ounit-devel Requires: ocaml-uri-devel @@ -59,10 +59,12 @@ developing applications that use %{name}. %setup -q -n %{name}-%{version} %build -make all +make %install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml +rm -rf $RPM_BUILD_ROOT +export DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install diff --git a/SPECS/ocaml-ulex.spec b/SPECS/ocaml-ulex.spec index ece0599c..e3e14cf4 100644 --- a/SPECS/ocaml-ulex.spec +++ b/SPECS/ocaml-ulex.spec @@ -13,14 +13,6 @@ BuildRequires: ocaml-camlp4-devel %description lexer generator for Unicode and OCaml -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - %prep %setup -q -n ulex-%{version} @@ -35,12 +27,6 @@ make install %files %{_libdir}/ocaml/ulex -%exclude %{_libdir}/ocaml/ulex/*.a -%exclude %{_libdir}/ocaml/ulex/*.cmxa -%exclude %{_libdir}/ocaml/ulex/*.cmx -%exclude %{_libdir}/ocaml/ulex/*.mli - -%files devel %{_libdir}/ocaml/ulex/*.a %{_libdir}/ocaml/ulex/*.cmxa %{_libdir}/ocaml/ulex/*.cmx From e83b94701216372046855854e0e1865cf8da21d8 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 20:07:18 +0000 Subject: [PATCH 1088/1125] xapi-storage: install the python libraries manually Signed-off-by: David Scott --- SPECS/xapi-storage.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SPECS/xapi-storage.spec b/SPECS/xapi-storage.spec index 39b39df0..25435bfa 100644 --- a/SPECS/xapi-storage.spec +++ b/SPECS/xapi-storage.spec @@ -59,8 +59,8 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install cd ../python -%{__python} setup.py install -O2 --root %{buildroot} -rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info +mkdir -p %{buildroot}%{python_sitelib}/xapi +cp xapi.py d.py v.py p.py %{buildroot}%{python_sitelib}/xapi %files %defattr(-,root,root,-) @@ -68,10 +68,10 @@ rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info %exclude %{_libdir}/ocaml/xapi-storage/*.a %exclude %{_libdir}/ocaml/xapi-storage/*.cmxa %exclude %{_libdir}/ocaml/xapi-storage/*.ml -%{python_sitelib}/xapi.py* -%{python_sitelib}/d.py* -%{python_sitelib}/v.py* -%{python_sitelib}/p.py* +%{python_sitelib}/xapi/xapi.py* +%{python_sitelib}/xapi/d.py* +%{python_sitelib}/xapi/v.py* +%{python_sitelib}/xapi/p.py* %files devel %defattr(-,root,root,-) From d87c8abaccf02709ff1cb7cebb653ad6979ebbda Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 20:18:38 +0000 Subject: [PATCH 1089/1125] xapi-storage: add a __init__.py Signed-off-by: David Scott --- SOURCES/xapi-storage.patch | 30 ++++++++++++++++++++++++++++++ SPECS/xapi-storage.spec | 5 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 SOURCES/xapi-storage.patch diff --git a/SOURCES/xapi-storage.patch b/SOURCES/xapi-storage.patch new file mode 100644 index 00000000..c8ecd395 --- /dev/null +++ b/SOURCES/xapi-storage.patch @@ -0,0 +1,30 @@ +diff -urN xapi-storage-0.1.orig/python/__init__.py xapi-storage-0.1/python/__init__.py +--- xapi-storage-0.1.orig/python/__init__.py 1970-01-01 00:00:00.000000000 +0000 ++++ xapi-storage-0.1/python/__init__.py 2014-10-16 20:15:01.110774865 +0000 +@@ -0,0 +1,26 @@ ++#!/usr/bin/env python ++ ++""" ++Copyright (c) 2013, Citrix Inc. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ ++1. Redistributions of source code must retain the above copyright notice, this ++ list of conditions and the following disclaimer. ++2. Redistributions in binary form must reproduce the above copyright notice, ++ this list of conditions and the following disclaimer in the documentation ++ and/or other materials provided with the distribution. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ++ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++""" diff --git a/SPECS/xapi-storage.spec b/SPECS/xapi-storage.spec index 25435bfa..066c7f04 100644 --- a/SPECS/xapi-storage.spec +++ b/SPECS/xapi-storage.spec @@ -4,6 +4,7 @@ Version: 0.1 Release: 1%{?dist} URL: https://github.com/djs55/xapi-storage Source0: https://github.com/djs55/xapi-storage/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: xapi-storage.patch License: LGPL+linking exception BuildRequires: python-devel @@ -34,6 +35,7 @@ developing applications that use %{name}. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 %build make @@ -60,7 +62,7 @@ mkdir -p $OCAMLFIND_DESTDIR ocaml setup.ml -install cd ../python mkdir -p %{buildroot}%{python_sitelib}/xapi -cp xapi.py d.py v.py p.py %{buildroot}%{python_sitelib}/xapi +cp __init__.py xapi.py d.py v.py p.py %{buildroot}%{python_sitelib}/xapi %files %defattr(-,root,root,-) @@ -72,6 +74,7 @@ cp xapi.py d.py v.py p.py %{buildroot}%{python_sitelib}/xapi %{python_sitelib}/xapi/d.py* %{python_sitelib}/xapi/v.py* %{python_sitelib}/xapi/p.py* +%{python_sitelib}/xapi/__init__.py* %files devel %defattr(-,root,root,-) From 6d8f143368d9e49023b83c89a4bd47f59a2fca35 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 21:01:52 +0000 Subject: [PATCH 1090/1125] ocaml-async-inotify-devel: require the dependencies needed to use the library Signed-off-by: David Scott --- SPECS/ocaml-async-inotify.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec index fe66cd5a..8ed38271 100644 --- a/SPECS/ocaml-async-inotify.spec +++ b/SPECS/ocaml-async-inotify.spec @@ -38,7 +38,16 @@ Jane Street Capital's asynchronous execution library (core). Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} - +Requires: ocaml-camlp4-devel +Requires: ocaml-async-devel +Requires: ocaml-sexplib-devel +Requires: ocaml-findlib-devel +Requires: ocaml-comparelib-devel +Requires: ocaml-enumerate-devel +Requires: ocaml-herelib-devel +Requires: ocaml-custom-printf-devel +Requires: ocaml-async-find-devel +Requires: ocaml-inotify-devel %description devel The %{name}-devel package contains libraries and signature files for From cbbbb139d70fd444012ec8f3cb5d2f26c6854ab2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 21:02:27 +0000 Subject: [PATCH 1091/1125] Add xapi-storage-script daemon Signed-off-by: David Scott --- SOURCES/xapi-storage-script-conf.in | 2 + SOURCES/xapi-storage-script-init | 96 +++++++++++++++++++++++++++++ SPECS/xapi-storage-script.spec | 65 +++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 SOURCES/xapi-storage-script-conf.in create mode 100755 SOURCES/xapi-storage-script-init create mode 100644 SPECS/xapi-storage-script.spec diff --git a/SOURCES/xapi-storage-script-conf.in b/SOURCES/xapi-storage-script-conf.in new file mode 100644 index 00000000..0f06acfc --- /dev/null +++ b/SOURCES/xapi-storage-script-conf.in @@ -0,0 +1,2 @@ +# Place to look for plugins +root = @LIBEXECDIR@/xapi-storage-script diff --git a/SOURCES/xapi-storage-script-init b/SOURCES/xapi-storage-script-init new file mode 100755 index 00000000..9ff93057 --- /dev/null +++ b/SOURCES/xapi-storage-script-init @@ -0,0 +1,96 @@ +#!/bin/bash +# +# xapi-storage-script Startup script for Xapi storage script plugin server +# +# chkconfig: 2345 13 88 +# description: Allows storage adapters to be written as scripts +### BEGIN INIT INFO +# Provides: xapi-storage-script +# Required-Start: $syslog message-switch +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog message-switch +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: xapi storage plugin server +# Description: Allows storage adapters to be written as scripts +### END INIT INFO + +# Source function library. +. /lib/lsb/init-functions + +RETVAL=0 +PIDFILE=/var/run/xapi-storage-script.pid + +prog=xapi-storage-script +exec=/usr/sbin/xapi-storage-script +if [ -d /var/lock/subsys ] ; then + lockfile=/var/lock/subsys/$prog +else + lockfile=/var/lock/$prog +fi + +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + +start() { + [ -x $exec ] || exit 5 + + umask 077 + + echo -n $"Starting xapi-storage-script: " + export OCAMLRUNPARAM=b + start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $XAPI_STORAGE_SCRIPT_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} +stop() { + echo -n $"Shutting down xapi-storage-script: " + + killproc -p "$PIDFILE" $exec + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} +rhstatus() { + status_of_proc -p "$PIDFILE" $exec $prog +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + status) + rhstatus + ;; + condrestart|try-restart) + rhstatus >/dev/null 2>&1 || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $? diff --git a/SPECS/xapi-storage-script.spec b/SPECS/xapi-storage-script.spec new file mode 100644 index 00000000..dcb0aa39 --- /dev/null +++ b/SPECS/xapi-storage-script.spec @@ -0,0 +1,65 @@ +# -*- rpm-spec -*- + +Summary: Xapi storage script plugin server +Name: xapi-storage-script +Version: 0.1 +Release: 1%{?dist} +License: LGPL+linking exception +URL: https://github.com/djs55/xapi-storage-script +Source0: https://github.com/djs55/xapi-storage-script/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: xapi-storage-script-init +Source2: xapi-storage-script-conf.in +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: ocaml-async-inotify-devel +BuildRequires: message-switch-devel +BuildRequires: ocaml-rpc-devel +BuildRequires: xapi-storage-devel + +%description +Allows script-based Xapi storage adapters. + +%prep +%setup -q -n %{name}-%{version} +cp %{SOURCE1} xapi-storage-script-init +cp %{SOURCE2} xapi-storage-script-conf.in + +%build +make +mv main.native xapi-storage-script +./xapi-storage-script --help=groff > xapi-storage-script.1 +sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xapi-storage-script-conf.in > xapi-storage-script.conf + +%install + +mkdir -p %{buildroot}/%{_sbindir} +install -m 0755 xapi-storage-script %{buildroot}/%{_sbindir}/xapi-storage-script +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 0755 xapi-storage-script-init %{buildroot}%{_sysconfdir}/init.d/xapi-storage-script +mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script +mkdir -p %{buildroot}/etc +install -m 0644 xapi-storage-script.conf %{buildroot}/etc/xapi-storage-script.conf +mkdir -p %{buildroot}%{_mandir}/man2 +install -m 0644 xapi-storage-script.1 %{buildroot}%{_mandir}/man2/xapi-storage-script.1 + +%post +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-storage-script + +%preun +if [ $1 -eq 0 ]; then + /sbin/service xapi-storage-script stop > /dev/null 2>&1 + /sbin/chkconfig --del xapi-storage-script +fi + +%files +%{_sbindir}/xapi-storage-script +/etc/init.d/xapi-storage-script +%config(noreplace) /etc/xapi-storage-script.conf +%{_libexecdir}/xapi-storage-script + +%changelog +* Thu Oct 16 2014 David Scott - 0.1-1 +- Initial package From 914af1080b7c8077bdacc9a58d93f0bffbce361b Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 16 Oct 2014 21:27:58 +0000 Subject: [PATCH 1092/1125] xapi-storage-script: install the man page Signed-off-by: David Scott --- SPECS/xapi-storage-script.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/xapi-storage-script.spec b/SPECS/xapi-storage-script.spec index dcb0aa39..04765dff 100644 --- a/SPECS/xapi-storage-script.spec +++ b/SPECS/xapi-storage-script.spec @@ -44,6 +44,7 @@ mkdir -p %{buildroot}/etc install -m 0644 xapi-storage-script.conf %{buildroot}/etc/xapi-storage-script.conf mkdir -p %{buildroot}%{_mandir}/man2 install -m 0644 xapi-storage-script.1 %{buildroot}%{_mandir}/man2/xapi-storage-script.1 +gzip %{buildroot}%{_mandir}/man2/xapi-storage-script.1 %post [ ! -x /sbin/chkconfig ] || chkconfig --add xapi-storage-script @@ -59,6 +60,7 @@ fi /etc/init.d/xapi-storage-script %config(noreplace) /etc/xapi-storage-script.conf %{_libexecdir}/xapi-storage-script +%{_mandir}/man2/xapi-storage-script.1.gz %changelog * Thu Oct 16 2014 David Scott - 0.1-1 From 2c221f7c90fa80449ec80b7c256bd8ca73d4e430 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 17 Oct 2014 20:01:49 +0000 Subject: [PATCH 1093/1125] xapi: backport the console fix This is from [xapi-project/xen-api#1979] Signed-off-by: David Scott --- ...i.211c042934ecca68b622aef8b7bcf910320a1a61 | 33 ----- ...i.8c68223753278ebe653ac9f3dfae2554525722cd | 114 ++++++++++++++++++ ...i.a9f563a89e2b27d394573f8d542fc7e7a9068f5f | 68 ----------- SPECS/xapi.spec | 7 +- 4 files changed, 120 insertions(+), 102 deletions(-) delete mode 100644 SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 create mode 100644 SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd delete mode 100644 SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f diff --git a/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 b/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 deleted file mode 100644 index fcb6586c..00000000 --- a/SOURCES/xen-api.211c042934ecca68b622aef8b7bcf910320a1a61 +++ /dev/null @@ -1,33 +0,0 @@ -commit 211c042934ecca68b622aef8b7bcf910320a1a61 -Author: David Scott -Date: Tue Apr 29 13:51:32 2014 +0000 - - The Makefile shouldn't call 'configure' - - The build 'standard' is that the caller should run - ./configure - make - - Signed-off-by: David Scott - -diff --git a/Makefile b/Makefile -index cf9e9d3..5b775f9 100644 ---- a/Makefile -+++ b/Makefile -@@ -31,15 +31,12 @@ EXTRA_INSTALL_PATH= - export ETCDIR OPTDIR PLUGINDIR HOOKSDIR INVENTORY VARPATCHDIR LIBEXECDIR XAPICONF SCRIPTSDIR SHAREDIR WEBDIR XHADIR BINDIR SBINDIR UDEVDIR OCAMLPATH EXTRA_INSTALL_PATH - - .PHONY: all --all: version ocaml/fhs.ml -+all: version - omake -j 8 phase1 - omake -j 8 phase2 - omake -j 8 phase3 - @make test - --config.mk ocaml/fhs.ml: configure -- ./configure -- - .PHONY: phase3 - phase3: - omake phase3 diff --git a/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd b/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd new file mode 100644 index 00000000..6c60d65e --- /dev/null +++ b/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd @@ -0,0 +1,114 @@ +commit 8c68223753278ebe653ac9f3dfae2554525722cd +Author: David Scott +Date: Tue Oct 14 11:08:16 2014 +0000 + + CA-148772: support consoles served over Unix domain sockets + + Xenopsd with libxl + upstream qemu prefers to bind consoles to + named sockets like + + /var/run/non-persistent/xenospd/consoles/VM/ + + rather than anonymous localhost port numbers. Naming consoles is + a good idea because it prevents accidentally connecting to the + wrong port number. + + This patch allows Xapi to connect to these Unix domain socket + consoles. Note there is still a lingering problem with upstream + qemu and XenCenter's built-in RFB client which causes the + keyboard not to work. + + Signed-off-by: David Scott + +diff --git a/ocaml/xapi/console.ml b/ocaml/xapi/console.ml +index 1e3fe2b..0da0886 100644 +--- a/ocaml/xapi/console.ml ++++ b/ocaml/xapi/console.ml +@@ -25,11 +25,17 @@ open D + + exception Failure + +-(** [port_of_proxy __context console] returns [Some port] or [None], if a suitable +- proxy could not be found. *) +-let port_of_proxy __context console = ++type address = ++| Port of int (* console is listening on localhost:port *) ++| Path of string (* console is listening on a Unix domain socket *) ++ ++let string_of_address = function ++| Port x -> "localhost:" ^ (string_of_int x) ++| Path x -> "unix:" ^ x ++ ++let address_of_console __context console : address option = + let vm = Db.Console.get_VM __context console in +- let vnc_port_option = ++ let address_option = + try + let open Xenops_interface in + let id = Xapi_xenops.id_of_vm ~__context ~self:vm in +@@ -42,25 +48,27 @@ let port_of_proxy __context console = + | `vt100 -> Vm.Vt100 + | `rdp -> failwith "No support for tunnelling RDP" in + let console = List.find (fun x -> x.Vm.protocol = proto) s.Vm.consoles in +- Some console.Vm.port ++ Some (if console.Vm.path = "" then Port console.Vm.port else Path console.Vm.path) + with e -> + debug "%s" (Printexc.to_string e); + None in +- debug "VM %s console port: %s" (Ref.string_of vm) (Opt.default "None" (Opt.map (fun x -> "Some " ^ (string_of_int x)) vnc_port_option)); +- vnc_port_option ++ debug "VM %s console port: %s" (Ref.string_of vm) (Opt.default "None" (Opt.map (fun x -> "Some " ^ (string_of_address x)) address_option)); ++ address_option + + let real_proxy __context _ _ vnc_port s = + try +- Http_svr.headers s (Http.http_200_ok ()); +- let vnc_sock = Unixext.open_connection_fd "127.0.0.1" vnc_port in +- (* Unixext.proxy closes fds itself so we must dup here *) +- let s' = Unix.dup s in +- debug "Connected; running proxy (between fds: %d and %d)" +- (Unixext.int_of_file_descr vnc_sock) (Unixext.int_of_file_descr s'); +- Unixext.proxy vnc_sock s'; +- debug "Proxy exited" +- with +- exn -> debug "error: %s" (ExnHelper.string_of_exn exn) ++ Http_svr.headers s (Http.http_200_ok ()); ++ let vnc_sock = match vnc_port with ++ | Port x -> Unixext.open_connection_fd "127.0.0.1" x ++ | Path x -> Unixext.open_connection_unix_fd x in ++ ++ (* Unixext.proxy closes fds itself so we must dup here *) ++ let s' = Unix.dup s in ++ debug "Connected; running proxy (between fds: %d and %d)" (Unixext.int_of_file_descr vnc_sock) (Unixext.int_of_file_descr s'); ++ Unixext.proxy vnc_sock s'; ++ debug "Proxy exited" ++ with ++ exn -> debug "error: %s" (ExnHelper.string_of_exn exn) + + let fake_proxy __context _ _ console s = + Rfb_randomtest.server s +@@ -78,7 +86,14 @@ let ensure_proxy_running () = + Thread.delay 1.0; + end + +-let ws_proxy __context req protocol port s = ++let ws_proxy __context req protocol address s = ++ let port = match address with ++ | Port p -> p ++ | Path _ -> ++ error "No implementation for web-sockets console proxy to a Unix domain socket"; ++ Http_svr.headers s (Http.http_501_method_not_implemented ()); ++ failwith "ws_proxy: not implemented" in ++ + ensure_proxy_running (); + let protocol = match protocol with + | `rfb -> "rfb" +@@ -202,7 +217,7 @@ let handler proxy_fn (req: Request.t) s _ = + (* Check VM is actually running locally *) + check_vm_is_running_here __context console; + +- match port_of_proxy __context console with ++ match address_of_console __context console with + | Some vnc_port -> + proxy_fn __context req protocol vnc_port s + | None -> diff --git a/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f b/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f deleted file mode 100644 index 50d43d0c..00000000 --- a/SOURCES/xen-api.a9f563a89e2b27d394573f8d542fc7e7a9068f5f +++ /dev/null @@ -1,68 +0,0 @@ -commit a9f563a89e2b27d394573f8d542fc7e7a9068f5f -Author: David Scott -Date: Thu May 1 14:49:43 2014 +0000 - - configure: add '--disable-tests' option - - Unfortunately the unit tests don't work when run as unpriviledged - users inside unprepared chroots. This allows them to be skipped. - - By default "./configure && make" will run the unit tests as before. - - Signed-off-by: David Scott - -diff --git a/Makefile b/Makefile -index 5b775f9..b712035 100644 ---- a/Makefile -+++ b/Makefile -@@ -35,7 +35,9 @@ all: version - omake -j 8 phase1 - omake -j 8 phase2 - omake -j 8 phase3 -+ifeq ($(DISABLE_TESTS),false) - @make test -+endif - - .PHONY: phase3 - phase3: -diff --git a/configure b/configure -index 034cfdd..ba095e6 100755 ---- a/configure -+++ b/configure -@@ -17,6 +17,10 @@ let path name default docv doc = - let doc = Printf.sprintf "Set the path for %s" doc in - Arg.(value & opt string default & info [name] ~docv ~doc) - -+let disable_tests = -+ let doc = "Disable the unit tests" in -+ Arg.(value & flag & info [ "disable-tests" ] ~doc) -+ - let varpatchdir = dir "varpatchdir" "/var/patch" "VARPATCHDIR" "hotfixes" - let etcdir = dir "etcdir" "/etc/xensource" "ETCDIR" "configuration files" - let optdir = dir "optdir" "/opt/xensource" "OPTDIR" "system files" -@@ -43,13 +47,14 @@ let output_file filename lines = - List.iter (output_string oc) lines; - close_out oc - --let configure varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir = -- Printf.printf "Configuring with the following params:\n\tvarpatchdir=%s\n\tetcdir=%s\n\toptdir=%s\n\tplugindir=%s\n\thooksdir=%s\n\tinventory=%s\n\txapiconf=%s\n\tlibexecdir=%s\n\tscriptsdir=%s\n\tsharedir=%s\n\twebdir=%s\n\txhadir=%s\n\tbindir=%s\n\tsbindir=%s\n\tudevdir=%s\n\n" varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir; -+let configure disable_tests varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir = -+ Printf.printf "Configuring with the following params:\n\tdisable_tests=%b\n\tvarpatchdir=%s\n\tetcdir=%s\n\toptdir=%s\n\tplugindir=%s\n\thooksdir=%s\n\tinventory=%s\n\txapiconf=%s\n\tlibexecdir=%s\n\tscriptsdir=%s\n\tsharedir=%s\n\twebdir=%s\n\txhadir=%s\n\tbindir=%s\n\tsbindir=%s\n\tudevdir=%s\n\n" disable_tests varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf libexecdir scriptsdir sharedir webdir xhadir bindir sbindir udevdir; - - (* Write config.mk *) - let lines = - [ "# Warning - this file is autogenerated by the configure script"; - "# Do not edit"; -+ Printf.sprintf "DISABLE_TESTS=%b" disable_tests; - Printf.sprintf "VARPATCHDIR=%s" varpatchdir; - Printf.sprintf "ETCDIR=%s" etcdir; - Printf.sprintf "OPTDIR=%s" optdir; -@@ -88,7 +93,7 @@ let configure varpatchdir etcdir optdir plugindir hooksdir inventory xapiconf li - in - output_file fhs_ml fhs_lines - --let configure_t = Term.(pure configure $ varpatchdir $ etcdir $ optdir $ plugindir $ hooksdir $ inventory $ xapiconf $ libexecdir $ scriptsdir $ sharedir $ webdir $ xhadir $ bindir $ sbindir $ udevdir ) -+let configure_t = Term.(pure configure $ disable_tests $ varpatchdir $ etcdir $ optdir $ plugindir $ hooksdir $ inventory $ xapiconf $ libexecdir $ scriptsdir $ sharedir $ webdir $ xhadir $ bindir $ sbindir $ udevdir ) - - let () = - match diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 7a33f43f..0dd53058 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -3,7 +3,7 @@ Summary: Xen toolstack for XCP Name: xapi Version: 1.9.52 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz @@ -12,6 +12,7 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam +Patch0: xen-api.8c68223753278ebe653ac9f3dfae2554525722cd BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -79,6 +80,7 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} +%patch0 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl @@ -161,6 +163,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Oct 17 2014 David Scott - 1.9.52-5 +- Add fix for Unix domain socket VNC consoles + * Thu Oct 2 2014 David Scott - 1.9.52-4 - Remove ocaml-libvhd dependency From 0998668da04634e2b7f6d1f743ddf9fbd059703e Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 17 Oct 2014 20:21:53 +0000 Subject: [PATCH 1094/1125] Update xapi-script-storage to 0.1.1 Signed-off-by: David Scott --- SPECS/xapi-storage-script.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/SPECS/xapi-storage-script.spec b/SPECS/xapi-storage-script.spec index 04765dff..8969fd0f 100644 --- a/SPECS/xapi-storage-script.spec +++ b/SPECS/xapi-storage-script.spec @@ -2,11 +2,11 @@ Summary: Xapi storage script plugin server Name: xapi-storage-script -Version: 0.1 +Version: 0.1.1 Release: 1%{?dist} License: LGPL+linking exception -URL: https://github.com/djs55/xapi-storage-script -Source0: https://github.com/djs55/xapi-storage-script/archive/v%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/xapi-project/xapi-storage-script +Source0: https://github.com/xapi-project/xapi-storage-script/archive/v%{version}/%{name}-%{version}.tar.gz Source1: xapi-storage-script-init Source2: xapi-storage-script-conf.in BuildRequires: ocaml @@ -40,6 +40,8 @@ install -m 0755 xapi-storage-script %{buildroot}/%{_sbindir}/xapi-storage-script mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 0755 xapi-storage-script-init %{buildroot}%{_sysconfdir}/init.d/xapi-storage-script mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script +mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script/volume +mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script/datapath mkdir -p %{buildroot}/etc install -m 0644 xapi-storage-script.conf %{buildroot}/etc/xapi-storage-script.conf mkdir -p %{buildroot}%{_mandir}/man2 @@ -60,8 +62,15 @@ fi /etc/init.d/xapi-storage-script %config(noreplace) /etc/xapi-storage-script.conf %{_libexecdir}/xapi-storage-script +%{_libexecdir}/xapi-storage-script/volume +%{_libexecdir}/xapi-storage-script/datapath %{_mandir}/man2/xapi-storage-script.1.gz %changelog +* Fri Oct 17 2014 David Scott - 0.1.1-1 +- Add the /volume and /datapath subdirectories to the package +- Fix daemonization +- Use syslog + * Thu Oct 16 2014 David Scott - 0.1-1 - Initial package From fa04249237e165bf0fdc363ed4bffef308c34176 Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 17 Oct 2014 20:22:13 +0000 Subject: [PATCH 1095/1125] Add ezlvm 0.1 Signed-off-by: David Scott --- SPECS/ezlvm.spec | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 SPECS/ezlvm.spec diff --git a/SPECS/ezlvm.spec b/SPECS/ezlvm.spec new file mode 100644 index 00000000..6288aed5 --- /dev/null +++ b/SPECS/ezlvm.spec @@ -0,0 +1,51 @@ +# -*- rpm-spec -*- + +Summary: Simple LVM storage adapter for xapi +Name: ezlvm +Version: 0.1 +Release: 1%{?dist} +License: LGPL +URL: https://github.com/xapi-project/ezlvm +Source0: https://github.com/xapi-project/ezlvm/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +BuildRequires: ocaml-findlib-devel +BuildRequires: xapi-storage-devel +BuildRequires: xapi-storage +BuildRequires: ocaml-re-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-uri-devel +BuildRequires: ocamlscript +BuildRequires: ocaml-ounit-devel +Requires: ocaml +Requires: ocaml-camlp4-devel +Requires: ocaml-findlib +Requires: ocaml-findlib-devel +Requires: xapi-storage-devel +Requires: xapi-storage +Requires: ocaml-re-devel +Requires: ocaml-cmdliner-devel +Requires: ocaml-uri-devel +Requires: ocamlscript +Requires: ocaml-ounit-devel + +%description +Simple LVM storage adapter for xapi + +%prep +%setup -q -n %{name}-%{version} + +%build +./volume/SR.ls --help=groff + +%install +DESTDIR=%{buildroot} SCRIPTSDIR=%{_libexecdir}/xapi-storage-script make install + +%files +%{_libexecdir}/xapi-storage-script/volume/org.xen.xcp.storage.ezlvm/* +%{_libexecdir}/xapi-storage-script/datapath/block/* + +%changelog +* Fri Oct 17 2014 David Scott - 0.1-1 +- Initial package From 7a9b08971f6727aa1b274db28e6585dbbbb221db Mon Sep 17 00:00:00 2001 From: David Scott Date: Fri, 17 Oct 2014 20:22:26 +0000 Subject: [PATCH 1096/1125] xenserver-core: depend on xapi-storage-script and ezlvm Signed-off-by: David Scott --- SPECS/xenserver-core.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec index eefdd9b4..44d97d4a 100644 --- a/SPECS/xenserver-core.spec +++ b/SPECS/xenserver-core.spec @@ -1,6 +1,6 @@ Name: xenserver-core Version: 0.10.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A virtual package which installs the xapi toolstack License: LGPL URL: http://www.xenserver.org/ @@ -17,6 +17,8 @@ Requires: xenops-cli Requires: ffs Requires: sm-cli Requires: xcp-sm +Requires: xapi-storage-script +Requires: ezlvm Requires: xcp-networkd Requires: xcp-rrdd Requires: squeezed @@ -41,6 +43,9 @@ install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README /usr/share/doc/xenserver/README %changelog +* Fri Oct 17 2014 David Scott - 0.10.0-3 +- Add dependency on xapi-storage-script and ezlvm + * Wed Aug 20 2014 David Scott - 0.10.0-2 - Add dependency on xenopsd-xenlight From 189487d5be0148363bd5c40dcccc5a631fac907c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sat, 18 Oct 2014 21:35:15 +0000 Subject: [PATCH 1097/1125] ezlvm: work around Makefile bugs Signed-off-by: David Scott --- SPECS/ezlvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ezlvm.spec b/SPECS/ezlvm.spec index 6288aed5..2044344f 100644 --- a/SPECS/ezlvm.spec +++ b/SPECS/ezlvm.spec @@ -40,7 +40,10 @@ Simple LVM storage adapter for xapi ./volume/SR.ls --help=groff %install -DESTDIR=%{buildroot} SCRIPTSDIR=%{_libexecdir}/xapi-storage-script make install +cd volume +DESTDIR=%{buildroot} SCRIPTDIR=%{_libexecdir}/xapi-storage-script/volume/org.xen.xcp.storage.ezlvm make install +cd ../datapath +DESTDIR=%{buildroot} SCRIPTDIR=%{_libexecdir}/xapi-storage-script/datapath/block make install %files %{_libexecdir}/xapi-storage-script/volume/org.xen.xcp.storage.ezlvm/* From 48f72b363e9053a6fe7a86b62a2b81f9e2fd6654 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 19 Oct 2014 10:39:31 +0000 Subject: [PATCH 1098/1125] ocaml-xen-lowlevel-libs: xenguest should only be in the runtime package Signed-off-by: David Scott --- SPECS/ocaml-xen-lowlevel-libs.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec index b86104b8..37ff5be8 100644 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ b/SPECS/ocaml-xen-lowlevel-libs.spec @@ -2,7 +2,7 @@ Name: ocaml-xen-lowlevel-libs Version: 0.9.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Xen hypercall bindings for OCaml License: LGPL URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs @@ -51,7 +51,6 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %files %doc README.md -%{_libexecdir}/xenopsd/xenguest %{_libdir}/ocaml/xenctrl %exclude %{_libdir}/ocaml/xenctrl/*.a %exclude %{_libdir}/ocaml/xenctrl/*.cmxa @@ -83,6 +82,9 @@ make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ %{_libexecdir}/xenopsd/xenguest %changelog +* Sun Oct 19 2014 David Scott - 0.9.25-4 +- xenguest should only be in the runtime package + * Thu Sep 4 2014 Jon Ludlam - 0.9.25-3 - Remove dependency on xen-missing-headers From eb9e1f4d7ff63bd292b65c9922e49ba89a83294e Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 19 Oct 2014 12:32:06 +0000 Subject: [PATCH 1099/1125] xenopsd: fix the videoram issue and the device id upgrade issue Signed-off-by: David Scott --- ...d.958171fc701559903af413b2ae6a4ee6dcfd8266 | 34 +++++++++++++ ...d.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 | 48 +++++++++++++++++++ SPECS/xenopsd.spec | 10 +++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 create mode 100644 SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 diff --git a/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 b/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 new file mode 100644 index 00000000..7d00ad2a --- /dev/null +++ b/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 @@ -0,0 +1,34 @@ +commit 958171fc701559903af413b2ae6a4ee6dcfd8266 +Author: David Scott +Date: Sun Oct 19 10:59:01 2014 +0000 + + xl: fix the 'upgrade' of Ide devices to Xen devices + + Without this patch a VM.start will hang in 'wait_for_plug' because + the hotplug script writes the xvda paths (51712) while xenopsd + waits for the hda paths (768) + + Signed-off-by: David Scott + +diff --git a/xl/xenops_server_xenlight.ml b/xl/xenops_server_xenlight.ml +index 97be1ee..6e741f9 100644 +--- a/xl/xenops_server_xenlight.ml ++++ b/xl/xenops_server_xenlight.ml +@@ -745,10 +745,15 @@ module VBD = struct + (* If no device number is provided then autodetect a free one *) + let device_number = + match vbd.position with +- | Some x -> x ++ | Some x -> ++ (* If the 'position' is on the Ide bus, we "upgrade" to ++ to the Xen bus instead *) ++ make (match spec x with ++ | Ide, disk, partition -> Xen, disk, partition ++ | x -> x) + | None -> + on_frontend (fun _ xs domid hvm -> +- make (free_device ~xs (if hvm then Ide else Xen) domid) ++ make (free_device ~xs Xen domid) + ) Newest vm + in + let devid = to_xenstore_key device_number in diff --git a/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 b/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 new file mode 100644 index 00000000..8d2624e8 --- /dev/null +++ b/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 @@ -0,0 +1,48 @@ +commit f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 +Author: David Scott +Date: Sun Oct 19 11:23:09 2014 +0000 + + CA-149017: libxl will reject 4MiB videoram with upstream qemu + + If the user asks for 4MiB (-- which is the xapi default, see + [xapi-project/xen-api#1989]) then, if xenopsd is using upstream + qemu, then it will emit a warning and transparently increase the + amount of videoram to the minimum (i.e. 8MiB) + + Signed-off-by: David Scott + +diff --git a/xl/xenops_server_xenlight.ml b/xl/xenops_server_xenlight.ml +index 97be1ee..a42cc40 100644 +--- a/xl/xenops_server_xenlight.ml ++++ b/xl/xenops_server_xenlight.ml +@@ -37,6 +37,12 @@ exception Restore_signature_mismatch + + exception Domain_stuck_in_dying_state of domid + ++let minimum_videoram mib = ++ let minimum = if !Xenopsd.use_upstream_qemu then 8 else 4 in ++ if mib < minimum ++ then warn "VM configuration has illegal videoram value: %d (minimum is %d) MiB. Using the minimum value instead." mib minimum; ++ max minimum mib ++ + (* libxl logging and context *) + + let vmessage min_level level errno ctx msg = +@@ -1598,7 +1604,7 @@ module VM = struct + | HVM hvm_info -> + Domain.BuildHVM { + Domain.shadow_multiplier = hvm_info.shadow_multiplier; +- video_mib = hvm_info.video_mib; ++ video_mib = minimum_videoram hvm_info.video_mib; + } + | PV { boot = Direct direct } -> + Domain.BuildPV { +@@ -1963,7 +1969,7 @@ module VM = struct + let video_memkb, shadow_memkb = + match vm.ty with + | HVM hvm_info -> +- Int64.mul (Int64.of_int hvm_info.video_mib) 1024L, ++ Int64.mul (Int64.of_int (minimum_videoram hvm_info.video_mib)) 1024L, + Int64.mul + (Memory.HVM.shadow_mib (max_memkb /// 1024L) max_vcpus hvm_info.shadow_multiplier) + 1024L diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec index bf397458..2a96f9e8 100644 --- a/SPECS/xenopsd.spec +++ b/SPECS/xenopsd.spec @@ -1,6 +1,6 @@ Name: xenopsd Version: 0.9.45 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple VM manager License: LGPL URL: https://github.com/xapi-project/xenopsd @@ -12,6 +12,8 @@ Source4: xenopsd-xenlight-init Source5: make-xsc-xenopsd.conf Source6: xenopsd-network-conf Source7: xenopsd-vncterm-wrapper +Patch0: xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 +Patch1: xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-findlib-devel @@ -79,6 +81,8 @@ Simple VM manager for Xen using libxenlight %prep %setup -q +%patch0 -p1 +%patch1 -p1 cp %{SOURCE1} xenopsd-xc-init cp %{SOURCE2} xenopsd-simulator-init cp %{SOURCE3} xenopsd-libvirt-init @@ -192,6 +196,10 @@ if [ $1 -eq 0 ]; then fi %changelog +* Sun Oct 19 2014 David Scott - 0.9.45-2 +- Add patch to fix the upstream qemu 4MiB videoram issue +- Add patch to fix the device id upgrade issue + * Tue Oct 14 2014 David Scott - 0.9.45-1 - Update to 0.9.45 From 6dd85e54f06f12e67f86f65f1042ddddea3bc372 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 19 Oct 2014 13:04:56 +0000 Subject: [PATCH 1100/1125] Upgrade xapi-storage-script to 0.1.2 Signed-off-by: David Scott --- SPECS/xapi-storage-script.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SPECS/xapi-storage-script.spec b/SPECS/xapi-storage-script.spec index 8969fd0f..b57b2b50 100644 --- a/SPECS/xapi-storage-script.spec +++ b/SPECS/xapi-storage-script.spec @@ -2,7 +2,7 @@ Summary: Xapi storage script plugin server Name: xapi-storage-script -Version: 0.1.1 +Version: 0.1.2 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xapi-project/xapi-storage-script @@ -67,6 +67,10 @@ fi %{_mandir}/man2/xapi-storage-script.1.gz %changelog +* Sun Oct 19 2014 David Scott - 0.1.2-1 +- Write the pidfile properly +- VDI.epoch_{begin,end} are no-ops + * Fri Oct 17 2014 David Scott - 0.1.1-1 - Add the /volume and /datapath subdirectories to the package - Fix daemonization From d2b1dddf1583a02c584b67f91b13125801e55385 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 19 Oct 2014 17:57:20 +0000 Subject: [PATCH 1101/1125] Update to xenserver-install-wizard 0.2.37 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index 9c26beca..c94bd349 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.36 +Version: 0.2.37 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard @@ -31,6 +31,9 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog +* Sun Oct 19 2014 David Scott - 0.2.37-1 +- Update to 0.2.37 + * Thu Aug 21 2014 David Scott - 0.2.36-1 - Update to 0.2.36 From b63ca37a88d520b661410f1eed26bc4d754f07cf Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 19 Oct 2014 20:22:49 +0000 Subject: [PATCH 1102/1125] xenserver-install-wizard: update to 0.2.38 Signed-off-by: David Scott --- SPECS/xenserver-install-wizard.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec index c94bd349..786f5dfc 100644 --- a/SPECS/xenserver-install-wizard.spec +++ b/SPECS/xenserver-install-wizard.spec @@ -2,7 +2,7 @@ Summary: A simple wizard to configure a XenServer Name: xenserver-install-wizard -Version: 0.2.37 +Version: 0.2.38 Release: 1%{?dist} License: LGPL+linking exception URL: https://github.com/xenserver/xenserver-install-wizard @@ -31,8 +31,8 @@ ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroo %{_bindir}/xenserver-install-wizard %changelog -* Sun Oct 19 2014 David Scott - 0.2.37-1 -- Update to 0.2.37 +* Sun Oct 19 2014 David Scott - 0.2.38-1 +- Update to 0.2.38 * Thu Aug 21 2014 David Scott - 0.2.36-1 - Update to 0.2.36 From a6332fe70ffea3443b52c2a29d0bf0bbcfd07234 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 21 Oct 2014 14:15:55 +0100 Subject: [PATCH 1103/1125] cppo: Switch to GitHub sources Signed-off-by: Euan Harris --- SPECS/cppo.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec index d0c4edb8..e1c93048 100644 --- a/SPECS/cppo.spec +++ b/SPECS/cppo.spec @@ -1,10 +1,11 @@ Name: cppo Version: 0.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Equivalent of the C preprocessor for OCaml License: BSD3 URL: http://mjambon.com/cppo.html -Source0: http://mjambon.com/releases/%{name}/%{name}-%{version}.tar.gz +Source0: https://github.com/mjambon/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz + BuildRequires: ocaml %description @@ -26,6 +27,9 @@ make install BINDIR=%{buildroot}/%{_bindir} %{_bindir}/cppo %changelog +* Tue Oct 21 2014 Euan Harris - 0.9.3-2 +- Switch to GitHub sources + * Fri May 31 2013 David Scott - 0.9.3-1 - Initial package From 3dab53197d93d8b600de77f1ec8cdb08c608c497 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 21 Oct 2014 14:22:17 +0100 Subject: [PATCH 1104/1125] ocaml-easy-format: Switch to GitHub sources Signed-off-by: Euan Harris --- SPECS/ocaml-easy-format.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-easy-format.spec b/SPECS/ocaml-easy-format.spec index e23c775e..544493fe 100644 --- a/SPECS/ocaml-easy-format.spec +++ b/SPECS/ocaml-easy-format.spec @@ -1,10 +1,10 @@ Name: ocaml-easy-format Version: 1.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Indentation made easy License: BSD3 URL: http://mjambon.com/easy-format.html -Source0: http://mjambon.com/releases/easy-format/easy-format-%{version}.tar.gz +Source0: https://github.com/mjambon/easy-format/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib Obsoletes: easy-format <= 1.0.1 @@ -43,6 +43,9 @@ make install %{_libdir}/ocaml/easy-format/*.mli %changelog +* Tue Oct 21 2014 Euan Harris - 1.0.1-3 +- Switch to GitHub sources + * Fri May 30 2014 Euan Harris - 1.0.1-2 - Split files correctly between base and devel packages From 2c14dc259e0397e14dfcdfb96b8e50a69850225a Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 21 Oct 2014 14:22:54 +0100 Subject: [PATCH 1105/1125] ocaml-biniou: Switch to GitHub sources Signed-off-by: Euan Harris --- SPECS/ocaml-biniou.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec index 70d1c4a0..65a9a4c2 100644 --- a/SPECS/ocaml-biniou.spec +++ b/SPECS/ocaml-biniou.spec @@ -2,11 +2,11 @@ Name: ocaml-biniou Version: 1.0.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Compact, fast and extensible serialization format License: BSD3 URL: http://mjambon.com/biniou.html -Source0: http://mjambon.com/releases/biniou/biniou-%{version}.tar.gz +Source0: https://github.com/mjambon/biniou/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-easy-format-devel BuildRequires: ocaml-findlib @@ -54,6 +54,9 @@ make install BINDIR=%{buildroot}/%{_bindir} %{_libdir}/ocaml/biniou/*.mli %changelog +* Tue Oct 21 2014 Euan Harris - 1.0.6-3 +- Switch to GitHub sources + * Fri May 30 2014 Euan Harris - 1.0.6-2 - Split files correctly between base and devel packages From f6507152baf2cda30c9d47ff9c0e1b2f2433ef29 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 21 Oct 2014 14:27:16 +0100 Subject: [PATCH 1106/1125] ocaml-yojson: Switch to GitHub sources Signed-off-by: Euan Harris --- SPECS/ocaml-yojson.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec index 1e271ab1..41e2fec6 100644 --- a/SPECS/ocaml-yojson.spec +++ b/SPECS/ocaml-yojson.spec @@ -2,11 +2,11 @@ Name: ocaml-yojson Version: 1.1.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A JSON parser and printer for OCaml License: BSD3 URL: http://mjambon.com/yojson.html -Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz +Source0: https://github.com/mjambon/yojson/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cppo BuildRequires: ocaml BuildRequires: ocaml-biniou-devel @@ -51,6 +51,9 @@ make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} %{_libdir}/ocaml/yojson/*.mli %changelog +* Tue Oct 21 2014 Euan Harris - 1.1.6-3 +- Switch to GitHub sources + * Fri May 30 2014 Euan Harris - 1.1.6-2 - Split files correctly between base and devel packages From 8989ed961a6698ed833b955c6a41476998186164 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 23 Oct 2014 15:19:15 +0000 Subject: [PATCH 1107/1125] Update ocaml-sexplib to 111.25, otherwise jessie's current version gazumps us Signed-off-by: David Scott --- SPECS/ocaml-sexplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec index 783d6728..87d84373 100644 --- a/SPECS/ocaml-sexplib.spec +++ b/SPECS/ocaml-sexplib.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ocaml-sexplib -Version: 111.17.00 +Version: 111.25.00 Release: 1%{?dist} Summary: Convert values to and from s-expressions in OCaml @@ -78,6 +78,9 @@ make install %{_libdir}/ocaml/sexplib_unix/*.cmxa %changelog +* Thu Oct 23 2014 David Scott - 111.25.00-1 +- Update to 111.25.00 + * Wed Jul 16 2014 David Scott - 111.17.00-1 - Update to 111.17.00 for Mirage compat From 5344759b6ae65e40ef5651791c36f2bf03ea493b Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 23 Oct 2014 15:35:42 +0000 Subject: [PATCH 1108/1125] Jessie now has libxen-4.4 Fixes #557 Signed-off-by: David Scott --- scripts/lib/mappkgname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/mappkgname.py b/scripts/lib/mappkgname.py index f11f4dcf..48550ebc 100755 --- a/scripts/lib/mappkgname.py +++ b/scripts/lib/mappkgname.py @@ -10,7 +10,7 @@ 'debian:jessie/sid': { 'kernel': ['linux-image-amd64'], 'kernel-firmware': ['firmware-linux-free'], - "xen-libs": ["libxen-4.3"], + "xen-libs": ["libxen-4.4"], }, 'ubuntu:14.04': { "xen-libs": ["libxen-4.4"], From ec783565bb73f3efbcf0b0789323d694470ae786 Mon Sep 17 00:00:00 2001 From: David Scott Date: Thu, 23 Oct 2014 17:11:17 +0000 Subject: [PATCH 1109/1125] Add a 'Status by distro' section Fixes #557 Signed-off-by: David Scott --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 83fc9ee7..615c3c95 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,15 @@ make install xenserver-install-wizard reboot ``` + +Status by distro +---------------- + +Some distros get more attention that others and are likely to work better, on average. +Here are the distros which are being actively used: + +- Ubuntu-14.04: @djs55 +- CentOS 6.5: @euanh + +If you are actively using a distro and feel able to fix bugs in it, please add yourself +to the list. From 28b73c66ac9154847b043d17aafbc0721b737091 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Tue, 28 Oct 2014 14:32:15 +0000 Subject: [PATCH 1110/1125] Update to latest xapi. Requires ocaml-rrd-transport and ocaml-rrdd-plugin updates too. Signed-off-by: Jon Ludlam --- SPECS/ocaml-rrd-transport.spec | 5 ++- SPECS/ocaml-rrdd-plugin.spec | 76 ++++++++++++++++++++++++++++++++++ SPECS/xapi.spec | 10 +++-- 3 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 SPECS/ocaml-rrdd-plugin.spec diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec index 2effe0dd..cf6bb246 100644 --- a/SPECS/ocaml-rrd-transport.spec +++ b/SPECS/ocaml-rrd-transport.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: ocaml-rrd-transport -Version: 0.7.1 +Version: 0.7.2 Release: 1%{?dist} Summary: Shared-memory protocols for transmitting RRD data License: LGPL2.1 + OCaml linking exception @@ -82,6 +82,9 @@ ocaml setup.ml -install %{_libdir}/ocaml/rrd-transport/rrd_writer.mli %changelog +* Fri Oct 24 2014 Jon Ludlam - 0.7.2-1 +- Update to 0.7.2 + * Sat Apr 26 2014 David Scott - 0.7.1-1 - Update to 0.7.1 diff --git a/SPECS/ocaml-rrdd-plugin.spec b/SPECS/ocaml-rrdd-plugin.spec new file mode 100644 index 00000000..8816b31b --- /dev/null +++ b/SPECS/ocaml-rrdd-plugin.spec @@ -0,0 +1,76 @@ +Name: ocaml-rrdd-plugin +Version: 0.6.1 +Release: 1%{?dist} +Summary: Plugin library for the XenServer RRD daemon +License: LGPL2.1 + OCaml linking exception +Group: Development/Other +URL: https://github.com/xapi-project/ocaml-rrdd-plugin/ +Source0: https://github.com/xapi-project/ocaml-rrdd-plugin/archive/%{version}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-xcp-rrd-devel +BuildRequires: ocaml-xcp-idl-devel +BuildRequires: forkexecd-devel +BuildRequires: ocaml-rrd-transport-devel +BuildRequires: ocaml-stdext-devel +BuildRequires: ocaml-xenstore-devel +BuildRequires: ocaml-xenstore-clients-devel +BuildRequires: ocaml-ocamldoc + +%description +Plugin library for the XenServer RRD daemon. + +%package devel +Summary: Development files for %{name} +Group: Development/Other +Requires: %{name} = %{version}-%{release} +Requires: forkexecd-devel%{?_isa} +Requires: ocaml-stdext-devel%{?_isa} +Requires: ocaml-xcp-idl-devel%{?_isa} +Requires: ocaml-xcp-rrd-devel%{?_isa} +Requires: ocaml-rrd-transport-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_libdir}/ocaml +export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml +make install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc LICENSE +%{_libdir}/ocaml/rrdd-plugin +%exclude %{_libdir}/ocaml/rrdd-plugin/*.a +%exclude %{_libdir}/ocaml/rrdd-plugin/*.cmx +%exclude %{_libdir}/ocaml/rrdd-plugin/*.cmxa +%exclude %{_libdir}/ocaml/rrdd-plugin/*.mli + +%files devel +%defattr(-,root,root) +%doc ChangeLog +%doc README.md +%{_libdir}/ocaml/rrdd-plugin/*.a +%{_libdir}/ocaml/rrdd-plugin/*.cmx +%{_libdir}/ocaml/rrdd-plugin/*.cmxa +%{_libdir}/ocaml/rrdd-plugin/*.mli + +%changelog +* Fri Oct 24 2014 Jon Ludlam - 0.6.1-1 +- New release + +* Tue Jul 8 2014 John Else - 0.5.0-1 +- Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 0dd53058..74bc2b0c 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -2,8 +2,8 @@ Summary: Xen toolstack for XCP Name: xapi -Version: 1.9.52 -Release: 5%{?dist} +Version: 1.9.57 +Release: 1%{?dist} License: LGPL+linking exception URL: http://www.xen.org Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz @@ -12,7 +12,6 @@ Source2: xen-api-init Source3: xen-api-xapissl Source4: xen-api-db-conf Source5: xen-api-pam -Patch0: xen-api.8c68223753278ebe653ac9f3dfae2554525722cd BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib @@ -51,6 +50,7 @@ BuildRequires: ocaml-xenstore-clients-devel BuildRequires: ocaml-xcp-rrd-devel BuildRequires: ocaml-tar-devel BuildRequires: python2-devel +BuildRequires: ocaml-rrdd-plugin-devel Requires: hwdata Requires: ocaml-xcp-inventory Requires: redhat-lsb-core @@ -80,7 +80,6 @@ Libraries for writing XenAPI clients in python. %prep %setup -q -n xen-api-%{version} -%patch0 -p1 cp %{SOURCE1} xen-api-xapi-conf.in cp %{SOURCE2} xen-api-init cp %{SOURCE3} xen-api-xapissl @@ -163,6 +162,9 @@ fi %{python_sitelib}/XenAPIPlugin.pyc %changelog +* Fri Oct 24 2014 Jon Ludlam - 1.9.57-1 +- update to 1.9.57 + * Fri Oct 17 2014 David Scott - 1.9.52-5 - Add fix for Unix domain socket VNC consoles From f82473e432ca476f95e9371c33d7adb4dc6421e2 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 28 Oct 2014 12:09:40 +0000 Subject: [PATCH 1111/1125] Update cstruct to 1.4.0 Signed-off-by: David Scott --- SPECS/ocaml-cstruct.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index 94e745c1..c5cc417d 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -1,17 +1,19 @@ %global debug_package %{nil} Name: ocaml-cstruct -Version: 0.7.1 -Release: 3%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: Read and write low-level C-style structures in OCaml License: ISC URL: https://github.com/mirage/ocaml-cstruct -Source0: https://github.com/mirage/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocplib-endian-devel +BuildRequires: ocaml-ounit-devel +BuildRequires: ocaml-sexplib-devel %description Read and write low-level C-style structures in OCaml. @@ -20,17 +22,17 @@ Read and write low-level C-style structures in OCaml. Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: ocaml-ocplib-endian-devel%{?_isa} +Requires: ocaml-sexplib-devel%{?_isa} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q -n %{name}-%{version} %build -ocaml setup.ml -configure --enable-lwt -ocaml setup.ml -build +make %install export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml @@ -57,6 +59,9 @@ ocaml setup.ml -install DESTDIR=%{buildroot} %{_libdir}/ocaml/cstruct/*.mli %changelog +* Tue Oct 28 2014 David Scott - 1.4.0-1 +- Update to 1.4.0 + * Fri May 30 2014 Euan Harris - 0.7.1-3 - Split files correctly between base and devel packages From 488a70a1b8120d90abd9c6fdafa6ab0717691524 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 28 Oct 2014 22:30:44 +0000 Subject: [PATCH 1112/1125] ocaml-cstruct: fix RPM build Signed-off-by: David Scott --- SPECS/ocaml-cstruct.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec index c5cc417d..b6950f75 100644 --- a/SPECS/ocaml-cstruct.spec +++ b/SPECS/ocaml-cstruct.spec @@ -9,6 +9,7 @@ URL: https://github.com/mirage/ocaml-cstruct Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib BuildRequires: ocaml-lwt-devel BuildRequires: ocaml-ocplib-endian-devel From a183f8f13018fd2dc2deb065dbb1fe710282a834 Mon Sep 17 00:00:00 2001 From: David Scott Date: Tue, 28 Oct 2014 22:31:06 +0000 Subject: [PATCH 1113/1125] ocaml-cohttp: fix RPM build Signed-off-by: David Scott --- SPECS/ocaml-cohttp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec index b5e438b4..52462ce7 100644 --- a/SPECS/ocaml-cohttp.spec +++ b/SPECS/ocaml-cohttp.spec @@ -79,6 +79,7 @@ make install %files bin %{_prefix}/bin/cohttp-server-lwt +%{_prefix}/bin/cohttp-server-async %changelog * Tue Oct 14 2014 David Scott - 0.11.2-2 From a60623a8ce116c5c57d034e979165dcc56b4b06c Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 29 Oct 2014 13:31:44 +0000 Subject: [PATCH 1114/1125] Update the config file with the necessary parameters Signed-off-by: Jon Ludlam --- SOURCES/xen-api-xapi-conf.in | 52 ++++++++++++++++++++++++++++++++++++ SPECS/xapi.spec | 3 ++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index 0d8fae70..26476c20 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -192,3 +192,55 @@ udhcpd = /bin/true # The delay between each attempt to connect to the block device I/O # process # redo_log_connect_delay = 0.1 + +# The script executed when likewise domain-leave fails +lw-force-domain-leave-script = /bin/false + +# Used by the redo log for block device IO +redo-log-block-device-io = /bin/false + +# Path to sparse_dd +sparse_dd = /usr/lib/xapi/sparse_dd + +# Path to fence binary, used for HA host fencing +fence = /bin/false + +# Path to host-bugreport-upload +host-bugreport-upload=/bin/false + +# Path to set-hostname +set-hostname=/bin/false + +# Path to xe-syslog-reconfigure +xe-syslog-reconfigure=/bin/false + +# Used by /get_host_logs_download HTTP handler +logs-download=/bin/false + +# Executed when changing the management interface +update-mh-info=/bin/false + +# Used by Host_crashdump.upload +upload-wrapper=/bin/false + +# Path to host-backup +host-backup=/bin/false + +# Path to host-restore +host-restore=/bin/false + +# Path to xe-toolstack-restart script +xe-toolstack-restart=/bin/false + +# Path to xsh binary +xsh=/bin/false + +# Path to static-vdis script +static-vdis=/bin/false + +# Database configuration file +db-config-file=/etc/xapi/db.conf + +# DHCP skeleton configuration file +udhcpd-skel=/etc/xcp/udhcpd.skel + diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec index 74bc2b0c..775bdbe4 100644 --- a/SPECS/xapi.spec +++ b/SPECS/xapi.spec @@ -124,7 +124,7 @@ mkdir -p %{buildroot}/usr/share/xapi/packages/iso mkdir -p %{buildroot}%{python_sitelib} install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}%{python_sitelib} install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}%{python_sitelib} - +install -m 0644 scripts/udhcpd.skel %{buildroot}/etc/xcp/udhcpd.skel %post [ ! -x /sbin/chkconfig ] || chkconfig --add xapi @@ -140,6 +140,7 @@ fi /etc/init.d/xapi %config(noreplace) /etc/xapi.conf %config(noreplace) /etc/xcp/pool.conf +%config(noreplace) /etc/xcp/udhcpd.skel %{_libexecdir}/xapi/xapissl %{_libexecdir}/xapi/update-mh-info /etc/xapi/db.conf From f2b654b542b5a56783641339e2b2cbcbea5f4d43 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 22:00:50 +0000 Subject: [PATCH 1115/1125] Previous xapi.conf only worked on ubuntu. This one works on CentOS too Signed-off-by: Jon Ludlam --- SOURCES/xen-api-xapi-conf.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in index 26476c20..fb338d69 100644 --- a/SOURCES/xen-api-xapi-conf.in +++ b/SOURCES/xen-api-xapi-conf.in @@ -2,6 +2,7 @@ # a section for paths to helper utilities; and a timeout tweak section. # Global policy: ################################################# +search-path=/usr/lib/xapi:/usr/libexec/xapi # The full list of xenopsd instances to manage. These must all be running. xenopsd-queues = org.xen.xcp.xenops.xenlight @@ -199,9 +200,6 @@ lw-force-domain-leave-script = /bin/false # Used by the redo log for block device IO redo-log-block-device-io = /bin/false -# Path to sparse_dd -sparse_dd = /usr/lib/xapi/sparse_dd - # Path to fence binary, used for HA host fencing fence = /bin/false From 1c4a02c6d876840ae2f8abfb7b0ec4b38a167d75 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 31 Oct 2014 12:01:28 +0000 Subject: [PATCH 1116/1125] Remove unneeded buildroot files, and move scripts into planex Signed-off-by: Jon Ludlam --- SOURCES/_libxl_list.h | 651 -- SOURCES/_libxl_types.h | 609 -- SOURCES/_libxl_types_json.h | 54 - SOURCES/ffs-init | 104 - SOURCES/forkexecd-init | 94 - ...ystem-i386-as-binary-instead-of-qemu.patch | 27 - SOURCES/libvirt-dbus.patch | 225 - SOURCES/libvirt-emulator.patch | 46 - SOURCES/libvirt-qdisk-fixup.patch | 31 - SOURCES/libvirt-qdisk.patch | 40 - SOURCES/libvirt-save-with-session.patch | 303 - SOURCES/libxl.h | 938 -- SOURCES/libxl_event.h | 550 -- SOURCES/libxl_json.h | 88 - SOURCES/libxl_utils.h | 142 - SOURCES/libxl_uuid.h | 72 - SOURCES/make-xsc-xenopsd.conf | 32 - SOURCES/message-switch-init | 96 - SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch | 13 - SOURCES/ocaml-jsonm-setup.ml.patch | 7918 ----------------- ...1-252568550f9bf28b07f4e6d116485205e58afe4a | 105 - ...0-0d103e429ddc7942e537a047c8a46ca7ddc58e46 | 1648 ---- ...1-658970236caa31bbef44562c521d55b9a4689f4d | 214 - ...2-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 | 18 - SOURCES/ocaml-libvirt-13-fixbuild | 47 - ...2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 | 263 - ...3-34a472800ba1908e910318cc5d5ed9588174c1cf | 67 - ...4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 | 37 - ...5-2360cd228542c6a523f10daacbd631a753d17208 | 61 - ...6-7568d6f77d72a77c527cc282511f7a3f37dc7040 | 40 - ...7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 | 23 - ...8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d | 2479 ------ ...9-0ec198e7784de1a49672183c961a2498b6c85b90 | 73 - SOURCES/ocaml-mirage-xen.install.sh | 24 - SOURCES/ocaml-omd-setup.ml.patch | 7877 ---------------- SOURCES/ocaml-opasswd-ocaml-4.00.1.patch | 5373 ----------- SOURCES/oclock-1-cc-headers | 24 - SOURCES/oclock-2-destdir | 40 - SOURCES/omake-1-warnings | 12 - SOURCES/react-LICENSE | 32 - SOURCES/sm-path-fix.patch | 48 - SOURCES/squeezed-conf | 23 - SOURCES/squeezed-init | 94 - SOURCES/uuidm.oasis.patch | 6603 -------------- SOURCES/vhd-tool-sparse_dd-conf | 15 - SOURCES/vncterm-1-fix-build | 31 - SOURCES/xapi-libvirt-storage-init | 94 - SOURCES/xapi-storage-script-conf.in | 2 - SOURCES/xapi-storage-script-init | 96 - SOURCES/xapi-storage.patch | 30 - SOURCES/xcp-mpath-scsidev-rules | 5 - SOURCES/xcp-mpath-scsidev-script | 119 - SOURCES/xcp-networkd-bridge-conf | 4 - SOURCES/xcp-networkd-conf | 3 - SOURCES/xcp-networkd-init | 94 - SOURCES/xcp-networkd-network-conf | 1 - SOURCES/xcp-rrdd-init | 94 - SOURCES/xcp-sm-pylint-fix.patch | 44 - SOURCES/xen-api-db-conf | 4 - SOURCES/xen-api-init | 125 - SOURCES/xen-api-pam | 3 - SOURCES/xen-api-xapi-conf.in | 244 - SOURCES/xen-api-xapissl | 146 - ...i.8c68223753278ebe653ac9f3dfae2554525722cd | 114 - ...eaders_usr_include_xen_arch-arm_hvm_save.h | 1 - SOURCES/xenopsd-libvirt-init | 94 - SOURCES/xenopsd-network-conf | 1 - SOURCES/xenopsd-simulator-init | 94 - SOURCES/xenopsd-vncterm-wrapper | 43 - SOURCES/xenopsd-xc-init | 102 - SOURCES/xenopsd-xenlight-init | 94 - ...d.958171fc701559903af413b2ae6a4ee6dcfd8266 | 34 - ...d.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 | 48 - SOURCES/xenserver-readme | 1 - SPECS/blktap.spec | 67 - SPECS/cppo.spec | 35 - SPECS/deriving-ocsigen.spec | 56 - SPECS/ezlvm.spec | 54 - SPECS/ffs.spec | 88 - SPECS/forkexecd.spec | 85 - SPECS/libnl3.spec | 93 - SPECS/linux-guest-loader.spec | 50 - SPECS/message-switch.spec | 89 - SPECS/mirage-testvm.spec | 56 - SPECS/oasis.spec | 95 - SPECS/ocaml-async-extra.spec | 112 - SPECS/ocaml-async-find.spec | 103 - SPECS/ocaml-async-inotify.spec | 114 - SPECS/ocaml-async-kernel.spec | 116 - SPECS/ocaml-async-unix.spec | 110 - SPECS/ocaml-async.spec | 113 - SPECS/ocaml-bin-prot.spec | 176 - SPECS/ocaml-biniou.spec | 65 - SPECS/ocaml-camomile.spec | 199 - SPECS/ocaml-cdrom.spec | 61 - SPECS/ocaml-cmdliner.spec | 68 - SPECS/ocaml-cohttp.spec | 96 - SPECS/ocaml-comparelib.spec | 101 - SPECS/ocaml-conduit.spec | 64 - SPECS/ocaml-core-kernel.spec | 123 - SPECS/ocaml-core.spec | 137 - SPECS/ocaml-cow.spec | 84 - SPECS/ocaml-crc.spec | 64 - SPECS/ocaml-cstruct.spec | 74 - SPECS/ocaml-ctypes.spec | 59 - SPECS/ocaml-custom-printf.spec | 104 - SPECS/ocaml-dyntype.spec | 47 - SPECS/ocaml-easy-format.spec | 54 - SPECS/ocaml-enumerate.spec | 68 - SPECS/ocaml-evtchn.spec | 73 - SPECS/ocaml-ezjsonm.spec | 57 - SPECS/ocaml-fd-send-recv.spec | 61 - SPECS/ocaml-fieldslib.spec | 67 - SPECS/ocaml-fileutils.spec | 186 - SPECS/ocaml-gnt.spec | 71 - SPECS/ocaml-herelib.spec | 100 - SPECS/ocaml-inotify.spec | 106 - SPECS/ocaml-io-page.spec | 63 - SPECS/ocaml-ipaddr.spec | 59 - SPECS/ocaml-jsonm.spec | 79 - SPECS/ocaml-lambda-term.spec | 80 - SPECS/ocaml-libvirt.spec | 296 - SPECS/ocaml-lwt.spec | 135 - SPECS/ocaml-mirage-block-xen.spec | 67 - SPECS/ocaml-mirage-clock-unix.spec | 53 - SPECS/ocaml-mirage-clock-xen.spec | 53 - SPECS/ocaml-mirage-console-xen.spec | 57 - SPECS/ocaml-mirage-types.spec | 58 - SPECS/ocaml-mirage-xen.spec | 76 - SPECS/ocaml-mirage.spec | 69 - SPECS/ocaml-nbd.spec | 73 - SPECS/ocaml-netdev.spec | 70 - SPECS/ocaml-netlink.spec | 65 - SPECS/ocaml-obuild.spec | 45 - SPECS/ocaml-oclock.spec | 60 - SPECS/ocaml-ocplib-endian.spec | 71 - SPECS/ocaml-odn.spec | 59 - SPECS/ocaml-omd.spec | 72 - SPECS/ocaml-opasswd.spec | 67 - SPECS/ocaml-ounit.spec | 121 - SPECS/ocaml-pa-bench.spec | 102 - SPECS/ocaml-pa-ounit.spec | 101 - SPECS/ocaml-pa-pipebang.spec | 103 - SPECS/ocaml-pa-test.spec | 101 - SPECS/ocaml-qmp.spec | 71 - SPECS/ocaml-re.spec | 64 - SPECS/ocaml-react.spec | 87 - SPECS/ocaml-rpc.spec | 58 - SPECS/ocaml-rrd-transport.spec | 92 - SPECS/ocaml-rrdd-plugin.spec | 76 - SPECS/ocaml-sexplib.spec | 92 - SPECS/ocaml-sha.spec | 52 - SPECS/ocaml-shared-memory-ring.spec | 60 - SPECS/ocaml-ssl.spec | 72 - SPECS/ocaml-stdext.spec | 72 - SPECS/ocaml-stringext.spec | 56 - SPECS/ocaml-tapctl.spec | 73 - SPECS/ocaml-tar.spec | 62 - SPECS/ocaml-testvmlib.spec | 78 - SPECS/ocaml-text.spec | 72 - SPECS/ocaml-textutils.spec | 108 - SPECS/ocaml-type-conv.spec | 61 - SPECS/ocaml-typerep.spec | 118 - SPECS/ocaml-ulex.spec | 37 - SPECS/ocaml-uri.spec | 72 - SPECS/ocaml-uuidm.spec | 66 - SPECS/ocaml-uutf.spec | 68 - SPECS/ocaml-variantslib.spec | 98 - SPECS/ocaml-vchan.spec | 68 - SPECS/ocaml-vhd.spec | 97 - SPECS/ocaml-xcp-idl.spec | 106 - SPECS/ocaml-xcp-inventory.spec | 61 - SPECS/ocaml-xcp-rrd.spec | 64 - SPECS/ocaml-xen-api-client.spec | 84 - SPECS/ocaml-xen-api-libs-transitional.spec | 207 - SPECS/ocaml-xen-lowlevel-libs.spec | 141 - SPECS/ocaml-xenops.spec | 93 - SPECS/ocaml-xenstore-clients.spec | 67 - SPECS/ocaml-xenstore.spec | 73 - SPECS/ocaml-xmlm.spec | 71 - SPECS/ocaml-yojson.spec | 62 - SPECS/ocaml-zed.spec | 67 - SPECS/ocamlify.spec | 35 - SPECS/ocamlmod.spec | 34 - SPECS/ocamlscript.spec | 46 - SPECS/omake.spec | 82 - SPECS/opam.spec | 42 - SPECS/optcomp.spec | 45 - SPECS/sm-cli.spec | 40 - SPECS/squeezed.spec | 86 - SPECS/utop.spec | 50 - SPECS/vhd-tool.spec | 74 - SPECS/vncterm.spec | 47 - SPECS/xapi-libvirt-storage.spec | 60 - SPECS/xapi-quicktest.spec | 47 - SPECS/xapi-storage-script.spec | 80 - SPECS/xapi-storage.spec | 87 - SPECS/xapi.spec | 267 - SPECS/xcp-networkd.spec | 100 - SPECS/xcp-python-libs.spec | 39 - SPECS/xcp-rrdd.spec | 84 - SPECS/xcp-sm.spec | 339 - SPECS/xe-create-templates.spec | 47 - SPECS/xenops-cli.spec | 36 - SPECS/xenopsd.spec | 295 - SPECS/xenserver-core.spec | 74 - SPECS/xenserver-install-wizard.spec | 94 - SPECS/xsconsole.spec | 41 - SPECS/xsiostat.spec | 30 - configure.sh | 30 - ignore.Linaro.trusty | 13 - ignore.Ubuntu.trusty | 5 - ignore.default | 0 {scripts/lib => planex}/debianchangelog.py | 0 {scripts/lib => planex}/debiancontrol.py | 0 {scripts/lib => planex}/debianmisc.py | 0 {scripts/lib => planex}/debianrules.py | 0 {scripts => planex}/downloader.py | 0 {scripts/lib => planex}/mappkgname.py | 0 {scripts/lib => planex}/rpmextra.py | 0 {scripts/lib => planex}/tree.py | 0 scripts/lib/__init__.py | 0 222 files changed, 50469 deletions(-) delete mode 100644 SOURCES/_libxl_list.h delete mode 100644 SOURCES/_libxl_types.h delete mode 100644 SOURCES/_libxl_types_json.h delete mode 100755 SOURCES/ffs-init delete mode 100755 SOURCES/forkexecd-init delete mode 100644 SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch delete mode 100644 SOURCES/libvirt-dbus.patch delete mode 100644 SOURCES/libvirt-emulator.patch delete mode 100644 SOURCES/libvirt-qdisk-fixup.patch delete mode 100644 SOURCES/libvirt-qdisk.patch delete mode 100644 SOURCES/libvirt-save-with-session.patch delete mode 100644 SOURCES/libxl.h delete mode 100644 SOURCES/libxl_event.h delete mode 100644 SOURCES/libxl_json.h delete mode 100644 SOURCES/libxl_utils.h delete mode 100644 SOURCES/libxl_uuid.h delete mode 100755 SOURCES/make-xsc-xenopsd.conf delete mode 100755 SOURCES/message-switch-init delete mode 100644 SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch delete mode 100644 SOURCES/ocaml-jsonm-setup.ml.patch delete mode 100644 SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a delete mode 100644 SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 delete mode 100644 SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d delete mode 100644 SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 delete mode 100644 SOURCES/ocaml-libvirt-13-fixbuild delete mode 100644 SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 delete mode 100644 SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf delete mode 100644 SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 delete mode 100644 SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 delete mode 100644 SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 delete mode 100644 SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 delete mode 100644 SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d delete mode 100644 SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 delete mode 100755 SOURCES/ocaml-mirage-xen.install.sh delete mode 100644 SOURCES/ocaml-omd-setup.ml.patch delete mode 100644 SOURCES/ocaml-opasswd-ocaml-4.00.1.patch delete mode 100644 SOURCES/oclock-1-cc-headers delete mode 100644 SOURCES/oclock-2-destdir delete mode 100644 SOURCES/omake-1-warnings delete mode 100644 SOURCES/react-LICENSE delete mode 100644 SOURCES/sm-path-fix.patch delete mode 100644 SOURCES/squeezed-conf delete mode 100755 SOURCES/squeezed-init delete mode 100644 SOURCES/uuidm.oasis.patch delete mode 100644 SOURCES/vhd-tool-sparse_dd-conf delete mode 100644 SOURCES/vncterm-1-fix-build delete mode 100755 SOURCES/xapi-libvirt-storage-init delete mode 100644 SOURCES/xapi-storage-script-conf.in delete mode 100755 SOURCES/xapi-storage-script-init delete mode 100644 SOURCES/xapi-storage.patch delete mode 100644 SOURCES/xcp-mpath-scsidev-rules delete mode 100755 SOURCES/xcp-mpath-scsidev-script delete mode 100644 SOURCES/xcp-networkd-bridge-conf delete mode 100644 SOURCES/xcp-networkd-conf delete mode 100755 SOURCES/xcp-networkd-init delete mode 100644 SOURCES/xcp-networkd-network-conf delete mode 100755 SOURCES/xcp-rrdd-init delete mode 100644 SOURCES/xcp-sm-pylint-fix.patch delete mode 100644 SOURCES/xen-api-db-conf delete mode 100755 SOURCES/xen-api-init delete mode 100644 SOURCES/xen-api-pam delete mode 100644 SOURCES/xen-api-xapi-conf.in delete mode 100755 SOURCES/xen-api-xapissl delete mode 100644 SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd delete mode 100644 SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h delete mode 100755 SOURCES/xenopsd-libvirt-init delete mode 100644 SOURCES/xenopsd-network-conf delete mode 100755 SOURCES/xenopsd-simulator-init delete mode 100755 SOURCES/xenopsd-vncterm-wrapper delete mode 100755 SOURCES/xenopsd-xc-init delete mode 100755 SOURCES/xenopsd-xenlight-init delete mode 100644 SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 delete mode 100644 SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 delete mode 100644 SOURCES/xenserver-readme delete mode 100644 SPECS/blktap.spec delete mode 100644 SPECS/cppo.spec delete mode 100644 SPECS/deriving-ocsigen.spec delete mode 100644 SPECS/ezlvm.spec delete mode 100644 SPECS/ffs.spec delete mode 100644 SPECS/forkexecd.spec delete mode 100644 SPECS/libnl3.spec delete mode 100644 SPECS/linux-guest-loader.spec delete mode 100644 SPECS/message-switch.spec delete mode 100644 SPECS/mirage-testvm.spec delete mode 100644 SPECS/oasis.spec delete mode 100644 SPECS/ocaml-async-extra.spec delete mode 100644 SPECS/ocaml-async-find.spec delete mode 100644 SPECS/ocaml-async-inotify.spec delete mode 100644 SPECS/ocaml-async-kernel.spec delete mode 100644 SPECS/ocaml-async-unix.spec delete mode 100644 SPECS/ocaml-async.spec delete mode 100644 SPECS/ocaml-bin-prot.spec delete mode 100644 SPECS/ocaml-biniou.spec delete mode 100644 SPECS/ocaml-camomile.spec delete mode 100644 SPECS/ocaml-cdrom.spec delete mode 100644 SPECS/ocaml-cmdliner.spec delete mode 100644 SPECS/ocaml-cohttp.spec delete mode 100644 SPECS/ocaml-comparelib.spec delete mode 100644 SPECS/ocaml-conduit.spec delete mode 100644 SPECS/ocaml-core-kernel.spec delete mode 100644 SPECS/ocaml-core.spec delete mode 100644 SPECS/ocaml-cow.spec delete mode 100644 SPECS/ocaml-crc.spec delete mode 100644 SPECS/ocaml-cstruct.spec delete mode 100644 SPECS/ocaml-ctypes.spec delete mode 100644 SPECS/ocaml-custom-printf.spec delete mode 100644 SPECS/ocaml-dyntype.spec delete mode 100644 SPECS/ocaml-easy-format.spec delete mode 100644 SPECS/ocaml-enumerate.spec delete mode 100644 SPECS/ocaml-evtchn.spec delete mode 100644 SPECS/ocaml-ezjsonm.spec delete mode 100644 SPECS/ocaml-fd-send-recv.spec delete mode 100644 SPECS/ocaml-fieldslib.spec delete mode 100644 SPECS/ocaml-fileutils.spec delete mode 100644 SPECS/ocaml-gnt.spec delete mode 100644 SPECS/ocaml-herelib.spec delete mode 100644 SPECS/ocaml-inotify.spec delete mode 100644 SPECS/ocaml-io-page.spec delete mode 100644 SPECS/ocaml-ipaddr.spec delete mode 100644 SPECS/ocaml-jsonm.spec delete mode 100644 SPECS/ocaml-lambda-term.spec delete mode 100644 SPECS/ocaml-libvirt.spec delete mode 100644 SPECS/ocaml-lwt.spec delete mode 100644 SPECS/ocaml-mirage-block-xen.spec delete mode 100644 SPECS/ocaml-mirage-clock-unix.spec delete mode 100644 SPECS/ocaml-mirage-clock-xen.spec delete mode 100644 SPECS/ocaml-mirage-console-xen.spec delete mode 100644 SPECS/ocaml-mirage-types.spec delete mode 100644 SPECS/ocaml-mirage-xen.spec delete mode 100644 SPECS/ocaml-mirage.spec delete mode 100644 SPECS/ocaml-nbd.spec delete mode 100644 SPECS/ocaml-netdev.spec delete mode 100644 SPECS/ocaml-netlink.spec delete mode 100644 SPECS/ocaml-obuild.spec delete mode 100644 SPECS/ocaml-oclock.spec delete mode 100644 SPECS/ocaml-ocplib-endian.spec delete mode 100644 SPECS/ocaml-odn.spec delete mode 100644 SPECS/ocaml-omd.spec delete mode 100644 SPECS/ocaml-opasswd.spec delete mode 100644 SPECS/ocaml-ounit.spec delete mode 100644 SPECS/ocaml-pa-bench.spec delete mode 100644 SPECS/ocaml-pa-ounit.spec delete mode 100644 SPECS/ocaml-pa-pipebang.spec delete mode 100644 SPECS/ocaml-pa-test.spec delete mode 100644 SPECS/ocaml-qmp.spec delete mode 100644 SPECS/ocaml-re.spec delete mode 100644 SPECS/ocaml-react.spec delete mode 100644 SPECS/ocaml-rpc.spec delete mode 100644 SPECS/ocaml-rrd-transport.spec delete mode 100644 SPECS/ocaml-rrdd-plugin.spec delete mode 100644 SPECS/ocaml-sexplib.spec delete mode 100644 SPECS/ocaml-sha.spec delete mode 100644 SPECS/ocaml-shared-memory-ring.spec delete mode 100644 SPECS/ocaml-ssl.spec delete mode 100644 SPECS/ocaml-stdext.spec delete mode 100644 SPECS/ocaml-stringext.spec delete mode 100644 SPECS/ocaml-tapctl.spec delete mode 100644 SPECS/ocaml-tar.spec delete mode 100644 SPECS/ocaml-testvmlib.spec delete mode 100644 SPECS/ocaml-text.spec delete mode 100644 SPECS/ocaml-textutils.spec delete mode 100644 SPECS/ocaml-type-conv.spec delete mode 100644 SPECS/ocaml-typerep.spec delete mode 100644 SPECS/ocaml-ulex.spec delete mode 100644 SPECS/ocaml-uri.spec delete mode 100644 SPECS/ocaml-uuidm.spec delete mode 100644 SPECS/ocaml-uutf.spec delete mode 100644 SPECS/ocaml-variantslib.spec delete mode 100644 SPECS/ocaml-vchan.spec delete mode 100644 SPECS/ocaml-vhd.spec delete mode 100644 SPECS/ocaml-xcp-idl.spec delete mode 100644 SPECS/ocaml-xcp-inventory.spec delete mode 100644 SPECS/ocaml-xcp-rrd.spec delete mode 100644 SPECS/ocaml-xen-api-client.spec delete mode 100644 SPECS/ocaml-xen-api-libs-transitional.spec delete mode 100644 SPECS/ocaml-xen-lowlevel-libs.spec delete mode 100644 SPECS/ocaml-xenops.spec delete mode 100644 SPECS/ocaml-xenstore-clients.spec delete mode 100644 SPECS/ocaml-xenstore.spec delete mode 100644 SPECS/ocaml-xmlm.spec delete mode 100644 SPECS/ocaml-yojson.spec delete mode 100644 SPECS/ocaml-zed.spec delete mode 100644 SPECS/ocamlify.spec delete mode 100644 SPECS/ocamlmod.spec delete mode 100644 SPECS/ocamlscript.spec delete mode 100644 SPECS/omake.spec delete mode 100644 SPECS/opam.spec delete mode 100644 SPECS/optcomp.spec delete mode 100644 SPECS/sm-cli.spec delete mode 100644 SPECS/squeezed.spec delete mode 100644 SPECS/utop.spec delete mode 100644 SPECS/vhd-tool.spec delete mode 100644 SPECS/vncterm.spec delete mode 100644 SPECS/xapi-libvirt-storage.spec delete mode 100644 SPECS/xapi-quicktest.spec delete mode 100644 SPECS/xapi-storage-script.spec delete mode 100644 SPECS/xapi-storage.spec delete mode 100644 SPECS/xapi.spec delete mode 100644 SPECS/xcp-networkd.spec delete mode 100644 SPECS/xcp-python-libs.spec delete mode 100644 SPECS/xcp-rrdd.spec delete mode 100644 SPECS/xcp-sm.spec delete mode 100644 SPECS/xe-create-templates.spec delete mode 100644 SPECS/xenops-cli.spec delete mode 100644 SPECS/xenopsd.spec delete mode 100644 SPECS/xenserver-core.spec delete mode 100644 SPECS/xenserver-install-wizard.spec delete mode 100644 SPECS/xsconsole.spec delete mode 100644 SPECS/xsiostat.spec delete mode 100755 configure.sh delete mode 100644 ignore.Linaro.trusty delete mode 100644 ignore.Ubuntu.trusty delete mode 100644 ignore.default rename {scripts/lib => planex}/debianchangelog.py (100%) rename {scripts/lib => planex}/debiancontrol.py (100%) rename {scripts/lib => planex}/debianmisc.py (100%) rename {scripts/lib => planex}/debianrules.py (100%) rename {scripts => planex}/downloader.py (100%) rename {scripts/lib => planex}/mappkgname.py (100%) rename {scripts/lib => planex}/rpmextra.py (100%) rename {scripts/lib => planex}/tree.py (100%) delete mode 100644 scripts/lib/__init__.py diff --git a/SOURCES/_libxl_list.h b/SOURCES/_libxl_list.h deleted file mode 100644 index cf35a7ba..00000000 --- a/SOURCES/_libxl_list.h +++ /dev/null @@ -1,651 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - * - * Generated automatically by bsd-sys-queue-h-seddery to - * - introduce LIBXL_ and libxl_ namespace prefixes - * - turn "struct type" into "type" so that type arguments - * to the macros are type names not struct tags - * - remove the reference to sys/cdefs.h, which is not needed - * - * The purpose of this seddery is to allow the resulting file to be - * freely included by software which might also want to include other - * list macros; to make it usable when struct tags are not being used - * or not known; to make it more portable. - */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $FreeBSD$ - */ - -#ifndef LIBXL__SYS_QUEUE_H_ -#define LIBXL__SYS_QUEUE_H_ - -/* #include */ - -/* - * This file defines four types of data structures: singly-linked lists, - * singly-linked tail queues, lists and tail queues. - * - * A singly-linked list is headed by a single forward pointer. The elements - * are singly linked for minimum space and pointer manipulation overhead at - * the expense of O(n) removal for arbitrary elements. New elements can be - * added to the list after an existing element or at the head of the list. - * Elements being removed from the head of the list should use the explicit - * macro for this purpose for optimum efficiency. A singly-linked list may - * only be traversed in the forward direction. Singly-linked lists are ideal - * for applications with large datasets and few or no removals or for - * implementing a LIFO queue. - * - * A singly-linked tail queue is headed by a pair of pointers, one to the - * head of the list and the other to the tail of the list. The elements are - * singly linked for minimum space and pointer manipulation overhead at the - * expense of O(n) removal for arbitrary elements. New elements can be added - * to the list after an existing element, at the head of the list, or at the - * end of the list. Elements being removed from the head of the tail queue - * should use the explicit macro for this purpose for optimum efficiency. - * A singly-linked tail queue may only be traversed in the forward direction. - * Singly-linked tail queues are ideal for applications with large datasets - * and few or no removals or for implementing a FIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * For details on the use of these macros, see the queue(3) manual page. - * - * - * LIBXL_SLIST LIBXL_LIST LIBXL_STAILQ LIBXL_TAILQ - * _HEAD + + + + - * _HEAD_INITIALIZER + + + + - * _ENTRY + + + + - * _INIT + + + + - * _EMPTY + + + + - * _FIRST + + + + - * _NEXT + + + + - * _PREV - - - + - * _LAST - - + + - * _FOREACH + + + + - * _FOREACH_SAFE + + + + - * _FOREACH_REVERSE - - - + - * _FOREACH_REVERSE_SAFE - - - + - * _INSERT_HEAD + + + + - * _INSERT_BEFORE - + - + - * _INSERT_AFTER + + + + - * _INSERT_TAIL - - + + - * _CONCAT - - + + - * _REMOVE_AFTER + - + - - * _REMOVE_HEAD + - + - - * _REMOVE + + + + - * _SWAP + + + + - * - */ -#ifdef LIBXL_QUEUE_MACRO_DEBUG -/* Store the last 2 places the queue element or head was altered */ -struct libxl__qm_trace { - char * lastfile; - int lastline; - char * prevfile; - int prevline; -}; - -#define LIBXL__TRACEBUF struct libxl__qm_trace trace; -#define LIBXL__TRASHIT(x) do {(x) = (void *)-1;} while (0) -#define LIBXL__QMD_SAVELINK(name, link) void **name = (void *)&(link) - -#define LIBXL__QMD_TRACE_HEAD(head) do { \ - (head)->trace.prevline = (head)->trace.lastline; \ - (head)->trace.prevfile = (head)->trace.lastfile; \ - (head)->trace.lastline = __LINE__; \ - (head)->trace.lastfile = __FILE__; \ -} while (0) - -#define LIBXL__QMD_TRACE_ELEM(elem) do { \ - (elem)->trace.prevline = (elem)->trace.lastline; \ - (elem)->trace.prevfile = (elem)->trace.lastfile; \ - (elem)->trace.lastline = __LINE__; \ - (elem)->trace.lastfile = __FILE__; \ -} while (0) - -#else -#define LIBXL__QMD_TRACE_ELEM(elem) -#define LIBXL__QMD_TRACE_HEAD(head) -#define LIBXL__QMD_SAVELINK(name, link) -#define LIBXL__TRACEBUF -#define LIBXL__TRASHIT(x) -#endif /* LIBXL_QUEUE_MACRO_DEBUG */ - -/* - * Singly-linked List declarations. - */ -#define LIBXL_SLIST_HEAD(name, type) \ -struct name { \ - type *slh_first; /* first element */ \ -} - -#define LIBXL_SLIST_HEAD_INITIALIZER(head) \ - { 0 } - -#define LIBXL_SLIST_ENTRY(type) \ -struct { \ - type *sle_next; /* next element */ \ -} - -/* - * Singly-linked List functions. - */ -#define LIBXL_SLIST_EMPTY(head) ((head)->slh_first == 0) - -#define LIBXL_SLIST_FIRST(head) ((head)->slh_first) - -#define LIBXL_SLIST_FOREACH(var, head, field) \ - for ((var) = LIBXL_SLIST_FIRST((head)); \ - (var); \ - (var) = LIBXL_SLIST_NEXT((var), field)) - -#define LIBXL_SLIST_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = LIBXL_SLIST_FIRST((head)); \ - (var) && ((tvar) = LIBXL_SLIST_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define LIBXL_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ - for ((varp) = &LIBXL_SLIST_FIRST((head)); \ - ((var) = *(varp)) != 0; \ - (varp) = &LIBXL_SLIST_NEXT((var), field)) - -#define LIBXL_SLIST_INIT(head) do { \ - LIBXL_SLIST_FIRST((head)) = 0; \ -} while (0) - -#define LIBXL_SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - LIBXL_SLIST_NEXT((elm), field) = LIBXL_SLIST_NEXT((slistelm), field); \ - LIBXL_SLIST_NEXT((slistelm), field) = (elm); \ -} while (0) - -#define LIBXL_SLIST_INSERT_HEAD(head, elm, field) do { \ - LIBXL_SLIST_NEXT((elm), field) = LIBXL_SLIST_FIRST((head)); \ - LIBXL_SLIST_FIRST((head)) = (elm); \ -} while (0) - -#define LIBXL_SLIST_NEXT(elm, field) ((elm)->field.sle_next) - -#define LIBXL_SLIST_REMOVE(head, elm, type, field) do { \ - LIBXL__QMD_SAVELINK(oldnext, (elm)->field.sle_next); \ - if (LIBXL_SLIST_FIRST((head)) == (elm)) { \ - LIBXL_SLIST_REMOVE_HEAD((head), field); \ - } \ - else { \ - type *curelm = LIBXL_SLIST_FIRST((head)); \ - while (LIBXL_SLIST_NEXT(curelm, field) != (elm)) \ - curelm = LIBXL_SLIST_NEXT(curelm, field); \ - LIBXL_SLIST_REMOVE_AFTER(curelm, field); \ - } \ - LIBXL__TRASHIT(*oldnext); \ -} while (0) - -#define LIBXL_SLIST_REMOVE_AFTER(elm, field) do { \ - LIBXL_SLIST_NEXT(elm, field) = \ - LIBXL_SLIST_NEXT(LIBXL_SLIST_NEXT(elm, field), field); \ -} while (0) - -#define LIBXL_SLIST_REMOVE_HEAD(head, field) do { \ - LIBXL_SLIST_FIRST((head)) = LIBXL_SLIST_NEXT(LIBXL_SLIST_FIRST((head)), field); \ -} while (0) - -#define LIBXL_SLIST_SWAP(head1, head2, type) do { \ - type *swap_first = LIBXL_SLIST_FIRST(head1); \ - LIBXL_SLIST_FIRST(head1) = LIBXL_SLIST_FIRST(head2); \ - LIBXL_SLIST_FIRST(head2) = swap_first; \ -} while (0) - -/* - * Singly-linked Tail queue declarations. - */ -#define LIBXL_STAILQ_HEAD(name, type) \ -struct name { \ - type *stqh_first;/* first element */ \ - type **stqh_last;/* addr of last next element */ \ -} - -#define LIBXL_STAILQ_HEAD_INITIALIZER(head) \ - { 0, &(head).stqh_first } - -#define LIBXL_STAILQ_ENTRY(type) \ -struct { \ - type *stqe_next; /* next element */ \ -} - -/* - * Singly-linked Tail queue functions. - */ -#define LIBXL_STAILQ_CONCAT(head1, head2) do { \ - if (!LIBXL_STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ - (head1)->stqh_last = (head2)->stqh_last; \ - LIBXL_STAILQ_INIT((head2)); \ - } \ -} while (0) - -#define LIBXL_STAILQ_EMPTY(head) ((head)->stqh_first == 0) - -#define LIBXL_STAILQ_FIRST(head) ((head)->stqh_first) - -#define LIBXL_STAILQ_FOREACH(var, head, field) \ - for((var) = LIBXL_STAILQ_FIRST((head)); \ - (var); \ - (var) = LIBXL_STAILQ_NEXT((var), field)) - - -#define LIBXL_STAILQ_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = LIBXL_STAILQ_FIRST((head)); \ - (var) && ((tvar) = LIBXL_STAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define LIBXL_STAILQ_INIT(head) do { \ - LIBXL_STAILQ_FIRST((head)) = 0; \ - (head)->stqh_last = &LIBXL_STAILQ_FIRST((head)); \ -} while (0) - -#define LIBXL_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ - if ((LIBXL_STAILQ_NEXT((elm), field) = LIBXL_STAILQ_NEXT((tqelm), field)) == 0)\ - (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ - LIBXL_STAILQ_NEXT((tqelm), field) = (elm); \ -} while (0) - -#define LIBXL_STAILQ_INSERT_HEAD(head, elm, field) do { \ - if ((LIBXL_STAILQ_NEXT((elm), field) = LIBXL_STAILQ_FIRST((head))) == 0) \ - (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ - LIBXL_STAILQ_FIRST((head)) = (elm); \ -} while (0) - -#define LIBXL_STAILQ_INSERT_TAIL(head, elm, field) do { \ - LIBXL_STAILQ_NEXT((elm), field) = 0; \ - *(head)->stqh_last = (elm); \ - (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ -} while (0) - -#define LIBXL_STAILQ_LAST(head, type, field) \ - (LIBXL_STAILQ_EMPTY((head)) ? \ - 0 : \ - ((type *)(void *) \ - ((char *)((head)->stqh_last) - __offsetof(type, field)))) - -#define LIBXL_STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) - -#define LIBXL_STAILQ_REMOVE(head, elm, type, field) do { \ - LIBXL__QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \ - if (LIBXL_STAILQ_FIRST((head)) == (elm)) { \ - LIBXL_STAILQ_REMOVE_HEAD((head), field); \ - } \ - else { \ - type *curelm = LIBXL_STAILQ_FIRST((head)); \ - while (LIBXL_STAILQ_NEXT(curelm, field) != (elm)) \ - curelm = LIBXL_STAILQ_NEXT(curelm, field); \ - LIBXL_STAILQ_REMOVE_AFTER(head, curelm, field); \ - } \ - LIBXL__TRASHIT(*oldnext); \ -} while (0) - -#define LIBXL_STAILQ_REMOVE_AFTER(head, elm, field) do { \ - if ((LIBXL_STAILQ_NEXT(elm, field) = \ - LIBXL_STAILQ_NEXT(LIBXL_STAILQ_NEXT(elm, field), field)) == 0) \ - (head)->stqh_last = &LIBXL_STAILQ_NEXT((elm), field); \ -} while (0) - -#define LIBXL_STAILQ_REMOVE_HEAD(head, field) do { \ - if ((LIBXL_STAILQ_FIRST((head)) = \ - LIBXL_STAILQ_NEXT(LIBXL_STAILQ_FIRST((head)), field)) == 0) \ - (head)->stqh_last = &LIBXL_STAILQ_FIRST((head)); \ -} while (0) - -#define LIBXL_STAILQ_SWAP(head1, head2, type) do { \ - type *swap_first = LIBXL_STAILQ_FIRST(head1); \ - type **swap_last = (head1)->stqh_last; \ - LIBXL_STAILQ_FIRST(head1) = LIBXL_STAILQ_FIRST(head2); \ - (head1)->stqh_last = (head2)->stqh_last; \ - LIBXL_STAILQ_FIRST(head2) = swap_first; \ - (head2)->stqh_last = swap_last; \ - if (LIBXL_STAILQ_EMPTY(head1)) \ - (head1)->stqh_last = &LIBXL_STAILQ_FIRST(head1); \ - if (LIBXL_STAILQ_EMPTY(head2)) \ - (head2)->stqh_last = &LIBXL_STAILQ_FIRST(head2); \ -} while (0) - - -/* - * List declarations. - */ -#define LIBXL_LIST_HEAD(name, type) \ -struct name { \ - type *lh_first; /* first element */ \ -} - -#define LIBXL_LIST_HEAD_INITIALIZER(head) \ - { 0 } - -#define LIBXL_LIST_ENTRY(type) \ -struct { \ - type *le_next; /* next element */ \ - type **le_prev; /* address of previous next element */ \ -} - -/* - * List functions. - */ - -#if (defined(_KERNEL) && defined(INVARIANTS)) -#define LIBXL__QMD_LIST_CHECK_HEAD(head, field) do { \ - if (LIBXL_LIST_FIRST((head)) != 0 && \ - LIBXL_LIST_FIRST((head))->field.le_prev != \ - &LIBXL_LIST_FIRST((head))) \ - panic("Bad list head %p first->prev != head", (head)); \ -} while (0) - -#define LIBXL__QMD_LIST_CHECK_NEXT(elm, field) do { \ - if (LIBXL_LIST_NEXT((elm), field) != 0 && \ - LIBXL_LIST_NEXT((elm), field)->field.le_prev != \ - &((elm)->field.le_next)) \ - panic("Bad link elm %p next->prev != elm", (elm)); \ -} while (0) - -#define LIBXL__QMD_LIST_CHECK_PREV(elm, field) do { \ - if (*(elm)->field.le_prev != (elm)) \ - panic("Bad link elm %p prev->next != elm", (elm)); \ -} while (0) -#else -#define LIBXL__QMD_LIST_CHECK_HEAD(head, field) -#define LIBXL__QMD_LIST_CHECK_NEXT(elm, field) -#define LIBXL__QMD_LIST_CHECK_PREV(elm, field) -#endif /* (_KERNEL && INVARIANTS) */ - -#define LIBXL_LIST_EMPTY(head) ((head)->lh_first == 0) - -#define LIBXL_LIST_FIRST(head) ((head)->lh_first) - -#define LIBXL_LIST_FOREACH(var, head, field) \ - for ((var) = LIBXL_LIST_FIRST((head)); \ - (var); \ - (var) = LIBXL_LIST_NEXT((var), field)) - -#define LIBXL_LIST_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = LIBXL_LIST_FIRST((head)); \ - (var) && ((tvar) = LIBXL_LIST_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define LIBXL_LIST_INIT(head) do { \ - LIBXL_LIST_FIRST((head)) = 0; \ -} while (0) - -#define LIBXL_LIST_INSERT_AFTER(listelm, elm, field) do { \ - LIBXL__QMD_LIST_CHECK_NEXT(listelm, field); \ - if ((LIBXL_LIST_NEXT((elm), field) = LIBXL_LIST_NEXT((listelm), field)) != 0)\ - LIBXL_LIST_NEXT((listelm), field)->field.le_prev = \ - &LIBXL_LIST_NEXT((elm), field); \ - LIBXL_LIST_NEXT((listelm), field) = (elm); \ - (elm)->field.le_prev = &LIBXL_LIST_NEXT((listelm), field); \ -} while (0) - -#define LIBXL_LIST_INSERT_BEFORE(listelm, elm, field) do { \ - LIBXL__QMD_LIST_CHECK_PREV(listelm, field); \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - LIBXL_LIST_NEXT((elm), field) = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &LIBXL_LIST_NEXT((elm), field); \ -} while (0) - -#define LIBXL_LIST_INSERT_HEAD(head, elm, field) do { \ - LIBXL__QMD_LIST_CHECK_HEAD((head), field); \ - if ((LIBXL_LIST_NEXT((elm), field) = LIBXL_LIST_FIRST((head))) != 0) \ - LIBXL_LIST_FIRST((head))->field.le_prev = &LIBXL_LIST_NEXT((elm), field);\ - LIBXL_LIST_FIRST((head)) = (elm); \ - (elm)->field.le_prev = &LIBXL_LIST_FIRST((head)); \ -} while (0) - -#define LIBXL_LIST_NEXT(elm, field) ((elm)->field.le_next) - -#define LIBXL_LIST_REMOVE(elm, field) do { \ - LIBXL__QMD_SAVELINK(oldnext, (elm)->field.le_next); \ - LIBXL__QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ - LIBXL__QMD_LIST_CHECK_NEXT(elm, field); \ - LIBXL__QMD_LIST_CHECK_PREV(elm, field); \ - if (LIBXL_LIST_NEXT((elm), field) != 0) \ - LIBXL_LIST_NEXT((elm), field)->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = LIBXL_LIST_NEXT((elm), field); \ - LIBXL__TRASHIT(*oldnext); \ - LIBXL__TRASHIT(*oldprev); \ -} while (0) - -#define LIBXL_LIST_SWAP(head1, head2, type, field) do { \ - type *swap_tmp = LIBXL_LIST_FIRST((head1)); \ - LIBXL_LIST_FIRST((head1)) = LIBXL_LIST_FIRST((head2)); \ - LIBXL_LIST_FIRST((head2)) = swap_tmp; \ - if ((swap_tmp = LIBXL_LIST_FIRST((head1))) != 0) \ - swap_tmp->field.le_prev = &LIBXL_LIST_FIRST((head1)); \ - if ((swap_tmp = LIBXL_LIST_FIRST((head2))) != 0) \ - swap_tmp->field.le_prev = &LIBXL_LIST_FIRST((head2)); \ -} while (0) - -/* - * Tail queue declarations. - */ -#define LIBXL_TAILQ_HEAD(name, type) \ -struct name { \ - type *tqh_first; /* first element */ \ - type **tqh_last; /* addr of last next element */ \ - LIBXL__TRACEBUF \ -} - -#define LIBXL_TAILQ_HEAD_INITIALIZER(head) \ - { 0, &(head).tqh_first } - -#define LIBXL_TAILQ_ENTRY(type) \ -struct { \ - type *tqe_next; /* next element */ \ - type **tqe_prev; /* address of previous next element */ \ - LIBXL__TRACEBUF \ -} - -/* - * Tail queue functions. - */ -#if (defined(_KERNEL) && defined(INVARIANTS)) -#define LIBXL__QMD_TAILQ_CHECK_HEAD(head, field) do { \ - if (!LIBXL_TAILQ_EMPTY(head) && \ - LIBXL_TAILQ_FIRST((head))->field.tqe_prev != \ - &LIBXL_TAILQ_FIRST((head))) \ - panic("Bad tailq head %p first->prev != head", (head)); \ -} while (0) - -#define LIBXL__QMD_TAILQ_CHECK_TAIL(head, field) do { \ - if (*(head)->tqh_last != 0) \ - panic("Bad tailq NEXT(%p->tqh_last) != 0", (head)); \ -} while (0) - -#define LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field) do { \ - if (LIBXL_TAILQ_NEXT((elm), field) != 0 && \ - LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev != \ - &((elm)->field.tqe_next)) \ - panic("Bad link elm %p next->prev != elm", (elm)); \ -} while (0) - -#define LIBXL__QMD_TAILQ_CHECK_PREV(elm, field) do { \ - if (*(elm)->field.tqe_prev != (elm)) \ - panic("Bad link elm %p prev->next != elm", (elm)); \ -} while (0) -#else -#define LIBXL__QMD_TAILQ_CHECK_HEAD(head, field) -#define LIBXL__QMD_TAILQ_CHECK_TAIL(head, headname) -#define LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field) -#define LIBXL__QMD_TAILQ_CHECK_PREV(elm, field) -#endif /* (_KERNEL && INVARIANTS) */ - -#define LIBXL_TAILQ_CONCAT(head1, head2, field) do { \ - if (!LIBXL_TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ - (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ - (head1)->tqh_last = (head2)->tqh_last; \ - LIBXL_TAILQ_INIT((head2)); \ - LIBXL__QMD_TRACE_HEAD(head1); \ - LIBXL__QMD_TRACE_HEAD(head2); \ - } \ -} while (0) - -#define LIBXL_TAILQ_EMPTY(head) ((head)->tqh_first == 0) - -#define LIBXL_TAILQ_FIRST(head) ((head)->tqh_first) - -#define LIBXL_TAILQ_FOREACH(var, head, field) \ - for ((var) = LIBXL_TAILQ_FIRST((head)); \ - (var); \ - (var) = LIBXL_TAILQ_NEXT((var), field)) - -#define LIBXL_TAILQ_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = LIBXL_TAILQ_FIRST((head)); \ - (var) && ((tvar) = LIBXL_TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define LIBXL_TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = LIBXL_TAILQ_LAST((head), headname); \ - (var); \ - (var) = LIBXL_TAILQ_PREV((var), headname, field)) - -#define LIBXL_TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ - for ((var) = LIBXL_TAILQ_LAST((head), headname); \ - (var) && ((tvar) = LIBXL_TAILQ_PREV((var), headname, field), 1); \ - (var) = (tvar)) - -#define LIBXL_TAILQ_INIT(head) do { \ - LIBXL_TAILQ_FIRST((head)) = 0; \ - (head)->tqh_last = &LIBXL_TAILQ_FIRST((head)); \ - LIBXL__QMD_TRACE_HEAD(head); \ -} while (0) - -#define LIBXL_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - LIBXL__QMD_TAILQ_CHECK_NEXT(listelm, field); \ - if ((LIBXL_TAILQ_NEXT((elm), field) = LIBXL_TAILQ_NEXT((listelm), field)) != 0)\ - LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev = \ - &LIBXL_TAILQ_NEXT((elm), field); \ - else { \ - (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ - LIBXL__QMD_TRACE_HEAD(head); \ - } \ - LIBXL_TAILQ_NEXT((listelm), field) = (elm); \ - (elm)->field.tqe_prev = &LIBXL_TAILQ_NEXT((listelm), field); \ - LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ - LIBXL__QMD_TRACE_ELEM(&listelm->field); \ -} while (0) - -#define LIBXL_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - LIBXL__QMD_TAILQ_CHECK_PREV(listelm, field); \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - LIBXL_TAILQ_NEXT((elm), field) = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &LIBXL_TAILQ_NEXT((elm), field); \ - LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ - LIBXL__QMD_TRACE_ELEM(&listelm->field); \ -} while (0) - -#define LIBXL_TAILQ_INSERT_HEAD(head, elm, field) do { \ - LIBXL__QMD_TAILQ_CHECK_HEAD(head, field); \ - if ((LIBXL_TAILQ_NEXT((elm), field) = LIBXL_TAILQ_FIRST((head))) != 0) \ - LIBXL_TAILQ_FIRST((head))->field.tqe_prev = \ - &LIBXL_TAILQ_NEXT((elm), field); \ - else \ - (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ - LIBXL_TAILQ_FIRST((head)) = (elm); \ - (elm)->field.tqe_prev = &LIBXL_TAILQ_FIRST((head)); \ - LIBXL__QMD_TRACE_HEAD(head); \ - LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -#define LIBXL_TAILQ_INSERT_TAIL(head, elm, field) do { \ - LIBXL__QMD_TAILQ_CHECK_TAIL(head, field); \ - LIBXL_TAILQ_NEXT((elm), field) = 0; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &LIBXL_TAILQ_NEXT((elm), field); \ - LIBXL__QMD_TRACE_HEAD(head); \ - LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -#define LIBXL_TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) - -#define LIBXL_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define LIBXL_TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - -#define LIBXL_TAILQ_REMOVE(head, elm, field) do { \ - LIBXL__QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ - LIBXL__QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ - LIBXL__QMD_TAILQ_CHECK_NEXT(elm, field); \ - LIBXL__QMD_TAILQ_CHECK_PREV(elm, field); \ - if ((LIBXL_TAILQ_NEXT((elm), field)) != 0) \ - LIBXL_TAILQ_NEXT((elm), field)->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else { \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - LIBXL__QMD_TRACE_HEAD(head); \ - } \ - *(elm)->field.tqe_prev = LIBXL_TAILQ_NEXT((elm), field); \ - LIBXL__TRASHIT(*oldnext); \ - LIBXL__TRASHIT(*oldprev); \ - LIBXL__QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -#define LIBXL_TAILQ_SWAP(head1, head2, type, field) do { \ - type *swap_first = (head1)->tqh_first; \ - type **swap_last = (head1)->tqh_last; \ - (head1)->tqh_first = (head2)->tqh_first; \ - (head1)->tqh_last = (head2)->tqh_last; \ - (head2)->tqh_first = swap_first; \ - (head2)->tqh_last = swap_last; \ - if ((swap_first = (head1)->tqh_first) != 0) \ - swap_first->field.tqe_prev = &(head1)->tqh_first; \ - else \ - (head1)->tqh_last = &(head1)->tqh_first; \ - if ((swap_first = (head2)->tqh_first) != 0) \ - swap_first->field.tqe_prev = &(head2)->tqh_first; \ - else \ - (head2)->tqh_last = &(head2)->tqh_first; \ -} while (0) - -#endif /* !LIBXL__SYS_QUEUE_H_ */ diff --git a/SOURCES/_libxl_types.h b/SOURCES/_libxl_types.h deleted file mode 100644 index 6131c975..00000000 --- a/SOURCES/_libxl_types.h +++ /dev/null @@ -1,609 +0,0 @@ -#ifndef __LIBXL_TYPES_H -#define __LIBXL_TYPES_H - -/* - * DO NOT EDIT. - * - * This file is autogenerated by - * "gentypes.py libxl_types.idl __libxl_types.h __libxl_types_json.h __libxl_types.c" - */ - -typedef enum libxl_domain_type { - LIBXL_DOMAIN_TYPE_INVALID = -1, - LIBXL_DOMAIN_TYPE_HVM = 1, - LIBXL_DOMAIN_TYPE_PV = 2, -} libxl_domain_type; -char *libxl_domain_type_to_json(libxl_ctx *ctx, libxl_domain_type p); -const char *libxl_domain_type_to_string(libxl_domain_type p); -int libxl_domain_type_from_string(const char *s, libxl_domain_type *e); -extern libxl_enum_string_table libxl_domain_type_string_table[]; - -typedef enum libxl_device_model_version { - LIBXL_DEVICE_MODEL_VERSION_UNKNOWN = 0, - LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL = 1, - LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN = 2, -} libxl_device_model_version; -char *libxl_device_model_version_to_json(libxl_ctx *ctx, libxl_device_model_version p); -const char *libxl_device_model_version_to_string(libxl_device_model_version p); -int libxl_device_model_version_from_string(const char *s, libxl_device_model_version *e); -extern libxl_enum_string_table libxl_device_model_version_string_table[]; - -typedef enum libxl_console_type { - LIBXL_CONSOLE_TYPE_UNKNOWN = 0, - LIBXL_CONSOLE_TYPE_SERIAL = 1, - LIBXL_CONSOLE_TYPE_PV = 2, -} libxl_console_type; -char *libxl_console_type_to_json(libxl_ctx *ctx, libxl_console_type p); -const char *libxl_console_type_to_string(libxl_console_type p); -int libxl_console_type_from_string(const char *s, libxl_console_type *e); -extern libxl_enum_string_table libxl_console_type_string_table[]; - -typedef enum libxl_disk_format { - LIBXL_DISK_FORMAT_UNKNOWN = 0, - LIBXL_DISK_FORMAT_QCOW = 1, - LIBXL_DISK_FORMAT_QCOW2 = 2, - LIBXL_DISK_FORMAT_VHD = 3, - LIBXL_DISK_FORMAT_RAW = 4, - LIBXL_DISK_FORMAT_EMPTY = 5, -} libxl_disk_format; -char *libxl_disk_format_to_json(libxl_ctx *ctx, libxl_disk_format p); -const char *libxl_disk_format_to_string(libxl_disk_format p); -int libxl_disk_format_from_string(const char *s, libxl_disk_format *e); -extern libxl_enum_string_table libxl_disk_format_string_table[]; - -typedef enum libxl_disk_backend { - LIBXL_DISK_BACKEND_UNKNOWN = 0, - LIBXL_DISK_BACKEND_PHY = 1, - LIBXL_DISK_BACKEND_TAP = 2, - LIBXL_DISK_BACKEND_QDISK = 3, -} libxl_disk_backend; -char *libxl_disk_backend_to_json(libxl_ctx *ctx, libxl_disk_backend p); -const char *libxl_disk_backend_to_string(libxl_disk_backend p); -int libxl_disk_backend_from_string(const char *s, libxl_disk_backend *e); -extern libxl_enum_string_table libxl_disk_backend_string_table[]; - -typedef enum libxl_nic_type { - LIBXL_NIC_TYPE_UNKNOWN = 0, - LIBXL_NIC_TYPE_VIF_IOEMU = 1, - LIBXL_NIC_TYPE_VIF = 2, -} libxl_nic_type; -char *libxl_nic_type_to_json(libxl_ctx *ctx, libxl_nic_type p); -const char *libxl_nic_type_to_string(libxl_nic_type p); -int libxl_nic_type_from_string(const char *s, libxl_nic_type *e); -extern libxl_enum_string_table libxl_nic_type_string_table[]; - -typedef enum libxl_action_on_shutdown { - LIBXL_ACTION_ON_SHUTDOWN_DESTROY = 1, - LIBXL_ACTION_ON_SHUTDOWN_RESTART = 2, - LIBXL_ACTION_ON_SHUTDOWN_RESTART_RENAME = 3, - LIBXL_ACTION_ON_SHUTDOWN_PRESERVE = 4, - LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_DESTROY = 5, - LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_RESTART = 6, -} libxl_action_on_shutdown; -char *libxl_action_on_shutdown_to_json(libxl_ctx *ctx, libxl_action_on_shutdown p); -const char *libxl_action_on_shutdown_to_string(libxl_action_on_shutdown p); -int libxl_action_on_shutdown_from_string(const char *s, libxl_action_on_shutdown *e); -extern libxl_enum_string_table libxl_action_on_shutdown_string_table[]; - -typedef enum libxl_trigger { - LIBXL_TRIGGER_UNKNOWN = 0, - LIBXL_TRIGGER_POWER = 1, - LIBXL_TRIGGER_SLEEP = 2, - LIBXL_TRIGGER_NMI = 3, - LIBXL_TRIGGER_INIT = 4, - LIBXL_TRIGGER_RESET = 5, - LIBXL_TRIGGER_S3RESUME = 6, -} libxl_trigger; -char *libxl_trigger_to_json(libxl_ctx *ctx, libxl_trigger p); -const char *libxl_trigger_to_string(libxl_trigger p); -int libxl_trigger_from_string(const char *s, libxl_trigger *e); -extern libxl_enum_string_table libxl_trigger_string_table[]; - -typedef enum libxl_tsc_mode { - LIBXL_TSC_MODE_DEFAULT = 0, - LIBXL_TSC_MODE_ALWAYS_EMULATE = 1, - LIBXL_TSC_MODE_NATIVE = 2, - LIBXL_TSC_MODE_NATIVE_PARAVIRT = 3, -} libxl_tsc_mode; -char *libxl_tsc_mode_to_json(libxl_ctx *ctx, libxl_tsc_mode p); -const char *libxl_tsc_mode_to_string(libxl_tsc_mode p); -int libxl_tsc_mode_from_string(const char *s, libxl_tsc_mode *e); -extern libxl_enum_string_table libxl_tsc_mode_string_table[]; - -typedef enum libxl_timer_mode { - LIBXL_TIMER_MODE_UNKNOWN = -1, - LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS = 0, - LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS = 1, - LIBXL_TIMER_MODE_NO_MISSED_TICKS_PENDING = 2, - LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING = 3, -} libxl_timer_mode; -char *libxl_timer_mode_to_json(libxl_ctx *ctx, libxl_timer_mode p); -const char *libxl_timer_mode_to_string(libxl_timer_mode p); -int libxl_timer_mode_from_string(const char *s, libxl_timer_mode *e); -extern libxl_enum_string_table libxl_timer_mode_string_table[]; - -typedef enum libxl_bios_type { - LIBXL_BIOS_TYPE_UNKNOWN = 0, - LIBXL_BIOS_TYPE_ROMBIOS = 1, - LIBXL_BIOS_TYPE_SEABIOS = 2, - LIBXL_BIOS_TYPE_OVMF = 3, -} libxl_bios_type; -char *libxl_bios_type_to_json(libxl_ctx *ctx, libxl_bios_type p); -const char *libxl_bios_type_to_string(libxl_bios_type p); -int libxl_bios_type_from_string(const char *s, libxl_bios_type *e); -extern libxl_enum_string_table libxl_bios_type_string_table[]; - -typedef enum libxl_scheduler { - LIBXL_SCHEDULER_UNKNOWN = 0, - LIBXL_SCHEDULER_SEDF = 4, - LIBXL_SCHEDULER_CREDIT = 5, - LIBXL_SCHEDULER_CREDIT2 = 6, - LIBXL_SCHEDULER_ARINC653 = 7, -} libxl_scheduler; -char *libxl_scheduler_to_json(libxl_ctx *ctx, libxl_scheduler p); -const char *libxl_scheduler_to_string(libxl_scheduler p); -int libxl_scheduler_from_string(const char *s, libxl_scheduler *e); -extern libxl_enum_string_table libxl_scheduler_string_table[]; - -typedef enum libxl_shutdown_reason { - LIBXL_SHUTDOWN_REASON_UNKNOWN = -1, - LIBXL_SHUTDOWN_REASON_POWEROFF = 0, - LIBXL_SHUTDOWN_REASON_REBOOT = 1, - LIBXL_SHUTDOWN_REASON_SUSPEND = 2, - LIBXL_SHUTDOWN_REASON_CRASH = 3, - LIBXL_SHUTDOWN_REASON_WATCHDOG = 4, -} libxl_shutdown_reason; -char *libxl_shutdown_reason_to_json(libxl_ctx *ctx, libxl_shutdown_reason p); -const char *libxl_shutdown_reason_to_string(libxl_shutdown_reason p); -int libxl_shutdown_reason_from_string(const char *s, libxl_shutdown_reason *e); -extern libxl_enum_string_table libxl_shutdown_reason_string_table[]; - -typedef enum libxl_vga_interface_type { - LIBXL_VGA_INTERFACE_TYPE_CIRRUS = 1, - LIBXL_VGA_INTERFACE_TYPE_STD = 2, -} libxl_vga_interface_type; -char *libxl_vga_interface_type_to_json(libxl_ctx *ctx, libxl_vga_interface_type p); -const char *libxl_vga_interface_type_to_string(libxl_vga_interface_type p); -int libxl_vga_interface_type_from_string(const char *s, libxl_vga_interface_type *e); -extern libxl_enum_string_table libxl_vga_interface_type_string_table[]; - -typedef struct libxl_ioport_range { - uint32_t first; - uint32_t number; -} libxl_ioport_range; -void libxl_ioport_range_dispose(libxl_ioport_range *p); -void libxl_ioport_range_init(libxl_ioport_range *p); -char *libxl_ioport_range_to_json(libxl_ctx *ctx, libxl_ioport_range *p); - -typedef struct libxl_vga_interface_info { - libxl_vga_interface_type kind; -} libxl_vga_interface_info; -void libxl_vga_interface_info_dispose(libxl_vga_interface_info *p); -void libxl_vga_interface_info_init(libxl_vga_interface_info *p); -char *libxl_vga_interface_info_to_json(libxl_ctx *ctx, libxl_vga_interface_info *p); - -typedef struct libxl_vnc_info { - libxl_defbool enable; - char * listen; - char * passwd; - int display; - libxl_defbool findunused; -} libxl_vnc_info; -void libxl_vnc_info_dispose(libxl_vnc_info *p); -void libxl_vnc_info_init(libxl_vnc_info *p); -char *libxl_vnc_info_to_json(libxl_ctx *ctx, libxl_vnc_info *p); - -typedef struct libxl_spice_info { - libxl_defbool enable; - int port; - int tls_port; - char * host; - libxl_defbool disable_ticketing; - char * passwd; - libxl_defbool agent_mouse; -} libxl_spice_info; -void libxl_spice_info_dispose(libxl_spice_info *p); -void libxl_spice_info_init(libxl_spice_info *p); -char *libxl_spice_info_to_json(libxl_ctx *ctx, libxl_spice_info *p); - -typedef struct libxl_sdl_info { - libxl_defbool enable; - libxl_defbool opengl; - char * display; - char * xauthority; -} libxl_sdl_info; -void libxl_sdl_info_dispose(libxl_sdl_info *p); -void libxl_sdl_info_init(libxl_sdl_info *p); -char *libxl_sdl_info_to_json(libxl_ctx *ctx, libxl_sdl_info *p); - -typedef struct libxl_dominfo { - libxl_uuid uuid; - libxl_domid domid; - uint32_t ssidref; - bool running; - bool blocked; - bool paused; - bool shutdown; - bool dying; - libxl_shutdown_reason shutdown_reason; - uint64_t current_memkb; - uint64_t shared_memkb; - uint64_t paged_memkb; - uint64_t max_memkb; - uint64_t cpu_time; - uint32_t vcpu_max_id; - uint32_t vcpu_online; - uint32_t cpupool; - libxl_domain_type domain_type; -} libxl_dominfo; -void libxl_dominfo_dispose(libxl_dominfo *p); -void libxl_dominfo_init(libxl_dominfo *p); -char *libxl_dominfo_to_json(libxl_ctx *ctx, libxl_dominfo *p); - -typedef struct libxl_cpupoolinfo { - uint32_t poolid; - libxl_scheduler sched; - uint32_t n_dom; - libxl_bitmap cpumap; -} libxl_cpupoolinfo; -void libxl_cpupoolinfo_dispose(libxl_cpupoolinfo *p); -void libxl_cpupoolinfo_init(libxl_cpupoolinfo *p); -char *libxl_cpupoolinfo_to_json(libxl_ctx *ctx, libxl_cpupoolinfo *p); - -typedef struct libxl_vminfo { - libxl_uuid uuid; - libxl_domid domid; -} libxl_vminfo; -void libxl_vminfo_dispose(libxl_vminfo *p); -void libxl_vminfo_init(libxl_vminfo *p); -char *libxl_vminfo_to_json(libxl_ctx *ctx, libxl_vminfo *p); - -typedef struct libxl_version_info { - int xen_version_major; - int xen_version_minor; - char * xen_version_extra; - char * compiler; - char * compile_by; - char * compile_domain; - char * compile_date; - char * capabilities; - char * changeset; - uint64_t virt_start; - int pagesize; - char * commandline; -} libxl_version_info; -void libxl_version_info_dispose(libxl_version_info *p); -void libxl_version_info_init(libxl_version_info *p); -char *libxl_version_info_to_json(libxl_ctx *ctx, libxl_version_info *p); - -typedef struct libxl_domain_create_info { - libxl_domain_type type; - libxl_defbool hap; - libxl_defbool oos; - uint32_t ssidref; - char * name; - libxl_uuid uuid; - libxl_key_value_list xsdata; - libxl_key_value_list platformdata; - uint32_t poolid; - libxl_defbool run_hotplug_scripts; -} libxl_domain_create_info; -void libxl_domain_create_info_dispose(libxl_domain_create_info *p); -void libxl_domain_create_info_init(libxl_domain_create_info *p); -char *libxl_domain_create_info_to_json(libxl_ctx *ctx, libxl_domain_create_info *p); - -typedef struct libxl_domain_sched_params { - libxl_scheduler sched; - int weight; - int cap; - int period; - int slice; - int latency; - int extratime; -} libxl_domain_sched_params; -void libxl_domain_sched_params_dispose(libxl_domain_sched_params *p); -void libxl_domain_sched_params_init(libxl_domain_sched_params *p); -char *libxl_domain_sched_params_to_json(libxl_ctx *ctx, libxl_domain_sched_params *p); - -typedef struct libxl_domain_build_info { - int max_vcpus; - libxl_bitmap avail_vcpus; - libxl_bitmap cpumap; - libxl_defbool numa_placement; - libxl_tsc_mode tsc_mode; - uint64_t max_memkb; - uint64_t target_memkb; - uint64_t video_memkb; - uint64_t shadow_memkb; - uint32_t rtc_timeoffset; - libxl_defbool localtime; - libxl_defbool disable_migrate; - libxl_cpuid_policy_list cpuid; - char * blkdev_start; - libxl_device_model_version device_model_version; - libxl_defbool device_model_stubdomain; - char * device_model; - uint32_t device_model_ssidref; - libxl_string_list extra; - libxl_string_list extra_pv; - libxl_string_list extra_hvm; - libxl_domain_sched_params sched_params; - int num_ioports; - libxl_ioport_range * ioports; - int num_irqs; - uint32_t * irqs; - libxl_domain_type type; - union { - struct { - char * firmware; - libxl_bios_type bios; - libxl_defbool pae; - libxl_defbool apic; - libxl_defbool acpi; - libxl_defbool acpi_s3; - libxl_defbool acpi_s4; - libxl_defbool nx; - libxl_defbool viridian; - char * timeoffset; - libxl_defbool hpet; - libxl_defbool vpt_align; - libxl_timer_mode timer_mode; - libxl_defbool nested_hvm; - libxl_defbool nographic; - libxl_vga_interface_info vga; - libxl_vnc_info vnc; - char * keymap; - libxl_sdl_info sdl; - libxl_spice_info spice; - libxl_defbool gfx_passthru; - char * serial; - char * boot; - libxl_defbool usb; - char * usbdevice; - char * soundhw; - libxl_defbool xen_platform_pci; - } hvm; - struct { - char * kernel; - uint64_t slack_memkb; - char * bootloader; - libxl_string_list bootloader_args; - char * cmdline; - char * ramdisk; - const char * features; - libxl_defbool e820_host; - } pv; - } u; -} libxl_domain_build_info; -void libxl_domain_build_info_dispose(libxl_domain_build_info *p); -void libxl_domain_build_info_init(libxl_domain_build_info *p); -void libxl_domain_build_info_init_type(libxl_domain_build_info *p, libxl_domain_type type); -char *libxl_domain_build_info_to_json(libxl_ctx *ctx, libxl_domain_build_info *p); - -typedef struct libxl_device_vfb { - libxl_domid backend_domid; - libxl_devid devid; - libxl_vnc_info vnc; - libxl_sdl_info sdl; - char * keymap; -} libxl_device_vfb; -void libxl_device_vfb_dispose(libxl_device_vfb *p); -void libxl_device_vfb_init(libxl_device_vfb *p); -char *libxl_device_vfb_to_json(libxl_ctx *ctx, libxl_device_vfb *p); - -typedef struct libxl_device_vkb { - libxl_domid backend_domid; - libxl_devid devid; -} libxl_device_vkb; -void libxl_device_vkb_dispose(libxl_device_vkb *p); -void libxl_device_vkb_init(libxl_device_vkb *p); -char *libxl_device_vkb_to_json(libxl_ctx *ctx, libxl_device_vkb *p); - -typedef struct libxl_device_disk { - libxl_domid backend_domid; - char * pdev_path; - char * vdev; - libxl_disk_backend backend; - libxl_disk_format format; - char * script; - int removable; - int readwrite; - int is_cdrom; -} libxl_device_disk; -void libxl_device_disk_dispose(libxl_device_disk *p); -void libxl_device_disk_init(libxl_device_disk *p); -char *libxl_device_disk_to_json(libxl_ctx *ctx, libxl_device_disk *p); - -typedef struct libxl_device_nic { - libxl_domid backend_domid; - libxl_devid devid; - int mtu; - char * model; - libxl_mac mac; - char * ip; - char * bridge; - char * ifname; - char * script; - libxl_nic_type nictype; - uint64_t rate_bytes_per_interval; - uint32_t rate_interval_usecs; -} libxl_device_nic; -void libxl_device_nic_dispose(libxl_device_nic *p); -void libxl_device_nic_init(libxl_device_nic *p); -char *libxl_device_nic_to_json(libxl_ctx *ctx, libxl_device_nic *p); - -typedef struct libxl_device_pci { - uint8_t func; - uint8_t dev; - uint8_t bus; - int domain; - uint32_t vdevfn; - uint32_t vfunc_mask; - bool msitranslate; - bool power_mgmt; - bool permissive; -} libxl_device_pci; -void libxl_device_pci_dispose(libxl_device_pci *p); -void libxl_device_pci_init(libxl_device_pci *p); -char *libxl_device_pci_to_json(libxl_ctx *ctx, libxl_device_pci *p); - -typedef struct libxl_domain_config { - libxl_domain_create_info c_info; - libxl_domain_build_info b_info; - int num_disks; - libxl_device_disk * disks; - int num_nics; - libxl_device_nic * nics; - int num_pcidevs; - libxl_device_pci * pcidevs; - int num_vfbs; - libxl_device_vfb * vfbs; - int num_vkbs; - libxl_device_vkb * vkbs; - libxl_action_on_shutdown on_poweroff; - libxl_action_on_shutdown on_reboot; - libxl_action_on_shutdown on_watchdog; - libxl_action_on_shutdown on_crash; -} libxl_domain_config; -void libxl_domain_config_dispose(libxl_domain_config *p); -void libxl_domain_config_init(libxl_domain_config *p); -char *libxl_domain_config_to_json(libxl_ctx *ctx, libxl_domain_config *p); - -typedef struct libxl_diskinfo { - char * backend; - uint32_t backend_id; - char * frontend; - uint32_t frontend_id; - libxl_devid devid; - int state; - int evtch; - int rref; -} libxl_diskinfo; -void libxl_diskinfo_dispose(libxl_diskinfo *p); -void libxl_diskinfo_init(libxl_diskinfo *p); -char *libxl_diskinfo_to_json(libxl_ctx *ctx, libxl_diskinfo *p); - -typedef struct libxl_nicinfo { - char * backend; - uint32_t backend_id; - char * frontend; - uint32_t frontend_id; - libxl_devid devid; - int state; - int evtch; - int rref_tx; - int rref_rx; -} libxl_nicinfo; -void libxl_nicinfo_dispose(libxl_nicinfo *p); -void libxl_nicinfo_init(libxl_nicinfo *p); -char *libxl_nicinfo_to_json(libxl_ctx *ctx, libxl_nicinfo *p); - -typedef struct libxl_vcpuinfo { - uint32_t vcpuid; - uint32_t cpu; - bool online; - bool blocked; - bool running; - uint64_t vcpu_time; - libxl_bitmap cpumap; -} libxl_vcpuinfo; -void libxl_vcpuinfo_dispose(libxl_vcpuinfo *p); -void libxl_vcpuinfo_init(libxl_vcpuinfo *p); -char *libxl_vcpuinfo_to_json(libxl_ctx *ctx, libxl_vcpuinfo *p); - -typedef struct libxl_physinfo { - uint32_t threads_per_core; - uint32_t cores_per_socket; - uint32_t max_cpu_id; - uint32_t nr_cpus; - uint32_t cpu_khz; - uint64_t total_pages; - uint64_t free_pages; - uint64_t scrub_pages; - uint64_t sharing_freed_pages; - uint64_t sharing_used_frames; - uint32_t nr_nodes; - libxl_hwcap hw_cap; - bool cap_hvm; - bool cap_hvm_directio; -} libxl_physinfo; -void libxl_physinfo_dispose(libxl_physinfo *p); -void libxl_physinfo_init(libxl_physinfo *p); -char *libxl_physinfo_to_json(libxl_ctx *ctx, libxl_physinfo *p); - -typedef struct libxl_numainfo { - uint64_t size; - uint64_t free; - int num_dists; - uint32_t * dists; -} libxl_numainfo; -void libxl_numainfo_dispose(libxl_numainfo *p); -void libxl_numainfo_init(libxl_numainfo *p); -char *libxl_numainfo_to_json(libxl_ctx *ctx, libxl_numainfo *p); - -typedef struct libxl_cputopology { - uint32_t core; - uint32_t socket; - uint32_t node; -} libxl_cputopology; -void libxl_cputopology_dispose(libxl_cputopology *p); -void libxl_cputopology_init(libxl_cputopology *p); -char *libxl_cputopology_to_json(libxl_ctx *ctx, libxl_cputopology *p); - -typedef struct libxl_sched_credit_params { - int tslice_ms; - int ratelimit_us; -} libxl_sched_credit_params; -void libxl_sched_credit_params_init(libxl_sched_credit_params *p); -char *libxl_sched_credit_params_to_json(libxl_ctx *ctx, libxl_sched_credit_params *p); - -typedef struct libxl_domain_remus_info { - int interval; - bool blackhole; - bool compression; -} libxl_domain_remus_info; -void libxl_domain_remus_info_dispose(libxl_domain_remus_info *p); -void libxl_domain_remus_info_init(libxl_domain_remus_info *p); -char *libxl_domain_remus_info_to_json(libxl_ctx *ctx, libxl_domain_remus_info *p); - -typedef enum libxl_event_type { - LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN = 1, - LIBXL_EVENT_TYPE_DOMAIN_DEATH = 2, - LIBXL_EVENT_TYPE_DISK_EJECT = 3, - LIBXL_EVENT_TYPE_OPERATION_COMPLETE = 4, - LIBXL_EVENT_TYPE_DOMAIN_CREATE_CONSOLE_AVAILABLE = 5, -} libxl_event_type; -char *libxl_event_type_to_json(libxl_ctx *ctx, libxl_event_type p); -const char *libxl_event_type_to_string(libxl_event_type p); -int libxl_event_type_from_string(const char *s, libxl_event_type *e); -extern libxl_enum_string_table libxl_event_type_string_table[]; - -typedef struct libxl_event { - libxl_ev_link link; - libxl_domid domid; - libxl_uuid domuuid; - uint64_t for_user; - libxl_event_type type; - union { - struct { - uint8_t shutdown_reason; - } domain_shutdown; - struct { - } domain_death; - struct { - char * vdev; - libxl_device_disk disk; - } disk_eject; - struct { - int rc; - } operation_complete; - struct { - } domain_create_console_available; - } u; -} libxl_event; -void libxl_event_dispose(libxl_event *p); -void libxl_event_init(libxl_event *p); -void libxl_event_init_type(libxl_event *p, libxl_event_type type); -char *libxl_event_to_json(libxl_ctx *ctx, libxl_event *p); - -#endif /* __LIBXL_TYPES_H */ diff --git a/SOURCES/_libxl_types_json.h b/SOURCES/_libxl_types_json.h deleted file mode 100644 index 9b0cffd1..00000000 --- a/SOURCES/_libxl_types_json.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __LIBXL_TYPES_JSON_H -#define __LIBXL_TYPES_JSON_H - -/* - * DO NOT EDIT. - * - * This file is autogenerated by - * "gentypes.py libxl_types.idl __libxl_types.h __libxl_types_json.h __libxl_types.c" - */ - -yajl_gen_status libxl_domain_type_gen_json(yajl_gen hand, libxl_domain_type *p); -yajl_gen_status libxl_device_model_version_gen_json(yajl_gen hand, libxl_device_model_version *p); -yajl_gen_status libxl_console_type_gen_json(yajl_gen hand, libxl_console_type *p); -yajl_gen_status libxl_disk_format_gen_json(yajl_gen hand, libxl_disk_format *p); -yajl_gen_status libxl_disk_backend_gen_json(yajl_gen hand, libxl_disk_backend *p); -yajl_gen_status libxl_nic_type_gen_json(yajl_gen hand, libxl_nic_type *p); -yajl_gen_status libxl_action_on_shutdown_gen_json(yajl_gen hand, libxl_action_on_shutdown *p); -yajl_gen_status libxl_trigger_gen_json(yajl_gen hand, libxl_trigger *p); -yajl_gen_status libxl_tsc_mode_gen_json(yajl_gen hand, libxl_tsc_mode *p); -yajl_gen_status libxl_timer_mode_gen_json(yajl_gen hand, libxl_timer_mode *p); -yajl_gen_status libxl_bios_type_gen_json(yajl_gen hand, libxl_bios_type *p); -yajl_gen_status libxl_scheduler_gen_json(yajl_gen hand, libxl_scheduler *p); -yajl_gen_status libxl_shutdown_reason_gen_json(yajl_gen hand, libxl_shutdown_reason *p); -yajl_gen_status libxl_vga_interface_type_gen_json(yajl_gen hand, libxl_vga_interface_type *p); -yajl_gen_status libxl_ioport_range_gen_json(yajl_gen hand, libxl_ioport_range *p); -yajl_gen_status libxl_vga_interface_info_gen_json(yajl_gen hand, libxl_vga_interface_info *p); -yajl_gen_status libxl_vnc_info_gen_json(yajl_gen hand, libxl_vnc_info *p); -yajl_gen_status libxl_spice_info_gen_json(yajl_gen hand, libxl_spice_info *p); -yajl_gen_status libxl_sdl_info_gen_json(yajl_gen hand, libxl_sdl_info *p); -yajl_gen_status libxl_dominfo_gen_json(yajl_gen hand, libxl_dominfo *p); -yajl_gen_status libxl_cpupoolinfo_gen_json(yajl_gen hand, libxl_cpupoolinfo *p); -yajl_gen_status libxl_vminfo_gen_json(yajl_gen hand, libxl_vminfo *p); -yajl_gen_status libxl_version_info_gen_json(yajl_gen hand, libxl_version_info *p); -yajl_gen_status libxl_domain_create_info_gen_json(yajl_gen hand, libxl_domain_create_info *p); -yajl_gen_status libxl_domain_sched_params_gen_json(yajl_gen hand, libxl_domain_sched_params *p); -yajl_gen_status libxl_domain_build_info_gen_json(yajl_gen hand, libxl_domain_build_info *p); -yajl_gen_status libxl_device_vfb_gen_json(yajl_gen hand, libxl_device_vfb *p); -yajl_gen_status libxl_device_vkb_gen_json(yajl_gen hand, libxl_device_vkb *p); -yajl_gen_status libxl_device_disk_gen_json(yajl_gen hand, libxl_device_disk *p); -yajl_gen_status libxl_device_nic_gen_json(yajl_gen hand, libxl_device_nic *p); -yajl_gen_status libxl_device_pci_gen_json(yajl_gen hand, libxl_device_pci *p); -yajl_gen_status libxl_domain_config_gen_json(yajl_gen hand, libxl_domain_config *p); -yajl_gen_status libxl_diskinfo_gen_json(yajl_gen hand, libxl_diskinfo *p); -yajl_gen_status libxl_nicinfo_gen_json(yajl_gen hand, libxl_nicinfo *p); -yajl_gen_status libxl_vcpuinfo_gen_json(yajl_gen hand, libxl_vcpuinfo *p); -yajl_gen_status libxl_physinfo_gen_json(yajl_gen hand, libxl_physinfo *p); -yajl_gen_status libxl_numainfo_gen_json(yajl_gen hand, libxl_numainfo *p); -yajl_gen_status libxl_cputopology_gen_json(yajl_gen hand, libxl_cputopology *p); -yajl_gen_status libxl_sched_credit_params_gen_json(yajl_gen hand, libxl_sched_credit_params *p); -yajl_gen_status libxl_domain_remus_info_gen_json(yajl_gen hand, libxl_domain_remus_info *p); -yajl_gen_status libxl_event_type_gen_json(yajl_gen hand, libxl_event_type *p); -yajl_gen_status libxl_event_gen_json(yajl_gen hand, libxl_event *p); - -#endif /* __LIBXL_TYPES_JSON_H */ diff --git a/SOURCES/ffs-init b/SOURCES/ffs-init deleted file mode 100755 index fca5251a..00000000 --- a/SOURCES/ffs-init +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# -# ffs Startup script for flat file storage service -# -# chkconfig: 2345 13 88 -# description: Manages VM disks stored in locally-mounted filesystems. -### BEGIN INIT INFO -# Provides: ffs -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Flat file storage service -# Description: Manages VM disks stored in locally-mounted filesystems. -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/ffs.pid - -prog=ffs -exec=/usr/sbin/ffs -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -# Use 'blktap 2.5' if it has been installed -if [ -d /usr/lib64/blktap ]; then - export XCP_PATH=/usr/lib64/blktap/sbin - export TAPDISK2=/usr/lib64/blktap/libexec/tapdisk -elif [ -d /usr/lib/blktap ]; then - export XCP_PATH=/usr/lib/blktap/sbin - export TAPDISK2=/usr/lib/blktap/libexec/tapdisk -fi -logger -t ffs "XCP_PATH=${XCP_PATH} TAPDISK2=${TAPDISK2}" - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting ffs: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $FFS_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down ffs: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/forkexecd-init b/SOURCES/forkexecd-init deleted file mode 100755 index 97d4cab6..00000000 --- a/SOURCES/forkexecd-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# forkexecd Startup script for process management service -# -# chkconfig: 2345 13 88 -# description: Manages subprocesses independently from a multithreaded program. -### BEGIN INIT INFO -# Provides: forkexecd -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Manage subprocesses -# Description: Manage subprocesses independently from a multithreaded program. -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/forkexecd.pid - -prog=forkexecd -exec=/usr/sbin/forkexecd -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting forkexecd: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon $FORKEXEC_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down forkexecd: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch b/SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch deleted file mode 100644 index 585c39e8..00000000 --- a/SOURCES/libvirt-Use-qemu-system-i386-as-binary-instead-of-qemu.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 37865f1dead1fac2ee34af48f96d19d686296e04 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 13 Sep 2012 14:37:22 +0100 -Subject: [PATCH] Use 'qemu-system-i386' as binary instead of 'qemu'. - ---- - src/qemu/qemu_capabilities.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c -index af3b0b2..179b3d2 100644 ---- a/src/qemu/qemu_capabilities.c -+++ b/src/qemu/qemu_capabilities.c -@@ -244,8 +244,8 @@ static const struct qemu_feature_flags const arch_info_x86_64_flags [] = { - - /* The archicture tables for supported QEMU archs */ - static const struct qemu_arch_info const arch_info_hvm[] = { -- { "i686", 32, NULL, "qemu", -- "qemu-system-x86_64", arch_info_i686_flags, 4 }, -+ { "i686", 32, NULL, "qemu-system-i386", -+ NULL, arch_info_i686_flags, 4 }, - { "x86_64", 64, NULL, "qemu-system-x86_64", - NULL, arch_info_x86_64_flags, 2 }, - { "arm", 32, NULL, "qemu-system-arm", NULL, NULL, 0 }, --- -1.7.11.4 - diff --git a/SOURCES/libvirt-dbus.patch b/SOURCES/libvirt-dbus.patch deleted file mode 100644 index eb3e2c66..00000000 --- a/SOURCES/libvirt-dbus.patch +++ /dev/null @@ -1,225 +0,0 @@ -Return-Path: alexl@redhat.com -Received: from zmta04.collab.prod.int.phx2.redhat.com (LHLO - zmta04.collab.prod.int.phx2.redhat.com) (10.5.81.11) by - zmail20.collab.prod.int.phx2.redhat.com with LMTP; Tue, 9 Oct 2012 11:26:38 - -0400 (EDT) -Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) - by zmta04.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4096D0927 - for ; Tue, 9 Oct 2012 11:26:38 -0400 (EDT) -Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) - by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q99FQV93016417; - Tue, 9 Oct 2012 11:26:33 -0400 -From: Alexander Larsson -To: libvir-list@redhat.com -Cc: Alexander Larsson -Subject: [PATCH 1/2] virdbus: Add virDBusGetSessionBus helper -Date: Tue, 9 Oct 2012 17:26:28 +0200 -Message-Id: <1349796389-6122-2-git-send-email-alexl@redhat.com> -In-Reply-To: <1349796389-6122-1-git-send-email-alexl@redhat.com> -References: <1349796389-6122-1-git-send-email-alexl@redhat.com> -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 - -This splits out some common code from virDBusGetSystemBus and -uses it to implement a new virDBusGetSessionBus helper. ---- - src/libvirt_private.syms | 1 + - src/util/virdbus.c | 84 ++++++++++++++++++++++++++++++++++++------------ - src/util/virdbus.h | 1 + - 3 files changed, 66 insertions(+), 20 deletions(-) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index a8c81e7..88f1b2f 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -1310,6 +1310,7 @@ virConsoleOpen; - - # virdbus.h - virDBusGetSystemBus; -+virDBusGetSessionBus; - - - # virdomainlist.h -diff --git a/src/util/virdbus.c b/src/util/virdbus.c -index 4acce12..2dc7265 100644 ---- a/src/util/virdbus.c -+++ b/src/util/virdbus.c -@@ -32,40 +32,49 @@ - #ifdef HAVE_DBUS - - static DBusConnection *systembus = NULL; --static virOnceControl once = VIR_ONCE_CONTROL_INITIALIZER; --static DBusError dbuserr; -+static DBusConnection *sessionbus = NULL; -+static virOnceControl systemonce = VIR_ONCE_CONTROL_INITIALIZER; -+static virOnceControl sessiononce = VIR_ONCE_CONTROL_INITIALIZER; -+static DBusError systemdbuserr; -+static DBusError sessiondbuserr; - - static dbus_bool_t virDBusAddWatch(DBusWatch *watch, void *data); - static void virDBusRemoveWatch(DBusWatch *watch, void *data); - static void virDBusToggleWatch(DBusWatch *watch, void *data); - --static void virDBusSystemBusInit(void) -+static DBusConnection *virDBusBusInit(DBusBusType type, DBusError *dbuserr) - { -+ DBusConnection *bus; -+ - /* Allocate and initialize a new HAL context */ - dbus_connection_set_change_sigpipe(FALSE); - dbus_threads_init_default(); - -- dbus_error_init(&dbuserr); -- if (!(systembus = dbus_bus_get(DBUS_BUS_SYSTEM, &dbuserr))) -- return; -+ dbus_error_init(dbuserr); -+ if (!(bus = dbus_bus_get(type, dbuserr))) -+ return NULL; - -- dbus_connection_set_exit_on_disconnect(systembus, FALSE); -+ dbus_connection_set_exit_on_disconnect(bus, FALSE); - - /* Register dbus watch callbacks */ -- if (!dbus_connection_set_watch_functions(systembus, -+ if (!dbus_connection_set_watch_functions(bus, - virDBusAddWatch, - virDBusRemoveWatch, - virDBusToggleWatch, -- NULL, NULL)) { -- systembus = NULL; -- return; -+ bus, NULL)) { -+ return NULL; - } -+ return bus; - } - -+static void virDBusSystemBusInit(void) -+{ -+ systembus = virDBusBusInit (DBUS_BUS_SYSTEM, &systemdbuserr); -+} - - DBusConnection *virDBusGetSystemBus(void) - { -- if (virOnce(&once, virDBusSystemBusInit) < 0) { -+ if (virOnce(&systemonce, virDBusSystemBusInit) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Unable to run one time DBus initializer")); - return NULL; -@@ -74,7 +83,7 @@ DBusConnection *virDBusGetSystemBus(void) - if (!systembus) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to get DBus system bus connection: %s"), -- dbuserr.message ? dbuserr.message : "watch setup failed"); -+ systemdbuserr.message ? systemdbuserr.message : "watch setup failed"); - return NULL; - } - -@@ -82,13 +91,45 @@ DBusConnection *virDBusGetSystemBus(void) - } - - -+static void virDBusSessionBusInit(void) -+{ -+ sessionbus = virDBusBusInit (DBUS_BUS_SESSION, &sessiondbuserr); -+} -+ -+DBusConnection *virDBusGetSessionBus(void) -+{ -+ if (virOnce(&sessiononce, virDBusSessionBusInit) < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -+ _("Unable to run one time DBus initializer")); -+ return NULL; -+ } -+ -+ if (!sessionbus) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("Unable to get DBus session bus connection: %s"), -+ sessiondbuserr.message ? sessiondbuserr.message : "watch setup failed"); -+ return NULL; -+ } -+ -+ return sessionbus; -+} -+ -+struct virDBusWatch -+{ -+ int watch; -+ DBusConnection *bus; -+}; -+ - static void virDBusWatchCallback(int fdatch ATTRIBUTE_UNUSED, - int fd ATTRIBUTE_UNUSED, - int events, void *opaque) - { - DBusWatch *watch = opaque; -+ struct virDBusWatch *info; - int dbus_flags = 0; - -+ info = dbus_watch_get_data(watch); -+ - if (events & VIR_EVENT_HANDLE_READABLE) - dbus_flags |= DBUS_WATCH_READABLE; - if (events & VIR_EVENT_HANDLE_WRITABLE) -@@ -100,7 +141,7 @@ static void virDBusWatchCallback(int fdatch ATTRIBUTE_UNUSED, - - (void)dbus_watch_handle(watch, dbus_flags); - -- while (dbus_connection_dispatch(systembus) == DBUS_DISPATCH_DATA_REMAINS) -+ while (dbus_connection_dispatch(info->bus) == DBUS_DISPATCH_DATA_REMAINS) - /* keep dispatching while data remains */; - } - -@@ -120,18 +161,13 @@ static int virDBusTranslateWatchFlags(int dbus_flags) - } - - --struct virDBusWatch --{ -- int watch; --}; -- - static void virDBusWatchFree(void *data) { - struct virDBusWatch *info = data; - VIR_FREE(info); - } - - static dbus_bool_t virDBusAddWatch(DBusWatch *watch, -- void *data ATTRIBUTE_UNUSED) -+ void *data) - { - int flags = 0; - int fd; -@@ -148,6 +184,7 @@ static dbus_bool_t virDBusAddWatch(DBusWatch *watch, - # else - fd = dbus_watch_get_fd(watch); - # endif -+ info->bus = (DBusConnection *)data; - info->watch = virEventAddHandle(fd, flags, - virDBusWatchCallback, - watch, NULL); -@@ -194,4 +231,11 @@ DBusConnection *virDBusGetSystemBus(void) - return NULL; - } - -+DBusConnection *virDBusGetSessionBus(void) -+{ -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ "%s", _("DBus support not compiled into this binary")); -+ return NULL; -+} -+ - #endif /* ! HAVE_DBUS */ -diff --git a/src/util/virdbus.h b/src/util/virdbus.h -index 27dca00..e443fbe 100644 ---- a/src/util/virdbus.h -+++ b/src/util/virdbus.h -@@ -30,5 +30,6 @@ - # include "internal.h" - - DBusConnection *virDBusGetSystemBus(void); -+DBusConnection *virDBusGetSessionBus(void); - - #endif /* __VIR_DBUS_H__ */ --- -1.7.12.1 - diff --git a/SOURCES/libvirt-emulator.patch b/SOURCES/libvirt-emulator.patch deleted file mode 100644 index 675b376b..00000000 --- a/SOURCES/libvirt-emulator.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c -index f549a5d..abbd3c0 100644 ---- a/src/libxl/libxl_conf.c -+++ b/src/libxl/libxl_conf.c -@@ -811,6 +811,30 @@ libxlMakeCapabilities(libxl_ctx *ctx) - } - - int -+libxlMakeEmulator(virDomainDefPtr def, libxl_domain_config *d_config) -+{ -+ /* No explicit override means use the default */ -+ if (!def->emulator) { -+ return 0; -+ } -+ if (strstr(def->emulator, "/qemu-system-")) { -+ d_config->b_info.device_model_version = -+ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; -+ return 0; -+ } -+ if (strstr(def->emulator, "/qemu-dm")) { -+ d_config->b_info.device_model_version = -+ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; -+ return 0; -+ } -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("libxenlight doesn't support emulator '%s'"), -+ def->emulator); -+ return -1; -+} -+ -+ -+int - libxlBuildDomainConfig(libxlDriverPrivatePtr driver, - virDomainDefPtr def, libxl_domain_config *d_config) - { -@@ -834,6 +858,10 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver, - goto error; - } - -+ if (libxlMakeEmulator(def, d_config) < 0) { -+ goto error; -+ } -+ - d_config->on_reboot = def->onReboot; - d_config->on_poweroff = def->onPoweroff; - d_config->on_crash = def->onCrash; diff --git a/SOURCES/libvirt-qdisk-fixup.patch b/SOURCES/libvirt-qdisk-fixup.patch deleted file mode 100644 index a63abbb9..00000000 --- a/SOURCES/libvirt-qdisk-fixup.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- libvirt-0.10.2.4/src/libxl/libxl_conf.c.orig 2013-04-26 16:14:27.233001065 +0000 -+++ libvirt-0.10.2.4/src/libxl/libxl_conf.c 2013-04-26 16:16:10.456001296 +0000 -@@ -542,27 +542,7 @@ - x_disk->backend = LIBXL_DISK_BACKEND_PHY; - } else if (STREQ(l_disk->driverName, "qemu")) { - x_disk->backend = LIBXL_DISK_BACKEND_QDISK; -- switch (l_disk->format) { -- case VIR_STORAGE_FILE_QCOW: -- x_disk->format = LIBXL_DISK_FORMAT_QCOW; -- break; -- case VIR_STORAGE_FILE_QCOW2: -- x_disk->format = LIBXL_DISK_FORMAT_QCOW2; -- break; -- case VIR_STORAGE_FILE_VHD: -- x_disk->format = LIBXL_DISK_FORMAT_VHD; -- break; -- case VIR_STORAGE_FILE_NONE: -- /* No subtype specified, default to raw */ -- case VIR_STORAGE_FILE_RAW: -- x_disk->format = LIBXL_DISK_FORMAT_RAW; -- break; -- default: -- virReportError(VIR_ERR_INTERNAL_ERROR, -- _("libxenlight does not support disk format %s"), -- virStorageFileFormatTypeToString(l_disk->format)); -- return -1; -- } -+ x_disk->format = LIBXL_DISK_FORMAT_RAW; - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk driver %s"), diff --git a/SOURCES/libvirt-qdisk.patch b/SOURCES/libvirt-qdisk.patch deleted file mode 100644 index c42d372c..00000000 --- a/SOURCES/libvirt-qdisk.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit cb1a4ff0bc3af7c41f5755560062958853d6cac4 -Author: David Scott -Date: Fri Apr 26 08:40:10 2013 +0000 - - Patch from Jim - -diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c -index 7e0753a..f549a5d 100644 ---- a/src/libxl/libxl_conf.c -+++ b/src/libxl/libxl_conf.c -@@ -505,6 +505,29 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk) - } else if (STREQ(l_disk->driverName, "phy")) { - x_disk->format = LIBXL_DISK_FORMAT_RAW; - x_disk->backend = LIBXL_DISK_BACKEND_PHY; -+ } else if (STREQ(l_disk->driverName, "qemu")) { -+ x_disk->backend = LIBXL_DISK_BACKEND_QDISK; -+ switch (l_disk->format) { -+ case VIR_STORAGE_FILE_QCOW: -+ x_disk->format = LIBXL_DISK_FORMAT_QCOW; -+ break; -+ case VIR_STORAGE_FILE_QCOW2: -+ x_disk->format = LIBXL_DISK_FORMAT_QCOW2; -+ break; -+ case VIR_STORAGE_FILE_VHD: -+ x_disk->format = LIBXL_DISK_FORMAT_VHD; -+ break; -+ case VIR_STORAGE_FILE_NONE: -+ /* No subtype specified, default to raw */ -+ case VIR_STORAGE_FILE_RAW: -+ x_disk->format = LIBXL_DISK_FORMAT_RAW; -+ break; -+ default: -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("libxenlight does not support disk format %s"), -+ virStorageFileFormatTypeToString(l_disk->format)); -+ return -1; -+ } - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk driver %s"), diff --git a/SOURCES/libvirt-save-with-session.patch b/SOURCES/libvirt-save-with-session.patch deleted file mode 100644 index 2cc8dc6a..00000000 --- a/SOURCES/libvirt-save-with-session.patch +++ /dev/null @@ -1,303 +0,0 @@ -Return-Path: alexl@redhat.com -Received: from zmta06.collab.prod.int.phx2.redhat.com (LHLO - zmta06.collab.prod.int.phx2.redhat.com) (10.5.81.13) by - zmail20.collab.prod.int.phx2.redhat.com with LMTP; Tue, 9 Oct 2012 11:26:39 - -0400 (EDT) -Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) - by zmta06.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4A8516044F - for ; Tue, 9 Oct 2012 11:26:39 -0400 (EDT) -Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) - by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q99FQV94016417; - Tue, 9 Oct 2012 11:26:34 -0400 -From: Alexander Larsson -To: libvir-list@redhat.com -Cc: Alexander Larsson -Subject: [PATCH 2/2] Shut down session libvirtd cleanly -Date: Tue, 9 Oct 2012 17:26:29 +0200 -Message-Id: <1349796389-6122-3-git-send-email-alexl@redhat.com> -In-Reply-To: <1349796389-6122-1-git-send-email-alexl@redhat.com> -References: <1349796389-6122-1-git-send-email-alexl@redhat.com> -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 - -When the session dies or when the system is going to be shut down -we save all active VMs and exit libvirtd. - -Additionally whenever there is an active domain we hold a -shutdown inhibitor to avoid shutting down before all the -VMs are saved. ---- - daemon/libvirtd.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 244 insertions(+) - -diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c -index b49acc5..c3bf2ce 100644 ---- a/daemon/libvirtd.c -+++ b/daemon/libvirtd.c -@@ -98,6 +98,11 @@ - - #include "configmake.h" - -+#ifdef HAVE_DBUS -+# include -+# include "virdbus.h" -+#endif -+ - #if HAVE_SASL - virNetSASLContextPtr saslCtxt = NULL; - #endif -@@ -769,6 +774,212 @@ static int daemonSetupSignals(virNetServerPtr srv) - return 0; - } - -+#ifdef HAVE_DBUS -+ -+static DBusConnection *sessionBus; -+static DBusConnection *systemBus; -+static virConnectPtr sessionConnection; -+static int numActiveDomains; -+static bool hasInhibit; -+static bool callingInhibit; -+static int inhibitFd = -1; -+ -+static void runSaveAllDomains(void *opaque) -+{ -+ virNetServerPtr srv = opaque; -+ int numDomains, i; -+ int state; -+ virDomainPtr *domains = NULL; -+ unsigned int *flags = NULL; -+ -+ numDomains = virConnectListAllDomains(sessionConnection, &domains, VIR_CONNECT_LIST_DOMAINS_ACTIVE); -+ if (numDomains < 0) -+ goto cleanup; -+ -+ if (VIR_ALLOC_N(flags, numDomains) < 0) { -+ virReportOOMError(); -+ goto cleanup; -+ } -+ -+ /* First we pause all VMs to make them stop dirtying -+ pages, etc. We remember if any VMs were paused so -+ we can restore that on resume. */ -+ for (i = 0 ; i < numDomains ; i++) { -+ flags[i] = VIR_DOMAIN_SAVE_RUNNING; -+ if (virDomainGetState (domains[i], &state, NULL, 0) == 0) { -+ if (state == VIR_DOMAIN_PAUSED) { -+ flags[i] = VIR_DOMAIN_SAVE_PAUSED; -+ } -+ } -+ virDomainSuspend (domains[i]); -+ } -+ -+ /* Then we save the VMs to disk */ -+ for (i = 0 ; i < numDomains ; i++) -+ virDomainManagedSave (domains[i], flags[i]); -+ -+ VIR_FREE (domains); -+ VIR_FREE (flags); -+ -+ cleanup: -+ if (domains != NULL) { -+ for (i = 0 ; i < numDomains ; i++) -+ virDomainFree (domains[i]); -+ VIR_FREE (domains); -+ } -+ if (flags != NULL) -+ VIR_FREE (flags); -+ -+ /* We don't need any shutdown inhibit lock anymore now */ -+ if (inhibitFd != -1) { -+ if (VIR_CLOSE (inhibitFd) < 0) -+ virReportSystemError(errno, "%s", _("failed to close file")); -+ inhibitFd = -1; -+ } -+ -+ /* Exit libvirtd cleanly */ -+ virNetServerQuit (srv); -+} -+ -+/* We do this in a thread to not block the main loop */ -+static void saveAllDomains(virNetServerPtr srv) -+{ -+ virThread thr; -+ virObjectRef(srv); -+ if (virThreadCreate(&thr, false, runSaveAllDomains, srv) < 0) { -+ virObjectUnref(srv); -+ } -+} -+ -+static void gotInhibitReply (DBusPendingCall *pending, -+ void *opaque ATTRIBUTE_UNUSED) -+{ -+ DBusMessage *reply; -+ int fd; -+ -+ callingInhibit = false; -+ -+ reply = dbus_pending_call_steal_reply (pending); -+ if (reply == NULL) -+ return; -+ -+ if (dbus_message_get_args (reply, NULL, -+ DBUS_TYPE_UNIX_FD, &fd, -+ DBUS_TYPE_INVALID)) { -+ if (hasInhibit) -+ inhibitFd = fd; -+ else { -+ /* We stopped the last VM since we made the inhibit call */ -+ if (VIR_CLOSE (fd) < 0) { -+ virReportSystemError(errno, "%s", _("failed to close file")); -+ } -+ } -+ } -+ dbus_message_unref (reply); -+} -+ -+/* As per: http://www.freedesktop.org/wiki/Software/systemd/inhibit */ -+static void callInhibit(const char *what, -+ const char *who, -+ const char *why, -+ const char *mode) -+{ -+ DBusMessage *message; -+ DBusPendingCall *pendingReply; -+ -+ if (systemBus == NULL) -+ return; -+ -+ /* Only one outstanding call at a time */ -+ if (callingInhibit) -+ return; -+ -+ message = dbus_message_new_method_call ("org.freedesktop.login1", -+ "/org/freedesktop/login1", -+ "org.freedesktop.login1.Manager", -+ "Inhibit"); -+ if (message == NULL) -+ return; -+ -+ dbus_message_append_args (message, -+ DBUS_TYPE_STRING, &what, -+ DBUS_TYPE_STRING, &who, -+ DBUS_TYPE_STRING, &why, -+ DBUS_TYPE_STRING, &mode, -+ DBUS_TYPE_INVALID); -+ -+ pendingReply = NULL; -+ if (dbus_connection_send_with_reply (systemBus, message, -+ &pendingReply, -+ 25*1000)) { -+ dbus_pending_call_set_notify (pendingReply, -+ gotInhibitReply, -+ NULL, NULL); -+ callingInhibit = true; -+ } -+ dbus_message_unref (message); -+} -+ -+ -+static void numActiveDomainsChanged(void) -+{ -+ if (numActiveDomains > 0 && !hasInhibit) { -+ callInhibit("shutdown", _("Libvirt"), _("Virtual machines need to be saved"), "delay"); -+ hasInhibit = true; -+ } else if (numActiveDomains == 0 && hasInhibit) { -+ if (inhibitFd != -1) { -+ if (VIR_CLOSE (inhibitFd) < 0) { -+ virReportSystemError(errno, "%s", _("failed to close file")); -+ } -+ inhibitFd = -1; -+ } -+ hasInhibit = false; -+ } -+} -+ -+static int lifecycleEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED, -+ virDomainPtr dom ATTRIBUTE_UNUSED, -+ int event, -+ int detail ATTRIBUTE_UNUSED, -+ void *opaque ATTRIBUTE_UNUSED) -+{ -+ if (event == VIR_DOMAIN_EVENT_STOPPED) -+ numActiveDomains--; -+ else if (event == VIR_DOMAIN_EVENT_STARTED) -+ numActiveDomains++; -+ -+ numActiveDomainsChanged(); -+ -+ return 0; -+} -+ -+static DBusHandlerResult handleSessionMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED, -+ DBusMessage *message, -+ void *userData) -+{ -+ virNetServerPtr srv = userData; -+ -+ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { -+ saveAllDomains (srv); -+ } -+ -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+} -+ -+static DBusHandlerResult handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED, -+ DBusMessage *message, -+ void *userData) -+{ -+ virNetServerPtr srv = userData; -+ -+ if (dbus_message_is_signal(message, "org.freedesktop.login1.Manager", "PrepareForShutdown")) { -+ saveAllDomains (srv); -+ } -+ -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+} -+#endif -+ - static void daemonRunStateInit(void *opaque) - { - virNetServerPtr srv = opaque; -@@ -785,6 +996,39 @@ static void daemonRunStateInit(void *opaque) - return; - } - -+#ifdef HAVE_DBUS -+ /* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */ -+ if (!virNetServerIsPrivileged(srv)) { -+ -+ sessionBus = virDBusGetSessionBus (); -+ if (sessionBus != NULL) { -+ dbus_connection_add_filter(sessionBus, -+ handleSessionMessageFunc, srv, NULL); -+ } -+ -+ systemBus = virDBusGetSystemBus (); -+ if (systemBus != NULL) { -+ dbus_connection_add_filter(systemBus, -+ handleSystemMessageFunc, srv, NULL); -+ dbus_bus_add_match(systemBus, -+ "type='signal',sender='org.freedesktop.login1', interface='org.freedesktop.login1.Manager'", -+ NULL); -+ } -+ -+ sessionConnection = virConnectOpen("qemu:///session"); -+ if (sessionConnection != NULL) { -+ numActiveDomains = virConnectNumOfDomains(sessionConnection); -+ virConnectDomainEventRegisterAny(sessionConnection, -+ NULL, -+ VIR_DOMAIN_EVENT_ID_LIFECYCLE, -+ VIR_DOMAIN_EVENT_CALLBACK (lifecycleEventCallback), -+ NULL, NULL); -+ numActiveDomainsChanged(); -+ } -+ -+ } -+#endif -+ - /* Only now accept clients from network */ - virNetServerUpdateServices(srv, true); - virObjectUnref(srv); --- -1.7.12.1 - diff --git a/SOURCES/libxl.h b/SOURCES/libxl.h deleted file mode 100644 index 79ffe44d..00000000 --- a/SOURCES/libxl.h +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (C) 2009 Citrix Ltd. - * Author Vincent Hanquez - * - * This program 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; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program 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. - */ - -#define OCAML_READY - -/* - * libxl API compatibility - * - * From Xen 4.2 onwards the API of libxl will be maintained in a - * stable manner. This means that it should be possible to write an - * application against the API provided by libxl in Xen 4.2 and expect - * that it will continue to compile against future versions of Xen - * without source modification. - * - * In order to make such compatibility possible it is required that - * application which want to be exposed to a particular API #define - * LIBXL_API_VERSION before including libxl.h or any other libxl - * header. The syntax of the LIBXL_API_VERSION is: - * 0xVVSSEE - * where ($(XEN_xxx) from xen/Makefile): - * VV is the Xen major release number, $(XEN_VERSION) - * SS is the Xen sub version number, $(XEN_SUBVERSION) - * EE is the Xen extra version digit, first numeric part of - * $(XEN_EXTRAVERSION) not including the leading "." - * For example the first stable API version, supported by Xen 4.2.0, - * is 0x040200. - * - * Lack of LIBXL_API_VERSION means "the latest" which will - * change. Specifying an unknown LIBXL_API_VERSION will result in a - * compile time error. - * - * Identical versions of the libxl API will represented by the version - * containing the earliest instance of that API. e.g. if 4.2.0 and - * 4.3.0 contain an identical libxl API then only LIBXL_API_VERSION - * 0x040200 will be valid. - * - * We will try especially hard to avoid changing the API during a - * stable series, i.e. it should be unusual for the last byte of - * LIBXL_API_VERSION to be non-zero. - * - * In the event that a change is required which cannot be made - * backwards compatible in this manner a #define of the form - * LIBXL_HAVE_ will always be added in order to make it - * possible to write applciations which build against any version of - * libxl. Such changes are expected to be exceptional and used as a - * last resort. The barrier for backporting such a change to a stable - * branch will be very high. - * - * These guarantees apply only to stable releases of Xen. When an - * incompatible change is made in the unstable tree then - * LIBXL_API_VERSION will be bumped to the next expected stable - * release number on the first such change only. Applications which - * want to support building against Xen unstable are expected to track - * API changes in that tree until it is released as a stable release. - * - * API compatibility will be maintained for all versions of Xen using - * the same $(XEN_VERSION) (e.g. throughout a major release). - */ - -/* - * libxl ABI compatibility - * - * The only guarantee which libxl makes regarding ABI compatibility - * across releases is that the SONAME will always be bumped whenever - * the ABI is changed in an incompatible way. - * - * This applies within stable branches as well as - * development branches. It is possible that a new stable release of - * Xen may require a rebuild of applications using the - * library. However per the API compatibility gaurantees such a - * rebuild should not normally require any source level changes. - * - * As with the API compatiblity the SONAME will only be bumped for the - * first ABI incompatible change in a development branch. - */ - -/* - * libxl memory management - * - * From the point of view of the application (ie, libxl's caller), - * struct libxl_ctx* is threadsafe, and all returned allocated - * structures are obtained from malloc(), and must be freed by the - * caller either directly or by calling an appropriate free function - * provided by libxl. Ie the application does not get automatic - * assistance from libxl in managing these allocations. - * - * Specific details are in the header comments which should be found - * in libxl.h or libxlutil.h, next to the relevant function - * declarations. - * - * Internally, libxl has a garbage collection scheme which allows much libxl - * code to allocate strings etc. for internal use without needing to - * free them. These are called "temporary allocations". - * - * The pool for these temporary allocations, along with any other - * thread-specific data which is private to libxl but shared between - * libxl functions (such as the current xenstore transaction), is - * stored in the "gc context" which is a special enhanced context - * structure allocated automatically by convenience macros at every - * entry to libxl. - * - * Every libxl function falls into one of these categories: - * - * 1. Public functions (declared in libxl.h, libxlutil.h), which may - * be called by libxl applications. If a public function returns - * any allocated object to its caller, that object must have come - * from malloc. - * - * The definitions of public functions MUST use the gc context - * initialisation macros (or do the equivalent work themselves). - * These macros will ensure that all temporary allocations will be - * automatically freed before the function returns to its caller. - * - * A public function may be called from within libxl; the call - * context initialisation macros will make sure that the internal - * caller's context is reused (eg, so that the same xenstore - * transaction is used). But in-libxl callers of libxl public - * functions should note that any libxl public function may cause - * recursively reentry into libxl via the application's event - * callback hook. - * - * Public functions have names like libxl_foobar. - * - * 2. Private functions, which may not be called by libxl - * applications; they are not declared in libxl.h or libxlutil.h - * and they may not be called other than by other libxl functions. - * - * Private functions should not use the gc context initialisation - * macros. - * - * Private functions have names like libxl__foobar (NB, two underscores). - * Also the declaration of such functions must be preceeded by the _hidden - * macro. - * - * Allocations made by a libxl function fall into one of the following - * categories (where "object" includes any memory allocation): - * - * (a) Objects which are not returned to the function's caller. - * These should be allocated from the temporary pool. - * - * (b) Objects which are intended for return to the calling - * application. This includes all allocated objects returned by - * any public function. - * - * It may also include objects allocated by an internal function - * specifically for eventual return by the function's external - * callers, but this situation should be clearly documented in - * comments. - * - * These should be allocated from malloc() et al. and comments - * near the function declaration should explain the memory - * ownership. If a simple free() by the application is not - * sufficient, a suitable public freeing function should be - * provided. - * - * (c) Internal objects whose size and/or lifetime dictate explicit - * memory management within libxl. This includes objects which - * will be embedded in opaque structures which will be returned to - * the libxl caller (more generally, any internal object whose - * lifetime exceeds the libxl entrypoint which creates it) and - * objects which are so large or numerous that explicit memory - * management is required. - * - * These should be allocated from malloc() et al., and freed - * explicitly at the appropriate point. The situation should be - * documented in comments. - * - * (d) Objects which are allocated by internal-only functions and - * returned to the function's (therefore, internal) caller but are - * strictly for internal use by other parts of libxl. These - * should be allocated from the temporary pool. - * - * Where a function's primary purpose is to return such an object, - * it should have a libxl__gc * as it's first argument. - * - * Note that there are two ways to change an allocation from this - * category to the "public" category. Either the implementation - * is kept internal and a wrapper function duplicates all memory - * allocations so that they are suitable for return to external - * callers or the implementation uses plain malloc() et al calls - * and an internal wrapper adds the relevant pointers to the gc. - * The latter method is preferred for obvious performance reasons. - * - * No temporary objects allocated from the pool may be explicitly freed. - * Therefore public functions which initialize a libxl__gc MUST call - * libxl__free_all() before returning. - * - * Memory allocation failures are not handled gracefully. If malloc - * (or realloc) fails, libxl will cause the entire process to print - * a message to stderr and exit with status 255. - */ -/* - * libxl types - * - * Most libxl types are defined by the libxl IDL (see - * libxl_types.idl). The library provides a common set of methods for - * initialising and freeing these types. - * - * void libxl__init( *p): - * - * Initialises the members of "p" to all defaults. These may either - * be special value which indicates to the library that it should - * select an appropriate default when using this field or actual - * default values. - * - * Some fields within a data type (e.g. unions) cannot be sensibly - * initialised without further information. In these cases a - * separate subfield initialisation function is provided (see - * below). - * - * An instance which has been initialised using this method can - * always be safely passed to the dispose function (see - * below). This is true even if the data type contains fields which - * require a separate call to a subfield initialisation function. - * - * This method is provided for any aggregate type which is used as - * an input parameter. - * - * void libxl__init_( *p, subfield): - * - * Initialise those parts of "p" which are not initialised by the - * main init function due to the unknown value of "subfield". Sets - * p->subfield as well as initialising any fields to their default - * values. - * - * p->subfield must not have been previously initialised. - * - * This method is provided for any aggregate type. - * - * void libxl__dispose(instance *p): - * - * Frees any dynamically allocated memory used by the members of - * "p" but not the storage used by "p" itself (this allows for the - * allocation of arrays of types and for the composition of types). - */ -#ifndef LIBXL_H -#define LIBXL_H - -#include -#include -#include -#include -#include -#include -#include /* for pid_t */ - -#include - -#include -#include <_libxl_list.h> - -/* API compatibility. Only 0x040200 is supported at this time. */ -#ifdef LIBXL_API_VERSION -#if LIBXL_API_VERSION != 0x040200 -#error Unknown LIBXL_API_VERSION -#endif -#endif - -/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be - * called from within libxl itself. Callers outside libxl, who - * do not #include libxl_internal.h, are fine. */ -#ifndef LIBXL_EXTERNAL_CALLERS_ONLY -#define LIBXL_EXTERNAL_CALLERS_ONLY /* disappears for callers outside libxl */ -#endif - -typedef uint8_t libxl_mac[6]; -#define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" -#define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */ -#define LIBXL_MAC_BYTES(mac) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] - -typedef char **libxl_string_list; -void libxl_string_list_dispose(libxl_string_list *sl); -int libxl_string_list_length(const libxl_string_list *sl); - -typedef char **libxl_key_value_list; -void libxl_key_value_list_dispose(libxl_key_value_list *kvl); - -typedef uint32_t libxl_hwcap[8]; - -typedef uint64_t libxl_ev_user; - -typedef struct { - uint32_t size; /* number of bytes in map */ - uint8_t *map; -} libxl_bitmap; -void libxl_bitmap_init(libxl_bitmap *map); -void libxl_bitmap_dispose(libxl_bitmap *map); - -/* libxl_cpuid_policy_list is a dynamic array storing CPUID policies - * for multiple leafs. It is terminated with an entry holding - * XEN_CPUID_INPUT_UNUSED in input[0] - */ -typedef struct libxl__cpuid_policy libxl_cpuid_policy; -typedef libxl_cpuid_policy * libxl_cpuid_policy_list; -void libxl_cpuid_dispose(libxl_cpuid_policy_list *cpuid_list); - -#define LIBXL_PCI_FUNC_ALL (~0U) - -typedef uint32_t libxl_domid; -typedef int libxl_devid; - -/* - * Formatting Enumerations. - * - * Each enumeration type libxl_E declares an associated lookup table - * libxl_E_string_table and a lookup function libxl_E_from_string. - */ -typedef struct { - const char *s; - int v; -} libxl_enum_string_table; - -struct libxl_event; -typedef LIBXL_TAILQ_ENTRY(struct libxl_event) libxl_ev_link; - -/* - * A boolean variable with an explicit default state. - * - * Users should treat this struct as opaque and use the following - * defined macros and accessor functions. - * - * To allow users of the library to naively select all defaults this - * state is represented as 0. False is < 0 and True is > 0. - */ -typedef struct { - int val; -} libxl_defbool; - -void libxl_defbool_set(libxl_defbool *db, bool b); -/* Resets to default */ -void libxl_defbool_unset(libxl_defbool *db); -/* Sets db only if it is currently == default */ -void libxl_defbool_setdefault(libxl_defbool *db, bool b); -bool libxl_defbool_is_default(libxl_defbool db); -/* db must not be == default */ -bool libxl_defbool_val(libxl_defbool db); - -const char *libxl_defbool_to_string(libxl_defbool b); - -typedef struct libxl__ctx libxl_ctx; - -#define LIBXL_TIMER_MODE_DEFAULT -1 -#define LIBXL_MEMKB_DEFAULT ~0ULL - -#include "_libxl_types.h" - -const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx); - -enum { - ERROR_NONSPECIFIC = -1, - ERROR_VERSION = -2, - ERROR_FAIL = -3, - ERROR_NI = -4, - ERROR_NOMEM = -5, - ERROR_INVAL = -6, - ERROR_BADFAIL = -7, - ERROR_GUEST_TIMEDOUT = -8, - ERROR_TIMEDOUT = -9, - ERROR_NOPARAVIRT = -10, - ERROR_NOT_READY = -11, - ERROR_OSEVENT_REG_FAIL = -12, - ERROR_BUFFERFULL = -13, - ERROR_UNKNOWN_CHILD = -14, -}; - - -/* - * Some libxl operations can take a long time. These functions take a - * parameter to control their concurrency: - * libxl_asyncop_how *ao_how - * - * If ao_how==NULL, the function will be synchronous. - * - * If ao_how!=NULL, the function will set the operation going, and if - * this is successful will return 0. In this case the zero error - * response does NOT mean that the operation was successful; it just - * means that it has been successfully started. It will finish later, - * perhaps with an error. - * - * If ao_how->callback!=NULL, the callback will be called when the - * operation completes. The same rules as for libxl_event_hooks - * apply, including the reentrancy rules and the possibility of - * "disaster", except that libxl calls ao_how->callback instead of - * libxl_event_hooks.event_occurs. (See libxl_event.h.) - * - * If ao_how->callback==NULL, a libxl_event will be generated which - * can be obtained from libxl_event_wait or libxl_event_check. The - * event will have type OPERATION_COMPLETE (which is not used - * elsewhere). - * - * Note that it is possible for an asynchronous operation which is to - * result in a callback to complete during its initiating function - * call. In this case the initiating function will return 0 - * indicating the at the operation is "in progress", even though by - * the time it returns the operation is complete and the callback has - * already happened. - * - * The application must set and use ao_how->for_event (which will be - * copied into libxl_event.for_user) or ao_how->for_callback (passed - * to the callback) to determine which operation finished, and it must - * of course check the rc value for errors. - * - * *ao_how does not need to remain valid after the initiating function - * returns. All other parameters must remain valid for the lifetime of - * the asynchronous operation, unless otherwise specified. - * - * Callbacks may occur on any thread in which the application calls - * libxl. - */ - -typedef struct { - void (*callback)(libxl_ctx *ctx, int rc, void *for_callback); - union { - libxl_ev_user for_event; /* used if callback==NULL */ - void *for_callback; /* passed to callback */ - } u; -} libxl_asyncop_how; - -/* - * Some more complex asynchronous operations can report intermediate - * progress. How this is to be reported is controlled, for each - * function, by a parameter - * libxl_asyncprogress_how *aop_FOO_how; - * for each kind of progress FOO supported by that function. Each - * such kind of progress is associated with an event type. - * - * The function description will document whether, when, and how - * many times, the intermediate progress will be reported, and - * what the corresponding event type(s) are. - * - * If aop_FOO_how==NULL, intermediate progress reports are discarded. - * - * If aop_FOO_how->callback==NULL, intermediate progress reports - * generate libxl events which can be obtained from libxl_event_wait - * or libxl_event_check. - * - * If aop_FOO_how->callback!=NULL, libxl will report intermediate - * progress by calling callback(ctx, &event, for_callback). - * - * The rules for these events are otherwise the same as those for - * ordinary events. The reentrancy and threading rules for the - * callback are the same as those for ao completion callbacks. - * - * Note that the callback, if provided, is responsible for freeing - * the event. - * - * If callbacks are requested, they will be made, and returned, before - * the long-running libxl operation is considered finished (so if the - * long-running libxl operation was invoked with ao_how==NULL then any - * callbacks will occur strictly before the long-running operation - * returns). However, the callbacks may occur on any thread. - * - * In general, otherwise, no promises are made about the relative - * order of callbacks in a multithreaded program. In particular - * different callbacks relating to the same long-running operation may - * be delivered out of order. - */ - -typedef struct { - void (*callback)(libxl_ctx *ctx, libxl_event*, void *for_callback); - libxl_ev_user for_event; /* always used */ - void *for_callback; /* passed to callback */ -} libxl_asyncprogress_how; - -#define LIBXL_VERSION 0 - -/* context functions */ -int libxl_ctx_alloc(libxl_ctx **pctx, int version, - unsigned flags /* none currently defined */, - xentoollog_logger *lg); -int libxl_ctx_free(libxl_ctx *ctx /* 0 is OK */); - -/* domain related functions */ - -int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config, - uint32_t *domid, - const libxl_asyncop_how *ao_how, - const libxl_asyncprogress_how *aop_console_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config, - uint32_t *domid, int restore_fd, - const libxl_asyncop_how *ao_how, - const libxl_asyncprogress_how *aop_console_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - /* A progress report will be made via ao_console_how, of type - * domain_create_console_available, when the domain's primary - * console is available and can be connected to. - */ - -void libxl_domain_config_init(libxl_domain_config *d_config); -void libxl_domain_config_dispose(libxl_domain_config *d_config); - -int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, - int flags, /* LIBXL_SUSPEND_* */ - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -#define LIBXL_SUSPEND_DEBUG 1 -#define LIBXL_SUSPEND_LIVE 2 - -/* @param suspend_cancel [from xenctrl.h:xc_domain_resume( @param fast )] - * If this parameter is true, use co-operative resume. The guest - * must support this. - */ -int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, - uint32_t domid, int send_fd, int recv_fd, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid); -int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid); -int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid); - -/* get max. number of cpus supported by hypervisor */ -int libxl_get_max_cpus(libxl_ctx *ctx); - -/* get max. number of NUMA nodes supported by hypervisor */ -int libxl_get_max_nodes(libxl_ctx *ctx); - -int libxl_domain_rename(libxl_ctx *ctx, uint32_t domid, - const char *old_name, const char *new_name); - - /* if old_name is NULL, any old name is OK; otherwise we check - * transactionally that the domain has the old old name; if - * trans is not 0 we use caller's transaction and caller must do retries */ - -int libxl_domain_pause(libxl_ctx *ctx, uint32_t domid); -int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid); - -int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t domid, - const char *filename, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb); -int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce); -int libxl_get_memory_target(libxl_ctx *ctx, uint32_t domid, uint32_t *out_target); - - -/* - * WARNING - * This memory management API is unstable even in Xen 4.2. - * It has a numer of deficiencies and we intend to replace it. - * - * The semantics of these functions should not be relied on to be very - * coherent or stable. We will however endeavour to keep working - * existing programs which use them in roughly the same way as libxl. - */ -/* how much free memory in the system a domain needs to be built */ -int libxl_domain_need_memory(libxl_ctx *ctx, libxl_domain_build_info *b_info, - uint32_t *need_memkb); -/* how much free memory is available in the system */ -int libxl_get_free_memory(libxl_ctx *ctx, uint32_t *memkb); -/* wait for a given amount of memory to be free in the system */ -int libxl_wait_for_free_memory(libxl_ctx *ctx, uint32_t domid, uint32_t memory_kb, int wait_secs); -/* wait for the memory target of a domain to be reached */ -int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs); - - -int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass); -int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type); -/* libxl_primary_console_exec finds the domid and console number - * corresponding to the primary console of the given vm, then calls - * libxl_console_exec with the right arguments (domid might be different - * if the guest is using stubdoms). - * This function can be called after creating the device model, in - * case of HVM guests, and before libxl_run_bootloader in case of PV - * guests using pygrub. */ -int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm); - -/* libxl_console_get_tty retrieves the specified domain's console tty path - * and stores it in path. Caller is responsible for freeing the memory. - */ -int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num, - libxl_console_type type, char **path); - -/* libxl_primary_console_get_tty retrieves the specified domain's primary - * console tty path and stores it in path. Caller is responsible for freeing - * the memory. - */ -int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm, char **path); - -/* May be called with info_r == NULL to check for domain's existance */ -int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r, - uint32_t domid); - -/* These functions each return (on success) an array of elements, - * and the length via the int* out parameter. These arrays and - * their contents come from malloc, and must be freed with the - * corresponding libxl_THING_list_free function. - */ -libxl_dominfo * libxl_list_domain(libxl_ctx*, int *nb_domain_out); -void libxl_dominfo_list_free(libxl_dominfo *list, int nb_domain); - -libxl_cpupoolinfo * libxl_list_cpupool(libxl_ctx*, int *nb_pool_out); -void libxl_cpupoolinfo_list_free(libxl_cpupoolinfo *list, int nb_pool); - -libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out); -void libxl_vminfo_list_free(libxl_vminfo *list, int nb_vm); - -#define LIBXL_CPUTOPOLOGY_INVALID_ENTRY (~(uint32_t)0) -libxl_cputopology *libxl_get_cpu_topology(libxl_ctx *ctx, int *nb_cpu_out); -void libxl_cputopology_list_free(libxl_cputopology *, int nb_cpu); - -#define LIBXL_NUMAINFO_INVALID_ENTRY (~(uint32_t)0) -libxl_numainfo *libxl_get_numainfo(libxl_ctx *ctx, int *nr); -void libxl_numainfo_list_free(libxl_numainfo *, int nr); - -libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid, - int *nb_vcpu, int *nr_vcpus_out); -void libxl_vcpuinfo_list_free(libxl_vcpuinfo *, int nr_vcpus); - -/* - * Devices - * ======= - * - * Each device is represented by a libxl_device_ data structure - * which is defined via the IDL. In addition some devices have an - * additional data type libxl_device__getinfo which contains - * further runtime information about the device. - * - * In addition to the general methods available for libxl types (see - * "libxl types" above) a common set of methods are available for each - * device type. These are described below. - * - * Querying - * -------- - * - * libxl_device__list(ctx, domid, nr): - * - * Returns an array of libxl_device_ length nr representing - * the devices attached to the specified domain. - * - * libxl_device__getinfo(ctx, domid, device, info): - * - * Initialises info with details of the given device which must be - * attached to the specified domain. - * - * Creation / Control - * ------------------ - * - * libxl_device__add(ctx, domid, device): - * - * Adds the given device to the specified domain. This can be called - * while the guest is running (hotplug) or before boot (coldplug). - * - * This function only sets up the device but does not wait for the - * domain to connect to the device and therefore cannot block on the - * guest. - * - * libxl_device__remove(ctx, domid, device): - * - * Removes the given device from the specified domain by performing - * an orderly unplug with guest co-operation. This requires that the - * guest is running. - * - * This method is currently synchronous and therefore can block - * while interacting with the guest. - * - * libxl_device__destroy(ctx, domid, device): - * - * Removes the given device from the specified domain without guest - * co-operation. It is guest specific what affect this will have on - * a running guest. - * - * This function does not interact with the guest and therefore - * cannot block on the guest. - */ - -/* Disks */ -int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_disk_remove(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_disk_destroy(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *num); -int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, libxl_diskinfo *diskinfo); - -/* - * Insert a CD-ROM device. A device corresponding to disk must already - * be attached to the guest. - */ -int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -/* Network Interfaces */ -int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_nic_remove(libxl_ctx *ctx, uint32_t domid, - libxl_device_nic *nic, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_nic_destroy(libxl_ctx *ctx, uint32_t domid, - libxl_device_nic *nic, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -libxl_device_nic *libxl_device_nic_list(libxl_ctx *ctx, uint32_t domid, int *num); -int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_nic *nic, libxl_nicinfo *nicinfo); - -/* Keyboard */ -int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_vkb_remove(libxl_ctx *ctx, uint32_t domid, - libxl_device_vkb *vkb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_vkb_destroy(libxl_ctx *ctx, uint32_t domid, - libxl_device_vkb *vkb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -/* Framebuffer */ -int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_vfb_remove(libxl_ctx *ctx, uint32_t domid, - libxl_device_vfb *vfb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_vfb_destroy(libxl_ctx *ctx, uint32_t domid, - libxl_device_vfb *vfb, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -/* PCI Passthrough */ -int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, - libxl_device_pci *pcidev, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, - libxl_device_pci *pcidev, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; -int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid, - libxl_device_pci *pcidev, - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; - -libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid, - int *num); - -/* - * Functions related to making devices assignable -- that is, bound to - * the pciback driver, ready to be given to a guest via - * libxl_pci_device_add. - * - * - ..._add() will unbind the device from its current driver (if - * already bound) and re-bind it to pciback; at that point it will be - * ready to be assigned to a VM. If rebind is set, it will store the - * path to the old driver in xenstore so that it can be handed back to - * dom0 on restore. - * - * - ..._remove() will unbind the device from pciback, and if - * rebind is non-zero, attempt to assign it back to the driver - * from whence it came. - * - * - ..._list() will return a list of the PCI devices available to be - * assigned. - * - * add and remove are idempotent: if the device in question is already - * added or is not bound, the functions will emit a warning but return - * SUCCESS. - */ -int libxl_device_pci_assignable_add(libxl_ctx *ctx, libxl_device_pci *pcidev, int rebind); -int libxl_device_pci_assignable_remove(libxl_ctx *ctx, libxl_device_pci *pcidev, int rebind); -libxl_device_pci *libxl_device_pci_assignable_list(libxl_ctx *ctx, int *num); - -/* CPUID handling */ -int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str); -int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, - const char* str); -void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid); -void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, - libxl_cpuid_policy_list cpuid); - -/* - * Functions for allowing users of libxl to store private data - * relating to a domain. The data is an opaque sequence of bytes and - * is not interpreted or used by libxl. - * - * Data is indexed by the userdata userid, which is a short printable - * ASCII string. The following list is a registry of userdata userids - * (the registry may be updated by posting a patch to xen-devel): - * - * userid Data contents - * "xl" domain config file in xl format, Unix line endings - * "libvirt-xml" domain config file in libvirt XML format. See - * http://libvirt.org/formatdomain.html - * - * libxl does not enforce the registration of userdata userids or the - * semantics of the data. For specifications of the data formats - * see the code or documentation for the libxl caller in question. - */ -int libxl_userdata_store(libxl_ctx *ctx, uint32_t domid, - const char *userdata_userid, - const uint8_t *data, int datalen); - /* If datalen==0, data is not used and the user data for - * that domain and userdata_userid is deleted. */ -int libxl_userdata_retrieve(libxl_ctx *ctx, uint32_t domid, - const char *userdata_userid, - uint8_t **data_r, int *datalen_r); - /* On successful return, *data_r is from malloc. - * If there is no data for that domain and userdata_userid, - * *data_r and *datalen_r will be set to 0. - * data_r and datalen_r may be 0. - * On error return, *data_r and *datalen_r are undefined. - */ - -int libxl_get_physinfo(libxl_ctx *ctx, libxl_physinfo *physinfo); -int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid, - libxl_bitmap *cpumap); -int libxl_set_vcpuaffinity_all(libxl_ctx *ctx, uint32_t domid, - unsigned int max_vcpus, libxl_bitmap *cpumap); -int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap); - -libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx); - -/* Per-scheduler parameters */ -int libxl_sched_credit_params_get(libxl_ctx *ctx, uint32_t poolid, - libxl_sched_credit_params *scinfo); -int libxl_sched_credit_params_set(libxl_ctx *ctx, uint32_t poolid, - libxl_sched_credit_params *scinfo); - -/* Scheduler Per-domain parameters */ - -#define LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT -1 -#define LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT -1 -#define LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT -1 -#define LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT -1 -#define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT -1 -#define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1 - -int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid, - libxl_domain_sched_params *params); -int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid, - const libxl_domain_sched_params *params); - -int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid, - libxl_trigger trigger, uint32_t vcpuid); -int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq); -int libxl_send_debug_keys(libxl_ctx *ctx, char *keys); - -typedef struct libxl__xen_console_reader libxl_xen_console_reader; - -libxl_xen_console_reader * - libxl_xen_console_read_start(libxl_ctx *ctx, int clear); -int libxl_xen_console_read_line(libxl_ctx *ctx, - libxl_xen_console_reader *cr, - char **line_r); -void libxl_xen_console_read_finish(libxl_ctx *ctx, - libxl_xen_console_reader *cr); - -uint32_t libxl_vm_get_start_time(libxl_ctx *ctx, uint32_t domid); - -char *libxl_tmem_list(libxl_ctx *ctx, uint32_t domid, int use_long); -int libxl_tmem_freeze(libxl_ctx *ctx, uint32_t domid); -int libxl_tmem_thaw(libxl_ctx *ctx, uint32_t domid); -int libxl_tmem_set(libxl_ctx *ctx, uint32_t domid, char* name, - uint32_t set); -int libxl_tmem_shared_auth(libxl_ctx *ctx, uint32_t domid, char* uuid, - int auth); -int libxl_tmem_freeable(libxl_ctx *ctx); - -int libxl_get_freecpus(libxl_ctx *ctx, libxl_bitmap *cpumap); -int libxl_cpupool_create(libxl_ctx *ctx, const char *name, - libxl_scheduler sched, - libxl_bitmap cpumap, libxl_uuid *uuid, - uint32_t *poolid); -int libxl_cpupool_destroy(libxl_ctx *ctx, uint32_t poolid); -int libxl_cpupool_rename(libxl_ctx *ctx, const char *name, uint32_t poolid); -int libxl_cpupool_cpuadd(libxl_ctx *ctx, uint32_t poolid, int cpu); -int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus); -int libxl_cpupool_cpuremove(libxl_ctx *ctx, uint32_t poolid, int cpu); -int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus); -int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid); -int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_t poolid); - -int libxl_domid_valid_guest(uint32_t domid); - -int libxl_flask_context_to_sid(libxl_ctx *ctx, char *buf, size_t len, - uint32_t *ssidref); -int libxl_flask_sid_to_context(libxl_ctx *ctx, uint32_t ssidref, char **buf, - size_t *len); -int libxl_flask_getenforce(libxl_ctx *ctx); -int libxl_flask_setenforce(libxl_ctx *ctx, int mode); -int libxl_flask_loadpolicy(libxl_ctx *ctx, void *policy, uint32_t size); - -/* misc */ - -/* Each of these sets or clears the flag according to whether the - * 2nd parameter is nonzero. On failure, they log, and - * return ERROR_FAIL, but also leave errno valid. */ -int libxl_fd_set_cloexec(libxl_ctx *ctx, int fd, int cloexec); -int libxl_fd_set_nonblock(libxl_ctx *ctx, int fd, int nonblock); - -#include - -#endif /* LIBXL_H */ - -/* - * Local variables: - * mode: C - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/SOURCES/libxl_event.h b/SOURCES/libxl_event.h deleted file mode 100644 index 3bcb6d32..00000000 --- a/SOURCES/libxl_event.h +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Copyright (C) 2011 Citrix Ltd. - * Author Ian Jackson - * - * This program 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; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program 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. - */ - -#ifndef LIBXL_EVENT_H -#define LIBXL_EVENT_H - -#include -#include -#include - -/*======================================================================*/ - -/* - * Domain event handling - getting Xen events from libxl - * - * (Callers inside libxl may not call libxl_event_check or _wait.) - */ - -#define LIBXL_EVENTMASK_ALL (~(unsigned long)0) - -typedef int libxl_event_predicate(const libxl_event*, void *user); - /* Return value is 0 if the event is unwanted or non-0 if it is. - * Predicates are not allowed to fail. - */ - -int libxl_event_check(libxl_ctx *ctx, libxl_event **event_r, - uint64_t typemask, - libxl_event_predicate *predicate, void *predicate_user) - LIBXL_EXTERNAL_CALLERS_ONLY; - /* Searches for an event, already-happened, which matches typemask - * and predicate. predicate==0 matches any event. - * libxl_event_check returns the event, which must then later be - * freed by the caller using libxl_event_free. - * - * Returns ERROR_NOT_READY if no such event has happened. - */ - -int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r, - uint64_t typemask, - libxl_event_predicate *predicate, void *predicate_user) - LIBXL_EXTERNAL_CALLERS_ONLY; - /* Like libxl_event_check but blocks if no suitable events are - * available, until some are. Uses libxl_osevent_beforepoll/ - * _afterpoll so may be inefficient if very many domains are being - * handled by a single program. - */ - -void libxl_event_free(libxl_ctx *ctx, libxl_event *event); - - -/* Alternatively or additionally, the application may also use this: */ - -typedef struct libxl_event_hooks { - uint64_t event_occurs_mask; - void (*event_occurs)(void *user, const libxl_event *event); - void (*disaster)(void *user, libxl_event_type type, - const char *msg, int errnoval); -} libxl_event_hooks; - -void libxl_event_register_callbacks(libxl_ctx *ctx, - const libxl_event_hooks *hooks, void *user); - /* - * Arranges that libxl will henceforth call event_occurs for any - * events whose type is set in event_occurs_mask, rather than - * queueing the event for retrieval by libxl_event_check/wait. - * Events whose bit is clear in mask are not affected. - * - * event becomes owned by the application and must be freed, either - * by event_occurs or later. - * - * event_occurs may be NULL if mask is 0. - * - * libxl_event_register_callback also provides a way for libxl to - * report to the application that there was a problem reporting - * events; this can occur due to lack of host memory during event - * handling, or other wholly unrecoverable errors from system calls - * made by libxl. This will not happen for frivolous reasons - only - * if the system, or the Xen components of it, are badly broken. - * - * msg and errnoval will describe the action that libxl was trying - * to do, and type specifies the type of libxl events which may be - * missing. type may be 0 in which case events of all types may be - * missing. - * - * disaster may be NULL. If it is, or if _register_callbacks has - * not been called, errors of this kind are fatal to the entire - * application: libxl will print messages to its logs and to stderr - * and call exit(-1). - * - * If disaster returns, it may be the case that some or all future - * libxl calls will return errors; likewise it may be the case that - * no more events (of the specified type, if applicable) can be - * produced. An application which supplies a disaster function - * should normally react either by exiting, or by (when it has - * returned to its main event loop) shutting down libxl with - * libxl_ctx_free and perhaps trying to restart it with - * libxl_ctx_init. - * - * In any case before calling disaster, libxl will have logged a - * message with level XTL_CRITICAL. - * - * Reentrancy: it IS permitted to call libxl from within - * event_occurs. It is NOT permitted to call libxl from within - * disaster. The event_occurs and disaster callbacks may occur on - * any thread in which the application calls libxl. - * - * libxl_event_register_callbacks may be called as many times, with - * different parameters, as the application likes; the most recent - * call determines the libxl behaviour. However it is NOT safe to - * call _register_callbacks concurrently with, or reentrantly from, - * any other libxl function. - * - * Calls to _register_callbacks do not affect events which have - * already occurred. - */ - - -/* - * Events are only generated if they have been requested. - * The following functions request the generation of specific events. - * - * Each set of functions for controlling event generation has this form: - * - * typedef struct libxl__evgen_FOO libxl__evgen_FOO; - * int libxl_evenable_FOO(libxl_ctx *ctx, FURTHER PARAMETERS, - * libxl_ev_user user, libxl__evgen_FOO **evgen_out); - * void libxl_evdisable_FOO(libxl_ctx *ctx, libxl__evgen_FOO *evgen); - * - * The evenable function arranges that the events (as described in the - * doc comment for the individual function) will start to be generated - * by libxl. On success, *evgen_out is set to a non-null pointer to - * an opaque struct. - * - * The user value is returned in the generated events and may be - * used by the caller for whatever it likes. The type ev_user is - * guaranteed to be an unsigned integer type which is at least - * as big as uint64_t and is also guaranteed to be big enough to - * contain any intptr_t value. - * - * If it becomes desirable to stop generation of the relevant events, - * or to reclaim the resources in libxl associated with the evgen - * structure, the same evgen value should be passed to the evdisable - * function. However, note that events which occurred prior to the - * evdisable call may still be returned. - * - * The caller may enable identical events more than once. If they do - * so, each actual occurrence will generate several events to be - * returned by libxl_event_check, with the appropriate user value(s). - * Aside from this, each occurrence of each event is returned by - * libxl_event_check exactly once. - * - * An evgen is associated with the libxl_ctx used for its creation. - * After libxl_ctx_free, all corresponding evgen handles become - * invalid and must no longer be passed to evdisable. - * - * Applications should ensure that they eventually retrieve every - * event using libxl_event_check or libxl_event_wait, since events - * which occur but are not retreived by the application will be queued - * inside libxl indefinitely. libxl_event_check/_wait may be O(n) - * where n is the number of queued events which do not match the - * criteria specified in the arguments to check/wait. - */ - -typedef struct libxl__evgen_domain_death libxl_evgen_domain_death; -int libxl_evenable_domain_death(libxl_ctx *ctx, uint32_t domid, - libxl_ev_user, libxl_evgen_domain_death **evgen_out); -void libxl_evdisable_domain_death(libxl_ctx *ctx, libxl_evgen_domain_death*); - /* Arranges for the generation of DOMAIN_SHUTDOWN and DOMAIN_DESTROY - * events. A domain which is destroyed before it shuts down - * may generate only a DESTROY event. - */ - -typedef struct libxl__evgen_disk_eject libxl_evgen_disk_eject; -int libxl_evenable_disk_eject(libxl_ctx *ctx, uint32_t domid, const char *vdev, - libxl_ev_user, libxl_evgen_disk_eject **evgen_out); -void libxl_evdisable_disk_eject(libxl_ctx *ctx, libxl_evgen_disk_eject*); - /* Arranges for the generation of DISK_EJECT events. A copy of the - * string *vdev will be made for libxl's internal use, and a pointer - * to this (or some other) copy will be returned as the vdev - * member of event.u. - */ - - -/*======================================================================*/ - -/* - * OS event handling - passing low-level OS events to libxl - * - * Event-driven programs must use these facilities to allow libxl - * to become aware of readability/writeability of file descriptors - * and the occurrence of timeouts. - * - * There are two approaches available. The first is appropriate for - * simple programs handling reasonably small numbers of domains: - * - * for (;;) { - * libxl_osevent_beforepoll(...) - * poll(); - * libxl_osevent_afterpoll(...); - * for (;;) { - * r = libxl_event_check(...); - * if (r==LIBXL_NOT_READY) break; - * if (r) goto error_out; - * do something with the event; - * } - * } - * - * The second approach uses libxl_osevent_register_hooks and is - * suitable for programs which are already using a callback-based - * event library. - * - * An application may freely mix the two styles of interaction. - * - * (Callers inside libxl may not call libxl_osevent_... functions.) - */ - -struct pollfd; - -/* The caller should provide beforepoll with some space for libxl's - * fds, and tell libxl how much space is available by setting *nfds_io. - * fds points to the start of this space (and fds may be a pointer into - * a larger array, for example, if the application has some fds of - * its own that it is interested in). - * - * On return *nfds_io will in any case have been updated by libxl - * according to how many fds libxl wants to poll on. - * - * If the space was sufficient, libxl fills in fds[0..] suitably for poll(2), updates *timeout_upd if needed, - * and returns ok. - * - * If space was insufficient, fds[0..] is undefined on - * return; *nfds_io on return will be greater than the value on - * entry; *timeout_upd may or may not have been updated; and - * libxl_osevent_beforepoll returns ERROR_BUFERFULL. In this case - * the application needs to make more space (enough space for - * *nfds_io struct pollfd) and then call beforepoll again, before - * entering poll(2). Typically this will involve calling realloc. - * - * The application may call beforepoll with fds==NULL and - * *nfds_io==0 in order to find out how much space is needed. - * - * *timeout_upd is as for poll(2): it's in milliseconds, and - * negative values mean no timeout (infinity). - * libxl_osevent_beforepoll will only reduce the timeout, naturally. - */ -int libxl_osevent_beforepoll(libxl_ctx *ctx, int *nfds_io, - struct pollfd *fds, int *timeout_upd, - struct timeval now) - LIBXL_EXTERNAL_CALLERS_ONLY; - -/* nfds and fds[0..nfds] must be from the most recent call to - * _beforepoll, as modified by poll. (It is therefore not possible - * to have multiple threads simultaneously polling using this - * interface.) - * - * This function actually performs all of the IO and other actions, - * and generates events (libxl_event), which are implied by either - * (a) the time of day or (b) both (i) the returned information from - * _beforepoll, and (ii) the results from poll specified in - * fds[0..nfds-1]. Generated events can then be retrieved by - * libxl_event_check. - */ -void libxl_osevent_afterpoll(libxl_ctx *ctx, int nfds, const struct pollfd *fds, - struct timeval now) - LIBXL_EXTERNAL_CALLERS_ONLY; - - -typedef struct libxl_osevent_hooks { - int (*fd_register)(void *user, int fd, void **for_app_registration_out, - short events, void *for_libxl); - int (*fd_modify)(void *user, int fd, void **for_app_registration_update, - short events); - void (*fd_deregister)(void *user, int fd, void *for_app_registration); - int (*timeout_register)(void *user, void **for_app_registration_out, - struct timeval abs, void *for_libxl); - int (*timeout_modify)(void *user, void **for_app_registration_update, - struct timeval abs); - void (*timeout_deregister)(void *user, void *for_app_registration); -} libxl_osevent_hooks; - -/* The application which calls register_fd_hooks promises to - * maintain a register of fds and timeouts that libxl is interested - * in, and make calls into libxl (libxl_osevent_occurred_*) - * when those fd events and timeouts occur. This is more efficient - * than _beforepoll/_afterpoll if there are many fds (which can - * happen if the same libxl application is managing many domains). - * - * For an fd event, events is as for poll(). register or modify may - * be called with events==0, in which case it must still work - * normally, just not generate any events. - * - * For a timeout event, milliseconds is as for poll(). - * Specifically, negative values of milliseconds mean NO TIMEOUT. - * This is used by libxl to temporarily disable a timeout. - * - * If the register or modify hook succeeds it may update - * *for_app_registration_out/_update and must then return 0. - * On entry to register, *for_app_registration_out is always NULL. - * - * A registration or modification hook may fail, in which case it - * must leave the registration state of the fd or timeout unchanged. - * It may then either return ERROR_OSEVENT_REG_FAIL or any positive - * int. The value returned will be passed up through libxl and - * eventually returned back to the application. When register - * fails, any value stored into *for_registration_out is ignored by - * libxl; when modify fails, any changed value stored into - * *for_registration_update is honoured by libxl and will be passed - * to future modify or deregister calls. - * - * libxl may want to register more than one callback for any one fd; - * in that case: (i) each such registration will have at least one bit - * set in revents which is unique to that registration; (ii) if an - * event occurs which is relevant for multiple registrations the - * application's event system may call libxl_osevent_occurred_fd - * for one, some, or all of those registrations. - * - * If fd_modify is used, it is permitted for the application's event - * system to still make calls to libxl_osevent_occurred_fd for the - * "old" set of requested events; these will be safely ignored by - * libxl. - * - * libxl will remember the value stored in *for_app_registration_out - * (or *for_app_registration_update) by a successful call to - * register (or modify), and pass it to subsequent calls to modify - * or deregister. - * - * osevent_register_hooks may be called only once for each libxl_ctx. - * libxl may make calls to register/modify/deregister from within - * any libxl function (indeed, it will usually call register from - * register_event_hooks). Conversely, the application MUST NOT make - * the event occurrence calls (libxl_osevent_occurred_*) into libxl - * reentrantly from within libxl (for example, from within the - * register/modify functions). - * - * Lock hierarchy: the register/modify/deregister functions may be - * called with locks held. These locks (the "libxl internal locks") - * are inside the libxl_ctx. Therefore, if those register functions - * acquire any locks of their own ("caller register locks") outside - * libxl, to avoid deadlock one of the following must hold for each - * such caller register lock: - * (a) "acquire libxl internal locks before caller register lock": - * No libxl function may be called with the caller register - * lock held. - * (b) "acquire caller register lock before libxl internal locks": - * No libxl function may be called _without_ the caller - * register lock held. - * Of these we would normally recommend (a). - * - * The value *hooks is not copied and must outlast the libxl_ctx. - */ -void libxl_osevent_register_hooks(libxl_ctx *ctx, - const libxl_osevent_hooks *hooks, - void *user); - -/* It is NOT legal to call _occurred_ reentrantly within any libxl - * function. Specifically it is NOT legal to call it from within - * a register callback. Conversely, libxl MAY call register/deregister - * from within libxl_event_occurred_call_*. - */ - -void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl, - int fd, short events, short revents) - LIBXL_EXTERNAL_CALLERS_ONLY; - -/* Implicitly, on entry to this function the timeout has been - * deregistered. If _occurred_timeout is called, libxl will not - * call timeout_deregister; if it wants to requeue the timeout it - * will call timeout_register again. - */ -void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl) - LIBXL_EXTERNAL_CALLERS_ONLY; - - -/*======================================================================*/ - -/* - * Subprocess handling. - * - * Unfortunately the POSIX interface makes this very awkward. - * - * There are two possible arrangements for collecting statuses from - * wait/waitpid. - * - * For naive programs: - * - * libxl will keep a SIGCHLD handler installed whenever it has an - * active (unreaped) child. It will reap all children with - * wait(); any children it does not recognise will be passed to - * the application via an optional callback (and will result in - * logged warnings if no callback is provided or the callback - * denies responsibility for the child). - * - * libxl may have children whenever: - * - * - libxl is performing an operation which can be made - * asynchronous; ie one taking a libxl_asyncop_how, even - * if NULL is passed indicating that the operation is - * synchronous; or - * - * - events of any kind are being generated, as requested - * by libxl_evenable_.... - * - * A multithreaded application which is naive in this sense may - * block SIGCHLD on some of its threads, but there must be at - * least one thread that has SIGCHLD unblocked. libxl will not - * modify the blocking flag for SIGCHLD (except that it may create - * internal service threads with all signals blocked). - * - * A naive program must only have at any one time only - * one libxl context which might have children. - * - * For programs which run their own children alongside libxl's: - * - * A program which does this must call libxl_childproc_setmode. - * There are two options: - * - * libxl_sigchld_owner_mainloop: - * The application must install a SIGCHLD handler and reap (at - * least) all of libxl's children and pass their exit status - * to libxl by calling libxl_childproc_exited. - * - * libxl_sigchld_owner_libxl_always: - * The application expects libxl to reap all of its children, - * and provides a callback to be notified of their exit - * statues. - * - * An application which fails to call setmode, or which passes 0 for - * hooks, while it uses any libxl operation which might - * create or use child processes (see above): - * - Must not have any child processes running. - * - Must not install a SIGCHLD handler. - * - Must not reap any children. - */ - - -typedef enum { - /* libxl owns SIGCHLD whenever it has a child. */ - libxl_sigchld_owner_libxl, - - /* Application promises to call libxl_childproc_exited but NOT - * from within a signal handler. libxl will not itself arrange to - * (un)block or catch SIGCHLD. */ - libxl_sigchld_owner_mainloop, - - /* libxl owns SIGCHLD all the time, and the application is - * relying on libxl's event loop for reaping its own children. */ - libxl_sigchld_owner_libxl_always, -} libxl_sigchld_owner; - -typedef struct { - libxl_sigchld_owner chldowner; - - /* All of these are optional: */ - - /* Called by libxl instead of fork. Should behave exactly like - * fork, including setting errno etc. May NOT reenter into libxl. - * Application may use this to discover pids of libxl's children, - * for example. - */ - pid_t (*fork_replacement)(void *user); - - /* With libxl_sigchld_owner_libxl, called by libxl when it has - * reaped a pid. (Not permitted with _owner_mainloop.) - * - * Should return 0 if the child was recognised by the application - * (or if the application does not keep those kind of records), - * ERROR_UNKNOWN_CHILD if the application knows that the child is not - * the application's; if it returns another error code it is a - * disaster as described for libxl_event_register_callbacks. - * (libxl will report unexpected children to its error log.) - * - * If not supplied, the application is assumed not to start - * any children of its own. - * - * This function is NOT called from within the signal handler. - * Rather it will be called from inside a libxl's event handling - * code and thus only when libxl is running, for example from - * within libxl_event_wait. (libxl uses the self-pipe trick - * to implement this.) - * - * childproc_exited_callback may call back into libxl, but it - * is best to avoid making long-running libxl calls as that might - * stall the calling event loop while the nested operation - * completes. - */ - int (*reaped_callback)(pid_t, int status, void *user); -} libxl_childproc_hooks; - -/* hooks may be 0 in which is equivalent to &{ libxl_sigchld_owner_libxl, 0, 0 } - * - * May not be called when libxl might have any child processes, or the - * behaviour is undefined. So it is best to call this at - * initialisation. - */ -void libxl_childproc_setmode(libxl_ctx *ctx, const libxl_childproc_hooks *hooks, - void *user); - -/* - * This function is for an application which owns SIGCHLD and which - * therefore reaps all of the process's children. - * - * May be called only by an application which has called setmode with - * chldowner == libxl_sigchld_owner_mainloop. If pid was a process started - * by this instance of libxl, returns 0 after doing whatever - * processing is appropriate. Otherwise silently returns - * ERROR_UNKNOWN_CHILD. No other error returns are possible. - * - * May NOT be called from within a signal handler which might - * interrupt any libxl operation. The application will almost - * certainly need to use the self-pipe trick (or a working pselect or - * ppoll) to implement this. - */ -int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status) - LIBXL_EXTERNAL_CALLERS_ONLY; - - -/* - * An application which initialises a libxl_ctx in a parent process - * and then forks a child which does not quickly exec, must - * instead libxl_postfork_child_noexec in the child. One call - * on any existing (or specially made) ctx is sufficient; after - * this all previously existing libxl_ctx's are invalidated and - * must not be used - or even freed. It is harmless to call this - * postfork function and then exec anyway. - */ -void libxl_postfork_child_noexec(libxl_ctx *ctx); - - -#endif - -/* - * Local variables: - * mode: C - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/SOURCES/libxl_json.h b/SOURCES/libxl_json.h deleted file mode 100644 index 14644591..00000000 --- a/SOURCES/libxl_json.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2011 Citrix Ltd. - * - * This program 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; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program 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. - */ - -#ifndef LIBXL_JSON_H -#define LIBXL_JSON_H - -#include -#include - -#ifdef HAVE_YAJL_YAJL_VERSION_H -# include -#endif - -yajl_gen_status libxl_defbool_gen_json(yajl_gen hand, libxl_defbool *p); -yajl_gen_status libxl_domid_gen_json(yajl_gen hand, libxl_domid *p); -yajl_gen_status libxl_uuid_gen_json(yajl_gen hand, libxl_uuid *p); -yajl_gen_status libxl_mac_gen_json(yajl_gen hand, libxl_mac *p); -yajl_gen_status libxl_bitmap_gen_json(yajl_gen hand, libxl_bitmap *p); -yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, - libxl_cpuid_policy_list *p); -yajl_gen_status libxl_string_list_gen_json(yajl_gen hand, libxl_string_list *p); -yajl_gen_status libxl_key_value_list_gen_json(yajl_gen hand, - libxl_key_value_list *p); -yajl_gen_status libxl_hwcap_gen_json(yajl_gen hand, libxl_hwcap *p); - -#include <_libxl_types_json.h> - -/* YAJL version check */ -#if defined(YAJL_MAJOR) && (YAJL_MAJOR > 1) -# define HAVE_YAJL_V2 1 -#endif - -#ifdef HAVE_YAJL_V2 - -typedef size_t libxl_yajl_length; - -static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, - yajl_alloc_funcs *allocFuncs, - void *ctx) -{ - return yajl_alloc(callbacks, allocFuncs, ctx); -} - -static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) -{ - return yajl_gen_alloc(allocFuncs); -} - -#else /* !HAVE_YAJL_V2 */ - -#define yajl_complete_parse yajl_parse_complete - -typedef unsigned int libxl_yajl_length; - -static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, - const yajl_alloc_funcs *allocFuncs, - void *ctx) -{ - yajl_parser_config cfg = { - .allowComments = 1, - .checkUTF8 = 1, - }; - return yajl_alloc(callbacks, &cfg, allocFuncs, ctx); -} - -static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) -{ - yajl_gen_config conf = { 1, " " }; - return yajl_gen_alloc(&conf, allocFuncs); -} - -#endif /* !HAVE_YAJL_V2 */ - -yajl_gen_status libxl_domain_config_gen_json(yajl_gen hand, - libxl_domain_config *p); - -#endif /* LIBXL_JSON_H */ diff --git a/SOURCES/libxl_utils.h b/SOURCES/libxl_utils.h deleted file mode 100644 index 8fee5676..00000000 --- a/SOURCES/libxl_utils.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (C) 2009 Citrix Ltd. - * Author Stefano Stabellini - * - * This program 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; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program 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. - */ - -#ifndef LIBXL_UTILS_H -#define LIBXL_UTILS_H - -#include "libxl.h" - -const char *libxl_basename(const char *name); /* returns string from strdup */ -unsigned long libxl_get_required_shadow_memory(unsigned long maxmem_kb, unsigned int smp_cpus); -int libxl_name_to_domid(libxl_ctx *ctx, const char *name, uint32_t *domid); -char *libxl_domid_to_name(libxl_ctx *ctx, uint32_t domid); -int libxl_name_to_cpupoolid(libxl_ctx *ctx, const char *name, uint32_t *poolid); -char *libxl_cpupoolid_to_name(libxl_ctx *ctx, uint32_t poolid); -int libxl_get_stubdom_id(libxl_ctx *ctx, int guest_domid); -int libxl_is_stubdom(libxl_ctx *ctx, uint32_t domid, uint32_t *target_domid); -int libxl_create_logfile(libxl_ctx *ctx, const char *name, char **full_name); -int libxl_string_to_backend(libxl_ctx *ctx, char *s, libxl_disk_backend *backend); - -int libxl_read_file_contents(libxl_ctx *ctx, const char *filename, - void **data_r, int *datalen_r); - /* Reads the contents of the plain file filename into a mallocd - * buffer. Returns 0 or errno. Any errors other than ENOENT are logged. - * If the file is empty, *data_r and *datalen_r are set to 0. - * On error, *data_r and *datalen_r are unchanged. - * data_r and/or datalen_r may be 0. - */ - -int libxl_read_exactly(libxl_ctx *ctx, int fd, void *data, ssize_t sz, - const char *filename, const char *what); -int libxl_write_exactly(libxl_ctx *ctx, int fd, const void *data, - ssize_t sz, const char *filename, const char *what); - /* Returns 0 or errno. If file is truncated on reading, returns - * EPROTO and you have no way to tell how much was read. Errors are - * logged using filename (which is only used for logging) and what - * (which may be 0). */ - -int libxl_pipe(libxl_ctx *ctx, int pipes[2]); - /* Just like pipe(2), but log errors. */ - -void libxl_report_child_exitstatus(libxl_ctx *ctx, xentoollog_level, - const char *what, pid_t pid, int status); - /* treats all exit statuses as errors; if that's not what you want, - * check status yourself first */ - -int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid, - const char *mac, libxl_device_nic *nic); -int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid, int devid, - libxl_device_nic *nic); - -int libxl_vdev_to_device_disk(libxl_ctx *ctx, uint32_t domid, const char *vdev, - libxl_device_disk *disk); - -int libxl_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *bitmap, int n_bits); - /* Allocated bimap is from malloc, libxl_bitmap_dispose() to be - * called by the application when done. */ -void libxl_bitmap_copy(libxl_ctx *ctx, libxl_bitmap *dptr, - const libxl_bitmap *sptr); -int libxl_bitmap_is_full(const libxl_bitmap *bitmap); -int libxl_bitmap_is_empty(const libxl_bitmap *bitmap); -int libxl_bitmap_test(const libxl_bitmap *bitmap, int bit); -void libxl_bitmap_set(libxl_bitmap *bitmap, int bit); -void libxl_bitmap_reset(libxl_bitmap *bitmap, int bit); -int libxl_bitmap_count_set(const libxl_bitmap *cpumap); -char *libxl_bitmap_to_hex_string(libxl_ctx *ctx, const libxl_bitmap *cpumap); -static inline void libxl_bitmap_set_any(libxl_bitmap *bitmap) -{ - memset(bitmap->map, -1, bitmap->size); -} -static inline void libxl_bitmap_set_none(libxl_bitmap *bitmap) -{ - memset(bitmap->map, 0, bitmap->size); -} -static inline int libxl_bitmap_cpu_valid(libxl_bitmap *bitmap, int bit) -{ - return bit >= 0 && bit < (bitmap->size * 8); -} -#define libxl_for_each_bit(var, map) for (var = 0; var < (map).size * 8; var++) -#define libxl_for_each_set_bit(v, m) for (v = 0; v < (m).size * 8; v++) \ - if (libxl_bitmap_test(&(m), v)) - -static inline int libxl_cpu_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *cpumap, - int max_cpus) -{ - if (max_cpus < 0) - return ERROR_INVAL; - if (max_cpus == 0) - max_cpus = libxl_get_max_cpus(ctx); - if (max_cpus == 0) - return ERROR_FAIL; - - return libxl_bitmap_alloc(ctx, cpumap, max_cpus); -} - -static inline int libxl_node_bitmap_alloc(libxl_ctx *ctx, - libxl_bitmap *nodemap, - int max_nodes) -{ - if (max_nodes < 0) - return ERROR_INVAL; - if (max_nodes == 0) - max_nodes = libxl_get_max_nodes(ctx); - if (max_nodes == 0) - return ERROR_FAIL; - - return libxl_bitmap_alloc(ctx, nodemap, max_nodes); -} - -/* Populate cpumap with the cpus spanned by the nodes in nodemap */ -int libxl_nodemap_to_cpumap(libxl_ctx *ctx, - const libxl_bitmap *nodemap, - libxl_bitmap *cpumap); -/* Populate nodemap with the nodes of the cpus in cpumap */ -int libxl_cpumap_to_nodemap(libxl_ctx *ctx, - const libxl_bitmap *cpuemap, - libxl_bitmap *nodemap); - - static inline uint32_t libxl__sizekb_to_mb(uint32_t s) { - return (s + 1023) / 1024; -} - -#endif - -/* - * Local variables: - * mode: C - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/SOURCES/libxl_uuid.h b/SOURCES/libxl_uuid.h deleted file mode 100644 index 93c65a78..00000000 --- a/SOURCES/libxl_uuid.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2008,2010 Citrix Ltd. - * - * This program 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; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program 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. - */ - -#ifndef __LIBXL_UUID_H__ -#define __LIBXL_UUID_H__ - -#define LIBXL_UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" -#define LIBXL_UUID_FMTLEN ((2*16)+4) /* 16 hex bytes plus 4 hypens */ -#define LIBXL__UUID_BYTES(uuid) uuid[0], uuid[1], uuid[2], uuid[3], \ - uuid[4], uuid[5], uuid[6], uuid[7], \ - uuid[8], uuid[9], uuid[10], uuid[11], \ - uuid[12], uuid[13], uuid[14], uuid[15] - -#if defined(__linux__) - -#include -#include - -typedef struct { - uuid_t uuid; -} libxl_uuid; - -#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(((uint8_t *)arg.uuid)) - -#elif defined(__NetBSD__) - -#include -#include -#include -#include -#include - -#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(arg.uuid) - -typedef struct { - uint8_t uuid[16]; -} libxl_uuid; - -#else - -#error "Please update libxl_uuid.h for your OS" - -#endif - -int libxl_uuid_is_nil(libxl_uuid *uuid); -void libxl_uuid_generate(libxl_uuid *uuid); -int libxl_uuid_from_string(libxl_uuid *uuid, const char *in); -void libxl_uuid_copy(libxl_uuid *dst, const libxl_uuid *src); -void libxl_uuid_clear(libxl_uuid *uuid); -int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2); -uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid); - -#endif /* __LIBXL_UUID_H__ */ - -/* - * Local variables: - * mode: C - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/SOURCES/make-xsc-xenopsd.conf b/SOURCES/make-xsc-xenopsd.conf deleted file mode 100755 index ab42858f..00000000 --- a/SOURCES/make-xsc-xenopsd.conf +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -# Find a group -for i in wheel root xapi xendev; do - egrep -i "^$i" /etc/group > /dev/null && group=$i -done - -cat </dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch b/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch deleted file mode 100644 index 8924b154..00000000 --- a/SOURCES/ocaml-ctypes-0.2.1-std-gnu99.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index ee70aa8..6d6a461 100644 ---- a/Makefile -+++ b/Makefile -@@ -8,7 +8,7 @@ VPATH=src examples - BUILDDIR=_build - PROJECTS=configure configured ctypes ctypes-foreign-base ctypes-foreign-threaded ctypes-foreign-unthreaded ctypes-top - GENERATED=src/ctypes_config.h src/ctypes_config.ml setup.data src/ctypes/ctypes_primitives.ml --CFLAGS=-fPIC -Wall -O3 $(OCAML_FFI_INCOPTS) -+CFLAGS=-std=gnu99 -fPIC -Wall -O3 $(OCAML_FFI_INCOPTS) - OCAML_FFI_INCOPTS=$(libffi_opt) - - # public targets diff --git a/SOURCES/ocaml-jsonm-setup.ml.patch b/SOURCES/ocaml-jsonm-setup.ml.patch deleted file mode 100644 index a08bea44..00000000 --- a/SOURCES/ocaml-jsonm-setup.ml.patch +++ /dev/null @@ -1,7918 +0,0 @@ -diff -urN jsonm-0.9.1.orig/myocamlbuild.ml jsonm-0.9.1/myocamlbuild.ml ---- jsonm-0.9.1.orig/myocamlbuild.ml 1970-01-01 00:00:00.000000000 +0000 -+++ jsonm-0.9.1/myocamlbuild.ml 2014-10-16 17:13:44.041481372 +0000 -@@ -0,0 +1,609 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: be3f4d01d5bd3b6bdd731700ef928e30) *) -+module OASISGettext = struct -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ -+ -+ let ns_ str = -+ str -+ -+ -+ let s_ str = -+ str -+ -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ -+ let init = -+ [] -+ -+ -+end -+ -+module OASISExpr = struct -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ -+ -+ open OASISGettext -+ -+ -+ type test = string -+ -+ -+ type flag = string -+ -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+ -+end -+ -+ -+# 132 "myocamlbuild.ml" -+module BaseEnvLight = struct -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ -+ -+ module MapString = Map.Make(String) -+ -+ -+ type t = string MapString.t -+ -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 237 "myocamlbuild.ml" -+module MyOCamlbuildFindlib = struct -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) -+ -+ -+ (** OCamlbuild extension, copied from -+ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild -+ * by N. Pouillard and others -+ * -+ * Updated on 2009/02/28 -+ * -+ * Modified by Sylvain Le Gall -+ *) -+ open Ocamlbuild_plugin -+ -+ -+ (* these functions are not really officially exported *) -+ let run_and_read = -+ Ocamlbuild_pack.My_unix.run_and_read -+ -+ -+ let blank_sep_strings = -+ Ocamlbuild_pack.Lexers.blank_sep_strings -+ -+ -+ let exec_from_conf exec = -+ let exec = -+ let env_filename = Pathname.basename BaseEnvLight.default_filename in -+ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in -+ try -+ BaseEnvLight.var_get exec env -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s\n" exec; -+ exec -+ in -+ let fix_win32 str = -+ if Sys.os_type = "Win32" then begin -+ let buff = Buffer.create (String.length str) in -+ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. -+ *) -+ String.iter -+ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) -+ str; -+ Buffer.contents buff -+ end else begin -+ str -+ end -+ in -+ fix_win32 exec -+ -+ let split s ch = -+ let buf = Buffer.create 13 in -+ let x = ref [] in -+ let flush () = -+ x := (Buffer.contents buf) :: !x; -+ Buffer.clear buf -+ in -+ String.iter -+ (fun c -> -+ if c = ch then -+ flush () -+ else -+ Buffer.add_char buf c) -+ s; -+ flush (); -+ List.rev !x -+ -+ -+ let split_nl s = split s '\n' -+ -+ -+ let before_space s = -+ try -+ String.before s (String.index s ' ') -+ with Not_found -> s -+ -+ (* ocamlfind command *) -+ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] -+ -+ (* This lists all supported packages. *) -+ let find_packages () = -+ List.map before_space (split_nl & run_and_read "ocamlfind list") -+ -+ -+ (* Mock to list available syntaxes. *) -+ let find_syntaxes () = ["camlp4o"; "camlp4r"] -+ -+ -+ let well_known_syntax = [ -+ "camlp4.quotations.o"; -+ "camlp4.quotations.r"; -+ "camlp4.exceptiontracer"; -+ "camlp4.extend"; -+ "camlp4.foldgenerator"; -+ "camlp4.listcomprehension"; -+ "camlp4.locationstripper"; -+ "camlp4.macro"; -+ "camlp4.mapgenerator"; -+ "camlp4.metagenerator"; -+ "camlp4.profiler"; -+ "camlp4.tracer" -+ ] -+ -+ -+ let dispatch = -+ function -+ | After_options -> -+ (* By using Before_options one let command line options have an higher -+ * priority on the contrary using After_options will guarantee to have -+ * the higher priority override default commands by ocamlfind ones *) -+ Options.ocamlc := ocamlfind & A"ocamlc"; -+ Options.ocamlopt := ocamlfind & A"ocamlopt"; -+ Options.ocamldep := ocamlfind & A"ocamldep"; -+ Options.ocamldoc := ocamlfind & A"ocamldoc"; -+ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; -+ Options.ocamlmklib := ocamlfind & A"ocamlmklib" -+ -+ | After_rules -> -+ -+ (* When one link an OCaml library/binary/package, one should use -+ * -linkpkg *) -+ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; -+ -+ (* For each ocamlfind package one inject the -package option when -+ * compiling, computing dependencies, generating documentation and -+ * linking. *) -+ List.iter -+ begin fun pkg -> -+ let base_args = [A"-package"; A pkg] in -+ (* TODO: consider how to really choose camlp4o or camlp4r. *) -+ let syn_args = [A"-syntax"; A "camlp4o"] in -+ let args = -+ (* Heuristic to identify syntax extensions: whether they end in -+ ".syntax"; some might not. -+ *) -+ if Filename.check_suffix pkg "syntax" || -+ List.mem pkg well_known_syntax then -+ syn_args @ base_args -+ else -+ base_args -+ in -+ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; -+ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; -+ end -+ (find_packages ()); -+ -+ (* Like -package but for extensions syntax. Morover -syntax is useless -+ * when linking. *) -+ List.iter begin fun syntax -> -+ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & -+ S[A"-syntax"; A syntax]; -+ end (find_syntaxes ()); -+ -+ (* The default "thread" tag is not compatible with ocamlfind. -+ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" -+ * options when using this tag. When using the "-linkpkg" option with -+ * ocamlfind, this module will then be added twice on the command line. -+ * -+ * To solve this, one approach is to add the "-thread" option when using -+ * the "threads" package using the previous plugin. -+ *) -+ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); -+ -+ | _ -> -+ () -+end -+ -+module MyOCamlbuildBase = struct -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ -+ (** Base functions for writing myocamlbuild.ml -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ -+ -+ open Ocamlbuild_plugin -+ module OC = Ocamlbuild_pack.Ocaml_compiler -+ -+ -+ type dir = string -+ type file = string -+ type name = string -+ type tag = string -+ -+ -+(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ -+ type t = -+ { -+ lib_ocaml: (name * dir list * string list) list; -+ lib_c: (name * dir * file list) list; -+ flags: (tag list * (spec OASISExpr.choices)) list; -+ (* Replace the 'dir: include' from _tags by a precise interdepends in -+ * directory. -+ *) -+ includes: (dir * dir list) list; -+ } -+ -+ -+ let env_filename = -+ Pathname.basename -+ BaseEnvLight.default_filename -+ -+ -+ let dispatch_combine lst = -+ fun e -> -+ List.iter -+ (fun dispatch -> dispatch e) -+ lst -+ -+ -+ let tag_libstubs nm = -+ "use_lib"^nm^"_stubs" -+ -+ -+ let nm_libstubs nm = -+ nm^"_stubs" -+ -+ -+ let dispatch t e = -+ let env = -+ BaseEnvLight.load -+ ~filename:env_filename -+ ~allow_empty:true -+ () -+ in -+ match e with -+ | Before_options -> -+ let no_trailing_dot s = -+ if String.length s >= 1 && s.[0] = '.' then -+ String.sub s 1 ((String.length s) - 1) -+ else -+ s -+ in -+ List.iter -+ (fun (opt, var) -> -+ try -+ opt := no_trailing_dot (BaseEnvLight.var_get var env) -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s\n" var) -+ [ -+ Options.ext_obj, "ext_obj"; -+ Options.ext_lib, "ext_lib"; -+ Options.ext_dll, "ext_dll"; -+ ] -+ -+ | After_rules -> -+ (* Declare OCaml libraries *) -+ List.iter -+ (function -+ | nm, [], intf_modules -> -+ ocaml_lib nm; -+ let cmis = -+ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis -+ | nm, dir :: tl, intf_modules -> -+ ocaml_lib ~dir:dir (dir^"/"^nm); -+ List.iter -+ (fun dir -> -+ List.iter -+ (fun str -> -+ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) -+ ["compile"; "infer_interface"; "doc"]) -+ tl; -+ let cmis = -+ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] -+ cmis) -+ t.lib_ocaml; -+ -+ (* Declare directories dependencies, replace "include" in _tags. *) -+ List.iter -+ (fun (dir, include_dirs) -> -+ Pathname.define_context dir include_dirs) -+ t.includes; -+ -+ (* Declare C libraries *) -+ List.iter -+ (fun (lib, dir, headers) -> -+ (* Handle C part of library *) -+ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; -+ A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] -+ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); -+ -+ (* When ocaml link something that use the C library, then one -+ need that file to be up to date. -+ *) -+ dep ["link"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ (* TODO: be more specific about what depends on headers *) -+ (* Depends on .h files *) -+ dep ["compile"; "c"] -+ headers; -+ -+ (* Setup search path for lib *) -+ flag ["link"; "ocaml"; "use_"^lib] -+ (S[A"-I"; P(dir)]); -+ ) -+ t.lib_c; -+ -+ (* Add flags *) -+ List.iter -+ (fun (tags, cond_specs) -> -+ let spec = BaseEnvLight.var_choose cond_specs env in -+ let rec eval_specs = -+ function -+ | S lst -> S (List.map eval_specs lst) -+ | A str -> A (BaseEnvLight.var_expand str env) -+ | spec -> spec -+ in -+ flag tags & (eval_specs spec)) -+ t.flags -+ | _ -> -+ () -+ -+ -+ let dispatch_default t = -+ dispatch_combine -+ [ -+ dispatch t; -+ MyOCamlbuildFindlib.dispatch; -+ ] -+ -+ -+end -+ -+ -+# 594 "myocamlbuild.ml" -+open Ocamlbuild_plugin;; -+let package_default = -+ { -+ MyOCamlbuildBase.lib_ocaml = [("jsonm", ["src"], [])]; -+ lib_c = []; -+ flags = []; -+ includes = [("test", ["src"])] -+ } -+ ;; -+ -+let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; -+ -+# 608 "myocamlbuild.ml" -+(* OASIS_STOP *) -+Ocamlbuild_plugin.dispatch dispatch_default;; -diff -urN jsonm-0.9.1.orig/setup.ml jsonm-0.9.1/setup.ml ---- jsonm-0.9.1.orig/setup.ml 1970-01-01 00:00:00.000000000 +0000 -+++ jsonm-0.9.1/setup.ml 2014-10-16 17:13:44.065481470 +0000 -@@ -0,0 +1,7216 @@ -+(* setup.ml generated for the first time by OASIS v0.4.4 *) -+ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 030dd5e26bb3625af0af2ceb9fe537a2) *) -+(* -+ Regenerated by OASIS v0.4.4 -+ Visit http://oasis.forge.ocamlcore.org for more information and -+ documentation about functions used in this file. -+*) -+module OASISGettext = struct -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ -+ -+ let ns_ str = -+ str -+ -+ -+ let s_ str = -+ str -+ -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ -+ let init = -+ [] -+ -+ -+end -+ -+module OASISContext = struct -+(* # 22 "src/oasis/OASISContext.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ type level = -+ [ `Debug -+ | `Info -+ | `Warning -+ | `Error] -+ -+ -+ type t = -+ { -+ (* TODO: replace this by a proplist. *) -+ quiet: bool; -+ info: bool; -+ debug: bool; -+ ignore_plugins: bool; -+ ignore_unknown_fields: bool; -+ printf: level -> string -> unit; -+ } -+ -+ -+ let printf lvl str = -+ let beg = -+ match lvl with -+ | `Error -> s_ "E: " -+ | `Warning -> s_ "W: " -+ | `Info -> s_ "I: " -+ | `Debug -> s_ "D: " -+ in -+ prerr_endline (beg^str) -+ -+ -+ let default = -+ ref -+ { -+ quiet = false; -+ info = false; -+ debug = false; -+ ignore_plugins = false; -+ ignore_unknown_fields = false; -+ printf = printf; -+ } -+ -+ -+ let quiet = -+ {!default with quiet = true} -+ -+ -+ let fspecs () = -+ (* TODO: don't act on default. *) -+ let ignore_plugins = ref false in -+ ["-quiet", -+ Arg.Unit (fun () -> default := {!default with quiet = true}), -+ s_ " Run quietly"; -+ -+ "-info", -+ Arg.Unit (fun () -> default := {!default with info = true}), -+ s_ " Display information message"; -+ -+ -+ "-debug", -+ Arg.Unit (fun () -> default := {!default with debug = true}), -+ s_ " Output debug message"; -+ -+ "-ignore-plugins", -+ Arg.Set ignore_plugins, -+ s_ " Ignore plugin's field."; -+ -+ "-C", -+ (* TODO: remove this chdir. *) -+ Arg.String (fun str -> Sys.chdir str), -+ s_ "dir Change directory before running."], -+ fun () -> {!default with ignore_plugins = !ignore_plugins} -+end -+ -+module OASISString = struct -+(* # 22 "src/oasis/OASISString.ml" *) -+ -+ -+ (** Various string utilities. -+ -+ Mostly inspired by extlib and batteries ExtString and BatString libraries. -+ -+ @author Sylvain Le Gall -+ *) -+ -+ -+ let nsplitf str f = -+ if str = "" then -+ [] -+ else -+ let buf = Buffer.create 13 in -+ let lst = ref [] in -+ let push () = -+ lst := Buffer.contents buf :: !lst; -+ Buffer.clear buf -+ in -+ let str_len = String.length str in -+ for i = 0 to str_len - 1 do -+ if f str.[i] then -+ push () -+ else -+ Buffer.add_char buf str.[i] -+ done; -+ push (); -+ List.rev !lst -+ -+ -+ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the -+ separator. -+ *) -+ let nsplit str c = -+ nsplitf str ((=) c) -+ -+ -+ let find ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ while !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ what_idx := 0; -+ incr str_idx -+ done; -+ if !what_idx <> String.length what then -+ raise Not_found -+ else -+ !str_idx - !what_idx -+ -+ -+ let sub_start str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str len (str_len - len) -+ -+ -+ let sub_end ?(offset=0) str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str 0 (str_len - len) -+ -+ -+ let starts_with ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ let ok = ref true in -+ while !ok && -+ !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ ok := false; -+ incr str_idx -+ done; -+ if !what_idx = String.length what then -+ true -+ else -+ false -+ -+ -+ let strip_starts_with ~what str = -+ if starts_with ~what str then -+ sub_start str (String.length what) -+ else -+ raise Not_found -+ -+ -+ let ends_with ~what ?(offset=0) str = -+ let what_idx = ref ((String.length what) - 1) in -+ let str_idx = ref ((String.length str) - 1) in -+ let ok = ref true in -+ while !ok && -+ offset <= !str_idx && -+ 0 <= !what_idx do -+ if str.[!str_idx] = what.[!what_idx] then -+ decr what_idx -+ else -+ ok := false; -+ decr str_idx -+ done; -+ if !what_idx = -1 then -+ true -+ else -+ false -+ -+ -+ let strip_ends_with ~what str = -+ if ends_with ~what str then -+ sub_end str (String.length what) -+ else -+ raise Not_found -+ -+ -+ let replace_chars f s = -+ let buf = String.make (String.length s) 'X' in -+ for i = 0 to String.length s - 1 do -+ buf.[i] <- f s.[i] -+ done; -+ buf -+ -+ -+end -+ -+module OASISUtils = struct -+(* # 22 "src/oasis/OASISUtils.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ module MapExt = -+ struct -+ module type S = -+ sig -+ include Map.S -+ val add_list: 'a t -> (key * 'a) list -> 'a t -+ val of_list: (key * 'a) list -> 'a t -+ val to_list: 'a t -> (key * 'a) list -+ end -+ -+ module Make (Ord: Map.OrderedType) = -+ struct -+ include Map.Make(Ord) -+ -+ let rec add_list t = -+ function -+ | (k, v) :: tl -> add_list (add k v t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] -+ end -+ end -+ -+ -+ module MapString = MapExt.Make(String) -+ -+ -+ module SetExt = -+ struct -+ module type S = -+ sig -+ include Set.S -+ val add_list: t -> elt list -> t -+ val of_list: elt list -> t -+ val to_list: t -> elt list -+ end -+ -+ module Make (Ord: Set.OrderedType) = -+ struct -+ include Set.Make(Ord) -+ -+ let rec add_list t = -+ function -+ | e :: tl -> add_list (add e t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list = elements -+ end -+ end -+ -+ -+ module SetString = SetExt.Make(String) -+ -+ -+ let compare_csl s1 s2 = -+ String.compare (String.lowercase s1) (String.lowercase s2) -+ -+ -+ module HashStringCsl = -+ Hashtbl.Make -+ (struct -+ type t = string -+ -+ let equal s1 s2 = -+ (String.lowercase s1) = (String.lowercase s2) -+ -+ let hash s = -+ Hashtbl.hash (String.lowercase s) -+ end) -+ -+ module SetStringCsl = -+ SetExt.Make -+ (struct -+ type t = string -+ let compare = compare_csl -+ end) -+ -+ -+ let varname_of_string ?(hyphen='_') s = -+ if String.length s = 0 then -+ begin -+ invalid_arg "varname_of_string" -+ end -+ else -+ begin -+ let buf = -+ OASISString.replace_chars -+ (fun c -> -+ if ('a' <= c && c <= 'z') -+ || -+ ('A' <= c && c <= 'Z') -+ || -+ ('0' <= c && c <= '9') then -+ c -+ else -+ hyphen) -+ s; -+ in -+ let buf = -+ (* Start with a _ if digit *) -+ if '0' <= s.[0] && s.[0] <= '9' then -+ "_"^buf -+ else -+ buf -+ in -+ String.lowercase buf -+ end -+ -+ -+ let varname_concat ?(hyphen='_') p s = -+ let what = String.make 1 hyphen in -+ let p = -+ try -+ OASISString.strip_ends_with ~what p -+ with Not_found -> -+ p -+ in -+ let s = -+ try -+ OASISString.strip_starts_with ~what s -+ with Not_found -> -+ s -+ in -+ p^what^s -+ -+ -+ let is_varname str = -+ str = varname_of_string str -+ -+ -+ let failwithf fmt = Printf.ksprintf failwith fmt -+ -+ -+end -+ -+module PropList = struct -+(* # 22 "src/oasis/PropList.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ type name = string -+ -+ -+ exception Not_set of name * string option -+ exception No_printer of name -+ exception Unknown_field of name * name -+ -+ -+ let () = -+ Printexc.register_printer -+ (function -+ | Not_set (nm, Some rsn) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) -+ | Not_set (nm, None) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set") nm) -+ | No_printer nm -> -+ Some -+ (Printf.sprintf (f_ "No default printer for value %s") nm) -+ | Unknown_field (nm, schm) -> -+ Some -+ (Printf.sprintf -+ (f_ "Field %s is not defined in schema %s") nm schm) -+ | _ -> -+ None) -+ -+ -+ module Data = -+ struct -+ type t = -+ (name, unit -> unit) Hashtbl.t -+ -+ let create () = -+ Hashtbl.create 13 -+ -+ let clear t = -+ Hashtbl.clear t -+ -+ -+(* # 78 "src/oasis/PropList.ml" *) -+ end -+ -+ -+ module Schema = -+ struct -+ type ('ctxt, 'extra) value = -+ { -+ get: Data.t -> string; -+ set: Data.t -> ?context:'ctxt -> string -> unit; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ type ('ctxt, 'extra) t = -+ { -+ name: name; -+ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; -+ order: name Queue.t; -+ name_norm: string -> string; -+ } -+ -+ let create ?(case_insensitive=false) nm = -+ { -+ name = nm; -+ fields = Hashtbl.create 13; -+ order = Queue.create (); -+ name_norm = -+ (if case_insensitive then -+ String.lowercase -+ else -+ fun s -> s); -+ } -+ -+ let add t nm set get extra help = -+ let key = -+ t.name_norm nm -+ in -+ -+ if Hashtbl.mem t.fields key then -+ failwith -+ (Printf.sprintf -+ (f_ "Field '%s' is already defined in schema '%s'") -+ nm t.name); -+ Hashtbl.add -+ t.fields -+ key -+ { -+ set = set; -+ get = get; -+ help = help; -+ extra = extra; -+ }; -+ Queue.add nm t.order -+ -+ let mem t nm = -+ Hashtbl.mem t.fields nm -+ -+ let find t nm = -+ try -+ Hashtbl.find t.fields (t.name_norm nm) -+ with Not_found -> -+ raise (Unknown_field (nm, t.name)) -+ -+ let get t data nm = -+ (find t nm).get data -+ -+ let set t data nm ?context x = -+ (find t nm).set -+ data -+ ?context -+ x -+ -+ let fold f acc t = -+ Queue.fold -+ (fun acc k -> -+ let v = -+ find t k -+ in -+ f acc k v.extra v.help) -+ acc -+ t.order -+ -+ let iter f t = -+ fold -+ (fun () -> f) -+ () -+ t -+ -+ let name t = -+ t.name -+ end -+ -+ -+ module Field = -+ struct -+ type ('ctxt, 'value, 'extra) t = -+ { -+ set: Data.t -> ?context:'ctxt -> 'value -> unit; -+ get: Data.t -> 'value; -+ sets: Data.t -> ?context:'ctxt -> string -> unit; -+ gets: Data.t -> string; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ let new_id = -+ let last_id = -+ ref 0 -+ in -+ fun () -> incr last_id; !last_id -+ -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ (* Default value container *) -+ let v = -+ ref None -+ in -+ -+ (* If name is not given, create unique one *) -+ let nm = -+ match name with -+ | Some s -> s -+ | None -> Printf.sprintf "_anon_%d" (new_id ()) -+ in -+ -+ (* Last chance to get a value: the default *) -+ let default () = -+ match default with -+ | Some d -> d -+ | None -> raise (Not_set (nm, Some (s_ "no default value"))) -+ in -+ -+ (* Get data *) -+ let get data = -+ (* Get value *) -+ try -+ (Hashtbl.find data nm) (); -+ match !v with -+ | Some x -> x -+ | None -> default () -+ with Not_found -> -+ default () -+ in -+ -+ (* Set data *) -+ let set data ?context x = -+ let x = -+ match update with -+ | Some f -> -+ begin -+ try -+ f ?context (get data) x -+ with Not_set _ -> -+ x -+ end -+ | None -> -+ x -+ in -+ Hashtbl.replace -+ data -+ nm -+ (fun () -> v := Some x) -+ in -+ -+ (* Parse string value, if possible *) -+ let parse = -+ match parse with -+ | Some f -> -+ f -+ | None -> -+ fun ?context s -> -+ failwith -+ (Printf.sprintf -+ (f_ "Cannot parse field '%s' when setting value %S") -+ nm -+ s) -+ in -+ -+ (* Set data, from string *) -+ let sets data ?context s = -+ set ?context data (parse ?context s) -+ in -+ -+ (* Output value as string, if possible *) -+ let print = -+ match print with -+ | Some f -> -+ f -+ | None -> -+ fun _ -> raise (No_printer nm) -+ in -+ -+ (* Get data, as a string *) -+ let gets data = -+ print (get data) -+ in -+ -+ begin -+ match schema with -+ | Some t -> -+ Schema.add t nm sets gets extra help -+ | None -> -+ () -+ end; -+ -+ { -+ set = set; -+ get = get; -+ sets = sets; -+ gets = gets; -+ help = help; -+ extra = extra; -+ } -+ -+ let fset data t ?context x = -+ t.set data ?context x -+ -+ let fget data t = -+ t.get data -+ -+ let fsets data t ?context s = -+ t.sets data ?context s -+ -+ let fgets data t = -+ t.gets data -+ end -+ -+ -+ module FieldRO = -+ struct -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ let fld = -+ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra -+ in -+ fun data -> Field.fget data fld -+ end -+end -+ -+module OASISMessage = struct -+(* # 22 "src/oasis/OASISMessage.ml" *) -+ -+ -+ open OASISGettext -+ open OASISContext -+ -+ -+ let generic_message ~ctxt lvl fmt = -+ let cond = -+ if ctxt.quiet then -+ false -+ else -+ match lvl with -+ | `Debug -> ctxt.debug -+ | `Info -> ctxt.info -+ | _ -> true -+ in -+ Printf.ksprintf -+ (fun str -> -+ if cond then -+ begin -+ ctxt.printf lvl str -+ end) -+ fmt -+ -+ -+ let debug ~ctxt fmt = -+ generic_message ~ctxt `Debug fmt -+ -+ -+ let info ~ctxt fmt = -+ generic_message ~ctxt `Info fmt -+ -+ -+ let warning ~ctxt fmt = -+ generic_message ~ctxt `Warning fmt -+ -+ -+ let error ~ctxt fmt = -+ generic_message ~ctxt `Error fmt -+ -+end -+ -+module OASISVersion = struct -+(* # 22 "src/oasis/OASISVersion.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ -+ -+ -+ type s = string -+ -+ -+ type t = string -+ -+ -+ type comparator = -+ | VGreater of t -+ | VGreaterEqual of t -+ | VEqual of t -+ | VLesser of t -+ | VLesserEqual of t -+ | VOr of comparator * comparator -+ | VAnd of comparator * comparator -+ -+ -+ -+ (* Range of allowed characters *) -+ let is_digit c = -+ '0' <= c && c <= '9' -+ -+ -+ let is_alpha c = -+ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') -+ -+ -+ let is_special = -+ function -+ | '.' | '+' | '-' | '~' -> true -+ | _ -> false -+ -+ -+ let rec version_compare v1 v2 = -+ if v1 <> "" || v2 <> "" then -+ begin -+ (* Compare ascii string, using special meaning for version -+ * related char -+ *) -+ let val_ascii c = -+ if c = '~' then -1 -+ else if is_digit c then 0 -+ else if c = '\000' then 0 -+ else if is_alpha c then Char.code c -+ else (Char.code c) + 256 -+ in -+ -+ let len1 = String.length v1 in -+ let len2 = String.length v2 in -+ -+ let p = ref 0 in -+ -+ (** Compare ascii part *) -+ let compare_vascii () = -+ let cmp = ref 0 in -+ while !cmp = 0 && -+ !p < len1 && !p < len2 && -+ not (is_digit v1.[!p] && is_digit v2.[!p]) do -+ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); -+ incr p -+ done; -+ if !cmp = 0 && !p < len1 && !p = len2 then -+ val_ascii v1.[!p] -+ else if !cmp = 0 && !p = len1 && !p < len2 then -+ - (val_ascii v2.[!p]) -+ else -+ !cmp -+ in -+ -+ (** Compare digit part *) -+ let compare_digit () = -+ let extract_int v p = -+ let start_p = !p in -+ while !p < String.length v && is_digit v.[!p] do -+ incr p -+ done; -+ let substr = -+ String.sub v !p ((String.length v) - !p) -+ in -+ let res = -+ match String.sub v start_p (!p - start_p) with -+ | "" -> 0 -+ | s -> int_of_string s -+ in -+ res, substr -+ in -+ let i1, tl1 = extract_int v1 (ref !p) in -+ let i2, tl2 = extract_int v2 (ref !p) in -+ i1 - i2, tl1, tl2 -+ in -+ -+ match compare_vascii () with -+ | 0 -> -+ begin -+ match compare_digit () with -+ | 0, tl1, tl2 -> -+ if tl1 <> "" && is_digit tl1.[0] then -+ 1 -+ else if tl2 <> "" && is_digit tl2.[0] then -+ -1 -+ else -+ version_compare tl1 tl2 -+ | n, _, _ -> -+ n -+ end -+ | n -> -+ n -+ end -+ else -+ begin -+ 0 -+ end -+ -+ -+ let version_of_string str = str -+ -+ -+ let string_of_version t = t -+ -+ -+ let version_compare_string s1 s2 = -+ version_compare (version_of_string s1) (version_of_string s2) -+ -+ -+ let chop t = -+ try -+ let pos = -+ String.rindex t '.' -+ in -+ String.sub t 0 pos -+ with Not_found -> -+ t -+ -+ -+ let rec comparator_apply v op = -+ match op with -+ | VGreater cv -> -+ (version_compare v cv) > 0 -+ | VGreaterEqual cv -> -+ (version_compare v cv) >= 0 -+ | VLesser cv -> -+ (version_compare v cv) < 0 -+ | VLesserEqual cv -> -+ (version_compare v cv) <= 0 -+ | VEqual cv -> -+ (version_compare v cv) = 0 -+ | VOr (op1, op2) -> -+ (comparator_apply v op1) || (comparator_apply v op2) -+ | VAnd (op1, op2) -> -+ (comparator_apply v op1) && (comparator_apply v op2) -+ -+ -+ let rec string_of_comparator = -+ function -+ | VGreater v -> "> "^(string_of_version v) -+ | VEqual v -> "= "^(string_of_version v) -+ | VLesser v -> "< "^(string_of_version v) -+ | VGreaterEqual v -> ">= "^(string_of_version v) -+ | VLesserEqual v -> "<= "^(string_of_version v) -+ | VOr (c1, c2) -> -+ (string_of_comparator c1)^" || "^(string_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (string_of_comparator c1)^" && "^(string_of_comparator c2) -+ -+ -+ let rec varname_of_comparator = -+ let concat p v = -+ OASISUtils.varname_concat -+ p -+ (OASISUtils.varname_of_string -+ (string_of_version v)) -+ in -+ function -+ | VGreater v -> concat "gt" v -+ | VLesser v -> concat "lt" v -+ | VEqual v -> concat "eq" v -+ | VGreaterEqual v -> concat "ge" v -+ | VLesserEqual v -> concat "le" v -+ | VOr (c1, c2) -> -+ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) -+ -+ -+ let rec comparator_ge v' = -+ let cmp v = version_compare v v' >= 0 in -+ function -+ | VEqual v -+ | VGreaterEqual v -+ | VGreater v -> cmp v -+ | VLesserEqual _ -+ | VLesser _ -> false -+ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 -+ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 -+ -+ -+end -+ -+module OASISLicense = struct -+(* # 22 "src/oasis/OASISLicense.ml" *) -+ -+ -+ (** License for _oasis fields -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ -+ -+ type license = string -+ -+ -+ type license_exception = string -+ -+ -+ type license_version = -+ | Version of OASISVersion.t -+ | VersionOrLater of OASISVersion.t -+ | NoVersion -+ -+ -+ -+ type license_dep_5_unit = -+ { -+ license: license; -+ excption: license_exception option; -+ version: license_version; -+ } -+ -+ -+ -+ type license_dep_5 = -+ | DEP5Unit of license_dep_5_unit -+ | DEP5Or of license_dep_5 list -+ | DEP5And of license_dep_5 list -+ -+ -+ type t = -+ | DEP5License of license_dep_5 -+ | OtherLicense of string (* URL *) -+ -+ -+ -+end -+ -+module OASISExpr = struct -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ -+ -+ open OASISGettext -+ -+ -+ type test = string -+ -+ -+ type flag = string -+ -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+ -+end -+ -+module OASISText = struct -+(* # 22 "src/oasis/OASISText.ml" *) -+ -+ -+ -+ type elt = -+ | Para of string -+ | Verbatim of string -+ | BlankLine -+ -+ -+ type t = elt list -+ -+end -+ -+module OASISTypes = struct -+(* # 22 "src/oasis/OASISTypes.ml" *) -+ -+ -+ -+ -+ -+ type name = string -+ type package_name = string -+ type url = string -+ type unix_dirname = string -+ type unix_filename = string -+ type host_dirname = string -+ type host_filename = string -+ type prog = string -+ type arg = string -+ type args = string list -+ type command_line = (prog * arg list) -+ -+ -+ type findlib_name = string -+ type findlib_full = string -+ -+ -+ type compiled_object = -+ | Byte -+ | Native -+ | Best -+ -+ -+ -+ type dependency = -+ | FindlibPackage of findlib_full * OASISVersion.comparator option -+ | InternalLibrary of name -+ -+ -+ -+ type tool = -+ | ExternalTool of name -+ | InternalExecutable of name -+ -+ -+ -+ type vcs = -+ | Darcs -+ | Git -+ | Svn -+ | Cvs -+ | Hg -+ | Bzr -+ | Arch -+ | Monotone -+ | OtherVCS of url -+ -+ -+ -+ type plugin_kind = -+ [ `Configure -+ | `Build -+ | `Doc -+ | `Test -+ | `Install -+ | `Extra -+ ] -+ -+ -+ type plugin_data_purpose = -+ [ `Configure -+ | `Build -+ | `Install -+ | `Clean -+ | `Distclean -+ | `Install -+ | `Uninstall -+ | `Test -+ | `Doc -+ | `Extra -+ | `Other of string -+ ] -+ -+ -+ type 'a plugin = 'a * name * OASISVersion.t option -+ -+ -+ type all_plugin = plugin_kind plugin -+ -+ -+ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list -+ -+ -+(* # 115 "src/oasis/OASISTypes.ml" *) -+ -+ -+ type 'a conditional = 'a OASISExpr.choices -+ -+ -+ type custom = -+ { -+ pre_command: (command_line option) conditional; -+ post_command: (command_line option) conditional; -+ } -+ -+ -+ -+ type common_section = -+ { -+ cs_name: name; -+ cs_data: PropList.Data.t; -+ cs_plugin_data: plugin_data; -+ } -+ -+ -+ -+ type build_section = -+ { -+ bs_build: bool conditional; -+ bs_install: bool conditional; -+ bs_path: unix_dirname; -+ bs_compiled_object: compiled_object; -+ bs_build_depends: dependency list; -+ bs_build_tools: tool list; -+ bs_c_sources: unix_filename list; -+ bs_data_files: (unix_filename * unix_filename option) list; -+ bs_ccopt: args conditional; -+ bs_cclib: args conditional; -+ bs_dlllib: args conditional; -+ bs_dllpath: args conditional; -+ bs_byteopt: args conditional; -+ bs_nativeopt: args conditional; -+ } -+ -+ -+ -+ type library = -+ { -+ lib_modules: string list; -+ lib_pack: bool; -+ lib_internal_modules: string list; -+ lib_findlib_parent: findlib_name option; -+ lib_findlib_name: findlib_name option; -+ lib_findlib_containers: findlib_name list; -+ } -+ -+ -+ type object_ = -+ { -+ obj_modules: string list; -+ obj_findlib_fullname: findlib_name list option; -+ } -+ -+ -+ type executable = -+ { -+ exec_custom: bool; -+ exec_main_is: unix_filename; -+ } -+ -+ -+ type flag = -+ { -+ flag_description: string option; -+ flag_default: bool conditional; -+ } -+ -+ -+ type source_repository = -+ { -+ src_repo_type: vcs; -+ src_repo_location: url; -+ src_repo_browser: url option; -+ src_repo_module: string option; -+ src_repo_branch: string option; -+ src_repo_tag: string option; -+ src_repo_subdir: unix_filename option; -+ } -+ -+ -+ type test = -+ { -+ test_type: [`Test] plugin; -+ test_command: command_line conditional; -+ test_custom: custom; -+ test_working_directory: unix_filename option; -+ test_run: bool conditional; -+ test_tools: tool list; -+ } -+ -+ -+ type doc_format = -+ | HTML of unix_filename -+ | DocText -+ | PDF -+ | PostScript -+ | Info of unix_filename -+ | DVI -+ | OtherDoc -+ -+ -+ -+ type doc = -+ { -+ doc_type: [`Doc] plugin; -+ doc_custom: custom; -+ doc_build: bool conditional; -+ doc_install: bool conditional; -+ doc_install_dir: unix_filename; -+ doc_title: string; -+ doc_authors: string list; -+ doc_abstract: string option; -+ doc_format: doc_format; -+ doc_data_files: (unix_filename * unix_filename option) list; -+ doc_build_tools: tool list; -+ } -+ -+ -+ type section = -+ | Library of common_section * build_section * library -+ | Object of common_section * build_section * object_ -+ | Executable of common_section * build_section * executable -+ | Flag of common_section * flag -+ | SrcRepo of common_section * source_repository -+ | Test of common_section * test -+ | Doc of common_section * doc -+ -+ -+ -+ type section_kind = -+ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] -+ -+ -+ type package = -+ { -+ oasis_version: OASISVersion.t; -+ ocaml_version: OASISVersion.comparator option; -+ findlib_version: OASISVersion.comparator option; -+ alpha_features: string list; -+ beta_features: string list; -+ name: package_name; -+ version: OASISVersion.t; -+ license: OASISLicense.t; -+ license_file: unix_filename option; -+ copyrights: string list; -+ maintainers: string list; -+ authors: string list; -+ homepage: url option; -+ synopsis: string; -+ description: OASISText.t option; -+ categories: url list; -+ -+ conf_type: [`Configure] plugin; -+ conf_custom: custom; -+ -+ build_type: [`Build] plugin; -+ build_custom: custom; -+ -+ install_type: [`Install] plugin; -+ install_custom: custom; -+ uninstall_custom: custom; -+ -+ clean_custom: custom; -+ distclean_custom: custom; -+ -+ files_ab: unix_filename list; -+ sections: section list; -+ plugins: [`Extra] plugin list; -+ disable_oasis_section: unix_filename list; -+ schema_data: PropList.Data.t; -+ plugin_data: plugin_data; -+ } -+ -+ -+end -+ -+module OASISFeatures = struct -+(* # 22 "src/oasis/OASISFeatures.ml" *) -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISVersion -+ -+ module MapPlugin = -+ Map.Make -+ (struct -+ type t = plugin_kind * name -+ let compare = Pervasives.compare -+ end) -+ -+ module Data = -+ struct -+ type t = -+ { -+ oasis_version: OASISVersion.t; -+ plugin_versions: OASISVersion.t option MapPlugin.t; -+ alpha_features: string list; -+ beta_features: string list; -+ } -+ -+ let create oasis_version alpha_features beta_features = -+ { -+ oasis_version = oasis_version; -+ plugin_versions = MapPlugin.empty; -+ alpha_features = alpha_features; -+ beta_features = beta_features -+ } -+ -+ let of_package pkg = -+ create -+ pkg.OASISTypes.oasis_version -+ pkg.OASISTypes.alpha_features -+ pkg.OASISTypes.beta_features -+ -+ let add_plugin (plugin_kind, plugin_name, plugin_version) t = -+ {t with -+ plugin_versions = MapPlugin.add -+ (plugin_kind, plugin_name) -+ plugin_version -+ t.plugin_versions} -+ -+ let plugin_version plugin_kind plugin_name t = -+ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions -+ -+ let to_string t = -+ Printf.sprintf -+ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ -+ plugins_version: %s" -+ (OASISVersion.string_of_version t.oasis_version) -+ (String.concat ", " t.alpha_features) -+ (String.concat ", " t.beta_features) -+ (String.concat ", " -+ (MapPlugin.fold -+ (fun (_, plg) ver_opt acc -> -+ (plg^ -+ (match ver_opt with -+ | Some v -> -+ " "^(OASISVersion.string_of_version v) -+ | None -> "")) -+ :: acc) -+ t.plugin_versions [])) -+ end -+ -+ type origin = -+ | Field of string * string -+ | Section of string -+ | NoOrigin -+ -+ type stage = Alpha | Beta -+ -+ -+ let string_of_stage = -+ function -+ | Alpha -> "alpha" -+ | Beta -> "beta" -+ -+ -+ let field_of_stage = -+ function -+ | Alpha -> "AlphaFeatures" -+ | Beta -> "BetaFeatures" -+ -+ type publication = InDev of stage | SinceVersion of OASISVersion.t -+ -+ type t = -+ { -+ name: string; -+ plugin: all_plugin option; -+ publication: publication; -+ description: unit -> string; -+ } -+ -+ (* TODO: mutex protect this. *) -+ let all_features = Hashtbl.create 13 -+ -+ -+ let since_version ver_str = SinceVersion (version_of_string ver_str) -+ let alpha = InDev Alpha -+ let beta = InDev Beta -+ -+ -+ let to_string t = -+ Printf.sprintf -+ "feature: %s; plugin: %s; publication: %s" -+ t.name -+ (match t.plugin with -+ | None -> "" -+ | Some (_, nm, _) -> nm) -+ (match t.publication with -+ | InDev stage -> string_of_stage stage -+ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) -+ -+ let data_check t data origin = -+ let no_message = "no message" in -+ -+ let check_feature features stage = -+ let has_feature = List.mem t.name features in -+ if not has_feature then -+ match origin with -+ | Field (fld, where) -> -+ Some -+ (Printf.sprintf -+ (f_ "Field %s in %s is only available when feature %s \ -+ is in field %s.") -+ fld where t.name (field_of_stage stage)) -+ | Section sct -> -+ Some -+ (Printf.sprintf -+ (f_ "Section %s is only available when features %s \ -+ is in field %s.") -+ sct t.name (field_of_stage stage)) -+ | NoOrigin -> -+ Some no_message -+ else -+ None -+ in -+ -+ let version_is_good ~min_version version fmt = -+ let version_is_good = -+ OASISVersion.comparator_apply -+ version (OASISVersion.VGreaterEqual min_version) -+ in -+ Printf.ksprintf -+ (fun str -> -+ if version_is_good then -+ None -+ else -+ Some str) -+ fmt -+ in -+ -+ match origin, t.plugin, t.publication with -+ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha -+ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta -+ | Field(fld, where), None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Field %s in %s is only valid since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking \ -+ OASIS changelog.") -+ fld where (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Field(fld, where), Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Field %s in %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ fld where plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | Section sct, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Section %s is only valid for since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking OASIS \ -+ changelog.") -+ sct (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Section sct, Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Section %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Section %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ sct plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Section %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | NoOrigin, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version "%s" no_message -+ -+ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> raise Not_found -+ in -+ version_is_good ~min_version plugin_version_current -+ "%s" no_message -+ with Not_found -> -+ Some no_message -+ end -+ -+ -+ let data_assert t data origin = -+ match data_check t data origin with -+ | None -> () -+ | Some str -> failwith str -+ -+ -+ let data_test t data = -+ match data_check t data NoOrigin with -+ | None -> true -+ | Some str -> false -+ -+ -+ let package_test t pkg = -+ data_test t (Data.of_package pkg) -+ -+ -+ let create ?plugin name publication description = -+ let () = -+ if Hashtbl.mem all_features name then -+ failwithf "Feature '%s' is already declared." name -+ in -+ let t = -+ { -+ name = name; -+ plugin = plugin; -+ publication = publication; -+ description = description; -+ } -+ in -+ Hashtbl.add all_features name t; -+ t -+ -+ -+ let get_stage name = -+ try -+ (Hashtbl.find all_features name).publication -+ with Not_found -> -+ failwithf (f_ "Feature %s doesn't exist.") name -+ -+ -+ let list () = -+ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] -+ -+ (* -+ * Real flags. -+ *) -+ -+ -+ let features = -+ create "features_fields" -+ (since_version "0.4") -+ (fun () -> -+ s_ "Enable to experiment not yet official features.") -+ -+ -+ let flag_docs = -+ create "flag_docs" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Building docs require '-docs' flag at configure.") -+ -+ -+ let flag_tests = -+ create "flag_tests" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Running tests require '-tests' flag at configure.") -+ -+ -+ let pack = -+ create "pack" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Allow to create packed library.") -+ -+ -+ let section_object = -+ create "section_object" beta -+ (fun () -> -+ s_ "Implement an object section.") -+ -+ -+ let dynrun_for_release = -+ create "dynrun_for_release" alpha -+ (fun () -> -+ s_ "Make '-setup-update dynamic' suitable for releasing project.") -+ -+ -+ let compiled_setup_ml = -+ create "compiled_setup_ml" alpha -+ (fun () -> -+ s_ "It compiles the setup.ml and speed-up actions done with it.") -+ -+ let disable_oasis_section = -+ create "disable_oasis_section" alpha -+ (fun () -> -+ s_ "Allows the OASIS section comments and digest to be omitted in \ -+ generated files.") -+end -+ -+module OASISUnixPath = struct -+(* # 22 "src/oasis/OASISUnixPath.ml" *) -+ -+ -+ type unix_filename = string -+ type unix_dirname = string -+ -+ -+ type host_filename = string -+ type host_dirname = string -+ -+ -+ let current_dir_name = "." -+ -+ -+ let parent_dir_name = ".." -+ -+ -+ let is_current_dir fn = -+ fn = current_dir_name || fn = "" -+ -+ -+ let concat f1 f2 = -+ if is_current_dir f1 then -+ f2 -+ else -+ let f1' = -+ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 -+ in -+ f1'^"/"^f2 -+ -+ -+ let make = -+ function -+ | hd :: tl -> -+ List.fold_left -+ (fun f p -> concat f p) -+ hd -+ tl -+ | [] -> -+ invalid_arg "OASISUnixPath.make" -+ -+ -+ let dirname f = -+ try -+ String.sub f 0 (String.rindex f '/') -+ with Not_found -> -+ current_dir_name -+ -+ -+ let basename f = -+ try -+ let pos_start = -+ (String.rindex f '/') + 1 -+ in -+ String.sub f pos_start ((String.length f) - pos_start) -+ with Not_found -> -+ f -+ -+ -+ let chop_extension f = -+ try -+ let last_dot = -+ String.rindex f '.' -+ in -+ let sub = -+ String.sub f 0 last_dot -+ in -+ try -+ let last_slash = -+ String.rindex f '/' -+ in -+ if last_slash < last_dot then -+ sub -+ else -+ f -+ with Not_found -> -+ sub -+ -+ with Not_found -> -+ f -+ -+ -+ let capitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.capitalize base) -+ -+ -+ let uncapitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.uncapitalize base) -+ -+ -+end -+ -+module OASISHostPath = struct -+(* # 22 "src/oasis/OASISHostPath.ml" *) -+ -+ -+ open Filename -+ -+ -+ module Unix = OASISUnixPath -+ -+ -+ let make = -+ function -+ | [] -> -+ invalid_arg "OASISHostPath.make" -+ | hd :: tl -> -+ List.fold_left Filename.concat hd tl -+ -+ -+ let of_unix ufn = -+ if Sys.os_type = "Unix" then -+ ufn -+ else -+ make -+ (List.map -+ (fun p -> -+ if p = Unix.current_dir_name then -+ current_dir_name -+ else if p = Unix.parent_dir_name then -+ parent_dir_name -+ else -+ p) -+ (OASISString.nsplit ufn '/')) -+ -+ -+end -+ -+module OASISSection = struct -+(* # 22 "src/oasis/OASISSection.ml" *) -+ -+ -+ open OASISTypes -+ -+ -+ let section_kind_common = -+ function -+ | Library (cs, _, _) -> -+ `Library, cs -+ | Object (cs, _, _) -> -+ `Object, cs -+ | Executable (cs, _, _) -> -+ `Executable, cs -+ | Flag (cs, _) -> -+ `Flag, cs -+ | SrcRepo (cs, _) -> -+ `SrcRepo, cs -+ | Test (cs, _) -> -+ `Test, cs -+ | Doc (cs, _) -> -+ `Doc, cs -+ -+ -+ let section_common sct = -+ snd (section_kind_common sct) -+ -+ -+ let section_common_set cs = -+ function -+ | Library (_, bs, lib) -> Library (cs, bs, lib) -+ | Object (_, bs, obj) -> Object (cs, bs, obj) -+ | Executable (_, bs, exec) -> Executable (cs, bs, exec) -+ | Flag (_, flg) -> Flag (cs, flg) -+ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) -+ | Test (_, tst) -> Test (cs, tst) -+ | Doc (_, doc) -> Doc (cs, doc) -+ -+ -+ (** Key used to identify section -+ *) -+ let section_id sct = -+ let k, cs = -+ section_kind_common sct -+ in -+ k, cs.cs_name -+ -+ -+ let string_of_section sct = -+ let k, nm = -+ section_id sct -+ in -+ (match k with -+ | `Library -> "library" -+ | `Object -> "object" -+ | `Executable -> "executable" -+ | `Flag -> "flag" -+ | `SrcRepo -> "src repository" -+ | `Test -> "test" -+ | `Doc -> "doc") -+ ^" "^nm -+ -+ -+ let section_find id scts = -+ List.find -+ (fun sct -> id = section_id sct) -+ scts -+ -+ -+ module CSection = -+ struct -+ type t = section -+ -+ let id = section_id -+ -+ let compare t1 t2 = -+ compare (id t1) (id t2) -+ -+ let equal t1 t2 = -+ (id t1) = (id t2) -+ -+ let hash t = -+ Hashtbl.hash (id t) -+ end -+ -+ -+ module MapSection = Map.Make(CSection) -+ module SetSection = Set.Make(CSection) -+ -+ -+end -+ -+module OASISBuildSection = struct -+(* # 22 "src/oasis/OASISBuildSection.ml" *) -+ -+ -+end -+ -+module OASISExecutable = struct -+(* # 22 "src/oasis/OASISExecutable.ml" *) -+ -+ -+ open OASISTypes -+ -+ -+ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = -+ let dir = -+ OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.dirname exec.exec_main_is) -+ in -+ let is_native_exec = -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native () -+ | Byte -> false -+ in -+ -+ OASISUnixPath.concat -+ dir -+ (cs.cs_name^(suffix_program ())), -+ -+ if not is_native_exec && -+ not exec.exec_custom && -+ bs.bs_c_sources <> [] then -+ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) -+ else -+ None -+ -+ -+end -+ -+module OASISLibrary = struct -+(* # 22 "src/oasis/OASISLibrary.ml" *) -+ -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ -+ (* Look for a module file, considering capitalization or not. *) -+ let find_module source_file_exists bs modul = -+ let possible_base_fn = -+ List.map -+ (OASISUnixPath.concat bs.bs_path) -+ [modul; -+ OASISUnixPath.uncapitalize_file modul; -+ OASISUnixPath.capitalize_file modul] -+ in -+ (* TODO: we should be able to be able to determine the source for every -+ * files. Hence we should introduce a Module(source: fn) for the fields -+ * Modules and InternalModules -+ *) -+ List.fold_left -+ (fun acc base_fn -> -+ match acc with -+ | `No_sources _ -> -+ begin -+ let file_found = -+ List.fold_left -+ (fun acc ext -> -+ if source_file_exists (base_fn^ext) then -+ (base_fn^ext) :: acc -+ else -+ acc) -+ [] -+ [".ml"; ".mli"; ".mll"; ".mly"] -+ in -+ match file_found with -+ | [] -> -+ acc -+ | lst -> -+ `Sources (base_fn, lst) -+ end -+ | `Sources _ -> -+ acc) -+ (`No_sources possible_base_fn) -+ possible_base_fn -+ -+ -+ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match find_module source_file_exists bs modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ (lib.lib_modules @ lib.lib_internal_modules) -+ -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~has_native_dynlink -+ ~ext_lib -+ ~ext_dll -+ ~source_file_exists -+ (cs, bs, lib) = -+ -+ let find_modules lst ext = -+ let find_module modul = -+ match find_module source_file_exists bs modul with -+ | `Sources (base_fn, [fn]) when ext <> "cmi" -+ && Filename.check_suffix fn ".mli" -> -+ None (* No implementation files for pure interface. *) -+ | `Sources (base_fn, _) -> -+ Some [base_fn] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ Some lst -+ in -+ List.fold_left -+ (fun acc nm -> -+ match find_module nm with -+ | None -> acc -+ | Some base_fns -> -+ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) -+ [] -+ lst -+ in -+ -+ (* The headers that should be compiled along *) -+ let headers = -+ if lib.lib_pack then -+ [] -+ else -+ find_modules -+ lib.lib_modules -+ "cmi" -+ in -+ -+ (* The .cmx that be compiled along *) -+ let cmxs = -+ let should_be_built = -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native -+ | Byte -> false -+ in -+ if should_be_built then -+ if lib.lib_pack then -+ find_modules -+ [cs.cs_name] -+ "cmx" -+ else -+ find_modules -+ (lib.lib_modules @ lib.lib_internal_modules) -+ "cmx" -+ else -+ [] -+ in -+ -+ let acc_nopath = -+ [] -+ in -+ -+ (* Compute what libraries should be built *) -+ let acc_nopath = -+ (* Add the packed header file if required *) -+ let add_pack_header acc = -+ if lib.lib_pack then -+ [cs.cs_name^".cmi"] :: acc -+ else -+ acc -+ in -+ let byte acc = -+ add_pack_header ([cs.cs_name^".cma"] :: acc) -+ in -+ let native acc = -+ let acc = -+ add_pack_header -+ (if has_native_dynlink then -+ [cs.cs_name^".cmxs"] :: acc -+ else acc) -+ in -+ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc -+ in -+ match bs.bs_compiled_object with -+ | Native -> -+ byte (native acc_nopath) -+ | Best when is_native -> -+ byte (native acc_nopath) -+ | Byte | Best -> -+ byte acc_nopath -+ in -+ -+ (* Add C library to be built *) -+ let acc_nopath = -+ if bs.bs_c_sources <> [] then -+ begin -+ ["lib"^cs.cs_name^"_stubs"^ext_lib] -+ :: -+ ["dll"^cs.cs_name^"_stubs"^ext_dll] -+ :: -+ acc_nopath -+ end -+ else -+ acc_nopath -+ in -+ -+ (* All the files generated *) -+ List.rev_append -+ (List.rev_map -+ (List.rev_map -+ (OASISUnixPath.concat bs.bs_path)) -+ acc_nopath) -+ (headers @ cmxs) -+ -+ -+end -+ -+module OASISObject = struct -+(* # 22 "src/oasis/OASISObject.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ obj.obj_modules -+ -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~source_file_exists -+ (cs, bs, obj) = -+ -+ let find_module ext modul = -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, _) -> [base_fn ^ ext] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name ; -+ lst -+ in -+ -+ let header, byte, native, c_object, f = -+ match obj.obj_modules with -+ | [ m ] -> (find_module ".cmi" m, -+ find_module ".cmo" m, -+ find_module ".cmx" m, -+ find_module ".o" m, -+ fun x -> x) -+ | _ -> ([cs.cs_name ^ ".cmi"], -+ [cs.cs_name ^ ".cmo"], -+ [cs.cs_name ^ ".cmx"], -+ [cs.cs_name ^ ".o"], -+ OASISUnixPath.concat bs.bs_path) -+ in -+ List.map (List.map f) ( -+ match bs.bs_compiled_object with -+ | Native -> -+ native :: c_object :: byte :: header :: [] -+ | Best when is_native -> -+ native :: c_object :: byte :: header :: [] -+ | Byte | Best -> -+ byte :: header :: []) -+ -+ -+end -+ -+module OASISFindlib = struct -+(* # 22 "src/oasis/OASISFindlib.ml" *) -+ -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ -+ type library_name = name -+ type findlib_part_name = name -+ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t -+ -+ -+ exception InternalLibraryNotFound of library_name -+ exception FindlibPackageNotFound of findlib_name -+ -+ -+ type group_t = -+ | Container of findlib_name * group_t list -+ | Package of (findlib_name * -+ common_section * -+ build_section * -+ [`Library of library | `Object of object_] * -+ group_t list) -+ -+ -+ type data = common_section * -+ build_section * -+ [`Library of library | `Object of object_] -+ type tree = -+ | Node of (data option) * (tree MapString.t) -+ | Leaf of data -+ -+ -+ let findlib_mapping pkg = -+ (* Map from library name to either full findlib name or parts + parent. *) -+ let fndlb_parts_of_lib_name = -+ let fndlb_parts cs lib = -+ let name = -+ match lib.lib_findlib_name with -+ | Some nm -> nm -+ | None -> cs.cs_name -+ in -+ let name = -+ String.concat "." (lib.lib_findlib_containers @ [name]) -+ in -+ name -+ in -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, _, lib) -> -+ begin -+ let lib_name = cs.cs_name in -+ let fndlb_parts = fndlb_parts cs lib in -+ if MapString.mem lib_name mp then -+ failwithf -+ (f_ "The library name '%s' is used more than once.") -+ lib_name; -+ match lib.lib_findlib_parent with -+ | Some lib_name_parent -> -+ MapString.add -+ lib_name -+ (`Unsolved (lib_name_parent, fndlb_parts)) -+ mp -+ | None -> -+ MapString.add -+ lib_name -+ (`Solved fndlb_parts) -+ mp -+ end -+ -+ | Object (cs, _, obj) -> -+ begin -+ let obj_name = cs.cs_name in -+ if MapString.mem obj_name mp then -+ failwithf -+ (f_ "The object name '%s' is used more than once.") -+ obj_name; -+ let findlib_full_name = match obj.obj_findlib_fullname with -+ | Some ns -> String.concat "." ns -+ | None -> obj_name -+ in -+ MapString.add -+ obj_name -+ (`Solved findlib_full_name) -+ mp -+ end -+ -+ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ (* Solve the above graph to be only library name to full findlib name. *) -+ let fndlb_name_of_lib_name = -+ let rec solve visited mp lib_name lib_name_child = -+ if SetString.mem lib_name visited then -+ failwithf -+ (f_ "Library '%s' is involved in a cycle \ -+ with regard to findlib naming.") -+ lib_name; -+ let visited = SetString.add lib_name visited in -+ try -+ match MapString.find lib_name mp with -+ | `Solved fndlb_nm -> -+ fndlb_nm, mp -+ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> -+ let pre_fndlb_nm, mp = -+ solve visited mp lib_nm_parent lib_name -+ in -+ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in -+ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp -+ with Not_found -> -+ failwithf -+ (f_ "Library '%s', which is defined as the findlib parent of \ -+ library '%s', doesn't exist.") -+ lib_name lib_name_child -+ in -+ let mp = -+ MapString.fold -+ (fun lib_name status mp -> -+ match status with -+ | `Solved _ -> -+ (* Solved initialy, no need to go further *) -+ mp -+ | `Unsolved _ -> -+ let _, mp = solve SetString.empty mp lib_name "" in -+ mp) -+ fndlb_parts_of_lib_name -+ fndlb_parts_of_lib_name -+ in -+ MapString.map -+ (function -+ | `Solved fndlb_nm -> fndlb_nm -+ | `Unsolved _ -> assert false) -+ mp -+ in -+ -+ (* Convert an internal library name to a findlib name. *) -+ let findlib_name_of_library_name lib_nm = -+ try -+ MapString.find lib_nm fndlb_name_of_lib_name -+ with Not_found -> -+ raise (InternalLibraryNotFound lib_nm) -+ in -+ -+ (* Add a library to the tree. -+ *) -+ let add sct mp = -+ let fndlb_fullname = -+ let cs, _, _ = sct in -+ let lib_name = cs.cs_name in -+ findlib_name_of_library_name lib_name -+ in -+ let rec add_children nm_lst (children: tree MapString.t) = -+ match nm_lst with -+ | (hd :: tl) -> -+ begin -+ let node = -+ try -+ add_node tl (MapString.find hd children) -+ with Not_found -> -+ (* New node *) -+ new_node tl -+ in -+ MapString.add hd node children -+ end -+ | [] -> -+ (* Should not have a nameless library. *) -+ assert false -+ and add_node tl node = -+ if tl = [] then -+ begin -+ match node with -+ | Node (None, children) -> -+ Node (Some sct, children) -+ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> -+ (* TODO: allow to merge Package, i.e. -+ * archive(byte) = "foo.cma foo_init.cmo" -+ *) -+ let cs, _, _ = sct in -+ failwithf -+ (f_ "Library '%s' and '%s' have the same findlib name '%s'") -+ cs.cs_name cs'.cs_name fndlb_fullname -+ end -+ else -+ begin -+ match node with -+ | Leaf data -> -+ Node (Some data, add_children tl MapString.empty) -+ | Node (data_opt, children) -> -+ Node (data_opt, add_children tl children) -+ end -+ and new_node = -+ function -+ | [] -> -+ Leaf sct -+ | hd :: tl -> -+ Node (None, MapString.add hd (new_node tl) MapString.empty) -+ in -+ add_children (OASISString.nsplit fndlb_fullname '.') mp -+ in -+ -+ let rec group_of_tree mp = -+ MapString.fold -+ (fun nm node acc -> -+ let cur = -+ match node with -+ | Node (Some (cs, bs, lib), children) -> -+ Package (nm, cs, bs, lib, group_of_tree children) -+ | Node (None, children) -> -+ Container (nm, group_of_tree children) -+ | Leaf (cs, bs, lib) -> -+ Package (nm, cs, bs, lib, []) -+ in -+ cur :: acc) -+ mp [] -+ in -+ -+ let group_mp = -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, bs, lib) -> -+ add (cs, bs, `Library lib) mp -+ | Object (cs, bs, obj) -> -+ add (cs, bs, `Object obj) mp -+ | _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ let groups = -+ group_of_tree group_mp -+ in -+ -+ let library_name_of_findlib_name = -+ Lazy.lazy_from_fun -+ (fun () -> -+ (* Revert findlib_name_of_library_name. *) -+ MapString.fold -+ (fun k v mp -> MapString.add v k mp) -+ fndlb_name_of_lib_name -+ MapString.empty) -+ in -+ let library_name_of_findlib_name fndlb_nm = -+ try -+ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) -+ with Not_found -> -+ raise (FindlibPackageNotFound fndlb_nm) -+ in -+ -+ groups, -+ findlib_name_of_library_name, -+ library_name_of_findlib_name -+ -+ -+ let findlib_of_group = -+ function -+ | Container (fndlb_nm, _) -+ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm -+ -+ -+ let root_of_group grp = -+ let rec root_lib_aux = -+ (* We do a DFS in the group. *) -+ function -+ | Container (_, children) -> -+ List.fold_left -+ (fun res grp -> -+ if res = None then -+ root_lib_aux grp -+ else -+ res) -+ None -+ children -+ | Package (_, cs, bs, lib, _) -> -+ Some (cs, bs, lib) -+ in -+ match root_lib_aux grp with -+ | Some res -> -+ res -+ | None -> -+ failwithf -+ (f_ "Unable to determine root library of findlib library '%s'") -+ (findlib_of_group grp) -+ -+ -+end -+ -+module OASISFlag = struct -+(* # 22 "src/oasis/OASISFlag.ml" *) -+ -+ -+end -+ -+module OASISPackage = struct -+(* # 22 "src/oasis/OASISPackage.ml" *) -+ -+ -+end -+ -+module OASISSourceRepository = struct -+(* # 22 "src/oasis/OASISSourceRepository.ml" *) -+ -+ -+end -+ -+module OASISTest = struct -+(* # 22 "src/oasis/OASISTest.ml" *) -+ -+ -+end -+ -+module OASISDocument = struct -+(* # 22 "src/oasis/OASISDocument.ml" *) -+ -+ -+end -+ -+module OASISExec = struct -+(* # 22 "src/oasis/OASISExec.ml" *) -+ -+ -+ open OASISGettext -+ open OASISUtils -+ open OASISMessage -+ -+ -+ (* TODO: I don't like this quote, it is there because $(rm) foo expands to -+ * 'rm -f' foo... -+ *) -+ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = -+ let cmd = -+ if quote then -+ if Sys.os_type = "Win32" then -+ if String.contains cmd ' ' then -+ (* Double the 1st double quote... win32... sigh *) -+ "\""^(Filename.quote cmd) -+ else -+ cmd -+ else -+ Filename.quote cmd -+ else -+ cmd -+ in -+ let cmdline = -+ String.concat " " (cmd :: args) -+ in -+ info ~ctxt (f_ "Running command '%s'") cmdline; -+ match f_exit_code, Sys.command cmdline with -+ | None, 0 -> () -+ | None, i -> -+ failwithf -+ (f_ "Command '%s' terminated with error code %d") -+ cmdline i -+ | Some f, i -> -+ f i -+ -+ -+ let run_read_output ~ctxt ?f_exit_code cmd args = -+ let fn = -+ Filename.temp_file "oasis-" ".txt" -+ in -+ try -+ begin -+ let () = -+ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) -+ in -+ let chn = -+ open_in fn -+ in -+ let routput = -+ ref [] -+ in -+ begin -+ try -+ while true do -+ routput := (input_line chn) :: !routput -+ done -+ with End_of_file -> -+ () -+ end; -+ close_in chn; -+ Sys.remove fn; -+ List.rev !routput -+ end -+ with e -> -+ (try Sys.remove fn with _ -> ()); -+ raise e -+ -+ -+ let run_read_one_line ~ctxt ?f_exit_code cmd args = -+ match run_read_output ~ctxt ?f_exit_code cmd args with -+ | [fst] -> -+ fst -+ | lst -> -+ failwithf -+ (f_ "Command return unexpected output %S") -+ (String.concat "\n" lst) -+end -+ -+module OASISFileUtil = struct -+(* # 22 "src/oasis/OASISFileUtil.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ let file_exists_case fn = -+ let dirname = Filename.dirname fn in -+ let basename = Filename.basename fn in -+ if Sys.file_exists dirname then -+ if basename = Filename.current_dir_name then -+ true -+ else -+ List.mem -+ basename -+ (Array.to_list (Sys.readdir dirname)) -+ else -+ false -+ -+ -+ let find_file ?(case_sensitive=true) paths exts = -+ -+ (* Cardinal product of two list *) -+ let ( * ) lst1 lst2 = -+ List.flatten -+ (List.map -+ (fun a -> -+ List.map -+ (fun b -> a, b) -+ lst2) -+ lst1) -+ in -+ -+ let rec combined_paths lst = -+ match lst with -+ | p1 :: p2 :: tl -> -+ let acc = -+ (List.map -+ (fun (a, b) -> Filename.concat a b) -+ (p1 * p2)) -+ in -+ combined_paths (acc :: tl) -+ | [e] -> -+ e -+ | [] -> -+ [] -+ in -+ -+ let alternatives = -+ List.map -+ (fun (p, e) -> -+ if String.length e > 0 && e.[0] <> '.' then -+ p ^ "." ^ e -+ else -+ p ^ e) -+ ((combined_paths paths) * exts) -+ in -+ List.find (fun file -> -+ (if case_sensitive then -+ file_exists_case file -+ else -+ Sys.file_exists file) -+ && not (Sys.is_directory file) -+ ) alternatives -+ -+ -+ let which ~ctxt prg = -+ let path_sep = -+ match Sys.os_type with -+ | "Win32" -> -+ ';' -+ | _ -> -+ ':' -+ in -+ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in -+ let exec_ext = -+ match Sys.os_type with -+ | "Win32" -> -+ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) -+ | _ -> -+ [""] -+ in -+ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext -+ -+ -+ (**/**) -+ let rec fix_dir dn = -+ (* Windows hack because Sys.file_exists "src\\" = false when -+ * Sys.file_exists "src" = true -+ *) -+ let ln = -+ String.length dn -+ in -+ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then -+ fix_dir (String.sub dn 0 (ln - 1)) -+ else -+ dn -+ -+ -+ let q = Filename.quote -+ (**/**) -+ -+ -+ let cp ~ctxt ?(recurse=false) src tgt = -+ if recurse then -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt -+ "xcopy" [q src; q tgt; "/E"] -+ | _ -> -+ OASISExec.run ~ctxt -+ "cp" ["-r"; q src; q tgt] -+ else -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "copy" -+ | _ -> "cp") -+ [q src; q tgt] -+ -+ -+ let mkdir ~ctxt tgt = -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "md" -+ | _ -> "mkdir") -+ [q tgt] -+ -+ -+ let rec mkdir_parent ~ctxt f tgt = -+ let tgt = -+ fix_dir tgt -+ in -+ if Sys.file_exists tgt then -+ begin -+ if not (Sys.is_directory tgt) then -+ OASISUtils.failwithf -+ (f_ "Cannot create directory '%s', a file of the same name already \ -+ exists") -+ tgt -+ end -+ else -+ begin -+ mkdir_parent ~ctxt f (Filename.dirname tgt); -+ if not (Sys.file_exists tgt) then -+ begin -+ f tgt; -+ mkdir ~ctxt tgt -+ end -+ end -+ -+ -+ let rmdir ~ctxt tgt = -+ if Sys.readdir tgt = [||] then begin -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt "rd" [q tgt] -+ | _ -> -+ OASISExec.run ~ctxt "rm" ["-r"; q tgt] -+ end else begin -+ OASISMessage.error ~ctxt -+ (f_ "Cannot remove directory '%s': not empty.") -+ tgt -+ end -+ -+ -+ let glob ~ctxt fn = -+ let basename = -+ Filename.basename fn -+ in -+ if String.length basename >= 2 && -+ basename.[0] = '*' && -+ basename.[1] = '.' then -+ begin -+ let ext_len = -+ (String.length basename) - 2 -+ in -+ let ext = -+ String.sub basename 2 ext_len -+ in -+ let dirname = -+ Filename.dirname fn -+ in -+ Array.fold_left -+ (fun acc fn -> -+ try -+ let fn_ext = -+ String.sub -+ fn -+ ((String.length fn) - ext_len) -+ ext_len -+ in -+ if fn_ext = ext then -+ (Filename.concat dirname fn) :: acc -+ else -+ acc -+ with Invalid_argument _ -> -+ acc) -+ [] -+ (Sys.readdir dirname) -+ end -+ else -+ begin -+ if file_exists_case fn then -+ [fn] -+ else -+ [] -+ end -+end -+ -+ -+# 2878 "setup.ml" -+module BaseEnvLight = struct -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ -+ -+ module MapString = Map.Make(String) -+ -+ -+ type t = string MapString.t -+ -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 2983 "setup.ml" -+module BaseContext = struct -+(* # 22 "src/base/BaseContext.ml" *) -+ -+ (* TODO: get rid of this module. *) -+ open OASISContext -+ -+ -+ let args () = fst (fspecs ()) -+ -+ -+ let default = default -+ -+end -+ -+module BaseMessage = struct -+(* # 22 "src/base/BaseMessage.ml" *) -+ -+ -+ (** Message to user, overrid for Base -+ @author Sylvain Le Gall -+ *) -+ open OASISMessage -+ open BaseContext -+ -+ -+ let debug fmt = debug ~ctxt:!default fmt -+ -+ -+ let info fmt = info ~ctxt:!default fmt -+ -+ -+ let warning fmt = warning ~ctxt:!default fmt -+ -+ -+ let error fmt = error ~ctxt:!default fmt -+ -+end -+ -+module BaseEnv = struct -+(* # 22 "src/base/BaseEnv.ml" *) -+ -+ open OASISGettext -+ open OASISUtils -+ open PropList -+ -+ -+ module MapString = BaseEnvLight.MapString -+ -+ -+ type origin_t = -+ | ODefault -+ | OGetEnv -+ | OFileLoad -+ | OCommandLine -+ -+ -+ type cli_handle_t = -+ | CLINone -+ | CLIAuto -+ | CLIWith -+ | CLIEnable -+ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list -+ -+ -+ type definition_t = -+ { -+ hide: bool; -+ dump: bool; -+ cli: cli_handle_t; -+ arg_help: string option; -+ group: string option; -+ } -+ -+ -+ let schema = -+ Schema.create "environment" -+ -+ -+ (* Environment data *) -+ let env = -+ Data.create () -+ -+ -+ (* Environment data from file *) -+ let env_from_file = -+ ref MapString.empty -+ -+ -+ (* Lexer for var *) -+ let var_lxr = -+ Genlex.make_lexer [] -+ -+ -+ let rec var_expand str = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ (* TODO: this is a quick hack to allow calling Test.Command -+ * without defining executable name really. I.e. if there is -+ * an exec Executable toto, then $(toto) should be replace -+ * by its real name. It is however useful to have this function -+ * for other variable that depend on the host and should be -+ * written better than that. -+ *) -+ let st = -+ var_lxr (Stream.of_string var) -+ in -+ match Stream.npeek 3 st with -+ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> -+ OASISHostPath.of_unix (var_get nm) -+ | [Genlex.Ident "utoh"; Genlex.String s] -> -+ OASISHostPath.of_unix s -+ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> -+ String.escaped (var_get nm) -+ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> -+ String.escaped s -+ | [Genlex.Ident nm] -> -+ var_get nm -+ | _ -> -+ failwithf -+ (f_ "Unknown expression '%s' in variable expansion of %s.") -+ var -+ str -+ with -+ | Unknown_field (_, _) -> -+ failwithf -+ (f_ "No variable %s defined when trying to expand %S.") -+ var -+ str -+ | Stream.Error e -> -+ failwithf -+ (f_ "Syntax error when parsing '%s' when trying to \ -+ expand %S: %s") -+ var -+ str -+ e) -+ str; -+ Buffer.contents buff -+ -+ -+ and var_get name = -+ let vl = -+ try -+ Schema.get schema env name -+ with Unknown_field _ as e -> -+ begin -+ try -+ MapString.find name !env_from_file -+ with Not_found -> -+ raise e -+ end -+ in -+ var_expand vl -+ -+ -+ let var_choose ?printer ?name lst = -+ OASISExpr.choose -+ ?printer -+ ?name -+ var_get -+ lst -+ -+ -+ let var_protect vl = -+ let buff = -+ Buffer.create (String.length vl) -+ in -+ String.iter -+ (function -+ | '$' -> Buffer.add_string buff "\\$" -+ | c -> Buffer.add_char buff c) -+ vl; -+ Buffer.contents buff -+ -+ -+ let var_define -+ ?(hide=false) -+ ?(dump=true) -+ ?short_desc -+ ?(cli=CLINone) -+ ?arg_help -+ ?group -+ name (* TODO: type constraint on the fact that name must be a valid OCaml -+ id *) -+ dflt = -+ -+ let default = -+ [ -+ OFileLoad, (fun () -> MapString.find name !env_from_file); -+ ODefault, dflt; -+ OGetEnv, (fun () -> Sys.getenv name); -+ ] -+ in -+ -+ let extra = -+ { -+ hide = hide; -+ dump = dump; -+ cli = cli; -+ arg_help = arg_help; -+ group = group; -+ } -+ in -+ -+ (* Try to find a value that can be defined -+ *) -+ let var_get_low lst = -+ let errors, res = -+ List.fold_left -+ (fun (errors, res) (o, v) -> -+ if res = None then -+ begin -+ try -+ errors, Some (v ()) -+ with -+ | Not_found -> -+ errors, res -+ | Failure rsn -> -+ (rsn :: errors), res -+ | e -> -+ (Printexc.to_string e) :: errors, res -+ end -+ else -+ errors, res) -+ ([], None) -+ (List.sort -+ (fun (o1, _) (o2, _) -> -+ Pervasives.compare o2 o1) -+ lst) -+ in -+ match res, errors with -+ | Some v, _ -> -+ v -+ | None, [] -> -+ raise (Not_set (name, None)) -+ | None, lst -> -+ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) -+ in -+ -+ let help = -+ match short_desc with -+ | Some fs -> Some fs -+ | None -> None -+ in -+ -+ let var_get_lst = -+ FieldRO.create -+ ~schema -+ ~name -+ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) -+ ~print:var_get_low -+ ~default -+ ~update:(fun ?context x old_x -> x @ old_x) -+ ?help -+ extra -+ in -+ -+ fun () -> -+ var_expand (var_get_low (var_get_lst env)) -+ -+ -+ let var_redefine -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt = -+ if Schema.mem schema name then -+ begin -+ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) -+ Schema.set schema env ~context:ODefault name (dflt ()); -+ fun () -> var_get name -+ end -+ else -+ begin -+ var_define -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt -+ end -+ -+ -+ let var_ignore (e: unit -> string) = () -+ -+ -+ let print_hidden = -+ var_define -+ ~hide:true -+ ~dump:false -+ ~cli:CLIAuto -+ ~arg_help:"Print even non-printable variable. (debug)" -+ "print_hidden" -+ (fun () -> "false") -+ -+ -+ let var_all () = -+ List.rev -+ (Schema.fold -+ (fun acc nm def _ -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ nm :: acc -+ else -+ acc) -+ [] -+ schema) -+ -+ -+ let default_filename = -+ BaseEnvLight.default_filename -+ -+ -+ let load ?allow_empty ?filename () = -+ env_from_file := BaseEnvLight.load ?allow_empty ?filename () -+ -+ -+ let unload () = -+ env_from_file := MapString.empty; -+ Data.clear env -+ -+ -+ let dump ?(filename=default_filename) () = -+ let chn = -+ open_out_bin filename -+ in -+ let output nm value = -+ Printf.fprintf chn "%s=%S\n" nm value -+ in -+ let mp_todo = -+ (* Dump data from schema *) -+ Schema.fold -+ (fun mp_todo nm def _ -> -+ if def.dump then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ output nm value -+ with Not_set _ -> -+ () -+ end; -+ MapString.remove nm mp_todo) -+ !env_from_file -+ schema -+ in -+ (* Dump data defined outside of schema *) -+ MapString.iter output mp_todo; -+ -+ (* End of the dump *) -+ close_out chn -+ -+ -+ let print () = -+ let printable_vars = -+ Schema.fold -+ (fun acc nm def short_descr_opt -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ let txt = -+ match short_descr_opt with -+ | Some s -> s () -+ | None -> nm -+ in -+ (txt, value) :: acc -+ with Not_set _ -> -+ acc -+ end -+ else -+ acc) -+ [] -+ schema -+ in -+ let max_length = -+ List.fold_left max 0 -+ (List.rev_map String.length -+ (List.rev_map fst printable_vars)) -+ in -+ let dot_pad str = -+ String.make ((max_length - (String.length str)) + 3) '.' -+ in -+ -+ Printf.printf "\nConfiguration: \n"; -+ List.iter -+ (fun (name, value) -> -+ Printf.printf "%s: %s %s\n" name (dot_pad name) value) -+ (List.rev printable_vars); -+ Printf.printf "\n%!" -+ -+ -+ let args () = -+ let arg_concat = -+ OASISUtils.varname_concat ~hyphen:'-' -+ in -+ [ -+ "--override", -+ Arg.Tuple -+ ( -+ let rvr = ref "" -+ in -+ let rvl = ref "" -+ in -+ [ -+ Arg.Set_string rvr; -+ Arg.Set_string rvl; -+ Arg.Unit -+ (fun () -> -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ !rvr -+ !rvl) -+ ] -+ ), -+ "var+val Override any configuration variable."; -+ -+ ] -+ @ -+ List.flatten -+ (Schema.fold -+ (fun acc name def short_descr_opt -> -+ let var_set s = -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ name -+ s -+ in -+ -+ let arg_name = -+ OASISUtils.varname_of_string ~hyphen:'-' name -+ in -+ -+ let hlp = -+ match short_descr_opt with -+ | Some txt -> txt () -+ | None -> "" -+ in -+ -+ let arg_hlp = -+ match def.arg_help with -+ | Some s -> s -+ | None -> "str" -+ in -+ -+ let default_value = -+ try -+ Printf.sprintf -+ (f_ " [%s]") -+ (Schema.get -+ schema -+ env -+ name) -+ with Not_set _ -> -+ "" -+ in -+ -+ let args = -+ match def.cli with -+ | CLINone -> -+ [] -+ | CLIAuto -> -+ [ -+ arg_concat "--" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIWith -> -+ [ -+ arg_concat "--with-" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIEnable -> -+ let dflt = -+ if default_value = " [true]" then -+ s_ " [default: enabled]" -+ else -+ s_ " [default: disabled]" -+ in -+ [ -+ arg_concat "--enable-" arg_name, -+ Arg.Unit (fun () -> var_set "true"), -+ Printf.sprintf (f_ " %s%s") hlp dflt; -+ -+ arg_concat "--disable-" arg_name, -+ Arg.Unit (fun () -> var_set "false"), -+ Printf.sprintf (f_ " %s%s") hlp dflt -+ ] -+ | CLIUser lst -> -+ lst -+ in -+ args :: acc) -+ [] -+ schema) -+end -+ -+module BaseArgExt = struct -+(* # 22 "src/base/BaseArgExt.ml" *) -+ -+ -+ open OASISUtils -+ open OASISGettext -+ -+ -+ let parse argv args = -+ (* Simulate command line for Arg *) -+ let current = -+ ref 0 -+ in -+ -+ try -+ Arg.parse_argv -+ ~current:current -+ (Array.concat [[|"none"|]; argv]) -+ (Arg.align args) -+ (failwithf (f_ "Don't know what to do with arguments: '%s'")) -+ (s_ "configure options:") -+ with -+ | Arg.Help txt -> -+ print_endline txt; -+ exit 0 -+ | Arg.Bad txt -> -+ prerr_endline txt; -+ exit 1 -+end -+ -+module BaseCheck = struct -+(* # 22 "src/base/BaseCheck.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISUtils -+ open OASISGettext -+ -+ -+ let prog_best prg prg_lst = -+ var_redefine -+ prg -+ (fun () -> -+ let alternate = -+ List.fold_left -+ (fun res e -> -+ match res with -+ | Some _ -> -+ res -+ | None -> -+ try -+ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) -+ with Not_found -> -+ None) -+ None -+ prg_lst -+ in -+ match alternate with -+ | Some prg -> prg -+ | None -> raise Not_found) -+ -+ -+ let prog prg = -+ prog_best prg [prg] -+ -+ -+ let prog_opt prg = -+ prog_best prg [prg^".opt"; prg] -+ -+ -+ let ocamlfind = -+ prog "ocamlfind" -+ -+ -+ let version -+ var_prefix -+ cmp -+ fversion -+ () = -+ (* Really compare version provided *) -+ let var = -+ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) -+ in -+ var_redefine -+ ~hide:true -+ var -+ (fun () -> -+ let version_str = -+ match fversion () with -+ | "[Distributed with OCaml]" -> -+ begin -+ try -+ (var_get "ocaml_version") -+ with Not_found -> -+ warning -+ (f_ "Variable ocaml_version not defined, fallback \ -+ to default"); -+ Sys.ocaml_version -+ end -+ | res -> -+ res -+ in -+ let version = -+ OASISVersion.version_of_string version_str -+ in -+ if OASISVersion.comparator_apply version cmp then -+ version_str -+ else -+ failwithf -+ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") -+ var_prefix -+ (OASISVersion.string_of_comparator cmp) -+ version_str) -+ () -+ -+ -+ let package_version pkg = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%v"; pkg] -+ -+ -+ let package ?version_comparator pkg () = -+ let var = -+ OASISUtils.varname_concat -+ "pkg_" -+ (OASISUtils.varname_of_string pkg) -+ in -+ let findlib_dir pkg = -+ let dir = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%d"; pkg] -+ in -+ if Sys.file_exists dir && Sys.is_directory dir then -+ dir -+ else -+ failwithf -+ (f_ "When looking for findlib package %s, \ -+ directory %s return doesn't exist") -+ pkg dir -+ in -+ let vl = -+ var_redefine -+ var -+ (fun () -> findlib_dir pkg) -+ () -+ in -+ ( -+ match version_comparator with -+ | Some ver_cmp -> -+ ignore -+ (version -+ var -+ ver_cmp -+ (fun _ -> package_version pkg) -+ ()) -+ | None -> -+ () -+ ); -+ vl -+end -+ -+module BaseOCamlcConfig = struct -+(* # 22 "src/base/BaseOCamlcConfig.ml" *) -+ -+ -+ open BaseEnv -+ open OASISUtils -+ open OASISGettext -+ -+ -+ module SMap = Map.Make(String) -+ -+ -+ let ocamlc = -+ BaseCheck.prog_opt "ocamlc" -+ -+ -+ let ocamlc_config_map = -+ (* Map name to value for ocamlc -config output -+ (name ^": "^value) -+ *) -+ let rec split_field mp lst = -+ match lst with -+ | line :: tl -> -+ let mp = -+ try -+ let pos_semicolon = -+ String.index line ':' -+ in -+ if pos_semicolon > 1 then -+ ( -+ let name = -+ String.sub line 0 pos_semicolon -+ in -+ let linelen = -+ String.length line -+ in -+ let value = -+ if linelen > pos_semicolon + 2 then -+ String.sub -+ line -+ (pos_semicolon + 2) -+ (linelen - pos_semicolon - 2) -+ else -+ "" -+ in -+ SMap.add name value mp -+ ) -+ else -+ ( -+ mp -+ ) -+ with Not_found -> -+ ( -+ mp -+ ) -+ in -+ split_field mp tl -+ | [] -> -+ mp -+ in -+ -+ let cache = -+ lazy -+ (var_protect -+ (Marshal.to_string -+ (split_field -+ SMap.empty -+ (OASISExec.run_read_output -+ ~ctxt:!BaseContext.default -+ (ocamlc ()) ["-config"])) -+ [])) -+ in -+ var_redefine -+ "ocamlc_config_map" -+ ~hide:true -+ ~dump:false -+ (fun () -> -+ (* TODO: update if ocamlc change !!! *) -+ Lazy.force cache) -+ -+ -+ let var_define nm = -+ (* Extract data from ocamlc -config *) -+ let avlbl_config_get () = -+ Marshal.from_string -+ (ocamlc_config_map ()) -+ 0 -+ in -+ let chop_version_suffix s = -+ try -+ String.sub s 0 (String.index s '+') -+ with _ -> -+ s -+ in -+ -+ let nm_config, value_config = -+ match nm with -+ | "ocaml_version" -> -+ "version", chop_version_suffix -+ | _ -> nm, (fun x -> x) -+ in -+ var_redefine -+ nm -+ (fun () -> -+ try -+ let map = -+ avlbl_config_get () -+ in -+ let value = -+ SMap.find nm_config map -+ in -+ value_config value -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find field '%s' in '%s -config' output") -+ nm -+ (ocamlc ())) -+ -+end -+ -+module BaseStandardVar = struct -+(* # 22 "src/base/BaseStandardVar.ml" *) -+ -+ -+ open OASISGettext -+ open OASISTypes -+ open OASISExpr -+ open BaseCheck -+ open BaseEnv -+ -+ -+ let ocamlfind = BaseCheck.ocamlfind -+ let ocamlc = BaseOCamlcConfig.ocamlc -+ let ocamlopt = prog_opt "ocamlopt" -+ let ocamlbuild = prog "ocamlbuild" -+ -+ -+ (**/**) -+ let rpkg = -+ ref None -+ -+ -+ let pkg_get () = -+ match !rpkg with -+ | Some pkg -> pkg -+ | None -> failwith (s_ "OASIS Package is not set") -+ -+ -+ let var_cond = ref [] -+ -+ -+ let var_define_cond ~since_version f dflt = -+ let holder = ref (fun () -> dflt) in -+ let since_version = -+ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) -+ in -+ var_cond := -+ (fun ver -> -+ if OASISVersion.comparator_apply ver since_version then -+ holder := f ()) :: !var_cond; -+ fun () -> !holder () -+ -+ -+ (**/**) -+ -+ -+ let pkg_name = -+ var_define -+ ~short_desc:(fun () -> s_ "Package name") -+ "pkg_name" -+ (fun () -> (pkg_get ()).name) -+ -+ -+ let pkg_version = -+ var_define -+ ~short_desc:(fun () -> s_ "Package version") -+ "pkg_version" -+ (fun () -> -+ (OASISVersion.string_of_version (pkg_get ()).version)) -+ -+ -+ let c = BaseOCamlcConfig.var_define -+ -+ -+ let os_type = c "os_type" -+ let system = c "system" -+ let architecture = c "architecture" -+ let ccomp_type = c "ccomp_type" -+ let ocaml_version = c "ocaml_version" -+ -+ -+ (* TODO: Check standard variable presence at runtime *) -+ -+ -+ let standard_library_default = c "standard_library_default" -+ let standard_library = c "standard_library" -+ let standard_runtime = c "standard_runtime" -+ let bytecomp_c_compiler = c "bytecomp_c_compiler" -+ let native_c_compiler = c "native_c_compiler" -+ let model = c "model" -+ let ext_obj = c "ext_obj" -+ let ext_asm = c "ext_asm" -+ let ext_lib = c "ext_lib" -+ let ext_dll = c "ext_dll" -+ let default_executable_name = c "default_executable_name" -+ let systhread_supported = c "systhread_supported" -+ -+ -+ let flexlink = -+ BaseCheck.prog "flexlink" -+ -+ -+ let flexdll_version = -+ var_define -+ ~short_desc:(fun () -> "FlexDLL version (Win32)") -+ "flexdll_version" -+ (fun () -> -+ let lst = -+ OASISExec.run_read_output ~ctxt:!BaseContext.default -+ (flexlink ()) ["-help"] -+ in -+ match lst with -+ | line :: _ -> -+ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) -+ | [] -> -+ raise Not_found) -+ -+ -+ (**/**) -+ let p name hlp dflt = -+ var_define -+ ~short_desc:hlp -+ ~cli:CLIAuto -+ ~arg_help:"dir" -+ name -+ dflt -+ -+ -+ let (/) a b = -+ if os_type () = Sys.os_type then -+ Filename.concat a b -+ else if os_type () = "Unix" then -+ OASISUnixPath.concat a b -+ else -+ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") -+ (os_type ()) -+ (**/**) -+ -+ -+ let prefix = -+ p "prefix" -+ (fun () -> s_ "Install architecture-independent files dir") -+ (fun () -> -+ match os_type () with -+ | "Win32" -> -+ let program_files = -+ Sys.getenv "PROGRAMFILES" -+ in -+ program_files/(pkg_name ()) -+ | _ -> -+ "/usr/local") -+ -+ -+ let exec_prefix = -+ p "exec_prefix" -+ (fun () -> s_ "Install architecture-dependent files in dir") -+ (fun () -> "$prefix") -+ -+ -+ let bindir = -+ p "bindir" -+ (fun () -> s_ "User executables") -+ (fun () -> "$exec_prefix"/"bin") -+ -+ -+ let sbindir = -+ p "sbindir" -+ (fun () -> s_ "System admin executables") -+ (fun () -> "$exec_prefix"/"sbin") -+ -+ -+ let libexecdir = -+ p "libexecdir" -+ (fun () -> s_ "Program executables") -+ (fun () -> "$exec_prefix"/"libexec") -+ -+ -+ let sysconfdir = -+ p "sysconfdir" -+ (fun () -> s_ "Read-only single-machine data") -+ (fun () -> "$prefix"/"etc") -+ -+ -+ let sharedstatedir = -+ p "sharedstatedir" -+ (fun () -> s_ "Modifiable architecture-independent data") -+ (fun () -> "$prefix"/"com") -+ -+ -+ let localstatedir = -+ p "localstatedir" -+ (fun () -> s_ "Modifiable single-machine data") -+ (fun () -> "$prefix"/"var") -+ -+ -+ let libdir = -+ p "libdir" -+ (fun () -> s_ "Object code libraries") -+ (fun () -> "$exec_prefix"/"lib") -+ -+ -+ let datarootdir = -+ p "datarootdir" -+ (fun () -> s_ "Read-only arch-independent data root") -+ (fun () -> "$prefix"/"share") -+ -+ -+ let datadir = -+ p "datadir" -+ (fun () -> s_ "Read-only architecture-independent data") -+ (fun () -> "$datarootdir") -+ -+ -+ let infodir = -+ p "infodir" -+ (fun () -> s_ "Info documentation") -+ (fun () -> "$datarootdir"/"info") -+ -+ -+ let localedir = -+ p "localedir" -+ (fun () -> s_ "Locale-dependent data") -+ (fun () -> "$datarootdir"/"locale") -+ -+ -+ let mandir = -+ p "mandir" -+ (fun () -> s_ "Man documentation") -+ (fun () -> "$datarootdir"/"man") -+ -+ -+ let docdir = -+ p "docdir" -+ (fun () -> s_ "Documentation root") -+ (fun () -> "$datarootdir"/"doc"/"$pkg_name") -+ -+ -+ let htmldir = -+ p "htmldir" -+ (fun () -> s_ "HTML documentation") -+ (fun () -> "$docdir") -+ -+ -+ let dvidir = -+ p "dvidir" -+ (fun () -> s_ "DVI documentation") -+ (fun () -> "$docdir") -+ -+ -+ let pdfdir = -+ p "pdfdir" -+ (fun () -> s_ "PDF documentation") -+ (fun () -> "$docdir") -+ -+ -+ let psdir = -+ p "psdir" -+ (fun () -> s_ "PS documentation") -+ (fun () -> "$docdir") -+ -+ -+ let destdir = -+ p "destdir" -+ (fun () -> s_ "Prepend a path when installing package") -+ (fun () -> -+ raise -+ (PropList.Not_set -+ ("destdir", -+ Some (s_ "undefined by construct")))) -+ -+ -+ let findlib_version = -+ var_define -+ "findlib_version" -+ (fun () -> -+ BaseCheck.package_version "findlib") -+ -+ -+ let is_native = -+ var_define -+ "is_native" -+ (fun () -> -+ try -+ let _s: string = -+ ocamlopt () -+ in -+ "true" -+ with PropList.Not_set _ -> -+ let _s: string = -+ ocamlc () -+ in -+ "false") -+ -+ -+ let ext_program = -+ var_define -+ "suffix_program" -+ (fun () -> -+ match os_type () with -+ | "Win32" | "Cygwin" -> ".exe" -+ | _ -> "") -+ -+ -+ let rm = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a file.") -+ "rm" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "del" -+ | _ -> "rm -f") -+ -+ -+ let rmdir = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a directory.") -+ "rmdir" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "rd" -+ | _ -> "rm -rf") -+ -+ -+ let debug = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") -+ ~cli:CLIEnable -+ "debug" -+ (fun () -> "true") -+ -+ -+ let profile = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") -+ ~cli:CLIEnable -+ "profile" -+ (fun () -> "false") -+ -+ -+ let tests = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> -+ s_ "Compile tests executable and library and run them") -+ ~cli:CLIEnable -+ "tests" -+ (fun () -> "false")) -+ "true" -+ -+ -+ let docs = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> s_ "Create documentations") -+ ~cli:CLIEnable -+ "docs" -+ (fun () -> "true")) -+ "true" -+ -+ -+ let native_dynlink = -+ var_define -+ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") -+ ~cli:CLINone -+ "native_dynlink" -+ (fun () -> -+ let res = -+ let ocaml_lt_312 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (ocaml_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "3.12.0")) -+ in -+ let flexdll_lt_030 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (flexdll_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "0.30")) -+ in -+ let has_native_dynlink = -+ let ocamlfind = ocamlfind () in -+ try -+ let fn = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ocamlfind -+ ["query"; "-predicates"; "native"; "dynlink"; -+ "-format"; "%d/%a"] -+ in -+ Sys.file_exists fn -+ with _ -> -+ false -+ in -+ if not has_native_dynlink then -+ false -+ else if ocaml_lt_312 () then -+ false -+ else if (os_type () = "Win32" || os_type () = "Cygwin") -+ && flexdll_lt_030 () then -+ begin -+ BaseMessage.warning -+ (f_ ".cmxs generation disabled because FlexDLL needs to be \ -+ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") -+ (flexdll_version ()); -+ false -+ end -+ else -+ true -+ in -+ string_of_bool res) -+ -+ -+ let init pkg = -+ rpkg := Some pkg; -+ List.iter (fun f -> f pkg.oasis_version) !var_cond -+ -+end -+ -+module BaseFileAB = struct -+(* # 22 "src/base/BaseFileAB.ml" *) -+ -+ -+ open BaseEnv -+ open OASISGettext -+ open BaseMessage -+ -+ -+ let to_filename fn = -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ if not (Filename.check_suffix fn ".ab") then -+ warning -+ (f_ "File '%s' doesn't have '.ab' extension") -+ fn; -+ Filename.chop_extension fn -+ -+ -+ let replace fn_lst = -+ let buff = -+ Buffer.create 13 -+ in -+ List.iter -+ (fun fn -> -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ let chn_in = -+ open_in fn -+ in -+ let chn_out = -+ open_out (to_filename fn) -+ in -+ ( -+ try -+ while true do -+ Buffer.add_string buff (var_expand (input_line chn_in)); -+ Buffer.add_char buff '\n' -+ done -+ with End_of_file -> -+ () -+ ); -+ Buffer.output_buffer chn_out buff; -+ Buffer.clear buff; -+ close_in chn_in; -+ close_out chn_out) -+ fn_lst -+end -+ -+module BaseLog = struct -+(* # 22 "src/base/BaseLog.ml" *) -+ -+ -+ open OASISUtils -+ -+ -+ let default_filename = -+ Filename.concat -+ (Filename.dirname BaseEnv.default_filename) -+ "setup.log" -+ -+ -+ module SetTupleString = -+ Set.Make -+ (struct -+ type t = string * string -+ let compare (s11, s12) (s21, s22) = -+ match String.compare s11 s21 with -+ | 0 -> String.compare s12 s22 -+ | n -> n -+ end) -+ -+ -+ let load () = -+ if Sys.file_exists default_filename then -+ begin -+ let chn = -+ open_in default_filename -+ in -+ let scbuf = -+ Scanf.Scanning.from_file default_filename -+ in -+ let rec read_aux (st, lst) = -+ if not (Scanf.Scanning.end_of_input scbuf) then -+ begin -+ let acc = -+ try -+ Scanf.bscanf scbuf "%S %S\n" -+ (fun e d -> -+ let t = -+ e, d -+ in -+ if SetTupleString.mem t st then -+ st, lst -+ else -+ SetTupleString.add t st, -+ t :: lst) -+ with Scanf.Scan_failure _ -> -+ failwith -+ (Scanf.bscanf scbuf -+ "%l" -+ (fun line -> -+ Printf.sprintf -+ "Malformed log file '%s' at line %d" -+ default_filename -+ line)) -+ in -+ read_aux acc -+ end -+ else -+ begin -+ close_in chn; -+ List.rev lst -+ end -+ in -+ read_aux (SetTupleString.empty, []) -+ end -+ else -+ begin -+ [] -+ end -+ -+ -+ let register event data = -+ let chn_out = -+ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename -+ in -+ Printf.fprintf chn_out "%S %S\n" event data; -+ close_out chn_out -+ -+ -+ let unregister event data = -+ if Sys.file_exists default_filename then -+ begin -+ let lst = -+ load () -+ in -+ let chn_out = -+ open_out default_filename -+ in -+ let write_something = -+ ref false -+ in -+ List.iter -+ (fun (e, d) -> -+ if e <> event || d <> data then -+ begin -+ write_something := true; -+ Printf.fprintf chn_out "%S %S\n" e d -+ end) -+ lst; -+ close_out chn_out; -+ if not !write_something then -+ Sys.remove default_filename -+ end -+ -+ -+ let filter events = -+ let st_events = -+ List.fold_left -+ (fun st e -> -+ SetString.add e st) -+ SetString.empty -+ events -+ in -+ List.filter -+ (fun (e, _) -> SetString.mem e st_events) -+ (load ()) -+ -+ -+ let exists event data = -+ List.exists -+ (fun v -> (event, data) = v) -+ (load ()) -+end -+ -+module BaseBuilt = struct -+(* # 22 "src/base/BaseBuilt.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseStandardVar -+ open BaseMessage -+ -+ -+ type t = -+ | BExec (* Executable *) -+ | BExecLib (* Library coming with executable *) -+ | BLib (* Library *) -+ | BObj (* Library *) -+ | BDoc (* Document *) -+ -+ -+ let to_log_event_file t nm = -+ "built_"^ -+ (match t with -+ | BExec -> "exec" -+ | BExecLib -> "exec_lib" -+ | BLib -> "lib" -+ | BObj -> "obj" -+ | BDoc -> "doc")^ -+ "_"^nm -+ -+ -+ let to_log_event_done t nm = -+ "is_"^(to_log_event_file t nm) -+ -+ -+ let register t nm lst = -+ BaseLog.register -+ (to_log_event_done t nm) -+ "true"; -+ List.iter -+ (fun alt -> -+ let registered = -+ List.fold_left -+ (fun registered fn -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ BaseLog.register -+ (to_log_event_file t nm) -+ (if Filename.is_relative fn then -+ Filename.concat (Sys.getcwd ()) fn -+ else -+ fn); -+ true -+ end -+ else -+ registered) -+ false -+ alt -+ in -+ if not registered then -+ warning -+ (f_ "Cannot find an existing alternative files among: %s") -+ (String.concat (s_ ", ") alt)) -+ lst -+ -+ -+ let unregister t nm = -+ List.iter -+ (fun (e, d) -> -+ BaseLog.unregister e d) -+ (BaseLog.filter -+ [to_log_event_file t nm; -+ to_log_event_done t nm]) -+ -+ -+ let fold t nm f acc = -+ List.fold_left -+ (fun acc (_, fn) -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ f acc fn -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' has been marked as built \ -+ for %s but doesn't exist") -+ fn -+ (Printf.sprintf -+ (match t with -+ | BExec | BExecLib -> -+ (f_ "executable %s") -+ | BLib -> -+ (f_ "library %s") -+ | BObj -> -+ (f_ "object %s") -+ | BDoc -> -+ (f_ "documentation %s")) -+ nm); -+ acc -+ end) -+ acc -+ (BaseLog.filter -+ [to_log_event_file t nm]) -+ -+ -+ let is_built t nm = -+ List.fold_left -+ (fun is_built (_, d) -> -+ (try -+ bool_of_string d -+ with _ -> -+ false)) -+ false -+ (BaseLog.filter -+ [to_log_event_done t nm]) -+ -+ -+ let of_executable ffn (cs, bs, exec) = -+ let unix_exec_is, unix_dll_opt = -+ OASISExecutable.unix_exec_is -+ (cs, bs, exec) -+ (fun () -> -+ bool_of_string -+ (is_native ())) -+ ext_dll -+ ext_program -+ in -+ let evs = -+ (BExec, cs.cs_name, [[ffn unix_exec_is]]) -+ :: -+ (match unix_dll_opt with -+ | Some fn -> -+ [BExecLib, cs.cs_name, [[ffn fn]]] -+ | None -> -+ []) -+ in -+ evs, -+ unix_exec_is, -+ unix_dll_opt -+ -+ -+ let of_library ffn (cs, bs, lib) = -+ let unix_lst = -+ OASISLibrary.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ ~has_native_dynlink:(bool_of_string (native_dynlink ())) -+ ~ext_lib:(ext_lib ()) -+ ~ext_dll:(ext_dll ()) -+ (cs, bs, lib) -+ in -+ let evs = -+ [BLib, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ -+ -+ let of_object ffn (cs, bs, obj) = -+ let unix_lst = -+ OASISObject.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ (cs, bs, obj) -+ in -+ let evs = -+ [BObj, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ -+end -+ -+module BaseCustom = struct -+(* # 22 "src/base/BaseCustom.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let run cmd args extra_args = -+ OASISExec.run ~ctxt:!BaseContext.default ~quote:false -+ (var_expand cmd) -+ (List.map -+ var_expand -+ (args @ (Array.to_list extra_args))) -+ -+ -+ let hook ?(failsafe=false) cstm f e = -+ let optional_command lst = -+ let printer = -+ function -+ | Some (cmd, args) -> String.concat " " (cmd :: args) -+ | None -> s_ "No command" -+ in -+ match -+ var_choose -+ ~name:(s_ "Pre/Post Command") -+ ~printer -+ lst with -+ | Some (cmd, args) -> -+ begin -+ try -+ run cmd args [||] -+ with e when failsafe -> -+ warning -+ (f_ "Command '%s' fail with error: %s") -+ (String.concat " " (cmd :: args)) -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ end -+ | None -> -+ () -+ in -+ let res = -+ optional_command cstm.pre_command; -+ f e -+ in -+ optional_command cstm.post_command; -+ res -+end -+ -+module BaseDynVar = struct -+(* # 22 "src/base/BaseDynVar.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseEnv -+ open BaseBuilt -+ -+ -+ let init pkg = -+ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) -+ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) -+ List.iter -+ (function -+ | Executable (cs, bs, exec) -> -+ if var_choose bs.bs_build then -+ var_ignore -+ (var_redefine -+ (* We don't save this variable *) -+ ~dump:false -+ ~short_desc:(fun () -> -+ Printf.sprintf -+ (f_ "Filename of executable '%s'") -+ cs.cs_name) -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ let fn_opt = -+ fold -+ BExec cs.cs_name -+ (fun _ fn -> Some fn) -+ None -+ in -+ match fn_opt with -+ | Some fn -> fn -+ | None -> -+ raise -+ (PropList.Not_set -+ (cs.cs_name, -+ Some (Printf.sprintf -+ (f_ "Executable '%s' not yet built.") -+ cs.cs_name))))) -+ -+ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> -+ ()) -+ pkg.sections -+end -+ -+module BaseTest = struct -+(* # 22 "src/base/BaseTest.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISExpr -+ open OASISGettext -+ -+ -+ let test lst pkg extra_args = -+ -+ let one_test (failure, n) (test_plugin, cs, test) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "test %s run") -+ cs.cs_name) -+ ~printer:string_of_bool -+ test.test_run then -+ begin -+ let () = -+ info (f_ "Running test '%s'") cs.cs_name -+ in -+ let back_cwd = -+ match test.test_working_directory with -+ | Some dir -> -+ let cwd = -+ Sys.getcwd () -+ in -+ let chdir d = -+ info (f_ "Changing directory to '%s'") d; -+ Sys.chdir d -+ in -+ chdir dir; -+ fun () -> chdir cwd -+ -+ | None -> -+ fun () -> () -+ in -+ try -+ let failure_percent = -+ BaseCustom.hook -+ test.test_custom -+ (test_plugin pkg (cs, test)) -+ extra_args -+ in -+ back_cwd (); -+ (failure_percent +. failure, n + 1) -+ with e -> -+ begin -+ back_cwd (); -+ raise e -+ end -+ end -+ else -+ begin -+ info (f_ "Skipping test '%s'") cs.cs_name; -+ (failure, n) -+ end -+ in -+ let failed, n = -+ List.fold_left -+ one_test -+ (0.0, 0) -+ lst -+ in -+ let failure_percent = -+ if n = 0 then -+ 0.0 -+ else -+ failed /. (float_of_int n) -+ in -+ let msg = -+ Printf.sprintf -+ (f_ "Tests had a %.2f%% failure rate") -+ (100. *. failure_percent) -+ in -+ if failure_percent > 0.0 then -+ failwith msg -+ else -+ info "%s" msg; -+ -+ (* Possible explanation why the tests where not run. *) -+ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && -+ not (bool_of_string (BaseStandardVar.tests ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Tests are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-tests'" -+end -+ -+module BaseDoc = struct -+(* # 22 "src/base/BaseDoc.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let doc lst pkg extra_args = -+ -+ let one_doc (doc_plugin, cs, doc) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "documentation %s build") -+ cs.cs_name) -+ ~printer:string_of_bool -+ doc.doc_build then -+ begin -+ info (f_ "Building documentation '%s'") cs.cs_name; -+ BaseCustom.hook -+ doc.doc_custom -+ (doc_plugin pkg (cs, doc)) -+ extra_args -+ end -+ in -+ List.iter one_doc lst; -+ -+ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && -+ not (bool_of_string (BaseStandardVar.docs ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Docs are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-docs'" -+end -+ -+module BaseSetup = struct -+(* # 22 "src/base/BaseSetup.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISSection -+ open OASISGettext -+ open OASISUtils -+ -+ -+ type std_args_fun = -+ package -> string array -> unit -+ -+ -+ type ('a, 'b) section_args_fun = -+ name * (package -> (common_section * 'a) -> string array -> 'b) -+ -+ -+ type t = -+ { -+ configure: std_args_fun; -+ build: std_args_fun; -+ doc: ((doc, unit) section_args_fun) list; -+ test: ((test, float) section_args_fun) list; -+ install: std_args_fun; -+ uninstall: std_args_fun; -+ clean: std_args_fun list; -+ clean_doc: (doc, unit) section_args_fun list; -+ clean_test: (test, unit) section_args_fun list; -+ distclean: std_args_fun list; -+ distclean_doc: (doc, unit) section_args_fun list; -+ distclean_test: (test, unit) section_args_fun list; -+ package: package; -+ oasis_fn: string option; -+ oasis_version: string; -+ oasis_digest: Digest.t option; -+ oasis_exec: string option; -+ oasis_setup_args: string list; -+ setup_update: bool; -+ } -+ -+ -+ (* Associate a plugin function with data from package *) -+ let join_plugin_sections filter_map lst = -+ List.rev -+ (List.fold_left -+ (fun acc sct -> -+ match filter_map sct with -+ | Some e -> -+ e :: acc -+ | None -> -+ acc) -+ [] -+ lst) -+ -+ -+ (* Search for plugin data associated with a section name *) -+ let lookup_plugin_section plugin action nm lst = -+ try -+ List.assoc nm lst -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find plugin %s matching section %s for %s action") -+ plugin -+ nm -+ action -+ -+ -+ let configure t args = -+ (* Run configure *) -+ BaseCustom.hook -+ t.package.conf_custom -+ (fun () -> -+ (* Reload if preconf has changed it *) -+ begin -+ try -+ unload (); -+ load (); -+ with _ -> -+ () -+ end; -+ -+ (* Run plugin's configure *) -+ t.configure t.package args; -+ -+ (* Dump to allow postconf to change it *) -+ dump ()) -+ (); -+ -+ (* Reload environment *) -+ unload (); -+ load (); -+ -+ (* Save environment *) -+ print (); -+ -+ (* Replace data in file *) -+ BaseFileAB.replace t.package.files_ab -+ -+ -+ let build t args = -+ BaseCustom.hook -+ t.package.build_custom -+ (t.build t.package) -+ args -+ -+ -+ let doc t args = -+ BaseDoc.doc -+ (join_plugin_sections -+ (function -+ | Doc (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "documentation" -+ (s_ "build") -+ cs.cs_name -+ t.doc, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ -+ let test t args = -+ BaseTest.test -+ (join_plugin_sections -+ (function -+ | Test (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "test" -+ (s_ "run") -+ cs.cs_name -+ t.test, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ -+ let all t args = -+ let rno_doc = -+ ref false -+ in -+ let rno_test = -+ ref false -+ in -+ let arg_rest = -+ ref [] -+ in -+ Arg.parse_argv -+ ~current:(ref 0) -+ (Array.of_list -+ ((Sys.executable_name^" all") :: -+ (Array.to_list args))) -+ [ -+ "-no-doc", -+ Arg.Set rno_doc, -+ s_ "Don't run doc target"; -+ -+ "-no-test", -+ Arg.Set rno_test, -+ s_ "Don't run test target"; -+ -+ "--", -+ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), -+ s_ "All arguments for configure."; -+ ] -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ ""; -+ -+ info "Running configure step"; -+ configure t (Array.of_list (List.rev !arg_rest)); -+ -+ info "Running build step"; -+ build t [||]; -+ -+ (* Load setup.log dynamic variables *) -+ BaseDynVar.init t.package; -+ -+ if not !rno_doc then -+ begin -+ info "Running doc step"; -+ doc t [||]; -+ end -+ else -+ begin -+ info "Skipping doc step" -+ end; -+ -+ if not !rno_test then -+ begin -+ info "Running test step"; -+ test t [||] -+ end -+ else -+ begin -+ info "Skipping test step" -+ end -+ -+ -+ let install t args = -+ BaseCustom.hook -+ t.package.install_custom -+ (t.install t.package) -+ args -+ -+ -+ let uninstall t args = -+ BaseCustom.hook -+ t.package.uninstall_custom -+ (t.uninstall t.package) -+ args -+ -+ -+ let reinstall t args = -+ uninstall t args; -+ install t args -+ -+ -+ let clean, distclean = -+ let failsafe f a = -+ try -+ f a -+ with e -> -+ warning -+ (f_ "Action fail with error: %s") -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ in -+ -+ let generic_clean t cstm mains docs tests args = -+ BaseCustom.hook -+ ~failsafe:true -+ cstm -+ (fun () -> -+ (* Clean section *) -+ List.iter -+ (function -+ | Test (cs, test) -> -+ let f = -+ try -+ List.assoc cs.cs_name tests -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, test)) -+ args -+ | Doc (cs, doc) -> -+ let f = -+ try -+ List.assoc cs.cs_name docs -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, doc)) -+ args -+ | Library _ -+ | Object _ -+ | Executable _ -+ | Flag _ -+ | SrcRepo _ -> -+ ()) -+ t.package.sections; -+ (* Clean whole package *) -+ List.iter -+ (fun f -> -+ failsafe -+ (f t.package) -+ args) -+ mains) -+ () -+ in -+ -+ let clean t args = -+ generic_clean -+ t -+ t.package.clean_custom -+ t.clean -+ t.clean_doc -+ t.clean_test -+ args -+ in -+ -+ let distclean t args = -+ (* Call clean *) -+ clean t args; -+ -+ (* Call distclean code *) -+ generic_clean -+ t -+ t.package.distclean_custom -+ t.distclean -+ t.distclean_doc -+ t.distclean_test -+ args; -+ -+ (* Remove generated file *) -+ List.iter -+ (fun fn -> -+ if Sys.file_exists fn then -+ begin -+ info (f_ "Remove '%s'") fn; -+ Sys.remove fn -+ end) -+ (BaseEnv.default_filename -+ :: -+ BaseLog.default_filename -+ :: -+ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) -+ in -+ -+ clean, distclean -+ -+ -+ let version t _ = -+ print_endline t.oasis_version -+ -+ -+ let update_setup_ml, no_update_setup_ml_cli = -+ let b = ref true in -+ b, -+ ("-no-update-setup-ml", -+ Arg.Clear b, -+ s_ " Don't try to update setup.ml, even if _oasis has changed.") -+ -+ -+ let default_oasis_fn = "_oasis" -+ -+ -+ let update_setup_ml t = -+ let oasis_fn = -+ match t.oasis_fn with -+ | Some fn -> fn -+ | None -> default_oasis_fn -+ in -+ let oasis_exec = -+ match t.oasis_exec with -+ | Some fn -> fn -+ | None -> "oasis" -+ in -+ let ocaml = -+ Sys.executable_name -+ in -+ let setup_ml, args = -+ match Array.to_list Sys.argv with -+ | setup_ml :: args -> -+ setup_ml, args -+ | [] -> -+ failwith -+ (s_ "Expecting non-empty command line arguments.") -+ in -+ let ocaml, setup_ml = -+ if Sys.executable_name = Sys.argv.(0) then -+ (* We are not running in standard mode, probably the script -+ * is precompiled. -+ *) -+ "ocaml", "setup.ml" -+ else -+ ocaml, setup_ml -+ in -+ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in -+ let do_update () = -+ let oasis_exec_version = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | 1 -> -+ failwithf -+ (f_ "Executable '%s' is probably an old version \ -+ of oasis (< 0.3.0), please update to version \ -+ v%s.") -+ oasis_exec t.oasis_version -+ | 127 -> -+ failwithf -+ (f_ "Cannot find executable '%s', please install \ -+ oasis v%s.") -+ oasis_exec t.oasis_version -+ | n -> -+ failwithf -+ (f_ "Command '%s version' exited with code %d.") -+ oasis_exec n) -+ oasis_exec ["version"] -+ in -+ if OASISVersion.comparator_apply -+ (OASISVersion.version_of_string oasis_exec_version) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string t.oasis_version)) then -+ begin -+ (* We have a version >= for the executable oasis, proceed with -+ * update. -+ *) -+ (* TODO: delegate this check to 'oasis setup'. *) -+ if Sys.os_type = "Win32" then -+ failwithf -+ (f_ "It is not possible to update the running script \ -+ setup.ml on Windows. Please update setup.ml by \ -+ running '%s'.") -+ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) -+ else -+ begin -+ OASISExec.run -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | n -> -+ failwithf -+ (f_ "Unable to update setup.ml using '%s', \ -+ please fix the problem and retry.") -+ oasis_exec) -+ oasis_exec ("setup" :: t.oasis_setup_args); -+ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) -+ end -+ end -+ else -+ failwithf -+ (f_ "The version of '%s' (v%s) doesn't match the version of \ -+ oasis used to generate the %s file. Please install at \ -+ least oasis v%s.") -+ oasis_exec oasis_exec_version setup_ml t.oasis_version -+ in -+ -+ if !update_setup_ml then -+ begin -+ try -+ match t.oasis_digest with -+ | Some dgst -> -+ if Sys.file_exists oasis_fn && -+ dgst <> Digest.file default_oasis_fn then -+ begin -+ do_update (); -+ true -+ end -+ else -+ false -+ | None -> -+ false -+ with e -> -+ error -+ (f_ "Error when updating setup.ml. If you want to avoid this error, \ -+ you can bypass the update of %s by running '%s %s %s %s'") -+ setup_ml ocaml setup_ml no_update_setup_ml_cli -+ (String.concat " " args); -+ raise e -+ end -+ else -+ false -+ -+ -+ let setup t = -+ let catch_exn = -+ ref true -+ in -+ try -+ let act_ref = -+ ref (fun _ -> -+ failwithf -+ (f_ "No action defined, run '%s %s -help'") -+ Sys.executable_name -+ Sys.argv.(0)) -+ -+ in -+ let extra_args_ref = -+ ref [] -+ in -+ let allow_empty_env_ref = -+ ref false -+ in -+ let arg_handle ?(allow_empty_env=false) act = -+ Arg.Tuple -+ [ -+ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); -+ -+ Arg.Unit -+ (fun () -> -+ allow_empty_env_ref := allow_empty_env; -+ act_ref := act); -+ ] -+ in -+ -+ Arg.parse -+ (Arg.align -+ ([ -+ "-configure", -+ arg_handle ~allow_empty_env:true configure, -+ s_ "[options*] Configure the whole build process."; -+ -+ "-build", -+ arg_handle build, -+ s_ "[options*] Build executables and libraries."; -+ -+ "-doc", -+ arg_handle doc, -+ s_ "[options*] Build documents."; -+ -+ "-test", -+ arg_handle test, -+ s_ "[options*] Run tests."; -+ -+ "-all", -+ arg_handle ~allow_empty_env:true all, -+ s_ "[options*] Run configure, build, doc and test targets."; -+ -+ "-install", -+ arg_handle install, -+ s_ "[options*] Install libraries, data, executables \ -+ and documents."; -+ -+ "-uninstall", -+ arg_handle uninstall, -+ s_ "[options*] Uninstall libraries, data, executables \ -+ and documents."; -+ -+ "-reinstall", -+ arg_handle reinstall, -+ s_ "[options*] Uninstall and install libraries, data, \ -+ executables and documents."; -+ -+ "-clean", -+ arg_handle ~allow_empty_env:true clean, -+ s_ "[options*] Clean files generated by a build."; -+ -+ "-distclean", -+ arg_handle ~allow_empty_env:true distclean, -+ s_ "[options*] Clean files generated by a build and configure."; -+ -+ "-version", -+ arg_handle ~allow_empty_env:true version, -+ s_ " Display version of OASIS used to generate this setup.ml."; -+ -+ "-no-catch-exn", -+ Arg.Clear catch_exn, -+ s_ " Don't catch exception, useful for debugging."; -+ ] -+ @ -+ (if t.setup_update then -+ [no_update_setup_ml_cli] -+ else -+ []) -+ @ (BaseContext.args ()))) -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ (s_ "Setup and run build process current package\n"); -+ -+ (* Build initial environment *) -+ load ~allow_empty:!allow_empty_env_ref (); -+ -+ (** Initialize flags *) -+ List.iter -+ (function -+ | Flag (cs, {flag_description = hlp; -+ flag_default = choices}) -> -+ begin -+ let apply ?short_desc () = -+ var_ignore -+ (var_define -+ ~cli:CLIEnable -+ ?short_desc -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ string_of_bool -+ (var_choose -+ ~name:(Printf.sprintf -+ (f_ "default value of flag %s") -+ cs.cs_name) -+ ~printer:string_of_bool -+ choices))) -+ in -+ match hlp with -+ | Some hlp -> -+ apply ~short_desc:(fun () -> hlp) () -+ | None -> -+ apply () -+ end -+ | _ -> -+ ()) -+ t.package.sections; -+ -+ BaseStandardVar.init t.package; -+ -+ BaseDynVar.init t.package; -+ -+ if t.setup_update && update_setup_ml t then -+ () -+ else -+ !act_ref t (Array.of_list (List.rev !extra_args_ref)) -+ -+ with e when !catch_exn -> -+ error "%s" (Printexc.to_string e); -+ exit 1 -+ -+ -+end -+ -+ -+# 5394 "setup.ml" -+module InternalConfigurePlugin = struct -+(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) -+ -+ -+ (** Configure using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open BaseEnv -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open BaseMessage -+ -+ -+ (** Configure build using provided series of check to be done -+ * and then output corresponding file. -+ *) -+ let configure pkg argv = -+ let var_ignore_eval var = let _s: string = var () in () in -+ let errors = ref SetString.empty in -+ let buff = Buffer.create 13 in -+ -+ let add_errors fmt = -+ Printf.kbprintf -+ (fun b -> -+ errors := SetString.add (Buffer.contents b) !errors; -+ Buffer.clear b) -+ buff -+ fmt -+ in -+ -+ let warn_exception e = -+ warning "%s" (Printexc.to_string e) -+ in -+ -+ (* Check tools *) -+ let check_tools lst = -+ List.iter -+ (function -+ | ExternalTool tool -> -+ begin -+ try -+ var_ignore_eval (BaseCheck.prog tool) -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find external tool '%s'") tool -+ end -+ | InternalExecutable nm1 -> -+ (* Check that matching tool is built *) -+ List.iter -+ (function -+ | Executable ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal executable \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ lst -+ in -+ -+ let build_checks sct bs = -+ if var_choose bs.bs_build then -+ begin -+ if bs.bs_compiled_object = Native then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.ocamlopt -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Section %s requires native compilation") -+ (OASISSection.string_of_section sct) -+ end; -+ -+ (* Check tools *) -+ check_tools bs.bs_build_tools; -+ -+ (* Check depends *) -+ List.iter -+ (function -+ | FindlibPackage (findlib_pkg, version_comparator) -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.package ?version_comparator findlib_pkg) -+ with e -> -+ warn_exception e; -+ match version_comparator with -+ | None -> -+ add_errors -+ (f_ "Cannot find findlib package %s") -+ findlib_pkg -+ | Some ver_cmp -> -+ add_errors -+ (f_ "Cannot find findlib package %s (%s)") -+ findlib_pkg -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | InternalLibrary nm1 -> -+ (* Check that matching library is built *) -+ List.iter -+ (function -+ | Library ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal library \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ bs.bs_build_depends -+ end -+ in -+ -+ (* Parse command line *) -+ BaseArgExt.parse argv (BaseEnv.args ()); -+ -+ (* OCaml version *) -+ begin -+ match pkg.ocaml_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "ocaml" -+ ver_cmp -+ BaseStandardVar.ocaml_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "OCaml version %s doesn't match version constraint %s") -+ (BaseStandardVar.ocaml_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ -+ (* Findlib version *) -+ begin -+ match pkg.findlib_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "findlib" -+ ver_cmp -+ BaseStandardVar.findlib_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Findlib version %s doesn't match version constraint %s") -+ (BaseStandardVar.findlib_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ (* Make sure the findlib version is fine for the OCaml compiler. *) -+ begin -+ let ocaml_ge4 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) -+ (OASISVersion.version_of_string "4.0.0") >= 0 in -+ if ocaml_ge4 then -+ let findlib_lt132 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) -+ (OASISVersion.version_of_string "1.3.2") < 0 in -+ if findlib_lt132 then -+ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" -+ end; -+ -+ (* FlexDLL *) -+ if BaseStandardVar.os_type () = "Win32" || -+ BaseStandardVar.os_type () = "Cygwin" then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.flexlink -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find 'flexlink'") -+ end; -+ -+ (* Check build depends *) -+ List.iter -+ (function -+ | Executable (_, bs, _) -+ | Library (_, bs, _) as sct -> -+ build_checks sct bs -+ | Doc (_, doc) -> -+ if var_choose doc.doc_build then -+ check_tools doc.doc_build_tools -+ | Test (_, test) -> -+ if var_choose test.test_run then -+ check_tools test.test_tools -+ | _ -> -+ ()) -+ pkg.sections; -+ -+ (* Check if we need native dynlink (presence of libraries that compile to -+ * native) -+ *) -+ begin -+ let has_cmxa = -+ List.exists -+ (function -+ | Library (_, bs, _) -> -+ var_choose bs.bs_build && -+ (bs.bs_compiled_object = Native || -+ (bs.bs_compiled_object = Best && -+ bool_of_string (BaseStandardVar.is_native ()))) -+ | _ -> -+ false) -+ pkg.sections -+ in -+ if has_cmxa then -+ var_ignore_eval BaseStandardVar.native_dynlink -+ end; -+ -+ (* Check errors *) -+ if SetString.empty != !errors then -+ begin -+ List.iter -+ (fun e -> error "%s" e) -+ (SetString.elements !errors); -+ failwithf -+ (fn_ -+ "%d configuration error" -+ "%d configuration errors" -+ (SetString.cardinal !errors)) -+ (SetString.cardinal !errors) -+ end -+ -+ -+end -+ -+module InternalInstallPlugin = struct -+(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) -+ -+ -+ (** Install using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open BaseEnv -+ open BaseStandardVar -+ open BaseMessage -+ open OASISTypes -+ open OASISFindlib -+ open OASISGettext -+ open OASISUtils -+ -+ -+ let exec_hook = -+ ref (fun (cs, bs, exec) -> cs, bs, exec) -+ -+ -+ let lib_hook = -+ ref (fun (cs, bs, lib) -> cs, bs, lib, []) -+ -+ -+ let obj_hook = -+ ref (fun (cs, bs, obj) -> cs, bs, obj, []) -+ -+ -+ let doc_hook = -+ ref (fun (cs, doc) -> cs, doc) -+ -+ -+ let install_file_ev = -+ "install-file" -+ -+ -+ let install_dir_ev = -+ "install-dir" -+ -+ -+ let install_findlib_ev = -+ "install-findlib" -+ -+ -+ let win32_max_command_line_length = 8000 -+ -+ -+ let split_install_command ocamlfind findlib_name meta files = -+ if Sys.os_type = "Win32" then -+ (* Arguments for the first command: *) -+ let first_args = ["install"; findlib_name; meta] in -+ (* Arguments for remaining commands: *) -+ let other_args = ["install"; findlib_name; "-add"] in -+ (* Extract as much files as possible from [files], [len] is -+ the current command line length: *) -+ let rec get_files len acc files = -+ match files with -+ | [] -> -+ (List.rev acc, []) -+ | file :: rest -> -+ let len = len + 1 + String.length file in -+ if len > win32_max_command_line_length then -+ (List.rev acc, files) -+ else -+ get_files len (file :: acc) rest -+ in -+ (* Split the command into several commands. *) -+ let rec split args files = -+ match files with -+ | [] -> -+ [] -+ | _ -> -+ (* Length of "ocamlfind install [META|-add]" *) -+ let len = -+ List.fold_left -+ (fun len arg -> -+ len + 1 (* for the space *) + String.length arg) -+ (String.length ocamlfind) -+ args -+ in -+ match get_files len [] files with -+ | ([], _) -> -+ failwith (s_ "Command line too long.") -+ | (firsts, others) -> -+ let cmd = args @ firsts in -+ (* Use -add for remaining commands: *) -+ let () = -+ let findlib_ge_132 = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string -+ (BaseStandardVar.findlib_version ())) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string "1.3.2")) -+ in -+ if not findlib_ge_132 then -+ failwithf -+ (f_ "Installing the library %s require to use the \ -+ flag '-add' of ocamlfind because the command \ -+ line is too long. This flag is only available \ -+ for findlib 1.3.2. Please upgrade findlib from \ -+ %s to 1.3.2") -+ findlib_name (BaseStandardVar.findlib_version ()) -+ in -+ let cmds = split other_args others in -+ cmd :: cmds -+ in -+ (* The first command does not use -add: *) -+ split first_args files -+ else -+ ["install" :: findlib_name :: meta :: files] -+ -+ -+ let install pkg argv = -+ -+ let in_destdir = -+ try -+ let destdir = -+ destdir () -+ in -+ (* Practically speaking destdir is prepended -+ * at the beginning of the target filename -+ *) -+ fun fn -> destdir^fn -+ with PropList.Not_set _ -> -+ fun fn -> fn -+ in -+ -+ let install_file ?tgt_fn src_file envdir = -+ let tgt_dir = -+ in_destdir (envdir ()) -+ in -+ let tgt_file = -+ Filename.concat -+ tgt_dir -+ (match tgt_fn with -+ | Some fn -> -+ fn -+ | None -> -+ Filename.basename src_file) -+ in -+ (* Create target directory if needed *) -+ OASISFileUtil.mkdir_parent -+ ~ctxt:!BaseContext.default -+ (fun dn -> -+ info (f_ "Creating directory '%s'") dn; -+ BaseLog.register install_dir_ev dn) -+ tgt_dir; -+ -+ (* Really install files *) -+ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; -+ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; -+ BaseLog.register install_file_ev tgt_file -+ in -+ -+ (* Install data into defined directory *) -+ let install_data srcdir lst tgtdir = -+ let tgtdir = -+ OASISHostPath.of_unix (var_expand tgtdir) -+ in -+ List.iter -+ (fun (src, tgt_opt) -> -+ let real_srcs = -+ OASISFileUtil.glob -+ ~ctxt:!BaseContext.default -+ (Filename.concat srcdir src) -+ in -+ if real_srcs = [] then -+ failwithf -+ (f_ "Wildcard '%s' doesn't match any files") -+ src; -+ List.iter -+ (fun fn -> -+ install_file -+ fn -+ (fun () -> -+ match tgt_opt with -+ | Some s -> -+ OASISHostPath.of_unix (var_expand s) -+ | None -> -+ tgtdir)) -+ real_srcs) -+ lst -+ in -+ -+ (** Install all libraries *) -+ let install_libs pkg = -+ -+ let files_of_library (f_data, acc) data_lib = -+ let cs, bs, lib, lib_extra = -+ !lib_hook data_lib -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + lib_extra *) -+ List.rev_append lib_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in library %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ lib.lib_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BLib -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the library *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ and files_of_object (f_data, acc) data_obj = -+ let cs, bs, obj, obj_extra = -+ !obj_hook data_obj -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + obj_extra *) -+ List.rev_append obj_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in object %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ obj.obj_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BObj -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the object *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ -+ in -+ -+ (* Install one group of library *) -+ let install_group_lib grp = -+ (* Iterate through all group nodes *) -+ let rec install_group_lib_aux data_and_files grp = -+ let data_and_files, children = -+ match grp with -+ | Container (_, children) -> -+ data_and_files, children -+ | Package (_, cs, bs, `Library lib, children) -> -+ files_of_library data_and_files (cs, bs, lib), children -+ | Package (_, cs, bs, `Object obj, children) -> -+ files_of_object data_and_files (cs, bs, obj), children -+ in -+ List.fold_left -+ install_group_lib_aux -+ data_and_files -+ children -+ in -+ -+ (* Findlib name of the root library *) -+ let findlib_name = -+ findlib_of_group grp -+ in -+ -+ (* Determine root library *) -+ let root_lib = -+ root_of_group grp -+ in -+ -+ (* All files to install for this library *) -+ let f_data, files = -+ install_group_lib_aux (ignore, []) grp -+ in -+ -+ (* Really install, if there is something to install *) -+ if files = [] then -+ begin -+ warning -+ (f_ "Nothing to install for findlib library '%s'") -+ findlib_name -+ end -+ else -+ begin -+ let meta = -+ (* Search META file *) -+ let _, bs, _ = -+ root_lib -+ in -+ let res = -+ Filename.concat bs.bs_path "META" -+ in -+ if not (OASISFileUtil.file_exists_case res) then -+ failwithf -+ (f_ "Cannot find file '%s' for findlib library %s") -+ res -+ findlib_name; -+ res -+ in -+ let files = -+ (* Make filename shorter to avoid hitting command max line length -+ * too early, esp. on Windows. -+ *) -+ let remove_prefix p n = -+ let plen = String.length p in -+ let nlen = String.length n in -+ if plen <= nlen && String.sub n 0 plen = p then -+ begin -+ let fn_sep = -+ if Sys.os_type = "Win32" then -+ '\\' -+ else -+ '/' -+ in -+ let cutpoint = plen + -+ (if plen < nlen && n.[plen] = fn_sep then -+ 1 -+ else -+ 0) -+ in -+ String.sub n cutpoint (nlen - cutpoint) -+ end -+ else -+ n -+ in -+ List.map (remove_prefix (Sys.getcwd ())) files -+ in -+ info -+ (f_ "Installing findlib library '%s'") -+ findlib_name; -+ let ocamlfind = ocamlfind () in -+ let commands = -+ split_install_command -+ ocamlfind -+ findlib_name -+ meta -+ files -+ in -+ List.iter -+ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) -+ commands; -+ BaseLog.register install_findlib_ev findlib_name -+ end; -+ -+ (* Install data files *) -+ f_data (); -+ -+ in -+ -+ let group_libs, _, _ = -+ findlib_mapping pkg -+ in -+ -+ (* We install libraries in groups *) -+ List.iter install_group_lib group_libs -+ in -+ -+ let install_execs pkg = -+ let install_exec data_exec = -+ let cs, bs, exec = -+ !exec_hook data_exec -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then -+ begin -+ let exec_libdir () = -+ Filename.concat -+ (libdir ()) -+ pkg.name -+ in -+ BaseBuilt.fold -+ BaseBuilt.BExec -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ ~tgt_fn:(cs.cs_name ^ ext_program ()) -+ fn -+ bindir) -+ (); -+ BaseBuilt.fold -+ BaseBuilt.BExecLib -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ exec_libdir) -+ (); -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name) -+ end -+ in -+ List.iter -+ (function -+ | Executable (cs, bs, exec)-> -+ install_exec (cs, bs, exec) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ let install_docs pkg = -+ let install_doc data = -+ let cs, doc = -+ !doc_hook data -+ in -+ if var_choose doc.doc_install && -+ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then -+ begin -+ let tgt_dir = -+ OASISHostPath.of_unix (var_expand doc.doc_install_dir) -+ in -+ BaseBuilt.fold -+ BaseBuilt.BDoc -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ (fun () -> tgt_dir)) -+ (); -+ install_data -+ Filename.current_dir_name -+ doc.doc_data_files -+ doc.doc_install_dir -+ end -+ in -+ List.iter -+ (function -+ | Doc (cs, doc) -> -+ install_doc (cs, doc) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ install_libs pkg; -+ install_execs pkg; -+ install_docs pkg -+ -+ -+ (* Uninstall already installed data *) -+ let uninstall _ argv = -+ List.iter -+ (fun (ev, data) -> -+ if ev = install_file_ev then -+ begin -+ if OASISFileUtil.file_exists_case data then -+ begin -+ info -+ (f_ "Removing file '%s'") -+ data; -+ Sys.remove data -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_dir_ev then -+ begin -+ if Sys.file_exists data && Sys.is_directory data then -+ begin -+ if Sys.readdir data = [||] then -+ begin -+ info -+ (f_ "Removing directory '%s'") -+ data; -+ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' is not empty (%s)") -+ data -+ (String.concat -+ ", " -+ (Array.to_list -+ (Sys.readdir data))) -+ end -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_findlib_ev then -+ begin -+ info (f_ "Removing findlib library '%s'") data; -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlfind ()) ["remove"; data] -+ end -+ else -+ failwithf (f_ "Unknown log event '%s'") ev; -+ BaseLog.unregister ev data) -+ (* We process event in reverse order *) -+ (List.rev -+ (BaseLog.filter -+ [install_file_ev; -+ install_dir_ev; -+ install_findlib_ev])) -+ -+ -+end -+ -+ -+# 6243 "setup.ml" -+module OCamlbuildCommon = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) -+ -+ -+ (** Functions common to OCamlbuild build and doc plugin -+ *) -+ -+ -+ open OASISGettext -+ open BaseEnv -+ open BaseStandardVar -+ open OASISTypes -+ -+ -+ -+ -+ type extra_args = string list -+ -+ -+ let ocamlbuild_clean_ev = "ocamlbuild-clean" -+ -+ -+ let ocamlbuildflags = -+ var_define -+ ~short_desc:(fun () -> "OCamlbuild additional flags") -+ "ocamlbuildflags" -+ (fun () -> "") -+ -+ -+ (** Fix special arguments depending on environment *) -+ let fix_args args extra_argv = -+ List.flatten -+ [ -+ if (os_type ()) = "Win32" then -+ [ -+ "-classic-display"; -+ "-no-log"; -+ "-no-links"; -+ "-install-lib-dir"; -+ (Filename.concat (standard_library ()) "ocamlbuild") -+ ] -+ else -+ []; -+ -+ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then -+ [ -+ "-byte-plugin" -+ ] -+ else -+ []; -+ args; -+ -+ if bool_of_string (debug ()) then -+ ["-tag"; "debug"] -+ else -+ []; -+ -+ if bool_of_string (profile ()) then -+ ["-tag"; "profile"] -+ else -+ []; -+ -+ OASISString.nsplit (ocamlbuildflags ()) ' '; -+ -+ Array.to_list extra_argv; -+ ] -+ -+ -+ (** Run 'ocamlbuild -clean' if not already done *) -+ let run_clean extra_argv = -+ let extra_cli = -+ String.concat " " (Array.to_list extra_argv) -+ in -+ (* Run if never called with these args *) -+ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then -+ begin -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); -+ BaseLog.register ocamlbuild_clean_ev extra_cli; -+ at_exit -+ (fun () -> -+ try -+ BaseLog.unregister ocamlbuild_clean_ev extra_cli -+ with _ -> -+ ()) -+ end -+ -+ -+ (** Run ocamlbuild, unregister all clean events *) -+ let run_ocamlbuild args extra_argv = -+ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html -+ *) -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args args extra_argv); -+ (* Remove any clean event, we must run it again *) -+ List.iter -+ (fun (e, d) -> BaseLog.unregister e d) -+ (BaseLog.filter [ocamlbuild_clean_ev]) -+ -+ -+ (** Determine real build directory *) -+ let build_dir extra_argv = -+ let rec search_args dir = -+ function -+ | "-build-dir" :: dir :: tl -> -+ search_args dir tl -+ | _ :: tl -> -+ search_args dir tl -+ | [] -> -+ dir -+ in -+ search_args "_build" (fix_args [] extra_argv) -+ -+ -+end -+ -+module OCamlbuildPlugin = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) -+ -+ -+ (** Build using ocamlbuild -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISUtils -+ open OASISString -+ open BaseEnv -+ open OCamlbuildCommon -+ open BaseStandardVar -+ open BaseMessage -+ -+ -+ -+ -+ -+ let cond_targets_hook = -+ ref (fun lst -> lst) -+ -+ -+ let build extra_args pkg argv = -+ (* Return the filename in build directory *) -+ let in_build_dir fn = -+ Filename.concat -+ (build_dir argv) -+ fn -+ in -+ -+ (* Return the unix filename in host build directory *) -+ let in_build_dir_of_unix fn = -+ in_build_dir (OASISHostPath.of_unix fn) -+ in -+ -+ let cond_targets = -+ List.fold_left -+ (fun acc -> -+ function -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_library -+ in_build_dir_of_unix -+ (cs, bs, lib) -+ in -+ -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ~what:".cma" fn -+ || ends_with ~what:".cmxs" fn -+ || ends_with ~what:".cmxa" fn -+ || ends_with ~what:(ext_lib ()) fn -+ || ends_with ~what:(ext_dll ()) fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for library %s") -+ cs.cs_name -+ end -+ -+ | Object (cs, bs, obj) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_object -+ in_build_dir_of_unix -+ (cs, bs, obj) -+ in -+ -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ".cmo" fn -+ || ends_with ".cmx" fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for object %s") -+ cs.cs_name -+ end -+ -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_exec_is, unix_dll_opt = -+ BaseBuilt.of_executable -+ in_build_dir_of_unix -+ (cs, bs, exec) -+ in -+ -+ let target ext = -+ let unix_tgt = -+ (OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.chop_extension -+ exec.exec_main_is))^ext -+ in -+ let evs = -+ (* Fix evs, we want to use the unix_tgt, without copying *) -+ List.map -+ (function -+ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> -+ BaseBuilt.BExec, nm, -+ [[in_build_dir_of_unix unix_tgt]] -+ | ev -> -+ ev) -+ evs -+ in -+ evs, [unix_tgt] -+ in -+ -+ (* Add executable *) -+ let acc = -+ match bs.bs_compiled_object with -+ | Native -> -+ (target ".native") :: acc -+ | Best when bool_of_string (is_native ()) -> -+ (target ".native") :: acc -+ | Byte -+ | Best -> -+ (target ".byte") :: acc -+ in -+ acc -+ end -+ -+ | Library _ | Object _ | Executable _ | Test _ -+ | SrcRepo _ | Flag _ | Doc _ -> -+ acc) -+ [] -+ (* Keep the pkg.sections ordered *) -+ (List.rev pkg.sections); -+ in -+ -+ (* Check and register built files *) -+ let check_and_register (bt, bnm, lst) = -+ List.iter -+ (fun fns -> -+ if not (List.exists OASISFileUtil.file_exists_case fns) then -+ failwithf -+ (fn_ -+ "Expected built file %s doesn't exist." -+ "None of expected built files %s exists." -+ (List.length fns)) -+ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) -+ lst; -+ (BaseBuilt.register bt bnm lst) -+ in -+ -+ (* Run the hook *) -+ let cond_targets = !cond_targets_hook cond_targets in -+ -+ (* Run a list of target... *) -+ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; -+ (* ... and register events *) -+ List.iter check_and_register (List.flatten (List.map fst cond_targets)) -+ -+ -+ let clean pkg extra_args = -+ run_clean extra_args; -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+ -+end -+ -+module OCamlbuildDocPlugin = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) -+ -+ -+ (* Create documentation using ocamlbuild .odocl files -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISMessage -+ open OCamlbuildCommon -+ open BaseStandardVar -+ -+ -+ -+ -+ type run_t = -+ { -+ extra_args: string list; -+ run_path: unix_filename; -+ } -+ -+ -+ let doc_build run pkg (cs, doc) argv = -+ let index_html = -+ OASISUnixPath.make -+ [ -+ run.run_path; -+ cs.cs_name^".docdir"; -+ "index.html"; -+ ] -+ in -+ let tgt_dir = -+ OASISHostPath.make -+ [ -+ build_dir argv; -+ OASISHostPath.of_unix run.run_path; -+ cs.cs_name^".docdir"; -+ ] -+ in -+ run_ocamlbuild (index_html :: run.extra_args) argv; -+ List.iter -+ (fun glb -> -+ BaseBuilt.register -+ BaseBuilt.BDoc -+ cs.cs_name -+ [OASISFileUtil.glob ~ctxt:!BaseContext.default -+ (Filename.concat tgt_dir glb)]) -+ ["*.html"; "*.css"] -+ -+ -+ let doc_clean run pkg (cs, doc) argv = -+ run_clean argv; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+ -+end -+ -+ -+# 6616 "setup.ml" -+module NonePlugin = struct -+(* # 22 "src/plugins/none/NonePlugin.ml" *) -+ -+ -+ (** Plugin to handle "none" generation -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open OASISGettext -+ open OASISUtils -+ -+ -+ let not_implemented str _ _ = -+ failwithf (f_ "No implementation for %s") str -+ -+ -+ let section_not_implemented str pkg _ _ extra_args = -+ not_implemented str pkg extra_args -+ -+ -+end -+ -+ -+# 6641 "setup.ml" -+module CustomPlugin = struct -+(* # 22 "src/plugins/custom/CustomPlugin.ml" *) -+ -+ -+ (** Generate custom configure/build/doc/test/install system -+ @author -+ *) -+ -+ -+ open BaseEnv -+ open OASISGettext -+ open OASISTypes -+ -+ -+ -+ -+ -+ type t = -+ { -+ cmd_main: command_line conditional; -+ cmd_clean: (command_line option) conditional; -+ cmd_distclean: (command_line option) conditional; -+ } -+ -+ -+ let run = BaseCustom.run -+ -+ -+ let main t _ extra_args = -+ let cmd, args = -+ var_choose -+ ~name:(s_ "main command") -+ t.cmd_main -+ in -+ run cmd args extra_args -+ -+ -+ let clean t pkg extra_args = -+ match var_choose t.cmd_clean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ -+ let distclean t pkg extra_args = -+ match var_choose t.cmd_distclean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ -+ module Build = -+ struct -+ let main t pkg extra_args = -+ main t pkg extra_args; -+ List.iter -+ (fun sct -> -+ let evs = -+ match sct with -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, _ = -+ BaseBuilt.of_library -+ OASISHostPath.of_unix -+ (cs, bs, lib) -+ in -+ evs -+ end -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, _, _ = -+ BaseBuilt.of_executable -+ OASISHostPath.of_unix -+ (cs, bs, exec) -+ in -+ evs -+ end -+ | _ -> -+ [] -+ in -+ List.iter -+ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) -+ evs) -+ pkg.sections -+ -+ let clean t pkg extra_args = -+ clean t pkg extra_args; -+ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild -+ * considering moving this to BaseSetup? -+ *) -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+ let distclean t pkg extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+ module Test = -+ struct -+ let main t pkg (cs, test) extra_args = -+ try -+ main t pkg extra_args; -+ 0.0 -+ with Failure s -> -+ BaseMessage.warning -+ (f_ "Test '%s' fails: %s") -+ cs.cs_name -+ s; -+ 1.0 -+ -+ let clean t pkg (cs, test) extra_args = -+ clean t pkg extra_args -+ -+ let distclean t pkg (cs, test) extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+ module Doc = -+ struct -+ let main t pkg (cs, _) extra_args = -+ main t pkg extra_args; -+ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] -+ -+ let clean t pkg (cs, _) extra_args = -+ clean t pkg extra_args; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+ let distclean t pkg (cs, _) extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+end -+ -+ -+# 6789 "setup.ml" -+open OASISTypes;; -+ -+let setup_t = -+ { -+ BaseSetup.configure = InternalConfigurePlugin.configure; -+ build = OCamlbuildPlugin.build []; -+ test = -+ [ -+ ("test", -+ CustomPlugin.Test.main -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ doc = -+ [ -+ ("api", -+ OCamlbuildDocPlugin.doc_build -+ {OCamlbuildDocPlugin.extra_args = []; run_path = "doc"}); -+ ("distribution", -+ NonePlugin.not_implemented "doc of section distribution"); -+ ("samples", NonePlugin.not_implemented "doc of section samples") -+ ]; -+ install = InternalInstallPlugin.install; -+ uninstall = InternalInstallPlugin.uninstall; -+ clean = [OCamlbuildPlugin.clean]; -+ clean_test = -+ [ -+ ("test", -+ CustomPlugin.Test.clean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ clean_doc = -+ [ -+ ("api", -+ OCamlbuildDocPlugin.doc_clean -+ {OCamlbuildDocPlugin.extra_args = []; run_path = "doc"}) -+ ]; -+ distclean = []; -+ distclean_test = -+ [ -+ ("test", -+ CustomPlugin.Test.distclean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ distclean_doc = []; -+ package = -+ { -+ oasis_version = "0.3"; -+ ocaml_version = Some (OASISVersion.VGreaterEqual "3.12.0"); -+ findlib_version = None; -+ alpha_features = []; -+ beta_features = []; -+ name = "jsonm"; -+ version = "0.9.1"; -+ license = -+ OASISLicense.DEP5License -+ (OASISLicense.DEP5Unit -+ { -+ OASISLicense.license = "BSD-3-clause"; -+ excption = None; -+ version = OASISLicense.NoVersion -+ }); -+ license_file = None; -+ copyrights = ["(c) 2012 Daniel C. B\195\188nzli"]; -+ maintainers = []; -+ authors = ["Daniel B\195\188nzli "]; -+ homepage = Some "http://erratique.ch/software/jsonm"; -+ synopsis = "Non-blocking streaming JSON codec for OCaml"; -+ description = -+ Some -+ [ -+ OASISText.Para -+ "Jsonm is a non-blocking streaming codec to decode and encode the JSON data format. It can process JSON text without blocking on IO and without a complete in-memory representation of the data."; -+ OASISText.Para -+ "The alternative \"uncut\" codec also processes whitespace and (non-standard) JSON with JavaScript comments."; -+ OASISText.Para -+ "Jsonm is made of a single module and depends on [Uutf][1]. It is distributed under the BSD3 license."; -+ OASISText.Para "[1]: http://erratique.ch/software/uutf" -+ ]; -+ categories = []; -+ conf_type = (`Configure, "internal", Some "0.4"); -+ conf_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ build_type = (`Build, "ocamlbuild", Some "0.4"); -+ build_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ install_type = (`Install, "internal", Some "0.4"); -+ install_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ uninstall_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ clean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ distclean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ files_ab = []; -+ sections = -+ [ -+ Library -+ ({ -+ cs_name = "jsonm"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "src"; -+ bs_compiled_object = Best; -+ bs_build_depends = [FindlibPackage ("uutf", None)]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ { -+ lib_modules = ["Jsonm"]; -+ lib_pack = false; -+ lib_internal_modules = []; -+ lib_findlib_parent = None; -+ lib_findlib_name = None; -+ lib_findlib_containers = [] -+ }); -+ Executable -+ ({ -+ cs_name = "jsontrip"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = -+ [ -+ InternalLibrary "jsonm"; -+ FindlibPackage ("unix", None) -+ ]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "jsontrip.ml"}); -+ Executable -+ ({ -+ cs_name = "ocamltweets"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = -+ [ -+ InternalLibrary "jsonm"; -+ FindlibPackage ("unix", None) -+ ]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "ocamltweets.ml"}); -+ Executable -+ ({ -+ cs_name = "test"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, false)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "jsonm"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "test.ml"}); -+ Executable -+ ({ -+ cs_name = "jtree"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, false)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "jsonm"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "jtree.ml"}); -+ Executable -+ ({ -+ cs_name = "examples"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, false)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = -+ [ -+ FindlibPackage ("unix", None); -+ InternalLibrary "jsonm" -+ ]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "examples.ml"}); -+ Test -+ ({ -+ cs_name = "test"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ test_type = (`Test, "custom", Some "0.4"); -+ test_command = [(OASISExpr.EBool true, ("$test", []))]; -+ test_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ test_working_directory = None; -+ test_run = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); -+ (OASISExpr.EFlag "tests", true) -+ ]; -+ test_tools = [ExternalTool "ocamlbuild"] -+ }); -+ Doc -+ ({ -+ cs_name = "api"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "ocamlbuild", Some "0.3"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "Jsonm's documentation and API reference"; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = []; -+ doc_build_tools = -+ [ExternalTool "ocamlbuild"; ExternalTool "ocamldoc"] -+ }); -+ Doc -+ ({ -+ cs_name = "distribution"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "none", Some "0.4"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "\"Jsonm's README and CHANGES files\""; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = [("README CHANGES", None)]; -+ doc_build_tools = [ExternalTool "ocamlbuild"] -+ }); -+ Doc -+ ({ -+ cs_name = "samples"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "none", Some "0.4"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "\"Jsonm's sample code\""; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = [("test/*.ml", None)]; -+ doc_build_tools = [ExternalTool "ocamlbuild"] -+ }); -+ SrcRepo -+ ({ -+ cs_name = "head"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ src_repo_type = Git; -+ src_repo_location = -+ "git://erratique.ch/repos/jsonm.git"; -+ src_repo_browser = -+ Some "http://erratique.ch/repos/jsonm"; -+ src_repo_module = None; -+ src_repo_branch = None; -+ src_repo_tag = None; -+ src_repo_subdir = None -+ }) -+ ]; -+ plugins = [(`Extra, "META", Some "0.3")]; -+ disable_oasis_section = []; -+ schema_data = PropList.Data.create (); -+ plugin_data = [] -+ }; -+ oasis_fn = Some "_oasis"; -+ oasis_version = "0.4.4"; -+ oasis_digest = Some "}V\026>\185\210EZaU\170%.\174bk"; -+ oasis_exec = None; -+ oasis_setup_args = []; -+ setup_update = false -+ };; -+ -+let setup () = BaseSetup.setup setup_t;; -+ -+# 7215 "setup.ml" -+(* OASIS_STOP *) -+let () = setup ();; -diff -urN jsonm-0.9.1.orig/src/jsonm.mldylib jsonm-0.9.1/src/jsonm.mldylib ---- jsonm-0.9.1.orig/src/jsonm.mldylib 1970-01-01 00:00:00.000000000 +0000 -+++ jsonm-0.9.1/src/jsonm.mldylib 2014-10-16 17:13:44.065481470 +0000 -@@ -0,0 +1,4 @@ -+# OASIS_START -+# DO NOT EDIT (digest: efa57c59bea23b0b78f5f708b180f123) -+Jsonm -+# OASIS_STOP -diff -urN jsonm-0.9.1.orig/src/jsonm.mllib jsonm-0.9.1/src/jsonm.mllib ---- jsonm-0.9.1.orig/src/jsonm.mllib 1970-01-01 00:00:00.000000000 +0000 -+++ jsonm-0.9.1/src/jsonm.mllib 2014-10-16 17:13:44.065481470 +0000 -@@ -0,0 +1,4 @@ -+# OASIS_START -+# DO NOT EDIT (digest: efa57c59bea23b0b78f5f708b180f123) -+Jsonm -+# OASIS_STOP -diff -urN jsonm-0.9.1.orig/src/META jsonm-0.9.1/src/META ---- jsonm-0.9.1.orig/src/META 1970-01-01 00:00:00.000000000 +0000 -+++ jsonm-0.9.1/src/META 2014-10-16 17:13:44.065481470 +0000 -@@ -0,0 +1,12 @@ -+# OASIS_START -+# DO NOT EDIT (digest: 0e79d1afefe3ab546b86a338e9656203) -+version = "0.9.1" -+description = "Non-blocking streaming JSON codec for OCaml" -+requires = "uutf" -+archive(byte) = "jsonm.cma" -+archive(byte, plugin) = "jsonm.cma" -+archive(native) = "jsonm.cmxa" -+archive(native, plugin) = "jsonm.cmxs" -+exists_if = "jsonm.cma" -+# OASIS_STOP -+ -diff -urN jsonm-0.9.1.orig/_tags jsonm-0.9.1/_tags ---- jsonm-0.9.1.orig/_tags 2012-08-05 13:44:36.000000000 +0000 -+++ jsonm-0.9.1/_tags 2014-10-16 17:13:44.041481372 +0000 -@@ -1,8 +1,40 @@ --<**/*.{ml,mli}> : annot, debug, package(uutf) -- : include -- : include -- : package(unix), package(uutf) -- : package(unix), package(uutf) -- : package(unix), package(uutf) -- : package(uutf) -- : package(uutf) -\ No newline at end of file -+# OASIS_START -+# DO NOT EDIT (digest: becd4fca5f7011979b99c0409ea1cddb) -+# Ignore VCS directories, you can use the same kind of rule outside -+# OASIS_START/STOP if you want to exclude directories that contains -+# useless stuff for the build process -+<**/.svn>: -traverse -+<**/.svn>: not_hygienic -+".bzr": -traverse -+".bzr": not_hygienic -+".hg": -traverse -+".hg": not_hygienic -+".git": -traverse -+".git": not_hygienic -+"_darcs": -traverse -+"_darcs": not_hygienic -+# Library jsonm -+"src/jsonm.cmxs": use_jsonm -+: pkg_uutf -+# Executable jsontrip -+: pkg_unix -+: pkg_uutf -+: use_jsonm -+# Executable ocamltweets -+: pkg_unix -+: pkg_uutf -+: use_jsonm -+# Executable test -+: pkg_uutf -+: use_jsonm -+# Executable jtree -+: pkg_uutf -+: use_jsonm -+# Executable examples -+: pkg_unix -+: pkg_uutf -+: use_jsonm -+: pkg_unix -+: pkg_uutf -+: use_jsonm -+# OASIS_STOP diff --git a/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a b/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a deleted file mode 100644 index 65eaf379..00000000 --- a/SOURCES/ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a +++ /dev/null @@ -1,105 +0,0 @@ -commit 252568550f9bf28b07f4e6d116485205e58afe4a -Author: Hu Tao -Date: Wed May 9 16:48:30 2012 +0800 - - remove parameter nr_pcpus of Libvirt.Domain.get_cpu_stats - - remove the value because we can get it from the libvirt API - -diff --git a/examples/.depend b/examples/.depend -index 831adf6..f58db3d 100644 ---- a/examples/.depend -+++ b/examples/.depend -@@ -1,6 +1,6 @@ --node_info.cmo: ../libvirt/libvirt.cmi --node_info.cmx: ../libvirt/libvirt.cmx - get_cpu_stats.cmo: ../libvirt/libvirt.cmi - get_cpu_stats.cmx: ../libvirt/libvirt.cmx - list_domains.cmo: ../libvirt/libvirt.cmi - list_domains.cmx: ../libvirt/libvirt.cmx -+node_info.cmo: ../libvirt/libvirt.cmi -+node_info.cmx: ../libvirt/libvirt.cmx -diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml -index 79d5c3c..d7a8d0c 100644 ---- a/examples/get_cpu_stats.ml -+++ b/examples/get_cpu_stats.ml -@@ -25,7 +25,7 @@ let () = - - let stats = - let dom = D.lookup_by_name conn domname in -- D.get_cpu_stats dom nr_pcpus in -+ D.get_cpu_stats dom in - - Array.iteri ( - fun n params -> -diff --git a/libvirt/.depend b/libvirt/.depend -index 43a2367..3f2297e 100644 ---- a/libvirt/.depend -+++ b/libvirt/.depend -@@ -1,6 +1,6 @@ --libvirt_version.cmi: - libvirt.cmi: --libvirt_version.cmo: libvirt_version.cmi --libvirt_version.cmx: libvirt_version.cmi -+libvirt_version.cmi: - libvirt.cmo: libvirt.cmi - libvirt.cmx: libvirt.cmi -+libvirt_version.cmo: libvirt_version.cmi -+libvirt_version.cmx: libvirt_version.cmi -diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -index 53c5bb4..07542a9 100644 ---- a/libvirt/libvirt.ml -+++ b/libvirt/libvirt.ml -@@ -417,7 +417,7 @@ struct - external set_vcpus : [>`W] t -> int -> unit = "ocaml_libvirt_domain_set_vcpus" - external pin_vcpu : [>`W] t -> int -> string -> unit = "ocaml_libvirt_domain_pin_vcpu" - external get_vcpus : [>`R] t -> int -> int -> int * vcpu_info array * string = "ocaml_libvirt_domain_get_vcpus" -- external get_cpu_stats : [>`R] t -> int -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" -+ external get_cpu_stats : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" - external get_max_vcpus : [>`R] t -> int = "ocaml_libvirt_domain_get_max_vcpus" - external attach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_attach_device" - external detach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_detach_device" -diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -index 0913a63..5a288c0 100644 ---- a/libvirt/libvirt.mli -+++ b/libvirt/libvirt.mli -@@ -559,8 +559,8 @@ sig - for a domain. See the libvirt documentation for details - of the array and bitmap returned from this function. - *) -- val get_cpu_stats : [>`R] t -> int -> typed_param list array -- (** [get_pcpu_stats dom nr_pcpu] returns the physical CPU stats -+ val get_cpu_stats : [>`R] t -> typed_param list array -+ (** [get_pcpu_stats dom] returns the physical CPU stats - for a domain. See the libvirt documentation for details. - *) - val get_max_vcpus : [>`R] t -> int -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index 3d42b73..70cf96f 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -532,17 +532,21 @@ extern int virDomainGetCPUStats (virDomainPtr domain, - #endif - - CAMLprim value --ocaml_libvirt_domain_get_cpu_stats (value domv, value nr_pcpusv) -+ocaml_libvirt_domain_get_cpu_stats (value domv) - { - #ifdef HAVE_VIRDOMAINGETCPUSTATS -- CAMLparam2 (domv, nr_pcpusv); -+ CAMLparam1 (domv); - CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); - CAMLlocal1 (v); - virDomainPtr dom = Domain_val (domv); - virConnectPtr conn = Connect_domv (domv); -- int nr_pcpus = Int_val (nr_pcpusv); - virTypedParameterPtr params; - int r, cpu, ncpus, nparams, i, j, pos; -+ int nr_pcpus; -+ -+ /* get number of pcpus */ -+ NONBLOCKING (nr_pcpus = virDomainGetCPUStats(dom, NULL, 0, 0, 0, 0)); -+ CHECK_ERROR (nr_pcpus < 0, conn, "virDomainGetCPUStats"); - - /* get percpu information */ - NONBLOCKING (nparams = virDomainGetCPUStats(dom, NULL, 0, 0, 1, 0)); diff --git a/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 b/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 deleted file mode 100644 index fcb4f451..00000000 --- a/SOURCES/ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 +++ /dev/null @@ -1,1648 +0,0 @@ -commit 0d103e429ddc7942e537a047c8a46ca7ddc58e46 -Author: David Scott -Date: Wed Apr 24 11:39:05 2013 +0100 - - Add event callback implementation based on virConnectDomainEventRegisterAny - - A client may register a callback as follows: - - E.register_default_impl (); - - let conn = C.connect_readonly ?name () in - - let id = E.register_any conn (E.Lifecycle (fun dom e -> - printd dom "Lifecycle %s" (E.Lifecycle.to_string e) - )) in - - Internally this will: - 1. generate a unique int64 used to identify the specific callback - 2. add the callback to an OCaml hashtable based on the signature - (there is a distinct hashtable per callback signature) - 3. call virConnectDomainEventRegisterAny which registers a - generic C callback in the stubs (one distinct callback per - signature) and supply the int64 as the "opaque" data - - The client must enter the event loop with: - - while true do - E.run_default_impl () - done - - When an event is triggered, the C callback will upcall into an OCaml - function (having re-acquired the heap lock) supplying the int64 value. - The OCaml function can then find the right callback in the Hashtbl - and call it. - - The client can deregister the callback with: - - E.deregister_any conn id; - - Signed-off-by: David Scott - -diff --git a/libvirt/generator.pl b/libvirt/generator.pl -index ab8900e..8229ad1 100755 ---- a/libvirt/generator.pl -+++ b/libvirt/generator.pl -@@ -59,6 +59,8 @@ my @functions = ( - { name => "virConnectListDefinedStoragePools", - sig => "conn, int : string array" }, - { name => "virConnectGetCapabilities", sig => "conn : string" }, -+ { name => "virConnectDomainEventDeregisterAny", -+ sig => "conn, int : unit" }, - - { name => "virDomainCreateLinux", sig => "conn, string, 0U : dom" }, - { name => "virDomainFree", sig => "dom : free" }, -diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -index 784a2b5..9c9368a 100644 ---- a/libvirt/libvirt.ml -+++ b/libvirt/libvirt.ml -@@ -483,6 +483,771 @@ struct - map_ignore_errors (fun dom -> (dom, get_info dom)) doms - end - -+module Event = -+struct -+ -+ module Defined = struct -+ type t = [ -+ | `Added -+ | `Updated -+ | `Unknown of int -+ ] -+ -+ let to_string = function -+ | `Added -> "Added" -+ | `Updated -> "Updated" -+ | `Unknown x -> Printf.sprintf "Unknown Defined.detail: %d" x -+ -+ let make = function -+ | 0 -> `Added -+ | 1 -> `Updated -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Undefined = struct -+ type t = [ -+ | `Removed -+ | `Unknown of int -+ ] -+ -+ let to_string = function -+ | `Removed -> "UndefinedRemoved" -+ | `Unknown x -> Printf.sprintf "Unknown Undefined.detail: %d" x -+ -+ let make = function -+ | 0 -> `Removed -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Started = struct -+ type t = [ -+ | `Booted -+ | `Migrated -+ | `Restored -+ | `FromSnapshot -+ | `Wakeup -+ | `Unknown of int -+ ] -+ -+ let to_string = function -+ | `Booted -> "Booted" -+ | `Migrated -> "Migrated" -+ | `Restored -> "Restored" -+ | `FromSnapshot -> "FromSnapshot" -+ | `Wakeup -> "Wakeup" -+ | `Unknown x -> Printf.sprintf "Unknown Started.detail: %d" x -+ -+ let make = function -+ | 0 -> `Booted -+ | 1 -> `Migrated -+ | 2 -> `Restored -+ | 3 -> `FromSnapshot -+ | 4 -> `Wakeup -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Suspended = struct -+ type t = [ -+ | `Paused -+ | `Migrated -+ | `IOError -+ | `Watchdog -+ | `Restored -+ | `FromSnapshot -+ | `APIError -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let to_string = function -+ | `Paused -> "Paused" -+ | `Migrated -> "Migrated" -+ | `IOError -> "IOError" -+ | `Watchdog -> "Watchdog" -+ | `Restored -> "Restored" -+ | `FromSnapshot -> "FromSnapshot" -+ | `APIError -> "APIError" -+ | `Unknown x -> Printf.sprintf "Unknown Suspended.detail: %d" x -+ -+ let make = function -+ | 0 -> `Paused -+ | 1 -> `Migrated -+ | 2 -> `IOError -+ | 3 -> `Watchdog -+ | 4 -> `Restored -+ | 5 -> `FromSnapshot -+ | 6 -> `APIError -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Resumed = struct -+ type t = [ -+ | `Unpaused -+ | `Migrated -+ | `FromSnapshot -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let to_string = function -+ | `Unpaused -> "Unpaused" -+ | `Migrated -> "Migrated" -+ | `FromSnapshot -> "FromSnapshot" -+ | `Unknown x -> Printf.sprintf "Unknown Resumed.detail: %d" x -+ -+ let make = function -+ | 0 -> `Unpaused -+ | 1 -> `Migrated -+ | 2 -> `FromSnapshot -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Stopped = struct -+ type t = [ -+ | `Shutdown -+ | `Destroyed -+ | `Crashed -+ | `Migrated -+ | `Saved -+ | `Failed -+ | `FromSnapshot -+ | `Unknown of int -+ ] -+ let to_string = function -+ | `Shutdown -> "Shutdown" -+ | `Destroyed -> "Destroyed" -+ | `Crashed -> "Crashed" -+ | `Migrated -> "Migrated" -+ | `Saved -> "Saved" -+ | `Failed -> "Failed" -+ | `FromSnapshot -> "FromSnapshot" -+ | `Unknown x -> Printf.sprintf "Unknown Stopped.detail: %d" x -+ -+ let make = function -+ | 0 -> `Shutdown -+ | 1 -> `Destroyed -+ | 2 -> `Crashed -+ | 3 -> `Migrated -+ | 4 -> `Saved -+ | 5 -> `Failed -+ | 6 -> `FromSnapshot -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module PM_suspended = struct -+ type t = [ -+ | `Memory -+ | `Disk -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let to_string = function -+ | `Memory -> "Memory" -+ | `Disk -> "Disk" -+ | `Unknown x -> Printf.sprintf "Unknown PM_suspended.detail: %d" x -+ -+ let make = function -+ | 0 -> `Memory -+ | 1 -> `Disk -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ let string_option x = match x with -+ | None -> "None" -+ | Some x' -> "Some " ^ x' -+ -+ module Lifecycle = struct -+ type t = [ -+ | `Defined of Defined.t -+ | `Undefined of Undefined.t -+ | `Started of Started.t -+ | `Suspended of Suspended.t -+ | `Resumed of Resumed.t -+ | `Stopped of Stopped.t -+ | `Shutdown (* no detail defined yet *) -+ | `PMSuspended of PM_suspended.t -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let to_string = function -+ | `Defined x -> "Defined " ^ (Defined.to_string x) -+ | `Undefined x -> "Undefined " ^ (Undefined.to_string x) -+ | `Started x -> "Started " ^ (Started.to_string x) -+ | `Suspended x -> "Suspended " ^ (Suspended.to_string x) -+ | `Resumed x -> "Resumed " ^ (Resumed.to_string x) -+ | `Stopped x -> "Stopped " ^ (Stopped.to_string x) -+ | `Shutdown -> "Shutdown" -+ | `PMSuspended x -> "PMSuspended " ^ (PM_suspended.to_string x) -+ | `Unknown x -> Printf.sprintf "Unknown Lifecycle event: %d" x -+ -+ let make (ty, detail) = match ty with -+ | 0 -> `Defined (Defined.make detail) -+ | 1 -> `Undefined (Undefined.make detail) -+ | 2 -> `Started (Started.make detail) -+ | 3 -> `Suspended (Suspended.make detail) -+ | 4 -> `Resumed (Resumed.make detail) -+ | 5 -> `Stopped (Stopped.make detail) -+ | 6 -> `Shutdown -+ | 7 -> `PMSuspended (PM_suspended.make detail) -+ | x -> `Unknown x -+ end -+ -+ module Reboot = struct -+ type t = unit -+ -+ let to_string _ = "()" -+ -+ let make () = () -+ end -+ -+ module Rtc_change = struct -+ type t = int64 -+ -+ let to_string = Int64.to_string -+ -+ let make x = x -+ end -+ -+ module Watchdog = struct -+ type t = [ -+ | `None -+ | `Pause -+ | `Reset -+ | `Poweroff -+ | `Shutdown -+ | `Debug -+ | `Unknown of int -+ ] -+ -+ let to_string = function -+ | `None -> "None" -+ | `Pause -> "Pause" -+ | `Reset -> "Reset" -+ | `Poweroff -> "Poweroff" -+ | `Shutdown -> "Shutdown" -+ | `Debug -> "Debug" -+ | `Unknown x -> Printf.sprintf "Unknown watchdog_action: %d" x -+ -+ let make = function -+ | 0 -> `None -+ | 1 -> `Pause -+ | 2 -> `Reset -+ | 3 -> `Poweroff -+ | 4 -> `Shutdown -+ | 5 -> `Debug -+ | x -> `Unknown x (* newer libvirt *) -+ end -+ -+ module Io_error = struct -+ type action = [ -+ | `None -+ | `Pause -+ | `Report -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let string_of_action = function -+ | `None -> "None" -+ | `Pause -> "Pause" -+ | `Report -> "Report" -+ | `Unknown x -> Printf.sprintf "Unknown Io_error.action: %d" x -+ -+ let action_of_int = function -+ | 0 -> `None -+ | 1 -> `Pause -+ | 2 -> `Report -+ | x -> `Unknown x -+ -+ type t = { -+ src_path: string option; -+ dev_alias: string option; -+ action: action; -+ reason: string option; -+ } -+ -+ let to_string t = Printf.sprintf -+ "{ Io_error.src_path = %s; dev_alias = %s; action = %s; reason = %s }" -+ (string_option t.src_path) -+ (string_option t.dev_alias) -+ (string_of_action t.action) -+ (string_option t.reason) -+ -+ let make (src_path, dev_alias, action, reason) = { -+ src_path = src_path; -+ dev_alias = dev_alias; -+ action = action_of_int action; -+ reason = reason; -+ } -+ -+ let make_noreason (src_path, dev_alias, action) = -+ make (src_path, dev_alias, action, None) -+ end -+ -+ module Graphics_address = struct -+ type family = [ -+ | `Ipv4 -+ | `Ipv6 -+ | `Unix -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let string_of_family = function -+ | `Ipv4 -> "IPv4" -+ | `Ipv6 -> "IPv6" -+ | `Unix -> "UNIX" -+ | `Unknown x -> Printf.sprintf "Unknown Graphics_address.family: %d" x -+ -+ let family_of_int = function -+ (* no zero *) -+ | 1 -> `Ipv4 -+ | 2 -> `Ipv6 -+ | 3 -> `Unix -+ | x -> `Unknown x -+ -+ type t = { -+ family: family; (** Address family *) -+ node: string option; (** Address of node (eg IP address, or UNIX path *) -+ service: string option; (** Service name/number (eg TCP port, or NULL) *) -+ } -+ -+ let to_string t = Printf.sprintf -+ "{ family = %s; node = %s; service = %s }" -+ (string_of_family t.family) -+ (string_option t.node) -+ (string_option t.service) -+ -+ let make (family, node, service) = { -+ family = family_of_int family; -+ node = node; -+ service = service; -+ } -+ end -+ -+ module Graphics_subject = struct -+ type identity = { -+ ty: string option; -+ name: string option; -+ } -+ -+ let string_of_identity t = Printf.sprintf -+ "{ ty = %s; name = %s }" -+ (string_option t.ty) -+ (string_option t.name) -+ -+ type t = identity list -+ -+ let to_string ts = -+ "[ " ^ (String.concat "; " (List.map string_of_identity ts)) ^ " ]" -+ -+ let make xs = -+ List.map (fun (ty, name) -> { ty = ty; name = name }) -+ (Array.to_list xs) -+ end -+ -+ module Graphics = struct -+ type phase = [ -+ | `Connect -+ | `Initialize -+ | `Disconnect -+ | `Unknown of int (** newer libvirt *) -+ ] -+ -+ let string_of_phase = function -+ | `Connect -> "Connect" -+ | `Initialize -> "Initialize" -+ | `Disconnect -> "Disconnect" -+ | `Unknown x -> Printf.sprintf "Unknown Graphics.phase: %d" x -+ -+ let phase_of_int = function -+ | 0 -> `Connect -+ | 1 -> `Initialize -+ | 2 -> `Disconnect -+ | x -> `Unknown x -+ -+ type t = { -+ phase: phase; (** the phase of the connection *) -+ local: Graphics_address.t; (** the local server address *) -+ remote: Graphics_address.t; (** the remote client address *) -+ auth_scheme: string option; (** the authentication scheme activated *) -+ subject: Graphics_subject.t; (** the authenticated subject (user) *) -+ } -+ -+ let to_string t = -+ let phase = Printf.sprintf "phase = %s" -+ (string_of_phase t.phase) in -+ let local = Printf.sprintf "local = %s" -+ (Graphics_address.to_string t.local) in -+ let remote = Printf.sprintf "remote = %s" -+ (Graphics_address.to_string t.remote) in -+ let auth_scheme = Printf.sprintf "auth_scheme = %s" -+ (string_option t.auth_scheme) in -+ let subject = Printf.sprintf "subject = %s" -+ (Graphics_subject.to_string t.subject) in -+ "{ " ^ (String.concat "; " [ phase; local; remote; auth_scheme; subject ]) ^ " }" -+ -+ let make (phase, local, remote, auth_scheme, subject) = { -+ phase = phase_of_int phase; -+ local = Graphics_address.make local; -+ remote = Graphics_address.make remote; -+ auth_scheme = auth_scheme; -+ subject = Graphics_subject.make subject; -+ } -+ end -+ -+ module Control_error = struct -+ type t = unit -+ -+ let to_string () = "()" -+ -+ let make () = () -+ end -+ -+ module Block_job = struct -+ type ty = [ -+ | `KnownUnknown (* explicitly named UNKNOWN in the spec *) -+ | `Pull -+ | `Copy -+ | `Commit -+ | `Unknown of int (* newer libvirt *) -+ ] -+ -+ let string_of_ty = function -+ | `KnownUnknown -> "KnownUnknown" -+ | `Pull -> "Pull" -+ | `Copy -> "Copy" -+ | `Commit -> "Commit" -+ | `Unknown x -> Printf.sprintf "Unknown Block_job.ty: %d" x -+ -+ let ty_of_int = function -+ | 0 -> `KnownUnknown -+ | 1 -> `Pull -+ | 2 -> `Copy -+ | 3 -> `Commit -+ | x -> `Unknown x (* newer libvirt *) -+ -+ type status = [ -+ | `Completed -+ | `Failed -+ | `Cancelled -+ | `Ready -+ | `Unknown of int -+ ] -+ -+ let string_of_status = function -+ | `Completed -> "Completed" -+ | `Failed -> "Failed" -+ | `Cancelled -> "Cancelled" -+ | `Ready -> "Ready" -+ | `Unknown x -> Printf.sprintf "Unknown Block_job.status: %d" x -+ -+ let status_of_int = function -+ | 0 -> `Completed -+ | 1 -> `Failed -+ | 2 -> `Cancelled -+ | 3 -> `Ready -+ | x -> `Unknown x -+ -+ type t = { -+ disk: string option; -+ ty: ty; -+ status: status; -+ } -+ -+ let to_string t = Printf.sprintf "{ disk = %s; ty = %s; status = %s }" -+ (string_option t.disk) -+ (string_of_ty t.ty) -+ (string_of_status t.status) -+ -+ let make (disk, ty, status) = { -+ disk = disk; -+ ty = ty_of_int ty; -+ status = status_of_int ty; -+ } -+ end -+ -+ module Disk_change = struct -+ type reason = [ -+ | `MissingOnStart -+ | `Unknown of int -+ ] -+ -+ let string_of_reason = function -+ | `MissingOnStart -> "MissingOnStart" -+ | `Unknown x -> Printf.sprintf "Unknown Disk_change.reason: %d" x -+ -+ let reason_of_int = function -+ | 0 -> `MissingOnStart -+ | x -> `Unknown x -+ -+ type t = { -+ old_src_path: string option; -+ new_src_path: string option; -+ dev_alias: string option; -+ reason: reason; -+ } -+ -+ let to_string t = -+ let o = Printf.sprintf "old_src_path = %s" (string_option t.old_src_path) in -+ let n = Printf.sprintf "new_src_path = %s" (string_option t.new_src_path) in -+ let d = Printf.sprintf "dev_alias = %s" (string_option t.dev_alias) in -+ let r = string_of_reason t.reason in -+ "{ " ^ (String.concat "; " [ o; n; d; r ]) ^ " }" -+ -+ let make (o, n, d, r) = { -+ old_src_path = o; -+ new_src_path = n; -+ dev_alias = d; -+ reason = reason_of_int r; -+ } -+ end -+ -+ module Tray_change = struct -+ type reason = [ -+ | `Open -+ | `Close -+ | `Unknown of int -+ ] -+ -+ let string_of_reason = function -+ | `Open -> "Open" -+ | `Close -> "Close" -+ | `Unknown x -> Printf.sprintf "Unknown Tray_change.reason: %d" x -+ -+ let reason_of_int = function -+ | 0 -> `Open -+ | 1 -> `Close -+ | x -> `Unknown x -+ -+ type t = { -+ dev_alias: string option; -+ reason: reason; -+ } -+ -+ let to_string t = Printf.sprintf -+ "{ dev_alias = %s; reason = %s }" -+ (string_option t.dev_alias) -+ (string_of_reason t.reason) -+ -+ let make (dev_alias, reason) = { -+ dev_alias = dev_alias; -+ reason = reason_of_int reason; -+ } -+ end -+ -+ module PM_wakeup = struct -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ let to_string = function -+ | `Unknown x -> Printf.sprintf "Unknown PM_wakeup.reason: %d" x -+ -+ let make x = `Unknown x -+ end -+ -+ module PM_suspend = struct -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ let to_string = function -+ | `Unknown x -> Printf.sprintf "Unknown PM_suspend.reason: %d" x -+ -+ let make x = `Unknown x -+ end -+ -+ module Balloon_change = struct -+ type t = int64 -+ -+ let to_string = Int64.to_string -+ let make x = x -+ end -+ -+ module PM_suspend_disk = struct -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ let to_string = function -+ | `Unknown x -> Printf.sprintf "Unknown PM_suspend_disk.reason: %d" x -+ -+ let make x = `Unknown x -+ end -+ -+ type callback = -+ | Lifecycle of ([`R] Domain.t -> Lifecycle.t -> unit) -+ | Reboot of ([`R] Domain.t -> Reboot.t -> unit) -+ | RtcChange of ([`R] Domain.t -> Rtc_change.t -> unit) -+ | Watchdog of ([`R] Domain.t -> Watchdog.t -> unit) -+ | IOError of ([`R] Domain.t -> Io_error.t -> unit) -+ | Graphics of ([`R] Domain.t -> Graphics.t -> unit) -+ | IOErrorReason of ([`R] Domain.t -> Io_error.t -> unit) -+ | ControlError of ([`R] Domain.t -> Control_error.t -> unit) -+ | BlockJob of ([`R] Domain.t -> Block_job.t -> unit) -+ | DiskChange of ([`R] Domain.t -> Disk_change.t -> unit) -+ | TrayChange of ([`R] Domain.t -> Tray_change.t -> unit) -+ | PMWakeUp of ([`R] Domain.t -> PM_wakeup.t -> unit) -+ | PMSuspend of ([`R] Domain.t -> PM_suspend.t -> unit) -+ | BalloonChange of ([`R] Domain.t -> Balloon_change.t -> unit) -+ | PMSuspendDisk of ([`R] Domain.t -> PM_suspend_disk.t -> unit) -+ -+ type callback_id = int64 -+ -+ let fresh_callback_id = -+ let next = ref 0L in -+ fun () -> -+ let result = !next in -+ next := Int64.succ !next; -+ result -+ -+ let make_table value_name = -+ let table = Hashtbl.create 16 in -+ let callback callback_id generic x = -+ if Hashtbl.mem table callback_id -+ then Hashtbl.find table callback_id generic x in -+ let _ = Callback.register value_name callback in -+ table -+ -+ let u_table = make_table "Libvirt.u_callback" -+ let i_table = make_table "Libvirt.i_callback" -+ let i64_table = make_table "Libvirt.i64_callback" -+ let i_i_table = make_table "Libvirt.i_i_callback" -+ let s_i_table = make_table "Libvirt.s_i_callback" -+ let s_i_i_table = make_table "Libvirt.s_i_i_callback" -+ let s_s_i_table = make_table "Libvirt.s_s_i_callback" -+ let s_s_i_s_table = make_table "Libvirt.s_s_i_s_callback" -+ let s_s_s_i_table = make_table "Libvirt.s_s_s_i_callback" -+ let i_ga_ga_s_gs_table = make_table "Libvirt.i_ga_ga_s_gs_callback" -+ -+ external register_default_impl : unit -> unit = "ocaml_libvirt_event_register_default_impl" -+ -+ external run_default_impl : unit -> unit = "ocaml_libvirt_event_run_default_impl" -+ -+ external register_any' : 'a Connect.t -> 'a Domain.t option -> callback -> callback_id -> int = "ocaml_libvirt_connect_domain_event_register_any" -+ -+ external deregister_any' : 'a Connect.t -> int -> unit = "ocaml_libvirt_connect_domain_event_deregister_any" -+ -+ let our_id_to_libvirt_id = Hashtbl.create 16 -+ -+ let register_any conn ?dom callback = -+ let id = fresh_callback_id () in -+ begin match callback with -+ | Lifecycle f -> -+ Hashtbl.add i_i_table id (fun dom x -> -+ f dom (Lifecycle.make x) -+ ) -+ | Reboot f -> -+ Hashtbl.add u_table id (fun dom x -> -+ f dom (Reboot.make x) -+ ) -+ | RtcChange f -> -+ Hashtbl.add i64_table id (fun dom x -> -+ f dom (Rtc_change.make x) -+ ) -+ | Watchdog f -> -+ Hashtbl.add i_table id (fun dom x -> -+ f dom (Watchdog.make x) -+ ) -+ | IOError f -> -+ Hashtbl.add s_s_i_table id (fun dom x -> -+ f dom (Io_error.make_noreason x) -+ ) -+ | Graphics f -> -+ Hashtbl.add i_ga_ga_s_gs_table id (fun dom x -> -+ f dom (Graphics.make x) -+ ) -+ | IOErrorReason f -> -+ Hashtbl.add s_s_i_s_table id (fun dom x -> -+ f dom (Io_error.make x) -+ ) -+ | ControlError f -> -+ Hashtbl.add u_table id (fun dom x -> -+ f dom (Control_error.make x) -+ ) -+ | BlockJob f -> -+ Hashtbl.add s_i_i_table id (fun dom x -> -+ f dom (Block_job.make x) -+ ) -+ | DiskChange f -> -+ Hashtbl.add s_s_s_i_table id (fun dom x -> -+ f dom (Disk_change.make x) -+ ) -+ | TrayChange f -> -+ Hashtbl.add s_i_table id (fun dom x -> -+ f dom (Tray_change.make x) -+ ) -+ | PMWakeUp f -> -+ Hashtbl.add i_table id (fun dom x -> -+ f dom (PM_wakeup.make x) -+ ) -+ | PMSuspend f -> -+ Hashtbl.add i_table id (fun dom x -> -+ f dom (PM_suspend.make x) -+ ) -+ | BalloonChange f -> -+ Hashtbl.add i64_table id (fun dom x -> -+ f dom (Balloon_change.make x) -+ ) -+ | PMSuspendDisk f -> -+ Hashtbl.add i_table id (fun dom x -> -+ f dom (PM_suspend_disk.make x) -+ ) -+ end; -+ let libvirt_id = register_any' conn dom callback id in -+ Hashtbl.replace our_id_to_libvirt_id id libvirt_id; -+ id -+ -+ let deregister_any conn id = -+ if Hashtbl.mem our_id_to_libvirt_id id then begin -+ let libvirt_id = Hashtbl.find our_id_to_libvirt_id id in -+ deregister_any' conn libvirt_id -+ end; -+ Hashtbl.remove our_id_to_libvirt_id id; -+ Hashtbl.remove u_table id; -+ Hashtbl.remove i_table id; -+ Hashtbl.remove i64_table id; -+ Hashtbl.remove i_i_table id; -+ Hashtbl.remove s_i_table id; -+ Hashtbl.remove s_i_i_table id; -+ Hashtbl.remove s_s_i_table id; -+ Hashtbl.remove s_s_i_s_table id; -+ Hashtbl.remove s_s_s_i_table id; -+ Hashtbl.remove i_ga_ga_s_gs_table id -+ -+ let timeout_table = Hashtbl.create 16 -+ let _ = -+ let callback x = -+ if Hashtbl.mem timeout_table x -+ then Hashtbl.find timeout_table x () in -+ Callback.register "Libvirt.timeout_callback" callback -+ -+ type timer_id = int64 -+ -+ external add_timeout' : 'a Connect.t -> int -> int64 -> int = "ocaml_libvirt_event_add_timeout" -+ -+ external remove_timeout' : 'a Connect.t -> int -> unit = "ocaml_libvirt_event_remove_timeout" -+ -+ let our_id_to_timer_id = Hashtbl.create 16 -+ let add_timeout conn ms fn = -+ let id = fresh_callback_id () in -+ Hashtbl.add timeout_table id fn; -+ let timer_id = add_timeout' conn ms id in -+ Hashtbl.add our_id_to_timer_id id timer_id; -+ id -+ -+ let remove_timeout conn id = -+ if Hashtbl.mem our_id_to_timer_id id then begin -+ let timer_id = Hashtbl.find our_id_to_timer_id id in -+ remove_timeout' conn timer_id -+ end; -+ Hashtbl.remove our_id_to_timer_id id; -+ Hashtbl.remove timeout_table id -+end -+ - module Network = - struct - type 'rw t -diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -index fa5a0fe..36cd113 100644 ---- a/libvirt/libvirt.mli -+++ b/libvirt/libvirt.mli -@@ -638,6 +638,361 @@ end - (** Module dealing with domains. [Domain.t] is the - domain object. *) - -+module Event : -+sig -+ -+ module Defined : sig -+ type t = [ -+ | `Added (** Newly created config file *) -+ | `Updated (** Changed config file *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Undefined : sig -+ type t = [ -+ | `Removed (** Deleted the config file *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Started : sig -+ type t = [ -+ | `Booted (** Normal startup from boot *) -+ | `Migrated (** Incoming migration from another host *) -+ | `Restored (** Restored from a state file *) -+ | `FromSnapshot (** Restored from snapshot *) -+ | `Wakeup (** Started due to wakeup event *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Suspended : sig -+ type t = [ -+ | `Paused (** Normal suspend due to admin pause *) -+ | `Migrated (** Suspended for offline migration *) -+ | `IOError (** Suspended due to a disk I/O error *) -+ | `Watchdog (** Suspended due to a watchdog firing *) -+ | `Restored (** Restored from paused state file *) -+ | `FromSnapshot (** Restored from paused snapshot *) -+ | `APIError (** suspended after failure during libvirt API call *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Resumed : sig -+ type t = [ -+ | `Unpaused (** Normal resume due to admin unpause *) -+ | `Migrated (** Resumed for completion of migration *) -+ | `FromSnapshot (** Resumed from snapshot *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Stopped : sig -+ type t = [ -+ | `Shutdown (** Normal shutdown *) -+ | `Destroyed (** Forced poweroff from host *) -+ | `Crashed (** Guest crashed *) -+ | `Migrated (** Migrated off to another host *) -+ | `Saved (** Saved to a state file *) -+ | `Failed (** Host emulator/mgmt failed *) -+ | `FromSnapshot (** offline snapshot loaded *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module PM_suspended : sig -+ type t = [ -+ | `Memory (** Guest was PM suspended to memory *) -+ | `Disk (** Guest was PM suspended to disk *) -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Lifecycle : sig -+ type t = [ -+ | `Defined of Defined.t -+ | `Undefined of Undefined.t -+ | `Started of Started.t -+ | `Suspended of Suspended.t -+ | `Resumed of Resumed.t -+ | `Stopped of Stopped.t -+ | `Shutdown (* no detail defined yet *) -+ | `PMSuspended of PM_suspended.t -+ | `Unknown of int -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Reboot : sig -+ type t = unit -+ -+ val to_string: t -> string -+ end -+ -+ module Rtc_change : sig -+ type t = int64 -+ -+ val to_string: t -> string -+ end -+ -+ module Watchdog : sig -+ type t = [ -+ | `None (** No action, watchdog ignored *) -+ | `Pause (** Guest CPUs are paused *) -+ | `Reset (** Guest CPUs are reset *) -+ | `Poweroff (** Guest is forcably powered off *) -+ | `Shutdown (** Guest is requested to gracefully shutdown *) -+ | `Debug (** No action, a debug message logged *) -+ | `Unknown of int (** newer libvirt *) -+ ] -+ -+ val to_string: t -> string -+ end -+ -+ module Io_error : sig -+ (** Represents both IOError and IOErrorReason *) -+ type action = [ -+ | `None (** No action, IO error ignored *) -+ | `Pause (** Guest CPUs are paused *) -+ | `Report (** IO error reported to guest OS *) -+ | `Unknown of int (** newer libvirt *) -+ ] -+ -+ type t = { -+ src_path: string option; (** The host file on which the I/O error occurred *) -+ dev_alias: string option; (** The guest device alias associated with the path *) -+ action: action; (** The action that is to be taken due to the IO error *) -+ reason: string option; (** The cause of the IO error *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module Graphics_address : sig -+ type family = [ -+ | `Ipv4 (** IPv4 address *) -+ | `Ipv6 (** IPv6 address *) -+ | `Unix (** UNIX socket path *) -+ | `Unknown of int (** newer libvirt *) -+ ] -+ -+ type t = { -+ family: family; (** Address family *) -+ node: string option; (** Address of node (eg IP address, or UNIX path *) -+ service: string option; (** Service name/number (eg TCP port, or NULL) *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module Graphics_subject : sig -+ type identity = { -+ ty: string option; (** Type of identity *) -+ name: string option; (** Identity value *) -+ } -+ -+ type t = identity list -+ -+ val to_string: t -> string -+ end -+ -+ module Graphics : sig -+ type phase = [ -+ | `Connect (** Initial socket connection established *) -+ | `Initialize (** Authentication & setup completed *) -+ | `Disconnect (** Final socket disconnection *) -+ | `Unknown of int (** newer libvirt *) -+ ] -+ -+ type t = { -+ phase: phase; (** the phase of the connection *) -+ local: Graphics_address.t; (** the local server address *) -+ remote: Graphics_address.t; (** the remote client address *) -+ auth_scheme: string option; (** the authentication scheme activated *) -+ subject: Graphics_subject.t; (** the authenticated subject (user) *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module Control_error : sig -+ type t = unit -+ -+ val to_string: t -> string -+ end -+ -+ module Block_job : sig -+ type ty = [ -+ | `KnownUnknown (** explicitly named UNKNOWN in the spec *) -+ | `Pull -+ | `Copy -+ | `Commit -+ | `Unknown of int -+ ] -+ -+ type status = [ -+ | `Completed -+ | `Failed -+ | `Cancelled -+ | `Ready -+ | `Unknown of int -+ ] -+ -+ type t = { -+ disk: string option; (** fully-qualified name of the affected disk *) -+ ty: ty; (** type of block job *) -+ status: status; (** final status of the operation *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module Disk_change : sig -+ type reason = [ -+ | `MissingOnStart -+ | `Unknown of int -+ ] -+ -+ type t = { -+ old_src_path: string option; (** old source path *) -+ new_src_path: string option; (** new source path *) -+ dev_alias: string option; (** device alias name *) -+ reason: reason; (** reason why this callback was called *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module Tray_change : sig -+ type reason = [ -+ | `Open -+ | `Close -+ | `Unknown of int -+ ] -+ -+ type t = { -+ dev_alias: string option; (** device alias *) -+ reason: reason; (** why the tray status was changed *) -+ } -+ -+ val to_string: t -> string -+ end -+ -+ module PM_wakeup : sig -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ val to_string: t -> string -+ end -+ -+ module PM_suspend : sig -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ val to_string: t -> string -+ end -+ -+ module Balloon_change : sig -+ type t = int64 -+ -+ val to_string: t -> string -+ end -+ -+ module PM_suspend_disk : sig -+ type reason = [ -+ | `Unknown of int -+ ] -+ -+ type t = reason -+ -+ val to_string: t -> string -+ end -+ -+ -+ type callback = -+ | Lifecycle of ([`R] Domain.t -> Lifecycle.t -> unit) -+ | Reboot of ([`R] Domain.t -> Reboot.t -> unit) -+ | RtcChange of ([`R] Domain.t -> Rtc_change.t -> unit) -+ | Watchdog of ([`R] Domain.t -> Watchdog.t -> unit) -+ | IOError of ([`R] Domain.t -> Io_error.t -> unit) -+ | Graphics of ([`R] Domain.t -> Graphics.t -> unit) -+ | IOErrorReason of ([`R] Domain.t -> Io_error.t -> unit) -+ | ControlError of ([`R] Domain.t -> Control_error.t -> unit) -+ | BlockJob of ([`R] Domain.t -> Block_job.t -> unit) -+ | DiskChange of ([`R] Domain.t -> Disk_change.t -> unit) -+ | TrayChange of ([`R] Domain.t -> Tray_change.t -> unit) -+ | PMWakeUp of ([`R] Domain.t -> PM_wakeup.t -> unit) -+ | PMSuspend of ([`R] Domain.t -> PM_suspend.t -> unit) -+ | BalloonChange of ([`R] Domain.t -> Balloon_change.t -> unit) -+ | PMSuspendDisk of ([`R] Domain.t -> PM_suspend_disk.t -> unit) -+ -+ (** type of a registered call back function *) -+ -+ val register_default_impl : unit -> unit -+ (** Registers the default event loop based on poll(). This -+ must be done before connections are opened. -+ -+ Once registered call run_default_impl in a loop. *) -+ -+ val run_default_impl : unit -> unit -+ (** Runs one iteration of the event loop. Applications will -+ generally want to have a thread which invokes this in an -+ infinite loop. *) -+ -+ type callback_id -+ (** an individual event registration *) -+ -+ val register_any : 'a Connect.t -> ?dom:'a Domain.t -> callback -> callback_id -+ (** [register_any con ?dom callback] registers [callback] -+ to receive notification of arbitrary domain events. Return -+ a registration id which can be used in [deregister_any]. -+ -+ If [?dom] is None then register for this kind of event on -+ all domains. If [dom] is [Some d] then register for this -+ kind of event only on [d]. -+ *) -+ -+ val deregister_any : 'a Connect.t -> callback_id -> unit -+ (** [deregister_any con id] deregisters the previously registered -+ callback with id [id]. *) -+ -+ type timer_id -+ (** an individual timer event *) -+ -+ val add_timeout : 'a Connect.t -> int -> (unit -> unit) -> timer_id -+ (** [add_timeout con ms cb] registers [cb] as a timeout callback -+ which will be called every [ms] milliseconds *) -+ -+ val remove_timeout : 'a Connect.t -> timer_id -> unit -+ (** [remove_timeout con t] deregisters timeout callback [t]. *) -+ -+end -+ (** Module dealing with events generated by domain -+ state changes. *) -+ - (** {3 Networks} *) - - module Network : -diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c -index 00dbbbc..71e6f61 100644 ---- a/libvirt/libvirt_c.c -+++ b/libvirt/libvirt_c.c -@@ -484,6 +484,25 @@ ocaml_libvirt_connect_get_capabilities (value connv) - CAMLreturn (rv); - } - -+/* Automatically generated binding for virConnectDomainEventDeregisterAny. -+ * In generator.pl this function has signature "conn, int : unit". -+ */ -+ -+CAMLprim value -+ocaml_libvirt_connect_domain_event_deregister_any (value connv, value iv) -+{ -+ CAMLparam2 (connv, iv); -+ -+ virConnectPtr conn = Connect_val (connv); -+ int i = Int_val (iv); -+ int r; -+ -+ NONBLOCKING (r = virConnectDomainEventDeregisterAny (conn, i)); -+ CHECK_ERROR (r == -1, conn, "virConnectDomainEventDeregisterAny"); -+ -+ CAMLreturn (Val_unit); -+} -+ - /* Automatically generated binding for virDomainCreateLinux. - * In generator.pl this function has signature "conn, string, 0U : dom". - */ -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index c51aad7..3bb572f 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -740,6 +740,417 @@ ocaml_libvirt_domain_memory_peek_bytecode (value *argv, int argn) - argv[3], argv[4], argv[5]); - } - -+/*----------------------------------------------------------------------*/ -+ -+/* Domain events */ -+ -+CAMLprim value -+ocaml_libvirt_event_register_default_impl (value unitv) -+{ -+ CAMLparam1 (unitv); -+ -+ /* arg is of type unit = void */ -+ int r; -+ -+ NONBLOCKING (r = virEventRegisterDefaultImpl ()); -+ /* must be called before connection, therefore we can't use CHECK_ERROR */ -+ if (r == -1) caml_failwith("virEventRegisterDefaultImpl"); -+ -+ CAMLreturn (Val_unit); -+} -+ -+CAMLprim value -+ocaml_libvirt_event_run_default_impl (value unitv) -+{ -+ CAMLparam1 (unitv); -+ -+ /* arg is of type unit = void */ -+ int r; -+ -+ NONBLOCKING (r = virEventRunDefaultImpl ()); -+ if (r == -1) caml_failwith("virEventRunDefaultImpl"); -+ -+ CAMLreturn (Val_unit); -+} -+ -+/* We register a single C callback function for every distinct -+ callback signature. We encode the signature itself in the function -+ name and also in the name of the assocated OCaml callback -+ e.g.: -+ a C function called -+ i_i64_s_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ int x, -+ long y, -+ char *z, -+ void *opaque) -+ would correspond to an OCaml callback -+ Libvirt.i_i64_s_callback : -+ int64 -> [`R] Domain.t -> int -> int64 -> string option -> unit -+ where the initial int64 is a unique ID used by the OCaml to -+ dispatch to the specific OCaml closure and stored by libvirt -+ as the "opaque" data. */ -+ -+/* Every one of the callbacks starts with a DOMAIN_CALLBACK_BEGIN(NAME) -+ where NAME is the string name of the OCaml callback registered -+ in libvirt.ml. */ -+#define DOMAIN_CALLBACK_BEGIN(NAME) \ -+ value connv, domv, callback_id, result; \ -+ connv = domv = callback_id = result = Val_int(0); \ -+ static value *callback = NULL; \ -+ caml_leave_blocking_section(); \ -+ if (callback == NULL) \ -+ callback = caml_named_value(NAME); \ -+ if (callback == NULL) \ -+ abort(); /* C code out of sync with OCaml code */ \ -+ if ((virDomainRef(dom) == -1) || (virConnectRef(conn) == -1)) \ -+ abort(); /* should never happen in practice? */ \ -+ \ -+ Begin_roots4(connv, domv, callback_id, result); \ -+ connv = Val_connect(conn); \ -+ domv = Val_domain(dom, connv); \ -+ callback_id = caml_copy_int64(*(long *)opaque); -+ -+/* Every one of the callbacks ends with a CALLBACK_END */ -+#define DOMAIN_CALLBACK_END \ -+ (void) caml_callback3(*callback, callback_id, domv, result); \ -+ End_roots(); \ -+ caml_enter_blocking_section(); -+ -+ -+static void -+i_i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ int x, -+ int y, -+ void * opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.i_i_callback") -+ result = caml_alloc_tuple(2); -+ Store_field(result, 0, Val_int(x)); -+ Store_field(result, 1, Val_int(y)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+u_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ void *opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.u_callback") -+ result = Val_int(0); /* () */ -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+i64_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ long long int64, -+ void *opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.i64_callback") -+ result = caml_copy_int64(int64); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ int x, -+ void *opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.i_callback") -+ result = Val_int(x); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+s_i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ char *x, -+ int y, -+ void * opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.s_i_callback") -+ result = caml_alloc_tuple(2); -+ Store_field(result, 0, -+ Val_opt(x, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, Val_int(y)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+s_i_i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ char *x, -+ int y, -+ int z, -+ void * opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.s_i_i_callback") -+ result = caml_alloc_tuple(3); -+ Store_field(result, 0, -+ Val_opt(x, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, Val_int(y)); -+ Store_field(result, 2, Val_int(z)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+s_s_i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ char *x, -+ char *y, -+ int z, -+ void *opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_i_callback") -+ result = caml_alloc_tuple(3); -+ Store_field(result, 0, -+ Val_opt(x, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, -+ Val_opt(y, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 2, Val_int(z)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+s_s_i_s_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ char *x, -+ char *y, -+ int z, -+ char *a, -+ void *opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_i_s_callback") -+ result = caml_alloc_tuple(4); -+ Store_field(result, 0, -+ Val_opt(x, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, -+ Val_opt(y, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 2, Val_int(z)); -+ Store_field(result, 3, -+ Val_opt(a, (Val_ptr_t) caml_copy_string)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+s_s_s_i_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ char * x, -+ char * y, -+ char * z, -+ int a, -+ void * opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.s_s_s_i_callback") -+ result = caml_alloc_tuple(4); -+ Store_field(result, 0, -+ Val_opt(x, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, -+ Val_opt(y, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 2, -+ Val_opt(z, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 3, Val_int(a)); -+ DOMAIN_CALLBACK_END -+} -+ -+static value -+Val_event_graphics_address(virDomainEventGraphicsAddressPtr x) -+{ -+ CAMLparam0 (); -+ CAMLlocal1(result); -+ result = caml_alloc_tuple(3); -+ Store_field(result, 0, Val_int(x->family)); -+ Store_field(result, 1, -+ Val_opt((void *) x->node, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 2, -+ Val_opt((void *) x->service, (Val_ptr_t) caml_copy_string)); -+ CAMLreturn(result); -+} -+ -+static value -+Val_event_graphics_subject_identity(virDomainEventGraphicsSubjectIdentityPtr x) -+{ -+ CAMLparam0 (); -+ CAMLlocal1(result); -+ result = caml_alloc_tuple(2); -+ Store_field(result, 0, -+ Val_opt((void *) x->type, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 1, -+ Val_opt((void *) x->name, (Val_ptr_t) caml_copy_string)); -+ CAMLreturn(result); -+ -+} -+ -+static value -+Val_event_graphics_subject(virDomainEventGraphicsSubjectPtr x) -+{ -+ CAMLparam0 (); -+ CAMLlocal1(result); -+ int i; -+ result = caml_alloc_tuple(x->nidentity); -+ for (i = 0; i < x->nidentity; i++ ) -+ Store_field(result, i, -+ Val_event_graphics_subject_identity(x->identities + i)); -+ CAMLreturn(result); -+} -+ -+static void -+i_ga_ga_s_gs_callback(virConnectPtr conn, -+ virDomainPtr dom, -+ int i1, -+ virDomainEventGraphicsAddressPtr ga1, -+ virDomainEventGraphicsAddressPtr ga2, -+ char *s1, -+ virDomainEventGraphicsSubjectPtr gs1, -+ void * opaque) -+{ -+ DOMAIN_CALLBACK_BEGIN("Libvirt.i_ga_ga_s_gs_callback") -+ result = caml_alloc_tuple(5); -+ Store_field(result, 0, Val_int(i1)); -+ Store_field(result, 1, Val_event_graphics_address(ga1)); -+ Store_field(result, 2, Val_event_graphics_address(ga2)); -+ Store_field(result, 3, -+ Val_opt(s1, (Val_ptr_t) caml_copy_string)); -+ Store_field(result, 4, Val_event_graphics_subject(gs1)); -+ DOMAIN_CALLBACK_END -+} -+ -+static void -+timeout_callback(int timer, void *opaque) -+{ -+ value callback_id, result; -+ callback_id = result = Val_int(0); -+ static value *callback = NULL; -+ caml_leave_blocking_section(); -+ if (callback == NULL) -+ callback = caml_named_value("Libvirt.timeout_callback"); -+ if (callback == NULL) -+ abort(); /* C code out of sync with OCaml code */ -+ -+ Begin_roots2(callback_id, result); -+ callback_id = caml_copy_int64(*(long *)opaque); -+ -+ (void)caml_callback_exn(*callback, callback_id); -+ End_roots(); -+ caml_enter_blocking_section(); -+} -+ -+CAMLprim value -+ocaml_libvirt_event_add_timeout (value connv, value ms, value callback_id) -+{ -+ CAMLparam3 (connv, ms, callback_id); -+ virConnectPtr conn = Connect_val (connv); -+ void *opaque; -+ virFreeCallback freecb = free; -+ virEventTimeoutCallback cb = timeout_callback; -+ -+ int r; -+ -+ /* Store the int64 callback_id as the opaque data so the OCaml -+ callback can demultiplex to the correct OCaml handler. */ -+ if ((opaque = malloc(sizeof(long))) == NULL) -+ caml_failwith ("virEventAddTimeout: malloc"); -+ *((long*)opaque) = Int64_val(callback_id); -+ NONBLOCKING(r = virEventAddTimeout(Int_val(ms), cb, opaque, freecb)); -+ CHECK_ERROR(r == -1, conn, "virEventAddTimeout"); -+ -+ CAMLreturn(Val_int(r)); -+} -+ -+CAMLprim value -+ocaml_libvirt_event_remove_timeout (value connv, value timer_id) -+{ -+ CAMLparam2 (connv, timer_id); -+ virConnectPtr conn = Connect_val (connv); -+ int r; -+ -+ NONBLOCKING(r = virEventRemoveTimeout(Int_val(timer_id))); -+ CHECK_ERROR(r == -1, conn, "virEventRemoveTimeout"); -+ -+ CAMLreturn(Val_int(r)); -+} -+ -+CAMLprim value -+ocaml_libvirt_connect_domain_event_register_any(value connv, value domv, value callback, value callback_id) -+{ -+ CAMLparam4(connv, domv, callback, callback_id); -+ -+ virConnectPtr conn = Connect_val (connv); -+ virDomainPtr dom = NULL; -+ int eventID = Tag_val(callback); -+ -+ virConnectDomainEventGenericCallback cb; -+ void *opaque; -+ virFreeCallback freecb = free; -+ int r; -+ -+ if (domv != Val_int(0)) -+ dom = Domain_val (Field(domv, 0)); -+ -+ switch (eventID){ -+ case VIR_DOMAIN_EVENT_ID_LIFECYCLE: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_REBOOT: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(u_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_WATCHDOG: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_IO_ERROR: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_GRAPHICS: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_ga_ga_s_gs_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_i_s_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(u_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_BLOCK_JOB: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(s_i_i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_DISK_CHANGE: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(s_s_s_i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_TRAY_CHANGE: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(s_i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_PMWAKEUP: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_PMSUSPEND: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); -+ break; -+ case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: -+ cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); -+ break; -+ default: -+ caml_failwith("vifConnectDomainEventRegisterAny: unimplemented eventID"); -+ } -+ -+ /* Store the int64 callback_id as the opaque data so the OCaml -+ callback can demultiplex to the correct OCaml handler. */ -+ if ((opaque = malloc(sizeof(long))) == NULL) -+ caml_failwith ("virConnectDomainEventRegisterAny: malloc"); -+ *((long*)opaque) = Int64_val(callback_id); -+ NONBLOCKING(r = virConnectDomainEventRegisterAny(conn, dom, eventID, cb, opaque, freecb)); -+ CHECK_ERROR(r == -1, conn, "virConnectDomainEventRegisterAny"); -+ -+ CAMLreturn(Val_int(r)); -+} -+ - CAMLprim value - ocaml_libvirt_storage_pool_get_info (value poolv) - { diff --git a/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d b/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d deleted file mode 100644 index 59c0c15d..00000000 --- a/SOURCES/ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d +++ /dev/null @@ -1,214 +0,0 @@ -commit 658970236caa31bbef44562c521d55b9a4689f4d -Author: David Scott -Date: Wed Apr 24 11:39:06 2013 +0100 - - Add a simple example to show how to receive event callbacks - - Signed-off-by: David Scott - -diff --git a/.gitignore b/.gitignore -index 2b5e4fd..71a245e 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -26,6 +26,7 @@ core.* - *.exe - *~ - libvirt/libvirt_version.ml -+examples/domain_events - examples/get_cpu_stats - examples/list_domains - examples/node_info -diff --git a/Makefile.in b/Makefile.in -index c0622cc..3b8b7ec 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -40,6 +40,7 @@ clean: - rm -f examples/list_domains - rm -f examples/node_info - rm -f examples/get_cpu_stats -+ rm -f examples/domain_events - - distclean: clean - rm -f config.h config.log config.status configure -diff --git a/examples/Makefile.in b/examples/Makefile.in -index 2eb220a..041e382 100644 ---- a/examples/Makefile.in -+++ b/examples/Makefile.in -@@ -27,7 +27,7 @@ OCAMLOPTLIBS := $(OCAMLCLIBS) - export LIBRARY_PATH=../libvirt - export LD_LIBRARY_PATH=../libvirt - --BYTE_TARGETS := list_domains node_info get_cpu_stats -+BYTE_TARGETS := list_domains node_info get_cpu_stats domain_events - OPT_TARGETS := $(BYTE_TARGETS:%=%.opt) - - all: $(BYTE_TARGETS) -@@ -64,6 +64,17 @@ get_cpu_stats.opt: get_cpu_stats.cmx - $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ - ../libvirt/mllibvirt.cmxa -o $@ $< - -+domain_events: domain_events.cmo -+ $(OCAMLFIND) ocamlc \ -+ $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \ -+ ../libvirt/mllibvirt.cma -o $@ $< -+ -+domain_events.opt: domain_events.cmx -+ $(OCAMLFIND) ocamlopt \ -+ $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ -+ ../libvirt/mllibvirt.cmxa -o $@ $< -+ -+ - install-opt install-byte: - - include ../Make.rules -diff --git a/examples/domain_events.ml b/examples/domain_events.ml -new file mode 100644 -index 0000000..03cecd9 ---- /dev/null -+++ b/examples/domain_events.ml -@@ -0,0 +1,145 @@ -+(* Simple demo program showing how to receive domain events. -+ Usage: domain_events [URI] -+ (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. -+ (C) Copyright 2013 Citrix Inc -+ http://libvirt.org/ -+ *) -+ -+open Printf -+ -+module C = Libvirt.Connect -+module D = Libvirt.Domain -+module E = Libvirt.Event -+module N = Libvirt.Network -+ -+let string_of_state = function -+ | D.InfoNoState -> "no state" -+ | D.InfoRunning -> "running" -+ | D.InfoBlocked -> "blocked" -+ | D.InfoPaused -> "paused" -+ | D.InfoShutdown -> "shutdown" -+ | D.InfoShutoff -> "shutoff" -+ | D.InfoCrashed -> "crashed" -+ -+let printd dom fmt = -+ let prefix dom = -+ let id = D.get_id dom in -+ try -+ let name = D.get_name dom in -+ let info = D.get_info dom in -+ let state = string_of_state info.D.state in -+ sprintf "%8d %-20s %s " id name state -+ with _ -> -+ sprintf "%8d " id in -+ let write x = -+ output_string stdout (prefix dom); -+ output_string stdout x; -+ output_string stdout "\n"; -+ flush stdout in -+ Printf.ksprintf write fmt -+ -+let string_option = function -+ | None -> "None" -+ | Some x -> "Some " ^ x -+ -+let string_of_graphics_address (family, node, service) = -+ Printf.sprintf "{ family=%d; node=%s; service=%s }" family (string_option node) (string_option service) -+ -+let string_of_graphics_subject_identity (ty, name) = -+ Printf.sprintf "{ type=%s; name=%s }" (string_option ty) (string_option name) -+ -+let string_of_graphics_subject xs = String.concat "; " (List.map string_of_graphics_subject_identity (Array.to_list xs)) -+ -+let map_option f = function -+ | None -> None -+ | Some x -> Some (f x) -+ -+let () = -+ try -+ E.register_default_impl (); -+ let name = -+ if Array.length Sys.argv >= 2 then -+ Some (Sys.argv.(1)) -+ else -+ None in -+ let conn = C.connect_readonly ?name () in -+ -+ let spinner = [| '|'; '/'; '-'; '\\' |] in -+ -+ let timeouts = ref 0 in -+ (* Check add/remove works *) -+ let id = E.add_timeout conn 250 (fun () -> Printf.printf "This callback is immediately deregistered\n%!") in -+ E.remove_timeout conn id; -+ -+ let (_: E.timer_id) = E.add_timeout conn 250 (* ms *) -+ (fun () -> -+ incr timeouts; -+ Printf.printf "\r%c %d timeout callbacks%!" (spinner.(!timeouts mod (Array.length spinner))) !timeouts; -+ (* Check for GC errors: *) -+ Gc.compact () -+ ) in -+ -+ (* Check add/remove works *) -+ let id = E.register_any conn (E.Lifecycle (fun dom e -> -+ printd dom "Removed Lifecycle callback %s" (E.Lifecycle.to_string e) -+ )) in -+ E.deregister_any conn id; -+ -+ let (_: E.callback_id) = E.register_any conn (E.Lifecycle (fun dom e -> -+ printd dom "Lifecycle %s" (E.Lifecycle.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.Reboot (fun dom e -> -+ printd dom "Reboot %s" (E.Reboot.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.RtcChange (fun dom e -> -+ printd dom "RtcChange %s" (E.Rtc_change.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.Watchdog (fun dom e -> -+ printd dom "Watchdog %s" (E.Watchdog.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.IOError (fun dom e -> -+ printd dom "IOError %s" (E.Io_error.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.IOErrorReason (fun dom e -> -+ printd dom "IOErrorReason %s" (E.Io_error.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.Graphics (fun dom e -> -+ printd dom "Graphics %s" (E.Graphics.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.ControlError (fun dom e -> -+ printd dom "ControlError %s" (E.Control_error.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.BlockJob (fun dom e -> -+ printd dom "BlockJob %s" (E.Block_job.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.DiskChange (fun dom e -> -+ printd dom "DiskChange %s" (E.Disk_change.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.TrayChange (fun dom e -> -+ printd dom "TrayChange %s" (E.Tray_change.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.PMWakeUp (fun dom e -> -+ printd dom "PMWakeup %s" (E.PM_wakeup.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.PMSuspend (fun dom e -> -+ printd dom "PMSuspend %s" (E.PM_suspend.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.BalloonChange (fun dom e -> -+ printd dom "BalloonChange %s" (E.Balloon_change.to_string e) -+ )) in -+ let (_: E.callback_id) = E.register_any conn (E.PMSuspendDisk (fun dom x -> -+ printd dom "PMSuspendDisk %s" (E.PM_suspend_disk.to_string x) -+ )) in -+ C.set_keep_alive conn 5 3; -+ while true do -+ E.run_default_impl () -+ done -+ with -+ Libvirt.Virterror err -> -+ eprintf "error: %s\n" (Libvirt.Virterror.to_string err) -+ -+let () = -+ (* Run the garbage collector which is a good way to check for -+ * memory corruption errors and reference counting issues in libvirt. -+ *) -+ Gc.compact () diff --git a/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 b/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 deleted file mode 100644 index ca9cbc4c..00000000 --- a/SOURCES/ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 +++ /dev/null @@ -1,18 +0,0 @@ -commit 31ce6b280a2d987abc484b8f8d1e6cb25a70d737 -Author: Richard W.M. Jones -Date: Wed May 8 12:31:26 2013 +0100 - - Update dependencies. - -diff --git a/examples/.depend b/examples/.depend -index 3d955f9..b305b76 100644 ---- a/examples/.depend -+++ b/examples/.depend -@@ -2,5 +2,7 @@ node_info.cmo : ../libvirt/libvirt.cmi - node_info.cmx : ../libvirt/libvirt.cmx - get_cpu_stats.cmo : ../libvirt/libvirt.cmi - get_cpu_stats.cmx : ../libvirt/libvirt.cmx -+domain_events.cmo : ../libvirt/libvirt.cmi -+domain_events.cmx : ../libvirt/libvirt.cmx - list_domains.cmo : ../libvirt/libvirt.cmi - list_domains.cmx : ../libvirt/libvirt.cmx diff --git a/SOURCES/ocaml-libvirt-13-fixbuild b/SOURCES/ocaml-libvirt-13-fixbuild deleted file mode 100644 index 43ab4402..00000000 --- a/SOURCES/ocaml-libvirt-13-fixbuild +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/examples/.depend b/examples/.depend -index b305b76..b5379d8 100644 ---- a/examples/.depend -+++ b/examples/.depend -@@ -1,8 +1,8 @@ --node_info.cmo : ../libvirt/libvirt.cmi --node_info.cmx : ../libvirt/libvirt.cmx --get_cpu_stats.cmo : ../libvirt/libvirt.cmi --get_cpu_stats.cmx : ../libvirt/libvirt.cmx - domain_events.cmo : ../libvirt/libvirt.cmi - domain_events.cmx : ../libvirt/libvirt.cmx -+get_cpu_stats.cmo : ../libvirt/libvirt.cmi -+get_cpu_stats.cmx : ../libvirt/libvirt.cmx - list_domains.cmo : ../libvirt/libvirt.cmi - list_domains.cmx : ../libvirt/libvirt.cmx -+node_info.cmo : ../libvirt/libvirt.cmi -+node_info.cmx : ../libvirt/libvirt.cmx -diff --git a/libvirt/.depend b/libvirt/.depend -index 7d32e13..97ce8e6 100644 ---- a/libvirt/.depend -+++ b/libvirt/.depend -@@ -1,6 +1,6 @@ --libvirt_version.cmi : - libvirt.cmi : --libvirt_version.cmo : libvirt_version.cmi --libvirt_version.cmx : libvirt_version.cmi -+libvirt_version.cmi : - libvirt.cmo : libvirt.cmi - libvirt.cmx : libvirt.cmi -+libvirt_version.cmo : libvirt_version.cmi -+libvirt_version.cmx : libvirt_version.cmi -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index 3bb572f..7694c74 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -1133,9 +1133,11 @@ ocaml_libvirt_connect_domain_event_register_any(value connv, value domv, value c - case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: - cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); - break; -+#if 0 - case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: - cb = VIR_DOMAIN_EVENT_CALLBACK(i_callback); - break; -+#endif - default: - caml_failwith("vifConnectDomainEventRegisterAny: unimplemented eventID"); - } diff --git a/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 b/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 deleted file mode 100644 index 24dd472d..00000000 --- a/SOURCES/ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 +++ /dev/null @@ -1,263 +0,0 @@ -commit c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 -Author: Richard W.M. Jones -Date: Fri Oct 12 11:48:17 2012 +0100 - - Add contrib directory, and non-upstream patch to add Domain.get_cpu_stats_total. - - This patch needs more thorough review. - -diff --git a/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch b/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch -new file mode 100644 -index 0000000..d4a496d ---- /dev/null -+++ b/contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch -@@ -0,0 +1,249 @@ -+From 99ba7e0eae5ea7567aded458ab63c5984ed43191 Mon Sep 17 00:00:00 2001 -+From: Hu Tao -+Date: Wed, 9 May 2012 16:48:31 +0800 -+Subject: [PATCH] Add Libvirt.Domain.get_cpu_stats_total. -+ -+Original patch by Hu Tao. -+ -+RWMJ modified the patch to split this into two functions -+(old get_cpu_stats and new get_cpu_stats_total). Apart -+from that split, the code is identical. -+--- -+ examples/.depend | 12 +++--- -+ examples/get_cpu_stats.ml | 48 +++++++++++++----------- -+ libvirt/.depend | 12 +++--- -+ libvirt/libvirt.ml | 1 + -+ libvirt/libvirt.mli | 6 ++- -+ libvirt/libvirt_c_oneoffs.c | 89 +++++++++++++++++++++++++++++++++++++++++++++ -+ 6 files changed, 134 insertions(+), 34 deletions(-) -+ -+diff --git a/examples/.depend b/examples/.depend -+index f58db3d..3d955f9 100644 -+--- a/examples/.depend -++++ b/examples/.depend -+@@ -1,6 +1,6 @@ -+-get_cpu_stats.cmo: ../libvirt/libvirt.cmi -+-get_cpu_stats.cmx: ../libvirt/libvirt.cmx -+-list_domains.cmo: ../libvirt/libvirt.cmi -+-list_domains.cmx: ../libvirt/libvirt.cmx -+-node_info.cmo: ../libvirt/libvirt.cmi -+-node_info.cmx: ../libvirt/libvirt.cmx -++node_info.cmo : ../libvirt/libvirt.cmi -++node_info.cmx : ../libvirt/libvirt.cmx -++get_cpu_stats.cmo : ../libvirt/libvirt.cmi -++get_cpu_stats.cmx : ../libvirt/libvirt.cmx -++list_domains.cmo : ../libvirt/libvirt.cmi -++list_domains.cmx : ../libvirt/libvirt.cmx -+diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml -+index d7a8d0c..10b3840 100644 -+--- a/examples/get_cpu_stats.ml -++++ b/examples/get_cpu_stats.ml -+@@ -18,32 +18,38 @@ let () = -+ let domname = Sys.argv.(1) in -+ -+ let conn = C.connect_readonly () in -+- -+- let nr_pcpus = -+- let info = C.get_node_info conn in -+- C.maxcpus_of_node_info info in -+- -+- let stats = -+- let dom = D.lookup_by_name conn domname in -+- D.get_cpu_stats dom in -++ let dom = D.lookup_by_name conn domname in -++ let stats = D.get_cpu_stats dom in -++ let total_stats = D.get_cpu_stats_total dom in -++ -++ let print_params n params = -++ List.iter ( -++ fun (name, value) -> -++ printf " %s=" name; -++ match value with -++ | D.TypedFieldInt32 i -> printf "%ld" i -++ | D.TypedFieldUInt32 i -> printf "%ld" i -++ | D.TypedFieldInt64 i -> printf "%Ld" i -++ | D.TypedFieldUInt64 i -> printf "%Ld" i -++ | D.TypedFieldFloat f -> printf "%g" f -++ | D.TypedFieldBool b -> printf "%b" b -++ | D.TypedFieldString s -> printf "%S" s -++ ) params in -+ -+ Array.iteri ( -+ fun n params -> -+ printf "pCPU %d:" n; -+- List.iter ( -+- fun (name, value) -> -+- printf " %s=" name; -+- match value with -+- | D.TypedFieldInt32 i -> printf "%ld" i -+- | D.TypedFieldUInt32 i -> printf "%ld" i -+- | D.TypedFieldInt64 i -> printf "%Ld" i -+- | D.TypedFieldUInt64 i -> printf "%Ld" i -+- | D.TypedFieldFloat f -> printf "%g" f -+- | D.TypedFieldBool b -> printf "%b" b -+- | D.TypedFieldString s -> printf "%S" s -+- ) params; -++ print_params n params; -+ printf "\n" -+- ) stats -++ ) stats; -++ -++ Array.iteri ( -++ fun n params -> -++ printf "total:"; -++ print_params n params; -++ printf "\n" -++ ) total_stats -++ -+ with -+ Libvirt.Virterror err -> -+ eprintf "error: %s\n" (Libvirt.Virterror.to_string err) -+diff --git a/libvirt/.depend b/libvirt/.depend -+index 3f2297e..7d32e13 100644 -+--- a/libvirt/.depend -++++ b/libvirt/.depend -+@@ -1,6 +1,6 @@ -+-libvirt.cmi: -+-libvirt_version.cmi: -+-libvirt.cmo: libvirt.cmi -+-libvirt.cmx: libvirt.cmi -+-libvirt_version.cmo: libvirt_version.cmi -+-libvirt_version.cmx: libvirt_version.cmi -++libvirt_version.cmi : -++libvirt.cmi : -++libvirt_version.cmo : libvirt_version.cmi -++libvirt_version.cmx : libvirt_version.cmi -++libvirt.cmo : libvirt.cmi -++libvirt.cmx : libvirt.cmi -+diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -+index 07542a9..2997b0b 100644 -+--- a/libvirt/libvirt.ml -++++ b/libvirt/libvirt.ml -+@@ -418,6 +418,7 @@ struct -+ external pin_vcpu : [>`W] t -> int -> string -> unit = "ocaml_libvirt_domain_pin_vcpu" -+ external get_vcpus : [>`R] t -> int -> int -> int * vcpu_info array * string = "ocaml_libvirt_domain_get_vcpus" -+ external get_cpu_stats : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats" -++ external get_cpu_stats_total : [>`R] t -> typed_param list array = "ocaml_libvirt_domain_get_cpu_stats_total" -+ external get_max_vcpus : [>`R] t -> int = "ocaml_libvirt_domain_get_max_vcpus" -+ external attach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_attach_device" -+ external detach_device : [>`W] t -> xml -> unit = "ocaml_libvirt_domain_detach_device" -+diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -+index 5a288c0..020be59 100644 -+--- a/libvirt/libvirt.mli -++++ b/libvirt/libvirt.mli -+@@ -560,7 +560,11 @@ sig -+ of the array and bitmap returned from this function. -+ *) -+ val get_cpu_stats : [>`R] t -> typed_param list array -+- (** [get_pcpu_stats dom] returns the physical CPU stats -++ (** [get_cpu_stats dom] returns the per-CPU physical CPU stats -++ for a domain. See the libvirt documentation for details. -++ *) -++ val get_cpu_stats_total : [>`R] t -> typed_param list array -++ (** [get_cpu_stats dom] returns the total physical CPU stats -+ for a domain. See the libvirt documentation for details. -+ *) -+ val get_max_vcpus : [>`R] t -> int -+diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -+index 70cf96f..2a1850f 100644 -+--- a/libvirt/libvirt_c_oneoffs.c -++++ b/libvirt/libvirt_c_oneoffs.c -+@@ -638,6 +638,95 @@ ocaml_libvirt_domain_get_cpu_stats (value domv) -+ #endif -+ } -+ -++CAMLprim value -++ocaml_libvirt_domain_get_cpu_stats_total (value domv) -++{ -++#ifdef HAVE_VIRDOMAINGETCPUSTATS -++ CAMLparam1 (domv); -++ CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); -++ CAMLlocal1 (v); -++ virDomainPtr dom = Domain_val (domv); -++ virConnectPtr conn = Connect_domv (domv); -++ virTypedParameterPtr params; -++ int r, nparams, j, pos; -++ -++ /* get total information */ -++ NONBLOCKING (nparams = virDomainGetCPUStats(dom, NULL, 0, -1, 1, 0)); -++ CHECK_ERROR (nparams < 0, conn, "virDomainGetCPUStats"); -++ -++ if ((params = malloc(sizeof(*params) * nparams)) == NULL) -++ caml_failwith ("virDomainGetCPUStats: malloc"); -++ -++ cpustats = caml_alloc (1, 0); /* cpustats: array of params(list of typed_param) */ -++ -++ NONBLOCKING (r = virDomainGetCPUStats(dom, params, nparams, -1, 1, 0)); -++ CHECK_ERROR (r < 0, conn, "virDomainGetCPUStats"); -++ -++ param_head = Val_emptylist; -++ if (params[nparams].type != 0) { -++ for (j = r - 1; j >= 0; j--) { -++ pos = j; -++ -++ param_node = caml_alloc(2, 0); /* param_node: typed_param, next param_node */ -++ Store_field(param_node, 1, param_head); -++ param_head = param_node; -++ -++ typed_param = caml_alloc(2, 0); /* typed_param: field name(string), typed_param_value */ -++ Store_field(param_node, 0, typed_param); -++ Store_field(typed_param, 0, caml_copy_string(params[pos].field)); -++ -++ /* typed_param_value: value with the corresponding type tag */ -++ switch(params[pos].type) { -++ case VIR_TYPED_PARAM_INT: -++ typed_param_value = caml_alloc (1, 0); -++ v = caml_copy_int32 (params[pos].value.i); -++ break; -++ case VIR_TYPED_PARAM_UINT: -++ typed_param_value = caml_alloc (1, 1); -++ v = caml_copy_int32 (params[pos].value.ui); -++ break; -++ case VIR_TYPED_PARAM_LLONG: -++ typed_param_value = caml_alloc (1, 2); -++ v = caml_copy_int64 (params[pos].value.l); -++ break; -++ case VIR_TYPED_PARAM_ULLONG: -++ typed_param_value = caml_alloc (1, 3); -++ v = caml_copy_int64 (params[pos].value.ul); -++ break; -++ case VIR_TYPED_PARAM_DOUBLE: -++ typed_param_value = caml_alloc (1, 4); -++ v = caml_copy_double (params[pos].value.d); -++ break; -++ case VIR_TYPED_PARAM_BOOLEAN: -++ typed_param_value = caml_alloc (1, 5); -++ v = Val_bool (params[pos].value.b); -++ break; -++ case VIR_TYPED_PARAM_STRING: -++ typed_param_value = caml_alloc (1, 6); -++ v = caml_copy_string (params[pos].value.s); -++ free (params[pos].value.s); -++ break; -++ default: -++ /* XXX Memory leak on this path, if there are more -++ * VIR_TYPED_PARAM_STRING past this point in the array. -++ */ -++ free (params); -++ caml_failwith ("virDomainGetCPUStats: " -++ "unknown parameter type returned"); -++ } -++ Store_field (typed_param_value, 0, v); -++ Store_field (typed_param, 1, typed_param_value); -++ } -++ } -++ Store_field (cpustats, 0, param_head); -++ -++ free(params); -++ CAMLreturn (cpustats); -++#else -++ not_supported ("virDomainGetCPUStats"); -++#endif -++} -++ -+ #ifdef HAVE_WEAK_SYMBOLS -+ #ifdef HAVE_VIRDOMAINMIGRATE -+ extern virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, -+-- -+1.7.11.4 -+ diff --git a/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf b/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf deleted file mode 100644 index e3e6f662..00000000 --- a/SOURCES/ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf +++ /dev/null @@ -1,67 +0,0 @@ -commit 34a472800ba1908e910318cc5d5ed9588174c1cf -Author: David Scott -Date: Wed Mar 6 16:18:03 2013 +0000 - - Correct typos in the storage interface's phantom types - - A connection is either read/write (type rw = [`R|`W]) or read/only - (type ro = [`R]). A function which requires the ability to write - needs to take a parameter [> `W] rather than [`W] (which would - correspond to a write-only connection). - - We can now use a read/write connection to call: - Pool.set_autostart - Volume.create_xml - Volume.delete - - Signed-off-by: David Scott - -diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -index 07542a9..443b22b 100644 ---- a/libvirt/libvirt.ml -+++ b/libvirt/libvirt.ml -@@ -536,7 +536,7 @@ struct - external get_info : [`R] t -> pool_info = "ocaml_libvirt_storage_pool_get_info" - external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_pool_get_xml_desc" - external get_autostart : [`R] t -> bool = "ocaml_libvirt_storage_pool_get_autostart" -- external set_autostart : [`W] t -> bool -> unit = "ocaml_libvirt_storage_pool_set_autostart" -+ external set_autostart : [>`W] t -> bool -> unit = "ocaml_libvirt_storage_pool_set_autostart" - external num_of_volumes : [`R] t -> int = "ocaml_libvirt_storage_pool_num_of_volumes" - external list_volumes : [`R] t -> int -> string array = "ocaml_libvirt_storage_pool_list_volumes" - external const : [>`R] t -> ro t = "%identity" -@@ -562,8 +562,8 @@ struct - external get_path : [`R] t -> string = "ocaml_libvirt_storage_vol_get_path" - external get_info : [`R] t -> vol_info = "ocaml_libvirt_storage_vol_get_info" - external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_vol_get_xml_desc" -- external create_xml : [`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" -- external delete : [`W] t -> unit = "ocaml_libvirt_storage_vol_delete" -+ external create_xml : [>`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" -+ external delete : [>`W] t -> unit = "ocaml_libvirt_storage_vol_delete" - external free : [>`R] t -> unit = "ocaml_libvirt_storage_vol_free" - external const : [>`R] t -> ro t = "%identity" - end -diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -index 5a288c0..70cc2c7 100644 ---- a/libvirt/libvirt.mli -+++ b/libvirt/libvirt.mli -@@ -757,7 +757,7 @@ sig - (** Get the XML description. *) - val get_autostart : [`R] t -> bool - (** Get the autostart flag for the storage pool. *) -- val set_autostart : [`W] t -> bool -> unit -+ val set_autostart : [>`W] t -> bool -> unit - (** Set the autostart flag for the storage pool. *) - - val num_of_volumes : [`R] t -> int -@@ -810,9 +810,9 @@ sig - val get_xml_desc : [`R] t -> xml - (** Get the XML description. *) - -- val create_xml : [`W] Pool.t -> xml -> unit -+ val create_xml : [>`W] Pool.t -> xml -> unit - (** Create a storage volume. *) -- val delete : [`W] t -> unit -+ val delete : [>`W] t -> unit - (** Delete a storage volume. *) - val free : [>`R] t -> unit - (** Free a storage volume object in memory. diff --git a/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 b/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 deleted file mode 100644 index 5d41c742..00000000 --- a/SOURCES/ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 +++ /dev/null @@ -1,37 +0,0 @@ -commit 9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 -Author: David Scott -Date: Wed Mar 6 16:18:04 2013 +0000 - - Volume.delete takes a flags parameter - - This corrects a mismatch between the generated C stubs and the .ml - interface. - - Signed-off-by: David Scott - -diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -index 443b22b..1fbb8ca 100644 ---- a/libvirt/libvirt.ml -+++ b/libvirt/libvirt.ml -@@ -563,7 +563,7 @@ struct - external get_info : [`R] t -> vol_info = "ocaml_libvirt_storage_vol_get_info" - external get_xml_desc : [`R] t -> xml = "ocaml_libvirt_storage_vol_get_xml_desc" - external create_xml : [>`W] Pool.t -> xml -> unit = "ocaml_libvirt_storage_vol_create_xml" -- external delete : [>`W] t -> unit = "ocaml_libvirt_storage_vol_delete" -+ external delete : [>`W] t -> vol_delete_flags -> unit = "ocaml_libvirt_storage_vol_delete" - external free : [>`R] t -> unit = "ocaml_libvirt_storage_vol_free" - external const : [>`R] t -> ro t = "%identity" - end -diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -index 70cc2c7..bf95fa2 100644 ---- a/libvirt/libvirt.mli -+++ b/libvirt/libvirt.mli -@@ -812,7 +812,7 @@ sig - - val create_xml : [>`W] Pool.t -> xml -> unit - (** Create a storage volume. *) -- val delete : [>`W] t -> unit -+ val delete : [>`W] t -> vol_delete_flags -> unit - (** Delete a storage volume. *) - val free : [>`R] t -> unit - (** Free a storage volume object in memory. diff --git a/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 b/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 deleted file mode 100644 index cc7cdabb..00000000 --- a/SOURCES/ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 +++ /dev/null @@ -1,61 +0,0 @@ -commit 2360cd228542c6a523f10daacbd631a753d17208 -Author: David Scott -Date: Wed Mar 6 16:18:05 2013 +0000 - - Functions returning "unit" correspond to C fns which use -1 for failure - - This affects the following functions: - virStoragePoolBuild - virStoragePoolDelete - virStorageVolDelete - - Previously a call to virStorageVolDelete would succeed returning 0, which - was interpreted as false, causing us to raise an exception with - VIR_ERR_NONE. - - Signed-off-by: David Scott - -diff --git a/libvirt/generator.pl b/libvirt/generator.pl -index 8590ea7..abebfff 100755 ---- a/libvirt/generator.pl -+++ b/libvirt/generator.pl -@@ -749,7 +749,7 @@ sub gen_c_code - int r; - - NONBLOCKING (r = $c_name ($1, i)); -- CHECK_ERROR (!r, conn, \"$c_name\"); -+ CHECK_ERROR (r == -1, conn, \"$c_name\"); - - CAMLreturn (Val_unit); - " -diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c -index b1f084b..d07a55e 100644 ---- a/libvirt/libvirt_c.c -+++ b/libvirt/libvirt_c.c -@@ -1932,7 +1932,7 @@ ocaml_libvirt_storage_pool_build (value poolv, value iv) - int r; - - NONBLOCKING (r = virStoragePoolBuild (pool, i)); -- CHECK_ERROR (!r, conn, "virStoragePoolBuild"); -+ CHECK_ERROR (r == -1, conn, "virStoragePoolBuild"); - - CAMLreturn (Val_unit); - #endif -@@ -2038,7 +2038,7 @@ ocaml_libvirt_storage_pool_delete (value poolv, value iv) - int r; - - NONBLOCKING (r = virStoragePoolDelete (pool, i)); -- CHECK_ERROR (!r, conn, "virStoragePoolDelete"); -+ CHECK_ERROR (r == -1, conn, "virStoragePoolDelete"); - - CAMLreturn (Val_unit); - #endif -@@ -2309,7 +2309,7 @@ ocaml_libvirt_storage_vol_delete (value volv, value iv) - int r; - - NONBLOCKING (r = virStorageVolDelete (vol, i)); -- CHECK_ERROR (!r, conn, "virStorageVolDelete"); -+ CHECK_ERROR (r == -1, conn, "virStorageVolDelete"); - - CAMLreturn (Val_unit); - #endif diff --git a/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 b/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 deleted file mode 100644 index fdd7148c..00000000 --- a/SOURCES/ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 +++ /dev/null @@ -1,40 +0,0 @@ -commit 7568d6f77d72a77c527cc282511f7a3f37dc7040 -Author: Richard W.M. Jones -Date: Wed Mar 6 17:00:43 2013 +0000 - - Update dependencies. - -diff --git a/examples/.depend b/examples/.depend -index f58db3d..3d955f9 100644 ---- a/examples/.depend -+++ b/examples/.depend -@@ -1,6 +1,6 @@ --get_cpu_stats.cmo: ../libvirt/libvirt.cmi --get_cpu_stats.cmx: ../libvirt/libvirt.cmx --list_domains.cmo: ../libvirt/libvirt.cmi --list_domains.cmx: ../libvirt/libvirt.cmx --node_info.cmo: ../libvirt/libvirt.cmi --node_info.cmx: ../libvirt/libvirt.cmx -+node_info.cmo : ../libvirt/libvirt.cmi -+node_info.cmx : ../libvirt/libvirt.cmx -+get_cpu_stats.cmo : ../libvirt/libvirt.cmi -+get_cpu_stats.cmx : ../libvirt/libvirt.cmx -+list_domains.cmo : ../libvirt/libvirt.cmi -+list_domains.cmx : ../libvirt/libvirt.cmx -diff --git a/libvirt/.depend b/libvirt/.depend -index 3f2297e..7d32e13 100644 ---- a/libvirt/.depend -+++ b/libvirt/.depend -@@ -1,6 +1,6 @@ --libvirt.cmi: --libvirt_version.cmi: --libvirt.cmo: libvirt.cmi --libvirt.cmx: libvirt.cmi --libvirt_version.cmo: libvirt_version.cmi --libvirt_version.cmx: libvirt_version.cmi -+libvirt_version.cmi : -+libvirt.cmi : -+libvirt_version.cmo : libvirt_version.cmi -+libvirt_version.cmx : libvirt_version.cmi -+libvirt.cmo : libvirt.cmi -+libvirt.cmx : libvirt.cmi diff --git a/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 b/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 deleted file mode 100644 index 9cff55f8..00000000 --- a/SOURCES/ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 +++ /dev/null @@ -1,23 +0,0 @@ -commit 71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 -Author: David Scott -Date: Wed Apr 17 11:23:00 2013 +0100 - - Fix typo in ocaml_libvirt_storage_vol_get_info - - The info.capacity was being overwritten with the info.allocation. - - Signed-off-by: David Scott - -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index 70cf96f..b1d88cc 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -945,7 +945,7 @@ ocaml_libvirt_storage_vol_get_info (value volv) - rv = caml_alloc (3, 0); - Store_field (rv, 0, Val_int (info.type)); - v = caml_copy_int64 (info.capacity); Store_field (rv, 1, v); -- v = caml_copy_int64 (info.allocation); Store_field (rv, 1, v); -+ v = caml_copy_int64 (info.allocation); Store_field (rv, 2, v); - - CAMLreturn (rv); - #else diff --git a/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d b/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d deleted file mode 100644 index cae842f4..00000000 --- a/SOURCES/ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d +++ /dev/null @@ -1,2479 +0,0 @@ -commit d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d -Author: David Scott -Date: Wed Apr 24 11:39:03 2013 +0100 - - Remove backwards compatability logic to simplify the bindings - - Rather than compile against old versions of libvirt and resort - to throwing 'not supported' exceptions at runtime, we instead - require all symbols and definitions to be available at compile-time - i.e. we require a much more recent libvirt. - - Signed-off-by: David Scott - -diff --git a/config.h.in b/config.h.in -index fccbbe7..c0bd102 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -30,167 +30,6 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - --/* Define to 1 if you have the `virConnectGetHostname' function. */ --#undef HAVE_VIRCONNECTGETHOSTNAME -- --/* Define to 1 if you have the `virConnectGetURI' function. */ --#undef HAVE_VIRCONNECTGETURI -- --/* Define to 1 if you have the `virConnectListDefinedStoragePools' function. -- */ --#undef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS -- --/* Define to 1 if you have the `virConnectListStoragePools' function. */ --#undef HAVE_VIRCONNECTLISTSTORAGEPOOLS -- --/* Define to 1 if you have the `virConnectNumOfDefinedStoragePools' function. -- */ --#undef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS -- --/* Define to 1 if you have the `virConnectNumOfStoragePools' function. */ --#undef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS -- --/* Define to 1 if you have the `virDomainBlockPeek' function. */ --#undef HAVE_VIRDOMAINBLOCKPEEK -- --/* Define to 1 if you have the `virDomainBlockStats' function. */ --#undef HAVE_VIRDOMAINBLOCKSTATS -- --/* Define to 1 if you have the `virDomainGetCPUStats' function. */ --#undef HAVE_VIRDOMAINGETCPUSTATS -- --/* Define to 1 if you have the `virDomainGetSchedulerParameters' function. */ --#undef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS -- --/* Define to 1 if you have the `virDomainGetSchedulerType' function. */ --#undef HAVE_VIRDOMAINGETSCHEDULERTYPE -- --/* Define to 1 if you have the `virDomainInterfaceStats' function. */ --#undef HAVE_VIRDOMAININTERFACESTATS -- --/* Define to 1 if you have the `virDomainMemoryPeek' function. */ --#undef HAVE_VIRDOMAINMEMORYPEEK -- --/* Define to 1 if you have the `virDomainMigrate' function. */ --#undef HAVE_VIRDOMAINMIGRATE -- --/* Define to 1 if you have the `virDomainSetSchedulerParameters' function. */ --#undef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS -- --/* Define to 1 if you have the `virNodeGetCellsFreeMemory' function. */ --#undef HAVE_VIRNODEGETCELLSFREEMEMORY -- --/* Define to 1 if you have the `virNodeGetFreeMemory' function. */ --#undef HAVE_VIRNODEGETFREEMEMORY -- --/* Define to 1 if you have the `virStoragePoolBuild' function. */ --#undef HAVE_VIRSTORAGEPOOLBUILD -- --/* Define to 1 if you have the `virStoragePoolCreate' function. */ --#undef HAVE_VIRSTORAGEPOOLCREATE -- --/* Define to 1 if you have the `virStoragePoolCreateXML' function. */ --#undef HAVE_VIRSTORAGEPOOLCREATEXML -- --/* Define to 1 if you have the `virStoragePoolDefineXML' function. */ --#undef HAVE_VIRSTORAGEPOOLDEFINEXML -- --/* Define to 1 if you have the `virStoragePoolDelete' function. */ --#undef HAVE_VIRSTORAGEPOOLDELETE -- --/* Define to 1 if you have the `virStoragePoolDestroy' function. */ --#undef HAVE_VIRSTORAGEPOOLDESTROY -- --/* Define to 1 if you have the `virStoragePoolFree' function. */ --#undef HAVE_VIRSTORAGEPOOLFREE -- --/* Define to 1 if you have the `virStoragePoolGetAutostart' function. */ --#undef HAVE_VIRSTORAGEPOOLGETAUTOSTART -- --/* Define to 1 if you have the `virStoragePoolGetConnect' function. */ --#undef HAVE_VIRSTORAGEPOOLGETCONNECT -- --/* Define to 1 if you have the `virStoragePoolGetInfo' function. */ --#undef HAVE_VIRSTORAGEPOOLGETINFO -- --/* Define to 1 if you have the `virStoragePoolGetName' function. */ --#undef HAVE_VIRSTORAGEPOOLGETNAME -- --/* Define to 1 if you have the `virStoragePoolGetUUID' function. */ --#undef HAVE_VIRSTORAGEPOOLGETUUID -- --/* Define to 1 if you have the `virStoragePoolGetUUIDString' function. */ --#undef HAVE_VIRSTORAGEPOOLGETUUIDSTRING -- --/* Define to 1 if you have the `virStoragePoolGetXMLDesc' function. */ --#undef HAVE_VIRSTORAGEPOOLGETXMLDESC -- --/* Define to 1 if you have the `virStoragePoolListVolumes' function. */ --#undef HAVE_VIRSTORAGEPOOLLISTVOLUMES -- --/* Define to 1 if you have the `virStoragePoolLookupByName' function. */ --#undef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME -- --/* Define to 1 if you have the `virStoragePoolLookupByUUID' function. */ --#undef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID -- --/* Define to 1 if you have the `virStoragePoolLookupByUUIDString' function. */ --#undef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING -- --/* Define to 1 if you have the `virStoragePoolLookupByVolume' function. */ --#undef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME -- --/* Define to 1 if you have the `virStoragePoolNumOfVolumes' function. */ --#undef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES -- --/* Define to 1 if the system has the type `virStoragePoolPtr'. */ --#undef HAVE_VIRSTORAGEPOOLPTR -- --/* Define to 1 if you have the `virStoragePoolRefresh' function. */ --#undef HAVE_VIRSTORAGEPOOLREFRESH -- --/* Define to 1 if you have the `virStoragePoolSetAutostart' function. */ --#undef HAVE_VIRSTORAGEPOOLSETAUTOSTART -- --/* Define to 1 if you have the `virStoragePoolUndefine' function. */ --#undef HAVE_VIRSTORAGEPOOLUNDEFINE -- --/* Define to 1 if you have the `virStorageVolCreateXML' function. */ --#undef HAVE_VIRSTORAGEVOLCREATEXML -- --/* Define to 1 if you have the `virStorageVolDelete' function. */ --#undef HAVE_VIRSTORAGEVOLDELETE -- --/* Define to 1 if you have the `virStorageVolFree' function. */ --#undef HAVE_VIRSTORAGEVOLFREE -- --/* Define to 1 if you have the `virStorageVolGetInfo' function. */ --#undef HAVE_VIRSTORAGEVOLGETINFO -- --/* Define to 1 if you have the `virStorageVolGetKey' function. */ --#undef HAVE_VIRSTORAGEVOLGETKEY -- --/* Define to 1 if you have the `virStorageVolGetName' function. */ --#undef HAVE_VIRSTORAGEVOLGETNAME -- --/* Define to 1 if you have the `virStorageVolGetPath' function. */ --#undef HAVE_VIRSTORAGEVOLGETPATH -- --/* Define to 1 if you have the `virStorageVolGetXMLDesc' function. */ --#undef HAVE_VIRSTORAGEVOLGETXMLDESC -- --/* Define to 1 if you have the `virStorageVolLookupByKey' function. */ --#undef HAVE_VIRSTORAGEVOLLOOKUPBYKEY -- --/* Define to 1 if you have the `virStorageVolLookupByName' function. */ --#undef HAVE_VIRSTORAGEVOLLOOKUPBYNAME -- --/* Define to 1 if you have the `virStorageVolLookupByPath' function. */ --#undef HAVE_VIRSTORAGEVOLLOOKUPBYPATH -- --/* Define to 1 if the system has the type `virStorageVolPtr'. */ --#undef HAVE_VIRSTORAGEVOLPTR -- - /* Define to 1 if your C compiler doesn't accept -c and -o together. */ - #undef NO_MINUS_C_MINUS_O - -diff --git a/configure.ac b/configure.ac -index 63635b6..d40d048 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -67,71 +67,6 @@ AC_CHECK_HEADER([libvirt/virterror.h], - [], - AC_MSG_ERROR([You must install libvirt development package])) - --dnl Check for libvirt >= 0.2.1 (our minimum supported version). --dnl See: http://libvirt.org/hvsupport.html --AC_CHECK_FUNC(virConnectGetCapabilities, -- [], -- AC_MSG_ERROR([You must have libvirt >= 0.2.1])) -- --dnl Check for optional libvirt functions added since 0.2.1. --dnl See: http://libvirt.org/hvsupport.html --AC_CHECK_FUNCS([virConnectGetHostname \ -- virConnectGetURI \ -- virDomainBlockStats \ -- virDomainGetSchedulerParameters \ -- virDomainGetSchedulerType \ -- virDomainInterfaceStats \ -- virDomainMigrate \ -- virDomainSetSchedulerParameters \ -- virNodeGetFreeMemory \ -- virNodeGetCellsFreeMemory \ -- virStoragePoolGetConnect \ -- virConnectNumOfStoragePools \ -- virConnectListStoragePools \ -- virConnectNumOfDefinedStoragePools \ -- virConnectListDefinedStoragePools \ -- virStoragePoolLookupByName \ -- virStoragePoolLookupByUUID \ -- virStoragePoolLookupByUUIDString \ -- virStoragePoolLookupByVolume \ -- virStoragePoolCreateXML \ -- virStoragePoolDefineXML \ -- virStoragePoolBuild \ -- virStoragePoolUndefine \ -- virStoragePoolCreate \ -- virStoragePoolDestroy \ -- virStoragePoolDelete \ -- virStoragePoolFree \ -- virStoragePoolRefresh \ -- virStoragePoolGetName \ -- virStoragePoolGetUUID \ -- virStoragePoolGetUUIDString \ -- virStoragePoolGetInfo \ -- virStoragePoolGetXMLDesc \ -- virStoragePoolGetAutostart \ -- virStoragePoolSetAutostart \ -- virStoragePoolNumOfVolumes \ -- virStoragePoolListVolumes \ -- virStorageVolLookupByName \ -- virStorageVolLookupByKey \ -- virStorageVolLookupByPath \ -- virStorageVolGetName \ -- virStorageVolGetKey \ -- virStorageVolCreateXML \ -- virStorageVolDelete \ -- virStorageVolFree \ -- virStorageVolGetInfo \ -- virStorageVolGetXMLDesc \ -- virStorageVolGetPath \ -- virDomainBlockPeek \ -- virDomainMemoryPeek \ -- virDomainGetCPUStats \ --]) -- --dnl Check for optional types added since 0.2.1. --AC_CHECK_TYPES([virStoragePoolPtr, virStorageVolPtr],,, -- [#include ]) -- - dnl Check for basic OCaml environment & findlib. - AC_PROG_OCAML - AC_PROG_FINDLIB -diff --git a/libvirt/generator.pl b/libvirt/generator.pl -index abebfff..ab8900e 100755 ---- a/libvirt/generator.pl -+++ b/libvirt/generator.pl -@@ -35,13 +35,11 @@ use strict; - # It is interpreted by the generation functions below to indicate what - # "class" the function falls into, and to generate the right class of - # binding. --# --# Any function added since libvirt 0.2.1 must be marked weak. - - my @functions = ( - { name => "virConnectClose", sig => "conn : free" }, -- { name => "virConnectGetHostname", sig => "conn : string", weak => 1 }, -- { name => "virConnectGetURI", sig => "conn : string", weak => 1 }, -+ { name => "virConnectGetHostname", sig => "conn : string" }, -+ { name => "virConnectGetURI", sig => "conn : string" }, - { name => "virConnectGetType", sig => "conn : static string" }, - { name => "virConnectNumOfDomains", sig => "conn : int" }, - { name => "virConnectListDomains", sig => "conn, int : int array" }, -@@ -53,13 +51,13 @@ my @functions = ( - { name => "virConnectNumOfDefinedNetworks", sig => "conn : int" }, - { name => "virConnectListDefinedNetworks", - sig => "conn, int : string array" }, -- { name => "virConnectNumOfStoragePools", sig => "conn : int", weak => 1 }, -+ { name => "virConnectNumOfStoragePools", sig => "conn : int" }, - { name => "virConnectListStoragePools", -- sig => "conn, int : string array", weak => 1 }, -+ sig => "conn, int : string array" }, - { name => "virConnectNumOfDefinedStoragePools", -- sig => "conn : int", weak => 1 }, -+ sig => "conn : int" }, - { name => "virConnectListDefinedStoragePools", -- sig => "conn, int : string array", weak => 1 }, -+ sig => "conn, int : string array" }, - { name => "virConnectGetCapabilities", sig => "conn : string" }, - - { name => "virDomainCreateLinux", sig => "conn, string, 0U : dom" }, -@@ -107,66 +105,66 @@ my @functions = ( - { name => "virNetworkGetAutostart", sig => "net : bool" }, - { name => "virNetworkSetAutostart", sig => "net, bool : unit" }, - -- { name => "virStoragePoolFree", sig => "pool : free", weak => 1 }, -- { name => "virStoragePoolDestroy", sig => "pool : free", weak => 1 }, -+ { name => "virStoragePoolFree", sig => "pool : free" }, -+ { name => "virStoragePoolDestroy", sig => "pool : free" }, - { name => "virStoragePoolLookupByName", -- sig => "conn, string : pool", weak => 1 }, -+ sig => "conn, string : pool" }, - { name => "virStoragePoolLookupByUUID", -- sig => "conn, uuid : pool", weak => 1 }, -+ sig => "conn, uuid : pool" }, - { name => "virStoragePoolLookupByUUIDString", -- sig => "conn, string : pool", weak => 1 }, -+ sig => "conn, string : pool" }, - { name => "virStoragePoolGetName", -- sig => "pool : static string", weak => 1 }, -+ sig => "pool : static string" }, - { name => "virStoragePoolGetXMLDesc", -- sig => "pool, 0U : string", weak => 1 }, -+ sig => "pool, 0U : string" }, - { name => "virStoragePoolGetUUID", -- sig => "pool : uuid", weak => 1 }, -+ sig => "pool : uuid" }, - { name => "virStoragePoolGetUUIDString", -- sig => "pool : uuid string", weak => 1 }, -+ sig => "pool : uuid string" }, - { name => "virStoragePoolCreateXML", -- sig => "conn, string, 0U : pool", weak => 1 }, -+ sig => "conn, string, 0U : pool" }, - { name => "virStoragePoolDefineXML", -- sig => "conn, string, 0U : pool", weak => 1 }, -+ sig => "conn, string, 0U : pool" }, - { name => "virStoragePoolBuild", -- sig => "pool, uint : unit", weak => 1 }, -+ sig => "pool, uint : unit" }, - { name => "virStoragePoolUndefine", -- sig => "pool : unit", weak => 1 }, -+ sig => "pool : unit" }, - { name => "virStoragePoolCreate", -- sig => "pool, 0U : unit", weak => 1 }, -+ sig => "pool, 0U : unit" }, - { name => "virStoragePoolDelete", -- sig => "pool, uint : unit", weak => 1 }, -+ sig => "pool, uint : unit" }, - { name => "virStoragePoolRefresh", -- sig => "pool, 0U : unit", weak => 1 }, -+ sig => "pool, 0U : unit" }, - { name => "virStoragePoolGetAutostart", -- sig => "pool : bool", weak => 1 }, -+ sig => "pool : bool" }, - { name => "virStoragePoolSetAutostart", -- sig => "pool, bool : unit", weak => 1 }, -+ sig => "pool, bool : unit" }, - { name => "virStoragePoolNumOfVolumes", -- sig => "pool : int", weak => 1 }, -+ sig => "pool : int" }, - { name => "virStoragePoolListVolumes", -- sig => "pool, int : string array", weak => 1 }, -+ sig => "pool, int : string array" }, - -- { name => "virStorageVolFree", sig => "vol : free", weak => 1 }, -+ { name => "virStorageVolFree", sig => "vol : free" }, - { name => "virStorageVolDelete", -- sig => "vol, uint : unit", weak => 1 }, -+ sig => "vol, uint : unit" }, - { name => "virStorageVolLookupByName", -- sig => "pool, string : vol from pool", weak => 1 }, -+ sig => "pool, string : vol from pool" }, - { name => "virStorageVolLookupByKey", -- sig => "conn, string : vol", weak => 1 }, -+ sig => "conn, string : vol" }, - { name => "virStorageVolLookupByPath", -- sig => "conn, string : vol", weak => 1 }, -+ sig => "conn, string : vol" }, - { name => "virStorageVolCreateXML", -- sig => "pool, string, 0U : vol from pool", weak => 1 }, -+ sig => "pool, string, 0U : vol from pool" }, - { name => "virStorageVolGetXMLDesc", -- sig => "vol, 0U : string", weak => 1 }, -+ sig => "vol, 0U : string" }, - { name => "virStorageVolGetPath", -- sig => "vol : string", weak => 1 }, -+ sig => "vol : string" }, - { name => "virStorageVolGetKey", -- sig => "vol : static string", weak => 1 }, -+ sig => "vol : static string" }, - { name => "virStorageVolGetName", -- sig => "vol : static string", weak => 1 }, -+ sig => "vol : static string" }, - { name => "virStoragePoolLookupByVolume", -- sig => "vol : pool from vol", weak => 1 }, -+ sig => "vol : pool from vol" }, - - ); - -@@ -270,115 +268,6 @@ sub short_name_to_c_type - } - } - --# Generate a C signature for the original function. Used when building --# weak bindings. -- --sub gen_c_signature --{ -- my $sig = shift; -- my $c_name = shift; -- -- if ($sig =~ /^(\w+) : string$/) { -- my $c_type = short_name_to_c_type ($1); -- "char *$c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+) : static string$/) { -- my $c_type = short_name_to_c_type ($1); -- "const char *$c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+) : int$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+) : uuid$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, unsigned char *)" -- } elsif ($sig =~ /^(\w+) : uuid string$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, char *)" -- } elsif ($sig =~ /^(\w+) : bool$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, int *r)" -- } elsif ($sig =~ /^(\w+), bool : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, int b)" -- } elsif ($sig eq "conn, int : int array") { -- "int $c_name (virConnectPtr conn, int *ids, int maxids)" -- } elsif ($sig =~ /^(\w+), int : string array$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, char **const names, int maxnames)" -- } elsif ($sig =~ /^(\w+), 0(U?) : string$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- "char *$c_name ($c_type $1, $unsigned int flags)" -- } elsif ($sig =~ /^(\w+), 0(U?) : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- "int $c_name ($c_type $1, $unsigned int flags)" -- } elsif ($sig =~ /^(\w+) : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+) : free$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+), string : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- "int $c_name ($c_type $1, const char *str)" -- } elsif ($sig =~ /^(\w+), string, 0(U?) : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- "int $c_name ($c_type $1, const char *str, ${unsigned}int flags)" -- } elsif ($sig =~ /^(\w+), string : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $c_ret_type = short_name_to_c_type ($2); -- "$c_ret_type $c_name ($c_type $1, const char *str)" -- } elsif ($sig =~ /^(\w+), string, 0(U?) : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- my $c_ret_type = short_name_to_c_type ($3); -- "$c_ret_type $c_name ($c_type $1, const char *str, ${unsigned}int flags)" -- } elsif ($sig =~ /^(\w+), (u?)int : unit$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "u" ? "unsigned " : ""; -- "int $c_name ($c_type $1, ${unsigned}int i)" -- } elsif ($sig =~ /^(\w+), (u?)int : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "u" ? "unsigned " : ""; -- my $c_ret_type = short_name_to_c_type ($3); -- "$c_ret_type $c_name ($c_type $1, ${unsigned}int i)" -- } elsif ($sig =~ /^(\w+), uuid : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $c_ret_type = short_name_to_c_type ($2); -- "$c_ret_type $c_name ($c_type $1, const unsigned char *str)" -- } elsif ($sig =~ /^(\w+), 0(U?) : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- my $c_ret_type = short_name_to_c_type ($3); -- "$c_ret_type $c_name ($c_type $1, $unsigned int flags)" -- } elsif ($sig =~ /^(\w+) : (\w+)$/) { -- my $c_type = short_name_to_c_type ($1); -- my $c_ret_type = short_name_to_c_type ($2); -- "$c_ret_type $c_name ($c_type $1)" -- } elsif ($sig =~ /^(\w+), string : (\w+) from \w+$/) { -- my $c_type = short_name_to_c_type ($1); -- my $c_ret_type = short_name_to_c_type ($2); -- "$c_ret_type $c_name ($c_type $1, const char *str)" -- } elsif ($sig =~ /^(\w+), string, 0(U?) : (\w+) from \w+$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- my $c_ret_type = short_name_to_c_type ($3); -- "$c_ret_type $c_name ($c_type $1, const char *str, $unsigned int flags)" -- } elsif ($sig =~ /^(\w+), 0(U?) : (\w+) from \w+$/) { -- my $c_type = short_name_to_c_type ($1); -- my $unsigned = $2 eq "U" ? "unsigned " : ""; -- my $c_ret_type = short_name_to_c_type ($3); -- "$c_ret_type $c_name ($c_type $1, $unsigned int flags)" -- } elsif ($sig =~ /^(\w+) : (\w+) from \w+$/) { -- my $c_type = short_name_to_c_type ($1); -- my $c_ret_type = short_name_to_c_type ($2); -- "$c_ret_type $c_name ($c_type $1)" -- } else { -- die "unknown signature $sig" -- } --} -- - # OCaml argument names. - - sub gen_arg_names -@@ -883,7 +772,6 @@ sub gen_c_code - - foreach my $function (@functions) { - my $c_name = $function->{name}; -- my $is_weak = $function->{weak}; - my $sig = $function->{sig}; - - #print "generating $c_name with sig \"$sig\" ...\n"; -@@ -911,20 +799,6 @@ foreach my $function (@functions) { - - END - -- # Generate a full function prototype if the function is weak. -- my $have_name = "HAVE_" . uc ($c_name); -- if ($is_weak) { -- my $c_sig = gen_c_signature ($sig, $c_name); -- print F <= 0.2.1. One consequence of this is that -- your program can dynamically link to a {i newer} version of -- libvirt than it was compiled with, and it should still -- work. -- -- When we link to an older version of libvirt.so, there may -- be missing functions. If ocaml-libvirt was compiled with -- gcc, then these are turned into OCaml {!Libvirt.Not_supported} -- exceptions. -- -- We don't support libvirt < 0.2.1, and never will so don't ask us. -+ OCaml-libvirt requires libvirt version 1.0.2 or later. Future -+ releases of OCaml-libvirt will use newer features of libvirt -+ and therefore will require later versions of libvirt. It is always -+ possible to dynamically link your application against a newer -+ libvirt than OCaml-libvirt was originally compiled against. - - {3 Get list of domains and domain infos} - -diff --git a/libvirt/libvirt_c.c b/libvirt/libvirt_c.c -index d07a55e..00dbbbc 100644 ---- a/libvirt/libvirt_c.c -+++ b/libvirt/libvirt_c.c -@@ -73,25 +73,10 @@ ocaml_libvirt_connect_close (value connv) - * In generator.pl this function has signature "conn : string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTGETHOSTNAME --extern char *virConnectGetHostname (virConnectPtr conn) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_get_hostname (value connv) - { - CAMLparam1 (connv); --#ifndef HAVE_VIRCONNECTGETHOSTNAME -- /* Symbol virConnectGetHostname not found at compile time. */ -- not_supported ("virConnectGetHostname"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectGetHostname -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectGetHostname); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -103,32 +88,16 @@ ocaml_libvirt_connect_get_hostname (value connv) - rv = caml_copy_string (r); - free (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virConnectGetURI. - * In generator.pl this function has signature "conn : string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTGETURI --extern char *virConnectGetURI (virConnectPtr conn) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_get_uri (value connv) - { - CAMLparam1 (connv); --#ifndef HAVE_VIRCONNECTGETURI -- /* Symbol virConnectGetURI not found at compile time. */ -- not_supported ("virConnectGetURI"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectGetURI -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectGetURI); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -140,7 +109,6 @@ ocaml_libvirt_connect_get_uri (value connv) - rv = caml_copy_string (r); - free (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virConnectGetType. -@@ -387,25 +355,10 @@ ocaml_libvirt_connect_list_defined_networks (value connv, value iv) - * In generator.pl this function has signature "conn : int". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS --extern int virConnectNumOfStoragePools (virConnectPtr conn) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_num_of_storage_pools (value connv) - { - CAMLparam1 (connv); --#ifndef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS -- /* Symbol virConnectNumOfStoragePools not found at compile time. */ -- not_supported ("virConnectNumOfStoragePools"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectNumOfStoragePools -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectNumOfStoragePools); - - virConnectPtr conn = Connect_val (connv); - int r; -@@ -414,32 +367,16 @@ ocaml_libvirt_connect_num_of_storage_pools (value connv) - CHECK_ERROR (r == -1, conn, "virConnectNumOfStoragePools"); - - CAMLreturn (Val_int (r)); --#endif - } - - /* Automatically generated binding for virConnectListStoragePools. - * In generator.pl this function has signature "conn, int : string array". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTLISTSTORAGEPOOLS --extern int virConnectListStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_list_storage_pools (value connv, value iv) - { - CAMLparam2 (connv, iv); --#ifndef HAVE_VIRCONNECTLISTSTORAGEPOOLS -- /* Symbol virConnectListStoragePools not found at compile time. */ -- not_supported ("virConnectListStoragePools"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectListStoragePools -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectListStoragePools); - - CAMLlocal2 (rv, strv); - virConnectPtr conn = Connect_val (connv); -@@ -468,32 +405,16 @@ ocaml_libvirt_connect_list_storage_pools (value connv, value iv) - } - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virConnectNumOfDefinedStoragePools. - * In generator.pl this function has signature "conn : int". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS --extern int virConnectNumOfDefinedStoragePools (virConnectPtr conn) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_num_of_defined_storage_pools (value connv) - { - CAMLparam1 (connv); --#ifndef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS -- /* Symbol virConnectNumOfDefinedStoragePools not found at compile time. */ -- not_supported ("virConnectNumOfDefinedStoragePools"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectNumOfDefinedStoragePools -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectNumOfDefinedStoragePools); - - virConnectPtr conn = Connect_val (connv); - int r; -@@ -502,32 +423,16 @@ ocaml_libvirt_connect_num_of_defined_storage_pools (value connv) - CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedStoragePools"); - - CAMLreturn (Val_int (r)); --#endif - } - - /* Automatically generated binding for virConnectListDefinedStoragePools. - * In generator.pl this function has signature "conn, int : string array". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS --extern int virConnectListDefinedStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv) - { - CAMLparam2 (connv, iv); --#ifndef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS -- /* Symbol virConnectListDefinedStoragePools not found at compile time. */ -- not_supported ("virConnectListDefinedStoragePools"); -- CAMLnoreturn; --#else -- /* Check that the symbol virConnectListDefinedStoragePools -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virConnectListDefinedStoragePools); - - CAMLlocal2 (rv, strv); - virConnectPtr conn = Connect_val (connv); -@@ -556,7 +461,6 @@ ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv) - } - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virConnectGetCapabilities. -@@ -1487,25 +1391,10 @@ ocaml_libvirt_network_set_autostart (value netv, value bv) - * In generator.pl this function has signature "pool : free". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLFREE --extern int virStoragePoolFree (virStoragePoolPtr pool) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_free (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLFREE -- /* Symbol virStoragePoolFree not found at compile time. */ -- not_supported ("virStoragePoolFree"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolFree -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolFree); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -1518,32 +1407,16 @@ ocaml_libvirt_storage_pool_free (value poolv) - Pool_val (poolv) = NULL; - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolDestroy. - * In generator.pl this function has signature "pool : free". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLDESTROY --extern int virStoragePoolDestroy (virStoragePoolPtr pool) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_destroy (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLDESTROY -- /* Symbol virStoragePoolDestroy not found at compile time. */ -- not_supported ("virStoragePoolDestroy"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolDestroy -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolDestroy); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -1556,32 +1429,16 @@ ocaml_libvirt_storage_pool_destroy (value poolv) - Pool_val (poolv) = NULL; - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolLookupByName. - * In generator.pl this function has signature "conn, string : pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME --extern virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn, const char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_lookup_by_name (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME -- /* Symbol virStoragePoolLookupByName not found at compile time. */ -- not_supported ("virStoragePoolLookupByName"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolLookupByName -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolLookupByName); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -1594,32 +1451,16 @@ ocaml_libvirt_storage_pool_lookup_by_name (value connv, value strv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolLookupByUUID. - * In generator.pl this function has signature "conn, uuid : pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID --extern virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn, const unsigned char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_lookup_by_uuid (value connv, value uuidv) - { - CAMLparam2 (connv, uuidv); --#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID -- /* Symbol virStoragePoolLookupByUUID not found at compile time. */ -- not_supported ("virStoragePoolLookupByUUID"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolLookupByUUID -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolLookupByUUID); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -1632,32 +1473,16 @@ ocaml_libvirt_storage_pool_lookup_by_uuid (value connv, value uuidv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolLookupByUUIDString. - * In generator.pl this function has signature "conn, string : pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING --extern virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn, const char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_lookup_by_uuid_string (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING -- /* Symbol virStoragePoolLookupByUUIDString not found at compile time. */ -- not_supported ("virStoragePoolLookupByUUIDString"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolLookupByUUIDString -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolLookupByUUIDString); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -1670,32 +1495,16 @@ ocaml_libvirt_storage_pool_lookup_by_uuid_string (value connv, value strv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolGetName. - * In generator.pl this function has signature "pool : static string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETNAME --extern const char *virStoragePoolGetName (virStoragePoolPtr pool) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_name (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLGETNAME -- /* Symbol virStoragePoolGetName not found at compile time. */ -- not_supported ("virStoragePoolGetName"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolGetName -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolGetName); - - CAMLlocal1 (rv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -1707,32 +1516,16 @@ ocaml_libvirt_storage_pool_get_name (value poolv) - - rv = caml_copy_string (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolGetXMLDesc. - * In generator.pl this function has signature "pool, 0U : string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETXMLDESC --extern char *virStoragePoolGetXMLDesc (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_xml_desc (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLGETXMLDESC -- /* Symbol virStoragePoolGetXMLDesc not found at compile time. */ -- not_supported ("virStoragePoolGetXMLDesc"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolGetXMLDesc -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolGetXMLDesc); - - CAMLlocal1 (rv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -1745,32 +1538,16 @@ ocaml_libvirt_storage_pool_get_xml_desc (value poolv) - rv = caml_copy_string (r); - free (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolGetUUID. - * In generator.pl this function has signature "pool : uuid". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETUUID --extern int virStoragePoolGetUUID (virStoragePoolPtr pool, unsigned char *) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_uuid (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLGETUUID -- /* Symbol virStoragePoolGetUUID not found at compile time. */ -- not_supported ("virStoragePoolGetUUID"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolGetUUID -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolGetUUID); - - CAMLlocal1 (rv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -1785,32 +1562,16 @@ ocaml_libvirt_storage_pool_get_uuid (value poolv) - rv = caml_alloc_string (VIR_UUID_BUFLEN); - memcpy (String_val (rv), uuid, VIR_UUID_BUFLEN); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolGetUUIDString. - * In generator.pl this function has signature "pool : uuid string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETUUIDSTRING --extern int virStoragePoolGetUUIDString (virStoragePoolPtr pool, char *) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_uuid_string (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLGETUUIDSTRING -- /* Symbol virStoragePoolGetUUIDString not found at compile time. */ -- not_supported ("virStoragePoolGetUUIDString"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolGetUUIDString -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolGetUUIDString); - - CAMLlocal1 (rv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -1823,32 +1584,16 @@ ocaml_libvirt_storage_pool_get_uuid_string (value poolv) - - rv = caml_copy_string (uuid); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolCreateXML. - * In generator.pl this function has signature "conn, string, 0U : pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLCREATEXML --extern virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_create_xml (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEPOOLCREATEXML -- /* Symbol virStoragePoolCreateXML not found at compile time. */ -- not_supported ("virStoragePoolCreateXML"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolCreateXML -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolCreateXML); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -1861,32 +1606,16 @@ ocaml_libvirt_storage_pool_create_xml (value connv, value strv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolDefineXML. - * In generator.pl this function has signature "conn, string, 0U : pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLDEFINEXML --extern virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_define_xml (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEPOOLDEFINEXML -- /* Symbol virStoragePoolDefineXML not found at compile time. */ -- not_supported ("virStoragePoolDefineXML"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolDefineXML -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolDefineXML); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -1899,32 +1628,16 @@ ocaml_libvirt_storage_pool_define_xml (value connv, value strv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolBuild. - * In generator.pl this function has signature "pool, uint : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLBUILD --extern int virStoragePoolBuild (virStoragePoolPtr pool, unsigned int i) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_build (value poolv, value iv) - { - CAMLparam2 (poolv, iv); --#ifndef HAVE_VIRSTORAGEPOOLBUILD -- /* Symbol virStoragePoolBuild not found at compile time. */ -- not_supported ("virStoragePoolBuild"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolBuild -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolBuild); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -1935,32 +1648,16 @@ ocaml_libvirt_storage_pool_build (value poolv, value iv) - CHECK_ERROR (r == -1, conn, "virStoragePoolBuild"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolUndefine. - * In generator.pl this function has signature "pool : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLUNDEFINE --extern int virStoragePoolUndefine (virStoragePoolPtr pool) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_undefine (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLUNDEFINE -- /* Symbol virStoragePoolUndefine not found at compile time. */ -- not_supported ("virStoragePoolUndefine"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolUndefine -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolUndefine); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -1970,32 +1667,16 @@ ocaml_libvirt_storage_pool_undefine (value poolv) - CHECK_ERROR (r == -1, conn, "virStoragePoolUndefine"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolCreate. - * In generator.pl this function has signature "pool, 0U : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLCREATE --extern int virStoragePoolCreate (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_create (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLCREATE -- /* Symbol virStoragePoolCreate not found at compile time. */ -- not_supported ("virStoragePoolCreate"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolCreate -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolCreate); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2005,32 +1686,16 @@ ocaml_libvirt_storage_pool_create (value poolv) - CHECK_ERROR (r == -1, conn, "virStoragePoolCreate"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolDelete. - * In generator.pl this function has signature "pool, uint : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLDELETE --extern int virStoragePoolDelete (virStoragePoolPtr pool, unsigned int i) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_delete (value poolv, value iv) - { - CAMLparam2 (poolv, iv); --#ifndef HAVE_VIRSTORAGEPOOLDELETE -- /* Symbol virStoragePoolDelete not found at compile time. */ -- not_supported ("virStoragePoolDelete"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolDelete -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolDelete); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2041,32 +1706,16 @@ ocaml_libvirt_storage_pool_delete (value poolv, value iv) - CHECK_ERROR (r == -1, conn, "virStoragePoolDelete"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolRefresh. - * In generator.pl this function has signature "pool, 0U : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLREFRESH --extern int virStoragePoolRefresh (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_refresh (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLREFRESH -- /* Symbol virStoragePoolRefresh not found at compile time. */ -- not_supported ("virStoragePoolRefresh"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolRefresh -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolRefresh); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2076,32 +1725,16 @@ ocaml_libvirt_storage_pool_refresh (value poolv) - CHECK_ERROR (r == -1, conn, "virStoragePoolRefresh"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolGetAutostart. - * In generator.pl this function has signature "pool : bool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETAUTOSTART --extern int virStoragePoolGetAutostart (virStoragePoolPtr pool, int *r) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_autostart (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLGETAUTOSTART -- /* Symbol virStoragePoolGetAutostart not found at compile time. */ -- not_supported ("virStoragePoolGetAutostart"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolGetAutostart -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolGetAutostart); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2111,32 +1744,16 @@ ocaml_libvirt_storage_pool_get_autostart (value poolv) - CHECK_ERROR (r == -1, conn, "virStoragePoolGetAutostart"); - - CAMLreturn (b ? Val_true : Val_false); --#endif - } - - /* Automatically generated binding for virStoragePoolSetAutostart. - * In generator.pl this function has signature "pool, bool : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLSETAUTOSTART --extern int virStoragePoolSetAutostart (virStoragePoolPtr pool, int b) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_set_autostart (value poolv, value bv) - { - CAMLparam2 (poolv, bv); --#ifndef HAVE_VIRSTORAGEPOOLSETAUTOSTART -- /* Symbol virStoragePoolSetAutostart not found at compile time. */ -- not_supported ("virStoragePoolSetAutostart"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolSetAutostart -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolSetAutostart); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2148,32 +1765,16 @@ ocaml_libvirt_storage_pool_set_autostart (value poolv, value bv) - CHECK_ERROR (r == -1, conn, "virStoragePoolSetAutostart"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStoragePoolNumOfVolumes. - * In generator.pl this function has signature "pool : int". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES --extern int virStoragePoolNumOfVolumes (virStoragePoolPtr pool) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_num_of_volumes (value poolv) - { - CAMLparam1 (poolv); --#ifndef HAVE_VIRSTORAGEPOOLNUMOFVOLUMES -- /* Symbol virStoragePoolNumOfVolumes not found at compile time. */ -- not_supported ("virStoragePoolNumOfVolumes"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolNumOfVolumes -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolNumOfVolumes); - - virStoragePoolPtr pool = Pool_val (poolv); - virConnectPtr conn = Connect_polv (poolv); -@@ -2183,32 +1784,16 @@ ocaml_libvirt_storage_pool_num_of_volumes (value poolv) - CHECK_ERROR (r == -1, conn, "virStoragePoolNumOfVolumes"); - - CAMLreturn (Val_int (r)); --#endif - } - - /* Automatically generated binding for virStoragePoolListVolumes. - * In generator.pl this function has signature "pool, int : string array". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLLISTVOLUMES --extern int virStoragePoolListVolumes (virStoragePoolPtr pool, char **const names, int maxnames) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_list_volumes (value poolv, value iv) - { - CAMLparam2 (poolv, iv); --#ifndef HAVE_VIRSTORAGEPOOLLISTVOLUMES -- /* Symbol virStoragePoolListVolumes not found at compile time. */ -- not_supported ("virStoragePoolListVolumes"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolListVolumes -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolListVolumes); - - CAMLlocal2 (rv, strv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -2238,32 +1823,16 @@ ocaml_libvirt_storage_pool_list_volumes (value poolv, value iv) - } - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolFree. - * In generator.pl this function has signature "vol : free". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLFREE --extern int virStorageVolFree (virStorageVolPtr vol) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_free (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEVOLFREE -- /* Symbol virStorageVolFree not found at compile time. */ -- not_supported ("virStorageVolFree"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolFree -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolFree); - - virStorageVolPtr vol = Volume_val (volv); - virConnectPtr conn = Connect_volv (volv); -@@ -2276,32 +1845,16 @@ ocaml_libvirt_storage_vol_free (value volv) - Volume_val (volv) = NULL; - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStorageVolDelete. - * In generator.pl this function has signature "vol, uint : unit". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLDELETE --extern int virStorageVolDelete (virStorageVolPtr vol, unsigned int i) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_delete (value volv, value iv) - { - CAMLparam2 (volv, iv); --#ifndef HAVE_VIRSTORAGEVOLDELETE -- /* Symbol virStorageVolDelete not found at compile time. */ -- not_supported ("virStorageVolDelete"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolDelete -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolDelete); - - virStorageVolPtr vol = Volume_val (volv); - virConnectPtr conn = Connect_volv (volv); -@@ -2312,32 +1865,16 @@ ocaml_libvirt_storage_vol_delete (value volv, value iv) - CHECK_ERROR (r == -1, conn, "virStorageVolDelete"); - - CAMLreturn (Val_unit); --#endif - } - - /* Automatically generated binding for virStorageVolLookupByName. - * In generator.pl this function has signature "pool, string : vol from pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYNAME --extern virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool, const char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_lookup_by_name (value poolv, value strv) - { - CAMLparam2 (poolv, strv); --#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYNAME -- /* Symbol virStorageVolLookupByName not found at compile time. */ -- not_supported ("virStorageVolLookupByName"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolLookupByName -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolLookupByName); - - CAMLlocal2 (rv, connv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -2352,32 +1889,16 @@ ocaml_libvirt_storage_vol_lookup_by_name (value poolv, value strv) - rv = Val_volume (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolLookupByKey. - * In generator.pl this function has signature "conn, string : vol". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYKEY --extern virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn, const char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_lookup_by_key (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYKEY -- /* Symbol virStorageVolLookupByKey not found at compile time. */ -- not_supported ("virStorageVolLookupByKey"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolLookupByKey -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolLookupByKey); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -2390,32 +1911,16 @@ ocaml_libvirt_storage_vol_lookup_by_key (value connv, value strv) - rv = Val_volume (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolLookupByPath. - * In generator.pl this function has signature "conn, string : vol". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYPATH --extern virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn, const char *str) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_lookup_by_path (value connv, value strv) - { - CAMLparam2 (connv, strv); --#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYPATH -- /* Symbol virStorageVolLookupByPath not found at compile time. */ -- not_supported ("virStorageVolLookupByPath"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolLookupByPath -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolLookupByPath); - - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); -@@ -2428,32 +1933,16 @@ ocaml_libvirt_storage_vol_lookup_by_path (value connv, value strv) - rv = Val_volume (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolCreateXML. - * In generator.pl this function has signature "pool, string, 0U : vol from pool". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLCREATEXML --extern virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool, const char *str, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_create_xml (value poolv, value strv) - { - CAMLparam2 (poolv, strv); --#ifndef HAVE_VIRSTORAGEVOLCREATEXML -- /* Symbol virStorageVolCreateXML not found at compile time. */ -- not_supported ("virStorageVolCreateXML"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolCreateXML -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolCreateXML); - - CAMLlocal2 (rv, connv); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -2468,32 +1957,16 @@ ocaml_libvirt_storage_vol_create_xml (value poolv, value strv) - rv = Val_volume (r, connv); - - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolGetXMLDesc. - * In generator.pl this function has signature "vol, 0U : string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLGETXMLDESC --extern char *virStorageVolGetXMLDesc (virStorageVolPtr vol, unsigned int flags) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_get_xml_desc (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEVOLGETXMLDESC -- /* Symbol virStorageVolGetXMLDesc not found at compile time. */ -- not_supported ("virStorageVolGetXMLDesc"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolGetXMLDesc -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolGetXMLDesc); - - CAMLlocal1 (rv); - virStorageVolPtr vol = Volume_val (volv); -@@ -2506,32 +1979,16 @@ ocaml_libvirt_storage_vol_get_xml_desc (value volv) - rv = caml_copy_string (r); - free (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolGetPath. - * In generator.pl this function has signature "vol : string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLGETPATH --extern char *virStorageVolGetPath (virStorageVolPtr vol) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_get_path (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEVOLGETPATH -- /* Symbol virStorageVolGetPath not found at compile time. */ -- not_supported ("virStorageVolGetPath"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolGetPath -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolGetPath); - - CAMLlocal1 (rv); - virStorageVolPtr vol = Volume_val (volv); -@@ -2544,32 +2001,16 @@ ocaml_libvirt_storage_vol_get_path (value volv) - rv = caml_copy_string (r); - free (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolGetKey. - * In generator.pl this function has signature "vol : static string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLGETKEY --extern const char *virStorageVolGetKey (virStorageVolPtr vol) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_get_key (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEVOLGETKEY -- /* Symbol virStorageVolGetKey not found at compile time. */ -- not_supported ("virStorageVolGetKey"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolGetKey -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolGetKey); - - CAMLlocal1 (rv); - virStorageVolPtr vol = Volume_val (volv); -@@ -2581,32 +2022,16 @@ ocaml_libvirt_storage_vol_get_key (value volv) - - rv = caml_copy_string (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStorageVolGetName. - * In generator.pl this function has signature "vol : static string". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLGETNAME --extern const char *virStorageVolGetName (virStorageVolPtr vol) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_get_name (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEVOLGETNAME -- /* Symbol virStorageVolGetName not found at compile time. */ -- not_supported ("virStorageVolGetName"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStorageVolGetName -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStorageVolGetName); - - CAMLlocal1 (rv); - virStorageVolPtr vol = Volume_val (volv); -@@ -2618,32 +2043,16 @@ ocaml_libvirt_storage_vol_get_name (value volv) - - rv = caml_copy_string (r); - CAMLreturn (rv); --#endif - } - - /* Automatically generated binding for virStoragePoolLookupByVolume. - * In generator.pl this function has signature "vol : pool from vol". - */ - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME --extern virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol) __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_lookup_by_volume (value volv) - { - CAMLparam1 (volv); --#ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME -- /* Symbol virStoragePoolLookupByVolume not found at compile time. */ -- not_supported ("virStoragePoolLookupByVolume"); -- CAMLnoreturn; --#else -- /* Check that the symbol virStoragePoolLookupByVolume -- * is in runtime version of libvirt. -- */ -- WEAK_SYMBOL_CHECK (virStoragePoolLookupByVolume); - - CAMLlocal2 (rv, connv); - virStorageVolPtr vol = Volume_val (volv); -@@ -2657,7 +2066,6 @@ ocaml_libvirt_storage_pool_lookup_by_volume (value volv) - rv = Val_pool (r, connv); - - CAMLreturn (rv); --#endif - } - - #include "libvirt_c_epilogue.c" -diff --git a/libvirt/libvirt_c_epilogue.c b/libvirt/libvirt_c_epilogue.c -index ac69fce..4649724 100644 ---- a/libvirt/libvirt_c_epilogue.c -+++ b/libvirt/libvirt_c_epilogue.c -@@ -193,12 +193,8 @@ Val_virterror (virErrorPtr err) - static void conn_finalize (value); - static void dom_finalize (value); - static void net_finalize (value); --#ifdef HAVE_VIRSTORAGEPOOLPTR - static void pol_finalize (value); --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - static void vol_finalize (value); --#endif - - static struct custom_operations conn_custom_operations = { - "conn_custom_operations", -@@ -228,7 +224,6 @@ static struct custom_operations net_custom_operations = { - custom_deserialize_default - }; - --#ifdef HAVE_VIRSTORAGEPOOLPTR - static struct custom_operations pol_custom_operations = { - "pol_custom_operations", - pol_finalize, -@@ -237,9 +232,7 @@ static struct custom_operations pol_custom_operations = { - custom_serialize_default, - custom_deserialize_default - }; --#endif - --#ifdef HAVE_VIRSTORAGEVOLPTR - static struct custom_operations vol_custom_operations = { - "vol_custom_operations", - vol_finalize, -@@ -248,7 +241,6 @@ static struct custom_operations vol_custom_operations = { - custom_serialize_default, - custom_deserialize_default - }; --#endif - - static value - Val_connect (virConnectPtr conn) -@@ -283,7 +275,6 @@ Val_net (virNetworkPtr net) - CAMLreturn (rv); - } - --#ifdef HAVE_VIRSTORAGEPOOLPTR - static value - Val_pol (virStoragePoolPtr pol) - { -@@ -294,9 +285,7 @@ Val_pol (virStoragePoolPtr pol) - Pol_val (rv) = pol; - CAMLreturn (rv); - } --#endif - --#ifdef HAVE_VIRSTORAGEVOLPTR - static value - Val_vol (virStorageVolPtr vol) - { -@@ -307,7 +296,6 @@ Val_vol (virStorageVolPtr vol) - Vol_val (rv) = vol; - CAMLreturn (rv); - } --#endif - - /* This wraps up the (dom, conn) pair (Domain.t). */ - static value -@@ -337,7 +325,6 @@ Val_network (virNetworkPtr net, value connv) - CAMLreturn (rv); - } - --#ifdef HAVE_VIRSTORAGEPOOLPTR - /* This wraps up the (pol, conn) pair (Pool.t). */ - static value - Val_pool (virStoragePoolPtr pol, value connv) -@@ -351,9 +338,7 @@ Val_pool (virStoragePoolPtr pol, value connv) - Store_field (rv, 1, connv); - CAMLreturn (rv); - } --#endif - --#ifdef HAVE_VIRSTORAGEVOLPTR - /* This wraps up the (vol, conn) pair (Volume.t). */ - static value - Val_volume (virStorageVolPtr vol, value connv) -@@ -367,7 +352,6 @@ Val_volume (virStorageVolPtr vol, value connv) - Store_field (rv, 1, connv); - CAMLreturn (rv); - } --#endif - - static void - conn_finalize (value connv) -@@ -390,20 +374,16 @@ net_finalize (value netv) - if (net) (void) virNetworkFree (net); - } - --#ifdef HAVE_VIRSTORAGEPOOLPTR - static void - pol_finalize (value polv) - { - virStoragePoolPtr pol = Pol_val (polv); - if (pol) (void) virStoragePoolFree (pol); - } --#endif - --#ifdef HAVE_VIRSTORAGEVOLPTR - static void - vol_finalize (value volv) - { - virStorageVolPtr vol = Vol_val (volv); - if (vol) (void) virStorageVolFree (vol); - } --#endif -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index b1d88cc..42301b7 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -129,47 +129,25 @@ ocaml_libvirt_connect_get_node_info (value connv) - CAMLreturn (rv); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRNODEGETFREEMEMORY --extern unsigned long long virNodeGetFreeMemory (virConnectPtr conn) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_node_get_free_memory (value connv) - { --#ifdef HAVE_VIRNODEGETFREEMEMORY - CAMLparam1 (connv); - CAMLlocal1 (rv); - virConnectPtr conn = Connect_val (connv); - unsigned long long r; - -- WEAK_SYMBOL_CHECK (virNodeGetFreeMemory); - NONBLOCKING (r = virNodeGetFreeMemory (conn)); - CHECK_ERROR (r == 0, conn, "virNodeGetFreeMemory"); - - rv = caml_copy_int64 ((int64) r); - CAMLreturn (rv); --#else -- not_supported ("virNodeGetFreeMemory"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRNODEGETCELLSFREEMEMORY --extern int virNodeGetCellsFreeMemory (virConnectPtr conn, -- unsigned long long *freeMems, -- int startCell, int maxCells) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_connect_node_get_cells_free_memory (value connv, - value startv, value maxv) - { --#ifdef HAVE_VIRNODEGETCELLSFREEMEMORY - CAMLparam3 (connv, startv, maxv); - CAMLlocal2 (rv, iv); - virConnectPtr conn = Connect_val (connv); -@@ -178,7 +156,6 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, - int r, i; - unsigned long long freemems[max]; - -- WEAK_SYMBOL_CHECK (virNodeGetCellsFreeMemory); - NONBLOCKING (r = virNodeGetCellsFreeMemory (conn, freemems, start, max)); - CHECK_ERROR (r == -1, conn, "virNodeGetCellsFreeMemory"); - -@@ -189,9 +166,6 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, - } - - CAMLreturn (rv); --#else -- not_supported ("virNodeGetCellsFreeMemory"); --#endif - } - - CAMLprim value -@@ -280,18 +254,9 @@ ocaml_libvirt_domain_get_info (value domv) - CAMLreturn (rv); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINGETSCHEDULERTYPE --extern char *virDomainGetSchedulerType(virDomainPtr domain, -- int *nparams) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_get_scheduler_type (value domv) - { --#ifdef HAVE_VIRDOMAINGETSCHEDULERTYPE - CAMLparam1 (domv); - CAMLlocal2 (rv, strv); - virDomainPtr dom = Domain_val (domv); -@@ -299,7 +264,6 @@ ocaml_libvirt_domain_get_scheduler_type (value domv) - char *r; - int nparams; - -- WEAK_SYMBOL_CHECK (virDomainGetSchedulerType); - NONBLOCKING (r = virDomainGetSchedulerType (dom, &nparams)); - CHECK_ERROR (!r, conn, "virDomainGetSchedulerType"); - -@@ -308,24 +272,11 @@ ocaml_libvirt_domain_get_scheduler_type (value domv) - free (r); - Store_field (rv, 1, nparams); - CAMLreturn (rv); --#else -- not_supported ("virDomainGetSchedulerType"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS --extern int virDomainGetSchedulerParameters (virDomainPtr domain, -- virSchedParameterPtr params, -- int *nparams) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) - { --#ifdef HAVE_VIRDOMAINGETSCHEDULERPARAMETERS - CAMLparam2 (domv, nparamsv); - CAMLlocal4 (rv, v, v2, v3); - virDomainPtr dom = Domain_val (domv); -@@ -334,7 +285,6 @@ ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) - virSchedParameter params[nparams]; - int r, i; - -- WEAK_SYMBOL_CHECK (virDomainGetSchedulerParameters); - NONBLOCKING (r = virDomainGetSchedulerParameters (dom, params, &nparams)); - CHECK_ERROR (r == -1, conn, "virDomainGetSchedulerParameters"); - -@@ -373,24 +323,11 @@ ocaml_libvirt_domain_get_scheduler_parameters (value domv, value nparamsv) - Store_field (v, 1, v2); - } - CAMLreturn (rv); --#else -- not_supported ("virDomainGetSchedulerParameters"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS --extern int virDomainSetSchedulerParameters (virDomainPtr domain, -- virSchedParameterPtr params, -- int nparams) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_set_scheduler_parameters (value domv, value paramsv) - { --#ifdef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS - CAMLparam2 (domv, paramsv); - CAMLlocal1 (v); - virDomainPtr dom = Domain_val (domv); -@@ -436,14 +373,10 @@ ocaml_libvirt_domain_set_scheduler_parameters (value domv, value paramsv) - } - } - -- WEAK_SYMBOL_CHECK (virDomainSetSchedulerParameters); - NONBLOCKING (r = virDomainSetSchedulerParameters (dom, params, nparams)); - CHECK_ERROR (r == -1, conn, "virDomainSetSchedulerParameters"); - - CAMLreturn (Val_unit); --#else -- not_supported ("virDomainSetSchedulerParameters"); --#endif - } - - CAMLprim value -@@ -519,22 +452,9 @@ ocaml_libvirt_domain_get_vcpus (value domv, value maxinfov, value maplenv) - CAMLreturn (rv); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINGETCPUSTATS --extern int virDomainGetCPUStats (virDomainPtr domain, -- virTypedParameterPtr params, -- unsigned int nparams, -- int start_cpu, -- unsigned int ncpus, -- unsigned int flags) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_get_cpu_stats (value domv) - { --#ifdef HAVE_VIRDOMAINGETCPUSTATS - CAMLparam1 (domv); - CAMLlocal5 (cpustats, param_head, param_node, typed_param, typed_param_value); - CAMLlocal1 (v); -@@ -633,24 +553,11 @@ ocaml_libvirt_domain_get_cpu_stats (value domv) - } - free(params); - CAMLreturn (cpustats); --#else -- not_supported ("virDomainGetCPUStats"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINMIGRATE --extern virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, -- unsigned long flags, const char *dname, -- const char *uri, unsigned long bandwidth) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_migrate_native (value domv, value dconnv, value flagsv, value optdnamev, value opturiv, value optbandwidthv, value unitv) - { --#ifdef HAVE_VIRDOMAINMIGRATE - CAMLparam5 (domv, dconnv, flagsv, optdnamev, opturiv); - CAMLxparam2 (optbandwidthv, unitv); - CAMLlocal2 (flagv, rv); -@@ -676,17 +583,12 @@ ocaml_libvirt_domain_migrate_native (value domv, value dconnv, value flagsv, val - else /* Some bandwidth */ - bandwidth = Int_val (Field (optbandwidthv, 0)); - -- WEAK_SYMBOL_CHECK (virDomainMigrate); - NONBLOCKING (r = virDomainMigrate (dom, dconn, flags, dname, uri, bandwidth)); - CHECK_ERROR (!r, conn, "virDomainMigrate"); - - rv = Val_domain (r, dconnv); - - CAMLreturn (rv); -- --#else /* virDomainMigrate not supported */ -- not_supported ("virDomainMigrate"); --#endif - } - - CAMLprim value -@@ -697,20 +599,9 @@ ocaml_libvirt_domain_migrate_bytecode (value *argv, int argn) - argv[6]); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINBLOCKSTATS --extern int virDomainBlockStats (virDomainPtr dom, -- const char *path, -- virDomainBlockStatsPtr stats, -- size_t size) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_block_stats (value domv, value pathv) - { --#if HAVE_VIRDOMAINBLOCKSTATS - CAMLparam2 (domv, pathv); - CAMLlocal2 (rv,v); - virDomainPtr dom = Domain_val (domv); -@@ -719,7 +610,6 @@ ocaml_libvirt_domain_block_stats (value domv, value pathv) - struct _virDomainBlockStats stats; - int r; - -- WEAK_SYMBOL_CHECK (virDomainBlockStats); - NONBLOCKING (r = virDomainBlockStats (dom, path, &stats, sizeof stats)); - CHECK_ERROR (r == -1, conn, "virDomainBlockStats"); - -@@ -731,25 +621,11 @@ ocaml_libvirt_domain_block_stats (value domv, value pathv) - v = caml_copy_int64 (stats.errs); Store_field (rv, 4, v); - - CAMLreturn (rv); --#else -- not_supported ("virDomainBlockStats"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAININTERFACESTATS --extern int virDomainInterfaceStats (virDomainPtr dom, -- const char *path, -- virDomainInterfaceStatsPtr stats, -- size_t size) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_interface_stats (value domv, value pathv) - { --#if HAVE_VIRDOMAININTERFACESTATS - CAMLparam2 (domv, pathv); - CAMLlocal2 (rv,v); - virDomainPtr dom = Domain_val (domv); -@@ -758,7 +634,6 @@ ocaml_libvirt_domain_interface_stats (value domv, value pathv) - struct _virDomainInterfaceStats stats; - int r; - -- WEAK_SYMBOL_CHECK (virDomainInterfaceStats); - NONBLOCKING (r = virDomainInterfaceStats (dom, path, &stats, sizeof stats)); - CHECK_ERROR (r == -1, conn, "virDomainInterfaceStats"); - -@@ -773,27 +648,11 @@ ocaml_libvirt_domain_interface_stats (value domv, value pathv) - v = caml_copy_int64 (stats.tx_drop); Store_field (rv, 7, v); - - CAMLreturn (rv); --#else -- not_supported ("virDomainInterfaceStats"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINBLOCKPEEK --extern int virDomainBlockPeek (virDomainPtr domain, -- const char *path, -- unsigned long long offset, -- size_t size, -- void *buffer, -- unsigned int flags) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_block_peek_native (value domv, value pathv, value offsetv, value sizev, value bufferv, value boffv) - { --#ifdef HAVE_VIRDOMAINBLOCKPEEK - CAMLparam5 (domv, pathv, offsetv, sizev, bufferv); - CAMLxparam1 (boffv); - virDomainPtr dom = Domain_val (domv); -@@ -809,16 +668,11 @@ ocaml_libvirt_domain_block_peek_native (value domv, value pathv, value offsetv, - if (caml_string_length (bufferv) < boff + size) - caml_failwith ("virDomainBlockPeek: return buffer too short"); - -- WEAK_SYMBOL_CHECK (virDomainBlockPeek); - /* NB. not NONBLOCKING because buffer might move (XXX) */ - r = virDomainBlockPeek (dom, path, offset, size, buffer+boff, 0); - CHECK_ERROR (r == -1, conn, "virDomainBlockPeek"); - - CAMLreturn (Val_unit); -- --#else /* virDomainBlockPeek not supported */ -- not_supported ("virDomainBlockPeek"); --#endif - } - - CAMLprim value -@@ -828,21 +682,9 @@ ocaml_libvirt_domain_block_peek_bytecode (value *argv, int argn) - argv[3], argv[4], argv[5]); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRDOMAINMEMORYPEEK --extern int virDomainMemoryPeek (virDomainPtr domain, -- unsigned long long start, -- size_t size, -- void *buffer, -- unsigned int flags) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_domain_memory_peek_native (value domv, value flagsv, value offsetv, value sizev, value bufferv, value boffv) - { --#ifdef HAVE_VIRDOMAINMEMORYPEEK - CAMLparam5 (domv, flagsv, offsetv, sizev, bufferv); - CAMLxparam1 (boffv); - CAMLlocal1 (flagv); -@@ -867,16 +709,11 @@ ocaml_libvirt_domain_memory_peek_native (value domv, value flagsv, value offsetv - flags |= VIR_MEMORY_VIRTUAL; - } - -- WEAK_SYMBOL_CHECK (virDomainMemoryPeek); - /* NB. not NONBLOCKING because buffer might move (XXX) */ - r = virDomainMemoryPeek (dom, offset, size, buffer+boff, flags); - CHECK_ERROR (r == -1, conn, "virDomainMemoryPeek"); - - CAMLreturn (Val_unit); -- --#else /* virDomainMemoryPeek not supported */ -- not_supported ("virDomainMemoryPeek"); --#endif - } - - CAMLprim value -@@ -886,17 +723,9 @@ ocaml_libvirt_domain_memory_peek_bytecode (value *argv, int argn) - argv[3], argv[4], argv[5]); - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEPOOLGETINFO --extern int virStoragePoolGetInfo(virStoragePoolPtr pool, virStoragePoolInfoPtr info) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_pool_get_info (value poolv) - { --#if HAVE_VIRSTORAGEPOOLGETINFO - CAMLparam1 (poolv); - CAMLlocal2 (rv, v); - virStoragePoolPtr pool = Pool_val (poolv); -@@ -904,7 +733,6 @@ ocaml_libvirt_storage_pool_get_info (value poolv) - virStoragePoolInfo info; - int r; - -- WEAK_SYMBOL_CHECK (virStoragePoolGetInfo); - NONBLOCKING (r = virStoragePoolGetInfo (pool, &info)); - CHECK_ERROR (r == -1, conn, "virStoragePoolGetInfo"); - -@@ -915,22 +743,11 @@ ocaml_libvirt_storage_pool_get_info (value poolv) - v = caml_copy_int64 (info.available); Store_field (rv, 3, v); - - CAMLreturn (rv); --#else -- not_supported ("virStoragePoolGetInfo"); --#endif - } - --#ifdef HAVE_WEAK_SYMBOLS --#ifdef HAVE_VIRSTORAGEVOLGETINFO --extern int virStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info) -- __attribute__((weak)); --#endif --#endif -- - CAMLprim value - ocaml_libvirt_storage_vol_get_info (value volv) - { --#if HAVE_VIRSTORAGEVOLGETINFO - CAMLparam1 (volv); - CAMLlocal2 (rv, v); - virStorageVolPtr vol = Volume_val (volv); -@@ -938,7 +755,6 @@ ocaml_libvirt_storage_vol_get_info (value volv) - virStorageVolInfo info; - int r; - -- WEAK_SYMBOL_CHECK (virStorageVolGetInfo); - NONBLOCKING (r = virStorageVolGetInfo (vol, &info)); - CHECK_ERROR (r == -1, conn, "virStorageVolGetInfo"); - -@@ -948,9 +764,6 @@ ocaml_libvirt_storage_vol_get_info (value volv) - v = caml_copy_int64 (info.allocation); Store_field (rv, 2, v); - - CAMLreturn (rv); --#else -- not_supported ("virStorageVolGetInfo"); --#endif - } - - /*----------------------------------------------------------------------*/ -diff --git a/libvirt/libvirt_c_prologue.c b/libvirt/libvirt_c_prologue.c -index 2050078..7d9c0f5 100644 ---- a/libvirt/libvirt_c_prologue.c -+++ b/libvirt/libvirt_c_prologue.c -@@ -46,28 +46,6 @@ static value Val_virterror (virErrorPtr err); - #define CHECK_ERROR(cond, conn, fn) \ - do { if (cond) _raise_virterror (conn, fn); } while (0) - --/* For more about weak symbols, see: -- * http://kolpackov.net/pipermail/notes/2004-March/000006.html -- * We are using this to do runtime detection of library functions -- * so that if we dynamically link with an older version of -- * libvirt than we were compiled against, it won't fail (provided -- * libvirt >= 0.2.1 - we don't support anything older). -- */ --#ifdef __GNUC__ --#ifdef linux --#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) --#define HAVE_WEAK_SYMBOLS 1 --#endif --#endif --#endif -- --#ifdef HAVE_WEAK_SYMBOLS --#define WEAK_SYMBOL_CHECK(sym) \ -- do { if (!sym) not_supported(#sym); } while (0) --#else --#define WEAK_SYMBOL_CHECK(sym) --#endif /* HAVE_WEAK_SYMBOLS */ -- - /*----------------------------------------------------------------------*/ - - /* Some notes about the use of custom blocks to store virConnectPtr, -@@ -113,49 +91,29 @@ static value Val_virterror (virErrorPtr err); - #define Connect_val(rv) (*((virConnectPtr *)Data_custom_val(rv))) - #define Dom_val(rv) (*((virDomainPtr *)Data_custom_val(rv))) - #define Net_val(rv) (*((virNetworkPtr *)Data_custom_val(rv))) --#ifdef HAVE_VIRSTORAGEPOOLPTR - #define Pol_val(rv) (*((virStoragePoolPtr *)Data_custom_val(rv))) --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - #define Vol_val(rv) (*((virStorageVolPtr *)Data_custom_val(rv))) --#endif - - /* Wrap up a pointer to something in a custom block. */ - static value Val_connect (virConnectPtr conn); - static value Val_dom (virDomainPtr dom); - static value Val_net (virNetworkPtr net); --#ifdef HAVE_VIRSTORAGEPOOLPTR - static value Val_pol (virStoragePoolPtr pool); --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - static value Val_vol (virStorageVolPtr vol); --#endif - - /* Domains and networks are stored as pairs (dom/net, conn), so have - * some convenience functions for unwrapping and wrapping them. - */ - #define Domain_val(rv) (Dom_val(Field((rv),0))) - #define Network_val(rv) (Net_val(Field((rv),0))) --#ifdef HAVE_VIRSTORAGEPOOLPTR - #define Pool_val(rv) (Pol_val(Field((rv),0))) --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - #define Volume_val(rv) (Vol_val(Field((rv),0))) --#endif - #define Connect_domv(rv) (Connect_val(Field((rv),1))) - #define Connect_netv(rv) (Connect_val(Field((rv),1))) --#ifdef HAVE_VIRSTORAGEPOOLPTR - #define Connect_polv(rv) (Connect_val(Field((rv),1))) --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - #define Connect_volv(rv) (Connect_val(Field((rv),1))) --#endif - - static value Val_domain (virDomainPtr dom, value connv); - static value Val_network (virNetworkPtr net, value connv); --#ifdef HAVE_VIRSTORAGEPOOLPTR - static value Val_pool (virStoragePoolPtr pol, value connv); --#endif --#ifdef HAVE_VIRSTORAGEVOLPTR - static value Val_volume (virStorageVolPtr vol, value connv); --#endif diff --git a/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 b/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 deleted file mode 100644 index 591145a9..00000000 --- a/SOURCES/ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 +++ /dev/null @@ -1,73 +0,0 @@ -commit 0ec198e7784de1a49672183c961a2498b6c85b90 -Author: David Scott -Date: Wed Apr 24 11:39:04 2013 +0100 - - Add binding for virConnectSetKeepAlive - - This one is a 'one-off' but it ought to be possible to use the generator - to create the function (it has signature 'conn, int, int : int') - - This function first appeared in libvirt version 0.9.8. - - Signed-off-by: David Scott - -diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml -index 1fbb8ca..784a2b5 100644 ---- a/libvirt/libvirt.ml -+++ b/libvirt/libvirt.ml -@@ -100,6 +100,8 @@ struct - let cpu_usable cpumaps maplen vcpu cpu = - Char.code cpumaps.[vcpu*maplen + cpu/8] land (1 lsl (cpu mod 8)) <> 0 - -+ external set_keep_alive : [>`R] t -> int -> int -> unit = "ocaml_libvirt_connect_set_keep_alive" -+ - external const : [>`R] t -> ro t = "%identity" - end - -diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli -index 0185402..fa5a0fe 100644 ---- a/libvirt/libvirt.mli -+++ b/libvirt/libvirt.mli -@@ -384,6 +384,14 @@ sig - (** [cpu_usable cpumaps maplen vcpu cpu] checks returns true iff the - [cpu] is usable by [vcpu]. *) - -+ val set_keep_alive : [>`R] t -> int -> int -> unit -+ (** [set_keep_alive conn interval count] starts sending keepalive -+ messages after [interval] seconds of inactivity and consider the -+ connection to be broken when no response is received after [count] -+ keepalive messages. -+ Note: the client has to implement and run an event loop to -+ be able to use keep-alive messages. *) -+ - external const : [>`R] t -> ro t = "%identity" - (** [const conn] turns a read/write connection into a read-only - connection. Note that the opposite operation is impossible. -diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c -index 42301b7..c51aad7 100644 ---- a/libvirt/libvirt_c_oneoffs.c -+++ b/libvirt/libvirt_c_oneoffs.c -@@ -169,6 +169,23 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv, - } - - CAMLprim value -+ocaml_libvirt_connect_set_keep_alive(value connv, -+ value intervalv, value countv) -+{ -+ CAMLparam3 (connv, intervalv, countv); -+ virConnectPtr conn = Connect_val(connv); -+ int interval = Int_val(intervalv); -+ unsigned int count = Int_val(countv); -+ int r; -+ -+ NONBLOCKING(r = virConnectSetKeepAlive(conn, interval, count)); -+ CHECK_ERROR (r == -1, conn, "virConnectSetKeepAlive"); -+ -+ CAMLreturn(Val_unit); -+} -+ -+ -+CAMLprim value - ocaml_libvirt_domain_get_id (value domv) - { - CAMLparam1 (domv); diff --git a/SOURCES/ocaml-mirage-xen.install.sh b/SOURCES/ocaml-mirage-xen.install.sh deleted file mode 100755 index 70b118d1..00000000 --- a/SOURCES/ocaml-mirage-xen.install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e -set -x - -# The make install target in mirage-platform doesn't yet support DESTDIR so -# we perform a manual install. - -cd xen -export OCAMLFIND_DESTDIR=$1 -echo Installing into $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/mirage-xen -# Why does ocamlfind ignore me and delete that directory?? -MIRAGE_OS=xen ./cmd install -mkdir -p $OCAMLFIND_DESTDIR/mirage-xen -if [ -e $2/mirage-xen ]; then - cp $2/mirage-xen/* $OCAMLFIND_DESTDIR/mirage-xen -fi -find . -name "*.a" -exec cp {} $1/mirage-xen \; -cp _build/runtime/kernel/libxen.a $1/mirage-xen -cp _build/runtime/kernel/longjmp.o $1/mirage-xen -cp _build/runtime/kernel/x86_64.o $1/mirage-xen -cp _build/runtime/kernel/mirage-x86_64.lds $1/mirage-xen - diff --git a/SOURCES/ocaml-omd-setup.ml.patch b/SOURCES/ocaml-omd-setup.ml.patch deleted file mode 100644 index 63bd65a9..00000000 --- a/SOURCES/ocaml-omd-setup.ml.patch +++ /dev/null @@ -1,7877 +0,0 @@ -diff -urN omd-1.0.2.orig/AUTHORS.txt omd-1.0.2/AUTHORS.txt ---- omd-1.0.2.orig/AUTHORS.txt 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/AUTHORS.txt 2014-10-16 17:35:14.037877273 +0000 -@@ -0,0 +1,12 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 3710988688c65f6e4b9bb9bb6fbd1a7a) *) -+ -+Authors of omd: -+ -+* Philippe Wang -+ -+Current maintainers of omd: -+ -+* Philippe Wang -+ -+(* OASIS_STOP *) -diff -urN omd-1.0.2.orig/INSTALL.txt omd-1.0.2/INSTALL.txt ---- omd-1.0.2.orig/INSTALL.txt 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/INSTALL.txt 2014-10-16 17:35:14.037877273 +0000 -@@ -0,0 +1,37 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 379b4e3ccfb8def9d0ba6eae56ab345d) *) -+ -+This is the INSTALL file for the omd distribution. -+ -+This package uses OASIS to generate its build system. See section OASIS for -+full information. -+ -+Dependencies -+============ -+ -+In order to compile this package, you will need: -+ * ocaml -+ * findlib -+ -+Installing -+========== -+ -+1. Uncompress the source archive and go to the root of the package -+2. Run 'ocaml setup.ml -configure' -+3. Run 'ocaml setup.ml -build' -+4. Run 'ocaml setup.ml -install' -+ -+Uninstalling -+============ -+ -+1. Go to the root of the package -+2. Run 'ocaml setup.ml -uninstall' -+ -+OASIS -+===== -+ -+OASIS is a program that generates a setup.ml file using a simple '_oasis' -+configuration file. The generated setup only depends on the standard OCaml -+installation: no additional library is required. -+ -+(* OASIS_STOP *) -diff -urN omd-1.0.2.orig/myocamlbuild.ml omd-1.0.2/myocamlbuild.ml ---- omd-1.0.2.orig/myocamlbuild.ml 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/myocamlbuild.ml 2014-10-16 17:35:14.037877273 +0000 -@@ -0,0 +1,609 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 6186b4fe96f28bfcb79728ea0831b575) *) -+module OASISGettext = struct -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ -+ -+ let ns_ str = -+ str -+ -+ -+ let s_ str = -+ str -+ -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ -+ let init = -+ [] -+ -+ -+end -+ -+module OASISExpr = struct -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ -+ -+ open OASISGettext -+ -+ -+ type test = string -+ -+ -+ type flag = string -+ -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+ -+end -+ -+ -+# 132 "myocamlbuild.ml" -+module BaseEnvLight = struct -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ -+ -+ module MapString = Map.Make(String) -+ -+ -+ type t = string MapString.t -+ -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 237 "myocamlbuild.ml" -+module MyOCamlbuildFindlib = struct -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) -+ -+ -+ (** OCamlbuild extension, copied from -+ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild -+ * by N. Pouillard and others -+ * -+ * Updated on 2009/02/28 -+ * -+ * Modified by Sylvain Le Gall -+ *) -+ open Ocamlbuild_plugin -+ -+ -+ (* these functions are not really officially exported *) -+ let run_and_read = -+ Ocamlbuild_pack.My_unix.run_and_read -+ -+ -+ let blank_sep_strings = -+ Ocamlbuild_pack.Lexers.blank_sep_strings -+ -+ -+ let exec_from_conf exec = -+ let exec = -+ let env_filename = Pathname.basename BaseEnvLight.default_filename in -+ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in -+ try -+ BaseEnvLight.var_get exec env -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s\n" exec; -+ exec -+ in -+ let fix_win32 str = -+ if Sys.os_type = "Win32" then begin -+ let buff = Buffer.create (String.length str) in -+ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. -+ *) -+ String.iter -+ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) -+ str; -+ Buffer.contents buff -+ end else begin -+ str -+ end -+ in -+ fix_win32 exec -+ -+ let split s ch = -+ let buf = Buffer.create 13 in -+ let x = ref [] in -+ let flush () = -+ x := (Buffer.contents buf) :: !x; -+ Buffer.clear buf -+ in -+ String.iter -+ (fun c -> -+ if c = ch then -+ flush () -+ else -+ Buffer.add_char buf c) -+ s; -+ flush (); -+ List.rev !x -+ -+ -+ let split_nl s = split s '\n' -+ -+ -+ let before_space s = -+ try -+ String.before s (String.index s ' ') -+ with Not_found -> s -+ -+ (* ocamlfind command *) -+ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] -+ -+ (* This lists all supported packages. *) -+ let find_packages () = -+ List.map before_space (split_nl & run_and_read "ocamlfind list") -+ -+ -+ (* Mock to list available syntaxes. *) -+ let find_syntaxes () = ["camlp4o"; "camlp4r"] -+ -+ -+ let well_known_syntax = [ -+ "camlp4.quotations.o"; -+ "camlp4.quotations.r"; -+ "camlp4.exceptiontracer"; -+ "camlp4.extend"; -+ "camlp4.foldgenerator"; -+ "camlp4.listcomprehension"; -+ "camlp4.locationstripper"; -+ "camlp4.macro"; -+ "camlp4.mapgenerator"; -+ "camlp4.metagenerator"; -+ "camlp4.profiler"; -+ "camlp4.tracer" -+ ] -+ -+ -+ let dispatch = -+ function -+ | After_options -> -+ (* By using Before_options one let command line options have an higher -+ * priority on the contrary using After_options will guarantee to have -+ * the higher priority override default commands by ocamlfind ones *) -+ Options.ocamlc := ocamlfind & A"ocamlc"; -+ Options.ocamlopt := ocamlfind & A"ocamlopt"; -+ Options.ocamldep := ocamlfind & A"ocamldep"; -+ Options.ocamldoc := ocamlfind & A"ocamldoc"; -+ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; -+ Options.ocamlmklib := ocamlfind & A"ocamlmklib" -+ -+ | After_rules -> -+ -+ (* When one link an OCaml library/binary/package, one should use -+ * -linkpkg *) -+ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; -+ -+ (* For each ocamlfind package one inject the -package option when -+ * compiling, computing dependencies, generating documentation and -+ * linking. *) -+ List.iter -+ begin fun pkg -> -+ let base_args = [A"-package"; A pkg] in -+ (* TODO: consider how to really choose camlp4o or camlp4r. *) -+ let syn_args = [A"-syntax"; A "camlp4o"] in -+ let args = -+ (* Heuristic to identify syntax extensions: whether they end in -+ ".syntax"; some might not. -+ *) -+ if Filename.check_suffix pkg "syntax" || -+ List.mem pkg well_known_syntax then -+ syn_args @ base_args -+ else -+ base_args -+ in -+ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; -+ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; -+ end -+ (find_packages ()); -+ -+ (* Like -package but for extensions syntax. Morover -syntax is useless -+ * when linking. *) -+ List.iter begin fun syntax -> -+ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & -+ S[A"-syntax"; A syntax]; -+ end (find_syntaxes ()); -+ -+ (* The default "thread" tag is not compatible with ocamlfind. -+ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" -+ * options when using this tag. When using the "-linkpkg" option with -+ * ocamlfind, this module will then be added twice on the command line. -+ * -+ * To solve this, one approach is to add the "-thread" option when using -+ * the "threads" package using the previous plugin. -+ *) -+ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); -+ -+ | _ -> -+ () -+end -+ -+module MyOCamlbuildBase = struct -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ -+ (** Base functions for writing myocamlbuild.ml -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ -+ -+ open Ocamlbuild_plugin -+ module OC = Ocamlbuild_pack.Ocaml_compiler -+ -+ -+ type dir = string -+ type file = string -+ type name = string -+ type tag = string -+ -+ -+(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ -+ type t = -+ { -+ lib_ocaml: (name * dir list * string list) list; -+ lib_c: (name * dir * file list) list; -+ flags: (tag list * (spec OASISExpr.choices)) list; -+ (* Replace the 'dir: include' from _tags by a precise interdepends in -+ * directory. -+ *) -+ includes: (dir * dir list) list; -+ } -+ -+ -+ let env_filename = -+ Pathname.basename -+ BaseEnvLight.default_filename -+ -+ -+ let dispatch_combine lst = -+ fun e -> -+ List.iter -+ (fun dispatch -> dispatch e) -+ lst -+ -+ -+ let tag_libstubs nm = -+ "use_lib"^nm^"_stubs" -+ -+ -+ let nm_libstubs nm = -+ nm^"_stubs" -+ -+ -+ let dispatch t e = -+ let env = -+ BaseEnvLight.load -+ ~filename:env_filename -+ ~allow_empty:true -+ () -+ in -+ match e with -+ | Before_options -> -+ let no_trailing_dot s = -+ if String.length s >= 1 && s.[0] = '.' then -+ String.sub s 1 ((String.length s) - 1) -+ else -+ s -+ in -+ List.iter -+ (fun (opt, var) -> -+ try -+ opt := no_trailing_dot (BaseEnvLight.var_get var env) -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s\n" var) -+ [ -+ Options.ext_obj, "ext_obj"; -+ Options.ext_lib, "ext_lib"; -+ Options.ext_dll, "ext_dll"; -+ ] -+ -+ | After_rules -> -+ (* Declare OCaml libraries *) -+ List.iter -+ (function -+ | nm, [], intf_modules -> -+ ocaml_lib nm; -+ let cmis = -+ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis -+ | nm, dir :: tl, intf_modules -> -+ ocaml_lib ~dir:dir (dir^"/"^nm); -+ List.iter -+ (fun dir -> -+ List.iter -+ (fun str -> -+ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) -+ ["compile"; "infer_interface"; "doc"]) -+ tl; -+ let cmis = -+ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] -+ cmis) -+ t.lib_ocaml; -+ -+ (* Declare directories dependencies, replace "include" in _tags. *) -+ List.iter -+ (fun (dir, include_dirs) -> -+ Pathname.define_context dir include_dirs) -+ t.includes; -+ -+ (* Declare C libraries *) -+ List.iter -+ (fun (lib, dir, headers) -> -+ (* Handle C part of library *) -+ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; -+ A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] -+ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); -+ -+ (* When ocaml link something that use the C library, then one -+ need that file to be up to date. -+ *) -+ dep ["link"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ (* TODO: be more specific about what depends on headers *) -+ (* Depends on .h files *) -+ dep ["compile"; "c"] -+ headers; -+ -+ (* Setup search path for lib *) -+ flag ["link"; "ocaml"; "use_"^lib] -+ (S[A"-I"; P(dir)]); -+ ) -+ t.lib_c; -+ -+ (* Add flags *) -+ List.iter -+ (fun (tags, cond_specs) -> -+ let spec = BaseEnvLight.var_choose cond_specs env in -+ let rec eval_specs = -+ function -+ | S lst -> S (List.map eval_specs lst) -+ | A str -> A (BaseEnvLight.var_expand str env) -+ | spec -> spec -+ in -+ flag tags & (eval_specs spec)) -+ t.flags -+ | _ -> -+ () -+ -+ -+ let dispatch_default t = -+ dispatch_combine -+ [ -+ dispatch t; -+ MyOCamlbuildFindlib.dispatch; -+ ] -+ -+ -+end -+ -+ -+# 594 "myocamlbuild.ml" -+open Ocamlbuild_plugin;; -+let package_default = -+ { -+ MyOCamlbuildBase.lib_ocaml = [("omd", ["src"], [])]; -+ lib_c = []; -+ flags = []; -+ includes = [("tests/cow", ["src"]); ("tests", ["src"])] -+ } -+ ;; -+ -+let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; -+ -+# 608 "myocamlbuild.ml" -+(* OASIS_STOP *) -+Ocamlbuild_plugin.dispatch dispatch_default;; -diff -urN omd-1.0.2.orig/README.txt omd-1.0.2/README.txt ---- omd-1.0.2.orig/README.txt 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/README.txt 2014-10-16 17:35:14.037877273 +0000 -@@ -0,0 +1,26 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: aed56791947dcb6f267f1f4c0dd47ab1) *) -+ -+omd - A Markdown frontend in pure OCaml. -+======================================== -+ -+This Markdown library is implemented using only pure OCaml (including I/O -+operations provided by the standard OCaml compiler distribution). OMD is -+meant to be as faithful as possible to the original Markdown. Additionally, -+OMD implements a few Github markdown features, an extension mechanism, and a -+few other features. Note that the opam package installs both the OMD library -+and the command line tool `omd`. Note that The library interface of 1.0.x is -+only partially compatible with 0.9.x. -+ -+See the file [INSTALL.txt](INSTALL.txt) for building and installation -+instructions. -+ -+[Home page](https://github.com/ocaml/omd) -+ -+Copyright and license -+--------------------- -+ -+omd is distributed under the terms of the Internet Software Consortium's -+license. -+ -+(* OASIS_STOP *) -diff -urN omd-1.0.2.orig/setup.ml omd-1.0.2/setup.ml ---- omd-1.0.2.orig/setup.ml 2014-10-06 15:10:21.000000000 +0000 -+++ omd-1.0.2/setup.ml 2014-10-16 17:35:14.057877135 +0000 -@@ -3,9 +3,7088 @@ - with Not_found -> ();; - - (* OASIS_START *) --(* DO NOT EDIT (digest: 7f47a529f70709161149c201ccd90f0b) *) --#use "topfind";; --#require "oasis.dynrun";; --open OASISDynRun;; -+(* DO NOT EDIT (digest: 2b0de67708d24e260e7c5c20b1fb4ca5) *) -+(* -+ Regenerated by OASIS v0.4.4 -+ Visit http://oasis.forge.ocamlcore.org for more information and -+ documentation about functions used in this file. -+*) -+module OASISGettext = struct -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ -+ -+ let ns_ str = -+ str -+ -+ -+ let s_ str = -+ str -+ -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ -+ let init = -+ [] -+ -+ -+end -+ -+module OASISContext = struct -+(* # 22 "src/oasis/OASISContext.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ type level = -+ [ `Debug -+ | `Info -+ | `Warning -+ | `Error] -+ -+ -+ type t = -+ { -+ (* TODO: replace this by a proplist. *) -+ quiet: bool; -+ info: bool; -+ debug: bool; -+ ignore_plugins: bool; -+ ignore_unknown_fields: bool; -+ printf: level -> string -> unit; -+ } -+ -+ -+ let printf lvl str = -+ let beg = -+ match lvl with -+ | `Error -> s_ "E: " -+ | `Warning -> s_ "W: " -+ | `Info -> s_ "I: " -+ | `Debug -> s_ "D: " -+ in -+ prerr_endline (beg^str) -+ -+ -+ let default = -+ ref -+ { -+ quiet = false; -+ info = false; -+ debug = false; -+ ignore_plugins = false; -+ ignore_unknown_fields = false; -+ printf = printf; -+ } -+ -+ -+ let quiet = -+ {!default with quiet = true} -+ -+ -+ let fspecs () = -+ (* TODO: don't act on default. *) -+ let ignore_plugins = ref false in -+ ["-quiet", -+ Arg.Unit (fun () -> default := {!default with quiet = true}), -+ s_ " Run quietly"; -+ -+ "-info", -+ Arg.Unit (fun () -> default := {!default with info = true}), -+ s_ " Display information message"; -+ -+ -+ "-debug", -+ Arg.Unit (fun () -> default := {!default with debug = true}), -+ s_ " Output debug message"; -+ -+ "-ignore-plugins", -+ Arg.Set ignore_plugins, -+ s_ " Ignore plugin's field."; -+ -+ "-C", -+ (* TODO: remove this chdir. *) -+ Arg.String (fun str -> Sys.chdir str), -+ s_ "dir Change directory before running."], -+ fun () -> {!default with ignore_plugins = !ignore_plugins} -+end -+ -+module OASISString = struct -+(* # 22 "src/oasis/OASISString.ml" *) -+ -+ -+ (** Various string utilities. -+ -+ Mostly inspired by extlib and batteries ExtString and BatString libraries. -+ -+ @author Sylvain Le Gall -+ *) -+ -+ -+ let nsplitf str f = -+ if str = "" then -+ [] -+ else -+ let buf = Buffer.create 13 in -+ let lst = ref [] in -+ let push () = -+ lst := Buffer.contents buf :: !lst; -+ Buffer.clear buf -+ in -+ let str_len = String.length str in -+ for i = 0 to str_len - 1 do -+ if f str.[i] then -+ push () -+ else -+ Buffer.add_char buf str.[i] -+ done; -+ push (); -+ List.rev !lst -+ -+ -+ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the -+ separator. -+ *) -+ let nsplit str c = -+ nsplitf str ((=) c) -+ -+ -+ let find ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ while !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ what_idx := 0; -+ incr str_idx -+ done; -+ if !what_idx <> String.length what then -+ raise Not_found -+ else -+ !str_idx - !what_idx -+ -+ -+ let sub_start str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str len (str_len - len) -+ -+ -+ let sub_end ?(offset=0) str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str 0 (str_len - len) -+ -+ -+ let starts_with ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ let ok = ref true in -+ while !ok && -+ !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ ok := false; -+ incr str_idx -+ done; -+ if !what_idx = String.length what then -+ true -+ else -+ false -+ -+ -+ let strip_starts_with ~what str = -+ if starts_with ~what str then -+ sub_start str (String.length what) -+ else -+ raise Not_found -+ -+ -+ let ends_with ~what ?(offset=0) str = -+ let what_idx = ref ((String.length what) - 1) in -+ let str_idx = ref ((String.length str) - 1) in -+ let ok = ref true in -+ while !ok && -+ offset <= !str_idx && -+ 0 <= !what_idx do -+ if str.[!str_idx] = what.[!what_idx] then -+ decr what_idx -+ else -+ ok := false; -+ decr str_idx -+ done; -+ if !what_idx = -1 then -+ true -+ else -+ false -+ -+ -+ let strip_ends_with ~what str = -+ if ends_with ~what str then -+ sub_end str (String.length what) -+ else -+ raise Not_found -+ -+ -+ let replace_chars f s = -+ let buf = String.make (String.length s) 'X' in -+ for i = 0 to String.length s - 1 do -+ buf.[i] <- f s.[i] -+ done; -+ buf -+ -+ -+end -+ -+module OASISUtils = struct -+(* # 22 "src/oasis/OASISUtils.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ module MapExt = -+ struct -+ module type S = -+ sig -+ include Map.S -+ val add_list: 'a t -> (key * 'a) list -> 'a t -+ val of_list: (key * 'a) list -> 'a t -+ val to_list: 'a t -> (key * 'a) list -+ end -+ -+ module Make (Ord: Map.OrderedType) = -+ struct -+ include Map.Make(Ord) -+ -+ let rec add_list t = -+ function -+ | (k, v) :: tl -> add_list (add k v t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] -+ end -+ end -+ -+ -+ module MapString = MapExt.Make(String) -+ -+ -+ module SetExt = -+ struct -+ module type S = -+ sig -+ include Set.S -+ val add_list: t -> elt list -> t -+ val of_list: elt list -> t -+ val to_list: t -> elt list -+ end -+ -+ module Make (Ord: Set.OrderedType) = -+ struct -+ include Set.Make(Ord) -+ -+ let rec add_list t = -+ function -+ | e :: tl -> add_list (add e t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list = elements -+ end -+ end -+ -+ -+ module SetString = SetExt.Make(String) -+ -+ -+ let compare_csl s1 s2 = -+ String.compare (String.lowercase s1) (String.lowercase s2) -+ -+ -+ module HashStringCsl = -+ Hashtbl.Make -+ (struct -+ type t = string -+ -+ let equal s1 s2 = -+ (String.lowercase s1) = (String.lowercase s2) -+ -+ let hash s = -+ Hashtbl.hash (String.lowercase s) -+ end) -+ -+ module SetStringCsl = -+ SetExt.Make -+ (struct -+ type t = string -+ let compare = compare_csl -+ end) -+ -+ -+ let varname_of_string ?(hyphen='_') s = -+ if String.length s = 0 then -+ begin -+ invalid_arg "varname_of_string" -+ end -+ else -+ begin -+ let buf = -+ OASISString.replace_chars -+ (fun c -> -+ if ('a' <= c && c <= 'z') -+ || -+ ('A' <= c && c <= 'Z') -+ || -+ ('0' <= c && c <= '9') then -+ c -+ else -+ hyphen) -+ s; -+ in -+ let buf = -+ (* Start with a _ if digit *) -+ if '0' <= s.[0] && s.[0] <= '9' then -+ "_"^buf -+ else -+ buf -+ in -+ String.lowercase buf -+ end -+ -+ -+ let varname_concat ?(hyphen='_') p s = -+ let what = String.make 1 hyphen in -+ let p = -+ try -+ OASISString.strip_ends_with ~what p -+ with Not_found -> -+ p -+ in -+ let s = -+ try -+ OASISString.strip_starts_with ~what s -+ with Not_found -> -+ s -+ in -+ p^what^s -+ -+ -+ let is_varname str = -+ str = varname_of_string str -+ -+ -+ let failwithf fmt = Printf.ksprintf failwith fmt -+ -+ -+end -+ -+module PropList = struct -+(* # 22 "src/oasis/PropList.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ type name = string -+ -+ -+ exception Not_set of name * string option -+ exception No_printer of name -+ exception Unknown_field of name * name -+ -+ -+ let () = -+ Printexc.register_printer -+ (function -+ | Not_set (nm, Some rsn) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) -+ | Not_set (nm, None) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set") nm) -+ | No_printer nm -> -+ Some -+ (Printf.sprintf (f_ "No default printer for value %s") nm) -+ | Unknown_field (nm, schm) -> -+ Some -+ (Printf.sprintf -+ (f_ "Field %s is not defined in schema %s") nm schm) -+ | _ -> -+ None) -+ -+ -+ module Data = -+ struct -+ type t = -+ (name, unit -> unit) Hashtbl.t -+ -+ let create () = -+ Hashtbl.create 13 -+ -+ let clear t = -+ Hashtbl.clear t -+ -+ -+(* # 78 "src/oasis/PropList.ml" *) -+ end -+ -+ -+ module Schema = -+ struct -+ type ('ctxt, 'extra) value = -+ { -+ get: Data.t -> string; -+ set: Data.t -> ?context:'ctxt -> string -> unit; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ type ('ctxt, 'extra) t = -+ { -+ name: name; -+ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; -+ order: name Queue.t; -+ name_norm: string -> string; -+ } -+ -+ let create ?(case_insensitive=false) nm = -+ { -+ name = nm; -+ fields = Hashtbl.create 13; -+ order = Queue.create (); -+ name_norm = -+ (if case_insensitive then -+ String.lowercase -+ else -+ fun s -> s); -+ } -+ -+ let add t nm set get extra help = -+ let key = -+ t.name_norm nm -+ in -+ -+ if Hashtbl.mem t.fields key then -+ failwith -+ (Printf.sprintf -+ (f_ "Field '%s' is already defined in schema '%s'") -+ nm t.name); -+ Hashtbl.add -+ t.fields -+ key -+ { -+ set = set; -+ get = get; -+ help = help; -+ extra = extra; -+ }; -+ Queue.add nm t.order -+ -+ let mem t nm = -+ Hashtbl.mem t.fields nm -+ -+ let find t nm = -+ try -+ Hashtbl.find t.fields (t.name_norm nm) -+ with Not_found -> -+ raise (Unknown_field (nm, t.name)) -+ -+ let get t data nm = -+ (find t nm).get data -+ -+ let set t data nm ?context x = -+ (find t nm).set -+ data -+ ?context -+ x -+ -+ let fold f acc t = -+ Queue.fold -+ (fun acc k -> -+ let v = -+ find t k -+ in -+ f acc k v.extra v.help) -+ acc -+ t.order -+ -+ let iter f t = -+ fold -+ (fun () -> f) -+ () -+ t -+ -+ let name t = -+ t.name -+ end -+ -+ -+ module Field = -+ struct -+ type ('ctxt, 'value, 'extra) t = -+ { -+ set: Data.t -> ?context:'ctxt -> 'value -> unit; -+ get: Data.t -> 'value; -+ sets: Data.t -> ?context:'ctxt -> string -> unit; -+ gets: Data.t -> string; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ let new_id = -+ let last_id = -+ ref 0 -+ in -+ fun () -> incr last_id; !last_id -+ -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ (* Default value container *) -+ let v = -+ ref None -+ in -+ -+ (* If name is not given, create unique one *) -+ let nm = -+ match name with -+ | Some s -> s -+ | None -> Printf.sprintf "_anon_%d" (new_id ()) -+ in -+ -+ (* Last chance to get a value: the default *) -+ let default () = -+ match default with -+ | Some d -> d -+ | None -> raise (Not_set (nm, Some (s_ "no default value"))) -+ in -+ -+ (* Get data *) -+ let get data = -+ (* Get value *) -+ try -+ (Hashtbl.find data nm) (); -+ match !v with -+ | Some x -> x -+ | None -> default () -+ with Not_found -> -+ default () -+ in -+ -+ (* Set data *) -+ let set data ?context x = -+ let x = -+ match update with -+ | Some f -> -+ begin -+ try -+ f ?context (get data) x -+ with Not_set _ -> -+ x -+ end -+ | None -> -+ x -+ in -+ Hashtbl.replace -+ data -+ nm -+ (fun () -> v := Some x) -+ in -+ -+ (* Parse string value, if possible *) -+ let parse = -+ match parse with -+ | Some f -> -+ f -+ | None -> -+ fun ?context s -> -+ failwith -+ (Printf.sprintf -+ (f_ "Cannot parse field '%s' when setting value %S") -+ nm -+ s) -+ in -+ -+ (* Set data, from string *) -+ let sets data ?context s = -+ set ?context data (parse ?context s) -+ in -+ -+ (* Output value as string, if possible *) -+ let print = -+ match print with -+ | Some f -> -+ f -+ | None -> -+ fun _ -> raise (No_printer nm) -+ in -+ -+ (* Get data, as a string *) -+ let gets data = -+ print (get data) -+ in -+ -+ begin -+ match schema with -+ | Some t -> -+ Schema.add t nm sets gets extra help -+ | None -> -+ () -+ end; -+ -+ { -+ set = set; -+ get = get; -+ sets = sets; -+ gets = gets; -+ help = help; -+ extra = extra; -+ } -+ -+ let fset data t ?context x = -+ t.set data ?context x -+ -+ let fget data t = -+ t.get data -+ -+ let fsets data t ?context s = -+ t.sets data ?context s -+ -+ let fgets data t = -+ t.gets data -+ end -+ -+ -+ module FieldRO = -+ struct -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ let fld = -+ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra -+ in -+ fun data -> Field.fget data fld -+ end -+end -+ -+module OASISMessage = struct -+(* # 22 "src/oasis/OASISMessage.ml" *) -+ -+ -+ open OASISGettext -+ open OASISContext -+ -+ -+ let generic_message ~ctxt lvl fmt = -+ let cond = -+ if ctxt.quiet then -+ false -+ else -+ match lvl with -+ | `Debug -> ctxt.debug -+ | `Info -> ctxt.info -+ | _ -> true -+ in -+ Printf.ksprintf -+ (fun str -> -+ if cond then -+ begin -+ ctxt.printf lvl str -+ end) -+ fmt -+ -+ -+ let debug ~ctxt fmt = -+ generic_message ~ctxt `Debug fmt -+ -+ -+ let info ~ctxt fmt = -+ generic_message ~ctxt `Info fmt -+ -+ -+ let warning ~ctxt fmt = -+ generic_message ~ctxt `Warning fmt -+ -+ -+ let error ~ctxt fmt = -+ generic_message ~ctxt `Error fmt -+ -+end -+ -+module OASISVersion = struct -+(* # 22 "src/oasis/OASISVersion.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ -+ -+ -+ type s = string -+ -+ -+ type t = string -+ -+ -+ type comparator = -+ | VGreater of t -+ | VGreaterEqual of t -+ | VEqual of t -+ | VLesser of t -+ | VLesserEqual of t -+ | VOr of comparator * comparator -+ | VAnd of comparator * comparator -+ -+ -+ -+ (* Range of allowed characters *) -+ let is_digit c = -+ '0' <= c && c <= '9' -+ -+ -+ let is_alpha c = -+ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') -+ -+ -+ let is_special = -+ function -+ | '.' | '+' | '-' | '~' -> true -+ | _ -> false -+ -+ -+ let rec version_compare v1 v2 = -+ if v1 <> "" || v2 <> "" then -+ begin -+ (* Compare ascii string, using special meaning for version -+ * related char -+ *) -+ let val_ascii c = -+ if c = '~' then -1 -+ else if is_digit c then 0 -+ else if c = '\000' then 0 -+ else if is_alpha c then Char.code c -+ else (Char.code c) + 256 -+ in -+ -+ let len1 = String.length v1 in -+ let len2 = String.length v2 in -+ -+ let p = ref 0 in -+ -+ (** Compare ascii part *) -+ let compare_vascii () = -+ let cmp = ref 0 in -+ while !cmp = 0 && -+ !p < len1 && !p < len2 && -+ not (is_digit v1.[!p] && is_digit v2.[!p]) do -+ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); -+ incr p -+ done; -+ if !cmp = 0 && !p < len1 && !p = len2 then -+ val_ascii v1.[!p] -+ else if !cmp = 0 && !p = len1 && !p < len2 then -+ - (val_ascii v2.[!p]) -+ else -+ !cmp -+ in -+ -+ (** Compare digit part *) -+ let compare_digit () = -+ let extract_int v p = -+ let start_p = !p in -+ while !p < String.length v && is_digit v.[!p] do -+ incr p -+ done; -+ let substr = -+ String.sub v !p ((String.length v) - !p) -+ in -+ let res = -+ match String.sub v start_p (!p - start_p) with -+ | "" -> 0 -+ | s -> int_of_string s -+ in -+ res, substr -+ in -+ let i1, tl1 = extract_int v1 (ref !p) in -+ let i2, tl2 = extract_int v2 (ref !p) in -+ i1 - i2, tl1, tl2 -+ in -+ -+ match compare_vascii () with -+ | 0 -> -+ begin -+ match compare_digit () with -+ | 0, tl1, tl2 -> -+ if tl1 <> "" && is_digit tl1.[0] then -+ 1 -+ else if tl2 <> "" && is_digit tl2.[0] then -+ -1 -+ else -+ version_compare tl1 tl2 -+ | n, _, _ -> -+ n -+ end -+ | n -> -+ n -+ end -+ else -+ begin -+ 0 -+ end -+ -+ -+ let version_of_string str = str -+ -+ -+ let string_of_version t = t -+ -+ -+ let version_compare_string s1 s2 = -+ version_compare (version_of_string s1) (version_of_string s2) -+ -+ -+ let chop t = -+ try -+ let pos = -+ String.rindex t '.' -+ in -+ String.sub t 0 pos -+ with Not_found -> -+ t -+ -+ -+ let rec comparator_apply v op = -+ match op with -+ | VGreater cv -> -+ (version_compare v cv) > 0 -+ | VGreaterEqual cv -> -+ (version_compare v cv) >= 0 -+ | VLesser cv -> -+ (version_compare v cv) < 0 -+ | VLesserEqual cv -> -+ (version_compare v cv) <= 0 -+ | VEqual cv -> -+ (version_compare v cv) = 0 -+ | VOr (op1, op2) -> -+ (comparator_apply v op1) || (comparator_apply v op2) -+ | VAnd (op1, op2) -> -+ (comparator_apply v op1) && (comparator_apply v op2) -+ -+ -+ let rec string_of_comparator = -+ function -+ | VGreater v -> "> "^(string_of_version v) -+ | VEqual v -> "= "^(string_of_version v) -+ | VLesser v -> "< "^(string_of_version v) -+ | VGreaterEqual v -> ">= "^(string_of_version v) -+ | VLesserEqual v -> "<= "^(string_of_version v) -+ | VOr (c1, c2) -> -+ (string_of_comparator c1)^" || "^(string_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (string_of_comparator c1)^" && "^(string_of_comparator c2) -+ -+ -+ let rec varname_of_comparator = -+ let concat p v = -+ OASISUtils.varname_concat -+ p -+ (OASISUtils.varname_of_string -+ (string_of_version v)) -+ in -+ function -+ | VGreater v -> concat "gt" v -+ | VLesser v -> concat "lt" v -+ | VEqual v -> concat "eq" v -+ | VGreaterEqual v -> concat "ge" v -+ | VLesserEqual v -> concat "le" v -+ | VOr (c1, c2) -> -+ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) -+ -+ -+ let rec comparator_ge v' = -+ let cmp v = version_compare v v' >= 0 in -+ function -+ | VEqual v -+ | VGreaterEqual v -+ | VGreater v -> cmp v -+ | VLesserEqual _ -+ | VLesser _ -> false -+ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 -+ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 -+ -+ -+end -+ -+module OASISLicense = struct -+(* # 22 "src/oasis/OASISLicense.ml" *) -+ -+ -+ (** License for _oasis fields -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ -+ -+ type license = string -+ -+ -+ type license_exception = string -+ -+ -+ type license_version = -+ | Version of OASISVersion.t -+ | VersionOrLater of OASISVersion.t -+ | NoVersion -+ -+ -+ -+ type license_dep_5_unit = -+ { -+ license: license; -+ excption: license_exception option; -+ version: license_version; -+ } -+ -+ -+ -+ type license_dep_5 = -+ | DEP5Unit of license_dep_5_unit -+ | DEP5Or of license_dep_5 list -+ | DEP5And of license_dep_5 list -+ -+ -+ type t = -+ | DEP5License of license_dep_5 -+ | OtherLicense of string (* URL *) -+ -+ -+ -+end -+ -+module OASISExpr = struct -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ -+ -+ open OASISGettext -+ -+ -+ type test = string -+ -+ -+ type flag = string -+ -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+ -+end -+ -+module OASISText = struct -+(* # 22 "src/oasis/OASISText.ml" *) -+ -+ -+ -+ type elt = -+ | Para of string -+ | Verbatim of string -+ | BlankLine -+ -+ -+ type t = elt list -+ -+end -+ -+module OASISTypes = struct -+(* # 22 "src/oasis/OASISTypes.ml" *) -+ -+ -+ -+ -+ -+ type name = string -+ type package_name = string -+ type url = string -+ type unix_dirname = string -+ type unix_filename = string -+ type host_dirname = string -+ type host_filename = string -+ type prog = string -+ type arg = string -+ type args = string list -+ type command_line = (prog * arg list) -+ -+ -+ type findlib_name = string -+ type findlib_full = string -+ -+ -+ type compiled_object = -+ | Byte -+ | Native -+ | Best -+ -+ -+ -+ type dependency = -+ | FindlibPackage of findlib_full * OASISVersion.comparator option -+ | InternalLibrary of name -+ -+ -+ -+ type tool = -+ | ExternalTool of name -+ | InternalExecutable of name -+ -+ -+ -+ type vcs = -+ | Darcs -+ | Git -+ | Svn -+ | Cvs -+ | Hg -+ | Bzr -+ | Arch -+ | Monotone -+ | OtherVCS of url -+ -+ -+ -+ type plugin_kind = -+ [ `Configure -+ | `Build -+ | `Doc -+ | `Test -+ | `Install -+ | `Extra -+ ] -+ -+ -+ type plugin_data_purpose = -+ [ `Configure -+ | `Build -+ | `Install -+ | `Clean -+ | `Distclean -+ | `Install -+ | `Uninstall -+ | `Test -+ | `Doc -+ | `Extra -+ | `Other of string -+ ] -+ -+ -+ type 'a plugin = 'a * name * OASISVersion.t option -+ -+ -+ type all_plugin = plugin_kind plugin -+ -+ -+ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list -+ -+ -+(* # 115 "src/oasis/OASISTypes.ml" *) -+ -+ -+ type 'a conditional = 'a OASISExpr.choices -+ -+ -+ type custom = -+ { -+ pre_command: (command_line option) conditional; -+ post_command: (command_line option) conditional; -+ } -+ -+ -+ -+ type common_section = -+ { -+ cs_name: name; -+ cs_data: PropList.Data.t; -+ cs_plugin_data: plugin_data; -+ } -+ -+ -+ -+ type build_section = -+ { -+ bs_build: bool conditional; -+ bs_install: bool conditional; -+ bs_path: unix_dirname; -+ bs_compiled_object: compiled_object; -+ bs_build_depends: dependency list; -+ bs_build_tools: tool list; -+ bs_c_sources: unix_filename list; -+ bs_data_files: (unix_filename * unix_filename option) list; -+ bs_ccopt: args conditional; -+ bs_cclib: args conditional; -+ bs_dlllib: args conditional; -+ bs_dllpath: args conditional; -+ bs_byteopt: args conditional; -+ bs_nativeopt: args conditional; -+ } -+ -+ -+ -+ type library = -+ { -+ lib_modules: string list; -+ lib_pack: bool; -+ lib_internal_modules: string list; -+ lib_findlib_parent: findlib_name option; -+ lib_findlib_name: findlib_name option; -+ lib_findlib_containers: findlib_name list; -+ } -+ -+ -+ type object_ = -+ { -+ obj_modules: string list; -+ obj_findlib_fullname: findlib_name list option; -+ } -+ -+ -+ type executable = -+ { -+ exec_custom: bool; -+ exec_main_is: unix_filename; -+ } -+ -+ -+ type flag = -+ { -+ flag_description: string option; -+ flag_default: bool conditional; -+ } -+ -+ -+ type source_repository = -+ { -+ src_repo_type: vcs; -+ src_repo_location: url; -+ src_repo_browser: url option; -+ src_repo_module: string option; -+ src_repo_branch: string option; -+ src_repo_tag: string option; -+ src_repo_subdir: unix_filename option; -+ } -+ -+ -+ type test = -+ { -+ test_type: [`Test] plugin; -+ test_command: command_line conditional; -+ test_custom: custom; -+ test_working_directory: unix_filename option; -+ test_run: bool conditional; -+ test_tools: tool list; -+ } -+ -+ -+ type doc_format = -+ | HTML of unix_filename -+ | DocText -+ | PDF -+ | PostScript -+ | Info of unix_filename -+ | DVI -+ | OtherDoc -+ -+ -+ -+ type doc = -+ { -+ doc_type: [`Doc] plugin; -+ doc_custom: custom; -+ doc_build: bool conditional; -+ doc_install: bool conditional; -+ doc_install_dir: unix_filename; -+ doc_title: string; -+ doc_authors: string list; -+ doc_abstract: string option; -+ doc_format: doc_format; -+ doc_data_files: (unix_filename * unix_filename option) list; -+ doc_build_tools: tool list; -+ } -+ -+ -+ type section = -+ | Library of common_section * build_section * library -+ | Object of common_section * build_section * object_ -+ | Executable of common_section * build_section * executable -+ | Flag of common_section * flag -+ | SrcRepo of common_section * source_repository -+ | Test of common_section * test -+ | Doc of common_section * doc -+ -+ -+ -+ type section_kind = -+ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] -+ -+ -+ type package = -+ { -+ oasis_version: OASISVersion.t; -+ ocaml_version: OASISVersion.comparator option; -+ findlib_version: OASISVersion.comparator option; -+ alpha_features: string list; -+ beta_features: string list; -+ name: package_name; -+ version: OASISVersion.t; -+ license: OASISLicense.t; -+ license_file: unix_filename option; -+ copyrights: string list; -+ maintainers: string list; -+ authors: string list; -+ homepage: url option; -+ synopsis: string; -+ description: OASISText.t option; -+ categories: url list; -+ -+ conf_type: [`Configure] plugin; -+ conf_custom: custom; -+ -+ build_type: [`Build] plugin; -+ build_custom: custom; -+ -+ install_type: [`Install] plugin; -+ install_custom: custom; -+ uninstall_custom: custom; -+ -+ clean_custom: custom; -+ distclean_custom: custom; -+ -+ files_ab: unix_filename list; -+ sections: section list; -+ plugins: [`Extra] plugin list; -+ disable_oasis_section: unix_filename list; -+ schema_data: PropList.Data.t; -+ plugin_data: plugin_data; -+ } -+ -+ -+end -+ -+module OASISFeatures = struct -+(* # 22 "src/oasis/OASISFeatures.ml" *) -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISVersion -+ -+ module MapPlugin = -+ Map.Make -+ (struct -+ type t = plugin_kind * name -+ let compare = Pervasives.compare -+ end) -+ -+ module Data = -+ struct -+ type t = -+ { -+ oasis_version: OASISVersion.t; -+ plugin_versions: OASISVersion.t option MapPlugin.t; -+ alpha_features: string list; -+ beta_features: string list; -+ } -+ -+ let create oasis_version alpha_features beta_features = -+ { -+ oasis_version = oasis_version; -+ plugin_versions = MapPlugin.empty; -+ alpha_features = alpha_features; -+ beta_features = beta_features -+ } -+ -+ let of_package pkg = -+ create -+ pkg.OASISTypes.oasis_version -+ pkg.OASISTypes.alpha_features -+ pkg.OASISTypes.beta_features -+ -+ let add_plugin (plugin_kind, plugin_name, plugin_version) t = -+ {t with -+ plugin_versions = MapPlugin.add -+ (plugin_kind, plugin_name) -+ plugin_version -+ t.plugin_versions} -+ -+ let plugin_version plugin_kind plugin_name t = -+ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions -+ -+ let to_string t = -+ Printf.sprintf -+ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ -+ plugins_version: %s" -+ (OASISVersion.string_of_version t.oasis_version) -+ (String.concat ", " t.alpha_features) -+ (String.concat ", " t.beta_features) -+ (String.concat ", " -+ (MapPlugin.fold -+ (fun (_, plg) ver_opt acc -> -+ (plg^ -+ (match ver_opt with -+ | Some v -> -+ " "^(OASISVersion.string_of_version v) -+ | None -> "")) -+ :: acc) -+ t.plugin_versions [])) -+ end -+ -+ type origin = -+ | Field of string * string -+ | Section of string -+ | NoOrigin -+ -+ type stage = Alpha | Beta -+ -+ -+ let string_of_stage = -+ function -+ | Alpha -> "alpha" -+ | Beta -> "beta" -+ -+ -+ let field_of_stage = -+ function -+ | Alpha -> "AlphaFeatures" -+ | Beta -> "BetaFeatures" -+ -+ type publication = InDev of stage | SinceVersion of OASISVersion.t -+ -+ type t = -+ { -+ name: string; -+ plugin: all_plugin option; -+ publication: publication; -+ description: unit -> string; -+ } -+ -+ (* TODO: mutex protect this. *) -+ let all_features = Hashtbl.create 13 -+ -+ -+ let since_version ver_str = SinceVersion (version_of_string ver_str) -+ let alpha = InDev Alpha -+ let beta = InDev Beta -+ -+ -+ let to_string t = -+ Printf.sprintf -+ "feature: %s; plugin: %s; publication: %s" -+ t.name -+ (match t.plugin with -+ | None -> "" -+ | Some (_, nm, _) -> nm) -+ (match t.publication with -+ | InDev stage -> string_of_stage stage -+ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) -+ -+ let data_check t data origin = -+ let no_message = "no message" in -+ -+ let check_feature features stage = -+ let has_feature = List.mem t.name features in -+ if not has_feature then -+ match origin with -+ | Field (fld, where) -> -+ Some -+ (Printf.sprintf -+ (f_ "Field %s in %s is only available when feature %s \ -+ is in field %s.") -+ fld where t.name (field_of_stage stage)) -+ | Section sct -> -+ Some -+ (Printf.sprintf -+ (f_ "Section %s is only available when features %s \ -+ is in field %s.") -+ sct t.name (field_of_stage stage)) -+ | NoOrigin -> -+ Some no_message -+ else -+ None -+ in -+ -+ let version_is_good ~min_version version fmt = -+ let version_is_good = -+ OASISVersion.comparator_apply -+ version (OASISVersion.VGreaterEqual min_version) -+ in -+ Printf.ksprintf -+ (fun str -> -+ if version_is_good then -+ None -+ else -+ Some str) -+ fmt -+ in -+ -+ match origin, t.plugin, t.publication with -+ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha -+ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta -+ | Field(fld, where), None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Field %s in %s is only valid since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking \ -+ OASIS changelog.") -+ fld where (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Field(fld, where), Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Field %s in %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ fld where plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | Section sct, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Section %s is only valid for since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking OASIS \ -+ changelog.") -+ sct (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Section sct, Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Section %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Section %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ sct plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Section %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | NoOrigin, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version "%s" no_message -+ -+ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> raise Not_found -+ in -+ version_is_good ~min_version plugin_version_current -+ "%s" no_message -+ with Not_found -> -+ Some no_message -+ end -+ -+ -+ let data_assert t data origin = -+ match data_check t data origin with -+ | None -> () -+ | Some str -> failwith str -+ -+ -+ let data_test t data = -+ match data_check t data NoOrigin with -+ | None -> true -+ | Some str -> false -+ -+ -+ let package_test t pkg = -+ data_test t (Data.of_package pkg) -+ -+ -+ let create ?plugin name publication description = -+ let () = -+ if Hashtbl.mem all_features name then -+ failwithf "Feature '%s' is already declared." name -+ in -+ let t = -+ { -+ name = name; -+ plugin = plugin; -+ publication = publication; -+ description = description; -+ } -+ in -+ Hashtbl.add all_features name t; -+ t -+ -+ -+ let get_stage name = -+ try -+ (Hashtbl.find all_features name).publication -+ with Not_found -> -+ failwithf (f_ "Feature %s doesn't exist.") name -+ -+ -+ let list () = -+ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] -+ -+ (* -+ * Real flags. -+ *) -+ -+ -+ let features = -+ create "features_fields" -+ (since_version "0.4") -+ (fun () -> -+ s_ "Enable to experiment not yet official features.") -+ -+ -+ let flag_docs = -+ create "flag_docs" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Building docs require '-docs' flag at configure.") -+ -+ -+ let flag_tests = -+ create "flag_tests" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Running tests require '-tests' flag at configure.") -+ -+ -+ let pack = -+ create "pack" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Allow to create packed library.") -+ -+ -+ let section_object = -+ create "section_object" beta -+ (fun () -> -+ s_ "Implement an object section.") -+ -+ -+ let dynrun_for_release = -+ create "dynrun_for_release" alpha -+ (fun () -> -+ s_ "Make '-setup-update dynamic' suitable for releasing project.") -+ -+ -+ let compiled_setup_ml = -+ create "compiled_setup_ml" alpha -+ (fun () -> -+ s_ "It compiles the setup.ml and speed-up actions done with it.") -+ -+ let disable_oasis_section = -+ create "disable_oasis_section" alpha -+ (fun () -> -+ s_ "Allows the OASIS section comments and digest to be omitted in \ -+ generated files.") -+end -+ -+module OASISUnixPath = struct -+(* # 22 "src/oasis/OASISUnixPath.ml" *) -+ -+ -+ type unix_filename = string -+ type unix_dirname = string -+ -+ -+ type host_filename = string -+ type host_dirname = string -+ -+ -+ let current_dir_name = "." -+ -+ -+ let parent_dir_name = ".." -+ -+ -+ let is_current_dir fn = -+ fn = current_dir_name || fn = "" -+ -+ -+ let concat f1 f2 = -+ if is_current_dir f1 then -+ f2 -+ else -+ let f1' = -+ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 -+ in -+ f1'^"/"^f2 -+ -+ -+ let make = -+ function -+ | hd :: tl -> -+ List.fold_left -+ (fun f p -> concat f p) -+ hd -+ tl -+ | [] -> -+ invalid_arg "OASISUnixPath.make" -+ -+ -+ let dirname f = -+ try -+ String.sub f 0 (String.rindex f '/') -+ with Not_found -> -+ current_dir_name -+ -+ -+ let basename f = -+ try -+ let pos_start = -+ (String.rindex f '/') + 1 -+ in -+ String.sub f pos_start ((String.length f) - pos_start) -+ with Not_found -> -+ f -+ -+ -+ let chop_extension f = -+ try -+ let last_dot = -+ String.rindex f '.' -+ in -+ let sub = -+ String.sub f 0 last_dot -+ in -+ try -+ let last_slash = -+ String.rindex f '/' -+ in -+ if last_slash < last_dot then -+ sub -+ else -+ f -+ with Not_found -> -+ sub -+ -+ with Not_found -> -+ f -+ -+ -+ let capitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.capitalize base) -+ -+ -+ let uncapitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.uncapitalize base) -+ -+ -+end -+ -+module OASISHostPath = struct -+(* # 22 "src/oasis/OASISHostPath.ml" *) -+ -+ -+ open Filename -+ -+ -+ module Unix = OASISUnixPath -+ -+ -+ let make = -+ function -+ | [] -> -+ invalid_arg "OASISHostPath.make" -+ | hd :: tl -> -+ List.fold_left Filename.concat hd tl -+ -+ -+ let of_unix ufn = -+ if Sys.os_type = "Unix" then -+ ufn -+ else -+ make -+ (List.map -+ (fun p -> -+ if p = Unix.current_dir_name then -+ current_dir_name -+ else if p = Unix.parent_dir_name then -+ parent_dir_name -+ else -+ p) -+ (OASISString.nsplit ufn '/')) -+ -+ -+end -+ -+module OASISSection = struct -+(* # 22 "src/oasis/OASISSection.ml" *) -+ -+ -+ open OASISTypes -+ -+ -+ let section_kind_common = -+ function -+ | Library (cs, _, _) -> -+ `Library, cs -+ | Object (cs, _, _) -> -+ `Object, cs -+ | Executable (cs, _, _) -> -+ `Executable, cs -+ | Flag (cs, _) -> -+ `Flag, cs -+ | SrcRepo (cs, _) -> -+ `SrcRepo, cs -+ | Test (cs, _) -> -+ `Test, cs -+ | Doc (cs, _) -> -+ `Doc, cs -+ -+ -+ let section_common sct = -+ snd (section_kind_common sct) -+ -+ -+ let section_common_set cs = -+ function -+ | Library (_, bs, lib) -> Library (cs, bs, lib) -+ | Object (_, bs, obj) -> Object (cs, bs, obj) -+ | Executable (_, bs, exec) -> Executable (cs, bs, exec) -+ | Flag (_, flg) -> Flag (cs, flg) -+ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) -+ | Test (_, tst) -> Test (cs, tst) -+ | Doc (_, doc) -> Doc (cs, doc) -+ -+ -+ (** Key used to identify section -+ *) -+ let section_id sct = -+ let k, cs = -+ section_kind_common sct -+ in -+ k, cs.cs_name -+ -+ -+ let string_of_section sct = -+ let k, nm = -+ section_id sct -+ in -+ (match k with -+ | `Library -> "library" -+ | `Object -> "object" -+ | `Executable -> "executable" -+ | `Flag -> "flag" -+ | `SrcRepo -> "src repository" -+ | `Test -> "test" -+ | `Doc -> "doc") -+ ^" "^nm -+ -+ -+ let section_find id scts = -+ List.find -+ (fun sct -> id = section_id sct) -+ scts -+ -+ -+ module CSection = -+ struct -+ type t = section -+ -+ let id = section_id -+ -+ let compare t1 t2 = -+ compare (id t1) (id t2) -+ -+ let equal t1 t2 = -+ (id t1) = (id t2) -+ -+ let hash t = -+ Hashtbl.hash (id t) -+ end -+ -+ -+ module MapSection = Map.Make(CSection) -+ module SetSection = Set.Make(CSection) -+ -+ -+end -+ -+module OASISBuildSection = struct -+(* # 22 "src/oasis/OASISBuildSection.ml" *) -+ -+ -+end -+ -+module OASISExecutable = struct -+(* # 22 "src/oasis/OASISExecutable.ml" *) -+ -+ -+ open OASISTypes -+ -+ -+ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = -+ let dir = -+ OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.dirname exec.exec_main_is) -+ in -+ let is_native_exec = -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native () -+ | Byte -> false -+ in -+ -+ OASISUnixPath.concat -+ dir -+ (cs.cs_name^(suffix_program ())), -+ -+ if not is_native_exec && -+ not exec.exec_custom && -+ bs.bs_c_sources <> [] then -+ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) -+ else -+ None -+ -+ -+end -+ -+module OASISLibrary = struct -+(* # 22 "src/oasis/OASISLibrary.ml" *) -+ -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ -+ (* Look for a module file, considering capitalization or not. *) -+ let find_module source_file_exists bs modul = -+ let possible_base_fn = -+ List.map -+ (OASISUnixPath.concat bs.bs_path) -+ [modul; -+ OASISUnixPath.uncapitalize_file modul; -+ OASISUnixPath.capitalize_file modul] -+ in -+ (* TODO: we should be able to be able to determine the source for every -+ * files. Hence we should introduce a Module(source: fn) for the fields -+ * Modules and InternalModules -+ *) -+ List.fold_left -+ (fun acc base_fn -> -+ match acc with -+ | `No_sources _ -> -+ begin -+ let file_found = -+ List.fold_left -+ (fun acc ext -> -+ if source_file_exists (base_fn^ext) then -+ (base_fn^ext) :: acc -+ else -+ acc) -+ [] -+ [".ml"; ".mli"; ".mll"; ".mly"] -+ in -+ match file_found with -+ | [] -> -+ acc -+ | lst -> -+ `Sources (base_fn, lst) -+ end -+ | `Sources _ -> -+ acc) -+ (`No_sources possible_base_fn) -+ possible_base_fn -+ -+ -+ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match find_module source_file_exists bs modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ (lib.lib_modules @ lib.lib_internal_modules) -+ -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~has_native_dynlink -+ ~ext_lib -+ ~ext_dll -+ ~source_file_exists -+ (cs, bs, lib) = -+ -+ let find_modules lst ext = -+ let find_module modul = -+ match find_module source_file_exists bs modul with -+ | `Sources (base_fn, [fn]) when ext <> "cmi" -+ && Filename.check_suffix fn ".mli" -> -+ None (* No implementation files for pure interface. *) -+ | `Sources (base_fn, _) -> -+ Some [base_fn] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ Some lst -+ in -+ List.fold_left -+ (fun acc nm -> -+ match find_module nm with -+ | None -> acc -+ | Some base_fns -> -+ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) -+ [] -+ lst -+ in -+ -+ (* The headers that should be compiled along *) -+ let headers = -+ if lib.lib_pack then -+ [] -+ else -+ find_modules -+ lib.lib_modules -+ "cmi" -+ in -+ -+ (* The .cmx that be compiled along *) -+ let cmxs = -+ let should_be_built = -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native -+ | Byte -> false -+ in -+ if should_be_built then -+ if lib.lib_pack then -+ find_modules -+ [cs.cs_name] -+ "cmx" -+ else -+ find_modules -+ (lib.lib_modules @ lib.lib_internal_modules) -+ "cmx" -+ else -+ [] -+ in -+ -+ let acc_nopath = -+ [] -+ in -+ -+ (* Compute what libraries should be built *) -+ let acc_nopath = -+ (* Add the packed header file if required *) -+ let add_pack_header acc = -+ if lib.lib_pack then -+ [cs.cs_name^".cmi"] :: acc -+ else -+ acc -+ in -+ let byte acc = -+ add_pack_header ([cs.cs_name^".cma"] :: acc) -+ in -+ let native acc = -+ let acc = -+ add_pack_header -+ (if has_native_dynlink then -+ [cs.cs_name^".cmxs"] :: acc -+ else acc) -+ in -+ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc -+ in -+ match bs.bs_compiled_object with -+ | Native -> -+ byte (native acc_nopath) -+ | Best when is_native -> -+ byte (native acc_nopath) -+ | Byte | Best -> -+ byte acc_nopath -+ in -+ -+ (* Add C library to be built *) -+ let acc_nopath = -+ if bs.bs_c_sources <> [] then -+ begin -+ ["lib"^cs.cs_name^"_stubs"^ext_lib] -+ :: -+ ["dll"^cs.cs_name^"_stubs"^ext_dll] -+ :: -+ acc_nopath -+ end -+ else -+ acc_nopath -+ in -+ -+ (* All the files generated *) -+ List.rev_append -+ (List.rev_map -+ (List.rev_map -+ (OASISUnixPath.concat bs.bs_path)) -+ acc_nopath) -+ (headers @ cmxs) -+ -+ -+end -+ -+module OASISObject = struct -+(* # 22 "src/oasis/OASISObject.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ obj.obj_modules -+ -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~source_file_exists -+ (cs, bs, obj) = -+ -+ let find_module ext modul = -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, _) -> [base_fn ^ ext] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name ; -+ lst -+ in -+ -+ let header, byte, native, c_object, f = -+ match obj.obj_modules with -+ | [ m ] -> (find_module ".cmi" m, -+ find_module ".cmo" m, -+ find_module ".cmx" m, -+ find_module ".o" m, -+ fun x -> x) -+ | _ -> ([cs.cs_name ^ ".cmi"], -+ [cs.cs_name ^ ".cmo"], -+ [cs.cs_name ^ ".cmx"], -+ [cs.cs_name ^ ".o"], -+ OASISUnixPath.concat bs.bs_path) -+ in -+ List.map (List.map f) ( -+ match bs.bs_compiled_object with -+ | Native -> -+ native :: c_object :: byte :: header :: [] -+ | Best when is_native -> -+ native :: c_object :: byte :: header :: [] -+ | Byte | Best -> -+ byte :: header :: []) -+ -+ -+end -+ -+module OASISFindlib = struct -+(* # 22 "src/oasis/OASISFindlib.ml" *) -+ -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ -+ type library_name = name -+ type findlib_part_name = name -+ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t -+ -+ -+ exception InternalLibraryNotFound of library_name -+ exception FindlibPackageNotFound of findlib_name -+ -+ -+ type group_t = -+ | Container of findlib_name * group_t list -+ | Package of (findlib_name * -+ common_section * -+ build_section * -+ [`Library of library | `Object of object_] * -+ group_t list) -+ -+ -+ type data = common_section * -+ build_section * -+ [`Library of library | `Object of object_] -+ type tree = -+ | Node of (data option) * (tree MapString.t) -+ | Leaf of data -+ -+ -+ let findlib_mapping pkg = -+ (* Map from library name to either full findlib name or parts + parent. *) -+ let fndlb_parts_of_lib_name = -+ let fndlb_parts cs lib = -+ let name = -+ match lib.lib_findlib_name with -+ | Some nm -> nm -+ | None -> cs.cs_name -+ in -+ let name = -+ String.concat "." (lib.lib_findlib_containers @ [name]) -+ in -+ name -+ in -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, _, lib) -> -+ begin -+ let lib_name = cs.cs_name in -+ let fndlb_parts = fndlb_parts cs lib in -+ if MapString.mem lib_name mp then -+ failwithf -+ (f_ "The library name '%s' is used more than once.") -+ lib_name; -+ match lib.lib_findlib_parent with -+ | Some lib_name_parent -> -+ MapString.add -+ lib_name -+ (`Unsolved (lib_name_parent, fndlb_parts)) -+ mp -+ | None -> -+ MapString.add -+ lib_name -+ (`Solved fndlb_parts) -+ mp -+ end -+ -+ | Object (cs, _, obj) -> -+ begin -+ let obj_name = cs.cs_name in -+ if MapString.mem obj_name mp then -+ failwithf -+ (f_ "The object name '%s' is used more than once.") -+ obj_name; -+ let findlib_full_name = match obj.obj_findlib_fullname with -+ | Some ns -> String.concat "." ns -+ | None -> obj_name -+ in -+ MapString.add -+ obj_name -+ (`Solved findlib_full_name) -+ mp -+ end -+ -+ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ (* Solve the above graph to be only library name to full findlib name. *) -+ let fndlb_name_of_lib_name = -+ let rec solve visited mp lib_name lib_name_child = -+ if SetString.mem lib_name visited then -+ failwithf -+ (f_ "Library '%s' is involved in a cycle \ -+ with regard to findlib naming.") -+ lib_name; -+ let visited = SetString.add lib_name visited in -+ try -+ match MapString.find lib_name mp with -+ | `Solved fndlb_nm -> -+ fndlb_nm, mp -+ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> -+ let pre_fndlb_nm, mp = -+ solve visited mp lib_nm_parent lib_name -+ in -+ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in -+ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp -+ with Not_found -> -+ failwithf -+ (f_ "Library '%s', which is defined as the findlib parent of \ -+ library '%s', doesn't exist.") -+ lib_name lib_name_child -+ in -+ let mp = -+ MapString.fold -+ (fun lib_name status mp -> -+ match status with -+ | `Solved _ -> -+ (* Solved initialy, no need to go further *) -+ mp -+ | `Unsolved _ -> -+ let _, mp = solve SetString.empty mp lib_name "" in -+ mp) -+ fndlb_parts_of_lib_name -+ fndlb_parts_of_lib_name -+ in -+ MapString.map -+ (function -+ | `Solved fndlb_nm -> fndlb_nm -+ | `Unsolved _ -> assert false) -+ mp -+ in -+ -+ (* Convert an internal library name to a findlib name. *) -+ let findlib_name_of_library_name lib_nm = -+ try -+ MapString.find lib_nm fndlb_name_of_lib_name -+ with Not_found -> -+ raise (InternalLibraryNotFound lib_nm) -+ in -+ -+ (* Add a library to the tree. -+ *) -+ let add sct mp = -+ let fndlb_fullname = -+ let cs, _, _ = sct in -+ let lib_name = cs.cs_name in -+ findlib_name_of_library_name lib_name -+ in -+ let rec add_children nm_lst (children: tree MapString.t) = -+ match nm_lst with -+ | (hd :: tl) -> -+ begin -+ let node = -+ try -+ add_node tl (MapString.find hd children) -+ with Not_found -> -+ (* New node *) -+ new_node tl -+ in -+ MapString.add hd node children -+ end -+ | [] -> -+ (* Should not have a nameless library. *) -+ assert false -+ and add_node tl node = -+ if tl = [] then -+ begin -+ match node with -+ | Node (None, children) -> -+ Node (Some sct, children) -+ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> -+ (* TODO: allow to merge Package, i.e. -+ * archive(byte) = "foo.cma foo_init.cmo" -+ *) -+ let cs, _, _ = sct in -+ failwithf -+ (f_ "Library '%s' and '%s' have the same findlib name '%s'") -+ cs.cs_name cs'.cs_name fndlb_fullname -+ end -+ else -+ begin -+ match node with -+ | Leaf data -> -+ Node (Some data, add_children tl MapString.empty) -+ | Node (data_opt, children) -> -+ Node (data_opt, add_children tl children) -+ end -+ and new_node = -+ function -+ | [] -> -+ Leaf sct -+ | hd :: tl -> -+ Node (None, MapString.add hd (new_node tl) MapString.empty) -+ in -+ add_children (OASISString.nsplit fndlb_fullname '.') mp -+ in -+ -+ let rec group_of_tree mp = -+ MapString.fold -+ (fun nm node acc -> -+ let cur = -+ match node with -+ | Node (Some (cs, bs, lib), children) -> -+ Package (nm, cs, bs, lib, group_of_tree children) -+ | Node (None, children) -> -+ Container (nm, group_of_tree children) -+ | Leaf (cs, bs, lib) -> -+ Package (nm, cs, bs, lib, []) -+ in -+ cur :: acc) -+ mp [] -+ in -+ -+ let group_mp = -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, bs, lib) -> -+ add (cs, bs, `Library lib) mp -+ | Object (cs, bs, obj) -> -+ add (cs, bs, `Object obj) mp -+ | _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ let groups = -+ group_of_tree group_mp -+ in -+ -+ let library_name_of_findlib_name = -+ Lazy.lazy_from_fun -+ (fun () -> -+ (* Revert findlib_name_of_library_name. *) -+ MapString.fold -+ (fun k v mp -> MapString.add v k mp) -+ fndlb_name_of_lib_name -+ MapString.empty) -+ in -+ let library_name_of_findlib_name fndlb_nm = -+ try -+ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) -+ with Not_found -> -+ raise (FindlibPackageNotFound fndlb_nm) -+ in -+ -+ groups, -+ findlib_name_of_library_name, -+ library_name_of_findlib_name -+ -+ -+ let findlib_of_group = -+ function -+ | Container (fndlb_nm, _) -+ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm -+ -+ -+ let root_of_group grp = -+ let rec root_lib_aux = -+ (* We do a DFS in the group. *) -+ function -+ | Container (_, children) -> -+ List.fold_left -+ (fun res grp -> -+ if res = None then -+ root_lib_aux grp -+ else -+ res) -+ None -+ children -+ | Package (_, cs, bs, lib, _) -> -+ Some (cs, bs, lib) -+ in -+ match root_lib_aux grp with -+ | Some res -> -+ res -+ | None -> -+ failwithf -+ (f_ "Unable to determine root library of findlib library '%s'") -+ (findlib_of_group grp) -+ -+ -+end -+ -+module OASISFlag = struct -+(* # 22 "src/oasis/OASISFlag.ml" *) -+ -+ -+end -+ -+module OASISPackage = struct -+(* # 22 "src/oasis/OASISPackage.ml" *) -+ -+ -+end -+ -+module OASISSourceRepository = struct -+(* # 22 "src/oasis/OASISSourceRepository.ml" *) -+ -+ -+end -+ -+module OASISTest = struct -+(* # 22 "src/oasis/OASISTest.ml" *) -+ -+ -+end -+ -+module OASISDocument = struct -+(* # 22 "src/oasis/OASISDocument.ml" *) -+ -+ -+end -+ -+module OASISExec = struct -+(* # 22 "src/oasis/OASISExec.ml" *) -+ -+ -+ open OASISGettext -+ open OASISUtils -+ open OASISMessage -+ -+ -+ (* TODO: I don't like this quote, it is there because $(rm) foo expands to -+ * 'rm -f' foo... -+ *) -+ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = -+ let cmd = -+ if quote then -+ if Sys.os_type = "Win32" then -+ if String.contains cmd ' ' then -+ (* Double the 1st double quote... win32... sigh *) -+ "\""^(Filename.quote cmd) -+ else -+ cmd -+ else -+ Filename.quote cmd -+ else -+ cmd -+ in -+ let cmdline = -+ String.concat " " (cmd :: args) -+ in -+ info ~ctxt (f_ "Running command '%s'") cmdline; -+ match f_exit_code, Sys.command cmdline with -+ | None, 0 -> () -+ | None, i -> -+ failwithf -+ (f_ "Command '%s' terminated with error code %d") -+ cmdline i -+ | Some f, i -> -+ f i -+ -+ -+ let run_read_output ~ctxt ?f_exit_code cmd args = -+ let fn = -+ Filename.temp_file "oasis-" ".txt" -+ in -+ try -+ begin -+ let () = -+ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) -+ in -+ let chn = -+ open_in fn -+ in -+ let routput = -+ ref [] -+ in -+ begin -+ try -+ while true do -+ routput := (input_line chn) :: !routput -+ done -+ with End_of_file -> -+ () -+ end; -+ close_in chn; -+ Sys.remove fn; -+ List.rev !routput -+ end -+ with e -> -+ (try Sys.remove fn with _ -> ()); -+ raise e -+ -+ -+ let run_read_one_line ~ctxt ?f_exit_code cmd args = -+ match run_read_output ~ctxt ?f_exit_code cmd args with -+ | [fst] -> -+ fst -+ | lst -> -+ failwithf -+ (f_ "Command return unexpected output %S") -+ (String.concat "\n" lst) -+end -+ -+module OASISFileUtil = struct -+(* # 22 "src/oasis/OASISFileUtil.ml" *) -+ -+ -+ open OASISGettext -+ -+ -+ let file_exists_case fn = -+ let dirname = Filename.dirname fn in -+ let basename = Filename.basename fn in -+ if Sys.file_exists dirname then -+ if basename = Filename.current_dir_name then -+ true -+ else -+ List.mem -+ basename -+ (Array.to_list (Sys.readdir dirname)) -+ else -+ false -+ -+ -+ let find_file ?(case_sensitive=true) paths exts = -+ -+ (* Cardinal product of two list *) -+ let ( * ) lst1 lst2 = -+ List.flatten -+ (List.map -+ (fun a -> -+ List.map -+ (fun b -> a, b) -+ lst2) -+ lst1) -+ in -+ -+ let rec combined_paths lst = -+ match lst with -+ | p1 :: p2 :: tl -> -+ let acc = -+ (List.map -+ (fun (a, b) -> Filename.concat a b) -+ (p1 * p2)) -+ in -+ combined_paths (acc :: tl) -+ | [e] -> -+ e -+ | [] -> -+ [] -+ in -+ -+ let alternatives = -+ List.map -+ (fun (p, e) -> -+ if String.length e > 0 && e.[0] <> '.' then -+ p ^ "." ^ e -+ else -+ p ^ e) -+ ((combined_paths paths) * exts) -+ in -+ List.find (fun file -> -+ (if case_sensitive then -+ file_exists_case file -+ else -+ Sys.file_exists file) -+ && not (Sys.is_directory file) -+ ) alternatives -+ -+ -+ let which ~ctxt prg = -+ let path_sep = -+ match Sys.os_type with -+ | "Win32" -> -+ ';' -+ | _ -> -+ ':' -+ in -+ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in -+ let exec_ext = -+ match Sys.os_type with -+ | "Win32" -> -+ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) -+ | _ -> -+ [""] -+ in -+ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext -+ -+ -+ (**/**) -+ let rec fix_dir dn = -+ (* Windows hack because Sys.file_exists "src\\" = false when -+ * Sys.file_exists "src" = true -+ *) -+ let ln = -+ String.length dn -+ in -+ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then -+ fix_dir (String.sub dn 0 (ln - 1)) -+ else -+ dn -+ -+ -+ let q = Filename.quote -+ (**/**) -+ -+ -+ let cp ~ctxt ?(recurse=false) src tgt = -+ if recurse then -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt -+ "xcopy" [q src; q tgt; "/E"] -+ | _ -> -+ OASISExec.run ~ctxt -+ "cp" ["-r"; q src; q tgt] -+ else -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "copy" -+ | _ -> "cp") -+ [q src; q tgt] -+ -+ -+ let mkdir ~ctxt tgt = -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "md" -+ | _ -> "mkdir") -+ [q tgt] -+ -+ -+ let rec mkdir_parent ~ctxt f tgt = -+ let tgt = -+ fix_dir tgt -+ in -+ if Sys.file_exists tgt then -+ begin -+ if not (Sys.is_directory tgt) then -+ OASISUtils.failwithf -+ (f_ "Cannot create directory '%s', a file of the same name already \ -+ exists") -+ tgt -+ end -+ else -+ begin -+ mkdir_parent ~ctxt f (Filename.dirname tgt); -+ if not (Sys.file_exists tgt) then -+ begin -+ f tgt; -+ mkdir ~ctxt tgt -+ end -+ end -+ -+ -+ let rmdir ~ctxt tgt = -+ if Sys.readdir tgt = [||] then begin -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt "rd" [q tgt] -+ | _ -> -+ OASISExec.run ~ctxt "rm" ["-r"; q tgt] -+ end else begin -+ OASISMessage.error ~ctxt -+ (f_ "Cannot remove directory '%s': not empty.") -+ tgt -+ end -+ -+ -+ let glob ~ctxt fn = -+ let basename = -+ Filename.basename fn -+ in -+ if String.length basename >= 2 && -+ basename.[0] = '*' && -+ basename.[1] = '.' then -+ begin -+ let ext_len = -+ (String.length basename) - 2 -+ in -+ let ext = -+ String.sub basename 2 ext_len -+ in -+ let dirname = -+ Filename.dirname fn -+ in -+ Array.fold_left -+ (fun acc fn -> -+ try -+ let fn_ext = -+ String.sub -+ fn -+ ((String.length fn) - ext_len) -+ ext_len -+ in -+ if fn_ext = ext then -+ (Filename.concat dirname fn) :: acc -+ else -+ acc -+ with Invalid_argument _ -> -+ acc) -+ [] -+ (Sys.readdir dirname) -+ end -+ else -+ begin -+ if file_exists_case fn then -+ [fn] -+ else -+ [] -+ end -+end -+ -+ -+# 2878 "setup.ml" -+module BaseEnvLight = struct -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ -+ -+ module MapString = Map.Make(String) -+ -+ -+ type t = string MapString.t -+ -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 2983 "setup.ml" -+module BaseContext = struct -+(* # 22 "src/base/BaseContext.ml" *) -+ -+ (* TODO: get rid of this module. *) -+ open OASISContext -+ -+ -+ let args () = fst (fspecs ()) -+ -+ -+ let default = default -+ -+end -+ -+module BaseMessage = struct -+(* # 22 "src/base/BaseMessage.ml" *) -+ -+ -+ (** Message to user, overrid for Base -+ @author Sylvain Le Gall -+ *) -+ open OASISMessage -+ open BaseContext -+ -+ -+ let debug fmt = debug ~ctxt:!default fmt -+ -+ -+ let info fmt = info ~ctxt:!default fmt -+ -+ -+ let warning fmt = warning ~ctxt:!default fmt -+ -+ -+ let error fmt = error ~ctxt:!default fmt -+ -+end -+ -+module BaseEnv = struct -+(* # 22 "src/base/BaseEnv.ml" *) -+ -+ open OASISGettext -+ open OASISUtils -+ open PropList -+ -+ -+ module MapString = BaseEnvLight.MapString -+ -+ -+ type origin_t = -+ | ODefault -+ | OGetEnv -+ | OFileLoad -+ | OCommandLine -+ -+ -+ type cli_handle_t = -+ | CLINone -+ | CLIAuto -+ | CLIWith -+ | CLIEnable -+ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list -+ -+ -+ type definition_t = -+ { -+ hide: bool; -+ dump: bool; -+ cli: cli_handle_t; -+ arg_help: string option; -+ group: string option; -+ } -+ -+ -+ let schema = -+ Schema.create "environment" -+ -+ -+ (* Environment data *) -+ let env = -+ Data.create () -+ -+ -+ (* Environment data from file *) -+ let env_from_file = -+ ref MapString.empty -+ -+ -+ (* Lexer for var *) -+ let var_lxr = -+ Genlex.make_lexer [] -+ -+ -+ let rec var_expand str = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ (* TODO: this is a quick hack to allow calling Test.Command -+ * without defining executable name really. I.e. if there is -+ * an exec Executable toto, then $(toto) should be replace -+ * by its real name. It is however useful to have this function -+ * for other variable that depend on the host and should be -+ * written better than that. -+ *) -+ let st = -+ var_lxr (Stream.of_string var) -+ in -+ match Stream.npeek 3 st with -+ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> -+ OASISHostPath.of_unix (var_get nm) -+ | [Genlex.Ident "utoh"; Genlex.String s] -> -+ OASISHostPath.of_unix s -+ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> -+ String.escaped (var_get nm) -+ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> -+ String.escaped s -+ | [Genlex.Ident nm] -> -+ var_get nm -+ | _ -> -+ failwithf -+ (f_ "Unknown expression '%s' in variable expansion of %s.") -+ var -+ str -+ with -+ | Unknown_field (_, _) -> -+ failwithf -+ (f_ "No variable %s defined when trying to expand %S.") -+ var -+ str -+ | Stream.Error e -> -+ failwithf -+ (f_ "Syntax error when parsing '%s' when trying to \ -+ expand %S: %s") -+ var -+ str -+ e) -+ str; -+ Buffer.contents buff -+ -+ -+ and var_get name = -+ let vl = -+ try -+ Schema.get schema env name -+ with Unknown_field _ as e -> -+ begin -+ try -+ MapString.find name !env_from_file -+ with Not_found -> -+ raise e -+ end -+ in -+ var_expand vl -+ -+ -+ let var_choose ?printer ?name lst = -+ OASISExpr.choose -+ ?printer -+ ?name -+ var_get -+ lst -+ -+ -+ let var_protect vl = -+ let buff = -+ Buffer.create (String.length vl) -+ in -+ String.iter -+ (function -+ | '$' -> Buffer.add_string buff "\\$" -+ | c -> Buffer.add_char buff c) -+ vl; -+ Buffer.contents buff -+ -+ -+ let var_define -+ ?(hide=false) -+ ?(dump=true) -+ ?short_desc -+ ?(cli=CLINone) -+ ?arg_help -+ ?group -+ name (* TODO: type constraint on the fact that name must be a valid OCaml -+ id *) -+ dflt = -+ -+ let default = -+ [ -+ OFileLoad, (fun () -> MapString.find name !env_from_file); -+ ODefault, dflt; -+ OGetEnv, (fun () -> Sys.getenv name); -+ ] -+ in -+ -+ let extra = -+ { -+ hide = hide; -+ dump = dump; -+ cli = cli; -+ arg_help = arg_help; -+ group = group; -+ } -+ in -+ -+ (* Try to find a value that can be defined -+ *) -+ let var_get_low lst = -+ let errors, res = -+ List.fold_left -+ (fun (errors, res) (o, v) -> -+ if res = None then -+ begin -+ try -+ errors, Some (v ()) -+ with -+ | Not_found -> -+ errors, res -+ | Failure rsn -> -+ (rsn :: errors), res -+ | e -> -+ (Printexc.to_string e) :: errors, res -+ end -+ else -+ errors, res) -+ ([], None) -+ (List.sort -+ (fun (o1, _) (o2, _) -> -+ Pervasives.compare o2 o1) -+ lst) -+ in -+ match res, errors with -+ | Some v, _ -> -+ v -+ | None, [] -> -+ raise (Not_set (name, None)) -+ | None, lst -> -+ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) -+ in -+ -+ let help = -+ match short_desc with -+ | Some fs -> Some fs -+ | None -> None -+ in -+ -+ let var_get_lst = -+ FieldRO.create -+ ~schema -+ ~name -+ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) -+ ~print:var_get_low -+ ~default -+ ~update:(fun ?context x old_x -> x @ old_x) -+ ?help -+ extra -+ in -+ -+ fun () -> -+ var_expand (var_get_low (var_get_lst env)) -+ -+ -+ let var_redefine -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt = -+ if Schema.mem schema name then -+ begin -+ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) -+ Schema.set schema env ~context:ODefault name (dflt ()); -+ fun () -> var_get name -+ end -+ else -+ begin -+ var_define -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt -+ end -+ -+ -+ let var_ignore (e: unit -> string) = () -+ -+ -+ let print_hidden = -+ var_define -+ ~hide:true -+ ~dump:false -+ ~cli:CLIAuto -+ ~arg_help:"Print even non-printable variable. (debug)" -+ "print_hidden" -+ (fun () -> "false") -+ -+ -+ let var_all () = -+ List.rev -+ (Schema.fold -+ (fun acc nm def _ -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ nm :: acc -+ else -+ acc) -+ [] -+ schema) -+ -+ -+ let default_filename = -+ BaseEnvLight.default_filename -+ -+ -+ let load ?allow_empty ?filename () = -+ env_from_file := BaseEnvLight.load ?allow_empty ?filename () -+ -+ -+ let unload () = -+ env_from_file := MapString.empty; -+ Data.clear env -+ -+ -+ let dump ?(filename=default_filename) () = -+ let chn = -+ open_out_bin filename -+ in -+ let output nm value = -+ Printf.fprintf chn "%s=%S\n" nm value -+ in -+ let mp_todo = -+ (* Dump data from schema *) -+ Schema.fold -+ (fun mp_todo nm def _ -> -+ if def.dump then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ output nm value -+ with Not_set _ -> -+ () -+ end; -+ MapString.remove nm mp_todo) -+ !env_from_file -+ schema -+ in -+ (* Dump data defined outside of schema *) -+ MapString.iter output mp_todo; -+ -+ (* End of the dump *) -+ close_out chn -+ -+ -+ let print () = -+ let printable_vars = -+ Schema.fold -+ (fun acc nm def short_descr_opt -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ let txt = -+ match short_descr_opt with -+ | Some s -> s () -+ | None -> nm -+ in -+ (txt, value) :: acc -+ with Not_set _ -> -+ acc -+ end -+ else -+ acc) -+ [] -+ schema -+ in -+ let max_length = -+ List.fold_left max 0 -+ (List.rev_map String.length -+ (List.rev_map fst printable_vars)) -+ in -+ let dot_pad str = -+ String.make ((max_length - (String.length str)) + 3) '.' -+ in -+ -+ Printf.printf "\nConfiguration: \n"; -+ List.iter -+ (fun (name, value) -> -+ Printf.printf "%s: %s %s\n" name (dot_pad name) value) -+ (List.rev printable_vars); -+ Printf.printf "\n%!" -+ -+ -+ let args () = -+ let arg_concat = -+ OASISUtils.varname_concat ~hyphen:'-' -+ in -+ [ -+ "--override", -+ Arg.Tuple -+ ( -+ let rvr = ref "" -+ in -+ let rvl = ref "" -+ in -+ [ -+ Arg.Set_string rvr; -+ Arg.Set_string rvl; -+ Arg.Unit -+ (fun () -> -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ !rvr -+ !rvl) -+ ] -+ ), -+ "var+val Override any configuration variable."; -+ -+ ] -+ @ -+ List.flatten -+ (Schema.fold -+ (fun acc name def short_descr_opt -> -+ let var_set s = -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ name -+ s -+ in -+ -+ let arg_name = -+ OASISUtils.varname_of_string ~hyphen:'-' name -+ in -+ -+ let hlp = -+ match short_descr_opt with -+ | Some txt -> txt () -+ | None -> "" -+ in -+ -+ let arg_hlp = -+ match def.arg_help with -+ | Some s -> s -+ | None -> "str" -+ in -+ -+ let default_value = -+ try -+ Printf.sprintf -+ (f_ " [%s]") -+ (Schema.get -+ schema -+ env -+ name) -+ with Not_set _ -> -+ "" -+ in -+ -+ let args = -+ match def.cli with -+ | CLINone -> -+ [] -+ | CLIAuto -> -+ [ -+ arg_concat "--" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIWith -> -+ [ -+ arg_concat "--with-" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIEnable -> -+ let dflt = -+ if default_value = " [true]" then -+ s_ " [default: enabled]" -+ else -+ s_ " [default: disabled]" -+ in -+ [ -+ arg_concat "--enable-" arg_name, -+ Arg.Unit (fun () -> var_set "true"), -+ Printf.sprintf (f_ " %s%s") hlp dflt; -+ -+ arg_concat "--disable-" arg_name, -+ Arg.Unit (fun () -> var_set "false"), -+ Printf.sprintf (f_ " %s%s") hlp dflt -+ ] -+ | CLIUser lst -> -+ lst -+ in -+ args :: acc) -+ [] -+ schema) -+end -+ -+module BaseArgExt = struct -+(* # 22 "src/base/BaseArgExt.ml" *) -+ -+ -+ open OASISUtils -+ open OASISGettext -+ -+ -+ let parse argv args = -+ (* Simulate command line for Arg *) -+ let current = -+ ref 0 -+ in -+ -+ try -+ Arg.parse_argv -+ ~current:current -+ (Array.concat [[|"none"|]; argv]) -+ (Arg.align args) -+ (failwithf (f_ "Don't know what to do with arguments: '%s'")) -+ (s_ "configure options:") -+ with -+ | Arg.Help txt -> -+ print_endline txt; -+ exit 0 -+ | Arg.Bad txt -> -+ prerr_endline txt; -+ exit 1 -+end -+ -+module BaseCheck = struct -+(* # 22 "src/base/BaseCheck.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISUtils -+ open OASISGettext -+ -+ -+ let prog_best prg prg_lst = -+ var_redefine -+ prg -+ (fun () -> -+ let alternate = -+ List.fold_left -+ (fun res e -> -+ match res with -+ | Some _ -> -+ res -+ | None -> -+ try -+ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) -+ with Not_found -> -+ None) -+ None -+ prg_lst -+ in -+ match alternate with -+ | Some prg -> prg -+ | None -> raise Not_found) -+ -+ -+ let prog prg = -+ prog_best prg [prg] -+ -+ -+ let prog_opt prg = -+ prog_best prg [prg^".opt"; prg] -+ -+ -+ let ocamlfind = -+ prog "ocamlfind" -+ -+ -+ let version -+ var_prefix -+ cmp -+ fversion -+ () = -+ (* Really compare version provided *) -+ let var = -+ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) -+ in -+ var_redefine -+ ~hide:true -+ var -+ (fun () -> -+ let version_str = -+ match fversion () with -+ | "[Distributed with OCaml]" -> -+ begin -+ try -+ (var_get "ocaml_version") -+ with Not_found -> -+ warning -+ (f_ "Variable ocaml_version not defined, fallback \ -+ to default"); -+ Sys.ocaml_version -+ end -+ | res -> -+ res -+ in -+ let version = -+ OASISVersion.version_of_string version_str -+ in -+ if OASISVersion.comparator_apply version cmp then -+ version_str -+ else -+ failwithf -+ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") -+ var_prefix -+ (OASISVersion.string_of_comparator cmp) -+ version_str) -+ () -+ -+ -+ let package_version pkg = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%v"; pkg] -+ -+ -+ let package ?version_comparator pkg () = -+ let var = -+ OASISUtils.varname_concat -+ "pkg_" -+ (OASISUtils.varname_of_string pkg) -+ in -+ let findlib_dir pkg = -+ let dir = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%d"; pkg] -+ in -+ if Sys.file_exists dir && Sys.is_directory dir then -+ dir -+ else -+ failwithf -+ (f_ "When looking for findlib package %s, \ -+ directory %s return doesn't exist") -+ pkg dir -+ in -+ let vl = -+ var_redefine -+ var -+ (fun () -> findlib_dir pkg) -+ () -+ in -+ ( -+ match version_comparator with -+ | Some ver_cmp -> -+ ignore -+ (version -+ var -+ ver_cmp -+ (fun _ -> package_version pkg) -+ ()) -+ | None -> -+ () -+ ); -+ vl -+end -+ -+module BaseOCamlcConfig = struct -+(* # 22 "src/base/BaseOCamlcConfig.ml" *) -+ -+ -+ open BaseEnv -+ open OASISUtils -+ open OASISGettext -+ -+ -+ module SMap = Map.Make(String) -+ -+ -+ let ocamlc = -+ BaseCheck.prog_opt "ocamlc" -+ -+ -+ let ocamlc_config_map = -+ (* Map name to value for ocamlc -config output -+ (name ^": "^value) -+ *) -+ let rec split_field mp lst = -+ match lst with -+ | line :: tl -> -+ let mp = -+ try -+ let pos_semicolon = -+ String.index line ':' -+ in -+ if pos_semicolon > 1 then -+ ( -+ let name = -+ String.sub line 0 pos_semicolon -+ in -+ let linelen = -+ String.length line -+ in -+ let value = -+ if linelen > pos_semicolon + 2 then -+ String.sub -+ line -+ (pos_semicolon + 2) -+ (linelen - pos_semicolon - 2) -+ else -+ "" -+ in -+ SMap.add name value mp -+ ) -+ else -+ ( -+ mp -+ ) -+ with Not_found -> -+ ( -+ mp -+ ) -+ in -+ split_field mp tl -+ | [] -> -+ mp -+ in -+ -+ let cache = -+ lazy -+ (var_protect -+ (Marshal.to_string -+ (split_field -+ SMap.empty -+ (OASISExec.run_read_output -+ ~ctxt:!BaseContext.default -+ (ocamlc ()) ["-config"])) -+ [])) -+ in -+ var_redefine -+ "ocamlc_config_map" -+ ~hide:true -+ ~dump:false -+ (fun () -> -+ (* TODO: update if ocamlc change !!! *) -+ Lazy.force cache) -+ -+ -+ let var_define nm = -+ (* Extract data from ocamlc -config *) -+ let avlbl_config_get () = -+ Marshal.from_string -+ (ocamlc_config_map ()) -+ 0 -+ in -+ let chop_version_suffix s = -+ try -+ String.sub s 0 (String.index s '+') -+ with _ -> -+ s -+ in -+ -+ let nm_config, value_config = -+ match nm with -+ | "ocaml_version" -> -+ "version", chop_version_suffix -+ | _ -> nm, (fun x -> x) -+ in -+ var_redefine -+ nm -+ (fun () -> -+ try -+ let map = -+ avlbl_config_get () -+ in -+ let value = -+ SMap.find nm_config map -+ in -+ value_config value -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find field '%s' in '%s -config' output") -+ nm -+ (ocamlc ())) -+ -+end -+ -+module BaseStandardVar = struct -+(* # 22 "src/base/BaseStandardVar.ml" *) -+ -+ -+ open OASISGettext -+ open OASISTypes -+ open OASISExpr -+ open BaseCheck -+ open BaseEnv -+ -+ -+ let ocamlfind = BaseCheck.ocamlfind -+ let ocamlc = BaseOCamlcConfig.ocamlc -+ let ocamlopt = prog_opt "ocamlopt" -+ let ocamlbuild = prog "ocamlbuild" -+ -+ -+ (**/**) -+ let rpkg = -+ ref None -+ -+ -+ let pkg_get () = -+ match !rpkg with -+ | Some pkg -> pkg -+ | None -> failwith (s_ "OASIS Package is not set") -+ -+ -+ let var_cond = ref [] -+ -+ -+ let var_define_cond ~since_version f dflt = -+ let holder = ref (fun () -> dflt) in -+ let since_version = -+ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) -+ in -+ var_cond := -+ (fun ver -> -+ if OASISVersion.comparator_apply ver since_version then -+ holder := f ()) :: !var_cond; -+ fun () -> !holder () -+ -+ -+ (**/**) -+ -+ -+ let pkg_name = -+ var_define -+ ~short_desc:(fun () -> s_ "Package name") -+ "pkg_name" -+ (fun () -> (pkg_get ()).name) -+ -+ -+ let pkg_version = -+ var_define -+ ~short_desc:(fun () -> s_ "Package version") -+ "pkg_version" -+ (fun () -> -+ (OASISVersion.string_of_version (pkg_get ()).version)) -+ -+ -+ let c = BaseOCamlcConfig.var_define -+ -+ -+ let os_type = c "os_type" -+ let system = c "system" -+ let architecture = c "architecture" -+ let ccomp_type = c "ccomp_type" -+ let ocaml_version = c "ocaml_version" -+ -+ -+ (* TODO: Check standard variable presence at runtime *) -+ -+ -+ let standard_library_default = c "standard_library_default" -+ let standard_library = c "standard_library" -+ let standard_runtime = c "standard_runtime" -+ let bytecomp_c_compiler = c "bytecomp_c_compiler" -+ let native_c_compiler = c "native_c_compiler" -+ let model = c "model" -+ let ext_obj = c "ext_obj" -+ let ext_asm = c "ext_asm" -+ let ext_lib = c "ext_lib" -+ let ext_dll = c "ext_dll" -+ let default_executable_name = c "default_executable_name" -+ let systhread_supported = c "systhread_supported" -+ -+ -+ let flexlink = -+ BaseCheck.prog "flexlink" -+ -+ -+ let flexdll_version = -+ var_define -+ ~short_desc:(fun () -> "FlexDLL version (Win32)") -+ "flexdll_version" -+ (fun () -> -+ let lst = -+ OASISExec.run_read_output ~ctxt:!BaseContext.default -+ (flexlink ()) ["-help"] -+ in -+ match lst with -+ | line :: _ -> -+ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) -+ | [] -> -+ raise Not_found) -+ -+ -+ (**/**) -+ let p name hlp dflt = -+ var_define -+ ~short_desc:hlp -+ ~cli:CLIAuto -+ ~arg_help:"dir" -+ name -+ dflt -+ -+ -+ let (/) a b = -+ if os_type () = Sys.os_type then -+ Filename.concat a b -+ else if os_type () = "Unix" then -+ OASISUnixPath.concat a b -+ else -+ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") -+ (os_type ()) -+ (**/**) -+ -+ -+ let prefix = -+ p "prefix" -+ (fun () -> s_ "Install architecture-independent files dir") -+ (fun () -> -+ match os_type () with -+ | "Win32" -> -+ let program_files = -+ Sys.getenv "PROGRAMFILES" -+ in -+ program_files/(pkg_name ()) -+ | _ -> -+ "/usr/local") -+ -+ -+ let exec_prefix = -+ p "exec_prefix" -+ (fun () -> s_ "Install architecture-dependent files in dir") -+ (fun () -> "$prefix") -+ -+ -+ let bindir = -+ p "bindir" -+ (fun () -> s_ "User executables") -+ (fun () -> "$exec_prefix"/"bin") -+ -+ -+ let sbindir = -+ p "sbindir" -+ (fun () -> s_ "System admin executables") -+ (fun () -> "$exec_prefix"/"sbin") -+ -+ -+ let libexecdir = -+ p "libexecdir" -+ (fun () -> s_ "Program executables") -+ (fun () -> "$exec_prefix"/"libexec") -+ -+ -+ let sysconfdir = -+ p "sysconfdir" -+ (fun () -> s_ "Read-only single-machine data") -+ (fun () -> "$prefix"/"etc") -+ -+ -+ let sharedstatedir = -+ p "sharedstatedir" -+ (fun () -> s_ "Modifiable architecture-independent data") -+ (fun () -> "$prefix"/"com") -+ -+ -+ let localstatedir = -+ p "localstatedir" -+ (fun () -> s_ "Modifiable single-machine data") -+ (fun () -> "$prefix"/"var") -+ -+ -+ let libdir = -+ p "libdir" -+ (fun () -> s_ "Object code libraries") -+ (fun () -> "$exec_prefix"/"lib") -+ -+ -+ let datarootdir = -+ p "datarootdir" -+ (fun () -> s_ "Read-only arch-independent data root") -+ (fun () -> "$prefix"/"share") -+ -+ -+ let datadir = -+ p "datadir" -+ (fun () -> s_ "Read-only architecture-independent data") -+ (fun () -> "$datarootdir") -+ -+ -+ let infodir = -+ p "infodir" -+ (fun () -> s_ "Info documentation") -+ (fun () -> "$datarootdir"/"info") -+ -+ -+ let localedir = -+ p "localedir" -+ (fun () -> s_ "Locale-dependent data") -+ (fun () -> "$datarootdir"/"locale") -+ -+ -+ let mandir = -+ p "mandir" -+ (fun () -> s_ "Man documentation") -+ (fun () -> "$datarootdir"/"man") -+ -+ -+ let docdir = -+ p "docdir" -+ (fun () -> s_ "Documentation root") -+ (fun () -> "$datarootdir"/"doc"/"$pkg_name") -+ -+ -+ let htmldir = -+ p "htmldir" -+ (fun () -> s_ "HTML documentation") -+ (fun () -> "$docdir") -+ -+ -+ let dvidir = -+ p "dvidir" -+ (fun () -> s_ "DVI documentation") -+ (fun () -> "$docdir") -+ -+ -+ let pdfdir = -+ p "pdfdir" -+ (fun () -> s_ "PDF documentation") -+ (fun () -> "$docdir") -+ -+ -+ let psdir = -+ p "psdir" -+ (fun () -> s_ "PS documentation") -+ (fun () -> "$docdir") -+ -+ -+ let destdir = -+ p "destdir" -+ (fun () -> s_ "Prepend a path when installing package") -+ (fun () -> -+ raise -+ (PropList.Not_set -+ ("destdir", -+ Some (s_ "undefined by construct")))) -+ -+ -+ let findlib_version = -+ var_define -+ "findlib_version" -+ (fun () -> -+ BaseCheck.package_version "findlib") -+ -+ -+ let is_native = -+ var_define -+ "is_native" -+ (fun () -> -+ try -+ let _s: string = -+ ocamlopt () -+ in -+ "true" -+ with PropList.Not_set _ -> -+ let _s: string = -+ ocamlc () -+ in -+ "false") -+ -+ -+ let ext_program = -+ var_define -+ "suffix_program" -+ (fun () -> -+ match os_type () with -+ | "Win32" | "Cygwin" -> ".exe" -+ | _ -> "") -+ -+ -+ let rm = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a file.") -+ "rm" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "del" -+ | _ -> "rm -f") -+ -+ -+ let rmdir = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a directory.") -+ "rmdir" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "rd" -+ | _ -> "rm -rf") -+ -+ -+ let debug = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") -+ ~cli:CLIEnable -+ "debug" -+ (fun () -> "true") -+ -+ -+ let profile = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") -+ ~cli:CLIEnable -+ "profile" -+ (fun () -> "false") -+ -+ -+ let tests = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> -+ s_ "Compile tests executable and library and run them") -+ ~cli:CLIEnable -+ "tests" -+ (fun () -> "false")) -+ "true" -+ -+ -+ let docs = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> s_ "Create documentations") -+ ~cli:CLIEnable -+ "docs" -+ (fun () -> "true")) -+ "true" -+ -+ -+ let native_dynlink = -+ var_define -+ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") -+ ~cli:CLINone -+ "native_dynlink" -+ (fun () -> -+ let res = -+ let ocaml_lt_312 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (ocaml_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "3.12.0")) -+ in -+ let flexdll_lt_030 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (flexdll_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "0.30")) -+ in -+ let has_native_dynlink = -+ let ocamlfind = ocamlfind () in -+ try -+ let fn = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ocamlfind -+ ["query"; "-predicates"; "native"; "dynlink"; -+ "-format"; "%d/%a"] -+ in -+ Sys.file_exists fn -+ with _ -> -+ false -+ in -+ if not has_native_dynlink then -+ false -+ else if ocaml_lt_312 () then -+ false -+ else if (os_type () = "Win32" || os_type () = "Cygwin") -+ && flexdll_lt_030 () then -+ begin -+ BaseMessage.warning -+ (f_ ".cmxs generation disabled because FlexDLL needs to be \ -+ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") -+ (flexdll_version ()); -+ false -+ end -+ else -+ true -+ in -+ string_of_bool res) -+ -+ -+ let init pkg = -+ rpkg := Some pkg; -+ List.iter (fun f -> f pkg.oasis_version) !var_cond -+ -+end -+ -+module BaseFileAB = struct -+(* # 22 "src/base/BaseFileAB.ml" *) -+ -+ -+ open BaseEnv -+ open OASISGettext -+ open BaseMessage -+ -+ -+ let to_filename fn = -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ if not (Filename.check_suffix fn ".ab") then -+ warning -+ (f_ "File '%s' doesn't have '.ab' extension") -+ fn; -+ Filename.chop_extension fn -+ -+ -+ let replace fn_lst = -+ let buff = -+ Buffer.create 13 -+ in -+ List.iter -+ (fun fn -> -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ let chn_in = -+ open_in fn -+ in -+ let chn_out = -+ open_out (to_filename fn) -+ in -+ ( -+ try -+ while true do -+ Buffer.add_string buff (var_expand (input_line chn_in)); -+ Buffer.add_char buff '\n' -+ done -+ with End_of_file -> -+ () -+ ); -+ Buffer.output_buffer chn_out buff; -+ Buffer.clear buff; -+ close_in chn_in; -+ close_out chn_out) -+ fn_lst -+end -+ -+module BaseLog = struct -+(* # 22 "src/base/BaseLog.ml" *) -+ -+ -+ open OASISUtils -+ -+ -+ let default_filename = -+ Filename.concat -+ (Filename.dirname BaseEnv.default_filename) -+ "setup.log" -+ -+ -+ module SetTupleString = -+ Set.Make -+ (struct -+ type t = string * string -+ let compare (s11, s12) (s21, s22) = -+ match String.compare s11 s21 with -+ | 0 -> String.compare s12 s22 -+ | n -> n -+ end) -+ -+ -+ let load () = -+ if Sys.file_exists default_filename then -+ begin -+ let chn = -+ open_in default_filename -+ in -+ let scbuf = -+ Scanf.Scanning.from_file default_filename -+ in -+ let rec read_aux (st, lst) = -+ if not (Scanf.Scanning.end_of_input scbuf) then -+ begin -+ let acc = -+ try -+ Scanf.bscanf scbuf "%S %S\n" -+ (fun e d -> -+ let t = -+ e, d -+ in -+ if SetTupleString.mem t st then -+ st, lst -+ else -+ SetTupleString.add t st, -+ t :: lst) -+ with Scanf.Scan_failure _ -> -+ failwith -+ (Scanf.bscanf scbuf -+ "%l" -+ (fun line -> -+ Printf.sprintf -+ "Malformed log file '%s' at line %d" -+ default_filename -+ line)) -+ in -+ read_aux acc -+ end -+ else -+ begin -+ close_in chn; -+ List.rev lst -+ end -+ in -+ read_aux (SetTupleString.empty, []) -+ end -+ else -+ begin -+ [] -+ end -+ -+ -+ let register event data = -+ let chn_out = -+ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename -+ in -+ Printf.fprintf chn_out "%S %S\n" event data; -+ close_out chn_out -+ -+ -+ let unregister event data = -+ if Sys.file_exists default_filename then -+ begin -+ let lst = -+ load () -+ in -+ let chn_out = -+ open_out default_filename -+ in -+ let write_something = -+ ref false -+ in -+ List.iter -+ (fun (e, d) -> -+ if e <> event || d <> data then -+ begin -+ write_something := true; -+ Printf.fprintf chn_out "%S %S\n" e d -+ end) -+ lst; -+ close_out chn_out; -+ if not !write_something then -+ Sys.remove default_filename -+ end -+ -+ -+ let filter events = -+ let st_events = -+ List.fold_left -+ (fun st e -> -+ SetString.add e st) -+ SetString.empty -+ events -+ in -+ List.filter -+ (fun (e, _) -> SetString.mem e st_events) -+ (load ()) -+ -+ -+ let exists event data = -+ List.exists -+ (fun v -> (event, data) = v) -+ (load ()) -+end -+ -+module BaseBuilt = struct -+(* # 22 "src/base/BaseBuilt.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseStandardVar -+ open BaseMessage -+ -+ -+ type t = -+ | BExec (* Executable *) -+ | BExecLib (* Library coming with executable *) -+ | BLib (* Library *) -+ | BObj (* Library *) -+ | BDoc (* Document *) -+ -+ -+ let to_log_event_file t nm = -+ "built_"^ -+ (match t with -+ | BExec -> "exec" -+ | BExecLib -> "exec_lib" -+ | BLib -> "lib" -+ | BObj -> "obj" -+ | BDoc -> "doc")^ -+ "_"^nm -+ -+ -+ let to_log_event_done t nm = -+ "is_"^(to_log_event_file t nm) -+ -+ -+ let register t nm lst = -+ BaseLog.register -+ (to_log_event_done t nm) -+ "true"; -+ List.iter -+ (fun alt -> -+ let registered = -+ List.fold_left -+ (fun registered fn -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ BaseLog.register -+ (to_log_event_file t nm) -+ (if Filename.is_relative fn then -+ Filename.concat (Sys.getcwd ()) fn -+ else -+ fn); -+ true -+ end -+ else -+ registered) -+ false -+ alt -+ in -+ if not registered then -+ warning -+ (f_ "Cannot find an existing alternative files among: %s") -+ (String.concat (s_ ", ") alt)) -+ lst -+ -+ -+ let unregister t nm = -+ List.iter -+ (fun (e, d) -> -+ BaseLog.unregister e d) -+ (BaseLog.filter -+ [to_log_event_file t nm; -+ to_log_event_done t nm]) -+ -+ -+ let fold t nm f acc = -+ List.fold_left -+ (fun acc (_, fn) -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ f acc fn -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' has been marked as built \ -+ for %s but doesn't exist") -+ fn -+ (Printf.sprintf -+ (match t with -+ | BExec | BExecLib -> -+ (f_ "executable %s") -+ | BLib -> -+ (f_ "library %s") -+ | BObj -> -+ (f_ "object %s") -+ | BDoc -> -+ (f_ "documentation %s")) -+ nm); -+ acc -+ end) -+ acc -+ (BaseLog.filter -+ [to_log_event_file t nm]) -+ -+ -+ let is_built t nm = -+ List.fold_left -+ (fun is_built (_, d) -> -+ (try -+ bool_of_string d -+ with _ -> -+ false)) -+ false -+ (BaseLog.filter -+ [to_log_event_done t nm]) -+ -+ -+ let of_executable ffn (cs, bs, exec) = -+ let unix_exec_is, unix_dll_opt = -+ OASISExecutable.unix_exec_is -+ (cs, bs, exec) -+ (fun () -> -+ bool_of_string -+ (is_native ())) -+ ext_dll -+ ext_program -+ in -+ let evs = -+ (BExec, cs.cs_name, [[ffn unix_exec_is]]) -+ :: -+ (match unix_dll_opt with -+ | Some fn -> -+ [BExecLib, cs.cs_name, [[ffn fn]]] -+ | None -> -+ []) -+ in -+ evs, -+ unix_exec_is, -+ unix_dll_opt -+ -+ -+ let of_library ffn (cs, bs, lib) = -+ let unix_lst = -+ OASISLibrary.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ ~has_native_dynlink:(bool_of_string (native_dynlink ())) -+ ~ext_lib:(ext_lib ()) -+ ~ext_dll:(ext_dll ()) -+ (cs, bs, lib) -+ in -+ let evs = -+ [BLib, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ -+ -+ let of_object ffn (cs, bs, obj) = -+ let unix_lst = -+ OASISObject.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ (cs, bs, obj) -+ in -+ let evs = -+ [BObj, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ -+end -+ -+module BaseCustom = struct -+(* # 22 "src/base/BaseCustom.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let run cmd args extra_args = -+ OASISExec.run ~ctxt:!BaseContext.default ~quote:false -+ (var_expand cmd) -+ (List.map -+ var_expand -+ (args @ (Array.to_list extra_args))) -+ -+ -+ let hook ?(failsafe=false) cstm f e = -+ let optional_command lst = -+ let printer = -+ function -+ | Some (cmd, args) -> String.concat " " (cmd :: args) -+ | None -> s_ "No command" -+ in -+ match -+ var_choose -+ ~name:(s_ "Pre/Post Command") -+ ~printer -+ lst with -+ | Some (cmd, args) -> -+ begin -+ try -+ run cmd args [||] -+ with e when failsafe -> -+ warning -+ (f_ "Command '%s' fail with error: %s") -+ (String.concat " " (cmd :: args)) -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ end -+ | None -> -+ () -+ in -+ let res = -+ optional_command cstm.pre_command; -+ f e -+ in -+ optional_command cstm.post_command; -+ res -+end -+ -+module BaseDynVar = struct -+(* # 22 "src/base/BaseDynVar.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseEnv -+ open BaseBuilt -+ -+ -+ let init pkg = -+ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) -+ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) -+ List.iter -+ (function -+ | Executable (cs, bs, exec) -> -+ if var_choose bs.bs_build then -+ var_ignore -+ (var_redefine -+ (* We don't save this variable *) -+ ~dump:false -+ ~short_desc:(fun () -> -+ Printf.sprintf -+ (f_ "Filename of executable '%s'") -+ cs.cs_name) -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ let fn_opt = -+ fold -+ BExec cs.cs_name -+ (fun _ fn -> Some fn) -+ None -+ in -+ match fn_opt with -+ | Some fn -> fn -+ | None -> -+ raise -+ (PropList.Not_set -+ (cs.cs_name, -+ Some (Printf.sprintf -+ (f_ "Executable '%s' not yet built.") -+ cs.cs_name))))) -+ -+ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> -+ ()) -+ pkg.sections -+end -+ -+module BaseTest = struct -+(* # 22 "src/base/BaseTest.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISExpr -+ open OASISGettext -+ -+ -+ let test lst pkg extra_args = -+ -+ let one_test (failure, n) (test_plugin, cs, test) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "test %s run") -+ cs.cs_name) -+ ~printer:string_of_bool -+ test.test_run then -+ begin -+ let () = -+ info (f_ "Running test '%s'") cs.cs_name -+ in -+ let back_cwd = -+ match test.test_working_directory with -+ | Some dir -> -+ let cwd = -+ Sys.getcwd () -+ in -+ let chdir d = -+ info (f_ "Changing directory to '%s'") d; -+ Sys.chdir d -+ in -+ chdir dir; -+ fun () -> chdir cwd -+ -+ | None -> -+ fun () -> () -+ in -+ try -+ let failure_percent = -+ BaseCustom.hook -+ test.test_custom -+ (test_plugin pkg (cs, test)) -+ extra_args -+ in -+ back_cwd (); -+ (failure_percent +. failure, n + 1) -+ with e -> -+ begin -+ back_cwd (); -+ raise e -+ end -+ end -+ else -+ begin -+ info (f_ "Skipping test '%s'") cs.cs_name; -+ (failure, n) -+ end -+ in -+ let failed, n = -+ List.fold_left -+ one_test -+ (0.0, 0) -+ lst -+ in -+ let failure_percent = -+ if n = 0 then -+ 0.0 -+ else -+ failed /. (float_of_int n) -+ in -+ let msg = -+ Printf.sprintf -+ (f_ "Tests had a %.2f%% failure rate") -+ (100. *. failure_percent) -+ in -+ if failure_percent > 0.0 then -+ failwith msg -+ else -+ info "%s" msg; -+ -+ (* Possible explanation why the tests where not run. *) -+ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && -+ not (bool_of_string (BaseStandardVar.tests ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Tests are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-tests'" -+end -+ -+module BaseDoc = struct -+(* # 22 "src/base/BaseDoc.ml" *) -+ -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let doc lst pkg extra_args = -+ -+ let one_doc (doc_plugin, cs, doc) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "documentation %s build") -+ cs.cs_name) -+ ~printer:string_of_bool -+ doc.doc_build then -+ begin -+ info (f_ "Building documentation '%s'") cs.cs_name; -+ BaseCustom.hook -+ doc.doc_custom -+ (doc_plugin pkg (cs, doc)) -+ extra_args -+ end -+ in -+ List.iter one_doc lst; -+ -+ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && -+ not (bool_of_string (BaseStandardVar.docs ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Docs are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-docs'" -+end -+ -+module BaseSetup = struct -+(* # 22 "src/base/BaseSetup.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISSection -+ open OASISGettext -+ open OASISUtils -+ -+ -+ type std_args_fun = -+ package -> string array -> unit -+ -+ -+ type ('a, 'b) section_args_fun = -+ name * (package -> (common_section * 'a) -> string array -> 'b) -+ -+ -+ type t = -+ { -+ configure: std_args_fun; -+ build: std_args_fun; -+ doc: ((doc, unit) section_args_fun) list; -+ test: ((test, float) section_args_fun) list; -+ install: std_args_fun; -+ uninstall: std_args_fun; -+ clean: std_args_fun list; -+ clean_doc: (doc, unit) section_args_fun list; -+ clean_test: (test, unit) section_args_fun list; -+ distclean: std_args_fun list; -+ distclean_doc: (doc, unit) section_args_fun list; -+ distclean_test: (test, unit) section_args_fun list; -+ package: package; -+ oasis_fn: string option; -+ oasis_version: string; -+ oasis_digest: Digest.t option; -+ oasis_exec: string option; -+ oasis_setup_args: string list; -+ setup_update: bool; -+ } -+ -+ -+ (* Associate a plugin function with data from package *) -+ let join_plugin_sections filter_map lst = -+ List.rev -+ (List.fold_left -+ (fun acc sct -> -+ match filter_map sct with -+ | Some e -> -+ e :: acc -+ | None -> -+ acc) -+ [] -+ lst) -+ -+ -+ (* Search for plugin data associated with a section name *) -+ let lookup_plugin_section plugin action nm lst = -+ try -+ List.assoc nm lst -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find plugin %s matching section %s for %s action") -+ plugin -+ nm -+ action -+ -+ -+ let configure t args = -+ (* Run configure *) -+ BaseCustom.hook -+ t.package.conf_custom -+ (fun () -> -+ (* Reload if preconf has changed it *) -+ begin -+ try -+ unload (); -+ load (); -+ with _ -> -+ () -+ end; -+ -+ (* Run plugin's configure *) -+ t.configure t.package args; -+ -+ (* Dump to allow postconf to change it *) -+ dump ()) -+ (); -+ -+ (* Reload environment *) -+ unload (); -+ load (); -+ -+ (* Save environment *) -+ print (); -+ -+ (* Replace data in file *) -+ BaseFileAB.replace t.package.files_ab -+ -+ -+ let build t args = -+ BaseCustom.hook -+ t.package.build_custom -+ (t.build t.package) -+ args -+ -+ -+ let doc t args = -+ BaseDoc.doc -+ (join_plugin_sections -+ (function -+ | Doc (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "documentation" -+ (s_ "build") -+ cs.cs_name -+ t.doc, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ -+ let test t args = -+ BaseTest.test -+ (join_plugin_sections -+ (function -+ | Test (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "test" -+ (s_ "run") -+ cs.cs_name -+ t.test, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ -+ let all t args = -+ let rno_doc = -+ ref false -+ in -+ let rno_test = -+ ref false -+ in -+ let arg_rest = -+ ref [] -+ in -+ Arg.parse_argv -+ ~current:(ref 0) -+ (Array.of_list -+ ((Sys.executable_name^" all") :: -+ (Array.to_list args))) -+ [ -+ "-no-doc", -+ Arg.Set rno_doc, -+ s_ "Don't run doc target"; -+ -+ "-no-test", -+ Arg.Set rno_test, -+ s_ "Don't run test target"; -+ -+ "--", -+ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), -+ s_ "All arguments for configure."; -+ ] -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ ""; -+ -+ info "Running configure step"; -+ configure t (Array.of_list (List.rev !arg_rest)); -+ -+ info "Running build step"; -+ build t [||]; -+ -+ (* Load setup.log dynamic variables *) -+ BaseDynVar.init t.package; -+ -+ if not !rno_doc then -+ begin -+ info "Running doc step"; -+ doc t [||]; -+ end -+ else -+ begin -+ info "Skipping doc step" -+ end; -+ -+ if not !rno_test then -+ begin -+ info "Running test step"; -+ test t [||] -+ end -+ else -+ begin -+ info "Skipping test step" -+ end -+ -+ -+ let install t args = -+ BaseCustom.hook -+ t.package.install_custom -+ (t.install t.package) -+ args -+ -+ -+ let uninstall t args = -+ BaseCustom.hook -+ t.package.uninstall_custom -+ (t.uninstall t.package) -+ args -+ -+ -+ let reinstall t args = -+ uninstall t args; -+ install t args -+ -+ -+ let clean, distclean = -+ let failsafe f a = -+ try -+ f a -+ with e -> -+ warning -+ (f_ "Action fail with error: %s") -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ in -+ -+ let generic_clean t cstm mains docs tests args = -+ BaseCustom.hook -+ ~failsafe:true -+ cstm -+ (fun () -> -+ (* Clean section *) -+ List.iter -+ (function -+ | Test (cs, test) -> -+ let f = -+ try -+ List.assoc cs.cs_name tests -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, test)) -+ args -+ | Doc (cs, doc) -> -+ let f = -+ try -+ List.assoc cs.cs_name docs -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, doc)) -+ args -+ | Library _ -+ | Object _ -+ | Executable _ -+ | Flag _ -+ | SrcRepo _ -> -+ ()) -+ t.package.sections; -+ (* Clean whole package *) -+ List.iter -+ (fun f -> -+ failsafe -+ (f t.package) -+ args) -+ mains) -+ () -+ in -+ -+ let clean t args = -+ generic_clean -+ t -+ t.package.clean_custom -+ t.clean -+ t.clean_doc -+ t.clean_test -+ args -+ in -+ -+ let distclean t args = -+ (* Call clean *) -+ clean t args; -+ -+ (* Call distclean code *) -+ generic_clean -+ t -+ t.package.distclean_custom -+ t.distclean -+ t.distclean_doc -+ t.distclean_test -+ args; -+ -+ (* Remove generated file *) -+ List.iter -+ (fun fn -> -+ if Sys.file_exists fn then -+ begin -+ info (f_ "Remove '%s'") fn; -+ Sys.remove fn -+ end) -+ (BaseEnv.default_filename -+ :: -+ BaseLog.default_filename -+ :: -+ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) -+ in -+ -+ clean, distclean -+ -+ -+ let version t _ = -+ print_endline t.oasis_version -+ -+ -+ let update_setup_ml, no_update_setup_ml_cli = -+ let b = ref true in -+ b, -+ ("-no-update-setup-ml", -+ Arg.Clear b, -+ s_ " Don't try to update setup.ml, even if _oasis has changed.") -+ -+ -+ let default_oasis_fn = "_oasis" -+ -+ -+ let update_setup_ml t = -+ let oasis_fn = -+ match t.oasis_fn with -+ | Some fn -> fn -+ | None -> default_oasis_fn -+ in -+ let oasis_exec = -+ match t.oasis_exec with -+ | Some fn -> fn -+ | None -> "oasis" -+ in -+ let ocaml = -+ Sys.executable_name -+ in -+ let setup_ml, args = -+ match Array.to_list Sys.argv with -+ | setup_ml :: args -> -+ setup_ml, args -+ | [] -> -+ failwith -+ (s_ "Expecting non-empty command line arguments.") -+ in -+ let ocaml, setup_ml = -+ if Sys.executable_name = Sys.argv.(0) then -+ (* We are not running in standard mode, probably the script -+ * is precompiled. -+ *) -+ "ocaml", "setup.ml" -+ else -+ ocaml, setup_ml -+ in -+ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in -+ let do_update () = -+ let oasis_exec_version = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | 1 -> -+ failwithf -+ (f_ "Executable '%s' is probably an old version \ -+ of oasis (< 0.3.0), please update to version \ -+ v%s.") -+ oasis_exec t.oasis_version -+ | 127 -> -+ failwithf -+ (f_ "Cannot find executable '%s', please install \ -+ oasis v%s.") -+ oasis_exec t.oasis_version -+ | n -> -+ failwithf -+ (f_ "Command '%s version' exited with code %d.") -+ oasis_exec n) -+ oasis_exec ["version"] -+ in -+ if OASISVersion.comparator_apply -+ (OASISVersion.version_of_string oasis_exec_version) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string t.oasis_version)) then -+ begin -+ (* We have a version >= for the executable oasis, proceed with -+ * update. -+ *) -+ (* TODO: delegate this check to 'oasis setup'. *) -+ if Sys.os_type = "Win32" then -+ failwithf -+ (f_ "It is not possible to update the running script \ -+ setup.ml on Windows. Please update setup.ml by \ -+ running '%s'.") -+ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) -+ else -+ begin -+ OASISExec.run -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | n -> -+ failwithf -+ (f_ "Unable to update setup.ml using '%s', \ -+ please fix the problem and retry.") -+ oasis_exec) -+ oasis_exec ("setup" :: t.oasis_setup_args); -+ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) -+ end -+ end -+ else -+ failwithf -+ (f_ "The version of '%s' (v%s) doesn't match the version of \ -+ oasis used to generate the %s file. Please install at \ -+ least oasis v%s.") -+ oasis_exec oasis_exec_version setup_ml t.oasis_version -+ in -+ -+ if !update_setup_ml then -+ begin -+ try -+ match t.oasis_digest with -+ | Some dgst -> -+ if Sys.file_exists oasis_fn && -+ dgst <> Digest.file default_oasis_fn then -+ begin -+ do_update (); -+ true -+ end -+ else -+ false -+ | None -> -+ false -+ with e -> -+ error -+ (f_ "Error when updating setup.ml. If you want to avoid this error, \ -+ you can bypass the update of %s by running '%s %s %s %s'") -+ setup_ml ocaml setup_ml no_update_setup_ml_cli -+ (String.concat " " args); -+ raise e -+ end -+ else -+ false -+ -+ -+ let setup t = -+ let catch_exn = -+ ref true -+ in -+ try -+ let act_ref = -+ ref (fun _ -> -+ failwithf -+ (f_ "No action defined, run '%s %s -help'") -+ Sys.executable_name -+ Sys.argv.(0)) -+ -+ in -+ let extra_args_ref = -+ ref [] -+ in -+ let allow_empty_env_ref = -+ ref false -+ in -+ let arg_handle ?(allow_empty_env=false) act = -+ Arg.Tuple -+ [ -+ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); -+ -+ Arg.Unit -+ (fun () -> -+ allow_empty_env_ref := allow_empty_env; -+ act_ref := act); -+ ] -+ in -+ -+ Arg.parse -+ (Arg.align -+ ([ -+ "-configure", -+ arg_handle ~allow_empty_env:true configure, -+ s_ "[options*] Configure the whole build process."; -+ -+ "-build", -+ arg_handle build, -+ s_ "[options*] Build executables and libraries."; -+ -+ "-doc", -+ arg_handle doc, -+ s_ "[options*] Build documents."; -+ -+ "-test", -+ arg_handle test, -+ s_ "[options*] Run tests."; -+ -+ "-all", -+ arg_handle ~allow_empty_env:true all, -+ s_ "[options*] Run configure, build, doc and test targets."; -+ -+ "-install", -+ arg_handle install, -+ s_ "[options*] Install libraries, data, executables \ -+ and documents."; -+ -+ "-uninstall", -+ arg_handle uninstall, -+ s_ "[options*] Uninstall libraries, data, executables \ -+ and documents."; -+ -+ "-reinstall", -+ arg_handle reinstall, -+ s_ "[options*] Uninstall and install libraries, data, \ -+ executables and documents."; -+ -+ "-clean", -+ arg_handle ~allow_empty_env:true clean, -+ s_ "[options*] Clean files generated by a build."; -+ -+ "-distclean", -+ arg_handle ~allow_empty_env:true distclean, -+ s_ "[options*] Clean files generated by a build and configure."; -+ -+ "-version", -+ arg_handle ~allow_empty_env:true version, -+ s_ " Display version of OASIS used to generate this setup.ml."; -+ -+ "-no-catch-exn", -+ Arg.Clear catch_exn, -+ s_ " Don't catch exception, useful for debugging."; -+ ] -+ @ -+ (if t.setup_update then -+ [no_update_setup_ml_cli] -+ else -+ []) -+ @ (BaseContext.args ()))) -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ (s_ "Setup and run build process current package\n"); -+ -+ (* Build initial environment *) -+ load ~allow_empty:!allow_empty_env_ref (); -+ -+ (** Initialize flags *) -+ List.iter -+ (function -+ | Flag (cs, {flag_description = hlp; -+ flag_default = choices}) -> -+ begin -+ let apply ?short_desc () = -+ var_ignore -+ (var_define -+ ~cli:CLIEnable -+ ?short_desc -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ string_of_bool -+ (var_choose -+ ~name:(Printf.sprintf -+ (f_ "default value of flag %s") -+ cs.cs_name) -+ ~printer:string_of_bool -+ choices))) -+ in -+ match hlp with -+ | Some hlp -> -+ apply ~short_desc:(fun () -> hlp) () -+ | None -> -+ apply () -+ end -+ | _ -> -+ ()) -+ t.package.sections; -+ -+ BaseStandardVar.init t.package; -+ -+ BaseDynVar.init t.package; -+ -+ if t.setup_update && update_setup_ml t then -+ () -+ else -+ !act_ref t (Array.of_list (List.rev !extra_args_ref)) -+ -+ with e when !catch_exn -> -+ error "%s" (Printexc.to_string e); -+ exit 1 -+ -+ -+end -+ -+ -+# 5394 "setup.ml" -+module InternalConfigurePlugin = struct -+(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) -+ -+ -+ (** Configure using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open BaseEnv -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open BaseMessage -+ -+ -+ (** Configure build using provided series of check to be done -+ * and then output corresponding file. -+ *) -+ let configure pkg argv = -+ let var_ignore_eval var = let _s: string = var () in () in -+ let errors = ref SetString.empty in -+ let buff = Buffer.create 13 in -+ -+ let add_errors fmt = -+ Printf.kbprintf -+ (fun b -> -+ errors := SetString.add (Buffer.contents b) !errors; -+ Buffer.clear b) -+ buff -+ fmt -+ in -+ -+ let warn_exception e = -+ warning "%s" (Printexc.to_string e) -+ in -+ -+ (* Check tools *) -+ let check_tools lst = -+ List.iter -+ (function -+ | ExternalTool tool -> -+ begin -+ try -+ var_ignore_eval (BaseCheck.prog tool) -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find external tool '%s'") tool -+ end -+ | InternalExecutable nm1 -> -+ (* Check that matching tool is built *) -+ List.iter -+ (function -+ | Executable ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal executable \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ lst -+ in -+ -+ let build_checks sct bs = -+ if var_choose bs.bs_build then -+ begin -+ if bs.bs_compiled_object = Native then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.ocamlopt -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Section %s requires native compilation") -+ (OASISSection.string_of_section sct) -+ end; -+ -+ (* Check tools *) -+ check_tools bs.bs_build_tools; -+ -+ (* Check depends *) -+ List.iter -+ (function -+ | FindlibPackage (findlib_pkg, version_comparator) -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.package ?version_comparator findlib_pkg) -+ with e -> -+ warn_exception e; -+ match version_comparator with -+ | None -> -+ add_errors -+ (f_ "Cannot find findlib package %s") -+ findlib_pkg -+ | Some ver_cmp -> -+ add_errors -+ (f_ "Cannot find findlib package %s (%s)") -+ findlib_pkg -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | InternalLibrary nm1 -> -+ (* Check that matching library is built *) -+ List.iter -+ (function -+ | Library ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal library \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ bs.bs_build_depends -+ end -+ in -+ -+ (* Parse command line *) -+ BaseArgExt.parse argv (BaseEnv.args ()); -+ -+ (* OCaml version *) -+ begin -+ match pkg.ocaml_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "ocaml" -+ ver_cmp -+ BaseStandardVar.ocaml_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "OCaml version %s doesn't match version constraint %s") -+ (BaseStandardVar.ocaml_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ -+ (* Findlib version *) -+ begin -+ match pkg.findlib_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "findlib" -+ ver_cmp -+ BaseStandardVar.findlib_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Findlib version %s doesn't match version constraint %s") -+ (BaseStandardVar.findlib_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ (* Make sure the findlib version is fine for the OCaml compiler. *) -+ begin -+ let ocaml_ge4 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) -+ (OASISVersion.version_of_string "4.0.0") >= 0 in -+ if ocaml_ge4 then -+ let findlib_lt132 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) -+ (OASISVersion.version_of_string "1.3.2") < 0 in -+ if findlib_lt132 then -+ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" -+ end; -+ -+ (* FlexDLL *) -+ if BaseStandardVar.os_type () = "Win32" || -+ BaseStandardVar.os_type () = "Cygwin" then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.flexlink -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find 'flexlink'") -+ end; -+ -+ (* Check build depends *) -+ List.iter -+ (function -+ | Executable (_, bs, _) -+ | Library (_, bs, _) as sct -> -+ build_checks sct bs -+ | Doc (_, doc) -> -+ if var_choose doc.doc_build then -+ check_tools doc.doc_build_tools -+ | Test (_, test) -> -+ if var_choose test.test_run then -+ check_tools test.test_tools -+ | _ -> -+ ()) -+ pkg.sections; -+ -+ (* Check if we need native dynlink (presence of libraries that compile to -+ * native) -+ *) -+ begin -+ let has_cmxa = -+ List.exists -+ (function -+ | Library (_, bs, _) -> -+ var_choose bs.bs_build && -+ (bs.bs_compiled_object = Native || -+ (bs.bs_compiled_object = Best && -+ bool_of_string (BaseStandardVar.is_native ()))) -+ | _ -> -+ false) -+ pkg.sections -+ in -+ if has_cmxa then -+ var_ignore_eval BaseStandardVar.native_dynlink -+ end; -+ -+ (* Check errors *) -+ if SetString.empty != !errors then -+ begin -+ List.iter -+ (fun e -> error "%s" e) -+ (SetString.elements !errors); -+ failwithf -+ (fn_ -+ "%d configuration error" -+ "%d configuration errors" -+ (SetString.cardinal !errors)) -+ (SetString.cardinal !errors) -+ end -+ -+ -+end -+ -+module InternalInstallPlugin = struct -+(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) -+ -+ -+ (** Install using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open BaseEnv -+ open BaseStandardVar -+ open BaseMessage -+ open OASISTypes -+ open OASISFindlib -+ open OASISGettext -+ open OASISUtils -+ -+ -+ let exec_hook = -+ ref (fun (cs, bs, exec) -> cs, bs, exec) -+ -+ -+ let lib_hook = -+ ref (fun (cs, bs, lib) -> cs, bs, lib, []) -+ -+ -+ let obj_hook = -+ ref (fun (cs, bs, obj) -> cs, bs, obj, []) -+ -+ -+ let doc_hook = -+ ref (fun (cs, doc) -> cs, doc) -+ -+ -+ let install_file_ev = -+ "install-file" -+ -+ -+ let install_dir_ev = -+ "install-dir" -+ -+ -+ let install_findlib_ev = -+ "install-findlib" -+ -+ -+ let win32_max_command_line_length = 8000 -+ -+ -+ let split_install_command ocamlfind findlib_name meta files = -+ if Sys.os_type = "Win32" then -+ (* Arguments for the first command: *) -+ let first_args = ["install"; findlib_name; meta] in -+ (* Arguments for remaining commands: *) -+ let other_args = ["install"; findlib_name; "-add"] in -+ (* Extract as much files as possible from [files], [len] is -+ the current command line length: *) -+ let rec get_files len acc files = -+ match files with -+ | [] -> -+ (List.rev acc, []) -+ | file :: rest -> -+ let len = len + 1 + String.length file in -+ if len > win32_max_command_line_length then -+ (List.rev acc, files) -+ else -+ get_files len (file :: acc) rest -+ in -+ (* Split the command into several commands. *) -+ let rec split args files = -+ match files with -+ | [] -> -+ [] -+ | _ -> -+ (* Length of "ocamlfind install [META|-add]" *) -+ let len = -+ List.fold_left -+ (fun len arg -> -+ len + 1 (* for the space *) + String.length arg) -+ (String.length ocamlfind) -+ args -+ in -+ match get_files len [] files with -+ | ([], _) -> -+ failwith (s_ "Command line too long.") -+ | (firsts, others) -> -+ let cmd = args @ firsts in -+ (* Use -add for remaining commands: *) -+ let () = -+ let findlib_ge_132 = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string -+ (BaseStandardVar.findlib_version ())) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string "1.3.2")) -+ in -+ if not findlib_ge_132 then -+ failwithf -+ (f_ "Installing the library %s require to use the \ -+ flag '-add' of ocamlfind because the command \ -+ line is too long. This flag is only available \ -+ for findlib 1.3.2. Please upgrade findlib from \ -+ %s to 1.3.2") -+ findlib_name (BaseStandardVar.findlib_version ()) -+ in -+ let cmds = split other_args others in -+ cmd :: cmds -+ in -+ (* The first command does not use -add: *) -+ split first_args files -+ else -+ ["install" :: findlib_name :: meta :: files] -+ -+ -+ let install pkg argv = -+ -+ let in_destdir = -+ try -+ let destdir = -+ destdir () -+ in -+ (* Practically speaking destdir is prepended -+ * at the beginning of the target filename -+ *) -+ fun fn -> destdir^fn -+ with PropList.Not_set _ -> -+ fun fn -> fn -+ in -+ -+ let install_file ?tgt_fn src_file envdir = -+ let tgt_dir = -+ in_destdir (envdir ()) -+ in -+ let tgt_file = -+ Filename.concat -+ tgt_dir -+ (match tgt_fn with -+ | Some fn -> -+ fn -+ | None -> -+ Filename.basename src_file) -+ in -+ (* Create target directory if needed *) -+ OASISFileUtil.mkdir_parent -+ ~ctxt:!BaseContext.default -+ (fun dn -> -+ info (f_ "Creating directory '%s'") dn; -+ BaseLog.register install_dir_ev dn) -+ tgt_dir; -+ -+ (* Really install files *) -+ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; -+ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; -+ BaseLog.register install_file_ev tgt_file -+ in -+ -+ (* Install data into defined directory *) -+ let install_data srcdir lst tgtdir = -+ let tgtdir = -+ OASISHostPath.of_unix (var_expand tgtdir) -+ in -+ List.iter -+ (fun (src, tgt_opt) -> -+ let real_srcs = -+ OASISFileUtil.glob -+ ~ctxt:!BaseContext.default -+ (Filename.concat srcdir src) -+ in -+ if real_srcs = [] then -+ failwithf -+ (f_ "Wildcard '%s' doesn't match any files") -+ src; -+ List.iter -+ (fun fn -> -+ install_file -+ fn -+ (fun () -> -+ match tgt_opt with -+ | Some s -> -+ OASISHostPath.of_unix (var_expand s) -+ | None -> -+ tgtdir)) -+ real_srcs) -+ lst -+ in -+ -+ (** Install all libraries *) -+ let install_libs pkg = -+ -+ let files_of_library (f_data, acc) data_lib = -+ let cs, bs, lib, lib_extra = -+ !lib_hook data_lib -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + lib_extra *) -+ List.rev_append lib_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in library %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ lib.lib_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BLib -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the library *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ and files_of_object (f_data, acc) data_obj = -+ let cs, bs, obj, obj_extra = -+ !obj_hook data_obj -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + obj_extra *) -+ List.rev_append obj_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in object %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ obj.obj_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BObj -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the object *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ -+ in -+ -+ (* Install one group of library *) -+ let install_group_lib grp = -+ (* Iterate through all group nodes *) -+ let rec install_group_lib_aux data_and_files grp = -+ let data_and_files, children = -+ match grp with -+ | Container (_, children) -> -+ data_and_files, children -+ | Package (_, cs, bs, `Library lib, children) -> -+ files_of_library data_and_files (cs, bs, lib), children -+ | Package (_, cs, bs, `Object obj, children) -> -+ files_of_object data_and_files (cs, bs, obj), children -+ in -+ List.fold_left -+ install_group_lib_aux -+ data_and_files -+ children -+ in -+ -+ (* Findlib name of the root library *) -+ let findlib_name = -+ findlib_of_group grp -+ in -+ -+ (* Determine root library *) -+ let root_lib = -+ root_of_group grp -+ in -+ -+ (* All files to install for this library *) -+ let f_data, files = -+ install_group_lib_aux (ignore, []) grp -+ in -+ -+ (* Really install, if there is something to install *) -+ if files = [] then -+ begin -+ warning -+ (f_ "Nothing to install for findlib library '%s'") -+ findlib_name -+ end -+ else -+ begin -+ let meta = -+ (* Search META file *) -+ let _, bs, _ = -+ root_lib -+ in -+ let res = -+ Filename.concat bs.bs_path "META" -+ in -+ if not (OASISFileUtil.file_exists_case res) then -+ failwithf -+ (f_ "Cannot find file '%s' for findlib library %s") -+ res -+ findlib_name; -+ res -+ in -+ let files = -+ (* Make filename shorter to avoid hitting command max line length -+ * too early, esp. on Windows. -+ *) -+ let remove_prefix p n = -+ let plen = String.length p in -+ let nlen = String.length n in -+ if plen <= nlen && String.sub n 0 plen = p then -+ begin -+ let fn_sep = -+ if Sys.os_type = "Win32" then -+ '\\' -+ else -+ '/' -+ in -+ let cutpoint = plen + -+ (if plen < nlen && n.[plen] = fn_sep then -+ 1 -+ else -+ 0) -+ in -+ String.sub n cutpoint (nlen - cutpoint) -+ end -+ else -+ n -+ in -+ List.map (remove_prefix (Sys.getcwd ())) files -+ in -+ info -+ (f_ "Installing findlib library '%s'") -+ findlib_name; -+ let ocamlfind = ocamlfind () in -+ let commands = -+ split_install_command -+ ocamlfind -+ findlib_name -+ meta -+ files -+ in -+ List.iter -+ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) -+ commands; -+ BaseLog.register install_findlib_ev findlib_name -+ end; -+ -+ (* Install data files *) -+ f_data (); -+ -+ in -+ -+ let group_libs, _, _ = -+ findlib_mapping pkg -+ in -+ -+ (* We install libraries in groups *) -+ List.iter install_group_lib group_libs -+ in -+ -+ let install_execs pkg = -+ let install_exec data_exec = -+ let cs, bs, exec = -+ !exec_hook data_exec -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then -+ begin -+ let exec_libdir () = -+ Filename.concat -+ (libdir ()) -+ pkg.name -+ in -+ BaseBuilt.fold -+ BaseBuilt.BExec -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ ~tgt_fn:(cs.cs_name ^ ext_program ()) -+ fn -+ bindir) -+ (); -+ BaseBuilt.fold -+ BaseBuilt.BExecLib -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ exec_libdir) -+ (); -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name) -+ end -+ in -+ List.iter -+ (function -+ | Executable (cs, bs, exec)-> -+ install_exec (cs, bs, exec) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ let install_docs pkg = -+ let install_doc data = -+ let cs, doc = -+ !doc_hook data -+ in -+ if var_choose doc.doc_install && -+ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then -+ begin -+ let tgt_dir = -+ OASISHostPath.of_unix (var_expand doc.doc_install_dir) -+ in -+ BaseBuilt.fold -+ BaseBuilt.BDoc -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ (fun () -> tgt_dir)) -+ (); -+ install_data -+ Filename.current_dir_name -+ doc.doc_data_files -+ doc.doc_install_dir -+ end -+ in -+ List.iter -+ (function -+ | Doc (cs, doc) -> -+ install_doc (cs, doc) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ install_libs pkg; -+ install_execs pkg; -+ install_docs pkg -+ -+ -+ (* Uninstall already installed data *) -+ let uninstall _ argv = -+ List.iter -+ (fun (ev, data) -> -+ if ev = install_file_ev then -+ begin -+ if OASISFileUtil.file_exists_case data then -+ begin -+ info -+ (f_ "Removing file '%s'") -+ data; -+ Sys.remove data -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_dir_ev then -+ begin -+ if Sys.file_exists data && Sys.is_directory data then -+ begin -+ if Sys.readdir data = [||] then -+ begin -+ info -+ (f_ "Removing directory '%s'") -+ data; -+ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' is not empty (%s)") -+ data -+ (String.concat -+ ", " -+ (Array.to_list -+ (Sys.readdir data))) -+ end -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_findlib_ev then -+ begin -+ info (f_ "Removing findlib library '%s'") data; -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlfind ()) ["remove"; data] -+ end -+ else -+ failwithf (f_ "Unknown log event '%s'") ev; -+ BaseLog.unregister ev data) -+ (* We process event in reverse order *) -+ (List.rev -+ (BaseLog.filter -+ [install_file_ev; -+ install_dir_ev; -+ install_findlib_ev])) -+ -+ -+end -+ -+ -+# 6243 "setup.ml" -+module OCamlbuildCommon = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) -+ -+ -+ (** Functions common to OCamlbuild build and doc plugin -+ *) -+ -+ -+ open OASISGettext -+ open BaseEnv -+ open BaseStandardVar -+ open OASISTypes -+ -+ -+ -+ -+ type extra_args = string list -+ -+ -+ let ocamlbuild_clean_ev = "ocamlbuild-clean" -+ -+ -+ let ocamlbuildflags = -+ var_define -+ ~short_desc:(fun () -> "OCamlbuild additional flags") -+ "ocamlbuildflags" -+ (fun () -> "") -+ -+ -+ (** Fix special arguments depending on environment *) -+ let fix_args args extra_argv = -+ List.flatten -+ [ -+ if (os_type ()) = "Win32" then -+ [ -+ "-classic-display"; -+ "-no-log"; -+ "-no-links"; -+ "-install-lib-dir"; -+ (Filename.concat (standard_library ()) "ocamlbuild") -+ ] -+ else -+ []; -+ -+ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then -+ [ -+ "-byte-plugin" -+ ] -+ else -+ []; -+ args; -+ -+ if bool_of_string (debug ()) then -+ ["-tag"; "debug"] -+ else -+ []; -+ -+ if bool_of_string (profile ()) then -+ ["-tag"; "profile"] -+ else -+ []; -+ -+ OASISString.nsplit (ocamlbuildflags ()) ' '; -+ -+ Array.to_list extra_argv; -+ ] -+ -+ -+ (** Run 'ocamlbuild -clean' if not already done *) -+ let run_clean extra_argv = -+ let extra_cli = -+ String.concat " " (Array.to_list extra_argv) -+ in -+ (* Run if never called with these args *) -+ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then -+ begin -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); -+ BaseLog.register ocamlbuild_clean_ev extra_cli; -+ at_exit -+ (fun () -> -+ try -+ BaseLog.unregister ocamlbuild_clean_ev extra_cli -+ with _ -> -+ ()) -+ end -+ -+ -+ (** Run ocamlbuild, unregister all clean events *) -+ let run_ocamlbuild args extra_argv = -+ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html -+ *) -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args args extra_argv); -+ (* Remove any clean event, we must run it again *) -+ List.iter -+ (fun (e, d) -> BaseLog.unregister e d) -+ (BaseLog.filter [ocamlbuild_clean_ev]) -+ -+ -+ (** Determine real build directory *) -+ let build_dir extra_argv = -+ let rec search_args dir = -+ function -+ | "-build-dir" :: dir :: tl -> -+ search_args dir tl -+ | _ :: tl -> -+ search_args dir tl -+ | [] -> -+ dir -+ in -+ search_args "_build" (fix_args [] extra_argv) -+ -+ -+end -+ -+module OCamlbuildPlugin = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) -+ -+ -+ (** Build using ocamlbuild -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISUtils -+ open OASISString -+ open BaseEnv -+ open OCamlbuildCommon -+ open BaseStandardVar -+ open BaseMessage -+ -+ -+ -+ -+ -+ let cond_targets_hook = -+ ref (fun lst -> lst) -+ -+ -+ let build extra_args pkg argv = -+ (* Return the filename in build directory *) -+ let in_build_dir fn = -+ Filename.concat -+ (build_dir argv) -+ fn -+ in -+ -+ (* Return the unix filename in host build directory *) -+ let in_build_dir_of_unix fn = -+ in_build_dir (OASISHostPath.of_unix fn) -+ in -+ -+ let cond_targets = -+ List.fold_left -+ (fun acc -> -+ function -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_library -+ in_build_dir_of_unix -+ (cs, bs, lib) -+ in -+ -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ~what:".cma" fn -+ || ends_with ~what:".cmxs" fn -+ || ends_with ~what:".cmxa" fn -+ || ends_with ~what:(ext_lib ()) fn -+ || ends_with ~what:(ext_dll ()) fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for library %s") -+ cs.cs_name -+ end -+ -+ | Object (cs, bs, obj) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_object -+ in_build_dir_of_unix -+ (cs, bs, obj) -+ in -+ -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ".cmo" fn -+ || ends_with ".cmx" fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for object %s") -+ cs.cs_name -+ end -+ -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_exec_is, unix_dll_opt = -+ BaseBuilt.of_executable -+ in_build_dir_of_unix -+ (cs, bs, exec) -+ in -+ -+ let target ext = -+ let unix_tgt = -+ (OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.chop_extension -+ exec.exec_main_is))^ext -+ in -+ let evs = -+ (* Fix evs, we want to use the unix_tgt, without copying *) -+ List.map -+ (function -+ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> -+ BaseBuilt.BExec, nm, -+ [[in_build_dir_of_unix unix_tgt]] -+ | ev -> -+ ev) -+ evs -+ in -+ evs, [unix_tgt] -+ in -+ -+ (* Add executable *) -+ let acc = -+ match bs.bs_compiled_object with -+ | Native -> -+ (target ".native") :: acc -+ | Best when bool_of_string (is_native ()) -> -+ (target ".native") :: acc -+ | Byte -+ | Best -> -+ (target ".byte") :: acc -+ in -+ acc -+ end -+ -+ | Library _ | Object _ | Executable _ | Test _ -+ | SrcRepo _ | Flag _ | Doc _ -> -+ acc) -+ [] -+ (* Keep the pkg.sections ordered *) -+ (List.rev pkg.sections); -+ in -+ -+ (* Check and register built files *) -+ let check_and_register (bt, bnm, lst) = -+ List.iter -+ (fun fns -> -+ if not (List.exists OASISFileUtil.file_exists_case fns) then -+ failwithf -+ (fn_ -+ "Expected built file %s doesn't exist." -+ "None of expected built files %s exists." -+ (List.length fns)) -+ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) -+ lst; -+ (BaseBuilt.register bt bnm lst) -+ in -+ -+ (* Run the hook *) -+ let cond_targets = !cond_targets_hook cond_targets in -+ -+ (* Run a list of target... *) -+ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; -+ (* ... and register events *) -+ List.iter check_and_register (List.flatten (List.map fst cond_targets)) -+ -+ -+ let clean pkg extra_args = -+ run_clean extra_args; -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+ -+end -+ -+module OCamlbuildDocPlugin = struct -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) -+ -+ -+ (* Create documentation using ocamlbuild .odocl files -+ @author Sylvain Le Gall -+ *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISMessage -+ open OCamlbuildCommon -+ open BaseStandardVar -+ -+ -+ -+ -+ type run_t = -+ { -+ extra_args: string list; -+ run_path: unix_filename; -+ } -+ -+ -+ let doc_build run pkg (cs, doc) argv = -+ let index_html = -+ OASISUnixPath.make -+ [ -+ run.run_path; -+ cs.cs_name^".docdir"; -+ "index.html"; -+ ] -+ in -+ let tgt_dir = -+ OASISHostPath.make -+ [ -+ build_dir argv; -+ OASISHostPath.of_unix run.run_path; -+ cs.cs_name^".docdir"; -+ ] -+ in -+ run_ocamlbuild (index_html :: run.extra_args) argv; -+ List.iter -+ (fun glb -> -+ BaseBuilt.register -+ BaseBuilt.BDoc -+ cs.cs_name -+ [OASISFileUtil.glob ~ctxt:!BaseContext.default -+ (Filename.concat tgt_dir glb)]) -+ ["*.html"; "*.css"] -+ -+ -+ let doc_clean run pkg (cs, doc) argv = -+ run_clean argv; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+ -+end -+ -+ -+# 6616 "setup.ml" -+module CustomPlugin = struct -+(* # 22 "src/plugins/custom/CustomPlugin.ml" *) -+ -+ -+ (** Generate custom configure/build/doc/test/install system -+ @author -+ *) -+ -+ -+ open BaseEnv -+ open OASISGettext -+ open OASISTypes -+ -+ -+ -+ -+ -+ type t = -+ { -+ cmd_main: command_line conditional; -+ cmd_clean: (command_line option) conditional; -+ cmd_distclean: (command_line option) conditional; -+ } -+ -+ -+ let run = BaseCustom.run -+ -+ -+ let main t _ extra_args = -+ let cmd, args = -+ var_choose -+ ~name:(s_ "main command") -+ t.cmd_main -+ in -+ run cmd args extra_args -+ -+ -+ let clean t pkg extra_args = -+ match var_choose t.cmd_clean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ -+ let distclean t pkg extra_args = -+ match var_choose t.cmd_distclean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ -+ module Build = -+ struct -+ let main t pkg extra_args = -+ main t pkg extra_args; -+ List.iter -+ (fun sct -> -+ let evs = -+ match sct with -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, _ = -+ BaseBuilt.of_library -+ OASISHostPath.of_unix -+ (cs, bs, lib) -+ in -+ evs -+ end -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, _, _ = -+ BaseBuilt.of_executable -+ OASISHostPath.of_unix -+ (cs, bs, exec) -+ in -+ evs -+ end -+ | _ -> -+ [] -+ in -+ List.iter -+ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) -+ evs) -+ pkg.sections -+ -+ let clean t pkg extra_args = -+ clean t pkg extra_args; -+ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild -+ * considering moving this to BaseSetup? -+ *) -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+ let distclean t pkg extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+ module Test = -+ struct -+ let main t pkg (cs, test) extra_args = -+ try -+ main t pkg extra_args; -+ 0.0 -+ with Failure s -> -+ BaseMessage.warning -+ (f_ "Test '%s' fails: %s") -+ cs.cs_name -+ s; -+ 1.0 -+ -+ let clean t pkg (cs, test) extra_args = -+ clean t pkg extra_args -+ -+ let distclean t pkg (cs, test) extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+ module Doc = -+ struct -+ let main t pkg (cs, _) extra_args = -+ main t pkg extra_args; -+ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] -+ -+ let clean t pkg (cs, _) extra_args = -+ clean t pkg extra_args; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+ let distclean t pkg (cs, _) extra_args = -+ distclean t pkg extra_args -+ end -+ -+ -+end -+ -+ -+# 6764 "setup.ml" -+open OASISTypes;; -+ -+let setup_t = -+ { -+ BaseSetup.configure = InternalConfigurePlugin.configure; -+ build = OCamlbuildPlugin.build []; -+ test = -+ [ -+ ("cow", -+ CustomPlugin.Test.main -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_cow", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }); -+ ("spec", -+ CustomPlugin.Test.main -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_spec", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ doc = []; -+ install = InternalInstallPlugin.install; -+ uninstall = InternalInstallPlugin.uninstall; -+ clean = [OCamlbuildPlugin.clean]; -+ clean_test = -+ [ -+ ("cow", -+ CustomPlugin.Test.clean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_cow", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }); -+ ("spec", -+ CustomPlugin.Test.clean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_spec", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ clean_doc = []; -+ distclean = []; -+ distclean_test = -+ [ -+ ("cow", -+ CustomPlugin.Test.distclean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_cow", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }); -+ ("spec", -+ CustomPlugin.Test.distclean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test_spec", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ distclean_doc = []; -+ package = -+ { -+ oasis_version = "0.3"; -+ ocaml_version = None; -+ findlib_version = None; -+ alpha_features = []; -+ beta_features = []; -+ name = "omd"; -+ version = "1.0.2"; -+ license = -+ OASISLicense.DEP5License -+ (OASISLicense.DEP5Unit -+ { -+ OASISLicense.license = "ISC"; -+ excption = None; -+ version = OASISLicense.NoVersion -+ }); -+ license_file = None; -+ copyrights = []; -+ maintainers = ["Philippe Wang "]; -+ authors = ["Philippe Wang "]; -+ homepage = Some "https://github.com/ocaml/omd"; -+ synopsis = "A Markdown frontend in pure OCaml."; -+ description = -+ Some -+ [ -+ OASISText.Para -+ "This Markdown library is implemented using only pure OCaml (including I/O operations provided by the standard OCaml compiler distribution). OMD is meant to be as faithful as possible to the original Markdown. Additionally, OMD implements a few Github markdown features, an extension mechanism, and a few other features. Note that the opam package installs both the OMD library and the command line tool `omd`. Note that The library interface of 1.0.x is only partially compatible with 0.9.x." -+ ]; -+ categories = []; -+ conf_type = (`Configure, "internal", Some "0.4"); -+ conf_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ build_type = (`Build, "ocamlbuild", Some "0.4"); -+ build_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ install_type = (`Install, "internal", Some "0.4"); -+ install_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ uninstall_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ clean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ distclean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ files_ab = []; -+ sections = -+ [ -+ Library -+ ({ -+ cs_name = "omd"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "src"; -+ bs_compiled_object = Best; -+ bs_build_depends = [FindlibPackage ("bigarray", None)]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ { -+ lib_modules = -+ [ -+ "Omd_utils"; -+ "Omd_representation"; -+ "Omd_backend"; -+ "Omd_lexer"; -+ "Omd_parser"; -+ "Omd" -+ ]; -+ lib_pack = false; -+ lib_internal_modules = []; -+ lib_findlib_parent = None; -+ lib_findlib_name = None; -+ lib_findlib_containers = [] -+ }); -+ Executable -+ ({ -+ cs_name = "omd"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "src"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "omd"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "omd_main.ml"}); -+ SrcRepo -+ ({ -+ cs_name = "master"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ src_repo_type = Git; -+ src_repo_location = "https://github.com/ocaml/omd.git"; -+ src_repo_browser = Some "https://github.com/ocaml/omd"; -+ src_repo_module = None; -+ src_repo_branch = None; -+ src_repo_tag = None; -+ src_repo_subdir = None -+ }); -+ Executable -+ ({ -+ cs_name = "test_cow"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "tests/cow"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "omd"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "test.ml"}); -+ Test -+ ({ -+ cs_name = "cow"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ test_type = (`Test, "Custom", Some "0.0.1"); -+ test_command = -+ [(OASISExpr.EBool true, ("$test_cow", []))]; -+ test_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ test_working_directory = None; -+ test_run = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); -+ (OASISExpr.EFlag "tests", true) -+ ]; -+ test_tools = [] -+ }); -+ Executable -+ ({ -+ cs_name = "test_spec"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "tests"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "omd"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "test_spec.ml"}); -+ Test -+ ({ -+ cs_name = "spec"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ test_type = (`Test, "Custom", Some "0.0.1"); -+ test_command = -+ [(OASISExpr.EBool true, ("$test_spec", []))]; -+ test_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ test_working_directory = None; -+ test_run = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); -+ (OASISExpr.EFlag "tests", true) -+ ]; -+ test_tools = [] -+ }) -+ ]; -+ plugins = -+ [(`Extra, "META", Some "0.3"); (`Extra, "StdFiles", Some "0.3")]; -+ disable_oasis_section = []; -+ schema_data = PropList.Data.create (); -+ plugin_data = [] -+ }; -+ oasis_fn = Some "_oasis"; -+ oasis_version = "0.4.4"; -+ oasis_digest = Some "a\201n\165.\195\bJ\173\219\002\206\025\143\235("; -+ oasis_exec = None; -+ oasis_setup_args = []; -+ setup_update = false -+ };; -+ -+let setup () = BaseSetup.setup setup_t;; -+ -+# 7087 "setup.ml" - (* OASIS_STOP *) - let () = setup ();; -diff -urN omd-1.0.2.orig/src/META omd-1.0.2/src/META ---- omd-1.0.2.orig/src/META 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/src/META 2014-10-16 17:35:14.057877135 +0000 -@@ -0,0 +1,12 @@ -+# OASIS_START -+# DO NOT EDIT (digest: 57908fab5d606629e9b7492bcb72fbeb) -+version = "1.0.2" -+description = "A Markdown frontend in pure OCaml." -+requires = "bigarray" -+archive(byte) = "omd.cma" -+archive(byte, plugin) = "omd.cma" -+archive(native) = "omd.cmxa" -+archive(native, plugin) = "omd.cmxs" -+exists_if = "omd.cma" -+# OASIS_STOP -+ -diff -urN omd-1.0.2.orig/src/omd.mldylib omd-1.0.2/src/omd.mldylib ---- omd-1.0.2.orig/src/omd.mldylib 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/src/omd.mldylib 2014-10-16 17:35:14.057877135 +0000 -@@ -0,0 +1,9 @@ -+# OASIS_START -+# DO NOT EDIT (digest: 80dddf0b053606a303121d581c814f20) -+Omd_utils -+Omd_representation -+Omd_backend -+Omd_lexer -+Omd_parser -+Omd -+# OASIS_STOP -diff -urN omd-1.0.2.orig/src/omd.mllib omd-1.0.2/src/omd.mllib ---- omd-1.0.2.orig/src/omd.mllib 1970-01-01 00:00:00.000000000 +0000 -+++ omd-1.0.2/src/omd.mllib 2014-10-16 17:35:14.057877135 +0000 -@@ -0,0 +1,9 @@ -+# OASIS_START -+# DO NOT EDIT (digest: 80dddf0b053606a303121d581c814f20) -+Omd_utils -+Omd_representation -+Omd_backend -+Omd_lexer -+Omd_parser -+Omd -+# OASIS_STOP -diff -urN omd-1.0.2.orig/_tags omd-1.0.2/_tags ---- omd-1.0.2.orig/_tags 2014-10-06 15:10:21.000000000 +0000 -+++ omd-1.0.2/_tags 2014-10-16 17:35:14.037877273 +0000 -@@ -1,4 +1,35 @@ - # OASIS_START -+# DO NOT EDIT (digest: ba20dcac324520460a05ab94e90df83d) -+# Ignore VCS directories, you can use the same kind of rule outside -+# OASIS_START/STOP if you want to exclude directories that contains -+# useless stuff for the build process -+<**/.svn>: -traverse -+<**/.svn>: not_hygienic -+".bzr": -traverse -+".bzr": not_hygienic -+".hg": -traverse -+".hg": not_hygienic -+".git": -traverse -+".git": not_hygienic -+"_darcs": -traverse -+"_darcs": not_hygienic -+# Library omd -+"src/omd.cmxs": use_omd -+# Executable omd -+: pkg_bigarray -+: use_omd -+: pkg_bigarray -+: use_omd -+# Executable test_cow -+: pkg_bigarray -+: use_omd -+: pkg_bigarray -+: use_omd -+# Executable test_spec -+: pkg_bigarray -+: use_omd -+: pkg_bigarray -+: use_omd - # OASIS_STOP - - true: annot diff --git a/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch b/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch deleted file mode 100644 index 6ff9830e..00000000 --- a/SOURCES/ocaml-opasswd-ocaml-4.00.1.patch +++ /dev/null @@ -1,5373 +0,0 @@ -diff -ur ocaml-opasswd-0.9.3/lib/common.ml ocaml-opasswd-0.9.3.new/lib/common.ml ---- ocaml-opasswd-0.9.3/lib/common.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/lib/common.ml 2014-04-25 20:40:06.899016589 +0000 -@@ -1,3 +1,5 @@ -+let ( |> ) a b = b a -+ - let get_password name = - if Shadow.shadow_enabled () - then Shadow.(with_lock (fun () -> -Only in ocaml-opasswd-0.9.3.new/lib: oPasswd.mldylib -Only in ocaml-opasswd-0.9.3.new/lib: oPasswd.mllib -diff -ur ocaml-opasswd-0.9.3/lib/passwd.ml ocaml-opasswd-0.9.3.new/lib/passwd.ml ---- ocaml-opasswd-0.9.3/lib/passwd.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/lib/passwd.ml 2014-04-25 20:40:27.158005796 +0000 -@@ -1,3 +1,5 @@ -+let ( |> ) a b = b a -+ - open Ctypes - open Foreign - open PosixTypes -Only in ocaml-opasswd-0.9.3.new/lib: passwd.ml.orig -diff -ur ocaml-opasswd-0.9.3/lib/shadow.ml ocaml-opasswd-0.9.3.new/lib/shadow.ml ---- ocaml-opasswd-0.9.3/lib/shadow.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/lib/shadow.ml 2014-04-25 20:40:36.062010242 +0000 -@@ -1,3 +1,5 @@ -+let ( |> ) a b = b a -+ - open Ctypes - open Foreign - open PosixTypes -Only in ocaml-opasswd-0.9.3.new/lib: shadow.ml.orig -diff -ur ocaml-opasswd-0.9.3/myocamlbuild.ml ocaml-opasswd-0.9.3.new/myocamlbuild.ml ---- ocaml-opasswd-0.9.3/myocamlbuild.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/myocamlbuild.ml 2014-04-25 20:41:58.375009980 +0000 -@@ -1,38 +1,49 @@ - (* OASIS_START *) --(* DO NOT EDIT (digest: 1c4b57f82fbc5f8ea8a65966af99a4e9) *) -+(* DO NOT EDIT (digest: 7551fa6f61fa1c966dedee8d779fa527) *) - module OASISGettext = struct --(* # 21 "src/oasis/OASISGettext.ml" *) -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ - - let ns_ str = - str - -+ - let s_ str = - str - -- let f_ (str : ('a, 'b, 'c, 'd) format4) = -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = - str - -+ - let fn_ fmt1 fmt2 n = - if n = 1 then - fmt1^^"" - else - fmt2^^"" - -+ - let init = - [] - -+ - end - - module OASISExpr = struct --(* # 21 "src/oasis/OASISExpr.ml" *) -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ - - - - open OASISGettext - -- type test = string - -- type flag = string -+ type test = string -+ -+ -+ type flag = string -+ - - type t = - | EBool of bool -@@ -41,9 +52,11 @@ - | EOr of t * t - | EFlag of flag - | ETest of test * string -- - -- type 'a choices = (t * 'a) list -+ -+ -+ type 'a choices = (t * 'a) list -+ - - let eval var_get t = - let rec eval' = -@@ -75,6 +88,7 @@ - in - eval' t - -+ - let choose ?printer ?name var_get lst = - let rec choose_aux = - function -@@ -111,22 +125,27 @@ - in - choose_aux (List.rev lst) - -+ - end - - --# 117 "myocamlbuild.ml" -+# 132 "myocamlbuild.ml" - module BaseEnvLight = struct --(* # 21 "src/base/BaseEnvLight.ml" *) -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ - - module MapString = Map.Make(String) - -+ - type t = string MapString.t - -+ - let default_filename = - Filename.concat - (Sys.getcwd ()) - "setup.data" - -+ - let load ?(allow_empty=false) ?(filename=default_filename) () = - if Sys.file_exists filename then - begin -@@ -184,26 +203,29 @@ - filename) - end - -- let var_get name env = -- let rec var_expand str = -- let buff = -- Buffer.create ((String.length str) * 2) -- in -- Buffer.add_substitute -- buff -- (fun var -> -- try -- var_expand (MapString.find var env) -- with Not_found -> -- failwith -- (Printf.sprintf -- "No variable %s defined when trying to expand %S." -- var -- str)) -- str; -- Buffer.contents buff -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) - in -- var_expand (MapString.find name env) -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ - - let var_choose lst env = - OASISExpr.choose -@@ -212,87 +234,153 @@ - end - - --# 215 "myocamlbuild.ml" -+# 237 "myocamlbuild.ml" - module MyOCamlbuildFindlib = struct --(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) - -- (** OCamlbuild extension, copied from -+ -+ (** OCamlbuild extension, copied from - * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild - * by N. Pouillard and others - * - * Updated on 2009/02/28 - * -- * Modified by Sylvain Le Gall -+ * Modified by Sylvain Le Gall - *) - open Ocamlbuild_plugin - -+ - (* these functions are not really officially exported *) -- let run_and_read = -+ let run_and_read = - Ocamlbuild_pack.My_unix.run_and_read - -- let blank_sep_strings = -+ -+ let blank_sep_strings = - Ocamlbuild_pack.Lexers.blank_sep_strings - -- let split s ch = -- let x = -- ref [] -+ -+ let exec_from_conf exec = -+ let exec = -+ let env_filename = Pathname.basename BaseEnvLight.default_filename in -+ let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in -+ try -+ BaseEnvLight.var_get exec env -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s\n" exec; -+ exec - in -- let rec go s = -- let pos = -- String.index s ch -- in -- x := (String.before s pos)::!x; -- go (String.after s (pos + 1)) -+ let fix_win32 str = -+ if Sys.os_type = "Win32" then begin -+ let buff = Buffer.create (String.length str) in -+ (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. -+ *) -+ String.iter -+ (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) -+ str; -+ Buffer.contents buff -+ end else begin -+ str -+ end - in -- try -- go s -- with Not_found -> !x -+ fix_win32 exec -+ -+ let split s ch = -+ let buf = Buffer.create 13 in -+ let x = ref [] in -+ let flush () = -+ x := (Buffer.contents buf) :: !x; -+ Buffer.clear buf -+ in -+ String.iter -+ (fun c -> -+ if c = ch then -+ flush () -+ else -+ Buffer.add_char buf c) -+ s; -+ flush (); -+ List.rev !x -+ - - let split_nl s = split s '\n' - -+ - let before_space s = - try - String.before s (String.index s ' ') - with Not_found -> s - -- (* this lists all supported packages *) -+ (* ocamlfind command *) -+ let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] -+ -+ (* This lists all supported packages. *) - let find_packages () = - List.map before_space (split_nl & run_and_read "ocamlfind list") - -- (* this is supposed to list available syntaxes, but I don't know how to do it. *) -+ -+ (* Mock to list available syntaxes. *) - let find_syntaxes () = ["camlp4o"; "camlp4r"] - -- (* ocamlfind command *) -- let ocamlfind x = S[A"ocamlfind"; x] -+ -+ let well_known_syntax = [ -+ "camlp4.quotations.o"; -+ "camlp4.quotations.r"; -+ "camlp4.exceptiontracer"; -+ "camlp4.extend"; -+ "camlp4.foldgenerator"; -+ "camlp4.listcomprehension"; -+ "camlp4.locationstripper"; -+ "camlp4.macro"; -+ "camlp4.mapgenerator"; -+ "camlp4.metagenerator"; -+ "camlp4.profiler"; -+ "camlp4.tracer" -+ ] -+ - - let dispatch = - function -- | Before_options -> -- (* by using Before_options one let command line options have an higher priority *) -- (* on the contrary using After_options will guarantee to have the higher priority *) -- (* override default commands by ocamlfind ones *) -+ | After_options -> -+ (* By using Before_options one let command line options have an higher -+ * priority on the contrary using After_options will guarantee to have -+ * the higher priority override default commands by ocamlfind ones *) - Options.ocamlc := ocamlfind & A"ocamlc"; - Options.ocamlopt := ocamlfind & A"ocamlopt"; - Options.ocamldep := ocamlfind & A"ocamldep"; - Options.ocamldoc := ocamlfind & A"ocamldoc"; -- Options.ocamlmktop := ocamlfind & A"ocamlmktop" -- -+ Options.ocamlmktop := ocamlfind & A"ocamlmktop"; -+ Options.ocamlmklib := ocamlfind & A"ocamlmklib" -+ - | After_rules -> -- -- (* When one link an OCaml library/binary/package, one should use -linkpkg *) -+ -+ (* When one link an OCaml library/binary/package, one should use -+ * -linkpkg *) - flag ["ocaml"; "link"; "program"] & A"-linkpkg"; -- -+ - (* For each ocamlfind package one inject the -package option when - * compiling, computing dependencies, generating documentation and - * linking. *) -- List.iter -+ List.iter - begin fun pkg -> -- flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg]; -- flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg]; -- flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg]; -- flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; -- flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg]; -- end -+ let base_args = [A"-package"; A pkg] in -+ (* TODO: consider how to really choose camlp4o or camlp4r. *) -+ let syn_args = [A"-syntax"; A "camlp4o"] in -+ let args = -+ (* Heuristic to identify syntax extensions: whether they end in -+ ".syntax"; some might not. -+ *) -+ if Filename.check_suffix pkg "syntax" || -+ List.mem pkg well_known_syntax then -+ syn_args @ base_args -+ else -+ base_args -+ in -+ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; -+ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; -+ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; -+ end - (find_packages ()); - - (* Like -package but for extensions syntax. Morover -syntax is useless -@@ -301,29 +389,34 @@ - flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; - flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; - flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -- flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & -+ S[A"-syntax"; A syntax]; - end (find_syntaxes ()); - - (* The default "thread" tag is not compatible with ocamlfind. - * Indeed, the default rules add the "threads.cma" or "threads.cmxa" - * options when using this tag. When using the "-linkpkg" option with - * ocamlfind, this module will then be added twice on the command line. -- * -+ * - * To solve this, one approach is to add the "-thread" option when using - * the "threads" package using the previous plugin. - *) - flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); - flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); - flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); -- flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]) -+ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); - -- | _ -> -+ | _ -> - () -- - end - - module MyOCamlbuildBase = struct --(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ - - (** Base functions for writing myocamlbuild.ml - @author Sylvain Le Gall -@@ -331,51 +424,61 @@ - - - -+ -+ - open Ocamlbuild_plugin - module OC = Ocamlbuild_pack.Ocaml_compiler - -- type dir = string -- type file = string -- type name = string -- type tag = string - --(* # 56 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ type dir = string -+ type file = string -+ type name = string -+ type tag = string -+ -+ -+(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ - - type t = - { -- lib_ocaml: (name * dir list) list; -- lib_c: (name * dir * file list) list; -+ lib_ocaml: (name * dir list * string list) list; -+ lib_c: (name * dir * file list) list; - flags: (tag list * (spec OASISExpr.choices)) list; - (* Replace the 'dir: include' from _tags by a precise interdepends in - * directory. - *) -- includes: (dir * dir list) list; -- } -+ includes: (dir * dir list) list; -+ } -+ - - let env_filename = -- Pathname.basename -+ Pathname.basename - BaseEnvLight.default_filename - -+ - let dispatch_combine lst = - fun e -> -- List.iter -+ List.iter - (fun dispatch -> dispatch e) -- lst -+ lst -+ - - let tag_libstubs nm = - "use_lib"^nm^"_stubs" - -+ - let nm_libstubs nm = - nm^"_stubs" - -- let dispatch t e = -- let env = -- BaseEnvLight.load -- ~filename:env_filename -+ -+ let dispatch t e = -+ let env = -+ BaseEnvLight.load -+ ~filename:env_filename - ~allow_empty:true - () - in -- match e with -+ match e with - | Before_options -> - let no_trailing_dot s = - if String.length s >= 1 && s.[0] = '.' then -@@ -385,35 +488,44 @@ - in - List.iter - (fun (opt, var) -> -- try -+ try - opt := no_trailing_dot (BaseEnvLight.var_get var env) - with Not_found -> -- Printf.eprintf "W: Cannot get variable %s" var) -+ Printf.eprintf "W: Cannot get variable %s\n" var) - [ - Options.ext_obj, "ext_obj"; - Options.ext_lib, "ext_lib"; - Options.ext_dll, "ext_dll"; - ] - -- | After_rules -> -+ | After_rules -> - (* Declare OCaml libraries *) -- List.iter -+ List.iter - (function -- | nm, [] -> -- ocaml_lib nm -- | nm, dir :: tl -> -+ | nm, [], intf_modules -> -+ ocaml_lib nm; -+ let cmis = -+ List.map (fun m -> (String.uncapitalize m) ^ ".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis -+ | nm, dir :: tl, intf_modules -> - ocaml_lib ~dir:dir (dir^"/"^nm); -- List.iter -- (fun dir -> -+ List.iter -+ (fun dir -> - List.iter - (fun str -> - flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) - ["compile"; "infer_interface"; "doc"]) -- tl) -+ tl; -+ let cmis = -+ List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") -+ intf_modules in -+ dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] -+ cmis) - t.lib_ocaml; - - (* Declare directories dependencies, replace "include" in _tags. *) -- List.iter -+ List.iter - (fun (dir, include_dirs) -> - Pathname.define_context dir include_dirs) - t.includes; -@@ -428,7 +540,7 @@ - - flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] - (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); -- -+ - flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] - (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); - -@@ -443,11 +555,11 @@ - - (* TODO: be more specific about what depends on headers *) - (* Depends on .h files *) -- dep ["compile"; "c"] -+ dep ["compile"; "c"] - headers; - - (* Setup search path for lib *) -- flag ["link"; "ocaml"; "use_"^lib] -+ flag ["link"; "ocaml"; "use_"^lib] - (S[A"-I"; P(dir)]); - ) - t.lib_c; -@@ -455,45 +567,48 @@ - (* Add flags *) - List.iter - (fun (tags, cond_specs) -> -- let spec = -- BaseEnvLight.var_choose cond_specs env -+ let spec = BaseEnvLight.var_choose cond_specs env in -+ let rec eval_specs = -+ function -+ | S lst -> S (List.map eval_specs lst) -+ | A str -> A (BaseEnvLight.var_expand str env) -+ | spec -> spec - in -- flag tags & spec) -+ flag tags & (eval_specs spec)) - t.flags -- | _ -> -+ | _ -> - () - -+ - let dispatch_default t = -- dispatch_combine -+ dispatch_combine - [ - dispatch t; - MyOCamlbuildFindlib.dispatch; - ] - -+ - end - - --# 476 "myocamlbuild.ml" -+# 594 "myocamlbuild.ml" - open Ocamlbuild_plugin;; - let package_default = - { -- MyOCamlbuildBase.lib_ocaml = [("oPasswd", ["lib"])]; -+ MyOCamlbuildBase.lib_ocaml = [("oPasswd", ["lib"], [])]; - lib_c = []; - flags = - [ - (["oasis_library_opasswd_byte"; "ocaml"; "link"; "byte"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -503,16 +618,13 @@ - (["oasis_library_opasswd_native"; "ocaml"; "link"; "native"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -522,16 +634,13 @@ - (["oasis_library_opasswd_byte"; "ocaml"; "ocamldep"; "byte"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -541,16 +650,13 @@ - (["oasis_library_opasswd_native"; "ocaml"; "ocamldep"; "native"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -560,16 +666,13 @@ - (["oasis_library_opasswd_byte"; "ocaml"; "compile"; "byte"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -579,16 +682,13 @@ - (["oasis_library_opasswd_native"; "ocaml"; "compile"; "native"], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -599,16 +699,13 @@ - ], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -623,16 +720,13 @@ - ], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -647,16 +741,13 @@ - ], - [ - (OASISExpr.EBool true, -- S -- [A "-warn-error"; A "+a"; A "-bin-annot"; A "-short-paths" -- ]); -+ S [A "-warn-error"; A "+a"; A "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - S - [ - A "-warn-error"; - A "+a"; - A "-bin-annot"; -- A "-short-paths"; - A "-g"; - A "-runtime-variant"; - A "d"; -@@ -664,12 +755,12 @@ - ]) - ]) - ]; -- includes = [("test", ["lib"])]; -- } -+ includes = [("test", ["lib"])] -+ } - ;; - - let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; - --# 674 "myocamlbuild.ml" -+# 765 "myocamlbuild.ml" - (* OASIS_STOP *) - Ocamlbuild_plugin.dispatch dispatch_default;; -diff -ur ocaml-opasswd-0.9.3/_oasis ocaml-opasswd-0.9.3.new/_oasis ---- ocaml-opasswd-0.9.3/_oasis 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/_oasis 2014-04-25 20:41:45.799012042 +0000 -@@ -18,10 +18,10 @@ - Pack: true - Modules: Passwd, Shadow, Common - BuildDepends: unix, ctypes, ctypes.foreign -- ByteOpt: -warn-error +a -bin-annot -short-paths -+ ByteOpt: -warn-error +a -bin-annot - if flag(extra_debugging) - ByteOpt+: -g -runtime-variant d -verbose -- NativeOpt: -warn-error +a -bin-annot -short-paths -+ NativeOpt: -warn-error +a -bin-annot - if flag(extra_debugging) - NativeOpt+: -g -runtime-variant d -verbose - -@@ -30,7 +30,7 @@ - BuildTools: ocamlbuild - MainIs: opasswd_test.ml - BuildDepends: oPasswd -- NativeOpt: -warn-error +a -bin-annot -short-paths -+ NativeOpt: -warn-error +a -bin-annot - if flag(extra_debugging) - NativeOpt+: -g -runtime-variant d -verbose - CompiledObject: best -Only in ocaml-opasswd-0.9.3.new: setup.bin -Only in ocaml-opasswd-0.9.3.new: setup.data -diff -ur ocaml-opasswd-0.9.3/setup.ml ocaml-opasswd-0.9.3.new/setup.ml ---- ocaml-opasswd-0.9.3/setup.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/setup.ml 2014-04-25 20:41:58.402009979 +0000 -@@ -1,48 +1,58 @@ - (* setup.ml generated for the first time by OASIS v0.3.0 *) - - (* OASIS_START *) --(* DO NOT EDIT (digest: e4385f51bef047875d5db059b6303800) *) -+(* DO NOT EDIT (digest: be7ed81bcd279a8fd27ba01e1807fc49) *) - (* -- Regenerated by OASIS v0.3.0 -+ Regenerated by OASIS v0.4.4 - Visit http://oasis.forge.ocamlcore.org for more information and - documentation about functions used in this file. - *) - module OASISGettext = struct --(* # 21 "src/oasis/OASISGettext.ml" *) -+(* # 22 "src/oasis/OASISGettext.ml" *) -+ - - let ns_ str = - str - -+ - let s_ str = - str - -- let f_ (str : ('a, 'b, 'c, 'd) format4) = -+ -+ let f_ (str: ('a, 'b, 'c, 'd) format4) = - str - -+ - let fn_ fmt1 fmt2 n = - if n = 1 then - fmt1^^"" - else - fmt2^^"" - -+ - let init = - [] - -+ - end - - module OASISContext = struct --(* # 21 "src/oasis/OASISContext.ml" *) -+(* # 22 "src/oasis/OASISContext.ml" *) -+ - - open OASISGettext - -+ - type level = - [ `Debug - | `Info - | `Warning - | `Error] - -+ - type t = - { -+ (* TODO: replace this by a proplist. *) - quiet: bool; - info: bool; - debug: bool; -@@ -51,6 +61,7 @@ - printf: level -> string -> unit; - } - -+ - let printf lvl str = - let beg = - match lvl with -@@ -61,6 +72,7 @@ - in - prerr_endline (beg^str) - -+ - let default = - ref - { -@@ -72,37 +84,50 @@ - printf = printf; - } - -+ - let quiet = - {!default with quiet = true} - - -- let args () = -+ let fspecs () = -+ (* TODO: don't act on default. *) -+ let ignore_plugins = ref false in - ["-quiet", - Arg.Unit (fun () -> default := {!default with quiet = true}), -- (s_ " Run quietly"); -+ s_ " Run quietly"; - - "-info", - Arg.Unit (fun () -> default := {!default with info = true}), -- (s_ " Display information message"); -+ s_ " Display information message"; - - - "-debug", - Arg.Unit (fun () -> default := {!default with debug = true}), -- (s_ " Output debug message")] -+ s_ " Output debug message"; -+ -+ "-ignore-plugins", -+ Arg.Set ignore_plugins, -+ s_ " Ignore plugin's field."; -+ -+ "-C", -+ (* TODO: remove this chdir. *) -+ Arg.String (fun str -> Sys.chdir str), -+ s_ "dir Change directory before running."], -+ fun () -> {!default with ignore_plugins = !ignore_plugins} - end - - module OASISString = struct --(* # 1 "src/oasis/OASISString.ml" *) -- -+(* # 22 "src/oasis/OASISString.ml" *) - - - (** Various string utilities. -- -+ - Mostly inspired by extlib and batteries ExtString and BatString libraries. - - @author Sylvain Le Gall - *) - -+ - let nsplitf str f = - if str = "" then - [] -@@ -123,16 +148,18 @@ - push (); - List.rev !lst - -+ - (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the - separator. - *) - let nsplit str c = - nsplitf str ((=) c) - -+ - let find ~what ?(offset=0) str = - let what_idx = ref 0 in -- let str_idx = ref offset in -- while !str_idx < String.length str && -+ let str_idx = ref offset in -+ while !str_idx < String.length str && - !what_idx < String.length what do - if str.[!str_idx] = what.[!what_idx] then - incr what_idx -@@ -142,16 +169,18 @@ - done; - if !what_idx <> String.length what then - raise Not_found -- else -+ else - !str_idx - !what_idx - -- let sub_start str len = -+ -+ let sub_start str len = - let str_len = String.length str in - if len >= str_len then - "" - else - String.sub str len (str_len - len) - -+ - let sub_end ?(offset=0) str len = - let str_len = String.length str in - if len >= str_len then -@@ -159,12 +188,13 @@ - else - String.sub str 0 (str_len - len) - -+ - let starts_with ~what ?(offset=0) str = - let what_idx = ref 0 in - let str_idx = ref offset in - let ok = ref true in - while !ok && -- !str_idx < String.length str && -+ !str_idx < String.length str && - !what_idx < String.length what do - if str.[!str_idx] = what.[!what_idx] then - incr what_idx -@@ -174,21 +204,23 @@ - done; - if !what_idx = String.length what then - true -- else -+ else - false - -+ - let strip_starts_with ~what str = - if starts_with ~what str then - sub_start str (String.length what) - else - raise Not_found - -+ - let ends_with ~what ?(offset=0) str = - let what_idx = ref ((String.length what) - 1) in - let str_idx = ref ((String.length str) - 1) in - let ok = ref true in - while !ok && -- offset <= !str_idx && -+ offset <= !str_idx && - 0 <= !what_idx do - if str.[!str_idx] = what.[!what_idx] then - decr what_idx -@@ -198,15 +230,17 @@ - done; - if !what_idx = -1 then - true -- else -+ else - false - -+ - let strip_ends_with ~what str = - if ends_with ~what str then - sub_end str (String.length what) - else - raise Not_found - -+ - let replace_chars f s = - let buf = String.make (String.length s) 'X' in - for i = 0 to String.length s - 1 do -@@ -214,37 +248,78 @@ - done; - buf - -+ - end - - module OASISUtils = struct --(* # 21 "src/oasis/OASISUtils.ml" *) -+(* # 22 "src/oasis/OASISUtils.ml" *) -+ - - open OASISGettext - -- module MapString = Map.Make(String) - -- let map_string_of_assoc assoc = -- List.fold_left -- (fun acc (k, v) -> MapString.add k v acc) -- MapString.empty -- assoc -+ module MapExt = -+ struct -+ module type S = -+ sig -+ include Map.S -+ val add_list: 'a t -> (key * 'a) list -> 'a t -+ val of_list: (key * 'a) list -> 'a t -+ val to_list: 'a t -> (key * 'a) list -+ end -+ -+ module Make (Ord: Map.OrderedType) = -+ struct -+ include Map.Make(Ord) - -- module SetString = Set.Make(String) -+ let rec add_list t = -+ function -+ | (k, v) :: tl -> add_list (add k v t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list t = fold (fun k v acc -> (k, v) :: acc) t [] -+ end -+ end -+ -+ -+ module MapString = MapExt.Make(String) -+ -+ -+ module SetExt = -+ struct -+ module type S = -+ sig -+ include Set.S -+ val add_list: t -> elt list -> t -+ val of_list: elt list -> t -+ val to_list: t -> elt list -+ end -+ -+ module Make (Ord: Set.OrderedType) = -+ struct -+ include Set.Make(Ord) -+ -+ let rec add_list t = -+ function -+ | e :: tl -> add_list (add e t) tl -+ | [] -> t -+ -+ let of_list lst = add_list empty lst -+ -+ let to_list = elements -+ end -+ end - -- let set_string_add_list st lst = -- List.fold_left -- (fun acc e -> SetString.add e acc) -- st -- lst - -- let set_string_of_list = -- set_string_add_list -- SetString.empty -+ module SetString = SetExt.Make(String) - - - let compare_csl s1 s2 = - String.compare (String.lowercase s1) (String.lowercase s2) - -+ - module HashStringCsl = - Hashtbl.Make - (struct -@@ -257,6 +332,14 @@ - Hashtbl.hash (String.lowercase s) - end) - -+ module SetStringCsl = -+ SetExt.Make -+ (struct -+ type t = string -+ let compare = compare_csl -+ end) -+ -+ - let varname_of_string ?(hyphen='_') s = - if String.length s = 0 then - begin -@@ -287,6 +370,7 @@ - String.lowercase buf - end - -+ - let varname_concat ?(hyphen='_') p s = - let what = String.make 1 hyphen in - let p = -@@ -307,42 +391,49 @@ - let is_varname str = - str = varname_of_string str - -+ - let failwithf fmt = Printf.ksprintf failwith fmt - -+ - end - - module PropList = struct --(* # 21 "src/oasis/PropList.ml" *) -+(* # 22 "src/oasis/PropList.ml" *) -+ - - open OASISGettext - -+ - type name = string - -+ - exception Not_set of name * string option - exception No_printer of name - exception Unknown_field of name * name - -+ - let () = - Printexc.register_printer - (function - | Not_set (nm, Some rsn) -> -- Some -+ Some - (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) - | Not_set (nm, None) -> -- Some -+ Some - (Printf.sprintf (f_ "Field '%s' is not set") nm) - | No_printer nm -> - Some - (Printf.sprintf (f_ "No default printer for value %s") nm) - | Unknown_field (nm, schm) -> -- Some -- (Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm) -+ Some -+ (Printf.sprintf -+ (f_ "Field %s is not defined in schema %s") nm schm) - | _ -> - None) - -+ - module Data = - struct -- - type t = - (name, unit -> unit) Hashtbl.t - -@@ -352,12 +443,13 @@ - let clear t = - Hashtbl.clear t - --(* # 71 "src/oasis/PropList.ml" *) -+ -+(* # 78 "src/oasis/PropList.ml" *) - end - -+ - module Schema = - struct -- - type ('ctxt, 'extra) value = - { - get: Data.t -> string; -@@ -445,9 +537,9 @@ - t.name - end - -+ - module Field = - struct -- - type ('ctxt, 'value, 'extra) t = - { - set: Data.t -> ?context:'ctxt -> 'value -> unit; -@@ -577,28 +669,27 @@ - - let fgets data t = - t.gets data -- - end - -+ - module FieldRO = - struct -- - let create ?schema ?name ?parse ?print ?default ?update ?help extra = - let fld = - Field.create ?schema ?name ?parse ?print ?default ?update ?help extra - in - fun data -> Field.fget data fld -- - end - end - - module OASISMessage = struct --(* # 21 "src/oasis/OASISMessage.ml" *) -+(* # 22 "src/oasis/OASISMessage.ml" *) - - - open OASISGettext - open OASISContext - -+ - let generic_message ~ctxt lvl fmt = - let cond = - if ctxt.quiet then -@@ -617,30 +708,39 @@ - end) - fmt - -+ - let debug ~ctxt fmt = - generic_message ~ctxt `Debug fmt - -+ - let info ~ctxt fmt = - generic_message ~ctxt `Info fmt - -+ - let warning ~ctxt fmt = - generic_message ~ctxt `Warning fmt - -+ - let error ~ctxt fmt = - generic_message ~ctxt `Error fmt - - end - - module OASISVersion = struct --(* # 21 "src/oasis/OASISVersion.ml" *) -+(* # 22 "src/oasis/OASISVersion.ml" *) -+ - - open OASISGettext - - - -+ -+ - type s = string - -- type t = string -+ -+ type t = string -+ - - type comparator = - | VGreater of t -@@ -650,20 +750,24 @@ - | VLesserEqual of t - | VOr of comparator * comparator - | VAnd of comparator * comparator -- -+ -+ - - (* Range of allowed characters *) - let is_digit c = - '0' <= c && c <= '9' - -+ - let is_alpha c = - ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') - -+ - let is_special = - function - | '.' | '+' | '-' | '~' -> true - | _ -> false - -+ - let rec version_compare v1 v2 = - if v1 <> "" || v2 <> "" then - begin -@@ -707,11 +811,11 @@ - while !p < String.length v && is_digit v.[!p] do - incr p - done; -- let substr = -+ let substr = - String.sub v !p ((String.length v) - !p) -- in -- let res = -- match String.sub v start_p (!p - start_p) with -+ in -+ let res = -+ match String.sub v start_p (!p - start_p) with - | "" -> 0 - | s -> int_of_string s - in -@@ -747,8 +851,14 @@ - - let version_of_string str = str - -+ - let string_of_version t = t - -+ -+ let version_compare_string s1 s2 = -+ version_compare (version_of_string s1) (version_of_string s2) -+ -+ - let chop t = - try - let pos = -@@ -758,6 +868,7 @@ - with Not_found -> - t - -+ - let rec comparator_apply v op = - match op with - | VGreater cv -> -@@ -775,6 +886,7 @@ - | VAnd (op1, op2) -> - (comparator_apply v op1) && (comparator_apply v op2) - -+ - let rec string_of_comparator = - function - | VGreater v -> "> "^(string_of_version v) -@@ -787,6 +899,7 @@ - | VAnd (c1, c2) -> - (string_of_comparator c1)^" && "^(string_of_comparator c2) - -+ - let rec varname_of_comparator = - let concat p v = - OASISUtils.varname_concat -@@ -805,13 +918,24 @@ - | VAnd (c1, c2) -> - (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) - -- let version_0_3_or_after t = -- comparator_apply t (VGreaterEqual (string_of_version "0.3")) -+ -+ let rec comparator_ge v' = -+ let cmp v = version_compare v v' >= 0 in -+ function -+ | VEqual v -+ | VGreaterEqual v -+ | VGreater v -> cmp v -+ | VLesserEqual _ -+ | VLesser _ -> false -+ | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2 -+ | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2 -+ - - end - - module OASISLicense = struct --(* # 21 "src/oasis/OASISLicense.ml" *) -+(* # 22 "src/oasis/OASISLicense.ml" *) -+ - - (** License for _oasis fields - @author Sylvain Le Gall -@@ -819,15 +943,20 @@ - - - -- type license = string - -- type license_exception = string -+ -+ type license = string -+ -+ -+ type license_exception = string -+ - - type license_version = - | Version of OASISVersion.t - | VersionOrLater of OASISVersion.t - | NoVersion -- -+ -+ - - type license_dep_5_unit = - { -@@ -835,31 +964,38 @@ - excption: license_exception option; - version: license_version; - } -- -+ -+ - - type license_dep_5 = - | DEP5Unit of license_dep_5_unit - | DEP5Or of license_dep_5 list - | DEP5And of license_dep_5 list -- -+ - - type t = - | DEP5License of license_dep_5 - | OtherLicense of string (* URL *) -- -+ -+ - - end - - module OASISExpr = struct --(* # 21 "src/oasis/OASISExpr.ml" *) -+(* # 22 "src/oasis/OASISExpr.ml" *) -+ -+ - - - - open OASISGettext - -- type test = string - -- type flag = string -+ type test = string -+ -+ -+ type flag = string -+ - - type t = - | EBool of bool -@@ -868,9 +1004,11 @@ - | EOr of t * t - | EFlag of flag - | ETest of test * string -- - -- type 'a choices = (t * 'a) list -+ -+ -+ type 'a choices = (t * 'a) list -+ - - let eval var_get t = - let rec eval' = -@@ -902,6 +1040,7 @@ - in - eval' t - -+ - let choose ?printer ?name var_get lst = - let rec choose_aux = - function -@@ -938,44 +1077,66 @@ - in - choose_aux (List.rev lst) - -+ -+end -+ -+module OASISText = struct -+(* # 22 "src/oasis/OASISText.ml" *) -+ -+ -+ -+ type elt = -+ | Para of string -+ | Verbatim of string -+ | BlankLine -+ -+ -+ type t = elt list -+ - end - - module OASISTypes = struct --(* # 21 "src/oasis/OASISTypes.ml" *) -+(* # 22 "src/oasis/OASISTypes.ml" *) -+ -+ - - - -+ type name = string -+ type package_name = string -+ type url = string -+ type unix_dirname = string -+ type unix_filename = string -+ type host_dirname = string -+ type host_filename = string -+ type prog = string -+ type arg = string -+ type args = string list -+ type command_line = (prog * arg list) -+ - -- type name = string -- type package_name = string -- type url = string -- type unix_dirname = string -- type unix_filename = string -- type host_dirname = string -- type host_filename = string -- type prog = string -- type arg = string -- type args = string list -- type command_line = (prog * arg list) -+ type findlib_name = string -+ type findlib_full = string - -- type findlib_name = string -- type findlib_full = string - - type compiled_object = - | Byte - | Native - | Best -- -+ -+ - - type dependency = - | FindlibPackage of findlib_full * OASISVersion.comparator option - | InternalLibrary of name -- -+ -+ - - type tool = - | ExternalTool of name - | InternalExecutable of name -- -+ -+ - - type vcs = - | Darcs -@@ -987,7 +1148,8 @@ - | Arch - | Monotone - | OtherVCS of url -- -+ -+ - - type plugin_kind = - [ `Configure -@@ -998,6 +1160,7 @@ - | `Extra - ] - -+ - type plugin_data_purpose = - [ `Configure - | `Build -@@ -1012,22 +1175,29 @@ - | `Other of string - ] - -- type 'a plugin = 'a * name * OASISVersion.t option -+ -+ type 'a plugin = 'a * name * OASISVersion.t option -+ - - type all_plugin = plugin_kind plugin - -+ - type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list - --(* # 102 "src/oasis/OASISTypes.ml" *) - -- type 'a conditional = 'a OASISExpr.choices -+(* # 115 "src/oasis/OASISTypes.ml" *) -+ -+ -+ type 'a conditional = 'a OASISExpr.choices -+ - - type custom = - { - pre_command: (command_line option) conditional; - post_command: (command_line option) conditional; - } -- -+ -+ - - type common_section = - { -@@ -1035,7 +1205,8 @@ - cs_data: PropList.Data.t; - cs_plugin_data: plugin_data; - } -- -+ -+ - - type build_section = - { -@@ -1054,7 +1225,8 @@ - bs_byteopt: args conditional; - bs_nativeopt: args conditional; - } -- -+ -+ - - type library = - { -@@ -1064,19 +1236,29 @@ - lib_findlib_parent: findlib_name option; - lib_findlib_name: findlib_name option; - lib_findlib_containers: findlib_name list; -- } -+ } -+ -+ -+ type object_ = -+ { -+ obj_modules: string list; -+ obj_findlib_fullname: findlib_name list option; -+ } -+ - - type executable = - { - exec_custom: bool; - exec_main_is: unix_filename; -- } -+ } -+ - - type flag = - { - flag_description: string option; - flag_default: bool conditional; -- } -+ } -+ - - type source_repository = - { -@@ -1087,7 +1269,8 @@ - src_repo_branch: string option; - src_repo_tag: string option; - src_repo_subdir: unix_filename option; -- } -+ } -+ - - type test = - { -@@ -1097,7 +1280,8 @@ - test_working_directory: unix_filename option; - test_run: bool conditional; - test_tools: tool list; -- } -+ } -+ - - type doc_format = - | HTML of unix_filename -@@ -1107,7 +1291,8 @@ - | Info of unix_filename - | DVI - | OtherDoc -- -+ -+ - - type doc = - { -@@ -1122,75 +1307,452 @@ - doc_format: doc_format; - doc_data_files: (unix_filename * unix_filename option) list; - doc_build_tools: tool list; -- } -+ } -+ - - type section = - | Library of common_section * build_section * library -+ | Object of common_section * build_section * object_ - | Executable of common_section * build_section * executable - | Flag of common_section * flag - | SrcRepo of common_section * source_repository - | Test of common_section * test - | Doc of common_section * doc -- - -- type section_kind = -- [ `Library | `Executable | `Flag | `SrcRepo | `Test | `Doc ] - -- type package = -- { -- oasis_version: OASISVersion.t; -- ocaml_version: OASISVersion.comparator option; -- findlib_version: OASISVersion.comparator option; -- name: package_name; -- version: OASISVersion.t; -- license: OASISLicense.t; -- license_file: unix_filename option; -- copyrights: string list; -- maintainers: string list; -- authors: string list; -- homepage: url option; -- synopsis: string; -- description: string option; -- categories: url list; -- -- conf_type: [`Configure] plugin; -- conf_custom: custom; -- -- build_type: [`Build] plugin; -- build_custom: custom; -- -- install_type: [`Install] plugin; -- install_custom: custom; -- uninstall_custom: custom; -- -- clean_custom: custom; -- distclean_custom: custom; -- -- files_ab: unix_filename list; -- sections: section list; -- plugins: [`Extra] plugin list; -- schema_data: PropList.Data.t; -- plugin_data: plugin_data; -- } - -+ type section_kind = -+ [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ] -+ -+ -+ type package = -+ { -+ oasis_version: OASISVersion.t; -+ ocaml_version: OASISVersion.comparator option; -+ findlib_version: OASISVersion.comparator option; -+ alpha_features: string list; -+ beta_features: string list; -+ name: package_name; -+ version: OASISVersion.t; -+ license: OASISLicense.t; -+ license_file: unix_filename option; -+ copyrights: string list; -+ maintainers: string list; -+ authors: string list; -+ homepage: url option; -+ synopsis: string; -+ description: OASISText.t option; -+ categories: url list; -+ -+ conf_type: [`Configure] plugin; -+ conf_custom: custom; -+ -+ build_type: [`Build] plugin; -+ build_custom: custom; -+ -+ install_type: [`Install] plugin; -+ install_custom: custom; -+ uninstall_custom: custom; -+ -+ clean_custom: custom; -+ distclean_custom: custom; -+ -+ files_ab: unix_filename list; -+ sections: section list; -+ plugins: [`Extra] plugin list; -+ disable_oasis_section: unix_filename list; -+ schema_data: PropList.Data.t; -+ plugin_data: plugin_data; -+ } -+ -+ -+end -+ -+module OASISFeatures = struct -+(* # 22 "src/oasis/OASISFeatures.ml" *) -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISVersion -+ -+ module MapPlugin = -+ Map.Make -+ (struct -+ type t = plugin_kind * name -+ let compare = Pervasives.compare -+ end) -+ -+ module Data = -+ struct -+ type t = -+ { -+ oasis_version: OASISVersion.t; -+ plugin_versions: OASISVersion.t option MapPlugin.t; -+ alpha_features: string list; -+ beta_features: string list; -+ } -+ -+ let create oasis_version alpha_features beta_features = -+ { -+ oasis_version = oasis_version; -+ plugin_versions = MapPlugin.empty; -+ alpha_features = alpha_features; -+ beta_features = beta_features -+ } -+ -+ let of_package pkg = -+ create -+ pkg.OASISTypes.oasis_version -+ pkg.OASISTypes.alpha_features -+ pkg.OASISTypes.beta_features -+ -+ let add_plugin (plugin_kind, plugin_name, plugin_version) t = -+ {t with -+ plugin_versions = MapPlugin.add -+ (plugin_kind, plugin_name) -+ plugin_version -+ t.plugin_versions} -+ -+ let plugin_version plugin_kind plugin_name t = -+ MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions -+ -+ let to_string t = -+ Printf.sprintf -+ "oasis_version: %s; alpha_features: %s; beta_features: %s; \ -+ plugins_version: %s" -+ (OASISVersion.string_of_version t.oasis_version) -+ (String.concat ", " t.alpha_features) -+ (String.concat ", " t.beta_features) -+ (String.concat ", " -+ (MapPlugin.fold -+ (fun (_, plg) ver_opt acc -> -+ (plg^ -+ (match ver_opt with -+ | Some v -> -+ " "^(OASISVersion.string_of_version v) -+ | None -> "")) -+ :: acc) -+ t.plugin_versions [])) -+ end -+ -+ type origin = -+ | Field of string * string -+ | Section of string -+ | NoOrigin -+ -+ type stage = Alpha | Beta -+ -+ -+ let string_of_stage = -+ function -+ | Alpha -> "alpha" -+ | Beta -> "beta" -+ -+ -+ let field_of_stage = -+ function -+ | Alpha -> "AlphaFeatures" -+ | Beta -> "BetaFeatures" -+ -+ type publication = InDev of stage | SinceVersion of OASISVersion.t -+ -+ type t = -+ { -+ name: string; -+ plugin: all_plugin option; -+ publication: publication; -+ description: unit -> string; -+ } -+ -+ (* TODO: mutex protect this. *) -+ let all_features = Hashtbl.create 13 -+ -+ -+ let since_version ver_str = SinceVersion (version_of_string ver_str) -+ let alpha = InDev Alpha -+ let beta = InDev Beta -+ -+ -+ let to_string t = -+ Printf.sprintf -+ "feature: %s; plugin: %s; publication: %s" -+ t.name -+ (match t.plugin with -+ | None -> "" -+ | Some (_, nm, _) -> nm) -+ (match t.publication with -+ | InDev stage -> string_of_stage stage -+ | SinceVersion ver -> ">= "^(OASISVersion.string_of_version ver)) -+ -+ let data_check t data origin = -+ let no_message = "no message" in -+ -+ let check_feature features stage = -+ let has_feature = List.mem t.name features in -+ if not has_feature then -+ match origin with -+ | Field (fld, where) -> -+ Some -+ (Printf.sprintf -+ (f_ "Field %s in %s is only available when feature %s \ -+ is in field %s.") -+ fld where t.name (field_of_stage stage)) -+ | Section sct -> -+ Some -+ (Printf.sprintf -+ (f_ "Section %s is only available when features %s \ -+ is in field %s.") -+ sct t.name (field_of_stage stage)) -+ | NoOrigin -> -+ Some no_message -+ else -+ None -+ in -+ -+ let version_is_good ~min_version version fmt = -+ let version_is_good = -+ OASISVersion.comparator_apply -+ version (OASISVersion.VGreaterEqual min_version) -+ in -+ Printf.ksprintf -+ (fun str -> -+ if version_is_good then -+ None -+ else -+ Some str) -+ fmt -+ in -+ -+ match origin, t.plugin, t.publication with -+ | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha -+ | _, _, InDev Beta -> check_feature data.Data.beta_features Beta -+ | Field(fld, where), None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Field %s in %s is only valid since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking \ -+ OASIS changelog.") -+ fld where (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Field(fld, where), Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Field %s in %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Field %s in %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ fld where plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Field %s in %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ fld where plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | Section sct, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version -+ (f_ "Section %s is only valid for since OASIS v%s, update \ -+ OASISFormat field from '%s' to '%s' after checking OASIS \ -+ changelog.") -+ sct (string_of_version min_version) -+ (string_of_version data.Data.oasis_version) -+ (string_of_version min_version) -+ -+ | Section sct, Some(plugin_knd, plugin_name, _), -+ SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ try -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> -+ failwithf -+ (f_ "Section %s is only valid for the OASIS \ -+ plugin %s since v%s, but no plugin version is \ -+ defined in the _oasis file, change '%s' to \ -+ '%s (%s)' in your _oasis file.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name -+ plugin_name (string_of_version min_version) -+ with Not_found -> -+ failwithf -+ (f_ "Section %s is only valid when the OASIS plugin %s \ -+ is defined.") -+ sct plugin_name -+ in -+ version_is_good ~min_version plugin_version_current -+ (f_ "Section %s is only valid for the OASIS plugin %s \ -+ since v%s, update your plugin from '%s (%s)' to \ -+ '%s (%s)' after checking the plugin's changelog.") -+ sct plugin_name (string_of_version min_version) -+ plugin_name (string_of_version plugin_version_current) -+ plugin_name (string_of_version min_version) -+ with Failure msg -> -+ Some msg -+ end -+ -+ | NoOrigin, None, SinceVersion min_version -> -+ version_is_good ~min_version data.Data.oasis_version "%s" no_message -+ -+ | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version -> -+ begin -+ try -+ let plugin_version_current = -+ match Data.plugin_version plugin_knd plugin_name data with -+ | Some ver -> ver -+ | None -> raise Not_found -+ in -+ version_is_good ~min_version plugin_version_current -+ "%s" no_message -+ with Not_found -> -+ Some no_message -+ end -+ -+ -+ let data_assert t data origin = -+ match data_check t data origin with -+ | None -> () -+ | Some str -> failwith str -+ -+ -+ let data_test t data = -+ match data_check t data NoOrigin with -+ | None -> true -+ | Some str -> false -+ -+ -+ let package_test t pkg = -+ data_test t (Data.of_package pkg) -+ -+ -+ let create ?plugin name publication description = -+ let () = -+ if Hashtbl.mem all_features name then -+ failwithf "Feature '%s' is already declared." name -+ in -+ let t = -+ { -+ name = name; -+ plugin = plugin; -+ publication = publication; -+ description = description; -+ } -+ in -+ Hashtbl.add all_features name t; -+ t -+ -+ -+ let get_stage name = -+ try -+ (Hashtbl.find all_features name).publication -+ with Not_found -> -+ failwithf (f_ "Feature %s doesn't exist.") name -+ -+ -+ let list () = -+ Hashtbl.fold (fun _ v acc -> v :: acc) all_features [] -+ -+ (* -+ * Real flags. -+ *) -+ -+ -+ let features = -+ create "features_fields" -+ (since_version "0.4") -+ (fun () -> -+ s_ "Enable to experiment not yet official features.") -+ -+ -+ let flag_docs = -+ create "flag_docs" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Building docs require '-docs' flag at configure.") -+ -+ -+ let flag_tests = -+ create "flag_tests" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Running tests require '-tests' flag at configure.") -+ -+ -+ let pack = -+ create "pack" -+ (since_version "0.3") -+ (fun () -> -+ s_ "Allow to create packed library.") -+ -+ -+ let section_object = -+ create "section_object" beta -+ (fun () -> -+ s_ "Implement an object section.") -+ -+ -+ let dynrun_for_release = -+ create "dynrun_for_release" alpha -+ (fun () -> -+ s_ "Make '-setup-update dynamic' suitable for releasing project.") -+ -+ -+ let compiled_setup_ml = -+ create "compiled_setup_ml" alpha -+ (fun () -> -+ s_ "It compiles the setup.ml and speed-up actions done with it.") -+ -+ let disable_oasis_section = -+ create "disable_oasis_section" alpha -+ (fun () -> -+ s_ "Allows the OASIS section comments and digest to be omitted in \ -+ generated files.") - end - - module OASISUnixPath = struct --(* # 21 "src/oasis/OASISUnixPath.ml" *) -+(* # 22 "src/oasis/OASISUnixPath.ml" *) -+ - - type unix_filename = string - type unix_dirname = string - -+ - type host_filename = string - type host_dirname = string - -+ - let current_dir_name = "." - -+ - let parent_dir_name = ".." - -+ - let is_current_dir fn = - fn = current_dir_name || fn = "" - -+ - let concat f1 f2 = - if is_current_dir f1 then - f2 -@@ -1200,6 +1762,7 @@ - in - f1'^"/"^f2 - -+ - let make = - function - | hd :: tl -> -@@ -1210,12 +1773,14 @@ - | [] -> - invalid_arg "OASISUnixPath.make" - -+ - let dirname f = - try - String.sub f 0 (String.rindex f '/') - with Not_found -> - current_dir_name - -+ - let basename f = - try - let pos_start = -@@ -1225,6 +1790,7 @@ - with Not_found -> - f - -+ - let chop_extension f = - try - let last_dot = -@@ -1247,26 +1813,31 @@ - with Not_found -> - f - -+ - let capitalize_file f = - let dir = dirname f in - let base = basename f in - concat dir (String.capitalize base) - -+ - let uncapitalize_file f = - let dir = dirname f in - let base = basename f in - concat dir (String.uncapitalize base) - -+ - end - - module OASISHostPath = struct --(* # 21 "src/oasis/OASISHostPath.ml" *) -+(* # 22 "src/oasis/OASISHostPath.ml" *) - - - open Filename - -+ - module Unix = OASISUnixPath - -+ - let make = - function - | [] -> -@@ -1274,6 +1845,7 @@ - | hd :: tl -> - List.fold_left Filename.concat hd tl - -+ - let of_unix ufn = - if Sys.os_type = "Unix" then - ufn -@@ -1293,14 +1865,18 @@ - end - - module OASISSection = struct --(* # 21 "src/oasis/OASISSection.ml" *) -+(* # 22 "src/oasis/OASISSection.ml" *) -+ - - open OASISTypes - -- let section_kind_common = -+ -+ let section_kind_common = - function -- | Library (cs, _, _) -> -+ | Library (cs, _, _) -> - `Library, cs -+ | Object (cs, _, _) -> -+ `Object, cs - | Executable (cs, _, _) -> - `Executable, cs - | Flag (cs, _) -> -@@ -1312,32 +1888,38 @@ - | Doc (cs, _) -> - `Doc, cs - -+ - let section_common sct = - snd (section_kind_common sct) - -+ - let section_common_set cs = - function - | Library (_, bs, lib) -> Library (cs, bs, lib) -+ | Object (_, bs, obj) -> Object (cs, bs, obj) - | Executable (_, bs, exec) -> Executable (cs, bs, exec) - | Flag (_, flg) -> Flag (cs, flg) - | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) - | Test (_, tst) -> Test (cs, tst) - | Doc (_, doc) -> Doc (cs, doc) - -+ - (** Key used to identify section - *) -- let section_id sct = -- let k, cs = -+ let section_id sct = -+ let k, cs = - section_kind_common sct - in - k, cs.cs_name - -+ - let string_of_section sct = - let k, nm = - section_id sct - in - (match k with -- | `Library -> "library" -+ | `Library -> "library" -+ | `Object -> "object" - | `Executable -> "executable" - | `Flag -> "flag" - | `SrcRepo -> "src repository" -@@ -1345,20 +1927,22 @@ - | `Doc -> "doc") - ^" "^nm - -+ - let section_find id scts = - List.find - (fun sct -> id = section_id sct) - scts - -+ - module CSection = - struct - type t = section - - let id = section_id - -- let compare t1 t2 = -+ let compare t1 t2 = - compare (id t1) (id t2) -- -+ - let equal t1 t2 = - (id t1) = (id t2) - -@@ -1366,28 +1950,33 @@ - Hashtbl.hash (id t) - end - -+ - module MapSection = Map.Make(CSection) - module SetSection = Set.Make(CSection) - -+ - end - - module OASISBuildSection = struct --(* # 21 "src/oasis/OASISBuildSection.ml" *) -+(* # 22 "src/oasis/OASISBuildSection.ml" *) -+ - - end - - module OASISExecutable = struct --(* # 21 "src/oasis/OASISExecutable.ml" *) -+(* # 22 "src/oasis/OASISExecutable.ml" *) -+ - - open OASISTypes - -- let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = -- let dir = -+ -+ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = -+ let dir = - OASISUnixPath.concat - bs.bs_path - (OASISUnixPath.dirname exec.exec_main_is) - in -- let is_native_exec = -+ let is_native_exec = - match bs.bs_compiled_object with - | Native -> true - | Best -> is_native () -@@ -1398,40 +1987,28 @@ - dir - (cs.cs_name^(suffix_program ())), - -- if not is_native_exec && -- not exec.exec_custom && -+ if not is_native_exec && -+ not exec.exec_custom && - bs.bs_c_sources <> [] then - Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) - else - None - -+ - end - - module OASISLibrary = struct --(* # 21 "src/oasis/OASISLibrary.ml" *) -+(* # 22 "src/oasis/OASISLibrary.ml" *) -+ - - open OASISTypes - open OASISUtils - open OASISGettext - open OASISSection - -- type library_name = name -- type findlib_part_name = name -- type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t -- -- exception InternalLibraryNotFound of library_name -- exception FindlibPackageNotFound of findlib_name -- -- type group_t = -- | Container of findlib_name * group_t list -- | Package of (findlib_name * -- common_section * -- build_section * -- library * -- group_t list) - - (* Look for a module file, considering capitalization or not. *) -- let find_module source_file_exists (cs, bs, lib) modul = -+ let find_module source_file_exists bs modul = - let possible_base_fn = - List.map - (OASISUnixPath.concat bs.bs_path) -@@ -1469,10 +2046,11 @@ - (`No_sources possible_base_fn) - possible_base_fn - -+ - let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = - List.fold_left - (fun acc modul -> -- match find_module source_file_exists (cs, bs, lib) modul with -+ match find_module source_file_exists bs modul with - | `Sources (base_fn, lst) -> - (base_fn, lst) :: acc - | `No_sources _ -> -@@ -1485,6 +2063,7 @@ - [] - (lib.lib_modules @ lib.lib_internal_modules) - -+ - let generated_unix_files - ~ctxt - ~is_native -@@ -1494,24 +2073,29 @@ - ~source_file_exists - (cs, bs, lib) = - -- let find_modules lst ext = -+ let find_modules lst ext = - let find_module modul = -- match find_module source_file_exists (cs, bs, lib) modul with -+ match find_module source_file_exists bs modul with -+ | `Sources (base_fn, [fn]) when ext <> "cmi" -+ && Filename.check_suffix fn ".mli" -> -+ None (* No implementation files for pure interface. *) - | `Sources (base_fn, _) -> -- [base_fn] -+ Some [base_fn] - | `No_sources lst -> - OASISMessage.warning - ~ctxt - (f_ "Cannot find source file matching \ - module '%s' in library %s") - modul cs.cs_name; -- lst -+ Some lst - in -- List.map -- (fun nm -> -- List.map -- (fun base_fn -> base_fn ^"."^ext) -- (find_module nm)) -+ List.fold_left -+ (fun acc nm -> -+ match find_module nm with -+ | None -> acc -+ | Some base_fns -> -+ List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc) -+ [] - lst - in - -@@ -1528,16 +2112,20 @@ - (* The .cmx that be compiled along *) - let cmxs = - let should_be_built = -- (not lib.lib_pack) && (* Do not install .cmx packed submodules *) - match bs.bs_compiled_object with - | Native -> true - | Best -> is_native - | Byte -> false - in - if should_be_built then -- find_modules -- (lib.lib_modules @ lib.lib_internal_modules) -- "cmx" -+ if lib.lib_pack then -+ find_modules -+ [cs.cs_name] -+ "cmx" -+ else -+ find_modules -+ (lib.lib_modules @ lib.lib_internal_modules) -+ "cmx" - else - [] - in -@@ -1559,7 +2147,7 @@ - add_pack_header ([cs.cs_name^".cma"] :: acc) - in - let native acc = -- let acc = -+ let acc = - add_pack_header - (if has_native_dynlink then - [cs.cs_name^".cmxs"] :: acc -@@ -1598,11 +2186,113 @@ - acc_nopath) - (headers @ cmxs) - -- type data = common_section * build_section * library -+ -+end -+ -+module OASISObject = struct -+(* # 22 "src/oasis/OASISObject.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ -+ -+ let source_unix_files ~ctxt (cs, bs, obj) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ obj.obj_modules -+ -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~source_file_exists -+ (cs, bs, obj) = -+ -+ let find_module ext modul = -+ match OASISLibrary.find_module source_file_exists bs modul with -+ | `Sources (base_fn, _) -> [base_fn ^ ext] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in object %s") -+ modul cs.cs_name ; -+ lst -+ in -+ -+ let header, byte, native, c_object, f = -+ match obj.obj_modules with -+ | [ m ] -> (find_module ".cmi" m, -+ find_module ".cmo" m, -+ find_module ".cmx" m, -+ find_module ".o" m, -+ fun x -> x) -+ | _ -> ([cs.cs_name ^ ".cmi"], -+ [cs.cs_name ^ ".cmo"], -+ [cs.cs_name ^ ".cmx"], -+ [cs.cs_name ^ ".o"], -+ OASISUnixPath.concat bs.bs_path) -+ in -+ List.map (List.map f) ( -+ match bs.bs_compiled_object with -+ | Native -> -+ native :: c_object :: byte :: header :: [] -+ | Best when is_native -> -+ native :: c_object :: byte :: header :: [] -+ | Byte | Best -> -+ byte :: header :: []) -+ -+ -+end -+ -+module OASISFindlib = struct -+(* # 22 "src/oasis/OASISFindlib.ml" *) -+ -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ -+ type library_name = name -+ type findlib_part_name = name -+ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t -+ -+ -+ exception InternalLibraryNotFound of library_name -+ exception FindlibPackageNotFound of findlib_name -+ -+ -+ type group_t = -+ | Container of findlib_name * group_t list -+ | Package of (findlib_name * -+ common_section * -+ build_section * -+ [`Library of library | `Object of object_] * -+ group_t list) -+ -+ -+ type data = common_section * -+ build_section * -+ [`Library of library | `Object of object_] - type tree = - | Node of (data option) * (tree MapString.t) - | Leaf of data - -+ - let findlib_mapping pkg = - (* Map from library name to either full findlib name or parts + parent. *) - let fndlb_parts_of_lib_name = -@@ -1641,6 +2331,23 @@ - mp - end - -+ | Object (cs, _, obj) -> -+ begin -+ let obj_name = cs.cs_name in -+ if MapString.mem obj_name mp then -+ failwithf -+ (f_ "The object name '%s' is used more than once.") -+ obj_name; -+ let findlib_full_name = match obj.obj_findlib_fullname with -+ | Some ns -> String.concat "." ns -+ | None -> obj_name -+ in -+ MapString.add -+ obj_name -+ (`Solved findlib_full_name) -+ mp -+ end -+ - | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> - mp) - MapString.empty -@@ -1708,7 +2415,7 @@ - let lib_name = cs.cs_name in - findlib_name_of_library_name lib_name - in -- let rec add_children nm_lst (children : tree MapString.t) = -+ let rec add_children nm_lst (children: tree MapString.t) = - match nm_lst with - | (hd :: tl) -> - begin -@@ -1778,7 +2485,9 @@ - (fun mp -> - function - | Library (cs, bs, lib) -> -- add (cs, bs, lib) mp -+ add (cs, bs, `Library lib) mp -+ | Object (cs, bs, obj) -> -+ add (cs, bs, `Object obj) mp - | _ -> - mp) - MapString.empty -@@ -1809,11 +2518,13 @@ - findlib_name_of_library_name, - library_name_of_findlib_name - -+ - let findlib_of_group = - function - | Container (fndlb_nm, _) - | Package (fndlb_nm, _, _, _, _) -> fndlb_nm - -+ - let root_of_group grp = - let rec root_lib_aux = - (* We do a DFS in the group. *) -@@ -1838,40 +2549,48 @@ - (f_ "Unable to determine root library of findlib library '%s'") - (findlib_of_group grp) - -+ - end - - module OASISFlag = struct --(* # 21 "src/oasis/OASISFlag.ml" *) -+(* # 22 "src/oasis/OASISFlag.ml" *) -+ - - end - - module OASISPackage = struct --(* # 21 "src/oasis/OASISPackage.ml" *) -+(* # 22 "src/oasis/OASISPackage.ml" *) -+ - - end - - module OASISSourceRepository = struct --(* # 21 "src/oasis/OASISSourceRepository.ml" *) -+(* # 22 "src/oasis/OASISSourceRepository.ml" *) -+ - - end - - module OASISTest = struct --(* # 21 "src/oasis/OASISTest.ml" *) -+(* # 22 "src/oasis/OASISTest.ml" *) -+ - - end - - module OASISDocument = struct --(* # 21 "src/oasis/OASISDocument.ml" *) -+(* # 22 "src/oasis/OASISDocument.ml" *) -+ - - end - - module OASISExec = struct --(* # 21 "src/oasis/OASISExec.ml" *) -+(* # 22 "src/oasis/OASISExec.ml" *) -+ - - open OASISGettext - open OASISUtils - open OASISMessage - -+ - (* TODO: I don't like this quote, it is there because $(rm) foo expands to - * 'rm -f' foo... - *) -@@ -1902,6 +2621,7 @@ - | Some f, i -> - f i - -+ - let run_read_output ~ctxt ?f_exit_code cmd args = - let fn = - Filename.temp_file "oasis-" ".txt" -@@ -1933,6 +2653,7 @@ - (try Sys.remove fn with _ -> ()); - raise e - -+ - let run_read_one_line ~ctxt ?f_exit_code cmd args = - match run_read_output ~ctxt ?f_exit_code cmd args with - | [fst] -> -@@ -1944,10 +2665,12 @@ - end - - module OASISFileUtil = struct --(* # 21 "src/oasis/OASISFileUtil.ml" *) -+(* # 22 "src/oasis/OASISFileUtil.ml" *) -+ - - open OASISGettext - -+ - let file_exists_case fn = - let dirname = Filename.dirname fn in - let basename = Filename.basename fn in -@@ -1961,6 +2684,7 @@ - else - false - -+ - let find_file ?(case_sensitive=true) paths exts = - - (* Cardinal product of two list *) -@@ -1969,7 +2693,7 @@ - (List.map - (fun a -> - List.map -- (fun b -> a,b) -+ (fun b -> a, b) - lst2) - lst1) - in -@@ -1979,7 +2703,7 @@ - | p1 :: p2 :: tl -> - let acc = - (List.map -- (fun (a,b) -> Filename.concat a b) -+ (fun (a, b) -> Filename.concat a b) - (p1 * p2)) - in - combined_paths (acc :: tl) -@@ -1991,19 +2715,21 @@ - - let alternatives = - List.map -- (fun (p,e) -> -+ (fun (p, e) -> - if String.length e > 0 && e.[0] <> '.' then - p ^ "." ^ e - else - p ^ e) - ((combined_paths paths) * exts) - in -- List.find -+ List.find (fun file -> - (if case_sensitive then -- file_exists_case -+ file_exists_case file - else -- Sys.file_exists) -- alternatives -+ Sys.file_exists file) -+ && not (Sys.is_directory file) -+ ) alternatives -+ - - let which ~ctxt prg = - let path_sep = -@@ -2023,6 +2749,7 @@ - in - find_file ~case_sensitive:false [path_lst; [prg]] exec_ext - -+ - (**/**) - let rec fix_dir dn = - (* Windows hack because Sys.file_exists "src\\" = false when -@@ -2036,9 +2763,11 @@ - else - dn - -+ - let q = Filename.quote - (**/**) - -+ - let cp ~ctxt ?(recurse=false) src tgt = - if recurse then - match Sys.os_type with -@@ -2055,6 +2784,7 @@ - | _ -> "cp") - [q src; q tgt] - -+ - let mkdir ~ctxt tgt = - OASISExec.run ~ctxt - (match Sys.os_type with -@@ -2062,6 +2792,7 @@ - | _ -> "mkdir") - [q tgt] - -+ - let rec mkdir_parent ~ctxt f tgt = - let tgt = - fix_dir tgt -@@ -2084,15 +2815,20 @@ - end - end - -+ - let rmdir ~ctxt tgt = -- if Sys.readdir tgt = [||] then -- begin -- match Sys.os_type with -- | "Win32" -> -- OASISExec.run ~ctxt "rd" [q tgt] -- | _ -> -- OASISExec.run ~ctxt "rm" ["-r"; q tgt] -- end -+ if Sys.readdir tgt = [||] then begin -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt "rd" [q tgt] -+ | _ -> -+ OASISExec.run ~ctxt "rm" ["-r"; q tgt] -+ end else begin -+ OASISMessage.error ~ctxt -+ (f_ "Cannot remove directory '%s': not empty.") -+ tgt -+ end -+ - - let glob ~ctxt fn = - let basename = -@@ -2139,19 +2875,23 @@ - end - - --# 2142 "setup.ml" -+# 2878 "setup.ml" - module BaseEnvLight = struct --(* # 21 "src/base/BaseEnvLight.ml" *) -+(* # 22 "src/base/BaseEnvLight.ml" *) -+ - - module MapString = Map.Make(String) - -+ - type t = string MapString.t - -+ - let default_filename = - Filename.concat - (Sys.getcwd ()) - "setup.data" - -+ - let load ?(allow_empty=false) ?(filename=default_filename) () = - if Sys.file_exists filename then - begin -@@ -2209,26 +2949,29 @@ - filename) - end - -- let var_get name env = -- let rec var_expand str = -- let buff = -- Buffer.create ((String.length str) * 2) -- in -- Buffer.add_substitute -- buff -- (fun var -> -- try -- var_expand (MapString.find var env) -- with Not_found -> -- failwith -- (Printf.sprintf -- "No variable %s defined when trying to expand %S." -- var -- str)) -- str; -- Buffer.contents buff -+ -+ let rec var_expand str env = -+ let buff = -+ Buffer.create ((String.length str) * 2) - in -- var_expand (MapString.find name env) -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) env -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ -+ -+ let var_get name env = -+ var_expand (MapString.find name env) env -+ - - let var_choose lst env = - OASISExpr.choose -@@ -2237,20 +2980,24 @@ - end - - --# 2240 "setup.ml" -+# 2983 "setup.ml" - module BaseContext = struct --(* # 21 "src/base/BaseContext.ml" *) -+(* # 22 "src/base/BaseContext.ml" *) - -+ (* TODO: get rid of this module. *) - open OASISContext - -- let args = args -+ -+ let args () = fst (fspecs ()) -+ - - let default = default - - end - - module BaseMessage = struct --(* # 21 "src/base/BaseMessage.ml" *) -+(* # 22 "src/base/BaseMessage.ml" *) -+ - - (** Message to user, overrid for Base - @author Sylvain Le Gall -@@ -2258,31 +3005,38 @@ - open OASISMessage - open BaseContext - -+ - let debug fmt = debug ~ctxt:!default fmt - -+ - let info fmt = info ~ctxt:!default fmt - -+ - let warning fmt = warning ~ctxt:!default fmt - -+ - let error fmt = error ~ctxt:!default fmt - - end - - module BaseEnv = struct --(* # 21 "src/base/BaseEnv.ml" *) -+(* # 22 "src/base/BaseEnv.ml" *) - - open OASISGettext - open OASISUtils - open PropList - -+ - module MapString = BaseEnvLight.MapString - -+ - type origin_t = - | ODefault - | OGetEnv - | OFileLoad - | OCommandLine - -+ - type cli_handle_t = - | CLINone - | CLIAuto -@@ -2290,6 +3044,7 @@ - | CLIEnable - | CLIUser of (Arg.key * Arg.spec * Arg.doc) list - -+ - type definition_t = - { - hide: bool; -@@ -2299,21 +3054,26 @@ - group: string option; - } - -+ - let schema = - Schema.create "environment" - -+ - (* Environment data *) - let env = - Data.create () - -+ - (* Environment data from file *) - let env_from_file = - ref MapString.empty - -+ - (* Lexer for var *) - let var_lxr = - Genlex.make_lexer [] - -+ - let rec var_expand str = - let buff = - Buffer.create ((String.length str) * 2) -@@ -2364,6 +3124,7 @@ - str; - Buffer.contents buff - -+ - and var_get name = - let vl = - try -@@ -2378,6 +3139,7 @@ - in - var_expand vl - -+ - let var_choose ?printer ?name lst = - OASISExpr.choose - ?printer -@@ -2385,6 +3147,7 @@ - var_get - lst - -+ - let var_protect vl = - let buff = - Buffer.create (String.length vl) -@@ -2396,6 +3159,7 @@ - vl; - Buffer.contents buff - -+ - let var_define - ?(hide=false) - ?(dump=true) -@@ -2481,6 +3245,7 @@ - fun () -> - var_expand (var_get_low (var_get_lst env)) - -+ - let var_redefine - ?hide - ?dump -@@ -2509,8 +3274,9 @@ - dflt - end - -- let var_ignore (e : unit -> string) = -- () -+ -+ let var_ignore (e: unit -> string) = () -+ - - let print_hidden = - var_define -@@ -2521,6 +3287,7 @@ - "print_hidden" - (fun () -> "false") - -+ - let var_all () = - List.rev - (Schema.fold -@@ -2532,24 +3299,28 @@ - [] - schema) - -+ - let default_filename = - BaseEnvLight.default_filename - -+ - let load ?allow_empty ?filename () = - env_from_file := BaseEnvLight.load ?allow_empty ?filename () - -+ - let unload () = - env_from_file := MapString.empty; - Data.clear env - -+ - let dump ?(filename=default_filename) () = - let chn = - open_out_bin filename - in -- let output nm value = -+ let output nm value = - Printf.fprintf chn "%s=%S\n" nm value - in -- let mp_todo = -+ let mp_todo = - (* Dump data from schema *) - Schema.fold - (fun mp_todo nm def _ -> -@@ -2576,6 +3347,7 @@ - (* End of the dump *) - close_out chn - -+ - let print () = - let printable_vars = - Schema.fold -@@ -2614,11 +3386,12 @@ - - Printf.printf "\nConfiguration: \n"; - List.iter -- (fun (name,value) -> -+ (fun (name, value) -> - Printf.printf "%s: %s %s\n" name (dot_pad name) value) - (List.rev printable_vars); - Printf.printf "\n%!" - -+ - let args () = - let arg_concat = - OASISUtils.varname_concat ~hyphen:'-' -@@ -2729,11 +3502,13 @@ - end - - module BaseArgExt = struct --(* # 21 "src/base/BaseArgExt.ml" *) -+(* # 22 "src/base/BaseArgExt.ml" *) -+ - - open OASISUtils - open OASISGettext - -+ - let parse argv args = - (* Simulate command line for Arg *) - let current = -@@ -2757,13 +3532,15 @@ - end - - module BaseCheck = struct --(* # 21 "src/base/BaseCheck.ml" *) -+(* # 22 "src/base/BaseCheck.ml" *) -+ - - open BaseEnv - open BaseMessage - open OASISUtils - open OASISGettext - -+ - let prog_best prg prg_lst = - var_redefine - prg -@@ -2786,15 +3563,19 @@ - | Some prg -> prg - | None -> raise Not_found) - -+ - let prog prg = - prog_best prg [prg] - -+ - let prog_opt prg = - prog_best prg [prg^".opt"; prg] - -+ - let ocamlfind = - prog "ocamlfind" - -+ - let version - var_prefix - cmp -@@ -2836,11 +3617,13 @@ - version_str) - () - -+ - let package_version pkg = - OASISExec.run_read_one_line ~ctxt:!BaseContext.default - (ocamlfind ()) - ["query"; "-format"; "%v"; pkg] - -+ - let package ?version_comparator pkg () = - let var = - OASISUtils.varname_concat -@@ -2883,18 +3666,21 @@ - end - - module BaseOCamlcConfig = struct --(* # 21 "src/base/BaseOCamlcConfig.ml" *) -+(* # 22 "src/base/BaseOCamlcConfig.ml" *) - - - open BaseEnv - open OASISUtils - open OASISGettext - -+ - module SMap = Map.Make(String) - -+ - let ocamlc = - BaseCheck.prog_opt "ocamlc" - -+ - let ocamlc_config_map = - (* Map name to value for ocamlc -config output - (name ^": "^value) -@@ -2940,7 +3726,7 @@ - mp - in - -- let cache = -+ let cache = - lazy - (var_protect - (Marshal.to_string -@@ -2959,6 +3745,7 @@ - (* TODO: update if ocamlc change !!! *) - Lazy.force cache) - -+ - let var_define nm = - (* Extract data from ocamlc -config *) - let avlbl_config_get () = -@@ -2967,15 +3754,15 @@ - 0 - in - let chop_version_suffix s = -- try -+ try - String.sub s 0 (String.index s '+') -- with _ -> -+ with _ -> - s - in - - let nm_config, value_config = - match nm with -- | "ocaml_version" -> -+ | "ocaml_version" -> - "version", chop_version_suffix - | _ -> nm, (fun x -> x) - in -@@ -2999,7 +3786,7 @@ - end - - module BaseStandardVar = struct --(* # 21 "src/base/BaseStandardVar.ml" *) -+(* # 22 "src/base/BaseStandardVar.ml" *) - - - open OASISGettext -@@ -3008,6 +3795,7 @@ - open BaseCheck - open BaseEnv - -+ - let ocamlfind = BaseCheck.ocamlfind - let ocamlc = BaseOCamlcConfig.ocamlc - let ocamlopt = prog_opt "ocamlopt" -@@ -3018,13 +3806,16 @@ - let rpkg = - ref None - -+ - let pkg_get () = - match !rpkg with - | Some pkg -> pkg - | None -> failwith (s_ "OASIS Package is not set") - -+ - let var_cond = ref [] - -+ - let var_define_cond ~since_version f dflt = - let holder = ref (fun () -> dflt) in - let since_version = -@@ -3036,14 +3827,17 @@ - holder := f ()) :: !var_cond; - fun () -> !holder () - -+ - (**/**) - -+ - let pkg_name = - var_define - ~short_desc:(fun () -> s_ "Package name") - "pkg_name" - (fun () -> (pkg_get ()).name) - -+ - let pkg_version = - var_define - ~short_desc:(fun () -> s_ "Package version") -@@ -3051,16 +3845,20 @@ - (fun () -> - (OASISVersion.string_of_version (pkg_get ()).version)) - -+ - let c = BaseOCamlcConfig.var_define - -+ - let os_type = c "os_type" - let system = c "system" - let architecture = c "architecture" - let ccomp_type = c "ccomp_type" - let ocaml_version = c "ocaml_version" - -+ - (* TODO: Check standard variable presence at runtime *) - -+ - let standard_library_default = c "standard_library_default" - let standard_library = c "standard_library" - let standard_runtime = c "standard_runtime" -@@ -3074,24 +3872,27 @@ - let default_executable_name = c "default_executable_name" - let systhread_supported = c "systhread_supported" - -- let flexlink = -+ -+ let flexlink = - BaseCheck.prog "flexlink" - -+ - let flexdll_version = - var_define - ~short_desc:(fun () -> "FlexDLL version (Win32)") - "flexdll_version" - (fun () -> -- let lst = -+ let lst = - OASISExec.run_read_output ~ctxt:!BaseContext.default - (flexlink ()) ["-help"] - in -- match lst with -+ match lst with - | line :: _ -> - Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) - | [] -> - raise Not_found) - -+ - (**/**) - let p name hlp dflt = - var_define -@@ -3101,6 +3902,7 @@ - name - dflt - -+ - let (/) a b = - if os_type () = Sys.os_type then - Filename.concat a b -@@ -3111,6 +3913,7 @@ - (os_type ()) - (**/**) - -+ - let prefix = - p "prefix" - (fun () -> s_ "Install architecture-independent files dir") -@@ -3124,96 +3927,115 @@ - | _ -> - "/usr/local") - -+ - let exec_prefix = - p "exec_prefix" - (fun () -> s_ "Install architecture-dependent files in dir") - (fun () -> "$prefix") - -+ - let bindir = - p "bindir" - (fun () -> s_ "User executables") - (fun () -> "$exec_prefix"/"bin") - -+ - let sbindir = - p "sbindir" - (fun () -> s_ "System admin executables") - (fun () -> "$exec_prefix"/"sbin") - -+ - let libexecdir = - p "libexecdir" - (fun () -> s_ "Program executables") - (fun () -> "$exec_prefix"/"libexec") - -+ - let sysconfdir = - p "sysconfdir" - (fun () -> s_ "Read-only single-machine data") - (fun () -> "$prefix"/"etc") - -+ - let sharedstatedir = - p "sharedstatedir" - (fun () -> s_ "Modifiable architecture-independent data") - (fun () -> "$prefix"/"com") - -+ - let localstatedir = - p "localstatedir" - (fun () -> s_ "Modifiable single-machine data") - (fun () -> "$prefix"/"var") - -+ - let libdir = - p "libdir" - (fun () -> s_ "Object code libraries") - (fun () -> "$exec_prefix"/"lib") - -+ - let datarootdir = - p "datarootdir" - (fun () -> s_ "Read-only arch-independent data root") - (fun () -> "$prefix"/"share") - -+ - let datadir = - p "datadir" - (fun () -> s_ "Read-only architecture-independent data") - (fun () -> "$datarootdir") - -+ - let infodir = - p "infodir" - (fun () -> s_ "Info documentation") - (fun () -> "$datarootdir"/"info") - -+ - let localedir = - p "localedir" - (fun () -> s_ "Locale-dependent data") - (fun () -> "$datarootdir"/"locale") - -+ - let mandir = - p "mandir" - (fun () -> s_ "Man documentation") - (fun () -> "$datarootdir"/"man") - -+ - let docdir = - p "docdir" - (fun () -> s_ "Documentation root") - (fun () -> "$datarootdir"/"doc"/"$pkg_name") - -+ - let htmldir = - p "htmldir" - (fun () -> s_ "HTML documentation") - (fun () -> "$docdir") - -+ - let dvidir = - p "dvidir" - (fun () -> s_ "DVI documentation") - (fun () -> "$docdir") - -+ - let pdfdir = - p "pdfdir" - (fun () -> s_ "PDF documentation") - (fun () -> "$docdir") - -+ - let psdir = - p "psdir" - (fun () -> s_ "PS documentation") - (fun () -> "$docdir") - -+ - let destdir = - p "destdir" - (fun () -> s_ "Prepend a path when installing package") -@@ -3223,35 +4045,39 @@ - ("destdir", - Some (s_ "undefined by construct")))) - -+ - let findlib_version = - var_define - "findlib_version" - (fun () -> - BaseCheck.package_version "findlib") - -+ - let is_native = - var_define - "is_native" - (fun () -> - try -- let _s : string = -+ let _s: string = - ocamlopt () - in - "true" - with PropList.Not_set _ -> -- let _s : string = -+ let _s: string = - ocamlc () - in - "false") - -+ - let ext_program = - var_define - "suffix_program" - (fun () -> - match os_type () with -- | "Win32" -> ".exe" -+ | "Win32" | "Cygwin" -> ".exe" - | _ -> "") - -+ - let rm = - var_define - ~short_desc:(fun () -> s_ "Remove a file.") -@@ -3261,6 +4087,7 @@ - | "Win32" -> "del" - | _ -> "rm -f") - -+ - let rmdir = - var_define - ~short_desc:(fun () -> s_ "Remove a directory.") -@@ -3270,6 +4097,7 @@ - | "Win32" -> "rd" - | _ -> "rm -rf") - -+ - let debug = - var_define - ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") -@@ -3277,6 +4105,7 @@ - "debug" - (fun () -> "true") - -+ - let profile = - var_define - ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") -@@ -3284,6 +4113,7 @@ - "profile" - (fun () -> "false") - -+ - let tests = - var_define_cond ~since_version:"0.3" - (fun () -> -@@ -3295,6 +4125,7 @@ - (fun () -> "false")) - "true" - -+ - let docs = - var_define_cond ~since_version:"0.3" - (fun () -> -@@ -3305,6 +4136,7 @@ - (fun () -> "true")) - "true" - -+ - let native_dynlink = - var_define - ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") -@@ -3312,7 +4144,7 @@ - "native_dynlink" - (fun () -> - let res = -- let ocaml_lt_312 () = -+ let ocaml_lt_312 () = - OASISVersion.comparator_apply - (OASISVersion.version_of_string (ocaml_version ())) - (OASISVersion.VLesser -@@ -3324,7 +4156,7 @@ - (OASISVersion.VLesser - (OASISVersion.version_of_string "0.30")) - in -- let has_native_dynlink = -+ let has_native_dynlink = - let ocamlfind = ocamlfind () in - try - let fn = -@@ -3342,10 +4174,10 @@ - false - else if ocaml_lt_312 () then - false -- else if (os_type () = "Win32" || os_type () = "Cygwin") -+ else if (os_type () = "Win32" || os_type () = "Cygwin") - && flexdll_lt_030 () then - begin -- BaseMessage.warning -+ BaseMessage.warning - (f_ ".cmxs generation disabled because FlexDLL needs to be \ - at least 0.30. Please upgrade FlexDLL from %s to 0.30.") - (flexdll_version ()); -@@ -3356,6 +4188,7 @@ - in - string_of_bool res) - -+ - let init pkg = - rpkg := Some pkg; - List.iter (fun f -> f pkg.oasis_version) !var_cond -@@ -3363,12 +4196,14 @@ - end - - module BaseFileAB = struct --(* # 21 "src/base/BaseFileAB.ml" *) -+(* # 22 "src/base/BaseFileAB.ml" *) -+ - - open BaseEnv - open OASISGettext - open BaseMessage - -+ - let to_filename fn = - let fn = - OASISHostPath.of_unix fn -@@ -3379,6 +4214,7 @@ - fn; - Filename.chop_extension fn - -+ - let replace fn_lst = - let buff = - Buffer.create 13 -@@ -3411,15 +4247,18 @@ - end - - module BaseLog = struct --(* # 21 "src/base/BaseLog.ml" *) -+(* # 22 "src/base/BaseLog.ml" *) -+ - - open OASISUtils - -+ - let default_filename = - Filename.concat - (Filename.dirname BaseEnv.default_filename) - "setup.log" - -+ - module SetTupleString = - Set.Make - (struct -@@ -3430,6 +4269,7 @@ - | n -> n - end) - -+ - let load () = - if Sys.file_exists default_filename then - begin -@@ -3479,6 +4319,7 @@ - [] - end - -+ - let register event data = - let chn_out = - open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename -@@ -3486,6 +4327,7 @@ - Printf.fprintf chn_out "%S %S\n" event data; - close_out chn_out - -+ - let unregister event data = - if Sys.file_exists default_filename then - begin -@@ -3511,6 +4353,7 @@ - Sys.remove default_filename - end - -+ - let filter events = - let st_events = - List.fold_left -@@ -3523,6 +4366,7 @@ - (fun (e, _) -> SetString.mem e st_events) - (load ()) - -+ - let exists event data = - List.exists - (fun v -> (event, data) = v) -@@ -3530,31 +4374,38 @@ - end - - module BaseBuilt = struct --(* # 21 "src/base/BaseBuilt.ml" *) -+(* # 22 "src/base/BaseBuilt.ml" *) -+ - - open OASISTypes - open OASISGettext - open BaseStandardVar - open BaseMessage - -+ - type t = - | BExec (* Executable *) - | BExecLib (* Library coming with executable *) - | BLib (* Library *) -+ | BObj (* Library *) - | BDoc (* Document *) - -+ - let to_log_event_file t nm = - "built_"^ - (match t with - | BExec -> "exec" - | BExecLib -> "exec_lib" - | BLib -> "lib" -+ | BObj -> "obj" - | BDoc -> "doc")^ - "_"^nm - -+ - let to_log_event_done t nm = - "is_"^(to_log_event_file t nm) - -+ - let register t nm lst = - BaseLog.register - (to_log_event_done t nm) -@@ -3585,6 +4436,7 @@ - (String.concat (s_ ", ") alt)) - lst - -+ - let unregister t nm = - List.iter - (fun (e, d) -> -@@ -3593,6 +4445,7 @@ - [to_log_event_file t nm; - to_log_event_done t nm]) - -+ - let fold t nm f acc = - List.fold_left - (fun acc (_, fn) -> -@@ -3612,6 +4465,8 @@ - (f_ "executable %s") - | BLib -> - (f_ "library %s") -+ | BObj -> -+ (f_ "object %s") - | BDoc -> - (f_ "documentation %s")) - nm); -@@ -3621,6 +4476,7 @@ - (BaseLog.filter - [to_log_event_file t nm]) - -+ - let is_built t nm = - List.fold_left - (fun is_built (_, d) -> -@@ -3632,6 +4488,7 @@ - (BaseLog.filter - [to_log_event_done t nm]) - -+ - let of_executable ffn (cs, bs, exec) = - let unix_exec_is, unix_dll_opt = - OASISExecutable.unix_exec_is -@@ -3655,6 +4512,7 @@ - unix_exec_is, - unix_dll_opt - -+ - let of_library ffn (cs, bs, lib) = - let unix_lst = - OASISLibrary.generated_unix_files -@@ -3674,16 +4532,35 @@ - in - evs, unix_lst - -+ -+ let of_object ffn (cs, bs, obj) = -+ let unix_lst = -+ OASISObject.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ (cs, bs, obj) -+ in -+ let evs = -+ [BObj, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ - end - - module BaseCustom = struct --(* # 21 "src/base/BaseCustom.ml" *) -+(* # 22 "src/base/BaseCustom.ml" *) -+ - - open BaseEnv - open BaseMessage - open OASISTypes - open OASISGettext - -+ - let run cmd args extra_args = - OASISExec.run ~ctxt:!BaseContext.default ~quote:false - (var_expand cmd) -@@ -3691,6 +4568,7 @@ - var_expand - (args @ (Array.to_list extra_args))) - -+ - let hook ?(failsafe=false) cstm f e = - let optional_command lst = - let printer = -@@ -3727,7 +4605,7 @@ - end - - module BaseDynVar = struct --(* # 21 "src/base/BaseDynVar.ml" *) -+(* # 22 "src/base/BaseDynVar.ml" *) - - - open OASISTypes -@@ -3735,6 +4613,7 @@ - open BaseEnv - open BaseBuilt - -+ - let init pkg = - (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) - (* TODO: provide compile option for library libary_byte_args_VARNAME... *) -@@ -3768,13 +4647,14 @@ - (f_ "Executable '%s' not yet built.") - cs.cs_name))))) - -- | Library _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> -+ | Library _ | Object _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> - ()) - pkg.sections - end - - module BaseTest = struct --(* # 21 "src/base/BaseTest.ml" *) -+(* # 22 "src/base/BaseTest.ml" *) -+ - - open BaseEnv - open BaseMessage -@@ -3782,6 +4662,7 @@ - open OASISExpr - open OASISGettext - -+ - let test lst pkg extra_args = - - let one_test (failure, n) (test_plugin, cs, test) = -@@ -3832,7 +4713,7 @@ - (failure, n) - end - in -- let (failed, n) = -+ let failed, n = - List.fold_left - one_test - (0.0, 0) -@@ -3855,7 +4736,7 @@ - info "%s" msg; - - (* Possible explanation why the tests where not run. *) -- if OASISVersion.version_0_3_or_after pkg.oasis_version && -+ if OASISFeatures.package_test OASISFeatures.flag_tests pkg && - not (bool_of_string (BaseStandardVar.tests ())) && - lst <> [] then - BaseMessage.warning -@@ -3864,13 +4745,15 @@ - end - - module BaseDoc = struct --(* # 21 "src/base/BaseDoc.ml" *) -+(* # 22 "src/base/BaseDoc.ml" *) -+ - - open BaseEnv - open BaseMessage - open OASISTypes - open OASISGettext - -+ - let doc lst pkg extra_args = - - let one_doc (doc_plugin, cs, doc) = -@@ -3890,7 +4773,7 @@ - in - List.iter one_doc lst; - -- if OASISVersion.version_0_3_or_after pkg.oasis_version && -+ if OASISFeatures.package_test OASISFeatures.flag_docs pkg && - not (bool_of_string (BaseStandardVar.docs ())) && - lst <> [] then - BaseMessage.warning -@@ -3899,7 +4782,7 @@ - end - - module BaseSetup = struct --(* # 21 "src/base/BaseSetup.ml" *) -+(* # 22 "src/base/BaseSetup.ml" *) - - open BaseEnv - open BaseMessage -@@ -3908,12 +4791,15 @@ - open OASISGettext - open OASISUtils - -+ - type std_args_fun = - package -> string array -> unit - -+ - type ('a, 'b) section_args_fun = - name * (package -> (common_section * 'a) -> string array -> 'b) - -+ - type t = - { - configure: std_args_fun; -@@ -3937,6 +4823,7 @@ - setup_update: bool; - } - -+ - (* Associate a plugin function with data from package *) - let join_plugin_sections filter_map lst = - List.rev -@@ -3950,6 +4837,7 @@ - [] - lst) - -+ - (* Search for plugin data associated with a section name *) - let lookup_plugin_section plugin action nm lst = - try -@@ -3961,11 +4849,12 @@ - nm - action - -+ - let configure t args = - (* Run configure *) - BaseCustom.hook - t.package.conf_custom -- (fun () -> -+ (fun () -> - (* Reload if preconf has changed it *) - begin - try -@@ -3992,12 +4881,14 @@ - (* Replace data in file *) - BaseFileAB.replace t.package.files_ab - -+ - let build t args = - BaseCustom.hook - t.package.build_custom - (t.build t.package) - args - -+ - let doc t args = - BaseDoc.doc - (join_plugin_sections -@@ -4017,6 +4908,7 @@ - t.package - args - -+ - let test t args = - BaseTest.test - (join_plugin_sections -@@ -4036,6 +4928,7 @@ - t.package - args - -+ - let all t args = - let rno_doc = - ref false -@@ -4043,6 +4936,9 @@ - let rno_test = - ref false - in -+ let arg_rest = -+ ref [] -+ in - Arg.parse_argv - ~current:(ref 0) - (Array.of_list -@@ -4056,12 +4952,16 @@ - "-no-test", - Arg.Set rno_test, - s_ "Don't run test target"; -+ -+ "--", -+ Arg.Rest (fun arg -> arg_rest := arg :: !arg_rest), -+ s_ "All arguments for configure."; - ] - (failwithf (f_ "Don't know what to do with '%s'")) - ""; - - info "Running configure step"; -- configure t [||]; -+ configure t (Array.of_list (List.rev !arg_rest)); - - info "Running build step"; - build t [||]; -@@ -4089,22 +4989,26 @@ - info "Skipping test step" - end - -+ - let install t args = - BaseCustom.hook - t.package.install_custom - (t.install t.package) - args - -+ - let uninstall t args = - BaseCustom.hook - t.package.uninstall_custom - (t.uninstall t.package) - args - -+ - let reinstall t args = - uninstall t args; - install t args - -+ - let clean, distclean = - let failsafe f a = - try -@@ -4146,6 +5050,7 @@ - (f t.package (cs, doc)) - args - | Library _ -+ | Object _ - | Executable _ - | Flag _ - | SrcRepo _ -> -@@ -4201,9 +5106,11 @@ - - clean, distclean - -+ - let version t _ = - print_endline t.oasis_version - -+ - let update_setup_ml, no_update_setup_ml_cli = - let b = ref true in - b, -@@ -4211,11 +5118,15 @@ - Arg.Clear b, - s_ " Don't try to update setup.ml, even if _oasis has changed.") - -+ -+ let default_oasis_fn = "_oasis" -+ -+ - let update_setup_ml t = - let oasis_fn = - match t.oasis_fn with - | Some fn -> fn -- | None -> "_oasis" -+ | None -> default_oasis_fn - in - let oasis_exec = - match t.oasis_exec with -@@ -4313,7 +5224,8 @@ - try - match t.oasis_digest with - | Some dgst -> -- if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then -+ if Sys.file_exists oasis_fn && -+ dgst <> Digest.file default_oasis_fn then - begin - do_update (); - true -@@ -4333,6 +5245,7 @@ - else - false - -+ - let setup t = - let catch_exn = - ref true -@@ -4474,41 +5387,34 @@ - error "%s" (Printexc.to_string e); - exit 1 - -+ - end - - --# 4480 "setup.ml" -+# 5394 "setup.ml" - module InternalConfigurePlugin = struct --(* # 21 "src/plugins/internal/InternalConfigurePlugin.ml" *) -+(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *) -+ - - (** Configure using internal scheme - @author Sylvain Le Gall - *) - -+ - open BaseEnv - open OASISTypes - open OASISUtils - open OASISGettext - open BaseMessage - -+ - (** Configure build using provided series of check to be done - * and then output corresponding file. - *) - let configure pkg argv = -- let var_ignore_eval var = -- let _s : string = -- var () -- in -- () -- in -- -- let errors = -- ref SetString.empty -- in -- -- let buff = -- Buffer.create 13 -- in -+ let var_ignore_eval var = let _s: string = var () in () in -+ let errors = ref SetString.empty in -+ let buff = Buffer.create 13 in - - let add_errors fmt = - Printf.kbprintf -@@ -4656,6 +5562,20 @@ - | None -> - () - end; -+ (* Make sure the findlib version is fine for the OCaml compiler. *) -+ begin -+ let ocaml_ge4 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.ocaml_version())) -+ (OASISVersion.version_of_string "4.0.0") >= 0 in -+ if ocaml_ge4 then -+ let findlib_lt132 = -+ OASISVersion.version_compare -+ (OASISVersion.version_of_string (BaseStandardVar.findlib_version())) -+ (OASISVersion.version_of_string "1.3.2") < 0 in -+ if findlib_lt132 then -+ add_errors "OCaml >= 4.0.0 requires Findlib version >= 1.3.2" -+ end; - - (* FlexDLL *) - if BaseStandardVar.os_type () = "Win32" || -@@ -4718,43 +5638,58 @@ - (SetString.cardinal !errors) - end - -+ - end - - module InternalInstallPlugin = struct --(* # 21 "src/plugins/internal/InternalInstallPlugin.ml" *) -+(* # 22 "src/plugins/internal/InternalInstallPlugin.ml" *) -+ - - (** Install using internal scheme - @author Sylvain Le Gall - *) - -+ - open BaseEnv - open BaseStandardVar - open BaseMessage - open OASISTypes -- open OASISLibrary -+ open OASISFindlib - open OASISGettext - open OASISUtils - -+ - let exec_hook = - ref (fun (cs, bs, exec) -> cs, bs, exec) - -+ - let lib_hook = - ref (fun (cs, bs, lib) -> cs, bs, lib, []) - -+ -+ let obj_hook = -+ ref (fun (cs, bs, obj) -> cs, bs, obj, []) -+ -+ - let doc_hook = - ref (fun (cs, doc) -> cs, doc) - -+ - let install_file_ev = - "install-file" - -+ - let install_dir_ev = - "install-dir" - -+ - let install_findlib_ev = - "install-findlib" - -+ - let win32_max_command_line_length = 8000 - -+ - let split_install_command ocamlfind findlib_name meta files = - if Sys.os_type = "Win32" then - (* Arguments for the first command: *) -@@ -4794,20 +5729,21 @@ - | (firsts, others) -> - let cmd = args @ firsts in - (* Use -add for remaining commands: *) -- let () = -+ let () = - let findlib_ge_132 = - OASISVersion.comparator_apply -- (OASISVersion.version_of_string -+ (OASISVersion.version_of_string - (BaseStandardVar.findlib_version ())) -- (OASISVersion.VGreaterEqual -+ (OASISVersion.VGreaterEqual - (OASISVersion.version_of_string "1.3.2")) - in - if not findlib_ge_132 then - failwithf -- (f_ "Installing the library %s require to use the flag \ -- '-add' of ocamlfind because the command line is too \ -- long. This flag is only available for findlib 1.3.2. \ -- Please upgrade findlib from %s to 1.3.2") -+ (f_ "Installing the library %s require to use the \ -+ flag '-add' of ocamlfind because the command \ -+ line is too long. This flag is only available \ -+ for findlib 1.3.2. Please upgrade findlib from \ -+ %s to 1.3.2") - findlib_name (BaseStandardVar.findlib_version ()) - in - let cmds = split other_args others in -@@ -4818,6 +5754,7 @@ - else - ["install" :: findlib_name :: meta :: files] - -+ - let install pkg argv = - - let in_destdir = -@@ -4961,6 +5898,75 @@ - begin - (f_data, acc) - end -+ and files_of_object (f_data, acc) data_obj = -+ let cs, bs, obj, obj_extra = -+ !obj_hook data_obj -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BObj cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + obj_extra *) -+ List.rev_append obj_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in object %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ obj.obj_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BObj -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the object *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ - in - - (* Install one group of library *) -@@ -4971,8 +5977,10 @@ - match grp with - | Container (_, children) -> - data_and_files, children -- | Package (_, cs, bs, lib, children) -> -+ | Package (_, cs, bs, `Library lib, children) -> - files_of_library data_and_files (cs, bs, lib), children -+ | Package (_, cs, bs, `Object obj, children) -> -+ files_of_object data_and_files (cs, bs, obj), children - in - List.fold_left - install_group_lib_aux -@@ -5006,7 +6014,7 @@ - begin - let meta = - (* Search META file *) -- let (_, bs, _) = -+ let _, bs, _ = - root_lib - in - let res = -@@ -5019,7 +6027,7 @@ - findlib_name; - res - in -- let files = -+ let files = - (* Make filename shorter to avoid hitting command max line length - * too early, esp. on Windows. - *) -@@ -5028,24 +6036,24 @@ - let nlen = String.length n in - if plen <= nlen && String.sub n 0 plen = p then - begin -- let fn_sep = -+ let fn_sep = - if Sys.os_type = "Win32" then - '\\' - else - '/' - in - let cutpoint = plen + -- (if plen < nlen && n.[plen] = fn_sep then -+ (if plen < nlen && n.[plen] = fn_sep then - 1 -- else -+ else - 0) - in - String.sub n cutpoint (nlen - cutpoint) - end -- else -+ else - n - in -- List.map (remove_prefix (Sys.getcwd ())) files -+ List.map (remove_prefix (Sys.getcwd ())) files - in - info - (f_ "Installing findlib library '%s'") -@@ -5079,7 +6087,7 @@ - - let install_execs pkg = - let install_exec data_exec = -- let (cs, bs, exec) = -+ let cs, bs, exec = - !exec_hook data_exec - in - if var_choose bs.bs_install && -@@ -5126,7 +6134,7 @@ - - let install_docs pkg = - let install_doc data = -- let (cs, doc) = -+ let cs, doc = - !doc_hook data - in - if var_choose doc.doc_install && -@@ -5162,6 +6170,7 @@ - install_execs pkg; - install_docs pkg - -+ - (* Uninstall already installed data *) - let uninstall _ argv = - List.iter -@@ -5225,24 +6234,34 @@ - (BaseLog.filter - [install_file_ev; - install_dir_ev; -- install_findlib_ev;])) -+ install_findlib_ev])) -+ - - end - - --# 5233 "setup.ml" -+# 6243 "setup.ml" - module OCamlbuildCommon = struct --(* # 21 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) -+ - - (** Functions common to OCamlbuild build and doc plugin - *) - -+ - open OASISGettext - open BaseEnv - open BaseStandardVar -+ open OASISTypes -+ -+ -+ -+ -+ type extra_args = string list -+ -+ -+ let ocamlbuild_clean_ev = "ocamlbuild-clean" - -- let ocamlbuild_clean_ev = -- "ocamlbuild-clean" - - let ocamlbuildflags = - var_define -@@ -5250,6 +6269,7 @@ - "ocamlbuildflags" - (fun () -> "") - -+ - (** Fix special arguments depending on environment *) - let fix_args args extra_argv = - List.flatten -@@ -5288,6 +6308,7 @@ - Array.to_list extra_argv; - ] - -+ - (** Run 'ocamlbuild -clean' if not already done *) - let run_clean extra_argv = - let extra_cli = -@@ -5307,6 +6328,7 @@ - ()) - end - -+ - (** Run ocamlbuild, unregister all clean events *) - let run_ocamlbuild args extra_argv = - (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html -@@ -5318,6 +6340,7 @@ - (fun (e, d) -> BaseLog.unregister e d) - (BaseLog.filter [ocamlbuild_clean_ev]) - -+ - (** Determine real build directory *) - let build_dir extra_argv = - let rec search_args dir = -@@ -5331,28 +6354,36 @@ - in - search_args "_build" (fix_args [] extra_argv) - -+ - end - - module OCamlbuildPlugin = struct --(* # 21 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) -+ - - (** Build using ocamlbuild - @author Sylvain Le Gall - *) - -+ - open OASISTypes - open OASISGettext - open OASISUtils -+ open OASISString - open BaseEnv - open OCamlbuildCommon - open BaseStandardVar - open BaseMessage - -+ -+ -+ -+ - let cond_targets_hook = - ref (fun lst -> lst) - -- let build pkg argv = - -+ let build extra_args pkg argv = - (* Return the filename in build directory *) - let in_build_dir fn = - Filename.concat -@@ -5377,16 +6408,36 @@ - (cs, bs, lib) - in - -- let ends_with nd fn = -- let nd_len = -- String.length nd -- in -- (String.length fn >= nd_len) -- && -- (String.sub -- fn -- (String.length fn - nd_len) -- nd_len) = nd -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ~what:".cma" fn -+ || ends_with ~what:".cmxs" fn -+ || ends_with ~what:".cmxa" fn -+ || ends_with ~what:(ext_lib ()) fn -+ || ends_with ~what:(ext_dll ()) fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for library %s") -+ cs.cs_name -+ end -+ -+ | Object (cs, bs, obj) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_object -+ in_build_dir_of_unix -+ (cs, bs, obj) - in - - let tgts = -@@ -5396,11 +6447,8 @@ - (List.map - (List.filter - (fun fn -> -- ends_with ".cma" fn -- || ends_with ".cmxs" fn -- || ends_with ".cmxa" fn -- || ends_with (ext_lib ()) fn -- || ends_with (ext_dll ()) fn)) -+ ends_with ".cmo" fn -+ || ends_with ".cmx" fn)) - unix_files)) - in - -@@ -5409,7 +6457,7 @@ - (evs, tgts) :: acc - | [] -> - failwithf -- (f_ "No possible ocamlbuild targets for library %s") -+ (f_ "No possible ocamlbuild targets for object %s") - cs.cs_name - end - -@@ -5428,12 +6476,13 @@ - (OASISUnixPath.chop_extension - exec.exec_main_is))^ext - in -- let evs = -+ let evs = - (* Fix evs, we want to use the unix_tgt, without copying *) - List.map - (function - | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> -- BaseBuilt.BExec, nm, [[in_build_dir_of_unix unix_tgt]] -+ BaseBuilt.BExec, nm, -+ [[in_build_dir_of_unix unix_tgt]] - | ev -> - ev) - evs -@@ -5455,7 +6504,7 @@ - acc - end - -- | Library _ | Executable _ | Test _ -+ | Library _ | Object _ | Executable _ | Test _ - | SrcRepo _ | Flag _ | Doc _ -> - acc) - [] -@@ -5469,26 +6518,22 @@ - (fun fns -> - if not (List.exists OASISFileUtil.file_exists_case fns) then - failwithf -- (f_ "No one of expected built files %s exists") -- (String.concat (s_ ", ") (List.map (Printf.sprintf "'%s'") fns))) -+ (fn_ -+ "Expected built file %s doesn't exist." -+ "None of expected built files %s exists." -+ (List.length fns)) -+ (String.concat (s_ " or ") (List.map (Printf.sprintf "'%s'") fns))) - lst; - (BaseBuilt.register bt bnm lst) - in - -- let cond_targets = -- (* Run the hook *) -- !cond_targets_hook cond_targets -- in -+ (* Run the hook *) -+ let cond_targets = !cond_targets_hook cond_targets in - -- (* Run a list of target... *) -- run_ocamlbuild -- (List.flatten -- (List.map snd cond_targets)) -- argv; -- (* ... and register events *) -- List.iter -- check_and_register -- (List.flatten (List.map fst cond_targets)) -+ (* Run a list of target... *) -+ run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv; -+ (* ... and register events *) -+ List.iter check_and_register (List.flatten (List.map fst cond_targets)) - - - let clean pkg extra_args = -@@ -5504,15 +6549,18 @@ - ()) - pkg.sections - -+ - end - - module OCamlbuildDocPlugin = struct --(* # 21 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) -+(* # 22 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) -+ - - (* Create documentation using ocamlbuild .odocl files - @author Sylvain Le Gall - *) - -+ - open OASISTypes - open OASISGettext - open OASISMessage -@@ -5521,11 +6569,19 @@ - - - -- let doc_build path pkg (cs, doc) argv = -+ -+ type run_t = -+ { -+ extra_args: string list; -+ run_path: unix_filename; -+ } -+ -+ -+ let doc_build run pkg (cs, doc) argv = - let index_html = - OASISUnixPath.make - [ -- path; -+ run.run_path; - cs.cs_name^".docdir"; - "index.html"; - ] -@@ -5534,11 +6590,11 @@ - OASISHostPath.make - [ - build_dir argv; -- OASISHostPath.of_unix path; -+ OASISHostPath.of_unix run.run_path; - cs.cs_name^".docdir"; - ] - in -- run_ocamlbuild [index_html] argv; -+ run_ocamlbuild (index_html :: run.extra_args) argv; - List.iter - (fun glb -> - BaseBuilt.register -@@ -5548,43 +6604,52 @@ - (Filename.concat tgt_dir glb)]) - ["*.html"; "*.css"] - -- let doc_clean t pkg (cs, doc) argv = -+ -+ let doc_clean run pkg (cs, doc) argv = - run_clean argv; - BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name - -+ - end - - --# 5558 "setup.ml" -+# 6616 "setup.ml" - module CustomPlugin = struct --(* # 21 "src/plugins/custom/CustomPlugin.ml" *) -+(* # 22 "src/plugins/custom/CustomPlugin.ml" *) -+ - - (** Generate custom configure/build/doc/test/install system - @author - *) - -+ - open BaseEnv - open OASISGettext - open OASISTypes - - - -+ -+ - type t = - { - cmd_main: command_line conditional; - cmd_clean: (command_line option) conditional; - cmd_distclean: (command_line option) conditional; -- } -+ } -+ -+ -+ let run = BaseCustom.run - -- let run = BaseCustom.run - - let main t _ extra_args = - let cmd, args = -- var_choose -- ~name:(s_ "main command") -+ var_choose -+ ~name:(s_ "main command") - t.cmd_main - in -- run cmd args extra_args -+ run cmd args extra_args -+ - - let clean t pkg extra_args = - match var_choose t.cmd_clean with -@@ -5593,6 +6658,7 @@ - | _ -> - () - -+ - let distclean t pkg extra_args = - match var_choose t.cmd_distclean with - | Some (cmd, args) -> -@@ -5600,20 +6666,21 @@ - | _ -> - () - -+ - module Build = -- struct -+ struct - let main t pkg extra_args = - main t pkg extra_args; - List.iter - (fun sct -> - let evs = -- match sct with -+ match sct with - | Library (cs, bs, lib) when var_choose bs.bs_build -> - begin -- let evs, _ = -- BaseBuilt.of_library -+ let evs, _ = -+ BaseBuilt.of_library - OASISHostPath.of_unix -- (cs, bs, lib) -+ (cs, bs, lib) - in - evs - end -@@ -5654,6 +6721,7 @@ - distclean t pkg extra_args - end - -+ - module Test = - struct - let main t pkg (cs, test) extra_args = -@@ -5661,7 +6729,7 @@ - main t pkg extra_args; - 0.0 - with Failure s -> -- BaseMessage.warning -+ BaseMessage.warning - (f_ "Test '%s' fails: %s") - cs.cs_name - s; -@@ -5671,9 +6739,10 @@ - clean t pkg extra_args - - let distclean t pkg (cs, test) extra_args = -- distclean t pkg extra_args -+ distclean t pkg extra_args - end - -+ - module Doc = - struct - let main t pkg (cs, _) extra_args = -@@ -5688,16 +6757,17 @@ - distclean t pkg extra_args - end - -+ - end - - --# 5694 "setup.ml" -+# 6764 "setup.ml" - open OASISTypes;; - - let setup_t = - { - BaseSetup.configure = InternalConfigurePlugin.configure; -- build = OCamlbuildPlugin.build; -+ build = OCamlbuildPlugin.build []; - test = - [ - ("opasswd_test", -@@ -5709,8 +6779,8 @@ - ("sudo", ["_build/test/opasswd_test.native"])) - ]; - cmd_clean = [(OASISExpr.EBool true, None)]; -- cmd_distclean = [(OASISExpr.EBool true, None)]; -- }) -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) - ]; - doc = []; - install = InternalInstallPlugin.install; -@@ -5727,8 +6797,8 @@ - ("sudo", ["_build/test/opasswd_test.native"])) - ]; - cmd_clean = [(OASISExpr.EBool true, None)]; -- cmd_distclean = [(OASISExpr.EBool true, None)]; -- }) -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) - ]; - clean_doc = []; - distclean = []; -@@ -5743,8 +6813,8 @@ - ("sudo", ["_build/test/opasswd_test.native"])) - ]; - cmd_clean = [(OASISExpr.EBool true, None)]; -- cmd_distclean = [(OASISExpr.EBool true, None)]; -- }) -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) - ]; - distclean_doc = []; - package = -@@ -5752,6 +6822,8 @@ - oasis_version = "0.3"; - ocaml_version = None; - findlib_version = None; -+ alpha_features = []; -+ beta_features = []; - name = "passwd"; - version = "0.9.3"; - license = -@@ -5760,8 +6832,8 @@ - { - OASISLicense.license = "ISC"; - excption = None; -- version = OASISLicense.NoVersion; -- }); -+ version = OASISLicense.NoVersion -+ }); - license_file = Some "LICENSE"; - copyrights = []; - maintainers = []; -@@ -5770,39 +6842,39 @@ - synopsis = "OCaml interface to Unix password library"; - description = None; - categories = []; -- conf_type = (`Configure, "internal", Some "0.3"); -+ conf_type = (`Configure, "internal", Some "0.4"); - conf_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -- build_type = (`Build, "ocamlbuild", Some "0.3"); -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ build_type = (`Build, "ocamlbuild", Some "0.4"); - build_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -- install_type = (`Install, "internal", Some "0.3"); -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ install_type = (`Install, "internal", Some "0.4"); - install_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; - uninstall_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; - clean_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; - distclean_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; - files_ab = []; - sections = - [ -@@ -5810,19 +6882,19 @@ - ({ - cs_name = "extra_debugging"; - cs_data = PropList.Data.create (); -- cs_plugin_data = []; -- }, -+ cs_plugin_data = [] -+ }, - { - flag_description = - Some "Build ocaml-opasswd with debugging"; -- flag_default = [(OASISExpr.EBool true, false)]; -- }); -+ flag_default = [(OASISExpr.EBool true, false)] -+ }); - Library - ({ - cs_name = "oPasswd"; - cs_data = PropList.Data.create (); -- cs_plugin_data = []; -- }, -+ cs_plugin_data = [] -+ }, - { - bs_build = [(OASISExpr.EBool true, true)]; - bs_install = [(OASISExpr.EBool true, true)]; -@@ -5844,18 +6916,12 @@ - bs_byteopt = - [ - (OASISExpr.EBool true, -- [ -- "-warn-error"; -- "+a"; -- "-bin-annot"; -- "-short-paths" -- ]); -+ ["-warn-error"; "+a"; "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - [ - "-warn-error"; - "+a"; - "-bin-annot"; -- "-short-paths"; - "-g"; - "-runtime-variant"; - "d"; -@@ -5865,39 +6931,33 @@ - bs_nativeopt = - [ - (OASISExpr.EBool true, -- [ -- "-warn-error"; -- "+a"; -- "-bin-annot"; -- "-short-paths" -- ]); -+ ["-warn-error"; "+a"; "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - [ - "-warn-error"; - "+a"; - "-bin-annot"; -- "-short-paths"; - "-g"; - "-runtime-variant"; - "d"; - "-verbose" - ]) -- ]; -- }, -+ ] -+ }, - { - lib_modules = ["Passwd"; "Shadow"; "Common"]; - lib_pack = true; - lib_internal_modules = []; - lib_findlib_parent = None; - lib_findlib_name = Some "oPasswd"; -- lib_findlib_containers = []; -- }); -+ lib_findlib_containers = [] -+ }); - Executable - ({ - cs_name = "opasswd_test"; - cs_data = PropList.Data.create (); -- cs_plugin_data = []; -- }, -+ cs_plugin_data = [] -+ }, - { - bs_build = [(OASISExpr.EBool true, true)]; - bs_install = [(OASISExpr.EBool true, false)]; -@@ -5917,34 +6977,28 @@ - bs_nativeopt = - [ - (OASISExpr.EBool true, -- [ -- "-warn-error"; -- "+a"; -- "-bin-annot"; -- "-short-paths" -- ]); -+ ["-warn-error"; "+a"; "-bin-annot"]); - (OASISExpr.EFlag "extra_debugging", - [ - "-warn-error"; - "+a"; - "-bin-annot"; -- "-short-paths"; - "-g"; - "-runtime-variant"; - "d"; - "-verbose" - ]) -- ]; -- }, -- {exec_custom = false; exec_main_is = "opasswd_test.ml"; }); -+ ] -+ }, -+ {exec_custom = false; exec_main_is = "opasswd_test.ml"}); - Test - ({ - cs_name = "opasswd_test"; - cs_data = PropList.Data.create (); -- cs_plugin_data = []; -- }, -+ cs_plugin_data = [] -+ }, - { -- test_type = (`Test, "custom", Some "0.3"); -+ test_type = (`Test, "custom", Some "0.4"); - test_command = - [ - (OASISExpr.EBool true, -@@ -5953,31 +7007,33 @@ - test_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; -- post_command = [(OASISExpr.EBool true, None)]; -- }; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; - test_working_directory = None; - test_run = - [ - (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); - (OASISExpr.EFlag "tests", true) - ]; -- test_tools = [ExternalTool "ocamlbuild"]; -- }) -+ test_tools = [ExternalTool "ocamlbuild"] -+ }) - ]; - plugins = [(`Extra, "META", Some "0.3")]; -+ disable_oasis_section = []; - schema_data = PropList.Data.create (); -- plugin_data = []; -- }; -+ plugin_data = [] -+ }; - oasis_fn = Some "_oasis"; -- oasis_version = "0.3.0"; -- oasis_digest = Some "p\025\132.\132¿¶\014{±\"\146zcSË"; -+ oasis_version = "0.4.4"; -+ oasis_digest = -+ Some "\145\179+\198\149\174\233\140\251\2349\252\240Y\011\143"; - oasis_exec = None; - oasis_setup_args = []; -- setup_update = false; -- };; -+ setup_update = false -+ };; - - let setup () = BaseSetup.setup setup_t;; - --# 5982 "setup.ml" -+# 7038 "setup.ml" - (* OASIS_STOP *) - let () = setup ();; -diff -ur ocaml-opasswd-0.9.3/_tags ocaml-opasswd-0.9.3.new/_tags ---- ocaml-opasswd-0.9.3/_tags 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/_tags 2014-04-25 20:41:58.370009980 +0000 -@@ -1,7 +1,7 @@ - # OASIS_START --# DO NOT EDIT (digest: f7068c987d6ff7f2e61743700395dd7a) --# Ignore VCS directories, you can use the same kind of rule outside --# OASIS_START/STOP if you want to exclude directories that contains -+# DO NOT EDIT (digest: ca98e66e72f6561afc39e8f9decb3ee2) -+# Ignore VCS directories, you can use the same kind of rule outside -+# OASIS_START/STOP if you want to exclude directories that contains - # useless stuff for the build process - <**/.svn>: -traverse - <**/.svn>: not_hygienic -@@ -22,18 +22,18 @@ - : oasis_library_opasswd_byte - : oasis_library_opasswd_native - : oasis_library_opasswd_native --: pkg_unix - : pkg_ctypes - : pkg_ctypes.foreign -+: pkg_unix - # Executable opasswd_test - : oasis_executable_opasswd_test_native - : oasis_executable_opasswd_test_native --: use_oPasswd --: pkg_unix - : pkg_ctypes - : pkg_ctypes.foreign --: use_oPasswd --: pkg_unix -+: pkg_unix -+: use_oPasswd - : pkg_ctypes - : pkg_ctypes.foreign -+: pkg_unix -+: use_oPasswd - # OASIS_STOP -diff -ur ocaml-opasswd-0.9.3/test/opasswd_test.ml ocaml-opasswd-0.9.3.new/test/opasswd_test.ml ---- ocaml-opasswd-0.9.3/test/opasswd_test.ml 2013-11-14 21:48:05.000000000 +0000 -+++ ocaml-opasswd-0.9.3.new/test/opasswd_test.ml 2014-04-25 20:43:01.037009187 +0000 -@@ -1,3 +1,6 @@ -+let ( |> ) a b = b a -+let ( @@ ) a b = a b -+ - open Unix - - open OPasswd diff --git a/SOURCES/oclock-1-cc-headers b/SOURCES/oclock-1-cc-headers deleted file mode 100644 index c2a89c62..00000000 --- a/SOURCES/oclock-1-cc-headers +++ /dev/null @@ -1,24 +0,0 @@ -commit 5ad1e94482756d991e578aabb96d180e108564e7 -Author: David Scott -Date: Wed May 29 10:12:24 2013 +0000 - - When ocaml is installed in an unusual location, help cc find the headers - - The problem is triggered by using an OCaml compiler installed from OPAM - where needs to be looked up relative to something like - - $HOME/.opam/4.00.1/lib/ocaml - -diff --git a/Makefile b/Makefile -index e2a0e14..b6d05c8 100644 ---- a/Makefile -+++ b/Makefile -@@ -32,7 +32,7 @@ OCAMLC += $(OCAMLBFLAGS) - OCAMLOPT += $(OCAMLOFLAGS) - OCAMLDEP += $(OCAMLDEPFLAGS) - --CFLAGS ?= -fPIC -+CFLAGS ?= -fPIC -I$(OCAMLLIBDIR) - CLIBS = rt pthread - # pthread seems necessary with some build of ocaml - diff --git a/SOURCES/oclock-2-destdir b/SOURCES/oclock-2-destdir deleted file mode 100644 index 048d7cfb..00000000 --- a/SOURCES/oclock-2-destdir +++ /dev/null @@ -1,40 +0,0 @@ -commit 1d9cee605159e8479113db781f2e5fcf6d894490 -Author: David Scott -Date: Wed May 29 10:18:26 2013 +0000 - - make install now understands DESTDIR - - This helps make binary packaging (e.g. RPM, deb, ...) easier. - -diff --git a/Makefile b/Makefile -index b6d05c8..89b6ba1 100644 ---- a/Makefile -+++ b/Makefile -@@ -26,6 +26,11 @@ OCAMLLIBDIR ?= $(shell ocamlc -where) - INSTALL_DIR ?= $(OCAMLLIBDIR)/oclock - STUBLIBS_DIR ?= $(OCAMLLIBDIR)/stublibs - -+OCAMLFIND_DESTDIR ?= -+ifneq "$(DESTDIR)" "" -+OCAMLFIND_DESTDIR := -destdir $(DESTDIR) -+endif -+ - ################################################################################ - - OCAMLC += $(OCAMLBFLAGS) -@@ -82,11 +87,11 @@ distclean: clean - # (Un)Install - install: all - ifdef OCAMLFIND -- $(OCAMLFIND) install oclock oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -dll dlloclock.so -+ $(OCAMLFIND) install oclock oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -dll dlloclock.so $(OCAMLFIND_DESTDIR) - else -- install -d $(INSTALL_DIR) -- install -t $(INSTALL_DIR) oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -- install -t $(STUBLIBS_DIR) dlloclock.so -+ install -d $(DESTDIR)$(INSTALL_DIR) -+ install -t $(DESTDIR)$(INSTALL_DIR) oclock.cma oclock.cmxa liboclock.a oclock.cmi oclock.a META -+ install -t $(DESTDIR)$(STUBLIBS_DIR) dlloclock.so - endif - - uninstall: diff --git a/SOURCES/omake-1-warnings b/SOURCES/omake-1-warnings deleted file mode 100644 index 18f61c9b..00000000 --- a/SOURCES/omake-1-warnings +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru old/OMakefile new/OMakefile ---- old/OMakefile -+++ new/OMakefile -@@ -57,7 +57,7 @@ - # - # OCaml options - # --OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z) -+OCAMLFLAGS[] += -w a - if $(THREADS_ENABLED) - OCAMLFLAGS += -thread - export diff --git a/SOURCES/react-LICENSE b/SOURCES/react-LICENSE deleted file mode 100644 index e46e4148..00000000 --- a/SOURCES/react-LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -(*---------------------------------------------------------------------------- - Copyright (c) 2009, Daniel C. Bünzli - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - - 3. Neither the name of the Daniel C. Bünzli nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------*) diff --git a/SOURCES/sm-path-fix.patch b/SOURCES/sm-path-fix.patch deleted file mode 100644 index 01cd4b18..00000000 --- a/SOURCES/sm-path-fix.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/drivers/SR.py b/drivers/SR.py -index 41c6ce7..c8ec2c8 100755 ---- a/drivers/SR.py -+++ b/drivers/SR.py -@@ -27,7 +27,7 @@ import copy, os - - MOUNT_BASE = '/var/run/sr-mount' - DEFAULT_TAP = 'vhd' --TAPDISK_UTIL = '/usr/sbin/td-util' -+TAPDISK_UTIL = '@LIBDIR@/blktap/sbin/td-util' - MASTER_LVM_CONF = '/etc/lvm/master' - - # LUN per VDI key for XenCenter -diff --git a/drivers/blktap2.py b/drivers/blktap2.py -index a0a25b3..f3029f7 100755 ---- a/drivers/blktap2.py -+++ b/drivers/blktap2.py -@@ -135,7 +135,7 @@ def retried(**args): return RetryLoop(**args) - class TapCtl(object): - """Tapdisk IPC utility calls.""" - -- PATH = "/usr/sbin/tap-ctl" -+ PATH = "@LIBDIR@/blktap/sbin/tap-ctl" - - def __init__(self, cmd, p): - self.cmd = cmd -diff --git a/drivers/vhdutil.py b/drivers/vhdutil.py -index 94696f7..ab6d444 100755 ---- a/drivers/vhdutil.py -+++ b/drivers/vhdutil.py -@@ -28,7 +28,7 @@ import re - - MAX_VHD_JOURNAL_SIZE = 6 * 1024 * 1024 # 2MB VHD block size, max 2TB VHD size - MAX_CHAIN_SIZE = 30 # max VHD parent chain size --VHD_UTIL = "/usr/bin/vhd-util" -+VHD_UTIL = "@LIBDIR@/blktap/bin/vhd-util" - OPT_LOG_ERR = "--debug" - VHD_BLOCK_SIZE = 2 * 1024 * 1024 - VHD_FOOTER_SIZE = 512 -@@ -324,7 +324,7 @@ def _parseVHDInfo(line, extractUuidFunction): - return vhdInfo - - def _getVHDParentNoCheck(path): -- cmd = ["vhd-util", "read", "-p", "-n", "%s" % path] -+ cmd = [VHD_UTIL, "read", "-p", "-n", "%s" % path] - text = util.pread(cmd) - util.SMlog(text) - for line in text.split('\n'): diff --git a/SOURCES/squeezed-conf b/SOURCES/squeezed-conf deleted file mode 100644 index 7f53269d..00000000 --- a/SOURCES/squeezed-conf +++ /dev/null @@ -1,23 +0,0 @@ -# Configuration file for squeezed - -log=syslog:squeezed -pidfile=/var/run/squeezed.pid - -# Omit some sources of log-spam by default -disable-logging-for=http - -# Host memory will be re-examined and possibly re-balanced -# every balance-check-interval -balance-check-interval=10 - -# Set to true if you want domain zero to be automatically ballooned -manage-domain-zero=true - -# If managing domain zero, we won't balloon lower than this value -# domain-zero-dynamic-min = 1073741824 - -# If managing domain zero, we won't balloon higher than this value -# 'auto' means use all available memory (where 'available' means -# available to domain 0, possibly constrained by the xen commandline) -# domain-zero-dynamic-max = auto - diff --git a/SOURCES/squeezed-init b/SOURCES/squeezed-init deleted file mode 100755 index 6e89cebf..00000000 --- a/SOURCES/squeezed-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# squeeze Startup script for memory ballooning daemon -# -# chkconfig: 2345 13 88 -# description: Manages host memory by ballooning VMs -### BEGIN INIT INFO -# Provides: squeezed -# Required-Start: $local_fs $network $syslog message-switch xenstored -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Memory ballooning daemon -# Description: Manages host memory by ballooning VMs -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/squeezed.pid - -prog=squeezed -exec=/usr/sbin/squeezed -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting squeezed: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $SQUEEZED_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down squeezed: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/uuidm.oasis.patch b/SOURCES/uuidm.oasis.patch deleted file mode 100644 index d2b9e0a6..00000000 --- a/SOURCES/uuidm.oasis.patch +++ /dev/null @@ -1,6603 +0,0 @@ -commit 039de2a1b73d78d64a9eaca73caf31153e1f256c -Author: David Scott -Date: Thu Jul 17 13:26:15 2014 +0000 - - oasis setup - - Signed-off-by: David Scott - -diff --git a/myocamlbuild.ml b/myocamlbuild.ml -new file mode 100644 -index 0000000..0fb9c7a ---- /dev/null -+++ b/myocamlbuild.ml -@@ -0,0 +1,491 @@ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 8a78a525f77580f9184e934558bad2c6) *) -+module OASISGettext = struct -+(* # 21 "src/oasis/OASISGettext.ml" *) -+ -+ let ns_ str = -+ str -+ -+ let s_ str = -+ str -+ -+ let f_ (str : ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ let init = -+ [] -+ -+end -+ -+module OASISExpr = struct -+(* # 21 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ open OASISGettext -+ -+ type test = string -+ -+ type flag = string -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+end -+ -+ -+# 117 "myocamlbuild.ml" -+module BaseEnvLight = struct -+(* # 21 "src/base/BaseEnvLight.ml" *) -+ -+ module MapString = Map.Make(String) -+ -+ type t = string MapString.t -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ let var_get name env = -+ let rec var_expand str = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ in -+ var_expand (MapString.find name env) -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 215 "myocamlbuild.ml" -+module MyOCamlbuildFindlib = struct -+(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) -+ -+ (** OCamlbuild extension, copied from -+ * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild -+ * by N. Pouillard and others -+ * -+ * Updated on 2009/02/28 -+ * -+ * Modified by Sylvain Le Gall -+ *) -+ open Ocamlbuild_plugin -+ -+ (* these functions are not really officially exported *) -+ let run_and_read = -+ Ocamlbuild_pack.My_unix.run_and_read -+ -+ let blank_sep_strings = -+ Ocamlbuild_pack.Lexers.blank_sep_strings -+ -+ let split s ch = -+ let x = -+ ref [] -+ in -+ let rec go s = -+ let pos = -+ String.index s ch -+ in -+ x := (String.before s pos)::!x; -+ go (String.after s (pos + 1)) -+ in -+ try -+ go s -+ with Not_found -> !x -+ -+ let split_nl s = split s '\n' -+ -+ let before_space s = -+ try -+ String.before s (String.index s ' ') -+ with Not_found -> s -+ -+ (* this lists all supported packages *) -+ let find_packages () = -+ List.map before_space (split_nl & run_and_read "ocamlfind list") -+ -+ (* this is supposed to list available syntaxes, but I don't know how to do it. *) -+ let find_syntaxes () = ["camlp4o"; "camlp4r"] -+ -+ (* ocamlfind command *) -+ let ocamlfind x = S[A"ocamlfind"; x] -+ -+ let dispatch = -+ function -+ | Before_options -> -+ (* by using Before_options one let command line options have an higher priority *) -+ (* on the contrary using After_options will guarantee to have the higher priority *) -+ (* override default commands by ocamlfind ones *) -+ Options.ocamlc := ocamlfind & A"ocamlc"; -+ Options.ocamlopt := ocamlfind & A"ocamlopt"; -+ Options.ocamldep := ocamlfind & A"ocamldep"; -+ Options.ocamldoc := ocamlfind & A"ocamldoc"; -+ Options.ocamlmktop := ocamlfind & A"ocamlmktop" -+ -+ | After_rules -> -+ -+ (* When one link an OCaml library/binary/package, one should use -linkpkg *) -+ flag ["ocaml"; "link"; "program"] & A"-linkpkg"; -+ -+ (* For each ocamlfind package one inject the -package option when -+ * compiling, computing dependencies, generating documentation and -+ * linking. *) -+ List.iter -+ begin fun pkg -> -+ flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg]; -+ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg]; -+ flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg]; -+ flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; -+ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg]; -+ end -+ (find_packages ()); -+ -+ (* Like -package but for extensions syntax. Morover -syntax is useless -+ * when linking. *) -+ List.iter begin fun syntax -> -+ flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; -+ end (find_syntaxes ()); -+ -+ (* The default "thread" tag is not compatible with ocamlfind. -+ * Indeed, the default rules add the "threads.cma" or "threads.cmxa" -+ * options when using this tag. When using the "-linkpkg" option with -+ * ocamlfind, this module will then be added twice on the command line. -+ * -+ * To solve this, one approach is to add the "-thread" option when using -+ * the "threads" package using the previous plugin. -+ *) -+ flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); -+ flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); -+ flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]) -+ -+ | _ -> -+ () -+ -+end -+ -+module MyOCamlbuildBase = struct -+(* # 21 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ (** Base functions for writing myocamlbuild.ml -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ open Ocamlbuild_plugin -+ module OC = Ocamlbuild_pack.Ocaml_compiler -+ -+ type dir = string -+ type file = string -+ type name = string -+ type tag = string -+ -+(* # 56 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) -+ -+ type t = -+ { -+ lib_ocaml: (name * dir list) list; -+ lib_c: (name * dir * file list) list; -+ flags: (tag list * (spec OASISExpr.choices)) list; -+ (* Replace the 'dir: include' from _tags by a precise interdepends in -+ * directory. -+ *) -+ includes: (dir * dir list) list; -+ } -+ -+ let env_filename = -+ Pathname.basename -+ BaseEnvLight.default_filename -+ -+ let dispatch_combine lst = -+ fun e -> -+ List.iter -+ (fun dispatch -> dispatch e) -+ lst -+ -+ let tag_libstubs nm = -+ "use_lib"^nm^"_stubs" -+ -+ let nm_libstubs nm = -+ nm^"_stubs" -+ -+ let dispatch t e = -+ let env = -+ BaseEnvLight.load -+ ~filename:env_filename -+ ~allow_empty:true -+ () -+ in -+ match e with -+ | Before_options -> -+ let no_trailing_dot s = -+ if String.length s >= 1 && s.[0] = '.' then -+ String.sub s 1 ((String.length s) - 1) -+ else -+ s -+ in -+ List.iter -+ (fun (opt, var) -> -+ try -+ opt := no_trailing_dot (BaseEnvLight.var_get var env) -+ with Not_found -> -+ Printf.eprintf "W: Cannot get variable %s" var) -+ [ -+ Options.ext_obj, "ext_obj"; -+ Options.ext_lib, "ext_lib"; -+ Options.ext_dll, "ext_dll"; -+ ] -+ -+ | After_rules -> -+ (* Declare OCaml libraries *) -+ List.iter -+ (function -+ | nm, [] -> -+ ocaml_lib nm -+ | nm, dir :: tl -> -+ ocaml_lib ~dir:dir (dir^"/"^nm); -+ List.iter -+ (fun dir -> -+ List.iter -+ (fun str -> -+ flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) -+ ["compile"; "infer_interface"; "doc"]) -+ tl) -+ t.lib_ocaml; -+ -+ (* Declare directories dependencies, replace "include" in _tags. *) -+ List.iter -+ (fun (dir, include_dirs) -> -+ Pathname.define_context dir include_dirs) -+ t.includes; -+ -+ (* Declare C libraries *) -+ List.iter -+ (fun (lib, dir, headers) -> -+ (* Handle C part of library *) -+ flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; -+ A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] -+ (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); -+ -+ flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] -+ (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); -+ -+ (* When ocaml link something that use the C library, then one -+ need that file to be up to date. -+ *) -+ dep ["link"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ dep ["compile"; "ocaml"; "program"; tag_libstubs lib] -+ [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; -+ -+ (* TODO: be more specific about what depends on headers *) -+ (* Depends on .h files *) -+ dep ["compile"; "c"] -+ headers; -+ -+ (* Setup search path for lib *) -+ flag ["link"; "ocaml"; "use_"^lib] -+ (S[A"-I"; P(dir)]); -+ ) -+ t.lib_c; -+ -+ (* Add flags *) -+ List.iter -+ (fun (tags, cond_specs) -> -+ let spec = -+ BaseEnvLight.var_choose cond_specs env -+ in -+ flag tags & spec) -+ t.flags -+ | _ -> -+ () -+ -+ let dispatch_default t = -+ dispatch_combine -+ [ -+ dispatch t; -+ MyOCamlbuildFindlib.dispatch; -+ ] -+ -+end -+ -+ -+# 476 "myocamlbuild.ml" -+open Ocamlbuild_plugin;; -+let package_default = -+ { -+ MyOCamlbuildBase.lib_ocaml = [("uuidm", ["src"])]; -+ lib_c = []; -+ flags = []; -+ includes = [("test", ["src"])] -+ } -+ ;; -+ -+let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; -+ -+# 490 "myocamlbuild.ml" -+(* OASIS_STOP *) -+Ocamlbuild_plugin.dispatch dispatch_default;; -diff --git a/setup.ml b/setup.ml -new file mode 100644 -index 0000000..2cfe53d ---- /dev/null -+++ b/setup.ml -@@ -0,0 +1,6065 @@ -+(* setup.ml generated for the first time by OASIS v0.3.0 *) -+ -+(* OASIS_START *) -+(* DO NOT EDIT (digest: 5005cd3dc663da22ce3c2b75ec873020) *) -+(* -+ Regenerated by OASIS v0.3.0 -+ Visit http://oasis.forge.ocamlcore.org for more information and -+ documentation about functions used in this file. -+*) -+module OASISGettext = struct -+(* # 21 "src/oasis/OASISGettext.ml" *) -+ -+ let ns_ str = -+ str -+ -+ let s_ str = -+ str -+ -+ let f_ (str : ('a, 'b, 'c, 'd) format4) = -+ str -+ -+ let fn_ fmt1 fmt2 n = -+ if n = 1 then -+ fmt1^^"" -+ else -+ fmt2^^"" -+ -+ let init = -+ [] -+ -+end -+ -+module OASISContext = struct -+(* # 21 "src/oasis/OASISContext.ml" *) -+ -+ open OASISGettext -+ -+ type level = -+ [ `Debug -+ | `Info -+ | `Warning -+ | `Error] -+ -+ type t = -+ { -+ quiet: bool; -+ info: bool; -+ debug: bool; -+ ignore_plugins: bool; -+ ignore_unknown_fields: bool; -+ printf: level -> string -> unit; -+ } -+ -+ let printf lvl str = -+ let beg = -+ match lvl with -+ | `Error -> s_ "E: " -+ | `Warning -> s_ "W: " -+ | `Info -> s_ "I: " -+ | `Debug -> s_ "D: " -+ in -+ prerr_endline (beg^str) -+ -+ let default = -+ ref -+ { -+ quiet = false; -+ info = false; -+ debug = false; -+ ignore_plugins = false; -+ ignore_unknown_fields = false; -+ printf = printf; -+ } -+ -+ let quiet = -+ {!default with quiet = true} -+ -+ -+ let args () = -+ ["-quiet", -+ Arg.Unit (fun () -> default := {!default with quiet = true}), -+ (s_ " Run quietly"); -+ -+ "-info", -+ Arg.Unit (fun () -> default := {!default with info = true}), -+ (s_ " Display information message"); -+ -+ -+ "-debug", -+ Arg.Unit (fun () -> default := {!default with debug = true}), -+ (s_ " Output debug message")] -+end -+ -+module OASISString = struct -+(* # 1 "src/oasis/OASISString.ml" *) -+ -+ -+ -+ (** Various string utilities. -+ -+ Mostly inspired by extlib and batteries ExtString and BatString libraries. -+ -+ @author Sylvain Le Gall -+ *) -+ -+ let nsplitf str f = -+ if str = "" then -+ [] -+ else -+ let buf = Buffer.create 13 in -+ let lst = ref [] in -+ let push () = -+ lst := Buffer.contents buf :: !lst; -+ Buffer.clear buf -+ in -+ let str_len = String.length str in -+ for i = 0 to str_len - 1 do -+ if f str.[i] then -+ push () -+ else -+ Buffer.add_char buf str.[i] -+ done; -+ push (); -+ List.rev !lst -+ -+ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the -+ separator. -+ *) -+ let nsplit str c = -+ nsplitf str ((=) c) -+ -+ let find ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ while !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ what_idx := 0; -+ incr str_idx -+ done; -+ if !what_idx <> String.length what then -+ raise Not_found -+ else -+ !str_idx - !what_idx -+ -+ let sub_start str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str len (str_len - len) -+ -+ let sub_end ?(offset=0) str len = -+ let str_len = String.length str in -+ if len >= str_len then -+ "" -+ else -+ String.sub str 0 (str_len - len) -+ -+ let starts_with ~what ?(offset=0) str = -+ let what_idx = ref 0 in -+ let str_idx = ref offset in -+ let ok = ref true in -+ while !ok && -+ !str_idx < String.length str && -+ !what_idx < String.length what do -+ if str.[!str_idx] = what.[!what_idx] then -+ incr what_idx -+ else -+ ok := false; -+ incr str_idx -+ done; -+ if !what_idx = String.length what then -+ true -+ else -+ false -+ -+ let strip_starts_with ~what str = -+ if starts_with ~what str then -+ sub_start str (String.length what) -+ else -+ raise Not_found -+ -+ let ends_with ~what ?(offset=0) str = -+ let what_idx = ref ((String.length what) - 1) in -+ let str_idx = ref ((String.length str) - 1) in -+ let ok = ref true in -+ while !ok && -+ offset <= !str_idx && -+ 0 <= !what_idx do -+ if str.[!str_idx] = what.[!what_idx] then -+ decr what_idx -+ else -+ ok := false; -+ decr str_idx -+ done; -+ if !what_idx = -1 then -+ true -+ else -+ false -+ -+ let strip_ends_with ~what str = -+ if ends_with ~what str then -+ sub_end str (String.length what) -+ else -+ raise Not_found -+ -+ let replace_chars f s = -+ let buf = String.make (String.length s) 'X' in -+ for i = 0 to String.length s - 1 do -+ buf.[i] <- f s.[i] -+ done; -+ buf -+ -+end -+ -+module OASISUtils = struct -+(* # 21 "src/oasis/OASISUtils.ml" *) -+ -+ open OASISGettext -+ -+ module MapString = Map.Make(String) -+ -+ let map_string_of_assoc assoc = -+ List.fold_left -+ (fun acc (k, v) -> MapString.add k v acc) -+ MapString.empty -+ assoc -+ -+ module SetString = Set.Make(String) -+ -+ let set_string_add_list st lst = -+ List.fold_left -+ (fun acc e -> SetString.add e acc) -+ st -+ lst -+ -+ let set_string_of_list = -+ set_string_add_list -+ SetString.empty -+ -+ -+ let compare_csl s1 s2 = -+ String.compare (String.lowercase s1) (String.lowercase s2) -+ -+ module HashStringCsl = -+ Hashtbl.Make -+ (struct -+ type t = string -+ -+ let equal s1 s2 = -+ (String.lowercase s1) = (String.lowercase s2) -+ -+ let hash s = -+ Hashtbl.hash (String.lowercase s) -+ end) -+ -+ let varname_of_string ?(hyphen='_') s = -+ if String.length s = 0 then -+ begin -+ invalid_arg "varname_of_string" -+ end -+ else -+ begin -+ let buf = -+ OASISString.replace_chars -+ (fun c -> -+ if ('a' <= c && c <= 'z') -+ || -+ ('A' <= c && c <= 'Z') -+ || -+ ('0' <= c && c <= '9') then -+ c -+ else -+ hyphen) -+ s; -+ in -+ let buf = -+ (* Start with a _ if digit *) -+ if '0' <= s.[0] && s.[0] <= '9' then -+ "_"^buf -+ else -+ buf -+ in -+ String.lowercase buf -+ end -+ -+ let varname_concat ?(hyphen='_') p s = -+ let what = String.make 1 hyphen in -+ let p = -+ try -+ OASISString.strip_ends_with ~what p -+ with Not_found -> -+ p -+ in -+ let s = -+ try -+ OASISString.strip_starts_with ~what s -+ with Not_found -> -+ s -+ in -+ p^what^s -+ -+ -+ let is_varname str = -+ str = varname_of_string str -+ -+ let failwithf fmt = Printf.ksprintf failwith fmt -+ -+end -+ -+module PropList = struct -+(* # 21 "src/oasis/PropList.ml" *) -+ -+ open OASISGettext -+ -+ type name = string -+ -+ exception Not_set of name * string option -+ exception No_printer of name -+ exception Unknown_field of name * name -+ -+ let () = -+ Printexc.register_printer -+ (function -+ | Not_set (nm, Some rsn) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn) -+ | Not_set (nm, None) -> -+ Some -+ (Printf.sprintf (f_ "Field '%s' is not set") nm) -+ | No_printer nm -> -+ Some -+ (Printf.sprintf (f_ "No default printer for value %s") nm) -+ | Unknown_field (nm, schm) -> -+ Some -+ (Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm) -+ | _ -> -+ None) -+ -+ module Data = -+ struct -+ -+ type t = -+ (name, unit -> unit) Hashtbl.t -+ -+ let create () = -+ Hashtbl.create 13 -+ -+ let clear t = -+ Hashtbl.clear t -+ -+(* # 71 "src/oasis/PropList.ml" *) -+ end -+ -+ module Schema = -+ struct -+ -+ type ('ctxt, 'extra) value = -+ { -+ get: Data.t -> string; -+ set: Data.t -> ?context:'ctxt -> string -> unit; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ type ('ctxt, 'extra) t = -+ { -+ name: name; -+ fields: (name, ('ctxt, 'extra) value) Hashtbl.t; -+ order: name Queue.t; -+ name_norm: string -> string; -+ } -+ -+ let create ?(case_insensitive=false) nm = -+ { -+ name = nm; -+ fields = Hashtbl.create 13; -+ order = Queue.create (); -+ name_norm = -+ (if case_insensitive then -+ String.lowercase -+ else -+ fun s -> s); -+ } -+ -+ let add t nm set get extra help = -+ let key = -+ t.name_norm nm -+ in -+ -+ if Hashtbl.mem t.fields key then -+ failwith -+ (Printf.sprintf -+ (f_ "Field '%s' is already defined in schema '%s'") -+ nm t.name); -+ Hashtbl.add -+ t.fields -+ key -+ { -+ set = set; -+ get = get; -+ help = help; -+ extra = extra; -+ }; -+ Queue.add nm t.order -+ -+ let mem t nm = -+ Hashtbl.mem t.fields nm -+ -+ let find t nm = -+ try -+ Hashtbl.find t.fields (t.name_norm nm) -+ with Not_found -> -+ raise (Unknown_field (nm, t.name)) -+ -+ let get t data nm = -+ (find t nm).get data -+ -+ let set t data nm ?context x = -+ (find t nm).set -+ data -+ ?context -+ x -+ -+ let fold f acc t = -+ Queue.fold -+ (fun acc k -> -+ let v = -+ find t k -+ in -+ f acc k v.extra v.help) -+ acc -+ t.order -+ -+ let iter f t = -+ fold -+ (fun () -> f) -+ () -+ t -+ -+ let name t = -+ t.name -+ end -+ -+ module Field = -+ struct -+ -+ type ('ctxt, 'value, 'extra) t = -+ { -+ set: Data.t -> ?context:'ctxt -> 'value -> unit; -+ get: Data.t -> 'value; -+ sets: Data.t -> ?context:'ctxt -> string -> unit; -+ gets: Data.t -> string; -+ help: (unit -> string) option; -+ extra: 'extra; -+ } -+ -+ let new_id = -+ let last_id = -+ ref 0 -+ in -+ fun () -> incr last_id; !last_id -+ -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ (* Default value container *) -+ let v = -+ ref None -+ in -+ -+ (* If name is not given, create unique one *) -+ let nm = -+ match name with -+ | Some s -> s -+ | None -> Printf.sprintf "_anon_%d" (new_id ()) -+ in -+ -+ (* Last chance to get a value: the default *) -+ let default () = -+ match default with -+ | Some d -> d -+ | None -> raise (Not_set (nm, Some (s_ "no default value"))) -+ in -+ -+ (* Get data *) -+ let get data = -+ (* Get value *) -+ try -+ (Hashtbl.find data nm) (); -+ match !v with -+ | Some x -> x -+ | None -> default () -+ with Not_found -> -+ default () -+ in -+ -+ (* Set data *) -+ let set data ?context x = -+ let x = -+ match update with -+ | Some f -> -+ begin -+ try -+ f ?context (get data) x -+ with Not_set _ -> -+ x -+ end -+ | None -> -+ x -+ in -+ Hashtbl.replace -+ data -+ nm -+ (fun () -> v := Some x) -+ in -+ -+ (* Parse string value, if possible *) -+ let parse = -+ match parse with -+ | Some f -> -+ f -+ | None -> -+ fun ?context s -> -+ failwith -+ (Printf.sprintf -+ (f_ "Cannot parse field '%s' when setting value %S") -+ nm -+ s) -+ in -+ -+ (* Set data, from string *) -+ let sets data ?context s = -+ set ?context data (parse ?context s) -+ in -+ -+ (* Output value as string, if possible *) -+ let print = -+ match print with -+ | Some f -> -+ f -+ | None -> -+ fun _ -> raise (No_printer nm) -+ in -+ -+ (* Get data, as a string *) -+ let gets data = -+ print (get data) -+ in -+ -+ begin -+ match schema with -+ | Some t -> -+ Schema.add t nm sets gets extra help -+ | None -> -+ () -+ end; -+ -+ { -+ set = set; -+ get = get; -+ sets = sets; -+ gets = gets; -+ help = help; -+ extra = extra; -+ } -+ -+ let fset data t ?context x = -+ t.set data ?context x -+ -+ let fget data t = -+ t.get data -+ -+ let fsets data t ?context s = -+ t.sets data ?context s -+ -+ let fgets data t = -+ t.gets data -+ -+ end -+ -+ module FieldRO = -+ struct -+ -+ let create ?schema ?name ?parse ?print ?default ?update ?help extra = -+ let fld = -+ Field.create ?schema ?name ?parse ?print ?default ?update ?help extra -+ in -+ fun data -> Field.fget data fld -+ -+ end -+end -+ -+module OASISMessage = struct -+(* # 21 "src/oasis/OASISMessage.ml" *) -+ -+ -+ open OASISGettext -+ open OASISContext -+ -+ let generic_message ~ctxt lvl fmt = -+ let cond = -+ if ctxt.quiet then -+ false -+ else -+ match lvl with -+ | `Debug -> ctxt.debug -+ | `Info -> ctxt.info -+ | _ -> true -+ in -+ Printf.ksprintf -+ (fun str -> -+ if cond then -+ begin -+ ctxt.printf lvl str -+ end) -+ fmt -+ -+ let debug ~ctxt fmt = -+ generic_message ~ctxt `Debug fmt -+ -+ let info ~ctxt fmt = -+ generic_message ~ctxt `Info fmt -+ -+ let warning ~ctxt fmt = -+ generic_message ~ctxt `Warning fmt -+ -+ let error ~ctxt fmt = -+ generic_message ~ctxt `Error fmt -+ -+end -+ -+module OASISVersion = struct -+(* # 21 "src/oasis/OASISVersion.ml" *) -+ -+ open OASISGettext -+ -+ -+ -+ type s = string -+ -+ type t = string -+ -+ type comparator = -+ | VGreater of t -+ | VGreaterEqual of t -+ | VEqual of t -+ | VLesser of t -+ | VLesserEqual of t -+ | VOr of comparator * comparator -+ | VAnd of comparator * comparator -+ -+ -+ (* Range of allowed characters *) -+ let is_digit c = -+ '0' <= c && c <= '9' -+ -+ let is_alpha c = -+ ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') -+ -+ let is_special = -+ function -+ | '.' | '+' | '-' | '~' -> true -+ | _ -> false -+ -+ let rec version_compare v1 v2 = -+ if v1 <> "" || v2 <> "" then -+ begin -+ (* Compare ascii string, using special meaning for version -+ * related char -+ *) -+ let val_ascii c = -+ if c = '~' then -1 -+ else if is_digit c then 0 -+ else if c = '\000' then 0 -+ else if is_alpha c then Char.code c -+ else (Char.code c) + 256 -+ in -+ -+ let len1 = String.length v1 in -+ let len2 = String.length v2 in -+ -+ let p = ref 0 in -+ -+ (** Compare ascii part *) -+ let compare_vascii () = -+ let cmp = ref 0 in -+ while !cmp = 0 && -+ !p < len1 && !p < len2 && -+ not (is_digit v1.[!p] && is_digit v2.[!p]) do -+ cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); -+ incr p -+ done; -+ if !cmp = 0 && !p < len1 && !p = len2 then -+ val_ascii v1.[!p] -+ else if !cmp = 0 && !p = len1 && !p < len2 then -+ - (val_ascii v2.[!p]) -+ else -+ !cmp -+ in -+ -+ (** Compare digit part *) -+ let compare_digit () = -+ let extract_int v p = -+ let start_p = !p in -+ while !p < String.length v && is_digit v.[!p] do -+ incr p -+ done; -+ let substr = -+ String.sub v !p ((String.length v) - !p) -+ in -+ let res = -+ match String.sub v start_p (!p - start_p) with -+ | "" -> 0 -+ | s -> int_of_string s -+ in -+ res, substr -+ in -+ let i1, tl1 = extract_int v1 (ref !p) in -+ let i2, tl2 = extract_int v2 (ref !p) in -+ i1 - i2, tl1, tl2 -+ in -+ -+ match compare_vascii () with -+ | 0 -> -+ begin -+ match compare_digit () with -+ | 0, tl1, tl2 -> -+ if tl1 <> "" && is_digit tl1.[0] then -+ 1 -+ else if tl2 <> "" && is_digit tl2.[0] then -+ -1 -+ else -+ version_compare tl1 tl2 -+ | n, _, _ -> -+ n -+ end -+ | n -> -+ n -+ end -+ else -+ begin -+ 0 -+ end -+ -+ -+ let version_of_string str = str -+ -+ let string_of_version t = t -+ -+ let chop t = -+ try -+ let pos = -+ String.rindex t '.' -+ in -+ String.sub t 0 pos -+ with Not_found -> -+ t -+ -+ let rec comparator_apply v op = -+ match op with -+ | VGreater cv -> -+ (version_compare v cv) > 0 -+ | VGreaterEqual cv -> -+ (version_compare v cv) >= 0 -+ | VLesser cv -> -+ (version_compare v cv) < 0 -+ | VLesserEqual cv -> -+ (version_compare v cv) <= 0 -+ | VEqual cv -> -+ (version_compare v cv) = 0 -+ | VOr (op1, op2) -> -+ (comparator_apply v op1) || (comparator_apply v op2) -+ | VAnd (op1, op2) -> -+ (comparator_apply v op1) && (comparator_apply v op2) -+ -+ let rec string_of_comparator = -+ function -+ | VGreater v -> "> "^(string_of_version v) -+ | VEqual v -> "= "^(string_of_version v) -+ | VLesser v -> "< "^(string_of_version v) -+ | VGreaterEqual v -> ">= "^(string_of_version v) -+ | VLesserEqual v -> "<= "^(string_of_version v) -+ | VOr (c1, c2) -> -+ (string_of_comparator c1)^" || "^(string_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (string_of_comparator c1)^" && "^(string_of_comparator c2) -+ -+ let rec varname_of_comparator = -+ let concat p v = -+ OASISUtils.varname_concat -+ p -+ (OASISUtils.varname_of_string -+ (string_of_version v)) -+ in -+ function -+ | VGreater v -> concat "gt" v -+ | VLesser v -> concat "lt" v -+ | VEqual v -> concat "eq" v -+ | VGreaterEqual v -> concat "ge" v -+ | VLesserEqual v -> concat "le" v -+ | VOr (c1, c2) -> -+ (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) -+ | VAnd (c1, c2) -> -+ (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) -+ -+ let version_0_3_or_after t = -+ comparator_apply t (VGreaterEqual (string_of_version "0.3")) -+ -+end -+ -+module OASISLicense = struct -+(* # 21 "src/oasis/OASISLicense.ml" *) -+ -+ (** License for _oasis fields -+ @author Sylvain Le Gall -+ *) -+ -+ -+ -+ type license = string -+ -+ type license_exception = string -+ -+ type license_version = -+ | Version of OASISVersion.t -+ | VersionOrLater of OASISVersion.t -+ | NoVersion -+ -+ -+ type license_dep_5_unit = -+ { -+ license: license; -+ excption: license_exception option; -+ version: license_version; -+ } -+ -+ -+ type license_dep_5 = -+ | DEP5Unit of license_dep_5_unit -+ | DEP5Or of license_dep_5 list -+ | DEP5And of license_dep_5 list -+ -+ -+ type t = -+ | DEP5License of license_dep_5 -+ | OtherLicense of string (* URL *) -+ -+ -+end -+ -+module OASISExpr = struct -+(* # 21 "src/oasis/OASISExpr.ml" *) -+ -+ -+ -+ open OASISGettext -+ -+ type test = string -+ -+ type flag = string -+ -+ type t = -+ | EBool of bool -+ | ENot of t -+ | EAnd of t * t -+ | EOr of t * t -+ | EFlag of flag -+ | ETest of test * string -+ -+ -+ type 'a choices = (t * 'a) list -+ -+ let eval var_get t = -+ let rec eval' = -+ function -+ | EBool b -> -+ b -+ -+ | ENot e -> -+ not (eval' e) -+ -+ | EAnd (e1, e2) -> -+ (eval' e1) && (eval' e2) -+ -+ | EOr (e1, e2) -> -+ (eval' e1) || (eval' e2) -+ -+ | EFlag nm -> -+ let v = -+ var_get nm -+ in -+ assert(v = "true" || v = "false"); -+ (v = "true") -+ -+ | ETest (nm, vl) -> -+ let v = -+ var_get nm -+ in -+ (v = vl) -+ in -+ eval' t -+ -+ let choose ?printer ?name var_get lst = -+ let rec choose_aux = -+ function -+ | (cond, vl) :: tl -> -+ if eval var_get cond then -+ vl -+ else -+ choose_aux tl -+ | [] -> -+ let str_lst = -+ if lst = [] then -+ s_ "" -+ else -+ String.concat -+ (s_ ", ") -+ (List.map -+ (fun (cond, vl) -> -+ match printer with -+ | Some p -> p vl -+ | None -> s_ "") -+ lst) -+ in -+ match name with -+ | Some nm -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for the choice list '%s': %s") -+ nm str_lst) -+ | None -> -+ failwith -+ (Printf.sprintf -+ (f_ "No result for a choice list: %s") -+ str_lst) -+ in -+ choose_aux (List.rev lst) -+ -+end -+ -+module OASISTypes = struct -+(* # 21 "src/oasis/OASISTypes.ml" *) -+ -+ -+ -+ -+ type name = string -+ type package_name = string -+ type url = string -+ type unix_dirname = string -+ type unix_filename = string -+ type host_dirname = string -+ type host_filename = string -+ type prog = string -+ type arg = string -+ type args = string list -+ type command_line = (prog * arg list) -+ -+ type findlib_name = string -+ type findlib_full = string -+ -+ type compiled_object = -+ | Byte -+ | Native -+ | Best -+ -+ -+ type dependency = -+ | FindlibPackage of findlib_full * OASISVersion.comparator option -+ | InternalLibrary of name -+ -+ -+ type tool = -+ | ExternalTool of name -+ | InternalExecutable of name -+ -+ -+ type vcs = -+ | Darcs -+ | Git -+ | Svn -+ | Cvs -+ | Hg -+ | Bzr -+ | Arch -+ | Monotone -+ | OtherVCS of url -+ -+ -+ type plugin_kind = -+ [ `Configure -+ | `Build -+ | `Doc -+ | `Test -+ | `Install -+ | `Extra -+ ] -+ -+ type plugin_data_purpose = -+ [ `Configure -+ | `Build -+ | `Install -+ | `Clean -+ | `Distclean -+ | `Install -+ | `Uninstall -+ | `Test -+ | `Doc -+ | `Extra -+ | `Other of string -+ ] -+ -+ type 'a plugin = 'a * name * OASISVersion.t option -+ -+ type all_plugin = plugin_kind plugin -+ -+ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list -+ -+(* # 102 "src/oasis/OASISTypes.ml" *) -+ -+ type 'a conditional = 'a OASISExpr.choices -+ -+ type custom = -+ { -+ pre_command: (command_line option) conditional; -+ post_command: (command_line option) conditional; -+ } -+ -+ -+ type common_section = -+ { -+ cs_name: name; -+ cs_data: PropList.Data.t; -+ cs_plugin_data: plugin_data; -+ } -+ -+ -+ type build_section = -+ { -+ bs_build: bool conditional; -+ bs_install: bool conditional; -+ bs_path: unix_dirname; -+ bs_compiled_object: compiled_object; -+ bs_build_depends: dependency list; -+ bs_build_tools: tool list; -+ bs_c_sources: unix_filename list; -+ bs_data_files: (unix_filename * unix_filename option) list; -+ bs_ccopt: args conditional; -+ bs_cclib: args conditional; -+ bs_dlllib: args conditional; -+ bs_dllpath: args conditional; -+ bs_byteopt: args conditional; -+ bs_nativeopt: args conditional; -+ } -+ -+ -+ type library = -+ { -+ lib_modules: string list; -+ lib_pack: bool; -+ lib_internal_modules: string list; -+ lib_findlib_parent: findlib_name option; -+ lib_findlib_name: findlib_name option; -+ lib_findlib_containers: findlib_name list; -+ } -+ -+ type executable = -+ { -+ exec_custom: bool; -+ exec_main_is: unix_filename; -+ } -+ -+ type flag = -+ { -+ flag_description: string option; -+ flag_default: bool conditional; -+ } -+ -+ type source_repository = -+ { -+ src_repo_type: vcs; -+ src_repo_location: url; -+ src_repo_browser: url option; -+ src_repo_module: string option; -+ src_repo_branch: string option; -+ src_repo_tag: string option; -+ src_repo_subdir: unix_filename option; -+ } -+ -+ type test = -+ { -+ test_type: [`Test] plugin; -+ test_command: command_line conditional; -+ test_custom: custom; -+ test_working_directory: unix_filename option; -+ test_run: bool conditional; -+ test_tools: tool list; -+ } -+ -+ type doc_format = -+ | HTML of unix_filename -+ | DocText -+ | PDF -+ | PostScript -+ | Info of unix_filename -+ | DVI -+ | OtherDoc -+ -+ -+ type doc = -+ { -+ doc_type: [`Doc] plugin; -+ doc_custom: custom; -+ doc_build: bool conditional; -+ doc_install: bool conditional; -+ doc_install_dir: unix_filename; -+ doc_title: string; -+ doc_authors: string list; -+ doc_abstract: string option; -+ doc_format: doc_format; -+ doc_data_files: (unix_filename * unix_filename option) list; -+ doc_build_tools: tool list; -+ } -+ -+ type section = -+ | Library of common_section * build_section * library -+ | Executable of common_section * build_section * executable -+ | Flag of common_section * flag -+ | SrcRepo of common_section * source_repository -+ | Test of common_section * test -+ | Doc of common_section * doc -+ -+ -+ type section_kind = -+ [ `Library | `Executable | `Flag | `SrcRepo | `Test | `Doc ] -+ -+ type package = -+ { -+ oasis_version: OASISVersion.t; -+ ocaml_version: OASISVersion.comparator option; -+ findlib_version: OASISVersion.comparator option; -+ name: package_name; -+ version: OASISVersion.t; -+ license: OASISLicense.t; -+ license_file: unix_filename option; -+ copyrights: string list; -+ maintainers: string list; -+ authors: string list; -+ homepage: url option; -+ synopsis: string; -+ description: string option; -+ categories: url list; -+ -+ conf_type: [`Configure] plugin; -+ conf_custom: custom; -+ -+ build_type: [`Build] plugin; -+ build_custom: custom; -+ -+ install_type: [`Install] plugin; -+ install_custom: custom; -+ uninstall_custom: custom; -+ -+ clean_custom: custom; -+ distclean_custom: custom; -+ -+ files_ab: unix_filename list; -+ sections: section list; -+ plugins: [`Extra] plugin list; -+ schema_data: PropList.Data.t; -+ plugin_data: plugin_data; -+ } -+ -+end -+ -+module OASISUnixPath = struct -+(* # 21 "src/oasis/OASISUnixPath.ml" *) -+ -+ type unix_filename = string -+ type unix_dirname = string -+ -+ type host_filename = string -+ type host_dirname = string -+ -+ let current_dir_name = "." -+ -+ let parent_dir_name = ".." -+ -+ let is_current_dir fn = -+ fn = current_dir_name || fn = "" -+ -+ let concat f1 f2 = -+ if is_current_dir f1 then -+ f2 -+ else -+ let f1' = -+ try OASISString.strip_ends_with ~what:"/" f1 with Not_found -> f1 -+ in -+ f1'^"/"^f2 -+ -+ let make = -+ function -+ | hd :: tl -> -+ List.fold_left -+ (fun f p -> concat f p) -+ hd -+ tl -+ | [] -> -+ invalid_arg "OASISUnixPath.make" -+ -+ let dirname f = -+ try -+ String.sub f 0 (String.rindex f '/') -+ with Not_found -> -+ current_dir_name -+ -+ let basename f = -+ try -+ let pos_start = -+ (String.rindex f '/') + 1 -+ in -+ String.sub f pos_start ((String.length f) - pos_start) -+ with Not_found -> -+ f -+ -+ let chop_extension f = -+ try -+ let last_dot = -+ String.rindex f '.' -+ in -+ let sub = -+ String.sub f 0 last_dot -+ in -+ try -+ let last_slash = -+ String.rindex f '/' -+ in -+ if last_slash < last_dot then -+ sub -+ else -+ f -+ with Not_found -> -+ sub -+ -+ with Not_found -> -+ f -+ -+ let capitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.capitalize base) -+ -+ let uncapitalize_file f = -+ let dir = dirname f in -+ let base = basename f in -+ concat dir (String.uncapitalize base) -+ -+end -+ -+module OASISHostPath = struct -+(* # 21 "src/oasis/OASISHostPath.ml" *) -+ -+ -+ open Filename -+ -+ module Unix = OASISUnixPath -+ -+ let make = -+ function -+ | [] -> -+ invalid_arg "OASISHostPath.make" -+ | hd :: tl -> -+ List.fold_left Filename.concat hd tl -+ -+ let of_unix ufn = -+ if Sys.os_type = "Unix" then -+ ufn -+ else -+ make -+ (List.map -+ (fun p -> -+ if p = Unix.current_dir_name then -+ current_dir_name -+ else if p = Unix.parent_dir_name then -+ parent_dir_name -+ else -+ p) -+ (OASISString.nsplit ufn '/')) -+ -+ -+end -+ -+module OASISSection = struct -+(* # 21 "src/oasis/OASISSection.ml" *) -+ -+ open OASISTypes -+ -+ let section_kind_common = -+ function -+ | Library (cs, _, _) -> -+ `Library, cs -+ | Executable (cs, _, _) -> -+ `Executable, cs -+ | Flag (cs, _) -> -+ `Flag, cs -+ | SrcRepo (cs, _) -> -+ `SrcRepo, cs -+ | Test (cs, _) -> -+ `Test, cs -+ | Doc (cs, _) -> -+ `Doc, cs -+ -+ let section_common sct = -+ snd (section_kind_common sct) -+ -+ let section_common_set cs = -+ function -+ | Library (_, bs, lib) -> Library (cs, bs, lib) -+ | Executable (_, bs, exec) -> Executable (cs, bs, exec) -+ | Flag (_, flg) -> Flag (cs, flg) -+ | SrcRepo (_, src_repo) -> SrcRepo (cs, src_repo) -+ | Test (_, tst) -> Test (cs, tst) -+ | Doc (_, doc) -> Doc (cs, doc) -+ -+ (** Key used to identify section -+ *) -+ let section_id sct = -+ let k, cs = -+ section_kind_common sct -+ in -+ k, cs.cs_name -+ -+ let string_of_section sct = -+ let k, nm = -+ section_id sct -+ in -+ (match k with -+ | `Library -> "library" -+ | `Executable -> "executable" -+ | `Flag -> "flag" -+ | `SrcRepo -> "src repository" -+ | `Test -> "test" -+ | `Doc -> "doc") -+ ^" "^nm -+ -+ let section_find id scts = -+ List.find -+ (fun sct -> id = section_id sct) -+ scts -+ -+ module CSection = -+ struct -+ type t = section -+ -+ let id = section_id -+ -+ let compare t1 t2 = -+ compare (id t1) (id t2) -+ -+ let equal t1 t2 = -+ (id t1) = (id t2) -+ -+ let hash t = -+ Hashtbl.hash (id t) -+ end -+ -+ module MapSection = Map.Make(CSection) -+ module SetSection = Set.Make(CSection) -+ -+end -+ -+module OASISBuildSection = struct -+(* # 21 "src/oasis/OASISBuildSection.ml" *) -+ -+end -+ -+module OASISExecutable = struct -+(* # 21 "src/oasis/OASISExecutable.ml" *) -+ -+ open OASISTypes -+ -+ let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = -+ let dir = -+ OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.dirname exec.exec_main_is) -+ in -+ let is_native_exec = -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native () -+ | Byte -> false -+ in -+ -+ OASISUnixPath.concat -+ dir -+ (cs.cs_name^(suffix_program ())), -+ -+ if not is_native_exec && -+ not exec.exec_custom && -+ bs.bs_c_sources <> [] then -+ Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ())) -+ else -+ None -+ -+end -+ -+module OASISLibrary = struct -+(* # 21 "src/oasis/OASISLibrary.ml" *) -+ -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open OASISSection -+ -+ type library_name = name -+ type findlib_part_name = name -+ type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t -+ -+ exception InternalLibraryNotFound of library_name -+ exception FindlibPackageNotFound of findlib_name -+ -+ type group_t = -+ | Container of findlib_name * group_t list -+ | Package of (findlib_name * -+ common_section * -+ build_section * -+ library * -+ group_t list) -+ -+ (* Look for a module file, considering capitalization or not. *) -+ let find_module source_file_exists (cs, bs, lib) modul = -+ let possible_base_fn = -+ List.map -+ (OASISUnixPath.concat bs.bs_path) -+ [modul; -+ OASISUnixPath.uncapitalize_file modul; -+ OASISUnixPath.capitalize_file modul] -+ in -+ (* TODO: we should be able to be able to determine the source for every -+ * files. Hence we should introduce a Module(source: fn) for the fields -+ * Modules and InternalModules -+ *) -+ List.fold_left -+ (fun acc base_fn -> -+ match acc with -+ | `No_sources _ -> -+ begin -+ let file_found = -+ List.fold_left -+ (fun acc ext -> -+ if source_file_exists (base_fn^ext) then -+ (base_fn^ext) :: acc -+ else -+ acc) -+ [] -+ [".ml"; ".mli"; ".mll"; ".mly"] -+ in -+ match file_found with -+ | [] -> -+ acc -+ | lst -> -+ `Sources (base_fn, lst) -+ end -+ | `Sources _ -> -+ acc) -+ (`No_sources possible_base_fn) -+ possible_base_fn -+ -+ let source_unix_files ~ctxt (cs, bs, lib) source_file_exists = -+ List.fold_left -+ (fun acc modul -> -+ match find_module source_file_exists (cs, bs, lib) modul with -+ | `Sources (base_fn, lst) -> -+ (base_fn, lst) :: acc -+ | `No_sources _ -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ acc) -+ [] -+ (lib.lib_modules @ lib.lib_internal_modules) -+ -+ let generated_unix_files -+ ~ctxt -+ ~is_native -+ ~has_native_dynlink -+ ~ext_lib -+ ~ext_dll -+ ~source_file_exists -+ (cs, bs, lib) = -+ -+ let find_modules lst ext = -+ let find_module modul = -+ match find_module source_file_exists (cs, bs, lib) modul with -+ | `Sources (base_fn, _) -> -+ [base_fn] -+ | `No_sources lst -> -+ OASISMessage.warning -+ ~ctxt -+ (f_ "Cannot find source file matching \ -+ module '%s' in library %s") -+ modul cs.cs_name; -+ lst -+ in -+ List.map -+ (fun nm -> -+ List.map -+ (fun base_fn -> base_fn ^"."^ext) -+ (find_module nm)) -+ lst -+ in -+ -+ (* The headers that should be compiled along *) -+ let headers = -+ if lib.lib_pack then -+ [] -+ else -+ find_modules -+ lib.lib_modules -+ "cmi" -+ in -+ -+ (* The .cmx that be compiled along *) -+ let cmxs = -+ let should_be_built = -+ (not lib.lib_pack) && (* Do not install .cmx packed submodules *) -+ match bs.bs_compiled_object with -+ | Native -> true -+ | Best -> is_native -+ | Byte -> false -+ in -+ if should_be_built then -+ find_modules -+ (lib.lib_modules @ lib.lib_internal_modules) -+ "cmx" -+ else -+ [] -+ in -+ -+ let acc_nopath = -+ [] -+ in -+ -+ (* Compute what libraries should be built *) -+ let acc_nopath = -+ (* Add the packed header file if required *) -+ let add_pack_header acc = -+ if lib.lib_pack then -+ [cs.cs_name^".cmi"] :: acc -+ else -+ acc -+ in -+ let byte acc = -+ add_pack_header ([cs.cs_name^".cma"] :: acc) -+ in -+ let native acc = -+ let acc = -+ add_pack_header -+ (if has_native_dynlink then -+ [cs.cs_name^".cmxs"] :: acc -+ else acc) -+ in -+ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc -+ in -+ match bs.bs_compiled_object with -+ | Native -> -+ byte (native acc_nopath) -+ | Best when is_native -> -+ byte (native acc_nopath) -+ | Byte | Best -> -+ byte acc_nopath -+ in -+ -+ (* Add C library to be built *) -+ let acc_nopath = -+ if bs.bs_c_sources <> [] then -+ begin -+ ["lib"^cs.cs_name^"_stubs"^ext_lib] -+ :: -+ ["dll"^cs.cs_name^"_stubs"^ext_dll] -+ :: -+ acc_nopath -+ end -+ else -+ acc_nopath -+ in -+ -+ (* All the files generated *) -+ List.rev_append -+ (List.rev_map -+ (List.rev_map -+ (OASISUnixPath.concat bs.bs_path)) -+ acc_nopath) -+ (headers @ cmxs) -+ -+ type data = common_section * build_section * library -+ type tree = -+ | Node of (data option) * (tree MapString.t) -+ | Leaf of data -+ -+ let findlib_mapping pkg = -+ (* Map from library name to either full findlib name or parts + parent. *) -+ let fndlb_parts_of_lib_name = -+ let fndlb_parts cs lib = -+ let name = -+ match lib.lib_findlib_name with -+ | Some nm -> nm -+ | None -> cs.cs_name -+ in -+ let name = -+ String.concat "." (lib.lib_findlib_containers @ [name]) -+ in -+ name -+ in -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, _, lib) -> -+ begin -+ let lib_name = cs.cs_name in -+ let fndlb_parts = fndlb_parts cs lib in -+ if MapString.mem lib_name mp then -+ failwithf -+ (f_ "The library name '%s' is used more than once.") -+ lib_name; -+ match lib.lib_findlib_parent with -+ | Some lib_name_parent -> -+ MapString.add -+ lib_name -+ (`Unsolved (lib_name_parent, fndlb_parts)) -+ mp -+ | None -> -+ MapString.add -+ lib_name -+ (`Solved fndlb_parts) -+ mp -+ end -+ -+ | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ (* Solve the above graph to be only library name to full findlib name. *) -+ let fndlb_name_of_lib_name = -+ let rec solve visited mp lib_name lib_name_child = -+ if SetString.mem lib_name visited then -+ failwithf -+ (f_ "Library '%s' is involved in a cycle \ -+ with regard to findlib naming.") -+ lib_name; -+ let visited = SetString.add lib_name visited in -+ try -+ match MapString.find lib_name mp with -+ | `Solved fndlb_nm -> -+ fndlb_nm, mp -+ | `Unsolved (lib_nm_parent, post_fndlb_nm) -> -+ let pre_fndlb_nm, mp = -+ solve visited mp lib_nm_parent lib_name -+ in -+ let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in -+ fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp -+ with Not_found -> -+ failwithf -+ (f_ "Library '%s', which is defined as the findlib parent of \ -+ library '%s', doesn't exist.") -+ lib_name lib_name_child -+ in -+ let mp = -+ MapString.fold -+ (fun lib_name status mp -> -+ match status with -+ | `Solved _ -> -+ (* Solved initialy, no need to go further *) -+ mp -+ | `Unsolved _ -> -+ let _, mp = solve SetString.empty mp lib_name "" in -+ mp) -+ fndlb_parts_of_lib_name -+ fndlb_parts_of_lib_name -+ in -+ MapString.map -+ (function -+ | `Solved fndlb_nm -> fndlb_nm -+ | `Unsolved _ -> assert false) -+ mp -+ in -+ -+ (* Convert an internal library name to a findlib name. *) -+ let findlib_name_of_library_name lib_nm = -+ try -+ MapString.find lib_nm fndlb_name_of_lib_name -+ with Not_found -> -+ raise (InternalLibraryNotFound lib_nm) -+ in -+ -+ (* Add a library to the tree. -+ *) -+ let add sct mp = -+ let fndlb_fullname = -+ let cs, _, _ = sct in -+ let lib_name = cs.cs_name in -+ findlib_name_of_library_name lib_name -+ in -+ let rec add_children nm_lst (children : tree MapString.t) = -+ match nm_lst with -+ | (hd :: tl) -> -+ begin -+ let node = -+ try -+ add_node tl (MapString.find hd children) -+ with Not_found -> -+ (* New node *) -+ new_node tl -+ in -+ MapString.add hd node children -+ end -+ | [] -> -+ (* Should not have a nameless library. *) -+ assert false -+ and add_node tl node = -+ if tl = [] then -+ begin -+ match node with -+ | Node (None, children) -> -+ Node (Some sct, children) -+ | Leaf (cs', _, _) | Node (Some (cs', _, _), _) -> -+ (* TODO: allow to merge Package, i.e. -+ * archive(byte) = "foo.cma foo_init.cmo" -+ *) -+ let cs, _, _ = sct in -+ failwithf -+ (f_ "Library '%s' and '%s' have the same findlib name '%s'") -+ cs.cs_name cs'.cs_name fndlb_fullname -+ end -+ else -+ begin -+ match node with -+ | Leaf data -> -+ Node (Some data, add_children tl MapString.empty) -+ | Node (data_opt, children) -> -+ Node (data_opt, add_children tl children) -+ end -+ and new_node = -+ function -+ | [] -> -+ Leaf sct -+ | hd :: tl -> -+ Node (None, MapString.add hd (new_node tl) MapString.empty) -+ in -+ add_children (OASISString.nsplit fndlb_fullname '.') mp -+ in -+ -+ let rec group_of_tree mp = -+ MapString.fold -+ (fun nm node acc -> -+ let cur = -+ match node with -+ | Node (Some (cs, bs, lib), children) -> -+ Package (nm, cs, bs, lib, group_of_tree children) -+ | Node (None, children) -> -+ Container (nm, group_of_tree children) -+ | Leaf (cs, bs, lib) -> -+ Package (nm, cs, bs, lib, []) -+ in -+ cur :: acc) -+ mp [] -+ in -+ -+ let group_mp = -+ List.fold_left -+ (fun mp -> -+ function -+ | Library (cs, bs, lib) -> -+ add (cs, bs, lib) mp -+ | _ -> -+ mp) -+ MapString.empty -+ pkg.sections -+ in -+ -+ let groups = -+ group_of_tree group_mp -+ in -+ -+ let library_name_of_findlib_name = -+ Lazy.lazy_from_fun -+ (fun () -> -+ (* Revert findlib_name_of_library_name. *) -+ MapString.fold -+ (fun k v mp -> MapString.add v k mp) -+ fndlb_name_of_lib_name -+ MapString.empty) -+ in -+ let library_name_of_findlib_name fndlb_nm = -+ try -+ MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name) -+ with Not_found -> -+ raise (FindlibPackageNotFound fndlb_nm) -+ in -+ -+ groups, -+ findlib_name_of_library_name, -+ library_name_of_findlib_name -+ -+ let findlib_of_group = -+ function -+ | Container (fndlb_nm, _) -+ | Package (fndlb_nm, _, _, _, _) -> fndlb_nm -+ -+ let root_of_group grp = -+ let rec root_lib_aux = -+ (* We do a DFS in the group. *) -+ function -+ | Container (_, children) -> -+ List.fold_left -+ (fun res grp -> -+ if res = None then -+ root_lib_aux grp -+ else -+ res) -+ None -+ children -+ | Package (_, cs, bs, lib, _) -> -+ Some (cs, bs, lib) -+ in -+ match root_lib_aux grp with -+ | Some res -> -+ res -+ | None -> -+ failwithf -+ (f_ "Unable to determine root library of findlib library '%s'") -+ (findlib_of_group grp) -+ -+end -+ -+module OASISFlag = struct -+(* # 21 "src/oasis/OASISFlag.ml" *) -+ -+end -+ -+module OASISPackage = struct -+(* # 21 "src/oasis/OASISPackage.ml" *) -+ -+end -+ -+module OASISSourceRepository = struct -+(* # 21 "src/oasis/OASISSourceRepository.ml" *) -+ -+end -+ -+module OASISTest = struct -+(* # 21 "src/oasis/OASISTest.ml" *) -+ -+end -+ -+module OASISDocument = struct -+(* # 21 "src/oasis/OASISDocument.ml" *) -+ -+end -+ -+module OASISExec = struct -+(* # 21 "src/oasis/OASISExec.ml" *) -+ -+ open OASISGettext -+ open OASISUtils -+ open OASISMessage -+ -+ (* TODO: I don't like this quote, it is there because $(rm) foo expands to -+ * 'rm -f' foo... -+ *) -+ let run ~ctxt ?f_exit_code ?(quote=true) cmd args = -+ let cmd = -+ if quote then -+ if Sys.os_type = "Win32" then -+ if String.contains cmd ' ' then -+ (* Double the 1st double quote... win32... sigh *) -+ "\""^(Filename.quote cmd) -+ else -+ cmd -+ else -+ Filename.quote cmd -+ else -+ cmd -+ in -+ let cmdline = -+ String.concat " " (cmd :: args) -+ in -+ info ~ctxt (f_ "Running command '%s'") cmdline; -+ match f_exit_code, Sys.command cmdline with -+ | None, 0 -> () -+ | None, i -> -+ failwithf -+ (f_ "Command '%s' terminated with error code %d") -+ cmdline i -+ | Some f, i -> -+ f i -+ -+ let run_read_output ~ctxt ?f_exit_code cmd args = -+ let fn = -+ Filename.temp_file "oasis-" ".txt" -+ in -+ try -+ begin -+ let () = -+ run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn]) -+ in -+ let chn = -+ open_in fn -+ in -+ let routput = -+ ref [] -+ in -+ begin -+ try -+ while true do -+ routput := (input_line chn) :: !routput -+ done -+ with End_of_file -> -+ () -+ end; -+ close_in chn; -+ Sys.remove fn; -+ List.rev !routput -+ end -+ with e -> -+ (try Sys.remove fn with _ -> ()); -+ raise e -+ -+ let run_read_one_line ~ctxt ?f_exit_code cmd args = -+ match run_read_output ~ctxt ?f_exit_code cmd args with -+ | [fst] -> -+ fst -+ | lst -> -+ failwithf -+ (f_ "Command return unexpected output %S") -+ (String.concat "\n" lst) -+end -+ -+module OASISFileUtil = struct -+(* # 21 "src/oasis/OASISFileUtil.ml" *) -+ -+ open OASISGettext -+ -+ let file_exists_case fn = -+ let dirname = Filename.dirname fn in -+ let basename = Filename.basename fn in -+ if Sys.file_exists dirname then -+ if basename = Filename.current_dir_name then -+ true -+ else -+ List.mem -+ basename -+ (Array.to_list (Sys.readdir dirname)) -+ else -+ false -+ -+ let find_file ?(case_sensitive=true) paths exts = -+ -+ (* Cardinal product of two list *) -+ let ( * ) lst1 lst2 = -+ List.flatten -+ (List.map -+ (fun a -> -+ List.map -+ (fun b -> a,b) -+ lst2) -+ lst1) -+ in -+ -+ let rec combined_paths lst = -+ match lst with -+ | p1 :: p2 :: tl -> -+ let acc = -+ (List.map -+ (fun (a,b) -> Filename.concat a b) -+ (p1 * p2)) -+ in -+ combined_paths (acc :: tl) -+ | [e] -> -+ e -+ | [] -> -+ [] -+ in -+ -+ let alternatives = -+ List.map -+ (fun (p,e) -> -+ if String.length e > 0 && e.[0] <> '.' then -+ p ^ "." ^ e -+ else -+ p ^ e) -+ ((combined_paths paths) * exts) -+ in -+ List.find -+ (if case_sensitive then -+ file_exists_case -+ else -+ Sys.file_exists) -+ alternatives -+ -+ let which ~ctxt prg = -+ let path_sep = -+ match Sys.os_type with -+ | "Win32" -> -+ ';' -+ | _ -> -+ ':' -+ in -+ let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in -+ let exec_ext = -+ match Sys.os_type with -+ | "Win32" -> -+ "" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep) -+ | _ -> -+ [""] -+ in -+ find_file ~case_sensitive:false [path_lst; [prg]] exec_ext -+ -+ (**/**) -+ let rec fix_dir dn = -+ (* Windows hack because Sys.file_exists "src\\" = false when -+ * Sys.file_exists "src" = true -+ *) -+ let ln = -+ String.length dn -+ in -+ if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then -+ fix_dir (String.sub dn 0 (ln - 1)) -+ else -+ dn -+ -+ let q = Filename.quote -+ (**/**) -+ -+ let cp ~ctxt ?(recurse=false) src tgt = -+ if recurse then -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt -+ "xcopy" [q src; q tgt; "/E"] -+ | _ -> -+ OASISExec.run ~ctxt -+ "cp" ["-r"; q src; q tgt] -+ else -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "copy" -+ | _ -> "cp") -+ [q src; q tgt] -+ -+ let mkdir ~ctxt tgt = -+ OASISExec.run ~ctxt -+ (match Sys.os_type with -+ | "Win32" -> "md" -+ | _ -> "mkdir") -+ [q tgt] -+ -+ let rec mkdir_parent ~ctxt f tgt = -+ let tgt = -+ fix_dir tgt -+ in -+ if Sys.file_exists tgt then -+ begin -+ if not (Sys.is_directory tgt) then -+ OASISUtils.failwithf -+ (f_ "Cannot create directory '%s', a file of the same name already \ -+ exists") -+ tgt -+ end -+ else -+ begin -+ mkdir_parent ~ctxt f (Filename.dirname tgt); -+ if not (Sys.file_exists tgt) then -+ begin -+ f tgt; -+ mkdir ~ctxt tgt -+ end -+ end -+ -+ let rmdir ~ctxt tgt = -+ if Sys.readdir tgt = [||] then -+ begin -+ match Sys.os_type with -+ | "Win32" -> -+ OASISExec.run ~ctxt "rd" [q tgt] -+ | _ -> -+ OASISExec.run ~ctxt "rm" ["-r"; q tgt] -+ end -+ -+ let glob ~ctxt fn = -+ let basename = -+ Filename.basename fn -+ in -+ if String.length basename >= 2 && -+ basename.[0] = '*' && -+ basename.[1] = '.' then -+ begin -+ let ext_len = -+ (String.length basename) - 2 -+ in -+ let ext = -+ String.sub basename 2 ext_len -+ in -+ let dirname = -+ Filename.dirname fn -+ in -+ Array.fold_left -+ (fun acc fn -> -+ try -+ let fn_ext = -+ String.sub -+ fn -+ ((String.length fn) - ext_len) -+ ext_len -+ in -+ if fn_ext = ext then -+ (Filename.concat dirname fn) :: acc -+ else -+ acc -+ with Invalid_argument _ -> -+ acc) -+ [] -+ (Sys.readdir dirname) -+ end -+ else -+ begin -+ if file_exists_case fn then -+ [fn] -+ else -+ [] -+ end -+end -+ -+ -+# 2142 "setup.ml" -+module BaseEnvLight = struct -+(* # 21 "src/base/BaseEnvLight.ml" *) -+ -+ module MapString = Map.Make(String) -+ -+ type t = string MapString.t -+ -+ let default_filename = -+ Filename.concat -+ (Sys.getcwd ()) -+ "setup.data" -+ -+ let load ?(allow_empty=false) ?(filename=default_filename) () = -+ if Sys.file_exists filename then -+ begin -+ let chn = -+ open_in_bin filename -+ in -+ let st = -+ Stream.of_channel chn -+ in -+ let line = -+ ref 1 -+ in -+ let st_line = -+ Stream.from -+ (fun _ -> -+ try -+ match Stream.next st with -+ | '\n' -> incr line; Some '\n' -+ | c -> Some c -+ with Stream.Failure -> None) -+ in -+ let lexer = -+ Genlex.make_lexer ["="] st_line -+ in -+ let rec read_file mp = -+ match Stream.npeek 3 lexer with -+ | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> -+ Stream.junk lexer; -+ Stream.junk lexer; -+ Stream.junk lexer; -+ read_file (MapString.add nm value mp) -+ | [] -> -+ mp -+ | _ -> -+ failwith -+ (Printf.sprintf -+ "Malformed data file '%s' line %d" -+ filename !line) -+ in -+ let mp = -+ read_file MapString.empty -+ in -+ close_in chn; -+ mp -+ end -+ else if allow_empty then -+ begin -+ MapString.empty -+ end -+ else -+ begin -+ failwith -+ (Printf.sprintf -+ "Unable to load environment, the file '%s' doesn't exist." -+ filename) -+ end -+ -+ let var_get name env = -+ let rec var_expand str = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ var_expand (MapString.find var env) -+ with Not_found -> -+ failwith -+ (Printf.sprintf -+ "No variable %s defined when trying to expand %S." -+ var -+ str)) -+ str; -+ Buffer.contents buff -+ in -+ var_expand (MapString.find name env) -+ -+ let var_choose lst env = -+ OASISExpr.choose -+ (fun nm -> var_get nm env) -+ lst -+end -+ -+ -+# 2240 "setup.ml" -+module BaseContext = struct -+(* # 21 "src/base/BaseContext.ml" *) -+ -+ open OASISContext -+ -+ let args = args -+ -+ let default = default -+ -+end -+ -+module BaseMessage = struct -+(* # 21 "src/base/BaseMessage.ml" *) -+ -+ (** Message to user, overrid for Base -+ @author Sylvain Le Gall -+ *) -+ open OASISMessage -+ open BaseContext -+ -+ let debug fmt = debug ~ctxt:!default fmt -+ -+ let info fmt = info ~ctxt:!default fmt -+ -+ let warning fmt = warning ~ctxt:!default fmt -+ -+ let error fmt = error ~ctxt:!default fmt -+ -+end -+ -+module BaseEnv = struct -+(* # 21 "src/base/BaseEnv.ml" *) -+ -+ open OASISGettext -+ open OASISUtils -+ open PropList -+ -+ module MapString = BaseEnvLight.MapString -+ -+ type origin_t = -+ | ODefault -+ | OGetEnv -+ | OFileLoad -+ | OCommandLine -+ -+ type cli_handle_t = -+ | CLINone -+ | CLIAuto -+ | CLIWith -+ | CLIEnable -+ | CLIUser of (Arg.key * Arg.spec * Arg.doc) list -+ -+ type definition_t = -+ { -+ hide: bool; -+ dump: bool; -+ cli: cli_handle_t; -+ arg_help: string option; -+ group: string option; -+ } -+ -+ let schema = -+ Schema.create "environment" -+ -+ (* Environment data *) -+ let env = -+ Data.create () -+ -+ (* Environment data from file *) -+ let env_from_file = -+ ref MapString.empty -+ -+ (* Lexer for var *) -+ let var_lxr = -+ Genlex.make_lexer [] -+ -+ let rec var_expand str = -+ let buff = -+ Buffer.create ((String.length str) * 2) -+ in -+ Buffer.add_substitute -+ buff -+ (fun var -> -+ try -+ (* TODO: this is a quick hack to allow calling Test.Command -+ * without defining executable name really. I.e. if there is -+ * an exec Executable toto, then $(toto) should be replace -+ * by its real name. It is however useful to have this function -+ * for other variable that depend on the host and should be -+ * written better than that. -+ *) -+ let st = -+ var_lxr (Stream.of_string var) -+ in -+ match Stream.npeek 3 st with -+ | [Genlex.Ident "utoh"; Genlex.Ident nm] -> -+ OASISHostPath.of_unix (var_get nm) -+ | [Genlex.Ident "utoh"; Genlex.String s] -> -+ OASISHostPath.of_unix s -+ | [Genlex.Ident "ocaml_escaped"; Genlex.Ident nm] -> -+ String.escaped (var_get nm) -+ | [Genlex.Ident "ocaml_escaped"; Genlex.String s] -> -+ String.escaped s -+ | [Genlex.Ident nm] -> -+ var_get nm -+ | _ -> -+ failwithf -+ (f_ "Unknown expression '%s' in variable expansion of %s.") -+ var -+ str -+ with -+ | Unknown_field (_, _) -> -+ failwithf -+ (f_ "No variable %s defined when trying to expand %S.") -+ var -+ str -+ | Stream.Error e -> -+ failwithf -+ (f_ "Syntax error when parsing '%s' when trying to \ -+ expand %S: %s") -+ var -+ str -+ e) -+ str; -+ Buffer.contents buff -+ -+ and var_get name = -+ let vl = -+ try -+ Schema.get schema env name -+ with Unknown_field _ as e -> -+ begin -+ try -+ MapString.find name !env_from_file -+ with Not_found -> -+ raise e -+ end -+ in -+ var_expand vl -+ -+ let var_choose ?printer ?name lst = -+ OASISExpr.choose -+ ?printer -+ ?name -+ var_get -+ lst -+ -+ let var_protect vl = -+ let buff = -+ Buffer.create (String.length vl) -+ in -+ String.iter -+ (function -+ | '$' -> Buffer.add_string buff "\\$" -+ | c -> Buffer.add_char buff c) -+ vl; -+ Buffer.contents buff -+ -+ let var_define -+ ?(hide=false) -+ ?(dump=true) -+ ?short_desc -+ ?(cli=CLINone) -+ ?arg_help -+ ?group -+ name (* TODO: type constraint on the fact that name must be a valid OCaml -+ id *) -+ dflt = -+ -+ let default = -+ [ -+ OFileLoad, (fun () -> MapString.find name !env_from_file); -+ ODefault, dflt; -+ OGetEnv, (fun () -> Sys.getenv name); -+ ] -+ in -+ -+ let extra = -+ { -+ hide = hide; -+ dump = dump; -+ cli = cli; -+ arg_help = arg_help; -+ group = group; -+ } -+ in -+ -+ (* Try to find a value that can be defined -+ *) -+ let var_get_low lst = -+ let errors, res = -+ List.fold_left -+ (fun (errors, res) (o, v) -> -+ if res = None then -+ begin -+ try -+ errors, Some (v ()) -+ with -+ | Not_found -> -+ errors, res -+ | Failure rsn -> -+ (rsn :: errors), res -+ | e -> -+ (Printexc.to_string e) :: errors, res -+ end -+ else -+ errors, res) -+ ([], None) -+ (List.sort -+ (fun (o1, _) (o2, _) -> -+ Pervasives.compare o2 o1) -+ lst) -+ in -+ match res, errors with -+ | Some v, _ -> -+ v -+ | None, [] -> -+ raise (Not_set (name, None)) -+ | None, lst -> -+ raise (Not_set (name, Some (String.concat (s_ ", ") lst))) -+ in -+ -+ let help = -+ match short_desc with -+ | Some fs -> Some fs -+ | None -> None -+ in -+ -+ let var_get_lst = -+ FieldRO.create -+ ~schema -+ ~name -+ ~parse:(fun ?(context=ODefault) s -> [context, fun () -> s]) -+ ~print:var_get_low -+ ~default -+ ~update:(fun ?context x old_x -> x @ old_x) -+ ?help -+ extra -+ in -+ -+ fun () -> -+ var_expand (var_get_low (var_get_lst env)) -+ -+ let var_redefine -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt = -+ if Schema.mem schema name then -+ begin -+ (* TODO: look suspsicious, we want to memorize dflt not dflt () *) -+ Schema.set schema env ~context:ODefault name (dflt ()); -+ fun () -> var_get name -+ end -+ else -+ begin -+ var_define -+ ?hide -+ ?dump -+ ?short_desc -+ ?cli -+ ?arg_help -+ ?group -+ name -+ dflt -+ end -+ -+ let var_ignore (e : unit -> string) = -+ () -+ -+ let print_hidden = -+ var_define -+ ~hide:true -+ ~dump:false -+ ~cli:CLIAuto -+ ~arg_help:"Print even non-printable variable. (debug)" -+ "print_hidden" -+ (fun () -> "false") -+ -+ let var_all () = -+ List.rev -+ (Schema.fold -+ (fun acc nm def _ -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ nm :: acc -+ else -+ acc) -+ [] -+ schema) -+ -+ let default_filename = -+ BaseEnvLight.default_filename -+ -+ let load ?allow_empty ?filename () = -+ env_from_file := BaseEnvLight.load ?allow_empty ?filename () -+ -+ let unload () = -+ env_from_file := MapString.empty; -+ Data.clear env -+ -+ let dump ?(filename=default_filename) () = -+ let chn = -+ open_out_bin filename -+ in -+ let output nm value = -+ Printf.fprintf chn "%s=%S\n" nm value -+ in -+ let mp_todo = -+ (* Dump data from schema *) -+ Schema.fold -+ (fun mp_todo nm def _ -> -+ if def.dump then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ output nm value -+ with Not_set _ -> -+ () -+ end; -+ MapString.remove nm mp_todo) -+ !env_from_file -+ schema -+ in -+ (* Dump data defined outside of schema *) -+ MapString.iter output mp_todo; -+ -+ (* End of the dump *) -+ close_out chn -+ -+ let print () = -+ let printable_vars = -+ Schema.fold -+ (fun acc nm def short_descr_opt -> -+ if not def.hide || bool_of_string (print_hidden ()) then -+ begin -+ try -+ let value = -+ Schema.get -+ schema -+ env -+ nm -+ in -+ let txt = -+ match short_descr_opt with -+ | Some s -> s () -+ | None -> nm -+ in -+ (txt, value) :: acc -+ with Not_set _ -> -+ acc -+ end -+ else -+ acc) -+ [] -+ schema -+ in -+ let max_length = -+ List.fold_left max 0 -+ (List.rev_map String.length -+ (List.rev_map fst printable_vars)) -+ in -+ let dot_pad str = -+ String.make ((max_length - (String.length str)) + 3) '.' -+ in -+ -+ Printf.printf "\nConfiguration: \n"; -+ List.iter -+ (fun (name,value) -> -+ Printf.printf "%s: %s %s\n" name (dot_pad name) value) -+ (List.rev printable_vars); -+ Printf.printf "\n%!" -+ -+ let args () = -+ let arg_concat = -+ OASISUtils.varname_concat ~hyphen:'-' -+ in -+ [ -+ "--override", -+ Arg.Tuple -+ ( -+ let rvr = ref "" -+ in -+ let rvl = ref "" -+ in -+ [ -+ Arg.Set_string rvr; -+ Arg.Set_string rvl; -+ Arg.Unit -+ (fun () -> -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ !rvr -+ !rvl) -+ ] -+ ), -+ "var+val Override any configuration variable."; -+ -+ ] -+ @ -+ List.flatten -+ (Schema.fold -+ (fun acc name def short_descr_opt -> -+ let var_set s = -+ Schema.set -+ schema -+ env -+ ~context:OCommandLine -+ name -+ s -+ in -+ -+ let arg_name = -+ OASISUtils.varname_of_string ~hyphen:'-' name -+ in -+ -+ let hlp = -+ match short_descr_opt with -+ | Some txt -> txt () -+ | None -> "" -+ in -+ -+ let arg_hlp = -+ match def.arg_help with -+ | Some s -> s -+ | None -> "str" -+ in -+ -+ let default_value = -+ try -+ Printf.sprintf -+ (f_ " [%s]") -+ (Schema.get -+ schema -+ env -+ name) -+ with Not_set _ -> -+ "" -+ in -+ -+ let args = -+ match def.cli with -+ | CLINone -> -+ [] -+ | CLIAuto -> -+ [ -+ arg_concat "--" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIWith -> -+ [ -+ arg_concat "--with-" arg_name, -+ Arg.String var_set, -+ Printf.sprintf (f_ "%s %s%s") arg_hlp hlp default_value -+ ] -+ | CLIEnable -> -+ let dflt = -+ if default_value = " [true]" then -+ s_ " [default: enabled]" -+ else -+ s_ " [default: disabled]" -+ in -+ [ -+ arg_concat "--enable-" arg_name, -+ Arg.Unit (fun () -> var_set "true"), -+ Printf.sprintf (f_ " %s%s") hlp dflt; -+ -+ arg_concat "--disable-" arg_name, -+ Arg.Unit (fun () -> var_set "false"), -+ Printf.sprintf (f_ " %s%s") hlp dflt -+ ] -+ | CLIUser lst -> -+ lst -+ in -+ args :: acc) -+ [] -+ schema) -+end -+ -+module BaseArgExt = struct -+(* # 21 "src/base/BaseArgExt.ml" *) -+ -+ open OASISUtils -+ open OASISGettext -+ -+ let parse argv args = -+ (* Simulate command line for Arg *) -+ let current = -+ ref 0 -+ in -+ -+ try -+ Arg.parse_argv -+ ~current:current -+ (Array.concat [[|"none"|]; argv]) -+ (Arg.align args) -+ (failwithf (f_ "Don't know what to do with arguments: '%s'")) -+ (s_ "configure options:") -+ with -+ | Arg.Help txt -> -+ print_endline txt; -+ exit 0 -+ | Arg.Bad txt -> -+ prerr_endline txt; -+ exit 1 -+end -+ -+module BaseCheck = struct -+(* # 21 "src/base/BaseCheck.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISUtils -+ open OASISGettext -+ -+ let prog_best prg prg_lst = -+ var_redefine -+ prg -+ (fun () -> -+ let alternate = -+ List.fold_left -+ (fun res e -> -+ match res with -+ | Some _ -> -+ res -+ | None -> -+ try -+ Some (OASISFileUtil.which ~ctxt:!BaseContext.default e) -+ with Not_found -> -+ None) -+ None -+ prg_lst -+ in -+ match alternate with -+ | Some prg -> prg -+ | None -> raise Not_found) -+ -+ let prog prg = -+ prog_best prg [prg] -+ -+ let prog_opt prg = -+ prog_best prg [prg^".opt"; prg] -+ -+ let ocamlfind = -+ prog "ocamlfind" -+ -+ let version -+ var_prefix -+ cmp -+ fversion -+ () = -+ (* Really compare version provided *) -+ let var = -+ var_prefix^"_version_"^(OASISVersion.varname_of_comparator cmp) -+ in -+ var_redefine -+ ~hide:true -+ var -+ (fun () -> -+ let version_str = -+ match fversion () with -+ | "[Distributed with OCaml]" -> -+ begin -+ try -+ (var_get "ocaml_version") -+ with Not_found -> -+ warning -+ (f_ "Variable ocaml_version not defined, fallback \ -+ to default"); -+ Sys.ocaml_version -+ end -+ | res -> -+ res -+ in -+ let version = -+ OASISVersion.version_of_string version_str -+ in -+ if OASISVersion.comparator_apply version cmp then -+ version_str -+ else -+ failwithf -+ (f_ "Cannot satisfy version constraint on %s: %s (version: %s)") -+ var_prefix -+ (OASISVersion.string_of_comparator cmp) -+ version_str) -+ () -+ -+ let package_version pkg = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%v"; pkg] -+ -+ let package ?version_comparator pkg () = -+ let var = -+ OASISUtils.varname_concat -+ "pkg_" -+ (OASISUtils.varname_of_string pkg) -+ in -+ let findlib_dir pkg = -+ let dir = -+ OASISExec.run_read_one_line ~ctxt:!BaseContext.default -+ (ocamlfind ()) -+ ["query"; "-format"; "%d"; pkg] -+ in -+ if Sys.file_exists dir && Sys.is_directory dir then -+ dir -+ else -+ failwithf -+ (f_ "When looking for findlib package %s, \ -+ directory %s return doesn't exist") -+ pkg dir -+ in -+ let vl = -+ var_redefine -+ var -+ (fun () -> findlib_dir pkg) -+ () -+ in -+ ( -+ match version_comparator with -+ | Some ver_cmp -> -+ ignore -+ (version -+ var -+ ver_cmp -+ (fun _ -> package_version pkg) -+ ()) -+ | None -> -+ () -+ ); -+ vl -+end -+ -+module BaseOCamlcConfig = struct -+(* # 21 "src/base/BaseOCamlcConfig.ml" *) -+ -+ -+ open BaseEnv -+ open OASISUtils -+ open OASISGettext -+ -+ module SMap = Map.Make(String) -+ -+ let ocamlc = -+ BaseCheck.prog_opt "ocamlc" -+ -+ let ocamlc_config_map = -+ (* Map name to value for ocamlc -config output -+ (name ^": "^value) -+ *) -+ let rec split_field mp lst = -+ match lst with -+ | line :: tl -> -+ let mp = -+ try -+ let pos_semicolon = -+ String.index line ':' -+ in -+ if pos_semicolon > 1 then -+ ( -+ let name = -+ String.sub line 0 pos_semicolon -+ in -+ let linelen = -+ String.length line -+ in -+ let value = -+ if linelen > pos_semicolon + 2 then -+ String.sub -+ line -+ (pos_semicolon + 2) -+ (linelen - pos_semicolon - 2) -+ else -+ "" -+ in -+ SMap.add name value mp -+ ) -+ else -+ ( -+ mp -+ ) -+ with Not_found -> -+ ( -+ mp -+ ) -+ in -+ split_field mp tl -+ | [] -> -+ mp -+ in -+ -+ let cache = -+ lazy -+ (var_protect -+ (Marshal.to_string -+ (split_field -+ SMap.empty -+ (OASISExec.run_read_output -+ ~ctxt:!BaseContext.default -+ (ocamlc ()) ["-config"])) -+ [])) -+ in -+ var_redefine -+ "ocamlc_config_map" -+ ~hide:true -+ ~dump:false -+ (fun () -> -+ (* TODO: update if ocamlc change !!! *) -+ Lazy.force cache) -+ -+ let var_define nm = -+ (* Extract data from ocamlc -config *) -+ let avlbl_config_get () = -+ Marshal.from_string -+ (ocamlc_config_map ()) -+ 0 -+ in -+ let chop_version_suffix s = -+ try -+ String.sub s 0 (String.index s '+') -+ with _ -> -+ s -+ in -+ -+ let nm_config, value_config = -+ match nm with -+ | "ocaml_version" -> -+ "version", chop_version_suffix -+ | _ -> nm, (fun x -> x) -+ in -+ var_redefine -+ nm -+ (fun () -> -+ try -+ let map = -+ avlbl_config_get () -+ in -+ let value = -+ SMap.find nm_config map -+ in -+ value_config value -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find field '%s' in '%s -config' output") -+ nm -+ (ocamlc ())) -+ -+end -+ -+module BaseStandardVar = struct -+(* # 21 "src/base/BaseStandardVar.ml" *) -+ -+ -+ open OASISGettext -+ open OASISTypes -+ open OASISExpr -+ open BaseCheck -+ open BaseEnv -+ -+ let ocamlfind = BaseCheck.ocamlfind -+ let ocamlc = BaseOCamlcConfig.ocamlc -+ let ocamlopt = prog_opt "ocamlopt" -+ let ocamlbuild = prog "ocamlbuild" -+ -+ -+ (**/**) -+ let rpkg = -+ ref None -+ -+ let pkg_get () = -+ match !rpkg with -+ | Some pkg -> pkg -+ | None -> failwith (s_ "OASIS Package is not set") -+ -+ let var_cond = ref [] -+ -+ let var_define_cond ~since_version f dflt = -+ let holder = ref (fun () -> dflt) in -+ let since_version = -+ OASISVersion.VGreaterEqual (OASISVersion.version_of_string since_version) -+ in -+ var_cond := -+ (fun ver -> -+ if OASISVersion.comparator_apply ver since_version then -+ holder := f ()) :: !var_cond; -+ fun () -> !holder () -+ -+ (**/**) -+ -+ let pkg_name = -+ var_define -+ ~short_desc:(fun () -> s_ "Package name") -+ "pkg_name" -+ (fun () -> (pkg_get ()).name) -+ -+ let pkg_version = -+ var_define -+ ~short_desc:(fun () -> s_ "Package version") -+ "pkg_version" -+ (fun () -> -+ (OASISVersion.string_of_version (pkg_get ()).version)) -+ -+ let c = BaseOCamlcConfig.var_define -+ -+ let os_type = c "os_type" -+ let system = c "system" -+ let architecture = c "architecture" -+ let ccomp_type = c "ccomp_type" -+ let ocaml_version = c "ocaml_version" -+ -+ (* TODO: Check standard variable presence at runtime *) -+ -+ let standard_library_default = c "standard_library_default" -+ let standard_library = c "standard_library" -+ let standard_runtime = c "standard_runtime" -+ let bytecomp_c_compiler = c "bytecomp_c_compiler" -+ let native_c_compiler = c "native_c_compiler" -+ let model = c "model" -+ let ext_obj = c "ext_obj" -+ let ext_asm = c "ext_asm" -+ let ext_lib = c "ext_lib" -+ let ext_dll = c "ext_dll" -+ let default_executable_name = c "default_executable_name" -+ let systhread_supported = c "systhread_supported" -+ -+ let flexlink = -+ BaseCheck.prog "flexlink" -+ -+ let flexdll_version = -+ var_define -+ ~short_desc:(fun () -> "FlexDLL version (Win32)") -+ "flexdll_version" -+ (fun () -> -+ let lst = -+ OASISExec.run_read_output ~ctxt:!BaseContext.default -+ (flexlink ()) ["-help"] -+ in -+ match lst with -+ | line :: _ -> -+ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver) -+ | [] -> -+ raise Not_found) -+ -+ (**/**) -+ let p name hlp dflt = -+ var_define -+ ~short_desc:hlp -+ ~cli:CLIAuto -+ ~arg_help:"dir" -+ name -+ dflt -+ -+ let (/) a b = -+ if os_type () = Sys.os_type then -+ Filename.concat a b -+ else if os_type () = "Unix" then -+ OASISUnixPath.concat a b -+ else -+ OASISUtils.failwithf (f_ "Cannot handle os_type %s filename concat") -+ (os_type ()) -+ (**/**) -+ -+ let prefix = -+ p "prefix" -+ (fun () -> s_ "Install architecture-independent files dir") -+ (fun () -> -+ match os_type () with -+ | "Win32" -> -+ let program_files = -+ Sys.getenv "PROGRAMFILES" -+ in -+ program_files/(pkg_name ()) -+ | _ -> -+ "/usr/local") -+ -+ let exec_prefix = -+ p "exec_prefix" -+ (fun () -> s_ "Install architecture-dependent files in dir") -+ (fun () -> "$prefix") -+ -+ let bindir = -+ p "bindir" -+ (fun () -> s_ "User executables") -+ (fun () -> "$exec_prefix"/"bin") -+ -+ let sbindir = -+ p "sbindir" -+ (fun () -> s_ "System admin executables") -+ (fun () -> "$exec_prefix"/"sbin") -+ -+ let libexecdir = -+ p "libexecdir" -+ (fun () -> s_ "Program executables") -+ (fun () -> "$exec_prefix"/"libexec") -+ -+ let sysconfdir = -+ p "sysconfdir" -+ (fun () -> s_ "Read-only single-machine data") -+ (fun () -> "$prefix"/"etc") -+ -+ let sharedstatedir = -+ p "sharedstatedir" -+ (fun () -> s_ "Modifiable architecture-independent data") -+ (fun () -> "$prefix"/"com") -+ -+ let localstatedir = -+ p "localstatedir" -+ (fun () -> s_ "Modifiable single-machine data") -+ (fun () -> "$prefix"/"var") -+ -+ let libdir = -+ p "libdir" -+ (fun () -> s_ "Object code libraries") -+ (fun () -> "$exec_prefix"/"lib") -+ -+ let datarootdir = -+ p "datarootdir" -+ (fun () -> s_ "Read-only arch-independent data root") -+ (fun () -> "$prefix"/"share") -+ -+ let datadir = -+ p "datadir" -+ (fun () -> s_ "Read-only architecture-independent data") -+ (fun () -> "$datarootdir") -+ -+ let infodir = -+ p "infodir" -+ (fun () -> s_ "Info documentation") -+ (fun () -> "$datarootdir"/"info") -+ -+ let localedir = -+ p "localedir" -+ (fun () -> s_ "Locale-dependent data") -+ (fun () -> "$datarootdir"/"locale") -+ -+ let mandir = -+ p "mandir" -+ (fun () -> s_ "Man documentation") -+ (fun () -> "$datarootdir"/"man") -+ -+ let docdir = -+ p "docdir" -+ (fun () -> s_ "Documentation root") -+ (fun () -> "$datarootdir"/"doc"/"$pkg_name") -+ -+ let htmldir = -+ p "htmldir" -+ (fun () -> s_ "HTML documentation") -+ (fun () -> "$docdir") -+ -+ let dvidir = -+ p "dvidir" -+ (fun () -> s_ "DVI documentation") -+ (fun () -> "$docdir") -+ -+ let pdfdir = -+ p "pdfdir" -+ (fun () -> s_ "PDF documentation") -+ (fun () -> "$docdir") -+ -+ let psdir = -+ p "psdir" -+ (fun () -> s_ "PS documentation") -+ (fun () -> "$docdir") -+ -+ let destdir = -+ p "destdir" -+ (fun () -> s_ "Prepend a path when installing package") -+ (fun () -> -+ raise -+ (PropList.Not_set -+ ("destdir", -+ Some (s_ "undefined by construct")))) -+ -+ let findlib_version = -+ var_define -+ "findlib_version" -+ (fun () -> -+ BaseCheck.package_version "findlib") -+ -+ let is_native = -+ var_define -+ "is_native" -+ (fun () -> -+ try -+ let _s : string = -+ ocamlopt () -+ in -+ "true" -+ with PropList.Not_set _ -> -+ let _s : string = -+ ocamlc () -+ in -+ "false") -+ -+ let ext_program = -+ var_define -+ "suffix_program" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> ".exe" -+ | _ -> "") -+ -+ let rm = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a file.") -+ "rm" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "del" -+ | _ -> "rm -f") -+ -+ let rmdir = -+ var_define -+ ~short_desc:(fun () -> s_ "Remove a directory.") -+ "rmdir" -+ (fun () -> -+ match os_type () with -+ | "Win32" -> "rd" -+ | _ -> "rm -rf") -+ -+ let debug = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml debug flag on") -+ ~cli:CLIEnable -+ "debug" -+ (fun () -> "true") -+ -+ let profile = -+ var_define -+ ~short_desc:(fun () -> s_ "Turn ocaml profile flag on") -+ ~cli:CLIEnable -+ "profile" -+ (fun () -> "false") -+ -+ let tests = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> -+ s_ "Compile tests executable and library and run them") -+ ~cli:CLIEnable -+ "tests" -+ (fun () -> "false")) -+ "true" -+ -+ let docs = -+ var_define_cond ~since_version:"0.3" -+ (fun () -> -+ var_define -+ ~short_desc:(fun () -> s_ "Create documentations") -+ ~cli:CLIEnable -+ "docs" -+ (fun () -> "true")) -+ "true" -+ -+ let native_dynlink = -+ var_define -+ ~short_desc:(fun () -> s_ "Compiler support generation of .cmxs.") -+ ~cli:CLINone -+ "native_dynlink" -+ (fun () -> -+ let res = -+ let ocaml_lt_312 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (ocaml_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "3.12.0")) -+ in -+ let flexdll_lt_030 () = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string (flexdll_version ())) -+ (OASISVersion.VLesser -+ (OASISVersion.version_of_string "0.30")) -+ in -+ let has_native_dynlink = -+ let ocamlfind = ocamlfind () in -+ try -+ let fn = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ocamlfind -+ ["query"; "-predicates"; "native"; "dynlink"; -+ "-format"; "%d/%a"] -+ in -+ Sys.file_exists fn -+ with _ -> -+ false -+ in -+ if not has_native_dynlink then -+ false -+ else if ocaml_lt_312 () then -+ false -+ else if (os_type () = "Win32" || os_type () = "Cygwin") -+ && flexdll_lt_030 () then -+ begin -+ BaseMessage.warning -+ (f_ ".cmxs generation disabled because FlexDLL needs to be \ -+ at least 0.30. Please upgrade FlexDLL from %s to 0.30.") -+ (flexdll_version ()); -+ false -+ end -+ else -+ true -+ in -+ string_of_bool res) -+ -+ let init pkg = -+ rpkg := Some pkg; -+ List.iter (fun f -> f pkg.oasis_version) !var_cond -+ -+end -+ -+module BaseFileAB = struct -+(* # 21 "src/base/BaseFileAB.ml" *) -+ -+ open BaseEnv -+ open OASISGettext -+ open BaseMessage -+ -+ let to_filename fn = -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ if not (Filename.check_suffix fn ".ab") then -+ warning -+ (f_ "File '%s' doesn't have '.ab' extension") -+ fn; -+ Filename.chop_extension fn -+ -+ let replace fn_lst = -+ let buff = -+ Buffer.create 13 -+ in -+ List.iter -+ (fun fn -> -+ let fn = -+ OASISHostPath.of_unix fn -+ in -+ let chn_in = -+ open_in fn -+ in -+ let chn_out = -+ open_out (to_filename fn) -+ in -+ ( -+ try -+ while true do -+ Buffer.add_string buff (var_expand (input_line chn_in)); -+ Buffer.add_char buff '\n' -+ done -+ with End_of_file -> -+ () -+ ); -+ Buffer.output_buffer chn_out buff; -+ Buffer.clear buff; -+ close_in chn_in; -+ close_out chn_out) -+ fn_lst -+end -+ -+module BaseLog = struct -+(* # 21 "src/base/BaseLog.ml" *) -+ -+ open OASISUtils -+ -+ let default_filename = -+ Filename.concat -+ (Filename.dirname BaseEnv.default_filename) -+ "setup.log" -+ -+ module SetTupleString = -+ Set.Make -+ (struct -+ type t = string * string -+ let compare (s11, s12) (s21, s22) = -+ match String.compare s11 s21 with -+ | 0 -> String.compare s12 s22 -+ | n -> n -+ end) -+ -+ let load () = -+ if Sys.file_exists default_filename then -+ begin -+ let chn = -+ open_in default_filename -+ in -+ let scbuf = -+ Scanf.Scanning.from_file default_filename -+ in -+ let rec read_aux (st, lst) = -+ if not (Scanf.Scanning.end_of_input scbuf) then -+ begin -+ let acc = -+ try -+ Scanf.bscanf scbuf "%S %S\n" -+ (fun e d -> -+ let t = -+ e, d -+ in -+ if SetTupleString.mem t st then -+ st, lst -+ else -+ SetTupleString.add t st, -+ t :: lst) -+ with Scanf.Scan_failure _ -> -+ failwith -+ (Scanf.bscanf scbuf -+ "%l" -+ (fun line -> -+ Printf.sprintf -+ "Malformed log file '%s' at line %d" -+ default_filename -+ line)) -+ in -+ read_aux acc -+ end -+ else -+ begin -+ close_in chn; -+ List.rev lst -+ end -+ in -+ read_aux (SetTupleString.empty, []) -+ end -+ else -+ begin -+ [] -+ end -+ -+ let register event data = -+ let chn_out = -+ open_out_gen [Open_append; Open_creat; Open_text] 0o644 default_filename -+ in -+ Printf.fprintf chn_out "%S %S\n" event data; -+ close_out chn_out -+ -+ let unregister event data = -+ if Sys.file_exists default_filename then -+ begin -+ let lst = -+ load () -+ in -+ let chn_out = -+ open_out default_filename -+ in -+ let write_something = -+ ref false -+ in -+ List.iter -+ (fun (e, d) -> -+ if e <> event || d <> data then -+ begin -+ write_something := true; -+ Printf.fprintf chn_out "%S %S\n" e d -+ end) -+ lst; -+ close_out chn_out; -+ if not !write_something then -+ Sys.remove default_filename -+ end -+ -+ let filter events = -+ let st_events = -+ List.fold_left -+ (fun st e -> -+ SetString.add e st) -+ SetString.empty -+ events -+ in -+ List.filter -+ (fun (e, _) -> SetString.mem e st_events) -+ (load ()) -+ -+ let exists event data = -+ List.exists -+ (fun v -> (event, data) = v) -+ (load ()) -+end -+ -+module BaseBuilt = struct -+(* # 21 "src/base/BaseBuilt.ml" *) -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseStandardVar -+ open BaseMessage -+ -+ type t = -+ | BExec (* Executable *) -+ | BExecLib (* Library coming with executable *) -+ | BLib (* Library *) -+ | BDoc (* Document *) -+ -+ let to_log_event_file t nm = -+ "built_"^ -+ (match t with -+ | BExec -> "exec" -+ | BExecLib -> "exec_lib" -+ | BLib -> "lib" -+ | BDoc -> "doc")^ -+ "_"^nm -+ -+ let to_log_event_done t nm = -+ "is_"^(to_log_event_file t nm) -+ -+ let register t nm lst = -+ BaseLog.register -+ (to_log_event_done t nm) -+ "true"; -+ List.iter -+ (fun alt -> -+ let registered = -+ List.fold_left -+ (fun registered fn -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ BaseLog.register -+ (to_log_event_file t nm) -+ (if Filename.is_relative fn then -+ Filename.concat (Sys.getcwd ()) fn -+ else -+ fn); -+ true -+ end -+ else -+ registered) -+ false -+ alt -+ in -+ if not registered then -+ warning -+ (f_ "Cannot find an existing alternative files among: %s") -+ (String.concat (s_ ", ") alt)) -+ lst -+ -+ let unregister t nm = -+ List.iter -+ (fun (e, d) -> -+ BaseLog.unregister e d) -+ (BaseLog.filter -+ [to_log_event_file t nm; -+ to_log_event_done t nm]) -+ -+ let fold t nm f acc = -+ List.fold_left -+ (fun acc (_, fn) -> -+ if OASISFileUtil.file_exists_case fn then -+ begin -+ f acc fn -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' has been marked as built \ -+ for %s but doesn't exist") -+ fn -+ (Printf.sprintf -+ (match t with -+ | BExec | BExecLib -> -+ (f_ "executable %s") -+ | BLib -> -+ (f_ "library %s") -+ | BDoc -> -+ (f_ "documentation %s")) -+ nm); -+ acc -+ end) -+ acc -+ (BaseLog.filter -+ [to_log_event_file t nm]) -+ -+ let is_built t nm = -+ List.fold_left -+ (fun is_built (_, d) -> -+ (try -+ bool_of_string d -+ with _ -> -+ false)) -+ false -+ (BaseLog.filter -+ [to_log_event_done t nm]) -+ -+ let of_executable ffn (cs, bs, exec) = -+ let unix_exec_is, unix_dll_opt = -+ OASISExecutable.unix_exec_is -+ (cs, bs, exec) -+ (fun () -> -+ bool_of_string -+ (is_native ())) -+ ext_dll -+ ext_program -+ in -+ let evs = -+ (BExec, cs.cs_name, [[ffn unix_exec_is]]) -+ :: -+ (match unix_dll_opt with -+ | Some fn -> -+ [BExecLib, cs.cs_name, [[ffn fn]]] -+ | None -> -+ []) -+ in -+ evs, -+ unix_exec_is, -+ unix_dll_opt -+ -+ let of_library ffn (cs, bs, lib) = -+ let unix_lst = -+ OASISLibrary.generated_unix_files -+ ~ctxt:!BaseContext.default -+ ~source_file_exists:(fun fn -> -+ OASISFileUtil.file_exists_case (OASISHostPath.of_unix fn)) -+ ~is_native:(bool_of_string (is_native ())) -+ ~has_native_dynlink:(bool_of_string (native_dynlink ())) -+ ~ext_lib:(ext_lib ()) -+ ~ext_dll:(ext_dll ()) -+ (cs, bs, lib) -+ in -+ let evs = -+ [BLib, -+ cs.cs_name, -+ List.map (List.map ffn) unix_lst] -+ in -+ evs, unix_lst -+ -+end -+ -+module BaseCustom = struct -+(* # 21 "src/base/BaseCustom.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ let run cmd args extra_args = -+ OASISExec.run ~ctxt:!BaseContext.default ~quote:false -+ (var_expand cmd) -+ (List.map -+ var_expand -+ (args @ (Array.to_list extra_args))) -+ -+ let hook ?(failsafe=false) cstm f e = -+ let optional_command lst = -+ let printer = -+ function -+ | Some (cmd, args) -> String.concat " " (cmd :: args) -+ | None -> s_ "No command" -+ in -+ match -+ var_choose -+ ~name:(s_ "Pre/Post Command") -+ ~printer -+ lst with -+ | Some (cmd, args) -> -+ begin -+ try -+ run cmd args [||] -+ with e when failsafe -> -+ warning -+ (f_ "Command '%s' fail with error: %s") -+ (String.concat " " (cmd :: args)) -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ end -+ | None -> -+ () -+ in -+ let res = -+ optional_command cstm.pre_command; -+ f e -+ in -+ optional_command cstm.post_command; -+ res -+end -+ -+module BaseDynVar = struct -+(* # 21 "src/base/BaseDynVar.ml" *) -+ -+ -+ open OASISTypes -+ open OASISGettext -+ open BaseEnv -+ open BaseBuilt -+ -+ let init pkg = -+ (* TODO: disambiguate exec vs other variable by adding exec_VARNAME. *) -+ (* TODO: provide compile option for library libary_byte_args_VARNAME... *) -+ List.iter -+ (function -+ | Executable (cs, bs, exec) -> -+ if var_choose bs.bs_build then -+ var_ignore -+ (var_redefine -+ (* We don't save this variable *) -+ ~dump:false -+ ~short_desc:(fun () -> -+ Printf.sprintf -+ (f_ "Filename of executable '%s'") -+ cs.cs_name) -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ let fn_opt = -+ fold -+ BExec cs.cs_name -+ (fun _ fn -> Some fn) -+ None -+ in -+ match fn_opt with -+ | Some fn -> fn -+ | None -> -+ raise -+ (PropList.Not_set -+ (cs.cs_name, -+ Some (Printf.sprintf -+ (f_ "Executable '%s' not yet built.") -+ cs.cs_name))))) -+ -+ | Library _ | Flag _ | Test _ | SrcRepo _ | Doc _ -> -+ ()) -+ pkg.sections -+end -+ -+module BaseTest = struct -+(* # 21 "src/base/BaseTest.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISExpr -+ open OASISGettext -+ -+ let test lst pkg extra_args = -+ -+ let one_test (failure, n) (test_plugin, cs, test) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "test %s run") -+ cs.cs_name) -+ ~printer:string_of_bool -+ test.test_run then -+ begin -+ let () = -+ info (f_ "Running test '%s'") cs.cs_name -+ in -+ let back_cwd = -+ match test.test_working_directory with -+ | Some dir -> -+ let cwd = -+ Sys.getcwd () -+ in -+ let chdir d = -+ info (f_ "Changing directory to '%s'") d; -+ Sys.chdir d -+ in -+ chdir dir; -+ fun () -> chdir cwd -+ -+ | None -> -+ fun () -> () -+ in -+ try -+ let failure_percent = -+ BaseCustom.hook -+ test.test_custom -+ (test_plugin pkg (cs, test)) -+ extra_args -+ in -+ back_cwd (); -+ (failure_percent +. failure, n + 1) -+ with e -> -+ begin -+ back_cwd (); -+ raise e -+ end -+ end -+ else -+ begin -+ info (f_ "Skipping test '%s'") cs.cs_name; -+ (failure, n) -+ end -+ in -+ let (failed, n) = -+ List.fold_left -+ one_test -+ (0.0, 0) -+ lst -+ in -+ let failure_percent = -+ if n = 0 then -+ 0.0 -+ else -+ failed /. (float_of_int n) -+ in -+ let msg = -+ Printf.sprintf -+ (f_ "Tests had a %.2f%% failure rate") -+ (100. *. failure_percent) -+ in -+ if failure_percent > 0.0 then -+ failwith msg -+ else -+ info "%s" msg; -+ -+ (* Possible explanation why the tests where not run. *) -+ if OASISVersion.version_0_3_or_after pkg.oasis_version && -+ not (bool_of_string (BaseStandardVar.tests ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Tests are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-tests'" -+end -+ -+module BaseDoc = struct -+(* # 21 "src/base/BaseDoc.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISGettext -+ -+ let doc lst pkg extra_args = -+ -+ let one_doc (doc_plugin, cs, doc) = -+ if var_choose -+ ~name:(Printf.sprintf -+ (f_ "documentation %s build") -+ cs.cs_name) -+ ~printer:string_of_bool -+ doc.doc_build then -+ begin -+ info (f_ "Building documentation '%s'") cs.cs_name; -+ BaseCustom.hook -+ doc.doc_custom -+ (doc_plugin pkg (cs, doc)) -+ extra_args -+ end -+ in -+ List.iter one_doc lst; -+ -+ if OASISVersion.version_0_3_or_after pkg.oasis_version && -+ not (bool_of_string (BaseStandardVar.docs ())) && -+ lst <> [] then -+ BaseMessage.warning -+ "Docs are turned off, consider enabling with \ -+ 'ocaml setup.ml -configure --enable-docs'" -+end -+ -+module BaseSetup = struct -+(* # 21 "src/base/BaseSetup.ml" *) -+ -+ open BaseEnv -+ open BaseMessage -+ open OASISTypes -+ open OASISSection -+ open OASISGettext -+ open OASISUtils -+ -+ type std_args_fun = -+ package -> string array -> unit -+ -+ type ('a, 'b) section_args_fun = -+ name * (package -> (common_section * 'a) -> string array -> 'b) -+ -+ type t = -+ { -+ configure: std_args_fun; -+ build: std_args_fun; -+ doc: ((doc, unit) section_args_fun) list; -+ test: ((test, float) section_args_fun) list; -+ install: std_args_fun; -+ uninstall: std_args_fun; -+ clean: std_args_fun list; -+ clean_doc: (doc, unit) section_args_fun list; -+ clean_test: (test, unit) section_args_fun list; -+ distclean: std_args_fun list; -+ distclean_doc: (doc, unit) section_args_fun list; -+ distclean_test: (test, unit) section_args_fun list; -+ package: package; -+ oasis_fn: string option; -+ oasis_version: string; -+ oasis_digest: Digest.t option; -+ oasis_exec: string option; -+ oasis_setup_args: string list; -+ setup_update: bool; -+ } -+ -+ (* Associate a plugin function with data from package *) -+ let join_plugin_sections filter_map lst = -+ List.rev -+ (List.fold_left -+ (fun acc sct -> -+ match filter_map sct with -+ | Some e -> -+ e :: acc -+ | None -> -+ acc) -+ [] -+ lst) -+ -+ (* Search for plugin data associated with a section name *) -+ let lookup_plugin_section plugin action nm lst = -+ try -+ List.assoc nm lst -+ with Not_found -> -+ failwithf -+ (f_ "Cannot find plugin %s matching section %s for %s action") -+ plugin -+ nm -+ action -+ -+ let configure t args = -+ (* Run configure *) -+ BaseCustom.hook -+ t.package.conf_custom -+ (fun () -> -+ (* Reload if preconf has changed it *) -+ begin -+ try -+ unload (); -+ load (); -+ with _ -> -+ () -+ end; -+ -+ (* Run plugin's configure *) -+ t.configure t.package args; -+ -+ (* Dump to allow postconf to change it *) -+ dump ()) -+ (); -+ -+ (* Reload environment *) -+ unload (); -+ load (); -+ -+ (* Save environment *) -+ print (); -+ -+ (* Replace data in file *) -+ BaseFileAB.replace t.package.files_ab -+ -+ let build t args = -+ BaseCustom.hook -+ t.package.build_custom -+ (t.build t.package) -+ args -+ -+ let doc t args = -+ BaseDoc.doc -+ (join_plugin_sections -+ (function -+ | Doc (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "documentation" -+ (s_ "build") -+ cs.cs_name -+ t.doc, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ let test t args = -+ BaseTest.test -+ (join_plugin_sections -+ (function -+ | Test (cs, e) -> -+ Some -+ (lookup_plugin_section -+ "test" -+ (s_ "run") -+ cs.cs_name -+ t.test, -+ cs, -+ e) -+ | _ -> -+ None) -+ t.package.sections) -+ t.package -+ args -+ -+ let all t args = -+ let rno_doc = -+ ref false -+ in -+ let rno_test = -+ ref false -+ in -+ Arg.parse_argv -+ ~current:(ref 0) -+ (Array.of_list -+ ((Sys.executable_name^" all") :: -+ (Array.to_list args))) -+ [ -+ "-no-doc", -+ Arg.Set rno_doc, -+ s_ "Don't run doc target"; -+ -+ "-no-test", -+ Arg.Set rno_test, -+ s_ "Don't run test target"; -+ ] -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ ""; -+ -+ info "Running configure step"; -+ configure t [||]; -+ -+ info "Running build step"; -+ build t [||]; -+ -+ (* Load setup.log dynamic variables *) -+ BaseDynVar.init t.package; -+ -+ if not !rno_doc then -+ begin -+ info "Running doc step"; -+ doc t [||]; -+ end -+ else -+ begin -+ info "Skipping doc step" -+ end; -+ -+ if not !rno_test then -+ begin -+ info "Running test step"; -+ test t [||] -+ end -+ else -+ begin -+ info "Skipping test step" -+ end -+ -+ let install t args = -+ BaseCustom.hook -+ t.package.install_custom -+ (t.install t.package) -+ args -+ -+ let uninstall t args = -+ BaseCustom.hook -+ t.package.uninstall_custom -+ (t.uninstall t.package) -+ args -+ -+ let reinstall t args = -+ uninstall t args; -+ install t args -+ -+ let clean, distclean = -+ let failsafe f a = -+ try -+ f a -+ with e -> -+ warning -+ (f_ "Action fail with error: %s") -+ (match e with -+ | Failure msg -> msg -+ | e -> Printexc.to_string e) -+ in -+ -+ let generic_clean t cstm mains docs tests args = -+ BaseCustom.hook -+ ~failsafe:true -+ cstm -+ (fun () -> -+ (* Clean section *) -+ List.iter -+ (function -+ | Test (cs, test) -> -+ let f = -+ try -+ List.assoc cs.cs_name tests -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, test)) -+ args -+ | Doc (cs, doc) -> -+ let f = -+ try -+ List.assoc cs.cs_name docs -+ with Not_found -> -+ fun _ _ _ -> () -+ in -+ failsafe -+ (f t.package (cs, doc)) -+ args -+ | Library _ -+ | Executable _ -+ | Flag _ -+ | SrcRepo _ -> -+ ()) -+ t.package.sections; -+ (* Clean whole package *) -+ List.iter -+ (fun f -> -+ failsafe -+ (f t.package) -+ args) -+ mains) -+ () -+ in -+ -+ let clean t args = -+ generic_clean -+ t -+ t.package.clean_custom -+ t.clean -+ t.clean_doc -+ t.clean_test -+ args -+ in -+ -+ let distclean t args = -+ (* Call clean *) -+ clean t args; -+ -+ (* Call distclean code *) -+ generic_clean -+ t -+ t.package.distclean_custom -+ t.distclean -+ t.distclean_doc -+ t.distclean_test -+ args; -+ -+ (* Remove generated file *) -+ List.iter -+ (fun fn -> -+ if Sys.file_exists fn then -+ begin -+ info (f_ "Remove '%s'") fn; -+ Sys.remove fn -+ end) -+ (BaseEnv.default_filename -+ :: -+ BaseLog.default_filename -+ :: -+ (List.rev_map BaseFileAB.to_filename t.package.files_ab)) -+ in -+ -+ clean, distclean -+ -+ let version t _ = -+ print_endline t.oasis_version -+ -+ let update_setup_ml, no_update_setup_ml_cli = -+ let b = ref true in -+ b, -+ ("-no-update-setup-ml", -+ Arg.Clear b, -+ s_ " Don't try to update setup.ml, even if _oasis has changed.") -+ -+ let update_setup_ml t = -+ let oasis_fn = -+ match t.oasis_fn with -+ | Some fn -> fn -+ | None -> "_oasis" -+ in -+ let oasis_exec = -+ match t.oasis_exec with -+ | Some fn -> fn -+ | None -> "oasis" -+ in -+ let ocaml = -+ Sys.executable_name -+ in -+ let setup_ml, args = -+ match Array.to_list Sys.argv with -+ | setup_ml :: args -> -+ setup_ml, args -+ | [] -> -+ failwith -+ (s_ "Expecting non-empty command line arguments.") -+ in -+ let ocaml, setup_ml = -+ if Sys.executable_name = Sys.argv.(0) then -+ (* We are not running in standard mode, probably the script -+ * is precompiled. -+ *) -+ "ocaml", "setup.ml" -+ else -+ ocaml, setup_ml -+ in -+ let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in -+ let do_update () = -+ let oasis_exec_version = -+ OASISExec.run_read_one_line -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | 1 -> -+ failwithf -+ (f_ "Executable '%s' is probably an old version \ -+ of oasis (< 0.3.0), please update to version \ -+ v%s.") -+ oasis_exec t.oasis_version -+ | 127 -> -+ failwithf -+ (f_ "Cannot find executable '%s', please install \ -+ oasis v%s.") -+ oasis_exec t.oasis_version -+ | n -> -+ failwithf -+ (f_ "Command '%s version' exited with code %d.") -+ oasis_exec n) -+ oasis_exec ["version"] -+ in -+ if OASISVersion.comparator_apply -+ (OASISVersion.version_of_string oasis_exec_version) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string t.oasis_version)) then -+ begin -+ (* We have a version >= for the executable oasis, proceed with -+ * update. -+ *) -+ (* TODO: delegate this check to 'oasis setup'. *) -+ if Sys.os_type = "Win32" then -+ failwithf -+ (f_ "It is not possible to update the running script \ -+ setup.ml on Windows. Please update setup.ml by \ -+ running '%s'.") -+ (String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args)) -+ else -+ begin -+ OASISExec.run -+ ~ctxt:!BaseContext.default -+ ~f_exit_code: -+ (function -+ | 0 -> -+ () -+ | n -> -+ failwithf -+ (f_ "Unable to update setup.ml using '%s', \ -+ please fix the problem and retry.") -+ oasis_exec) -+ oasis_exec ("setup" :: t.oasis_setup_args); -+ OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args) -+ end -+ end -+ else -+ failwithf -+ (f_ "The version of '%s' (v%s) doesn't match the version of \ -+ oasis used to generate the %s file. Please install at \ -+ least oasis v%s.") -+ oasis_exec oasis_exec_version setup_ml t.oasis_version -+ in -+ -+ if !update_setup_ml then -+ begin -+ try -+ match t.oasis_digest with -+ | Some dgst -> -+ if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then -+ begin -+ do_update (); -+ true -+ end -+ else -+ false -+ | None -> -+ false -+ with e -> -+ error -+ (f_ "Error when updating setup.ml. If you want to avoid this error, \ -+ you can bypass the update of %s by running '%s %s %s %s'") -+ setup_ml ocaml setup_ml no_update_setup_ml_cli -+ (String.concat " " args); -+ raise e -+ end -+ else -+ false -+ -+ let setup t = -+ let catch_exn = -+ ref true -+ in -+ try -+ let act_ref = -+ ref (fun _ -> -+ failwithf -+ (f_ "No action defined, run '%s %s -help'") -+ Sys.executable_name -+ Sys.argv.(0)) -+ -+ in -+ let extra_args_ref = -+ ref [] -+ in -+ let allow_empty_env_ref = -+ ref false -+ in -+ let arg_handle ?(allow_empty_env=false) act = -+ Arg.Tuple -+ [ -+ Arg.Rest (fun str -> extra_args_ref := str :: !extra_args_ref); -+ -+ Arg.Unit -+ (fun () -> -+ allow_empty_env_ref := allow_empty_env; -+ act_ref := act); -+ ] -+ in -+ -+ Arg.parse -+ (Arg.align -+ ([ -+ "-configure", -+ arg_handle ~allow_empty_env:true configure, -+ s_ "[options*] Configure the whole build process."; -+ -+ "-build", -+ arg_handle build, -+ s_ "[options*] Build executables and libraries."; -+ -+ "-doc", -+ arg_handle doc, -+ s_ "[options*] Build documents."; -+ -+ "-test", -+ arg_handle test, -+ s_ "[options*] Run tests."; -+ -+ "-all", -+ arg_handle ~allow_empty_env:true all, -+ s_ "[options*] Run configure, build, doc and test targets."; -+ -+ "-install", -+ arg_handle install, -+ s_ "[options*] Install libraries, data, executables \ -+ and documents."; -+ -+ "-uninstall", -+ arg_handle uninstall, -+ s_ "[options*] Uninstall libraries, data, executables \ -+ and documents."; -+ -+ "-reinstall", -+ arg_handle reinstall, -+ s_ "[options*] Uninstall and install libraries, data, \ -+ executables and documents."; -+ -+ "-clean", -+ arg_handle ~allow_empty_env:true clean, -+ s_ "[options*] Clean files generated by a build."; -+ -+ "-distclean", -+ arg_handle ~allow_empty_env:true distclean, -+ s_ "[options*] Clean files generated by a build and configure."; -+ -+ "-version", -+ arg_handle ~allow_empty_env:true version, -+ s_ " Display version of OASIS used to generate this setup.ml."; -+ -+ "-no-catch-exn", -+ Arg.Clear catch_exn, -+ s_ " Don't catch exception, useful for debugging."; -+ ] -+ @ -+ (if t.setup_update then -+ [no_update_setup_ml_cli] -+ else -+ []) -+ @ (BaseContext.args ()))) -+ (failwithf (f_ "Don't know what to do with '%s'")) -+ (s_ "Setup and run build process current package\n"); -+ -+ (* Build initial environment *) -+ load ~allow_empty:!allow_empty_env_ref (); -+ -+ (** Initialize flags *) -+ List.iter -+ (function -+ | Flag (cs, {flag_description = hlp; -+ flag_default = choices}) -> -+ begin -+ let apply ?short_desc () = -+ var_ignore -+ (var_define -+ ~cli:CLIEnable -+ ?short_desc -+ (OASISUtils.varname_of_string cs.cs_name) -+ (fun () -> -+ string_of_bool -+ (var_choose -+ ~name:(Printf.sprintf -+ (f_ "default value of flag %s") -+ cs.cs_name) -+ ~printer:string_of_bool -+ choices))) -+ in -+ match hlp with -+ | Some hlp -> -+ apply ~short_desc:(fun () -> hlp) () -+ | None -> -+ apply () -+ end -+ | _ -> -+ ()) -+ t.package.sections; -+ -+ BaseStandardVar.init t.package; -+ -+ BaseDynVar.init t.package; -+ -+ if t.setup_update && update_setup_ml t then -+ () -+ else -+ !act_ref t (Array.of_list (List.rev !extra_args_ref)) -+ -+ with e when !catch_exn -> -+ error "%s" (Printexc.to_string e); -+ exit 1 -+ -+end -+ -+ -+# 4480 "setup.ml" -+module InternalConfigurePlugin = struct -+(* # 21 "src/plugins/internal/InternalConfigurePlugin.ml" *) -+ -+ (** Configure using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ open BaseEnv -+ open OASISTypes -+ open OASISUtils -+ open OASISGettext -+ open BaseMessage -+ -+ (** Configure build using provided series of check to be done -+ * and then output corresponding file. -+ *) -+ let configure pkg argv = -+ let var_ignore_eval var = -+ let _s : string = -+ var () -+ in -+ () -+ in -+ -+ let errors = -+ ref SetString.empty -+ in -+ -+ let buff = -+ Buffer.create 13 -+ in -+ -+ let add_errors fmt = -+ Printf.kbprintf -+ (fun b -> -+ errors := SetString.add (Buffer.contents b) !errors; -+ Buffer.clear b) -+ buff -+ fmt -+ in -+ -+ let warn_exception e = -+ warning "%s" (Printexc.to_string e) -+ in -+ -+ (* Check tools *) -+ let check_tools lst = -+ List.iter -+ (function -+ | ExternalTool tool -> -+ begin -+ try -+ var_ignore_eval (BaseCheck.prog tool) -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find external tool '%s'") tool -+ end -+ | InternalExecutable nm1 -> -+ (* Check that matching tool is built *) -+ List.iter -+ (function -+ | Executable ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal executable \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ lst -+ in -+ -+ let build_checks sct bs = -+ if var_choose bs.bs_build then -+ begin -+ if bs.bs_compiled_object = Native then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.ocamlopt -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Section %s requires native compilation") -+ (OASISSection.string_of_section sct) -+ end; -+ -+ (* Check tools *) -+ check_tools bs.bs_build_tools; -+ -+ (* Check depends *) -+ List.iter -+ (function -+ | FindlibPackage (findlib_pkg, version_comparator) -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.package ?version_comparator findlib_pkg) -+ with e -> -+ warn_exception e; -+ match version_comparator with -+ | None -> -+ add_errors -+ (f_ "Cannot find findlib package %s") -+ findlib_pkg -+ | Some ver_cmp -> -+ add_errors -+ (f_ "Cannot find findlib package %s (%s)") -+ findlib_pkg -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | InternalLibrary nm1 -> -+ (* Check that matching library is built *) -+ List.iter -+ (function -+ | Library ({cs_name = nm2}, -+ {bs_build = build}, -+ _) when nm1 = nm2 -> -+ if not (var_choose build) then -+ add_errors -+ (f_ "Cannot find buildable internal library \ -+ '%s' when checking build depends") -+ nm1 -+ | _ -> -+ ()) -+ pkg.sections) -+ bs.bs_build_depends -+ end -+ in -+ -+ (* Parse command line *) -+ BaseArgExt.parse argv (BaseEnv.args ()); -+ -+ (* OCaml version *) -+ begin -+ match pkg.ocaml_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "ocaml" -+ ver_cmp -+ BaseStandardVar.ocaml_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "OCaml version %s doesn't match version constraint %s") -+ (BaseStandardVar.ocaml_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ -+ (* Findlib version *) -+ begin -+ match pkg.findlib_version with -+ | Some ver_cmp -> -+ begin -+ try -+ var_ignore_eval -+ (BaseCheck.version -+ "findlib" -+ ver_cmp -+ BaseStandardVar.findlib_version) -+ with e -> -+ warn_exception e; -+ add_errors -+ (f_ "Findlib version %s doesn't match version constraint %s") -+ (BaseStandardVar.findlib_version ()) -+ (OASISVersion.string_of_comparator ver_cmp) -+ end -+ | None -> -+ () -+ end; -+ -+ (* FlexDLL *) -+ if BaseStandardVar.os_type () = "Win32" || -+ BaseStandardVar.os_type () = "Cygwin" then -+ begin -+ try -+ var_ignore_eval BaseStandardVar.flexlink -+ with e -> -+ warn_exception e; -+ add_errors (f_ "Cannot find 'flexlink'") -+ end; -+ -+ (* Check build depends *) -+ List.iter -+ (function -+ | Executable (_, bs, _) -+ | Library (_, bs, _) as sct -> -+ build_checks sct bs -+ | Doc (_, doc) -> -+ if var_choose doc.doc_build then -+ check_tools doc.doc_build_tools -+ | Test (_, test) -> -+ if var_choose test.test_run then -+ check_tools test.test_tools -+ | _ -> -+ ()) -+ pkg.sections; -+ -+ (* Check if we need native dynlink (presence of libraries that compile to -+ * native) -+ *) -+ begin -+ let has_cmxa = -+ List.exists -+ (function -+ | Library (_, bs, _) -> -+ var_choose bs.bs_build && -+ (bs.bs_compiled_object = Native || -+ (bs.bs_compiled_object = Best && -+ bool_of_string (BaseStandardVar.is_native ()))) -+ | _ -> -+ false) -+ pkg.sections -+ in -+ if has_cmxa then -+ var_ignore_eval BaseStandardVar.native_dynlink -+ end; -+ -+ (* Check errors *) -+ if SetString.empty != !errors then -+ begin -+ List.iter -+ (fun e -> error "%s" e) -+ (SetString.elements !errors); -+ failwithf -+ (fn_ -+ "%d configuration error" -+ "%d configuration errors" -+ (SetString.cardinal !errors)) -+ (SetString.cardinal !errors) -+ end -+ -+end -+ -+module InternalInstallPlugin = struct -+(* # 21 "src/plugins/internal/InternalInstallPlugin.ml" *) -+ -+ (** Install using internal scheme -+ @author Sylvain Le Gall -+ *) -+ -+ open BaseEnv -+ open BaseStandardVar -+ open BaseMessage -+ open OASISTypes -+ open OASISLibrary -+ open OASISGettext -+ open OASISUtils -+ -+ let exec_hook = -+ ref (fun (cs, bs, exec) -> cs, bs, exec) -+ -+ let lib_hook = -+ ref (fun (cs, bs, lib) -> cs, bs, lib, []) -+ -+ let doc_hook = -+ ref (fun (cs, doc) -> cs, doc) -+ -+ let install_file_ev = -+ "install-file" -+ -+ let install_dir_ev = -+ "install-dir" -+ -+ let install_findlib_ev = -+ "install-findlib" -+ -+ let win32_max_command_line_length = 8000 -+ -+ let split_install_command ocamlfind findlib_name meta files = -+ if Sys.os_type = "Win32" then -+ (* Arguments for the first command: *) -+ let first_args = ["install"; findlib_name; meta] in -+ (* Arguments for remaining commands: *) -+ let other_args = ["install"; findlib_name; "-add"] in -+ (* Extract as much files as possible from [files], [len] is -+ the current command line length: *) -+ let rec get_files len acc files = -+ match files with -+ | [] -> -+ (List.rev acc, []) -+ | file :: rest -> -+ let len = len + 1 + String.length file in -+ if len > win32_max_command_line_length then -+ (List.rev acc, files) -+ else -+ get_files len (file :: acc) rest -+ in -+ (* Split the command into several commands. *) -+ let rec split args files = -+ match files with -+ | [] -> -+ [] -+ | _ -> -+ (* Length of "ocamlfind install [META|-add]" *) -+ let len = -+ List.fold_left -+ (fun len arg -> -+ len + 1 (* for the space *) + String.length arg) -+ (String.length ocamlfind) -+ args -+ in -+ match get_files len [] files with -+ | ([], _) -> -+ failwith (s_ "Command line too long.") -+ | (firsts, others) -> -+ let cmd = args @ firsts in -+ (* Use -add for remaining commands: *) -+ let () = -+ let findlib_ge_132 = -+ OASISVersion.comparator_apply -+ (OASISVersion.version_of_string -+ (BaseStandardVar.findlib_version ())) -+ (OASISVersion.VGreaterEqual -+ (OASISVersion.version_of_string "1.3.2")) -+ in -+ if not findlib_ge_132 then -+ failwithf -+ (f_ "Installing the library %s require to use the flag \ -+ '-add' of ocamlfind because the command line is too \ -+ long. This flag is only available for findlib 1.3.2. \ -+ Please upgrade findlib from %s to 1.3.2") -+ findlib_name (BaseStandardVar.findlib_version ()) -+ in -+ let cmds = split other_args others in -+ cmd :: cmds -+ in -+ (* The first command does not use -add: *) -+ split first_args files -+ else -+ ["install" :: findlib_name :: meta :: files] -+ -+ let install pkg argv = -+ -+ let in_destdir = -+ try -+ let destdir = -+ destdir () -+ in -+ (* Practically speaking destdir is prepended -+ * at the beginning of the target filename -+ *) -+ fun fn -> destdir^fn -+ with PropList.Not_set _ -> -+ fun fn -> fn -+ in -+ -+ let install_file ?tgt_fn src_file envdir = -+ let tgt_dir = -+ in_destdir (envdir ()) -+ in -+ let tgt_file = -+ Filename.concat -+ tgt_dir -+ (match tgt_fn with -+ | Some fn -> -+ fn -+ | None -> -+ Filename.basename src_file) -+ in -+ (* Create target directory if needed *) -+ OASISFileUtil.mkdir_parent -+ ~ctxt:!BaseContext.default -+ (fun dn -> -+ info (f_ "Creating directory '%s'") dn; -+ BaseLog.register install_dir_ev dn) -+ tgt_dir; -+ -+ (* Really install files *) -+ info (f_ "Copying file '%s' to '%s'") src_file tgt_file; -+ OASISFileUtil.cp ~ctxt:!BaseContext.default src_file tgt_file; -+ BaseLog.register install_file_ev tgt_file -+ in -+ -+ (* Install data into defined directory *) -+ let install_data srcdir lst tgtdir = -+ let tgtdir = -+ OASISHostPath.of_unix (var_expand tgtdir) -+ in -+ List.iter -+ (fun (src, tgt_opt) -> -+ let real_srcs = -+ OASISFileUtil.glob -+ ~ctxt:!BaseContext.default -+ (Filename.concat srcdir src) -+ in -+ if real_srcs = [] then -+ failwithf -+ (f_ "Wildcard '%s' doesn't match any files") -+ src; -+ List.iter -+ (fun fn -> -+ install_file -+ fn -+ (fun () -> -+ match tgt_opt with -+ | Some s -> -+ OASISHostPath.of_unix (var_expand s) -+ | None -> -+ tgtdir)) -+ real_srcs) -+ lst -+ in -+ -+ (** Install all libraries *) -+ let install_libs pkg = -+ -+ let files_of_library (f_data, acc) data_lib = -+ let cs, bs, lib, lib_extra = -+ !lib_hook data_lib -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BLib cs.cs_name then -+ begin -+ let acc = -+ (* Start with acc + lib_extra *) -+ List.rev_append lib_extra acc -+ in -+ let acc = -+ (* Add uncompiled header from the source tree *) -+ let path = -+ OASISHostPath.of_unix bs.bs_path -+ in -+ List.fold_left -+ (fun acc modul -> -+ try -+ List.find -+ OASISFileUtil.file_exists_case -+ (List.map -+ (Filename.concat path) -+ [modul^".mli"; -+ modul^".ml"; -+ String.uncapitalize modul^".mli"; -+ String.capitalize modul^".mli"; -+ String.uncapitalize modul^".ml"; -+ String.capitalize modul^".ml"]) -+ :: acc -+ with Not_found -> -+ begin -+ warning -+ (f_ "Cannot find source header for module %s \ -+ in library %s") -+ modul cs.cs_name; -+ acc -+ end) -+ acc -+ lib.lib_modules -+ in -+ -+ let acc = -+ (* Get generated files *) -+ BaseBuilt.fold -+ BaseBuilt.BLib -+ cs.cs_name -+ (fun acc fn -> fn :: acc) -+ acc -+ in -+ -+ let f_data () = -+ (* Install data associated with the library *) -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name); -+ f_data () -+ in -+ -+ (f_data, acc) -+ end -+ else -+ begin -+ (f_data, acc) -+ end -+ in -+ -+ (* Install one group of library *) -+ let install_group_lib grp = -+ (* Iterate through all group nodes *) -+ let rec install_group_lib_aux data_and_files grp = -+ let data_and_files, children = -+ match grp with -+ | Container (_, children) -> -+ data_and_files, children -+ | Package (_, cs, bs, lib, children) -> -+ files_of_library data_and_files (cs, bs, lib), children -+ in -+ List.fold_left -+ install_group_lib_aux -+ data_and_files -+ children -+ in -+ -+ (* Findlib name of the root library *) -+ let findlib_name = -+ findlib_of_group grp -+ in -+ -+ (* Determine root library *) -+ let root_lib = -+ root_of_group grp -+ in -+ -+ (* All files to install for this library *) -+ let f_data, files = -+ install_group_lib_aux (ignore, []) grp -+ in -+ -+ (* Really install, if there is something to install *) -+ if files = [] then -+ begin -+ warning -+ (f_ "Nothing to install for findlib library '%s'") -+ findlib_name -+ end -+ else -+ begin -+ let meta = -+ (* Search META file *) -+ let (_, bs, _) = -+ root_lib -+ in -+ let res = -+ Filename.concat bs.bs_path "META" -+ in -+ if not (OASISFileUtil.file_exists_case res) then -+ failwithf -+ (f_ "Cannot find file '%s' for findlib library %s") -+ res -+ findlib_name; -+ res -+ in -+ let files = -+ (* Make filename shorter to avoid hitting command max line length -+ * too early, esp. on Windows. -+ *) -+ let remove_prefix p n = -+ let plen = String.length p in -+ let nlen = String.length n in -+ if plen <= nlen && String.sub n 0 plen = p then -+ begin -+ let fn_sep = -+ if Sys.os_type = "Win32" then -+ '\\' -+ else -+ '/' -+ in -+ let cutpoint = plen + -+ (if plen < nlen && n.[plen] = fn_sep then -+ 1 -+ else -+ 0) -+ in -+ String.sub n cutpoint (nlen - cutpoint) -+ end -+ else -+ n -+ in -+ List.map (remove_prefix (Sys.getcwd ())) files -+ in -+ info -+ (f_ "Installing findlib library '%s'") -+ findlib_name; -+ let ocamlfind = ocamlfind () in -+ let commands = -+ split_install_command -+ ocamlfind -+ findlib_name -+ meta -+ files -+ in -+ List.iter -+ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind) -+ commands; -+ BaseLog.register install_findlib_ev findlib_name -+ end; -+ -+ (* Install data files *) -+ f_data (); -+ -+ in -+ -+ let group_libs, _, _ = -+ findlib_mapping pkg -+ in -+ -+ (* We install libraries in groups *) -+ List.iter install_group_lib group_libs -+ in -+ -+ let install_execs pkg = -+ let install_exec data_exec = -+ let (cs, bs, exec) = -+ !exec_hook data_exec -+ in -+ if var_choose bs.bs_install && -+ BaseBuilt.is_built BaseBuilt.BExec cs.cs_name then -+ begin -+ let exec_libdir () = -+ Filename.concat -+ (libdir ()) -+ pkg.name -+ in -+ BaseBuilt.fold -+ BaseBuilt.BExec -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ ~tgt_fn:(cs.cs_name ^ ext_program ()) -+ fn -+ bindir) -+ (); -+ BaseBuilt.fold -+ BaseBuilt.BExecLib -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ exec_libdir) -+ (); -+ install_data -+ bs.bs_path -+ bs.bs_data_files -+ (Filename.concat -+ (datarootdir ()) -+ pkg.name) -+ end -+ in -+ List.iter -+ (function -+ | Executable (cs, bs, exec)-> -+ install_exec (cs, bs, exec) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ let install_docs pkg = -+ let install_doc data = -+ let (cs, doc) = -+ !doc_hook data -+ in -+ if var_choose doc.doc_install && -+ BaseBuilt.is_built BaseBuilt.BDoc cs.cs_name then -+ begin -+ let tgt_dir = -+ OASISHostPath.of_unix (var_expand doc.doc_install_dir) -+ in -+ BaseBuilt.fold -+ BaseBuilt.BDoc -+ cs.cs_name -+ (fun () fn -> -+ install_file -+ fn -+ (fun () -> tgt_dir)) -+ (); -+ install_data -+ Filename.current_dir_name -+ doc.doc_data_files -+ doc.doc_install_dir -+ end -+ in -+ List.iter -+ (function -+ | Doc (cs, doc) -> -+ install_doc (cs, doc) -+ | _ -> -+ ()) -+ pkg.sections -+ in -+ -+ install_libs pkg; -+ install_execs pkg; -+ install_docs pkg -+ -+ (* Uninstall already installed data *) -+ let uninstall _ argv = -+ List.iter -+ (fun (ev, data) -> -+ if ev = install_file_ev then -+ begin -+ if OASISFileUtil.file_exists_case data then -+ begin -+ info -+ (f_ "Removing file '%s'") -+ data; -+ Sys.remove data -+ end -+ else -+ begin -+ warning -+ (f_ "File '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_dir_ev then -+ begin -+ if Sys.file_exists data && Sys.is_directory data then -+ begin -+ if Sys.readdir data = [||] then -+ begin -+ info -+ (f_ "Removing directory '%s'") -+ data; -+ OASISFileUtil.rmdir ~ctxt:!BaseContext.default data -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' is not empty (%s)") -+ data -+ (String.concat -+ ", " -+ (Array.to_list -+ (Sys.readdir data))) -+ end -+ end -+ else -+ begin -+ warning -+ (f_ "Directory '%s' doesn't exist anymore") -+ data -+ end -+ end -+ else if ev = install_findlib_ev then -+ begin -+ info (f_ "Removing findlib library '%s'") data; -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlfind ()) ["remove"; data] -+ end -+ else -+ failwithf (f_ "Unknown log event '%s'") ev; -+ BaseLog.unregister ev data) -+ (* We process event in reverse order *) -+ (List.rev -+ (BaseLog.filter -+ [install_file_ev; -+ install_dir_ev; -+ install_findlib_ev;])) -+ -+end -+ -+ -+# 5233 "setup.ml" -+module OCamlbuildCommon = struct -+(* # 21 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *) -+ -+ (** Functions common to OCamlbuild build and doc plugin -+ *) -+ -+ open OASISGettext -+ open BaseEnv -+ open BaseStandardVar -+ -+ let ocamlbuild_clean_ev = -+ "ocamlbuild-clean" -+ -+ let ocamlbuildflags = -+ var_define -+ ~short_desc:(fun () -> "OCamlbuild additional flags") -+ "ocamlbuildflags" -+ (fun () -> "") -+ -+ (** Fix special arguments depending on environment *) -+ let fix_args args extra_argv = -+ List.flatten -+ [ -+ if (os_type ()) = "Win32" then -+ [ -+ "-classic-display"; -+ "-no-log"; -+ "-no-links"; -+ "-install-lib-dir"; -+ (Filename.concat (standard_library ()) "ocamlbuild") -+ ] -+ else -+ []; -+ -+ if not (bool_of_string (is_native ())) || (os_type ()) = "Win32" then -+ [ -+ "-byte-plugin" -+ ] -+ else -+ []; -+ args; -+ -+ if bool_of_string (debug ()) then -+ ["-tag"; "debug"] -+ else -+ []; -+ -+ if bool_of_string (profile ()) then -+ ["-tag"; "profile"] -+ else -+ []; -+ -+ OASISString.nsplit (ocamlbuildflags ()) ' '; -+ -+ Array.to_list extra_argv; -+ ] -+ -+ (** Run 'ocamlbuild -clean' if not already done *) -+ let run_clean extra_argv = -+ let extra_cli = -+ String.concat " " (Array.to_list extra_argv) -+ in -+ (* Run if never called with these args *) -+ if not (BaseLog.exists ocamlbuild_clean_ev extra_cli) then -+ begin -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args ["-clean"] extra_argv); -+ BaseLog.register ocamlbuild_clean_ev extra_cli; -+ at_exit -+ (fun () -> -+ try -+ BaseLog.unregister ocamlbuild_clean_ev extra_cli -+ with _ -> -+ ()) -+ end -+ -+ (** Run ocamlbuild, unregister all clean events *) -+ let run_ocamlbuild args extra_argv = -+ (* TODO: enforce that target in args must be UNIX encoded i.e. toto/index.html -+ *) -+ OASISExec.run ~ctxt:!BaseContext.default -+ (ocamlbuild ()) (fix_args args extra_argv); -+ (* Remove any clean event, we must run it again *) -+ List.iter -+ (fun (e, d) -> BaseLog.unregister e d) -+ (BaseLog.filter [ocamlbuild_clean_ev]) -+ -+ (** Determine real build directory *) -+ let build_dir extra_argv = -+ let rec search_args dir = -+ function -+ | "-build-dir" :: dir :: tl -> -+ search_args dir tl -+ | _ :: tl -> -+ search_args dir tl -+ | [] -> -+ dir -+ in -+ search_args "_build" (fix_args [] extra_argv) -+ -+end -+ -+module OCamlbuildPlugin = struct -+(* # 21 "src/plugins/ocamlbuild/OCamlbuildPlugin.ml" *) -+ -+ (** Build using ocamlbuild -+ @author Sylvain Le Gall -+ *) -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISUtils -+ open BaseEnv -+ open OCamlbuildCommon -+ open BaseStandardVar -+ open BaseMessage -+ -+ let cond_targets_hook = -+ ref (fun lst -> lst) -+ -+ let build pkg argv = -+ -+ (* Return the filename in build directory *) -+ let in_build_dir fn = -+ Filename.concat -+ (build_dir argv) -+ fn -+ in -+ -+ (* Return the unix filename in host build directory *) -+ let in_build_dir_of_unix fn = -+ in_build_dir (OASISHostPath.of_unix fn) -+ in -+ -+ let cond_targets = -+ List.fold_left -+ (fun acc -> -+ function -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_files = -+ BaseBuilt.of_library -+ in_build_dir_of_unix -+ (cs, bs, lib) -+ in -+ -+ let ends_with nd fn = -+ let nd_len = -+ String.length nd -+ in -+ (String.length fn >= nd_len) -+ && -+ (String.sub -+ fn -+ (String.length fn - nd_len) -+ nd_len) = nd -+ in -+ -+ let tgts = -+ List.flatten -+ (List.filter -+ (fun l -> l <> []) -+ (List.map -+ (List.filter -+ (fun fn -> -+ ends_with ".cma" fn -+ || ends_with ".cmxs" fn -+ || ends_with ".cmxa" fn -+ || ends_with (ext_lib ()) fn -+ || ends_with (ext_dll ()) fn)) -+ unix_files)) -+ in -+ -+ match tgts with -+ | _ :: _ -> -+ (evs, tgts) :: acc -+ | [] -> -+ failwithf -+ (f_ "No possible ocamlbuild targets for library %s") -+ cs.cs_name -+ end -+ -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, unix_exec_is, unix_dll_opt = -+ BaseBuilt.of_executable -+ in_build_dir_of_unix -+ (cs, bs, exec) -+ in -+ -+ let target ext = -+ let unix_tgt = -+ (OASISUnixPath.concat -+ bs.bs_path -+ (OASISUnixPath.chop_extension -+ exec.exec_main_is))^ext -+ in -+ let evs = -+ (* Fix evs, we want to use the unix_tgt, without copying *) -+ List.map -+ (function -+ | BaseBuilt.BExec, nm, lst when nm = cs.cs_name -> -+ BaseBuilt.BExec, nm, [[in_build_dir_of_unix unix_tgt]] -+ | ev -> -+ ev) -+ evs -+ in -+ evs, [unix_tgt] -+ in -+ -+ (* Add executable *) -+ let acc = -+ match bs.bs_compiled_object with -+ | Native -> -+ (target ".native") :: acc -+ | Best when bool_of_string (is_native ()) -> -+ (target ".native") :: acc -+ | Byte -+ | Best -> -+ (target ".byte") :: acc -+ in -+ acc -+ end -+ -+ | Library _ | Executable _ | Test _ -+ | SrcRepo _ | Flag _ | Doc _ -> -+ acc) -+ [] -+ (* Keep the pkg.sections ordered *) -+ (List.rev pkg.sections); -+ in -+ -+ (* Check and register built files *) -+ let check_and_register (bt, bnm, lst) = -+ List.iter -+ (fun fns -> -+ if not (List.exists OASISFileUtil.file_exists_case fns) then -+ failwithf -+ (f_ "No one of expected built files %s exists") -+ (String.concat (s_ ", ") (List.map (Printf.sprintf "'%s'") fns))) -+ lst; -+ (BaseBuilt.register bt bnm lst) -+ in -+ -+ let cond_targets = -+ (* Run the hook *) -+ !cond_targets_hook cond_targets -+ in -+ -+ (* Run a list of target... *) -+ run_ocamlbuild -+ (List.flatten -+ (List.map snd cond_targets)) -+ argv; -+ (* ... and register events *) -+ List.iter -+ check_and_register -+ (List.flatten (List.map fst cond_targets)) -+ -+ -+ let clean pkg extra_args = -+ run_clean extra_args; -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+end -+ -+module OCamlbuildDocPlugin = struct -+(* # 21 "src/plugins/ocamlbuild/OCamlbuildDocPlugin.ml" *) -+ -+ (* Create documentation using ocamlbuild .odocl files -+ @author Sylvain Le Gall -+ *) -+ -+ open OASISTypes -+ open OASISGettext -+ open OASISMessage -+ open OCamlbuildCommon -+ open BaseStandardVar -+ -+ -+ -+ let doc_build path pkg (cs, doc) argv = -+ let index_html = -+ OASISUnixPath.make -+ [ -+ path; -+ cs.cs_name^".docdir"; -+ "index.html"; -+ ] -+ in -+ let tgt_dir = -+ OASISHostPath.make -+ [ -+ build_dir argv; -+ OASISHostPath.of_unix path; -+ cs.cs_name^".docdir"; -+ ] -+ in -+ run_ocamlbuild [index_html] argv; -+ List.iter -+ (fun glb -> -+ BaseBuilt.register -+ BaseBuilt.BDoc -+ cs.cs_name -+ [OASISFileUtil.glob ~ctxt:!BaseContext.default -+ (Filename.concat tgt_dir glb)]) -+ ["*.html"; "*.css"] -+ -+ let doc_clean t pkg (cs, doc) argv = -+ run_clean argv; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+end -+ -+ -+# 5558 "setup.ml" -+module NonePlugin = struct -+(* # 21 "src/plugins/none/NonePlugin.ml" *) -+ -+ (** Plugin to handle "none" generation -+ @author Sylvain Le Gall -+ *) -+ -+ open OASISGettext -+ open OASISUtils -+ -+ let not_implemented str _ _ = -+ failwithf (f_ "No implementation for %s") str -+ -+ let section_not_implemented str pkg _ _ extra_args = -+ not_implemented str pkg extra_args -+ -+end -+ -+ -+# 5578 "setup.ml" -+module CustomPlugin = struct -+(* # 21 "src/plugins/custom/CustomPlugin.ml" *) -+ -+ (** Generate custom configure/build/doc/test/install system -+ @author -+ *) -+ -+ open BaseEnv -+ open OASISGettext -+ open OASISTypes -+ -+ -+ -+ type t = -+ { -+ cmd_main: command_line conditional; -+ cmd_clean: (command_line option) conditional; -+ cmd_distclean: (command_line option) conditional; -+ } -+ -+ let run = BaseCustom.run -+ -+ let main t _ extra_args = -+ let cmd, args = -+ var_choose -+ ~name:(s_ "main command") -+ t.cmd_main -+ in -+ run cmd args extra_args -+ -+ let clean t pkg extra_args = -+ match var_choose t.cmd_clean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ let distclean t pkg extra_args = -+ match var_choose t.cmd_distclean with -+ | Some (cmd, args) -> -+ run cmd args extra_args -+ | _ -> -+ () -+ -+ module Build = -+ struct -+ let main t pkg extra_args = -+ main t pkg extra_args; -+ List.iter -+ (fun sct -> -+ let evs = -+ match sct with -+ | Library (cs, bs, lib) when var_choose bs.bs_build -> -+ begin -+ let evs, _ = -+ BaseBuilt.of_library -+ OASISHostPath.of_unix -+ (cs, bs, lib) -+ in -+ evs -+ end -+ | Executable (cs, bs, exec) when var_choose bs.bs_build -> -+ begin -+ let evs, _, _ = -+ BaseBuilt.of_executable -+ OASISHostPath.of_unix -+ (cs, bs, exec) -+ in -+ evs -+ end -+ | _ -> -+ [] -+ in -+ List.iter -+ (fun (bt, bnm, lst) -> BaseBuilt.register bt bnm lst) -+ evs) -+ pkg.sections -+ -+ let clean t pkg extra_args = -+ clean t pkg extra_args; -+ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild -+ * considering moving this to BaseSetup? -+ *) -+ List.iter -+ (function -+ | Library (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BLib cs.cs_name -+ | Executable (cs, _, _) -> -+ BaseBuilt.unregister BaseBuilt.BExec cs.cs_name; -+ BaseBuilt.unregister BaseBuilt.BExecLib cs.cs_name -+ | _ -> -+ ()) -+ pkg.sections -+ -+ let distclean t pkg extra_args = -+ distclean t pkg extra_args -+ end -+ -+ module Test = -+ struct -+ let main t pkg (cs, test) extra_args = -+ try -+ main t pkg extra_args; -+ 0.0 -+ with Failure s -> -+ BaseMessage.warning -+ (f_ "Test '%s' fails: %s") -+ cs.cs_name -+ s; -+ 1.0 -+ -+ let clean t pkg (cs, test) extra_args = -+ clean t pkg extra_args -+ -+ let distclean t pkg (cs, test) extra_args = -+ distclean t pkg extra_args -+ end -+ -+ module Doc = -+ struct -+ let main t pkg (cs, _) extra_args = -+ main t pkg extra_args; -+ BaseBuilt.register BaseBuilt.BDoc cs.cs_name [] -+ -+ let clean t pkg (cs, _) extra_args = -+ clean t pkg extra_args; -+ BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name -+ -+ let distclean t pkg (cs, _) extra_args = -+ distclean t pkg extra_args -+ end -+ -+end -+ -+ -+# 5714 "setup.ml" -+open OASISTypes;; -+ -+let setup_t = -+ { -+ BaseSetup.configure = InternalConfigurePlugin.configure; -+ build = OCamlbuildPlugin.build; -+ test = -+ [ -+ ("test", -+ CustomPlugin.Test.main -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ doc = -+ [ -+ ("api", OCamlbuildDocPlugin.doc_build "doc"); -+ ("distribution", -+ NonePlugin.not_implemented "doc of section distribution"); -+ ("samples", NonePlugin.not_implemented "doc of section samples") -+ ]; -+ install = InternalInstallPlugin.install; -+ uninstall = InternalInstallPlugin.uninstall; -+ clean = [OCamlbuildPlugin.clean]; -+ clean_test = -+ [ -+ ("test", -+ CustomPlugin.Test.clean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ clean_doc = [("api", OCamlbuildDocPlugin.doc_clean "doc")]; -+ distclean = []; -+ distclean_test = -+ [ -+ ("test", -+ CustomPlugin.Test.distclean -+ { -+ CustomPlugin.cmd_main = -+ [(OASISExpr.EBool true, ("$test", []))]; -+ cmd_clean = [(OASISExpr.EBool true, None)]; -+ cmd_distclean = [(OASISExpr.EBool true, None)] -+ }) -+ ]; -+ distclean_doc = []; -+ package = -+ { -+ oasis_version = "0.3"; -+ ocaml_version = Some (OASISVersion.VGreaterEqual "3.10.0"); -+ findlib_version = None; -+ name = "uuidm"; -+ version = "0.9.5"; -+ license = -+ OASISLicense.DEP5License -+ (OASISLicense.DEP5Unit -+ { -+ OASISLicense.license = "BSD3"; -+ excption = None; -+ version = OASISLicense.NoVersion -+ }); -+ license_file = None; -+ copyrights = ["(c) 2008-2012 Daniel C. B\195\188nzli"]; -+ maintainers = []; -+ authors = ["Daniel B\195\188nzli "]; -+ homepage = Some "http://erratique.ch/software/uuidm"; -+ synopsis = "Universally unique identifiers (UUIDs) for OCaml"; -+ description = -+ Some -+ "Uuidm is an OCaml module implementing 128 bits universally unique\nidentifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4\n(random based) according to RFC 4122.\n\nUuidm is made of a single, independent, module and distributed under\nthe BSD3 license."; -+ categories = []; -+ conf_type = (`Configure, "internal", Some "0.3"); -+ conf_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ build_type = (`Build, "ocamlbuild", Some "0.3"); -+ build_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ install_type = (`Install, "internal", Some "0.3"); -+ install_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ uninstall_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ clean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ distclean_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ files_ab = []; -+ sections = -+ [ -+ Library -+ ({ -+ cs_name = "uuidm"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "src"; -+ bs_compiled_object = Best; -+ bs_build_depends = []; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ { -+ lib_modules = ["Uuidm"]; -+ lib_pack = false; -+ lib_internal_modules = []; -+ lib_findlib_parent = None; -+ lib_findlib_name = None; -+ lib_findlib_containers = [] -+ }); -+ Executable -+ ({ -+ cs_name = "test"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, false)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "uuidm"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "test.ml"}); -+ Executable -+ ({ -+ cs_name = "perf"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, false)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "uuidm"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "perf.ml"}); -+ Executable -+ ({ -+ cs_name = "uuidtrip"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ bs_build = [(OASISExpr.EBool true, true)]; -+ bs_install = [(OASISExpr.EBool true, true)]; -+ bs_path = "test"; -+ bs_compiled_object = Best; -+ bs_build_depends = [InternalLibrary "uuidm"]; -+ bs_build_tools = [ExternalTool "ocamlbuild"]; -+ bs_c_sources = []; -+ bs_data_files = []; -+ bs_ccopt = [(OASISExpr.EBool true, [])]; -+ bs_cclib = [(OASISExpr.EBool true, [])]; -+ bs_dlllib = [(OASISExpr.EBool true, [])]; -+ bs_dllpath = [(OASISExpr.EBool true, [])]; -+ bs_byteopt = [(OASISExpr.EBool true, [])]; -+ bs_nativeopt = [(OASISExpr.EBool true, [])] -+ }, -+ {exec_custom = false; exec_main_is = "uuidtrip.ml"}); -+ Test -+ ({ -+ cs_name = "test"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ test_type = (`Test, "custom", Some "0.3"); -+ test_command = [(OASISExpr.EBool true, ("$test", []))]; -+ test_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ test_working_directory = None; -+ test_run = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); -+ (OASISExpr.EFlag "tests", true) -+ ]; -+ test_tools = [ExternalTool "ocamlbuild"] -+ }); -+ Doc -+ ({ -+ cs_name = "api"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "ocamlbuild", Some "0.3"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "Uuidm's documentation and API reference"; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = []; -+ doc_build_tools = -+ [ExternalTool "ocamlbuild"; ExternalTool "ocamldoc"] -+ }); -+ Doc -+ ({ -+ cs_name = "distribution"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "none", Some "0.3"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "\"Uuidm's README and CHANGES files\""; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = [("README CHANGES", None)]; -+ doc_build_tools = [ExternalTool "ocamlbuild"] -+ }); -+ Doc -+ ({ -+ cs_name = "samples"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ doc_type = (`Doc, "none", Some "0.3"); -+ doc_custom = -+ { -+ pre_command = [(OASISExpr.EBool true, None)]; -+ post_command = [(OASISExpr.EBool true, None)] -+ }; -+ doc_build = -+ [ -+ (OASISExpr.ENot (OASISExpr.EFlag "docs"), false); -+ (OASISExpr.EFlag "docs", true) -+ ]; -+ doc_install = [(OASISExpr.EBool true, true)]; -+ doc_install_dir = "$docdir"; -+ doc_title = "\"Uuidm's sample code\""; -+ doc_authors = []; -+ doc_abstract = None; -+ doc_format = OtherDoc; -+ doc_data_files = [("test/*.ml", None)]; -+ doc_build_tools = [ExternalTool "ocamlbuild"] -+ }); -+ SrcRepo -+ ({ -+ cs_name = "head"; -+ cs_data = PropList.Data.create (); -+ cs_plugin_data = [] -+ }, -+ { -+ src_repo_type = Git; -+ src_repo_location = -+ "git://erratique.ch/repos/uuidm.git"; -+ src_repo_browser = -+ Some "http://erratique.ch/repos/uuidm"; -+ src_repo_module = None; -+ src_repo_branch = None; -+ src_repo_tag = None; -+ src_repo_subdir = None -+ }) -+ ]; -+ plugins = [(`Extra, "META", Some "0.3")]; -+ schema_data = PropList.Data.create (); -+ plugin_data = [] -+ }; -+ oasis_fn = Some "_oasis"; -+ oasis_version = "0.3.0"; -+ oasis_digest = Some "\1667\158\208\168\029:\129\174\150K\202\184V\1600"; -+ oasis_exec = None; -+ oasis_setup_args = []; -+ setup_update = false -+ };; -+ -+let setup () = BaseSetup.setup setup_t;; -+ -+# 6064 "setup.ml" -+(* OASIS_STOP *) -+let () = setup ();; -diff --git a/src/META b/src/META -new file mode 100644 -index 0000000..b77b78c ---- /dev/null -+++ b/src/META -@@ -0,0 +1,11 @@ -+# OASIS_START -+# DO NOT EDIT (digest: 52230559625da323c970d483320cb81c) -+version = "0.9.5" -+description = "Universally unique identifiers (UUIDs) for OCaml" -+archive(byte) = "uuidm.cma" -+archive(byte, plugin) = "uuidm.cma" -+archive(native) = "uuidm.cmxa" -+archive(native, plugin) = "uuidm.cmxs" -+exists_if = "uuidm.cma" -+# OASIS_STOP -+ -diff --git a/src/uuidm.mllib b/src/uuidm.mllib -new file mode 100644 -index 0000000..f232c0b ---- /dev/null -+++ b/src/uuidm.mllib -@@ -0,0 +1,4 @@ -+# OASIS_START -+# DO NOT EDIT (digest: b483eb8cb8e9c6bb94332c476d743edc) -+Uuidm -+# OASIS_STOP diff --git a/SOURCES/vhd-tool-sparse_dd-conf b/SOURCES/vhd-tool-sparse_dd-conf deleted file mode 100644 index 25f5d054..00000000 --- a/SOURCES/vhd-tool-sparse_dd-conf +++ /dev/null @@ -1,15 +0,0 @@ -# system-wide defaults for sparse_dd: used for VDI.copy and storage -# migration. - -# If true all writes will use O_DIRECT and bypass the Linux pagecache -# unbuffered = true - -# When to encrypt block data: -# always: always, even if the client requests an unencrypted transfer -# never: never, even if the client requests an encrypted transfer -# user: do what the user asks -# encryption-mode = never - -# This writes directly to the destination VHD file (when possible) -# avoiding a round-trip through tapdisk and the kernel. -# experimental-writes-bypass-tapdisk = false diff --git a/SOURCES/vncterm-1-fix-build b/SOURCES/vncterm-1-fix-build deleted file mode 100644 index 4aafcd03..00000000 --- a/SOURCES/vncterm-1-fix-build +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Makefile b/Makefile -index 8ef431f..9a87d60 100644 ---- a/Makefile -+++ b/Makefile -@@ -5,7 +5,7 @@ OBJS := main.o console.o - LIBS_so := libvnc/libvnc.so - LIBS := libvnc/libvnc.a - --CFLAGS = -I$(shell pwd)/include -+CFLAGS = -I$(shell pwd)/include -Wno-unused-result - # _GNU_SOURCE for asprintf. - CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE - CFLAGS += -Wall -Werror -g -O1 -diff --git a/main.c b/main.c -index 526e09f..9fd5ff3 100644 ---- a/main.c -+++ b/main.c -@@ -43,11 +43,12 @@ - #include - #include - #include -+#include - - #include - - #ifndef NXENSTORE --#include -+#include - #endif - - #if !defined(__APPLE__) diff --git a/SOURCES/xapi-libvirt-storage-init b/SOURCES/xapi-libvirt-storage-init deleted file mode 100755 index 6140b92a..00000000 --- a/SOURCES/xapi-libvirt-storage-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xapi-libvirt-storage Startup script for xapi libvirt storage service -# -# chkconfig: 2345 13 88 -# description: Manages VM disks stored in libvirt storage pools -### BEGIN INIT INFO -# Provides: xapi-libvirt-storage -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: xapi libvirt storage service -# Description: Manages VM disks stored in libvirt storage pools -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xapi-libvirt-storage.pid - -prog=xapi-libvirt-storage -exec=/usr/sbin/xapi-libvirt-storage -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xapi-libvirt-storage: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_LIBVIRT_STORAGE_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xapi-libvirt-storage: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xapi-storage-script-conf.in b/SOURCES/xapi-storage-script-conf.in deleted file mode 100644 index 0f06acfc..00000000 --- a/SOURCES/xapi-storage-script-conf.in +++ /dev/null @@ -1,2 +0,0 @@ -# Place to look for plugins -root = @LIBEXECDIR@/xapi-storage-script diff --git a/SOURCES/xapi-storage-script-init b/SOURCES/xapi-storage-script-init deleted file mode 100755 index 9ff93057..00000000 --- a/SOURCES/xapi-storage-script-init +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# -# xapi-storage-script Startup script for Xapi storage script plugin server -# -# chkconfig: 2345 13 88 -# description: Allows storage adapters to be written as scripts -### BEGIN INIT INFO -# Provides: xapi-storage-script -# Required-Start: $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: xapi storage plugin server -# Description: Allows storage adapters to be written as scripts -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xapi-storage-script.pid - -prog=xapi-storage-script -exec=/usr/sbin/xapi-storage-script -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xapi-storage-script: " - export OCAMLRUNPARAM=b - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $XAPI_STORAGE_SCRIPT_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xapi-storage-script: " - - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xapi-storage.patch b/SOURCES/xapi-storage.patch deleted file mode 100644 index c8ecd395..00000000 --- a/SOURCES/xapi-storage.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urN xapi-storage-0.1.orig/python/__init__.py xapi-storage-0.1/python/__init__.py ---- xapi-storage-0.1.orig/python/__init__.py 1970-01-01 00:00:00.000000000 +0000 -+++ xapi-storage-0.1/python/__init__.py 2014-10-16 20:15:01.110774865 +0000 -@@ -0,0 +1,26 @@ -+#!/usr/bin/env python -+ -+""" -+Copyright (c) 2013, Citrix Inc. -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ -+1. Redistributions of source code must retain the above copyright notice, this -+ list of conditions and the following disclaimer. -+2. Redistributions in binary form must reproduce the above copyright notice, -+ this list of conditions and the following disclaimer in the documentation -+ and/or other materials provided with the distribution. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+""" diff --git a/SOURCES/xcp-mpath-scsidev-rules b/SOURCES/xcp-mpath-scsidev-rules deleted file mode 100644 index f9e842ec..00000000 --- a/SOURCES/xcp-mpath-scsidev-rules +++ /dev/null @@ -1,5 +0,0 @@ -KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode session %n", SYMLINK+="%c" -KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode serial %n", SYMLINK+="%c" -KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode base %n", SYMLINK+="%c" -KERNEL=="sd*", SUBSYSTEMS=="scsi", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bybus %n", SYMLINK+="%c" -KERNEL=="sd*", SUBSYSTEMS=="scsi", DRIVER=="sd", WAIT_FOR_SYSFS="dev", PROGRAM="/etc/udev/scripts/xs-mpath-scsidev.sh %b %k $tempnode scsi_bympp %n", SYMLINK+="%c" diff --git a/SOURCES/xcp-mpath-scsidev-script b/SOURCES/xcp-mpath-scsidev-script deleted file mode 100755 index 8eaa36ea..00000000 --- a/SOURCES/xcp-mpath-scsidev-script +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -BUS=${1} -NAME=${2} -HOST=${BUS%%:*} -NODE=${3} -OUT=${4} -LUN=`echo $BUS | cut -d: -f4` - -export PATH=/lib/udev:$PATH - -# The required files are located in an extra layer of directories in 3.x kernels -kernel=`uname -r | cut -d. -f1-2` -case $kernel in - 2.6) - targetIQNPath="/device/session*/iscsi_session*" - targetIPPortPath="/device/session*/connection*/iscsi_connection*" - ;; - 3.*) - targetIQNPath="/device/session*/iscsi_session/session*" - targetIPPortPath="/device/session*/connection*/iscsi_connection/connection*" - ;; - *) - echo "Unkown kernel: neither 2.6 nor 3.x. Exiting..." - exit 2 - ;; -esac - -#Args: ID -query_hosts() { - /usr/sbin/mppUtil -g $1 | grep hostId | while read file - do - host=`echo $file | awk '{gsub(/^.*\(|\).*$/,"");gsub(/,/,"");print $2}'` - ISCSIPATH="/sys/class/iscsi_host/host${host}" - [ -e ${ISCSIPATH} ] || continue - - #Query the IQN, IP and Port values - targetIQNfile="${ISCSIPATH}${targetIQNPath}/targetname" - targetIQN=$(cat ${targetIQNfile}) - - targetIPfile="${ISCSIPATH}${targetIPPortPath}/persistent_address" - targetPortfile="${ISCSIPATH}${targetIPPortPath}/persistent_port" - targetIP=$(cat ${targetIPfile}) - targetPort=$(cat ${targetPortfile}) - - path="/dev/iscsi/${targetIQN}/${targetIP}:${targetPort}/SESSIONID-${host}" - echo "${host}" - return - done -} - -if [ $# -gt 5 -o $# -lt 4 ]; then - echo "Incorrect number of arguments" - exit 1 -fi - -if [[ $OUT == "scsi_bybus" && -z ${5} ]]; then - SCSIID=`scsi_id -g -u -s /block/$2` - if [ $? == 0 ]; then - echo "disk/by-scsibus/${SCSIID}-%b disk/by-scsid/${SCSIID}/$2" - fi - exit -fi - -[ -e /sys/class/scsi_host/host${HOST}/proc_name ] || exit 1 - -driver=$(cat /sys/class/scsi_host/host${HOST}/proc_name) - -if [ $driver == "mpp" ]; then - # RDAC special device handling - array=`/opt/xensource/bin/xe-getarrayidentifier ${NODE}` - id=`/usr/sbin/mppUtil -a | grep ${array} | awk '{print $1}'` - if [[ $OUT == "scsi_bympp" && -z ${5} ]]; then - SCSIID=`scsi_id -g -u -s /block/$2` - if [ $? == 0 ]; then - #lunnum=`/opt/xensource/bin/xe-getlunidentifier ${NODE}` - #lunid=`/usr/sbin/mppUtil -g ${id} | grep ${lunnum} | awk '{gsub(/#/,"");print $2}'` - #echo "disk/by-mpp/${SCSIID}-${id}:${lunid}" - echo "disk/by-mpp/${SCSIID}" - fi - exit - else - HOST=`query_hosts $id` - fi -fi - -ISCSIPATH="/sys/class/iscsi_host/host${HOST}" - -[ -e ${ISCSIPATH} ] || exit 1 - -# Query targetIQN -targetIQNfile="${ISCSIPATH}${targetIQNPath}/targetname" -targetIQN=$(cat ${targetIQNfile}) - -# Query target address and port -targetIPfile="${ISCSIPATH}${targetIPPortPath}/persistent_address" -targetPortfile="${ISCSIPATH}${targetIPPortPath}/persistent_port" -targetIP=$(cat ${targetIPfile}) -targetPort=$(cat ${targetPortfile}) - -basepath="iscsi/${targetIQN}/${targetIP}:${targetPort}" - -# Handle the Kernel assigned device number -if [ -z ${5} ]; then - DEV="LUN${LUN}" -else - DEV="LUN${LUN}_${5}" -fi - -if [ ${OUT} == "base" ]; then - echo "${basepath}/${DEV}" -elif [ ${OUT} == "session" ]; then - echo "${basepath}/SESSIONID-${HOST}/${DEV}" -elif [[ ${OUT} == "serial" && -z ${5} ]]; then - SERIAL=`/opt/xensource/bin/xe-getserialhex ${NODE}` - if [ $? == 0 ]; then - echo "${basepath}/SERIAL-${SERIAL}" - fi -fi diff --git a/SOURCES/xcp-networkd-bridge-conf b/SOURCES/xcp-networkd-bridge-conf deleted file mode 100644 index 280743c7..00000000 --- a/SOURCES/xcp-networkd-bridge-conf +++ /dev/null @@ -1,4 +0,0 @@ -# Prevent guest traffic flowing over the bridge being processed -# by the domain 0 firewall -install bridge \ -/sbin/modprobe bridge --ignore-install && /sbin/sysctl -w net.bridge.bridge-nf-call-iptables=0 diff --git a/SOURCES/xcp-networkd-conf b/SOURCES/xcp-networkd-conf deleted file mode 100644 index 2374fbdc..00000000 --- a/SOURCES/xcp-networkd-conf +++ /dev/null @@ -1,3 +0,0 @@ -# Search for brctl on the PATH -brctl=brctl - diff --git a/SOURCES/xcp-networkd-init b/SOURCES/xcp-networkd-init deleted file mode 100755 index 24adee4a..00000000 --- a/SOURCES/xcp-networkd-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xcp-networkd Startup script for network management service -# -# chkconfig: 2345 13 88 -# description: Manages host networking for VMs. -### BEGIN INIT INFO -# Provides: xcp-networkd -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Network management service -# Description: Manages host networking for VMs. -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xcp-networkd.pid - -prog=xcp-networkd -exec=/usr/sbin/xcp-networkd -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xcp-networkd: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --daemon true $XCP_NETWORKD_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xcp-networkd: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xcp-networkd-network-conf b/SOURCES/xcp-networkd-network-conf deleted file mode 100644 index 7096907a..00000000 --- a/SOURCES/xcp-networkd-network-conf +++ /dev/null @@ -1 +0,0 @@ -bridge diff --git a/SOURCES/xcp-rrdd-init b/SOURCES/xcp-rrdd-init deleted file mode 100755 index 41a3975f..00000000 --- a/SOURCES/xcp-rrdd-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xcp-rrdd Startup script for statistics gathering service -# -# chkconfig: 2345 13 88 -# description: Manages VM and Host statistics: sampling and archiving. -### BEGIN INIT INFO -# Provides: xcp-rrdd -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Statistics gathering service -# Description: Samples and archives statistics for VMs and Hosts. -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xcp-rrdd.pid - -prog=xcp-rrdd -exec=/usr/sbin/xcp-rrdd -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xcp-rrdd: " - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XCP_RRDD_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xcp-rrdd: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xcp-sm-pylint-fix.patch b/SOURCES/xcp-sm-pylint-fix.patch deleted file mode 100644 index 69d6920b..00000000 --- a/SOURCES/xcp-sm-pylint-fix.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur a/drivers/cleanup.py b/drivers/cleanup.py ---- a/drivers/cleanup.py 2014-03-21 12:41:04.000000000 +0000 -+++ b/drivers/cleanup.py 2014-04-02 15:35:37.396329000 +0100 -@@ -115,7 +115,7 @@ - (stdout, stderr) = proc.communicate(inputtext) - stdout = str(stdout) - stderr = str(stderr) -- rc = proc.returncode -+ rc = proc.returncode # pylint: disable=E1101 - if log: - Util.log("`%s`: %s" % (args, rc)) - if type(expectedRC) != type([]): -diff --git a/drivers/util.py b/drivers/util.py -index 65b86e2..a0b8361 100755 ---- a/drivers/util.py -+++ b/drivers/util.py -@@ -138,7 +138,7 @@ def doexec(args, inputtext=None): - # python 3.x or maybe a newer version of pylint in the future - stdout = str(stdout) - stderr = str(stderr) -- rc = proc.returncode -+ rc = proc.returncode # pylint: disable=E1101 - return (rc,stdout,stderr) - - def is_string(value): -@@ -1381,6 +1381,7 @@ class extractXVA: - # returns filename, checksum content. Returns filename, '' in case - # of checksum file missing. e.g. ova.xml - def getTuple(self): -+ # pylint: disable=E1101 - zerod_record = 0 - ret_f_name = '' - ret_base_f_name = '' - -diff -ur a/tests/pylintrc b/tests/pylintrc ---- a/tests/pylintrc 2014-03-21 12:41:04.000000000 +0000 -+++ b/tests/pylintrc 2014-04-02 14:21:59.592322566 +0000 -@@ -40,7 +40,7 @@ - # append the F0401 code at the end of the "disable" config variable to temporarily - # disable it from complaining missing libraries and get some useful information - # from a partial run at least. --disable=design,rpython,newstyle,R,C,W,I -+disable=design,rpython,newstyle,R,C,W,I,F0401 - #,F0401 diff --git a/SOURCES/xen-api-db-conf b/SOURCES/xen-api-db-conf deleted file mode 100644 index 183639db..00000000 --- a/SOURCES/xen-api-db-conf +++ /dev/null @@ -1,4 +0,0 @@ -[/var/lib/xapi/state.db] -mode:no_limit -format:xml -available_this_boot:true diff --git a/SOURCES/xen-api-init b/SOURCES/xen-api-init deleted file mode 100755 index 8e34444e..00000000 --- a/SOURCES/xen-api-init +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# -# xapi Startup script for xapi toolstack -# -# chkconfig: 2345 13 88 -# description: Manages VMs and resource pools -### BEGIN INIT INFO -# Provides: xapi -# Required-Start: $local_fs $network $syslog xcp-rrdd message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: xapi toolstack -# Description: Manages VMs and resource pools -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xapi.pid - -prog=xapi -exec=/usr/sbin/xapi -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -# Use 'blktap 2.5' if it has been installed -if [ -d /usr/lib64/blktap ]; then - export XCP_PATH=/usr/lib64/blktap/sbin - export TAPDISK2=/usr/lib64/blktap/libexec/tapdisk -elif [ -d /usr/lib/blktap ]; then - export XCP_PATH=/usr/lib/blktap/sbin - export TAPDISK2=/usr/lib/blktap/libexec/tapdisk -fi -logger -t ffs "XCP_PATH=${XCP_PATH} TAPDISK2=${TAPDISK2}" - - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xapi: " - export OCAMLRUNPARAM=b - start_daemon -p "$PIDFILE" $exec -pidfile "$PIDFILE" -daemon true $XAPI_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xapi: " - - # Use the CLI to request a clean shutdown - RETRIES=60 - while [ ${RETRIES} -ne 0 ]; do - xe host-shutdown-agent 2> /dev/null - # Finish if all xapis have gone - xapi_pids=$(pidof $prog) - if [ -z "$xapi_pids" ]; then - logger "xapi stopped successfully" - rm -f $PIDFILE $lockfile - success $"xapi stopped successfully" - echo - return 0 - fi - sleep 1 - echo -n . - RETRIES=$(( ${RETRIES} - 1 )) - done - - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xen-api-pam b/SOURCES/xen-api-pam deleted file mode 100644 index 7cbaa522..00000000 --- a/SOURCES/xen-api-pam +++ /dev/null @@ -1,3 +0,0 @@ -auth include passwd -account include passwd -password include passwd diff --git a/SOURCES/xen-api-xapi-conf.in b/SOURCES/xen-api-xapi-conf.in deleted file mode 100644 index fb338d69..00000000 --- a/SOURCES/xen-api-xapi-conf.in +++ /dev/null @@ -1,244 +0,0 @@ -# The xapi config file has 3 sections: a global policy section; -# a section for paths to helper utilities; and a timeout tweak section. - -# Global policy: ################################################# -search-path=/usr/lib/xapi:/usr/libexec/xapi - -# The full list of xenopsd instances to manage. These must all be running. -xenopsd-queues = org.xen.xcp.xenops.xenlight - -# The default xenopsd to use for VMs, unless a per-VM override is specified -xenopsd-default = org.xen.xcp.xenops.xenlight - -# Configure the logging policy: -# logconfig = @ETCDIR@/log.conf - -# The pool configuration file contains either 'master' or -# 'slave:': -# pool_config_file = @ETCDIR@/pool.conf -pool_config_file = /etc/xcp/pool.conf - -# The pool secret (or pool token) is shared on pool join and used -# to authenticate the slave to the master. -# pool_secret_path = @ETCDIR@/ptoken - -# Enable/disable the watchdog -# nowatchdog = false - -# Allow storage migration when SRs have been mirrored out-of-band -# and the SR uuids match -# relax-xsm-sr-check = true - -# Disable logging for the following modules -disable-logging-for = http db_write redo_log api_readonly - -# Paths to utilities: ############################################ - -# Used to start/restart/stop the stunnel listening for management -# traffic over HTTPS -# xapissl = @LIBEXECDIR@/xapissl - -# Path to the udhcpd program, used to hand out IP addresses on the -# host internal management network. -# udhcpd = @LIBEXECDIR@/udhcpd -udhcpd = /bin/true - -# Tweak timeouts: ################################################ - -# If the slave's connection to the master blocks for longer than -# this then we forcibly reset it: -# master_connection_reset_timeout = 120 - -# amount of time to retry master_connection before restarting xapi; -# -ve means don't timeout -# master_connection_retry_timeout = -1 # disabled - -# time to wait for qemu-dm to signal "ready" in xenstore -# qemu_dm_ready_timeout = 300 - -# time to wait for the hotplug scripts to complete -# hotplug_timeout = 300 - -# time to wait during a PIF.reconfigure_ip for the connection to -# the master to re-establish before concluding that it's broken and failing -# pif_reconfigure_ip_timeout = 300 - -# time between invocations of the pool database sync; every interval -# the pool database will be backed up to one host -# pool_db_sync_interval = 300 - -# time between attempts to synchronise the RRD archives to other -# hosts -# pool_data_sync_interval = 86400 # a day in seconds - -# time to wait for in-guest PV drivers to acknowledge a shutdown request -# before we conclude that the drivers have failed -# domain_shutdown_ack_timeout = 10 - -# time to wait for a domain to shutdown before we conclude the operation -# has failed. Note it can take a long time to shutdown if (for example) -# the OS has decided to install a large set of patches. -# domain_shutdown_total_timeout = 1200 - -# time between invocations of the "xapi healthcheck" script by xhad -# ha_xapi_healthcheck_interval = 60 - -# time after which we assume the "xapi healthcheck" has failed and xapi -# should be restarted -# ha_xapi_healthcheck_timeout = 120 - -# total number of times to attempt to restart a xapi which has failed -# a healthcheck -# ha_xapi_restart_attempts = 1 - -# time after which we assume a xapi restart attempt has failed -# ha_xapi_restart_timeout = 300 - -# time between writing RRD data to disk (the data is primarily stored in -# RAM) -# rrd_backup_interval = 86400 # 1 day in seconds - -# time between checks against an external authentication service (such as AD). -# If a user account associated with a session has been removed from a -# necessary group or otherwise disabled, the session will be destroyed. -# session_revalidation_interval = 300 - -# time between attempts to resychronise the subjects list with an external -# authentication service (such as AD) -# update_all_subjects_interval = 900 - -# time to wait for a domain to hit its balloon target before concluding that -# the balloon driver has failed -# wait_memory_target_timeout = 256 - -# time to wait for a response from the VSS agent before concluding the agent -# has failed -# snapshot_with_quiesce_timeout = 600 - -# time between master - slave heartbeats -# host_heartbeat_interval = 30 - -# time after the last heartbeat we wait before assuming the host is dead. -# Note we cannot safely restart VMs on other hosts because it might be -# simply a network partition. Turn HA on if you want VM restart. -# host_assumed_dead_interval = 600 - -# time after asking xapi to restart before it actually exits(). This delay -# allows the current API call to succeed. -# fuse_time = 10 - -# time after receiving a pool database restore before automatically restarting -# xapi to read it. -# db_restore_fuse_time = 30 - -# time after receiving the last API call before automatically logging out -# a session -# inactive_session_timeout = 86400 # 1 day in seconds - -# time after receiving the last task progress update before we assume the -# task has leaked and destroying it -# pending_task_timeout = 86400 # 1 day in seconds - -# time after a task has been completed before we assume the client has failed, -# leaked the task, requiring xapi to destroy it -# completed_task_timeout = 3900 # 64 minutes in seconds - -# minimum time between a VM starting and the next reboot (used to avoid -# a VM crashing in a reboot loop) -# minimum_time_between_bounces = 120 - -# If a domain is rebooted (from inside) in less than this time since it last -# started, then insert an artificial delay -# minimum_time_between_reboot_with_no_added_delay = 60 - -# ha_monitor_interval = 20 - -# Unconditionally replan every once in a while just in case the overcommit -# protection is buggy and we don't notice -# ha_monitor_plan_interval = 1800 - -# ha_monitor_startup_timeout = 1800 - -# ha_default_timeout_base = 60 - -# guest_liveness_timeout = 300 - -# permanent_master_failure_retry_interval = 60 - -# The maximum time, in seconds, for which we are prepared to wait for -# a response from the block device I/O process before assuming that it -# has died while emptying -# redo_log_max_block_time_empty = 2 - -# The maximum time, in seconds, for which we are prepared to wait for -# a response from the block device I/O process before assuming that it -# has died while reading -# redo_log_max_block_time_read = 30 - -# The maximum time, in seconds, for which we are prepared to wait for -# a response from the block device I/O process before assuming that -# it has died while writing a delta -# redo_log_max_block_time_writedelta = 2 - -# The maximum time, in seconds, for which we are prepared to wait for -# a response from the block device I/O process before assuming that -# it has died while writing a database -# redo_log_max_block_time_writedb = 30 - -# The maximum time, in seconds, for which we are prepared to wait for -# a response from the block device I/O process before assuming that -# it has died while initially connecting to it -# redo_log_max_startup_time = 5 - -# The delay between each attempt to connect to the block device I/O -# process -# redo_log_connect_delay = 0.1 - -# The script executed when likewise domain-leave fails -lw-force-domain-leave-script = /bin/false - -# Used by the redo log for block device IO -redo-log-block-device-io = /bin/false - -# Path to fence binary, used for HA host fencing -fence = /bin/false - -# Path to host-bugreport-upload -host-bugreport-upload=/bin/false - -# Path to set-hostname -set-hostname=/bin/false - -# Path to xe-syslog-reconfigure -xe-syslog-reconfigure=/bin/false - -# Used by /get_host_logs_download HTTP handler -logs-download=/bin/false - -# Executed when changing the management interface -update-mh-info=/bin/false - -# Used by Host_crashdump.upload -upload-wrapper=/bin/false - -# Path to host-backup -host-backup=/bin/false - -# Path to host-restore -host-restore=/bin/false - -# Path to xe-toolstack-restart script -xe-toolstack-restart=/bin/false - -# Path to xsh binary -xsh=/bin/false - -# Path to static-vdis script -static-vdis=/bin/false - -# Database configuration file -db-config-file=/etc/xapi/db.conf - -# DHCP skeleton configuration file -udhcpd-skel=/etc/xcp/udhcpd.skel - diff --git a/SOURCES/xen-api-xapissl b/SOURCES/xen-api-xapissl deleted file mode 100755 index d6bca616..00000000 --- a/SOURCES/xen-api-xapissl +++ /dev/null @@ -1,146 +0,0 @@ -#! /bin/bash - -# start and stop stunnel for xapi - -# source function library -. /lib/lsb/init-functions - -ACCEPT=$2 -PEMFILE="/etc/xapi/ssl.pem" -PIDFILE="/var/run/xapissl.pid" -SSLCONFFILE="/etc/xapi/xapissl.conf" -XAPISSL_LOCK="/var/lock/xapissl" - -# If stunnel4 exists, use it. Otherwise use stunnel. -exec=$(which stunnel4 || which stunnel) 2> /dev/null - -generate_ssl_cert() { - local FILE=$1 - local CN=$2 - if [ ! -e "${FILE}" ]; then - DIR=$(mktemp -d) - pushd ${DIR} - cat <config -[req] # openssl req params -prompt = no -distinguished_name = dn-param -[dn-param] # DN fields -CN = ${CN} -EOF - openssl genrsa 1024 > privkey.rsa - openssl req -batch -new -x509 -key privkey.rsa -days 3650 -config config -out cert.csr - openssl dhparam 512 > dh.pem - - popd - - (cat ${DIR}/privkey.rsa; echo ""; cat ${DIR}/cert.csr; echo ""; cat ${DIR}/dh.pem) > ${FILE} - chmod 400 ${FILE} - - rm -rf ${DIR} - fi -} - -# Write out the stunnel config file. This requires the management -# interface, so it's done here rather than written statically. -writeconffile () { - # Initial boilerplate which is valid whether the management - # interface is enabled or disabled. - cat > $SSLCONFFILE </dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd b/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd deleted file mode 100644 index 6c60d65e..00000000 --- a/SOURCES/xen-api.8c68223753278ebe653ac9f3dfae2554525722cd +++ /dev/null @@ -1,114 +0,0 @@ -commit 8c68223753278ebe653ac9f3dfae2554525722cd -Author: David Scott -Date: Tue Oct 14 11:08:16 2014 +0000 - - CA-148772: support consoles served over Unix domain sockets - - Xenopsd with libxl + upstream qemu prefers to bind consoles to - named sockets like - - /var/run/non-persistent/xenospd/consoles/VM/ - - rather than anonymous localhost port numbers. Naming consoles is - a good idea because it prevents accidentally connecting to the - wrong port number. - - This patch allows Xapi to connect to these Unix domain socket - consoles. Note there is still a lingering problem with upstream - qemu and XenCenter's built-in RFB client which causes the - keyboard not to work. - - Signed-off-by: David Scott - -diff --git a/ocaml/xapi/console.ml b/ocaml/xapi/console.ml -index 1e3fe2b..0da0886 100644 ---- a/ocaml/xapi/console.ml -+++ b/ocaml/xapi/console.ml -@@ -25,11 +25,17 @@ open D - - exception Failure - --(** [port_of_proxy __context console] returns [Some port] or [None], if a suitable -- proxy could not be found. *) --let port_of_proxy __context console = -+type address = -+| Port of int (* console is listening on localhost:port *) -+| Path of string (* console is listening on a Unix domain socket *) -+ -+let string_of_address = function -+| Port x -> "localhost:" ^ (string_of_int x) -+| Path x -> "unix:" ^ x -+ -+let address_of_console __context console : address option = - let vm = Db.Console.get_VM __context console in -- let vnc_port_option = -+ let address_option = - try - let open Xenops_interface in - let id = Xapi_xenops.id_of_vm ~__context ~self:vm in -@@ -42,25 +48,27 @@ let port_of_proxy __context console = - | `vt100 -> Vm.Vt100 - | `rdp -> failwith "No support for tunnelling RDP" in - let console = List.find (fun x -> x.Vm.protocol = proto) s.Vm.consoles in -- Some console.Vm.port -+ Some (if console.Vm.path = "" then Port console.Vm.port else Path console.Vm.path) - with e -> - debug "%s" (Printexc.to_string e); - None in -- debug "VM %s console port: %s" (Ref.string_of vm) (Opt.default "None" (Opt.map (fun x -> "Some " ^ (string_of_int x)) vnc_port_option)); -- vnc_port_option -+ debug "VM %s console port: %s" (Ref.string_of vm) (Opt.default "None" (Opt.map (fun x -> "Some " ^ (string_of_address x)) address_option)); -+ address_option - - let real_proxy __context _ _ vnc_port s = - try -- Http_svr.headers s (Http.http_200_ok ()); -- let vnc_sock = Unixext.open_connection_fd "127.0.0.1" vnc_port in -- (* Unixext.proxy closes fds itself so we must dup here *) -- let s' = Unix.dup s in -- debug "Connected; running proxy (between fds: %d and %d)" -- (Unixext.int_of_file_descr vnc_sock) (Unixext.int_of_file_descr s'); -- Unixext.proxy vnc_sock s'; -- debug "Proxy exited" -- with -- exn -> debug "error: %s" (ExnHelper.string_of_exn exn) -+ Http_svr.headers s (Http.http_200_ok ()); -+ let vnc_sock = match vnc_port with -+ | Port x -> Unixext.open_connection_fd "127.0.0.1" x -+ | Path x -> Unixext.open_connection_unix_fd x in -+ -+ (* Unixext.proxy closes fds itself so we must dup here *) -+ let s' = Unix.dup s in -+ debug "Connected; running proxy (between fds: %d and %d)" (Unixext.int_of_file_descr vnc_sock) (Unixext.int_of_file_descr s'); -+ Unixext.proxy vnc_sock s'; -+ debug "Proxy exited" -+ with -+ exn -> debug "error: %s" (ExnHelper.string_of_exn exn) - - let fake_proxy __context _ _ console s = - Rfb_randomtest.server s -@@ -78,7 +86,14 @@ let ensure_proxy_running () = - Thread.delay 1.0; - end - --let ws_proxy __context req protocol port s = -+let ws_proxy __context req protocol address s = -+ let port = match address with -+ | Port p -> p -+ | Path _ -> -+ error "No implementation for web-sockets console proxy to a Unix domain socket"; -+ Http_svr.headers s (Http.http_501_method_not_implemented ()); -+ failwith "ws_proxy: not implemented" in -+ - ensure_proxy_running (); - let protocol = match protocol with - | `rfb -> "rfb" -@@ -202,7 +217,7 @@ let handler proxy_fn (req: Request.t) s _ = - (* Check VM is actually running locally *) - check_vm_is_running_here __context console; - -- match port_of_proxy __context console with -+ match address_of_console __context console with - | Some vnc_port -> - proxy_fn __context req protocol vnc_port s - | None -> diff --git a/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h b/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h deleted file mode 100644 index d1ab56ad..00000000 --- a/SOURCES/xen-missing-headers_usr_include_xen_arch-arm_hvm_save.h +++ /dev/null @@ -1 +0,0 @@ -/* This file intentionally left blank */ diff --git a/SOURCES/xenopsd-libvirt-init b/SOURCES/xenopsd-libvirt-init deleted file mode 100755 index 38bcf661..00000000 --- a/SOURCES/xenopsd-libvirt-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xenopsd-libvirt Startup script for xenopsd-libvirt service -# -# chkconfig: 2345 13 88 -# description: Manages xen/kvm domains via libvirt -### BEGIN INIT INFO -# Provides: xenopsd-libvirt -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Manages xen/kvm domains via libvirt -# Description: Manages xen/kvm domains via libvirt -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xenopsd-libvirt.pid - -prog=xenopsd-libvirt -exec=/usr/sbin/xenopsd-libvirt -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xenopsd-libvirt: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_LIBVIRT_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xenopsd-libvirt: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xenopsd-network-conf b/SOURCES/xenopsd-network-conf deleted file mode 100644 index 7096907a..00000000 --- a/SOURCES/xenopsd-network-conf +++ /dev/null @@ -1 +0,0 @@ -bridge diff --git a/SOURCES/xenopsd-simulator-init b/SOURCES/xenopsd-simulator-init deleted file mode 100755 index 1f3597bc..00000000 --- a/SOURCES/xenopsd-simulator-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xenopsd-simulator Startup script for xenopsd-simulator service -# -# chkconfig: 2345 13 88 -# description: Manages synthetic VMs for testing -### BEGIN INIT INFO -# Provides: xenopsd-simulator -# Required-Start: $local_fs $network $syslog message-switch -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Manages synthetic VMs for testing -# Description: Manages synthetic VMs for testing -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xenopsd-simulator.pid - -prog=xenopsd-simulator -exec=/usr/sbin/xenopsd-simulator -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xenopsd-simulator: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_SIMULATOR_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xenopsd-simulator: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xenopsd-vncterm-wrapper b/SOURCES/xenopsd-vncterm-wrapper deleted file mode 100755 index 25282ef3..00000000 --- a/SOURCES/xenopsd-vncterm-wrapper +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# Copyright (c) Citrix Inc -# -# This program 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; version 2.1 only. with the special -# exception on linking described in file LICENSE. -# -# This program 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. - -# this is a horrible hack: the vncterm deb fails to set the user and -# group properly: -getent group vncterm >/dev/null || groupadd -r vncterm -getent group vncterm_base >/dev/null || groupadd -r vncterm_base -getent passwd vncterm >/dev/null || useradd -r -g vncterm -d /none -s /sbin/nologin -c 'for vncterm' vncterm -getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s /sbin/nologin -c 'for vncterm' vncterm_base - -# vncterm is like a qemu parasite, using it's keymap files. The exact -# location of qemu keymap files depends on the distro, while the vncterm -# source code hard-codes /usr/share/xen/qemu - -mkdir -p /usr/share/xen -if [ ! -e /usr/share/xen/qemu ]; then - for path in /usr/share/qemu # include other possibilities later - do - if [ -e $path ]; then - if [ ! -e /usr/share/xen/qemu ]; then - ln -s $path /usr/share/xen/qemu - fi - fi - done -fi - -if [ ! -e /usr/share/xen/qemu ]; then - echo "Failed to find keymaps in /usr/share/xen/qemu" - logger "Failed to find keymaps in /usr/share/xen/qemu" - exit 1 -fi -exec vncterm $* diff --git a/SOURCES/xenopsd-xc-init b/SOURCES/xenopsd-xc-init deleted file mode 100755 index 6d9b1a5c..00000000 --- a/SOURCES/xenopsd-xc-init +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -# -# xenopsd-xc Startup script for xenopsd-xc service -# -# chkconfig: 2345 13 88 -# description: Manages xen domains via libxc -### BEGIN INIT INFO -# Provides: xenopsd-xc -# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch forkexecd -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Manages xen domains via libxc -# Description: Manages xen domains via libxc -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xenopsd-xc.pid - -prog=xenopsd-xc -exec=/usr/sbin/xenopsd-xc -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -# ensure that all the possible xen directories are on the XCP_PATH -for xenpath in xen xen-4.4 xen-4.3 xen-4.2 xen-4.1; do - XCP_PATH="$XCP_PATH:/usr/lib/$xenpath/bin:/usr/lib/$xenpath/boot" -done -export XCP_PATH - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - modprobe blktap 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blktap: vhd-based disks will not work" - modprobe blkback 2>/dev/null || logger -t xenopsd-xc "Failed to modprobe blkback: virtual disks will not work" - echo -n $"Starting xenopsd-xc: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_XC_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xenopsd-xc: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xenopsd-xenlight-init b/SOURCES/xenopsd-xenlight-init deleted file mode 100755 index 313aeafd..00000000 --- a/SOURCES/xenopsd-xenlight-init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# xenopsd-xenlight Startup script for xenopsd-xenlight service -# -# chkconfig: 2345 13 88 -# description: Manages VMs via libxl -### BEGIN INIT INFO -# Provides: xenopsd-xenlight -# Required-Start: $local_fs $network $syslog message-switch forkexecd xenstored -# Required-Stop: $local_fs $syslog -# Should-Start: $syslog message-switch -# Should-Stop: $network $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Manages VMs via libxl -# Description: Manages VMs via libxl -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -RETVAL=0 -PIDFILE=/var/run/xenopsd-xenlight.pid - -prog=xenopsd-xenlight -exec=/usr/sbin/xenopsd-xenlight -if [ -d /var/lock/subsys ] ; then - lockfile=/var/lock/subsys/$prog -else - lockfile=/var/lock/$prog -fi - -# Source config -if [ -f /etc/sysconfig/$prog ] ; then - . /etc/sysconfig/$prog -fi - -start() { - [ -x $exec ] || exit 5 - - umask 077 - - echo -n $"Starting xenopsd-xenlight: " - start_daemon -p "$PIDFILE" $exec --pidfile "$PIDFILE" --config /etc/xenopsd.conf --daemon true $XENOPSD_XENLIGHT_OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} -stop() { - echo -n $"Shutting down xenopsd-xenlight: " - killproc -p "$PIDFILE" $exec - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} -rhstatus() { - status_of_proc -p "$PIDFILE" $exec $prog -} -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - status) - rhstatus - ;; - condrestart|try-restart) - rhstatus >/dev/null 2>&1 || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" - exit 3 -esac - -exit $? diff --git a/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 b/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 deleted file mode 100644 index 7d00ad2a..00000000 --- a/SOURCES/xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 +++ /dev/null @@ -1,34 +0,0 @@ -commit 958171fc701559903af413b2ae6a4ee6dcfd8266 -Author: David Scott -Date: Sun Oct 19 10:59:01 2014 +0000 - - xl: fix the 'upgrade' of Ide devices to Xen devices - - Without this patch a VM.start will hang in 'wait_for_plug' because - the hotplug script writes the xvda paths (51712) while xenopsd - waits for the hda paths (768) - - Signed-off-by: David Scott - -diff --git a/xl/xenops_server_xenlight.ml b/xl/xenops_server_xenlight.ml -index 97be1ee..6e741f9 100644 ---- a/xl/xenops_server_xenlight.ml -+++ b/xl/xenops_server_xenlight.ml -@@ -745,10 +745,15 @@ module VBD = struct - (* If no device number is provided then autodetect a free one *) - let device_number = - match vbd.position with -- | Some x -> x -+ | Some x -> -+ (* If the 'position' is on the Ide bus, we "upgrade" to -+ to the Xen bus instead *) -+ make (match spec x with -+ | Ide, disk, partition -> Xen, disk, partition -+ | x -> x) - | None -> - on_frontend (fun _ xs domid hvm -> -- make (free_device ~xs (if hvm then Ide else Xen) domid) -+ make (free_device ~xs Xen domid) - ) Newest vm - in - let devid = to_xenstore_key device_number in diff --git a/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 b/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 deleted file mode 100644 index 8d2624e8..00000000 --- a/SOURCES/xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 +++ /dev/null @@ -1,48 +0,0 @@ -commit f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 -Author: David Scott -Date: Sun Oct 19 11:23:09 2014 +0000 - - CA-149017: libxl will reject 4MiB videoram with upstream qemu - - If the user asks for 4MiB (-- which is the xapi default, see - [xapi-project/xen-api#1989]) then, if xenopsd is using upstream - qemu, then it will emit a warning and transparently increase the - amount of videoram to the minimum (i.e. 8MiB) - - Signed-off-by: David Scott - -diff --git a/xl/xenops_server_xenlight.ml b/xl/xenops_server_xenlight.ml -index 97be1ee..a42cc40 100644 ---- a/xl/xenops_server_xenlight.ml -+++ b/xl/xenops_server_xenlight.ml -@@ -37,6 +37,12 @@ exception Restore_signature_mismatch - - exception Domain_stuck_in_dying_state of domid - -+let minimum_videoram mib = -+ let minimum = if !Xenopsd.use_upstream_qemu then 8 else 4 in -+ if mib < minimum -+ then warn "VM configuration has illegal videoram value: %d (minimum is %d) MiB. Using the minimum value instead." mib minimum; -+ max minimum mib -+ - (* libxl logging and context *) - - let vmessage min_level level errno ctx msg = -@@ -1598,7 +1604,7 @@ module VM = struct - | HVM hvm_info -> - Domain.BuildHVM { - Domain.shadow_multiplier = hvm_info.shadow_multiplier; -- video_mib = hvm_info.video_mib; -+ video_mib = minimum_videoram hvm_info.video_mib; - } - | PV { boot = Direct direct } -> - Domain.BuildPV { -@@ -1963,7 +1969,7 @@ module VM = struct - let video_memkb, shadow_memkb = - match vm.ty with - | HVM hvm_info -> -- Int64.mul (Int64.of_int hvm_info.video_mib) 1024L, -+ Int64.mul (Int64.of_int (minimum_videoram hvm_info.video_mib)) 1024L, - Int64.mul - (Memory.HVM.shadow_mib (max_memkb /// 1024L) max_vcpus hvm_info.shadow_multiplier) - 1024L diff --git a/SOURCES/xenserver-readme b/SOURCES/xenserver-readme deleted file mode 100644 index 8cfede66..00000000 --- a/SOURCES/xenserver-readme +++ /dev/null @@ -1 +0,0 @@ -Insert some interesting information here. diff --git a/SPECS/blktap.spec b/SPECS/blktap.spec deleted file mode 100644 index 7f57b442..00000000 --- a/SPECS/blktap.spec +++ /dev/null @@ -1,67 +0,0 @@ -Summary: Enhanced version of tapdisk -Name: blktap -Version: 0.9.2 -Release: 2%{?dist} -License: LGPL+linking exception -URL: https://github.com/xapi-project/blktap -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libaio-devel -BuildRequires: libtool -BuildRequires: libuuid-devel -BuildRequires: xen-devel -BuildRequires: openssl-devel - -%description -Enhanced version of tapdisk with support for storage mirroring. - -%prep -%setup -q - - -%build -sh autogen.sh -./configure --prefix %{_libdir}/%{name} -make - -%install - -mkdir -p %{buildroot}/%{_libdir}/%{name} -mkdir -p %{buildroot}/%{_libdir}/%{name}/lib -mkdir -p %{buildroot}/%{_libdir}/%{name}/sbin -mkdir -p %{buildroot}/%{_libdir}/%{name}/bin -mkdir -p %{buildroot}/%{_libdir}/%{name}/include/blktap -mkdir -p %{buildroot}/%{_libdir}/%{name}/include/vhd -mkdir -p %{buildroot}/%{_libdir}/%{name}/libexec -mkdir -p %{buildroot}/%{_libdir}/%{name}/etc/udev/rules.d - -make install DESTDIR=%{buildroot} - - -%files -%{_libdir}/%{name}/bin/* -%{_libdir}/%{name}/etc/udev/rules.d/blktap.rules -%{_libdir}/%{name}/etc/cron.daily/blktap-log-cleanup -%{_libdir}/%{name}/etc/logrotate.d/blktap -%{_libdir}/%{name}/include/blktap/* -%{_libdir}/%{name}/include/vhd/* -%{_libdir}/%{name}/lib/* -%{_libdir}/%{name}/libexec/* -%{_libdir}/%{name}/sbin/* - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.9.2-2 -- Remove xen-missing-headers dependency - -* Wed Jun 04 2014 Bob Ball - 0.9.2-1 -- Update blktap to latest release - -* Wed Mar 12 2014 Bob Ball - 0.9.1-1 -- Update blktap to avoid Debian Jessie compile failure - -* Fri Jan 17 2014 Euan Harris - 0.9.0-2 -- Change to upstream source repository - -* Thu Oct 24 2013 David Scott - 0.9.0-1 -- Initial package diff --git a/SPECS/cppo.spec b/SPECS/cppo.spec deleted file mode 100644 index e1c93048..00000000 --- a/SPECS/cppo.spec +++ /dev/null @@ -1,35 +0,0 @@ -Name: cppo -Version: 0.9.3 -Release: 2%{?dist} -Summary: Equivalent of the C preprocessor for OCaml -License: BSD3 -URL: http://mjambon.com/cppo.html -Source0: https://github.com/mjambon/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz - -BuildRequires: ocaml - -%description -Equivalent of the C preprocessor for OCaml. - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}/%{_bindir} -make install BINDIR=%{buildroot}/%{_bindir} - -%files -%doc LICENSE -%doc README -%{_bindir}/cppo - -%changelog -* Tue Oct 21 2014 Euan Harris - 0.9.3-2 -- Switch to GitHub sources - -* Fri May 31 2013 David Scott - 0.9.3-1 -- Initial package - diff --git a/SPECS/deriving-ocsigen.spec b/SPECS/deriving-ocsigen.spec deleted file mode 100644 index a8d5c514..00000000 --- a/SPECS/deriving-ocsigen.spec +++ /dev/null @@ -1,56 +0,0 @@ -Name: deriving-ocsigen -Version: 0.3c -Release: 2%{?dist} -Summary: Extension to OCaml for deriving functions from type declarations -License: MIT -URL: http://ocsigen.org -Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib - -%description -Extension to OCaml for deriving functions from type declarations - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES -%doc COPYING -%doc README -%{_libdir}/ocaml/deriving-ocsigen -%exclude %{_libdir}/ocaml/deriving-ocsigen/*.a -%exclude %{_libdir}/ocaml/deriving-ocsigen/*.cmxa -%exclude %{_libdir}/ocaml/deriving-ocsigen/*.cmx -%exclude %{_libdir}/ocaml/deriving-ocsigen/*.mli - -%files devel -%{_libdir}/ocaml/deriving-ocsigen/*.a -%{_libdir}/ocaml/deriving-ocsigen/*.cmx -%{_libdir}/ocaml/deriving-ocsigen/*.cmxa -%{_libdir}/ocaml/deriving-ocsigen/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 0.3c-2 -- Split files correctly between base and devel packages - -* Fri May 31 2013 David Scott - 0.3c-1 -- Initial package - diff --git a/SPECS/ezlvm.spec b/SPECS/ezlvm.spec deleted file mode 100644 index 2044344f..00000000 --- a/SPECS/ezlvm.spec +++ /dev/null @@ -1,54 +0,0 @@ -# -*- rpm-spec -*- - -Summary: Simple LVM storage adapter for xapi -Name: ezlvm -Version: 0.1 -Release: 1%{?dist} -License: LGPL -URL: https://github.com/xapi-project/ezlvm -Source0: https://github.com/xapi-project/ezlvm/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-findlib-devel -BuildRequires: xapi-storage-devel -BuildRequires: xapi-storage -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-uri-devel -BuildRequires: ocamlscript -BuildRequires: ocaml-ounit-devel -Requires: ocaml -Requires: ocaml-camlp4-devel -Requires: ocaml-findlib -Requires: ocaml-findlib-devel -Requires: xapi-storage-devel -Requires: xapi-storage -Requires: ocaml-re-devel -Requires: ocaml-cmdliner-devel -Requires: ocaml-uri-devel -Requires: ocamlscript -Requires: ocaml-ounit-devel - -%description -Simple LVM storage adapter for xapi - -%prep -%setup -q -n %{name}-%{version} - -%build -./volume/SR.ls --help=groff - -%install -cd volume -DESTDIR=%{buildroot} SCRIPTDIR=%{_libexecdir}/xapi-storage-script/volume/org.xen.xcp.storage.ezlvm make install -cd ../datapath -DESTDIR=%{buildroot} SCRIPTDIR=%{_libexecdir}/xapi-storage-script/datapath/block make install - -%files -%{_libexecdir}/xapi-storage-script/volume/org.xen.xcp.storage.ezlvm/* -%{_libexecdir}/xapi-storage-script/datapath/block/* - -%changelog -* Fri Oct 17 2014 David Scott - 0.1-1 -- Initial package diff --git a/SPECS/ffs.spec b/SPECS/ffs.spec deleted file mode 100644 index 8e89a907..00000000 --- a/SPECS/ffs.spec +++ /dev/null @@ -1,88 +0,0 @@ -Name: ffs -Version: 0.9.25 -Release: 1%{?dist} -Summary: Simple flat file storage manager for the xapi toolstack -License: LGPL -URL: https://github.com/xapi-project/ffs -Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: ffs-init -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-vhd-devel -BuildRequires: ocaml-tapctl-devel -Requires: nfs-utils -Requires: redhat-lsb-core -Requires: blktap - -%description -Simple flat file storage manager for the xapi toolstack. - -%prep -%setup -q -cp %{SOURCE1} ffs-init - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -mkdir -p %{buildroot}/%{_mandir}/man1 -make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} MANDIR=%{_mandir} -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 ffs-init %{buildroot}%{_sysconfdir}/init.d/ffs -cp ffs.1 %{buildroot}%{_mandir}/man1/ffs.1 -gzip %{buildroot}%{_mandir}/man1/ffs.1 - -%files -%doc README.md LICENSE MAINTAINERS -%{_sbindir}/ffs -%{_mandir}/man1/ffs.1.gz -%{_sysconfdir}/init.d/ffs - -%post -/sbin/chkconfig --add ffs - -%preun -if [ $1 -eq 0 ]; then - /sbin/service ffs stop > /dev/null 2>&1 - /sbin/chkconfig --del ffs -fi - -%changelog -* Thu Oct 2 2014 David Scott - 0.9.25-1 -- Update to 0.9.25 - -* Thu Jan 16 2014 Euan Harris - 0.9.24-1 -- Update to 0.9.24, with VDI.clone fix - -* Thu Oct 31 2013 David Scott - 0.9.23-1 -- Update to 0.9.23, with VDI.copy fix - -* Wed Oct 30 2013 David Scott -- Update to 0.9.22, with VDI.clone and VDI.snapshot fixes - -* Mon Oct 28 2013 David Scott -- Update to 0.9.21, with minimal storage motion support - -* Fri Oct 25 2013 David Scott -- Update to 0.9.20 -- Detect a parallel install of blktap and use that - -* Wed Sep 25 2013 David Scott -- Update to 0.9.18 - -* Tue Sep 10 2013 David Scott -- Update to 0.9.17 - -* Tue Jun 18 2013 David Scott -- Update to 0.9.4 - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/forkexecd.spec b/SPECS/forkexecd.spec deleted file mode 100644 index 60f87abb..00000000 --- a/SPECS/forkexecd.spec +++ /dev/null @@ -1,85 +0,0 @@ -Name: forkexecd -Version: 0.9.2 -Release: 1%{?dist} -Summary: A subprocess management service -License: LGPL -URL: https://github.com/xapi-project/forkexecd -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: forkexecd-init -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-uuidm-devel -BuildRequires: ocaml-xcp-idl-devel -Requires: redhat-lsb-core -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts - -%description -A service which starts and manages subprocesses, avoiding the need to manually -fork() and exec() in a multithreaded program. - -%prep -%setup -q -cp %{SOURCE1} forkexecd-init - -%build -ocaml setup.ml -configure -ocaml setup.ml -build - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install -mkdir -p %{buildroot}/%{_sbindir} -install fe_main.native %{buildroot}/%{_sbindir}/forkexecd -install fe_cli.native %{buildroot}/%{_sbindir}/forkexecd-cli -mkdir -p %{buildroot}/%{_sysconfdir}/init.d -install -m 0755 forkexecd-init %{buildroot}%{_sysconfdir}/init.d/forkexecd - - -%files -%{_sbindir}/forkexecd -%{_sbindir}/forkexecd-cli -%{_sysconfdir}/init.d/forkexecd - -%post -/sbin/chkconfig --add forkexecd - -%preun -if [ $1 -eq 0 ]; then - /sbin/service forkexecd stop > /dev/null 2>&1 - /sbin/chkconfig --del forkexecd -fi - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-fd-send-recv-devel%{?_isa} -Requires: ocaml-rpc-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} -Requires: ocaml-uuidm-devel%{?_isa} -Requires: ocaml-xcp-idl-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%files devel -%doc LICENSE README.md ChangeLog MAINTAINERS -%{_libdir}/ocaml/forkexec/* - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.9.2-1 -- Update to 0.9.2 - -* Wed Sep 25 2013 David Scott - 0.9.1-1 -- Update to 0.9.1 - -* Fri May 31 2013 David Scott -- Initial package - diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec deleted file mode 100644 index f7d2d87d..00000000 --- a/SPECS/libnl3.spec +++ /dev/null @@ -1,93 +0,0 @@ -Summary: Convenience library for kernel netlink sockets -License: LGPLv2 -Name: libnl3 -Version: 3.2.22 -Release: 1%{?dist} -URL: http://www.infradead.org/~tgr/libnl/ -Source0: http://www.infradead.org/~tgr/libnl/files/libnl-%{version}.tar.gz -Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{version}.tar.gz -BuildRequires: bison -BuildRequires: flex -BuildRequires: python - -%description -This package contains a convenience library to simplify -using the Linux kernel's netlink sockets interface for -network manipulation - -%package devel -Summary: Libraries and headers for using libnl3 -Requires: %{name} = %{version}-%{release} -Requires: %{name}-cli = %{version}-%{release} -Requires: kernel-headers - -%description devel -This package contains various headers for using libnl3 - -%package cli -Summary: Command line interface utils for libnl3 -Requires: %{name} = %{version}-%{release} - -%description cli -This package contains various libnl3 utils and additional -libraries on which they depend - -%package doc -Summary: API documentation for libnl3 -Requires: %{name} = %{version}-%{release} - -%description doc -This package contains libnl3 API documentation - -%prep -%setup -q -n libnl-%{version} - -tar -xzf %SOURCE1 - -%build -%configure --disable-static -make %{?_smp_mflags} - -%install -make install DESTDIR=$RPM_BUILD_ROOT - -find $RPM_BUILD_ROOT -name \*.la -delete - -%post -p /sbin/ldconfig -%post cli -p /sbin/ldconfig -%postun -p /sbin/ldconfig -%postun cli -p /sbin/ldconfig - -%files -%doc COPYING -%exclude %{_libdir}/libnl-cli*.so.* -%{_libdir}/libnl-*.so.* -%config(noreplace) %{_sysconfdir}/* - -%files devel -%doc COPYING -%{_includedir}/libnl3/netlink/ -%dir %{_includedir}/libnl3/ -%{_libdir}/*.so -%{_libdir}/pkgconfig/*.pc - -%files cli -%doc COPYING -%{_libdir}/libnl-cli*.so.* -%{_libdir}/libnl/ -%{_sbindir}/* -%{_mandir}/man8/* - -%files doc -%doc COPYING -%doc libnl-doc-%{version}/*.html -%doc libnl-doc-%{version}/*.css -%doc libnl-doc-%{version}/stylesheets/* -%doc libnl-doc-%{version}/images/* -%doc libnl-doc-%{version}/images/icons/* -%doc libnl-doc-%{version}/images/icons/callouts/* -%doc libnl-doc-%{version}/api/* - -%changelog -* Thu Jul 04 2013 Simon Rowe - 3.2.22-1 -- Package for CentOS (derived from Fedora) diff --git a/SPECS/linux-guest-loader.spec b/SPECS/linux-guest-loader.spec deleted file mode 100644 index c91ba9ac..00000000 --- a/SPECS/linux-guest-loader.spec +++ /dev/null @@ -1,50 +0,0 @@ -Summary: Bootloader for EL-based distributions that support Xen -Name: linux-guest-loader -Version: 1.9.0 -Release: 1%{?dist} -URL: https://github.com/xenserver/linux-guest-loader -Source0: https://github.com/xenserver/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -License: GPL -BuildArch: noarch -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: xcp-python-libs -Requires: xcp-python-libs -Provides: eliloader > 0.3 -Obsoletes: eliloader <= 0.3 - -%description -Bootloader for EL-based distributions that support Xen. - -%prep -%setup -q - -%build -%{__python} setup.py build - -%install -mkdir -p %{buildroot}/%{_sbindir} -%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_sbindir} -ln -s %{_sbindir}/eliloader.py %{buildroot}/%{_sbindir}/eliloader -rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info - -%files -%{_sbindir}/eliloader -%{_sbindir}/eliloader.py - -%changelog -* Mon Feb 17 2014 Euan Harris - 1.9.0-1 -- Switch to upstream repository - -* Wed Jan 22 2014 Mike McClurg - 0.9.1-1 -- Convert package from eliloader to upstream linux-guest-loader - -* Mon Jun 24 2013 David Scott - 0.3-1 -- Update to eliloader 0.3 - -* Sat Jun 22 2013 David Scott - 0.2-1 -- Update to eliloader 0.2 (doesn't assume data file directory is present) - -* Sat Jun 22 2013 David Scott - 0.1-1 -- Initial package - diff --git a/SPECS/message-switch.spec b/SPECS/message-switch.spec deleted file mode 100644 index 4a629c86..00000000 --- a/SPECS/message-switch.spec +++ /dev/null @@ -1,89 +0,0 @@ -Name: message-switch -Version: 0.10.4 -Release: 1%{?dist} -Summary: A store and forward message switch -License: FreeBSD -URL: https://github.com/djs55/message-switch -Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: message-switch-init -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-async-devel -Requires: redhat-lsb-core -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts - -%description -A store and forward message switch for OCaml. - -%prep -%setup -q -cp %{SOURCE1} message-switch-init - -%build -ocaml setup.ml -configure -ocaml setup.ml -build - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install -mkdir -p %{buildroot}/%{_sbindir} -install switch_main.native %{buildroot}/%{_sbindir}/message-switch -install main.native %{buildroot}/%{_sbindir}/message-cli -mkdir -p %{buildroot}/%{_sysconfdir}/init.d -install -m 0755 message-switch-init %{buildroot}%{_sysconfdir}/init.d/message-switch - - -%files -%{_sbindir}/message-switch -%{_sbindir}/message-cli -%{_sysconfdir}/init.d/message-switch - -%post -/sbin/chkconfig --add message-switch - -%preun -if [ $1 -eq 0 ]; then - /sbin/service message-switch stop > /dev/null 2>&1 - /sbin/chkconfig --del message-switch -fi - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cohttp-devel%{?_isa} -Requires: ocaml-re-devel%{?_isa} -Requires: ocaml-rpc-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%files devel -%doc LICENSE README.md CHANGES -%{_libdir}/ocaml/message_switch/* - -%changelog -* Tue Oct 14 2014 David Scott - 0.10.4-1 -- Update to 0.10.4, enable core/async - -* Thu Jun 19 2014 David Scott - 0.10.3-1 -- Update to 0.10.3 - -* Fri Jun 6 2014 Jon Ludlam - 0.10.2-1 -- Update to 0.10.2 - -* Fri Oct 18 2013 David Scott - 0.10.1-1 -- Update to 0.10.1 which is more tolerant of startup orderings - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/mirage-testvm.spec b/SPECS/mirage-testvm.spec deleted file mode 100644 index 3a99e44f..00000000 --- a/SPECS/mirage-testvm.spec +++ /dev/null @@ -1,56 +0,0 @@ -%define debug_package %{nil} - -Name: mirage-testvm -Version: 0.2 -Release: 1%{?dist} -Summary: Simple Mirage test VM -License: ISC -URL: https://github.com/mirage/xen-testvm -Source0: https://github.com/mirage/xen-testvm/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-mirage-block-xen-devel -BuildRequires: ocaml-mirage-console-xen-devel -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-testvmlib-devel -BuildRequires: ocaml-vchan-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-mirage-xen-devel -BuildRequires: ocaml-mirage-clock-xen-devel -BuildRequires: ocaml-shared-memory-ring-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-ipaddr-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-gnt-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel - -%description -This is a simple Mirage test VM. - -%prep -%setup -q -n xen-testvm-%{version} - -%build -./manual-build.sh - -%install -mkdir -p %{buildroot}/boot/guest -cp mir-test.xen %{buildroot}/boot/guest/mirage-testvm.xen - -%files -%doc CHANGES -%doc README.md -/boot/guest/mirage-testvm.xen - -%changelog -* Wed Jul 16 2014 David Scott - 0.2-1 -- Update to 0.2 - -* Wed Jul 16 2014 David Scott - 0.1-1 -- Initial package diff --git a/SPECS/oasis.spec b/SPECS/oasis.spec deleted file mode 100644 index 849987c9..00000000 --- a/SPECS/oasis.spec +++ /dev/null @@ -1,95 +0,0 @@ -Name: oasis -Version: 0.4.4 -Release: 1%{?dist} -Summary: Architecture for building OCaml libraries and applications - -License: LGPL -URL: http://oasis.forge.ocamlcore.org/index.html -Source0: https://github.com/ocaml/oasis/archive/%{version}/%{name}-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocamlify -BuildRequires: ocamlmod -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-odn-devel - -%description -OASIS generates a full configure, build and install system for your -application. It starts with a simple `_oasis` file at the toplevel of -your project and creates everything required. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-odn-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -# The auto-requirements script mistakenly thinks that the Oasis library -# modules depend on OASISAstTypes. -%{?filter_setup: -%filter_from_requires /OASISAstTypes/d -%filter_setup -} - -%prep -%setup -q - - -%build -./configure --prefix %{_prefix} --destdir %{buildroot} -make - - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - - -%files -%{_bindir}/oasis - -%{_libdir}/ocaml/plugin-loader/META -%{_libdir}/ocaml/plugin-loader/*.cma -%{_libdir}/ocaml/plugin-loader/*.cmi - -%{_libdir}/ocaml/oasis/META -%{_libdir}/ocaml/oasis/*.cma -%{_libdir}/ocaml/oasis/*.cmi -%{_libdir}/ocaml/oasis/*.mli - -%{_libdir}/ocaml/userconf/META -%{_libdir}/ocaml/userconf/*.cma -%{_libdir}/ocaml/userconf/*.cmi - - - -%files devel -%{_libdir}/ocaml/plugin-loader/*.a -%{_libdir}/ocaml/plugin-loader/*.cmx -%{_libdir}/ocaml/plugin-loader/*.cmxa -%exclude %{_libdir}/ocaml/plugin-loader/*.cmxs -%exclude %{_libdir}/ocaml/plugin-loader/*.ml - -%{_libdir}/ocaml/oasis/*.a -%{_libdir}/ocaml/oasis/*.cmx -%{_libdir}/ocaml/oasis/*.cmxa -%exclude %{_libdir}/ocaml/oasis/*.cmxs -%exclude %{_libdir}/ocaml/oasis/*.ml - -%{_libdir}/ocaml/userconf/*.a -%{_libdir}/ocaml/userconf/*.cmx -%{_libdir}/ocaml/userconf/*.cmxa -%exclude %{_libdir}/ocaml/userconf/*.cmxs -%exclude %{_libdir}/ocaml/userconf/*.ml - - -%changelog -* Wed Mar 26 2014 Euan Harris - 0.4.4-1 -- Initial package - diff --git a/SPECS/ocaml-async-extra.spec b/SPECS/ocaml-async-extra.spec deleted file mode 100644 index 916a0f17..00000000 --- a/SPECS/ocaml-async-extra.spec +++ /dev/null @@ -1,112 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async-extra -Version: 111.28.00 -Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async_extra -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_extra-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-async-kernel-devel -BuildRequires: ocaml-async-unix-devel -BuildRequires: ocaml-bin-prot-devel -BuildRequires: ocaml-core-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-pa-pipebang-devel -BuildRequires: ocaml-pa-test-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-custom-printf-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-enumerate-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street Capital's asynchronous execution library (core). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async_extra-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_extra -%if %opt -%exclude %{_libdir}/ocaml/async_extra/*.a -%exclude %{_libdir}/ocaml/async_extra/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async_extra/*.ml -%exclude %{_libdir}/ocaml/async_extra/*.mli - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async_extra/*.a -%{_libdir}/ocaml/async_extra/*.cmxa -%endif -%{_libdir}/ocaml/async_extra/*.ml -%{_libdir}/ocaml/async_extra/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-find.spec b/SPECS/ocaml-async-find.spec deleted file mode 100644 index a7dba0b3..00000000 --- a/SPECS/ocaml-async-find.spec +++ /dev/null @@ -1,103 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async-find -Version: 111.28.00 -Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async_find -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_find-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-async-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-enumerate-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-custom-printf-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street Capital's asynchronous execution library (core). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async_find-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_find -%if %opt -%exclude %{_libdir}/ocaml/async_find/*.a -%exclude %{_libdir}/ocaml/async_find/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async_find/*.mli - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async_find/*.a -%{_libdir}/ocaml/async_find/*.cmxa -%endif -%{_libdir}/ocaml/async_find/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.15.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-inotify.spec b/SPECS/ocaml-async-inotify.spec deleted file mode 100644 index 8ed38271..00000000 --- a/SPECS/ocaml-async-inotify.spec +++ /dev/null @@ -1,114 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async-inotify -Version: 111.28.00 -Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async_inotify -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_inotify-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-async-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-enumerate-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-custom-printf-devel -BuildRequires: ocaml-async-find-devel -BuildRequires: ocaml-inotify-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street Capital's asynchronous execution library (core). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camlp4-devel -Requires: ocaml-async-devel -Requires: ocaml-sexplib-devel -Requires: ocaml-findlib-devel -Requires: ocaml-comparelib-devel -Requires: ocaml-enumerate-devel -Requires: ocaml-herelib-devel -Requires: ocaml-custom-printf-devel -Requires: ocaml-async-find-devel -Requires: ocaml-inotify-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async_inotify-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_inotify -%if %opt -%exclude %{_libdir}/ocaml/async_inotify/*.a -%exclude %{_libdir}/ocaml/async_inotify/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async_inotify/*.mli - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async_inotify/*.a -%{_libdir}/ocaml/async_inotify/*.cmxa -%endif -%{_libdir}/ocaml/async_inotify/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.34.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async-kernel.spec b/SPECS/ocaml-async-kernel.spec deleted file mode 100644 index 20c6f0b3..00000000 --- a/SPECS/ocaml-async-kernel.spec +++ /dev/null @@ -1,116 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async-kernel -Version: 111.28.00 -Release: 1%{?dist} -Summary: Monad concurrency library - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async_kernel -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_kernel-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-bin-prot-devel -BuildRequires: ocaml-core-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-pa-test-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-enumerate-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Part of Jane Street’s Core library -The Core suite of libraries is an industrial strength alternative to -OCaml's standard library that was developed by Jane Street, the -largest industrial user of OCaml. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-bin-prot-devel -Requires: ocaml-core-devel -Requires: ocaml-fieldslib-devel -Requires: ocaml-pa-ounit-devel -Requires: ocaml-pa-test-devel -Requires: ocaml-sexplib-devel -Requires: ocaml-herelib-devel -Requires: ocaml-comparelib-devel -Requires: ocaml-enumerate-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async_kernel-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_kernel -%if %opt -%exclude %{_libdir}/ocaml/async_kernel/*.a -%exclude %{_libdir}/ocaml/async_kernel/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async_kernel/*.ml -%exclude %{_libdir}/ocaml/async_kernel/*.mli - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async_kernel/*.a -%{_libdir}/ocaml/async_kernel/*.cmxa -%endif -%{_libdir}/ocaml/async_kernel/*.ml -%{_libdir}/ocaml/async_kernel/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Initial package diff --git a/SPECS/ocaml-async-unix.spec b/SPECS/ocaml-async-unix.spec deleted file mode 100644 index 790670ba..00000000 --- a/SPECS/ocaml-async-unix.spec +++ /dev/null @@ -1,110 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async-unix -Version: 111.28.00 -Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async_unix -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async_unix-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-bin-prot-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-core-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-pa-test-devel -BuildRequires: ocaml-pa-pipebang-devel -BuildRequires: ocaml-async-kernel-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-enumerate-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street Capital's asynchronous execution library (core). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async_unix-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async_unix -%if %opt -%exclude %{_libdir}/ocaml/async_unix/*.a -%exclude %{_libdir}/ocaml/async_unix/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async_unix/*.ml -%exclude %{_libdir}/ocaml/async_unix/*.mli - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async_unix/*.a -%{_libdir}/ocaml/async_unix/*.cmxa -%endif -%{_libdir}/ocaml/async_unix/*.ml -%{_libdir}/ocaml/async_unix/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-async.spec b/SPECS/ocaml-async.spec deleted file mode 100644 index e62be856..00000000 --- a/SPECS/ocaml-async.spec +++ /dev/null @@ -1,113 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-async -Version: 111.25.00 -Release: 1%{?dist} -Summary: Jane Street Capital's asynchronous execution library (core) - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/async -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/async-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-async-kernel-devel -BuildRequires: ocaml-async-unix-devel -BuildRequires: ocaml-async-extra-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-enumerate-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-custom-printf-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street Capital's asynchronous execution library (core). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-async-kernel-devel -Requires: ocaml-async-unix-devel -Requires: ocaml-async-extra-devel -Requires: ocaml-ounit-devel -Requires: ocaml-findlib-devel -Requires: ocaml-comparelib-devel -Requires: ocaml-enumerate-devel -Requires: ocaml-herelib-devel -Requires: ocaml-custom-printf-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n async-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/async -%if %opt -%exclude %{_libdir}/ocaml/async/*.a -%exclude %{_libdir}/ocaml/async/*.cmxa -%endif -%exclude %{_libdir}/ocaml/async/*.ml - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/async/*.a -%{_libdir}/ocaml/async/*.cmxa -%endif -%{_libdir}/ocaml/async/*.ml - -%changelog -* Tue Oct 14 2014 David Scott - 111.25.00-1 -- Update to 111.25.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-bin-prot.spec b/SPECS/ocaml-bin-prot.spec deleted file mode 100644 index d43811b6..00000000 --- a/SPECS/ocaml-bin-prot.spec +++ /dev/null @@ -1,176 +0,0 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global debug_package %{nil} - -Name: ocaml-bin-prot -Version: 111.03.00 -Release: 1%{?dist} -Summary: Read and write OCaml values in a type-safe binary protocol - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: http://forge.ocamlcore.org/projects/bin_prot -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/bin_prot-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: ocaml >= 3.12.0 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-type-conv >= 109.53.02 -BuildRequires: chrpath - - -%description -This library contains functionality for reading and writing OCaml -values in a type-safe binary protocol. These functions are extremely -efficient and provide users with a convenient and safe way of -performing I/O on any extensionally defined data type. This means that -functions, objects, and values whose type is bound through a -polymorphic record field are not supported, but everything else is. - -As of now, there is no support for cyclic or shared values. Cyclic -values will lead to non-termination whereas shared values, besides -requiring significantly more space when encoded, may lead to a -substantial increase in memory footprint when they are read back in. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n bin_prot-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt LICENSE-Tywith.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/bin_prot -%if %opt -%exclude %{_libdir}/ocaml/bin_prot/*.a -%exclude %{_libdir}/ocaml/bin_prot/*.cmxa -%endif -%exclude %{_libdir}/ocaml/bin_prot/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - - -%files devel -%defattr(-,root,root,-) -%doc CHANGES.txt README.md TODO.txt -%if %opt -%{_libdir}/ocaml/bin_prot/*.a -%{_libdir}/ocaml/bin_prot/*.cmxa -%endif -%{_libdir}/ocaml/bin_prot/*.mli - - -%changelog -* Tue Oct 14 2014 David Scott - 111.03.00-1 -- Update to 111.03.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 -- Update to version 109.53.02. - -* Sat Aug 03 2013 Fedora Release Engineering - 2.0.9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 2.0.9-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Oct 30 2012 Richard W.M. Jones - 2.0.9-3 -- Rebuild for OCaml 4.00.1. - -* Fri Jul 20 2012 Fedora Release Engineering - 2.0.9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 2 2012 Richard W.M. Jones - 2.0.9-1 -- New upstream version 2.0.9. -- Recompile for OCaml 4.00.0. - -* Thu Jan 12 2012 Richard W.M. Jones - 2.0.7-1 -- New upstream version 2.0.7. -- Rebuild for OCaml 3.12.1. - -* Wed Sep 28 2011 Michael Ekstrand - 2.0.6-1 -- New upstream version from forge.ocamlcore.org (#741484) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.2.24-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jan 6 2011 Richard W.M. Jones - 1.2.24-1 -- New upstream version 1.2.24. -- Fix upstream URL. -- Rebuild for OCaml 3.12.0. - -* Mon Jan 11 2010 Richard W.M. Jones - 1.2.21-1 -- New upstream version 1.2.21. -- Change %%define to %%global. -- Use upstream RPM 4.8 OCaml dependency generator. - -* Mon Nov 9 2009 Richard W.M. Jones - 1.2.20-2 -- The final license of the code is LGPLv2+ with the OCaml linking - exception. It was derived from earlier BSD code. -- Don't duplicate the license files across base and -devel packages. -- Add note to spec about inclusion of *.ml file in -devel package. - -* Mon Oct 12 2009 Richard W.M. Jones - 1.2.20-1 -- New upstream version 1.2.20. - -* Sat Sep 5 2009 Richard W.M. Jones - 1.2.18-1 -- New upstream version 1.2.18. - -* Fri May 16 2008 Richard W.M. Jones - 1.0.5-3 -- Force signed chars when compiling, as per comment from upstream author. -- Remove the part in the description which says this is only - supported on little endian architectures. - -* Mon May 12 2008 Richard W.M. Jones - 1.0.5-2 -- Remove ExclusiveArch, but add a Fedora README file warning about - shortcomings on non-x86 architectures. -- Added missing dependency ocaml-type-conv. -- Move *.ml file to devel package. - -* Sat May 3 2008 Richard W.M. Jones - 1.0.5-1 -- Initial RPM release. diff --git a/SPECS/ocaml-biniou.spec b/SPECS/ocaml-biniou.spec deleted file mode 100644 index 65a9a4c2..00000000 --- a/SPECS/ocaml-biniou.spec +++ /dev/null @@ -1,65 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-biniou -Version: 1.0.6 -Release: 3%{?dist} -Summary: Compact, fast and extensible serialization format -License: BSD3 -URL: http://mjambon.com/biniou.html -Source0: https://github.com/mjambon/biniou/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-easy-format-devel -BuildRequires: ocaml-findlib -Obsoletes: biniou <= 1.0.6 - -%description -Binary data format designed for speed, safety, ease of use and backward -compatibility as protocols evolve. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-easy-format-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n biniou-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p %{buildroot}/%{_bindir} -make install BINDIR=%{buildroot}/%{_bindir} - -%files -%doc LICENSE -%doc README.md -%{_bindir}/bdump -%{_libdir}/ocaml/biniou -%exclude %{_libdir}/ocaml/biniou/*.a -%exclude %{_libdir}/ocaml/biniou/*.cmxa -%exclude %{_libdir}/ocaml/biniou/*.cmx -%exclude %{_libdir}/ocaml/biniou/*.mli - -%files devel -%{_libdir}/ocaml/biniou/*.a -%{_libdir}/ocaml/biniou/*.cmx -%{_libdir}/ocaml/biniou/*.cmxa -%{_libdir}/ocaml/biniou/*.mli - -%changelog -* Tue Oct 21 2014 Euan Harris - 1.0.6-3 -- Switch to GitHub sources - -* Fri May 30 2014 Euan Harris - 1.0.6-2 -- Split files correctly between base and devel packages - -* Fri May 31 2013 David Scott - 1.0.6-1 -- Initial package - diff --git a/SPECS/ocaml-camomile.spec b/SPECS/ocaml-camomile.spec deleted file mode 100644 index 3bd075ef..00000000 --- a/SPECS/ocaml-camomile.spec +++ /dev/null @@ -1,199 +0,0 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global debug_package %{nil} - -Name: ocaml-camomile -Version: 0.8.5 -Release: 1%{?dist} -Summary: Unicode library for OCaml - -# Several files are MIT and UCD licensed, but the overall work is LGPLv2+ -# and the LGPL/GPL supercedes compatible licenses. -# https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html -License: LGPLv2+ -URL: http://sourceforge.net/projects/camomile/ -Source0: https://github.com/yoriyuki/Camomile/releases/download/rel-%{version}/camomile-%{version}.tar.bz2 -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.12.1-12 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel - - -%description -Camomile is a Unicode library for ocaml. Camomile provides Unicode -character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from -about 200 encodings, collation and locale-sensitive case mappings, and -more. - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%package data -Summary: Data files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description data -The %{name}-data package contains data files for developing -applications that use %{name}. - - -%prep -%setup -q -n camomile-%{version} - - -%build -./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir} -make -make dochtml -make man -strip tools/*.opt - - -%install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -mkdir -p $RPM_BUILD_ROOT%{_bindir} -make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir} -%if %opt -cp tools/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap -cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef -%endif - - -%files -%doc README -%{_libdir}/ocaml/camomile -%if %opt -%exclude %{_libdir}/ocaml/camomile/*.a -%exclude %{_libdir}/ocaml/camomile/*.cmxa -%exclude %{_libdir}/ocaml/camomile/*.cmx -%endif -%exclude %{_libdir}/ocaml/camomile/*.mli -%if %opt -%{_bindir}/camomilecharmap -%{_bindir}/camomilelocaledef -%endif - - -%files devel -%doc README dochtml/* -%if %opt -%{_libdir}/ocaml/camomile/*.a -%{_libdir}/ocaml/camomile/*.cmxa -%{_libdir}/ocaml/camomile/*.cmx -%endif -%{_libdir}/ocaml/camomile/*.mli - - -%files data -%doc README -%{_datadir}/camomile/ - - -%changelog -* Wed Oct 16 2013 Euan Harris - 0.8.5-1 -- Update to 0.8.5 - -* Fri Oct 19 2012 Richard W.M. Jones - 0.8.3-10 -- Rebuild for OCaml 4.00.1. -- Clean up the spec file. - -* Sat Jul 28 2012 Richard W.M. Jones - 0.8.3-9 -- Bump and rebuild against new OCaml 4.00.0 official release. - -* Fri Jul 20 2012 Fedora Release Engineering - 0.8.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 09 2012 Richard W.M. Jones - 0.8.3-7 -- Rebuild for OCaml 4.00.0. - -* Wed Jun 6 2012 Richard W.M. Jones - 0.8.3-6 -- Remove sed hack which worked around segfault on ppc64. Now fixed - in OCaml >= 3.12.1-12. - -* Sun Jun 3 2012 Richard W.M. Jones - 0.8.3-5 -- Remove patch which worked around segfault on ARM. Now fixed - in OCaml >= 3.12.1-9. - -* Wed May 30 2012 Richard W.M. Jones - 0.8.3-4 -- Remove ExcludeArch ppc64. -- Add sed hack to reduce size of long entry function which breaks - ppc64 code generator. See comment in spec file for full details. - -* Sat May 19 2012 Richard W.M. Jones - 0.8.3-2 -- Include workaround for segfault in gen_mappings.ml on ARM. -- Bump release and rebuild for new OCaml on ARM. - -* Fri Jan 6 2012 Richard W.M. Jones - 0.8.3-1 -- New upstream version 0.8.3. - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 5 2011 Richard W.M. Jones - 0.8.1-1 -- New upstream version 0.8.1. -- Rebuild for OCaml 3.12.0. -- camomilecharmap and camomilelocaledef no longer installed by default, - install them by hand instead. - -* Wed Dec 30 2009 Richard W.M. Jones - 0.7.2-2 -- Rebuild for OCaml 3.11.2. - -* Thu Oct 8 2009 Richard W.M. Jones - 0.7.2-1 -- New upstream version 0.7.2. - -* Sat Jul 25 2009 Fedora Release Engineering - 0.7.1-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sat May 23 2009 Richard W.M. Jones - 0.7.1-11 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Wed Feb 25 2009 Fedora Release Engineering - 0.7.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Nov 26 2008 Richard W.M. Jones - 0.7.1-9 -- Rebuild for OCaml 3.11.0+rc1. - -* Wed Nov 19 2008 Richard W.M. Jones - 0.7.1-8 -- Rebuild for OCaml 3.11.0 - -* Wed Apr 23 2008 Richard W.M. Jones - 0.7.1-7 -- Rebuild for OCaml 3.10.2 - -* Fri Mar 21 2008 Richard W.M. Jones - 0.7.1-6 -- ExcludeArch ppc64 (#438486). - -* Mon Mar 17 2008 Richard W.M. Jones - 0.7.1-5 -- Definitive license. -- Move ./configure into the build section. -- Remove a superfluous comment in the install section. -- Fix rpmlint error 'configure-without-libdir-spec'. -- Scratch build in Koji. - -* Wed Mar 5 2008 Richard W.M. Jones - 0.7.1-4 -- License is LGPLv2+ (no OCaml exception). - -* Wed Mar 5 2008 Richard W.M. Jones - 0.7.1-3 -- Remove ExcludeArch ppc64. - -* Tue Feb 12 2008 Richard W.M. Jones - 0.7.1-2 -- Added BR ocaml-camlp4-devel. -- Rename /usr/bin/*.opt as /usr/bin. - -* Wed Aug 08 2007 Richard W.M. Jones - 0.7.1-1 -- Initial RPM release. diff --git a/SPECS/ocaml-cdrom.spec b/SPECS/ocaml-cdrom.spec deleted file mode 100644 index 795594bc..00000000 --- a/SPECS/ocaml-cdrom.spec +++ /dev/null @@ -1,61 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-cdrom -Version: 0.9.1 -Release: 3%{?dist} -Summary: Query the state of CDROM devices -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/cdrom -Source0: https://github.com/xapi-project/cdrom/archive/cdrom-%{version}/cdrom-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild - -%description -Simple C bindings which allow the state of CDROM devices (and discs -inside) to be queried under Linux. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n cdrom-cdrom-%{version} - -%build -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/%{_libdir}/ocaml/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - -%files -%doc ChangeLog -%doc README.md -%{_libdir}/ocaml/cdrom -%exclude %{_libdir}/ocaml/cdrom/*.a -%exclude %{_libdir}/ocaml/cdrom/*.cmxa -%exclude %{_libdir}/ocaml/cdrom/*.cmx -%exclude %{_libdir}/ocaml/cdrom/*.mli -%{_libdir}/ocaml/stublibs/dllstubs_cdrom.so -%{_libdir}/ocaml/stublibs/dllstubs_cdrom.so.owner - -%files devel -%{_libdir}/ocaml/cdrom/*.a -%{_libdir}/ocaml/cdrom/*.cmx -%{_libdir}/ocaml/cdrom/*.cmxa -%{_libdir}/ocaml/cdrom/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 0.9.1-3 -- Split files correctly between base and devel packages - -* Tue May 28 2013 David Scott - 0.9.1-2 -- Initial package - diff --git a/SPECS/ocaml-cmdliner.spec b/SPECS/ocaml-cmdliner.spec deleted file mode 100644 index d413c05c..00000000 --- a/SPECS/ocaml-cmdliner.spec +++ /dev/null @@ -1,68 +0,0 @@ -Name: ocaml-cmdliner -Version: 0.9.5 -Release: 1%{?dist} -Summary: Declarative definition of commandline interfaces for OCaml -License: BSD3 -URL: http://erratique.ch/software/cmdliner -Source0: http://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -Obsoletes: cmdliner <= 0.9.5 - -%description -Cmdliner is an OCaml module for the declarative definition of command line -interfaces. It provides a simple and compositional mechanism to convert -command line arguments to OCaml values and pass them to your functions. -The module automatically handles syntax errors, help messages and UNIX -man page generation. It supports programs with single or multiple commands -(like darcs or git) and respects most of the POSIX and GNU conventions. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n cmdliner-%{version} - -%build -ocaml pkg/git.ml -ocaml pkg/build.ml native=true native-dynlink=true - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml/cmdliner -find . -cp _build/src/cmdliner.a _build/src/cmdliner.cma _build/src/cmdliner.cmi _build/src/cmdliner.cmx _build/src/cmdliner.cmxa _build/src/cmdliner.cmxs _build/src/cmdliner.mli _build/pkg/META %{buildroot}/%{_libdir}/ocaml/cmdliner - -%files -%doc CHANGES.md -%doc README.md -%{_libdir}/ocaml/cmdliner -%exclude %{_libdir}/ocaml/cmdliner/*.a -%exclude %{_libdir}/ocaml/cmdliner/*.cmxa -%exclude %{_libdir}/ocaml/cmdliner/*.cmx -%exclude %{_libdir}/ocaml/cmdliner/*.mli - -%files devel -%{_libdir}/ocaml/cmdliner/*.a -%{_libdir}/ocaml/cmdliner/*.cmx -%{_libdir}/ocaml/cmdliner/*.cmxa -%{_libdir}/ocaml/cmdliner/*.mli - -%changelog -* Thu Jul 17 2014 David Scott - 0.9.5-1 -- Update to 0.9.5 - -* Fri May 30 2014 Euan Harris - 0.9.3-3 -- Split files correctly between base and devel packages - -* Mon May 19 2014 Euan Harris - 0.9.3-2 -- Switch to GitHub mirror - -* Thu May 30 2013 David Scott - 0.9.3-1 -- Initial package - diff --git a/SPECS/ocaml-cohttp.spec b/SPECS/ocaml-cohttp.spec deleted file mode 100644 index 52462ce7..00000000 --- a/SPECS/ocaml-cohttp.spec +++ /dev/null @@ -1,96 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-cohttp -Version: 0.11.2 -Release: 2%{?dist} -Summary: An HTTP library for OCaml -License: LGPL -URL: https://github.com/mirage/ocaml-cohttp -Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-ssl-devel -BuildRequires: ocaml-uri-devel -BuildRequires: ocaml-stringext-devel -BuildRequires: ocaml-conduit-devel -BuildRequires: ocaml-async-kernel-devel - -%description -An HTTP library for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-re-devel%{?_isa} -Requires: ocaml-ssl-devel%{?_isa} -Requires: ocaml-uri-devel%{?_isa} -Requires: ocaml-stringext-devel%{?_isa} -Requires: ocaml-conduit-devel%{?_isa} -Requires: ocaml-fieldslib-devel%{?_isa} -Requires: ocaml-sexplib-devel%{?_isa} -Requires: ocaml-async-kernel-devel - -%package bin -Summary: Example binaries for %{name} - -%description bin -The %{name}-bin package contains the compiled example files -for %{name}. - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -# Dirty hack -export PREFIX=%{buildroot}%{_prefix} -make build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/cohttp -%exclude %{_libdir}/ocaml/cohttp/*.a -%exclude %{_libdir}/ocaml/cohttp/*.cmxa -%exclude %{_libdir}/ocaml/cohttp/*.cmx -%exclude %{_libdir}/ocaml/cohttp/*.mli -%{_bindir}/cohttp-server-async - -%files devel -%{_libdir}/ocaml/cohttp/*.a -%{_libdir}/ocaml/cohttp/*.cmx -%{_libdir}/ocaml/cohttp/*.cmxa -%{_libdir}/ocaml/cohttp/*.mli - -%files bin -%{_prefix}/bin/cohttp-server-lwt -%{_prefix}/bin/cohttp-server-async - -%changelog -* Tue Oct 14 2014 David Scott - 0.11.2-2 -- Add dependency on core/async - -* Fri Jun 6 2014 Jon Ludlam - 0.11.2-1 -- Update to 0.11.2 - -* Fri May 30 2014 Euan Harris - 0.9.8-2 -- Split files correctly between base and devel packages - -* Thu May 30 2013 David Scott - 0.9.8-1 -- Initial package - diff --git a/SPECS/ocaml-comparelib.spec b/SPECS/ocaml-comparelib.spec deleted file mode 100644 index 5e93bc8b..00000000 --- a/SPECS/ocaml-comparelib.spec +++ /dev/null @@ -1,101 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-comparelib -Version: 109.60.00 -Release: 1%{?dist} -Summary: Syntax extension that derives comparison functions from type representations. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/comparelib -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/comparelib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv >= 109.53.02 - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description - - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n comparelib-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/comparelib -%if %opt -%exclude %{_libdir}/ocaml/comparelib/*.a -%exclude %{_libdir}/ocaml/comparelib/*.cmxa -%endif -%exclude %{_libdir}/ocaml/comparelib/*.ml - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/comparelib/*.a -%{_libdir}/ocaml/comparelib/*.cmxa -%endif -%{_libdir}/ocaml/comparelib/*.ml - - -%changelog -* Tue Oct 14 2014 David Scott - 109.60.00-1 -- Update to 109.60.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.27.02-1 -- Initial package for Fedora 20 diff --git a/SPECS/ocaml-conduit.spec b/SPECS/ocaml-conduit.spec deleted file mode 100644 index d479c912..00000000 --- a/SPECS/ocaml-conduit.spec +++ /dev/null @@ -1,64 +0,0 @@ -Name: ocaml-conduit -Version: 0.5.0 -Release: 2%{?dist} -Summary: OCaml network conduit library -License: Unknown -Group: Development/Libraries -URL: https://github.com/mirage/ocaml-conduit -Source0: https://github.com/mirage/ocaml-conduit/archive/v%{version}/ocaml-conduit-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-async-devel - -%description -The conduit library takes care of establishing and listening for TCP and SSL/TLS connections for the Lwt and Async libraries. - -The reason this library exists is to provide a degree of abstraction from the precise SSL library used, since there are a variety of ways to bind to a library (e.g. the C FFI, or the Ctypes library), as well as well as which library is used (just OpenSSL for now). - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-sexplib-devel -Requires: ocaml-lwt-devel -Requires: ocaml-async-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q - - -%build -make all - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/conduit -%exclude %{_libdir}/ocaml/conduit/*.a -%exclude %{_libdir}/ocaml/conduit/*.cmxa -%exclude %{_libdir}/ocaml/conduit/*.cmx - - -%files devel -%{_libdir}/ocaml/conduit/*.a -%{_libdir}/ocaml/conduit/*.cmx -%{_libdir}/ocaml/conduit/*.cmxa - -%changelog -* Tue Oct 14 2014 David Scott - 0.5.0-2 -- Add dependency on core/async - -* Fri May 2 2014 Jon Ludlam - 0.5.0-1 -- Initial package - diff --git a/SPECS/ocaml-core-kernel.spec b/SPECS/ocaml-core-kernel.spec deleted file mode 100644 index 4c10b9fa..00000000 --- a/SPECS/ocaml-core-kernel.spec +++ /dev/null @@ -1,123 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-core-kernel -Version: 111.28.00 -Release: 1%{?dist} -Summary: System-independent part of Jane Street's Core. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/core_kernel -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core_kernel-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-bin-prot-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-pa-bench-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-pa-pipebang-devel -BuildRequires: ocaml-pa-test-devel -BuildRequires: ocaml-enumerate-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-typerep-devel -BuildRequires: ocaml-variantslib-devel -BuildRequires: chrpath - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Core is an industrial-strength alternative to the OCaml standard -library. It was developed by Jane Street, which is the largest -industrial user of OCaml. Core_kernel is the system-independent -part of Core. It is aimed for cases when the full Core is not -available, such as in Javascript. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n core_kernel-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt MLton-license.txt -%{_libdir}/ocaml/core_kernel -%if %opt -%exclude %{_libdir}/ocaml/core_kernel/*.a -%exclude %{_libdir}/ocaml/core_kernel/*.cmxa -%endif -%exclude %{_libdir}/ocaml/core_kernel/*.ml -%exclude %{_libdir}/ocaml/core_kernel/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - -%files devel -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.md MLton-license.txt -%if %opt -%{_libdir}/ocaml/core_kernel/*.a -%{_libdir}/ocaml/core_kernel/*.cmxa -%endif -%{_libdir}/ocaml/core_kernel/*.ml -%{_libdir}/ocaml/core_kernel/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-core.spec b/SPECS/ocaml-core.spec deleted file mode 100644 index 73862c2a..00000000 --- a/SPECS/ocaml-core.spec +++ /dev/null @@ -1,137 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-core -Version: 111.28.00 -Release: 1%{?dist} -Summary: System-independent part of Jane Street's Core. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/core_kernel -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/core-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-bin-prot-devel -BuildRequires: ocaml-comparelib-devel -BuildRequires: ocaml-fieldslib-devel -BuildRequires: ocaml-herelib-devel -BuildRequires: ocaml-pa-bench-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-pa-pipebang-devel -BuildRequires: ocaml-pa-test-devel -BuildRequires: ocaml-enumerate-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-typerep-devel -BuildRequires: ocaml-variantslib-devel -BuildRequires: ocaml-compiler-libs -BuildRequires: ocaml-core-kernel-devel -BuildRequires: chrpath - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Core is an industrial-strength alternative to the OCaml standard -library. It was developed by Jane Street, which is the largest -industrial user of OCaml. Core_kernel is the system-independent -part of Core. It is aimed for cases when the full Core is not -available, such as in Javascript. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-bin-prot-devel -Requires: ocaml-comparelib-devel -Requires: ocaml-fieldslib-devel -Requires: ocaml-herelib-devel -Requires: ocaml-pa-bench-devel -Requires: ocaml-pa-ounit-devel -Requires: ocaml-pa-pipebang-devel -Requires: ocaml-pa-test-devel -Requires: ocaml-enumerate-devel -Requires: ocaml-sexplib-devel -Requires: ocaml-typerep-devel -Requires: ocaml-variantslib-devel -Requires: ocaml-compiler-libs -Requires: ocaml-core-kernel-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n core-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt MLton-license.txt -%{_libdir}/ocaml/core -%if %opt -%exclude %{_libdir}/ocaml/core/*.a -%exclude %{_libdir}/ocaml/core/*.cmxa -%endif -%exclude %{_libdir}/ocaml/core/*.ml -%exclude %{_libdir}/ocaml/core/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - -%files devel -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.md MLton-license.txt -%if %opt -%{_libdir}/ocaml/core/*.a -%{_libdir}/ocaml/core/*.cmxa -%endif -%{_libdir}/ocaml/core/*.ml -%{_libdir}/ocaml/core/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-cow.spec b/SPECS/ocaml-cow.spec deleted file mode 100644 index 859c052c..00000000 --- a/SPECS/ocaml-cow.spec +++ /dev/null @@ -1,84 +0,0 @@ -Name: ocaml-cow -Version: 1.0.0 -Release: 1%{?dist} -Summary: XML, JSON, HTML, CSS, and Markdown syntax and libraries -License: ISC -URL: https://github.com/mirage/ocaml-cow -Source0: https://github.com/mirage/ocaml-cow/archive/v1.0.0/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-type-conv -BuildRequires: ocaml-ulex -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-uri-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-omd-devel -BuildRequires: ocaml-ezjsonm-devel -BuildRequires: ocaml-dyntype-devel - -%description - -Writing web-applications requires a lot of skills: HTML, CSS, XML, -JSON and Markdown, to name but a few! This library provides OCaml -syntax extensions for these web formats by: - -* extending standard OCaml syntax with embedded web DSLs. It has a - quotation mechanism which parses HTML, CSS or XML to OCaml, and - also anti-quotations that form a template mechanism. - -* using type-driven code generation to generate markup directly from - OCaml type declarations. It is possible to mix hand-written and - generated code to deal with special-cases. Most of the work is done - at pre-processing time, so there is no runtime costs and the generated - OCaml code can be manually inspected if desired. - -Mre documentation at - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-findlib -Requires: ocaml-ocamldoc -Requires: ocaml-type-conv -Requires: ocaml-ulex -Requires: ocaml-re-devel -Requires: ocaml-ounit-devel -Requires: ocaml-uri-devel -Requires: ocaml-xmlm-devel -Requires: ocaml-omd-devel -Requires: ocaml-ezjsonm-devel -Requires: ocaml-dyntype-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{version} - -%build -make - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/cow -%exclude %{_libdir}/ocaml/cow/*.a -%exclude %{_libdir}/ocaml/cow/*.cmxa -%exclude %{_libdir}/ocaml/cow/*.mli - -%files devel -%{_libdir}/ocaml/cow/*.a -%{_libdir}/ocaml/cow/*.cmxa -%{_libdir}/ocaml/cow/*.mli - -%changelog -* Thu Oct 16 2014 David Scott - 1.0.0-1 -- Initial package diff --git a/SPECS/ocaml-crc.spec b/SPECS/ocaml-crc.spec deleted file mode 100644 index 0bbfc0e4..00000000 --- a/SPECS/ocaml-crc.spec +++ /dev/null @@ -1,64 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-crc -Version: 0.9.1 -Release: 1%{?dist} -Summary: CRC implementation for OCaml -License: ISC -URL: https://github.com/xapi-project/ocaml-crc/ -Source0: https://github.com/xapi-project/ocaml-crc/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-ounit-devel -Requires: ocaml -Requires: ocaml-findlib - -%description -CRC implementation for OCaml, allowing you to compute checksums of cstructs -and strings. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml -ocaml setup.ml -build - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install - -%files -%{_libdir}/ocaml/crc/META -%{_libdir}/ocaml/crc/crc.cma -%{_libdir}/ocaml/crc/crc.cmi -%{_libdir}/ocaml/crc/dllcrc_stubs.so - -%files devel -%doc ChangeLog README.md -%{_libdir}/ocaml/crc/crc.a -%{_libdir}/ocaml/crc/crc.cmx -%{_libdir}/ocaml/crc/crc.cmxa -%{_libdir}/ocaml/crc/crc.cmxs -%{_libdir}/ocaml/crc/crc.mli -%{_libdir}/ocaml/crc/libcrc_stubs.a - -%changelog -* Sat Apr 26 2014 David Scott - 0.9.1-1 -- Update to 0.9.1 - -* Thu Dec 12 2013 John Else - 0.9.0-1 -- Initial package diff --git a/SPECS/ocaml-cstruct.spec b/SPECS/ocaml-cstruct.spec deleted file mode 100644 index b6950f75..00000000 --- a/SPECS/ocaml-cstruct.spec +++ /dev/null @@ -1,74 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-cstruct -Version: 1.4.0 -Release: 1%{?dist} -Summary: Read and write low-level C-style structures in OCaml -License: ISC -URL: https://github.com/mirage/ocaml-cstruct -Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ocplib-endian-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-sexplib-devel - -%description -Read and write low-level C-style structures in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-ocplib-endian-devel%{?_isa} -Requires: ocaml-sexplib-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install DESTDIR=%{buildroot} - -%files -%doc README.md -%doc CHANGES -%{_libdir}/ocaml/cstruct -%exclude %{_libdir}/ocaml/cstruct/*.a -%exclude %{_libdir}/ocaml/cstruct/*.cmxa -%exclude %{_libdir}/ocaml/cstruct/*.cmx -%exclude %{_libdir}/ocaml/cstruct/*.mli -%{_libdir}/ocaml/stublibs/dllcstruct_stubs.so -%{_libdir}/ocaml/stublibs/dllcstruct_stubs.so.owner - -%files devel -%{_libdir}/ocaml/cstruct/*.a -%{_libdir}/ocaml/cstruct/*.cmx -%{_libdir}/ocaml/cstruct/*.cmxa -%{_libdir}/ocaml/cstruct/*.mli - -%changelog -* Tue Oct 28 2014 David Scott - 1.4.0-1 -- Update to 1.4.0 - -* Fri May 30 2014 Euan Harris - 0.7.1-3 -- Split files correctly between base and devel packages - -* Mon Sep 23 2013 David Scott - 0.7.1-2 -- Add dependency on lwt so the cstruct.lwt package is built - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-ctypes.spec b/SPECS/ocaml-ctypes.spec deleted file mode 100644 index 02bc3465..00000000 --- a/SPECS/ocaml-ctypes.spec +++ /dev/null @@ -1,59 +0,0 @@ -Name: ocaml-ctypes -Version: 0.2.2 -Release: 1%{?dist} -Summary: Library for binding to C libraries using pure OCaml -License: MIT -URL: https://github.com/ocamllabs/ocaml-ctypes/ -Source0: https://github.com/ocamllabs/%{name}/archive/%{name}-%{version}.tar.gz -Patch0: ocaml-ctypes-0.2.1-std-gnu99.patch -BuildRequires: ocaml ocaml-findlib libffi-devel -Requires: ocaml ocaml-findlib - -%description -Library for binding to C libraries using pure OCaml - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{name}-%{version} -%patch0 -p1 - -%build -make - -%install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install - -%files -%doc README.md LICENSE CHANGES -%{_libdir}/ocaml/ctypes -%exclude %{_libdir}/ocaml/ctypes/*.a -%exclude %{_libdir}/ocaml/ctypes/*.cmxa -%exclude %{_libdir}/ocaml/ctypes/*.cmx -%exclude %{_libdir}/ocaml/ctypes/*.mli - -%files devel -%{_libdir}/ocaml/ctypes/*.a -%{_libdir}/ocaml/ctypes/*.cmx -%{_libdir}/ocaml/ctypes/*.cmxa -%{_libdir}/ocaml/ctypes/*.mli - -%changelog -* Thu Apr 24 2014 David Scott -- Fix the split between devel and main package, hopefully - -* Wed Nov 13 2013 Mike McClurg -- Initial package - diff --git a/SPECS/ocaml-custom-printf.spec b/SPECS/ocaml-custom-printf.spec deleted file mode 100644 index 2b237555..00000000 --- a/SPECS/ocaml-custom-printf.spec +++ /dev/null @@ -1,104 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-custom-printf -Version: 111.25.00 -Release: 1%{?dist} -Summary: Syntax extension for printf format strings - -Group: Development/Libraries -License: ASL 2.0 -URL: https://github.com/janestreet/custom_printf -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/custom_printf-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv >= 109.53.02 -BuildRequires: ocaml-sexplib-devel >= 109.55.02 -BuildRequires: ocaml-pa-ounit-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Syntax extension for printf format strings. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n custom_printf-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/custom_printf -%if %opt -%exclude %{_libdir}/ocaml/custom_printf/*.a -%exclude %{_libdir}/ocaml/custom_printf/*.cmxa -%endif -%exclude %{_libdir}/ocaml/custom_printf/*.ml -%exclude %{_libdir}/ocaml/custom_printf/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/custom_printf/*.a -%{_libdir}/ocaml/custom_printf/*.cmxa -%endif -%{_libdir}/ocaml/custom_printf/*.ml -%{_libdir}/ocaml/custom_printf/*.mli - - -%changelog -* Tue Oct 14 2014 David Scott - 111.25.00-1 -- Update to 111.25.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.27.02-1 -- Initial package for Fedora 20 diff --git a/SPECS/ocaml-dyntype.spec b/SPECS/ocaml-dyntype.spec deleted file mode 100644 index ba306022..00000000 --- a/SPECS/ocaml-dyntype.spec +++ /dev/null @@ -1,47 +0,0 @@ -Name: ocaml-dyntype -Version: 0.9.0 -Release: 1%{?dist} -Summary: syntax extension which makes OCaml types and values easier to manipulate programmatically -License: ISC -URL: https://github.com/mirage/dyntype/ -Source0: https://github.com/mirage/dyntype/archive/dyntype-0.9.0.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-type-conv -BuildRequires: ocaml-camlp4-devel - -%description -syntax extension which makes OCaml types and values easier to manipulate programmatically - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n dyntype-dyntype-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/dyntype -%exclude %{_libdir}/ocaml/dyntype/*.a -%exclude %{_libdir}/ocaml/dyntype/*.cmxa - -%files devel -%{_libdir}/ocaml/dyntype/*.a -%{_libdir}/ocaml/dyntype/*.cmxa - -%changelog -* Thu Oct 16 2014 David Scott - 0.9.0-1 -- Initial package diff --git a/SPECS/ocaml-easy-format.spec b/SPECS/ocaml-easy-format.spec deleted file mode 100644 index 544493fe..00000000 --- a/SPECS/ocaml-easy-format.spec +++ /dev/null @@ -1,54 +0,0 @@ -Name: ocaml-easy-format -Version: 1.0.1 -Release: 3%{?dist} -Summary: Indentation made easy -License: BSD3 -URL: http://mjambon.com/easy-format.html -Source0: https://github.com/mjambon/easy-format/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -Obsoletes: easy-format <= 1.0.1 - -%description -Easy_format: indentation made easy. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n easy-format-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc LICENSE -%doc README -%{_libdir}/ocaml/easy-format -%exclude %{_libdir}/ocaml/easy-format/*.cmx -%exclude %{_libdir}/ocaml/easy-format/*.mli - -%files devel -%{_libdir}/ocaml/easy-format/*.cmx -%{_libdir}/ocaml/easy-format/*.mli - -%changelog -* Tue Oct 21 2014 Euan Harris - 1.0.1-3 -- Switch to GitHub sources - -* Fri May 30 2014 Euan Harris - 1.0.1-2 -- Split files correctly between base and devel packages - -* Fri May 31 2013 David Scott - 1.0.1-1 -- Initial package - diff --git a/SPECS/ocaml-enumerate.spec b/SPECS/ocaml-enumerate.spec deleted file mode 100644 index 15b3e4e1..00000000 --- a/SPECS/ocaml-enumerate.spec +++ /dev/null @@ -1,68 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-enumerate -Version: 111.08.00 -Release: 1%{?dist} -Summary: Quotation expanders for enumerating finite types. - -Group: Development/Libraries -License: Apache-2.0 -URL: https://ocaml.janestreet.com/ -Source0: https://github.com/janestreet/enumerate/archive/%{version}/%{name}-%{version}.tar.gz - -BuildRequires: ocaml >= 4.00.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv - -%description -Quotation expanders for enumerating finite types. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camlp4-devel%{?_isa} -Requires: ocaml-type-conv%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n enumerate-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} -# --destdir %{buildroot} -make - -%install -export DESTDIR=%{buildroot} -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc README.md -%doc LICENSE.txt -%doc THIRD-PARTY.txt -%doc INRIA-DISCLAIMER.txt -%doc INSTALL.txt -%{_libdir}/ocaml/enumerate -%exclude %{_libdir}/ocaml/enumerate/*.a -%exclude %{_libdir}/ocaml/enumerate/*.cmxa -%exclude %{_libdir}/ocaml/enumerate/*.cmx -%exclude %{_libdir}/ocaml/enumerate/*.mli - -%files devel -%{_libdir}/ocaml/enumerate/*.a -%{_libdir}/ocaml/enumerate/*.cmxa -%{_libdir}/ocaml/enumerate/*.cmx -%{_libdir}/ocaml/enumerate/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.08.00-1 -- Initial package - diff --git a/SPECS/ocaml-evtchn.spec b/SPECS/ocaml-evtchn.spec deleted file mode 100644 index b5c470cd..00000000 --- a/SPECS/ocaml-evtchn.spec +++ /dev/null @@ -1,73 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-evtchn -Version: 1.0.5 -Release: 3%{?dist} -Summary: OCaml bindings for userspace Xen event channel controls -License: ISC -URL: https://github.com/mirage/ocaml-evtchn/ -Source0: https://github.com/mirage/ocaml-evtchn/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: xen-devel - -%description -These APIs allow programs running in userspace to signal other domains -on the same host. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel%{?_isa} -Requires: xen-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/xen-evtchn -%exclude %{_libdir}/ocaml/xen-evtchn/*.a -%exclude %{_libdir}/ocaml/xen-evtchn/*.cmxa -%exclude %{_libdir}/ocaml/xen-evtchn/*.cmx -%exclude %{_libdir}/ocaml/xen-evtchn/*.ml -%exclude %{_libdir}/ocaml/xen-evtchn/*.mli - -%files devel -%{_libdir}/ocaml/xen-evtchn/*.a -%{_libdir}/ocaml/xen-evtchn/*.cmx -%{_libdir}/ocaml/xen-evtchn/*.cmxa -%{_libdir}/ocaml/xen-evtchn/*.mli - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 1.0.5-3 -- Remove dependency on xen-missing-headers - -* Tue Aug 19 2014 David Scott - 1.0.5-2 -- Add dependency on xen-missing-headers - -* Wed Jul 16 2014 David Scott - 1.0.5-1 -- Update to 1.0.5 - -* Fri May 23 2014 David Scott - 1.0.1-1 -- Initial package diff --git a/SPECS/ocaml-ezjsonm.spec b/SPECS/ocaml-ezjsonm.spec deleted file mode 100644 index 5c6f36de..00000000 --- a/SPECS/ocaml-ezjsonm.spec +++ /dev/null @@ -1,57 +0,0 @@ -Name: ocaml-ezjsonm -Version: 0.2.0 -Release: 1%{?dist} -Summary: An easy interface on top of the Jsonm library -License: ISC -URL: https://github.com/samoht/ezjsonm -Source0: https://github.com/samoht/ezjsonm/archive/0.2.0/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-jsonm-devel - -%description -This version provides more convenient (but far less flexible) -input and output functions that go to and from [string] values. -This avoids the need to write signal code, which is useful for -quick scripts that manipulate JSON. - -More advanced users should go straight to the Jsonm library and -use it directly, rather than be saddled with the Ezjsonm interface. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-jsonm-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n ezjsonm-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/ezjsonm -%exclude %{_libdir}/ocaml/ezjsonm/*.a -%exclude %{_libdir}/ocaml/ezjsonm/*.cmxa -%exclude %{_libdir}/ocaml/ezjsonm/*.cmx -%exclude %{_libdir}/ocaml/ezjsonm/*.mli - -%files devel -%{_libdir}/ocaml/ezjsonm/*.a -%{_libdir}/ocaml/ezjsonm/*.cmxa -%{_libdir}/ocaml/ezjsonm/*.cmx -%{_libdir}/ocaml/ezjsonm/*.mli - -%changelog -* Thu Oct 16 2014 David Scott - 0.2.0-1 -- Initial package diff --git a/SPECS/ocaml-fd-send-recv.spec b/SPECS/ocaml-fd-send-recv.spec deleted file mode 100644 index e5e3a6ff..00000000 --- a/SPECS/ocaml-fd-send-recv.spec +++ /dev/null @@ -1,61 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-fd-send-recv -Version: 1.0.1 -Release: 2%{?dist} -Summary: Bindings to sendmsg/recvmsg for fd passing under Linux -License: LGPL -URL: https://github.com/xapi-project/ocaml-fd-send-recv -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib - -%description -Bindings to sendmsg/recvmsg for fd passing under Linux. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{name}-%{version} - -%build -ocaml setup.ml -configure -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install - -%files -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/fd-send-recv -%exclude %{_libdir}/ocaml/fd-send-recv/*.a -%exclude %{_libdir}/ocaml/fd-send-recv/*.cmxa -%exclude %{_libdir}/ocaml/fd-send-recv/*.cmx -%exclude %{_libdir}/ocaml/fd-send-recv/*.mli -%{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so -%{_libdir}/ocaml/stublibs/dllfd_send_recv_stubs.so.owner - -%files devel -%{_libdir}/ocaml/fd-send-recv/*.a -%{_libdir}/ocaml/fd-send-recv/*.cmx -%{_libdir}/ocaml/fd-send-recv/*.cmxa -%{_libdir}/ocaml/fd-send-recv/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 1.0.1-2 -- Split files correctly between base and devel packages - -* Fri May 31 2013 David Scott - 1.0.1-1 -- Initial package - diff --git a/SPECS/ocaml-fieldslib.spec b/SPECS/ocaml-fieldslib.spec deleted file mode 100644 index 8dd1e35d..00000000 --- a/SPECS/ocaml-fieldslib.spec +++ /dev/null @@ -1,67 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-fieldslib -Version: 109.20.00 -Release: 1%{?dist} -Summary: OCaml record fields as first class values - -Group: Development/Libraries -License: LGPLv2+ with exceptions and BSD -URL: https://ocaml.janestreet.com -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/fieldslib-%{version}.tar.gz - -BuildRequires: ocaml >= 4.00.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv - -%description -OCaml record fields as first class values - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camlp4-devel%{?_isa} -Requires: ocaml-type-conv%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n fieldslib-%{version} - -%build -make - -%install -export DESTDIR=%{buildroot} -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc README.txt -%doc LICENSE.txt -%doc COPYRIGHT.txt -%doc THIRD-PARTY.txt -%doc INRIA-DISCLAIMER.txt -%doc INSTALL.txt -%{_libdir}/ocaml/fieldslib -%exclude %{_libdir}/ocaml/fieldslib/*.a -%exclude %{_libdir}/ocaml/fieldslib/*.cmxa -%exclude %{_libdir}/ocaml/fieldslib/*.cmx -%exclude %{_libdir}/ocaml/fieldslib/*.mli - -%files devel -%{_libdir}/ocaml/fieldslib/*.a -%{_libdir}/ocaml/fieldslib/*.cmxa -%{_libdir}/ocaml/fieldslib/*.cmx -%{_libdir}/ocaml/fieldslib/*.mli - -%changelog -* Tue May 6 2014 Jon Ludlam - 109.20.00-1 -- Initial package - diff --git a/SPECS/ocaml-fileutils.spec b/SPECS/ocaml-fileutils.spec deleted file mode 100644 index 412e76ee..00000000 --- a/SPECS/ocaml-fileutils.spec +++ /dev/null @@ -1,186 +0,0 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global debug_package %{nil} - -Name: ocaml-fileutils -Version: 0.4.4 -Release: 6%{?dist} -Summary: OCaml library for common file and filename operations - -License: LGPLv2 with exceptions -URL: https://forge.ocamlcore.org/projects/ocaml-fileutils/ -Source0: https://forge.ocamlcore.org/frs/download.php/892/ocaml-fileutils-0.4.4.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel >= 1.3.3-3 -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -%if 0%{?fedora} || 0%{?rhel} <= 6 -BuildRequires: ocaml-ounit-devel -%endif - - -%description -This library is intended to provide a basic interface to the most -common file and filename operations. It provides several different -filename functions: reduce, make_absolute, make_relative... It also -enables you to manipulate real files: cp, mv, rm, touch... - -It is separated into two modules: SysUtil and SysPath. The first one -manipulates real files, the second one is made for manipulating -abstract filenames. - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q - -# Disable the tests (RHEL 7 only) since they require ocaml-ounit. -%if 0%{?rhel} >= 7 -rm test/test.ml -touch test/test.ml -mv setup.ml setup.ml.old -sed '/oUnit/d' < setup.ml.old > setup.ml -%endif - - -%build -ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT -make - - -%install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs - -# Set htmldir to current directory, then copy the docs (in api/) -# as a %doc rule. -make htmldir=. install - - -%check -make test - - -%files -%doc COPYING.txt -%{_libdir}/ocaml/fileutils -%if %opt -%exclude %{_libdir}/ocaml/fileutils/*.a -%exclude %{_libdir}/ocaml/fileutils/*.cmx -%exclude %{_libdir}/ocaml/fileutils/*.cmxa -%endif -%exclude %{_libdir}/ocaml/fileutils/*.ml -%exclude %{_libdir}/ocaml/fileutils/*.mli - - -%files devel -%doc COPYING.txt AUTHORS.txt CHANGELOG.txt README.txt TODO.txt -%if %opt -%{_libdir}/ocaml/fileutils/*.a -%{_libdir}/ocaml/fileutils/*.cmx -%{_libdir}/ocaml/fileutils/*.cmxa -%endif -%{_libdir}/ocaml/fileutils/*.ml -%{_libdir}/ocaml/fileutils/*.mli - - -%changelog -* Sat Aug 03 2013 Fedora Release Engineering - 0.4.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 0.4.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Nov 27 2012 Richard W.M. Jones - 0.4.4-4 -- BR >= OCaml 4.00.1 so we can't be built against the wrong OCaml. - -* Tue Nov 27 2012 Richard W.M. Jones - 0.4.4-3 -- Disable the tests on RHEL 7, since they require ocaml-ounit. - -* Fri Oct 19 2012 Richard W.M. Jones - 0.4.4-2 -- New upstream version 0.4.4. -- Clean up the spec file. -- Fix homepage and download URLs. -- Don't use configure macro. Upstream are using some sort of non-autoconf - brokenness. -- Rename text files as *.txt. There is no 'api' directory any more. - -* Sat Jul 28 2012 Richard W.M. Jones - 0.4.0-10 -- Bump and rebuild against new OCaml 4.00.0 official release. - -* Fri Jul 20 2012 Fedora Release Engineering - 0.4.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 09 2012 Richard W.M. Jones - 0.4.0-8 -- Rebuild for OCaml 4.00.0. - -* Mon May 14 2012 Richard W.M. Jones - 0.4.0-7 -- Bump release and rebuild for new OCaml on ARM. - -* Fri Jan 06 2012 Richard W.M. Jones - 0.4.0-6 -- Rebuild for OCaml 3.12.1. - -* Tue Feb 08 2011 Fedora Release Engineering - 0.4.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 05 2011 Richard W.M. Jones - 0.4.0-4 -- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). - -* Wed Dec 30 2009 Richard W.M. Jones - 0.4.0-3 -- Rebuild for OCaml 3.11.2. - -* Thu Oct 8 2009 Richard W.M. Jones - 0.4.0-2 -- New upstream version 0.4.0. -- Upstream build system has been rationalized, so remove all the - hacks we were using. -- Upstream now contains tests, run them. -- Needs ounit in order to carry out the tests. - -* Sat Jul 25 2009 Fedora Release Engineering - 0.3.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sat May 23 2009 Richard W.M. Jones - 0.3.0-10 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Wed Feb 25 2009 Fedora Release Engineering - 0.3.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Nov 26 2008 Richard W.M. Jones - 0.3.0-8 -- Rebuild for OCaml 3.11.0+rc1. - -* Wed Nov 19 2008 Richard W.M. Jones - 0.3.0-7 -- Rebuild for OCaml 3.11.0 - -* Wed Apr 23 2008 Richard W.M. Jones - 0.3.0-5 -- Rebuild for OCaml 3.10.2 - -* Sat Mar 1 2008 Richard W.M. Jones - 0.3.0-4 -- Rebuild for ppc64. - -* Thu Feb 21 2008 Richard W.M. Jones - 0.3.0-3 -- Fixed grammar in the description section. -- License is LGPLv2 with exceptions -- Include license file with both RPMs. -- Include other documentation only in the -devel RPM. - -* Tue Feb 12 2008 Richard W.M. Jones - 0.3.0-2 -- Added BR ocaml-camlp4-devel. -- Build into tmp directory under the build root. - -* Wed Aug 8 2007 Richard W.M. Jones - 0.3.0-1 -- Initial RPM release. diff --git a/SPECS/ocaml-gnt.spec b/SPECS/ocaml-gnt.spec deleted file mode 100644 index 2dbbfe6d..00000000 --- a/SPECS/ocaml-gnt.spec +++ /dev/null @@ -1,71 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-gnt -Version: 1.0.0 -Release: 2%{?dist} -Summary: OCaml bindings for userspace Xen grant table controls -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/ocaml-gnt/ -Source0: https://github.com/xapi-project/ocaml-gnt/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: xen-devel -Requires: ocaml -Requires: ocaml-findlib - -%description -These APIs allow programs running in userspace to share memory with other -domains on the same host. This can be used to (for example) implement disk -or network backends. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel -Requires: xen-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install - -%files -%doc LICENSE -%doc ChangeLog README.md -%{_libdir}/ocaml/xen-gnt -%exclude %{_libdir}/ocaml/xen-gnt/*.a -%exclude %{_libdir}/ocaml/xen-gnt/*.cmxa -%exclude %{_libdir}/ocaml/xen-gnt/*.cmx -%exclude %{_libdir}/ocaml/xen-gnt/*.ml -%exclude %{_libdir}/ocaml/xen-gnt/*.mli - -%files devel -%{_libdir}/ocaml/xen-gnt/*.a -%{_libdir}/ocaml/xen-gnt/*.cmx -%{_libdir}/ocaml/xen-gnt/*.cmxa -%{_libdir}/ocaml/xen-gnt/*.mli - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 1.0.0-2 -- Remove dependency on xen-missing-headers - -* Sat Apr 26 2014 David Scott - 1.0.0-1 -- Initial package diff --git a/SPECS/ocaml-herelib.spec b/SPECS/ocaml-herelib.spec deleted file mode 100644 index 61b383d1..00000000 --- a/SPECS/ocaml-herelib.spec +++ /dev/null @@ -1,100 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-herelib -Version: 109.35.02 -Release: 1%{?dist} -Summary: Syntax extension for inserting the current location. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/herelib -Source0: https://ocaml.janestreet.com/ocaml-core/109.35.00/individual/herelib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Syntax extension for inserting the current location. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n herelib-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/herelib -%if %opt -%exclude %{_libdir}/ocaml/herelib/*.a -%exclude %{_libdir}/ocaml/herelib/*.cmxa -%endif -%exclude %{_libdir}/ocaml/herelib/*.ml -%exclude %{_libdir}/ocaml/herelib/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/herelib/*.a -%{_libdir}/ocaml/herelib/*.cmxa -%endif -%{_libdir}/ocaml/herelib/*.ml -%{_libdir}/ocaml/herelib/*.mli - - -%changelog -* Wed Jan 01 2014 Edvard Fagerholm - 109.35.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-inotify.spec b/SPECS/ocaml-inotify.spec deleted file mode 100644 index 3d3d4da8..00000000 --- a/SPECS/ocaml-inotify.spec +++ /dev/null @@ -1,106 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-inotify -Version: 2.0 -Release: 1%{?dist} -Summary: Inotify bindings for OCaml. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/whitequark/ocaml-inotify -Source0: https://github.com/whitequark/ocaml-inotify/archive/%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel -BuildRequires: chrpath - - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Inotify bindings for OCaml. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n %{name}-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt -%doc README.md -%{_libdir}/ocaml/inotify -%if %opt -%exclude %{_libdir}/ocaml/inotify/*.a -%exclude %{_libdir}/ocaml/inotify/*.cmxa -%endif -%exclude %{_libdir}/ocaml/inotify/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt -%doc README.md -%if %opt -%{_libdir}/ocaml/inotify/*.a -%{_libdir}/ocaml/inotify/*.cmxa -%endif -%{_libdir}/ocaml/inotify/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 2.0-1 -- Update to 2.0 - -* Wed Jan 01 2014 Edvard Fagerholm - 1.3-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-io-page.spec b/SPECS/ocaml-io-page.spec deleted file mode 100644 index aaf74906..00000000 --- a/SPECS/ocaml-io-page.spec +++ /dev/null @@ -1,63 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-io-page -Version: 1.1.1 -Release: 2%{?dist} -Summary: Efficient handling of I/O memory pages on Unix and Xen. -License: ISC -URL: https://github.com/mirage/io-page -Source0: https://github.com/mirage/io-page/archive/v%{version}/io-page-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ounit-devel - -%description -This library implements support for efficient handling of I/O memory pages on Unix and Xen. - -IO pages are page-aligned, and wrapped in the Cstruct library to avoid copying the data contained within the page. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n io-page-%{version} - -%build -./configure --destdir %{buildroot}%{_libdir}/ocaml -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/io-page -%exclude %{_libdir}/ocaml/io-page/*.a -%exclude %{_libdir}/ocaml/io-page/*.cmxa -%exclude %{_libdir}/ocaml/io-page/*.cmx -%exclude %{_libdir}/ocaml/io-page/*.mli - -%files devel -%{_libdir}/ocaml/io-page/*.a -%{_libdir}/ocaml/io-page/*.cmx -%{_libdir}/ocaml/io-page/*.cmxa -%{_libdir}/ocaml/io-page/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 1.1.1-2 -- Split files corrrectly between base and devel packages - -* Tue Apr 1 2014 Euan Harris - 1.1.1-1 -- Initial package - diff --git a/SPECS/ocaml-ipaddr.spec b/SPECS/ocaml-ipaddr.spec deleted file mode 100644 index 5de6069b..00000000 --- a/SPECS/ocaml-ipaddr.spec +++ /dev/null @@ -1,59 +0,0 @@ -Name: ocaml-ipaddr -Version: 2.5.0 -Release: 1000%{?dist} -Summary: Pure OCaml parsers and printers for IP addresses -License: ISC -URL: https://github.com/mirage/ocaml-ipaddr -Source0: https://github.com/mirage/ocaml-ipaddr/archive/%{version}/ocaml-ipaddr-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-camlp4 - -%description -A library for manipulation of IP (and MAC) address representations - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-sexplib-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/ipaddr -%exclude %{_libdir}/ocaml/ipaddr/*.a -%exclude %{_libdir}/ocaml/ipaddr/*.cmxa -%exclude %{_libdir}/ocaml/ipaddr/*.cmx -%exclude %{_libdir}/ocaml/ipaddr/*.ml -%exclude %{_libdir}/ocaml/ipaddr/*.mli - -%files devel -%{_libdir}/ocaml/ipaddr/*.a -%{_libdir}/ocaml/ipaddr/*.cmx -%{_libdir}/ocaml/ipaddr/*.cmxa -%{_libdir}/ocaml/ipaddr/*.mli - -%changelog -* Sat Jul 19 2014 David Scott - 2.5.0-1000 -- Update to 2.5.0; override upstream package - -* Tue Apr 1 2014 Euan Harris - 2.4.0-1 -- Initial package - diff --git a/SPECS/ocaml-jsonm.spec b/SPECS/ocaml-jsonm.spec deleted file mode 100644 index b02fa62b..00000000 --- a/SPECS/ocaml-jsonm.spec +++ /dev/null @@ -1,79 +0,0 @@ -Name: ocaml-jsonm -Version: 0.9.1 -Release: 1%{?dist} -Summary: Non-blocking streaming JSON codec for OCaml -License: BSD3 -URL: http://erratique.ch/software/jsonm -Source0: https://github.com/dbuenzli/jsonm/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: ocaml-jsonm-setup.ml.patch -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-uutf-devel - -%description -Jsonm is a non-blocking streaming codec to decode and encode the JSON -data format. It can process JSON text without blocking on IO and -without a complete in-memory representation of the data. - -The alternative "uncut" codec also processes whitespace and -(non-standard) JSON with JavaScript comments. - -Jsonm is made of a single module and depends on [Uutf][1]. It is -distributed under the BSD3 license. - -[1]: http://erratique.ch/software/uutf - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-uutf-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n jsonm-%{version} -%patch0 -p1 - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p %{buildroot}/%{_bindir} -ocaml setup.ml -install - -%files -%doc CHANGES -%doc README -%{_libdir}/ocaml/jsonm -%exclude %{_libdir}/ocaml/jsonm/*.a -%exclude %{_libdir}/ocaml/jsonm/*.cmxa -%exclude %{_libdir}/ocaml/jsonm/*.cmx -%exclude %{_libdir}/ocaml/jsonm/*.mli -%{_bindir}/jsontrip -%{_bindir}/ocamltweets - -%files devel -%{_libdir}/ocaml/jsonm/*.a -%{_libdir}/ocaml/jsonm/*.cmxa -%{_libdir}/ocaml/jsonm/*.cmx -%{_libdir}/ocaml/jsonm/*.mli - -%changelog -* Thu Oct 16 2014 David Scott - 0.9.1-1 -- Initial package diff --git a/SPECS/ocaml-lambda-term.spec b/SPECS/ocaml-lambda-term.spec deleted file mode 100644 index 310de73e..00000000 --- a/SPECS/ocaml-lambda-term.spec +++ /dev/null @@ -1,80 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-lambda-term -Version: 1.6 -Release: 1%{?dist} -Summary: Lambda-Term is a cross-platform library for manipulating the terminal for Ocaml -License: BSD3 -URL: http://forge.ocamlcore.org/projects/lambda-term/ -Source0: https://github.com/diml/lambda-term/archive/%{version}/lambda-term-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-camomile-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-react-devel -BuildRequires: ocaml-zed-devel - -%description -Lambda-Term is a cross-platform library for manipulating the terminal. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-zed-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n lambda-term-%{version} - -%build -./configure --destdir %{buildroot}/%{_libdir}/ocaml -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install - -rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/lambda-term-actions - -%files -%doc CHANGES.md -%doc LICENSE -%{_libdir}/ocaml/lambda-term -%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so -%{_libdir}/ocaml/stublibs/dlllambda-term_stubs.so.owner -%exclude %{_libdir}/ocaml/lambda-term/*.a -%exclude %{_libdir}/ocaml/lambda-term/*.cmxa -%exclude %{_libdir}/ocaml/lambda-term/*.cmx -%exclude %{_libdir}/ocaml/lambda-term/*.mli - -%files devel -%{_libdir}/ocaml/lambda-term/*.a -%{_libdir}/ocaml/lambda-term/*.cmx -%{_libdir}/ocaml/lambda-term/*.cmxa -%{_libdir}/ocaml/lambda-term/*.mli - -%files devel -%{_libdir}/ocaml/lambda-term/*.a -%{_libdir}/ocaml/lambda-term/*.cmx -%{_libdir}/ocaml/lambda-term/*.cmxa -%{_libdir}/ocaml/lambda-term/*.mli - -%changelog -* Sat Jun 7 2014 David Scott - 1.6-1 -- Update to 1.6 - -* Fri May 30 2014 Euan Harris - 1.2-2 -- Split files correctly between base and devel packages - -* Thu Jun 6 2013 David Scott - 1.2-1 -- Initial package - diff --git a/SPECS/ocaml-libvirt.spec b/SPECS/ocaml-libvirt.spec deleted file mode 100644 index 45a5a593..00000000 --- a/SPECS/ocaml-libvirt.spec +++ /dev/null @@ -1,296 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -# Select what subpackages to build. -%define build_mlvirsh 0 - -Name: ocaml-libvirt -Version: 0.6.1.2 -Release: 100%{?dist}%{?extra_release} -Summary: OCaml binding for libvirt - -License: LGPLv2+ -URL: http://libvirt.org/ocaml/ -Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz -Patch0: ocaml-libvirt-1-252568550f9bf28b07f4e6d116485205e58afe4a -Patch1: ocaml-libvirt-2-c6c9c3fff5993056e0af7219f4fe67ab8db3cdf2 -Patch2: ocaml-libvirt-3-34a472800ba1908e910318cc5d5ed9588174c1cf -Patch3: ocaml-libvirt-4-9d178cbfeb709d2d2fbddb9fcab88e9204c8f995 -Patch4: ocaml-libvirt-5-2360cd228542c6a523f10daacbd631a753d17208 -Patch5: ocaml-libvirt-6-7568d6f77d72a77c527cc282511f7a3f37dc7040 -Patch6: ocaml-libvirt-7-71f683ad53e11c1f0cbc5c250d29647ad5ea0bf3 -Patch7: ocaml-libvirt-8-d7e0e6112db9411b0d7aaa8cbf5ce85c27e7d52d -Patch8: ocaml-libvirt-9-0ec198e7784de1a49672183c961a2498b6c85b90 -Patch9: ocaml-libvirt-10-0d103e429ddc7942e537a047c8a46ca7ddc58e46 -Patch10: ocaml-libvirt-11-658970236caa31bbef44562c521d55b9a4689f4d -Patch11: ocaml-libvirt-12-31ce6b280a2d987abc484b8f8d1e6cb25a70d737 -Patch12: ocaml-libvirt-13-fixbuild - -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel - -BuildRequires: libvirt-devel >= 0.2.1 -BuildRequires: perl -BuildRequires: gawk - -%description -OCaml binding for libvirt. - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%if %build_mlvirsh -%package -n mlvirsh -Summary: OCaml virsh utility -License: GPLv2+ - - -%description -n mlvirsh -OCaml virtualization shell. -%endif - - -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 - -%build -CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix} -make all doc -%if %opt -make opt -strip libvirt/dllmllibvirt.so -%endif - - -%install -# These rules work if the library uses 'ocamlfind install' to install itself. -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -mkdir -p $RPM_BUILD_ROOT%{_bindir} -%if %opt -make install-opt -%else -make install-byte -%endif - -%if !%build_mlvirsh -rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh -%endif - - - - -%files -%doc COPYING.LIB README ChangeLog -%{_libdir}/ocaml/libvirt -%if %opt -%exclude %{_libdir}/ocaml/libvirt/*.a -%exclude %{_libdir}/ocaml/libvirt/*.cmxa -%exclude %{_libdir}/ocaml/libvirt/*.cmx -%endif -%exclude %{_libdir}/ocaml/libvirt/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - - -%files devel -%doc COPYING.LIB README TODO.libvirt ChangeLog html/* -%if %opt -%{_libdir}/ocaml/libvirt/*.a -%{_libdir}/ocaml/libvirt/*.cmxa -%{_libdir}/ocaml/libvirt/*.cmx -%endif -%{_libdir}/ocaml/libvirt/*.mli - - -%if %build_mlvirsh -%files -n mlvirsh -%doc COPYING README ChangeLog -%{_bindir}/mlvirsh -%endif - - -%changelog -* Tue May 13 2014 David Scott - 0.6.1.2-100 -- Bump release number to 100 to override upstream. Next release will - have our patches applied. - -* Fri Mar 23 2012 Richard W.M. Jones - 0.6.1.2-1 -- New upstream version 0.6.1.2. - -* Tue Mar 6 2012 Richard W.M. Jones - 0.6.1.1-1 -- New upstream version 0.6.1.1. -- Remove mlvirsh subpackage, no longer upstream. -- Replace custom configure with RPM macro configure. -- Use RPM global instead of define. -- Use built-in RPM OCaml dependency generator. - -* Fri Jan 06 2012 Richard W.M. Jones - 0.6.1.0-10 -- Rebuild for OCaml 3.12.1. - -* Tue Feb 08 2011 Fedora Release Engineering - 0.6.1.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 05 2011 Richard W.M. Jones - 0.6.1.0-8 -- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). - -* Wed Dec 30 2009 Richard W.M. Jones - 0.6.1.0-7 -- Rebuild for OCaml 3.11.2. - -* Sat Jul 25 2009 Fedora Release Engineering - 0.6.1.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 15 2009 Richard W.M. Jones - 0.6.1.0-5 -- Force rebuild to test FTBFS issue. - -* Fri Jun 12 2009 Richard W.M. Jones - 0.6.1.0-3 -- Force rebuild to test FTBFS issue. - -* Sat May 23 2009 Richard W.M. Jones - 0.6.1.0-2 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Tue Mar 10 2009 Richard W.M. Jones - 0.6.1.0-1 -- New upstream release 0.6.1.0. - -* Wed Feb 25 2009 Fedora Release Engineering - 0.4.4.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Nov 26 2008 Richard W.M. Jones - 0.4.4.2-3 -- Rebuild for OCaml 3.11.0+rc1. - -* Wed Nov 19 2008 Richard W.M. Jones - 0.4.4.2-2 -- Rebuild for OCaml 3.11.0 - -* Wed Jul 9 2008 Richard W.M. Jones - 0.4.4.2-1 -- New upstream version. -- In upstream, 'make install' became 'make install-byte' or 'make install-opt' - -* Tue Jun 10 2008 Richard W.M. Jones - 0.4.2.4-1 -- New upstream version. - -* Thu Jun 5 2008 Richard W.M. Jones - 0.4.2.3-1 -- New upstream version. - -* Thu Jun 5 2008 Richard W.M. Jones - 0.4.2.2-1 -- New upstream version. -- Removed virt-ctrl, virt-df, virt-top subpackages, since these are - now separate Fedora packages. - -* Tue May 20 2008 Richard W.M. Jones - 0.4.1.1-4 -- Disable virt-top (bz 442871). -- Disable virt-ctrl (bz 442875). - -* Mon May 19 2008 Richard W.M. Jones - 0.4.1.1-3 -- Disable virt-df (bz 442873). - -* Wed Apr 23 2008 Richard W.M. Jones - 0.4.1.1-2 -- Rebuild for OCaml 3.10.2 - -* Tue Mar 19 2008 Richard W.M. Jones - 0.4.1.1-1 -- New upstream release 0.4.1.1. -- Move configure to build section. -- Pass RPM_OPT_FLAGS. - -* Tue Mar 4 2008 Richard W.M. Jones - 0.4.1.0-2 -- Fix source URL. -- Install virt-df manpage. - -* Tue Mar 4 2008 Richard W.M. Jones - 0.4.1.0-1 -- New upstream release 0.4.1.0. -- Upstream now requires ocaml-dbus >= 0.06, ocaml-lablgtk >= 2.10.0, - ocaml-dbus-devel. -- Enable virt-df. - -* Sat Mar 1 2008 Richard W.M. Jones - 0.4.0.3-3 -- Rebuild for ppc64. - -* Wed Feb 13 2008 Richard W.M. Jones - 0.4.0.3-2 -- Add BR gtk2-devel - -* Tue Feb 12 2008 Richard W.M. Jones - 0.4.0.3-1 -- New upstream version 0.4.0.3. -- Rebuild for OCaml 3.10.1. - -* Tue Nov 20 2007 Richard W.M. Jones - 0.3.3.4-1 -- New upstream release 0.3.3.4. -- Upstream website is now http://libvirt.org/ocaml/ - -* Fri Oct 19 2007 Richard W.M. Jones - 0.3.3.0-2 -- Mistake: BR is ocaml-calendar-devel. - -* Fri Oct 19 2007 Richard W.M. Jones - 0.3.3.0-1 -- New upstream release 0.3.3.0. -- Added support for virt-df, but disabled it by default. -- +BR ocaml-calendar. - -* Mon Sep 24 2007 Richard W.M. Jones - 0.3.2.8-1 -- New upstream release 0.3.2.8. - -* Thu Sep 20 2007 Richard W.M. Jones - 0.3.2.7-1 -- New upstream release 0.3.2.7. -- Ship the upstream ChangeLog file. - -* Thu Sep 6 2007 Richard W.M. Jones - 0.3.2.6-2 -- Force dependency on ocaml >= 3.10.0-7 which has fixed requires/provides - scripts. - -* Thu Sep 6 2007 Richard W.M. Jones - 0.3.2.6-1 -- New upstream version 0.3.2.6. - -* Wed Aug 29 2007 Richard W.M. Jones - 0.3.2.5-1 -- New upstream version 0.3.2.5. -- Keep TODO out of the main package, but add (renamed) TODO.libvirt and - TODO.virt-top to the devel and virt-top packages respectively. -- Add BR gawk. - -* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.4-1 -- New upstream version 0.3.2.4. - -* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.3-2 -- build_* macros so we can choose what subpackages to build. - -* Thu Aug 23 2007 Richard W.M. Jones - 0.3.2.3-1 -- Upstream version 0.3.2.3. -- Add missing BR libvirt-devel. - -* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.2-1 -- Upstream version 0.3.2.2. - -* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.1-2 -- Fix unclosed if-statement in spec file. - -* Wed Aug 22 2007 Richard W.M. Jones - 0.3.2.1-1 -- Upstream version 0.3.2.1. -- Put HTML documentation in -devel package. - -* Mon Aug 6 2007 Richard W.M. Jones - 0.3.1.2-1 -- Initial RPM release. diff --git a/SPECS/ocaml-lwt.spec b/SPECS/ocaml-lwt.spec deleted file mode 100644 index df471135..00000000 --- a/SPECS/ocaml-lwt.spec +++ /dev/null @@ -1,135 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-lwt -Version: 2.4.5 -Release: 1%{?dist} -Summary: OCaml lightweight thread library - -License: LGPLv2+ with exceptions -URL: http://ocsigen.org/lwt -Source0: https://github.com/ocsigen/lwt/archive/%{version}/%{name}-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -# Location of libev headers on Fedora is in /usr/include/libev/ev.h -# so we need to patch the source accordingly. -#Patch0: lwt-2.2.0-libev.patch - -BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-react-devel >= 1.0.0 -#BuildRequires: libev-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-text-devel -BuildRequires: ocaml-camlp4 -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ssl-devel - -%description -Lwt is a lightweight thread library for Objective Caml. This library -is part of the Ocsigen project. - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n lwt-%{version} - -#%patch0 -p1 - -mv README README.old -iconv -f iso-8859-1 -t utf-8 < README.old > README - - -%build -export C_INCLUDE_PATH=/usr/include/libev -./configure --enable-react --enable-text --disable-libev --enable-ssl -make - - -%install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -make install -mkdir -p $RPM_BUILD_ROOT%{_bindir} - -strip $OCAMLFIND_DESTDIR/stublibs/dll*.so -#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so - - - -%files -# This space intentionally left blank - -%files devel -%doc LICENSE COPYING CHANGES README -%{_libdir}/ocaml/lwt/* -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner - -%changelog -* Sun May 11 2014 David Scott - 2.4.5-1 -- Update to 2.4.5 - -* Mon Mar 10 2014 Bob Ball - 2.4.4-1 -- Update to 2.4.4 - -* Sat Jun 1 2013 David Scott - 2.4.3-1 -- Update to 2.4.3 - -* Wed Nov 2 2011 David Scott - 2.2.0-2 -- Rebuilt for XCP - -* Tue Feb 08 2011 Fedora Release Engineering - 2.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jan 6 2011 Richard W.M. Jones - 2.2.0-1 -- New upstream version 2.2.0. -- Rebuild for OCaml 3.12.0. -- Add BR libev-devel. -- Patch -> -- *.cmx files are no longer being distributed. -- No VERSION file. - -* Wed Dec 30 2009 Richard W.M. Jones - 2.0.0-0.3.rc1 -- Rebuild for OCaml 3.11.2. - -* Mon Oct 12 2009 Richard W.M. Jones - 2.0.0-0.2.rc1.fc13 -- ocaml-react is now in Fedora, so build this package. -- Missing BR on camlp4. - -* Thu Oct 8 2009 Richard W.M. Jones - 2.0.0-0.rc1.fc13 -- New upstream version 2.0.0+rc1. -- NB. This cannot be built as it depends on new package ocaml-react - (RHBZ#527971). - -* Sat Jul 25 2009 Fedora Release Engineering - 1.1.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sat May 23 2009 Richard W.M. Jones - 1.1.0-5 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Wed Feb 25 2009 Fedora Release Engineering - 1.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Dec 4 2008 Richard W.M. Jones - 1.1.0-3 -- Rebuild. - -* Wed Sep 3 2008 Richard W.M. Jones - 1.1.0-2 -- Rebuild with higher EVR than F-9 branch. - -* Mon Sep 1 2008 Richard W.M. Jones - 1.1.0-1 -- Initial RPM release. diff --git a/SPECS/ocaml-mirage-block-xen.spec b/SPECS/ocaml-mirage-block-xen.spec deleted file mode 100644 index 815623c0..00000000 --- a/SPECS/ocaml-mirage-block-xen.spec +++ /dev/null @@ -1,67 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-block-xen -Version: 1.1.0 -Release: 1%{?dist} -Summary: Mirage block driver for Xen that implements the blkfront/back protocol -License: ISC -URL: https://github.com/mirage/mirage-block-xen/ -Source0: https://github.com/mirage/mirage-block-xen/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-shared-memory-ring-devel -BuildRequires: ocaml-ipaddr-devel -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-mirage-xen-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-gnt-devel - -%description -Mirage block driver for Xen that implements the blkfront/back protocol - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-block-xen-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage-block-xen -%exclude %{_libdir}/ocaml/mirage-block-xen/*.a -%exclude %{_libdir}/ocaml/mirage-block-xen/*.cmxa -%exclude %{_libdir}/ocaml/mirage-block-xen/*.cmx -%exclude %{_libdir}/ocaml/mirage-block-xen/*.ml -%exclude %{_libdir}/ocaml/mirage-block-xen/*.mli - -%files devel -%{_libdir}/ocaml/mirage-block-xen/*.a -%{_libdir}/ocaml/mirage-block-xen/*.cmx -%{_libdir}/ocaml/mirage-block-xen/*.cmxa -%{_libdir}/ocaml/mirage-block-xen/*.mli - -%changelog -* Wed Jul 16 2014 David Scott - 1.1.0-1 -- Initial package diff --git a/SPECS/ocaml-mirage-clock-unix.spec b/SPECS/ocaml-mirage-clock-unix.spec deleted file mode 100644 index 12a1cf73..00000000 --- a/SPECS/ocaml-mirage-clock-unix.spec +++ /dev/null @@ -1,53 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-clock-unix -Version: 1.0.0 -Release: 1%{?dist} -Summary: A Mirage-compatible Clock library for Unix -License: ISC -URL: https://github.com/mirage/mirage-clock/ -Source0: https://github.com/mirage/mirage-clock/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-mirage-types-devel - -%description -A Mirage-compatible Clock library for Xen - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-clock-%{version} - -%build -make unix-build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -make unix-install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage-clock-unix -%exclude %{_libdir}/ocaml/mirage-clock-unix/*.a -%exclude %{_libdir}/ocaml/mirage-clock-unix/*.cmxa -%exclude %{_libdir}/ocaml/mirage-clock-unix/*.cmx - -%files devel -%{_libdir}/ocaml/mirage-clock-unix/*.a -%{_libdir}/ocaml/mirage-clock-unix/*.cmx -%{_libdir}/ocaml/mirage-clock-unix/*.cmxa - -%changelog -* Wed Jul 16 2014 David Scott - 1.0.0-1 -- Initial package diff --git a/SPECS/ocaml-mirage-clock-xen.spec b/SPECS/ocaml-mirage-clock-xen.spec deleted file mode 100644 index d14bdbd2..00000000 --- a/SPECS/ocaml-mirage-clock-xen.spec +++ /dev/null @@ -1,53 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-clock-xen -Version: 1.0.0 -Release: 1%{?dist} -Summary: A Mirage-compatible Clock library for Xen -License: ISC -URL: https://github.com/mirage/mirage-clock/ -Source0: https://github.com/mirage/mirage-clock/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-mirage-types-devel - -%description -A Mirage-compatible Clock library for Xen - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-clock-%{version} - -%build -make xen-build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -make xen-install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage-clock-xen -%exclude %{_libdir}/ocaml/mirage-clock-xen/*.a -%exclude %{_libdir}/ocaml/mirage-clock-xen/*.cmxa -%exclude %{_libdir}/ocaml/mirage-clock-xen/*.cmx - -%files devel -%{_libdir}/ocaml/mirage-clock-xen/*.a -%{_libdir}/ocaml/mirage-clock-xen/*.cmx -%{_libdir}/ocaml/mirage-clock-xen/*.cmxa - -%changelog -* Wed Jul 16 2014 David Scott - 1.0.0-1 -- Initial package diff --git a/SPECS/ocaml-mirage-console-xen.spec b/SPECS/ocaml-mirage-console-xen.spec deleted file mode 100644 index f7ac4d0b..00000000 --- a/SPECS/ocaml-mirage-console-xen.spec +++ /dev/null @@ -1,57 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-console-xen -Version: 1.0.2 -Release: 1%{?dist} -Summary: A Mirage-compatible Console library for Xen -License: ISC -URL: https://github.com/mirage/mirage-console/ -Source0: https://github.com/mirage/mirage-console/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-mirage-xen-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-gnt-devel - -%description -A Mirage-compatible Console library for Xen - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-console-%{version} - -%build -make xen-build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=ignore -make xen-install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage-console-xen -%exclude %{_libdir}/ocaml/mirage-console-xen/*.a -%exclude %{_libdir}/ocaml/mirage-console-xen/*.cmxa -%exclude %{_libdir}/ocaml/mirage-console-xen/*.cmx - -%files devel -%{_libdir}/ocaml/mirage-console-xen/*.a -%{_libdir}/ocaml/mirage-console-xen/*.cmx -%{_libdir}/ocaml/mirage-console-xen/*.cmxa - -%changelog -* Wed Jul 16 2014 David Scott - 1.0.2-1 -- Initial package diff --git a/SPECS/ocaml-mirage-types.spec b/SPECS/ocaml-mirage-types.spec deleted file mode 100644 index f4f32f07..00000000 --- a/SPECS/ocaml-mirage-types.spec +++ /dev/null @@ -1,58 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-types -Version: 1.2.0 -Release: 1%{?dist} -Summary: MirageOS interfaces -License: ISC -URL: https://github.com/mirage/mirage -Source0: https://github.com/mirage/mirage/archive/v%{version}/mirage-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-ipaddr-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ounit-devel - -%description -This library contains interfaces to build applications that are compatible with the Mirage operating system. It defines only interfaces, and no concrete modules. - -See http://openmirage.org for more information. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -BuildRequires: ocaml-ipaddr-devel%{?_isa} -BuildRequires: ocaml-lwt-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-%{version} - -%build -make build-types - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -make install-types - -%files -%{_libdir}/ocaml/mirage-types -%exclude %{_libdir}/ocaml/mirage-types/*.mli - -%files devel -%{_libdir}/ocaml/mirage-types/*.mli - -%changelog -* Wed Jul 16 2014 David Scott - 1.2.0-1 -- Update to 1.2.0 - -* Tue Apr 1 2014 Euan Harris - 1.1.1-1 -- Initial package - diff --git a/SPECS/ocaml-mirage-xen.spec b/SPECS/ocaml-mirage-xen.spec deleted file mode 100644 index 5cfddd13..00000000 --- a/SPECS/ocaml-mirage-xen.spec +++ /dev/null @@ -1,76 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage-xen -Version: 1.1.1 -Release: 1%{?dist} -Summary: Mirage OS library for Xen compilation -License: ISC -URL: https://github.com/mirage/mirage-platform/ -Source0: https://github.com/mirage/mirage-platform/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: ocaml-mirage-xen.install.sh -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-mirage-clock-xen -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-shared-memory-ring-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-gnt-devel -BuildRequires: ocaml-mirage-types-devel - -%description -Mirage OS library for Xen compilation - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel%{?_isa} -Requires: ocaml-mirage-clock-xen-devel%{?_isa} -Requires: ocaml-shared-memory-ring-devel%{?_isa} -Requires: xen-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-platform-%{version} -cp %{SOURCE1} ocaml-mirage-xen.install.sh - -%build -make xen-build - -%install -mkdir -p %{buildroot}%{_libdir}/ocaml -sh ./ocaml-mirage-xen.install.sh %{buildroot}%{_libdir}/ocaml %{buildroot} - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage-xen -%exclude %{_libdir}/ocaml/mirage-xen/*.a -%exclude %{_libdir}/ocaml/mirage-xen/*.cmxa -%exclude %{_libdir}/ocaml/mirage-xen/*.cmx -%exclude %{_libdir}/ocaml/mirage-xen/*.o -%exclude %{_libdir}/ocaml/mirage-xen/*.lds - -%files devel -%{_libdir}/ocaml/mirage-xen/*.a -%{_libdir}/ocaml/mirage-xen/*.cmx -%{_libdir}/ocaml/mirage-xen/*.cmxa -%{_libdir}/ocaml/mirage-xen/libxencaml.a -%{_libdir}/ocaml/mirage-xen/libocaml.a -%{_libdir}/ocaml/mirage-xen/libdiet.a -%{_libdir}/ocaml/mirage-xen/libm.a -%{_libdir}/ocaml/mirage-xen/libxen.a -%{_libdir}/ocaml/mirage-xen/longjmp.o -%{_libdir}/ocaml/mirage-xen/x86_64.o -%{_libdir}/ocaml/mirage-xen/mirage-x86_64.lds - -%changelog -* Wed Jul 16 2014 David Scott - 1.1.1-1 -- Initial package diff --git a/SPECS/ocaml-mirage.spec b/SPECS/ocaml-mirage.spec deleted file mode 100644 index f6a412f4..00000000 --- a/SPECS/ocaml-mirage.spec +++ /dev/null @@ -1,69 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-mirage -Version: 1.2.0 -Release: 1%{?dist} -Summary: MirageOS interfaces -License: ISC -URL: https://github.com/mirage/mirage -Source0: https://github.com/mirage/mirage/archive/v%{version}/mirage-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-ipaddr-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-cmdliner-devel - -%description -A library and a command-line tool for building Mirage applications. -See http://openmirage.org for more information. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -BuildRequires: ocaml-ipaddr-devel%{?_isa} -BuildRequires: ocaml-lwt-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n mirage-%{version} - -%build -make PREFIX=%{buildroot} - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p %{buildroot}/bin -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/mirage -%exclude %{_libdir}/ocaml/mirage/*.a -%exclude %{_libdir}/ocaml/mirage/*.cmxa -%exclude %{_libdir}/ocaml/mirage/*.cmx -%exclude %{_libdir}/ocaml/mirage/*.mli -/bin/mirage - -%files devel -%{_libdir}/ocaml/mirage/*.a -%{_libdir}/ocaml/mirage/*.cmx -%{_libdir}/ocaml/mirage/*.cmxa -%{_libdir}/ocaml/mirage/*.mli - -%changelog -* Wed Jul 16 2014 David Scott - 1.2.0-1 -- Initial package - -* Tue Apr 1 2014 Euan Harris - 1.1.1-1 -- Initial package - diff --git a/SPECS/ocaml-nbd.spec b/SPECS/ocaml-nbd.spec deleted file mode 100644 index ace030b6..00000000 --- a/SPECS/ocaml-nbd.spec +++ /dev/null @@ -1,73 +0,0 @@ -Name: ocaml-nbd -Version: 1.0.2 -Release: 1%{?dist} -Summary: Pure OCaml implementation of the Network Block Device protocol -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/nbd -Source0: https://github.com/xapi-project/nbd/archive/v%{version}/nbd-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-lwt-devel - -%description -An implementation of the Network Block Device protocol for both -regular Unix and Lwt in OCaml. This library allows applications to -access remote block devices. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -BuildRequires: ocaml-cstruct-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n nbd-%{version} - -%build -./configure --prefix %{_prefix} --destdir %{buildroot} -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc ChangeLog -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_bindir}/nbd-tool -%{_libdir}/ocaml/nbd -%exclude %{_libdir}/ocaml/nbd/*.a -%exclude %{_libdir}/ocaml/nbd/*.cmxa -%exclude %{_libdir}/ocaml/nbd/*.cmx -%exclude %{_libdir}/ocaml/nbd/*.ml -%exclude %{_libdir}/ocaml/nbd/*.mli - -%files devel -%{_libdir}/ocaml/nbd/*.a -%{_libdir}/ocaml/nbd/*.cmx -%{_libdir}/ocaml/nbd/*.cmxa -%{_libdir}/ocaml/nbd/*.mli - -%changelog -* Mon Mar 31 2014 Euan Harris - 1.0.2-1 -- Update to 1.0.2, removing dependency on ocaml-obuild - -* Thu Nov 21 2013 David Scott - 0.9.2-1 -- Update to 0.9.2 - -* Mon Sep 23 2013 David Scott - 0.9.1-1 -- Update to 0.9.1 - -* Wed May 29 2013 David Scott - 0.9.0-1 -- Initial package - diff --git a/SPECS/ocaml-netdev.spec b/SPECS/ocaml-netdev.spec deleted file mode 100644 index d56febd9..00000000 --- a/SPECS/ocaml-netdev.spec +++ /dev/null @@ -1,70 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-netdev -Version: 0.9.1 -Release: 1%{?dist} -Summary: Manipulate Linux bridges, network devices and openvswitch instances in OCaml -License: LGPL -URL: https://github.com/xapi-project/netdev -Source0: https://github.com/xapi-project/netdev/archive/v%{version}/netdev-%{version}.tar.gz -BuildRequires: forkexecd-devel -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-stdext-devel - -%description -Manipulate Linux bridges, network devices and openvswitch instances in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -BuildRequires: forkexecd-devel%{?_isa} -BuildRequires: ocaml-stdext-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n netdev-%{version} - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install - -%files -%doc ChangeLog -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/netdev -%exclude %{_libdir}/ocaml/netdev/*.a -%exclude %{_libdir}/ocaml/netdev/*.cmxa -%exclude %{_libdir}/ocaml/netdev/*.cmx -%exclude %{_libdir}/ocaml/netdev/*.mli -%{_libdir}/ocaml/stublibs/dllnetdev_stubs.so -%{_libdir}/ocaml/stublibs/dllnetdev_stubs.so.owner - -%files devel -%{_libdir}/ocaml/netdev/*.a -%{_libdir}/ocaml/netdev/*.cmx -%{_libdir}/ocaml/netdev/*.cmxa -%{_libdir}/ocaml/netdev/*.mli - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.9.1-1 -- Update to 0.9.1 - -* Fri May 30 2014 Euan Harris - 0.9.0-2 -- Split files correctly between base and devel packages - -* Thu May 30 2013 David Scott - 0.9.0-1 -- Initial package - diff --git a/SPECS/ocaml-netlink.spec b/SPECS/ocaml-netlink.spec deleted file mode 100644 index a92682b2..00000000 --- a/SPECS/ocaml-netlink.spec +++ /dev/null @@ -1,65 +0,0 @@ -%define planex_version 0.2.0 -%define planex_release 1 - -Name: ocaml-netlink -Version: %{planex_version} -Release: %{planex_release} -Summary: OCaml bindings to libnl -License: LGPL -URL: https://github.com/xapi-project/ocaml-netlink -Source0: https://github.com/xapi-project/ocaml-netlink/archive/v%{planex_version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: libffi-devel -BuildRequires: libnl3 -BuildRequires: ocaml -BuildRequires: ocaml-ctypes-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild - -%description -The Netlink Protocol Library Suite (libnl) provides APIs to the netlink -protocol, allowing you to interact with network devices in the Linux kernel. -This library provides OCaml bindings to libnl. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-ctypes-devel%{?_isa} -Requires: libffi%{?_isa} -Requires: libnl3%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - -%files -%doc README.md -%{_libdir}/ocaml/netlink -%exclude %{_libdir}/ocaml/netlink/*.a -%exclude %{_libdir}/ocaml/netlink/*.cmxa -%exclude %{_libdir}/ocaml/netlink/*.cmx - -%files devel -%{_libdir}/ocaml/netlink/*.a -%{_libdir}/ocaml/netlink/*.cmx -%{_libdir}/ocaml/netlink/*.cmxa - -%changelog -* Wed Oct 01 2014 David Scott - 0.2.0-1 -- Update to 0.2.0 - -* Thu Jun 05 2014 Rob Hoes - 0.1.0-1 -- Initial package - diff --git a/SPECS/ocaml-obuild.spec b/SPECS/ocaml-obuild.spec deleted file mode 100644 index bbdba566..00000000 --- a/SPECS/ocaml-obuild.spec +++ /dev/null @@ -1,45 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-obuild -Version: 0.0.2 -Release: 1%{?dist} -Summary: Simple build tool for OCaml programs -License: BSD2 -URL: https://github.com/vincenthz/obuild -Source0: https://github.com/vincenthz/obuild/archive/v%{version}/obuild-%{version}.tar.gz -BuildRequires: ocaml - -%description -The goal is to make a very simple build system for users and developers -of OCaml libraries and programs. - -Obuild acts as a building black box: user declares only what they want to -build and with which sources, and the build system will consistently -build it. - -The design is based on cabal, and borrows most of its layout and way of -working, adapting parts where necessary to support OCaml fully. - -%prep -%setup -q -n obuild-%{version} - -%build -./bootstrap - -%install -mkdir -p %{buildroot}/%{_bindir} -install dist/build/obuild/obuild %{buildroot}/%{_bindir} -install dist/build/obuild-simple/obuild-simple %{buildroot}/%{_bindir} -install dist/build/obuild-from-oasis/obuild-from-oasis %{buildroot}/%{_bindir} - - -%files -%doc README.md TODO.md DESIGN.md LICENSE OBUILD_SPEC.md -%{_bindir}/obuild -%{_bindir}/obuild-simple -%{_bindir}/obuild-from-oasis - -%changelog -* Thu May 30 2013 David Scott - 0.0.2-1 -- Initial package - diff --git a/SPECS/ocaml-oclock.spec b/SPECS/ocaml-oclock.spec deleted file mode 100644 index 92b39500..00000000 --- a/SPECS/ocaml-oclock.spec +++ /dev/null @@ -1,60 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-oclock -Version: 0.3 -Release: 3%{?dist} -Summary: POSIX monotonic clock for OCaml -License: ISC -URL: https://github.com/polazarus/oclock -Source0: https://github.com/polazarus/oclock/archive/v0.3/oclock-%{version}.tar.gz -Patch0: oclock-1-cc-headers -Patch1: oclock-2-destdir -BuildRequires: ocaml -BuildRequires: ocaml-findlib - -%description -A POSIX monotonic clock for OCaml - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n oclock-%{version} -%patch0 -p1 -%patch1 -p1 - -%build -make - -%install -export OCAMLFIND_DISTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DISTDIR -mkdir -p $OCAMLFIND_DISTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - -%files -%doc LICENSE -%doc README.markdown -%{_libdir}/ocaml/oclock -%exclude %{_libdir}/ocaml/oclock/*.a -%exclude %{_libdir}/ocaml/oclock/*.cmxa -%{_libdir}/ocaml/stublibs/dlloclock.so -%{_libdir}/ocaml/stublibs/dlloclock.so.owner - -%files devel -%{_libdir}/ocaml/oclock/*.a -%{_libdir}/ocaml/oclock/*.cmxa - -%changelog -* Fri May 30 2014 Euan Harris - 0.3-3 -- Split files correctly between base and devel packages - -* Wed May 29 2013 David Scott - 0.3-2 -- Initial package - diff --git a/SPECS/ocaml-ocplib-endian.spec b/SPECS/ocaml-ocplib-endian.spec deleted file mode 100644 index 6a6649cb..00000000 --- a/SPECS/ocaml-ocplib-endian.spec +++ /dev/null @@ -1,71 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-ocplib-endian -Version: 0.4 -Release: 2%{?dist} -Summary: Optimized functions to read and write int16/32/64 from strings and bigarrays -License: LGPL -URL: https://github.com/OCamlPro/ocplib-endian -Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: optcomp - -%description -Optimised functions to read and write int16/32/64 from strings and -bigarrays, based on new primitives added in version 4.01. - -The library implements two modules: -- [EndianString](ocplib-endian/blob/master/src/endianString.mli) works - directly on strings, and provides submodules BigEndian and LittleEndian, - with their unsafe counter-parts; - -- [EndianBigstring](ocplib-endian/blob/master/src/endianBigstring.mli) - works on bigstrings (Bigarrays of chars), and provides submodules - BigEndian and LittleEndian, with their unsafe counter-parts; - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: optcomp - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n ocplib-endian-%{version} - -%build -ocaml setup.ml -configure -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install - -%files -%doc COPYING.txt -%doc README.md -%{_libdir}/ocaml/ocplib-endian -%exclude %{_libdir}/ocaml/ocplib-endian/*.a -%exclude %{_libdir}/ocaml/ocplib-endian/*.cmxa -%exclude %{_libdir}/ocaml/ocplib-endian/*.cmx -%exclude %{_libdir}/ocaml/ocplib-endian/*.mli - -%files devel -%{_libdir}/ocaml/ocplib-endian/*.a -%{_libdir}/ocaml/ocplib-endian/*.cmx -%{_libdir}/ocaml/ocplib-endian/*.cmxa -%{_libdir}/ocaml/ocplib-endian/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 0.4-2 -- Split files correctly between base and devel packages - -* Fri May 31 2013 David Scott - 0.4-1 -- Initial package - diff --git a/SPECS/ocaml-odn.spec b/SPECS/ocaml-odn.spec deleted file mode 100644 index 147f6970..00000000 --- a/SPECS/ocaml-odn.spec +++ /dev/null @@ -1,59 +0,0 @@ -Name: ocaml-odn -Version: 0.0.11 -Release: 1%{?dist} -Summary: Dump OCaml data structures using OCaml data notation - -License: LGPL -URL: https://forge.ocamlcore.org/projects/odn/ -Source0: https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-%{version}.tar.gz - -BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv >= 108.07.01 -BuildRequires: ocaml-ounit-devel >= 2.0.0 -BuildRequires: ocaml-fileutils-devel >= 0.4.0 - -%description -This library uses type-conv to dump OCaml data structure using OCaml data -notation. This kind of data dumping helps to write OCaml code generator, -like OASIS. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -BuildRequires: ocaml-type-conv%{_isa} >= 108.07.01 - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n ocaml-data-notation-%{version} - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES.txt -%doc COPYING.txt -%{_libdir}/ocaml/odn -%exclude %{_libdir}/ocaml/odn/*.a -%exclude %{_libdir}/ocaml/odn/*.cmxa -%exclude %{_libdir}/ocaml/odn/*.cmx - -%files devel -%{_libdir}/ocaml/odn/*.a -%{_libdir}/ocaml/odn/*.cmx -%{_libdir}/ocaml/odn/*.cmxa - -%changelog -* Tue Mar 25 2014 Euan Harris - 0.0.11-1 -- Initial package - diff --git a/SPECS/ocaml-omd.spec b/SPECS/ocaml-omd.spec deleted file mode 100644 index afd8ef85..00000000 --- a/SPECS/ocaml-omd.spec +++ /dev/null @@ -1,72 +0,0 @@ -Name: ocaml-omd -Version: 1.0.2 -Release: 1%{?dist} -Summary: A Markdown frontend in pure OCaml. -License: ISC -URL: https://github.com/ocaml/omd -Source0: https://github.com/ocaml/omd/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: ocaml-omd-setup.ml.patch -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -This Markdown library is implemented using only pure OCaml (including -I/O operations provided by the standard OCaml compiler distribution). -OMD is meant to be as faithful as possible to the original Markdown. -Additionally, OMD implements a few Github markdown features, an -extension mechanism, and a few other features. Note that the opam -package installs both the OMD library and the command line tool `omd`. -Note that The library interface of 1.0.x is only partially compatible -with 0.9.x. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n omd-%{version} -%patch0 -p1 - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/omd -%exclude %{_libdir}/ocaml/omd/*.a -%exclude %{_libdir}/ocaml/omd/*.cmxa -%exclude %{_libdir}/ocaml/omd/*.cmx -%exclude %{_libdir}/ocaml/omd/*.mli -%{_bindir}/omd -%{_bindir}/test_cow -%{_bindir}/test_spec - -%files devel -%{_libdir}/ocaml/omd/*.a -%{_libdir}/ocaml/omd/*.cmxa -%{_libdir}/ocaml/omd/*.cmx -%{_libdir}/ocaml/omd/*.mli - -%changelog -* Thu Oct 16 2014 David Scott - 1.0.2-1 -- Initial package diff --git a/SPECS/ocaml-opasswd.spec b/SPECS/ocaml-opasswd.spec deleted file mode 100644 index 7744c0c6..00000000 --- a/SPECS/ocaml-opasswd.spec +++ /dev/null @@ -1,67 +0,0 @@ -Name: ocaml-opasswd -Version: 0.9.3 -Release: 1%{?dist} -Summary: OCaml interface to the glibc passwd/shadow password functions -License: ISC -URL: https://github.com/xapi-project/ocaml-opasswd -Source0: https://github.com/xapi-project/ocaml-opasswd/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: ocaml-opasswd-ocaml-4.00.1.patch -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ctypes-devel -BuildRequires: libffi-devel - -%description -This is an OCaml binding to the glibc passwd file and shadow password -file interface. It can be used to read, parse, manipulate and write -passwd and shadow files on Linux systems. It might also work on other -nixes, but it has not been tested. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-ctypes-devel%{?_isa} -Requires: libffi%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{version} -%patch0 -p1 - -%build -ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml -ocaml setup.ml -build - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -ocaml setup.ml -install -rm -f %{buildroot}%{_libdir}/ocaml/usr/local/bin/opasswd_test - -%files -%doc README.md -%{_libdir}/ocaml/oPasswd -%exclude %{_libdir}/ocaml/oPasswd/*.a -%exclude %{_libdir}/ocaml/oPasswd/*.cmxa -%exclude %{_libdir}/ocaml/oPasswd/*.mli - -%files devel -%{_libdir}/ocaml/oPasswd/*.a -%{_libdir}/ocaml/oPasswd/*.cmxa -%{_libdir}/ocaml/oPasswd/*.mli - -%changelog -* Thu May 1 2014 David Scott - 0.9.3-1 -- For -devel package add dependency on ocaml-ctypes-devel - -* Thu Apr 24 2014 David Scott -- Fix split between -devel and main package, hopefully - -* Thu Oct 31 2013 Mike McClurg -- Initial package - diff --git a/SPECS/ocaml-ounit.spec b/SPECS/ocaml-ounit.spec deleted file mode 100644 index 9484212d..00000000 --- a/SPECS/ocaml-ounit.spec +++ /dev/null @@ -1,121 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-ounit -Version: 2.0.0 -Release: 1%{?dist} -Summary: Unit test framework for OCaml - -License: MIT -URL: http://ounit.forge.ocamlcore.org/ -Source0: http://forge.ocamlcore.org/frs/download.php/1258/ounit-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc - -%description -OUnit is a unit test framework for OCaml. It allows one to easily -create unit-tests for OCaml code. It is based on HUnit, a unit testing -framework for Haskell. It is similar to JUnit, and other xUnit testing -frameworks. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n ounit-%{version} - -%build -sh ./configure --destdir $RPM_BUILD_ROOT -make all -make doc - -%check -make test - -%install -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -make install - -# Remove this, reinstall it properly with a %%doc rule below. -rm -rf $RPM_BUILD_ROOT/usr/local/share/doc - -%files -%doc LICENSE.txt -%{_libdir}/ocaml/oUnit -%if %opt -%exclude %{_libdir}/ocaml/oUnit/*.a -%exclude %{_libdir}/ocaml/oUnit/*.cmxa -%endif -%exclude %{_libdir}/ocaml/oUnit/*.mli - -%files devel -%doc LICENSE.txt README.txt -%doc _build/src/api-ounit.docdir/* -%if %opt -%{_libdir}/ocaml/oUnit/*.a -%{_libdir}/ocaml/oUnit/*.cmxa -%endif -%{_libdir}/ocaml/oUnit/*.mli - -%changelog -* Tue Mar 25 2014 Euan Harris - 2.0.0-1 -- Update to version 2.0.0 - -* Fri Sep 30 2011 Mike McClurg - 1.1.2-3 -- Repackaged for XenSource build system - -* Tue Feb 08 2011 Fedora Release Engineering - 1.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 5 2011 Richard W.M. Jones - 1.1.0-2 -- New upstream version 1.1.0. -- Project has moved to new upstream URL and Source0. -- Rebuild for OCaml 3.12.0. -- New build system: - + doesn't need 'make allopt' - + DESTDIR logic changed (see OASIS bug 852) - + docdir moved -- LICENSE and README files renamed. -- BR camlp4. - -* Wed Dec 30 2009 Richard W.M. Jones - 1.0.3-7 -- Rebuild for OCaml 3.11.2. - -* Sat Jul 25 2009 Fedora Release Engineering - 1.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Sat May 23 2009 Richard W.M. Jones - 1.0.3-5 -- Rebuild for OCaml 3.11.1 - -* Thu Apr 16 2009 S390x secondary arch maintainer -- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs - (added sparc64 per request from the sparc maintainer) - -* Wed Feb 25 2009 Fedora Release Engineering - 1.0.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Nov 26 2008 Richard W.M. Jones - 1.0.3-3 -- Rebuild for OCaml 3.11.0+rc1. - -* Wed Nov 19 2008 Richard W.M. Jones - 1.0.3-2 -- Rebuild for OCaml 3.11.0 - -* Sun Aug 31 2008 Richard W.M. Jones - 1.0.3-1 -- New upstream version 1.0.3. - -* Mon May 12 2008 Richard W.M. Jones - 1.0.2-2 -- License is MIT. - -* Sat May 3 2008 Richard W.M. Jones - 1.0.2-1 -- Initial RPM release. - diff --git a/SPECS/ocaml-pa-bench.spec b/SPECS/ocaml-pa-bench.spec deleted file mode 100644 index 881e3a11..00000000 --- a/SPECS/ocaml-pa-bench.spec +++ /dev/null @@ -1,102 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-pa-bench -Version: 111.28.00 -Release: 1%{?dist} -Summary: Syntax extension for inline benchmarks. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/pa_bench -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_bench-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-type-conv - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Syntax extension for inline benchmarks. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n pa_bench-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/pa_bench -%if %opt -%exclude %{_libdir}/ocaml/pa_bench/*.a -%exclude %{_libdir}/ocaml/pa_bench/*.cmxa -%endif -%exclude %{_libdir}/ocaml/pa_bench/*.ml -%exclude %{_libdir}/ocaml/pa_bench/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/pa_bench/*.a -%{_libdir}/ocaml/pa_bench/*.cmxa -%endif -%{_libdir}/ocaml/pa_bench/*.ml -%{_libdir}/ocaml/pa_bench/*.mli - - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-pa-ounit.spec b/SPECS/ocaml-pa-ounit.spec deleted file mode 100644 index 21cda4d7..00000000 --- a/SPECS/ocaml-pa-ounit.spec +++ /dev/null @@ -1,101 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-pa-ounit -Version: 111.28.00 -Release: 1%{?dist} -Summary: Syntax extension for in-line tests in code. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/pa_ounit -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_ounit-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ounit-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Pa_ounit is a syntax extension that helps writing in-line tests in ocaml code. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n pa_ounit-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt readme.md -%{_libdir}/ocaml/pa_ounit -%if %opt -%exclude %{_libdir}/ocaml/pa_ounit/*.a -%exclude %{_libdir}/ocaml/pa_ounit/*.cmxa -%endif -%exclude %{_libdir}/ocaml/pa_ounit/*.ml -%exclude %{_libdir}/ocaml/pa_ounit/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt readme.md -%if %opt -%{_libdir}/ocaml/pa_ounit/*.a -%{_libdir}/ocaml/pa_ounit/*.cmxa -%endif -%{_libdir}/ocaml/pa_ounit/*.ml -%{_libdir}/ocaml/pa_ounit/*.mli - - -%changelog -* Tue Oct 14 2014 David Scott - 111.28.00-1 -- Update to 111.28.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 -- Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-pipebang.spec b/SPECS/ocaml-pa-pipebang.spec deleted file mode 100644 index fde2c43c..00000000 --- a/SPECS/ocaml-pa-pipebang.spec +++ /dev/null @@ -1,103 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -%define dlnode 832 - -Name: ocaml-pa-pipebang -Version: 110.01.00 -Release: 1%{?dist} -Summary: Syntax extension to transform x |! f into f x - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/pipebang -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pipebang-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -This package contains a simple syntax extension that transforms -x |! f onto f x. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n pipebang-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/pa_pipebang -%if %opt -%exclude %{_libdir}/ocaml/pa_pipebang/*.a -%exclude %{_libdir}/ocaml/pa_pipebang/*.cmxa -%endif -%exclude %{_libdir}/ocaml/pa_pipebang/*.ml - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/pa_pipebang/*.a -%{_libdir}/ocaml/pa_pipebang/*.cmxa -%endif -%{_libdir}/ocaml/pa_pipebang/*.ml - - -%changelog -* Tue Oct 14 2014 David Scott - 110.01.00-1 -- Update to 110.01.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.28.02-1 -- Initial package for Fedora 20 diff --git a/SPECS/ocaml-pa-test.spec b/SPECS/ocaml-pa-test.spec deleted file mode 100644 index 3eabe454..00000000 --- a/SPECS/ocaml-pa-test.spec +++ /dev/null @@ -1,101 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-pa-test -Version: 111.08.00 -Release: 1%{?dist} -Summary: Jane Street's pa_test - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/pa_test -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/pa_test-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-type-conv - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Jane Street's pa_test. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n pa_test-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/pa_test -%if %opt -%exclude %{_libdir}/ocaml/pa_test/*.a -%exclude %{_libdir}/ocaml/pa_test/*.cmxa -%endif -%exclude %{_libdir}/ocaml/pa_test/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/pa_test/*.a -%{_libdir}/ocaml/pa_test/*.cmxa -%endif -%{_libdir}/ocaml/pa_test/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.08.00-1 -- Update to 111.08.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.53.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-qmp.spec b/SPECS/ocaml-qmp.spec deleted file mode 100644 index 8279e918..00000000 --- a/SPECS/ocaml-qmp.spec +++ /dev/null @@ -1,71 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-qmp -Version: 0.9.2 -Release: 2%{?dist} -Summary: Pure OCaml implementation of the Qemu Message Protocol (QMP) -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/ocaml-qmp -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-yojson-devel - -%description -An implementation of the Qemu Message Protocol (QMP) that allows -an application to command, and receive events from, a running qemu -process. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-yojson-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml - -%files -%doc ChangeLog -%doc README.md -%doc LICENSE -%{_libdir}/ocaml/qmp -%exclude %{_libdir}/ocaml/qmp/*.a -%exclude %{_libdir}/ocaml/qmp/*.cmxa -%exclude %{_libdir}/ocaml/qmp/*.cmx - -%files devel -%{_libdir}/ocaml/qmp/*.a -%{_libdir}/ocaml/qmp/*.cmx -%{_libdir}/ocaml/qmp/*.cmxa - -%changelog -* Fri May 30 2014 Euan Harris - 0.9.2-2 -- Split files correctly between base and devel packages - -* Thu Mar 27 2014 Euan Harris - 0.9.2-1 -- Add support for QMP 'change' command, used to change removable media - and reconfigure VNC. - -* Fri Aug 09 2013 Euan Harris - 0.9.1-1 -- Change representation of message timestamps from a tuple of ints to - a float. This avoids problems on 32-bit architectures and follows - the example of the OCaml standard library. - -* Wed May 29 2013 David Scott - 0.9.0-1 -- Initial package - diff --git a/SPECS/ocaml-re.spec b/SPECS/ocaml-re.spec deleted file mode 100644 index f1cb905a..00000000 --- a/SPECS/ocaml-re.spec +++ /dev/null @@ -1,64 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-re -Version: 1.2.2 -Release: 1%{?dist} -Summary: A regular expression library for OCaml -License: LGPL -URL: https://github.com/ocaml/ocaml-re -Source0: https://github.com/ocaml/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -A regular expression library for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{name}-%{version} - -%build -ocaml setup.ml -configure --destdir %{buildroot} -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/re -%exclude %{_libdir}/ocaml/re/*.a -%exclude %{_libdir}/ocaml/re/*.cmxa -%exclude %{_libdir}/ocaml/re/*.cmx -%exclude %{_libdir}/ocaml/re/*.mli - -%files devel -%doc re-api.docdir/* -%exclude /usr/local/share/doc/re/ -%{_libdir}/ocaml/re/*.a -%{_libdir}/ocaml/re/*.cmx -%{_libdir}/ocaml/re/*.cmxa -%{_libdir}/ocaml/re/*.mli - -%changelog -* Sat Jun 7 2014 David Scott - 1.2.2-1 -- Update to 1.2.2 - -* Fri May 30 2014 Euan Harris - 1.2.1-2 -- Split files correctly between base and devel packages - -* Thu May 30 2013 David Scott - 1.2.1-1 -- Initial package - diff --git a/SPECS/ocaml-react.spec b/SPECS/ocaml-react.spec deleted file mode 100644 index 2162bb14..00000000 --- a/SPECS/ocaml-react.spec +++ /dev/null @@ -1,87 +0,0 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global debug_package %{nil} - -Name: ocaml-react -Version: 1.1.0 -Release: 2%{?dist} -Summary: OCaml framework for Functional Reactive Programming (FRP) -License: BSD -URL: http://erratique.ch/software/react -Source0: https://github.com/dbuenzli/react/archive/v%{version}/react-%{version}.tar.gz -Source1: react-LICENSE - -BuildRequires: ocaml >= 3.11.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -React is an OCaml module for functional reactive programming (FRP). It -provides support to program with time varying values : applicative -events and signals. React doesn't define any primitive event or -signal, this lets the client chooses the concrete timeline. - -React is made of a single, independent, module and distributed under -the new BSD license. - -Given an absolute notion of time Rtime helps you to manage a timeline -and provides time stamp events, delayed events and delayed signals. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n react-%{version} -cp %{SOURCE1} LICENSE - -%build -ocaml pkg/build.ml native=true native-dynlink=true - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml/react -cp _build/pkg/META _build/src/react.a _build/src/react.cma _build/src/react.cmi _build/src/react.cmx _build/src/react.cmxa _build/src/react.cmxs _build/src/react.mli %{buildroot}/%{_libdir}/ocaml/react - -%files -%doc CHANGES.md -%doc README.md -%{_libdir}/ocaml/react -%exclude %{_libdir}/ocaml/react/*.a -%exclude %{_libdir}/ocaml/react/*.cmxa -%exclude %{_libdir}/ocaml/react/*.cmx -%exclude %{_libdir}/ocaml/react/*.mli - -%files devel -%{_libdir}/ocaml/react/*.a -%{_libdir}/ocaml/react/*.cmx -%{_libdir}/ocaml/react/*.cmxa -%{_libdir}/ocaml/react/*.mli - -%changelog -* Sat Jun 7 2014 David Scott - 1.1.0-2 -- Update for 1.1.0 - -* Thu May 29 2014 Euan Harris - 0.9.4-3 -- Split files correctly between base and devel packages - -* Mon May 19 2014 Euan Harris - 0.9.4-2 -- Switch to GitHub mirror - -* Sat Jun 01 2013 David Scott - 0.9.4-1 -- Update for 0.9.4 - -* Tue Feb 08 2011 Fedora Release Engineering - 0.9.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jan 6 2011 Richard W.M. Jones - 0.9.2-1 -- Rebuild for OCaml 3.12.0. - -* Wed Dec 30 2009 Richard W.M. Jones - 0.9.0-3 -- Rebuild for OCaml 3.11.2. - -* Thu Oct 8 2009 Richard W.M. Jones - 0.9.0-2 -- Initial RPM release. -- Use global instead of define (Till Maas). diff --git a/SPECS/ocaml-rpc.spec b/SPECS/ocaml-rpc.spec deleted file mode 100644 index b5dd4225..00000000 --- a/SPECS/ocaml-rpc.spec +++ /dev/null @@ -1,58 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-rpc -Version: 1.5.1 -Release: 1%{?dist} -Summary: An RPC library for OCaml -License: LGPL -URL: https://github.com/samoht/ocaml-rpc -Source0: https://github.com/samoht/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-type-conv -BuildRequires: ocaml-xmlm-devel - -%description -Am RPC library for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camlp4-devel%{?_isa} -Requires: ocaml-type-conv%{?_isa} -Requires: ocaml-lwt%{?_isa} -Requires: ocaml-xmlm-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=${buildroot} - -%files -%doc README.md -%{_libdir}/ocaml/rpclib -%exclude %{_libdir}/ocaml/rpclib/*.cmx - -%files devel -%{_libdir}/ocaml/rpclib/*.cmx - -%changelog -* Fri May 23 2014 Euan Harris - 1.5.1-1 -- Update to 1.5.1, removing dependency on js-of-ocaml - -* Thu May 30 2013 David Scott - 1.4.1-1 -- Initial package - diff --git a/SPECS/ocaml-rrd-transport.spec b/SPECS/ocaml-rrd-transport.spec deleted file mode 100644 index cf6bb246..00000000 --- a/SPECS/ocaml-rrd-transport.spec +++ /dev/null @@ -1,92 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-rrd-transport -Version: 0.7.2 -Release: 1%{?dist} -Summary: Shared-memory protocols for transmitting RRD data -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/rrd-transport/ -Source0: https://github.com/xapi-project/rrd-transport/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-crc-devel -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-gnt-devel -Requires: ocaml -Requires: ocaml-findlib - -%description -Shared-memory protocol for transmitting RRD data, supporting in-memory files -and shared Xen pages. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-gnt-devel -Requires: ocaml-crc-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n rrd-transport-%{version} - -%build -ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml -ocaml setup.ml -build - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install - -%files -%doc LICENSE -%{_libdir}/ocaml/rrd-transport/META -%{_libdir}/ocaml/rrd-transport/rrd_transport.cma -%{_libdir}/ocaml/rrd-transport/rrd_io.cmi -%{_libdir}/ocaml/rrd-transport/rrd_json.cmi -%{_libdir}/ocaml/rrd-transport/rrd_protocol.cmi -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.cmi -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.cmi -%{_libdir}/ocaml/rrd-transport/rrd_reader.cmi -%{_libdir}/ocaml/rrd-transport/rrd_rpc.cmi -%{_libdir}/ocaml/rrd-transport/rrd_writer.cmi - -%files devel -%doc ChangeLog README.md -%{_libdir}/ocaml/rrd-transport/rrd_transport.a -%{_libdir}/ocaml/rrd-transport/rrd_transport.cmxa -%{_libdir}/ocaml/rrd-transport/rrd_transport.cmxs -%{_libdir}/ocaml/rrd-transport/rrd_io.cmx -%{_libdir}/ocaml/rrd-transport/rrd_io.mli -%{_libdir}/ocaml/rrd-transport/rrd_json.cmx -%{_libdir}/ocaml/rrd-transport/rrd_json.mli -%{_libdir}/ocaml/rrd-transport/rrd_protocol.cmx -%{_libdir}/ocaml/rrd-transport/rrd_protocol.mli -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.cmx -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v1.mli -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.cmx -%{_libdir}/ocaml/rrd-transport/rrd_protocol_v2.mli -%{_libdir}/ocaml/rrd-transport/rrd_reader.cmx -%{_libdir}/ocaml/rrd-transport/rrd_reader.mli -%{_libdir}/ocaml/rrd-transport/rrd_rpc.cmx -%{_libdir}/ocaml/rrd-transport/rrd_rpc.mli -%{_libdir}/ocaml/rrd-transport/rrd_writer.cmx -%{_libdir}/ocaml/rrd-transport/rrd_writer.mli - -%changelog -* Fri Oct 24 2014 Jon Ludlam - 0.7.2-1 -- Update to 0.7.2 - -* Sat Apr 26 2014 David Scott - 0.7.1-1 -- Update to 0.7.1 - -* Mon Dec 16 2013 John Else - 0.5.0-1 -- Initial package diff --git a/SPECS/ocaml-rrdd-plugin.spec b/SPECS/ocaml-rrdd-plugin.spec deleted file mode 100644 index 8816b31b..00000000 --- a/SPECS/ocaml-rrdd-plugin.spec +++ /dev/null @@ -1,76 +0,0 @@ -Name: ocaml-rrdd-plugin -Version: 0.6.1 -Release: 1%{?dist} -Summary: Plugin library for the XenServer RRD daemon -License: LGPL2.1 + OCaml linking exception -Group: Development/Other -URL: https://github.com/xapi-project/ocaml-rrdd-plugin/ -Source0: https://github.com/xapi-project/ocaml-rrdd-plugin/archive/%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: forkexecd-devel -BuildRequires: ocaml-rrd-transport-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-ocamldoc - -%description -Plugin library for the XenServer RRD daemon. - -%package devel -Summary: Development files for %{name} -Group: Development/Other -Requires: %{name} = %{version}-%{release} -Requires: forkexecd-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} -Requires: ocaml-xcp-idl-devel%{?_isa} -Requires: ocaml-xcp-rrd-devel%{?_isa} -Requires: ocaml-rrd-transport-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -make install - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root) -%doc LICENSE -%{_libdir}/ocaml/rrdd-plugin -%exclude %{_libdir}/ocaml/rrdd-plugin/*.a -%exclude %{_libdir}/ocaml/rrdd-plugin/*.cmx -%exclude %{_libdir}/ocaml/rrdd-plugin/*.cmxa -%exclude %{_libdir}/ocaml/rrdd-plugin/*.mli - -%files devel -%defattr(-,root,root) -%doc ChangeLog -%doc README.md -%{_libdir}/ocaml/rrdd-plugin/*.a -%{_libdir}/ocaml/rrdd-plugin/*.cmx -%{_libdir}/ocaml/rrdd-plugin/*.cmxa -%{_libdir}/ocaml/rrdd-plugin/*.mli - -%changelog -* Fri Oct 24 2014 Jon Ludlam - 0.6.1-1 -- New release - -* Tue Jul 8 2014 John Else - 0.5.0-1 -- Initial package diff --git a/SPECS/ocaml-sexplib.spec b/SPECS/ocaml-sexplib.spec deleted file mode 100644 index 87d84373..00000000 --- a/SPECS/ocaml-sexplib.spec +++ /dev/null @@ -1,92 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-sexplib -Version: 111.25.00 -Release: 1%{?dist} -Summary: Convert values to and from s-expressions in OCaml - -License: LGPLv2+ with exceptions and BSD -URL: https://ocaml.janestreet.com -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/sexplib-%{version}.tar.gz - -BuildRequires: ocaml >= 4.00.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv - -%description -Convert values to and from s-expressions in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camlp4-devel%{?_isa} -Requires: ocaml-type-conv%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n sexplib-%{version} - -%build -make - -%install -export DESTDIR=%{buildroot} -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES.md -%doc COPYRIGHT.txt -%doc INRIA-DISCLAIMER.txt -%doc INSTALL.txt -%doc LICENSE.txt -%doc LICENSE-Tywith.txt -%doc README.md -%doc THIRD-PARTY.txt -%{_libdir}/ocaml/sexplib -%exclude %{_libdir}/ocaml/sexplib/*.a -%exclude %{_libdir}/ocaml/sexplib/*.cmxa -%exclude %{_libdir}/ocaml/sexplib/*.cmx -%exclude %{_libdir}/ocaml/sexplib/*.mli -%{_libdir}/ocaml/sexplib_num -%exclude %{_libdir}/ocaml/sexplib_num/*.a -%exclude %{_libdir}/ocaml/sexplib_num/*.cmxa -%exclude %{_libdir}/ocaml/sexplib_num/*.cmx -%exclude %{_libdir}/ocaml/sexplib_num/*.mli -%{_libdir}/ocaml/sexplib_unix -%exclude %{_libdir}/ocaml/sexplib_unix/*.a -%exclude %{_libdir}/ocaml/sexplib_unix/*.cmxa -%exclude %{_libdir}/ocaml/sexplib_unix/*.cmx - -%files devel -%{_libdir}/ocaml/sexplib/*.a -%{_libdir}/ocaml/sexplib/*.cmx -%{_libdir}/ocaml/sexplib/*.cmxa -%{_libdir}/ocaml/sexplib/*.mli -%{_libdir}/ocaml/sexplib_num/*.a -%{_libdir}/ocaml/sexplib_num/*.cmx -%{_libdir}/ocaml/sexplib_num/*.cmxa -%{_libdir}/ocaml/sexplib_num/*.mli -%{_libdir}/ocaml/sexplib_unix/*.a -%{_libdir}/ocaml/sexplib_unix/*.cmx -%{_libdir}/ocaml/sexplib_unix/*.cmxa - -%changelog -* Thu Oct 23 2014 David Scott - 111.25.00-1 -- Update to 111.25.00 - -* Wed Jul 16 2014 David Scott - 111.17.00-1 -- Update to 111.17.00 for Mirage compat - -* Fri May 30 2014 Euan Harris - 109.20.00-2 -- Split files correctly between base and devel packages - -* Mon Jun 3 2013 David Scott - 109.20.00-1 -- Initial package - diff --git a/SPECS/ocaml-sha.spec b/SPECS/ocaml-sha.spec deleted file mode 100644 index ee9e3caf..00000000 --- a/SPECS/ocaml-sha.spec +++ /dev/null @@ -1,52 +0,0 @@ -Name: ocaml-sha -Version: 1.9 -Release: 2%{?dist} -Summary: OCaml SHA -License: LGPL2.1 -URL: https://github.com/vincenthz/ocaml-sha -Source0: https://github.com/vincenthz/ocaml-sha/archive/ocaml-sha-v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib - -%description -This is a set of C bindings for computing SHA digests. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{name}-v%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc README -%{_libdir}/ocaml/sha -%exclude %{_libdir}/ocaml/sha/*.a -%exclude %{_libdir}/ocaml/sha/*.cmxa -%exclude %{_libdir}/ocaml/sha/*.cmx - -%files devel -%{_libdir}/ocaml/sha/*.a -%{_libdir}/ocaml/sha/*.cmx -%{_libdir}/ocaml/sha/*.cmxa - -%changelog -* Tue Apr 22 2014 Euan Harris - 1.9-2 -- Split files correctly between base and devel packages - -* Mon Nov 18 2013 David Scott - 1.9-1 -- Initial package - diff --git a/SPECS/ocaml-shared-memory-ring.spec b/SPECS/ocaml-shared-memory-ring.spec deleted file mode 100644 index 07c2e06e..00000000 --- a/SPECS/ocaml-shared-memory-ring.spec +++ /dev/null @@ -1,60 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-shared-memory-ring -Version: 1.1.0 -Release: 1%{?dist} -Summary: OCaml implementation of Xen shared memory rings -License: ISC -URL: https://github.com/mirage/shared-memory-ring/ -Source0: https://github.com/mirage/shared-memory-ring/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-lwt-devel - -%description -The shared memory ring protocols are used for: xenstore, console, disk and network devices. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel%{?_isa} -Requires: ocaml-lwt-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n shared-memory-ring-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/shared-memory-ring -%exclude %{_libdir}/ocaml/shared-memory-ring/*.a -%exclude %{_libdir}/ocaml/shared-memory-ring/*.cmxa -%exclude %{_libdir}/ocaml/shared-memory-ring/*.cmx -%exclude %{_libdir}/ocaml/shared-memory-ring/*.mli - -%files devel -%{_libdir}/ocaml/shared-memory-ring/*.a -%{_libdir}/ocaml/shared-memory-ring/*.cmx -%{_libdir}/ocaml/shared-memory-ring/*.cmxa -%{_libdir}/ocaml/shared-memory-ring/*.mli - -%changelog -* Wed Jul 16 2014 David Scott - 1.1.0-1 -- Initial package diff --git a/SPECS/ocaml-ssl.spec b/SPECS/ocaml-ssl.spec deleted file mode 100644 index 3215b512..00000000 --- a/SPECS/ocaml-ssl.spec +++ /dev/null @@ -1,72 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-ssl -Version: 0.4.7 -Release: 1%{?dist} -Summary: Use OpenSSL from OCaml -License: LGPL -URL: http://downloads.sourceforge.net/project/savonet/ocaml-ssl -Source0: https://github.com/savonet/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: openssl-devel - -%description -Use OpenSSL from OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: openssl-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -./bootstrap -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot} - -%files -%doc CHANGES -%doc COPYING -%doc README -%{_libdir}/ocaml/ssl -%exclude %{_libdir}/ocaml/ssl/*.a -%exclude %{_libdir}/ocaml/ssl/*.cmxa -%exclude %{_libdir}/ocaml/ssl/*.cmx -%exclude %{_libdir}/ocaml/ssl/*.mli -%{_libdir}/ocaml/stublibs/dllssl_stubs.so -%{_libdir}/ocaml/stublibs/dllssl_stubs.so.owner -%{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so -%{_libdir}/ocaml/stublibs/dllssl_threads_stubs.so.owner - -%files devel -%{_libdir}/ocaml/ssl/*.a -%{_libdir}/ocaml/ssl/*.cmx -%{_libdir}/ocaml/ssl/*.cmxa -%{_libdir}/ocaml/ssl/*.mli - -%changelog -* Thu Oct 2 2014 Euan Harris - 0.4.7-1 -- Update to 0.4.7 and get source from GitHub - -* Fri May 30 2014 Euan Harris - 0.4.6-2 -- Split files correctly between base and devel packages - -* Sun Jun 2 2013 David Scott - 0.4.6-1 -- Initial package - diff --git a/SPECS/ocaml-stdext.spec b/SPECS/ocaml-stdext.spec deleted file mode 100644 index 0dba6a72..00000000 --- a/SPECS/ocaml-stdext.spec +++ /dev/null @@ -1,72 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-stdext -Version: 0.11.0 -Release: 1%{?dist} -Summary: Deprecated misc library functions for OCaml -License: LGPL -URL: https://github.com/xapi-project/stdext -Source0: https://github.com/xapi-project/stdext/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-uuidm-devel - -%description -Deprecated misc library functions for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-fd-send-recv-devel%{?_isa} -BuildRequires: ocaml-uuidm-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n stdext-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=${buildroot} - -%files -%doc README.md -%{_libdir}/ocaml/stdext -%exclude %{_libdir}/ocaml/stdext/*.a -%exclude %{_libdir}/ocaml/stdext/*.cmxa -%exclude %{_libdir}/ocaml/stdext/*.cmx -%exclude %{_libdir}/ocaml/stdext/*.mli -%{_libdir}/ocaml/stublibs/dllstdext_stubs.so -%{_libdir}/ocaml/stublibs/dllstdext_stubs.so.owner - -%files devel -%{_libdir}/ocaml/stdext/*.a -%{_libdir}/ocaml/stdext/*.cmx -%{_libdir}/ocaml/stdext/*.cmxa -%{_libdir}/ocaml/stdext/*.mli - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.11.0-1 -- Update to 0.11.0 - -* Fri May 30 2014 Euan Harris - 0.10.0-2 -- Split files correctly between base and devel packages - -* Tue Apr 1 2014 Euan Harris - 0.10.0-1 -- Update to 0.10.0, removing the Tar module (use ocaml-tar instead) - -* Tue Sep 10 2013 David Scott - 0.9.1-1 -- Update to 0.9.1 - -* Mon Jun 3 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-stringext.spec b/SPECS/ocaml-stringext.spec deleted file mode 100644 index 34872a39..00000000 --- a/SPECS/ocaml-stringext.spec +++ /dev/null @@ -1,56 +0,0 @@ -Name: ocaml-stringext -Version: 0.0.1 -Release: 1%{?dist} -Summary: String manipulation functions -License: Unknown -Group: Development/Libraries -URL: http://github.com/rgrinberg/stringext -Source0: https://github.com/rgrinberg/stringext/archive/v%{version}/stringext-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-findlib - -%description -Extra string functions for OCaml - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n stringext-%{version} - - -%build -ocaml setup.ml -configure -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install - -%files -%{_libdir}/ocaml/stringext -%exclude %{_libdir}/ocaml/stringext/*.a -%exclude %{_libdir}/ocaml/stringext/*.cmxa -%exclude %{_libdir}/ocaml/stringext/*.cmx -%exclude %{_libdir}/ocaml/stringext/*.mli - - -%files devel -%{_libdir}/ocaml/stringext/*.a -%{_libdir}/ocaml/stringext/*.cmx -%{_libdir}/ocaml/stringext/*.cmxa -%{_libdir}/ocaml/stringext/*.mli - -%changelog -* Fri May 2 2014 Jon Ludlam - 0.0.1-1 -- Initial package - diff --git a/SPECS/ocaml-tapctl.spec b/SPECS/ocaml-tapctl.spec deleted file mode 100644 index 521a32cb..00000000 --- a/SPECS/ocaml-tapctl.spec +++ /dev/null @@ -1,73 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-tapctl -Version: 0.9.2 -Release: 1%{?dist} -Summary: Manipulate running tapdisk instances -License: LGPL -URL: https://github.com/xapi-project/tapctl -Source0: https://github.com/xapi-project/tapctl/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: forkexecd-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel - -%description -Manipulate running tapdisk instances on a xen host. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: forkexecd-devel%{?_isa} -Requires: ocaml-rpc-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n tapctl-%{version} - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -export OCAMLFIND_LDCONF=ignore -make install - -%files -%doc ChangeLog -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/tapctl -%exclude %{_libdir}/ocaml/tapctl/*.a -%exclude %{_libdir}/ocaml/tapctl/*.cmxa -%exclude %{_libdir}/ocaml/tapctl/*.cmx -%exclude %{_libdir}/ocaml/tapctl/*.mli - -%files devel -%{_libdir}/ocaml/tapctl/*.a -%{_libdir}/ocaml/tapctl/*.cmx -%{_libdir}/ocaml/tapctl/*.cmxa -%{_libdir}/ocaml/tapctl/*.mli - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.9.2-1 -- Update to 0.9.2 - -* Fri May 30 2014 Euan Harris - 0.9.1-2 -- Split files correctly between base and devel packages - -* Fri Oct 25 2013 David Scott - 0.9.1-1 -- Update to 0.9.1 - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-tar.spec b/SPECS/ocaml-tar.spec deleted file mode 100644 index 95a4eb4f..00000000 --- a/SPECS/ocaml-tar.spec +++ /dev/null @@ -1,62 +0,0 @@ -Name: ocaml-tar -Version: 0.2.1 -Release: 2%{?dist} -Summary: OCaml parser and printer for tar-format data -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/djs55/ocaml-tar -Source0: https://github.com/djs55/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-camlp4-devel - -%description -This is a pure OCaml library for reading and writing tar-format data. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel%{?_isa} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-re-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -ocaml setup.ml -configure --destdir %{buildroot}%{_libdir}/ocaml -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -ocaml setup.ml -install - -%files -%doc README.md -%{_libdir}/ocaml/tar -%exclude %{_libdir}/ocaml/tar/*.a -%exclude %{_libdir}/ocaml/tar/*.cmxa -%exclude %{_libdir}/ocaml/tar/*.cmx -%exclude %{_libdir}/ocaml/tar/*.mli - -%files devel -%{_libdir}/ocaml/tar/*.a -%{_libdir}/ocaml/tar/*.cmx -%{_libdir}/ocaml/tar/*.cmxa -%{_libdir}/ocaml/tar/*.mli - -%changelog -* Fri May 30 2014 Euan Harris - 0.2.1-2 -- Split files correctly between base and devel packages - -* Fri Nov 15 2013 David Scott - 0.2.1-1 -- Initial package diff --git a/SPECS/ocaml-testvmlib.spec b/SPECS/ocaml-testvmlib.spec deleted file mode 100644 index 68f80e90..00000000 --- a/SPECS/ocaml-testvmlib.spec +++ /dev/null @@ -1,78 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-testvmlib -Version: 0.3 -Release: 1%{?dist} -Summary: Mirage test VM library -License: ISC -URL: https://github.com/mirage/testvm-idl/ -Source0: https://github.com/mirage/testvm-idl/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: xen-devel -BuildRequires: ocaml-gnt-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-vchan-devel -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-mirage-devel -BuildRequires: ocaml-ipaddr-devel - -%description -An interface definition, library and command-line tool for Mirage VM testing. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel%{?_isa} -Requires: ocaml-mirage-devel%{?_isa} -Requires: xen-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n testvm-idl-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install -mkdir %{buildroot}%{_bindir} -cp client.native %{buildroot}%{_bindir}/mirage-testvm-cli - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/testvmlib -%exclude %{_libdir}/ocaml/testvmlib/*.a -%exclude %{_libdir}/ocaml/testvmlib/*.cmxa -%exclude %{_libdir}/ocaml/testvmlib/*.cmx -%exclude %{_libdir}/ocaml/testvmlib/*.ml -%{_bindir}/mirage-testvm-cli - -%files devel -%{_libdir}/ocaml/testvmlib/*.a -%{_libdir}/ocaml/testvmlib/*.cmx -%{_libdir}/ocaml/testvmlib/*.cmxa - -%changelog -* Wed Jul 16 2014 David Scott - 0.3-1 -- Update to 0.3 - -* Wed Jul 16 2014 David Scott - 0.2-1 -- Initial package diff --git a/SPECS/ocaml-text.spec b/SPECS/ocaml-text.spec deleted file mode 100644 index 272f6889..00000000 --- a/SPECS/ocaml-text.spec +++ /dev/null @@ -1,72 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-text -Version: 0.7.1 -Release: 1%{?dist} -Summary: Library for dealing with unicode text conveniently - -License: BSD -URL: https://github.com/vbmithr/ocaml-text -Source0: https://github.com/vbmithr/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-camlp4 -BuildRequires: ocaml-ocamldoc - -%description -OCaml-Text is a library for dealing with ``text'', i.e. sequence of -unicode characters, in a convenient way. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix /usr -make - -%install -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -make install - -# Remove this, reinstall it properly with a %%doc rule below. -rm -rf $RPM_BUILD_ROOT/usr/local/share/doc - -%files -%{_libdir}/ocaml/text -%exclude %{_libdir}/ocaml/text/*.a -%exclude %{_libdir}/ocaml/text/*.cmxa -%exclude %{_libdir}/ocaml/text/*.cmx -%exclude %{_libdir}/ocaml/text/*.mli -%{_libdir}/ocaml/stublibs/dllbigarray_stubs.so -%{_libdir}/ocaml/stublibs/dllbigarray_stubs.so.owner -%{_libdir}/ocaml/stublibs/dlltext_stubs.so -%{_libdir}/ocaml/stublibs/dlltext_stubs.so.owner - -%files devel -%{_libdir}/ocaml/text/*.a -%{_libdir}/ocaml/text/*.cmx -%{_libdir}/ocaml/text/*.cmxa -%{_libdir}/ocaml/text/*.mli - -%changelog -* Thu Oct 2 2014 Euan Harris - 0.7.1-1 -- Update to 0.7.1 and get source from GitHub - -* Mon Jun 02 2014 Euan Harris - 0.6-2 -- Split files correctly between base and devel packages - -* Sat Jun 01 2013 David Scott - 0.6-1 -- Initial package - diff --git a/SPECS/ocaml-textutils.spec b/SPECS/ocaml-textutils.spec deleted file mode 100644 index 1437a68d..00000000 --- a/SPECS/ocaml-textutils.spec +++ /dev/null @@ -1,108 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-textutils -Version: 112.01.00 -Release: 1%{?dist} -Summary: Syntax extension for inserting the current location. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/textutils -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/textutils-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-async-devel -BuildRequires: ocaml-core-devel -BuildRequires: ocaml-pa-ounit-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-enumerate-devel - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Syntax extension for inserting the current location. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n textutils-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/textutils -%if %opt -%exclude %{_libdir}/ocaml/textutils/*.a -%exclude %{_libdir}/ocaml/textutils/*.cmxa -%endif -%exclude %{_libdir}/ocaml/textutils/*.ml -%exclude %{_libdir}/ocaml/textutils/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/textutils/*.a -%{_libdir}/ocaml/textutils/*.cmxa -%endif -%{_libdir}/ocaml/textutils/*.ml -%{_libdir}/ocaml/textutils/*.mli - - -%changelog -* Tue Oct 14 2014 David Scott - 112.01.00-1 -- Update to 112.01.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.35.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-type-conv.spec b/SPECS/ocaml-type-conv.spec deleted file mode 100644 index 3c190a3a..00000000 --- a/SPECS/ocaml-type-conv.spec +++ /dev/null @@ -1,61 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-type-conv -Version: 111.13.00 -Release: 1%{?dist} -Summary: OCaml base library for type conversion - -License: LGPLv2+ with exceptions and BSD -URL: http://www.ocaml.info/software.html#type_driven -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/type_conv-%{version}.tar.gz -#Patch0: type-conv-META.patch - -BuildRequires: ocaml >= 4.00.0 -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel - -%description -The type-conv mini library factors out functionality needed by -different preprocessors that generate code from type specifications, -because this functionality cannot be duplicated without losing the -ability to use these preprocessors simultaneously. - -%prep -%setup -q -n type_conv-%{version} -#%patch0 -p1 -#dos2unix LICENSE.Tywith - -%build -make - -%install -export DESTDIR=%{buildroot} -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - - -%files -%doc CHANGES.txt COPYRIGHT.txt INRIA-DISCLAIMER.txt INSTALL.txt LICENSE-Tywith.txt LICENSE.txt README.md THIRD-PARTY.txt -%{_libdir}/ocaml/type_conv - -%changelog -* Wed Jul 16 2014 David Scott - 111.13.00-1 -- Updated to 111.13.00 for Mirage compatibility - -* Thu Nov 25 2010 Mike McClurg - 109.20.00-1 -- Updated to version 2.0.1 for compatability with OCaml 3.12.0 - -* Fri May 14 2010 David Scott -- Customised for XCP - -* Wed Jan 07 2009 Florent Monnier 1.6.5-1mdv2009.1 -+ Revision: 326698 -- corrected group -- import ocaml-type-conv - - -* Sat Dec 20 2008 Florent Monnier 1.6.5-1mdv -- Initial RPM release made from the fedora rpm .spec file (revision 1.9) by Richard W.M. Jones -# found there: http://cvs.fedoraproject.org/viewvc/devel/ocaml-type-conv/ocaml-type-conv.spec diff --git a/SPECS/ocaml-typerep.spec b/SPECS/ocaml-typerep.spec deleted file mode 100644 index 8b86e6ce..00000000 --- a/SPECS/ocaml-typerep.spec +++ /dev/null @@ -1,118 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-typerep -Version: 111.17.00 -Release: 1%{?dist} -Summary: Runtime types for OCaml. - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/typerep -Source0: https://ocaml.janestreet.com/ocaml-core/%{version}/individual/typerep-%{version}.tar.gz -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-bin-prot >= 109.53.02 -BuildRequires: ocaml-sexplib >= 109.55.02 -BuildRequires: ocaml-type-conv - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -Runtime types for OCaml. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-sexplib -Requires: ocaml-bin-prot -Requires: ocaml-type-conv - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n typerep-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/typerep_lib -%{_libdir}/ocaml/typerep_extended -%{_libdir}/ocaml/typerep_generics_sexprep -%if %opt -%exclude %{_libdir}/ocaml/typerep_lib/*.a -%exclude %{_libdir}/ocaml/typerep_lib/*.cmxa -%exclude %{_libdir}/ocaml/typerep_extended/*.a -%exclude %{_libdir}/ocaml/typerep_extended/*.cmxa -%exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa -%endif -%exclude %{_libdir}/ocaml/typerep_lib/*.ml -%exclude %{_libdir}/ocaml/typerep_lib/*.mli -%exclude %{_libdir}/ocaml/typerep_extended/*.ml -%exclude %{_libdir}/ocaml/typerep_extended/*.mli -%exclude %{_libdir}/ocaml/typerep_generics_sexprep/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%if %opt -%{_libdir}/ocaml/typerep_lib/*.a -%{_libdir}/ocaml/typerep_lib/*.cmxa -%{_libdir}/ocaml/typerep_extended/*.a -%{_libdir}/ocaml/typerep_extended/*.cmxa -%{_libdir}/ocaml/typerep_generics_sexprep/*.cmxa -%endif -%{_libdir}/ocaml/typerep_lib/*.ml -%{_libdir}/ocaml/typerep_lib/*.mli -%{_libdir}/ocaml/typerep_extended/*.ml -%{_libdir}/ocaml/typerep_extended/*.mli -%{_libdir}/ocaml/typerep_generics_sexprep/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 111.17.00-1 -- Update to 111.17.00 - -* Wed Jan 01 2014 Edvard Fagerholm - 109.55.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-ulex.spec b/SPECS/ocaml-ulex.spec deleted file mode 100644 index e3e14cf4..00000000 --- a/SPECS/ocaml-ulex.spec +++ /dev/null @@ -1,37 +0,0 @@ -Name: ocaml-ulex -Version: 1.1 -Release: 1%{?dist} -Summary: lexer generator for Unicode and OCaml -License: ISC -URL: http://ftp.de.debian.org/debian/pool/main/u/ulex/ulex_1.1.orig.tar.gz -Source0: http://ftp.de.debian.org/debian/pool/main/u/ulex/ulex_1.1.orig.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel - -%description -lexer generator for Unicode and OCaml - -%prep -%setup -q -n ulex-%{version} - -%build -make -make all.opt - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%{_libdir}/ocaml/ulex -%{_libdir}/ocaml/ulex/*.a -%{_libdir}/ocaml/ulex/*.cmxa -%{_libdir}/ocaml/ulex/*.cmx -%{_libdir}/ocaml/ulex/*.mli - -%changelog -* Thu Oct 16 2014 David Scott - 1.1-1 -- Initial package diff --git a/SPECS/ocaml-uri.spec b/SPECS/ocaml-uri.spec deleted file mode 100644 index be0ef32f..00000000 --- a/SPECS/ocaml-uri.spec +++ /dev/null @@ -1,72 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-uri -Version: 1.6.0 -Release: 1%{?dist} -Summary: A URI library for OCaml -License: ISC -URL: https://github.com/mirage/ocaml-uri -Source0: https://github.com/mirage/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml >= 4.00 -BuildRequires: ocaml-compiler-libs -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-stringext-devel -BuildRequires: ocaml-sexplib-devel - -%description -A URI library for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-re-devel%{?_isa} -Requires: ocaml-stringext-devel%{?_isa} -Requires: ocaml-sexplib-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/uri -%exclude %{_libdir}/ocaml/uri/*.a -%exclude %{_libdir}/ocaml/uri/*.cmxa -%exclude %{_libdir}/ocaml/uri/*.cmx -%exclude %{_libdir}/ocaml/uri/*.mli - -%files devel -%doc uri.docdir/* -%exclude %{_libdir}/ocaml/usr/local/share/doc/uri/ -%exclude /usr/share/doc/%{name}-%{version}/ -%{_libdir}/ocaml/uri/*.a -%{_libdir}/ocaml/uri/*.cmx -%{_libdir}/ocaml/uri/*.cmxa -%{_libdir}/ocaml/uri/*.mli - -%changelog -* Fri Jun 06 2014 Jon Ludlam - 1.6.0-1 -- Update to 1.6.0 - -* Mon Jun 02 2014 David Scott - 1.3.8-2 -- Split files correctly between base and devel packages - -* Thu May 30 2013 David Scott - 1.3.8-1 -- Initial package - diff --git a/SPECS/ocaml-uuidm.spec b/SPECS/ocaml-uuidm.spec deleted file mode 100644 index 14073d44..00000000 --- a/SPECS/ocaml-uuidm.spec +++ /dev/null @@ -1,66 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-uuidm -Version: 0.9.5 -Release: 3%{?dist} -Summary: Universally Unique IDentifiers (UUIDs) for OCaml -License: BSD3 -URL: http://erratique.ch/software/uuidm -Source0: https://github.com/dbuenzli/uuidm/archive/v%{version}/uuidm-%{version}.tar.gz -Patch0: uuidm.oasis.patch -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -Uuidm is an OCaml module implementing 128 bits universally unique -identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 -(random based) according to RFC 4122. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n uuidm-%{version} -%patch0 -p1 - -%build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install -rm -f %{buildroot}/%{_libdir}/ocaml/usr/local/bin/uuidtrip - -%files -%doc CHANGES -%doc README -%{_libdir}/ocaml/uuidm -%exclude %{_libdir}/ocaml/uuidm/*.a -%exclude %{_libdir}/ocaml/uuidm/*.cmxa -%exclude %{_libdir}/ocaml/uuidm/*.cmx -%exclude %{_libdir}/ocaml/uuidm/*.mli - -%files devel -%{_libdir}/ocaml/uuidm/*.a -%{_libdir}/ocaml/uuidm/*.cmx -%{_libdir}/ocaml/uuidm/*.cmxa -%{_libdir}/ocaml/uuidm/*.mli - -%changelog -* Mon Jun 02 2014 Euan Harris - 0.9.5-3 -- Split files correctly between base and devel packages - -* Mon May 19 2014 Euan Harris - 0.9.5-2 -- Switch to GitHub mirror - -* Wed May 29 2013 David Scott - 0.9.5-1 -- Initial package - diff --git a/SPECS/ocaml-uutf.spec b/SPECS/ocaml-uutf.spec deleted file mode 100644 index 715b1a00..00000000 --- a/SPECS/ocaml-uutf.spec +++ /dev/null @@ -1,68 +0,0 @@ -Name: ocaml-uutf -Version: 0.9.3 -Release: 3%{?dist} -Summary: Non-blocking streaming codec for UTF-8, UTF-16, UTF-16LE and UTF-16BE -License: BSD3 -URL: http://erratique.ch/software/uutf -Source0: https://github.com/dbuenzli/uutf/archive/v%{version}/uutf-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -Uutf is an non-blocking streaming Unicode codec for OCaml to decode and -encode the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can -efficiently work character by character without blocking on IO. Decoders -perform character position tracking and support newline normalization. - -Functions are also provided to fold over the characters of UTF encoded -OCaml string values and to directly encode characters in OCaml Buffer.t -values. - -Uutf is made of a single, independent, module and distributed under the -BSD3 license. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n uutf-%{version} - -%build -./pkg/pkg-git -./pkg/build true - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}%{_libdir}/ocaml/uutf -(cd _build/src; ocamlfind install uutf ../pkg/META uutf.mli uutf.cmi uutf.cmx uutf.cma uutf.a uutf.cma uutf.cmxa uutf.cmxs) -#ocamlfind install uutf _build/pkg/META _build/src/uutf.{mli,cmi,cmx,cma,a,cmxa,cmxs} - - -%files -%{_libdir}/ocaml/uutf/META -%{_libdir}/ocaml/uutf/uutf.cmi -%{_libdir}/ocaml/uutf/uutf.cma - -%files devel -%{_libdir}/ocaml/uutf/uutf.cmx -%{_libdir}/ocaml/uutf/uutf.cmxa -%{_libdir}/ocaml/uutf/uutf.cmxs -%{_libdir}/ocaml/uutf/uutf.a -%{_libdir}/ocaml/uutf/uutf.mli - - -%changelog -* Mon May 19 2014 Euan Harris - 0.9.3-3 -- Switch to GitHub mirror - -* Fri Oct 18 2013 David Scott - 0.9.3-2 -- 'Ported' from xen-dist-ocaml to xenserver-core - -* Fri Oct 11 2013 Jon Ludlam - 0.9.3-1 -- Initial RPM release diff --git a/SPECS/ocaml-variantslib.spec b/SPECS/ocaml-variantslib.spec deleted file mode 100644 index 82af22b8..00000000 --- a/SPECS/ocaml-variantslib.spec +++ /dev/null @@ -1,98 +0,0 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -Name: ocaml-variantslib -Version: 109.15.02 -Release: 1%{?dist} -Summary: OCaml variants as first class values - -Group: Development/Libraries -License: Apache Software License 2.0 -URL: https://github.com/janestreet/variantslib -Source0: https://ocaml.janestreet.com/ocaml-core/109.15.00/individual/variantslib-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x - -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-type-conv >= 109.53.02 -BuildRequires: ocaml-ocamldoc - -%define _use_internal_dependency_generator 0 -%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh - - -%description -OCaml variants as first class values. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%setup -q -n variantslib-%{version} - -%build -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - - -%check -ocaml setup.ml -test - - -%install -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt -%{_libdir}/ocaml/variantslib -%if %opt -%exclude %{_libdir}/ocaml/variantslib/*.a -%exclude %{_libdir}/ocaml/variantslib/*.cmxa -%endif -%exclude %{_libdir}/ocaml/variantslib/*.mli - - -%files devel -%defattr(-,root,root,-) -%doc COPYRIGHT.txt LICENSE.txt THIRD-PARTY.txt INRIA-DISCLAIMER.txt README.txt -%if %opt -%{_libdir}/ocaml/variantslib/*.a -%{_libdir}/ocaml/variantslib/*.cmxa -%endif -%{_libdir}/ocaml/variantslib/*.mli - - -%changelog -* Wed Jan 01 2014 Edvard Fagerholm - 109.15.02-1 -- Initial package for Fedora 20. diff --git a/SPECS/ocaml-vchan.spec b/SPECS/ocaml-vchan.spec deleted file mode 100644 index c0d9896e..00000000 --- a/SPECS/ocaml-vchan.spec +++ /dev/null @@ -1,68 +0,0 @@ -%define debug_package %{nil} - -Name: ocaml-vchan -Version: 1.0.0 -Release: 1%{?dist} -Summary: OCaml implementation of the Xen Vchan protocol -License: ISC -URL: https://github.com/mirage/ocaml-vchan/ -Source0: https://github.com/mirage/ocaml-vchan/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-mirage-types-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-gnt-devel -BuildRequires: ocaml-ipaddr-devel -BuildRequires: ocaml-sexplib-devel - -%description -The Xen Vchan protocol allows high-bandwidth private communication channels -between VMs over shared memory. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-io-page-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=%{buildroot}%{_libdir}/ocaml/ld.conf -make install - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/vchan -%exclude %{_libdir}/ocaml/vchan/*.a -%exclude %{_libdir}/ocaml/vchan/*.cmxa -%exclude %{_libdir}/ocaml/vchan/*.cmx -%exclude %{_libdir}/ocaml/vchan/*.mli - -%files devel -%{_libdir}/ocaml/vchan/*.a -%{_libdir}/ocaml/vchan/*.cmx -%{_libdir}/ocaml/vchan/*.cmxa -%{_libdir}/ocaml/vchan/*.mli - -%changelog -* Wed Jul 16 2014 David Scott - 1.0.0-1 -- Initial package diff --git a/SPECS/ocaml-vhd.spec b/SPECS/ocaml-vhd.spec deleted file mode 100644 index 27357026..00000000 --- a/SPECS/ocaml-vhd.spec +++ /dev/null @@ -1,97 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-vhd -Version: 0.7.2 -Release: 1%{?dist} -Summary: Pure OCaml library for reading, writing, streaming, converting vhd format files -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/djs55/ocaml-vhd -Source0: https://github.com/djs55/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-uuidm-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-mirage-types-devel - -%description -A pure OCaml parser and printer for vhd format data. The library allows -vhd files to be read, written and streamed with on-the-fly format conversion. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel%{?_isa} -Requires: ocaml-io-page-devel%{?_isa} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-ounit-devel%{?_isa} -Requires: ocaml-mirage-types-devel%{?_isa} -Requires: ocaml-uuidm-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -# The auto-requirements script can't handle packed libraries. -%{?filter_setup: -%filter_from_requires /ocaml(Patterns)/d -%filter_from_requires /ocaml(S)/d -%filter_setup -} - - -%prep -%setup -q - -%build -if [ -x ./configure ]; then - ./configure -fi -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -ocaml setup.ml -install - - -%files -%doc CHANGES -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/vhd-format -%{_libdir}/ocaml/stublibs/dllvhd* -%exclude %{_libdir}/ocaml/vhd-format/*.a -%exclude %{_libdir}/ocaml/vhd-format/*.cmxa -%exclude %{_libdir}/ocaml/vhd-format/*.cmx -%exclude %{_libdir}/ocaml/vhd-format/*.ml -%exclude %{_libdir}/ocaml/vhd-format/*.mli - - -%files devel -%{_libdir}/ocaml/vhd-format/*.a -%{_libdir}/ocaml/vhd-format/*.cmx -%{_libdir}/ocaml/vhd-format/*.cmxa -%{_libdir}/ocaml/vhd-format/*.mli - - -%changelog -* Thu Oct 2 2014 David Scott - 0.7.2-1 -- Update to 0.7.2 - -* Tue Apr 1 2014 Euan Harris - 0.7.0-1 -- Update to 0.7.0 - -* Thu Nov 21 2013 David Scott - 0.6.4-1 -- Update to 0.6.4 - -* Wed Oct 30 2013 David Scott - 0.6.1-1 -- Update to 0.6.1 - -* Wed Oct 02 2013 David Scott - 0.6.0-1 -- Initial package - diff --git a/SPECS/ocaml-xcp-idl.spec b/SPECS/ocaml-xcp-idl.spec deleted file mode 100644 index b318fd4f..00000000 --- a/SPECS/ocaml-xcp-idl.spec +++ /dev/null @@ -1,106 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xcp-idl -Version: 0.9.20 -Release: 1%{?dist} -Summary: Common interface definitions for XCP services -License: LGPL -URL: https://github.com/xapi-project/xcp-idl -Source0: https://github.com/xapi-project/xcp-idl/archive/v%{version}/xcp-idl-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-findlib -BuildRequires: message-switch-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-xcp-inventory-devel - -%description -Common interface definitions for XCP services. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cmdliner-devel%{?_isa} -Requires: message-switch-devel%{?_isa} -Requires: ocaml-uri-devel%{?_isa} -Requires: ocaml-re-devel%{?_isa} -Requires: ocaml-cohttp-devel%{?_isa} -Requires: ocaml-rpc-devel%{?_isa} -Requires: ocaml-fd-send-recv-devel%{?_isa} -Requires: ocaml-xmlm-devel%{?_isa} -Requires: ocaml-sexplib-devel%{?_isa} -Requires: ocaml-xcp-inventory-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n xcp-idl-%{version} - -%build -ocaml setup.ml -configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -export OCAMLFIND_LDCONF=ignore -make install - -%files -%doc CHANGES -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/xcp -%exclude %{_libdir}/ocaml/xcp/*.a -%exclude %{_libdir}/ocaml/xcp/*.cmxa -%exclude %{_libdir}/ocaml/xcp/*.cmx -%exclude %{_libdir}/ocaml/xcp/*.mli - -%files devel -%{_libdir}/ocaml/xcp/*.a -%{_libdir}/ocaml/xcp/*.cmx -%{_libdir}/ocaml/xcp/*.cmxa -%{_libdir}/ocaml/xcp/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 0.9.20-1 -- Update to 0.9.20 - -* Wed Aug 20 2014 Jon Ludlam - 0.9.18-1 -- Update to 0.9.18 - -* Fri Jun 06 2014 Jon Ludlam - 0.9.17-1 -- Update to 0.9.17 - -* Mon Jun 02 2014 Euan Harris - 0.9.16-2 -- Split files correctly between base and devel packages - -* Fri May 9 2014 David Scott - 0.9.16-1 -- Update to 0.9.16, with RRD fixes - -* Fri Apr 25 2014 David Scott - 0.9.15-1 -- Update to 0.9.15, now with vGPU and SR.probe - -* Thu Sep 26 2013 David Scott - 0.9.14-1 -- Support searching for executables on the XCP_PATH as well as the PATH - -* Wed Sep 25 2013 David Scott -- Logging, channel passing and interface updates - -* Wed Sep 04 2013 David Scott - 0.9.12-1 -- Allow domain 0 memory policy to be queried - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xcp-inventory.spec b/SPECS/ocaml-xcp-inventory.spec deleted file mode 100644 index 9d2fc8d7..00000000 --- a/SPECS/ocaml-xcp-inventory.spec +++ /dev/null @@ -1,61 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xcp-inventory -Version: 0.9.1 -Release: 1%{?dist} -Summary: OCaml library to read and write the XCP inventory file -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/xcp-inventory -Source0: https://github.com/xapi-project/xcp-inventory/archive/v%{version}/xcp-inventory-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-obuild -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-uuidm-devel - -%description -A simple library to read and write the XCP inventory file. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-stdext-devel%{?_isa} -Requires: ocaml-uuidm-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n xcp-inventory-%{version} - -%build -if [ -x ./configure ]; then - ./configure --default_inventory=/etc/xcp/inventory -fi -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p %{buildroot}/etc/xcp - - -%files -/etc/xcp - -%files devel -%doc ChangeLog README.md LICENSE - -%{_libdir}/ocaml/xcp-inventory/* - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.9.1-1 -- Update to 0.9.1 - -* Wed Jun 5 2013 David Scott - 0.9.0-1 -- Initial package - diff --git a/SPECS/ocaml-xcp-rrd.spec b/SPECS/ocaml-xcp-rrd.spec deleted file mode 100644 index 86b08e66..00000000 --- a/SPECS/ocaml-xcp-rrd.spec +++ /dev/null @@ -1,64 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xcp-rrd -Version: 0.9.0 -Release: 2%{?dist} -Summary: Round-Robin Datasources in OCaml -License: LGPL -URL: https://github.com/xapi-project/xcp-rrd -Source0: https://github.com/xapi-project/xcp-rrd/archive/xcp-rrd-%{version}/xcp-rrd-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-uuidm-devel - -%description -Round-Robin Datasources in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-rpc-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} -Requires: ocaml-uuidm-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n xcp-rrd-xcp-rrd-%{version} - -%build -make - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -make install - -%files -%doc ChangeLog -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/xcp-rrd -%exclude %{_libdir}/ocaml/xcp-rrd/*.a -%exclude %{_libdir}/ocaml/xcp-rrd/*.cmxa -%exclude %{_libdir}/ocaml/xcp-rrd/*.cmx - -%files devel -%{_libdir}/ocaml/xcp-rrd/*.a -%{_libdir}/ocaml/xcp-rrd/*.cmxa -%{_libdir}/ocaml/xcp-rrd/*.cmx - -%changelog -* Mon Jun 2 2014 Euan Harris - 0.9.0-2 -- Split files correctly between base and devel packages - -* Thu Jun 6 2013 David Scott - 0.9.0-1 -- Initial package - diff --git a/SPECS/ocaml-xen-api-client.spec b/SPECS/ocaml-xen-api-client.spec deleted file mode 100644 index c40464be..00000000 --- a/SPECS/ocaml-xen-api-client.spec +++ /dev/null @@ -1,84 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xen-api-client -Version: 0.9.7 -Release: 1%{?dist} -Summary: XenServer XenAPI Client Library for OCaml -License: LGPLv2 -URL: https://github.com/xapi-project/xen-api-client -Source0: https://github.com/xapi-project/xen-api-client/archive/%{version}/xen-api-client-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-uri-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-cstruct-devel - -%description -XenAPI Client is an OCaml library implementing XenServer's XenAPI. -It is used for programmatically controlling a pool of XenServer -virtualization hosts. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-xmlm-devel%{?_isa} -Requires: ocaml-cohttp-devel%{?_isa} -Requires: ocaml-rpc-devel%{?_isa} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-uri-devel%{?_isa} -Requires: ocaml-cstruct-devel%{?_isa} - -%description devel -XenAPI Client is an OCaml library implementing XenServer's XenAPI. -It is used for programmatically controlling a pool of XenServer -virtualization hosts. - -%prep -%setup -q -n xen-api-client-%{version} - -%build -ocaml setup.ml -configure --disable-tests --enable-lwt -make -make doc - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - - -%files -%doc CHANGES -%doc README.md -%{_libdir}/ocaml/xen-api-client -%exclude %{_libdir}/ocaml/xen-api-client/*.a -%exclude %{_libdir}/ocaml/xen-api-client/*.cmxa -%exclude %{_libdir}/ocaml/xen-api-client/*.cmx -%exclude %{_libdir}/ocaml/xen-api-client/*.mli - -%files devel -%{_libdir}/ocaml/xen-api-client/*.a -%{_libdir}/ocaml/xen-api-client/*.cmx -%{_libdir}/ocaml/xen-api-client/*.cmxa -%{_libdir}/ocaml/xen-api-client/*.mli - -%changelog -* Tue Oct 14 2014 David Scott - 0.9.7-1 -- Update to 0.9.7 - -* Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 -- Update to 0.9.6 - -* Mon Jun 2 2014 Euan Harris - 0.9.4-2 -- Split files correctly between base and devel packages - -* Wed Jun 5 2013 David Scott - 0.9.4-1 -- Update to 0.9.3 - -* Wed May 29 2013 Mike McClurg -- Initial package diff --git a/SPECS/ocaml-xen-api-libs-transitional.spec b/SPECS/ocaml-xen-api-libs-transitional.spec deleted file mode 100644 index 45f147cc..00000000 --- a/SPECS/ocaml-xen-api-libs-transitional.spec +++ /dev/null @@ -1,207 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xen-api-libs-transitional -Version: 0.9.6 -Release: 2%{?dist} -Summary: Deprecated standard library extension for OCaml -License: LGPL2.1 + OCaml linking exception -URL: https://github.com/xapi-project/xen-api-libs-transitional -Source0: https://github.com/xapi-project/xen-api-libs-transitional/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: forkexecd-devel -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: xen-devel -BuildRequires: ocaml-xcp-idl-devel -Requires: xen-libs - -%description -A deprecated standard library extension for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n xen-api-libs-transitional-%{version} - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install DESTDIR=$OCAMLFIND_DESTDIR - -%files -%doc ChangeLog -%doc LICENSE -%doc README.md - -%{_libdir}/ocaml/cpuid -%exclude %{_libdir}/ocaml/cpuid/*.a -%exclude %{_libdir}/ocaml/cpuid/*.cmxa -%exclude %{_libdir}/ocaml/cpuid/*.cmx -%exclude %{_libdir}/ocaml/cpuid/*.mli -%{_libdir}/ocaml/stublibs/dllcpuid_stubs.so -%{_libdir}/ocaml/stublibs/dllcpuid_stubs.so.owner - -%{_libdir}/ocaml/gzip -%exclude %{_libdir}/ocaml/gzip/*.a -%exclude %{_libdir}/ocaml/gzip/*.cmxa -%exclude %{_libdir}/ocaml/gzip/*.cmx -%exclude %{_libdir}/ocaml/gzip/*.mli - -%{_libdir}/ocaml/http-svr -%exclude %{_libdir}/ocaml/http-svr/*.a -%exclude %{_libdir}/ocaml/http-svr/*.cmxa -%exclude %{_libdir}/ocaml/http-svr/*.cmx -%exclude %{_libdir}/ocaml/http-svr/*.mli - -%{_libdir}/ocaml/pciutil -%exclude %{_libdir}/ocaml/pciutil/*.a -%exclude %{_libdir}/ocaml/pciutil/*.cmxa -%exclude %{_libdir}/ocaml/pciutil/*.cmx -%exclude %{_libdir}/ocaml/pciutil/*.mli - -%{_libdir}/ocaml/sexpr -%exclude %{_libdir}/ocaml/sexpr/*.a -%exclude %{_libdir}/ocaml/sexpr/*.cmxa -%exclude %{_libdir}/ocaml/sexpr/*.cmx -%exclude %{_libdir}/ocaml/sexpr/*.mli - -%{_libdir}/ocaml/sha1 -%exclude %{_libdir}/ocaml/sha1/*.a -%exclude %{_libdir}/ocaml/sha1/*.cmxa -%exclude %{_libdir}/ocaml/sha1/*.cmx -%exclude %{_libdir}/ocaml/sha1/*.mli - -%{_libdir}/ocaml/stunnel -%exclude %{_libdir}/ocaml/stunnel/*.a -%exclude %{_libdir}/ocaml/stunnel/*.cmxa -%exclude %{_libdir}/ocaml/stunnel/*.cmx -%exclude %{_libdir}/ocaml/stunnel/*.mli - -%{_libdir}/ocaml/uuid -%exclude %{_libdir}/ocaml/uuid/*.a -%exclude %{_libdir}/ocaml/uuid/*.cmxa -%exclude %{_libdir}/ocaml/uuid/*.cmx -%exclude %{_libdir}/ocaml/uuid/*.mli - -%{_libdir}/ocaml/xenctrlext -%exclude %{_libdir}/ocaml/xenctrlext/*.a -%exclude %{_libdir}/ocaml/xenctrlext/*.cmxa -%exclude %{_libdir}/ocaml/xenctrlext/*.cmx -%exclude %{_libdir}/ocaml/xenctrlext/*.mli -%{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so -%{_libdir}/ocaml/stublibs/dllxenctrlext_stubs.so.owner - -%{_libdir}/ocaml/xenstore-compat -%exclude %{_libdir}/ocaml/xenstore-compat/*.a -%exclude %{_libdir}/ocaml/xenstore-compat/*.cmxa -%exclude %{_libdir}/ocaml/xenstore-compat/*.cmx - -%{_libdir}/ocaml/xen-utils -%exclude %{_libdir}/ocaml/xen-utils/*.a -%exclude %{_libdir}/ocaml/xen-utils/*.cmxa -%exclude %{_libdir}/ocaml/xen-utils/*.cmx -%exclude %{_libdir}/ocaml/xen-utils/*.mli - -%{_libdir}/ocaml/xml-light2 -%exclude %{_libdir}/ocaml/xml-light2/*.a -%exclude %{_libdir}/ocaml/xml-light2/*.cmxa -%exclude %{_libdir}/ocaml/xml-light2/*.cmx -%exclude %{_libdir}/ocaml/xml-light2/*.mli - - -%files devel -%{_libdir}/ocaml/cpuid/*.a -%{_libdir}/ocaml/cpuid/*.cmxa -%{_libdir}/ocaml/cpuid/*.cmx -%{_libdir}/ocaml/cpuid/*.mli - -%{_libdir}/ocaml/gzip/*.a -%{_libdir}/ocaml/gzip/*.cmxa -%{_libdir}/ocaml/gzip/*.cmx -%{_libdir}/ocaml/gzip/*.mli - -%{_libdir}/ocaml/http-svr/*.a -%{_libdir}/ocaml/http-svr/*.cmxa -%{_libdir}/ocaml/http-svr/*.cmx -%{_libdir}/ocaml/http-svr/*.mli - -%{_libdir}/ocaml/pciutil/*.a -%{_libdir}/ocaml/pciutil/*.cmxa -%{_libdir}/ocaml/pciutil/*.cmx -%{_libdir}/ocaml/pciutil/*.mli - -%{_libdir}/ocaml/sexpr/*.a -%{_libdir}/ocaml/sexpr/*.cmxa -%{_libdir}/ocaml/sexpr/*.cmx -%{_libdir}/ocaml/sexpr/*.mli - -%{_libdir}/ocaml/sha1/*.a -%{_libdir}/ocaml/sha1/*.cmxa -%{_libdir}/ocaml/sha1/*.cmx -%{_libdir}/ocaml/sha1/*.mli - -%{_libdir}/ocaml/stunnel/*.a -%{_libdir}/ocaml/stunnel/*.cmxa -%{_libdir}/ocaml/stunnel/*.cmx -%{_libdir}/ocaml/stunnel/*.mli - -%{_libdir}/ocaml/uuid/*.a -%{_libdir}/ocaml/uuid/*.cmxa -%{_libdir}/ocaml/uuid/*.cmx -%{_libdir}/ocaml/uuid/*.mli - -%{_libdir}/ocaml/xenctrlext/*.a -%{_libdir}/ocaml/xenctrlext/*.cmxa -%{_libdir}/ocaml/xenctrlext/*.cmx -%{_libdir}/ocaml/xenctrlext/*.mli - -%{_libdir}/ocaml/xenstore-compat/*.a -%{_libdir}/ocaml/xenstore-compat/*.cmxa -%{_libdir}/ocaml/xenstore-compat/*.cmx - -%{_libdir}/ocaml/xen-utils/*.a -%{_libdir}/ocaml/xen-utils/*.cmxa -%{_libdir}/ocaml/xen-utils/*.cmx -%{_libdir}/ocaml/xen-utils/*.mli - -%{_libdir}/ocaml/xml-light2/*.a -%{_libdir}/ocaml/xml-light2/*.cmxa -%{_libdir}/ocaml/xml-light2/*.cmx -%{_libdir}/ocaml/xml-light2/*.mli - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.9.6-2 -- Remove xen-missing-headers dependency - -* Wed Jun 4 2014 Jon Ludlam - 0.9.6-1 -- Update to 0.9.6 release - -* Mon Jun 2 2014 Euan Harris - 0.9.3-2 -- Split files correctly between base and devel packages - -* Wed Sep 25 2013 David Scott - 0.9.3-1 -- Update to 0.9.3 - -* Tue Sep 10 2013 David Scott -- Update to 0.9.2 - -* Wed Jun 5 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xen-lowlevel-libs.spec b/SPECS/ocaml-xen-lowlevel-libs.spec deleted file mode 100644 index 37ff5be8..00000000 --- a/SPECS/ocaml-xen-lowlevel-libs.spec +++ /dev/null @@ -1,141 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xen-lowlevel-libs -Version: 0.9.25 -Release: 4%{?dist} -Summary: Xen hypercall bindings for OCaml -License: LGPL -URL: https://github.com/xapi-project/ocaml-xen-lowlevel-libs -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: libuuid-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: xen-devel -BuildRequires: ocaml-cstruct-devel - -%description -Xen hypercall bindings for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%package runtime -Summary: Runtime binaries for users of %{name} -Group: Development/Libraries - -%description runtime -The %{name}-runtime package contains binaries which must be present -at runtime when executing programs that use %{name}. - -%prep -%setup -q - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR/stublibs -export OCAMLFIND_LDCONF=ignore -make install BINDIR=%{buildroot}/%{_libexecdir}/xenopsd/ - -%files -%doc README.md -%{_libdir}/ocaml/xenctrl -%exclude %{_libdir}/ocaml/xenctrl/*.a -%exclude %{_libdir}/ocaml/xenctrl/*.cmxa -%exclude %{_libdir}/ocaml/xenctrl/*.cmx -%exclude %{_libdir}/ocaml/xenctrl/*.mli -%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so -%{_libdir}/ocaml/stublibs/dllxenctrl_stubs.so.owner -%{_libdir}/ocaml/xenlight -%exclude %{_libdir}/ocaml/xenlight/*.a -%exclude %{_libdir}/ocaml/xenlight/*.cmxa -%exclude %{_libdir}/ocaml/xenlight/*.cmx -%exclude %{_libdir}/ocaml/xenlight/*.mli -%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so -%{_libdir}/ocaml/stublibs/dllxenlight_stubs.so.owner -%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so -%{_libdir}/ocaml/stublibs/dllxentoollog_stubs.so.owner - -%files devel -%{_libdir}/ocaml/xenctrl/*.a -%{_libdir}/ocaml/xenctrl/*.cmxa -%{_libdir}/ocaml/xenctrl/*.cmx -%{_libdir}/ocaml/xenctrl/*.mli -%{_libdir}/ocaml/xenlight/*.a -%{_libdir}/ocaml/xenlight/*.cmxa -%{_libdir}/ocaml/xenlight/*.cmx -%{_libdir}/ocaml/xenlight/*.mli - -%files runtime -%{_libexecdir}/xenopsd/xenguest - -%changelog -* Sun Oct 19 2014 David Scott - 0.9.25-4 -- xenguest should only be in the runtime package - -* Thu Sep 4 2014 Jon Ludlam - 0.9.25-3 -- Remove dependency on xen-missing-headers - -* Tue Sep 2 2014 Jon Ludlam - 0.9.25-2 -- Reinstate xenlight in CentOS - -* Sun Aug 24 2014 David Scott - 0.9.25-1 -- Update to 0.9.25 - -* Sun Aug 24 2014 David Scott - 0.9.23-1 -- Update to 0.9.23, improved configure script - -* Sat Aug 23 2014 David Scott - 0.9.22-1 -- Update to 0.9.22, only build xenlight on xen-4.4 and xen-4.5 - -* Wed Aug 20 2014 David Scott - 0.9.21-1 -- Update to 0.9.21, re-activate xenlight - -* Sat Jun 21 2014 David Scott - 0.9.18-1 -- Update to 0.9.18 - -* Sat Jun 7 2014 David Scott - 0.9.16-2 -- Place xenguest in %{name}-runtime - -* Sat Jun 7 2014 David Scott - 0.9.16-1 -- Update to 0.9.16 - -* Sat Jun 7 2014 David Scott - 0.9.15-1 -- Update to 0.9.15 - -* Mon Jun 2 2014 Euan Harris - 0.9.14-2 -- Split files correctly between base and devel packages - -* Sat Apr 26 2014 David Scott - 0.9.14-1 -- Update to 0.9.14 - -* Mon Oct 21 2013 David Scott - 0.9.9-3 -- Exclude the xenlight stuff in case it manages to build - -* Sun Oct 20 2013 David Scott -- Remove xenlight because this old version isn't enough for xenopsd-xenlight - -* Mon Sep 16 2013 Euan Harris -- Update to 0.9.9, which includes linker paths required on Debian - -* Fri Jun 21 2013 David Scott -- Update to 0.9.2 - -* Tue Jun 18 2013 David Scott -- Update to 0.9.1 - -* Mon Jun 3 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xenops.spec b/SPECS/ocaml-xenops.spec deleted file mode 100644 index 1cd8f586..00000000 --- a/SPECS/ocaml-xenops.spec +++ /dev/null @@ -1,93 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xenops -Version: 0.9.6 -Release: 1%{?dist} -Summary: Low-level xen control operations OCaml -License: LGPL -URL: https://github.com/xapi-project/xenops -Source0: https://github.com/xapi-project/xenops/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel - -%description -Low-level xen control operations in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-xcp-idl-devel%{?_isa} -Requires: ocaml-stdext-devel%{?_isa} -Requires: ocaml-xen-lowlevel-libs-devel%{?_isa} -Requires: ocaml-xenstore-devel%{?_isa} -Requires: ocaml-xenstore-clients-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%package tools -Summary: Debugging tools for %{name} -Requires: xen-libs -BuildRequires: xen-devel - -%description tools -A set of debugging tools which showcase the features of %{name}-devel. - -%prep -%setup -q -n xenops-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p %{buildroot}/%{_bindir} -make install BINDIR=%{buildroot}/%{_bindir} - -%files -%doc ChangeLog -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/xenops -%exclude %{_libdir}/ocaml/xenops/*.a -%exclude %{_libdir}/ocaml/xenops/*.cmxa -%exclude %{_libdir}/ocaml/xenops/*.cmx - -%files devel -%{_libdir}/ocaml/xenops/*.a -%{_libdir}/ocaml/xenops/*.cmxa -%{_libdir}/ocaml/xenops/*.cmx - -%files tools -%{_bindir}/list_domains - -%changelog -* Fri Jun 6 2014 Jon Ludlam - 0.9.6-1 -- Update to 0.9.6 - -* Mon Jun 2 2014 Euan Harris - 0.9.4-2 -- Split files correctly between base and devel packages - -* Thu May 8 2014 David Scott - 0.9.4-1 -- Update to 0.9.4, add list_domains binary - -* Wed Sep 25 2013 David Scott - 0.9.2-1 -- Update to 0.9.2 - -* Tue Sep 10 2013 David Scott -- Update to 0.9.1 - -* Tue Jun 18 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xenstore-clients.spec b/SPECS/ocaml-xenstore-clients.spec deleted file mode 100644 index 1302b8bf..00000000 --- a/SPECS/ocaml-xenstore-clients.spec +++ /dev/null @@ -1,67 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xenstore-clients -Version: 0.9.3 -Release: 2%{?dist} -Summary: Unix xenstore clients for OCaml -License: LGPL -URL: https://github.com/xapi-project/ocaml-xenstore-clients -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-xenstore-devel - -%description -Unix xenstore clients for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-lwt-devel%{?_isa} -Requires: ocaml-xenstore-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install DESTDIR=${buildroot} - - -%files -%doc LICENSE -%doc MAINTAINERS -%doc README.md -%{_libdir}/ocaml/xenstore_transport -%exclude %{_libdir}/ocaml/xenstore_transport/*.a -%exclude %{_libdir}/ocaml/xenstore_transport/*.cmxa -%exclude %{_libdir}/ocaml/xenstore_transport/*.cmx - -%files devel -%{_libdir}/ocaml/xenstore_transport/*.a -%{_libdir}/ocaml/xenstore_transport/*.cmxa -%{_libdir}/ocaml/xenstore_transport/*.cmx - -%changelog -* Mon Jun 2 2014 Euan Harris - 0.9.3-2 -- Split files correctly between base and devel packages - -* Fri May 9 2014 David Scott - 0.9.3-1 -- Update to 0.9.3 - -* Tue Sep 10 2013 David Scott - 0.9.2-1 -- Update to 0.9.2 - -* Mon Jun 3 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xenstore.spec b/SPECS/ocaml-xenstore.spec deleted file mode 100644 index eca0bb5c..00000000 --- a/SPECS/ocaml-xenstore.spec +++ /dev/null @@ -1,73 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-xenstore -Version: 1.2.4 -Release: 2%{?dist} -Summary: Xenstore protocol implementation in OCaml -License: LGPL -URL: https://github.com/mirage/ocaml-xenstore -Source0: https://github.com/mirage/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-cstruct-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-ounit-devel -Conflicts: xen-ocaml - -%description -An implementation of the xenstore protocol in OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-cstruct-devel%{?_isa} -Requires: ocaml-lwt-devel%{?_isa} -Conflicts: xen-ocaml-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q - -%build -ocaml setup.ml -configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES -%doc LICENSE -%doc README -%{_libdir}/ocaml/xenstore -%exclude %{_libdir}/ocaml/xenstore/*.a -%exclude %{_libdir}/ocaml/xenstore/*.cmxa -%exclude %{_libdir}/ocaml/xenstore/*.cmx -%exclude %{_libdir}/ocaml/xenstore/*.mli - -%files devel -%{_libdir}/ocaml/xenstore/*.a -%{_libdir}/ocaml/xenstore/*.cmxa -%{_libdir}/ocaml/xenstore/*.cmx -%{_libdir}/ocaml/xenstore/*.mli - -%changelog -* Mon Jun 2 2014 Euan Harris - 1.2.4-2 -- Split files correctly between base and devel packages - -* Wed Sep 11 2013 David Scott - 1.2.4-1 -- Update to 1.2.4 (fixes critical watching bug) - -* Tue Sep 10 2013 David Scott -- Update to 1.2.3 - -* Tue Jul 2 2013 David Scott -- Initial package - diff --git a/SPECS/ocaml-xmlm.spec b/SPECS/ocaml-xmlm.spec deleted file mode 100644 index 7afeb560..00000000 --- a/SPECS/ocaml-xmlm.spec +++ /dev/null @@ -1,71 +0,0 @@ -Name: ocaml-xmlm -Version: 1.2.0 -Release: 1%{?dist} -Summary: Streaming XML input/output for OCaml -License: BSD3 -URL: http://erratique.ch/software/xmlm -Source0: https://github.com/dbuenzli/xmlm/archive/v%{version}/xmlm-%{version}.tar.gz -Obsoletes: xmlm <= 1.1.1 -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -Xmlm is an OCaml module providing streaming XML input/output. It aims at -making XML processing robust and painless. - -The streaming interface can process documents without building an in-memory -representation. It lets the programmer translate its data structures to -XML documents and vice-versa. Functions are provided to easily transform -arborescent data structures to/from XML documents. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n xmlm-%{version} - -%build -./pkg/pkg-git -./pkg/build true - -%install -find . -mkdir -p %{buildroot}/%{_libdir}/ocaml/xmlm -cp _build/pkg/META _build/src/xmlm.a _build/src/xmlm.cma _build/src/xmlm.cmi _build/src/xmlm.cmx _build/src/xmlm.cmxa _build/src/xmlm.cmxs _build/src/xmlm.mli %{buildroot}/%{_libdir}/ocaml/xmlm - - - -%files -%doc CHANGES.md -%doc README.md -%{_libdir}/ocaml/xmlm -%exclude %{_libdir}/ocaml/xmlm/*.a -%exclude %{_libdir}/ocaml/xmlm/*.cmxa -%exclude %{_libdir}/ocaml/xmlm/*.cmx -%exclude %{_libdir}/ocaml/xmlm/*.mli - -%files devel -%{_libdir}/ocaml/xmlm/*.a -%{_libdir}/ocaml/xmlm/*.cmxa -%{_libdir}/ocaml/xmlm/*.cmx -%{_libdir}/ocaml/xmlm/*.mli - -%changelog -* Thu Jul 17 2014 David Scott - 1.2.0-1 -- Update to 1.2.0 - -* Mon Jun 2 2014 Euan Harris - 1.1.1-3 -- Split files correctly between base and devel packages - -* Mon May 19 2014 Euan Harris - 1.1.1-2 -- Switch to GitHub mirror - -* Thu May 30 2013 David Scott - 1.1.1-1 -- Initial package - diff --git a/SPECS/ocaml-yojson.spec b/SPECS/ocaml-yojson.spec deleted file mode 100644 index 41e2fec6..00000000 --- a/SPECS/ocaml-yojson.spec +++ /dev/null @@ -1,62 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-yojson -Version: 1.1.6 -Release: 3%{?dist} -Summary: A JSON parser and printer for OCaml -License: BSD3 -URL: http://mjambon.com/yojson.html -Source0: https://github.com/mjambon/yojson/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: cppo -BuildRequires: ocaml -BuildRequires: ocaml-biniou-devel -BuildRequires: ocaml-easy-format-devel -BuildRequires: ocaml-findlib - -%description -A JSON parser and printer for OCaml. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-biniou-devel%{?_isa} -Requires: ocaml-easy-format-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n yojson-%{version} - -%build -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -mkdir -p %{buildroot}/%{_bindir} -make install DESTDIR=%{buildroot} BINDIR=%{buildroot}/%{_bindir} - -%files -%doc README.md -%doc LICENSE -%{_bindir}/ydump -%{_libdir}/ocaml/yojson -%exclude %{_libdir}/ocaml/yojson/*.cmx -%exclude %{_libdir}/ocaml/yojson/*.mli - -%files devel -%{_libdir}/ocaml/yojson/*.cmx -%{_libdir}/ocaml/yojson/*.mli - -%changelog -* Tue Oct 21 2014 Euan Harris - 1.1.6-3 -- Switch to GitHub sources - -* Fri May 30 2014 Euan Harris - 1.1.6-2 -- Split files correctly between base and devel packages - -* Thu May 30 2013 David Scott - 1.1.6-1 -- Initial package - diff --git a/SPECS/ocaml-zed.spec b/SPECS/ocaml-zed.spec deleted file mode 100644 index 552e8897..00000000 --- a/SPECS/ocaml-zed.spec +++ /dev/null @@ -1,67 +0,0 @@ -%global debug_package %{nil} - -Name: ocaml-zed -Version: 1.3 -Release: 1%{?dist} -Summary: An abstract engine for text editing for OCaml -License: BSD3 -URL: https://github.com/diml/zed -Source0: https://github.com/diml/zed/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camomile-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-react-devel - -%description -Zed is an abstract engine for text editing. It can be used for writing -text editors, editing widgets, readlines... - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: ocaml-camomile-devel%{?_isa} -Requires: ocaml-react-devel%{?_isa} - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n zed-%{version} - -%build -./configure -make - -%install -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install - -%files -%doc CHANGES.md -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/zed -%exclude %{_libdir}/ocaml/zed/*.a -%exclude %{_libdir}/ocaml/zed/*.cmxa -%exclude %{_libdir}/ocaml/zed/*.cmx -%exclude %{_libdir}/ocaml/zed/*.mli - -%files devel -%{_libdir}/ocaml/zed/*.a -%{_libdir}/ocaml/zed/*.cmxa -%{_libdir}/ocaml/zed/*.cmx -%{_libdir}/ocaml/zed/*.mli - -%changelog -* Thu Oct 2 2014 Euan Harris - 1.3-1 -- Update to 1.3 and switch to GitHub sources - -* Mon Jun 2 2014 Euan Harris - 1.2-2 -- Split files correctly between base and devel packages - -* Thu Jun 6 2013 David Scott - 1.2-1 -- Initial package - diff --git a/SPECS/ocamlify.spec b/SPECS/ocamlify.spec deleted file mode 100644 index a81757e0..00000000 --- a/SPECS/ocamlify.spec +++ /dev/null @@ -1,35 +0,0 @@ -Name: ocamlify -Version: 0.0.2 -Release: 1%{?dist} -Summary: Create OCaml source code by including whole files into OCaml string or string list -License: LGPL -URL: http://forge.ocamlcore.org/projects/ocamlify/ -Source0: http://forge.ocamlcore.org/frs/download.php/1209/%{name}-%{version}.tar.gz - -BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib - -%description -Create OCaml source code by including whole files into OCaml string or -string list. - -%prep -%setup -q - -%build -./configure --prefix %{_prefix} --destdir %{buildroot} -make - -%install -make install - -%files -%doc AUTHORS.txt -%doc CHANGES.txt -%doc COPYING.txt -%{_bindir}/ocamlify - -%changelog -* Tue Mar 25 2014 Euan Harris - 0.0.2-1 -- Initial package - diff --git a/SPECS/ocamlmod.spec b/SPECS/ocamlmod.spec deleted file mode 100644 index 1af359ca..00000000 --- a/SPECS/ocamlmod.spec +++ /dev/null @@ -1,34 +0,0 @@ -Name: ocamlmod -Version: 0.0.7 -Release: 1%{?dist} -Summary: Generate OCaml modules from source files -License: LGPL -URL: http://forge.ocamlcore.org/projects/ocamlmod/ -Source0: http://forge.ocamlcore.org/frs/download.php/1350/%{name}-%{version}.tar.gz - -BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-ounit-devel >= 2.0.0 - -%description -Generate OCaml modules from source files. - -%prep -%setup -q - -%build -./configure --prefix %{_prefix} --destdir %{buildroot} -make - -%install -make install - -%files -%doc AUTHORS.txt -%doc CHANGES.txt -%{_bindir}/ocamlmod - -%changelog -* Tue Mar 25 2014 Euan Harris - 0.0.7-1 -- Initial package - diff --git a/SPECS/ocamlscript.spec b/SPECS/ocamlscript.spec deleted file mode 100644 index 9da7f5bd..00000000 --- a/SPECS/ocamlscript.spec +++ /dev/null @@ -1,46 +0,0 @@ -%define debug_package %{nil} - -Name: ocamlscript -Version: 2.0.3 -Release: 1%{?dist} -Summary: OCamlscript is a tool which compiles OCaml scripts into native code, thus combining mthe flexibility of scripts and the speed provided by ocamlopt. -License: Boost -URL: http://mjambon.com/ocamlscript.html -Source0: https://github.com/mjambon/ocamlscript/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib - -%description -OCamlscript is a tool which compiles OCaml scripts into native code, thus combining mthe flexibility of scripts and the speed provided by ocamlopt. - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}%{_bindir} -install -m 0755 ocamlscript %{buildroot}%{_bindir}/ocamlscript - -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p ${OCAMLFIND_DESTDIR} -export OCAMLFIND_LDCONF=ignore -ocamlfind install ocamlscript META ocamlscript.cmi ocamlscript.cmo ocamlscript.cmx ocamlscript.o - -%files -%doc Changes -%doc README -%{_bindir}/ocamlscript -%{_libdir}/ocaml/ocamlscript -%{_libdir}/ocaml/ocamlscript/META -%{_libdir}/ocaml/ocamlscript/ocamlscript.cmi -%{_libdir}/ocaml/ocamlscript/ocamlscript.cmo -%{_libdir}/ocaml/ocamlscript/ocamlscript.cmx -%{_libdir}/ocaml/ocamlscript/ocamlscript.o - -%changelog -* Sun Jul 20 2014 David Scott - 2.0.3-1 -- Initial package diff --git a/SPECS/omake.spec b/SPECS/omake.spec deleted file mode 100644 index 18d8cd7f..00000000 --- a/SPECS/omake.spec +++ /dev/null @@ -1,82 +0,0 @@ -Version: 0.9.8.6 -Release: 1%{?dist} -Summary: The omake build system -Name: omake -URL: http://omake.metaprl.org/ -Source0: http://pkgs.fedoraproject.org/repo/pkgs/ocaml-omake/omake-0.9.8.6-0.rc1.tar.gz/fe39a476ef4e33b7ba2ca77a6bcaded2/omake-0.9.8.6-0.rc1.tar.gz -Patch0: omake-1-warnings -License: GPL -BuildRequires: make -BuildRequires: ncurses-devel -BuildRequires: ocaml >= 3.09.2 - -%define debug_package %{nil} - -%description - -OMake is a build system, similar to GNU make, but with many additional -features, including: -- Support for large projects spanning multiple directories; -- Support for commands that produce several targets at once; -- Fast, accurate, automated dependency analysis using MD5 digests; -- Portability: omake provides a consistent interface on Win32 - and on Unix systems including Linux, OSX, and Cygwin; -- Builtin functions that provide the most common features of - programs like grep, sed, and awk; -- Active filesystem monitoring, where the build automatically - restarts whenever you modify a source file. - -%prep -%setup -q -%patch0 -p1 -b ~omake-1-warnings - -%build -INSTALL_ROOT=$RPM_BUILD_ROOT\ - PREFIX=%{_prefix}\ - BINDIR=%{_bindir}\ - LIBDIR=%{_libdir}\ - make all - -%install -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_libdir}/omake - -INSTALL_ROOT=$RPM_BUILD_ROOT\ - PREFIX=%{_prefix}\ - BINDIR=%{_bindir}\ - LIBDIR=%{_libdir}\ - make install - -chmod +w $RPM_BUILD_ROOT/%{_bindir}/* - - -%files -%doc LICENSE LICENSE.OMake doc/txt/omake-doc.txt doc/ps/omake-doc.ps doc/ps/omake-doc.pdf doc/webpage CHANGELOG.txt - -%attr(555,root,root) %{_bindir}/* -%{_libdir}/omake - -%changelog -* Thu Nov 25 2010 Mike McClurg - 0.9.8.6-1 -- Updated to 0.9.8.6 (revision 13252) to support OCaml 3.12.0. - -* Fri May 14 2010 David Scott -- Customise for XCP - -* Thu Dec 11 2006 Aleksey Nogin [0.9.8-1] -- Updated for the new doc file list and the lack of the man pages. - -* Thu Aug 16 2005 Aleksey Nogin -- Updated to account for the new non-autoconf build style. - -* Mon Sep 9 2004 Aleksey Nogin -- Added doc files. - -* Thu May 8 2003 Jason Hickey -- Added cvs_realclean - -* Tue Apr 22 2003 Aleksey Nogin -- Path updates - -* Tue Apr 22 2003 Jason Hickey -- Initial build. diff --git a/SPECS/opam.spec b/SPECS/opam.spec deleted file mode 100644 index 23049223..00000000 --- a/SPECS/opam.spec +++ /dev/null @@ -1,42 +0,0 @@ -Name: opam -Version: 1.1.2 -Release: 1%{?dist} -Summary: Source-based OCaml package manager -License: LGPLv3 -URL: http://opam.ocaml.org/ -Source0: https://github.com/ocaml/%{name}/releases/download/%{version}/%{name}-full-%{version}.tar.gz -BuildRequires: curl -BuildRequires: ocaml - -%description -Source-based OCaml package manager - -%prep -%setup -q -n %{name}-full-%{version} - -%build -%configure -make lib-ext -make - -%install -make install DESTDIR=%{buildroot} -mkdir -p %{buildroot}/%{_mandir} -mv %{buildroot}/usr/man/* %{buildroot}/%{_mandir} -rm -rf %{buildroot}/usr/man - -%files -%doc AUTHORS -%doc CHANGES -%doc CONTRIBUTING.md -%doc LICENSE -%doc README.md -%{_mandir}/man1/opam* -%{_bindir}/opam -%{_bindir}/opam-admin -%{_bindir}/opam-installer - -%changelog -* Fri Aug 01 2014 Euan Harris - 1.1.2-1 -- Initial package - diff --git a/SPECS/optcomp.spec b/SPECS/optcomp.spec deleted file mode 100644 index abdb800e..00000000 --- a/SPECS/optcomp.spec +++ /dev/null @@ -1,45 +0,0 @@ -Name: optcomp -Version: 1.6 -Release: 1%{?dist} -Summary: Optional compilation with cpp-like directives -License: BSD3 -URL: https://github.com/diml/optcomp -Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc - -%description -Optional compilation with cpp-like directives. - -%prep -%setup -q - -%build -ocaml setup.ml -configure --destdir %{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -build - -%install -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -ocaml setup.ml -install -mkdir -p %{buildroot}/%{_bindir} -mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-r %{buildroot}/%{_bindir}/ -mv %{buildroot}/%{_libdir}/ocaml/usr/local/bin/optcomp-o %{buildroot}/%{_bindir}/ - - -%files -%doc LICENSE -%doc README.md -%{_libdir}/ocaml/optcomp -%{_bindir}/optcomp-r -%{_bindir}/optcomp-o - -%changelog -* Thu Oct 2 2014 Euan Harris - 1.6-1 -- Update to 1.6 and switch to GitHub sources - -* Fri May 31 2013 David Scott - 1.4-1 -- Initial package - diff --git a/SPECS/sm-cli.spec b/SPECS/sm-cli.spec deleted file mode 100644 index 3d0691da..00000000 --- a/SPECS/sm-cli.spec +++ /dev/null @@ -1,40 +0,0 @@ -Name: sm-cli -Version: 0.9.4 -Release: 1%{?dist} -Summary: CLI for xapi toolstack storage managers -License: LGPL -URL: https://github.com/xapi-project/sm-cli -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-obuild -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel - -%description -Command-line interface for xapi toolstack storage managers. - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -install dist/build/sm-cli/sm-cli %{buildroot}/%{_sbindir}/sm-cli - - -%files -%doc README.md LICENSE MAINTAINERS -%{_sbindir}/sm-cli - -%changelog -* Fri Oct 25 2013 David Scott - 0.9.4-1 -- Update to 0.9.4 - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/squeezed.spec b/SPECS/squeezed.spec deleted file mode 100644 index 994a5819..00000000 --- a/SPECS/squeezed.spec +++ /dev/null @@ -1,86 +0,0 @@ -Name: squeezed -Version: 0.10.6 -Release: 2%{?dist} -Summary: Memory ballooning daemon for the xapi toolstack -License: LGPL -URL: https://github.com/xapi-project/squeezed -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: squeezed-init -Source2: squeezed-conf -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-re-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-uuidm-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: xen-devel -Requires: redhat-lsb-core -Requires: message-switch - -%description -Memory ballooning daemon for the xapi toolstack. - -%prep -%setup -q -cp %{SOURCE1} squeezed-init -cp %{SOURCE2} squeezed-conf - -%build -./configure --prefix %{_prefix} --destdir %{buildroot} -make - -%install -install -D -m 0755 squeezed.native %{buildroot}%{_sbindir}/squeezed -install -D -m 0755 squeezed-init %{buildroot}%{_sysconfdir}/init.d/squeezed -install -D -m 0644 squeezed-conf %{buildroot}%{_sysconfdir}/squeezed.conf - - -%files -%doc README.md -%doc LICENSE -%doc MAINTAINERS -%{_sbindir}/squeezed -%{_sysconfdir}/init.d/squeezed -%config %{_sysconfdir}/squeezed.conf - -%post -/sbin/chkconfig --add squeezed - -%preun -if [ $1 -eq 0 ]; then - /sbin/service squeezed stop > /dev/null 2>&1 - /sbin/chkconfig --del squeezed -fi - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.10.6-2 -- Remove dependency on xen-missing-headers - -* Fri Jun 6 2014 Jonathan Ludlam - 0.10.6-1 -- Update to 0.10.6 - -* Fri Apr 11 2014 Euan Harris - 0.10.5-1 -- Switch build from obuild to oasis - -* Wed Sep 25 2013 David Scott - 0.10.4-1 -- Update to 0.10.4 - -* Fri Sep 20 2013 David Scott - 0.10.3-1 -- Update to allow minimal operation without xen - -* Tue Sep 10 2013 David Scott - 0.10.2-1 -- Update to new xenstore interface in v1.2.3 - -* Wed Sep 04 2013 David Scott - 0.10.1-1 -- Add get_domain_zero_palicy call required for domain 0 ballooning - -* Mon Sep 2 2013 David Scott - 0.10.0-1 -- Update to 0.10.0, with support for domain 0 ballooning - -* Wed Jun 5 2013 David Scott -- Initial package - diff --git a/SPECS/utop.spec b/SPECS/utop.spec deleted file mode 100644 index 4789bddd..00000000 --- a/SPECS/utop.spec +++ /dev/null @@ -1,50 +0,0 @@ -Name: utop -Version: 1.12 -Release: 1%{?dist} -Summary: A toplevel for OCaml which can run in a terminal or in Emacs -License: BSD -URL: https://github.com/diml/utop -Source0: https://github.com/diml/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-lambda-term-devel -Requires: ocaml-camomile-data - -%description -utop is a toplevel for OCaml which can run in a terminal or in Emacs. It -supports completion, colors, parenthesis matching, ... - -%prep -%setup -q - -%build -ocaml setup.ml -configure --prefix %{_prefix} --destdir %{buildroot} -ocaml setup.ml -build - -%install -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -export OCAMLFIND_LDCONF=ignore -ocaml setup.ml -install - - -%files -%doc README.md LICENSE CHANGES.md -%{_bindir}/utop -%{_bindir}/utop-full -%{_libdir}/ocaml/utop/* -/usr/share/emacs/site-lisp/utop.el - -%changelog -* Mon May 12 2014 David Scott - 1.12-1 -- Update to 1.12 - -* Fri Jun 21 2013 David Scott - 1.5-1 -- Update to version 1.5 (discovered lurking in plain sight on github) - -* Thu May 30 2013 David Scott -- Initial package - diff --git a/SPECS/vhd-tool.spec b/SPECS/vhd-tool.spec deleted file mode 100644 index e0552af7..00000000 --- a/SPECS/vhd-tool.spec +++ /dev/null @@ -1,74 +0,0 @@ -# -*- rpm-spec -*- - -Summary: Command-line tools for manipulating and streaming .vhd format files -Name: vhd-tool -Version: 0.7.5 -Release: 1%{?dist} -License: LGPL+linking exception -URL: https://github.com/xapi-project/vhd-tool -Source0: https://github.com/xapi-project/vhd-tool/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: vhd-tool-sparse_dd-conf -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-vhd-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-nbd-devel -BuildRequires: ocaml-tapctl-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-io-page-devel -BuildRequires: ocaml-sha-devel -BuildRequires: ocaml-tar-devel -BuildRequires: ocaml-xenstore-clients-devel - -%description -Simple command-line tools for manipulating and streaming .vhd format file. - -%prep -%setup -q -cp %{SOURCE1} vhd-tool-sparse_dd-conf - - -%build -./configure --bindir %{buildroot}/%{_bindir} --libexecdir %{buildroot}/%{_libexecdir}/xapi --etcdir %{buildroot}/etc -make - -%install - -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{_libexecdir}/xapi -mkdir -p %{buildroot}/etc -make install - - -%files -%{_bindir}/vhd-tool -/etc/sparse_dd.conf -%{_libexecdir}/xapi/sparse_dd - -%changelog -* Fri Jun 6 2014 Jonathan Ludlam - 0.7.5-1 -- Update to 0.7.5 - -* Wed Apr 9 2014 Euan Harris - 0.7.4-1 -- Update to 0.7.4 - fix handling of tar file prefixes - -* Wed Apr 2 2014 Euan Harris - 0.7.3-1 -- Update to 0.7.3 - -* Thu Nov 21 2013 David Scott - 0.6.4-1 -- Update to 0.6.4 - -* Fri Oct 25 2013 David Scott - 0.6.1-1 -- Update to 0.6.1 - -* Wed Oct 02 2013 David Scott - 0.6.0-1 -- Update to 0.6.0 - -* Fri Sep 27 2013 David Scott - 0.5.1-1 -- Update to 0.5.1 - -* Mon Sep 23 2013 David Scott - 0.5.0-1 -- Initial package diff --git a/SPECS/vncterm.spec b/SPECS/vncterm.spec deleted file mode 100644 index 1f4bded4..00000000 --- a/SPECS/vncterm.spec +++ /dev/null @@ -1,47 +0,0 @@ -Summary: TTY to VNC utility -Name: vncterm -Version: 0.9.0 -Release: 2%{?dist} -License: GPL -URL: https://github.com/xenserver/vncterm -Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: vncterm-1-fix-build -BuildRequires: xen-devel - -%description -This package contains the vncterm utility -%prep -%setup -q -%patch0 -p1 - -%build -%{__make} - -%install -mkdir -p %{buildroot}%{_bindir}/ -cp vncterm %{buildroot}%{_bindir}/ - - -%pre -getent group vncterm >/dev/null || groupadd -r vncterm -getent group vncterm_base >/dev/null || groupadd -r vncterm_base -getent passwd vncterm >/dev/null || useradd -r -g vncterm -d /none -s /sbin/nologin -c 'for vncterm' vncterm -getent passwd vncterm_base >/dev/null || useradd -r -g vncterm_base -d /none -s /sbin/nologin -c 'for vncterm' vncterm_base - -%files -%doc -%{_bindir}/vncterm - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.9.0-2 -- Remove xen-missing-headers dependency - -* Thu Aug 22 2013 Euan Harris - 0.9.0-1 -- Update to latest version of upstream package - -* Thu Jun 27 2013 David Scott -- add users and groups: vncterm,vncterm_base - -* Mon Jun 3 2013 David Scott -- Imported from vncterm/mk/vncterm.spec.in - diff --git a/SPECS/xapi-libvirt-storage.spec b/SPECS/xapi-libvirt-storage.spec deleted file mode 100644 index 75b52b2d..00000000 --- a/SPECS/xapi-libvirt-storage.spec +++ /dev/null @@ -1,60 +0,0 @@ -Name: xapi-libvirt-storage -Version: 0.9.8 -Release: 1%{?dist} -Summary: Allows the manipulation of libvirt storage pools and volumes via xapi -License: LGPL -URL: https://github.com/xapi-project/xapi-libvirt-storage/archive/%{version}.tar.gz -Source0: https://github.com/xapi-project/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: xapi-libvirt-storage-init -BuildRequires: libvirt-devel -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-libvirt-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: ocaml-re-devel -Requires: redhat-lsb-core - -%description -Allows the manipulation of libvirt storage pools and volumes via xapi. - -%prep -%setup -q -cp %{SOURCE1} xapi-libvirt-storage-init - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -install main.native %{buildroot}/%{_sbindir}/xapi-libvirt-storage -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xapi-libvirt-storage-init %{buildroot}%{_sysconfdir}/init.d/xapi-libvirt-storage - - -%files -%doc README.md LICENSE MAINTAINERS -%{_sbindir}/xapi-libvirt-storage -%{_sysconfdir}/init.d/xapi-libvirt-storage - -%post -/sbin/chkconfig --add xapi-libvirt-storage - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xapi-libvirt-storage stop > /dev/null 2>&1 - /sbin/chkconfig --del xapi-libvirt-storage -fi - -%changelog -* Sat Apr 26 2014 David Scott - 0.9.8-1 -- Update to 0.9.8 - -* Wed Sep 25 2013 David Scott - 0.9.7-1 -- Update to 0.9.7 - -* Fri May 31 2013 David Scott -- Initial package - diff --git a/SPECS/xapi-quicktest.spec b/SPECS/xapi-quicktest.spec deleted file mode 100644 index 8b4404d2..00000000 --- a/SPECS/xapi-quicktest.spec +++ /dev/null @@ -1,47 +0,0 @@ -%define debug_package %{nil} - -Name: xapi-quicktest -Version: 0.0.0 -Release: 2%{?dist} -Summary: Simple xapi-project test suite -License: ISC -URL: https://github.com/xapi-project/quicktest -Source0: https://github.com/xapi-project/quicktest/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-testvmlib-devel -BuildRequires: ocaml-vchan-devel -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-xen-api-client-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-gnt-devel -BuildRequires: ocaml-evtchn-devel -BuildRequires: ocaml-ipaddr-devel -Requires: mirage-testvm - -%description -This is a simple test suite for the xapi-project components - -%prep -%setup -q -n quicktest-%{version} - -%build -make - -%install -mkdir -p %{buildroot}%{_bindir} -cp quicktest.native %{buildroot}%{_bindir} - -%files -%doc README.md -%{_bindir}/quicktest.native - -%changelog -* Wed Jul 30 2014 Jon Ludlam - 0.0.0-2 -- Add runtime dependency on mirage-testvm - -* Wed Jul 23 2014 Jon Ludlam - 0.0.0-1 -- Initial package diff --git a/SPECS/xapi-storage-script.spec b/SPECS/xapi-storage-script.spec deleted file mode 100644 index b57b2b50..00000000 --- a/SPECS/xapi-storage-script.spec +++ /dev/null @@ -1,80 +0,0 @@ -# -*- rpm-spec -*- - -Summary: Xapi storage script plugin server -Name: xapi-storage-script -Version: 0.1.2 -Release: 1%{?dist} -License: LGPL+linking exception -URL: https://github.com/xapi-project/xapi-storage-script -Source0: https://github.com/xapi-project/xapi-storage-script/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: xapi-storage-script-init -Source2: xapi-storage-script-conf.in -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-async-inotify-devel -BuildRequires: message-switch-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: xapi-storage-devel - -%description -Allows script-based Xapi storage adapters. - -%prep -%setup -q -n %{name}-%{version} -cp %{SOURCE1} xapi-storage-script-init -cp %{SOURCE2} xapi-storage-script-conf.in - -%build -make -mv main.native xapi-storage-script -./xapi-storage-script --help=groff > xapi-storage-script.1 -sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xapi-storage-script-conf.in > xapi-storage-script.conf - -%install - -mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 xapi-storage-script %{buildroot}/%{_sbindir}/xapi-storage-script -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xapi-storage-script-init %{buildroot}%{_sysconfdir}/init.d/xapi-storage-script -mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script -mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script/volume -mkdir -p %{buildroot}/%{_libexecdir}/xapi-storage-script/datapath -mkdir -p %{buildroot}/etc -install -m 0644 xapi-storage-script.conf %{buildroot}/etc/xapi-storage-script.conf -mkdir -p %{buildroot}%{_mandir}/man2 -install -m 0644 xapi-storage-script.1 %{buildroot}%{_mandir}/man2/xapi-storage-script.1 -gzip %{buildroot}%{_mandir}/man2/xapi-storage-script.1 - -%post -[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-storage-script - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xapi-storage-script stop > /dev/null 2>&1 - /sbin/chkconfig --del xapi-storage-script -fi - -%files -%{_sbindir}/xapi-storage-script -/etc/init.d/xapi-storage-script -%config(noreplace) /etc/xapi-storage-script.conf -%{_libexecdir}/xapi-storage-script -%{_libexecdir}/xapi-storage-script/volume -%{_libexecdir}/xapi-storage-script/datapath -%{_mandir}/man2/xapi-storage-script.1.gz - -%changelog -* Sun Oct 19 2014 David Scott - 0.1.2-1 -- Write the pidfile properly -- VDI.epoch_{begin,end} are no-ops - -* Fri Oct 17 2014 David Scott - 0.1.1-1 -- Add the /volume and /datapath subdirectories to the package -- Fix daemonization -- Use syslog - -* Thu Oct 16 2014 David Scott - 0.1-1 -- Initial package diff --git a/SPECS/xapi-storage.spec b/SPECS/xapi-storage.spec deleted file mode 100644 index 066c7f04..00000000 --- a/SPECS/xapi-storage.spec +++ /dev/null @@ -1,87 +0,0 @@ -Summary: Xapi storage interface -Name: xapi-storage -Version: 0.1 -Release: 1%{?dist} -URL: https://github.com/djs55/xapi-storage -Source0: https://github.com/djs55/xapi-storage/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: xapi-storage.patch -License: LGPL+linking exception - -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cow-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-rpc-devel - -%description -Xapi storage inteface libraries - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: ocaml-findlib -Requires: ocaml-cow-devel -Requires: ocaml-xmlm-devel -Requires: ocaml-cmdliner-devel -Requires: ocaml-rpc-devel - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - -%prep -%setup -q -n %{name}-%{version} -%patch0 -p1 - -%build -make -cd ocaml -ocaml setup.ml -configure --prefix %{_prefix} \ - --libdir %{_libdir} \ - --libexecdir %{_libexecdir} \ - --exec-prefix %{_exec_prefix} \ - --bindir %{_bindir} \ - --sbindir %{_sbindir} \ - --mandir %{_mandir} \ - --datadir %{_datadir} \ - --localstatedir %{_localstatedir} \ - --sharedstatedir %{_sharedstatedir} \ - --destdir $RPM_BUILD_ROOT -ocaml setup.ml -build - -%install -cd ocaml -rm -rf $RPM_BUILD_ROOT -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -ocaml setup.ml -install -cd ../python -mkdir -p %{buildroot}%{python_sitelib}/xapi -cp __init__.py xapi.py d.py v.py p.py %{buildroot}%{python_sitelib}/xapi - -%files -%defattr(-,root,root,-) -%{_libdir}/ocaml/xapi-storage -%exclude %{_libdir}/ocaml/xapi-storage/*.a -%exclude %{_libdir}/ocaml/xapi-storage/*.cmxa -%exclude %{_libdir}/ocaml/xapi-storage/*.ml -%{python_sitelib}/xapi/xapi.py* -%{python_sitelib}/xapi/d.py* -%{python_sitelib}/xapi/v.py* -%{python_sitelib}/xapi/p.py* -%{python_sitelib}/xapi/__init__.py* - -%files devel -%defattr(-,root,root,-) -%{_libdir}/ocaml/xapi-storage/*.a -%{_libdir}/ocaml/xapi-storage/*.cmxa -%{_libdir}/ocaml/xapi-storage/*.ml - -%changelog -* Thu Oct 16 2014 David Scott - 0.1-1 -- Initial package diff --git a/SPECS/xapi.spec b/SPECS/xapi.spec deleted file mode 100644 index 775bdbe4..00000000 --- a/SPECS/xapi.spec +++ /dev/null @@ -1,267 +0,0 @@ -# -*- rpm-spec -*- - -Summary: Xen toolstack for XCP -Name: xapi -Version: 1.9.57 -Release: 1%{?dist} -License: LGPL+linking exception -URL: http://www.xen.org -Source0: https://github.com/xapi-project/xen-api/archive/v%{version}/xen-api-%{version}.tar.gz -Source1: xen-api-xapi-conf.in -Source2: xen-api-init -Source3: xen-api-xapissl -Source4: xen-api-db-conf -Source5: xen-api-pam -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-ocamldoc -BuildRequires: pam-devel -BuildRequires: tetex-latex -BuildRequires: xen-devel -BuildRequires: libffi-devel -BuildRequires: zlib-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-netdev-devel -BuildRequires: ocaml-xen-api-client-devel -BuildRequires: omake -BuildRequires: forkexecd-devel -BuildRequires: ocaml-cdrom-devel -BuildRequires: ocaml-fd-send-recv-devel -BuildRequires: ocaml-nbd-devel -BuildRequires: ocaml-oclock-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-ssl-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-tapctl-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-opasswd-devel -BuildRequires: git -BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: libuuid-devel -BuildRequires: make -BuildRequires: utop -BuildRequires: message-switch-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-tar-devel -BuildRequires: python2-devel -BuildRequires: ocaml-rrdd-plugin-devel -Requires: hwdata -Requires: ocaml-xcp-inventory -Requires: redhat-lsb-core -Requires: stunnel -Requires: vhd-tool -Requires: libffi - -%description -XCP toolstack. - -%description -This package contains the xapi toolstack. - -%package xe -Summary: The xapi toolstack CLI -Requires: bash-completion - -%description xe -The command-line interface for controlling XCP hosts. - -%package python-devel -Summary: XenAPI client support in python -Requires: python - -%description python-devel -Libraries for writing XenAPI clients in python. - -%prep -%setup -q -n xen-api-%{version} -cp %{SOURCE1} xen-api-xapi-conf.in -cp %{SOURCE2} xen-api-init -cp %{SOURCE3} xen-api-xapissl -cp %{SOURCE4} xen-api-db-conf -cp %{SOURCE5} xen-api-pam - - -%build -./configure --bindir=%{_bindir} --etcdir=/etc --libexecdir=%{_libexecdir}/xapi --xapiconf=/etc/xapi.conf --hooksdir=/etc/xapi/hook-scripts --sharedir=/usr/share/xapi --plugindir=/usr/lib/xapi/plugins --optdir=/usr/lib/xapi --disable-tests -make - -sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" xen-api-xapi-conf.in > xen-api-xapi-conf - -%install - -mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 ocaml/xapi/xapi.opt %{buildroot}/%{_sbindir}/xapi -mkdir -p %{buildroot}/etc/pam.d -install -m 0644 xen-api-pam %{buildroot}/etc/pam.d/xapi -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xen-api-init %{buildroot}%{_sysconfdir}/init.d/xapi -mkdir -p %{buildroot}/%{_libexecdir}/xapi -install -m 0755 xen-api-xapissl %{buildroot}/%{_libexecdir}/xapi/xapissl -install -m 0755 scripts/update-mh-info %{buildroot}/%{_libexecdir}/xapi/update-mh-info -mkdir -p %{buildroot}/etc/xapi -install -m 0644 xen-api-xapi-conf %{buildroot}/etc/xapi.conf -install -m 0644 xen-api-db-conf %{buildroot}/etc/xapi/db.conf - -mkdir -p %{buildroot}/%{_bindir} -install -m 0755 ocaml/xe-cli/xe.opt %{buildroot}/%{_bindir}/xe -mkdir -p %{buildroot}/etc/bash_completion.d -install -m 0755 ocaml/xe-cli/bash-completion %{buildroot}/etc/bash_completion.d/xe - -mkdir -p %{buildroot}/var/lib/xapi -mkdir -p %{buildroot}/etc/xapi/hook-scripts - -mkdir -p %{buildroot}/etc/xcp -echo master > %{buildroot}/etc/xcp/pool.conf - -mkdir -p %{buildroot}/usr/share/xapi/packages/iso - -mkdir -p %{buildroot}%{python_sitelib} -install -m 0644 scripts/examples/python/XenAPI.py %{buildroot}%{python_sitelib} -install -m 0644 scripts/examples/python/XenAPIPlugin.py %{buildroot}%{python_sitelib} -install -m 0644 scripts/udhcpd.skel %{buildroot}/etc/xcp/udhcpd.skel - -%post -[ ! -x /sbin/chkconfig ] || chkconfig --add xapi - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xapi stop > /dev/null 2>&1 - /sbin/chkconfig --del xapi -fi - -%files -%{_sbindir}/xapi -/etc/init.d/xapi -%config(noreplace) /etc/xapi.conf -%config(noreplace) /etc/xcp/pool.conf -%config(noreplace) /etc/xcp/udhcpd.skel -%{_libexecdir}/xapi/xapissl -%{_libexecdir}/xapi/update-mh-info -/etc/xapi/db.conf -/etc/xapi/hook-scripts -/var/lib/xapi -/usr/share/xapi/packages/iso -/etc/pam.d/xapi - -%files xe -%{_bindir}/xe -/etc/bash_completion.d/xe - -%files python-devel -%{python_sitelib}/XenAPI.py -%{python_sitelib}/XenAPI.pyo -%{python_sitelib}/XenAPI.pyc - -%{python_sitelib}/XenAPIPlugin.py -%{python_sitelib}/XenAPIPlugin.pyo -%{python_sitelib}/XenAPIPlugin.pyc - -%changelog -* Fri Oct 24 2014 Jon Ludlam - 1.9.57-1 -- update to 1.9.57 - -* Fri Oct 17 2014 David Scott - 1.9.52-5 -- Add fix for Unix domain socket VNC consoles - -* Thu Oct 2 2014 David Scott - 1.9.52-4 -- Remove ocaml-libvhd dependency - -* Thu Sep 4 2014 Jon Ludlam - 1.9.52-3 -- Remove xen-missing-headers dependency - -* Thu Aug 21 2014 David Scott - 1.9.52-2 -- switch to xenlight xenopsd by default - -* Tue Jul 29 2014 Jon Ludlam - 1.9.52-1 -- update 1.9.52 - -* Fri Jun 6 2014 David Scott - 1.9.50-1 -- update 1.9.50 - -* Fri May 23 2014 David Scott - 1.9.49-1 -- update to 1.9.49 - -* Tue May 13 2014 David Scott - 1.9.47-1 -- update to 1.9.47 - -* Sun May 11 2014 David Scott - 1.9.46-1 -- update to 1.9.46 - -* Sat May 10 2014 David Scott - 1.9.45-1 -- update to 1.9.45 - -* Fri May 9 2014 David Scott - 1.9.44-1 -- update to 1.9.44 - -* Mon Apr 28 2014 David Scott - 1.9.41-1 -- first release from master - -* Sat Apr 26 2014 David Scott - 1.9.40-1 -- update to new xcp-idl interface with SR.probe - -* Wed Apr 2 2014 Euan Harris - 1.9.39-1 -- update to 1.9.39 - switch from stdext's Tar to ocaml-tar - -* Wed Oct 30 2013 David Scott - 1.9.38-1 -- update to 1.9.38 - import_raw_vdi path fix - -* Tue Oct 29 2013 David Scott - 1.9.37-1 -- update to 1.9.37 - bugfixes for storage motion on Ubuntu - -* Fri Oct 25 2013 David Scott - 1.9.36-1 -- update to 1.9.36 - bugfixes for storage motion - -* Tue Oct 22 2013 David Scott - 1.9.34-1 -- Update to 1.9.34 - bugfix for VDI.uuid filename feature - -* Mon Oct 21 2013 David Scott - 1.9.32-1 -- Update to 1.9.32 - include VDI.uuid filename improvements - -* Fri Oct 11 2013 Euan Harris - 1.9.30-1 -- Update to 1.9.30 - assume dom0 can be ballooned in all memory calculations. - -* Fri Sep 27 2013 David Scott - 1.9.29-1 -- Update to 1.9.29 - -* Wed Sep 25 2013 David Scott -- Update to 1.9.28 - -* Tue Sep 24 2013 David Scott - 1.9.27-2 -- Remove dependency on ocaml-bitstring - -* Tue Sep 24 2013 David Scott - 1.9.27-1 -- Update to 1.9.27 - -* Thu Sep 19 2013 Euan Harris - 1.9.25-2 -- Use 'python_sitelib' macro to choose Python install path, instead of hard-coding it. - -* Wed Sep 11 2013 David Scott - 1.9.25-1 -- Can now use either 'ffs' or 'iso' for the tools SR - -* Wed Sep 4 2013 David Scott - 1.9.22-1 -- Query domain 0 memory policy from squeezed - -* Wed Sep 4 2013 David Scott - 1.9.21-1 -- Update to 1.9.21, switch default xenopsd to the "classic" version - -* Mon Sep 2 2013 David Scott - 1.9.20-1 -- Fix XenAPI.py on python2.7 - -* Tue Aug 20 2013 David Scott - 1.9.19-1 -- Add sparse_dd to the xapi package so VDI.copy should work - -* Tue Jun 18 2013 David Scott - 1.9.6-1 -- Update to 1.9.6 - -* Sat Jun 8 2013 David Scott - 1.9.2-1 -- Add python-devel for writing python clients - -* Wed Jun 5 2013 David Scott - 1.9.1-1 -- Initial package - diff --git a/SPECS/xcp-networkd.spec b/SPECS/xcp-networkd.spec deleted file mode 100644 index 7223ed7b..00000000 --- a/SPECS/xcp-networkd.spec +++ /dev/null @@ -1,100 +0,0 @@ -Name: xcp-networkd -Version: 0.9.5 -Release: 1%{?dist} -Summary: Simple host network management service for the xapi toolstack -License: LGPL -URL: https://github.com/xapi-project/xcp-networkd -Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: xcp-networkd-init -Source2: xcp-networkd-conf -Source3: xcp-networkd-network-conf -Source4: xcp-networkd-bridge-conf -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: forkexecd-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: ocaml-xen-api-client-devel -BuildRequires: libffi-devel -BuildRequires: ocaml-netlink-devel -Requires: ethtool -Requires: redhat-lsb-core -Requires: libffi-devel -Requires: libnl3 - -%description -Simple host networking management service for the xapi toolstack. - -%prep -%setup -q -cp %{SOURCE1} xcp-networkd-init -cp %{SOURCE2} xcp-networkd-conf -cp %{SOURCE3} xcp-networkd-network-conf -cp %{SOURCE4} xcp-networkd-bridge-conf - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -mkdir -p %{buildroot}/%{_bindir} -make install DESTDIR=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xcp-networkd-init %{buildroot}%{_sysconfdir}/init.d/xcp-networkd -mkdir -p %{buildroot}/etc/xcp -install -m 0644 xcp-networkd-network-conf %{buildroot}/etc/xcp/network.conf -install -m 0644 xcp-networkd-conf %{buildroot}/etc/xcp-networkd.conf -mkdir -p %{buildroot}/etc/modprobe.d -install -m 0644 xcp-networkd-bridge-conf %{buildroot}/etc/modprobe.d/bridge.conf -mkdir -p %{buildroot}%{_mandir}/man1 -cp xcp-networkd.1 %{buildroot}%{_mandir}/man1/xcp-networkd.1 -gzip %{buildroot}%{_mandir}/man1/xcp-networkd.1 - -%files -%doc README.markdown LICENSE MAINTAINERS -%{_sbindir}/xcp-networkd -%{_bindir}/networkd_db -%{_sysconfdir}/init.d/xcp-networkd -/etc/modprobe.d/bridge.conf -%config(noreplace) /etc/xcp/network.conf -%config(noreplace) /etc/xcp-networkd.conf -%{_mandir}/man1/xcp-networkd.1.gz - -%post -/sbin/chkconfig --add xcp-networkd - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xcp-networkd stop > /dev/null 2>&1 - /sbin/chkconfig --del xcp-networkd -fi - -%changelog -* Sat Sep 27 2014 David Scott - 0.9.5-1 -- Update to 0.9.5 (now uses libnl) - -* Wed Jun 4 2014 Jon Ludlam - 0.9.4-1 -- Update to 0.9.4 -- Add networkd_db CLI - -* Wed Sep 25 2013 David Scott - 0.9.3-1 -- Update to 0.9.3 - -* Wed Aug 28 2013 David Scott -- When loading the bridge module, prevent guest traffic being - processed by the domain 0 firewall - -* Sun Jun 9 2013 David Scott -- Update to 0.9.2 - -* Fri Jun 7 2013 David Scott -- Update to 0.9.1 - -* Wed Jun 5 2013 David Scott -- Initial package - diff --git a/SPECS/xcp-python-libs.spec b/SPECS/xcp-python-libs.spec deleted file mode 100644 index 1c55ecec..00000000 --- a/SPECS/xcp-python-libs.spec +++ /dev/null @@ -1,39 +0,0 @@ -Summary: Common XenServer Python classes -Name: xcp-python-libs -Version: 1.9.0 -Release: 1%{?dist} -URL: https://github.com/xenserver/python-libs -Source0: https://github.com/xenserver/python-libs/archive/v%{version}/%{name}-%{version}.tar.gz -License: GPL -BuildArch: noarch - -BuildRequires: python-devel -BuildRequires: python-setuptools - -%description -Common XenServer Python classes. - -%prep -%setup -q -n python-libs-%{version} - -%build -mkdir -p xcp -cp *.py xcp -cp -r net xcp -%{__python} setup.py build - -%install -%{__python} setup.py install -O2 --skip-build --root %{buildroot} -rm -rf %{buildroot}/%{python_sitelib}/*-py*.egg-info - -%files -%{python_sitelib}/xcp - - -%changelog -* Mon Feb 17 2014 Euan Harris - 1.9.0-1 -- Switch to upstream sources - -* Thu Jan 23 2014 Euan Harris - 0.9.0-1 -- Initial package - diff --git a/SPECS/xcp-rrdd.spec b/SPECS/xcp-rrdd.spec deleted file mode 100644 index b05f2db4..00000000 --- a/SPECS/xcp-rrdd.spec +++ /dev/null @@ -1,84 +0,0 @@ -Name: xcp-rrdd -Version: 0.9.8 -Release: 1%{?dist} -Summary: Statistics gathering daemon for the xapi toolstack -License: LGPL -URL: https://github.com/xapi-project/xcp-rrdd -Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: xcp-rrdd-init -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: ocaml-xenops-devel -BuildRequires: ocaml-rrd-transport-devel -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel -BuildRequires: ocaml-oclock-devel -BuildRequires: forkexecd-devel -BuildRequires: xen-devel -Requires: redhat-lsb-core - -%description -Statistics gathering daemon for the xapi toolstack. - -%prep -%setup -q -cp %{SOURCE1} xcp-rrdd-init - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xcp-rrdd-init %{buildroot}%{_sysconfdir}/init.d/xcp-rrdd - - -%files -%doc README.markdown LICENSE -%{_sbindir}/xcp-rrdd -%{_sysconfdir}/init.d/xcp-rrdd - -%post -/sbin/chkconfig --add xcp-rrdd - -%preun -if [ $1 -eq 0 ]; then - /sbin/service xcp-rrdd stop > /dev/null 2>&1 - /sbin/chkconfig --del xcp-rrdd -fi - -%changelog -* Tue Oct 14 2014 David Scott - 0.9.8-1 -- Update to 0.9.8 - -* Thu Sep 4 2014 Jon Ludlam - 0.9.7-2 -- Remove xen-missing-headers dependency - -* Wed Jun 4 2014 Jon Ludlam - 0.9.7-1 -- Update to 0.9.7 -- Create new subpackage for the devel libraries now installed - -* Fri May 9 2014 David Scott - 0.9.5-1 -- Update to 0.9.5, now will start without xen - -* Sat Apr 26 2014 David Scott - 0.9.4-1 -- Update to 0.9.4, now depends on rrdd-transport - -* Wed Sep 25 2013 David Scott - 0.9.2-1 -- Update to 0.9.2 - -* Tue Sep 10 2013 David Scott -- Update to 0.9.1 - -* Tue Jun 18 2013 David Scott -- Initial package - diff --git a/SPECS/xcp-sm.spec b/SPECS/xcp-sm.spec deleted file mode 100644 index 7aad7285..00000000 --- a/SPECS/xcp-sm.spec +++ /dev/null @@ -1,339 +0,0 @@ -# -*- rpm-spec -*- - -Summary: XCP storage managers -Name: xcp-sm -Version: 0.9.7 -Release: 3%{?dist} -License: LGPL -URL: https://github.com/xapi-project/sm -Source0: https://github.com/BobBall/sm/archive/%{version}/sm-%{version}.tar.gz -Source1: xcp-mpath-scsidev-rules -Source2: xcp-mpath-scsidev-script -Patch0: sm-path-fix.patch -Patch1: xcp-sm-pylint-fix.patch -BuildRequires: python-devel -BuildRequires: swig -BuildRequires: xen-devel -BuildRequires: pylint -Requires: iscsi-initiator-utils -Requires: sg3_utils -Requires: xen-runtime - -%description -This package contains storage backends used in XCP - -%prep -%setup -q -n sm-%{version} -%patch0 -p1 -%patch1 -p1 -cp %{SOURCE1} xcp-mpath-scsidev-rules -cp %{SOURCE2} xcp-mpath-scsidev-script - -%build -sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/SR.py -sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/blktap2.py -sed -ie "s|@LIBDIR@|%{_libdir}|g" drivers/vhdutil.py -DESTDIR=$RPM_BUILD_ROOT make - -%install -make PLUGIN_SCRIPT_DEST=%{_libdir}/xapi/plugins/ SM_DEST=%{_libdir}/xapi/sm/ DESTDIR=$RPM_BUILD_ROOT install -mkdir -p %{buildroot}/etc/udev/rules.d -install -m 0644 xcp-mpath-scsidev-rules %{buildroot}/etc/udev/rules.d/55-xs-mpath-scsidev.rules -mkdir -p %{buildroot}/etc/udev/scripts -install -m 0755 xcp-mpath-scsidev-script %{buildroot}/etc/udev/scripts/xs-mpath-scsidev.sh - - -%post -[ ! -x /sbin/chkconfig ] || chkconfig --add mpathroot -[ ! -x /sbin/chkconfig ] || chkconfig --add sm-multipath -service sm-multipath start - -[ -f /etc/lvm/lvm.conf.orig ] || cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf.orig || exit $? -[ -d /etc/lvm/master ] || mkdir /etc/lvm/master || exit $? -mv -f /etc/lvm/lvm.conf /etc/lvm/master/lvm.conf || exit $? -sed -i 's/metadata_read_only =.*/metadata_read_only = 0/' /etc/lvm/master/lvm.conf || exit $? -sed -i 's/archive = .*/archive = 0/' /etc/lvm/master/lvm.conf || exit $? -sed -i 's/filter \= \[ \"a\/\.\*\/\" \]/filter = \[ \"r\|\/dev\/xvd\.\|\"\, \"r\|\/dev\/VG\_Xen\.\*\/\*\|\"\]/g' /etc/lvm/master/lvm.conf || exit $? -cp /etc/lvm/master/lvm.conf /etc/lvm/lvm.conf || exit $? -sed -i 's/metadata_read_only =.*/metadata_read_only = 1/' /etc/lvm/lvm.conf || exit $? -# We try to be "update-alternatives" ready. -# If a file exists and it is not a symlink we back it up -if [ -e /etc/multipath.conf -a ! -h /etc/multipath.conf ]; then - mv -f /etc/multipath.conf /etc/multipath.conf.$(date +%F_%T) -fi -update-alternatives --install /etc/multipath.conf multipath.conf /etc/multipath.xenserver/multipath.conf 90 - -%preun -[ ! -x /sbin/chkconfig ] || chkconfig --del sm-multipath -#only remove in case of erase (but not at upgrade) -if [ $1 -eq 0 ] ; then - update-alternatives --remove multipath.conf /etc/multipath.xenserver/multipath.conf -fi -exit 0 - -%postun -[ ! -d /etc/lvm/master ] || rm -Rf /etc/lvm/master || exit $? -cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? - -%files -/etc/cron.d/* -/etc/rc.d/init.d/snapwatchd -/etc/rc.d/init.d/mpathroot -/etc/rc.d/init.d/sm-multipath -/etc/udev/rules.d/55-xs-mpath-scsidev.rules -/etc/udev/scripts/xs-mpath-scsidev.sh -%{_libdir}/xapi/plugins/coalesce-leaf -%{_libdir}/xapi/plugins/lvhd-thin -%{_libdir}/xapi/plugins/nfs-on-slave -%{_libdir}/xapi/plugins/on-slave -%{_libdir}/xapi/plugins/tapdisk-pause -%{_libdir}/xapi/plugins/testing-hooks -%{_libdir}/xapi/plugins/vss_control -%{_libdir}/xapi/plugins/intellicache-clean -/etc/xensource/master.d/02-vhdcleanup -/opt/xensource/bin/blktap2 -/opt/xensource/bin/tapdisk-cache-stats -/opt/xensource/debug/tp -/opt/xensource/libexec/check-device-sharing -/opt/xensource/libexec/dcopy -/opt/xensource/libexec/local-device-change -%{_libdir}/xapi/sm/DummySR -%{_libdir}/xapi/sm/DummySR.py -%{_libdir}/xapi/sm/DummySR.pyc -%{_libdir}/xapi/sm/DummySR.pyo -%{_libdir}/xapi/sm/EXTSR -%{_libdir}/xapi/sm/EXTSR.py -%{_libdir}/xapi/sm/EXTSR.pyc -%{_libdir}/xapi/sm/EXTSR.pyo -%{_libdir}/xapi/sm/FileSR -%{_libdir}/xapi/sm/FileSR.py -%{_libdir}/xapi/sm/FileSR.pyc -%{_libdir}/xapi/sm/FileSR.pyo -%{_libdir}/xapi/sm/HBASR -%{_libdir}/xapi/sm/HBASR.py -%{_libdir}/xapi/sm/HBASR.pyc -%{_libdir}/xapi/sm/HBASR.pyo -%{_libdir}/xapi/sm/ISCSISR -%{_libdir}/xapi/sm/ISCSISR.py -%{_libdir}/xapi/sm/ISCSISR.pyc -%{_libdir}/xapi/sm/ISCSISR.pyo -%{_libdir}/xapi/sm/ISOSR -%{_libdir}/xapi/sm/ISOSR.py -%{_libdir}/xapi/sm/ISOSR.pyc -%{_libdir}/xapi/sm/ISOSR.pyo -%{_libdir}/xapi/sm/OCFSSR.py -%{_libdir}/xapi/sm/OCFSSR.pyc -%{_libdir}/xapi/sm/OCFSSR.pyo -%{_libdir}/xapi/sm/OCFSoISCSISR -%{_libdir}/xapi/sm/OCFSoISCSISR.py -%{_libdir}/xapi/sm/OCFSoISCSISR.pyc -%{_libdir}/xapi/sm/OCFSoISCSISR.pyo -%{_libdir}/xapi/sm/OCFSoHBASR -%{_libdir}/xapi/sm/OCFSoHBASR.py -%{_libdir}/xapi/sm/OCFSoHBASR.pyc -%{_libdir}/xapi/sm/OCFSoHBASR.pyo -%{_libdir}/xapi/sm/LUNperVDI.py -%{_libdir}/xapi/sm/LUNperVDI.pyc -%{_libdir}/xapi/sm/LUNperVDI.pyo -%{_libdir}/xapi/sm/LVHDSR.py -%{_libdir}/xapi/sm/LVHDSR.pyc -%{_libdir}/xapi/sm/LVHDSR.pyo -%{_libdir}/xapi/sm/LVHDoHBASR.py -%{_libdir}/xapi/sm/LVHDoHBASR.pyc -%{_libdir}/xapi/sm/LVHDoHBASR.pyo -%{_libdir}/xapi/sm/LVHDoISCSISR.py -%{_libdir}/xapi/sm/LVHDoISCSISR.pyc -%{_libdir}/xapi/sm/LVHDoISCSISR.pyo -%{_libdir}/xapi/sm/LVMSR -%{_libdir}/xapi/sm/LVMoHBASR -%{_libdir}/xapi/sm/LVMoISCSISR -%{_libdir}/xapi/sm/NFSSR -%{_libdir}/xapi/sm/NFSSR.py -%{_libdir}/xapi/sm/NFSSR.pyc -%{_libdir}/xapi/sm/NFSSR.pyo -%{_libdir}/xapi/sm/SHMSR.py -%{_libdir}/xapi/sm/SHMSR.pyc -%{_libdir}/xapi/sm/SHMSR.pyo -%{_libdir}/xapi/sm/SR.py -%{_libdir}/xapi/sm/SR.pyc -%{_libdir}/xapi/sm/SR.pyo -%{_libdir}/xapi/sm/SRCommand.py -%{_libdir}/xapi/sm/SRCommand.pyc -%{_libdir}/xapi/sm/SRCommand.pyo -%{_libdir}/xapi/sm/VDI.py -%{_libdir}/xapi/sm/VDI.pyc -%{_libdir}/xapi/sm/VDI.pyo -%{_libdir}/xapi/sm/XE_SR_ERRORCODES.xml -%{_libdir}/xapi/sm/blktap2.py -%{_libdir}/xapi/sm/blktap2.pyc -%{_libdir}/xapi/sm/blktap2.pyo -%{_libdir}/xapi/sm/cleanup.py -%{_libdir}/xapi/sm/cleanup.pyc -%{_libdir}/xapi/sm/cleanup.pyo -%{_libdir}/xapi/sm/devscan.py -%{_libdir}/xapi/sm/devscan.pyc -%{_libdir}/xapi/sm/devscan.pyo -%{_libdir}/xapi/sm/fjournaler.py -%{_libdir}/xapi/sm/fjournaler.pyc -%{_libdir}/xapi/sm/fjournaler.pyo -%{_libdir}/xapi/sm/flock.py -%{_libdir}/xapi/sm/flock.pyc -%{_libdir}/xapi/sm/flock.pyo -%{_libdir}/xapi/sm/ipc.py -%{_libdir}/xapi/sm/ipc.pyc -%{_libdir}/xapi/sm/ipc.pyo -%{_libdir}/xapi/sm/iscsilib.py -%{_libdir}/xapi/sm/iscsilib.pyc -%{_libdir}/xapi/sm/iscsilib.pyo -%{_libdir}/xapi/sm/journaler.py -%{_libdir}/xapi/sm/journaler.pyc -%{_libdir}/xapi/sm/journaler.pyo -%{_libdir}/xapi/sm/lcache.py -%{_libdir}/xapi/sm/lcache.pyc -%{_libdir}/xapi/sm/lcache.pyo -%{_libdir}/xapi/sm/lock.py -%{_libdir}/xapi/sm/lock.pyc -%{_libdir}/xapi/sm/lock.pyo -%{_libdir}/xapi/sm/lvhdutil.py -%{_libdir}/xapi/sm/lvhdutil.pyc -%{_libdir}/xapi/sm/lvhdutil.pyo -%{_libdir}/xapi/sm/lvmanager.py -%{_libdir}/xapi/sm/lvmanager.pyc -%{_libdir}/xapi/sm/lvmanager.pyo -%{_libdir}/xapi/sm/lvmcache.py -%{_libdir}/xapi/sm/lvmcache.pyc -%{_libdir}/xapi/sm/lvmcache.pyo -%{_libdir}/xapi/sm/lvutil.py -%{_libdir}/xapi/sm/lvutil.pyc -%{_libdir}/xapi/sm/lvutil.pyo -%{_libdir}/xapi/sm/metadata.py -%{_libdir}/xapi/sm/metadata.pyc -%{_libdir}/xapi/sm/metadata.pyo -%{_libdir}/xapi/sm/srmetadata.py -%{_libdir}/xapi/sm/srmetadata.pyc -%{_libdir}/xapi/sm/srmetadata.pyo -%{_libdir}/xapi/sm/mpath_cli.py -%{_libdir}/xapi/sm/mpath_cli.pyc -%{_libdir}/xapi/sm/mpath_cli.pyo -%{_libdir}/xapi/sm/mpath_dmp.py -%{_libdir}/xapi/sm/mpath_dmp.pyc -%{_libdir}/xapi/sm/mpath_dmp.pyo -%{_libdir}/xapi/sm/mpath_null.py -%{_libdir}/xapi/sm/mpath_null.pyc -%{_libdir}/xapi/sm/mpath_null.pyo -%{_libdir}/xapi/sm/mpathcount.py -%{_libdir}/xapi/sm/mpathcount.pyc -%{_libdir}/xapi/sm/mpathcount.pyo -%{_libdir}/xapi/sm/mpathutil.py -%{_libdir}/xapi/sm/mpathutil.pyc -%{_libdir}/xapi/sm/mpathutil.pyo -%{_libdir}/xapi/sm/mpp_luncheck.py -%{_libdir}/xapi/sm/mpp_luncheck.pyc -%{_libdir}/xapi/sm/mpp_luncheck.pyo -%{_libdir}/xapi/sm/mpp_mpathutil.py -%{_libdir}/xapi/sm/mpp_mpathutil.pyc -%{_libdir}/xapi/sm/mpp_mpathutil.pyo -%{_libdir}/xapi/sm/nfs.py -%{_libdir}/xapi/sm/nfs.pyc -%{_libdir}/xapi/sm/nfs.pyo -%{_libdir}/xapi/sm/refcounter.py -%{_libdir}/xapi/sm/refcounter.pyc -%{_libdir}/xapi/sm/refcounter.pyo -%{_libdir}/xapi/sm/resetvdis.py -%{_libdir}/xapi/sm/resetvdis.pyc -%{_libdir}/xapi/sm/resetvdis.pyo -%{_libdir}/xapi/sm/scsiutil.py -%{_libdir}/xapi/sm/scsiutil.pyc -%{_libdir}/xapi/sm/scsiutil.pyo -%{_libdir}/xapi/sm/scsi_host_rescan.py -%{_libdir}/xapi/sm/scsi_host_rescan.pyc -%{_libdir}/xapi/sm/scsi_host_rescan.pyo -/opt/xensource/sm/snapwatchd/snapwatchd -/opt/xensource/sm/snapwatchd/xslib.py -/opt/xensource/sm/snapwatchd/xslib.pyc -/opt/xensource/sm/snapwatchd/xslib.pyo -/opt/xensource/sm/snapwatchd/snapdebug.py -/opt/xensource/sm/snapwatchd/snapdebug.pyc -/opt/xensource/sm/snapwatchd/snapdebug.pyo -%{_libdir}/xapi/sm/sysdevice.py -%{_libdir}/xapi/sm/sysdevice.pyc -%{_libdir}/xapi/sm/sysdevice.pyo -%{_libdir}/xapi/sm/udevSR -%{_libdir}/xapi/sm/udevSR.py -%{_libdir}/xapi/sm/udevSR.pyc -%{_libdir}/xapi/sm/udevSR.pyo -%{_libdir}/xapi/sm/updatempppathd.py -%{_libdir}/xapi/sm/updatempppathd.pyc -%{_libdir}/xapi/sm/updatempppathd.pyo -%{_libdir}/xapi/sm/util.py -%{_libdir}/xapi/sm/util.pyc -%{_libdir}/xapi/sm/util.pyo -%{_libdir}/xapi/sm/verifyVHDsOnSR.py -%{_libdir}/xapi/sm/verifyVHDsOnSR.pyc -%{_libdir}/xapi/sm/verifyVHDsOnSR.pyo -%{_libdir}/xapi/sm/vhdutil.py -%{_libdir}/xapi/sm/vhdutil.pyc -%{_libdir}/xapi/sm/vhdutil.pyo -%{_libdir}/xapi/sm/vss_control -%{_libdir}/xapi/sm/xs_errors.py -%{_libdir}/xapi/sm/xs_errors.pyc -%{_libdir}/xapi/sm/xs_errors.pyo -%{_libdir}/xapi/sm/wwid_conf.py -%{_libdir}/xapi/sm/wwid_conf.pyc -%{_libdir}/xapi/sm/wwid_conf.pyo -/sbin/mpathutil -%config /etc/udev/rules.d/40-multipath.rules -%config /etc/multipath.xenserver/multipath.conf - - -%package rawhba -Summary: XCP rawhba SR type capability -#Requires: sm = @SM_VERSION@-@SM_RELEASE@ - -%description rawhba -This package adds a new rawhba SR type. This SR type allows utilization of -Fiber Channel raw LUNs as separate VDIs (LUN per VDI) - -%files rawhba -%{_libdir}/xapi/sm/RawHBASR -%{_libdir}/xapi/sm/RawHBASR.py -%{_libdir}/xapi/sm/RawHBASR.pyc -%{_libdir}/xapi/sm/RawHBASR.pyo -%{_libdir}/xapi/sm/B_util.py -%{_libdir}/xapi/sm/B_util.pyc -%{_libdir}/xapi/sm/B_util.pyo - -%changelog -* Thu Sep 4 2014 Jon Ludlam - 0.9.7-3 -- Remove xen-missing-headers dependency - -* Fri Jun 20 2014 David Scott - 0.9.7-2 -- Update file list - -* Fri Jun 20 2014 Bob Ball - 0.9.7-1 -- Update to 0.9.7: Rebase to xapi-project/sm b890746ea3b64058654947a6b74caf578cc11311 - -* Wed Apr 30 2014 Bob Ball - 0.9.6-3 -- Added fix for paths to blktap to use buildroot versions - -* Tue Dec 10 2013 Euan Harris - 0.9.6-2 -- Add dependency on xen-runtime - -* Fri Nov 8 2013 Euan Harris - 0.9.6-1 -- Update to 0.9.6, with fixes for iSCSI volumes on Ubuntu - -* Mon Oct 28 2013 Euan Harris -- Update to 0.9.5, adding udev scripts and package dependencies needed to use iSCSI volumes - -* Thu Oct 24 2013 Euan Harris -- Update to 0.9.4 - -* Wed Oct 23 2013 David Scott -- Update to 0.9.3 - -* Wed Sep 11 2013 Euan Harris -- Move drivers to _libdir/xapi/sm - -* Mon Sep 09 2013 Euan Harris -- Initial package - diff --git a/SPECS/xe-create-templates.spec b/SPECS/xe-create-templates.spec deleted file mode 100644 index e7eaf058..00000000 --- a/SPECS/xe-create-templates.spec +++ /dev/null @@ -1,47 +0,0 @@ -Name: xe-create-templates -Version: 0.9.3 -Release: 1%{?dist} -Summary: Creates default XenServer templates -License: LGPL -URL: https://github.com/xapi-project/xcp-guest-templates -Source0: https://github.com/xapi-project/xcp-guest-templates/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-camlp4-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-obuild -BuildRequires: ocaml-lwt-devel -BuildRequires: ocaml-stdext-devel -BuildRequires: ocaml-xmlm-devel -BuildRequires: ocaml-xen-api-client-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-xen-api-libs-transitional-devel - -%description -A utility to create the default XenServer templates. - -%prep -%setup -q -n xcp-guest-templates-%{version} - -%build -obuild configure -obuild build - -%install -mkdir -p %{buildroot}/%{_bindir} -install -m 0755 dist/build/xe-create-templates/xe-create-templates %{buildroot}/%{_bindir}/ - - -%files -%doc README.md -%{_bindir}/xe-create-templates - -%changelog -* Fri Jun 6 2014 Jonathan Ludlam - 0.9.3-1 -- Update to 0.9.3 - -* Wed Sep 25 2013 David Scott - 0.9.2-1 -- Update to 0.9.2 - -* Wed Jun 12 2013 David Scott -- Initial package - diff --git a/SPECS/xenops-cli.spec b/SPECS/xenops-cli.spec deleted file mode 100644 index 57f5f2fd..00000000 --- a/SPECS/xenops-cli.spec +++ /dev/null @@ -1,36 +0,0 @@ -Name: xenops-cli -Version: 0.9.1 -Release: 2%{?dist} -Summary: CLI for xenopsd, the xapi toolstack domain manager -License: LGPL -URL: https://github.com/xapi-project/xenops-cli -Source0: https://github.com/xapi-project/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-uuidm-devel -BuildRequires: ocaml-xcp-idl-devel - -%description -Command-line interface for xenopsd, the xapi toolstack domain manager. - -%prep -%setup -q -n %{name}-%{name}-%{version} - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -install main.native %{buildroot}/%{_sbindir}/xenops-cli - - -%files -%doc README.md LICENSE MAINTAINERS -%{_sbindir}/xenops-cli - -%changelog -* Thu May 30 2013 David Scott - 0.9.1-2 -- Initial package - diff --git a/SPECS/xenopsd.spec b/SPECS/xenopsd.spec deleted file mode 100644 index 2a96f9e8..00000000 --- a/SPECS/xenopsd.spec +++ /dev/null @@ -1,295 +0,0 @@ -Name: xenopsd -Version: 0.9.45 -Release: 2%{?dist} -Summary: Simple VM manager -License: LGPL -URL: https://github.com/xapi-project/xenopsd -Source0: https://github.com/xapi-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: xenopsd-xc-init -Source2: xenopsd-simulator-init -Source3: xenopsd-libvirt-init -Source4: xenopsd-xenlight-init -Source5: make-xsc-xenopsd.conf -Source6: xenopsd-network-conf -Source7: xenopsd-vncterm-wrapper -Patch0: xenopsd.f894d3d2d10aa6b4291902c5bb3d7f3a9cb48252 -Patch1: xenopsd.958171fc701559903af413b2ae6a4ee6dcfd8266 -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-rpc-devel -BuildRequires: ocaml-xcp-idl-devel -BuildRequires: ocaml-cmdliner-devel -BuildRequires: ocaml-cohttp-devel -BuildRequires: forkexecd-devel -BuildRequires: ocaml-oclock-devel -BuildRequires: ocaml-uuidm-devel -BuildRequires: libvirt-devel -BuildRequires: ocaml-libvirt-devel -BuildRequires: ocaml-qmp-devel -BuildRequires: ocaml-sexplib-devel -BuildRequires: ocaml-xen-lowlevel-libs-devel -BuildRequires: ocaml-xenstore-clients-devel -BuildRequires: ocaml-xenstore-devel -BuildRequires: ocaml-xcp-inventory-devel -BuildRequires: xen-devel -BuildRequires: ocaml-uutf-devel -BuildRequires: ocaml-xcp-rrd-devel -BuildRequires: ocaml-oclock-devel -Requires: message-switch -Requires: redhat-lsb-core -Requires: xenops-cli -Requires: vncterm -Requires: linux-guest-loader -Requires: ocaml-xen-lowlevel-libs-runtime - -%description -Simple VM manager for the xapi toolstack. - -%package libvirt -Summary: Xenopsd using libvirt -Requires: %{name} = %{version}-%{release} -Requires: libvirt - -%description libvirt -Simple VM manager for Xen and KVM using libvirt. - - -%package xc -Summary: Xenopsd using xc -Requires: %{name} = %{version}-%{release} -Requires: forkexecd -Requires: vncterm -Requires: xen-libs - -%description xc -Simple VM manager for Xen using libxc. - -%package simulator -Summary: Xenopsd simulator -Requires: %{name} = %{version}-%{release} - -%description simulator -A synthetic VM manager for testing. - -%package xenlight -Summary: Xenopsd using libxenlight -Group: Development/Other -Requires: %{name} = %{version}-%{release} -%description xenlight -Simple VM manager for Xen using libxenlight - -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -cp %{SOURCE1} xenopsd-xc-init -cp %{SOURCE2} xenopsd-simulator-init -cp %{SOURCE3} xenopsd-libvirt-init -cp %{SOURCE4} xenopsd-xenlight-init -cp %{SOURCE5} make-xsc-xenopsd.conf -cp %{SOURCE6} xenopsd-network-conf -cp %{SOURCE7} xenopsd-vncterm-wrapper - -%build -./configure --libexecdir %{_libexecdir}/%{name} -make - -%install -mkdir -p %{buildroot}/%{_sbindir} - -install -D _build/libvirt/xenops_libvirt_main.native %{buildroot}/%{_sbindir}/xenopsd-libvirt -install -D _build/simulator/xenops_simulator_main.native %{buildroot}/%{_sbindir}/xenopsd-simulator -install -D _build/xc/xenops_xc_main.native %{buildroot}/%{_sbindir}/xenopsd-xc -install -D _build/xl/xenops_xl_main.native %{buildroot}/%{_sbindir}/xenopsd-xenlight -install -D -m 0755 xenopsd-xenlight-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xenlight -mkdir -p %{buildroot}/%{_libexecdir}/%{name} -install -D scripts/vif %{buildroot}/%{_libexecdir}/%{name}/vif -install -D scripts/vif-real %{buildroot}/%{_libexecdir}/%{name}/vif-real -install -D scripts/block %{buildroot}/%{_libexecdir}/%{name}/block -install -D scripts/qemu-dm-wrapper %{buildroot}/%{_libexecdir}/%{name}/qemu-dm-wrapper -install -D xenopsd-vncterm-wrapper %{buildroot}/%{_libexecdir}/%{name}/vncterm-wrapper -install -D scripts/qemu-vif-script %{buildroot}/%{_libexecdir}/%{name}/qemu-vif-script -install -D scripts/setup-vif-rules %{buildroot}/%{_libexecdir}/%{name}/setup-vif-rules -install -D scripts/common.py %{buildroot}/%{_libexecdir}/%{name}/common.py -install -D scripts/network.conf %{buildroot}/%{_libexecdir}/%{name}/network.conf - -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 0755 xenopsd-libvirt-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-libvirt -install -m 0755 xenopsd-xc-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-xc -install -m 0755 xenopsd-simulator-init %{buildroot}/%{_sysconfdir}/init.d/xenopsd-simulator - -mkdir -p %{buildroot}/etc/xapi -chmod 755 make-xsc-xenopsd.conf -LIBEXECDIR=%{_libexecdir}/%{name} ETCDIR=/etc/xapi SCRIPTSDIR=%{_libexecdir}/%{name} DESTDIR=%{buildroot} ./make-xsc-xenopsd.conf > xenopsd-conf -install -m 0644 xenopsd-conf %{buildroot}/etc/xenopsd.conf -install -m 0644 xenopsd-network-conf %{buildroot}/etc/xapi/network.conf - - -%files -%doc README.md LICENSE -%{_libexecdir}/%{name}/vif -%{_libexecdir}/%{name}/vif-real -%{_libexecdir}/%{name}/block -%{_libexecdir}/%{name}/qemu-dm-wrapper -%{_libexecdir}/%{name}/vncterm-wrapper -%{_libexecdir}/%{name}/qemu-vif-script -%{_libexecdir}/%{name}/setup-vif-rules -%{_libexecdir}/%{name}/network.conf -%{_libexecdir}/%{name}/common.py -%{_libexecdir}/%{name}/common.pyo -%{_libexecdir}/%{name}/common.pyc -/etc/xenopsd.conf -/etc/xapi/network.conf - -%files libvirt -%{_sbindir}/xenopsd-libvirt -%{_sysconfdir}/init.d/xenopsd-libvirt - -%post libvirt -/sbin/chkconfig --add xenopsd-libvirt - -%preun libvirt -if [ $1 -eq 0 ]; then - /sbin/service xenopsd-libvirt stop > /dev/null 2>&1 - /sbin/chkconfig --del xenopsd-libvirt -fi - -%files xc -%{_sbindir}/xenopsd-xc -%{_sysconfdir}/init.d/xenopsd-xc - -%post xc -/sbin/chkconfig --add xenopsd-xc - -%preun xc -if [ $1 -eq 0 ]; then - /sbin/service xenopsd-xc stop > /dev/null 2>&1 - /sbin/chkconfig --del xenopsd-xc -fi - -%files simulator -%{_sbindir}/xenopsd-simulator -%{_sysconfdir}/init.d/xenopsd-simulator - -%post simulator -/sbin/chkconfig --add xenopsd-simulator - -%preun simulator -if [ $1 -eq 0 ]; then - /sbin/service xenopsd-simulator stop > /dev/null 2>&1 - /sbin/chkconfig --del xenopsd-simulator -fi - -%files xenlight -%defattr(-,root,root) -%{_sbindir}/xenopsd-xenlight -%{_sysconfdir}/init.d/xenopsd-xenlight - -%post xenlight -/sbin/chkconfig --add xenopsd-xenlight - -%preun xenlight -if [ $1 -eq 0 ]; then - /sbin/service xenopsd-xenlight stop > /dev/null 2>&1 - /sbin/chkconfig --del xenopsd-xenlight -fi - -%changelog -* Sun Oct 19 2014 David Scott - 0.9.45-2 -- Add patch to fix the upstream qemu 4MiB videoram issue -- Add patch to fix the device id upgrade issue - -* Tue Oct 14 2014 David Scott - 0.9.45-1 -- Update to 0.9.45 - -* Mon Sep 22 2014 David Scott - 0.9.44-1 -- Update to 0.9.44 - -* Mon Sep 8 2014 David Scott - 0.9.43-4 -- Add a search-path to the xenopsd.conf - -* Thu Sep 4 2014 Jon Ludlam - 0.9.43-3 -- Remove xen-missing-headers dependency - -* Thu Sep 4 2014 Jon Ludlam - 0.9.43-2 -- Reinstate xenlight package in CentOS - -* Sun Aug 24 2014 David Scott - 0.9.43-1 -- Update to 0.9.43 which supports OCaml 4.01.0 - -* Fri Aug 22 2014 David Scott - 0.9.41-1 -- Update to 0.9.41: now pygrub, eliloader, hvmloader and vncterm - are optional - -* Fri Aug 22 2014 David Scott - 0.9.39-5 -- vncterm-wrapper: ensure the groups are added on startup. - -* Fri Aug 22 2014 David Scott - 0.9.39-4 -- Add a vncterm-wrapper: needed to locate the qemu keymaps - -* Thu Aug 21 2014 David Scott - 0.9.39-2 -- Include {vbd,vif}-xl in the package - -* Wed Aug 20 2014 David Scott - 0.9.39-2 -- Package xenopsd-xenlight - -* Wed Aug 20 2014 Jon Ludlam - 0.9.39-1 -- Update to 0.9.39 which compiles without warnings - -* Tue Aug 19 2014 David Scott - 0.9.38-1 -- Update to 0.9.38 with better libxl support - -* Sat Jun 21 2014 David Scott - 0.9.37-1 -- Depend on the ocaml-xen-lowlevel-libs-runtime package -- Don't include xenguest: this now comes from ocaml-xen-lowlevel-libs - -* Fri Jun 6 2014 Jonathan Ludlam - 0.9.37-1 -- Update to 0.9.37 - -* Fri Jan 17 2014 Euan Harris - 0.9.34-1 -- Update to 0.9.34, restoring fixes from the 0.9.32 line which were - not merged to trunk before 0.9.33 was tagged - -* Wed Dec 4 2013 Euan Harris - 0.9.33-1 -- Update to 0.9.33, with fixes for suspending and resuming HVM guests - -* Mon Oct 28 2013 David Scott - 0.9.32-1 -- Update to 0.9.32, with udev fix (no more "task was asynchronously cancelled") - -* Mon Oct 21 2013 David Scott -- Update to 0.9.31 -- move scripts back to libexecdir - -* Sun Oct 20 2013 David Scott -- give up on making libxl work, since it requires xen-4.4 -- move scripts from libexecdir to libdir - -* Fri Oct 18 2013 David Scott -- update to 0.9.29 - -* Fri Oct 18 2013 David Scott -- update to 0.9.28 - -* Wed Sep 25 2013 David Scott -- modprobe blk{tap,back} in the xenopsd-xc init.d script since - we need these to make virtual disks work -- update to 0.9.27 - -* Tue Sep 24 2013 David Scott -- Update to 0.9.26, which includes fixes for networking and libxl - -* Fri Sep 20 2013 Euan Harris -- Generate xenopsd.conf automatically - -* Mon Sep 16 2013 Euan Harris -- Update to 0.9.25, which includes linker paths required on Debian - -* Tue Sep 10 2013 David Scott -- Update to 0.9.24 - -* Fri Jun 21 2013 David Scott -- Update to 0.9.5, which includes xenopsd-xenlight - -* Thu May 30 2013 David Scott -- Initial package diff --git a/SPECS/xenserver-core.spec b/SPECS/xenserver-core.spec deleted file mode 100644 index 44d97d4a..00000000 --- a/SPECS/xenserver-core.spec +++ /dev/null @@ -1,74 +0,0 @@ -Name: xenserver-core -Version: 0.10.0 -Release: 3%{?dist} -Summary: A virtual package which installs the xapi toolstack -License: LGPL -URL: http://www.xenserver.org/ -Source0: xenserver-readme -Requires: xenserver-install-wizard -Requires: xapi -Requires: xapi-python-devel -Requires: xapi-xe -Requires: xe-create-templates -Requires: xenopsd-simulator -Requires: xenopsd-xc -Requires: xenopsd-xenlight -Requires: xenops-cli -Requires: ffs -Requires: sm-cli -Requires: xcp-sm -Requires: xapi-storage-script -Requires: ezlvm -Requires: xcp-networkd -Requires: xcp-rrdd -Requires: squeezed -Requires: linux-guest-loader -Requires: xen - -%description -A virtual package which installs the xapi toolstack. - -%prep -%setup -c -T -cp %{SOURCE0} xenserver-readme - -%build - -%install -mkdir -p %{buildroot}/usr/share/doc/xenserver -install -m 0644 xenserver-readme %{buildroot}/usr/share/doc/xenserver/README - - -%files -/usr/share/doc/xenserver/README - -%changelog -* Fri Oct 17 2014 David Scott - 0.10.0-3 -- Add dependency on xapi-storage-script and ezlvm - -* Wed Aug 20 2014 David Scott - 0.10.0-2 -- Add dependency on xenopsd-xenlight - -* Fri Nov 1 2013 Euan Harris - 0.10.0-1 -- Bump version to 0.10.0 - -* Sun Oct 20 2013 David Scott -- Remove xenopsd-xenlight since the build depends on xen-4.4 - -* Fri Sep 20 2013 Euan Harris -- Don't install openstack-xapi-plugins with xenserver-core - -* Fri Jun 21 2013 David Scott -- Include xenopsd-xenlight - -* Tue Jun 18 2013 David Scott -- add a dependency on xcp-rrdd - -* Sat Jun 8 2013 David Scott -- add a xenserver-install-wizard -- add dependency on xapi-python-devel for use by the install wizard -- include the xenops and SM CLIs - -* Wed Jun 5 2013 David Scott -- Initial package - diff --git a/SPECS/xenserver-install-wizard.spec b/SPECS/xenserver-install-wizard.spec deleted file mode 100644 index 786f5dfc..00000000 --- a/SPECS/xenserver-install-wizard.spec +++ /dev/null @@ -1,94 +0,0 @@ -# -*- rpm-spec -*- - -Summary: A simple wizard to configure a XenServer -Name: xenserver-install-wizard -Version: 0.2.38 -Release: 1%{?dist} -License: LGPL+linking exception -URL: https://github.com/xenserver/xenserver-install-wizard -Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Requires: newt -Requires: python -Requires: python-argparse -Requires: xapi-python-devel -Requires: util-linux-ng - -%description -A simple wizard to configure a XenServer after install - -%prep -%setup -q - -%build - -%install -make DESTDIR=%{buildroot} -mkdir -p %{buildroot}%{_bindir} -ln -s /usr/share/xenserver-install-wizard/xenserver-install-wizard.py %{buildroot}%{_bindir}/xenserver-install-wizard - -%files -/usr/share/xenserver-install-wizard/* -%{_bindir}/xenserver-install-wizard - -%changelog -* Sun Oct 19 2014 David Scott - 0.2.38-1 -- Update to 0.2.38 - -* Thu Aug 21 2014 David Scott - 0.2.36-1 -- Update to 0.2.36 - -* Thu Jun 19 2014 David Scott - 0.2.35-1 -- Update to 0.2.35 - -* Wed Jun 18 2014 David Scott - 0.2.33-1 -- Update to 0.2.33 - -* Tue Jun 17 2014 David Scott - 0.2.32-1 -- Add init script -- Update to 0.2.32 - -* Sat May 10 2014 David Scott - 0.2.30-1 -- Update to 0.2.30, now starts xcp-rrdd - -* Tue Apr 29 2014 Bob Ball - 0.2.29-1 -- Update to 0.2.29, with fixes for static IP on debian/ubuntu - -* Wed Jan 15 2014 Euan Harris - 0.2.28-2 -- Source moved to https://github.com/xenserver/xenserver-install-wizard - -* Wed Dec 4 2013 Euan Harris - 0.2.28-1 -- Update to 0.2.28, with fixes for RHEL - -* Wed Oct 30 2013 Euan Harris - 0.2.27-1 -- Update to 0.2.27 - -* Thu Oct 24 2013 Euan Harris -- Update to 0.2.26, which sets the iSCSI QN - -* Thu Sep 26 2013 David Scott -- Update to 0.2.25 - -* Wed Sep 25 2013 David Scott -- Update to 0.2.24 - -* Fri Sep 20 2013 David Scott -- Update to 0.2.23 - -* Wed Sep 11 2013 David Scott -- Update to 0.2.20 - -* Mon Sep 2 2013 David Scott -- Update to 0.2.19 - -* Mon Sep 2 2013 David Scott -- Update to 0.2.18 - -* Mon Jun 10 2013 David Scott -- Update to 0.2.4 - -* Sun Jun 9 2013 David Scott -- Update to 0.2.0, hopefully the first fully-working version - -* Sat Jun 8 2013 David Scott -- Initial package - diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec deleted file mode 100644 index 1e24ee2a..00000000 --- a/SPECS/xsconsole.spec +++ /dev/null @@ -1,41 +0,0 @@ -Summary: XenServer Host Configuration Console -Name: xsconsole -Version: 0.9.0 -Release: 2%{?dist} -License: GPL2 -URL: https://github.com/jamesbulpin/xsconsole -Source0: https://github.com/jamesbulpin/xsconsole/archive/%{version}/%{name}-%{version}.tar.gz -Requires: PyPAM -Requires: xapi-python-devel - -%description -Console tool for configuring a XenServer installation. - -%prep -%setup -q - -%build -# This package does not have a build step - -%install -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{_libdir} -make install-base DESTDIR=%{buildroot} LIBDIR=%{buildroot}/%{_libdir} - -%files -%{_libdir}/xsconsole/*.py -%{_libdir}/xsconsole/*.pyc -%{_libdir}/xsconsole/*.pyo -%{_libdir}/xsconsole/plugins-base -#%{_libdir}/xsconsole/plugins-oem -#%{_libdir}/xsconsole/plugins-extras -%{_bindir}/xsconsole -%doc LICENSE - -%changelog -* Mon Sep 16 2013 Euan Harris - 0.9.0-2 -- Use '_libdir' macro rather than hard coding library installation path - -* Fri Jul 5 2013 James Bulpin - 0.9.0-1 -- Initial package - diff --git a/SPECS/xsiostat.spec b/SPECS/xsiostat.spec deleted file mode 100644 index 6b3f00e4..00000000 --- a/SPECS/xsiostat.spec +++ /dev/null @@ -1,30 +0,0 @@ -Name: xsiostat -Version: 0.2.0 -Release: 1%{?dist} -Summary: XenServer IO stat thingy -License: LGPLv2.1 -URL: https://github.com/xenserver/xsiostat -Source0: https://github.com/xenserver/%{name}/archive/%{version}/%{name}-%{version}.tar.gz - -%description -Simple XenServer IO stat thingy - -%prep -%setup -q - -%build -make - -%install -mkdir -p %{buildroot}/%{_sbindir} -install -m 0755 xsiostat %{buildroot}/%{_sbindir}/xsiostat - - -%files -%doc README.md LICENSE MAINTAINERS -%{_sbindir}/xsiostat - -%changelog -* Wed Jun 19 2013 David Scott - 0.2.0-1 -- Initial package - diff --git a/configure.sh b/configure.sh deleted file mode 100755 index 34ca07cb..00000000 --- a/configure.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -eu - -# Each distribution comes with a different set of existing -# packages. -rm -f ignore -VERSION=`lsb_release -si`.`lsb_release -sc` -IGNORE=ignore.$VERSION -echo Looking for a file called $IGNORE -if [ -e $IGNORE ]; then - ln -s $IGNORE ignore -else - ln -s ignore.default ignore -fi - -DISTRIBUTION=`lsb_release -si` -case "$DISTRIBUTION" in - Fedora|CentOS|RedHatEnterpriseServer) - . scripts/rpm/configure.sh - ;; - - Ubuntu|Debian|Linaro) - . scripts/deb/configure.sh - ;; - - *) - echo "Unknown distribution: $DISTRIBUTION" - exit 1 - ;; -esac diff --git a/ignore.Linaro.trusty b/ignore.Linaro.trusty deleted file mode 100644 index 5d68a719..00000000 --- a/ignore.Linaro.trusty +++ /dev/null @@ -1,13 +0,0 @@ -oasis -ocaml-odn -ocamlify -ocamlmod -libnl3 -mirage-testvm -ocaml-testvmlib -ocaml-mirage-block-xen -ocaml-mirage-clock-xen -ocaml-mirage-console-xen -ocaml-mirage-xen -ocaml-mirage -xapi-quicktest diff --git a/ignore.Ubuntu.trusty b/ignore.Ubuntu.trusty deleted file mode 100644 index 852659b8..00000000 --- a/ignore.Ubuntu.trusty +++ /dev/null @@ -1,5 +0,0 @@ -oasis -ocaml-odn -ocamlify -ocamlmod -libnl3 diff --git a/ignore.default b/ignore.default deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/lib/debianchangelog.py b/planex/debianchangelog.py similarity index 100% rename from scripts/lib/debianchangelog.py rename to planex/debianchangelog.py diff --git a/scripts/lib/debiancontrol.py b/planex/debiancontrol.py similarity index 100% rename from scripts/lib/debiancontrol.py rename to planex/debiancontrol.py diff --git a/scripts/lib/debianmisc.py b/planex/debianmisc.py similarity index 100% rename from scripts/lib/debianmisc.py rename to planex/debianmisc.py diff --git a/scripts/lib/debianrules.py b/planex/debianrules.py similarity index 100% rename from scripts/lib/debianrules.py rename to planex/debianrules.py diff --git a/scripts/downloader.py b/planex/downloader.py similarity index 100% rename from scripts/downloader.py rename to planex/downloader.py diff --git a/scripts/lib/mappkgname.py b/planex/mappkgname.py similarity index 100% rename from scripts/lib/mappkgname.py rename to planex/mappkgname.py diff --git a/scripts/lib/rpmextra.py b/planex/rpmextra.py similarity index 100% rename from scripts/lib/rpmextra.py rename to planex/rpmextra.py diff --git a/scripts/lib/tree.py b/planex/tree.py similarity index 100% rename from scripts/lib/tree.py rename to planex/tree.py diff --git a/scripts/lib/__init__.py b/scripts/lib/__init__.py deleted file mode 100644 index e69de29b..00000000 From a2aa8365e178cc193c7484d8da0b1e4a30f45ad7 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 18:45:16 +0000 Subject: [PATCH 1117/1125] Import patch aa4e3ad07e34d5c3f8a5d020e366043ea1e944f0 from buildroot Signed-off-by: Jon Ludlam --- planex/spec.py | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/planex/spec.py b/planex/spec.py index 0d91876d..339c53af 100755 --- a/planex/spec.py +++ b/planex/spec.py @@ -7,6 +7,7 @@ import re import rpm import urlparse +from scripts.lib import debianmisc # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' @@ -58,32 +59,11 @@ class Spec(object): """Represents an RPM spec file""" def __init__(self, path, target="rpm", map_name=None, dist=""): - if target == "rpm": - self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') - self.map_arch = identity - - # '%dist' in the host (where we build the source package) - # might not match '%dist' in the chroot (where we build - # the binary package). We must override it on the host, - # otherwise the names of packages in the dependencies won't - # match the files actually produced by mock. - self.dist = dist - - else: - self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" - self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" - self.map_arch = map_arch_deb - self.dist = "" - - rpm.addMacro('dist', self.dist) - if map_name: self.map_package_name = map_name else: self.map_package_name = identity_list - self.path = os.path.join(SPECDIR, os.path.basename(path)) with open(path) as spec: @@ -96,6 +76,30 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): "spec file name '%s' does not match package name '%s'" % (path, self.name())) + if target == "rpm": + self.rpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') + self.map_arch = identity + + # '%dist' in the host (where we build the source package) + # might not match '%dist' in the chroot (where we build + # the binary package). We must override it on the host, + # otherwise the names of packages in the dependencies won't + # match the files actually produced by mock. + self.dist = dist + + else: + sep = '.' if debianmisc.is_native(self.spec) else '-' + if debianmisc.is_native(self.spec): + self.rpmfilenamepat = "%{NAME}_%{VERSION}.%{RELEASE}_%{ARCH}.deb" + self.srpmfilenamepat = "%{NAME}_%{VERSION}.%{RELEASE}.dsc" + else: + self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" + self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" + self.map_arch = map_arch_deb + self.dist = "" + + rpm.addMacro('dist', self.dist) def specpath(self): """Return the path to the spec file""" From 00948983507c6a64674f79465264663163070bff Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 18:45:50 +0000 Subject: [PATCH 1118/1125] Import patch 09bd57fd87378dfa5ea8774ee87ebb72d82d110d from buildroot Signed-off-by: Jon Ludlam --- planex/spec.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/planex/spec.py b/planex/spec.py index 339c53af..3ff9d9e3 100755 --- a/planex/spec.py +++ b/planex/spec.py @@ -69,6 +69,16 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): with open(path) as spec: self.spectext = spec.readlines() + # '%dist' in the host (where we build the source package) + # might not match '%dist' in the chroot (where we build + # the binary package). We must override it on the host, + # otherwise the names of packages in the dependencies won't + # match the files actually produced by mock. + self.dist = "" + if target == "rpm": + self.dist = dist + + rpm.addMacro('dist', self.dist) self.spec = rpm.ts().parseSpec(path) if os.path.basename(path).split(".")[0] != self.name(): @@ -81,13 +91,6 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): self.srpmfilenamepat = rpm.expandMacro('%_build_name_fmt') self.map_arch = identity - # '%dist' in the host (where we build the source package) - # might not match '%dist' in the chroot (where we build - # the binary package). We must override it on the host, - # otherwise the names of packages in the dependencies won't - # match the files actually produced by mock. - self.dist = dist - else: sep = '.' if debianmisc.is_native(self.spec) else '-' if debianmisc.is_native(self.spec): @@ -97,9 +100,6 @@ def __init__(self, path, target="rpm", map_name=None, dist=""): self.rpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}_%{ARCH}.deb" self.srpmfilenamepat = "%{NAME}_%{VERSION}-%{RELEASE}.dsc" self.map_arch = map_arch_deb - self.dist = "" - - rpm.addMacro('dist', self.dist) def specpath(self): """Return the path to the spec file""" From 5e00f65fcd673a51c48bd417cf1b59ad71d89c4b Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 18:46:13 +0000 Subject: [PATCH 1119/1125] Import patch a1e79788a70e90e870b254f6e82de66d88f1a016 from buildroot Signed-off-by: Jon Ludlam --- planex/spec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planex/spec.py b/planex/spec.py index 3ff9d9e3..297f79b9 100755 --- a/planex/spec.py +++ b/planex/spec.py @@ -43,6 +43,8 @@ def map_arch_deb(arch): """Map RPM package architecture to equivalent Deb architecture""" if arch == "x86_64": return "amd64" + elif arch == "armv7l": + return "armhf" elif arch == "noarch": return "all" else: From 53152ef3b48c0a00f2c87bd353d9db8f136c734c Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 20:56:34 +0000 Subject: [PATCH 1120/1125] Add some text to the configure --help output Signed-off-by: Jon Ludlam --- planex/configure.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/planex/configure.py b/planex/configure.py index a1a79c96..00fa50d4 100755 --- a/planex/configure.py +++ b/planex/configure.py @@ -304,7 +304,36 @@ def parse_cmdline(argv=None): """ Parse command line options """ - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(description=""" + Configure the planex build directory. + + This command will generate the directory structure planex requires + to build RPMs. The following directories will be created in the + curent directory: + + planex-build-root/{RPMS,SRPMS,SPECS} + mock + + The configuration directory should contain a template mock + configuration directory, a set of SPEC files and/or SPEC file + templates. The files in the mock template will be processed and + the following substitions made: + + @PLANEX_BUILD_ROOT@ -> the full path of the planex-build-root + directory. + + The SPEC file templates (.spec.in) are processed in the following way. + Any Source directive that references a git or mercurial repository will + be extended with a SCM hash and an archive filename. The filename contains + a version derived from the SCM repository. Additionally, the following + definitions are also rewritten if they were present in the template: + + %source{n}_version -> version derived from the nth repository + %source{n}_hash -> SCM hash from the nth repository + %planex_version -> combined version + %planex_release -> 1%{?extrarelease} + """,formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( '--mirror_path', help='Rewrite URLs to point to this directory', default="") From 7b81c9ae836b789a3390e4787f606402f90bddac Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 20:57:22 +0000 Subject: [PATCH 1121/1125] Use planex-cache in favour of mock But only when not in the xs build system Signed-off-by: Jon Ludlam --- planex/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planex/build.py b/planex/build.py index 994379b6..5b6e0173 100755 --- a/planex/build.py +++ b/planex/build.py @@ -194,7 +194,7 @@ def do_build(srpm, target, build_number, use_mock, xs_build_sys): if xs_build_sys: mock = "/usr/bin/mock" else: - mock = "mock" + mock = "planex-cache" if use_mock: cmd = [mock, "--configdir=mock", "--resultdir=%s" % TMP_RPM_PATH, "--rebuild", @@ -203,7 +203,7 @@ def do_build(srpm, target, build_number, use_mock, xs_build_sys): "--define", "extrarelease .%d" % build_number, "-v", srpm] if not xs_build_sys: - cmd = ["sudo"] + cmd + ["--disable-plugin=package_state"] + cmd = cmd else: cmd = ["rpmbuild", "--rebuild", "-v", "%s" % srpm, "--target", target, "--define", From 2e84f2cac6f6c2a59a8a3df2cd4996d332f050ec Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Thu, 30 Oct 2014 20:57:54 +0000 Subject: [PATCH 1122/1125] Invoke mock with sudo, and don't dereference a None Signed-off-by: Jon Ludlam --- planex/cache.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/planex/cache.py b/planex/cache.py index 28b20910..20cbab58 100755 --- a/planex/cache.py +++ b/planex/cache.py @@ -177,8 +177,10 @@ def get_srpm_hash(srpm, yumbase, mock_config): pkg_hash.update(PLANEX_CACHE_SALT) pkg_hash.update(mock_config) - log_debug("Hashes of SRPM contents (%s):" % - RFC4880_HASHES[srpm.filedigestalgo]) + if srpm.filedigestalgo: + log_debug("Hashes of SRPM contents (%s):" % + RFC4880_HASHES[srpm.filedigestalgo]) + for name, digest in zip(srpm.filenames, srpm.filedigests): log_debug(" %s: %s" % (name, digest)) pkg_hash.update(digest) @@ -215,7 +217,7 @@ def build_package(configdir, root, passthrough_args): working_directory = tempfile.mkdtemp(prefix="planex-cache") log_debug("Mock working directory: %s" % working_directory) - cmd = ["mock", "--configdir=%s" % configdir, + cmd = ["sudo", "mock", "--configdir=%s" % configdir, "--root=%s" % root, "--resultdir=%s" % working_directory] + passthrough_args From 5b2f4c4c8466267ae197e63125fbc57b5b763007 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 31 Oct 2014 12:04:12 +0000 Subject: [PATCH 1123/1125] Move more scripts to scripts dir Signed-off-by: Jon Ludlam --- {scripts/deb => planex}/makedeb.py | 0 specdep.py => planex/specdep.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {scripts/deb => planex}/makedeb.py (100%) rename specdep.py => planex/specdep.py (100%) diff --git a/scripts/deb/makedeb.py b/planex/makedeb.py similarity index 100% rename from scripts/deb/makedeb.py rename to planex/makedeb.py diff --git a/specdep.py b/planex/specdep.py similarity index 100% rename from specdep.py rename to planex/specdep.py From 8dbdd70f4eca880e28698d3082a3e07481b8caf7 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 31 Oct 2014 12:05:09 +0000 Subject: [PATCH 1124/1125] Minor fixes to buildroot scripts to planexify them Signed-off-by: Jon Ludlam --- planex/downloader.py | 5 ++++- planex/spec.py | 2 +- planex/specdep.py | 7 +++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/planex/downloader.py b/planex/downloader.py index 64bd3cb1..a964fcac 100755 --- a/planex/downloader.py +++ b/planex/downloader.py @@ -62,7 +62,7 @@ def look_for_it(url, destination): print >>sys.stderr, "%s does not exist: downloading" % destination download(url, destination) -if __name__ == "__main__": +def main(): if len(sys.argv) <> 3: print >>sys.stderr, "Wrong number of arguments. Use %s " % sys.argv[0] exit(1) @@ -84,3 +84,6 @@ def look_for_it(url, destination): url_path = "/".join(path[0:-2] + [ path[-2] + ext ]) url_string = str(urlparse.urlunsplit((url.scheme, url.netloc, url_path, url.query, url.fragment),)) look_for_it(url_string, destination) + +if __name__ == "__main__": + main() diff --git a/planex/spec.py b/planex/spec.py index 297f79b9..96581204 100755 --- a/planex/spec.py +++ b/planex/spec.py @@ -7,7 +7,7 @@ import re import rpm import urlparse -from scripts.lib import debianmisc +import debianmisc # Could have a decorator / context manager to set and unset all the RPM macros # around methods such as 'provides' diff --git a/planex/specdep.py b/planex/specdep.py index d1e54754..6356363d 100755 --- a/planex/specdep.py +++ b/planex/specdep.py @@ -4,12 +4,11 @@ import argparse import os -import pkg +import spec as pkg import platform import sys import urlparse - -from scripts.lib import mappkgname +import mappkgname def build_type(): @@ -46,7 +45,7 @@ def download_rpm_sources(spec): if source.scheme in ["http", "https"]: print '%s: %s' % (path, spec.specpath()) print '\t@echo [DOWNLOADER] $@' - print '\t@./scripts/downloader.py %s %s' % (url, path) + print '\t@planex-downloader %s %s' % (url, path) # Source comes from a local file or directory if source.scheme == "file": From d665833af4587d4097159007e7e9610dd9eb5043 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Fri, 31 Oct 2014 12:10:26 +0000 Subject: [PATCH 1125/1125] Nuke more stuff we don't need in planex Signed-off-by: Jon Ludlam --- scripts/__init__.py | 0 scripts/deb/configure.sh | 58 ------------------------------ scripts/deb/install.sh | 25 ------------- scripts/deb/pbuilder-login.sh | 3 -- scripts/deb/templates/D05deps | 3 -- scripts/deb/templates/D10mandb | 7 ---- scripts/deb/templates/D15nofsync | 5 --- scripts/deb/templates/pbuilderrc | 13 ------- scripts/deb/updaterepo | 32 ----------------- scripts/deb/xapi.list.in | 2 -- scripts/deb/xapi.pref.in | 4 --- scripts/rpm/RPM-GPG-KEY-EPEL-6 | 29 --------------- scripts/rpm/centos-xen-4-4.repo | 21 ----------- scripts/rpm/configure.sh | 21 ----------- scripts/rpm/epel.repo | 26 -------------- scripts/rpm/install.sh | 21 ----------- scripts/rpm/mock-default.cfg.in | 62 -------------------------------- scripts/rpm/xapi.repo.in | 13 ------- scripts/rpm/xen-c6.repo | 13 ------- 19 files changed, 358 deletions(-) delete mode 100644 scripts/__init__.py delete mode 100755 scripts/deb/configure.sh delete mode 100644 scripts/deb/install.sh delete mode 100755 scripts/deb/pbuilder-login.sh delete mode 100644 scripts/deb/templates/D05deps delete mode 100644 scripts/deb/templates/D10mandb delete mode 100644 scripts/deb/templates/D15nofsync delete mode 100644 scripts/deb/templates/pbuilderrc delete mode 100755 scripts/deb/updaterepo delete mode 100644 scripts/deb/xapi.list.in delete mode 100644 scripts/deb/xapi.pref.in delete mode 100644 scripts/rpm/RPM-GPG-KEY-EPEL-6 delete mode 100644 scripts/rpm/centos-xen-4-4.repo delete mode 100755 scripts/rpm/configure.sh delete mode 100644 scripts/rpm/epel.repo delete mode 100755 scripts/rpm/install.sh delete mode 100644 scripts/rpm/mock-default.cfg.in delete mode 100644 scripts/rpm/xapi.repo.in delete mode 100644 scripts/rpm/xen-c6.repo diff --git a/scripts/__init__.py b/scripts/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/deb/configure.sh b/scripts/deb/configure.sh deleted file mode 100755 index f9075a67..00000000 --- a/scripts/deb/configure.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -eu - -echo "Configuring DEB-based build" - -if [ $(arch | grep arm) ]; then - echo Running on an $(arch) so targetting armhf - ARCH=${ARCH:-armhf} -else - echo Running on an $(arch) so targetting amd64 - ARCH=${ARCH:-amd64} -fi -DIST=${DIST:-`lsb_release -sc`} -BASEPATH=/var/cache/pbuilder/base.cow -APT_REPOS=${APT_REPOS:-} -DEFAULT_MIRROR=$(grep "^deb .*$DIST .*main" /etc/apt/sources.list | cut -d' ' -f 2 | head -n1) -MIRROR=${MIRROR:-$DEFAULT_MIRROR} - -if [ `lsb_release -si` == "Ubuntu" ] ; then - APT_REPOS="$APT_REPOS |deb $MIRROR $DIST universe" -fi -if [ $ARCH == 'armhf' ]; then - APT_REPOS="$APT_REPOS |deb $MIRROR $DIST restricted universe" -fi - -dpkg -l cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common > /dev/null 2>&1 || \ - sudo apt-get install cowbuilder python-rpm curl ocaml-nox apt-utils gdebi-core software-properties-common -mkdir -p BUILD - -echo -n "Writing pbuilder configuration..." -mkdir -p pbuilder -for file in scripts/deb/templates/*; do - filename=`basename $file` - cp $file pbuilder/${filename} - for replace_var in "APT_REPOS" "PWD" "ARCH" "BASEPATH" "DIST" "MIRROR" ; do - sed -i -e "s~@$replace_var@~${!replace_var}~g" pbuilder/${filename} - done - chmod 755 pbuilder/${filename} -done - -echo " done" - -echo -n "Initializing repository..." -mkdir -p RPMS SRPMS -(cd RPMS; rm -f Packages; apt-ftparchive packages . > Packages) -(cd SRPMS; rm -f Sources; apt-ftparchive sources . > Sources) -echo " done" - -if [ -e $BASEPATH ] ; then - echo $BASEPATH exists - updating - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc -else - echo $BASEPATH does not exist - creating - sudo cowbuilder --create --configfile $PWD/pbuilder/pbuilderrc - sudo cowbuilder --update --override-config --configfile $PWD/pbuilder/pbuilderrc -fi -echo " done" - diff --git a/scripts/deb/install.sh b/scripts/deb/install.sh deleted file mode 100644 index 170dea63..00000000 --- a/scripts/deb/install.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -x - -DEBURL=${PKG_REPO_LOCATION:-file:$PWD/RPMS/} -DEBSRCURL=${SRC_REPO_LOCATION:-file:$PWD/SRPMS/} - -REPOHOST="" -if [[ "$DEBURL" =~ ^http://.* ]]; then - REPOHOST=$(echo "$DEBURL" | sed -e 's,^http://\([^/]*\)/.*$,\1,g') -fi - -# Configure the local machine to install packages built in this workspace -sed \ - -e "s,@DEBURL@,${DEBURL},g" \ - -e "s,@DEBSRCURL@,${DEBSRCURL},g" \ - scripts/deb/xapi.list.in > scripts/deb/xapi.list -install -m 0644 scripts/deb/xapi.list /etc/apt/sources.list.d/xapi.list - -# Rebuild repository metadata -(mkdir -p RPMS && cd RPMS && apt-ftparchive packages . > Packages) -(mkdir -p SRPMS && cd SRPMS && apt-ftparchive sources . > Sources ) - -# Install -apt-get update -apt-get install -y --force-yes xenserver-core - diff --git a/scripts/deb/pbuilder-login.sh b/scripts/deb/pbuilder-login.sh deleted file mode 100755 index ddb7858e..00000000 --- a/scripts/deb/pbuilder-login.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sudo cowbuilder --login --configfile pbuilder/pbuilderrc diff --git a/scripts/deb/templates/D05deps b/scripts/deb/templates/D05deps deleted file mode 100644 index 1afc0701..00000000 --- a/scripts/deb/templates/D05deps +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -apt-get update diff --git a/scripts/deb/templates/D10mandb b/scripts/deb/templates/D10mandb deleted file mode 100644 index f75dbc3e..00000000 --- a/scripts/deb/templates/D10mandb +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Don't rebuild man-db - -echo "I: Preseed man-db/auto-update to false" -debconf-set-selections < /etc/dpkg/dpkg.cfg.d/02apt-speedup diff --git a/scripts/deb/templates/pbuilderrc b/scripts/deb/templates/pbuilderrc deleted file mode 100644 index 86393056..00000000 --- a/scripts/deb/templates/pbuilderrc +++ /dev/null @@ -1,13 +0,0 @@ -MIRRORSITE="@MIRROR@" -OTHERMIRROR="deb file:@PWD@/RPMS/ ./ |deb http://xenbits.xenproject.org/djs/linaro-xen-4-4-talex5/ ./ |deb-src file:@PWD@/SRPMS/ ./\ -@APT_REPOS@" -BINDMOUNTS="@PWD@/RPMS @PWD@/SRPMS" -HOOKDIR="@PWD@/pbuilder" -EXTRAPACKAGES="apt-utils fakeroot gettext intltool-debian python bsdmainutils debhelper dh-apparmor dh-ocaml file gettext-base groff-base man-db" -ALLOWUNTRUSTED=yes -DISTRIBUTION=@DIST@ -PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-gdebi" - -# Architecture specific settings -ARCHITECTURE=@ARCH@ -BASEPATH=@BASEPATH@ diff --git a/scripts/deb/updaterepo b/scripts/deb/updaterepo deleted file mode 100755 index 2e4b8173..00000000 --- a/scripts/deb/updaterepo +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Update the Debian repository metadata files. -# apt-ftparchive writes the new metadata to standard -# output, which is then redirected to the appropriate -# file. This causes problems for concurrent builds -# because the script takes time to print the new -# metadata, but the executing shell truncates the -# old metadata file immediately. This means there -# is a short period of time during which the metadata -# file is empty, and if a concurrently-running build -# tries to run apt during that period it will fail. -# -# To avoid this problem, we write the new metadata -# file to a temporary file, then move that into the -# correct place. -# -# Usage: updaterepo - -cd $2 -PID=$BASHPID - -case $1 in -sources) - apt-ftparchive sources . > Sources.$PID - mv Sources.$PID Sources - ;; -packages) - apt-ftparchive packages . > Packages.$PID - mv Packages.$PID Packages - ;; -esac diff --git a/scripts/deb/xapi.list.in b/scripts/deb/xapi.list.in deleted file mode 100644 index 0f6b923c..00000000 --- a/scripts/deb/xapi.list.in +++ /dev/null @@ -1,2 +0,0 @@ -deb @DEBURL@ ./ -deb-src @DEBSRCURL@ ./ diff --git a/scripts/deb/xapi.pref.in b/scripts/deb/xapi.pref.in deleted file mode 100644 index 8d8f8b2e..00000000 --- a/scripts/deb/xapi.pref.in +++ /dev/null @@ -1,4 +0,0 @@ -Package: * -Pin: origin "@REPOHOST@" -Pin-Priority: 1500 - diff --git a/scripts/rpm/RPM-GPG-KEY-EPEL-6 b/scripts/rpm/RPM-GPG-KEY-EPEL-6 deleted file mode 100644 index 7a203048..00000000 --- a/scripts/rpm/RPM-GPG-KEY-EPEL-6 +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/scripts/rpm/centos-xen-4-4.repo b/scripts/rpm/centos-xen-4-4.repo deleted file mode 100644 index afd152ac..00000000 --- a/scripts/rpm/centos-xen-4-4.repo +++ /dev/null @@ -1,21 +0,0 @@ -[centos-xen-4-4] -name=CentOS-$releasever - snapshot of Xen 4.4 -baseurl=http://xenbits.xen.org/djs/centos-xen-4-4/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0 - diff --git a/scripts/rpm/configure.sh b/scripts/rpm/configure.sh deleted file mode 100755 index cce619d5..00000000 --- a/scripts/rpm/configure.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -eu - -echo "Configuring RPM-based build" - -DEPS="mock rpm-build createrepo python-argparse" -rpm -q $DEPS >/dev/null 2>&1 || sudo yum install -y $DEPS - -echo -n "Writing mock configuration..." -mkdir -p mock -sed -e "s|@PWD@|$PWD|g" scripts/rpm/mock-default.cfg.in > mock/default.cfg -ln -fs /etc/mock/site-defaults.cfg mock/ -ln -fs /etc/mock/logging.ini mock/ -echo " done" - -echo -n "Initializing repository..." -mkdir -p RPMS SRPMS -createrepo --quiet RPMS -createrepo --quiet SRPMS -echo " done" - diff --git a/scripts/rpm/epel.repo b/scripts/rpm/epel.repo deleted file mode 100644 index 0160dfec..00000000 --- a/scripts/rpm/epel.repo +++ /dev/null @@ -1,26 +0,0 @@ -[epel] -name=Extra Packages for Enterprise Linux 6 - $basearch -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch -failovermethod=priority -enabled=1 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 - -[epel-debuginfo] -name=Extra Packages for Enterprise Linux 6 - $basearch - Debug -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 - -[epel-source] -name=Extra Packages for Enterprise Linux 6 - $basearch - Source -#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch -failovermethod=priority -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 -gpgcheck=1 diff --git a/scripts/rpm/install.sh b/scripts/rpm/install.sh deleted file mode 100755 index b0e654bc..00000000 --- a/scripts/rpm/install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Configure the local machine to install packages built in this working directory - -XAPIBASEURL=${PKG_REPO_LOCATION:-file://$PWD/RPMS/} -XAPISRCBASEURL=${SRC_REPO_LOCATION:-file://$PWD/SRPMS/} - -sed \ - -e "s,@XAPIBASEURL@,${XAPIBASEURL},g" \ - -e "s,@XAPISRCBASEURL@,${XAPISRCBASEURL},g" \ - scripts/rpm/xapi.repo.in > scripts/rpm/xapi.repo -install -m 0644 scripts/rpm/xapi.repo /etc/yum.repos.d/xapi.repo - -install -m 0644 scripts/rpm/centos-xen-4-4.repo /etc/yum.repos.d/centos-xen-4-4.repo - -install -m 0644 scripts/rpm/epel.repo /etc/yum.repos.d/epel.repo - -install -m 0644 scripts/rpm/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 - -yum repolist -yum install -y xenserver-core diff --git a/scripts/rpm/mock-default.cfg.in b/scripts/rpm/mock-default.cfg.in deleted file mode 100644 index 97948d94..00000000 --- a/scripts/rpm/mock-default.cfg.in +++ /dev/null @@ -1,62 +0,0 @@ -config_opts['root'] = 'epel-6-x86_64' -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) -config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build' -config_opts['dist'] = 'el6' # only useful for --resultdir variable subst - -config_opts['plugin_conf']['package_state_enable'] = False -config_opts['plugin_conf']['tmpfs_enable'] = True - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -reposdir=/dev/null -logfile=/var/log/yum.log -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= - -# repos -[base] -name=BaseOS -enabled=1 -mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os -failovermethod=priority - -[updates] -name=updates -enabled=1 -mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates -failovermethod=priority - -[epel] -name=epel -mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64 -failovermethod=priority - -[xen-c6] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[centos-xen-4-4] -name=CentOS-$releasever - snapshot of Xen 4.4 -baseurl=http://xenbits.xen.org/djs/centos-xen-4-4/ -gpgcheck=0 -Priority=1 -enabled=1 - -[mock] -name=Mock output -baseurl=file://@PWD@/RPMS -gpgcheck=0 -priority=1 -enabled=1 -metadata_expire=0 -""" diff --git a/scripts/rpm/xapi.repo.in b/scripts/rpm/xapi.repo.in deleted file mode 100644 index 2315ebeb..00000000 --- a/scripts/rpm/xapi.repo.in +++ /dev/null @@ -1,13 +0,0 @@ -[xapi] -name=CentOS-$releasever - xenserver-core -baseurl=@XAPIBASEURL@ -gpgcheck=0 -Priority=1 -enabled=1 - -[xapi-source] -name=CentOS-$releasever - xenserver-core Source -baseurl=@XAPISRCBASEURL@ -gpgcheck=0 -Priority=1 -enabled=0 diff --git a/scripts/rpm/xen-c6.repo b/scripts/rpm/xen-c6.repo deleted file mode 100644 index a172c2ce..00000000 --- a/scripts/rpm/xen-c6.repo +++ /dev/null @@ -1,13 +0,0 @@ -[xen-c6] -name=CentOS-$releasever - Xen -baseurl=http://dev.centos.org/centos/6/xen-c6/$basearch/ -gpgcheck=0 -Priority=1 -enabled=1 - -[xen-c6-source] -name=CentOS-$releasever - Xen Source -baseurl=http://dev.centos.org/centos/6/xen-c6/SRPMS/ -gpgcheck=0 -Priority=1 -enabled=0