[libvirt] [jenkins-ci PATCH 0/3] Add libvirt-ocaml

Now that the libvirt-ocaml repository is fixed, let's build it in CI. Pino Toscano (3): guests: add mappings for OCaml components guests: add libvirt-ocaml project projects: add libvirt-ocaml project guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-debian-sid/main.yml | 1 + guests/host_vars/libvirt-fedora-27/main.yml | 1 + guests/host_vars/libvirt-fedora-28/main.yml | 1 + .../host_vars/libvirt-fedora-rawhide/main.yml | 1 + guests/host_vars/libvirt-freebsd-10/main.yml | 1 + guests/host_vars/libvirt-freebsd-11/main.yml | 1 + .../libvirt-freebsd-current/main.yml | 1 + guests/host_vars/libvirt-ubuntu-16/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + guests/playbooks/build/jobs/defaults.yml | 2 ++ .../build/projects/libvirt-ocaml.yml | 27 +++++++++++++++++++ guests/vars/mappings.yml | 6 +++++ guests/vars/projects/libvirt-ocaml.yml | 5 ++++ jobs/defaults.yaml | 2 ++ projects/libvirt-ocaml.yaml | 23 ++++++++++++++++ 17 files changed, 76 insertions(+) create mode 100644 guests/playbooks/build/projects/libvirt-ocaml.yml create mode 100644 guests/vars/projects/libvirt-ocaml.yml create mode 100644 projects/libvirt-ocaml.yaml -- 2.17.2

Soon to be used by libvirt-ocaml. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- guests/vars/mappings.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 5df918f..cd92bd8 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -501,6 +501,12 @@ mappings: FreeBSD: Debian8: + ocaml: + default: ocaml + + ocaml-findlib: + default: ocaml-findlib + openwsman: rpm: libwsman-devel Ubuntu: libopenwsman-dev -- 2.17.2

Not built on Debian 8, as the version of OCaml is not new enough. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-debian-sid/main.yml | 1 + guests/host_vars/libvirt-fedora-27/main.yml | 1 + guests/host_vars/libvirt-fedora-28/main.yml | 1 + .../host_vars/libvirt-fedora-rawhide/main.yml | 1 + guests/host_vars/libvirt-freebsd-10/main.yml | 1 + guests/host_vars/libvirt-freebsd-11/main.yml | 1 + .../libvirt-freebsd-current/main.yml | 1 + guests/host_vars/libvirt-ubuntu-16/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + guests/playbooks/build/jobs/defaults.yml | 2 ++ .../build/projects/libvirt-ocaml.yml | 27 +++++++++++++++++++ guests/vars/projects/libvirt-ocaml.yml | 5 ++++ 14 files changed, 45 insertions(+) create mode 100644 guests/playbooks/build/projects/libvirt-ocaml.yml create mode 100644 guests/vars/projects/libvirt-ocaml.yml diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml index e220849..8be54b6 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -7,6 +7,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - osinfo-db diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml index cdc5a57..33476ad 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -6,6 +6,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-debian-sid/main.yml b/guests/host_vars/libvirt-debian-sid/main.yml index 5dd887b..f2594e7 100644 --- a/guests/host_vars/libvirt-debian-sid/main.yml +++ b/guests/host_vars/libvirt-debian-sid/main.yml @@ -6,6 +6,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-fedora-27/main.yml b/guests/host_vars/libvirt-fedora-27/main.yml index f131953..0b4ec2b 100644 --- a/guests/host_vars/libvirt-fedora-27/main.yml +++ b/guests/host_vars/libvirt-fedora-27/main.yml @@ -7,6 +7,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-fedora-28/main.yml b/guests/host_vars/libvirt-fedora-28/main.yml index f115598..13555af 100644 --- a/guests/host_vars/libvirt-fedora-28/main.yml +++ b/guests/host_vars/libvirt-fedora-28/main.yml @@ -7,6 +7,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-fedora-rawhide/main.yml b/guests/host_vars/libvirt-fedora-rawhide/main.yml index 4318653..604f57f 100644 --- a/guests/host_vars/libvirt-fedora-rawhide/main.yml +++ b/guests/host_vars/libvirt-fedora-rawhide/main.yml @@ -13,6 +13,7 @@ projects: - libvirt-glib+mingw64 - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-freebsd-10/main.yml b/guests/host_vars/libvirt-freebsd-10/main.yml index 005acb4..6547ab4 100644 --- a/guests/host_vars/libvirt-freebsd-10/main.yml +++ b/guests/host_vars/libvirt-freebsd-10/main.yml @@ -8,6 +8,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-tck diff --git a/guests/host_vars/libvirt-freebsd-11/main.yml b/guests/host_vars/libvirt-freebsd-11/main.yml index dd06fc5..887c9e6 100644 --- a/guests/host_vars/libvirt-freebsd-11/main.yml +++ b/guests/host_vars/libvirt-freebsd-11/main.yml @@ -8,6 +8,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-tck diff --git a/guests/host_vars/libvirt-freebsd-current/main.yml b/guests/host_vars/libvirt-freebsd-current/main.yml index 07f3f25..1f3e911 100644 --- a/guests/host_vars/libvirt-freebsd-current/main.yml +++ b/guests/host_vars/libvirt-freebsd-current/main.yml @@ -8,6 +8,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-tck diff --git a/guests/host_vars/libvirt-ubuntu-16/main.yml b/guests/host_vars/libvirt-ubuntu-16/main.yml index 4d9914a..6ec1df8 100644 --- a/guests/host_vars/libvirt-ubuntu-16/main.yml +++ b/guests/host_vars/libvirt-ubuntu-16/main.yml @@ -6,6 +6,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/host_vars/libvirt-ubuntu-18/main.yml b/guests/host_vars/libvirt-ubuntu-18/main.yml index 8a45854..61c7384 100644 --- a/guests/host_vars/libvirt-ubuntu-18/main.yml +++ b/guests/host_vars/libvirt-ubuntu-18/main.yml @@ -6,6 +6,7 @@ projects: - libvirt-glib - libvirt-go - libvirt-go-xml + - libvirt-ocaml - libvirt-perl - libvirt-python - libvirt-sandbox diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index 522dd83..81c5fab 100644 --- a/guests/playbooks/build/jobs/defaults.yml +++ b/guests/playbooks/build/jobs/defaults.yml @@ -52,6 +52,8 @@ git_urls: default: https://github.com/libvirt/libvirt-go-xml.git libvirt-go: default: https://github.com/libvirt/libvirt-go.git + libvirt-ocaml: + default: https://github.com/libvirt/libvirt-ocaml.git libvirt-perl: default: https://github.com/libvirt/libvirt-perl.git libvirt-python: diff --git a/guests/playbooks/build/projects/libvirt-ocaml.yml b/guests/playbooks/build/projects/libvirt-ocaml.yml new file mode 100644 index 0000000..7cead1b --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-ocaml.yml @@ -0,0 +1,27 @@ +--- +- set_fact: + name: libvirt-ocaml + # Debian 8 doesn't have a recent enough OCaml + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-debian-sid + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 + archive_format: xz + git_url: '{{ git_urls["libvirt-ocaml"][git_remote] }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/generic-build-job.yml' + vars: + command: | + autoreconf -vfi + ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX + $MAKE + $MAKE opt diff --git a/guests/vars/projects/libvirt-ocaml.yml b/guests/vars/projects/libvirt-ocaml.yml new file mode 100644 index 0000000..27885c1 --- /dev/null +++ b/guests/vars/projects/libvirt-ocaml.yml @@ -0,0 +1,5 @@ +--- +packages: + - ocaml + - ocaml-findlib + - perl -- 2.17.2

Not built on Debian 8, as the version of OCaml is not new enough. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- jobs/defaults.yaml | 2 ++ projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 projects/libvirt-ocaml.yaml diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 5cf84dc..13cc443 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -51,6 +51,8 @@ default: https://github.com/libvirt/libvirt-go-xml.git libvirt-go: default: https://github.com/libvirt/libvirt-go.git + libvirt-ocaml: + default: https://github.com/libvirt/libvirt-ocaml.git libvirt-perl: default: https://github.com/libvirt/libvirt-perl.git libvirt-python: diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml new file mode 100644 index 0000000..efea09b --- /dev/null +++ b/projects/libvirt-ocaml.yaml @@ -0,0 +1,23 @@ + +- project: + name: libvirt-ocaml + # Debian 8 doesn't have a recent enough OCaml + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + title: Libvirt OCaml + archive_format: xz + git_url: '{git_urls[libvirt-ocaml][default]}' + jobs: + - generic-build-job: + parent_jobs: 'libvirt-build' + command: | + autoreconf -vfi + ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX + $MAKE + $MAKE opt -- 2.17.2

On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
Not built on Debian 8, as the version of OCaml is not new enough.
Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- jobs/defaults.yaml | 2 ++ projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 projects/libvirt-ocaml.yaml
diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 5cf84dc..13cc443 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -51,6 +51,8 @@ default: https://github.com/libvirt/libvirt-go-xml.git libvirt-go: default: https://github.com/libvirt/libvirt-go.git + libvirt-ocaml: + default: https://github.com/libvirt/libvirt-ocaml.git libvirt-perl: default: https://github.com/libvirt/libvirt-perl.git libvirt-python: diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml new file mode 100644 index 0000000..efea09b --- /dev/null +++ b/projects/libvirt-ocaml.yaml @@ -0,0 +1,23 @@ + +- project: + name: libvirt-ocaml + # Debian 8 doesn't have a recent enough OCaml + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + title: Libvirt OCaml + archive_format: xz + git_url: '{git_urls[libvirt-ocaml][default]}' + jobs: + - generic-build-job: + parent_jobs: 'libvirt-build' + command: | + autoreconf -vfi
I verified the patches with my builders (not the jenkins part though, but thanks to Andrea, we keep it nice and tidy and in sync). One thing though, is there a reason why you'd want to run autoreconf with '-v' in an automated environment? With that question answered: Reviewed-by: Erik Skultety <eskultet@redhat.com>

On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
Not built on Debian 8, as the version of OCaml is not new enough.
Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- jobs/defaults.yaml | 2 ++ projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 projects/libvirt-ocaml.yaml
diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 5cf84dc..13cc443 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -51,6 +51,8 @@ default: https://github.com/libvirt/libvirt-go-xml.git libvirt-go: default: https://github.com/libvirt/libvirt-go.git + libvirt-ocaml: + default: https://github.com/libvirt/libvirt-ocaml.git libvirt-perl: default: https://github.com/libvirt/libvirt-perl.git libvirt-python: diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml new file mode 100644 index 0000000..efea09b --- /dev/null +++ b/projects/libvirt-ocaml.yaml @@ -0,0 +1,23 @@ + +- project: + name: libvirt-ocaml + # Debian 8 doesn't have a recent enough OCaml + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + title: Libvirt OCaml + archive_format: xz + git_url: '{git_urls[libvirt-ocaml][default]}' + jobs: + - generic-build-job: + parent_jobs: 'libvirt-build' + command: | + autoreconf -vfi + ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX + $MAKE + $MAKE opt
Since this is using autotools, how about tweaking it to follow the normal pattern for autotools jobs, so we can use the standard job defintion. It looks like it would need - An autogen.sh script - Fixed VPATH build - Have 'make opt' be part of the default target Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, 2018-10-19 at 10:37 +0100, Daniel P. Berrangé wrote:
On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
+ jobs: + - generic-build-job: + parent_jobs: 'libvirt-build' + command: | + autoreconf -vfi + ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX + $MAKE + $MAKE opt
Since this is using autotools, how about tweaking it to follow the normal pattern for autotools jobs, so we can use the standard job defintion. It looks like it would need
- An autogen.sh script - Fixed VPATH build - Have 'make opt' be part of the default target
Yeah, that sounds like a good idea. I was also wondering whether libvirt-ocaml has any kind of 'make check' target we could run. -- Andrea Bolognani / Red Hat / Virtualization

On Friday, 19 October 2018 11:37:17 CEST Daniel P. Berrangé wrote:
On Thu, Oct 11, 2018 at 11:19:54AM +0200, Pino Toscano wrote:
Not built on Debian 8, as the version of OCaml is not new enough.
Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- jobs/defaults.yaml | 2 ++ projects/libvirt-ocaml.yaml | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 projects/libvirt-ocaml.yaml
diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 5cf84dc..13cc443 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -51,6 +51,8 @@ default: https://github.com/libvirt/libvirt-go-xml.git libvirt-go: default: https://github.com/libvirt/libvirt-go.git + libvirt-ocaml: + default: https://github.com/libvirt/libvirt-ocaml.git libvirt-perl: default: https://github.com/libvirt/libvirt-perl.git libvirt-python: diff --git a/projects/libvirt-ocaml.yaml b/projects/libvirt-ocaml.yaml new file mode 100644 index 0000000..efea09b --- /dev/null +++ b/projects/libvirt-ocaml.yaml @@ -0,0 +1,23 @@ + +- project: + name: libvirt-ocaml + # Debian 8 doesn't have a recent enough OCaml + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + title: Libvirt OCaml + archive_format: xz + git_url: '{git_urls[libvirt-ocaml][default]}' + jobs: + - generic-build-job: + parent_jobs: 'libvirt-build' + command: | + autoreconf -vfi + ./configure --prefix=$VIRT_PREFIX --with-libvirt=$VIRT_PREFIX + $MAKE + $MAKE opt
Since this is using autotools, how about tweaking it to follow the normal pattern for autotools jobs, so we can use the standard job defintion.
Technically, it does not use autotools, but only autoconf.
It looks like it would need
- An autogen.sh script
It can be added, but it would just call autoreconf.
- Fixed VPATH build
Slightly more complicated to fix, and not a priority for now.
- Have 'make opt' be part of the default target
'opt' builds the library, and the examples as native using the ocamlopt compiler. ocamlopt is not available on all the architecture (since it requires an ELF generator in the OCaml compiler), and you can choose which flavour of build you want (i.e. native/optimized, or bytecode). -- Pino Toscano

On Thu, 2018-10-11 at 11:19 +0200, Pino Toscano wrote:
Now that the libvirt-ocaml repository is fixed, let's build it in CI.
Pino Toscano (3): guests: add mappings for OCaml components guests: add libvirt-ocaml project projects: add libvirt-ocaml project
Sorry, I kinda forgot you had posted these O:-) I would like you to split the changes differently, though: * the first patch is okay; * the second one should focus on making it possible to install libvirt-ocaml's build dependencies on the various guests, so it would only contain changes to guests/vars/ and guests/host_vars/; * the last one should add build steps for *both* the Ansible and the Jenkins part. -- Andrea Bolognani / Red Hat / Virtualization
participants (4)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Erik Skultety
-
Pino Toscano