[libvirt] [ocaml PATCH 0/4] Minor cleanups/fixes

Small cleanups in the build system, no changes in the code/binding. Pino Toscano (4): build: stop generating a config.h build: drop broken NSIS leftovers build: remove manual OCaml dependencies build: remove the list_secrets binary on clean .gitignore | 2 -- MANIFEST | 1 - Makefile.in | 26 ++------------------------ configure.ac | 1 - libvirt/Makefile.in | 6 ------ libvirt/generator.pl | 2 -- 6 files changed, 2 insertions(+), 36 deletions(-) -- 2.21.0

It basically contains only PACKAGE_* defines, which are not used in the C parts. Hence, do not make autoconf generate one. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- .gitignore | 2 -- MANIFEST | 1 - Makefile.in | 4 +--- configure.ac | 1 - libvirt/generator.pl | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 67f9134..840c0c4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,6 @@ core.* /aclocal.m4 /autom4te.cache /config.cache -/config.h -/config.h.in /config.log /config.status /configure diff --git a/MANIFEST b/MANIFEST index 444093e..e969dd5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2,7 +2,6 @@ aclocal.m4 ChangeLog config.guess -config.h.in config.sub configure.ac COPYING diff --git a/Makefile.in b/Makefile.in index a0222e5..3857a24 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,7 +45,7 @@ clean: rm -f examples/get_all_domain_stats distclean: clean - rm -f config.h config.log config.status configure + rm -f config.log config.status configure rm -rf autom4te.cache rm -f META rm -f libvirt/libvirt_version.ml @@ -96,7 +96,6 @@ dist: ChangeLog tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf - $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/ $(INSTALL) -m 0644 aclocal.m4 $(PACKAGE)-$(VERSION)/ - $(INSTALL) -m 0644 config.h.in $(PACKAGE)-$(VERSION)/ tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) rm -rf $(PACKAGE)-$(VERSION) ls -l $(PACKAGE)-$(VERSION).tar.gz @@ -104,7 +103,6 @@ dist: ChangeLog check-manifest: git ls-files > .check-manifest; \ echo aclocal.m4 >> .check-manifest; \ - echo config.h.in >> .check-manifest; \ sort -o .check-manifest .check-manifest; \ sort MANIFEST > .orig-manifest; \ diff -u .orig-manifest .check-manifest; rv=$$?; \ diff --git a/configure.ac b/configure.ac index 6ca44b0..91ce547 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,6 @@ echo "Thanks for downloading" $PACKAGE_STRING echo "------------------------------------------------------------" dnl Produce output files. -AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([META libvirt/libvirt_version.ml Makefile diff --git a/libvirt/generator.pl b/libvirt/generator.pl index e850500..279331a 100755 --- a/libvirt/generator.pl +++ b/libvirt/generator.pl @@ -232,8 +232,6 @@ print F <<'END'; * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" - #include <stdio.h> #include <stdlib.h> #include <string.h> -- 2.21.0

Followup of commit 3a0299f38534053b698c5fde029b27a4546f0f18. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- Makefile.in | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3857a24..5c41a9e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,8 +20,6 @@ VERSION = @PACKAGE_VERSION@ INSTALL = @INSTALL@ -MAKENSIS = @MAKENSIS@ - OCAMLDOC = @OCAMLDOC@ OCAMLDOCFLAGS := -html -sort -colorize-code @@ -65,20 +63,6 @@ doc: libvirt.{ml,mli} libvirt_version.{ml,mli} endif -# Windows installer (requires NSIS). - -WININSTALLER := $(PACKAGE)-$(VERSION).exe - -ifneq ($(MAKENSIS),) -wininstaller: $(WININSTALLER) - -$(WININSTALLER): wininstaller.nsis all opt - "$(MAKENSIS)" \ - //DPACKAGE=$(PACKAGE) //DVERSION=$(VERSION) \ - //DOUTFILE=$@ $< - ls -l $@ -endif - # Update configure and rerun. configure: force @@ -141,11 +125,6 @@ upload: libvirt.org:/data/www/libvirt.org/ocaml/html/ scp $(PACKAGE)-$(VERSION).tar.gz libvirt.org:/data/ftp/libvirt/ocaml/ -# Upload Windows binary installer to main website. - -winupload: - scp $(WININSTALLER) libvirt.org:/data/ftp/libvirt/ocaml/ - force: .PHONY: all opt depend install clean distclean configure dist check-manifest \ -- 2.21.0

They are already covered by dependencies in Make.rules, or automatically in .depend Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- libvirt/Makefile.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in index 77462c7..f255ee2 100644 --- a/libvirt/Makefile.in +++ b/libvirt/Makefile.in @@ -119,12 +119,6 @@ autostatus: libvirt_c.c @echo -n "LOC in automatic bindings: " @wc -l < libvirt_c.c -libvirt.cmo: libvirt.cmi -libvirt.cmi: libvirt.mli - -libvirt_version.cmo: libvirt_version.cmi -libvirt_version.cmi: libvirt_version.mli - install-byte: ocamlfind install $(OCAMLFIND_INSTFLAGS) -ldconf ignore libvirt \ -- 2.21.0

Another fix for commit be5973f65bfdb51bf409a31af0d046931c6d5789. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index 5c41a9e..e50600a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,6 +41,7 @@ clean: rm -f examples/get_cpu_stats rm -f examples/domain_events rm -f examples/get_all_domain_stats + rm -f examples/list_secrets distclean: clean rm -f config.log config.status configure -- 2.21.0

This patch series is fine, ACK. When I was trying to fix this package and do a release last week I was thinking how nice it would be if it used automake (or perhaps meson) and we could drop the manifest etc. Hint hint! Are you able to push this to the upstream repo or do you need me to do anything there? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html

On Thursday, 29 August 2019 16:52:48 CEST Richard W.M. Jones wrote:
When I was trying to fix this package and do a release last week I was thinking how nice it would be if it used automake (or perhaps meson) and we could drop the manifest etc. Hint hint!
Actually, I'm currently playing with dune, and I have to say it feels nice. There only problematic thing is the current generated libvirt_c.c that includes the other C files, it does not play well with the automatic dependencies that dune figures out. BTW what is MANIFEST for? IIRC it is used in Perl modules, but not so much in OCaml ones?
Are you able to push this to the upstream repo or do you need me to do anything there?
Yup, I am -- pushed already. Thanks, -- Pino Toscano

On Thu, Aug 29, 2019 at 05:38:05PM +0200, Pino Toscano wrote:
On Thursday, 29 August 2019 16:52:48 CEST Richard W.M. Jones wrote:
When I was trying to fix this package and do a release last week I was thinking how nice it would be if it used automake (or perhaps meson) and we could drop the manifest etc. Hint hint!
Actually, I'm currently playing with dune, and I have to say it feels nice. There only problematic thing is the current generated libvirt_c.c that includes the other C files, it does not play well with the automatic dependencies that dune figures out.
BTW what is MANIFEST for? IIRC it is used in Perl modules, but not so much in OCaml ones?
It's used by the home-brew ‘make dist’ rule: https://libvirt.org/git/?p=libvirt-ocaml.git;a=blob;f=Makefile.in;h=e50600a2... AIUI with automake there would be a properly generated make dist so the whole thing could go away. Rich.
Are you able to push this to the upstream repo or do you need me to do anything there?
Yup, I am -- pushed already.
Thanks, -- Pino Toscano
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
participants (2)
-
Pino Toscano
-
Richard W.M. Jones