aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--NEWS2
-rw-r--r--data/mageiaupdate.desktop.in2
-rw-r--r--data/rpmdrake-browse-only.desktop.in2
-rw-r--r--data/rpmdrake-sources.desktop.in4
-rw-r--r--data/rpmdrake.desktop.in2
-rw-r--r--po/Makefile4
-rw-r--r--polkit/Makefile24
-rw-r--r--polkit/org.mageia.drakrpm-addmedia.policy.in (renamed from polkit/policy/org.mageia.rpmdrake-addmedia.policy.in)4
-rw-r--r--polkit/org.mageia.drakrpm-editmedia.policy.in (renamed from polkit/policy/org.mageia.rpmdrake-editmedia.policy.in)4
-rw-r--r--polkit/org.mageia.drakrpm-update.policy.in (renamed from polkit/policy/org.mageia.rpmdrake-update.policy.in)4
-rw-r--r--polkit/org.mageia.drakrpm.policy.in (renamed from polkit/policy/org.mageia.rpmdrake.policy.in)4
-rw-r--r--polkit/policy/Makefile16
-rwxr-xr-xpolkit/wrappers/MageiaUpdate2
-rwxr-xr-xpolkit/wrappers/drakrpm-edit-media2
-rwxr-xr-xpolkit/wrappers/gurpmi.addmedia2
-rwxr-xr-xpolkit/wrappers/rpmdrake2
17 files changed, 52 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index ea11ec5f..dccf69ad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 5.50
NAME = rpmdrake
-DIRS = po polkit/policy data mime
+DIRS = po polkit data mime
PREFIX = /usr/local
DATADIR = $(PREFIX)/share
@@ -9,7 +9,7 @@ BINDIR = $(PREFIX)/bin
SBINDIR = $(PREFIX)/sbin
LIBEXECDIR = $(PREFIX)/libexec
RPM=$(shell rpm --eval %_topdir)
-PERL_VENDORLIB=$(DESTDIR)/$(shell perl -V:installvendorlib | perl -pi -e "s/.*=//; s/[;']//g")
+PERL_VENDORLIB=$(DESTDIR)/$(shell perl -V:installvendorlib | perl -pi -e "s/.*=//; s/[;']//g")
all: dirs
@@ -23,12 +23,15 @@ install: $(ALL)
./simplify-drakx-modules {gurpmi.addmedia,edit-urpm-sources.pl}
@for n in $(DIRS); do make -C $$n install; done
install -d $(BINDIR) $(SBINDIR) $(LIBEXECDIR)
- install rpmdrake MageiaUpdate gurpmi.addmedia $(LIBEXECDIR)
- install edit-urpm-sources.pl $(LIBEXECDIR)/drakrpm-edit-media
- install polkit/wrappers/* $(BINDIR)
- ln -sf drakrpm-edit-media $(BINDIR)/edit-urpm-sources.pl
- ln -sf rpmdrake $(BINDIR)/drakrpm
- ln -sf MageiaUpdate $(BINDIR)/drakrpm-update
+ install rpmdrake $(LIBEXECDIR)/drakrpm
+ install MageiaUpdate $(LIBEXECDIR)/drakrpm-update
+ install gurpmi.addmedia $(LIBEXECDIR)/drakrpm-addmedia
+ install edit-urpm-sources.pl $(LIBEXECDIR)/drakrpm-editmedia
+ ln -sf drakrpm-update $(BINDIR)/MageiaUpdate
+ ln -sf drakrpm-editmedia $(BINDIR)/drakrpm-edit-media
+ ln -sf drakrpm-addmedia $(BINDIR)/gurpmi.addmedia
+ ln -sf drakrpm-editmedia $(BINDIR)/edit-urpm-sources.pl
+ ln -sf drakrpm $(BINDIR)/rpmdrake
install -d $(DATADIR)/rpmdrake/icons
install -m644 icons/*.png $(DATADIR)/rpmdrake/icons
install -m644 gui.lst $(DATADIR)/rpmdrake
diff --git a/NEWS b/NEWS
index b8aaa384..49d0b2f3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- tidy up polkit support
+
Version 5.50 - 3 September 2013, Colin Guthrie
- use polkit for authorisation (mga#11125)
diff --git a/data/mageiaupdate.desktop.in b/data/mageiaupdate.desktop.in
index c093db50..f3c43328 100644
--- a/data/mageiaupdate.desktop.in
+++ b/data/mageiaupdate.desktop.in
@@ -1,7 +1,7 @@
[Desktop Entry]
_Name=Mageia Update
Icon=mageiaupdate
-Exec=/usr/bin/MageiaUpdate
+Exec=/usr/bin/drakrpm-update
Terminal=false
Type=Application
Categories=X-MandrivaLinux-CrossDesktop;GTK;System;PackageManager;
diff --git a/data/rpmdrake-browse-only.desktop.in b/data/rpmdrake-browse-only.desktop.in
index 88d18530..5c893c4c 100644
--- a/data/rpmdrake-browse-only.desktop.in
+++ b/data/rpmdrake-browse-only.desktop.in
@@ -2,7 +2,7 @@
_Name=Browse Available Software
Icon=rpmdrake
_Comment=A graphical front end for browsing installed & available packages
-Exec=/usr/bin/rpmdrake
+Exec=/usr/bin/drakrpm
Terminal=false
Type=Application
Categories=X-MandrivaLinux-CrossDesktop;GTK;System;PackageManager;
diff --git a/data/rpmdrake-sources.desktop.in b/data/rpmdrake-sources.desktop.in
index afaced9c..c6d07037 100644
--- a/data/rpmdrake-sources.desktop.in
+++ b/data/rpmdrake-sources.desktop.in
@@ -1,8 +1,8 @@
[Desktop Entry]
_Name=Software Media Manager
Icon=edit-urpm-sources
-Exec=/usr/bin/drakrpm-edit-media
-TryExec=/usr/bin/drakrpm-edit-media
+Exec=/usr/bin/drakrpm-editmedia
+TryExec=/usr/bin/drakrpm-editmedia
Terminal=false
Type=Application
Categories=X-MandrivaLinux-CrossDesktop;GTK;System;PackageManager;
diff --git a/data/rpmdrake.desktop.in b/data/rpmdrake.desktop.in
index 9ddabb09..ea4870e1 100644
--- a/data/rpmdrake.desktop.in
+++ b/data/rpmdrake.desktop.in
@@ -1,7 +1,7 @@
[Desktop Entry]
_Name=Install & Remove Software
Icon=rpmdrake
-Exec=/usr/bin/rpmdrake
+Exec=/usr/bin/drakrpm
_Comment=A graphical front end for installing, removing and updating packages
Terminal=false
Type=Application
diff --git a/po/Makefile b/po/Makefile
index db4e5d7e..68d17555 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -40,9 +40,9 @@ install:
done
POTFILES.in:
- (cd .. ; /bin/ls -1 data/*.desktop.in mime/*.desktop.in polkit/policy/*.policy.in; ) > POTFILES.in
+ (cd .. ; /bin/ls -1 data/*.desktop.in mime/*.desktop.in polkit/*.policy.in; ) > POTFILES.in
clean:
- @rm -rf *.mo *.pof *.pog $(POFILES:%=%t) $(PL_CFILES) non-perl.pot $(PGOAL)_tmp.pot
+ @rm -rf *.mo *.pof *.pog $(POFILES:%=%t) $(PL_CFILES) POTFILES.in non-perl.pot $(PGOAL)_tmp.pot
check:
for i in *.po; do msgfmt -c $$i -o /dev/null; done
diff --git a/polkit/Makefile b/polkit/Makefile
new file mode 100644
index 00000000..34e81069
--- /dev/null
+++ b/polkit/Makefile
@@ -0,0 +1,24 @@
+BINDIR = /usr/bin
+LIBEXECDIR = /usr/libexec
+BINDEST = $(DESTDIR)$(BINDIR)
+POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
+
+POLICY_IN := $(wildcard *.policy.in)
+POLICY = $(POLICY_IN:.policy.in=.policy)
+WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY))
+
+all: $(WRAPPERS) $(POLICY)
+
+clean:
+ rm -f $(WRAPPERS) $(POLICY)
+
+%: org.mageia.%.policy.in
+ @echo -e "#!/bin/sh\nexec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@
+
+%.policy: %.policy.in
+ intltool-merge --utf8 ../po $< $@ -x -u -c ../po/.intltool-merge-cache
+
+install: all
+ install -d $(BINDEST) $(POLKITPOLICYDEST)
+ install -m755 $(WRAPPERS) $(BINDEST)
+ install -m644 $(POLICY) $(POLKITPOLICYDEST)
diff --git a/polkit/policy/org.mageia.rpmdrake-addmedia.policy.in b/polkit/org.mageia.drakrpm-addmedia.policy.in
index d4a58362..a42946ec 100644
--- a/polkit/policy/org.mageia.rpmdrake-addmedia.policy.in
+++ b/polkit/org.mageia.drakrpm-addmedia.policy.in
@@ -7,7 +7,7 @@
<vendor>Mageia</vendor>
<vendor_url>http://www.mageia.org/</vendor_url>
- <action id="org.mageia.rpmdrake-addmedia.pkexec.run">
+ <action id="org.mageia.drakrpm-addmedia.pkexec.run">
<_description>Run Mageia Package Media Adder</_description>
<_message>Authentication is required to run Mageia Package Media Adder</_message>
<icon_name>rpmdrake</icon_name>
@@ -16,7 +16,7 @@
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/gurpmi.addmedia</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm-addmedia</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake-editmedia.policy.in b/polkit/org.mageia.drakrpm-editmedia.policy.in
index d250ca73..81008bba 100644
--- a/polkit/policy/org.mageia.rpmdrake-editmedia.policy.in
+++ b/polkit/org.mageia.drakrpm-editmedia.policy.in
@@ -7,7 +7,7 @@
<vendor>Mageia</vendor>
<vendor_url>http://www.mageia.org/</vendor_url>
- <action id="org.mageia.rpmdrake-editmedia.pkexec.run">
+ <action id="org.mageia.drakrpm-editmedia.pkexec.run">
<_description>Run Mageia Package Media Editor</_description>
<_message>Authentication is required to run Mageia Package Media Editor</_message>
<icon_name>rpmdrake</icon_name>
@@ -16,7 +16,7 @@
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm-edit-media</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm-editmedia</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake-update.policy.in b/polkit/org.mageia.drakrpm-update.policy.in
index ac7bf615..29096238 100644
--- a/polkit/policy/org.mageia.rpmdrake-update.policy.in
+++ b/polkit/org.mageia.drakrpm-update.policy.in
@@ -7,7 +7,7 @@
<vendor>Mageia</vendor>
<vendor_url>http://www.mageia.org/</vendor_url>
- <action id="org.mageia.rpmdrake-update.pkexec.run">
+ <action id="org.mageia.drakrpm-update.pkexec.run">
<_description>Run Mageia Updater</_description>
<_message>Authentication is required to run Mageia Updater</_message>
<icon_name>rpmdrake</icon_name>
@@ -16,7 +16,7 @@
<allow_inactive>no</allow_inactive>
<allow_active>auth_self_keep</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/MageiaUpdate</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm-update</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
diff --git a/polkit/policy/org.mageia.rpmdrake.policy.in b/polkit/org.mageia.drakrpm.policy.in
index bdc43360..6af5277c 100644
--- a/polkit/policy/org.mageia.rpmdrake.policy.in
+++ b/polkit/org.mageia.drakrpm.policy.in
@@ -7,7 +7,7 @@
<vendor>Mageia</vendor>
<vendor_url>http://www.mageia.org/</vendor_url>
- <action id="org.mageia.rpmdrake.pkexec.run">
+ <action id="org.mageia.drakrpm.pkexec.run">
<_description>Run Mageia Package Manager</_description>
<_message>Authentication is required to run Mageia Package Manager</_message>
<icon_name>rpmdrake</icon_name>
@@ -16,7 +16,7 @@
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/rpmdrake</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakrpm</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
diff --git a/polkit/policy/Makefile b/polkit/policy/Makefile
deleted file mode 100644
index 1de72221..00000000
--- a/polkit/policy/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
-
-POLICY_IN := $(wildcard *.policy.in)
-POLICY = $(POLICY_IN:.policy.in=.policy)
-
-all: $(POLICY)
-
-clean:
- rm -f $(POLICY)
-
-install: all
- install -d $(POLKITPOLICYDEST)
- install -m644 $(POLICY) $(POLKITPOLICYDEST)
-
-%.policy: %.policy.in
- intltool-merge --utf8 ../../po $< $@ -x -u -c ../../po/.intltool-merge-cache
diff --git a/polkit/wrappers/MageiaUpdate b/polkit/wrappers/MageiaUpdate
deleted file mode 100755
index f732b981..00000000
--- a/polkit/wrappers/MageiaUpdate
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/MageiaUpdate $*
diff --git a/polkit/wrappers/drakrpm-edit-media b/polkit/wrappers/drakrpm-edit-media
deleted file mode 100755
index 30fb48d3..00000000
--- a/polkit/wrappers/drakrpm-edit-media
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/drakrpm-edit-media $*
diff --git a/polkit/wrappers/gurpmi.addmedia b/polkit/wrappers/gurpmi.addmedia
deleted file mode 100755
index 2e029258..00000000
--- a/polkit/wrappers/gurpmi.addmedia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/gurpmi.addmedia $*
diff --git a/polkit/wrappers/rpmdrake b/polkit/wrappers/rpmdrake
deleted file mode 100755
index 60a00841..00000000
--- a/polkit/wrappers/rpmdrake
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/rpmdrake $*