From owner-dev-commits-ports-all@freebsd.org Sat Oct 2 23:02:09 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AC8C6ABE02; Sat, 2 Oct 2021 23:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HMMtn42gBz3MBB; Sat, 2 Oct 2021 23:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B27E1B1FB; Sat, 2 Oct 2021 23:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 192N29Bn010366; Sat, 2 Oct 2021 23:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 192N29bM010365; Sat, 2 Oct 2021 23:02:09 GMT (envelope-from git) Date: Sat, 2 Oct 2021 23:02:09 GMT Message-Id: <202110022302.192N29bM010365@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 3014d5a8f0e3 - main - devel/glib20: Add option for unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3014d5a8f0e3c411b758afb8873ba4043b2a003c Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2021 23:02:09 -0000 The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=3014d5a8f0e3c411b758afb8873ba4043b2a003c commit 3014d5a8f0e3c411b758afb8873ba4043b2a003c Author: Daniel Engberg AuthorDate: 2021-10-02 22:08:00 +0000 Commit: Daniel Engberg CommitDate: 2021-10-02 23:01:33 +0000 devel/glib20: Add option for unit tests Don't build tests by default, the reduces time spent on compiling substantially (~450 objects vs ~1200) Add dependency for unit tests Some tests are disable due to circular dependency Backport upstream commit 75c854b359b8bd8b78938e51e5a2c7a42e5847ae to fix an issue calling getpwnam_r Thanks to arrowd for troubleshooting and submitting bugfix upstream References: https://gitlab.gnome.org/GNOME/glib/-/issues/2488 https://gitlab.gnome.org/GNOME/glib/-/commit/75c854b359b8bd8b78938e51e5a2c7a42e5847ae https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2276 (backport) PR: 257623 Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D31702 --- devel/glib20/Makefile | 6 ++- devel/glib20/files/patch-gio_tests_meson.build | 61 +++++++++++++++++++++++++ devel/glib20/files/patch-glib_glib-unix.c | 63 ++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 1 deletion(-) diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile index 62d08626ae72..6b6c5fd91646 100644 --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -2,6 +2,7 @@ PORTNAME= glib DISTVERSION= 2.70.0 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= GNOME @@ -36,7 +37,7 @@ CPE_VENDOR= gnome _LIBVERSION= 0.7000.0 PLIST_SUB= LIBVERSION=${_LIBVERSION} -OPTIONS_DEFINE= DEBUG FAM_ALTBACKEND MANPAGES NLS +OPTIONS_DEFINE= DEBUG FAM_ALTBACKEND MANPAGES NLS TEST OPTIONS_DEFAULT= MANPAGES OPTIONS_SUB= yes @@ -47,6 +48,9 @@ MANPAGES_BUILD_DEPENDS= docbook-xml>4.1.2:textproc/docbook-xml \ MANPAGES_USE= GNOME=libxslt:build MANPAGES_MESON_TRUE= man +TEST_DEPENDS= dbus-daemon:devel/dbus +TEST_MESON_TRUE= tests + .include # doesn't build yet diff --git a/devel/glib20/files/patch-gio_tests_meson.build b/devel/glib20/files/patch-gio_tests_meson.build new file mode 100644 index 000000000000..435c5afe7f2d --- /dev/null +++ b/devel/glib20/files/patch-gio_tests_meson.build @@ -0,0 +1,61 @@ +--- gio/tests/meson.build.orig 2021-06-10 18:57:57 UTC ++++ gio/tests/meson.build +@@ -49,7 +49,6 @@ gio_tests = { + 'buffered-output-stream' : {}, + 'cancellable' : {}, + 'contexts' : {}, +- 'contenttype' : {}, + 'converter-stream' : {}, + 'credentials' : {}, + 'data-input-stream' : {}, +@@ -94,7 +93,6 @@ gio_tests = { + 'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']}, + 'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']}, + 'tls-bindings' : {'extra_sources' : ['gtesttlsbackend.c']}, +- 'gdbus-address-get-session' : {}, + 'win32-appinfo' : {}, + } + +@@ -151,10 +149,6 @@ endif + if host_machine.system() != 'windows' + gio_tests += { + 'file' : {}, +- 'gdbus-peer' : { +- 'dependencies' : [libgdbus_example_objectmanager_dep], +- 'install_rpath' : installed_tests_execdir +- }, + 'gdbus-peer-object-manager' : {}, + 'live-g-file' : {}, + 'socket-address' : {}, +@@ -190,31 +184,14 @@ if host_machine.system() != 'windows' + } + endif + +- # Uninstalled because of the check-for-executable logic in DesktopAppInfo +- # unable to find the installed executable +- if not glib_have_cocoa +- gio_tests += { +- 'appinfo' : { +- 'install' : false, +- }, +- 'desktop-app-info' : { +- 'install' : false, +- }, +- } +- endif +- + test_extra_programs += { + 'basic-application' : {}, + 'dbus-launch' : {}, +- 'appinfo-test' : {}, + } + + if not glib_have_cocoa + test_extra_programs += { + 'apps' : {}, +- } +- gio_tests += { +- 'mimeapps' : {}, + } + endif + diff --git a/devel/glib20/files/patch-glib_glib-unix.c b/devel/glib20/files/patch-glib_glib-unix.c new file mode 100644 index 000000000000..1160e0cf537f --- /dev/null +++ b/devel/glib20/files/patch-glib_glib-unix.c @@ -0,0 +1,63 @@ +--- glib/glib-unix.c.orig 2021-09-17 10:17:56 UTC ++++ glib/glib-unix.c +@@ -463,7 +463,6 @@ g_unix_get_passwd_entry (const gchar *user_name, + } *buffer = NULL; + gsize string_buffer_size = 0; + GError *local_error = NULL; +- int errsv = 0; + + g_return_val_if_fail (user_name != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); +@@ -493,10 +492,8 @@ g_unix_get_passwd_entry (const gchar *user_name, + */ + buffer = g_malloc0 (sizeof (*buffer) + string_buffer_size + 6); + +- errno = 0; + retval = getpwnam_r (user_name, &buffer->pwd, buffer->string_buffer, + string_buffer_size, &passwd_file_entry); +- errsv = errno; + + /* Bail out if: the lookup was successful, or if the user id can't be + * found (should be pretty rare case actually), or if the buffer should be +@@ -508,19 +505,19 @@ g_unix_get_passwd_entry (const gchar *user_name, + break; + } + else if (retval == 0 || +- errsv == ENOENT || errsv == ESRCH || +- errsv == EBADF || errsv == EPERM) ++ retval == ENOENT || retval == ESRCH || ++ retval == EBADF || retval == EPERM) + { + /* Username not found. */ +- g_unix_set_error_from_errno (&local_error, errsv); ++ g_unix_set_error_from_errno (&local_error, retval); + break; + } +- else if (errsv == ERANGE) ++ else if (retval == ERANGE) + { + /* Can’t allocate enough string buffer space. */ + if (string_buffer_size > 32 * 1024) + { +- g_unix_set_error_from_errno (&local_error, errsv); ++ g_unix_set_error_from_errno (&local_error, retval); + break; + } + +@@ -529,7 +526,7 @@ g_unix_get_passwd_entry (const gchar *user_name, + } + else + { +- g_unix_set_error_from_errno (&local_error, errsv); ++ g_unix_set_error_from_errno (&local_error, retval); + break; + } + } +@@ -543,7 +540,6 @@ g_unix_get_passwd_entry (const gchar *user_name, + { + g_clear_pointer (&buffer, g_free); + g_propagate_error (error, g_steal_pointer (&local_error)); +- errno = errsv; + } + + return (struct passwd *) g_steal_pointer (&buffer);