d748bb4658
If the $LOCALBASE/etc/polkit-1 directory is owned by root and set 700, then polkit which is running as the polkitd user cannot read the config files in $LOCALBASE/etc/polkit-1/rules.d/* resulting in this error: Loading rules from directory /usr/local/etc/polkit-1/rules.d Error opening rules directory: Error opening directory \ '/usr/local/etc/polkit-1/rules.d': Permission denied \ (g-file-error-quark, 2) Loading rules from directory /usr/local/share/polkit-1/rules.d To fix this, change the $LOCALBASE/etc/polkit-1 to be set 755, and the $LOCALBASE/etc/polkit-1/localauthority to be set 700. This was sense checked with Fedora Linux which does the same, and with Debian/Ubuntu which have /etc/polkit-1/localauthority as owned by root:polkitd and set 750. PR: 202615 Reported by: rozhuk.im@gmail.com
75 lines
2.1 KiB
Makefile
75 lines
2.1 KiB
Makefile
# Created by: Koop Mast<kwm@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= polkit
|
|
PORTVERSION= 0.113
|
|
PORTREVISION= 3
|
|
CATEGORIES= sysutils gnome
|
|
MASTER_SITES= http://www.freedesktop.org/software/polkit/releases/
|
|
|
|
MAINTAINER= gnome@FreeBSD.org
|
|
COMMENT= Framework for controlling access to system-wide components
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
LIB_DEPENDS= libexpat.so:textproc/expat2 \
|
|
libmozjs-17.0.so:lang/spidermonkey170
|
|
RUN_DEPENDS= dbus-launch:devel/dbus
|
|
|
|
USERS= polkitd
|
|
GROUPS= polkitd
|
|
|
|
USE_GNOME= glib20 intlhack introspection:build
|
|
USES= gettext gmake libtool pathfix pkgconfig shebangfix
|
|
SHEBANG_FILES= ${WRKSRC}/src/polkitbackend/toarray.pl
|
|
GNU_CONFIGURE= yes
|
|
USE_LDCONFIG= yes
|
|
CONFIGURE_ARGS= --disable-gtk-doc-html \
|
|
--without-html-dir \
|
|
--with-authfw=pam \
|
|
--with-pam-include=system \
|
|
--with-os-type=freebsd \
|
|
--with-polkitd-user=${USERS} \
|
|
--disable-static \
|
|
--disable-examples \
|
|
--with-mozjs=mozjs-17.0 \
|
|
--disable-libsystemd-login \
|
|
--disable-test \
|
|
--enable-introspection=yes \
|
|
--localstatedir=/var
|
|
#MAKE_JOBS_UNSAFE=yes
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
INSTALL_TARGET= install-strip
|
|
|
|
OPTIONS_DEFINE= MANPAGES
|
|
MANPAGES_BUILD_DEPENDS= docbook-sgml>=4.5:textproc/docbook-sgml \
|
|
docbook-xsl>=1.76:textproc/docbook-xsl
|
|
MANPAGES_USE= gnome=libxslt:build
|
|
MANPAGES_CONFIGURE_ENABLE= man-pages
|
|
OPTIONS_SUB= yes
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if (${ARCH} == "armv6" || ${ARCH} == "armv6hf")
|
|
USE_GCC= yes
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/|${PREFIX}/bin/|g' \
|
|
${WRKSRC}/docs/man/pkexec.xml \
|
|
${WRKSRC}/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
|
|
${WRKSRC}/docs/man/polkit.xml
|
|
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}/var/lib/polkit-1
|
|
${INSTALL_DATA} ${WRKSRC}/data/org.freedesktop.PolicyKit1.conf \
|
|
${STAGEDIR}${PREFIX}/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample
|
|
.for i in 10-vendor.d 20-org.d 30-site.d 50-local.d 90-mandatory.d
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/etc/polkit-1/localauthority/${i}
|
|
${MKDIR} ${STAGEDIR}/var/lib/polkit-1/localauthority/${i}
|
|
.endfor
|
|
|
|
.include <bsd.port.post.mk>
|