From nobody Fri Jan 06 14:01:35 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NpQ4H4XYGz2r1cj; Fri, 6 Jan 2023 14:01:35 +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 4NpQ4H43ZBz4PwK; Fri, 6 Jan 2023 14:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673013695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3q7JuW+pcQ1exWiUVSXSnd71i8qpRyalBH/70rUzbo=; b=rX/ADnUpbQHIo+pBcK1bHVD2xBnZCbRBwryXVoo63xY1wP4MrbqHCS55djIF9y36KubYRs oiQE3VVgD4ghXP9ZAotADJKPpeJBC3AEA/V4x4hiS5Zc33s/rp1Iy4pQ+Z0uepU2sT4Olu ocRlL0furgjPwURIFHzlodlEokVmOFWsrnzh4Ngh3+VQwhkurO8HNjWWB4zi8FggaoRxkl 1vRQMfcOfcINJSRQlakT20ePBkGzEifX5Y9AlNi4VMtkMeybQi2oCdsuTgaR/r8WHptkta T4nENOhps8h4HI8nwlZXWlExFRasPR+xMsdW0tHy2mdZC+maL4fNav2RYlrdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673013695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3q7JuW+pcQ1exWiUVSXSnd71i8qpRyalBH/70rUzbo=; b=iLbAqieb9kLQ7Z6aRml3SpmoJoN8LrlKravWfmmdQAmz63+lSqJ5ooEar1goQdsHfpJ5Y9 4zc3wrc1AtXOC1HV5a/89AnKkXr855iGZ4M0p3TU7BRxNSkLOvN5+qp9bJoqZgL3CtSiSs vZ1IZE5TQ67OUAZiTNYTsVGMo/wn0zVzYXx0Zs9zkvJgDNaBLvq1gxl/9wveD4sl0XeSz5 upKMH4tGGmI1O5dRPT7zvPHBcleqh2+rAAJs0/9o+0braO4TqNpX+IGRRjF5GHdi96wsCt 5W/WrBFQcMuezB+AL+kErtCHxRE1hokk+GTdDWK9GyFpleUeuEH0P8LyxM4CCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673013695; a=rsa-sha256; cv=none; b=NUB6h7La7+h8BFCFbxd6a0511c1vZeUqYH8C3i9mVQhU4mMgnG2dg8ukCokbQ6zmgJh73e ZpZA6yGP0xn5D5lCHIBASkJPsYw7s+/cj251c0PVWM02c6toRQ9T0HFiLlP3xy5bgcAn3e r1WGJTW4q8a/ixdBhV+Vq3jE1h84AbwIQB1A+xdEZcN4Q/2jooSYGkES60QBqAx4Cok9Bf luENMqWxl950jL74mqLL4eo7CbndjASNwu1GlNz3J6Vr6lTFoMm+5AlRAH6Np50+1dmXHO 6mpymcfLfyW4twOzv2hG8EugPiwL5wSRR0tn9Zou7e63f5IUucT5J0cFnCYwXQ== 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 4NpQ4H36cPzXf0; Fri, 6 Jan 2023 14:01:35 +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 306E1ZRU062455; Fri, 6 Jan 2023 14:01:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 306E1ZxM062454; Fri, 6 Jan 2023 14:01:35 GMT (envelope-from git) Date: Fri, 6 Jan 2023 14:01:35 GMT Message-Id: <202301061401.306E1ZxM062454@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dima Panov Subject: git: 2e8ea81a0df6 - main - sysutils/polkit: update to 122 release (+) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fluffy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e8ea81a0df6d412f98828f4e19fb8160da122f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fluffy: URL: https://cgit.FreeBSD.org/ports/commit/?id=2e8ea81a0df6d412f98828f4e19fb8160da122f0 commit 2e8ea81a0df6d412f98828f4e19fb8160da122f0 Author: Dima Panov AuthorDate: 2023-01-06 13:55:33 +0000 Commit: Dima Panov CommitDate: 2023-01-06 14:01:25 +0000 sysutils/polkit: update to 122 release (+) Add DUKTAPE (set by default) and SPIDERMONKEY options Add support of procctl(2) in pkexec program Differential Revision: https://reviews.freebsd.org/D37137 With hat: desktop --- sysutils/polkit/Makefile | 31 ++++++++++++-------- sysutils/polkit/distinfo | 10 ++----- sysutils/polkit/files/patch-meson.build | 16 +++++------ .../files/patch-src_polkitbackend_meson.build | 19 +++++++++++++ ...-src_polkitbackend_polkitbackendjsauthority.cpp | 33 ---------------------- sysutils/polkit/files/patch-src_programs_pkexec.c | 33 ++++++++++++++++++++++ sysutils/polkit/pkg-plist | 3 ++ 7 files changed, 85 insertions(+), 60 deletions(-) diff --git a/sysutils/polkit/Makefile b/sysutils/polkit/Makefile index 4252c990f7f2..60185ef5d60e 100644 --- a/sysutils/polkit/Makefile +++ b/sysutils/polkit/Makefile @@ -1,12 +1,8 @@ PORTNAME= polkit -PORTVERSION= 0.120 -PORTREVISION= 2 +PORTVERSION= 122 CATEGORIES= sysutils gnome -MASTER_SITES= https://www.freedesktop.org/software/polkit/releases/ - -PATCH_SITES= https://gitlab.freedesktop.org/${PORTNAME}/${PORTNAME}/-/commit/ -PATCHFILES+= e7f3d9e8341d.patch:-p1 # https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/99 -PATCHFILES+= a2bf5c9c83b6.patch:-p1 # https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/104 (CVE-2021-4034) +MASTER_SITES= https://www.freedesktop.org/software/polkit/releases/ \ + https://gitlab.freedesktop.org/${PORTNAME}/${PORTNAME}/-/archive/${PORTVERSION}/ MAINTAINER= desktop@FreeBSD.org COMMENT= Framework for controlling access to system-wide components @@ -16,13 +12,12 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libexpat.so:textproc/expat2 \ - libdbus-1.so:devel/dbus \ - libmozjs-91.so:lang/spidermonkey91 + libdbus-1.so:devel/dbus USERS= polkitd GROUPS= polkitd -USES= compiler:c++11-lib cpe gettext gnome libtool localbase meson \ +USES= compiler:c++17-lang cpe gettext gnome libtool localbase meson \ pathfix pkgconfig shebangfix USE_GNOME= glib20 intltool introspection:build SHEBANG_FILES= ${WRKSRC}/src/polkitbackend/toarray.pl @@ -38,9 +33,21 @@ MESON_ARGS= -Dpam_include=system \ -Dlocalstatedir=/var \ -Dgtk_doc=false -INSTALL_TARGET= install-strip - 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-102.so:lang/spidermonkey102 +SPIDERMONKEY_MESON_ON= -Djs_engine='mozjs' MANPAGES_BUILD_DEPENDS= docbook-sgml>=4.5:textproc/docbook-sgml \ docbook-xsl>=1.76:textproc/docbook-xsl diff --git a/sysutils/polkit/distinfo b/sysutils/polkit/distinfo index 839b6c439a75..66975b24dc9b 100644 --- a/sysutils/polkit/distinfo +++ b/sysutils/polkit/distinfo @@ -1,7 +1,3 @@ -TIMESTAMP = 1656189343 -SHA256 (polkit-0.120.tar.gz) = ee7a599a853117bf273548725719fa92fabd2f136915c7a4906cee98567aee03 -SIZE (polkit-0.120.tar.gz) = 1626659 -SHA256 (e7f3d9e8341d.patch) = 9a84b59d38b3f86c70c5fc3a28cbfe8d7a22cf190eb20ff433f7f53f5ff73a9a -SIZE (e7f3d9e8341d.patch) = 1201 -SHA256 (a2bf5c9c83b6.patch) = 5930a48bf4262a7c89f8737a1a5a648bd41cfdb6476dcca1140cba6555b67d2c -SIZE (a2bf5c9c83b6.patch) = 2070 +TIMESTAMP = 1666804675 +SHA256 (polkit-122.tar.gz) = 0d69656d60800835c3d7d1f0a8362b32e1ae3ace2875a35bb624296fc52d5dc4 +SIZE (polkit-122.tar.gz) = 744767 diff --git a/sysutils/polkit/files/patch-meson.build b/sysutils/polkit/files/patch-meson.build index 260fe5aafd82..74e14902a24e 100644 --- a/sysutils/polkit/files/patch-meson.build +++ b/sysutils/polkit/files/patch-meson.build @@ -1,11 +1,11 @@ ---- meson.build.orig 2021-09-29 19:16:29 UTC +--- meson.build.orig 2022-10-26 12:12:24 UTC +++ meson.build -@@ -133,10 +133,10 @@ assert(cc.has_function('XML_ParserCreate', dependencie - assert(cc.has_header('expat.h', dependencies: expat_dep), 'Can\'t find expat.h. Please install expat.') - assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t find expat library. Please install expat.') - --mozjs_dep = dependency('mozjs-78') -+mozjs_dep = dependency('mozjs-91') +@@ -154,10 +154,11 @@ if js_engine == 'duktape' + config_h.set('HAVE_' + func.to_upper(), cc.has_function(func, prefix : '#include ')) + elif js_engine == 'mozjs' + js_dep = dependency('mozjs-102') ++ config_h.set('__BSD_VISIBLE', 1) + endif dbus_dep = dependency('dbus-1', required: false) -dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d' @@ -13,7 +13,7 @@ if dbus_dep.found() dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir]) else -@@ -329,15 +329,6 @@ configure_file( +@@ -358,15 +359,6 @@ endif configure_file( output: 'config.h', configuration: config_h, diff --git a/sysutils/polkit/files/patch-src_polkitbackend_meson.build b/sysutils/polkit/files/patch-src_polkitbackend_meson.build new file mode 100644 index 000000000000..7190e505d15c --- /dev/null +++ b/sysutils/polkit/files/patch-src_polkitbackend_meson.build @@ -0,0 +1,19 @@ +--- src/polkitbackend/meson.build.orig 2022-10-26 12:12:24 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', +- install_dir: pk_pkgdatadir / 'rules.d', ++ install_dir: pk_pkgsysconfdir / 'rules.d', + ) + + program = 'polkitd' diff --git a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendjsauthority.cpp b/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendjsauthority.cpp deleted file mode 100644 index a8f47c895e8f..000000000000 --- a/sysutils/polkit/files/patch-src_polkitbackend_polkitbackendjsauthority.cpp +++ /dev/null @@ -1,33 +0,0 @@ ---- src/polkitbackend/polkitbackendjsauthority.cpp.orig 2022-06-25 20:41:05 UTC -+++ src/polkitbackend/polkitbackendjsauthority.cpp -@@ -75,6 +75,13 @@ - - /* ---------------------------------------------------------------------------------------------------- */ - -+static class JsInitHelperType -+{ -+public: -+ JsInitHelperType() { JS_Init(); } -+ ~JsInitHelperType() { JS_ShutDown(); } -+} JsInitHelper; -+ - struct _PolkitBackendJsAuthorityPrivate - { - gchar **rules_dirs; -@@ -589,7 +596,6 @@ polkit_backend_js_authority_finalize (GObject *object) - delete authority->priv->js_polkit; - - JS_DestroyContext (authority->priv->cx); -- /* JS_ShutDown (); */ - - G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object); - } -@@ -665,8 +671,6 @@ polkit_backend_js_authority_class_init (PolkitBackendJ - - - g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate)); -- -- JS_Init (); - } - - /* ---------------------------------------------------------------------------------------------------- */ diff --git a/sysutils/polkit/files/patch-src_programs_pkexec.c b/sysutils/polkit/files/patch-src_programs_pkexec.c new file mode 100644 index 000000000000..47fed9033d8a --- /dev/null +++ b/sysutils/polkit/files/patch-src_programs_pkexec.c @@ -0,0 +1,33 @@ +--- src/programs/pkexec.c.orig 2022-07-11 08:46:06 UTC ++++ src/programs/pkexec.c +@@ -37,6 +37,11 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++#include ++#include ++#endif ++ + #include + + #ifdef POLKIT_AUTHFW_PAM +@@ -729,10 +734,17 @@ main (int argc, char *argv[]) + } + + /* make sure we are nuked if the parent process dies */ +-#ifdef __linux__ ++#if defined(__linux__) + if (prctl (PR_SET_PDEATHSIG, SIGTERM) != 0) + { + g_printerr ("prctl(PR_SET_PDEATHSIG, SIGTERM) failed: %s\n", g_strerror (errno)); ++ goto out; ++ } ++#elif defined(__FreeBSD__) ++ int _sig = SIGTERM; ++ if (procctl (P_PID, 0, PROC_PDEATHSIG_CTL, &_sig) != 0) ++ { ++ g_printerr ("procctl(2) failed: %s\n", g_strerror (errno)); + goto out; + } + #else diff --git a/sysutils/polkit/pkg-plist b/sysutils/polkit/pkg-plist index f6ad72a65d8e..c1a23766792f 100644 --- a/sysutils/polkit/pkg-plist +++ b/sysutils/polkit/pkg-plist @@ -63,6 +63,8 @@ share/locale/hr/LC_MESSAGES/polkit-1.mo 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/nl/LC_MESSAGES/polkit-1.mo share/locale/nn/LC_MESSAGES/polkit-1.mo share/locale/pl/LC_MESSAGES/polkit-1.mo share/locale/pt/LC_MESSAGES/polkit-1.mo @@ -75,6 +77,7 @@ 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 share/polkit-1/actions/org.freedesktop.policykit.policy +share/polkit-1/policyconfig-1.dtd @dir(polkitd,,700) etc/polkit-1/rules.d @dir(polkitd,,700) share/polkit-1/rules.d @dir etc/polkit-1/localauthority/90-mandatory.d