[libvirt] [PATCH v2] maint: Update to latest gnulib

Eric Blake posted 1 patch 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180102222355.15598-1-eblake@redhat.com
.gnulib                           |  2 +-
bootstrap                         |  4 ++--
gnulib/local/lib/stat-time.h.diff | 13 +++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 gnulib/local/lib/stat-time.h.diff
[libvirt] [PATCH v2] maint: Update to latest gnulib
Posted by Eric Blake 6 years, 3 months ago
From: Michal Privoznik <mprivozn@redhat.com>

Unfortunately, since gnulib's commit of 2c5d558745 there's an
unused parameter to stat_time_normalize() function which gnulib
developers don't want to fix yet [1]. Therefore, we have to work
around it by temporarily providing a downstream patch.

1: http://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00000.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
[eblake: use gnulib local diff, instead of #pragma]
Signed-off-by: Eric Blake <eblake@redhat.com>

---

v2: perhaps nicer than Michal's original suggestion, but I'd still
wait another day or two to see if my arguments on the upstream
gnulib thread can instead give us a better submodule commit to
update to that avoids the problem altogether.
---
 .gnulib                           |  2 +-
 bootstrap                         |  4 ++--
 gnulib/local/lib/stat-time.h.diff | 13 +++++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 gnulib/local/lib/stat-time.h.diff

diff --git a/.gnulib b/.gnulib
index 5e9abf8716..c2cb55b34e 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 5e9abf87163ad4aeaefef0b02961f8674b0a4879
+Subproject commit c2cb55b34e76546479f195c14202dfcc870c4914
diff --git a/bootstrap b/bootstrap
index 85b85c530f..25920e991c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2017-09-19.08; # UTC

 # Bootstrap this package from checked-out sources.

-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -792,7 +792,7 @@ symlink_to_dir()
       # aren't confused into doing unnecessary builds.  Conversely, if the
       # existing symlink's timestamp is older than the source, make it afresh,
       # so that broken tools aren't confused into skipping needed builds.  See
-      # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+      # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
       test -h "$dst" &&
       src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
       dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
diff --git a/gnulib/local/lib/stat-time.h.diff b/gnulib/local/lib/stat-time.h.diff
new file mode 100644
index 0000000000..8333520d2d
--- /dev/null
+++ b/gnulib/local/lib/stat-time.h.diff
@@ -0,0 +1,13 @@
+diff --git i/lib/stat-time.h w/lib/stat-time.h
+index 5f8bf4e12..68871f567 100644
+--- i/lib/stat-time.h
++++ w/lib/stat-time.h
+@@ -212,7 +212,7 @@ get_stat_birthtime (struct stat const *st)
+    errno to EOVERFLOW if normalization overflowed.  This function
+    is intended to be private to this .h file.  */
+ _GL_STAT_TIME_INLINE int
+-stat_time_normalize (int result, struct stat *st)
++stat_time_normalize (int result, struct stat *st _GL_UNUSED)
+ {
+ #if defined __sun && defined STAT_TIMESPEC
+   if (result == 0)
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] maint: Update to latest gnulib
Posted by Michal Privoznik 6 years, 3 months ago
On 01/02/2018 11:23 PM, Eric Blake wrote:
> From: Michal Privoznik <mprivozn@redhat.com>
> 
> Unfortunately, since gnulib's commit of 2c5d558745 there's an
> unused parameter to stat_time_normalize() function which gnulib
> developers don't want to fix yet [1]. Therefore, we have to work
> around it by temporarily providing a downstream patch.
> 
> 1: http://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00000.html
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> [eblake: use gnulib local diff, instead of #pragma]
> Signed-off-by: Eric Blake <eblake@redhat.com>
> 
> ---
> 
> v2: perhaps nicer than Michal's original suggestion, but I'd still
> wait another day or two to see if my arguments on the upstream
> gnulib thread can instead give us a better submodule commit to
> update to that avoids the problem altogether.
> ---
>  .gnulib                           |  2 +-
>  bootstrap                         |  4 ++--
>  gnulib/local/lib/stat-time.h.diff | 13 +++++++++++++
>  3 files changed, 16 insertions(+), 3 deletions(-)
>  create mode 100644 gnulib/local/lib/stat-time.h.diff

Looks like gnulib can be fixed after all. I mean, both Jim an Paul
agreed with your patch for _GL_UNUSED. Therefore we can just update the
submodule after you push the gnulib fix.

Awesome, thanks for your help!

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] maint: Update to latest gnulib
Posted by Eric Blake 6 years, 3 months ago
On 01/02/2018 11:20 PM, Michal Privoznik wrote:
> On 01/02/2018 11:23 PM, Eric Blake wrote:
>> From: Michal Privoznik <mprivozn@redhat.com>
>>
>> Unfortunately, since gnulib's commit of 2c5d558745 there's an
>> unused parameter to stat_time_normalize() function which gnulib
>> developers don't want to fix yet [1]. Therefore, we have to work
>> around it by temporarily providing a downstream patch.

>> ---
>>  .gnulib                           |  2 +-
>>  bootstrap                         |  4 ++--
>>  gnulib/local/lib/stat-time.h.diff | 13 +++++++++++++
>>  3 files changed, 16 insertions(+), 3 deletions(-)
>>  create mode 100644 gnulib/local/lib/stat-time.h.diff
> 
> Looks like gnulib can be fixed after all. I mean, both Jim an Paul
> agreed with your patch for _GL_UNUSED. Therefore we can just update the
> submodule after you push the gnulib fix.

Indeed. I've now pushed just the .gnulib and bootstrap changes (no tweak
to gnulib/local/ after all), pointing to gnulib commit 7e7c5c795, and
pushed under the gnulib maintenance rule now that the patch is no longer
ugly.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

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