[packages/NetworkManager] - updated to 1.52.0; uses meson now

qboosh qboosh at pld-linux.org
Sun Apr 13 14:08:52 CEST 2025


commit 71f5fdbae3eafce29089747f54a120ec5f3f5211
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 13 13:20:59 2025 +0200

    - updated to 1.52.0; uses meson now

 NetworkManager-gir3.patch | 90 ++++++++++++++++++++++++++++++++++++++++++
 NetworkManager.spec       | 99 ++++++++++++++++++++---------------------------
 systemd-fallback.patch    | 11 ------
 3 files changed, 131 insertions(+), 69 deletions(-)
---
diff --git a/NetworkManager.spec b/NetworkManager.spec
index 5d3e87c..820792d 100644
--- a/NetworkManager.spec
+++ b/NetworkManager.spec
@@ -10,7 +10,7 @@
 Summary:	Network Manager for GNOME
 Summary(pl.UTF-8):	Zarządca sieci dla GNOME
 Name:		NetworkManager
-Version:	1.50.1
+Version:	1.52.0
 Release:	1
 Epoch:		2
 License:	GPL v2+
@@ -19,37 +19,35 @@ Group:		Networking/Admin
 #Source0:	https://download.gnome.org/sources/NetworkManager/1.50/%{name}-%{version}.tar.xz
 #Source0Download: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases
 Source0:	https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/%{version}/downloads/%{name}-%{version}.tar.xz
-# Source0-md5:	664aa137694ddacfb51e9fae716916d2
+# Source0-md5:	a41314bafb43239c5813b1160e54b0dd
 Source1:	%{name}.conf
 Source3:	%{name}.tmpfiles
 Source4:	%{name}.init
 Patch0:		ifcfg-path.patch
 Patch1:		systemd-fallback.patch
+Patch2:		%{name}-gir3.patch
 URL:		https://gitlab.freedesktop.org/NetworkManager/NetworkManager/
 BuildRequires:	ModemManager-devel >= 1.0.0
 BuildRequires:	audit-libs-devel
-BuildRequires:	autoconf >= 2.63
-BuildRequires:	automake >= 1:1.12
 BuildRequires:	bluez-libs-devel >= 5.0
 BuildRequires:	curl-devel >= 7.24.0
 BuildRequires:	dbus-devel >= 1.1.0
 BuildRequires:	docbook-dtd412-xml
 BuildRequires:	gettext-tools >= 0.19.8
 BuildRequires:	glib2-devel >= 1:2.42
-BuildRequires:	gnome-common
 BuildRequires:	gobject-introspection-devel >= 0.10.0
 BuildRequires:	gtk-doc >= 1.0
-BuildRequires:	gtk-doc-automake >= 1.0
 BuildRequires:	jansson-devel >= 2.7
 BuildRequires:	libndp-devel
 BuildRequires:	libnl-devel >= 3.2.8
 BuildRequires:	libpsl-devel >= 0.1
 BuildRequires:	libselinux-devel
 BuildRequires:	libteamdctl-devel >= 1.9
-BuildRequires:	libtool >= 2:2.2
 BuildRequires:	libuuid-devel
 BuildRequires:	libxslt-progs
+BuildRequires:	meson >= 0.51.0
 BuildRequires:	newt-devel >= 0.52.15
+BuildRequires:	ninja >= 1.5
 # also gnutls (>= 2.12) possible (--with-crypto=gnutls)
 BuildRequires:	nss-devel >= 3.11
 BuildRequires:	perl-base
@@ -60,7 +58,7 @@ BuildRequires:	python3 >= 1:3
 BuildRequires:	python3-pygobject3
 BuildRequires:	readline-devel
 BuildRequires:	rpm-build >= 4.6
-BuildRequires:	rpmbuild(macros) >= 1.752
+BuildRequires:	rpmbuild(macros) >= 2.042
 BuildRequires:	sed >= 4.0
 %{?with_systemd:BuildRequires:	systemd-devel >= 1:209}
 BuildRequires:	tar >= 1:1.22
@@ -192,6 +190,7 @@ Bashowe uzupełnianie nazw dla polecenia NetworkManagera (nmcli).
 %setup -q
 %patch -P0 -p1
 %{?with_systemd:%patch -P1 -p1}
+%patch -P2 -p1
 
 grep -rl /usr/bin/env examples | xargs sed -i -e '1{
 	s,^#!.*bin/env gjs,#!/usr/bin/gjs,
@@ -200,44 +199,41 @@ grep -rl /usr/bin/env examples | xargs sed -i -e '1{
 	s,^#!.*bin/env ruby,#!%{__ruby},
 }'
 
-%{__sed} -i -e '/^po\/Makefile\.in/d' configure.ac
+%if %{with static_libs}
+%{__sed} -i -e '/^libnm = / s/shared_library/library/' src/libnm-client-impl/meson.build
+%endif
 
 %build
-%{__gtkdocize}
-%{__gettextize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure \
-	--disable-autotools-deprecation \
-	--enable-gtk-doc \
-	--enable-ifcfg-rh \
-	--enable-more-warnings \
-	--disable-silent-rules \
-	%{__enable_disable static_libs static} \
-	%{!?with_vala:--disable-vala} \
-	--with-config-wifi-backend-default=%{?with_default_iwd:iwd}%{!?with_default_iwd:wpa_supplicant} \
-	--with-dhclient=/sbin/dhclient \
-	--with-dhcpcd=/sbin/dhcpcd \
-	%{!?with_firewalld:--disable-firewalld-zone} \
-	--with-html-dir=%{_gtkdocdir} \
-	--with-iptables=/usr/sbin/iptables \
-	--with-iwd=yes \
-	--with-nft=/usr/sbin/nft \
-	--with-nmcli \
-	--with-system-ca-path=/etc/certs \
-	--with-systemdsystemunitdir=%{systemdunitdir} \
-	--with-session-tracking=%{?with_systemd:systemd}%{!?with_systemd:ck} \
-	--with-suspend-resume=%{?with_systemd:systemd}%{!?with_systemd:upower} \
-	--with-pppd=/usr/sbin/pppd \
-	--with-pppd-plugin-dir=%{_libdir}/pppd/plugins \
-	--with-resolvconf=/sbin/resolvconf \
-	--with-udev-dir=/lib/udev \
-	--with-dist-version=%{version}-%{release}
-
-%{__make}
+%meson \
+	-Dbluez5_dun=true \
+	-Dconfig_wifi_backend_default=%{?with_default_iwd:iwd}%{!?with_default_iwd:wpa_supplicant} \
+	-Ddhclient=/sbin/dhclient \
+	-Ddhcpcd=/sbin/dhcpcd \
+	-Ddist_version=%{version}-%{release} \
+	-Ddnsmasq=/usr/sbin/dnsmasq \
+	-Ddocs=true \
+	-Debpf=true \
+	-Difcfg_rh=true \
+	-Diptables=/usr/sbin/iptables \
+	-Diwd=true \
+	-Dmodprobe=/sbin/modprobe \
+	-Dnft=/usr/sbin/nft \
+	-Dpppd=/usr/sbin/pppd \
+	-Dpppd_plugin_dir=%{_libdir}/pppd/plugins \
+	-Dqt=false \
+	-Dreadline=libreadline \
+	-Dresolvconf=/sbin/resolvconf \
+	-Dsession_tracking=%{?with_systemd:systemd}%{!?with_systemd:no} \
+	-Dsession_tracking_consolekit=true \
+	-Dsuspend_resume=%{?with_systemd:systemd}%{!?with_systemd:consolekit} \
+	-Dsystem_ca_path=/etc/certs \
+	-Dsystemdsystemunitdir=%{systemdunitdir} \
+	-Dteamdctl=true \
+	-Dtests=no \
+	-Dudev_dir=/lib/udev \
+	-Dvapi=true
+
+%meson_build
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -246,8 +242,7 @@ install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/%{name},%{systemdtmpfilesdi
 	$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/dispatcher.d/{pre-down.d,pre-up.d,no-wait.d} \
 	$RPM_BUILD_ROOT%{_prefix}/lib/%{name}/{VPN,conf.d}
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+%meson_install
 
 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
@@ -255,20 +250,8 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
 
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
-# Cleanup
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
-%{__rm} $RPM_BUILD_ROOT%{distplugindir}/*.la
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/*.la
-%if %{with static_libs}
-%{__rm} $RPM_BUILD_ROOT%{distplugindir}/*.a
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/*.a
-%endif
-
 %find_lang %{name}
 
-# examples
-%{__make} clean-checkPROGRAMS
-
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
diff --git a/NetworkManager-gir3.patch b/NetworkManager-gir3.patch
new file mode 100644
index 0000000..eb77c52
--- /dev/null
+++ b/NetworkManager-gir3.patch
@@ -0,0 +1,90 @@
+From 12eff9a7fdfeabab12ce56e5f7d515a13a3d704c Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar at gmail.com>
+Date: Sun, 23 Mar 2025 16:35:44 +0100
+Subject: [PATCH] meson: Fix docs generation with PyGObject 3.52
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+PyGObject 3.52 switched from gobject-introspection’s libgirepository 1.0
+to glib’s libgirepository 2.0. As a result, the Python script would
+no longer be able to find the `GIRepository` 2.0 typelib:
+
+    (process:1944): GLib-GIRepository-DEBUG: 15:25:14.521: Ignoring GIRepository-2.0.typelib because this libgirepository corresponds to GIRepository-3.0.typelib
+
+We could update the script to support both versions of the typelib
+but it is not really necessary. It was only used to add extra directories
+from `$LD_LIBRARY_PATH` and the CLI argument to repository’s library path
+but libgirepository already supports using `LD_LIBRARY_PATH` directly:
+https://docs.gtk.org/girepository/method.Repository.prepend_library_path.html
+---
+ src/libnm-client-impl/meson.build           |  1 -
+ tools/generate-docs-nm-settings-docs-gir.py | 28 ---------------------
+ 2 files changed, 29 deletions(-)
+
+diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build
+index e50e8fbdbb9..b49366292f5 100644
+--- a/src/libnm-client-impl/meson.build
++++ b/src/libnm-client-impl/meson.build
+@@ -209,7 +209,6 @@ if enable_introspection
+         'LD_LIBRARY_PATH=' + ld_library_path,
+         python_path,
+         gen_gir_cmd,
+-        '--lib-path', meson.current_build_dir(),
+         '--gir', libnm_gir[0],
+         '--output', '@OUTPUT@',
+         '--target', name
+diff --git a/tools/generate-docs-nm-settings-docs-gir.py b/tools/generate-docs-nm-settings-docs-gir.py
+index e438d87ad40..40fab200030 100755
+--- a/tools/generate-docs-nm-settings-docs-gir.py
++++ b/tools/generate-docs-nm-settings-docs-gir.py
+@@ -6,26 +6,9 @@
+ from __future__ import print_function, unicode_literals
+ import xml.etree.ElementTree as ET
+ import argparse
+-import os
+ import gi
+ import re
+ 
+-gi.require_version("GIRepository", "2.0")
+-from gi.repository import GIRepository
+-
+-try:
+-    libs = os.environ["LD_LIBRARY_PATH"].split(":")
+-    libs.reverse()
+-    for lib in libs:
+-        GIRepository.Repository.prepend_library_path(lib)
+-except AttributeError:
+-    # An old GI version, that has no prepend_library_path
+-    # It's alright, it probably interprets LD_LIBRARY_PATH
+-    # correctly.
+-    pass
+-except KeyError:
+-    pass
+-
+ gi.require_version("NM", "1.0")
+ from gi.repository import NM, GObject
+ 
+@@ -354,13 +337,6 @@ def main(gir_path_str, output_path_str, output_target):
+ 
+ if __name__ == "__main__":
+     parser = argparse.ArgumentParser()
+-    parser.add_argument(
+-        "-l",
+-        "--lib-path",
+-        metavar="PATH",
+-        action="append",
+-        help="path to scan for shared libraries",
+-    )
+     parser.add_argument(
+         "-g",
+         "--gir",
+@@ -384,8 +360,4 @@ def main(gir_path_str, output_path_str, output_target):
+ 
+     args = parser.parse_args()
+ 
+-    if args.lib_path:
+-        for lib in args.lib_path:
+-            GIRepository.Repository.prepend_library_path(lib)
+-
+     main(args.gir, args.output, args.target)
diff --git a/systemd-fallback.patch b/systemd-fallback.patch
index e527239..3d52294 100644
--- a/systemd-fallback.patch
+++ b/systemd-fallback.patch
@@ -1,14 +1,3 @@
---- NetworkManager-1.8.0/configure.ac.orig	2017-05-27 22:30:22.001467624 +0200
-+++ NetworkManager-1.8.0/configure.ac	2017-05-27 22:57:15.061449204 +0200
-@@ -447,7 +447,7 @@
- # output
- session_tracking=
- if test "$use_systemd_logind" = "yes" -o "$use_systemd_logind" = "auto"; then
--	PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], [have_systemd_logind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], [have_systemd_logind=yes], [have_systemd_logind=no])])
-+	PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], [have_systemd_logind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-daemon libsystemd-login], [have_systemd_logind=yes], [have_systemd_logind=no])])
- else
- 	have_systemd_logind=no
- fi
 --- NetworkManager-1.34.0/src/core/nm-session-monitor.c.orig	2022-01-13 15:49:26.000000000 +0100
 +++ NetworkManager-1.34.0/src/core/nm-session-monitor.c	2022-01-13 20:47:31.545775434 +0100
 @@ -18,6 +18,7 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/NetworkManager.git/commitdiff/71f5fdbae3eafce29089747f54a120ec5f3f5211



More information about the pld-cvs-commit mailing list