[PATCH] build: Require glib >= 2.56

Jim Fehlig posted 1 patch 3 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210301230047.22811-1-jfehlig@suse.com
libvirt.spec.in | 2 +-
meson.build     | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH] build: Require glib >= 2.56
Posted by Jim Fehlig 3 years, 1 month ago
There are a few uses of g_autoslist in the qemu driver and likely
more will come throughout the codebase in the future. g_autoslist
first appeared in glib 2.56, so bump the minimum version.

https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoslist

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
 libvirt.spec.in | 2 +-
 meson.build     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 29b476184d..8d8b900fbb 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -278,7 +278,7 @@ BuildRequires: systemd-units
 %if %{with_libxl}
 BuildRequires: xen-devel
 %endif
-BuildRequires: glib2-devel >= 2.48
+BuildRequires: glib2-devel >= 2.56
 BuildRequires: libxml2-devel
 BuildRequires: libxslt
 BuildRequires: readline-devel
diff --git a/meson.build b/meson.build
index daa1475c99..c225df42d4 100644
--- a/meson.build
+++ b/meson.build
@@ -1038,7 +1038,7 @@ if fuse_dep.found()
   conf.set('WITH_FUSE', 1)
 endif
 
-glib_version = '2.48.0'
+glib_version = '2.56.0'
 glib_dep = dependency('glib-2.0', version: '>=' + glib_version)
 gobject_dep = dependency('gobject-2.0', version: '>=' + glib_version)
 if host_machine.system() == 'windows'
-- 
2.29.2


Re: [PATCH] build: Require glib >= 2.56
Posted by Peter Krempa 3 years, 1 month ago
On Mon, Mar 01, 2021 at 16:00:47 -0700, Jim Fehlig wrote:
> There are a few uses of g_autoslist in the qemu driver and likely
> more will come throughout the codebase in the future. g_autoslist
> first appeared in glib 2.56, so bump the minimum version.
> 
> https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoslist

Hmm, oops g_autoslist was my doing, unfortunately I thought we had
guards in place to prevent using stuff from newer glib.

Now when glib was introduced Daniel provided the following analysis of
glib versions:

      RHEL-8: 2.56.1
      RHEL-7: 2.50.3
      Debian (Buster): 2.58.3
      Debian (Stretch): 2.50.3
      OpenBSD (Ports): 2.58.3
      FreeBSD (Ports): 2.56.3
      OpenSUSE Leap 15: 2.54.3
      SLE12-SP2: 2.48.2
      Ubuntu (Xenial): 2.48.0
      macOS (Homebrew): 2.56.0


(commit 58e7c9bc05106c2fb76f9a72497bfc1b28988d71 )


Out of the above, this would exclude RHEL-7, Debian (Stretch), OpenSUSE
Leap 15, SLE 12 and Ubuntu Xenial.

At this point some of the distros went out of the support window:

OpenSUSE LEAP 15 -> currently supported is LEAP 15.2, which has 2.62
SLE12 -> SLE15 is now more than 2 years out
Ubuntu (Xenial) -> Ubuntu (Bionic) is more than 2 years out (2.56)
Debian (Stretch) -> Debian (Buster) was released in July of 2019, but
                    stretch is EOL (even our CI dropped it [1]

Now the problem is with:

RHEL-7 - > RHEL-8 was released in May of 2019

Thus we are 2 months out of dropping support for RHEL-7. On the other
hand starting from RHEL-7.6/CentOS7.6 glib was updated to 2.56, so on a
updated rhel-7/centos-7 the package will work. I'm not sure though how
we approach the update of package during the lifetime of the distro as
our platform support policy isn't clear on that [2].

My vote definitely goes for bumping the version.

[1] https://gitlab.com/libvirt/libvirt-ci/-/commit/5abf5e7e23263f839f4ff795883d1c67295a1e21
[2] https://libvirt.org/platforms.html

> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
>  libvirt.spec.in | 2 +-
>  meson.build     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] build: Require glib >= 2.56
Posted by Daniel P. Berrangé 3 years, 1 month ago
On Tue, Mar 02, 2021 at 08:51:29AM +0100, Peter Krempa wrote:
> On Mon, Mar 01, 2021 at 16:00:47 -0700, Jim Fehlig wrote:
> > There are a few uses of g_autoslist in the qemu driver and likely
> > more will come throughout the codebase in the future. g_autoslist
> > first appeared in glib 2.56, so bump the minimum version.
> > 
> > https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoslist
> 
> Hmm, oops g_autoslist was my doing, unfortunately I thought we had
> guards in place to prevent using stuff from newer glib.

Yes, but the guards aren't perfect. The rely on being able to attach
deprecation attributes to functions, and g_autoslist is a macro so
doesn't get the guard.

Our CI is supposed to catch this, but of course it didn't since
all our distros now have newer versions than this.

> 
> Now when glib was introduced Daniel provided the following analysis of
> glib versions:
> 
>       RHEL-8: 2.56.1
>       RHEL-7: 2.50.3
>       Debian (Buster): 2.58.3
>       Debian (Stretch): 2.50.3
>       OpenBSD (Ports): 2.58.3
>       FreeBSD (Ports): 2.56.3
>       OpenSUSE Leap 15: 2.54.3
>       SLE12-SP2: 2.48.2
>       Ubuntu (Xenial): 2.48.0
>       macOS (Homebrew): 2.56.0

Lets have an updated version of this list in the commit message please.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [PATCH] build: Require glib >= 2.56
Posted by Jim Fehlig 3 years, 1 month ago
On 3/2/21 3:18 AM, Daniel P. Berrangé wrote:
> On Tue, Mar 02, 2021 at 08:51:29AM +0100, Peter Krempa wrote:
>>
>> Now when glib was introduced Daniel provided the following analysis of
>> glib versions:
>>
>>        RHEL-8: 2.56.1
>>        RHEL-7: 2.50.3
>>        Debian (Buster): 2.58.3
>>        Debian (Stretch): 2.50.3
>>        OpenBSD (Ports): 2.58.3
>>        FreeBSD (Ports): 2.56.3
>>        OpenSUSE Leap 15: 2.54.3
>>        SLE12-SP2: 2.48.2
>>        Ubuntu (Xenial): 2.48.0
>>        macOS (Homebrew): 2.56.0
> 
> Lets have an updated version of this list in the commit message please.

Based on Peter's info and some snooping

   RHEL-7: 2.56.1
   RHEL-8: 2.56.4
   Debian (Buster): 2.58.3
   OpenBSD (Ports): 2.66.7
   FreeBSD (Ports): 2.66.7
   openSUSE Leap 15.2, SLE15-SP2: 2.62.6
   Ubuntu (Bionic): 2.56.1
   macOS (Homebrew): 2.66.7

I think some folks around here are better authorities on versions in RHEL than 
e.g. distrowatch [1] :-). I'll wait for a review of this list before updating 
the commit message and pushing.

Regards,
Jim

[1] 
https://distrowatch.com/table.php?distribution=redhat&pkglist=true&version=rhel-7.9#pkglist


Re: [PATCH] build: Require glib >= 2.56
Posted by Andrea Bolognani 3 years, 1 month ago
On Tue, 2021-03-02 at 16:16 -0700, Jim Fehlig wrote:
> Based on Peter's info and some snooping
> 
>    RHEL-7: 2.56.1
>    RHEL-8: 2.56.4
>    Debian (Buster): 2.58.3
>    OpenBSD (Ports): 2.66.7
>    FreeBSD (Ports): 2.66.7
>    openSUSE Leap 15.2, SLE15-SP2: 2.62.6
>    Ubuntu (Bionic): 2.56.1
>    macOS (Homebrew): 2.66.7
> 
> I think some folks around here are better authorities on versions in RHEL than 
> e.g. distrowatch [1] :-). I'll wait for a review of this list before updating 
> the commit message and pushing.

In case you're not aware of it, you can use

  https://repology.org/project/glib/versions

to obtain this information without too much effort.

I double checked and what you have here matches what's on repology,
so please go ahead.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] build: Require glib >= 2.56
Posted by Pavel Hrdina 3 years, 1 month ago
On Tue, Mar 02, 2021 at 08:51:29AM +0100, Peter Krempa wrote:
> On Mon, Mar 01, 2021 at 16:00:47 -0700, Jim Fehlig wrote:
> > There are a few uses of g_autoslist in the qemu driver and likely
> > more will come throughout the codebase in the future. g_autoslist
> > first appeared in glib 2.56, so bump the minimum version.
> > 
> > https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoslist
> 
> Hmm, oops g_autoslist was my doing, unfortunately I thought we had
> guards in place to prevent using stuff from newer glib.
> 
> Now when glib was introduced Daniel provided the following analysis of
> glib versions:
> 
>       RHEL-8: 2.56.1
>       RHEL-7: 2.50.3
>       Debian (Buster): 2.58.3
>       Debian (Stretch): 2.50.3
>       OpenBSD (Ports): 2.58.3
>       FreeBSD (Ports): 2.56.3
>       OpenSUSE Leap 15: 2.54.3
>       SLE12-SP2: 2.48.2
>       Ubuntu (Xenial): 2.48.0
>       macOS (Homebrew): 2.56.0
> 
> 
> (commit 58e7c9bc05106c2fb76f9a72497bfc1b28988d71 )
> 
> 
> Out of the above, this would exclude RHEL-7, Debian (Stretch), OpenSUSE
> Leap 15, SLE 12 and Ubuntu Xenial.
> 
> At this point some of the distros went out of the support window:
> 
> OpenSUSE LEAP 15 -> currently supported is LEAP 15.2, which has 2.62
> SLE12 -> SLE15 is now more than 2 years out
> Ubuntu (Xenial) -> Ubuntu (Bionic) is more than 2 years out (2.56)
> Debian (Stretch) -> Debian (Buster) was released in July of 2019, but
>                     stretch is EOL (even our CI dropped it [1]
> 
> Now the problem is with:
> 
> RHEL-7 - > RHEL-8 was released in May of 2019
> 
> Thus we are 2 months out of dropping support for RHEL-7. On the other
> hand starting from RHEL-7.6/CentOS7.6 glib was updated to 2.56, so on a
> updated rhel-7/centos-7 the package will work. I'm not sure though how
> we approach the update of package during the lifetime of the distro as
> our platform support policy isn't clear on that [2].
> 
> My vote definitely goes for bumping the version.
> 
> [1] https://gitlab.com/libvirt/libvirt-ci/-/commit/5abf5e7e23263f839f4ff795883d1c67295a1e21
> [2] https://libvirt.org/platforms.html

I would say that we can assume that we support only the latest minor
version even though our support policy doesn't state that explicitly.

Looking at this page [1] it seems that RHEL-7 by default supports only
the latest minor version unless you are paying customer and opt for EUS.
I don't thing we need to cover this specific use-case.

So I vote for bumping the version as well.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

[1] <https://access.redhat.com/support/policy/updates/errata/>
Re: [PATCH] build: Require glib >= 2.56
Posted by Andrea Bolognani 3 years, 1 month ago
On Tue, 2021-03-02 at 09:05 +0100, Pavel Hrdina wrote:
> On Tue, Mar 02, 2021 at 08:51:29AM +0100, Peter Krempa wrote:
> > Thus we are 2 months out of dropping support for RHEL-7. On the other
> > hand starting from RHEL-7.6/CentOS7.6 glib was updated to 2.56, so on a
> > updated rhel-7/centos-7 the package will work. I'm not sure though how
> > we approach the update of package during the lifetime of the distro as
> > our platform support policy isn't clear on that [2].
> 
> I would say that we can assume that we support only the latest minor
> version even though our support policy doesn't state that explicitly.

Yeah, I would say that's been the expectation, and I can recall at
least one occasion when the minimum version for a dependency has been
bumped using this rationale. It would probably be a good idea to
state this explicitly on the platform support page to avoid any
confusion.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization