The Solaris support in this package only works on OpenSolaris. Allow it to build (although likely not work) on Solaris too.diff -r1.7 -r1.8 pkgsrc/security/policykit/Makefile
(sketch)
@@ -1,70 +1,72 @@ | @@ -1,70 +1,72 @@ | |||
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 | |||
4 | POLICYKIT_VER= 0.9 | 4 | POLICYKIT_VER= 0.9 | |
5 | DISTNAME= PolicyKit-${POLICYKIT_VER} | 5 | DISTNAME= PolicyKit-${POLICYKIT_VER} | |
6 | PKGNAME= policykit-${POLICYKIT_VER} | 6 | PKGNAME= policykit-${POLICYKIT_VER} | |
7 | PKGREVISION= 3 | 7 | PKGREVISION= 3 | |
8 | CATEGORIES= security | 8 | CATEGORIES= security | |
9 | MASTER_SITES= http://hal.freedesktop.org/releases/ | 9 | MASTER_SITES= http://hal.freedesktop.org/releases/ | |
10 | 10 | |||
11 | MAINTAINER= jmcneill@NetBSD.org | 11 | MAINTAINER= jmcneill@NetBSD.org | |
12 | HOMEPAGE= http://hal.freedesktop.org/ | 12 | HOMEPAGE= http://hal.freedesktop.org/ | |
13 | COMMENT= Framework for managing admin policies and privileges | 13 | COMMENT= Framework for managing admin policies and privileges | |
14 | 14 | |||
15 | PKG_DESTDIR_SUPPORT= user-destdir | 15 | PKG_DESTDIR_SUPPORT= user-destdir | |
16 | BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt | 16 | BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt | |
17 | BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl | 17 | BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl | |
18 | 18 | |||
19 | PKG_SYSCONFSUBDIR= PolicyKit | 19 | PKG_SYSCONFSUBDIR= PolicyKit | |
20 | 20 | |||
21 | EGDIR= ${PREFIX}/share/examples/policykit | 21 | EGDIR= ${PREFIX}/share/examples/policykit | |
22 | CONF_FILES+= ${EGDIR}/PolicyKit.conf ${PKG_SYSCONFDIR}/PolicyKit.conf | 22 | CONF_FILES+= ${EGDIR}/PolicyKit.conf ${PKG_SYSCONFDIR}/PolicyKit.conf | |
23 | CONF_FILES+= ${EGDIR}/org.freedesktop.PolicyKit.conf ${PKG_SYSCONFBASE}/dbus-1/system.d/org.freedesktop.PolicyKit.conf | 23 | CONF_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 | |||
27 | BUILD_DEFS+= VARBASE | 27 | BUILD_DEFS+= VARBASE | |
28 | BUILD_DEFS+= PKG_SYSCONFBASE | 28 | BUILD_DEFS+= PKG_SYSCONFBASE | |
29 | 29 | |||
30 | GNU_CONFIGURE= YES | 30 | GNU_CONFIGURE= YES | |
31 | USE_DIRS+= xdg-1.4 | 31 | USE_DIRS+= xdg-1.4 | |
32 | USE_PKGLOCALEDIR= YES | 32 | USE_PKGLOCALEDIR= YES | |
33 | USE_TOOLS+= gmake intltool msgfmt perl pkg-config autoconf | 33 | USE_TOOLS+= gmake intltool msgfmt perl pkg-config autoconf | |
34 | USE_LIBTOOL= YES | 34 | USE_LIBTOOL= YES | |
35 | 35 | |||
36 | USE_LANGUAGES= c99 | |||
37 | ||||
36 | AUTOCONF_REQD= 2.59 | 38 | AUTOCONF_REQD= 2.59 | |
37 | 39 | |||
38 | POLICYKIT_USER?= polkit | 40 | POLICYKIT_USER?= polkit | |
39 | POLICYKIT_GROUP?= polkit | 41 | POLICYKIT_GROUP?= polkit | |
40 | PKG_GROUPS= ${POLICYKIT_GROUP} | 42 | PKG_GROUPS= ${POLICYKIT_GROUP} | |
41 | PKG_USERS= ${POLICYKIT_USER}:${POLICYKIT_GROUP} | 43 | PKG_USERS= ${POLICYKIT_USER}:${POLICYKIT_GROUP} | |
42 | PKG_GROUPS_VARS+= POLICYKIT_GROUP | 44 | PKG_GROUPS_VARS+= POLICYKIT_GROUP | |
43 | PKG_USERS_VARS+= POLICYKIT_USER | 45 | PKG_USERS_VARS+= POLICYKIT_USER | |
44 | 46 | |||
45 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE:Q} | 47 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE:Q} | |
46 | CONFIGURE_ARGS+= --localstatedir=${VARBASE} | 48 | CONFIGURE_ARGS+= --localstatedir=${VARBASE} | |
47 | CONFIGURE_ARGS+= --with-polkit-user=${POLICYKIT_USER} | 49 | CONFIGURE_ARGS+= --with-polkit-user=${POLICYKIT_USER} | |
48 | CONFIGURE_ARGS+= --with-polkit-group=${POLICYKIT_GROUP} | 50 | CONFIGURE_ARGS+= --with-polkit-group=${POLICYKIT_GROUP} | |
49 | 51 | |||
50 | .include "../../mk/bsd.prefs.mk" | 52 | .include "../../mk/bsd.prefs.mk" | |
51 | 53 | |||
52 | .if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" | 54 | .if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" | |
53 | post-install: | 55 | post-install: | |
54 | ${INSTALL_DATA} ${FILESDIR}/PolicyKit.conf.NetBSD ${DESTDIR}${EGDIR}/PolicyKit.conf | 56 | ${INSTALL_DATA} ${FILESDIR}/PolicyKit.conf.NetBSD ${DESTDIR}${EGDIR}/PolicyKit.conf | |
55 | .endif | 57 | .endif | |
56 | 58 | |||
57 | .if ${OPSYS} == "Darwin" | 59 | .if ${OPSYS} == "Darwin" | |
58 | BUILDLINK_TRANSFORM+= rm:-Wl,--as-needed | 60 | BUILDLINK_TRANSFORM+= rm:-Wl,--as-needed | |
59 | .endif | 61 | .endif | |
60 | 62 | |||
61 | pre-configure: | 63 | pre-configure: | |
62 | cd ${WRKSRC} && autoconf | 64 | cd ${WRKSRC} && autoconf | |
63 | 65 | |||
64 | .include "../../devel/gettext-lib/buildlink3.mk" | 66 | .include "../../devel/gettext-lib/buildlink3.mk" | |
65 | .include "../../textproc/libxml2/buildlink3.mk" | 67 | .include "../../textproc/libxml2/buildlink3.mk" | |
66 | .include "../../textproc/xmlcatmgr/buildlink3.mk" | 68 | .include "../../textproc/xmlcatmgr/buildlink3.mk" | |
67 | .include "../../sysutils/dbus/buildlink3.mk" | 69 | .include "../../sysutils/dbus/buildlink3.mk" | |
68 | .include "../../sysutils/dbus-glib/buildlink3.mk" | 70 | .include "../../sysutils/dbus-glib/buildlink3.mk" | |
69 | .include "../../mk/pam.buildlink3.mk" | 71 | .include "../../mk/pam.buildlink3.mk" | |
70 | .include "../../mk/bsd.pkg.mk" | 72 | .include "../../mk/bsd.pkg.mk" |
@@ -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 | |||
3 | SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85 | 3 | SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85 | |
4 | RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c | 4 | RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c | |
5 | Size (PolicyKit-0.9.tar.gz) = 1254318 bytes | 5 | Size (PolicyKit-0.9.tar.gz) = 1254318 bytes | |
6 | SHA1 (patch-aa) = 31f10985b2b9105aa260fd79a684468ca345ed7d | 6 | SHA1 (patch-aa) = 31f10985b2b9105aa260fd79a684468ca345ed7d | |
7 | SHA1 (patch-ab) = 32d9ecafd84ebf1329b17d4f5df9845591865772 | 7 | SHA1 (patch-ab) = 32d9ecafd84ebf1329b17d4f5df9845591865772 | |
8 | SHA1 (patch-ac) = cf4b1fcfec1f079c015672235996c5331801fb48 | 8 | SHA1 (patch-ac) = cf4b1fcfec1f079c015672235996c5331801fb48 | |
9 | SHA1 (patch-ad) = 7d34235b9672680a146fe676d84ccaa09432f52c | 9 | SHA1 (patch-ad) = 7d34235b9672680a146fe676d84ccaa09432f52c | |
10 | SHA1 (patch-ae) = b6a8c945de5cd7e605494d8575075e74c58da6a1 | 10 | SHA1 (patch-ae) = b6a8c945de5cd7e605494d8575075e74c58da6a1 | |
11 | SHA1 (patch-af) = c15988b60a99443469a0399935bc51f99da4b454 | 11 | SHA1 (patch-af) = c15988b60a99443469a0399935bc51f99da4b454 | |
12 | SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61 | 12 | SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61 | |
13 | SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a | 13 | SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a | |
14 | SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f | 14 | SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f | |
15 | SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f | 15 | SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f | |
16 | SHA1 (patch-ak) = d31933a6bb836311837c62a2fcf43b105d5464cf | 16 | SHA1 (patch-ak) = d31933a6bb836311837c62a2fcf43b105d5464cf | |
17 | SHA1 (patch-al) = cd87d1c39bb38c70b8fa3170e90c641cc0029dc3 | 17 | SHA1 (patch-al) = cd87d1c39bb38c70b8fa3170e90c641cc0029dc3 | |
18 | SHA1 (patch-am) = e04337c969f14a8ef223888ef09f55087629684a | 18 | SHA1 (patch-am) = ace4c1f393d2ced75024af147f50def686ddf4e2 | |
19 | SHA1 (patch-an) = b0c9b5a2905f8de4c428e4910914fb92fc906cfd | 19 | SHA1 (patch-an) = a0a54235fc72a52ace72a0d04df6c1383f7c583c | |
20 | SHA1 (patch-ao) = 0f9a87653f4902285c7420f6269e302eca896a1b | |||
20 | SHA1 (patch-authdb) = 449b8ac50f81cc0234e17e64bc9892ade7119028 | 21 | SHA1 (patch-authdb) = 449b8ac50f81cc0234e17e64bc9892ade7119028 |
@@ -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 | |||
3 | PR# 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") |
@@ -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 | |||
3 | PR# 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)) |
$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;