Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release-src > by-pkgid > 413d741e05d6e1404b2b01d31377cf32 > files > 6

draksnapshot-0.20.3-18.mga7.src.rpm

diff -ru -Ifind_removable_volumes draksnapshot-0.20.3.tv/draksnapshot-config draksnapshot-0.20.3/draksnapshot-config
--- draksnapshot-0.20.3.tv/draksnapshot-config	2009-07-27 10:30:47.000000000 +0200
+++ draksnapshot-0.20.3/draksnapshot-config	2014-07-10 22:13:11.498361461 +0200
@@ -36,8 +36,6 @@
 use Gtk2::SimpleList;
 use interactive;
 
-require_root_capability();
-
 ugtk2::add_icon_path("/usr/share/draksnapshot/pixmaps/");
 
 ######### read config
diff -ru -Ifind_removable_volumes draksnapshot-0.20.3.tv/Makefile draksnapshot-0.20.3/Makefile
--- draksnapshot-0.20.3.tv/Makefile	2010-05-26 18:56:38.000000000 +0200
+++ draksnapshot-0.20.3/Makefile	2014-07-10 22:17:36.057349178 +0200
@@ -28,10 +28,12 @@
 	find . -name '*~' | xargs rm -f
 
 install:
-	install -d $(PREFIX)/usr/{sbin,bin,share/{mime/packages,$(NAME)/pixmaps,autostart,gnome/autostart,icons/{mini,large}}}
-	install -m755 draksnapshot-config $(SBINDIR)
+	install -d $(PREFIX)/usr/{sbin,bin,libexec,share/{mime/packages,$(NAME)/pixmaps,autostart,gnome/autostart,icons/{mini,large},polkit-1/actions}}
+	install -m755 draksnapshot-config $(PREFIX)/usr/libexec/
+	install -m755 wrapper $(BINDIR)/draksnapshot-config
+	install -m644 org.mageia.draksnapshot-config.policy $(PREFIX)/usr/share/polkit-1/actions/
 	install -m755 draksnapshot-restore $(SBINDIR)
-	install -m755 draksnapshot-applet $(BINDIR)
+	install -m755 draksnapshot-applet $(SBINDIR)
 	install -d $(SYSCONFDIR)
 	install -m644 icons/$(NAME).png $(ICONSDIR)/mini/$(NAME).png
 	install -m644 icons/$(NAME).png $(ICONSDIR)/$(NAME).png
Seulement dans draksnapshot-0.20.3: Makefile~
diff -ru -Ifind_removable_volumes draksnapshot-0.20.3.tv/org.mageia.draksnapshot-config.policy draksnapshot-0.20.3/org.mageia.draksnapshot-config.policy
--- draksnapshot-0.20.3.tv/org.mageia.draksnapshot-config.policy	2014-07-10 22:13:54.495359464 +0200
+++ draksnapshot-0.20.3/org.mageia.draksnapshot-config.policy	2014-07-10 22:09:09.458372698 +0200
@@ -0,0 +1,22 @@
+<?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>Mageia</vendor>
+ <vendor_url>http://www.mageia.org/</vendor_url>
+
+ <action id="org.mageia.draksnapshot-config.pkexec.run">
+    <description>Run Backup Configurator</description>
+    <message>Authentication is required to run Backup Configurator</message>
+    <icon_name>draksnapshot-config</icon_name>
+    <defaults>
+     <allow_any>no</allow_any>
+     <allow_inactive>no</allow_inactive>
+     <allow_active>auth_admin_keep</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/draksnapshot-config</annotate>
+    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff -ru -Ifind_removable_volumes draksnapshot-0.20.3.tv/wrapper draksnapshot-0.20.3/wrapper
--- draksnapshot-0.20.3.tv/wrapper	2014-07-10 22:13:56.714359361 +0200
+++ draksnapshot-0.20.3/wrapper	2014-07-10 22:07:29.498377339 +0200
@@ -0,0 +1,6 @@
+#!/bin/sh
+if  [[ "$UID" != "0" ]] ; then
+    /usr/bin/pkexec /usr/libexec/draksnapshot-config "$@"
+    exit $?
+fi
+exec /usr/libexec/draksnapshot-config "$@"