[Pkg-utopia-commits] r1915 - in /packages/unstable/hal/debian: changelog control patches/87_fix_hurd_compilation.patch

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Sat Dec 8 20:54:06 UTC 2007


Author: sjoerd
Date: Sat Dec  8 20:54:05 2007
New Revision: 1915

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=1915
Log:
* debian/control: Don't build-depend on libusb-dev on hurd-i386
* debian/patches/87_fix_hurd_compilation.patch:
  - Added. Fix compilation on the Hurd. Based on a patch by Samuel Thibault
    (Closes: #444574)

Added:
    packages/unstable/hal/debian/patches/87_fix_hurd_compilation.patch
Modified:
    packages/unstable/hal/debian/changelog
    packages/unstable/hal/debian/control

Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=1915&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Sat Dec  8 20:54:05 2007
@@ -10,6 +10,10 @@
   * debian/patches/86_fix_killswitch_callout.patch:
     - Added. Fixes errors from the killswitch callouts on non-dell machines
       (Closes: #453203)
+  * debian/control: Don't build-depend on libusb-dev on hurd-i386
+  * debian/patches/87_fix_hurd_compilation.patch:
+    - Added. Fix compilation on the Hurd. Based on a patch by Samuel Thibault
+      (Closes: #444574)
 
  -- Michael Biebl <biebl at debian.org>  Mon, 03 Dec 2007 00:27:14 +0100
 

Modified: packages/unstable/hal/debian/control
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/control?rev=1915&op=diff
==============================================================================
--- packages/unstable/hal/debian/control (original)
+++ packages/unstable/hal/debian/control Sat Dec  8 20:54:05 2007
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Sjoerd Simons <sjoerd at debian.org>
 Uploaders: Sebastian Dröge <slomo at debian.org>, Michael Biebl <biebl at debian.org>
-Build-Depends: debhelper (>= 5.0.37.2), cdbs, autotools-dev, libdbus-glib-1-dev (>= 0.61), libglib2.0-dev, libsysfs-dev, libexpat1-dev, libpopt-dev, pkg-config, pciutils, doxygen, intltool (>= 0.22), libusb-dev, libvolume-id-dev, xmlto, libxml2-utils, gtk-doc-tools, libsmbios-dev [i386 amd64], gperf
+Build-Depends: debhelper (>= 5.0.37.2), cdbs, autotools-dev, libdbus-glib-1-dev (>= 0.61), libglib2.0-dev, libsysfs-dev, libexpat1-dev, libpopt-dev, pkg-config, pciutils, doxygen, intltool (>= 0.22), libusb-dev [!hurd-i386], libvolume-id-dev, xmlto, libxml2-utils, gtk-doc-tools, libsmbios-dev [i386 amd64], gperf
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-utopia/packages/unstable/hal
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal

Added: packages/unstable/hal/debian/patches/87_fix_hurd_compilation.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/87_fix_hurd_compilation.patch?rev=1915&op=file
==============================================================================
--- packages/unstable/hal/debian/patches/87_fix_hurd_compilation.patch (added)
+++ packages/unstable/hal/debian/patches/87_fix_hurd_compilation.patch Sat Dec  8 20:54:05 2007
@@ -1,0 +1,107 @@
+commit 03ec951d17d8a7950083aa742f628b757e9110f3
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date:   Sat Dec 8 21:38:36 2007 +0100
+
+    implement osspec_privileged_init in the dummy backend
+    
+    This added a noop osspec_privileged_init implementation for the dummy backend.
+    Patch by Samuel Thibault in Debian bug #444574
+
+diff --git a/hald/dummy/osspec.c b/hald/dummy/osspec.c
+index c4bc3c9..36ed07b 100644
+--- a/hald/dummy/osspec.c
++++ b/hald/dummy/osspec.c
+@@ -38,6 +38,11 @@
+ #include "../device_info.h"
+ 
+ void
++osspec_privileged_init (void)
++{
++}
++
++void
+ osspec_init (void)
+ {
+ }
+commit be950e548472c8b632cfc9d4b3a916fa3d49bb17
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date:   Sat Dec 8 21:41:17 2007 +0100
+
+    get rid of PATH_MAX users to allow compilation on the Hurd
+    
+    This patch gets rid of all uses of PATH_MAX to allow compilation on the Hurd.
+    Based on a patch by Samuel Thibault in Debian bug #444574
+
+diff --git a/hald/create_cache.c b/hald/create_cache.c
+index c78c03f..37e2d10 100644
+--- a/hald/create_cache.c
++++ b/hald/create_cache.c
+@@ -608,7 +608,7 @@ di_rules_init (void)
+ 	char * cachename;
+ 	int fd = -1;
+ 	struct cache_header header;
+-	char cachename_temp [PATH_MAX+1];
++	gchar *cachename_temp;
+ 	char *hal_fdi_source_preprobe = getenv ("HAL_FDI_SOURCE_PREPROBE");
+ 	char *hal_fdi_source_information = getenv ("HAL_FDI_SOURCE_INFORMATION");
+ 	char *hal_fdi_source_policy = getenv ("HAL_FDI_SOURCE_POLICY");
+@@ -623,8 +623,7 @@ di_rules_init (void)
+ 	if (haldc_verbose)
+ 		HAL_INFO (("Loading rules"));
+ 
+-	strncpy(cachename_temp, cachename, PATH_MAX);
+-	strncat(cachename_temp, "~", PATH_MAX);
++	cachename_temp = g_strconcat (cachename, "~", NULL);
+ 
+ 	fd = open(cachename_temp, O_CREAT|O_RDWR|O_TRUNC, 0644);
+ 	if(fd < 0) {
+@@ -681,9 +680,8 @@ di_rules_init (void)
+ 	pad32_write(fd, 0, &header, sizeof(struct cache_header));
+ 	close(fd);
+ 	if (rename (cachename_temp, cachename) != 0) {
+-		unlink (cachename_temp);
+ 		HAL_ERROR (("Cannot rename '%s' to '%s': %s", cachename_temp, cachename, strerror (errno)));
+-		return -1;
++		goto error;
+ 	}
+ 
+ 	if (haldc_verbose){
+@@ -703,6 +701,7 @@ error:
+ 		close (fd);
+ 
+ 	unlink (cachename_temp);
++	g_free (cachename_temp);
+ 	return -1;
+ }
+ 
+diff --git a/hald/mmap_cache.c b/hald/mmap_cache.c
+index be31429..db660a0 100644
+--- a/hald/mmap_cache.c
++++ b/hald/mmap_cache.c
+@@ -179,7 +179,6 @@ dir_mtime (const char *path, time_t *mt, gboolean setup_watches)
+ 	struct dirent **namelist;
+ 	struct stat st;
+ 	int n;
+-	char cpath[PATH_MAX];
+ 
+         if (setup_watches) {
+                 HalFileMonitor *file_monitor;
+@@ -206,15 +205,13 @@ dir_mtime (const char *path, time_t *mt, gboolean setup_watches)
+ 				return;
+ 			else {
+ 				while(n--) {
+-#ifdef HAVE_SNPRINTF
+-					snprintf(cpath, PATH_MAX, "%s/%s", path, namelist[n]->d_name);
+-#else
+-					sprintf(cpath, "%s/%s", path, namelist[n]->d_name);
+-#endif
++					gchar *cpath;
++					cpath = g_build_filename(path, namelist[n]->d_name, NULL);
+ 					if(namelist[n]->d_name[0] != '.')
+ 						dir_mtime(cpath, mt, setup_watches);
+ 					
+ 					free(namelist[n]);
++					g_free(cpath);
+ 				}
+ 				free(namelist);
+ 			}




More information about the Pkg-utopia-commits mailing list