From dde40a08b74ba994a57cc0d5140da26cd2cb3ed6 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Sat, 15 Feb 2014 10:34:57 +0000 Subject: Apply patch to move away from gksu and switch to distutils-r1. Remove old ebuild. Patch by Sławomir Nizio . Bug #486450 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!) --- net-firewall/ufw-frontends/ChangeLog | 12 ++++- .../files/org.gentoo.pkexec.ufw-gtk.policy | 21 ++++++++ net-firewall/ufw-frontends/metadata.xml | 4 +- .../ufw-frontends/ufw-frontends-0.3.2-r1.ebuild | 62 ++++++++++++++++++++++ 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 net-firewall/ufw-frontends/files/org.gentoo.pkexec.ufw-gtk.policy create mode 100644 net-firewall/ufw-frontends/ufw-frontends-0.3.2-r1.ebuild (limited to 'net-firewall') 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 + +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 . Bug #486450 16 Feb 2013; Pacho Ramos 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 @@ + + + + + Gentoo + http://www.gentoo.org/ + + + Authentication is required to run the ufw configuration tool + + auth_admin + auth_admin + auth_admin + + /usr/sbin/ufw-gtk + true + + + 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 @@ -proxy-maintainers + proxy-maintainers slawomir.nizio@sabayon.org Sławomir Nizio @@ -12,4 +12,6 @@ ufw-frontends + Use pkexec to gain root privileges + Use kdesu to gain root privileges (note: the flag has lower priority than "policykit") 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 +} -- cgit v1.2.3-65-gdbad