Date: Wed, 07 Jan 2026 09:28:18 +0000 Message-ID: <695e2732.c39c.72d607c6@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=23ea6c9b59e84195eedec2b904463ee8967c4ac3 commit 23ea6c9b59e84195eedec2b904463ee8967c4ac3 Author: Olivier Duchateau <duchateau.olivier@gmail.com> AuthorDate: 2025-12-18 19:34:58 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2026-01-07 09:28:09 +0000 sysutils/polkit: update to 127 PR: 291781 Co-authored-by: Gleb Popov <arrowd@FreeBSD.org> --- sysutils/polkit/Makefile | 33 +++----- sysutils/polkit/distinfo | 6 +- sysutils/polkit/files/patch-docs_man_polkit.xml | 78 +++++++++-------- .../files/patch-src_polkit_polkitunixsession.c | 12 +-- .../patch-src_polkitagent_polkitagenthelper-pam.c | 27 ++++++ .../files/patch-src_polkitbackend_meson.build | 18 ++-- ...src_polkitbackend_polkitbackendsessionmonitor.c | 8 +- ...test_data_etc_polkit-1_rules.d_10-testing.rules | 4 +- sysutils/polkit/files/patch-test_wrapper.py | 97 +++++----------------- sysutils/polkit/pkg-plist | 4 + 10 files changed, 118 insertions(+), 169 deletions(-) diff --git a/sysutils/polkit/Makefile b/sysutils/polkit/Makefile index 2a768cb721d8..c713bb5a77d1 100644 --- a/sysutils/polkit/Makefile +++ b/sysutils/polkit/Makefile @@ -1,6 +1,5 @@ PORTNAME= polkit -DISTVERSION= 125 -PORTREVISION= 1 +DISTVERSION= 127 CATEGORIES= sysutils gnome MAINTAINER= desktop@FreeBSD.org @@ -11,7 +10,8 @@ LICENSE= LGPL20+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libexpat.so:textproc/expat2 \ - libdbus-1.so:devel/dbus + libdbus-1.so:devel/dbus \ + libduktape.so:lang/duktape-lib TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \ ${LOCALBASE}/sbin/console-kit-daemon:sysutils/consolekit2 @@ -19,13 +19,13 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR} \ USERS= polkitd GROUPS= polkitd -USES= compiler:c++17-lang cpe dbus-testing gettext gnome localbase \ - meson pathfix pkgconfig python:test shebangfix tar:bz2 -USE_GNOME= glib20 intltool introspection:build +USES= compiler:c++17-lang cpe dbus-testing gettext-tools gnome \ + localbase meson pathfix perl5 pkgconfig python:test shebangfix +USE_GNOME= glib20 introspection:build SHEBANG_FILES= src/polkitbackend/toarray.pl \ test/wrapper.py - USE_LDCONFIG= yes +USE_PERL5= build CPE_VENDOR= polkit_project USE_GITHUB= yes @@ -38,31 +38,18 @@ MESON_ARGS= -Dpam_include=system \ -Dsession_tracking=ConsoleKit \ -Dtests=true \ -Dintrospection=true \ - -Dgtk_doc=false + -Dgtk_doc=false \ + -Dgettext=true OPTIONS_DEFINE= MANPAGES -OPTIONS_DEFAULT= DUKTAPE - -OPTIONS_SINGLE= JS -OPTIONS_SINGLE_JS= DUKTAPE SPIDERMONKEY - -JS_DESC= JavaScript engines -DUKTAPE_DESC= Duktape JavaScript backend -SPIDERMONKEY_DESC= SpiderMonkey JavaScript backend - -DUKTAPE_LIB_DEPENDS= libduktape.so:lang/duktape-lib -DUKTAPE_MESON_ON= -Djs_engine='duktape' -SPIDERMONKEY_LIB_DEPENDS= libmozjs-115.so:lang/spidermonkey115 -SPIDERMONKEY_MESON_ON= -Djs_engine='mozjs' +OPTIONS_SUB= yes MANPAGES_BUILD_DEPENDS= docbook-sgml>0:textproc/docbook-sgml \ docbook-xsl>0:textproc/docbook-xsl MANPAGES_USE= gnome=libxslt:build MANPAGES_MESON_TRUE= man -OPTIONS_SUB= yes - .ifdef ALLOW_SYSTEM_AFFECTING_TESTS TEST_ENV+= ALLOW_SYSTEM_AFFECTING_TESTS=1 .endif diff --git a/sysutils/polkit/distinfo b/sysutils/polkit/distinfo index 70ea00eef283..6e31d3b7fd8e 100644 --- a/sysutils/polkit/distinfo +++ b/sysutils/polkit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1725097769 -SHA256 (polkit-org-polkit-125_GH0.tar.gz) = ea5cd6e6e2afa6bad938ee770bf0c2cd9317910f37956faeba2869adcf3747d1 -SIZE (polkit-org-polkit-125_GH0.tar.gz) = 453652 +TIMESTAMP = 1766007520 +SHA256 (polkit-org-polkit-127_GH0.tar.gz) = 9b7bc16f086479dcc626c575976568ba4a85d34297a750d8ab3d2e57f6d8b988 +SIZE (polkit-org-polkit-127_GH0.tar.gz) = 472872 diff --git a/sysutils/polkit/files/patch-docs_man_polkit.xml b/sysutils/polkit/files/patch-docs_man_polkit.xml index 674c65c30674..1804686e0c16 100644 --- a/sysutils/polkit/files/patch-docs_man_polkit.xml +++ b/sysutils/polkit/files/patch-docs_man_polkit.xml @@ -1,22 +1,26 @@ ---- docs/man/polkit.xml.orig 2018-01-20 14:00:19 UTC +--- docs/man/polkit.xml.orig 2025-12-17 16:14:53 UTC +++ docs/man/polkit.xml -@@ -104,12 +104,12 @@ System Context | | +@@ -104,17 +104,15 @@ +------------------+ | +------------------+ | ^ | - | +--------------------------------------+ -- | | /usr/share/polkit-1/actions/*.policy | -+ | | %%LOCALBASE%%/share/polkit-1/actions/*.policy | - | +--------------------------------------+ + | +--------------------------------------------+ +- | | /etc/polkit-1/actions/*.policy | ++ | | %%LOCALBASE%%/etc/polkit-1/actions/*.policy | + | | /run/polkit-1/actions/*.policy | + | | /usr/local/share/polkit-1/actions/*.policy | +- | | /usr/share/polkit-1/actions/*.policy | + | +--------------------------------------------+ | - +--------------------------------------+ -- | /etc/polkit-1/rules.d/*.rules | -- | /usr/share/polkit-1/rules.d/*.rules | -+ | %%LOCALBASE%%/etc/polkit-1/rules.d/*.rules | -+ | %%LOCALBASE%%/share/polkit-1/rules.d/*.rules | - +--------------------------------------+ + +--------------------------------------------+ +- | /etc/polkit-1/rules.d/*.rules | ++ | %%LOCALBASE%%/etc/polkit-1/rules.d/*.rules | + | /run/polkit-1/rules.d/*.rules | + | /usr/local/share/polkit-1/rules.d/*.rules | +- | /usr/share/polkit-1/rules.d/*.rules | + +--------------------------------------------+ ]]></programlisting> </textobject> -@@ -217,7 +217,7 @@ System Context | | +@@ -222,7 +220,7 @@ +----------------------------------------------------- order to use polkit. Actions correspond to operations that clients can request the mechanism to carry out and are defined in XML files that the mechanism installs into the <filename @@ -25,37 +29,31 @@ directory. </para> -@@ -473,21 +473,21 @@ System Context | | +@@ -481,10 +479,9 @@ +----------------------------------------------------- + directories in this order: + </para> + <itemizedlist mark='opencircle' spacing='compact'> +- <listitem><para><filename>/etc/polkit-1/rules.d</filename></para></listitem> ++ <listitem><para><filename>%%LOCALBASE%%/etc/polkit-1/rules.d</filename></para></listitem> + <listitem><para><filename>/run/polkit-1/rules.d</filename></para></listitem> + <listitem><para><filename>/usr/local/share/polkit-1/rules.d</filename></para></listitem> +- <listitem><para><filename>/usr/share/polkit-1/rules.d</filename></para></listitem> + </itemizedlist> <para> - <command>polkitd</command> reads - <filename class='extension'>.rules</filename> files from the -- <filename class='directory'>/etc/polkit-1/rules.d</filename> and -- <filename class='directory'>/usr/share/polkit-1/rules.d</filename> -+ <filename class='directory'>%%LOCALBASE%%/etc/polkit-1/rules.d</filename> and -+ <filename class='directory'>%%LOCALBASE%%/share/polkit-1/rules.d</filename> - directories by sorting the files in lexical order based on the - basename on each file (if there's a tie, files in -- <filename class='directory'>/etc</filename> -+ <filename class='directory'>%%LOCALBASE%%/etc</filename> - are processed before files in -- <filename class='directory'>/usr</filename>). -+ <filename class='directory'>%%LOCALBASE%%/share</filename>). - For example, for the following four - files, the order is + These directories are processed in lexical order based on the basename +@@ -493,10 +490,9 @@ +----------------------------------------------------- + files, the order is: </para> <itemizedlist mark='opencircle' spacing='compact'> - <listitem><para><filename>/etc/polkit-1/rules.d/10-auth.rules</filename></para></listitem> -- <listitem><para><filename>/usr/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem> -- <listitem><para><filename>/etc/polkit-1/rules.d/15-auth.rules</filename></para></listitem> -- <listitem><para><filename>/usr/share/polkit-1/rules.d/20-auth.rules</filename></para></listitem> + <listitem><para><filename>%%LOCALBASE%%/etc/polkit-1/rules.d/10-auth.rules</filename></para></listitem> -+ <listitem><para><filename>%%LOCALBASE%%/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem> -+ <listitem><para><filename>%%LOCALBASE%%/etc/polkit-1/rules.d/15-auth.rules</filename></para></listitem> -+ <listitem><para><filename>%%LOCALBASE%%/share/polkit-1/rules.d/20-auth.rules</filename></para></listitem> + <listitem><para><filename>/run/polkit-1/rules.d/10-auth.rules</filename></para></listitem> + <listitem><para><filename>/usr/local/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem> +- <listitem><para><filename>/usr/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem> </itemizedlist> <para> - Both directories are monitored so if a rules file is changed, -@@ -567,7 +567,7 @@ System Context | | + All of these directories are monitored, so if a rules file is changed, +@@ -576,7 +572,7 @@ +----------------------------------------------------- called in the order they have been added until one of the functions returns a value. Hence, to add an authorization rule that is processed before other rules, put it in a file in @@ -64,18 +62,18 @@ with a name that sorts before other rules files, for example <filename>00-early-checks.rules</filename>. Each function should return a value from <literal>polkit.Result</literal> -@@ -683,8 +683,8 @@ polkit.addRule(function(action, subject) { +@@ -692,8 +688,8 @@ polkit.addRule(function(action, subject) { will produce the following when the user runs 'pkexec -u bateman bash -i' from a shell: </para> <programlisting><![CDATA[ -May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/usr/bin/bash -i' program='/usr/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)'] -May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:4: subject=[Subject pid=1352 user='davidz' groups=davidz,wheel, seat='seat0' session='1' local=true active=true] -+May 24 14:28:50 thinkpad polkitd[32217]: %%LOCALBASE%%/etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/usr/bin/bash -i' program='/usr/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)'] ++May 24 14:28:50 thinkpad polkitd[32217]: %%LOCALBASE%%/etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='%%LOCALBASE%%/bin/bash -i' program='%%LOCALBASE%%/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)'] +May 24 14:28:50 thinkpad polkitd[32217]: %%LOCALBASE%%/etc/polkit-1/rules.d/10-test.rules:4: subject=[Subject pid=1352 user='davidz' groups=davidz,wheel, seat='seat0' session='1' local=true active=true] ]]></programlisting> </refsect2> -@@ -916,7 +916,7 @@ polkit.addRule(function(action, subject) { +@@ -960,7 +956,7 @@ polkit.addRule(function(action, subject) { <programlisting><![CDATA[ polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.policykit.exec" && diff --git a/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c b/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c index 6367e0e5c6b6..56e196d6df16 100644 --- a/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c +++ b/sysutils/polkit/files/patch-src_polkit_polkitunixsession.c @@ -1,9 +1,9 @@ FreeBSD ConsoleKit is patched to return proper IDs instead D-Bus paths, so adapt Polkit to this case. ---- src/polkit/polkitunixsession.c.orig 2023-07-28 12:34:38 UTC +--- src/polkit/polkitunixsession.c.orig 2025-12-17 16:14:53 UTC +++ src/polkit/polkitunixsession.c -@@ -364,6 +364,7 @@ polkit_unix_session_exists_sync (PolkitSubject *subj +@@ -360,6 +360,7 @@ polkit_unix_session_exists_sync (PolkitSubject *subj PolkitUnixSession *session = POLKIT_UNIX_SESSION (subject); GDBusConnection *connection; GVariant *result; @@ -11,7 +11,7 @@ adapt Polkit to this case. gboolean ret; ret = FALSE; -@@ -372,9 +373,12 @@ polkit_unix_session_exists_sync (PolkitSubject *subj +@@ -368,9 +369,12 @@ polkit_unix_session_exists_sync (PolkitSubject *subj if (connection == NULL) goto out; @@ -25,7 +25,7 @@ adapt Polkit to this case. "org.freedesktop.ConsoleKit.Session", /* interface name */ "GetUser", /* method */ NULL, /* parameters */ -@@ -383,6 +387,7 @@ polkit_unix_session_exists_sync (PolkitSubject *subj +@@ -379,6 +383,7 @@ polkit_unix_session_exists_sync (PolkitSubject *subj -1, cancellable, error); @@ -33,7 +33,7 @@ adapt Polkit to this case. if (result == NULL) goto out; -@@ -472,6 +477,7 @@ polkit_unix_session_initable_init (GInitable *init +@@ -468,6 +473,7 @@ polkit_unix_session_initable_init (GInitable *init PolkitUnixSession *session = POLKIT_UNIX_SESSION (initable); GDBusConnection *connection; GVariant *result; @@ -41,7 +41,7 @@ adapt Polkit to this case. gboolean ret; connection = NULL; -@@ -502,7 +508,8 @@ polkit_unix_session_initable_init (GInitable *init +@@ -498,7 +504,8 @@ polkit_unix_session_initable_init (GInitable *init if (result == NULL) goto out; diff --git a/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c b/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c new file mode 100644 index 000000000000..0f1a0d673da8 --- /dev/null +++ b/sysutils/polkit/files/patch-src_polkitagent_polkitagenthelper-pam.c @@ -0,0 +1,27 @@ +--- 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_meson.build b/sysutils/polkit/files/patch-src_polkitbackend_meson.build index 7190e505d15c..6bf91cba7eeb 100644 --- a/sysutils/polkit/files/patch-src_polkitbackend_meson.build +++ b/sysutils/polkit/files/patch-src_polkitbackend_meson.build @@ -1,17 +1,9 @@ ---- src/polkitbackend/meson.build.orig 2022-10-26 12:12:24 UTC +--- src/polkitbackend/meson.build.orig 2025-12-17 16:14:53 UTC +++ src/polkitbackend/meson.build -@@ -30,7 +30,6 @@ c_flags = [ - '-DPACKAGE_DATA_DIR="@0@"'.format(pk_prefix / pk_datadir), - '-DPACKAGE_SYSCONF_DIR="@0@"'.format(pk_prefix / pk_sysconfdir), - '-D_XOPEN_SOURCE=700', -- '-D_GNU_SOURCE=1', - ] - - if js_engine == 'duktape' -@@ -61,7 +60,7 @@ libpolkit_backend = static_library( - - install_data( - '50-default.rules', +@@ -58,7 +58,7 @@ configure_file( + 'PRIVILEGED_GROUP': privileged_group, + }, + install: true, - install_dir: pk_pkgdatadir / 'rules.d', + install_dir: pk_pkgsysconfdir / 'rules.d', ) diff --git a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c b/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c index 216f00b94e58..3d1f73ebe13f 100644 --- a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c +++ b/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendsessionmonitor.c @@ -1,9 +1,9 @@ FreeBSD ConsoleKit is patched to return proper IDs instead D-Bus paths, so adapt Polkit to this case. ---- src/polkitbackend/polkitbackendsessionmonitor.c.orig 2023-07-28 12:34:38 UTC +--- src/polkitbackend/polkitbackendsessionmonitor.c.orig 2025-12-17 16:14:53 UTC +++ src/polkitbackend/polkitbackendsessionmonitor.c -@@ -385,7 +385,7 @@ polkit_backend_session_monitor_get_session_for_subject +@@ -384,7 +384,7 @@ polkit_backend_session_monitor_get_session_for_subject if (POLKIT_IS_UNIX_PROCESS (subject)) { @@ -12,7 +12,7 @@ adapt Polkit to this case. GVariant *result; result = g_dbus_connection_call_sync (monitor->system_bus, "org.freedesktop.ConsoleKit", -@@ -400,14 +400,16 @@ polkit_backend_session_monitor_get_session_for_subject +@@ -399,14 +399,16 @@ polkit_backend_session_monitor_get_session_for_subject error); if (result == NULL) goto out; @@ -31,7 +31,7 @@ adapt Polkit to this case. GVariant *result; result = g_dbus_connection_call_sync (monitor->system_bus, -@@ -439,8 +441,10 @@ polkit_backend_session_monitor_get_session_for_subject +@@ -438,8 +440,10 @@ polkit_backend_session_monitor_get_session_for_subject error); if (result == NULL) goto out; 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 index 4a3a5ed805fd..90dbb673529f 100644 --- 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 @@ -1,6 +1,6 @@ ---- test/data/etc/polkit-1/rules.d/10-testing.rules.orig 2024-08-08 13:12:35 UTC +--- 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 -@@ -152,7 +152,7 @@ polkit.addRule(function(action, subject) { +@@ -162,7 +162,7 @@ polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) { if (action.id == "net.company.spawning.helper_with_output") { try { diff --git a/sysutils/polkit/files/patch-test_wrapper.py b/sysutils/polkit/files/patch-test_wrapper.py index 50746895bb9b..c2661cb03a84 100644 --- a/sysutils/polkit/files/patch-test_wrapper.py +++ b/sysutils/polkit/files/patch-test_wrapper.py @@ -1,6 +1,6 @@ ---- test/wrapper.py.orig 2026-01-04 14:26:35 UTC +--- test/wrapper.py.orig 2026-01-07 09:02:36 UTC +++ test/wrapper.py -@@ -3,8 +3,13 @@ import os +@@ -3,7 +3,9 @@ import os import argparse import atexit import os @@ -8,79 +8,26 @@ import subprocess +import shutil import sys -+import signal -+import time -+import errno - - import dbus - import dbus.mainloop.glib -@@ -17,18 +22,85 @@ def setup_test_namespace(data_dir): - # Setup a new mount & user namespace, so we can use mount() unprivileged (see user_namespaces(7)) - euid = os.geteuid() - egid = os.getegid() -- os.unshare(os.CLONE_NEWNS|os.CLONE_NEWUSER) -- # Map root to the original EUID and EGID, so we can actually call mount() inside our namespace -- with open("/proc/self/uid_map", "w") as f: -- f.write(f"0 {euid} 1") -- with open("/proc/self/setgroups", "w") as f: -- f.write("deny") -- with open("/proc/self/gid_map", "w") as f: -- f.write(f"0 {egid} 1") -+ try: -+ os.unshare(os.CLONE_NEWNS|os.CLONE_NEWUSER) -+ # Map root to the original EUID and EGID, so we can actually call mount() inside our namespace -+ with open("/proc/self/uid_map", "w") as f: -+ f.write(f"0 {euid} 1") -+ with open("/proc/self/setgroups", "w") as f: -+ f.write("deny") -+ with open("/proc/self/gid_map", "w") as f: -+ f.write(f"0 {egid} 1") - -- # Overmount /etc with our own version -- subprocess.check_call(["mount", "--bind", os.path.join(data_dir, "etc"), "/etc"]) -+ # Overmount /etc with our own version -+ subprocess.check_call(["mount", "--bind", os.path.join(data_dir, "etc"), "/etc"]) -+ except PermissionError: -+ print("Lacking permissions to set up test harness, skipping") + 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") + 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: -+ """Stop a D-Bus daemon -+ -+ If DBus daemon is not explicitly killed in the testing environment -+ the test times out and reports as failed. -+ This is a backport of a function dropped from DBusMock source (99c4800e9eed). -+ """ -+ signal.signal(signal.SIGTERM, signal.SIG_IGN) -+ for _ in range(50): -+ try: -+ os.kill(pid, signal.SIGTERM) -+ os.waitpid(pid, os.WNOHANG) -+ except ChildProcessError: -+ break -+ except OSError as e: -+ if e.errno == errno.ESRCH: -+ break -+ raise -+ time.sleep(0.1) -+ else: -+ sys.stderr.write("ERROR: timed out waiting for bus process to terminate\n") -+ os.kill(pid, signal.SIGKILL) -+ try: -+ os.waitpid(pid, 0) -+ except ChildProcessError: -+ pass -+ signal.signal(signal.SIGTERM, signal.SIG_DFL) -+ -+ -+def setup_test_unconstrained_linux(data_dir): -+ shutil.copytree(os.path.join(data_dir, "etc"), "/etc", dirs_exist_ok=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: @@ -110,7 +57,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("test_executable", -@@ -39,12 +111,20 @@ if __name__ == "__main__": +@@ -79,7 +108,15 @@ if __name__ == "__main__": help="set up a mock system D-Bus using dbusmock") args = parser.parse_args() @@ -127,9 +74,3 @@ if args.mock_dbus: dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - dbusmock.DBusTestCase.start_system_bus() -- atexit.register(dbusmock.DBusTestCase.stop_dbus, dbusmock.DBusTestCase.system_bus_pid) -+ atexit.register(stop_dbus, dbusmock.DBusTestCase.system_bus_pid) - - print(f"Executing '{args.test_executable}'") - sys.stdout.flush() diff --git a/sysutils/polkit/pkg-plist b/sysutils/polkit/pkg-plist index 406c2b4cc403..63e089e2bd5b 100644 --- a/sysutils/polkit/pkg-plist +++ b/sysutils/polkit/pkg-plist @@ -56,6 +56,7 @@ share/gettext/its/polkit.its share/gettext/its/polkit.loc share/gir-1.0/Polkit-1.0.gir share/gir-1.0/PolkitAgent-1.0.gir +share/locale/bg/LC_MESSAGES/polkit-1.mo share/locale/cs/LC_MESSAGES/polkit-1.mo share/locale/da/LC_MESSAGES/polkit-1.mo share/locale/de/LC_MESSAGES/polkit-1.mo @@ -67,6 +68,7 @@ share/locale/it/LC_MESSAGES/polkit-1.mo share/locale/ka/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 share/locale/pl/LC_MESSAGES/polkit-1.mo share/locale/pt/LC_MESSAGES/polkit-1.mo share/locale/pt_BR/LC_MESSAGES/polkit-1.mo @@ -79,8 +81,10 @@ 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/man5/polkitd.conf.5.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.dhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695e2732.c39c.72d607c6>
