aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-20 13:56:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-20 13:56:33 +0000
commit5a8222f294c309b66ed0bacae3d1ae52256d0106 (patch)
treec05fa682ca830b6ef10f3872ab7132bda992c4b8 /main
parent5d6d8776215af1f6645ffc3c36789fa0188ec018 (diff)
downloadaports-5a8222f294c309b66ed0bacae3d1ae52256d0106.tar.bz2
aports-5a8222f294c309b66ed0bacae3d1ae52256d0106.tar.xz
main/polkit: upgrade to 0.105
Diffstat (limited to 'main')
-rw-r--r--main/polkit/0001-Bug-50145-make-netgroup-support-optional.patch108
-rw-r--r--main/polkit/APKBUILD30
2 files changed, 127 insertions, 11 deletions
diff --git a/main/polkit/0001-Bug-50145-make-netgroup-support-optional.patch b/main/polkit/0001-Bug-50145-make-netgroup-support-optional.patch
new file mode 100644
index 0000000000..1498e831ab
--- /dev/null
+++ b/main/polkit/0001-Bug-50145-make-netgroup-support-optional.patch
@@ -0,0 +1,108 @@
+From 2428beec9189bb93e6e1fdd5bdde35acf5279a03 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Sun, 20 May 2012 15:42:56 +0200
+Subject: [PATCH] Bug 50145 - make netgroup support optional
+
+https://bugs.freedesktop.org/show_bug.cgi?id=50145
+
+netgroups are not defined in POSIX and are not be available on
+all systems.
+
+We check for getnetgrent in configure script.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ configure.ac | 2 +-
+ src/polkitbackend/polkitbackendlocalauthority.c | 8 ++++++--
+ src/polkitbackend/polkitbackendlocalauthorizationstore.c | 3 ++-
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f325922..711aa7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -141,7 +141,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"],
+ [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
+ AC_SUBST(EXPAT_LIBS)
+
+-AC_CHECK_FUNCS(clearenv)
++AC_CHECK_FUNCS(clearenv getnetgrent)
+
+ if test "x$GCC" = "xyes"; then
+ LDFLAGS="-Wl,--as-needed $LDFLAGS"
+diff --git a/src/polkitbackend/polkitbackendlocalauthority.c b/src/polkitbackend/polkitbackendlocalauthority.c
+index b53eda3..f14e924 100644
+--- a/src/polkitbackend/polkitbackendlocalauthority.c
++++ b/src/polkitbackend/polkitbackendlocalauthority.c
+@@ -52,9 +52,10 @@
+
+ static GList *get_users_in_group (PolkitIdentity *group,
+ gboolean include_root);
+-
++#if defined HAVE_GETNETGRENT
+ static GList *get_users_in_net_group (PolkitIdentity *group,
+ gboolean include_root);
++#endif
+
+ static GList *get_groups_for_user (PolkitIdentity *user);
+
+@@ -511,10 +512,12 @@ polkit_backend_local_authority_get_admin_auth_identities (PolkitBackendInteracti
+ {
+ ret = g_list_concat (ret, get_users_in_group (identity, FALSE));
+ }
++#if defined HAVE_GETNETGRENT
+ else if (POLKIT_IS_UNIX_NETGROUP (identity))
+ {
+ ret = g_list_concat (ret, get_users_in_net_group (identity, FALSE));
+ }
++#endif
+ else
+ {
+ g_warning ("Unsupported identity %s", admin_identities[n]);
+@@ -690,6 +693,7 @@ get_users_in_group (PolkitIdentity *group,
+ return ret;
+ }
+
++#if defined HAVE_GETNETGRENT
+ static GList *
+ get_users_in_net_group (PolkitIdentity *group,
+ gboolean include_root)
+@@ -741,7 +745,7 @@ get_users_in_net_group (PolkitIdentity *group,
+ endnetgrent ();
+ return ret;
+ }
+-
++#endif
+
+ static GList *
+ get_groups_for_user (PolkitIdentity *user)
+diff --git a/src/polkitbackend/polkitbackendlocalauthorizationstore.c b/src/polkitbackend/polkitbackendlocalauthorizationstore.c
+index 2ddfe75..02553c4 100644
+--- a/src/polkitbackend/polkitbackendlocalauthorizationstore.c
++++ b/src/polkitbackend/polkitbackendlocalauthorizationstore.c
+@@ -725,6 +725,7 @@ polkit_backend_local_authorization_store_lookup (PolkitBackendLocalAuthorization
+ break;
+ }
+
++#if defined HAVE_GETNETGRENT
+ /* if no identity specs matched and identity is a user, match against netgroups */
+ if (ll == NULL && POLKIT_IS_UNIX_USER (identity))
+ {
+@@ -732,13 +733,13 @@ polkit_backend_local_authorization_store_lookup (PolkitBackendLocalAuthorization
+ const gchar *user_name = polkit_unix_user_get_name (user_identity);
+ if (!user_name)
+ continue;
+-
+ for (ll = authorization->netgroup_identities; ll != NULL; ll = ll->next)
+ {
+ if (innetgr ((const gchar *) ll->data, NULL, user_name, NULL))
+ break;
+ }
+ }
++#endif
+
+ if (ll == NULL)
+ continue;
+--
+1.7.10.2
+
diff --git a/main/polkit/APKBUILD b/main/polkit/APKBUILD
index c7a46533cf..0054fbecc4 100644
--- a/main/polkit/APKBUILD
+++ b/main/polkit/APKBUILD
@@ -1,30 +1,37 @@
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=polkit
-_pkgname=PolicyKit
-pkgver=0.103
-pkgrel=1
+pkgver=0.105
+pkgrel=0
pkgdesc="Application development toolkit for controlling system-wide privileges"
url="http://www.freedesktop.org/wiki/Software/PolicyKit"
arch="all"
license="LGPL"
depends=
-makedepends="expat-dev glib-dev eggdbus-dev intltool dbus-glib-dev autoconf
- libtool automake gtk-doc gobject-introspection-dev"
depends_dev="eggdbus-dev dbus-glib-dev"
+makedepends="$depends_dev expat-dev glib-dev gtk-doc gobject-introspection-dev
+ intltool autoconf automake libtool"
install=
-subpackages="$pkgname-dev $pkgname-doc"
-source="http://cgit.freedesktop.org/PolicyKit/snapshot/PolicyKit-$pkgver.tar.bz2"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
+source="http://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
+ 0001-Bug-50145-make-netgroup-support-optional.patch
+"
-_builddir="$srcdir"/$_pkgname-$pkgver
+_builddir="$srcdir"/polkit-$pkgver
prepare() {
cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ libtoolize --force && aclocal && autoconf && automake || return 1
}
build() {
cd "$_builddir"
- ./autogen.sh --prefix=/usr \
+ ./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
@@ -32,7 +39,7 @@ build() {
--localstatedir=/var \
--disable-static \
--disable-nls \
- --disable-introspection \
+ --enable-introspection \
--with-authfw=shadow \
--with-os-type=alpine \
--disable-gtk-doc \
@@ -49,4 +56,5 @@ package() {
"$pkgdir"/usr/lib/polkit*/extensions/*.la
}
-md5sums="67f1b5d563f9c78a6c51342dafa0b020 PolicyKit-0.103.tar.bz2"
+md5sums="9c29e1b6c214f0bd6f1d4ee303dfaed9 polkit-0.105.tar.gz
+bb4e7bffa5bad89bf3033b3d866a4087 0001-Bug-50145-make-netgroup-support-optional.patch"