Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
added gksu-polkit
Browse files Browse the repository at this point in the history
added dependency libgee06
  • Loading branch information
fhdk committed Jun 1, 2018
1 parent c762f04 commit 05fbe8f
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions gksu-polkit/.gitignore
@@ -0,0 +1 @@
gksu-polkit
50 changes: 50 additions & 0 deletions gksu-polkit/PKGBUILD
@@ -0,0 +1,50 @@
# Maintainer: fhdk <fhatmanjarodotorg>
# Contributor: Brian Bidulock <bidulock@openss7.org>

pkgname=gksu-polkit
pkgver=0.0.3
pkgrel=1
pkgdesc="Replacement for gksu that uses PolicyKit"
arch=('x86_64' 'i686')
url="https://live.gnome.org/gksu"
license=('GPL3')
depends=('polkit' 'libgee06' 'gtk2' 'startup-notification' 'dbus-glib' 'xorg-xauth')
makedepends=('git' 'gtk-doc' 'vala' 'intltool')
provides=('gksu-polkit' 'gksu')
conflicts=('gksu-polkit-git' 'gksu')
install='gksu-polkit.install'
source=("git+https://github.com/fhdk/gksu-polkit.git"
"gksu-polkit-0.0.3-policy.patch"
"gksu-polkit-dbus.patch"
"gksu-polkit.service")
sha256sums=('SKIP'
'334e26dce80e0dead984b04122d22ee13e4c5ff5d370098c7e46503855fad250'
'a0efd0d989abb31c765f4eedda6e1ff99f99cfff1ef52bc11adb983505836f0d'
'41ff7af4bfbb56893393f25135966b54c1bf7683fc38a2a0f0129fb23712b27b')

prepare() {
cd $pkgname

# https://bugzilla.redhat.com/show_bug.cgi?id=883162
# https://access.redhat.com/security/cve/CVE-2012-5617
patch -Np1 -b -z .orig -i "$srcdir/gksu-polkit-0.0.3-policy.patch"

# Systemd dbus service management
patch -Np0 -b -z .orig -i "$srcdir/gksu-polkit-dbus.patch"
}

build() {
cd $pkgname
LDFLAGS=$(echo "$LDFLAGS"|sed 's|,--as-needed||')
./autogen.sh --prefix=/usr --sbindir=/usr/bin
make
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install
install -Dm644 "$srcdir/gksu-polkit.service" \
"$pkgdir/$(pkg-config systemd --variable=systemdsystemunitdir )/gksu.service"
}

# vim:set ts=2 sw=2 et:
16 changes: 16 additions & 0 deletions gksu-polkit/gksu-polkit-0.0.3-policy.patch
@@ -0,0 +1,16 @@
diff -Naur gksu-polkit.old/data/org.gnome.gksu.policy gksu-polkit/data/org.gnome.gksu.policy
--- gksu-polkit.old/data/org.gnome.gksu.policy 2013-07-21 14:42:16.039085780 +0200
+++ gksu-polkit/data/org.gnome.gksu.policy 2013-07-21 14:42:44.810774723 +0200
@@ -10,9 +10,9 @@
<description>spawn</description>
<message>System policy prevents executing a program with administration privileges</message>
<defaults>
- <allow_any>auth_self</allow_any>
- <allow_inactive>auth_self</allow_inactive>
- <allow_active>auth_self</allow_active>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
</defaults>
</action>

7 changes: 7 additions & 0 deletions gksu-polkit/gksu-polkit-dbus.patch
@@ -0,0 +1,7 @@
--- mechanism/org.gnome.Gksu.service.in 2008-09-19 01:20:07.000000000 +0200
+++ mechanism/org.gnome.Gksu.service.in 2012-09-15 21:30:56.475687372 +0200
@@ -2,3 +2,4 @@
Name=org.gnome.Gksu
Exec=@sbindir@/gksu-server
User=root
+SystemdService=gksu.service
7 changes: 7 additions & 0 deletions gksu-polkit/gksu-polkit.install
@@ -0,0 +1,7 @@
post_install() {
ln -s /usr/bin/gsku-polkit /usr/bin/gksu
}

post_remove() {
rm -f /usr/bin/gksu
}
7 changes: 7 additions & 0 deletions gksu-polkit/gksu-polkit.service
@@ -0,0 +1,7 @@
[Unit]
Description=Gksu server

[Service]
Type=dbus
BusName=org.gnome.Gksu
ExecStart=/usr/sbin/gksu-server
31 changes: 31 additions & 0 deletions libgee06/PKGBUILD
@@ -0,0 +1,31 @@
# Maintainer: ValHue <vhuelamo at gmail dot com>
# https://github.com/ValHue/AUR-PKGBUILDs
#
# $Id: PKGBUILD 198164 2013-10-30 13:11:04Z allan $
# Contributor: Jan Alexander Steffens (heftig) <jan dot steffens at gmail dot com>
# Contributor: Ionut Biru <ibiru at archlinux dot org>
# Contributor: Sergej Pupykin <pupykin.s+arch at gmail dot com>

pkgname=libgee06
_pkgname=libgee
pkgver=0.6.8
pkgrel=1
pkgdesc="GObject collection library (legacy)"
url="http://live.gnome.org/Libgee"
license=('LGPL2.1')
arch=('i686' 'x86_64')
depends=('glib2')
makedepends=('gobject-introspection')
source=("http://ftp.gnome.org/pub/GNOME/sources/${_pkgname}/${pkgver::3}/${_pkgname}-${pkgver}.tar.xz")
sha256sums=('a61f8d796173d41f6144a030d4bd22461f0bb3fa18a3ebe02341b315feebf5d3')

build() {
cd "${_pkgname}-${pkgver}"
./configure --prefix=/usr --disable-static
make
}

package() {
cd "${_pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}

0 comments on commit 05fbe8f

Please sign in to comment.