Skip to contentSkip to conversation

Misc patches

GIT PULL Applied Daniel P. Berrangé 2 participants 7 messages Jul 21 – Jul 22

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

The following changes since commit bd6079a7a1d14de0918a7715ef6db85dc32de3bb:

Merge tag 'next-pull-request' of https://gitlab.com/peterx/qemu into staging (2026-07-20 11:12:38 -0400)

are available in the Git repository at:

https://gitlab.com/berrange/qemu tags/misc-next-pull-request

for you to fetch changes up to 84a6c5f94b3d3c445c55189d38aca22234054c10:

get_maintainer: add ability to report Git Lab handle (2026-07-21 16:53:12 +0100)

----------------------------------------------------------------
* Update FreeBSD image to 14.4
* Fix inotify test for FreeBSD 15
* Fix crypt/nettle build option argument handling
* Add tracking & reporting of GitLab account handles for maintainers

----------------------------------------------------------------

Daniel P. Berrangé (3):
tests/vm: update to FreeBSD 14.4 image
gitlab: introduce files mapping GitLab accounts to real names
get_maintainer: add ability to report Git Lab handle

Jessica Clarke (1):
test-util-filemonitor: Adapt to FreeBSD 15's native inotify semantics

Luc Michel (1):
meson.build: re-add explicit gcrypt/nettle request check

 .gitlab-map-auto                   | 93 ++++++++++++++++++++++++++++++
 .gitlab-map-manual                 | 18 ++++++
 crypto/cipher.c                    |  2 +-
 crypto/meson.build                 |  2 +-
 meson.build                        | 11 +++-
 scripts/get_maintainer.pl          | 53 +++++++++++++++--
 scripts/gitlab-map-check           | 51 ++++++++++++++++
 scripts/gitlab-map-update          | 45 +++++++++++++++
 tests/unit/test-crypto-block.c     |  3 +-
 tests/unit/test-util-filemonitor.c | 29 +++++++++-
 tests/vm/freebsd                   |  4 +-
 11 files changed, 300 insertions(+), 11 deletions(-)
 create mode 100644 .gitlab-map-auto
 create mode 100644 .gitlab-map-manual
 create mode 100755 scripts/gitlab-map-check
 create mode 100755 scripts/gitlab-map-update
Signature · 1 line
2.55.0
#1 lore raw

[PULL 1/5] test-util-filemonitor: Adapt to FreeBSD 15's native inotify semantics

From: Jessica Clarke <[email protected]>

FreeBSD 15 introduces a native inotify implementation rather than requiring use of the kqueue-based libinotify package. This native implementation does not generate the extra deleted events, so don't expect them. However, the original implementation did have a bug that caused IN_IGNORED to never be generated if you did not also watch for IN_DELETE_SELF, which affects 15.0 and 15.1, but has been fixed and will no longer apply in 15.2 / 16.0.

Note that the deleted event check is for the userspace version, since that governs whether libinotify is being used or not, whereas the ignored event check is both for the userspace version (to check if we're using the native syscall) and the kernel version (to check if the kernel has the bug or not).

All __FreeBSD_version values used here correspond to the value in-tree at the time of the relevant commits. Since neither commit bumped the value there will be a window of development snapshots between each commit and the previous bump that will be incorrectly identified here, but this is the best we can do, and something users of snapshots should be prepared to deal with.

---
 tests/unit/test-util-filemonitor.c | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)
tests/unit/test-util-filemonitor.c +28 -1
index 02e67fc96a..972651dc1e 100644
@@ -27,6 +27,10 @@
 
 #include <utime.h>
 
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
 enum {
     QFILE_MONITOR_TEST_OP_ADD_WATCH,
     QFILE_MONITOR_TEST_OP_DEL_WATCH,
@@ -221,6 +225,24 @@ qemu_file_monitor_test_expect(QFileMonitorTestData *data,
 }
 
 
+static bool
+expect_broken_ignored(void)
+{
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1500051
+    int osreldate;
+
+    osreldate = getosreldate();
+    if (osreldate == -1) {
+        g_printerr("Unable to call getosreldate: %s\n", strerror(errno));
+        abort();
+    }
+    return osreldate < 1501501 || (osreldate >= 1600000 && osreldate < 1600019);
+#else
+    return false;
+#endif
+}
+
+
 static void
 test_file_monitor_events(void)
 {
@@ -360,7 +382,7 @@ test_file_monitor_events(void)
         { .type = QFILE_MONITOR_TEST_OP_EVENT,
           .filesrc = "one.txt", .watchid = &watch4,
           .eventid = QFILE_MONITOR_EVENT_DELETED },
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && __FreeBSD_version < 1500051
         { .type = QFILE_MONITOR_TEST_OP_EVENT,
           .filesrc = "two.txt", .watchid = &watch0,
           .eventid = QFILE_MONITOR_EVENT_DELETED },
@@ -539,6 +561,11 @@ test_file_monitor_events(void)
                 g_printerr("Event id=%" PRIx64 " event=%d file=%s\n",
                            *op->watchid, op->eventid, op->filesrc);
             }
+            if (op->eventid == QFILE_MONITOR_EVENT_IGNORED &&
+                expect_broken_ignored()) {
+                g_printerr("Expect ignored event to be broken, skipping\n");
+                break;
+            }
             if (!qemu_file_monitor_test_expect(&data, *op->watchid,
                                                op->eventid, op->filesrc,
                                                op->swapnext))
Signature · 1 line
2.55.0
#2 lore raw

[PULL 4/5] gitlab: introduce files mapping GitLab accounts to real names

In reply to Daniel P. Berrangé

It is desirable to be able to discover the GitLab account handle assocaited with a real name in the MAINTAINERS file.

Rather that duplicating the same account handle multiple times, inline with the MAINTAINERS file entries, this introduces mapping files:

* .gitlab-map-auto - data automatically queried from GitLab using the 'glab' tool and REST API
* .gitlab-map-manual - manual overrides/augmentation for cases where the MAINTAINERS real name does not match the GitLab account real name

The former would need refreshing when we add new MAINTAINERS entries, if the person had to be added as a GitLab account member. For this purpose scripts/gitlab-map-update can be used, assuming the user has the 'glab' client tool present and configured with an access token.

To audit how many maintainers have GitLab handles present/missing scripts/gitlab-map-check can run a report.

  $ ./scripts/gitlab-map-check
  Missing GitLab handle for maintainer 'Akihiko Odaki'
  Missing GitLab handle for maintainer 'Albert Esteve'
  ....
  Missing GitLab handle for maintainer 'Zhenzhong Duan'
  Missing GitLab handle for maintainer 'Zhuoying Cai'
  GitLab handles missing: 158 / present: 68
---
 .gitlab-map-auto          | 93 +++++++++++++++++++++++++++++++++++++++
 .gitlab-map-manual        | 18 ++++++++
 scripts/gitlab-map-check  | 51 +++++++++++++++++++++
 scripts/gitlab-map-update | 45 +++++++++++++++++++
 4 files changed, 207 insertions(+)
 create mode 100644 .gitlab-map-auto
 create mode 100644 .gitlab-map-manual
 create mode 100755 scripts/gitlab-map-check
 create mode 100755 scripts/gitlab-map-update
.gitlab-map-auto new file +93 -0
new file mode 100644
index 0000000000..28ce448f1b
@@ -0,0 +1,93 @@
+# This file is auto-generated by scripts/gitlab-map-update
+#
+# This GitLab map associates GitLab account handles
+# with real names, in order to allow mapping from
+# MAINTAINERS entries. The format of entries is
+#
+#    {gitlab-handle}<tab>{real name}
+#
+# Manual overrides must be placed in .gitlab-map-manual
+TaoTang	Tao Tang
+a1xndr	Alexander Bulekov
+adi-g15-ibm	Aditya Gupta
+agraf	Alexander Graf
+alex.williamson	Alex Williamson
+aliang1	Aihua Liang
+alistair23	Alistair Francis
+anisinha	Ani Sinha
+anthony-linaro	Anthony Roberts
+anthonyper	Anthony PERARD
+berrange	Daniel P. Berrangé
+birkelund	Klaus Jensen
+bonzini	Paolo Bonzini
+brian-cain	Brian Cain
+bsdimp	Warner Losh
+cborntra	Christian Borntraeger
+chao23.liu	Chao Liu (Zevorn)
+cleber.gnu	Cleber Rosa
+clegoate	Cédric Le Goater
+cohuck	Cornelia Huck
+cota_	Emilio Cota
+dagrh	Dr. David Alan Gilbert
+danielhb	Daniel Henrique Barboza
+davidhildenbrand	David Hildenbrand
+dgibson	dgibson
+dwmw2	David Woodhouse
+eauger1	Eric Auger
+ebblake	Eric Blake
+edgar.iglesias	Edgar E. Iglesias
+ehabkost	Eduardo Habkost
+eldondev	Eldon
+epilys	Manos Pitsidianakis
+famzheng	Fam Zheng
+farosas	Fabiano Rosas
+gautammenghani	Gautam Menghani
+gkurz	Greg Kurz
+gusbromero	Gustavo Romero
+harshpb	Harsh Prateek Bora
+hdeller	Helge Deller
+hreitz	Hanna Czenczek
+imammedo	Igor Mammedov
+jasowang	Jason Wang
+jmacarthur	Jim MacArthur
+jsnow	John Snow
+juan.quintela	Juan Quintela
+kbastian-qemu	Bastian Koppelmann
+kmwolf	Kevin Wolf
+kostyanf14	Kostiantyn Kostiuk
+kraxel	Gerd Hoffmann
+lbmeng	Bin Meng
+legoater	Cédric Le Goater
+lvivier	Laurent Vivier
+lygstate	Yonggang Luo
+maciejsszmigiero	Maciej S. Szmigiero
+marcandre.lureau	Marc-André Lureau
+marcandre.lureau-rh	Marc-André Lureau
+mauromatteo.cascella	Mauro Matteo Cascella
+mcayland	Mark Cave-Ayland
+mdroth	Michael Roth
+mediouni-m	M. Mediouni
+mjt0k	Michael Tokarev
+mstredhat	MST
+npiggin	npiggin
+p-b-o	Pierrick Bouvier
+pauldzim	Paul Zimmerman
+peterx	Peter Xu
+philmd	Philippe Mathieu-Daudé
+pierrick.bouvier	Pierrick Bouvier
+pipo.sk	Peter Krempa
+pkrempa	Peter Krempa (work)
+pm215	Peter Maydell
+qemu-janitor	Qemu Janitor
+rathc	Chinmay Rath
+rth7680	Richard Henderson
+schoenebeck	Christian Schoenebeck
+sgarzarella	Stefano Garzarella
+sstabellini	Stefano Stabellini
+stefanberger	Stefan Berger
+stefanha	Stefan Hajnoczi
+stsquad	Alex Bennée
+stweil	Stefan Weil
+thuth	Thomas Huth
+vsementsov	Vladimir Sementsov-Ogievskiy
+xcancerberox	Joaquin de Andres
.gitlab-map-manual new file +18 -0
new file mode 100644
index 0000000000..f605a540e9
@@ -0,0 +1,18 @@
+# This GitLab map associates GitLab account handles
+# with real names, in order to allow mapping from
+# MAINTAINERS entries. The format of entries is
+#
+#    {gitlab-handle}<tab>{real name}
+#
+# This file is manually written, to augment the
+# auto-generated data in .gitlab-map-auto. This
+# is needed where a GitLab account real name does
+# not exactly match the MAINTAINERS file real
+# name.
+#
+berrange	Daniel P. Berrange
+dgibson	David Gibson
+hreitz	Hanna Reitz
+mstredhat	Michael S. Tsirkin
+npiggin	Nicholas Piggin
+mediouni-m	Mohamed Mediouni
scripts/gitlab-map-check new file +51 -0

51 lines not on this page · raw message

scripts/gitlab-map-update new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.55.0
#3 lore raw

[PULL 3/5] meson.build: re-add explicit gcrypt/nettle request check

In reply to Daniel P. Berrangé

From: Luc Michel <[email protected]>

c4b3d0074 removed the check that nettle or gcrypt were explicitly requested as the crypto library to use, breaking the --enable-nettle and --enable-gcrypt options. Re-add the logic to force usage of nettle or gcrypt for crypto operations, while still keeping gnutls for TLS.

---
 crypto/cipher.c                |  2 +-
 crypto/meson.build             |  2 +-
 meson.build                    | 11 ++++++++++-
 tests/unit/test-crypto-block.c |  3 ++-
 4 files changed, 14 insertions(+), 4 deletions(-)
crypto/cipher.c +1 -1
index 515165e0dc..229710f76b 100644
@@ -142,7 +142,7 @@ qcrypto_cipher_validate_key_length(QCryptoCipherAlgo alg,
 #include "cipher-gcrypt.c.inc"
 #elif defined CONFIG_NETTLE
 #include "cipher-nettle.c.inc"
-#elif defined CONFIG_GNUTLS
+#elif defined CONFIG_GNUTLS_CRYPTO
 #include "cipher-gnutls.c.inc"
 #else
 #include "cipher-stub.c.inc"
crypto/meson.build +1 -1
index b51597a879..6ac83857aa 100644
@@ -38,7 +38,7 @@ if nettle.found()
   endif
 elif gcrypt.found()
   crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
-elif gnutls.found()
+elif gnutls_crypto.found()
   crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
 else
   crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
meson.build +10 -1
index 164328ded8..06c43b4358 100644
@@ -1783,11 +1783,13 @@ if not get_option('libcbor').auto() or have_system
 endif
 
 gnutls = not_found
+gnutls_crypto = not_found
 gnutls_bug1717_workaround = false
 if get_option('gnutls').enabled() or (get_option('gnutls').auto() and have_system)
   gnutls = dependency('gnutls', version: '>=3.7.5',
                       method: 'pkg-config',
                       required: get_option('gnutls'))
+  gnutls_crypto = gnutls
 
   #if gnutls.found() and not get_option('gnutls-bug1717-workaround').disabled()
     # XXX: when bug 1717 is resolved, add logic to probe for
@@ -1811,7 +1813,12 @@ if get_option('nettle').enabled() and get_option('gcrypt').enabled()
   error('Only one of gcrypt & nettle can be enabled')
 endif
 
-if not gnutls.found()
+# Explicit nettle/gcrypt request, so ignore gnutls for crypto
+if get_option('nettle').enabled() or get_option('gcrypt').enabled()
+  gnutls_crypto = not_found
+endif
+
+if not gnutls_crypto.found()
   if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
     gcrypt = dependency('libgcrypt', version: '>=1.9.4',
                         required: get_option('gcrypt'))
@@ -2513,6 +2520,7 @@ config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
 config_host_data.set('CONFIG_KEYUTILS', keyutils.found())
 config_host_data.set('CONFIG_GETTID', has_gettid)
 config_host_data.set('CONFIG_GNUTLS', gnutls.found())
+config_host_data.set('CONFIG_GNUTLS_CRYPTO', gnutls_crypto.found())
 config_host_data.set('CONFIG_GNUTLS_BUG1717_WORKAROUND', gnutls_bug1717_workaround)
 config_host_data.set('CONFIG_TASN1', tasn1.found())
 config_host_data.set('CONFIG_GCRYPT', gcrypt.found())
@@ -4865,6 +4873,7 @@ summary_info = {}
 summary_info += {'TLS priority':      get_option('tls_priority')}
 summary_info += {'GNUTLS support':    gnutls}
 if gnutls.found()
+  summary_info += {'  GNUTLS crypto':   gnutls_crypto.found()}
   summary_info += {'  GNUTLS bug 1717 workaround': gnutls_bug1717_workaround }
 endif
 summary_info += {'libgcrypt':         gcrypt}
tests/unit/test-crypto-block.c +2 -1
index 218e585f98..3ac7f17b2a 100644
@@ -31,7 +31,8 @@
 #endif
 
 #if (defined(_WIN32) || defined RUSAGE_THREAD) && \
-    (defined(CONFIG_NETTLE) || defined(CONFIG_GCRYPT))
+    (defined(CONFIG_NETTLE) || defined(CONFIG_GCRYPT) || \
+     defined(CONFIG_GNUTLS_CRYPTO))
 #define TEST_LUKS
 #else
 #undef TEST_LUKS
Signature · 1 line
2.55.0
#4 lore raw

[PULL 2/5] tests/vm: update to FreeBSD 14.4 image

In reply to Daniel P. Berrangé

This avoids an interactive prompt that halts execution when attempting to run the FreeBSD tests due to outdated 14.3 base image:

`Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Installing pkg-2.6.2_1...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1404000
- running userland: 1403000
Ignore the mismatch and continue? [y/N]:

---
 tests/vm/freebsd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/vm/freebsd +2 -2
index ea09b21fbc..bfb1a85af3 100755
@@ -28,8 +28,8 @@ class FreeBSDVM(basevm.BaseVM):
     name = "freebsd"
     arch = "x86_64"
 
-    link = "https://download.freebsd.org/releases/CI-IMAGES/14.3-RELEASE/amd64/Latest/FreeBSD-14.3-RELEASE-amd64-BASIC-CI.raw.xz"
-    csum = "ec0f5a4bbe63aa50a725d9fee0f1931f850e9a21cbebdadb991df00f168d6805"
+    link = "https://download.freebsd.org/releases/CI-IMAGES/14.4-RELEASE/amd64/Latest/FreeBSD-14.4-RELEASE-amd64-BASIC-CI.raw.xz"
+    csum = "627937af554eb6522891875ddc8cf5b86b40e9a12143c1b951f830b3f691de49"
     size = "20G"
 
     BUILD_SCRIPT = """
Signature · 1 line
2.55.0
#5 lore raw

[PULL 5/5] get_maintainer: add ability to report Git Lab handle

In reply to Daniel P. Berrangé

With the GitLab mapping files from the previous commit, the get_manitainer.pl script is now able to report the gitlab handle for each maintainer/reviewer when displaying output.

For example:

  $ ./scripts/get_maintainer.pl -f hw/scsi/lsi53c895a.c
  Paolo Bonzini <[email protected]> (supporter:SCSI, gitlab:@bonzini)
  Fam Zheng <[email protected]> (reviewer:SCSI, gitlab:@famzheng)
  [email protected] (open list:All patches CC here)
---
 scripts/get_maintainer.pl | 53 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 49 insertions(+), 4 deletions(-)
scripts/get_maintainer.pl +49 -4
index 76be402e11..473d133126 100755
@@ -365,6 +365,31 @@ sub read_mailmap {
     close($mailmap_file);
 }
 
+my %gitlabmap;
+
+read_gitlabmap(".gitlab-map-auto");
+read_gitlabmap(".gitlab-map-manual");
+
+sub read_gitlabmap {
+    my $mapfile = shift;
+    open MAP, "<$mapfile"
+	or die "cannot open $mapfile: $!";
+
+    while (<MAP>) {
+	next if /^#/;
+	next if /^\s*$/;
+
+	if (/^(\S+)\t(.*)$/) {
+	    my $handle = $1;
+	    my $realname = $2;
+
+	    $gitlabmap{$realname} = $handle;
+	}
+    }
+
+    close MAP;
+}
+
 ## use the filenames on the command line or find the filenames in the patchfiles
 
 my @files = ();
@@ -1068,6 +1093,18 @@ sub email_inuse {
     return 0;
 }
 
+sub gitlab_handle {
+    my $name = shift;
+
+    $name =~ s/"//g;
+
+    my $gitlab_handle;
+    if (exists $gitlabmap{$name}) {
+	return $gitlabmap{$name};
+    }
+    return undef;
+}
+
 sub push_email_address {
     my ($line, $role) = @_;
 
@@ -1077,10 +1114,14 @@ sub push_email_address {
 	return 0;
     }
 
+    my $gitlab_handle = gitlab_handle($name);
+
     if (!$email_remove_duplicates) {
-	push(@email_to, [format_email($name, $address, $email_usename), $role]);
+	push(@email_to, [format_email($name, $address, $email_usename),
+			 $role, $gitlab_handle]);
     } elsif (!email_inuse($name, $address)) {
-	push(@email_to, [format_email($name, $address, $email_usename), $role]);
+	push(@email_to, [format_email($name, $address, $email_usename),
+			 $role, $gitlab_handle]);
 	$email_hash_name{lc($name)}++ if ($name ne "");
 	$email_hash_address{lc($address)}++;
     }
@@ -2026,10 +2067,14 @@ sub merge_email {
     my %saw;
 
     for (@_) {
-	my ($address, $role) = @$_;
+	my ($address, $role, $gitlab_handle) = @$_;
 	if (!$saw{$address}) {
 	    if ($output_roles) {
-		push(@lines, "$address ($role)");
+		if (defined $gitlab_handle) {
+		    push(@lines, "$address ($role, gitlab:\@$gitlab_handle)");
+		} else {
+		    push(@lines, "$address ($role)");
+		}
 	    } else {
 		push(@lines, $address);
 	    }
Signature · 1 line
2.55.0