SHA256
1
0
forked from pool/gparted

Accepting request 335050 from GNOME:Apps

1

OBS-URL: https://build.opensuse.org/request/show/335050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gparted?expand=0&rev=31
This commit is contained in:
Dominique Leuenberger 2015-10-02 12:06:56 +00:00 committed by Git OBS Bridge
parent 3a10924b5e
commit b02352ec33
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Sep 30 15:03:01 UTC 2015 - dimstar@opensuse.org
- Fix boo#920510: Gparted Won't Start:
+ Add gparted_polkit: launch gparted using pkexec through a
wrapper script. Launching pkexec directly from gnome-shell
results in a double fork and pkexec does not like to operate
on Parent PID = 1.
+ Replace the command line in the .desktop file by
/usr/bin/gparted_polkit.
-------------------------------------------------------------------
Wed Aug 05 09:04:33 UTC 2015 - joerg.lorenzen@ki.tng.de

View File

@ -25,6 +25,7 @@ Group: System/Filesystems
Url: http://gparted.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/gparted/gparted/gparted-0.23.0/%{name}-%{version}.tar.bz2
Source1: gparted.policy
Source2: gparted_polkit
Source98: http://downloads.sourceforge.net/project/gparted/gparted/gparted-0.23.0/%{name}-%{version}.tar.bz2.sig
Source99: %{name}.keyring
BuildRequires: e2fsprogs-devel
@ -66,6 +67,7 @@ copying data residing on hard disks and mirroring one partition with another
%lang_package
%prep
%setup -q
sed -i "s:@gksuprog@ @installdir@/gparted %f:@installdir@/gparted_polkit %f:g" gparted.desktop.in.in
translation-update-upstream
%build
@ -79,6 +81,10 @@ make %{?_smp_mflags}
install -Dm0644 %{S:1} %{buildroot}%{_datadir}/polkit-1/actions/org.opensuse.policykit.gparted.policy
# install the helper wrapper
mkdir -p %{buildroot}%{_sbindir}
install -p -m755 %{SOURCE2} %{buildroot}%{_sbindir}
%suse_update_desktop_file %{name}
%fdupes %{buildroot}
%find_lang %{name} %{?no_lang_C}
@ -97,6 +103,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README ChangeLog AUTHORS NEWS COPYING
%{_sbindir}/gparted_polkit
%{_sbindir}/gparted
%{_sbindir}/gpartedbin
%{_mandir}/man8/gparted.8.gz

9
gparted_polkit Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/sbin/gparted" "$@"
else
/usr/sbin/gparted "$@"
fi