[libvirt] [PATCH RFC V2] guests: Add support for openSUSE

Jim Fehlig posted 1 patch 4 years, 5 months ago
Failed in applying to current master (apply log)
guests/configs/autoinst.xml                   | 75 +++++++++++++++++++
.../host_vars/libvirt-opensuse-15/docker.yml  |  2 +
.../host_vars/libvirt-opensuse-15/install.yml |  2 +
guests/host_vars/libvirt-opensuse-15/main.yml | 22 ++++++
.../libvirt-opensuse-tumbleweed/docker.yml    |  2 +
.../libvirt-opensuse-tumbleweed/install.yml   |  2 +
.../libvirt-opensuse-tumbleweed/main.yml      | 22 ++++++
guests/inventory                              |  2 +
guests/lcitool                                |  2 +
guests/playbooks/update/tasks/base.yml        | 15 ++++
guests/vars/mappings.yml                      | 41 +++++++++-
11 files changed, 185 insertions(+), 2 deletions(-)
[libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Jim Fehlig 4 years, 5 months ago
This change adds support for the latest openSUSE Leap and
openSUSE Tumbleweed guests.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---

This version of the patch overcomes the 'lci build' issues noted in V1
and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
opinion of only supporting the latest Leap since there is only a six
month support overlap between versions. Version x-1 is only supported
six months after x is released.

'lci update ... libvirt' fails in task "Configure hostname":

fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}

Not sure why that is the case. But more importantly, even though it
doesn't fail, the "Update installed packages" task doesn't install any
of the packages required to build libvirt. I suppose that agrees with
guests/REAMDME, but how then are the packages required to build $project
installed? How/when is the list of packages required to build $project
conveyed to $package_manager?

'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
"Gathering Facts" task:

fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}

Passing --debug to the command didn't help with determining what needed
the password. ssh? I can't find where the "Gathering Facts" task is
defined. The $root_password_file passed to /usr/bin/ansible-playbook
contains the correct password for the root user. /me needs to figure
out how to better debug this stuff :-).

 guests/configs/autoinst.xml                   | 75 +++++++++++++++++++
 .../host_vars/libvirt-opensuse-15/docker.yml  |  2 +
 .../host_vars/libvirt-opensuse-15/install.yml |  2 +
 guests/host_vars/libvirt-opensuse-15/main.yml | 22 ++++++
 .../libvirt-opensuse-tumbleweed/docker.yml    |  2 +
 .../libvirt-opensuse-tumbleweed/install.yml   |  2 +
 .../libvirt-opensuse-tumbleweed/main.yml      | 22 ++++++
 guests/inventory                              |  2 +
 guests/lcitool                                |  2 +
 guests/playbooks/update/tasks/base.yml        | 15 ++++
 guests/vars/mappings.yml                      | 41 +++++++++-
 11 files changed, 185 insertions(+), 2 deletions(-)

diff --git a/guests/configs/autoinst.xml b/guests/configs/autoinst.xml
new file mode 100644
index 0000000..42c42f8
--- /dev/null
+++ b/guests/configs/autoinst.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE profile>
+<profile
+  xmlns="http://www.suse.com/1.0/yast2ns"
+  xmlns:config="http://www.suse.com/1.0/configns">
+  <general>
+    <mode>
+      <confirm config:type="boolean">false</confirm>
+    </mode>
+  </general>
+  <partitioning config:type="list">
+    <drive>
+      <device>/dev/vda</device>
+      <use>all</use>
+      <partitions config:type="list">
+        <partition>
+          <filesystem config:type="symbol">swap</filesystem>
+          <size>256M</size>
+          <mount>swap</mount>
+        </partition>
+        <partition>
+          <filesystem config:type="symbol">ext4</filesystem>
+          <mount>/</mount>
+          <size>max</size>
+        </partition>
+      </partitions>
+    </drive>
+  </partitioning>
+  <bootloader>
+    <global>
+      <terminal>console serial</terminal>
+    </global>
+  </bootloader>
+  <timezone>
+    <hwclock>UTC</hwclock>
+    <timezone>UTC</timezone>
+  </timezone>
+  <software>
+    <install_recommended config:type="boolean">false</install_recommended>
+    <products config:type="list">
+      <product>openSUSE</product>
+    </products>
+    <patterns config:type="list">
+      <pattern>base</pattern>
+      <pattern>minimal_base</pattern>
+      <pattern>yast2_basis</pattern>
+    </patterns>
+    <packages config:type="list">
+      <package>openssh</package>
+    </packages>
+  </software>
+  <networking>
+    <keep_install_network config:type="boolean">true</keep_install_network>
+  </networking>
+  <users config:type="list">
+    <user>
+      <username>root</username>
+      <user_password>root</user_password>
+      <encrypted config:type="boolean">false</encrypted>
+      <uid>0</uid>
+      <gid>0</gid>
+      <home>/root</home>
+      <shell>/bin/bash</shell>
+    </user>
+  </users>
+  <services-manager>
+    <default_target>multi-user</default_target>
+    <services config:type="list">
+      <service>
+        <service_name>sshd</service_name>
+        <service_status>enable</service_status>
+      </service>
+    </services>
+  </services-manager>
+</profile>
diff --git a/guests/host_vars/libvirt-opensuse-15/docker.yml b/guests/host_vars/libvirt-opensuse-15/docker.yml
new file mode 100644
index 0000000..8f32d06
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
@@ -0,0 +1,2 @@
+---
+docker_base: opensuse/leap:15
diff --git a/guests/host_vars/libvirt-opensuse-15/install.yml b/guests/host_vars/libvirt-opensuse-15/install.yml
new file mode 100644
index 0000000..d0fdbe5
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-15/install.yml
@@ -0,0 +1,2 @@
+---
+install_url: http://download.opensuse.org/distribution/leap/15.1/repo/oss/
diff --git a/guests/host_vars/libvirt-opensuse-15/main.yml b/guests/host_vars/libvirt-opensuse-15/main.yml
new file mode 100644
index 0000000..abd83c5
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-15/main.yml
@@ -0,0 +1,22 @@
+---
+projects:
+  - libosinfo
+  - libvirt
+  - libvirt-cim
+  - libvirt-dbus
+  - libvirt-glib
+  - libvirt-perl
+  - libvirt-python
+  - libvirt-sandbox
+  - libvirt-tck
+  - osinfo-db
+  - osinfo-db-tools
+  - virt-manager
+  - virt-viewer
+
+package_format: 'rpm'
+package_manager: 'zypper'
+os_name: 'OpenSUSE'
+os_version: '15'
+
+ansible_python_interpreter: /usr/bin/python3
diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
new file mode 100644
index 0000000..cc79a22
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
@@ -0,0 +1,2 @@
+---
+docker_base: opensuse/tumbleweed
diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
new file mode 100644
index 0000000..36cea68
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
@@ -0,0 +1,2 @@
+---
+install_url: http://download.opensuse.org/tumbleweed/repo/oss/
diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
new file mode 100644
index 0000000..828df81
--- /dev/null
+++ b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
@@ -0,0 +1,22 @@
+---
+projects:
+  - libosinfo
+  - libvirt
+  - libvirt-cim
+  - libvirt-dbus
+  - libvirt-glib
+  - libvirt-perl
+  - libvirt-python
+  - libvirt-sandbox
+  - libvirt-tck
+  - osinfo-db
+  - osinfo-db-tools
+  - virt-manager
+  - virt-viewer
+
+package_format: 'rpm'
+package_manager: 'zypper'
+os_name: 'OpenSUSE'
+os_version: 'Tumbleweed'
+
+ansible_python_interpreter: /usr/bin/python3
diff --git a/guests/inventory b/guests/inventory
index 3b15513..71d3c91 100644
--- a/guests/inventory
+++ b/guests/inventory
@@ -8,5 +8,7 @@ libvirt-fedora-rawhide
 libvirt-freebsd-11
 libvirt-freebsd-12
 libvirt-freebsd-current
+libvirt-opensuse-15
+libvirt-opensuse-tumbleweed
 libvirt-ubuntu-16
 libvirt-ubuntu-18
diff --git a/guests/lcitool b/guests/lcitool
index a630971..7f26731 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -531,6 +531,8 @@ class Application:
                 install_config = "preseed.cfg"
             elif facts["os_name"] in ["CentOS", "Fedora"]:
                 install_config = "kickstart.cfg"
+            elif facts["os_name"] == "OpenSUSE":
+                install_config = "autoinst.xml"
             else:
                 raise Exception(
                     "Host {} doesn't support installation".format(host)
diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
index 3d83e78..b6a2cd2 100644
--- a/guests/playbooks/update/tasks/base.yml
+++ b/guests/playbooks/update/tasks/base.yml
@@ -65,12 +65,27 @@
   when:
     - package_format == 'pkg'
 
+- name: Update installed packages
+  command: '{{ package_manager }} update -y -l --force-resolution --no-recommends'
+  args:
+    warn: no
+  when:
+    - os_name == 'OpenSUSE'
+
 - name: Clean up packages after update
   shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
   args:
     warn: no
   when:
     - package_format == 'rpm'
+    - not os_name == "OpenSUSE"
+
+- name: Clean up packages after update
+  shell: '{{ package_manager }} clean'
+  args:
+    warn: no
+  when:
+    - os_name == "OpenSUSE"
 
 - name: Clean up packages after update
   apt:
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index bd9b161..8359ce2 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -19,10 +19,10 @@
 #   - deb, pkg, rpm
 #
 # Valid OS names are:
-#   - CentOS, Debian, Fedora, FreeBSD, Ubuntu
+#   - CentOS, Debian, Fedora, FreeBSD, OpenSUSE, Ubuntu
 #
 # Valid OS versions are:
-#   - CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on
+#   - CentOS7, Debian9, FedoraRawhide, OpenSUSE15, Ubuntu18 and so on
 #
 # The arch specific rules use a prefix "$ARCH-" where  $ARCH
 # is a libvirt arch name.
@@ -70,6 +70,7 @@ mappings:
 
   apparmor:
     deb: libapparmor-dev
+    OpenSUSE: libapparmor-devel
     cross-policy-deb: foreign
 
   augeas:
@@ -117,6 +118,7 @@ mappings:
   cppi:
     Fedora: cppi
     FreeBSD: cppi
+    OpenSUSE: cppi
 
   cyrus-sasl:
     deb: libsasl2-dev
@@ -127,6 +129,7 @@ mappings:
   dbus-daemon:
     default: dbus
     Fedora: dbus-daemon
+    OpenSUSE: dbus-1
 
   device-mapper:
     deb: libdevmapper-dev
@@ -196,6 +199,7 @@ mappings:
     deb: libglusterfs-dev
     rpm: glusterfs-api-devel
     Debian9: glusterfs-common
+    OpenSUSE: glusterfs-devel
     Ubuntu16: glusterfs-common
     Ubuntu18: glusterfs-common
     cross-policy-deb: foreign
@@ -204,6 +208,7 @@ mappings:
     deb: libgnutls28-dev
     pkg: gnutls
     rpm: gnutls-devel
+    OpenSUSE: libgnutls-devel
     cross-policy-deb: foreign
 
   go:
@@ -228,6 +233,7 @@ mappings:
 
   gtk-update-icon-cache:
     default: gtk-update-icon-cache
+    OpenSUSE: gtk3-tools
     Ubuntu16: libgtk2.0-bin
 
   gtk-vnc2:
@@ -248,14 +254,17 @@ mappings:
   ip:
     deb: iproute2
     rpm: iproute
+    OpenSUSE: iproute2
 
   iscsiadm:
     deb: open-iscsi
     rpm: iscsi-initiator-utils
+    OpenSUSE: open-iscsi
 
   isoinfo:
     default: genisoimage
     FreeBSD: cdrkit
+    OpenSUSE: mkisofs
 
   java:
     deb: openjdk-11-jre-headless
@@ -289,6 +298,7 @@ mappings:
   libaudit:
     deb: libaudit-dev
     rpm: audit-libs-devel
+    OpenSUSE: audit-devel
     cross-policy-deb: foreign
 
   libblkid:
@@ -320,6 +330,7 @@ mappings:
     deb: libdbus-1-dev
     pkg: dbus
     rpm: dbus-devel
+    OpenSUSE: dbus-1-devel
     cross-policy-deb: foreign
 
   libgovirt:
@@ -347,6 +358,7 @@ mappings:
     rpm: numactl-devel
     armv6l-deb:
     armv7l-deb:
+    OpenSUSE: libnuma-devel
     cross-policy-deb: foreign
 
   libparted:
@@ -370,6 +382,7 @@ mappings:
     deb: librbd-dev
     Fedora: librbd-devel
     CentOS7: librbd1-devel
+    OpenSUSE: librbd-devel
     cross-policy-deb: foreign
 
   libselinux:
@@ -436,6 +449,7 @@ mappings:
     deb: locales
     Fedora: glibc-langpack-en
     FreeBSD:
+    OpenSUSE: glibc-locale
 
   lsof:
     default: lsof
@@ -458,6 +472,7 @@ mappings:
   ninja:
    default: ninja-build
    FreeBSD: ninja
+   OpenSUSE: ninja
 
   mingw32-curl:
     Fedora: mingw32-curl
@@ -639,6 +654,7 @@ mappings:
   netcf:
     deb: libnetcf-dev
     rpm: netcf-devel
+    OpenSUSE:
     cross-policy-deb: skip
 
   net-tools:
@@ -678,6 +694,7 @@ mappings:
     deb: perl
     pkg: perl5
     rpm: perl-Archive-Tar
+    OpenSUSE: perl-Archive-Tar-Wrapper
 
   perl-CPAN-Changes:
     deb: libcpan-changes-perl
@@ -709,6 +726,7 @@ mappings:
     deb: libio-compress-perl
     pkg: p5-IO-Compress
     rpm: perl-IO-Compress-Bzip2
+    OpenSUSE: perl-Compress-Bzip2
 
   perl-IO-String:
     deb: libio-string-perl
@@ -747,6 +765,7 @@ mappings:
     deb: libtest-lwp-useragent-perl
     pkg: p5-Test-LWP-UserAgent
     Fedora: perl-Test-LWP-UserAgent
+    OpenSUSE: perl-Test-LWP-UserAgent
 
   perl-Test-Pod:
     deb: libtest-pod-perl
@@ -809,20 +828,24 @@ mappings:
     deb: python-dev
     pkg: python2
     rpm: python2-devel
+    OpenSUSE: python-devel
     cross-policy-deb: foreign
 
   python2-lxml:
     default: python-lxml
     Fedora: python2-lxml
     FreeBSD: py27-lxml
+    OpenSUSE: python2-lxml
 
   python2-nose:
     default: python-nose
     Fedora: python2-nose
     FreeBSD: py27-nose
+    OpenSUSE: python2-nose
 
   python2-setuptools:
     CentOS7: python2-setuptools
+    OpenSUSE: python2-setuptools
 
   python3:
     default: python3
@@ -831,6 +854,7 @@ mappings:
     default: python3-dbus
     FreeBSD: py36-dbus
     CentOS7: python36-dbus
+    OpenSUSE: python3-dbus-python
 
   python3-devel:
     deb: python3-dev
@@ -838,17 +862,20 @@ mappings:
     Fedora: python3-devel
     CentOS7: python36-devel
     cross-policy-deb: foreign
+    OpenSUSE: python3-devel
 
   python3-gi:
     deb: python3-gi
     pkg: py36-gobject3
     rpm: python3-gobject
     CentOS7: python36-gobject
+    OpenSUSE: python3-gobject
 
   python3-libxml2:
     default: python3-libxml2
     FreeBSD: py36-libxml2
     CentOS7:
+    OpenSUSE: python3-libxml2-python
     Ubuntu16:
 
   python3-lxml:
@@ -864,6 +891,7 @@ mappings:
   python3-pip:
     CentOS7: python3-pip
     Debian9: python3-pip
+    OpenSUSE: python3-pip
     Ubuntu16: python3-pip
     Ubuntu18: python3-pip
 
@@ -884,6 +912,7 @@ mappings:
   qemu-img:
     default: qemu-utils
     rpm: qemu-img
+    OpenSUSE: qemu-tools
 
   radvd:
     default: radvd
@@ -929,6 +958,7 @@ mappings:
     deb: libspice-client-gtk-3.0-dev
     pkg: spice-gtk
     rpm: spice-gtk3-devel
+    OpenSUSE: spice-gtk-devel
     cross-policy-deb: foreign
 
   strace:
@@ -942,6 +972,7 @@ mappings:
     deb: iproute2
     rpm: iproute-tc
     CentOS7: iproute
+    OpenSUSE: iproute2
 
   unzip:
     default: unzip
@@ -964,10 +995,12 @@ mappings:
   wireshark:
     deb: wireshark-dev
     Fedora: wireshark-devel
+    OpenSUSE: wireshark-devel
     cross-policy-deb: skip
 
   xen:
     Fedora: xen-devel
+    OpenSUSE: xen-devel
     x86_64-deb: libxen-dev
     armv7l-deb: libxen-dev
     aarch64-deb: libxen-dev
@@ -994,18 +1027,21 @@ mappings:
   xz-static:
     deb: liblzma-dev
     Fedora: xz-static
+    OpenSUSE: xz-static-devel
     cross-policy-deb: foreign
 
   yajl:
     deb: libyajl-dev
     pkg: yajl
     rpm: yajl-devel
+    OpenSUSE: libyajl-devel
     cross-policy-deb: foreign
 
   zfs:
     default: zfs-fuse
     CentOS:
     FreeBSD:
+    OpenSUSE:
 
   zlib:
     deb: zlib1g-dev
@@ -1015,6 +1051,7 @@ mappings:
   zlib-static:
     deb: zlib1g-dev
     rpm: zlib-static
+    OpenSUSE: zlib-devel-static
     cross-policy-deb: foreign
 
 
-- 
2.24.0


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
Jim,

Firstly, sorry it took so long for me to give it a try in your patch.

Now, comments inline ...

On Tue, Nov 26, 2019 at 1:52 AM Jim Fehlig <jfehlig@suse.com> wrote:
>
> This change adds support for the latest openSUSE Leap and
> openSUSE Tumbleweed guests.
>
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
>
> This version of the patch overcomes the 'lci build' issues noted in V1
> and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
> opinion of only supporting the latest Leap since there is only a six
> month support overlap between versions. Version x-1 is only supported
> six months after x is released.

I will leave this up to you and Andrea. I'd say, whatever floats your boat. :-)

>
> 'lci update ... libvirt' fails in task "Configure hostname":
>
> fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}

It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726

>
> Not sure why that is the case. But more importantly, even though it
> doesn't fail, the "Update installed packages" task doesn't install any
> of the packages required to build libvirt. I suppose that agrees with
> guests/REAMDME, but how then are the packages required to build $project
> installed? How/when is the list of packages required to build $project
> conveyed to $package_manager?
>
> 'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
> "Gathering Facts" task:
>
> fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}

I didn't get this far, I'd firstly try to get the first part fixed as
this whole thing is sequential ...

>
> Passing --debug to the command didn't help with determining what needed
> the password. ssh? I can't find where the "Gathering Facts" task is
> defined. The $root_password_file passed to /usr/bin/ansible-playbook
> contains the correct password for the root user. /me needs to figure
> out how to better debug this stuff :-).
>
>  guests/configs/autoinst.xml                   | 75 +++++++++++++++++++
>  .../host_vars/libvirt-opensuse-15/docker.yml  |  2 +
>  .../host_vars/libvirt-opensuse-15/install.yml |  2 +
>  guests/host_vars/libvirt-opensuse-15/main.yml | 22 ++++++
>  .../libvirt-opensuse-tumbleweed/docker.yml    |  2 +
>  .../libvirt-opensuse-tumbleweed/install.yml   |  2 +
>  .../libvirt-opensuse-tumbleweed/main.yml      | 22 ++++++
>  guests/inventory                              |  2 +
>  guests/lcitool                                |  2 +
>  guests/playbooks/update/tasks/base.yml        | 15 ++++
>  guests/vars/mappings.yml                      | 41 +++++++++-
>  11 files changed, 185 insertions(+), 2 deletions(-)
>
> diff --git a/guests/configs/autoinst.xml b/guests/configs/autoinst.xml
> new file mode 100644
> index 0000000..42c42f8
> --- /dev/null
> +++ b/guests/configs/autoinst.xml
> @@ -0,0 +1,75 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE profile>
> +<profile
> +  xmlns="http://www.suse.com/1.0/yast2ns"
> +  xmlns:config="http://www.suse.com/1.0/configns">
> +  <general>
> +    <mode>
> +      <confirm config:type="boolean">false</confirm>

Here, please, also add:
<second_stage config:type="boolean">false</second_stage>

It'll avoid an unnecessary reboot in the VM.

> +    </mode>
> +  </general>
> +  <partitioning config:type="list">
> +    <drive>
> +      <device>/dev/vda</device>
> +      <use>all</use>
> +      <partitions config:type="list">
> +        <partition>
> +          <filesystem config:type="symbol">swap</filesystem>
> +          <size>256M</size>
> +          <mount>swap</mount>
> +        </partition>
> +        <partition>
> +          <filesystem config:type="symbol">ext4</filesystem>
> +          <mount>/</mount>
> +          <size>max</size>
> +        </partition>
> +      </partitions>
> +    </drive>
> +  </partitioning>
> +  <bootloader>
> +    <global>
> +      <terminal>console serial</terminal>
> +    </global>
> +  </bootloader>
> +  <timezone>
> +    <hwclock>UTC</hwclock>
> +    <timezone>UTC</timezone>
> +  </timezone>
> +  <software>
> +    <install_recommended config:type="boolean">false</install_recommended>
> +    <products config:type="list">
> +      <product>openSUSE</product>
> +    </products>
> +    <patterns config:type="list">
> +      <pattern>base</pattern>
> +      <pattern>minimal_base</pattern>
> +      <pattern>yast2_basis</pattern>
> +    </patterns>
> +    <packages config:type="list">

Here, please, also add:
<package>hostname</package>

Seems that lcitools rely on having hostname installed in the machine
and "hostname" is used before actually installing the packages. Or,
IOW, trying to install the package afterwards wouldn't work. (I gave
it a try).

> +      <package>openssh</package>
> +    </packages>
> +  </software>
> +  <networking>
> +    <keep_install_network config:type="boolean">true</keep_install_network>
> +  </networking>
> +  <users config:type="list">
> +    <user>
> +      <username>root</username>
> +      <user_password>root</user_password>
> +      <encrypted config:type="boolean">false</encrypted>
> +      <uid>0</uid>
> +      <gid>0</gid>
> +      <home>/root</home>
> +      <shell>/bin/bash</shell>
> +    </user>
> +  </users>
> +  <services-manager>
> +    <default_target>multi-user</default_target>
> +    <services config:type="list">
> +      <service>
> +        <service_name>sshd</service_name>
> +        <service_status>enable</service_status>
> +      </service>
> +    </services>
> +  </services-manager>
> +</profile>
> diff --git a/guests/host_vars/libvirt-opensuse-15/docker.yml b/guests/host_vars/libvirt-opensuse-15/docker.yml
> new file mode 100644
> index 0000000..8f32d06
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
> @@ -0,0 +1,2 @@
> +---
> +docker_base: opensuse/leap:15
> diff --git a/guests/host_vars/libvirt-opensuse-15/install.yml b/guests/host_vars/libvirt-opensuse-15/install.yml
> new file mode 100644
> index 0000000..d0fdbe5
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/install.yml
> @@ -0,0 +1,2 @@
> +---
> +install_url: http://download.opensuse.org/distribution/leap/15.1/repo/oss/
> diff --git a/guests/host_vars/libvirt-opensuse-15/main.yml b/guests/host_vars/libvirt-opensuse-15/main.yml
> new file mode 100644
> index 0000000..abd83c5
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> @@ -0,0 +1,22 @@
> +---
> +projects:
> +  - libosinfo
> +  - libvirt
> +  - libvirt-cim
> +  - libvirt-dbus
> +  - libvirt-glib
> +  - libvirt-perl
> +  - libvirt-python
> +  - libvirt-sandbox
> +  - libvirt-tck
> +  - osinfo-db
> +  - osinfo-db-tools
> +  - virt-manager
> +  - virt-viewer
> +
> +package_format: 'rpm'
> +package_manager: 'zypper'
> +os_name: 'OpenSUSE'
> +os_version: '15'
> +
> +ansible_python_interpreter: /usr/bin/python3
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> new file mode 100644
> index 0000000..cc79a22
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> @@ -0,0 +1,2 @@
> +---
> +docker_base: opensuse/tumbleweed
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> new file mode 100644
> index 0000000..36cea68
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> @@ -0,0 +1,2 @@
> +---
> +install_url: http://download.opensuse.org/tumbleweed/repo/oss/
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> new file mode 100644
> index 0000000..828df81
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> @@ -0,0 +1,22 @@
> +---
> +projects:
> +  - libosinfo
> +  - libvirt
> +  - libvirt-cim
> +  - libvirt-dbus
> +  - libvirt-glib
> +  - libvirt-perl
> +  - libvirt-python
> +  - libvirt-sandbox
> +  - libvirt-tck
> +  - osinfo-db
> +  - osinfo-db-tools
> +  - virt-manager
> +  - virt-viewer
> +
> +package_format: 'rpm'
> +package_manager: 'zypper'
> +os_name: 'OpenSUSE'
> +os_version: 'Tumbleweed'
> +
> +ansible_python_interpreter: /usr/bin/python3
> diff --git a/guests/inventory b/guests/inventory
> index 3b15513..71d3c91 100644
> --- a/guests/inventory
> +++ b/guests/inventory
> @@ -8,5 +8,7 @@ libvirt-fedora-rawhide
>  libvirt-freebsd-11
>  libvirt-freebsd-12
>  libvirt-freebsd-current
> +libvirt-opensuse-15
> +libvirt-opensuse-tumbleweed
>  libvirt-ubuntu-16
>  libvirt-ubuntu-18
> diff --git a/guests/lcitool b/guests/lcitool
> index a630971..7f26731 100755
> --- a/guests/lcitool
> +++ b/guests/lcitool
> @@ -531,6 +531,8 @@ class Application:
>                  install_config = "preseed.cfg"
>              elif facts["os_name"] in ["CentOS", "Fedora"]:
>                  install_config = "kickstart.cfg"
> +            elif facts["os_name"] == "OpenSUSE":
> +                install_config = "autoinst.xml"
>              else:
>                  raise Exception(
>                      "Host {} doesn't support installation".format(host)
> diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
> index 3d83e78..b6a2cd2 100644
> --- a/guests/playbooks/update/tasks/base.yml
> +++ b/guests/playbooks/update/tasks/base.yml
> @@ -65,12 +65,27 @@
>    when:
>      - package_format == 'pkg'
>
> +- name: Update installed packages
> +  command: '{{ package_manager }} update -y -l --force-resolution --no-recommends'
> +  args:
> +    warn: no
> +  when:
> +    - os_name == 'OpenSUSE'
> +
>  - name: Clean up packages after update
>    shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
>    args:
>      warn: no
>    when:
>      - package_format == 'rpm'
> +    - not os_name == "OpenSUSE"
> +
> +- name: Clean up packages after update
> +  shell: '{{ package_manager }} clean'
> +  args:
> +    warn: no
> +  when:
> +    - os_name == "OpenSUSE"
>
>  - name: Clean up packages after update
>    apt:
> diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
> index bd9b161..8359ce2 100644
> --- a/guests/vars/mappings.yml
> +++ b/guests/vars/mappings.yml
> @@ -19,10 +19,10 @@
>  #   - deb, pkg, rpm
>  #
>  # Valid OS names are:
> -#   - CentOS, Debian, Fedora, FreeBSD, Ubuntu
> +#   - CentOS, Debian, Fedora, FreeBSD, OpenSUSE, Ubuntu
>  #
>  # Valid OS versions are:
> -#   - CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on
> +#   - CentOS7, Debian9, FedoraRawhide, OpenSUSE15, Ubuntu18 and so on
>  #
>  # The arch specific rules use a prefix "$ARCH-" where  $ARCH
>  # is a libvirt arch name.
> @@ -70,6 +70,7 @@ mappings:
>
>    apparmor:
>      deb: libapparmor-dev
> +    OpenSUSE: libapparmor-devel
>      cross-policy-deb: foreign
>
>    augeas:
> @@ -117,6 +118,7 @@ mappings:
>    cppi:
>      Fedora: cppi
>      FreeBSD: cppi
> +    OpenSUSE: cppi
>
>    cyrus-sasl:
>      deb: libsasl2-dev
> @@ -127,6 +129,7 @@ mappings:
>    dbus-daemon:
>      default: dbus
>      Fedora: dbus-daemon
> +    OpenSUSE: dbus-1
>
>    device-mapper:
>      deb: libdevmapper-dev
> @@ -196,6 +199,7 @@ mappings:
>      deb: libglusterfs-dev
>      rpm: glusterfs-api-devel
>      Debian9: glusterfs-common
> +    OpenSUSE: glusterfs-devel
>      Ubuntu16: glusterfs-common
>      Ubuntu18: glusterfs-common
>      cross-policy-deb: foreign
> @@ -204,6 +208,7 @@ mappings:
>      deb: libgnutls28-dev
>      pkg: gnutls
>      rpm: gnutls-devel
> +    OpenSUSE: libgnutls-devel
>      cross-policy-deb: foreign
>
>    go:
> @@ -228,6 +233,7 @@ mappings:
>
>    gtk-update-icon-cache:
>      default: gtk-update-icon-cache
> +    OpenSUSE: gtk3-tools
>      Ubuntu16: libgtk2.0-bin
>
>    gtk-vnc2:
> @@ -248,14 +254,17 @@ mappings:
>    ip:
>      deb: iproute2
>      rpm: iproute
> +    OpenSUSE: iproute2
>
>    iscsiadm:
>      deb: open-iscsi
>      rpm: iscsi-initiator-utils
> +    OpenSUSE: open-iscsi
>
>    isoinfo:
>      default: genisoimage
>      FreeBSD: cdrkit
> +    OpenSUSE: mkisofs
>
>    java:
>      deb: openjdk-11-jre-headless
> @@ -289,6 +298,7 @@ mappings:
>    libaudit:
>      deb: libaudit-dev
>      rpm: audit-libs-devel
> +    OpenSUSE: audit-devel
>      cross-policy-deb: foreign
>
>    libblkid:
> @@ -320,6 +330,7 @@ mappings:
>      deb: libdbus-1-dev
>      pkg: dbus
>      rpm: dbus-devel
> +    OpenSUSE: dbus-1-devel
>      cross-policy-deb: foreign
>
>    libgovirt:
> @@ -347,6 +358,7 @@ mappings:
>      rpm: numactl-devel
>      armv6l-deb:
>      armv7l-deb:
> +    OpenSUSE: libnuma-devel
>      cross-policy-deb: foreign
>
>    libparted:
> @@ -370,6 +382,7 @@ mappings:
>      deb: librbd-dev
>      Fedora: librbd-devel
>      CentOS7: librbd1-devel
> +    OpenSUSE: librbd-devel
>      cross-policy-deb: foreign
>
>    libselinux:
> @@ -436,6 +449,7 @@ mappings:
>      deb: locales
>      Fedora: glibc-langpack-en
>      FreeBSD:
> +    OpenSUSE: glibc-locale
>
>    lsof:
>      default: lsof
> @@ -458,6 +472,7 @@ mappings:
>    ninja:
>     default: ninja-build
>     FreeBSD: ninja
> +   OpenSUSE: ninja
>
>    mingw32-curl:
>      Fedora: mingw32-curl
> @@ -639,6 +654,7 @@ mappings:
>    netcf:
>      deb: libnetcf-dev
>      rpm: netcf-devel
> +    OpenSUSE:
>      cross-policy-deb: skip
>
>    net-tools:
> @@ -678,6 +694,7 @@ mappings:
>      deb: perl
>      pkg: perl5
>      rpm: perl-Archive-Tar
> +    OpenSUSE: perl-Archive-Tar-Wrapper
>
>    perl-CPAN-Changes:
>      deb: libcpan-changes-perl
> @@ -709,6 +726,7 @@ mappings:
>      deb: libio-compress-perl
>      pkg: p5-IO-Compress
>      rpm: perl-IO-Compress-Bzip2
> +    OpenSUSE: perl-Compress-Bzip2
>
>    perl-IO-String:
>      deb: libio-string-perl
> @@ -747,6 +765,7 @@ mappings:
>      deb: libtest-lwp-useragent-perl
>      pkg: p5-Test-LWP-UserAgent
>      Fedora: perl-Test-LWP-UserAgent
> +    OpenSUSE: perl-Test-LWP-UserAgent
>
>    perl-Test-Pod:
>      deb: libtest-pod-perl
> @@ -809,20 +828,24 @@ mappings:
>      deb: python-dev
>      pkg: python2
>      rpm: python2-devel
> +    OpenSUSE: python-devel
>      cross-policy-deb: foreign
>
>    python2-lxml:
>      default: python-lxml
>      Fedora: python2-lxml
>      FreeBSD: py27-lxml
> +    OpenSUSE: python2-lxml
>
>    python2-nose:
>      default: python-nose
>      Fedora: python2-nose
>      FreeBSD: py27-nose
> +    OpenSUSE: python2-nose
>
>    python2-setuptools:
>      CentOS7: python2-setuptools
> +    OpenSUSE: python2-setuptools
>
>    python3:
>      default: python3
> @@ -831,6 +854,7 @@ mappings:
>      default: python3-dbus
>      FreeBSD: py36-dbus
>      CentOS7: python36-dbus
> +    OpenSUSE: python3-dbus-python
>
>    python3-devel:
>      deb: python3-dev
> @@ -838,17 +862,20 @@ mappings:
>      Fedora: python3-devel
>      CentOS7: python36-devel
>      cross-policy-deb: foreign
> +    OpenSUSE: python3-devel
>
>    python3-gi:
>      deb: python3-gi
>      pkg: py36-gobject3
>      rpm: python3-gobject
>      CentOS7: python36-gobject
> +    OpenSUSE: python3-gobject
>
>    python3-libxml2:
>      default: python3-libxml2
>      FreeBSD: py36-libxml2
>      CentOS7:
> +    OpenSUSE: python3-libxml2-python
>      Ubuntu16:
>
>    python3-lxml:
> @@ -864,6 +891,7 @@ mappings:
>    python3-pip:
>      CentOS7: python3-pip
>      Debian9: python3-pip
> +    OpenSUSE: python3-pip
>      Ubuntu16: python3-pip
>      Ubuntu18: python3-pip
>
> @@ -884,6 +912,7 @@ mappings:
>    qemu-img:
>      default: qemu-utils
>      rpm: qemu-img
> +    OpenSUSE: qemu-tools
>
>    radvd:
>      default: radvd
> @@ -929,6 +958,7 @@ mappings:
>      deb: libspice-client-gtk-3.0-dev
>      pkg: spice-gtk
>      rpm: spice-gtk3-devel
> +    OpenSUSE: spice-gtk-devel
>      cross-policy-deb: foreign
>
>    strace:
> @@ -942,6 +972,7 @@ mappings:
>      deb: iproute2
>      rpm: iproute-tc
>      CentOS7: iproute
> +    OpenSUSE: iproute2
>
>    unzip:
>      default: unzip
> @@ -964,10 +995,12 @@ mappings:
>    wireshark:
>      deb: wireshark-dev
>      Fedora: wireshark-devel
> +    OpenSUSE: wireshark-devel
>      cross-policy-deb: skip
>
>    xen:
>      Fedora: xen-devel
> +    OpenSUSE: xen-devel
>      x86_64-deb: libxen-dev
>      armv7l-deb: libxen-dev
>      aarch64-deb: libxen-dev
> @@ -994,18 +1027,21 @@ mappings:
>    xz-static:
>      deb: liblzma-dev
>      Fedora: xz-static
> +    OpenSUSE: xz-static-devel
>      cross-policy-deb: foreign
>
>    yajl:
>      deb: libyajl-dev
>      pkg: yajl
>      rpm: yajl-devel
> +    OpenSUSE: libyajl-devel
>      cross-policy-deb: foreign
>
>    zfs:
>      default: zfs-fuse
>      CentOS:
>      FreeBSD:
> +    OpenSUSE:
>
>    zlib:
>      deb: zlib1g-dev
> @@ -1015,6 +1051,7 @@ mappings:
>    zlib-static:
>      deb: zlib1g-dev
>      rpm: zlib-static
> +    OpenSUSE: zlib-devel-static
>      cross-policy-deb: foreign
>
>
> --
> 2.24.0
>
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>

Apart from the comments inline, I had to add the following patch in
order to get Leap working:

```
diff --git a/guests/playbooks/build/jobs/defaults.yml
b/guests/playbooks/build/jobs/defaults.yml
index 48cf643..eb4dfd5 100644
--- a/guests/playbooks/build/jobs/defaults.yml
+++ b/guests/playbooks/build/jobs/defaults.yml
@@ -10,6 +10,7 @@ all_machines:
   - libvirt-freebsd-11
   - libvirt-freebsd-12
   - libvirt-freebsd-current
+  - libvirt-opensuse-15
   - libvirt-ubuntu-16
   - libvirt-ubuntu-18
 rpm_machines:
diff --git a/guests/playbooks/build/projects/libvirt.yml
b/guests/playbooks/build/projects/libvirt.yml
index 4b3dfdf..3e3dbba 100644
--- a/guests/playbooks/build/projects/libvirt.yml
+++ b/guests/playbooks/build/projects/libvirt.yml
@@ -19,6 +19,7 @@
       - libvirt-fedora-30
       - libvirt-fedora-31
       - libvirt-fedora-rawhide
+      - libvirt-opensuse-15
       - libvirt-ubuntu-16
       - libvirt-ubuntu-18
 - include: '{{ playbook_base }}/jobs/autotools-check-job.yml'
diff --git a/guests/playbooks/update/tasks/paths.yml
b/guests/playbooks/update/tasks/paths.yml
index 770680e..c258ad2 100644
--- a/guests/playbooks/update/tasks/paths.yml
+++ b/guests/playbooks/update/tasks/paths.yml
@@ -17,7 +17,7 @@
     - su

 - name: 'Look for files'
-  shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null'
+  shell: 'find /usr/local/etc -name {{ item }} 2>/dev/null || find
/etc -name {{ item }} 2>/dev/null'
   register: find
   with_items:
     - sudoers
diff --git a/guests/playbooks/update/tasks/users.yml
b/guests/playbooks/update/tasks/users.yml
index 0470686..bf149da 100644
--- a/guests/playbooks/update/tasks/users.yml
+++ b/guests/playbooks/update/tasks/users.yml
@@ -18,12 +18,18 @@
     line: 'PermitRootLogin without-password'
     state: present

+- name: '{{ flavor }}: Ensure group exists'
+  group:
+    name: '{{ flavor }}'
+    state: present
+
 - name: '{{ flavor }}: Create user account'
   user:
     name: '{{ flavor }}'
     comment: '{{ flavor }}'
     password: '*'
     shell: '{{ bash }}'
+    group: '{{ flavor }}'

 - name: '{{ flavor }}: Set password'
   user:
```

I know Andrea suggested to change the way we deal with finding sudoers
but, IMHO, it shouldn't be a blocker for your patches. However, I'm
*not* the maintainer of the project. :-)

So, with those changes, Leap works and we can build libvirt.

What I'd suggest:
- Submit a patch just adding Leap (and then you'll have to have an
agreement with Andrea about whether we'll support 15 or 15.x);
- After that, let's try to figure out the issue with Tumbleweed and,
only then, try to have it merged;

Does that make sense? Andrea, Jim, are we on the same page here?

Best Regards,
-- 
Fabiano Fidêncio


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Andrea Bolognani 4 years, 4 months ago
On Mon, 2019-12-02 at 16:41 +0100, Fabiano Fidêncio wrote:
> Jim,
> 
> Firstly, sorry it took so long for me to give it a try in your patch.
> 
> Now, comments inline ...
> 
> On Tue, Nov 26, 2019 at 1:52 AM Jim Fehlig <jfehlig@suse.com> wrote:
> > This change adds support for the latest openSUSE Leap and
> > openSUSE Tumbleweed guests.
> > 
> > Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> > ---
> > 
> > This version of the patch overcomes the 'lci build' issues noted in V1
> > and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
> > opinion of only supporting the latest Leap since there is only a six
> > month support overlap between versions. Version x-1 is only supported
> > six months after x is released.
> 
> I will leave this up to you and Andrea. I'd say, whatever floats your boat. :-)

That won't work if, as you said earlier, you can't seamlessly move
from eg. 15.1 to 15.2: either you can move from one minor version to
the next with a simple upgrade, as is the case for CentOS and Debian,
or you need to consider the two as separate entities, as is the case
for Fedora, otherwise libvirt-opensuse-15 will mean vastly different
things depending on whether you installed in the 15.1 timeframe or
in the 15.2 timeframe...

It's annoying, but I'm afraid we're going to have to include the
minor version number in the name even though we're only likely to
ever support one 42.x and one 15.x at any given time.

One more note about naming: I just remembered why I decided for
libvirt-ubuntu-18 instead of the more obvious libvirt-ubuntu-18.04
back then: the guest name is also used as the hostname, and I wanted
to avoid having extra dots in the latter. Perhaps that's overzealous
of me, but assuming we want to stick with that principle then we
should call this libvirt-opensuse-151, and later rename the
aforementioned to libvirt-ubuntu-1804 to be consistent.

> > 'lci update ... libvirt' fails in task "Configure hostname":
> > 
> > fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
> 
> It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726

Is it possible that this failed simply because the hostname command
is not available? You mention this below.

> > Not sure why that is the case. But more importantly, even though it
> > doesn't fail, the "Update installed packages" task doesn't install any
> > of the packages required to build libvirt.

That step merely updates the packages that are already installed.

> > I suppose that agrees with
> > guests/REAMDME, but how then are the packages required to build $project
> > installed? How/when is the list of packages required to build $project
> > conveyed to $package_manager?

That happens later[1].

> > 'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
> > "Gathering Facts" task:
> > 
> > fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}
> 
> I didn't get this far, I'd firstly try to get the first part fixed as
> this whole thing is sequential ...

We can add Leap 15.1 first, and worry about tumbleweed later. It's
probably a good idea to add them in separate commits anyway.

> > Passing --debug to the command didn't help with determining what needed
> > the password. ssh? I can't find where the "Gathering Facts" task is
> > defined.

That's not a custom task, but rather something that Ansible does
automatically when it connects to a host.

> > The $root_password_file passed to /usr/bin/ansible-playbook
> > contains the correct password for the root user. /me needs to figure
> > out how to better debug this stuff :-).

I'm pretty sure 'lcitool build' failed simply because 'lcitool
update' failed before it, and more specifically didn't manage to get
far enough to set up a regular user to use for builds.

I agree debugging this kind of issue is not exactly trivial...
Unfortunately there's no easy solution to the problem either :(

> > +++ b/guests/configs/autoinst.xml
> > @@ -0,0 +1,75 @@
> > +<?xml version="1.0"?>
> > +<!DOCTYPE profile>
> > +<profile
> > +  xmlns="http://www.suse.com/1.0/yast2ns"
> > +  xmlns:config="http://www.suse.com/1.0/configns">
> > +  <general>
> > +    <mode>
> > +      <confirm config:type="boolean">false</confirm>
> 
> Here, please, also add:
> <second_stage config:type="boolean">false</second_stage>
> 
> It'll avoid an unnecessary reboot in the VM.

I didn't test this, but it sounds reasonable. I'll give it an actual
go tomorrow :)

[...]
> > +  <software>
> > +    <install_recommended config:type="boolean">false</install_recommended>
> > +    <products config:type="list">
> > +      <product>openSUSE</product>
> > +    </products>
> > +    <patterns config:type="list">
> > +      <pattern>base</pattern>
> > +      <pattern>minimal_base</pattern>
> > +      <pattern>yast2_basis</pattern>
> > +    </patterns>
> > +    <packages config:type="list">
> 
> Here, please, also add:
> <package>hostname</package>
> 
> Seems that lcitools rely on having hostname installed in the machine
> and "hostname" is used before actually installing the packages. Or,
> IOW, trying to install the package afterwards wouldn't work. (I gave
> it a try).

This also sounds good.

> > +++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
> > @@ -0,0 +1,2 @@
> > +---
> > +docker_base: opensuse/leap:15

This should point to

  opensuse/leap:15.1

instead.

> > +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> > @@ -0,0 +1,22 @@
> > +---
> > +projects:
> > +  - libosinfo
> > +  - libvirt
> > +  - libvirt-cim
> > +  - libvirt-dbus
> > +  - libvirt-glib
> > +  - libvirt-perl
> > +  - libvirt-python
> > +  - libvirt-sandbox
> > +  - libvirt-tck
> > +  - osinfo-db
> > +  - osinfo-db-tools
> > +  - virt-manager
> > +  - virt-viewer

Since right now we're only aiming at building libvirt, we should only
list that project: it's a good starting point, and we can add more as
we make sure we can actually 'lcitool build' them successfully.

> > +package_format: 'rpm'
> > +package_manager: 'zypper'
> > +os_name: 'OpenSUSE'
> > +os_version: '15'

os_version should be '151' if we follow the naming scheme outlined
earlier.

[...]
> > +++ b/guests/lcitool
> >  - name: Clean up packages after update
> >    shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
> >    args:
> >      warn: no
> >    when:
> >      - package_format == 'rpm'
> > +    - not os_name == "OpenSUSE"

This should be

  os_name != 'OpenSUSE'

[...]
> > +++ b/guests/vars/mappings.yml
> >    perl-Archive-Tar:
> >      deb: perl
> >      pkg: perl5
> >      rpm: perl-Archive-Tar
> > +    OpenSUSE: perl-Archive-Tar-Wrapper

This doesn't look right:

  [test@libvirt-fedora-31 ~]$ rpm -ql perl-Archive-Tar
  /usr/bin/ptar
  /usr/bin/ptardiff
  /usr/bin/ptargrep
  /usr/share/doc/perl-Archive-Tar
  /usr/share/doc/perl-Archive-Tar/CHANGES
  /usr/share/doc/perl-Archive-Tar/README
  /usr/share/man/man1/ptar.1.gz
  /usr/share/man/man1/ptardiff.1.gz
  /usr/share/man/man1/ptargrep.1.gz
  /usr/share/man/man3/Archive::Tar.3pm.gz
  /usr/share/man/man3/Archive::Tar::File.3pm.gz
  /usr/share/perl5/vendor_perl/Archive
  /usr/share/perl5/vendor_perl/Archive/Tar
  /usr/share/perl5/vendor_perl/Archive/Tar.pm
  /usr/share/perl5/vendor_perl/Archive/Tar/Constant.pm
  /usr/share/perl5/vendor_perl/Archive/Tar/File.pm
  [test@libvirt-fedora-31 ~]$

  [test@libvirt-opensuse-15 ~]$ rpm -ql perl-Archive-Tar-Wrapper
  /usr/lib/perl5/vendor_perl/5.26.1/Archive
  /usr/lib/perl5/vendor_perl/5.26.1/Archive/Tar
  /usr/lib/perl5/vendor_perl/5.26.1/Archive/Tar/Wrapper.pm
  /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
  /usr/share/doc/packages/perl-Archive-Tar-Wrapper
  /usr/share/doc/packages/perl-Archive-Tar-Wrapper/Changes
  /usr/share/doc/packages/perl-Archive-Tar-Wrapper/README
  /usr/share/man/man3/Archive::Tar::Wrapper.3pm.gz
  [test@libvirt-opensuse-15 ~]$

> >    python2-setuptools:
> >      CentOS7: python2-setuptools
> > +    OpenSUSE: python2-setuptools

We might be able to get away without installing Python 2 packages;
they certainly shouldn't be necessary to build libvirt.

> >    python3-pip:
> >      CentOS7: python3-pip
> >      Debian9: python3-pip
> > +    OpenSUSE: python3-pip
> >      Ubuntu16: python3-pip
> >      Ubuntu18: python3-pip

Installing pip isn't necessary either, since openSUSE Leap 15.1
contains Meson.

> >    wireshark:
> >      deb: wireshark-dev
> >      Fedora: wireshark-devel
> > +    OpenSUSE: wireshark-devel
> >      cross-policy-deb: skip

This now makes more sense as

  wireshark:
    deb: wireshark-dev
    rpm: wireshark-devel
    CentOS:
    cross-policy-deb: skip

> >    xen:
> >      Fedora: xen-devel
> > +    OpenSUSE: xen-devel
> >      x86_64-deb: libxen-dev
> >      armv7l-deb: libxen-dev
> >      aarch64-deb: libxen-dev

Same as above.

> Apart from the comments inline, I had to add the following patch in
> order to get Leap working:
> 
> ```
> diff --git a/guests/playbooks/build/jobs/defaults.yml
> b/guests/playbooks/build/jobs/defaults.yml
> index 48cf643..eb4dfd5 100644
> --- a/guests/playbooks/build/jobs/defaults.yml
> +++ b/guests/playbooks/build/jobs/defaults.yml
> @@ -10,6 +10,7 @@ all_machines:
>    - libvirt-freebsd-11
>    - libvirt-freebsd-12
>    - libvirt-freebsd-current
> +  - libvirt-opensuse-15
>    - libvirt-ubuntu-16
>    - libvirt-ubuntu-18
>  rpm_machines:
> diff --git a/guests/playbooks/build/projects/libvirt.yml
> b/guests/playbooks/build/projects/libvirt.yml
> index 4b3dfdf..3e3dbba 100644
> --- a/guests/playbooks/build/projects/libvirt.yml
> +++ b/guests/playbooks/build/projects/libvirt.yml
> @@ -19,6 +19,7 @@
>        - libvirt-fedora-30
>        - libvirt-fedora-31
>        - libvirt-fedora-rawhide
> +      - libvirt-opensuse-15
>        - libvirt-ubuntu-16
>        - libvirt-ubuntu-18
>  - include: '{{ playbook_base }}/jobs/autotools-check-job.yml'

These changes are only necessary to make 'lcitool build' work, and
should go in a separate commit.

> diff --git a/guests/playbooks/update/tasks/paths.yml
> b/guests/playbooks/update/tasks/paths.yml
> index 770680e..c258ad2 100644
> --- a/guests/playbooks/update/tasks/paths.yml
> +++ b/guests/playbooks/update/tasks/paths.yml
> @@ -17,7 +17,7 @@
>      - su
> 
>  - name: 'Look for files'
> -  shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null'
> +  shell: 'find /usr/local/etc -name {{ item }} 2>/dev/null || find
> /etc -name {{ item }} 2>/dev/null'
>    register: find
>    with_items:
>      - sudoers
> diff --git a/guests/playbooks/update/tasks/users.yml
> b/guests/playbooks/update/tasks/users.yml
> index 0470686..bf149da 100644
> --- a/guests/playbooks/update/tasks/users.yml
> +++ b/guests/playbooks/update/tasks/users.yml
> @@ -18,12 +18,18 @@
>      line: 'PermitRootLogin without-password'
>      state: present
> 
> +- name: '{{ flavor }}: Ensure group exists'
> +  group:
> +    name: '{{ flavor }}'
> +    state: present
> +
>  - name: '{{ flavor }}: Create user account'
>    user:
>      name: '{{ flavor }}'
>      comment: '{{ flavor }}'
>      password: '*'
>      shell: '{{ bash }}'
> +    group: '{{ flavor }}'
> 
>  - name: '{{ flavor }}: Set password'
>    user:
> ```
> 
> I know Andrea suggested to change the way we deal with finding sudoers
> but, IMHO, it shouldn't be a blocker for your patches. However, I'm
> *not* the maintainer of the project. :-)

I've posted these separately in

  https://www.redhat.com/archives/libvir-list/2019-December/msg00065.html

and Fabiano already reviewed them! So consider them merged :)

> So, with those changes, Leap works and we can build libvirt.
> 
> What I'd suggest:
> - Submit a patch just adding Leap (and then you'll have to have an
> agreement with Andrea about whether we'll support 15 or 15.x);
> - After that, let's try to figure out the issue with Tumbleweed and,
> only then, try to have it merged;
> 
> Does that make sense? Andrea, Jim, are we on the same page here?

Yeah, we should get Leap 15.1 working first, and only then worry
about Tumbleweed.


Speaking of which: I've run into a fairly major problem with
the Leap 15.1 support enabled by this patch: while unattended
installation works as expected on my laptop (Fedora 31), when I try
the same steps on the CentOS CI production environment (CentOS 7.5)
it doesn't seem to find or recognize the autoinst.xml file: instead,
I get a "please make sure your installation medium is available"
message and the chance to input the information manually, which is
obviously not what we want :) I'll try to figure out what's going
wrong tomorrow.


[1] guests/playbooks/update/tasks/packages.yml
-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
On Mon, Dec 2, 2019 at 8:33 PM Andrea Bolognani <abologna@redhat.com> wrote:
>
> On Mon, 2019-12-02 at 16:41 +0100, Fabiano Fidêncio wrote:
> > Jim,
> >
> > Firstly, sorry it took so long for me to give it a try in your patch.
> >
> > Now, comments inline ...
> >
> > On Tue, Nov 26, 2019 at 1:52 AM Jim Fehlig <jfehlig@suse.com> wrote:
> > > This change adds support for the latest openSUSE Leap and
> > > openSUSE Tumbleweed guests.
> > >
> > > Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> > > ---
> > >
> > > This version of the patch overcomes the 'lci build' issues noted in V1
> > > and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
> > > opinion of only supporting the latest Leap since there is only a six
> > > month support overlap between versions. Version x-1 is only supported
> > > six months after x is released.
> >
> > I will leave this up to you and Andrea. I'd say, whatever floats your boat. :-)
>
> That won't work if, as you said earlier, you can't seamlessly move
> from eg. 15.1 to 15.2: either you can move from one minor version to
> the next with a simple upgrade, as is the case for CentOS and Debian,
> or you need to consider the two as separate entities, as is the case
> for Fedora, otherwise libvirt-opensuse-15 will mean vastly different
> things depending on whether you installed in the 15.1 timeframe or
> in the 15.2 timeframe...
>
> It's annoying, but I'm afraid we're going to have to include the
> minor version number in the name even though we're only likely to
> ever support one 42.x and one 15.x at any given time.
>
> One more note about naming: I just remembered why I decided for
> libvirt-ubuntu-18 instead of the more obvious libvirt-ubuntu-18.04
> back then: the guest name is also used as the hostname, and I wanted
> to avoid having extra dots in the latter. Perhaps that's overzealous
> of me, but assuming we want to stick with that principle then we
> should call this libvirt-opensuse-151, and later rename the
> aforementioned to libvirt-ubuntu-1804 to be consistent.
>
> > > 'lci update ... libvirt' fails in task "Configure hostname":
> > >
> > > fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
> >
> > It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726
>
> Is it possible that this failed simply because the hostname command
> is not available? You mention this below.

No. When testing this patch I was already installing "hostname" in the box.

>
> > > Not sure why that is the case. But more importantly, even though it
> > > doesn't fail, the "Update installed packages" task doesn't install any
> > > of the packages required to build libvirt.
>
> That step merely updates the packages that are already installed.
>
> > > I suppose that agrees with
> > > guests/REAMDME, but how then are the packages required to build $project
> > > installed? How/when is the list of packages required to build $project
> > > conveyed to $package_manager?
>
> That happens later[1].
>
> > > 'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
> > > "Gathering Facts" task:
> > >
> > > fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}
> >
> > I didn't get this far, I'd firstly try to get the first part fixed as
> > this whole thing is sequential ...
>
> We can add Leap 15.1 first, and worry about tumbleweed later. It's
> probably a good idea to add them in separate commits anyway.
>
> > > Passing --debug to the command didn't help with determining what needed
> > > the password. ssh? I can't find where the "Gathering Facts" task is
> > > defined.
>
> That's not a custom task, but rather something that Ansible does
> automatically when it connects to a host.
>
> > > The $root_password_file passed to /usr/bin/ansible-playbook
> > > contains the correct password for the root user. /me needs to figure
> > > out how to better debug this stuff :-).
>
> I'm pretty sure 'lcitool build' failed simply because 'lcitool
> update' failed before it, and more specifically didn't manage to get
> far enough to set up a regular user to use for builds.
>
> I agree debugging this kind of issue is not exactly trivial...
> Unfortunately there's no easy solution to the problem either :(
>
> > > +++ b/guests/configs/autoinst.xml
> > > @@ -0,0 +1,75 @@
> > > +<?xml version="1.0"?>
> > > +<!DOCTYPE profile>
> > > +<profile
> > > +  xmlns="http://www.suse.com/1.0/yast2ns"
> > > +  xmlns:config="http://www.suse.com/1.0/configns">
> > > +  <general>
> > > +    <mode>
> > > +      <confirm config:type="boolean">false</confirm>
> >
> > Here, please, also add:
> > <second_stage config:type="boolean">false</second_stage>
> >
> > It'll avoid an unnecessary reboot in the VM.
>
> I didn't test this, but it sounds reasonable. I'll give it an actual
> go tomorrow :)
>
> [...]
> > > +  <software>
> > > +    <install_recommended config:type="boolean">false</install_recommended>
> > > +    <products config:type="list">
> > > +      <product>openSUSE</product>
> > > +    </products>
> > > +    <patterns config:type="list">
> > > +      <pattern>base</pattern>
> > > +      <pattern>minimal_base</pattern>
> > > +      <pattern>yast2_basis</pattern>
> > > +    </patterns>
> > > +    <packages config:type="list">
> >
> > Here, please, also add:
> > <package>hostname</package>
> >
> > Seems that lcitools rely on having hostname installed in the machine
> > and "hostname" is used before actually installing the packages. Or,
> > IOW, trying to install the package afterwards wouldn't work. (I gave
> > it a try).
>
> This also sounds good.
>
> > > +++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
> > > @@ -0,0 +1,2 @@
> > > +---
> > > +docker_base: opensuse/leap:15
>
> This should point to
>
>   opensuse/leap:15.1
>
> instead.
>
> > > +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> > > @@ -0,0 +1,22 @@
> > > +---
> > > +projects:
> > > +  - libosinfo
> > > +  - libvirt
> > > +  - libvirt-cim
> > > +  - libvirt-dbus
> > > +  - libvirt-glib
> > > +  - libvirt-perl
> > > +  - libvirt-python
> > > +  - libvirt-sandbox
> > > +  - libvirt-tck
> > > +  - osinfo-db
> > > +  - osinfo-db-tools
> > > +  - virt-manager
> > > +  - virt-viewer
>
> Since right now we're only aiming at building libvirt, we should only
> list that project: it's a good starting point, and we can add more as
> we make sure we can actually 'lcitool build' them successfully.
>
> > > +package_format: 'rpm'
> > > +package_manager: 'zypper'
> > > +os_name: 'OpenSUSE'
> > > +os_version: '15'
>
> os_version should be '151' if we follow the naming scheme outlined
> earlier.
>
> [...]
> > > +++ b/guests/lcitool
> > >  - name: Clean up packages after update
> > >    shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
> > >    args:
> > >      warn: no
> > >    when:
> > >      - package_format == 'rpm'
> > > +    - not os_name == "OpenSUSE"
>
> This should be
>
>   os_name != 'OpenSUSE'
>
> [...]
> > > +++ b/guests/vars/mappings.yml
> > >    perl-Archive-Tar:
> > >      deb: perl
> > >      pkg: perl5
> > >      rpm: perl-Archive-Tar
> > > +    OpenSUSE: perl-Archive-Tar-Wrapper
>
> This doesn't look right:
>
>   [test@libvirt-fedora-31 ~]$ rpm -ql perl-Archive-Tar
>   /usr/bin/ptar
>   /usr/bin/ptardiff
>   /usr/bin/ptargrep
>   /usr/share/doc/perl-Archive-Tar
>   /usr/share/doc/perl-Archive-Tar/CHANGES
>   /usr/share/doc/perl-Archive-Tar/README
>   /usr/share/man/man1/ptar.1.gz
>   /usr/share/man/man1/ptardiff.1.gz
>   /usr/share/man/man1/ptargrep.1.gz
>   /usr/share/man/man3/Archive::Tar.3pm.gz
>   /usr/share/man/man3/Archive::Tar::File.3pm.gz
>   /usr/share/perl5/vendor_perl/Archive
>   /usr/share/perl5/vendor_perl/Archive/Tar
>   /usr/share/perl5/vendor_perl/Archive/Tar.pm
>   /usr/share/perl5/vendor_perl/Archive/Tar/Constant.pm
>   /usr/share/perl5/vendor_perl/Archive/Tar/File.pm
>   [test@libvirt-fedora-31 ~]$
>
>   [test@libvirt-opensuse-15 ~]$ rpm -ql perl-Archive-Tar-Wrapper
>   /usr/lib/perl5/vendor_perl/5.26.1/Archive
>   /usr/lib/perl5/vendor_perl/5.26.1/Archive/Tar
>   /usr/lib/perl5/vendor_perl/5.26.1/Archive/Tar/Wrapper.pm
>   /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
>   /usr/share/doc/packages/perl-Archive-Tar-Wrapper
>   /usr/share/doc/packages/perl-Archive-Tar-Wrapper/Changes
>   /usr/share/doc/packages/perl-Archive-Tar-Wrapper/README
>   /usr/share/man/man3/Archive::Tar::Wrapper.3pm.gz
>   [test@libvirt-opensuse-15 ~]$
>
> > >    python2-setuptools:
> > >      CentOS7: python2-setuptools
> > > +    OpenSUSE: python2-setuptools
>
> We might be able to get away without installing Python 2 packages;
> they certainly shouldn't be necessary to build libvirt.
>
> > >    python3-pip:
> > >      CentOS7: python3-pip
> > >      Debian9: python3-pip
> > > +    OpenSUSE: python3-pip
> > >      Ubuntu16: python3-pip
> > >      Ubuntu18: python3-pip
>
> Installing pip isn't necessary either, since openSUSE Leap 15.1
> contains Meson.
>
> > >    wireshark:
> > >      deb: wireshark-dev
> > >      Fedora: wireshark-devel
> > > +    OpenSUSE: wireshark-devel
> > >      cross-policy-deb: skip
>
> This now makes more sense as
>
>   wireshark:
>     deb: wireshark-dev
>     rpm: wireshark-devel
>     CentOS:
>     cross-policy-deb: skip
>
> > >    xen:
> > >      Fedora: xen-devel
> > > +    OpenSUSE: xen-devel
> > >      x86_64-deb: libxen-dev
> > >      armv7l-deb: libxen-dev
> > >      aarch64-deb: libxen-dev
>
> Same as above.
>
> > Apart from the comments inline, I had to add the following patch in
> > order to get Leap working:
> >
> > ```
> > diff --git a/guests/playbooks/build/jobs/defaults.yml
> > b/guests/playbooks/build/jobs/defaults.yml
> > index 48cf643..eb4dfd5 100644
> > --- a/guests/playbooks/build/jobs/defaults.yml
> > +++ b/guests/playbooks/build/jobs/defaults.yml
> > @@ -10,6 +10,7 @@ all_machines:
> >    - libvirt-freebsd-11
> >    - libvirt-freebsd-12
> >    - libvirt-freebsd-current
> > +  - libvirt-opensuse-15
> >    - libvirt-ubuntu-16
> >    - libvirt-ubuntu-18
> >  rpm_machines:
> > diff --git a/guests/playbooks/build/projects/libvirt.yml
> > b/guests/playbooks/build/projects/libvirt.yml
> > index 4b3dfdf..3e3dbba 100644
> > --- a/guests/playbooks/build/projects/libvirt.yml
> > +++ b/guests/playbooks/build/projects/libvirt.yml
> > @@ -19,6 +19,7 @@
> >        - libvirt-fedora-30
> >        - libvirt-fedora-31
> >        - libvirt-fedora-rawhide
> > +      - libvirt-opensuse-15
> >        - libvirt-ubuntu-16
> >        - libvirt-ubuntu-18
> >  - include: '{{ playbook_base }}/jobs/autotools-check-job.yml'
>
> These changes are only necessary to make 'lcitool build' work, and
> should go in a separate commit.
>
> > diff --git a/guests/playbooks/update/tasks/paths.yml
> > b/guests/playbooks/update/tasks/paths.yml
> > index 770680e..c258ad2 100644
> > --- a/guests/playbooks/update/tasks/paths.yml
> > +++ b/guests/playbooks/update/tasks/paths.yml
> > @@ -17,7 +17,7 @@
> >      - su
> >
> >  - name: 'Look for files'
> > -  shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null'
> > +  shell: 'find /usr/local/etc -name {{ item }} 2>/dev/null || find
> > /etc -name {{ item }} 2>/dev/null'
> >    register: find
> >    with_items:
> >      - sudoers
> > diff --git a/guests/playbooks/update/tasks/users.yml
> > b/guests/playbooks/update/tasks/users.yml
> > index 0470686..bf149da 100644
> > --- a/guests/playbooks/update/tasks/users.yml
> > +++ b/guests/playbooks/update/tasks/users.yml
> > @@ -18,12 +18,18 @@
> >      line: 'PermitRootLogin without-password'
> >      state: present
> >
> > +- name: '{{ flavor }}: Ensure group exists'
> > +  group:
> > +    name: '{{ flavor }}'
> > +    state: present
> > +
> >  - name: '{{ flavor }}: Create user account'
> >    user:
> >      name: '{{ flavor }}'
> >      comment: '{{ flavor }}'
> >      password: '*'
> >      shell: '{{ bash }}'
> > +    group: '{{ flavor }}'
> >
> >  - name: '{{ flavor }}: Set password'
> >    user:
> > ```
> >
> > I know Andrea suggested to change the way we deal with finding sudoers
> > but, IMHO, it shouldn't be a blocker for your patches. However, I'm
> > *not* the maintainer of the project. :-)
>
> I've posted these separately in
>
>   https://www.redhat.com/archives/libvir-list/2019-December/msg00065.html
>
> and Fabiano already reviewed them! So consider them merged :)
>
> > So, with those changes, Leap works and we can build libvirt.
> >
> > What I'd suggest:
> > - Submit a patch just adding Leap (and then you'll have to have an
> > agreement with Andrea about whether we'll support 15 or 15.x);
> > - After that, let's try to figure out the issue with Tumbleweed and,
> > only then, try to have it merged;
> >
> > Does that make sense? Andrea, Jim, are we on the same page here?
>
> Yeah, we should get Leap 15.1 working first, and only then worry
> about Tumbleweed.
>
>
> Speaking of which: I've run into a fairly major problem with
> the Leap 15.1 support enabled by this patch: while unattended
> installation works as expected on my laptop (Fedora 31), when I try
> the same steps on the CentOS CI production environment (CentOS 7.5)
> it doesn't seem to find or recognize the autoinst.xml file: instead,
> I get a "please make sure your installation medium is available"
> message and the chance to input the information manually, which is
> obviously not what we want :) I'll try to figure out what's going
> wrong tomorrow.
>
>
> [1] guests/playbooks/update/tasks/packages.yml
> --
> Andrea Bolognani / Red Hat / Virtualization
>


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
> > > > 'lci update ... libvirt' fails in task "Configure hostname":
> > > >
> > > > fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
> > >
> > > It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726
> >
> > Is it possible that this failed simply because the hostname command
> > is not available? You mention this below.
>
> No. When testing this patch I was already installing "hostname" in the box.
>

I've opened a PR for ansible with a fix for this issue:
https://github.com/ansible/ansible/pull/65457

With this one fixed and backported to the host OS libvirt-jenkins-ci
uses we will be able to also add tumbleweed.


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Andrea Bolognani 4 years, 4 months ago
On Tue, 2019-12-03 at 13:54 +0100, Fabiano Fidêncio wrote:
> > > > > 'lci update ... libvirt' fails in task "Configure hostname":
> > > > > 
> > > > > fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
> > > > 
> > > > It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726
> 
> I've opened a PR for ansible with a fix for this issue:
> https://github.com/ansible/ansible/pull/65457
> 
> With this one fixed and backported to the host OS libvirt-jenkins-ci
> uses we will be able to also add tumbleweed.

Backporting the fix locally on the production host would be a bit
gross, but luckily we don't really need to worry about that since
we're not going to run openSUSE Tumbleweed there - just like we
don't have Debian sid or FreeBSD -CURRENT :)

Either way, great job!

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
Andrea,

>
> Speaking of which: I've run into a fairly major problem with
> the Leap 15.1 support enabled by this patch: while unattended
> installation works as expected on my laptop (Fedora 31), when I try
> the same steps on the CentOS CI production environment (CentOS 7.5)
> it doesn't seem to find or recognize the autoinst.xml file: instead,
> I get a "please make sure your installation medium is available"
> message and the chance to input the information manually, which is
> obviously not what we want :) I'll try to figure out what's going
> wrong tomorrow.

So, the error you're facing is not because the autoinst.xml file is
not recognised. It happens because the installation source is not
passed.

virt-install 1.5.0, which is the version present on CentOS 7.5,
doesn't seem to know the proper kernel URL argument to be passed to
different distros. So far it worked because it uses "method=URL",
which is what both CentOS 7 / Fedora (the ones we care about) use and
Ubuntu / Debian are special with regard to this.

OpenSUSE, though, requires "install=URL" to be passed. As it doesn't
happen, the installation asks for a specific installation source.

Okay, the way to go, IMHO, is patching lcitool to:
- Have a kernel-url-argument as part of the distro definition;
- Mount the extra-args based on that;

Mind that "method=" will always be appended but as long as we provide
the "install=" to the kernel command line, we're fine.

I'll cook some patches in the afternoon and post them.

An important question ... can't we have / use a CentOS 8 machine?
Would be lovely to not have to work those issues around on lcitool.

Best Regards,
-- 
Fabiano Fidêncio

>
>
> [1] guests/playbooks/update/tasks/packages.yml
> --
> Andrea Bolognani / Red Hat / Virtualization
>


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Andrea Bolognani 4 years, 4 months ago
On Tue, 2019-12-03 at 11:05 +0100, Fabiano Fidêncio wrote:
> > Speaking of which: I've run into a fairly major problem with
> > the Leap 15.1 support enabled by this patch: while unattended
> > installation works as expected on my laptop (Fedora 31), when I try
> > the same steps on the CentOS CI production environment (CentOS 7.5)
> > it doesn't seem to find or recognize the autoinst.xml file: instead,
> > I get a "please make sure your installation medium is available"
> > message and the chance to input the information manually, which is
> > obviously not what we want :) I'll try to figure out what's going
> > wrong tomorrow.
> 
> So, the error you're facing is not because the autoinst.xml file is
> not recognised. It happens because the installation source is not
> passed.
> 
> virt-install 1.5.0, which is the version present on CentOS 7.5,
> doesn't seem to know the proper kernel URL argument to be passed to
> different distros. So far it worked because it uses "method=URL",
> which is what both CentOS 7 / Fedora (the ones we care about) use and
> Ubuntu / Debian are special with regard to this.
> 
> OpenSUSE, though, requires "install=URL" to be passed. As it doesn't
> happen, the installation asks for a specific installation source.

So that was the problem! Great detective work :)

> Okay, the way to go, IMHO, is patching lcitool to:
> - Have a kernel-url-argument as part of the distro definition;
> - Mount the extra-args based on that;
> 
> Mind that "method=" will always be appended but as long as we provide
> the "install=" to the kernel command line, we're fine.

It sounds like we can just provide install= unconditionally, same as
we currently do with ks=? We'd have to verify doing so doesn't cause
any unintended side-effects for existing guest types.

(Incidentally, didn't CentOS 8 also require passing the installation
URL explicitly based on your tests, or something like that? We need
to get around to adding that OS to CI too at some point O:-)

> I'll cook some patches in the afternoon and post them.
> 
> An important question ... can't we have / use a CentOS 8 machine?
> Would be lovely to not have to work those issues around on lcitool.

I'd love that as well, but I'm afraid that's out of our hands since
the CentOS CI machines are handled by the CentOS CI folks... We could
try asking nicely and see what happens :) But in the short term
having a workaround in lcitool is definitely the way to go.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
Andrea,

> It sounds like we can just provide install= unconditionally, same as
> we currently do with ks=? We'd have to verify doing so doesn't cause
> any unintended side-effects for existing guest types.

I'd rather have it done in a more explicit way, just for the sake of
someone else trying to debug / understand the code later on.

>
> (Incidentally, didn't CentOS 8 also require passing the installation
> URL explicitly based on your tests, or something like that?

That's a different issue. :-)
CentOS 8 explicitly requires the URL to be set in the kickstart file.
That's another issue, to be solved another day ...

> We need
> to get around to adding that OS to CI too at some point O:-)

... most likely when we add CentOS 8 VMs. :-)

> >
> > An important question ... can't we have / use a CentOS 8 machine?
> > Would be lovely to not have to work those issues around on lcitool.
>
> I'd love that as well, but I'm afraid that's out of our hands since
> the CentOS CI machines are handled by the CentOS CI folks... We could
> try asking nicely and see what happens :) But in the short term
> having a workaround in lcitool is definitely the way to go.

I see.


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Andrea Bolognani 4 years, 4 months ago
On Tue, 2019-12-03 at 11:50 +0100, Fabiano Fidêncio wrote:
> > It sounds like we can just provide install= unconditionally, same as
> > we currently do with ks=? We'd have to verify doing so doesn't cause
> > any unintended side-effects for existing guest types.
> 
> I'd rather have it done in a more explicit way, just for the sake of
> someone else trying to debug / understand the code later on.

A comment in the code will do just fine, in my opinion. And then,
when we can start relying on a new enough virt-install, we can drop
the workaround with minimal fuss.

Our unconditional use of ks= could also benefit from being explained
in a comment, by the way. I'll post a patch for that shortly.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Andrea Bolognani 4 years, 4 months ago
On Mon, 2019-12-02 at 20:33 +0100, Andrea Bolognani wrote:
> > On Tue, Nov 26, 2019 at 1:52 AM Jim Fehlig <jfehlig@suse.com> wrote:
> > > +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> > > @@ -0,0 +1,22 @@
> > > +---
> > > +projects:
> > > +  - libosinfo
> > > +  - libvirt
> > > +  - libvirt-cim
> > > +  - libvirt-dbus
> > > +  - libvirt-glib
> > > +  - libvirt-perl
> > > +  - libvirt-python
> > > +  - libvirt-sandbox
> > > +  - libvirt-tck
> > > +  - osinfo-db
> > > +  - osinfo-db-tools
> > > +  - virt-manager
> > > +  - virt-viewer
> 
> Since right now we're only aiming at building libvirt, we should only
> list that project: it's a good starting point, and we can add more as
> we make sure we can actually 'lcitool build' them successfully.

I didn't mention this explicitly, but part of "focusing on libvirt
only as a first stab" means only adding the mappings necessary to
resolve the abstract package names listed in

  guests/vars/projects/base.yml
  guests/vars/projects/blacklist.yml
  guests/vars/projects/libvirt.yml

All other mappings should go in at the same time as additional
projects are enabled.

I think that we're basically good: once Fabiano has posted his
patches addressing CentOS 7.3 compatibility, you can respin on top
of them while addressing review comments, and unless we happen to
notice something that was missed until now we should be able to
finally merge openSUSE support :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC V2] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 4 months ago
On Mon, Dec 2, 2019 at 4:41 PM Fabiano Fidêncio <fidencio@redhat.com> wrote:
>
> Jim,
>
> Firstly, sorry it took so long for me to give it a try in your patch.
>
> Now, comments inline ...
>
> On Tue, Nov 26, 2019 at 1:52 AM Jim Fehlig <jfehlig@suse.com> wrote:
> >
> > This change adds support for the latest openSUSE Leap and
> > openSUSE Tumbleweed guests.
> >
> > Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> > ---
> >
> > This version of the patch overcomes the 'lci build' issues noted in V1
> > and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
> > opinion of only supporting the latest Leap since there is only a six
> > month support overlap between versions. Version x-1 is only supported
> > six months after x is released.
>
> I will leave this up to you and Andrea. I'd say, whatever floats your boat. :-)
>
> >
> > 'lci update ... libvirt' fails in task "Configure hostname":
> >
> > fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
>
> It seems to be an Ansible bug: https://github.com/ansible/ansible/issues/42726
>
> >
> > Not sure why that is the case. But more importantly, even though it
> > doesn't fail, the "Update installed packages" task doesn't install any
> > of the packages required to build libvirt. I suppose that agrees with
> > guests/REAMDME, but how then are the packages required to build $project
> > installed? How/when is the list of packages required to build $project
> > conveyed to $package_manager?
> >
> > 'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
> > "Gathering Facts" task:
> >
> > fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}
>
> I didn't get this far, I'd firstly try to get the first part fixed as
> this whole thing is sequential ...
>
> >
> > Passing --debug to the command didn't help with determining what needed
> > the password. ssh? I can't find where the "Gathering Facts" task is
> > defined. The $root_password_file passed to /usr/bin/ansible-playbook
> > contains the correct password for the root user. /me needs to figure
> > out how to better debug this stuff :-).
> >
> >  guests/configs/autoinst.xml                   | 75 +++++++++++++++++++
> >  .../host_vars/libvirt-opensuse-15/docker.yml  |  2 +
> >  .../host_vars/libvirt-opensuse-15/install.yml |  2 +
> >  guests/host_vars/libvirt-opensuse-15/main.yml | 22 ++++++
> >  .../libvirt-opensuse-tumbleweed/docker.yml    |  2 +
> >  .../libvirt-opensuse-tumbleweed/install.yml   |  2 +
> >  .../libvirt-opensuse-tumbleweed/main.yml      | 22 ++++++
> >  guests/inventory                              |  2 +
> >  guests/lcitool                                |  2 +
> >  guests/playbooks/update/tasks/base.yml        | 15 ++++
> >  guests/vars/mappings.yml                      | 41 +++++++++-
> >  11 files changed, 185 insertions(+), 2 deletions(-)
> >
> > diff --git a/guests/configs/autoinst.xml b/guests/configs/autoinst.xml
> > new file mode 100644
> > index 0000000..42c42f8
> > --- /dev/null
> > +++ b/guests/configs/autoinst.xml
> > @@ -0,0 +1,75 @@
> > +<?xml version="1.0"?>
> > +<!DOCTYPE profile>
> > +<profile
> > +  xmlns="http://www.suse.com/1.0/yast2ns"
> > +  xmlns:config="http://www.suse.com/1.0/configns">
> > +  <general>
> > +    <mode>
> > +      <confirm config:type="boolean">false</confirm>
>
> Here, please, also add:
> <second_stage config:type="boolean">false</second_stage>
>
> It'll avoid an unnecessary reboot in the VM.
>
> > +    </mode>
> > +  </general>
> > +  <partitioning config:type="list">
> > +    <drive>
> > +      <device>/dev/vda</device>
> > +      <use>all</use>
> > +      <partitions config:type="list">
> > +        <partition>
> > +          <filesystem config:type="symbol">swap</filesystem>
> > +          <size>256M</size>
> > +          <mount>swap</mount>
> > +        </partition>
> > +        <partition>
> > +          <filesystem config:type="symbol">ext4</filesystem>
> > +          <mount>/</mount>
> > +          <size>max</size>
> > +        </partition>
> > +      </partitions>
> > +    </drive>
> > +  </partitioning>
> > +  <bootloader>
> > +    <global>
> > +      <terminal>console serial</terminal>
> > +    </global>
> > +  </bootloader>
> > +  <timezone>
> > +    <hwclock>UTC</hwclock>
> > +    <timezone>UTC</timezone>
> > +  </timezone>
> > +  <software>
> > +    <install_recommended config:type="boolean">false</install_recommended>
> > +    <products config:type="list">
> > +      <product>openSUSE</product>
> > +    </products>
> > +    <patterns config:type="list">
> > +      <pattern>base</pattern>
> > +      <pattern>minimal_base</pattern>
> > +      <pattern>yast2_basis</pattern>
> > +    </patterns>
> > +    <packages config:type="list">
>
> Here, please, also add:
> <package>hostname</package>
>
> Seems that lcitools rely on having hostname installed in the machine
> and "hostname" is used before actually installing the packages. Or,
> IOW, trying to install the package afterwards wouldn't work. (I gave
> it a try).
>
> > +      <package>openssh</package>
> > +    </packages>
> > +  </software>
> > +  <networking>
> > +    <keep_install_network config:type="boolean">true</keep_install_network>
> > +  </networking>
> > +  <users config:type="list">
> > +    <user>
> > +      <username>root</username>
> > +      <user_password>root</user_password>
> > +      <encrypted config:type="boolean">false</encrypted>
> > +      <uid>0</uid>
> > +      <gid>0</gid>
> > +      <home>/root</home>
> > +      <shell>/bin/bash</shell>
> > +    </user>
> > +  </users>
> > +  <services-manager>
> > +    <default_target>multi-user</default_target>
> > +    <services config:type="list">
> > +      <service>
> > +        <service_name>sshd</service_name>
> > +        <service_status>enable</service_status>
> > +      </service>
> > +    </services>
> > +  </services-manager>
> > +</profile>
> > diff --git a/guests/host_vars/libvirt-opensuse-15/docker.yml b/guests/host_vars/libvirt-opensuse-15/docker.yml
> > new file mode 100644
> > index 0000000..8f32d06
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
> > @@ -0,0 +1,2 @@
> > +---
> > +docker_base: opensuse/leap:15
> > diff --git a/guests/host_vars/libvirt-opensuse-15/install.yml b/guests/host_vars/libvirt-opensuse-15/install.yml
> > new file mode 100644
> > index 0000000..d0fdbe5
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-15/install.yml
> > @@ -0,0 +1,2 @@
> > +---
> > +install_url: http://download.opensuse.org/distribution/leap/15.1/repo/oss/
> > diff --git a/guests/host_vars/libvirt-opensuse-15/main.yml b/guests/host_vars/libvirt-opensuse-15/main.yml
> > new file mode 100644
> > index 0000000..abd83c5
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> > @@ -0,0 +1,22 @@
> > +---
> > +projects:
> > +  - libosinfo
> > +  - libvirt
> > +  - libvirt-cim
> > +  - libvirt-dbus
> > +  - libvirt-glib
> > +  - libvirt-perl
> > +  - libvirt-python
> > +  - libvirt-sandbox
> > +  - libvirt-tck
> > +  - osinfo-db
> > +  - osinfo-db-tools
> > +  - virt-manager
> > +  - virt-viewer
> > +
> > +package_format: 'rpm'
> > +package_manager: 'zypper'
> > +os_name: 'OpenSUSE'
> > +os_version: '15'
> > +
> > +ansible_python_interpreter: /usr/bin/python3
> > diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> > new file mode 100644
> > index 0000000..cc79a22
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> > @@ -0,0 +1,2 @@
> > +---
> > +docker_base: opensuse/tumbleweed
> > diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> > new file mode 100644
> > index 0000000..36cea68
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> > @@ -0,0 +1,2 @@
> > +---
> > +install_url: http://download.opensuse.org/tumbleweed/repo/oss/
> > diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> > new file mode 100644
> > index 0000000..828df81
> > --- /dev/null
> > +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> > @@ -0,0 +1,22 @@
> > +---
> > +projects:
> > +  - libosinfo
> > +  - libvirt
> > +  - libvirt-cim
> > +  - libvirt-dbus
> > +  - libvirt-glib
> > +  - libvirt-perl
> > +  - libvirt-python
> > +  - libvirt-sandbox
> > +  - libvirt-tck
> > +  - osinfo-db
> > +  - osinfo-db-tools
> > +  - virt-manager
> > +  - virt-viewer
> > +
> > +package_format: 'rpm'
> > +package_manager: 'zypper'
> > +os_name: 'OpenSUSE'
> > +os_version: 'Tumbleweed'
> > +
> > +ansible_python_interpreter: /usr/bin/python3
> > diff --git a/guests/inventory b/guests/inventory
> > index 3b15513..71d3c91 100644
> > --- a/guests/inventory
> > +++ b/guests/inventory
> > @@ -8,5 +8,7 @@ libvirt-fedora-rawhide
> >  libvirt-freebsd-11
> >  libvirt-freebsd-12
> >  libvirt-freebsd-current
> > +libvirt-opensuse-15
> > +libvirt-opensuse-tumbleweed
> >  libvirt-ubuntu-16
> >  libvirt-ubuntu-18
> > diff --git a/guests/lcitool b/guests/lcitool
> > index a630971..7f26731 100755
> > --- a/guests/lcitool
> > +++ b/guests/lcitool
> > @@ -531,6 +531,8 @@ class Application:
> >                  install_config = "preseed.cfg"
> >              elif facts["os_name"] in ["CentOS", "Fedora"]:
> >                  install_config = "kickstart.cfg"
> > +            elif facts["os_name"] == "OpenSUSE":
> > +                install_config = "autoinst.xml"
> >              else:
> >                  raise Exception(
> >                      "Host {} doesn't support installation".format(host)
> > diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
> > index 3d83e78..b6a2cd2 100644
> > --- a/guests/playbooks/update/tasks/base.yml
> > +++ b/guests/playbooks/update/tasks/base.yml
> > @@ -65,12 +65,27 @@
> >    when:
> >      - package_format == 'pkg'
> >
> > +- name: Update installed packages
> > +  command: '{{ package_manager }} update -y -l --force-resolution --no-recommends'
> > +  args:
> > +    warn: no
> > +  when:
> > +    - os_name == 'OpenSUSE'
> > +
> >  - name: Clean up packages after update
> >    shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
> >    args:
> >      warn: no
> >    when:
> >      - package_format == 'rpm'
> > +    - not os_name == "OpenSUSE"
> > +
> > +- name: Clean up packages after update
> > +  shell: '{{ package_manager }} clean'
> > +  args:
> > +    warn: no
> > +  when:
> > +    - os_name == "OpenSUSE"
> >
> >  - name: Clean up packages after update
> >    apt:
> > diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
> > index bd9b161..8359ce2 100644
> > --- a/guests/vars/mappings.yml
> > +++ b/guests/vars/mappings.yml
> > @@ -19,10 +19,10 @@
> >  #   - deb, pkg, rpm
> >  #
> >  # Valid OS names are:
> > -#   - CentOS, Debian, Fedora, FreeBSD, Ubuntu
> > +#   - CentOS, Debian, Fedora, FreeBSD, OpenSUSE, Ubuntu
> >  #
> >  # Valid OS versions are:
> > -#   - CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on
> > +#   - CentOS7, Debian9, FedoraRawhide, OpenSUSE15, Ubuntu18 and so on
> >  #
> >  # The arch specific rules use a prefix "$ARCH-" where  $ARCH
> >  # is a libvirt arch name.
> > @@ -70,6 +70,7 @@ mappings:
> >
> >    apparmor:
> >      deb: libapparmor-dev
> > +    OpenSUSE: libapparmor-devel
> >      cross-policy-deb: foreign
> >
> >    augeas:
> > @@ -117,6 +118,7 @@ mappings:
> >    cppi:
> >      Fedora: cppi
> >      FreeBSD: cppi
> > +    OpenSUSE: cppi
> >
> >    cyrus-sasl:
> >      deb: libsasl2-dev
> > @@ -127,6 +129,7 @@ mappings:
> >    dbus-daemon:
> >      default: dbus
> >      Fedora: dbus-daemon
> > +    OpenSUSE: dbus-1
> >
> >    device-mapper:
> >      deb: libdevmapper-dev
> > @@ -196,6 +199,7 @@ mappings:
> >      deb: libglusterfs-dev
> >      rpm: glusterfs-api-devel
> >      Debian9: glusterfs-common
> > +    OpenSUSE: glusterfs-devel
> >      Ubuntu16: glusterfs-common
> >      Ubuntu18: glusterfs-common
> >      cross-policy-deb: foreign
> > @@ -204,6 +208,7 @@ mappings:
> >      deb: libgnutls28-dev
> >      pkg: gnutls
> >      rpm: gnutls-devel
> > +    OpenSUSE: libgnutls-devel
> >      cross-policy-deb: foreign
> >
> >    go:
> > @@ -228,6 +233,7 @@ mappings:
> >
> >    gtk-update-icon-cache:
> >      default: gtk-update-icon-cache
> > +    OpenSUSE: gtk3-tools
> >      Ubuntu16: libgtk2.0-bin
> >
> >    gtk-vnc2:
> > @@ -248,14 +254,17 @@ mappings:
> >    ip:
> >      deb: iproute2
> >      rpm: iproute
> > +    OpenSUSE: iproute2
> >
> >    iscsiadm:
> >      deb: open-iscsi
> >      rpm: iscsi-initiator-utils
> > +    OpenSUSE: open-iscsi
> >
> >    isoinfo:
> >      default: genisoimage
> >      FreeBSD: cdrkit
> > +    OpenSUSE: mkisofs
> >
> >    java:
> >      deb: openjdk-11-jre-headless
> > @@ -289,6 +298,7 @@ mappings:
> >    libaudit:
> >      deb: libaudit-dev
> >      rpm: audit-libs-devel
> > +    OpenSUSE: audit-devel
> >      cross-policy-deb: foreign
> >
> >    libblkid:
> > @@ -320,6 +330,7 @@ mappings:
> >      deb: libdbus-1-dev
> >      pkg: dbus
> >      rpm: dbus-devel
> > +    OpenSUSE: dbus-1-devel
> >      cross-policy-deb: foreign
> >
> >    libgovirt:
> > @@ -347,6 +358,7 @@ mappings:
> >      rpm: numactl-devel
> >      armv6l-deb:
> >      armv7l-deb:
> > +    OpenSUSE: libnuma-devel
> >      cross-policy-deb: foreign
> >
> >    libparted:
> > @@ -370,6 +382,7 @@ mappings:
> >      deb: librbd-dev
> >      Fedora: librbd-devel
> >      CentOS7: librbd1-devel
> > +    OpenSUSE: librbd-devel
> >      cross-policy-deb: foreign
> >
> >    libselinux:
> > @@ -436,6 +449,7 @@ mappings:
> >      deb: locales
> >      Fedora: glibc-langpack-en
> >      FreeBSD:
> > +    OpenSUSE: glibc-locale
> >
> >    lsof:
> >      default: lsof
> > @@ -458,6 +472,7 @@ mappings:
> >    ninja:
> >     default: ninja-build
> >     FreeBSD: ninja
> > +   OpenSUSE: ninja
> >
> >    mingw32-curl:
> >      Fedora: mingw32-curl
> > @@ -639,6 +654,7 @@ mappings:
> >    netcf:
> >      deb: libnetcf-dev
> >      rpm: netcf-devel
> > +    OpenSUSE:
> >      cross-policy-deb: skip
> >
> >    net-tools:
> > @@ -678,6 +694,7 @@ mappings:
> >      deb: perl
> >      pkg: perl5
> >      rpm: perl-Archive-Tar
> > +    OpenSUSE: perl-Archive-Tar-Wrapper
> >
> >    perl-CPAN-Changes:
> >      deb: libcpan-changes-perl
> > @@ -709,6 +726,7 @@ mappings:
> >      deb: libio-compress-perl
> >      pkg: p5-IO-Compress
> >      rpm: perl-IO-Compress-Bzip2
> > +    OpenSUSE: perl-Compress-Bzip2
> >
> >    perl-IO-String:
> >      deb: libio-string-perl
> > @@ -747,6 +765,7 @@ mappings:
> >      deb: libtest-lwp-useragent-perl
> >      pkg: p5-Test-LWP-UserAgent
> >      Fedora: perl-Test-LWP-UserAgent
> > +    OpenSUSE: perl-Test-LWP-UserAgent
> >
> >    perl-Test-Pod:
> >      deb: libtest-pod-perl
> > @@ -809,20 +828,24 @@ mappings:
> >      deb: python-dev
> >      pkg: python2
> >      rpm: python2-devel
> > +    OpenSUSE: python-devel
> >      cross-policy-deb: foreign
> >
> >    python2-lxml:
> >      default: python-lxml
> >      Fedora: python2-lxml
> >      FreeBSD: py27-lxml
> > +    OpenSUSE: python2-lxml
> >
> >    python2-nose:
> >      default: python-nose
> >      Fedora: python2-nose
> >      FreeBSD: py27-nose
> > +    OpenSUSE: python2-nose
> >
> >    python2-setuptools:
> >      CentOS7: python2-setuptools
> > +    OpenSUSE: python2-setuptools
> >
> >    python3:
> >      default: python3
> > @@ -831,6 +854,7 @@ mappings:
> >      default: python3-dbus
> >      FreeBSD: py36-dbus
> >      CentOS7: python36-dbus
> > +    OpenSUSE: python3-dbus-python
> >
> >    python3-devel:
> >      deb: python3-dev
> > @@ -838,17 +862,20 @@ mappings:
> >      Fedora: python3-devel
> >      CentOS7: python36-devel
> >      cross-policy-deb: foreign
> > +    OpenSUSE: python3-devel
> >
> >    python3-gi:
> >      deb: python3-gi
> >      pkg: py36-gobject3
> >      rpm: python3-gobject
> >      CentOS7: python36-gobject
> > +    OpenSUSE: python3-gobject
> >
> >    python3-libxml2:
> >      default: python3-libxml2
> >      FreeBSD: py36-libxml2
> >      CentOS7:
> > +    OpenSUSE: python3-libxml2-python
> >      Ubuntu16:
> >
> >    python3-lxml:
> > @@ -864,6 +891,7 @@ mappings:
> >    python3-pip:
> >      CentOS7: python3-pip
> >      Debian9: python3-pip
> > +    OpenSUSE: python3-pip
> >      Ubuntu16: python3-pip
> >      Ubuntu18: python3-pip
> >
> > @@ -884,6 +912,7 @@ mappings:
> >    qemu-img:
> >      default: qemu-utils
> >      rpm: qemu-img
> > +    OpenSUSE: qemu-tools
> >
> >    radvd:
> >      default: radvd
> > @@ -929,6 +958,7 @@ mappings:
> >      deb: libspice-client-gtk-3.0-dev
> >      pkg: spice-gtk
> >      rpm: spice-gtk3-devel
> > +    OpenSUSE: spice-gtk-devel
> >      cross-policy-deb: foreign
> >
> >    strace:
> > @@ -942,6 +972,7 @@ mappings:
> >      deb: iproute2
> >      rpm: iproute-tc
> >      CentOS7: iproute
> > +    OpenSUSE: iproute2
> >
> >    unzip:
> >      default: unzip
> > @@ -964,10 +995,12 @@ mappings:
> >    wireshark:
> >      deb: wireshark-dev
> >      Fedora: wireshark-devel
> > +    OpenSUSE: wireshark-devel
> >      cross-policy-deb: skip
> >
> >    xen:
> >      Fedora: xen-devel
> > +    OpenSUSE: xen-devel
> >      x86_64-deb: libxen-dev
> >      armv7l-deb: libxen-dev
> >      aarch64-deb: libxen-dev
> > @@ -994,18 +1027,21 @@ mappings:
> >    xz-static:
> >      deb: liblzma-dev
> >      Fedora: xz-static
> > +    OpenSUSE: xz-static-devel
> >      cross-policy-deb: foreign
> >
> >    yajl:
> >      deb: libyajl-dev
> >      pkg: yajl
> >      rpm: yajl-devel
> > +    OpenSUSE: libyajl-devel
> >      cross-policy-deb: foreign
> >
> >    zfs:
> >      default: zfs-fuse
> >      CentOS:
> >      FreeBSD:
> > +    OpenSUSE:
> >
> >    zlib:
> >      deb: zlib1g-dev
> > @@ -1015,6 +1051,7 @@ mappings:
> >    zlib-static:
> >      deb: zlib1g-dev
> >      rpm: zlib-static
> > +    OpenSUSE: zlib-devel-static
> >      cross-policy-deb: foreign
> >
> >
> > --
> > 2.24.0
> >
> >
> > --
> > libvir-list mailing list
> > libvir-list@redhat.com
> > https://www.redhat.com/mailman/listinfo/libvir-list
> >
>
> Apart from the comments inline, I had to add the following patch in
> order to get Leap working:
>
> ```
> diff --git a/guests/playbooks/build/jobs/defaults.yml
> b/guests/playbooks/build/jobs/defaults.yml
> index 48cf643..eb4dfd5 100644
> --- a/guests/playbooks/build/jobs/defaults.yml
> +++ b/guests/playbooks/build/jobs/defaults.yml
> @@ -10,6 +10,7 @@ all_machines:
>    - libvirt-freebsd-11
>    - libvirt-freebsd-12
>    - libvirt-freebsd-current
> +  - libvirt-opensuse-15
>    - libvirt-ubuntu-16
>    - libvirt-ubuntu-18
>  rpm_machines:
> diff --git a/guests/playbooks/build/projects/libvirt.yml
> b/guests/playbooks/build/projects/libvirt.yml
> index 4b3dfdf..3e3dbba 100644
> --- a/guests/playbooks/build/projects/libvirt.yml
> +++ b/guests/playbooks/build/projects/libvirt.yml
> @@ -19,6 +19,7 @@
>        - libvirt-fedora-30
>        - libvirt-fedora-31
>        - libvirt-fedora-rawhide
> +      - libvirt-opensuse-15
>        - libvirt-ubuntu-16
>        - libvirt-ubuntu-18
>  - include: '{{ playbook_base }}/jobs/autotools-check-job.yml'
> diff --git a/guests/playbooks/update/tasks/paths.yml
> b/guests/playbooks/update/tasks/paths.yml
> index 770680e..c258ad2 100644
> --- a/guests/playbooks/update/tasks/paths.yml
> +++ b/guests/playbooks/update/tasks/paths.yml
> @@ -17,7 +17,7 @@
>      - su
>
>  - name: 'Look for files'
> -  shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null'
> +  shell: 'find /usr/local/etc -name {{ item }} 2>/dev/null || find
> /etc -name {{ item }} 2>/dev/null'
>    register: find
>    with_items:
>      - sudoers
> diff --git a/guests/playbooks/update/tasks/users.yml
> b/guests/playbooks/update/tasks/users.yml
> index 0470686..bf149da 100644
> --- a/guests/playbooks/update/tasks/users.yml
> +++ b/guests/playbooks/update/tasks/users.yml
> @@ -18,12 +18,18 @@
>      line: 'PermitRootLogin without-password'
>      state: present
>
> +- name: '{{ flavor }}: Ensure group exists'
> +  group:
> +    name: '{{ flavor }}'
> +    state: present
> +
>  - name: '{{ flavor }}: Create user account'
>    user:
>      name: '{{ flavor }}'
>      comment: '{{ flavor }}'
>      password: '*'
>      shell: '{{ bash }}'
> +    group: '{{ flavor }}'
>
>  - name: '{{ flavor }}: Set password'
>    user:
> ```
>
> I know Andrea suggested to change the way we deal with finding sudoers
> but, IMHO, it shouldn't be a blocker for your patches. However, I'm
> *not* the maintainer of the project. :-)
>
> So, with those changes, Leap works and we can build libvirt.
>
> What I'd suggest:
> - Submit a patch just adding Leap (and then you'll have to have an
> agreement with Andrea about whether we'll support 15 or 15.x);
> - After that, let's try to figure out the issue with Tumbleweed and,
> only then, try to have it merged;
>
> Does that make sense? Andrea, Jim, are we on the same page here?

BTW, I'm aware that Andrea will also review this patch soon. So,
please, do not respin the series before he also adds his comments.

>
> Best Regards,
> --
> Fabiano Fidêncio


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC V2 jenkins-ci] guests: Add support for openSUSE
Posted by Jim Fehlig 4 years, 5 months ago
Grrr, I keep forgetting something within '--subject-prefix=' when sending these 
patches...

On 11/25/19 5:50 PM, Jim Fehlig wrote:
> This change adds support for the latest openSUSE Leap and
> openSUSE Tumbleweed guests.
> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
> 
> This version of the patch overcomes the 'lci build' issues noted in V1
> and works well for openSUSE Leap 15.1 and Tumbleweed. I'm still of the
> opinion of only supporting the latest Leap since there is only a six
> month support overlap between versions. Version x-1 is only supported
> six months after x is released.
> 
> 'lci update ... libvirt' fails in task "Configure hostname":
> 
> fatal: [libvirt-opensuse-tumbleweed]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Opensuse-tumbleweed)"}
> 
> Not sure why that is the case. But more importantly, even though it
> doesn't fail, the "Update installed packages" task doesn't install any
> of the packages required to build libvirt. I suppose that agrees with
> guests/REAMDME, but how then are the packages required to build $project
> installed? How/when is the list of packages required to build $project
> conveyed to $package_manager?
> 
> 'lcitool build libvirt-opensuse-tumbleweed libvirt' fails in the
> "Gathering Facts" task:
> 
> fatal: [libvirt-opensuse-tumbleweed]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: ", "unreachable": true}
> 
> Passing --debug to the command didn't help with determining what needed
> the password. ssh? I can't find where the "Gathering Facts" task is
> defined. The $root_password_file passed to /usr/bin/ansible-playbook
> contains the correct password for the root user. /me needs to figure
> out how to better debug this stuff :-).
> 
>   guests/configs/autoinst.xml                   | 75 +++++++++++++++++++
>   .../host_vars/libvirt-opensuse-15/docker.yml  |  2 +
>   .../host_vars/libvirt-opensuse-15/install.yml |  2 +
>   guests/host_vars/libvirt-opensuse-15/main.yml | 22 ++++++
>   .../libvirt-opensuse-tumbleweed/docker.yml    |  2 +
>   .../libvirt-opensuse-tumbleweed/install.yml   |  2 +
>   .../libvirt-opensuse-tumbleweed/main.yml      | 22 ++++++
>   guests/inventory                              |  2 +
>   guests/lcitool                                |  2 +
>   guests/playbooks/update/tasks/base.yml        | 15 ++++
>   guests/vars/mappings.yml                      | 41 +++++++++-
>   11 files changed, 185 insertions(+), 2 deletions(-)
> 
> diff --git a/guests/configs/autoinst.xml b/guests/configs/autoinst.xml
> new file mode 100644
> index 0000000..42c42f8
> --- /dev/null
> +++ b/guests/configs/autoinst.xml
> @@ -0,0 +1,75 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE profile>
> +<profile
> +  xmlns="http://www.suse.com/1.0/yast2ns"
> +  xmlns:config="http://www.suse.com/1.0/configns">
> +  <general>
> +    <mode>
> +      <confirm config:type="boolean">false</confirm>
> +    </mode>
> +  </general>
> +  <partitioning config:type="list">
> +    <drive>
> +      <device>/dev/vda</device>
> +      <use>all</use>
> +      <partitions config:type="list">
> +        <partition>
> +          <filesystem config:type="symbol">swap</filesystem>
> +          <size>256M</size>
> +          <mount>swap</mount>
> +        </partition>
> +        <partition>
> +          <filesystem config:type="symbol">ext4</filesystem>
> +          <mount>/</mount>
> +          <size>max</size>
> +        </partition>
> +      </partitions>
> +    </drive>
> +  </partitioning>
> +  <bootloader>
> +    <global>
> +      <terminal>console serial</terminal>
> +    </global>
> +  </bootloader>
> +  <timezone>
> +    <hwclock>UTC</hwclock>
> +    <timezone>UTC</timezone>
> +  </timezone>
> +  <software>
> +    <install_recommended config:type="boolean">false</install_recommended>
> +    <products config:type="list">
> +      <product>openSUSE</product>
> +    </products>
> +    <patterns config:type="list">
> +      <pattern>base</pattern>
> +      <pattern>minimal_base</pattern>
> +      <pattern>yast2_basis</pattern>
> +    </patterns>
> +    <packages config:type="list">
> +      <package>openssh</package>
> +    </packages>
> +  </software>
> +  <networking>
> +    <keep_install_network config:type="boolean">true</keep_install_network>
> +  </networking>
> +  <users config:type="list">
> +    <user>
> +      <username>root</username>
> +      <user_password>root</user_password>
> +      <encrypted config:type="boolean">false</encrypted>
> +      <uid>0</uid>
> +      <gid>0</gid>
> +      <home>/root</home>
> +      <shell>/bin/bash</shell>
> +    </user>
> +  </users>
> +  <services-manager>
> +    <default_target>multi-user</default_target>
> +    <services config:type="list">
> +      <service>
> +        <service_name>sshd</service_name>
> +        <service_status>enable</service_status>
> +      </service>
> +    </services>
> +  </services-manager>
> +</profile>
> diff --git a/guests/host_vars/libvirt-opensuse-15/docker.yml b/guests/host_vars/libvirt-opensuse-15/docker.yml
> new file mode 100644
> index 0000000..8f32d06
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/docker.yml
> @@ -0,0 +1,2 @@
> +---
> +docker_base: opensuse/leap:15
> diff --git a/guests/host_vars/libvirt-opensuse-15/install.yml b/guests/host_vars/libvirt-opensuse-15/install.yml
> new file mode 100644
> index 0000000..d0fdbe5
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/install.yml
> @@ -0,0 +1,2 @@
> +---
> +install_url: http://download.opensuse.org/distribution/leap/15.1/repo/oss/
> diff --git a/guests/host_vars/libvirt-opensuse-15/main.yml b/guests/host_vars/libvirt-opensuse-15/main.yml
> new file mode 100644
> index 0000000..abd83c5
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-15/main.yml
> @@ -0,0 +1,22 @@
> +---
> +projects:
> +  - libosinfo
> +  - libvirt
> +  - libvirt-cim
> +  - libvirt-dbus
> +  - libvirt-glib
> +  - libvirt-perl
> +  - libvirt-python
> +  - libvirt-sandbox
> +  - libvirt-tck
> +  - osinfo-db
> +  - osinfo-db-tools
> +  - virt-manager
> +  - virt-viewer
> +
> +package_format: 'rpm'
> +package_manager: 'zypper'
> +os_name: 'OpenSUSE'
> +os_version: '15'
> +
> +ansible_python_interpreter: /usr/bin/python3
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> new file mode 100644
> index 0000000..cc79a22
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/docker.yml
> @@ -0,0 +1,2 @@
> +---
> +docker_base: opensuse/tumbleweed
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> new file mode 100644
> index 0000000..36cea68
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/install.yml
> @@ -0,0 +1,2 @@
> +---
> +install_url: http://download.opensuse.org/tumbleweed/repo/oss/
> diff --git a/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> new file mode 100644
> index 0000000..828df81
> --- /dev/null
> +++ b/guests/host_vars/libvirt-opensuse-tumbleweed/main.yml
> @@ -0,0 +1,22 @@
> +---
> +projects:
> +  - libosinfo
> +  - libvirt
> +  - libvirt-cim
> +  - libvirt-dbus
> +  - libvirt-glib
> +  - libvirt-perl
> +  - libvirt-python
> +  - libvirt-sandbox
> +  - libvirt-tck
> +  - osinfo-db
> +  - osinfo-db-tools
> +  - virt-manager
> +  - virt-viewer
> +
> +package_format: 'rpm'
> +package_manager: 'zypper'
> +os_name: 'OpenSUSE'
> +os_version: 'Tumbleweed'
> +
> +ansible_python_interpreter: /usr/bin/python3
> diff --git a/guests/inventory b/guests/inventory
> index 3b15513..71d3c91 100644
> --- a/guests/inventory
> +++ b/guests/inventory
> @@ -8,5 +8,7 @@ libvirt-fedora-rawhide
>   libvirt-freebsd-11
>   libvirt-freebsd-12
>   libvirt-freebsd-current
> +libvirt-opensuse-15
> +libvirt-opensuse-tumbleweed
>   libvirt-ubuntu-16
>   libvirt-ubuntu-18
> diff --git a/guests/lcitool b/guests/lcitool
> index a630971..7f26731 100755
> --- a/guests/lcitool
> +++ b/guests/lcitool
> @@ -531,6 +531,8 @@ class Application:
>                   install_config = "preseed.cfg"
>               elif facts["os_name"] in ["CentOS", "Fedora"]:
>                   install_config = "kickstart.cfg"
> +            elif facts["os_name"] == "OpenSUSE":
> +                install_config = "autoinst.xml"
>               else:
>                   raise Exception(
>                       "Host {} doesn't support installation".format(host)
> diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
> index 3d83e78..b6a2cd2 100644
> --- a/guests/playbooks/update/tasks/base.yml
> +++ b/guests/playbooks/update/tasks/base.yml
> @@ -65,12 +65,27 @@
>     when:
>       - package_format == 'pkg'
>   
> +- name: Update installed packages
> +  command: '{{ package_manager }} update -y -l --force-resolution --no-recommends'
> +  args:
> +    warn: no
> +  when:
> +    - os_name == 'OpenSUSE'
> +
>   - name: Clean up packages after update
>     shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
>     args:
>       warn: no
>     when:
>       - package_format == 'rpm'
> +    - not os_name == "OpenSUSE"
> +
> +- name: Clean up packages after update
> +  shell: '{{ package_manager }} clean'
> +  args:
> +    warn: no
> +  when:
> +    - os_name == "OpenSUSE"
>   
>   - name: Clean up packages after update
>     apt:
> diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
> index bd9b161..8359ce2 100644
> --- a/guests/vars/mappings.yml
> +++ b/guests/vars/mappings.yml
> @@ -19,10 +19,10 @@
>   #   - deb, pkg, rpm
>   #
>   # Valid OS names are:
> -#   - CentOS, Debian, Fedora, FreeBSD, Ubuntu
> +#   - CentOS, Debian, Fedora, FreeBSD, OpenSUSE, Ubuntu
>   #
>   # Valid OS versions are:
> -#   - CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on
> +#   - CentOS7, Debian9, FedoraRawhide, OpenSUSE15, Ubuntu18 and so on
>   #
>   # The arch specific rules use a prefix "$ARCH-" where  $ARCH
>   # is a libvirt arch name.
> @@ -70,6 +70,7 @@ mappings:
>   
>     apparmor:
>       deb: libapparmor-dev
> +    OpenSUSE: libapparmor-devel
>       cross-policy-deb: foreign
>   
>     augeas:
> @@ -117,6 +118,7 @@ mappings:
>     cppi:
>       Fedora: cppi
>       FreeBSD: cppi
> +    OpenSUSE: cppi
>   
>     cyrus-sasl:
>       deb: libsasl2-dev
> @@ -127,6 +129,7 @@ mappings:
>     dbus-daemon:
>       default: dbus
>       Fedora: dbus-daemon
> +    OpenSUSE: dbus-1
>   
>     device-mapper:
>       deb: libdevmapper-dev
> @@ -196,6 +199,7 @@ mappings:
>       deb: libglusterfs-dev
>       rpm: glusterfs-api-devel
>       Debian9: glusterfs-common
> +    OpenSUSE: glusterfs-devel
>       Ubuntu16: glusterfs-common
>       Ubuntu18: glusterfs-common
>       cross-policy-deb: foreign
> @@ -204,6 +208,7 @@ mappings:
>       deb: libgnutls28-dev
>       pkg: gnutls
>       rpm: gnutls-devel
> +    OpenSUSE: libgnutls-devel
>       cross-policy-deb: foreign
>   
>     go:
> @@ -228,6 +233,7 @@ mappings:
>   
>     gtk-update-icon-cache:
>       default: gtk-update-icon-cache
> +    OpenSUSE: gtk3-tools
>       Ubuntu16: libgtk2.0-bin
>   
>     gtk-vnc2:
> @@ -248,14 +254,17 @@ mappings:
>     ip:
>       deb: iproute2
>       rpm: iproute
> +    OpenSUSE: iproute2
>   
>     iscsiadm:
>       deb: open-iscsi
>       rpm: iscsi-initiator-utils
> +    OpenSUSE: open-iscsi
>   
>     isoinfo:
>       default: genisoimage
>       FreeBSD: cdrkit
> +    OpenSUSE: mkisofs
>   
>     java:
>       deb: openjdk-11-jre-headless
> @@ -289,6 +298,7 @@ mappings:
>     libaudit:
>       deb: libaudit-dev
>       rpm: audit-libs-devel
> +    OpenSUSE: audit-devel
>       cross-policy-deb: foreign
>   
>     libblkid:
> @@ -320,6 +330,7 @@ mappings:
>       deb: libdbus-1-dev
>       pkg: dbus
>       rpm: dbus-devel
> +    OpenSUSE: dbus-1-devel
>       cross-policy-deb: foreign
>   
>     libgovirt:
> @@ -347,6 +358,7 @@ mappings:
>       rpm: numactl-devel
>       armv6l-deb:
>       armv7l-deb:
> +    OpenSUSE: libnuma-devel
>       cross-policy-deb: foreign
>   
>     libparted:
> @@ -370,6 +382,7 @@ mappings:
>       deb: librbd-dev
>       Fedora: librbd-devel
>       CentOS7: librbd1-devel
> +    OpenSUSE: librbd-devel
>       cross-policy-deb: foreign
>   
>     libselinux:
> @@ -436,6 +449,7 @@ mappings:
>       deb: locales
>       Fedora: glibc-langpack-en
>       FreeBSD:
> +    OpenSUSE: glibc-locale
>   
>     lsof:
>       default: lsof
> @@ -458,6 +472,7 @@ mappings:
>     ninja:
>      default: ninja-build
>      FreeBSD: ninja
> +   OpenSUSE: ninja
>   
>     mingw32-curl:
>       Fedora: mingw32-curl
> @@ -639,6 +654,7 @@ mappings:
>     netcf:
>       deb: libnetcf-dev
>       rpm: netcf-devel
> +    OpenSUSE:
>       cross-policy-deb: skip
>   
>     net-tools:
> @@ -678,6 +694,7 @@ mappings:
>       deb: perl
>       pkg: perl5
>       rpm: perl-Archive-Tar
> +    OpenSUSE: perl-Archive-Tar-Wrapper
>   
>     perl-CPAN-Changes:
>       deb: libcpan-changes-perl
> @@ -709,6 +726,7 @@ mappings:
>       deb: libio-compress-perl
>       pkg: p5-IO-Compress
>       rpm: perl-IO-Compress-Bzip2
> +    OpenSUSE: perl-Compress-Bzip2
>   
>     perl-IO-String:
>       deb: libio-string-perl
> @@ -747,6 +765,7 @@ mappings:
>       deb: libtest-lwp-useragent-perl
>       pkg: p5-Test-LWP-UserAgent
>       Fedora: perl-Test-LWP-UserAgent
> +    OpenSUSE: perl-Test-LWP-UserAgent
>   
>     perl-Test-Pod:
>       deb: libtest-pod-perl
> @@ -809,20 +828,24 @@ mappings:
>       deb: python-dev
>       pkg: python2
>       rpm: python2-devel
> +    OpenSUSE: python-devel
>       cross-policy-deb: foreign
>   
>     python2-lxml:
>       default: python-lxml
>       Fedora: python2-lxml
>       FreeBSD: py27-lxml
> +    OpenSUSE: python2-lxml
>   
>     python2-nose:
>       default: python-nose
>       Fedora: python2-nose
>       FreeBSD: py27-nose
> +    OpenSUSE: python2-nose
>   
>     python2-setuptools:
>       CentOS7: python2-setuptools
> +    OpenSUSE: python2-setuptools
>   
>     python3:
>       default: python3
> @@ -831,6 +854,7 @@ mappings:
>       default: python3-dbus
>       FreeBSD: py36-dbus
>       CentOS7: python36-dbus
> +    OpenSUSE: python3-dbus-python
>   
>     python3-devel:
>       deb: python3-dev
> @@ -838,17 +862,20 @@ mappings:
>       Fedora: python3-devel
>       CentOS7: python36-devel
>       cross-policy-deb: foreign
> +    OpenSUSE: python3-devel
>   
>     python3-gi:
>       deb: python3-gi
>       pkg: py36-gobject3
>       rpm: python3-gobject
>       CentOS7: python36-gobject
> +    OpenSUSE: python3-gobject
>   
>     python3-libxml2:
>       default: python3-libxml2
>       FreeBSD: py36-libxml2
>       CentOS7:
> +    OpenSUSE: python3-libxml2-python
>       Ubuntu16:
>   
>     python3-lxml:
> @@ -864,6 +891,7 @@ mappings:
>     python3-pip:
>       CentOS7: python3-pip
>       Debian9: python3-pip
> +    OpenSUSE: python3-pip
>       Ubuntu16: python3-pip
>       Ubuntu18: python3-pip
>   
> @@ -884,6 +912,7 @@ mappings:
>     qemu-img:
>       default: qemu-utils
>       rpm: qemu-img
> +    OpenSUSE: qemu-tools
>   
>     radvd:
>       default: radvd
> @@ -929,6 +958,7 @@ mappings:
>       deb: libspice-client-gtk-3.0-dev
>       pkg: spice-gtk
>       rpm: spice-gtk3-devel
> +    OpenSUSE: spice-gtk-devel
>       cross-policy-deb: foreign
>   
>     strace:
> @@ -942,6 +972,7 @@ mappings:
>       deb: iproute2
>       rpm: iproute-tc
>       CentOS7: iproute
> +    OpenSUSE: iproute2
>   
>     unzip:
>       default: unzip
> @@ -964,10 +995,12 @@ mappings:
>     wireshark:
>       deb: wireshark-dev
>       Fedora: wireshark-devel
> +    OpenSUSE: wireshark-devel
>       cross-policy-deb: skip
>   
>     xen:
>       Fedora: xen-devel
> +    OpenSUSE: xen-devel
>       x86_64-deb: libxen-dev
>       armv7l-deb: libxen-dev
>       aarch64-deb: libxen-dev
> @@ -994,18 +1027,21 @@ mappings:
>     xz-static:
>       deb: liblzma-dev
>       Fedora: xz-static
> +    OpenSUSE: xz-static-devel
>       cross-policy-deb: foreign
>   
>     yajl:
>       deb: libyajl-dev
>       pkg: yajl
>       rpm: yajl-devel
> +    OpenSUSE: libyajl-devel
>       cross-policy-deb: foreign
>   
>     zfs:
>       default: zfs-fuse
>       CentOS:
>       FreeBSD:
> +    OpenSUSE:
>   
>     zlib:
>       deb: zlib1g-dev
> @@ -1015,6 +1051,7 @@ mappings:
>     zlib-static:
>       deb: zlib1g-dev
>       rpm: zlib-static
> +    OpenSUSE: zlib-devel-static
>       cross-policy-deb: foreign
>   
>   
> 


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH RFC V2 jenkins-ci] guests: Add support for openSUSE
Posted by Fabiano Fidêncio 4 years, 5 months ago
On Tue, Nov 26, 2019 at 2:11 AM Jim Fehlig <jfehlig@suse.com> wrote:
>
> Grrr, I keep forgetting something within '--subject-prefix=' when sending these
> patches...

Are you aware of git-publish?
https://github.com/stefanha/git-publish

Best Regards,
-- 
Fabiano Fidêncio


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list