[libvirt PATCH 0/2] dnsmasq: Some small tweaks

Applies on top of Michal's patches. https://listman.redhat.com/archives/libvir-list/2022-January/msg00715.html Andrea Bolognani (2): spec: Drop BuildRequires on dnsmasq util: Stop storing dnsmasq version libvirt.spec.in | 1 - src/util/virdnsmasq.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) -- 2.34.1

It's been an optional build time dependency for a long time, so if Meson couldn't find it the only consequence was that libvirt would look for it at runtime instead, which is what we are doing for most of our non-library dependencies anyway. Now we've stopped even looking for it at build time, so there's no point in having it installed in the build environment. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- libvirt.spec.in | 1 - 1 file changed, 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index db9d622699..9c1c054f50 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -281,7 +281,6 @@ BuildRequires: sanlock-devel >= 2.4 BuildRequires: libpcap-devel >= 1.5.0 BuildRequires: libnl3-devel BuildRequires: libselinux-devel -BuildRequires: dnsmasq >= 2.41 BuildRequires: iptables BuildRequires: ebtables BuildRequires: module-init-tools -- 2.34.1

We don't do anything with it after checking that it satisfies our requirements and don't provide a way for users of the module to access it, so carrying it around is pointless. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/util/virdnsmasq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 57b24c9f6a..b5f903cfac 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -577,7 +577,6 @@ dnsmasqReload(pid_t pid G_GNUC_UNUSED) struct _dnsmasqCaps { virObject parent; char *binaryPath; - unsigned long version; }; static virClass *dnsmasqCapsClass; @@ -608,6 +607,7 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf) { int len; const char *p; + unsigned long version; p = STRSKIP(buf, DNSMASQ_VERSION_STR); if (!p) @@ -615,21 +615,21 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf) virSkipToDigit(&p); - if (virParseVersionString(p, &caps->version, true) < 0) + if (virParseVersionString(p, &version, true) < 0) goto error; - if (caps->version < DNSMASQ_MIN_MAJOR * 1000000 + DNSMASQ_MIN_MINOR * 1000) { + if (version < DNSMASQ_MIN_MAJOR * 1000000 + DNSMASQ_MIN_MINOR * 1000) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("dnsmasq version >= %u.%u required but %lu.%lu found"), DNSMASQ_MIN_MAJOR, DNSMASQ_MIN_MINOR, - caps->version / 1000000, - caps->version % 1000000 / 1000); + version / 1000000, + version % 1000000 / 1000); goto error; } VIR_INFO("dnsmasq version is %d.%d", - (int)caps->version / 1000000, - (int)(caps->version % 1000000) / 1000); + (int)version / 1000000, + (int)(version % 1000000) / 1000); return 0; error: -- 2.34.1

On 1/17/22 17:40, Andrea Bolognani wrote:
Applies on top of Michal's patches.
https://listman.redhat.com/archives/libvir-list/2022-January/msg00715.html
Andrea Bolognani (2): spec: Drop BuildRequires on dnsmasq util: Stop storing dnsmasq version
libvirt.spec.in | 1 - src/util/virdnsmasq.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Andrea Bolognani
-
Michal Prívozník