git: 438ca27ba7ec - main - sysutils/polkit: Update to 128

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Tue, 20 Oct 2026 19:44:38 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=438ca27ba7ec1db31b10f6e7ae1fbc9510fd1fd1

commit 438ca27ba7ec1db31b10f6e7ae1fbc9510fd1fd1
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-10-20 15:53:49 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-10-20 19:43:58 +0000

    sysutils/polkit: Update to 128
    
    Reported by:    portscout!
---
 sysutils/polkit/Makefile                           | 10 +--
 sysutils/polkit/distinfo                           |  6 +-
 .../files/patch-src_polkit_polkitunixsession.c     |  2 +-
 .../patch-src_polkitagent_polkitagenthelper-pam.c  | 27 --------
 ...src_polkitbackend_polkitbackendsessionmonitor.c |  2 +-
 ...test_data_etc_polkit-1_rules.d_10-testing.rules | 11 ----
 sysutils/polkit/files/patch-test_wrapper.py        | 76 ----------------------
 sysutils/polkit/pkg-plist                          | 37 ++++++-----
 8 files changed, 30 insertions(+), 141 deletions(-)

diff --git a/sysutils/polkit/Makefile b/sysutils/polkit/Makefile
index c713bb5a77d1..a63eb69752e7 100644
--- a/sysutils/polkit/Makefile
+++ b/sysutils/polkit/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	polkit
-DISTVERSION=	127
+DISTVERSION=	128
 CATEGORIES=	sysutils gnome
 
 MAINTAINER=	desktop@FreeBSD.org
@@ -50,8 +50,8 @@ MANPAGES_BUILD_DEPENDS=	docbook-sgml>0:textproc/docbook-sgml \
 MANPAGES_USE=		gnome=libxslt:build
 MANPAGES_MESON_TRUE=	man
 
-.ifdef ALLOW_SYSTEM_AFFECTING_TESTS
-TEST_ENV+=		ALLOW_SYSTEM_AFFECTING_TESTS=1
+.ifdef ALLOW_SYSTEM_DESTRUCTIVE_TESTS
+TEST_ENV+=		ALLOW_SYSTEM_DESTRUCTIVE_TESTS=1
 .endif
 
 .include <bsd.port.pre.mk>
@@ -75,12 +75,12 @@ post-install:
 	${MKDIR} ${STAGEDIR}/var/lib/polkit-1/localauthority/${i}
 .endfor
 
-.if !defined(ALLOW_SYSTEM_AFFECTING_TESTS)
+.if !defined(ALLOW_SYSTEM_DESTRUCTIVE_TESTS)
 post-test:
 	@${ECHO_CMD}
 	@${ECHO_CMD} "===> Polkit tests were skipped, because they create system users and groups"
 	@${ECHO_CMD} "and are only safe to run inside a discardable jail. If that's the case, run"
-	@${ECHO_CMD} "make test ALLOW_SYSTEM_AFFECTING_TESTS=yes"
+	@${ECHO_CMD} "make test ALLOW_SYSTEM_DESTRUCTIVE_TESTS=yes"
 	@${ECHO_CMD}
 .endif
 
diff --git a/sysutils/polkit/distinfo b/sysutils/polkit/distinfo
index 6e31d3b7fd8e..9fce05fa4843 100644
--- a/sysutils/polkit/distinfo
+++ b/sysutils/polkit/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1766007520
-SHA256 (polkit-org-polkit-127_GH0.tar.gz) = 9b7bc16f086479dcc626c575976568ba4a85d34297a750d8ab3d2e57f6d8b988
-SIZE (polkit-org-polkit-127_GH0.tar.gz) = 472872
+TIMESTAMP = 1792507331
+SHA256 (polkit-org-polkit-128_GH0.tar.gz) = 6edb06bf1448e49e428f9597a97af6a05d62146dd0b58f86eeaebcee3f5ecfaa
+SIZE (polkit-org-polkit-128_GH0.tar.gz) = 512196
diff --git a/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c b/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c
index 56e196d6df16..a36e75ea5b69 100644
--- a/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c
+++ b/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c
@@ -1,4 +1,4 @@
-FreeBSD ConsoleKit is patched to return proper IDs instead D-Bus paths, so
+ConsoleKit 2.0 release is changed to return proper IDs instead D-Bus paths, so
 adapt Polkit to this case.
 
 --- src/polkit/polkitunixsession.c.orig	2025-12-17 16:14:53 UTC
diff --git a/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c b/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c
deleted file mode 100644
index 0f1a0d673da8..000000000000
--- a/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c
+++ /dev/null
@@ -1,27 +0,0 @@
---- src/polkitagent/polkitagenthelper-pam.c.orig	2025-12-17 16:14:53 UTC
-+++ src/polkitagent/polkitagenthelper-pam.c
-@@ -38,7 +38,7 @@
- #    define SO_PEERPIDFD 0x404B
- #  elif defined(__sparc__)
- #    define SO_PEERPIDFD 0x0056
--#  else
-+#  elif defined(__linux__)
- #    define SO_PEERPIDFD 77
- #  endif
- #endif
-@@ -137,6 +137,7 @@ main (int argc, char *argv[])
-       goto error;
-     }
- 
-+#ifdef SO_PEERPIDFD
-   /* We are socket activated and the socket has been set up as stdio/stdout, read user from it */
-   if (argv[1] != NULL && strcmp (argv[1], "--socket-activated") == 0)
-     {
-@@ -177,6 +178,7 @@ main (int argc, char *argv[])
-       uid = ucred.uid;
-     }
-   else
-+#endif
-     user_to_auth = argv[1];
- 
-   cookie = read_cookie (argc, argv);
diff --git a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c b/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c
index 3d1f73ebe13f..32df913eb30a 100644
--- a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c
+++ b/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c
@@ -1,4 +1,4 @@
-FreeBSD ConsoleKit is patched to return proper IDs instead D-Bus paths, so
+ConsoleKit 2.0 is changed to return proper IDs instead D-Bus paths, so
 adapt Polkit to this case.
 
 --- src/polkitbackend/polkitbackendsessionmonitor.c.orig	2025-12-17 16:14:53 UTC
diff --git a/sysutils/polkit/files/patch-test_data_etc_polkit-1_rules.d_10-testing.rules b/sysutils/polkit/files/patch-test_data_etc_polkit-1_rules.d_10-testing.rules
deleted file mode 100644
index 90dbb673529f..000000000000
--- a/sysutils/polkit/files/patch-test_data_etc_polkit-1_rules.d_10-testing.rules
+++ /dev/null
@@ -1,11 +0,0 @@
---- test/data/etc/polkit-1/rules.d/10-testing.rules.orig	2025-12-17 16:14:53 UTC
-+++ test/data/etc/polkit-1/rules.d/10-testing.rules
-@@ -162,7 +162,7 @@ polkit.addRule(function(action, subject) {
- polkit.addRule(function(action, subject) {
-     if (action.id == "net.company.spawning.helper_with_output") {
-         try {
--            var out = polkit.spawn(["echo", "-n", "-e", "Hello\nWorld"]);
-+            var out = polkit.spawn(["printf", "Hello\nWorld"]);
-             if (out == "Hello\nWorld")
-                 return polkit.Result.YES;
-             else
diff --git a/sysutils/polkit/files/patch-test_wrapper.py b/sysutils/polkit/files/patch-test_wrapper.py
deleted file mode 100644
index c2661cb03a84..000000000000
--- a/sysutils/polkit/files/patch-test_wrapper.py
+++ /dev/null
@@ -1,76 +0,0 @@
---- test/wrapper.py.orig	2026-01-07 09:02:36 UTC
-+++ test/wrapper.py
-@@ -3,7 +3,9 @@ import os
- import argparse
- import atexit
- import os
-+import platform
- import subprocess
-+import shutil
- import sys
- import signal
- import time
-@@ -34,10 +36,11 @@ def setup_test_namespace(data_dir):
-         subprocess.check_call(["mount", "--bind", os.path.join(data_dir, "etc"), "/etc"])
-     except PermissionError:
-         print("Lacking permissions to set up test harness, skipping")
--        sys.exit(77)
-+        return False
-     except AttributeError:
-         print("Python 3.12 is required for os.unshare(), skipping")
--        sys.exit(77)
-+        return False
-+    return True
- 
- 
- def stop_dbus(pid: int) -> None:
-@@ -69,6 +72,32 @@ def stop_dbus(pid: int) -> None:
-     signal.signal(signal.SIGTERM, signal.SIG_DFL)
- 
- 
-+def setup_test_unconstrained_freebsd(data_dir):
-+    passwd = os.path.join(data_dir, "etc", "passwd")
-+    with open(passwd, 'r') as file:
-+        for line in file:
-+            fields = line.split(":")
-+            if fields[0] == "root":
-+                continue
-+            subprocess.call(["pw", "useradd", "-n", fields[0], "-u", fields[2], "-c", fields[4], "-d", fields[5], "-s", fields[6].strip()])
-+    group = os.path.join(data_dir, "etc", "group")
-+    with open(group, 'r') as file:
-+        for line in file:
-+            fields = line.split(":")
-+            cmd = ["pw", "groupadd", "-n", fields[0], "-g", fields[2]]
-+            members = fields[3].strip()
-+            if len(members) > 0:
-+                cmd.append("-M")
-+                cmd.append(members)
-+            if fields[0] == "root":
-+                cmd = ["pw", "groupmod", "-g", "0", "-l", "root"]
-+            subprocess.call(cmd)
-+    shutil.copy2(os.path.join(data_dir, "etc", "netgroup"), "/etc/netgroup")
-+    shutil.copy2("/usr/bin/true", "/bin/true")
-+    bus = dbus.SystemBus()
-+    consolekit = bus.get_object("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager")
-+    consolekit.GetSeats(dbus_interface="org.freedesktop.ConsoleKit.Manager")
-+
- if __name__ == "__main__":
-     parser = argparse.ArgumentParser()
-     parser.add_argument("test_executable",
-@@ -79,7 +108,15 @@ if __name__ == "__main__":
-                         help="set up a mock system D-Bus using dbusmock")
-     args = parser.parse_args()
- 
--    setup_test_namespace(args.data_dir)
-+    if not setup_test_namespace(args.data_dir):
-+        if os.getenv("ALLOW_SYSTEM_AFFECTING_TESTS") == "1":
-+            if platform.system() == 'FreeBSD':
-+                setup_test_unconstrained_freebsd(args.data_dir)
-+            else:
-+                setup_test_unconstrained_linux(args.data_dir)
-+        else:
-+            # skip tests
-+            sys.exit(77)
- 
-     if args.mock_dbus:
-         dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
diff --git a/sysutils/polkit/pkg-plist b/sysutils/polkit/pkg-plist
index 63e089e2bd5b..3ffc2824e5f2 100644
--- a/sysutils/polkit/pkg-plist
+++ b/sysutils/polkit/pkg-plist
@@ -44,12 +44,6 @@ lib/libpolkit-gobject-1.so.0.0.0
 lib/polkit-1/polkitd
 libdata/pkgconfig/polkit-agent-1.pc
 libdata/pkgconfig/polkit-gobject-1.pc
-%%MANPAGES%%share/man/man1/pkaction.1.gz
-%%MANPAGES%%share/man/man1/pkcheck.1.gz
-%%MANPAGES%%share/man/man1/pkexec.1.gz
-%%MANPAGES%%share/man/man1/pkttyagent.1.gz
-%%MANPAGES%%share/man/man8/polkit.8.gz
-%%MANPAGES%%share/man/man8/polkitd.8.gz
 share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
 share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
 share/gettext/its/polkit.its
@@ -66,6 +60,7 @@ share/locale/hu/LC_MESSAGES/polkit-1.mo
 share/locale/id/LC_MESSAGES/polkit-1.mo
 share/locale/it/LC_MESSAGES/polkit-1.mo
 share/locale/ka/LC_MESSAGES/polkit-1.mo
+share/locale/kk/LC_MESSAGES/polkit-1.mo
 share/locale/nl/LC_MESSAGES/polkit-1.mo
 share/locale/nn/LC_MESSAGES/polkit-1.mo
 share/locale/oc/LC_MESSAGES/polkit-1.mo
@@ -76,29 +71,37 @@ share/locale/ro/LC_MESSAGES/polkit-1.mo
 share/locale/ru/LC_MESSAGES/polkit-1.mo
 share/locale/sk/LC_MESSAGES/polkit-1.mo
 share/locale/sl/LC_MESSAGES/polkit-1.mo
+share/locale/sr/LC_MESSAGES/polkit-1.mo
+share/locale/sr@latin/LC_MESSAGES/polkit-1.mo
 share/locale/sv/LC_MESSAGES/polkit-1.mo
 share/locale/tr/LC_MESSAGES/polkit-1.mo
 share/locale/uk/LC_MESSAGES/polkit-1.mo
 share/locale/zh_CN/LC_MESSAGES/polkit-1.mo
 share/locale/zh_TW/LC_MESSAGES/polkit-1.mo
+%%MANPAGES%%share/man/man1/pkaction.1.gz
+%%MANPAGES%%share/man/man1/pkcheck.1.gz
+%%MANPAGES%%share/man/man1/pkexec.1.gz
+%%MANPAGES%%share/man/man1/pkttyagent.1.gz
 %%MANPAGES%%share/man/man5/polkitd.conf.5.gz
+%%MANPAGES%%share/man/man8/polkit-agent-helper.8.gz
+%%MANPAGES%%share/man/man8/polkit.8.gz
+%%MANPAGES%%share/man/man8/polkitd.8.gz
 share/polkit-1/actions/org.freedesktop.policykit.policy
 share/polkit-1/policyconfig-1.dtd
 share/polkit-1/polkitd.conf
-@dir(polkitd,,700) etc/polkit-1/rules.d
-@dir(polkitd,,700) share/polkit-1/rules.d
-@dir etc/polkit-1/localauthority/90-mandatory.d
-@dir etc/polkit-1/localauthority/50-local.d
-@dir etc/polkit-1/localauthority/30-site.d
-@dir etc/polkit-1/localauthority/20-org.d
 @dir etc/polkit-1/localauthority/10-vendor.d
+@dir etc/polkit-1/localauthority/20-org.d
+@dir etc/polkit-1/localauthority/30-site.d
+@dir etc/polkit-1/localauthority/50-local.d
+@dir etc/polkit-1/localauthority/90-mandatory.d
 @dir(,,700) etc/polkit-1/localauthority
-@dir etc/polkit-1
-@dir /var/lib/polkit-1/localauthority/90-mandatory.d
-@dir /var/lib/polkit-1/localauthority/50-local.d
-@dir /var/lib/polkit-1/localauthority/30-site.d
-@dir /var/lib/polkit-1/localauthority/20-org.d
+@dir(polkitd,,700) etc/polkit-1/rules.d
+@dir(polkitd,,700) share/polkit-1/rules.d
 @dir /var/lib/polkit-1/localauthority/10-vendor.d
+@dir /var/lib/polkit-1/localauthority/20-org.d
+@dir /var/lib/polkit-1/localauthority/30-site.d
+@dir /var/lib/polkit-1/localauthority/50-local.d
+@dir /var/lib/polkit-1/localauthority/90-mandatory.d
 @dir /var/lib/polkit-1/localauthority
 @dir(,,700) /var/lib/polkit-1
 @dir /var/lib