Update to polkit-0.104.

This commit is contained in:
ajacoutot 2012-02-16 22:28:23 +00:00
parent bc39c9151e
commit 03463b0b74
10 changed files with 117 additions and 169 deletions

View File

@ -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/

View File

@ -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

View File

@ -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 =

View File

@ -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

View File

@ -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 <filename>.pkla</filename>
extension from all directories located inside the
<filename>/etc/polkit-1/localauthority</filename>
- and <filename>/var/lib/polkit-1/localauthority</filename>
+ and <filename>/var/db/polkit-1/localauthority</filename>
directories. By default, the following sub-directories are installed.
</para>
<programlisting>
@@ -109,7 +109,7 @@
and
</para>
<programlisting>
-/var/lib/polkit-1/
+/var/db/polkit-1/
`-- localauthority
|-- 10-vendor.d
|-- 20-org.d
@@ -120,7 +120,7 @@
<para>
The <filename>/etc/polkit-1/localauthority</filename> hierarchy
is inteded for local configuration and
- the <filename>/var/lib/polkit-1/localauthority</filename> is
+ the <filename>/var/db/polkit-1/localauthority</filename> is
intended for 3rd party packages.
</para>
<para>
@@ -290,7 +290,7 @@
the following rules. First all the basename of all
sub-directories (e.g. <emphasis>30-site.d</emphasis>) from both
the <filename>/etc/polkit-1/localauthority</filename>
- and <filename>/var/lib/polkit-1/localauthority</filename>
+ and <filename>/var/db/polkit-1/localauthority</filename>
directories are enumerated and sorted (using the C locale). If a
name exists in both <filename>/etc</filename>
and <filename>/var</filename>, the one
@@ -304,7 +304,7 @@
For example, given the following files
</para>
<programlisting>
-/var/lib/polkit-1
+/var/db/polkit-1
└── localauthority
├── 10-vendor.d
│ └── 10-desktop-policy.pkla

View File

@ -1,48 +0,0 @@
$OpenBSD: patch-docs_polkit_html_pklocalauthority_8_html,v 1.1 2011/04/28 13:09:07 ajacoutot Exp $
--- docs/polkit/html/pklocalauthority.8.html.orig Tue Nov 30 13:30:28 2010
+++ docs/polkit/html/pklocalauthority.8.html Tue Nov 30 13:30:53 2010
@@ -98,7 +98,7 @@
The Local Authority reads files with <code class="filename">.pkla</code>
extension from all directories located inside the
<code class="filename">/etc/polkit-1/localauthority</code>
- and <code class="filename">/var/lib/polkit-1/localauthority</code>
+ and <code class="filename">/var/db/polkit-1/localauthority</code>
directories. By default, the following sub-directories are installed.
</p>
<pre class="programlisting">
@@ -114,7 +114,7 @@
and
</p>
<pre class="programlisting">
-/var/lib/polkit-1/
+/var/db/polkit-1/
`-- localauthority
|-- 10-vendor.d
|-- 20-org.d
@@ -125,7 +125,7 @@
<p>
The <code class="filename">/etc/polkit-1/localauthority</code> hierarchy
is inteded for local configuration and
- the <code class="filename">/var/lib/polkit-1/localauthority</code> is
+ the <code class="filename">/var/db/polkit-1/localauthority</code> is
intended for 3rd party packages.
</p>
<p>
@@ -277,7 +277,7 @@
the following rules. First all the basename of all
sub-directories (e.g. <span class="emphasis"><em>30-site.d</em></span>) from both
the <code class="filename">/etc/polkit-1/localauthority</code>
- and <code class="filename">/var/lib/polkit-1/localauthority</code>
+ and <code class="filename">/var/db/polkit-1/localauthority</code>
directories are enumerated and sorted (using the C locale). If a
name exists in both <code class="filename">/etc</code>
and <code class="filename">/var</code>, the one
@@ -291,7 +291,7 @@
For example, given the following files
</p>
<pre class="programlisting">
-/var/lib/polkit-1
+/var/db/polkit-1
└── localauthority
├── 10-vendor.d
│ └── 10-desktop-policy.pkla

View File

@ -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

View File

@ -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 <errno.h>
#include <pwd.h>
#include <grp.h>
+#if defined __OpenBSD__
+#include <netgroup.h>
+#else
#include <netdb.h>
+#endif
#include <string.h>
#include <glib/gstdio.h>
#include <locale.h>
@@ -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;

View File

@ -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 <netgroup.h>
+#else
#include <netdb.h>
+#endif
#include <string.h>
#include <polkit/polkit.h>
#include "polkitbackendlocalauthorizationstore.h"

View File

@ -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/