Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132151511
D35825.id109990.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D35825.id109990.diff
View Options
Index: sysutils/polkit/Makefile
===================================================================
--- sysutils/polkit/Makefile
+++ sysutils/polkit/Makefile
@@ -1,13 +1,8 @@
PORTNAME= polkit
-PORTVERSION= 0.120
-PORTREVISION= 2
+PORTVERSION= 121
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)
-
MAINTAINER= desktop@FreeBSD.org
COMMENT= Framework for controlling access to system-wide components
@@ -15,19 +10,20 @@
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
USE_LDCONFIG= yes
CPE_VENDOR= polkit_project
+WRKSRC= ${WRKDIR}/${PORTNAME}-v.${PORTVERSION}
+
MESON_ARGS= -Dpam_include=system \
-Dpolkitd_user=${USERS} \
-Dexamples=false \
@@ -37,9 +33,21 @@
-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-91.so:lang/spidermonkey91
+SPIDERMONKEY_MESON_ON= -Djs_engine='mozjs'
MANPAGES_BUILD_DEPENDS= docbook-sgml>=4.5:textproc/docbook-sgml \
docbook-xsl>=1.76:textproc/docbook-xsl
Index: sysutils/polkit/distinfo
===================================================================
--- sysutils/polkit/distinfo
+++ sysutils/polkit/distinfo
@@ -1,7 +1,5 @@
-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 = 1657804482
+SHA256 (polkit-121.tar.gz) = 9dc7ae341a797c994a5a36da21963f0c5c8e3e5a1780ccc2a5f52e7be01affaa
+SIZE (polkit-121.tar.gz) = 743287
+SHA256 (b57deee81781.patch) = f210c62604203e9ae20cc4ce7c65c08ed2b5904ba64aa9fd7a339bccdb2240de
+SIZE (b57deee81781.patch) = 8871
Index: sysutils/polkit/files/patch-meson.build
===================================================================
--- sysutils/polkit/files/patch-meson.build
+++ sysutils/polkit/files/patch-meson.build
@@ -1,11 +1,11 @@
---- meson.build.orig 2021-09-29 19:16:29 UTC
+--- meson.build.orig 2022-07-11 08:46:06 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')
+@@ -148,10 +148,11 @@ if js_engine == 'duktape'
+ config_h.set('HAVE_' + func.to_upper(), cc.has_function(func, prefix : '#include <pthread.h>'))
+ elif js_engine == 'mozjs'
+ js_dep = dependency('mozjs-91')
++ 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(
+@@ -344,15 +345,6 @@ endif
configure_file(
output: 'config.h',
configuration: config_h,
Index: sysutils/polkit/files/patch-src_polkitbackend_meson.build
===================================================================
--- /dev/null
+++ sysutils/polkit/files/patch-src_polkitbackend_meson.build
@@ -0,0 +1,10 @@
+--- src/polkitbackend/meson.build.orig 2022-07-11 08:46:06 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'
Index: sysutils/polkit/files/patch-src_programs_pkexec.c
===================================================================
--- /dev/null
+++ 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 <sys/prctl.h>
+ #endif
+
++#ifdef __FreeBSD__
++#include <signal.h>
++#include <sys/procctl.h>
++#endif
++
+ #include <glib/gi18n.h>
+
+ #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
Index: sysutils/polkit/pkg-plist
===================================================================
--- sysutils/polkit/pkg-plist
+++ sysutils/polkit/pkg-plist
@@ -63,6 +63,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/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 +76,7 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 15, 5:47 AM (10 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23744693
Default Alt Text
D35825.id109990.diff (6 KB)
Attached To
Mode
D35825: sysutils/polkit: Update to 121
Attached
Detach File
Event Timeline
Log In to Comment