[udisks2] Manually set PATH, if not set

David Zeuthen davidz at fedoraproject.org
Sat Jan 21 21:32:06 UTC 2012


commit 13ba6ee0da79ac3326e449a72799868a5dd4cc2a
Author: David Zeuthen <davidz at redhat.com>
Date:   Sat Jan 21 16:32:00 2012 -0500

    Manually set PATH, if not set

 0001-Ensure-PATH-is-set.patch |   29 +++++++++++++++++++++++++++++
 udisks2.spec                  |    8 +++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/0001-Ensure-PATH-is-set.patch b/0001-Ensure-PATH-is-set.patch
new file mode 100644
index 0000000..db9647c
--- /dev/null
+++ b/0001-Ensure-PATH-is-set.patch
@@ -0,0 +1,29 @@
+From d31b65e8f1ff1860aef79317ba270d7d2cefb041 Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz at redhat.com>
+Date: Sat, 21 Jan 2012 16:26:46 -0500
+Subject: [PATCH] Ensure PATH is set
+
+Apparently PATH may be empty if activated by recent D-Bus daemons.
+
+Signed-off-by: David Zeuthen <davidz at redhat.com>
+---
+ src/main.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index a330a58..0039fe8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -140,6 +140,9 @@ main (int    argc,
+         }
+     }
+ 
++  if (g_getenv ("PATH") == NULL)
++    g_setenv ("PATH", "/usr/bin:/bin:/usr/sbin:/sbin", TRUE);
++
+   udisks_notice ("udisks daemon version %s starting", PACKAGE_VERSION);
+ 
+   loop = g_main_loop_new (NULL, FALSE);
+-- 
+1.7.7.5
+
diff --git a/udisks2.spec b/udisks2.spec
index 7de245a..ef0e336 100644
--- a/udisks2.spec
+++ b/udisks2.spec
@@ -8,7 +8,7 @@
 Summary: Disk Manager
 Name: udisks2
 Version: 1.90.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: System Environment/Libraries
 URL: http://www.freedesktop.org/wiki/Software/udisks
@@ -49,6 +49,8 @@ Requires: cryptsetup-luks
 # for /proc/self/mountinfo, only available in 2.6.26 or higher
 Conflicts: kernel < 2.6.26
 
+Patch0: 0001-Ensure-PATH-is-set.patch
+
 %description
 udisks provides a daemon, D-Bus API and command line tools for
 managing disks and storage devices. This package is for the udisks 2.x
@@ -78,6 +80,7 @@ daemon. This package is for the udisks 2.x series.
 
 %prep
 %setup -q -n udisks-%{version}
+%patch0 -p1
 
 %build
 %configure --enable-gtk-doc
@@ -132,6 +135,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
 
 # Note: please don't forget the %{?dist} in the changelog. Thanks
 %changelog
+* Fri Jan 21 2012 David Zeuthen <davidz at redhat.com> - 1.90.0-3%{?dist}
+- Manually set PATH, if not set
+
 * Fri Jan 20 2012 David Zeuthen <davidz at redhat.com> - 1.90.0-2%{?dist}
 - Rebuild
 


More information about the scm-commits mailing list