rpms/gparted/devel gparted-console.apps, NONE, 1.1 gparted-dont-lock-hal.patch, NONE, 1.1 gparted-pam.d, NONE, 1.1 run-gparted, NONE, 1.1 gparted.spec, 1.25, 1.26

Deji Akingunola (deji) fedora-extras-commits at redhat.com
Tue Apr 3 03:53:06 UTC 2007


Author: deji

Update of /cvs/extras/rpms/gparted/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30968

Modified Files:
	gparted.spec 
Added Files:
	gparted-console.apps gparted-dont-lock-hal.patch gparted-pam.d 
	run-gparted 
Log Message:
* Mon Apr 03 2007 Deji Akingunola <dakingun at gmail.com> - 0.3.3-7
- Patch gparted to not create a hal fdi file but use hal-lock instead, this will hopefully fix BZ #215657
- Clean up the spec file



--- NEW FILE gparted-console.apps ---
USER=root
PROGRAM=%{_bindir}/run_gparted
SESSION=true

gparted-dont-lock-hal.patch:

--- NEW FILE gparted-dont-lock-hal.patch ---
--- src/GParted_Core.cc	2006-12-05 14:39:31.000000000 -0500
+++ src/GParted_Core.cc.new	2007-04-02 21:59:01.000000000 -0400
@@ -54,21 +54,6 @@
 
 	ped_exception_set_handler( ped_exception_handler ) ; 
 	
-	//disable automount //FIXME: temporary hack, till i find a better solution...
-	std::ofstream fdi_file( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ) ;
-	if ( fdi_file )
-	{
-		fdi_file << "<deviceinfo version='0.2'>" ;
-		fdi_file << "<device>" ;
-		fdi_file << "<match key='@block.storage_device:storage.hotpluggable' bool='true'>" ;
-		fdi_file << "<merge key='volume.ignore' type='bool'>true</merge>" ;
-		fdi_file << "</match>" ;
-		fdi_file << "</device>" ;
-		fdi_file << "</deviceinfo>" ;
-
-		fdi_file .close() ;
-	}	
-
 	//get valid flags ...
 	for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast<PedPartitionFlag>( NULL ) ) ;
 	      flag ;
@@ -2287,8 +2272,6 @@
 	if ( p_filesystem )
 		delete p_filesystem ;
 
-	//remove .fdi file..
-	remove( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ) ;
 }
 	
 } //GParted


--- NEW FILE gparted-pam.d ---
#%PAM-1.0
auth	sufficient	pam_rootok.so
auth	sufficient	pam_timestamp.so
auth	include		system-auth
session	required	pam_permit.so
session	optional	pam_xauth.so
session	optional	pam_timestamp.so
account	required	pam_permit.so


--- NEW FILE run-gparted ---
#!/bin/bash
%{_bindir}/hal-lock --interface org.freedesktop.Hal.Device.Storage  --exclusive --run %{_sbindir}/gparted


Index: gparted.spec
===================================================================
RCS file: /cvs/extras/rpms/gparted/devel/gparted.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- gparted.spec	21 Mar 2007 14:12:37 -0000	1.25
+++ gparted.spec	3 Apr 2007 03:52:33 -0000	1.26
@@ -1,11 +1,15 @@
 Summary: Gnome Partition Editor
 Name:    gparted
 Version: 0.3.3
-Release: 6%{?dist}
+Release: 7%{?dist}
 Group:   Applications/System
 License: GPL
 URL:     http://gparted.sourceforge.net
 Source0: http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
+Source1: run-gparted
+Source2: gparted-console.apps
+Source3: gparted-pam.d
+Patch0:	gparted-dont-lock-hal.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: gtkmm24-devel parted-devel 
 BuildRequires: e2fsprogs-devel gettext perl(XML::Parser) 
@@ -20,6 +24,7 @@
 
 %prep
 %setup -q
+%patch -p0 -b .hal
 
 %build
 %configure
@@ -36,29 +41,20 @@
         --add-category X-Fedora                          \
         %{buildroot}%{_datadir}/applications/%{name}.desktop
 
+# Create a helper script to launch gparted using hal-lock
+cp %{SOURCE1} %{buildroot}%{_bindir}/
+chmod 755 %{buildroot}%{_bindir}/run-gparted
+
 #### consolehelper stuff
 mkdir -p %{buildroot}%{_sbindir}
 mv %{buildroot}%{_bindir}/gparted %{buildroot}%{_sbindir}/
 ln -s consolehelper %{buildroot}%{_bindir}/gparted
 
 mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
-cat << EOF > %{buildroot}%{_sysconfdir}/security/console.apps/gparted
-USER=root
-PROGRAM=%{_sbindir}/gparted
-SESSION=true
-EOF
+cp %{SOURCE2} %{buildroot}%{_sysconfdir}/security/console.apps/gparted
 
 mkdir -p %{buildroot}%{_sysconfdir}/pam.d
-cat << EOF > %{buildroot}%{_sysconfdir}/pam.d/gparted
-#%PAM-1.0
-auth	sufficient	pam_rootok.so
-auth	sufficient	pam_timestamp.so
-auth	include		system-auth
-session	required	pam_permit.so
-session	optional	pam_xauth.so
-session	optional	pam_timestamp.so
-account	required	pam_permit.so
-EOF
+cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/gparted
 
 %find_lang %{name}
 
@@ -69,6 +65,7 @@
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING ChangeLog README
 %{_bindir}/gparted
+%{_bindir}/run-gparted
 %{_sbindir}/gparted
 %{_datadir}/applications/fedora-gparted.desktop
 %{_datadir}/pixmaps/gparted.png
@@ -76,6 +73,10 @@
 %config(noreplace) %{_sysconfdir}/security/console.apps/gparted
 
 %changelog
+* Mon Apr 03 2007 Deji Akingunola <dakingun at gmail.com> - 0.3.3-7
+- Patch gparted to not create a hal fdi file but use hal-lock instead, this will hopefully fix BZ #215657
+- Clean up the spec file
+
 * Wed Mar 21 2007 Deji Akingunola <dakingun at gmail.com> - 0.3.3-6
 - Rebuild for GNU parted-1.8.6
 




More information about the fedora-extras-commits mailing list