diff --git a/sysutils/polkit/Makefile b/sysutils/polkit/Makefile
index 0e9806dae90..82cf0949b69 100644
--- a/sysutils/polkit/Makefile
+++ b/sysutils/polkit/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.30 2011/12/16 08:16:55 ajacoutot Exp $
+# $OpenBSD: Makefile,v 1.31 2012/02/16 22:28:23 ajacoutot Exp $
COMMENT= framework for granting privileged operations to users
-DISTNAME= polkit-0.103
+DISTNAME= polkit-0.104
SHARED_LIBS += polkit-gobject-1 1.0 # .0.0
SHARED_LIBS += polkit-backend-1 1.0 # .0.0
@@ -53,6 +53,7 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--disable-gtk-doc \
+ --disable-systemd \
--localstatedir=/var \
--mandir=${PREFIX}/man \
--enable-introspection \
@@ -71,16 +72,24 @@ pre-configure:
${SUBST_CMD} ${WRKSRC}/docs/man/pkexec.xml \
${WRKSRC}/actions/org.freedesktop.policykit.policy.in \
${WRKSRC}/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
+ perl -pi -e 's,lib/polkit-1,db/polkit-1,g' \
+ ${WRKSRC}/configure.ac \
+ ${WRKSRC}/docs/man/pklocalauthority.xml \
+ ${WRKSRC}/docs/polkit/html/PolkitBackendLocalAuthority.html \
+ ${WRKSRC}/docs/polkit/html/pklocalauthority.8.html \
+ ${WRKSRC}/src/polkitbackend/polkitbackendlocalauthority.c \
+ ${WRKSRC}/test/polkitbackend/polkitbackendlocalauthoritytest.c
cd ${WRKSRC} && \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
${LOCALBASE}/bin/autoreconf
post-install:
- ${INSTALL_DATA_DIR} \
- ${PREFIX}/share/examples/polkit/var/db/polkit-1/localauthority/10-vendor.d
${INSTALL_DATA} ${FILESDIR}/60-desktop-policy.conf \
${PREFIX}/share/examples/polkit/polkit-1/localauthority.conf.d/
+ # @sample'd under /var/db/polkit-1
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/polkit/var/
+ mv ${WRKINST}/var/lib ${PREFIX}/share/examples/polkit/var/db
${INSTALL_DATA} ${FILESDIR}/10-desktop-policy.pkla \
${PREFIX}/share/examples/polkit/var/db/polkit-1/localauthority/10-vendor.d/
diff --git a/sysutils/polkit/distinfo b/sysutils/polkit/distinfo
index bb2b3c65803..cec1740f7a8 100644
--- a/sysutils/polkit/distinfo
+++ b/sysutils/polkit/distinfo
@@ -1,5 +1,5 @@
-MD5 (polkit-0.103.tar.gz) = qqzy7xh3TqioJaQmp8/nYw==
-RMD160 (polkit-0.103.tar.gz) = UKrSqVZJdxcnuPxC6Lu+KtX3teg=
-SHA1 (polkit-0.103.tar.gz) = Ak4hPd4LluH8lFJOIeBwZGKoeJI=
-SHA256 (polkit-0.103.tar.gz) = NmB8jOV2mA7lW9ErqxlE8TIX646dBKtWAiVFhh7OO8U=
-SIZE (polkit-0.103.tar.gz) = 1065419
+MD5 (polkit-0.104.tar.gz) = 44C0xvsee8z4VOku3AqM4Q==
+RMD160 (polkit-0.104.tar.gz) = JE6CU0ekY/9LnrCiMYqwTIIb3tk=
+SHA1 (polkit-0.104.tar.gz) = WZIIz1hLnhP4ydhjI4qCca9KumI=
+SHA256 (polkit-0.104.tar.gz) = awoT2DgeSnt+N8GKVFlRkbUHV+D80YbNmRjprQ8Yx/k=
+SIZE (polkit-0.104.tar.gz) = 1416583
diff --git a/sysutils/polkit/patches/patch-Makefile_am b/sysutils/polkit/patches/patch-Makefile_am
new file mode 100644
index 00000000000..f09f95d264f
--- /dev/null
+++ b/sysutils/polkit/patches/patch-Makefile_am
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Makefile_am,v 1.1 2012/02/16 22:28:23 ajacoutot Exp $
+
+undefined references to fgetgrent, fgetpwent, getline
+
+--- Makefile.am.orig Wed Feb 8 16:35:22 2012
++++ Makefile.am Wed Feb 8 16:36:07 2012
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = actions data src docs po test
++SUBDIRS = actions data src docs po
+
+ NULL =
+
diff --git a/sysutils/polkit/patches/patch-configure_ac b/sysutils/polkit/patches/patch-configure_ac
index 8f176b03862..eb4fa83f163 100644
--- a/sysutils/polkit/patches/patch-configure_ac
+++ b/sysutils/polkit/patches/patch-configure_ac
@@ -1,11 +1,11 @@
-$OpenBSD: patch-configure_ac,v 1.3 2011/04/28 13:09:07 ajacoutot Exp $
+$OpenBSD: patch-configure_ac,v 1.4 2012/02/16 22:28:23 ajacoutot Exp $
Force disabling gtk-doc.
Add bsd_auth(3) support.
---- configure.ac.orig Thu Mar 3 19:26:20 2011
-+++ configure.ac Wed Apr 27 16:07:00 2011
-@@ -45,8 +45,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
+--- configure.ac.orig Tue Jan 3 17:25:49 2012
++++ configure.ac Wed Feb 8 16:25:36 2012
+@@ -48,8 +48,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
fi
AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes)
@@ -14,7 +14,7 @@ Add bsd_auth(3) support.
#### gcc warning flags
if test "x$GCC" = "xyes"; then
-@@ -141,7 +139,7 @@ AC_SUBST(EXPAT_LIBS)
+@@ -144,7 +142,7 @@ AC_SUBST(EXPAT_LIBS)
AC_CHECK_FUNCS(clearenv)
if test "x$GCC" = "xyes"; then
@@ -23,7 +23,7 @@ Add bsd_auth(3) support.
fi
dnl ---------------------------------------------------------------------------
-@@ -190,6 +188,11 @@ case $POLKIT_AUTHFW in
+@@ -222,6 +220,11 @@ case $POLKIT_AUTHFW in
AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework])
;;
@@ -35,7 +35,7 @@ Add bsd_auth(3) support.
*)
AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW])
;;
-@@ -198,6 +201,7 @@ esac
+@@ -230,6 +233,7 @@ esac
AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw])
AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw])
@@ -43,12 +43,3 @@ Add bsd_auth(3) support.
dnl ---------------------------------------------------------------------------
-@@ -467,7 +471,7 @@ echo "NOTE: The directory ${sysconfdir}/polkit-1/local
- echo " by root and have mode 700"
- echo
-
--echo "NOTE: The directory ${localstatedir}/lib/polkit-1 must be owned"
-+echo "NOTE: The directory ${localstatedir}/db/polkit-1 must be owned"
- echo " by root and have mode 700"
- echo
-
diff --git a/sysutils/polkit/patches/patch-docs_man_pklocalauthority_xml b/sysutils/polkit/patches/patch-docs_man_pklocalauthority_xml
deleted file mode 100644
index bc13d2e8c6d..00000000000
--- a/sysutils/polkit/patches/patch-docs_man_pklocalauthority_xml
+++ /dev/null
@@ -1,48 +0,0 @@
-$OpenBSD: patch-docs_man_pklocalauthority_xml,v 1.1.1.1 2010/07/01 07:46:21 ajacoutot Exp $
---- docs/man/pklocalauthority.xml.orig Sun Jun 27 18:25:36 2010
-+++ docs/man/pklocalauthority.xml Sun Jun 27 18:25:58 2010
-@@ -93,7 +93,7 @@
- The Local Authority reads files with .pkla
- extension from all directories located inside the
- /etc/polkit-1/localauthority
-- and /var/lib/polkit-1/localauthority
-+ and /var/db/polkit-1/localauthority
- directories. By default, the following sub-directories are installed.
-
-@@ -114,7 +114,7 @@ - and - ---/var/lib/polkit-1/ -+/var/db/polkit-1/ - `-- localauthority - |-- 10-vendor.d - |-- 20-org.d -@@ -125,7 +125,7 @@ -- The
-/etc/polkit-1/localauthority
hierarchy - is inteded for local configuration and -- the/var/lib/polkit-1/localauthority
is -+ the/var/db/polkit-1/localauthority
is - intended for 3rd party packages. --@@ -277,7 +277,7 @@ - the following rules. First all the basename of all - sub-directories (e.g. 30-site.d) from both - the
-/etc/polkit-1/localauthority
-- and/var/lib/polkit-1/localauthority
-+ and/var/db/polkit-1/localauthority
- directories are enumerated and sorted (using the C locale). If a - name exists in both/etc
- and/var
, the one -@@ -291,7 +291,7 @@ - For example, given the following files ---/var/lib/polkit-1 -+/var/db/polkit-1 - └── localauthority - ├── 10-vendor.d - │ └── 10-desktop-policy.pkla diff --git a/sysutils/polkit/patches/patch-src_polkitbackend_Makefile_am b/sysutils/polkit/patches/patch-src_polkitbackend_Makefile_am deleted file mode 100644 index b833cded79f..00000000000 --- a/sysutils/polkit/patches/patch-src_polkitbackend_Makefile_am +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_polkitbackend_Makefile_am,v 1.2 2011/04/28 13:09:07 ajacoutot Exp $ ---- src/polkitbackend/Makefile.am.orig Mon Aug 9 20:49:57 2010 -+++ src/polkitbackend/Makefile.am Tue Nov 30 12:31:18 2010 -@@ -74,10 +74,4 @@ clean-local : - rm -f *~ $(BUILT_SOURCES) - - install-exec-hook: -- mkdir -p $(DESTDIR)$(localstatedir)/lib/polkit-1 -- mkdir -p $(DESTDIR)$(localstatedir)/lib/polkit-1/localauthority/{10-vendor.d,20-org.d,30-site.d,50-local.d,90-mandatory.d} -- -chmod 700 $(DESTDIR)$(localstatedir)/lib/polkit-1 -- mkdir -p $(DESTDIR)$(sysconfdir)/polkit-1 -- mkdir -p $(DESTDIR)$(sysconfdir)/polkit-1/localauthority/{10-vendor.d,20-org.d,30-site.d,50-local.d,90-mandatory.d} -- -chmod 700 $(DESTDIR)$(sysconfdir)/polkit-1/localauthority - mkdir -p $(DESTDIR)$(libdir)/polkit-1/extensions diff --git a/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthority_c b/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthority_c index c94c01dad95..bab608fc6e1 100644 --- a/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthority_c +++ b/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthority_c @@ -1,21 +1,37 @@ -$OpenBSD: patch-src_polkitbackend_polkitbackendlocalauthority_c,v 1.3 2011/07/12 18:39:07 ajacoutot Exp $ ---- src/polkitbackend/polkitbackendlocalauthority.c.orig Tue Jul 12 20:37:27 2011 -+++ src/polkitbackend/polkitbackendlocalauthority.c Tue Jul 12 20:38:00 2011 -@@ -186,7 +186,7 @@ add_all_authorization_stores (PolkitBackendLocalAuthor - error = NULL; +$OpenBSD: patch-src_polkitbackend_polkitbackendlocalauthority_c,v 1.4 2012/02/16 22:28:23 ajacoutot Exp $ +--- src/polkitbackend/polkitbackendlocalauthority.c.orig Tue Jan 3 15:45:22 2012 ++++ src/polkitbackend/polkitbackendlocalauthority.c Wed Feb 8 17:51:32 2012 +@@ -23,7 +23,11 @@ + #include+ #include + #include ++#if defined __OpenBSD__ ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -700,15 +704,20 @@ get_users_in_net_group (PolkitIdentity + ret = NULL; + name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); - if (n == 0) -- toplevel_path = PACKAGE_LOCALSTATE_DIR "/lib/polkit-1/localauthority"; -+ toplevel_path = PACKAGE_LOCALSTATE_DIR "/db/polkit-1/localauthority"; - else - toplevel_path = PACKAGE_SYSCONF_DIR "/polkit-1/localauthority"; ++/* Under BSD, setnetgrent() returns void. */ ++#if defined __OpenBSD__ ++ setnetgrent (name); ++#else + if (setnetgrent (name) == 0) + { + g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); + goto out; + } ++#endif -@@ -296,7 +296,7 @@ polkit_backend_local_authority_init (PolkitBackendLoca - GError *error; - - if (n == 0) -- toplevel_path = PACKAGE_LOCALSTATE_DIR "/lib/polkit-1/localauthority"; -+ toplevel_path = PACKAGE_LOCALSTATE_DIR "/db/polkit-1/localauthority"; - else - toplevel_path = PACKAGE_SYSCONF_DIR "/polkit-1/localauthority"; + for (;;) + { +- char *hostname, *username, *domainname; ++ const char *hostname, *username, *domainname; + PolkitIdentity *user; + GError *error = NULL; diff --git a/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthorizationstore_c b/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthorizationstore_c new file mode 100644 index 00000000000..d0b643edbd9 --- /dev/null +++ b/sysutils/polkit/patches/patch-src_polkitbackend_polkitbackendlocalauthorizationstore_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_polkitbackend_polkitbackendlocalauthorizationstore_c,v 1.3 2012/02/16 22:28:23 ajacoutot Exp $ +--- src/polkitbackend/polkitbackendlocalauthorizationstore.c.orig Tue Jan 3 15:45:22 2012 ++++ src/polkitbackend/polkitbackendlocalauthorizationstore.c Wed Feb 8 17:46:48 2012 +@@ -21,7 +21,11 @@ + + #include "config.h" + ++#if defined __OpenBSD__ ++#include ++#else + #include ++#endif + #include + #include + #include "polkitbackendlocalauthorizationstore.h" diff --git a/sysutils/polkit/pkg/PLIST b/sysutils/polkit/pkg/PLIST index 6a372f5345a..5afb2d455f2 100644 --- a/sysutils/polkit/pkg/PLIST +++ b/sysutils/polkit/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.8 2011/06/01 12:23:53 ajacoutot Exp $ +@comment $OpenBSD: PLIST,v 1.9 2012/02/16 22:28:23 ajacoutot Exp $ %%SHARED%% @bin bin/pk-example-frobnicate @bin bin/pkaction @@ -28,6 +28,7 @@ include/polkit-1/polkit/polkitsystembusname.h include/polkit-1/polkit/polkittemporaryauthorization.h include/polkit-1/polkit/polkittypes.h include/polkit-1/polkit/polkitunixgroup.h +include/polkit-1/polkit/polkitunixnetgroup.h include/polkit-1/polkit/polkitunixprocess.h include/polkit-1/polkit/polkitunixsession.h include/polkit-1/polkit/polkitunixuser.h @@ -83,9 +84,9 @@ share/examples/polkit/dbus-1/system.d/ share/examples/polkit/dbus-1/system.d/org.freedesktop.PolicyKit1.conf @sample ${SYSCONFDIR}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf share/examples/polkit/polkit-1/ -@mode 0700 @sample ${SYSCONFDIR}/polkit-1/ -@sample /var/db/polkit-1/ +@mode 0700 +share/examples/polkit/polkit-1/localauthority/ @sample ${SYSCONFDIR}/polkit-1/localauthority/ @mode share/examples/polkit/polkit-1/localauthority.conf.d/ @@ -94,16 +95,41 @@ share/examples/polkit/polkit-1/localauthority.conf.d/50-localauthority.conf @sample ${SYSCONFDIR}/polkit-1/localauthority.conf.d/50-localauthority.conf share/examples/polkit/polkit-1/localauthority.conf.d/60-desktop-policy.conf @sample ${SYSCONFDIR}/polkit-1/localauthority.conf.d/60-desktop-policy.conf +share/examples/polkit/polkit-1/localauthority/10-vendor.d/ +@sample ${SYSCONFDIR}/polkit-1/localauthority/10-vendor.d/ +share/examples/polkit/polkit-1/localauthority/20-org.d/ +@sample ${SYSCONFDIR}/polkit-1/localauthority/20-org.d/ +share/examples/polkit/polkit-1/localauthority/30-site.d/ +@sample ${SYSCONFDIR}/polkit-1/localauthority/30-site.d/ +share/examples/polkit/polkit-1/localauthority/50-local.d/ +@sample ${SYSCONFDIR}/polkit-1/localauthority/50-local.d/ +share/examples/polkit/polkit-1/localauthority/90-mandatory.d/ +@sample ${SYSCONFDIR}/polkit-1/localauthority/90-mandatory.d/ share/examples/polkit/polkit-1/nullbackend.conf.d/ @sample ${SYSCONFDIR}/polkit-1/nullbackend.conf.d/ share/examples/polkit/polkit-1/nullbackend.conf.d/50-nullbackend.conf @sample ${SYSCONFDIR}/polkit-1/nullbackend.conf.d/50-nullbackend.conf share/examples/polkit/var/ share/examples/polkit/var/db/ +@mode 0700 share/examples/polkit/var/db/polkit-1/ +@sample /var/db/polkit-1/ +@mode share/examples/polkit/var/db/polkit-1/localauthority/ +@sample /var/db/polkit-1/localauthority/ share/examples/polkit/var/db/polkit-1/localauthority/10-vendor.d/ +@sample /var/db/polkit-1/localauthority/10-vendor.d/ +@mode 0644 share/examples/polkit/var/db/polkit-1/localauthority/10-vendor.d/10-desktop-policy.pkla +@mode +share/examples/polkit/var/db/polkit-1/localauthority/20-org.d/ +@sample /var/db/polkit-1/localauthority/20-org.d/ +share/examples/polkit/var/db/polkit-1/localauthority/30-site.d/ +@sample /var/db/polkit-1/localauthority/30-site.d/ +share/examples/polkit/var/db/polkit-1/localauthority/50-local.d/ +@sample /var/db/polkit-1/localauthority/50-local.d/ +share/examples/polkit/var/db/polkit-1/localauthority/90-mandatory.d/ +@sample /var/db/polkit-1/localauthority/90-mandatory.d/ share/gir-1.0/ share/gir-1.0/Polkit-1.0.gir share/gir-1.0/PolkitAgent-1.0.gir @@ -112,16 +138,3 @@ share/polkit-1/ share/polkit-1/actions/ share/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy share/polkit-1/actions/org.freedesktop.policykit.policy -@mode 0700 -@sample /var/db/polkit-1/localauthority/ -@mode -@sample ${SYSCONFDIR}/polkit-1/localauthority/10-vendor.d/ -@sample /var/db/polkit-1/localauthority/10-vendor.d/ -@sample ${SYSCONFDIR}/polkit-1/localauthority/20-org.d/ -@sample /var/db/polkit-1/localauthority/20-org.d/ -@sample ${SYSCONFDIR}/polkit-1/localauthority/30-site.d/ -@sample /var/db/polkit-1/localauthority/30-site.d/ -@sample ${SYSCONFDIR}/polkit-1/localauthority/50-local.d/ -@sample /var/db/polkit-1/localauthority/50-local.d/ -@sample ${SYSCONFDIR}/polkit-1/localauthority/90-mandatory.d/ -@sample /var/db/polkit-1/localauthority/90-mandatory.d/