Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkManager: update to 1.30.2, gnome-control-center: update to 3.38.5 #29342

Merged
merged 3 commits into from Mar 25, 2021

Conversation

cinerea0
Copy link
Contributor

@cinerea0 cinerea0 commented Mar 9, 2021

General

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

Closes #27502

@cinerea0
Copy link
Contributor Author

cinerea0 commented Mar 9, 2021

Some changes here have been taken from #27502. When I manage to get this to build correctly, I'll update gnome-control-center and add it to this PR because of the compat patch.

@cinerea0 cinerea0 changed the title NetworkManager: update to 1.31.1 NetworkManager: update to 1.31.1, gnome-control-center: drop NM compat patch Mar 9, 2021
@cinerea0
Copy link
Contributor Author

cinerea0 commented Mar 9, 2021

That's interesting, I didn't have any errors when building gnome-control-center on my x86_64-glibc machine.

@folliehiyuki
Copy link
Contributor

/usr/bin/ld: /tmp/test-wifi-panel-text.ojS9Hb.ltrans0.ltrans.o: in function `nm_client_on_permission_change':

Probably because of root privilege in the build environment

@cinerea0
Copy link
Contributor Author

cinerea0 commented Mar 9, 2021

@folliehiyuki Is this something that requires changing the template, then? If so, are there examples of other templates that do this so I can adapt it?

@folliehiyuki
Copy link
Contributor

It could be best if you can patch the source to disable the affected tests, and let the other tests run.
Otherwise disable check is fine (I think).

@cinerea0
Copy link
Contributor Author

Okay, it looks like the compat patch for gnome-control-center is still necessary. I'll include a comment in the NetworkManager template saying to check if that patch is still necessary after every version bump.

@cinerea0 cinerea0 marked this pull request as draft March 10, 2021 02:05
@cinerea0 cinerea0 changed the title NetworkManager: update to 1.31.1, gnome-control-center: drop NM compat patch NetworkManager: update to 1.31.1 Mar 10, 2021
@cinerea0 cinerea0 marked this pull request as ready for review March 10, 2021 03:10
@cinerea0
Copy link
Contributor Author

@ericonr Could you please take a look at this PR?

srcpkgs/NetworkManager/template Outdated Show resolved Hide resolved
srcpkgs/NetworkManager/patches/fix-cross-gir.patch Outdated Show resolved Hide resolved
@ericonr
Copy link
Member

ericonr commented Mar 15, 2021

@cinerea0
Copy link
Contributor Author

@ericonr I forgot that odd-numbered minor releases from NetworkManager are development releases, good catch! As for v1.30.2, I'm testing it right now and it appears to work fine, and you were correct that it builds fine on musl without any musl-specific patches.

@cinerea0 cinerea0 changed the title NetworkManager: update to 1.31.1 NetworkManager: update to 1.30.2 Mar 16, 2021
@sgn
Copy link
Member

sgn commented Mar 20, 2021

 srcpkgs/NetworkManager/patches/fix-cross-gir.patch | 30 ++++++++++++----------
 srcpkgs/NetworkManager/patches/no-gtk-doc.patch    | 28 ++++++++++++++++++++
 srcpkgs/NetworkManager/template                    | 23 ++++++++---------
 3 files changed, 55 insertions(+), 26 deletions(-)

diff --git a/srcpkgs/NetworkManager/patches/fix-cross-gir.patch b/srcpkgs/NetworkManager/patches/fix-cross-gir.patch
index c0b4344b1c..b78edfac24 100644
--- a/srcpkgs/NetworkManager/patches/fix-cross-gir.patch
+++ b/srcpkgs/NetworkManager/patches/fix-cross-gir.patch
@@ -1,29 +1,31 @@
 Reason: Fix crossbuilding GIR
 Upstream: No, not upstreamable since this is very specific to the Void setup
---- libnm/meson.build.orig	2020-12-28 16:03:30.641850261 +0100
-+++ libnm/meson.build	2020-12-28 16:31:54.932136481 +0100
-@@ -276,6 +276,14 @@
-     'GI_TYPELIB_PATH=' + gi_typelib_path,
+Index: b/libnm/meson.build
+===================================================================
+--- a/libnm/meson.build
++++ b/libnm/meson.build
+@@ -274,13 +274,23 @@ if enable_introspection
      'LD_LIBRARY_PATH=' + ld_library_path,
    ]
-+  
+ 
 +  if meson.is_cross_build()
-+    qemu = '/usr/bin/qemu-@XBPS_TARGET_QEMU_MACHINE@-static'
-+    qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/bin/python3'
-+    generate_setting_docs = ['sh', '-c', qemu_python3_cmd, join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')]
++    qemu_python3_cmd = [
++      '/usr/bin/qemu-@XBPS_TARGET_QEMU_MACHINE@-static',
++      '-L', '@XBPS_CROSS_BASE@',
++      '@XBPS_CROSS_BASE@/usr/bin/python3'
++      ]
 +  else
-+    generate_setting_docs = [python.path(), join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')]
++    qemu_python3_cmd = python.path()
 +  endif
- 
++
    nm_settings_docs_xml_gir = custom_target(
      'nm-settings-docs-gir.xml',
-@@ -283,8 +291,7 @@
+     input: libnm_gir[0],
      output: 'nm-settings-docs-gir.xml',
      command: [
        generate_setting_docs_env,
 -      python.path(),
--      join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
-+      generate_setting_docs,
++      qemu_python3_cmd,
+       join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
        '--lib-path', meson.current_build_dir(),
        '--gir', '@INPUT@',
-       '--output', '@OUTPUT@'
diff --git a/srcpkgs/NetworkManager/patches/no-gtk-doc.patch b/srcpkgs/NetworkManager/patches/no-gtk-doc.patch
new file mode 100644
index 0000000000..2fffc51604
--- /dev/null
+++ b/srcpkgs/NetworkManager/patches/no-gtk-doc.patch
@@ -0,0 +1,28 @@
+Index: b/meson.build
+===================================================================
+--- a/meson.build
++++ b/meson.build
+@@ -943,10 +943,8 @@ if enable_qt
+ endif
+ 
+ if enable_docs
+-  assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
+   assert(meson.version().version_compare('>= 0.46.0'), '-Ddocs requires meson >= 0.46')
+   subdir('man')
+-  subdir('docs')
+ endif
+ 
+ configure_file(
+Index: b/clients/common/meson.build
+===================================================================
+--- a/clients/common/meson.build
++++ b/clients/common/meson.build
+@@ -28,7 +28,7 @@ libnmc_base_dep = declare_dependency(
+   link_with: libnmc_base,
+ )
+ 
+-if enable_docs
++if enable_docs and enable_introspection
+   settings_docs_source = custom_target(
+     'settings-docs.h',
+     input: nm_settings_docs_xml_gir,
diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index d2287418e8..54288f71f9 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -7,28 +7,28 @@ revision=1
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
- -Dlibaudit=no -Dovs=false -Dlibnm_glib=true -Dselinux=false
- -Dmodify_system=true -Dpolkit_agent=true -Dsystemdsystemunitdir=no
+ -Dlibaudit=no -Dovs=false -Dselinux=false
+ -Dmodify_system=true -Dsystemdsystemunitdir=no
  -Dpppd=/usr/bin/pppd -Dqt=false
  -Dsession_tracking_consolekit=false
  -Dpppd_plugin_dir=/usr/lib/pppd/2.4.9 -Dresolvconf=/usr/bin/resolvconf
  -Ddhclient=/usr/bin/dhclient -Dkernel_firmware_dir=/usr/lib/firmware
  -Ddnsmasq=/usr/bin/dnsmasq -Ddbus_conf_dir=/etc/dbus-1/system.d
  -Ddhcpcd=/usr/bin/dhcpcd -Diptables=/usr/bin/iptables
- -Diwd=true
- -Dudev_dir=/usr/lib/udev -Dintrospection=$(vopt_if gir true false)
- -Dvapi=$(vopt_if vala true false)
+ -Diwd=true -Dudev_dir=/usr/lib/udev -Ddocs=true
+ $(vopt_bool gir introspection) $(vopt_bool gir vapi)
  -Dsession_tracking=$(vopt_if elogind elogind no)
  -Dsuspend_resume=$(vopt_if elogind elogind upower)
  -Dconfig_dhcp_default=internal"
 hostmakedepends="gettext-devel glib-devel libxslt-devel pkg-config
- intltool dbus-glib-devel jansson-devel $(vopt_if vala vala)
- $(vopt_if gir 'python3-gobject')"
+ intltool dbus-glib-devel jansson-devel docbook-xsl
+ $(vopt_if gir 'vala python3-gobject')"
 makedepends="libuuid-devel nss-devel dbus-glib-devel libgudev-devel
  libnl3-devel polkit-devel ppp-devel iptables-devel libcurl-devel
  ModemManager-devel readline-devel libndp-devel newt-devel jansson-devel
  libpsl-devel eudev-libudev-devel mobile-broadband-provider-info
- $(vopt_if gir libgirepository-devel) $(vopt_if elogind elogind-devel)"
+ $(vopt_if gir 'libgirepository-devel python3-gobject')
+ $(vopt_if elogind elogind-devel)"
 depends="dbus iproute2 openresolv wpa_supplicant mobile-broadband-provider-info"
 short_desc="Network Management daemon"
 maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -40,6 +40,7 @@ checksum=0c8e80e77877860e4a4e6ab4a0f7cdc1186e356b65b042a751897188b88944d2
 make_check=extended
 lib32disabled=yes
 conf_files="/etc/${pkgname}/${pkgname}.conf"
+patch_args=-Np1
 
 case "$XBPS_TARGET_MACHINE" in
 	*-musl)
@@ -50,8 +51,8 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 
 # Package build options
-build_options="gir vala elogind"
-build_options_default="gir vala elogind"
+build_options="gir elogind"
+build_options_default="gir elogind"
 
 pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
@@ -88,8 +89,6 @@ NetworkManager-devel_package() {
 		vmove "usr/lib/*.so"
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
-		fi
-		if [ "$build_option_vala" ]; then
 			vmove usr/share/vala
 		fi
 	}

@cinerea0
Copy link
Contributor Author

Alright, since the changes from @sgn build properly, I think the only thing left to resolve is whether or not the message at the top needs to be there.

@cinerea0
Copy link
Contributor Author

@q66 Building gnome-control-center after dropping the patch on my machine succeeds but, as you can see in the checks, fails here.

@sgn
Copy link
Member

sgn commented Mar 22, 2021 via email

@cinerea0 cinerea0 changed the title NetworkManager: update to 1.30.2 NetworkManager: update to 1.30.2, gnome-control-center: update to 3.38.5 Mar 22, 2021
@cinerea0
Copy link
Contributor Author

@ericonr You were correct that revbumping libnma would allow g-c-c to build correctly, all the checks have passed now.

srcpkgs/NetworkManager/template Outdated Show resolved Hide resolved
- assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
assert(meson.version().version_compare('>= 0.46.0'), '-Ddocs requires meson >= 0.46')
subdir('man')
- subdir('docs')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this patch, doesn't it make more sense to make doc generation depend on the gir build option? Or just always build with introspection enabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs subdir is about building gtk-doc, which is meant for developer and requires gir.
Normal users want man instead.
I couldn't build the gtk-doc on my single try, so I disabled it. No code, no problem :-p

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see! I'd appreciate a comment on top that we want only man, not the full development docs, then.

And maybe make a request to upstream for it?

Copy link
Contributor Author

@cinerea0 cinerea0 Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be appropriate to change if enable_docs to if enable_docs and enable_introspection and get rid of the rest of the changes in this section?

EDIT: Nevermind, didn't see the above comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue was that building the docs failed, while the man pages worked.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this isn't a blocker for merging the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building fails on ARM architectures without the patch, but builds successfully on all architectures with the patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that the expected outcome, specifically with ARM archs? I guess that's not what I was expecting. If it was, I'll go ahead and push the other commits and mark this PR ready for review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda makes sense, it'd be cross builds that'd be affected by it.

@cinerea0
Copy link
Contributor Author

cinerea0 commented Mar 24, 2021

@sgn I no longer have anything resembling the version of fix-cross-gir.patch you diff-ed against to create your patch above, so I can't recreate it. Could you please post your version of that file here?

EDIT: Nevermind, I forgot that GH keeps track of commits that technically no longer exist.

@cinerea0 cinerea0 marked this pull request as ready for review March 25, 2021 04:16
@Gottox
Copy link
Member

Gottox commented Mar 25, 2021

lgtm

@ericonr ericonr merged commit eda0ab8 into void-linux:master Mar 25, 2021
@cinerea0 cinerea0 deleted the nm branch March 26, 2021 21:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants