summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2014-02-15 10:34:57 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2014-02-15 10:34:57 +0000
commitdde40a08b74ba994a57cc0d5140da26cd2cb3ed6 (patch)
treef29fed1202be5af042ce86738de5adf32ac4d0ef /net-firewall
parentVersion bump (diff)
downloadgentoo-2-dde40a08b74ba994a57cc0d5140da26cd2cb3ed6.tar.gz
gentoo-2-dde40a08b74ba994a57cc0d5140da26cd2cb3ed6.tar.bz2
gentoo-2-dde40a08b74ba994a57cc0d5140da26cd2cb3ed6.zip
Apply patch to move away from gksu and switch to distutils-r1. Remove old ebuild. Patch by Sławomir Nizio <slawomir.nizio@sabayon.org>. Bug #486450
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ufw-frontends/ChangeLog12
-rw-r--r--net-firewall/ufw-frontends/files/org.gentoo.pkexec.ufw-gtk.policy21
-rw-r--r--net-firewall/ufw-frontends/metadata.xml4
-rw-r--r--net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild62
4 files changed, 96 insertions, 3 deletions
diff --git a/net-firewall/ufw-frontends/ChangeLog b/net-firewall/ufw-frontends/ChangeLog
index b77d6e0d8dbd..80cb149e32de 100644
--- a/net-firewall/ufw-frontends/ChangeLog
+++ b/net-firewall/ufw-frontends/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-firewall/ufw-frontends
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw-frontends/ChangeLog,v 1.7 2013/02/16 12:49:46 pacho Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw-frontends/ChangeLog,v 1.8 2014/02/15 10:34:57 hwoarang Exp $
+
+*ufw-frontends-0.3.2-r1 (15 Feb 2014)
+
+ 15 Feb 2014; Markos Chandras <hwoarang@gentoo.org>
+ +files/org.gentoo.pkexec.ufw-gtk.policy, +ufw-frontends-0.3.2-r1.ebuild,
+ metadata.xml:
+ Apply patch to move away from gksu and switch to distutils-r1. Remove old
+ ebuild. Patch by Sławomir Nizio <slawomir.nizio@sabayon.org>. Bug #486450
16 Feb 2013; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Cleanup due bug #96436
diff --git a/net-firewall/ufw-frontends/files/org.gentoo.pkexec.ufw-gtk.policy b/net-firewall/ufw-frontends/files/org.gentoo.pkexec.ufw-gtk.policy
new file mode 100644
index 000000000000..7410debbc818
--- /dev/null
+++ b/net-firewall/ufw-frontends/files/org.gentoo.pkexec.ufw-gtk.policy
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Gentoo</vendor>
+ <vendor_url>http://www.gentoo.org/</vendor_url>
+
+ <action id="org.gentoo.pkexec.ufw-gtk">
+ <message>Authentication is required to run the ufw configuration tool</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/ufw-gtk</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
diff --git a/net-firewall/ufw-frontends/metadata.xml b/net-firewall/ufw-frontends/metadata.xml
index 8467ba497e78..9558d7412c05 100644
--- a/net-firewall/ufw-frontends/metadata.xml
+++ b/net-firewall/ufw-frontends/metadata.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>proxy-maintainers</herd>
+ <herd>proxy-maintainers</herd>
<maintainer>
<email>slawomir.nizio@sabayon.org</email>
<name>Sławomir Nizio</name>
@@ -12,4 +12,6 @@
<upstream>
<remote-id type="google-code">ufw-frontends</remote-id>
</upstream>
+ <use><flag name="policykit">Use pkexec to gain root privileges</flag></use>
+ <use><flag name="kde">Use kdesu to gain root privileges (note: the flag has lower priority than "policykit")</flag></use>
</pkgmetadata>
diff --git a/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild b/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild
new file mode 100644
index 000000000000..5487cdbed40d
--- /dev/null
+++ b/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild,v 1.1 2014/02/15 10:34:57 hwoarang Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_6 python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="Provides graphical frontend to ufw"
+HOMEPAGE="http://code.google.com/p/ufw-frontends/"
+SRC_URI="http://ufw-frontends.googlecode.com/files/${P}.tar.gz"
+
+# CC-BY-NC-SA-3.0 is for a png file
+LICENSE="GPL-3 CC-BY-NC-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kde policykit"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk[${PYTHON_USEDEP}]
+ dev-python/pyinotify[${PYTHON_USEDEP}]
+ net-firewall/ufw
+ !policykit? (
+ kde? ( kde-base/kdesu ) )
+ policykit? ( sys-auth/polkit )
+"
+
+python_prepare_all() {
+ if use policykit; then
+ sed -i 's/^Exec=su-to-root -X -c/Exec=pkexec/' \
+ share/ufw-gtk.desktop || die
+ elif use kde; then
+ sed -i 's/^Exec=su-to-root -X -c/Exec=kdesu/' \
+ share/ufw-gtk.desktop || die
+ fi
+
+ # don't try to override run() to install the script
+ # under /usr/sbin; it does not work with distutils-r1
+ # and so it is handled differently (in python_install)
+ sed -i '/cmdclass=/d' setup.py || die
+
+ # Qt version is unusable
+ rm gfw/frontend_qt.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install --install-scripts="/usr/sbin"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use policykit; then
+ insinto /usr/share/polkit-1/actions/
+ doins "${FILESDIR}"/org.gentoo.pkexec.ufw-gtk.policy
+ elif ! use kde; then
+ rm "${D}usr/share/applications/ufw-gtk.desktop" || die
+ fi
+}