Tue Jan 20 10:08:17 2009 UTC ()
The Solaris support in this package only works on OpenSolaris.  Allow it to
build (although likely not work) on Solaris too.


(sketch)
diff -r1.7 -r1.8 pkgsrc/security/policykit/Makefile
diff -r1.6 -r1.7 pkgsrc/security/policykit/distinfo
diff -r1.1 -r1.2 pkgsrc/security/policykit/patches/patch-am
diff -r1.1 -r1.2 pkgsrc/security/policykit/patches/patch-an
diff -r0 -r1.1 pkgsrc/security/policykit/patches/patch-ao

cvs diff -r1.7 -r1.8 pkgsrc/security/policykit/Makefile (expand / switch to unified diff)

--- pkgsrc/security/policykit/Makefile 2008/12/21 13:57:29 1.7
+++ pkgsrc/security/policykit/Makefile 2009/01/20 10:08:17 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.7 2008/12/21 13:57:29 jmcneill Exp $ 1# $NetBSD: Makefile,v 1.8 2009/01/20 10:08:17 sketch Exp $
2# 2#
3 3
4POLICYKIT_VER= 0.9 4POLICYKIT_VER= 0.9
5DISTNAME= PolicyKit-${POLICYKIT_VER} 5DISTNAME= PolicyKit-${POLICYKIT_VER}
6PKGNAME= policykit-${POLICYKIT_VER} 6PKGNAME= policykit-${POLICYKIT_VER}
7PKGREVISION= 3 7PKGREVISION= 3
8CATEGORIES= security 8CATEGORIES= security
9MASTER_SITES= http://hal.freedesktop.org/releases/ 9MASTER_SITES= http://hal.freedesktop.org/releases/
10 10
11MAINTAINER= jmcneill@NetBSD.org 11MAINTAINER= jmcneill@NetBSD.org
12HOMEPAGE= http://hal.freedesktop.org/ 12HOMEPAGE= http://hal.freedesktop.org/
13COMMENT= Framework for managing admin policies and privileges 13COMMENT= Framework for managing admin policies and privileges
14 14
@@ -23,26 +23,28 @@ CONF_FILES+= ${EGDIR}/PolicyKit.conf ${P @@ -23,26 +23,28 @@ CONF_FILES+= ${EGDIR}/PolicyKit.conf ${P
23CONF_FILES+= ${EGDIR}/org.freedesktop.PolicyKit.conf ${PKG_SYSCONFBASE}/dbus-1/system.d/org.freedesktop.PolicyKit.conf 23CONF_FILES+= ${EGDIR}/org.freedesktop.PolicyKit.conf ${PKG_SYSCONFBASE}/dbus-1/system.d/org.freedesktop.PolicyKit.conf
24#CONF_FILES+= ${EGDIR}/polkit ${PKG_SYSCONFBASE}/pam.d/polkit 24#CONF_FILES+= ${EGDIR}/polkit ${PKG_SYSCONFBASE}/pam.d/polkit
25#CONF_FILES+= ${EGDIR}/polkit-bash-completion.sh ${PKG_SYSCONFDIR}/profile.d/polkit-bash-completion.sh 25#CONF_FILES+= ${EGDIR}/polkit-bash-completion.sh ${PKG_SYSCONFDIR}/profile.d/polkit-bash-completion.sh
26 26
27BUILD_DEFS+= VARBASE 27BUILD_DEFS+= VARBASE
28BUILD_DEFS+= PKG_SYSCONFBASE 28BUILD_DEFS+= PKG_SYSCONFBASE
29 29
30GNU_CONFIGURE= YES 30GNU_CONFIGURE= YES
31USE_DIRS+= xdg-1.4 31USE_DIRS+= xdg-1.4
32USE_PKGLOCALEDIR= YES 32USE_PKGLOCALEDIR= YES
33USE_TOOLS+= gmake intltool msgfmt perl pkg-config autoconf 33USE_TOOLS+= gmake intltool msgfmt perl pkg-config autoconf
34USE_LIBTOOL= YES 34USE_LIBTOOL= YES
35 35
 36USE_LANGUAGES= c99
 37
36AUTOCONF_REQD= 2.59 38AUTOCONF_REQD= 2.59
37 39
38POLICYKIT_USER?= polkit 40POLICYKIT_USER?= polkit
39POLICYKIT_GROUP?= polkit 41POLICYKIT_GROUP?= polkit
40PKG_GROUPS= ${POLICYKIT_GROUP} 42PKG_GROUPS= ${POLICYKIT_GROUP}
41PKG_USERS= ${POLICYKIT_USER}:${POLICYKIT_GROUP} 43PKG_USERS= ${POLICYKIT_USER}:${POLICYKIT_GROUP}
42PKG_GROUPS_VARS+= POLICYKIT_GROUP 44PKG_GROUPS_VARS+= POLICYKIT_GROUP
43PKG_USERS_VARS+= POLICYKIT_USER 45PKG_USERS_VARS+= POLICYKIT_USER
44 46
45CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE:Q} 47CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE:Q}
46CONFIGURE_ARGS+= --localstatedir=${VARBASE} 48CONFIGURE_ARGS+= --localstatedir=${VARBASE}
47CONFIGURE_ARGS+= --with-polkit-user=${POLICYKIT_USER} 49CONFIGURE_ARGS+= --with-polkit-user=${POLICYKIT_USER}
48CONFIGURE_ARGS+= --with-polkit-group=${POLICYKIT_GROUP} 50CONFIGURE_ARGS+= --with-polkit-group=${POLICYKIT_GROUP}

cvs diff -r1.6 -r1.7 pkgsrc/security/policykit/distinfo (expand / switch to unified diff)

--- pkgsrc/security/policykit/distinfo 2008/12/21 13:57:29 1.6
+++ pkgsrc/security/policykit/distinfo 2009/01/20 10:08:17 1.7
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1$NetBSD: distinfo,v 1.6 2008/12/21 13:57:29 jmcneill Exp $ 1$NetBSD: distinfo,v 1.7 2009/01/20 10:08:17 sketch Exp $
2 2
3SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85 3SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85
4RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c 4RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c
5Size (PolicyKit-0.9.tar.gz) = 1254318 bytes 5Size (PolicyKit-0.9.tar.gz) = 1254318 bytes
6SHA1 (patch-aa) = 31f10985b2b9105aa260fd79a684468ca345ed7d 6SHA1 (patch-aa) = 31f10985b2b9105aa260fd79a684468ca345ed7d
7SHA1 (patch-ab) = 32d9ecafd84ebf1329b17d4f5df9845591865772 7SHA1 (patch-ab) = 32d9ecafd84ebf1329b17d4f5df9845591865772
8SHA1 (patch-ac) = cf4b1fcfec1f079c015672235996c5331801fb48 8SHA1 (patch-ac) = cf4b1fcfec1f079c015672235996c5331801fb48
9SHA1 (patch-ad) = 7d34235b9672680a146fe676d84ccaa09432f52c 9SHA1 (patch-ad) = 7d34235b9672680a146fe676d84ccaa09432f52c
10SHA1 (patch-ae) = b6a8c945de5cd7e605494d8575075e74c58da6a1 10SHA1 (patch-ae) = b6a8c945de5cd7e605494d8575075e74c58da6a1
11SHA1 (patch-af) = c15988b60a99443469a0399935bc51f99da4b454 11SHA1 (patch-af) = c15988b60a99443469a0399935bc51f99da4b454
12SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61 12SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61
13SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a 13SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a
14SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f 14SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f
15SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f 15SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f
16SHA1 (patch-ak) = d31933a6bb836311837c62a2fcf43b105d5464cf 16SHA1 (patch-ak) = d31933a6bb836311837c62a2fcf43b105d5464cf
17SHA1 (patch-al) = cd87d1c39bb38c70b8fa3170e90c641cc0029dc3 17SHA1 (patch-al) = cd87d1c39bb38c70b8fa3170e90c641cc0029dc3
18SHA1 (patch-am) = e04337c969f14a8ef223888ef09f55087629684a 18SHA1 (patch-am) = ace4c1f393d2ced75024af147f50def686ddf4e2
19SHA1 (patch-an) = b0c9b5a2905f8de4c428e4910914fb92fc906cfd 19SHA1 (patch-an) = a0a54235fc72a52ace72a0d04df6c1383f7c583c
 20SHA1 (patch-ao) = 0f9a87653f4902285c7420f6269e302eca896a1b
20SHA1 (patch-authdb) = 449b8ac50f81cc0234e17e64bc9892ade7119028 21SHA1 (patch-authdb) = 449b8ac50f81cc0234e17e64bc9892ade7119028

cvs diff -r1.1 -r1.2 pkgsrc/security/policykit/patches/patch-am (expand / switch to unified diff)

--- pkgsrc/security/policykit/patches/patch-am 2008/12/21 13:57:29 1.1
+++ pkgsrc/security/policykit/patches/patch-am 2009/01/20 10:08:17 1.2
@@ -1,15 +1,25 @@ @@ -1,15 +1,25 @@
1$NetBSD: patch-am,v 1.1 2008/12/21 13:57:29 jmcneill Exp $ 1$NetBSD: patch-am,v 1.2 2009/01/20 10:08:17 sketch Exp $
2 2
3PR# pkg/40146: security/policykit fails to build on Linux 3--- configure.in.orig Mon Jun 30 20:40:59 2008
4 4+++ configure.in Tue Jan 20 09:42:26 2009
5--- configure.in.orig 2008-06-30 22:40:59.000000000 +0300 5@@ -521,6 +521,11 @@
6+++ configure.in 6 ;;
7@@ -528,7 +528,7 @@ case "$host_os" in 7 *solaris*)
 8 AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?])
 9+ case "`uname -s`" in
 10+ 5.11)
 11+ AC_DEFINE([HAVE_OPENSOLARIS], 1, [Is this an OpenSolaris system?])
 12+ ;;
 13+ esac
 14 ;;
 15 *freebsd*)
 16 AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?])
 17@@ -528,7 +533,7 @@
8 esac 18 esac
9  19
10 have_inotify=no 20 have_inotify=no
11-AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes]) 21-AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes])
12+#AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes]) 22+#AC_CHECK_HEADERS([linux/inotify.h], [have_inotify=yes])
13 AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes]) 23 AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes])
14  24
15 AM_CONDITIONAL(HAVE_INOTIFY, test "x$have_inotify" = "xyes") 25 AM_CONDITIONAL(HAVE_INOTIFY, test "x$have_inotify" = "xyes")

cvs diff -r1.1 -r1.2 pkgsrc/security/policykit/patches/patch-an (expand / switch to unified diff)

--- pkgsrc/security/policykit/patches/patch-an 2008/12/21 13:57:29 1.1
+++ pkgsrc/security/policykit/patches/patch-an 2009/01/20 10:08:17 1.2
@@ -1,31 +1,65 @@ @@ -1,31 +1,65 @@
1$NetBSD: patch-an,v 1.1 2008/12/21 13:57:29 jmcneill Exp $ 1$NetBSD: patch-an,v 1.2 2009/01/20 10:08:17 sketch Exp $
2 2
3PR# pkg/40146: security/policykit fails to build on Linux 3--- src/polkit/polkit-context.c.orig Fri May 30 22:24:44 2008
4 4+++ src/polkit/polkit-context.c Tue Jan 20 09:45:55 2009
5--- src/polkit/polkit-context.c.orig 2008-05-31 00:24:44.000000000 +0300 5@@ -39,7 +39,7 @@
6+++ src/polkit/polkit-context.c 6 #include <grp.h>
7@@ -310,6 +310,7 @@ polkit_context_init (PolKitContext *pk_c 7 #include <unistd.h>
 8 #include <errno.h>
 9-#ifdef HAVE_SOLARIS
 10+#ifdef HAVE_OPENSOLARIS
 11 #include <port.h>
 12 #include <sys/stat.h>
 13 #else
 14@@ -176,7 +176,7 @@
 15
 16 /* NOTE: we don't load the configuration file until it's needed */
 17
 18-#ifdef HAVE_SOLARIS
 19+#ifdef HAVE_OPENSOLARIS
 20 if (pk_context->io_add_watch_func != NULL) {
 21 pk_context->inotify_fd = port_create ();
 22 if (pk_context->inotify_fd < 0) {
 23@@ -310,6 +310,7 @@
8 } 24 }
9 #else 25 #else
10 if (pk_context->io_add_watch_func != NULL) { 26 if (pk_context->io_add_watch_func != NULL) {
11+#ifdef HAVE_INOTIFY 27+#ifdef HAVE_INOTIFY
12 pk_context->inotify_fd = inotify_init (); 28 pk_context->inotify_fd = inotify_init ();
13 if (pk_context->inotify_fd < 0) { 29 if (pk_context->inotify_fd < 0) {
14 polkit_debug ("failed to initialize inotify: %s", strerror (errno)); 30 polkit_debug ("failed to initialize inotify: %s", strerror (errno));
15@@ -358,6 +359,7 @@ polkit_context_init (PolKitContext *pk_c 31@@ -358,6 +359,7 @@
16 /* TODO: set error */ 32 /* TODO: set error */
17 goto error; 33 goto error;
18 } 34 }
19+#endif 35+#endif
20 } 36 }
21 #endif 37 #endif
22  38
23@@ -571,7 +573,7 @@ polkit_context_io_func (PolKitContext *p 39@@ -366,7 +368,7 @@
 40 return FALSE;
 41 }
 42
 43-#ifdef HAVE_SOLARIS
 44+#ifdef HAVE_OPENSOLARIS
 45
 46 struct fileportinfo {
 47 struct file_obj fobj;
 48@@ -518,7 +520,7 @@
 49
 50 config_changed = FALSE;
 51
 52-#ifdef HAVE_SOLARIS
 53+#ifdef HAVE_OPENSOLARIS
 54 if (fd == pk_context->inotify_fd) {
 55 port_event_t pe;
 56 struct file_obj *fobjp;
 57@@ -571,7 +573,7 @@
24 polkit_debug ("failed to read kqueue event: %s", strerror (errno)); 58 polkit_debug ("failed to read kqueue event: %s", strerror (errno));
25 } 59 }
26 } 60 }
27-#else 61-#else
28+#elif HAVE_INOTIFY 62+#elif HAVE_INOTIFY
29 if (fd == pk_context->inotify_fd) { 63 if (fd == pk_context->inotify_fd) {
30 /* size of the event structure, not counting name */ 64 /* size of the event structure, not counting name */
31 #define EVENT_SIZE (sizeof (struct inotify_event)) 65 #define EVENT_SIZE (sizeof (struct inotify_event))

File Added: pkgsrc/security/policykit/patches/patch-ao
$NetBSD: patch-ao,v 1.1 2009/01/20 10:08:17 sketch Exp $

--- src/polkit-dbus/polkit-read-auth-helper.c.orig	Tue Jan 20 09:52:20 2009
+++ src/polkit-dbus/polkit-read-auth-helper.c	Tue Jan 20 09:53:15 2009
@@ -175,7 +175,11 @@
                 goto out;
         }
 
+#ifdef HAVE_SOLARIS
+	dfd = dir->dd_fd;
+#else
         dfd = dirfd (dir);
+#endif
         if (dfd == -1) {
                 fprintf (stderr, "polkit-read-auth-helper: error calling dirfd(): %m\n");
                 goto out;