[Pkg-utopia-commits] r3245 - in /packages/unstable/hal/debian: changelog control hal.init patches/22_fix_unconditional_usage_of_PATH_MAX.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Thu Nov 5 11:48:10 UTC 2009


Author: biebl
Date: Thu Nov  5 11:48:10 2009
New Revision: 3245

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=3245
Log:
Add support for GNU/Hurd. (Closes: #552386)

* Add support for GNU/Hurd. (Closes: #552386)
  - debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch: Use
    HAL_PATH_MAX as PATH_MAX is not defined on GNU/Hurd.
  - debian/control: Disable Linux-only dependencies.
  - debian/hal.init: Hurd's proc translator does not provide /proc/$PID/root
    so ensure we do not fail the chroot check on GNU/Hurd.
    Thanks to Pino Toscano for the patch.

Added:
    packages/unstable/hal/debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch
Modified:
    packages/unstable/hal/debian/changelog
    packages/unstable/hal/debian/control
    packages/unstable/hal/debian/hal.init
    packages/unstable/hal/debian/patches/series

Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=3245&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Thu Nov  5 11:48:10 2009
@@ -7,6 +7,13 @@
   * debian/patches/21_fix_segfault_in_hal_util_get_last_element.patch
     - Validate input before passing it to strlen which fixes a segfault in
       hal_util_get_last_element. (Closes: #531383)
+  * Add support for GNU/Hurd. (Closes: #552386)
+    - debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch: Use
+      HAL_PATH_MAX as PATH_MAX is not defined on GNU/Hurd.
+    - debian/control: Disable Linux-only dependencies.
+    - debian/hal.init: Hurd's proc translator does not provide /proc/$PID/root
+      so ensure we do not fail the chroot check on GNU/Hurd.
+      Thanks to Pino Toscano for the patch.
 
  -- Michael Biebl <biebl at debian.org>  Wed, 04 Nov 2009 20:13:06 +0100
 

Modified: packages/unstable/hal/debian/control
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/control?rev=3245&op=diff
==============================================================================
--- packages/unstable/hal/debian/control (original)
+++ packages/unstable/hal/debian/control Thu Nov  5 11:48:10 2009
@@ -35,17 +35,17 @@
 Depends: ${shlibs:Depends}, ${misc:Depends},
  adduser,
  pciutils,
- usbutils,
- udev (>= 0.125) [!kfreebsd-amd64 !kfreebsd-i386],
+ usbutils [!hurd-i386],
+ udev (>= 0.125) [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
  dbus (>= 0.61),
  lsb-base (>= 3.2-14),
  hal-info (>= 20070402),
- mount (>= 2.13) [!kfreebsd-amd64 !kfreebsd-i386],
+ mount (>= 2.13) [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
  freebsd-utils [kfreebsd-amd64 kfreebsd-i386],
  policykit (>= 0.7),
  consolekit (>= 0.3)
 Recommends: eject,
- pm-utils [!kfreebsd-amd64 !kfreebsd-i386]
+ pm-utils [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386]
 Suggests: gnome-device-manager
 Description: Hardware Abstraction Layer
  HAL provides an abstract view on hardware.

Modified: packages/unstable/hal/debian/hal.init
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/hal.init?rev=3245&op=diff
==============================================================================
--- packages/unstable/hal/debian/hal.init (original)
+++ packages/unstable/hal/debian/hal.init Thu Nov  5 11:48:10 2009
@@ -47,7 +47,8 @@
 }
 
 check_prerequisites() {
-	if [ ! -d /proc/sys/fs/inotify ] && [ `uname` = "Linux" ]; then
+	UNAME=`uname`
+	if [ ! -d /proc/sys/fs/inotify ] && [ $UNAME = "Linux" ]; then
 		log_failure_msg "Can't start $DESC - enable inotify support in your kernel"
 		exit 0
 	fi
@@ -56,12 +57,12 @@
 		exit 0
 	fi
 	
-	if [ ! -d /sys/devices ] && [ `uname` = "Linux" ]; then
+	if [ ! -d /sys/devices ] && [ $UNAME = "Linux" ]; then
 		log_failure_msg "Can't start $DESC - sysfs not mounted on /sys"
 		exit 0
 	fi
 	
-	if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then
+	if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] && [ $UNAME != "GNU" ]; then
 		log_failure_msg "Can't start $DESC - detected chrooted session"
 		exit 0
 	fi

Added: packages/unstable/hal/debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch?rev=3245&op=file
==============================================================================
--- packages/unstable/hal/debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch (added)
+++ packages/unstable/hal/debian/patches/22_fix_unconditional_usage_of_PATH_MAX.patch Thu Nov  5 11:48:10 2009
@@ -1,0 +1,34 @@
+From 5ff16c0343219592c4eb4c54402029609dc2f6b3 Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl at debian.org>
+Date: Thu, 5 Nov 2009 03:09:22 +0100
+Subject: [PATCH 2/3] Fix unconditional usage of PATH_MAX
+
+Hal currently FTBFS on GNU/Hurd because of unconditional PATH_MAX usage.
+Use HAL_PATH_MAX instead.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552386
+---
+ tools/hal-disable-polling.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+Index: hal-0.5.13/tools/hal-disable-polling.c
+===================================================================
+--- hal-0.5.13.orig/tools/hal-disable-polling.c	2008-08-10 15:50:10.000000000 +0200
++++ hal-0.5.13/tools/hal-disable-polling.c	2009-11-05 03:23:22.845613191 +0100
+@@ -37,6 +37,7 @@
+ #include <getopt.h>
+ #include <glib.h>
+ #include <libhal.h>
++#include "../hald/util.h"
+ 
+ /** 
+  *  usage:
+@@ -182,7 +183,7 @@
+ 
+                 devices = libhal_manager_find_device_string_match (hal_ctx, "block.device", device, &num_devices, NULL);
+ 		if (devices == NULL || devices[0] == NULL) {
+-			char real_device[PATH_MAX];
++			char real_device[HAL_PATH_MAX];
+ 
+ 			if (realpath(device, real_device) == NULL) {
+                                 fprintf (stderr, "Cannot find device %s.\n", device);

Modified: packages/unstable/hal/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/series?rev=3245&op=diff
==============================================================================
--- packages/unstable/hal/debian/patches/series (original)
+++ packages/unstable/hal/debian/patches/series Thu Nov  5 11:48:10 2009
@@ -1,6 +1,7 @@
 10-no-polkit-policy-file-validate-check.patch
 20_cpufreq_warning_message_fix.patch
 21_fix_segfault_in_hal_util_get_last_element.patch
+22_fix_unconditional_usage_of_PATH_MAX.patch
 30_mount_relatime.patch
 40_readme_remove_hacking.patch
 50_kfreebsd.patch




More information about the Pkg-utopia-commits mailing list