Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-15 Thread Daniel P . Berrangé
On Wed, Aug 15, 2018 at 06:08:18PM +0200, Andrea Bolognani wrote:
> On Fri, 2018-08-10 at 10:38 +0100, Daniel P. Berrangé wrote:
> > On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> > > G_ADD_PRIVATE was added in 2.38 and older functions are getting 
> > > deprecated:
> > > https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> > 
> > Our min glib2 version is currently 2.36, since that's what RHEL-7 has.
> 
> Uh? RHEL 7 has 2.54; Debian 8, the other pretty old platform
> we still target, has 2.42, so we're totally in the clear for
> making the switch...

Oh, the different between RHEL-7.0 and latest .x updates. I forget they
rebased glib2 RPM


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 :|

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-15 Thread Andrea Bolognani
On Fri, 2018-08-10 at 10:38 +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> > G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
> > https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> 
> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.

Uh? RHEL 7 has 2.54; Debian 8, the other pretty old platform
we still target, has 2.42, so we're totally in the clear for
making the switch...

> So this change would have to increase the min required version too.

... with this taken care of at the same time, of course :)

-- 
Andrea Bolognani / Red Hat / Virtualization

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Daniel P . Berrangé
On Fri, Aug 10, 2018 at 10:38:10AM +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> > G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
> > https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> 
> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.
> 
> So this change would have to increase the min required version too.

We could use some compat magic without making it too horrible:


#if GLIB_CHECK_VERSION(2, 38, 0)
#define G_TYPE_ADD_PRIVATE(klass, typ) \
  (void)klass;

#else

#define G_TYPE_ADD_PRIVATE(klass, typ)  \
 g_type_class_add_private(klass, 
sizeof(GVirConfigDomainChardevSourcePtyPrivate));

#define G_DEFINE_TYPE_WITH_PRIVATE(a, b, c) \
   G_DEFINE_TYPE(a, b, c)

#endif



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 :|

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Daniel P . Berrangé
On Fri, Aug 10, 2018 at 01:16:20PM +0200, Michal Privoznik wrote:
> On 08/10/2018 01:03 PM, Michal Privoznik wrote:
> > On 08/10/2018 11:38 AM, Daniel P. Berrangé wrote:
> >> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> >>> G_ADD_PRIVATE was added in 2.38 and older functions are getting 
> >>> deprecated:
> >>> https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> >>
> >> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.
> > 
> > That's a bummer. But okay, I'll keep the patch in my local repo until
> > RHEL rebases. But this is breaking build in more modern distros (e.g.
> > Fedora rawhide).
> > 
> > Disabling warnings looks like a temporal workaround to me.
> > 
> 
> Hold on, spice did the same change just a while ago:
> 
> https://cgit.freedesktop.org/spice/spice-gtk/commit/?id=950cf050aed637f8cb72a0f5899f75eeeffd2ebd
> 
> and they are only requiring 2.28 :-) Nevermind.

Looks like they just effectively bumped their min version without
realizing it !


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 :|

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Michal Privoznik
On 08/10/2018 01:03 PM, Michal Privoznik wrote:
> On 08/10/2018 11:38 AM, Daniel P. Berrangé wrote:
>> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
>>> G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
>>> https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
>>
>> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.
> 
> That's a bummer. But okay, I'll keep the patch in my local repo until
> RHEL rebases. But this is breaking build in more modern distros (e.g.
> Fedora rawhide).
> 
> Disabling warnings looks like a temporal workaround to me.
> 

Hold on, spice did the same change just a while ago:

https://cgit.freedesktop.org/spice/spice-gtk/commit/?id=950cf050aed637f8cb72a0f5899f75eeeffd2ebd

and they are only requiring 2.28 :-) Nevermind.

Michal

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Michal Privoznik
On 08/10/2018 11:38 AM, Daniel P. Berrangé wrote:
> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
>> G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
>> https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> 
> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.

That's a bummer. But okay, I'll keep the patch in my local repo until
RHEL rebases. But this is breaking build in more modern distros (e.g.
Fedora rawhide).

Disabling warnings looks like a temporal workaround to me.

Michal

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Daniel P . Berrangé
On Fri, Aug 10, 2018 at 10:38:10AM +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> > G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
> > https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
> 
> Our min glib2 version is currently 2.36, since that's what RHEL-7 has.
> 
> So this change would have to increase the min required version too.

Alternatively we could just use pragma to disable the deprecation warnings
around the g_add_private method call


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 :|

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

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-10 Thread Daniel P . Berrangé
On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote:
> G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
> https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits

Our min glib2 version is currently 2.36, since that's what RHEL-7 has.

So this change would have to increase the min required version too.


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 :|

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