diff options
Diffstat (limited to 'sysutils/hal/files')
-rw-r--r-- | sysutils/hal/files/extra-patch-tools_hal-storage-mount.c | 30 | ||||
-rw-r--r-- | sysutils/hal/files/hald.in | 79 | ||||
-rw-r--r-- | sysutils/hal/files/patch-Makefile.in | 25 | ||||
-rw-r--r-- | sysutils/hal/files/patch-doc_Makefile.in | 11 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c | 135 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-scsi.c | 12 | ||||
-rw-r--r-- | sysutils/hal/files/pkg-deinstall.in | 12 | ||||
-rw-r--r-- | sysutils/hal/files/pkg-install.in | 49 |
8 files changed, 0 insertions, 353 deletions
diff --git a/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c b/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c deleted file mode 100644 index 82a7fb607..000000000 --- a/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c +++ /dev/null @@ -1,30 +0,0 @@ ---- tools/hal-storage-mount.c.orig 2008-01-03 21:10:54.000000000 -0500 -+++ tools/hal-storage-mount.c 2008-01-04 09:29:10.000000000 -0500 -@@ -583,23 +583,11 @@ handle_mount (LibHalContext *hal_ctx, - explicit_mount_point_given = FALSE; - if (strlen (mount_point) == 0) { - char *p; -- const char *label; -+ char *basename; - -- if (volume != NULL) -- label = libhal_volume_get_label (volume); -- else -- label = NULL; -- -- if (label != NULL) { -- /* best - use label */ -- g_strlcpy (mount_point, label, sizeof (mount_point)); -- -- /* TODO: use drive type */ -- -- } else { -- /* fallback - use "disk" */ -- g_snprintf (mount_point, sizeof (mount_point), "%s", "disk"); -- } -+ basename = g_path_get_basename (device); -+ g_strlcpy (mount_point, basename, sizeof (mount_point)); -+ g_free (basename); - - /* sanitize computed mount point name, e.g. replace invalid chars with '-' */ - p = mount_point; diff --git a/sysutils/hal/files/hald.in b/sysutils/hal/files/hald.in deleted file mode 100644 index 7f8f2c659..000000000 --- a/sysutils/hal/files/hald.in +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: hald -# REQUIRE: DAEMON usbd devd dbus -# -# Add the following line to /etc/rc.conf to enable the HAL daemon: -# -# hald_enable="YES" -# - -. %%RC_SUBR%% -. %%GNOME_SUBR%% - -hald_enable=${hald_enable-${gnome_enable}} -hald_flags=${hald_flags-""} - -name=hald -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/hald" -pidfile="/var/run/${name}/${name}.pid" - -stop_postcmd="hald_postcmd" -start_precmd="hald_precmd" -start_cmd="hald_start" - -local_force_depend() -{ - _depend="$1" - if [ -f %%LOCALBASE%%/etc/rc.d/${_depend}.sh ]; then - _depend="${_depend}.sh" - fi - - if ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestatus 1>/dev/null 2>&1 && - ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestart; then - return 1 - fi - return 0 -} - -hald_precmd() -{ - if ! checkyesno dbus_enable - then - local_force_depend dbus || return 1 - fi - - chmod 0755 /var/cache - - mkdir -p $(dirname $pidfile) -} - -hald_postcmd() -{ - rm -f $pidfile -} - -hald_start() -{ - if ! checkyesno hald_enable ; then - return 0 - fi - echo "Starting ${name}." - - ( iter=0 - while ! ps -axoargs | grep "^/usr/libexec/getty " | grep -qv grep >/dev/null 2>&1; do - if [ ${iter} -eq 60 ]; then - break - fi - sleep 1 - iter=$(expr ${iter} + 1) - done - ${command} ${hald_flags} ) & -} - -load_rc_config ${name} -run_rc_command "$1" diff --git a/sysutils/hal/files/patch-Makefile.in b/sysutils/hal/files/patch-Makefile.in deleted file mode 100644 index 17d23980f..000000000 --- a/sysutils/hal/files/patch-Makefile.in +++ /dev/null @@ -1,25 +0,0 @@ ---- Makefile.in.orig 2008-01-03 21:28:32.000000000 -0500 -+++ Makefile.in 2008-01-03 21:29:15.000000000 -0500 -@@ -311,14 +311,14 @@ clean-libtool: - distclean-libtool: - -rm -f libtool - install-dist_dbusDATA: $(dist_dbus_DATA) -- @$(NORMAL_INSTALL) -- test -z "$(dbusdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusdir)" -- @list='$(dist_dbus_DATA)'; for p in $$list; do \ -- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- f=$(am__strip_dir) \ -- echo " $(dist_dbusDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dbusdir)/$$f'"; \ -- $(dist_dbusDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dbusdir)/$$f"; \ -- done -+# @$(NORMAL_INSTALL) -+# test -z "$(dbusdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusdir)" -+# @list='$(dist_dbus_DATA)'; for p in $$list; do \ -+# if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+# f=$(am__strip_dir) \ -+# echo " $(dist_dbusDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dbusdir)/$$f'"; \ -+# $(dist_dbusDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dbusdir)/$$f"; \ -+# done - - uninstall-dist_dbusDATA: - @$(NORMAL_UNINSTALL) diff --git a/sysutils/hal/files/patch-doc_Makefile.in b/sysutils/hal/files/patch-doc_Makefile.in deleted file mode 100644 index 9cd951720..000000000 --- a/sysutils/hal/files/patch-doc_Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/Makefile.in.orig 2008-01-03 21:41:19.000000000 -0500 -+++ doc/Makefile.in 2008-01-03 21:41:31.000000000 -0500 -@@ -203,7 +203,7 @@ target_alias = @target_alias@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - EXTRA_DIST = TODO --SUBDIRS = api spec man -+SUBDIRS = spec man - MAINTAINERCLEANFILES = \ - *~ \ - Makefile.in diff --git a/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c b/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c deleted file mode 100644 index ebeeb072c..000000000 --- a/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c +++ /dev/null @@ -1,135 +0,0 @@ ---- hald/freebsd/addons/addon-storage.c.orig 2008-03-17 17:25:16.000000000 -0400 -+++ hald/freebsd/addons/addon-storage.c 2008-03-22 03:25:19.000000000 -0400 -@@ -150,6 +150,34 @@ hf_addon_storage_update (void) - return has_media; - } - -+static boolean -+poll_for_media (void) -+{ -+ boolean has_media; -+ -+ has_media = hf_addon_storage_update(); -+ if (has_media != addon.had_media) -+ { -+ /* -+ * FIXME: if the media was removed, we should force-unmount -+ * all its child volumes (see linux2/addons/addon-storage.c). -+ * However, currently (FreeBSD 6.0) umount -f is broken and -+ * can cause kernel panics. When I tried to umount -f a -+ * flash card after removing it, it failed with EAGAIN. It -+ * continued to fail after I inserted the card. The system -+ * then hung while rebooting and did not unmount my other -+ * filesystems. -+ */ -+ -+ libhal_device_rescan(hfp_ctx, hfp_udi, &hfp_error); -+ dbus_error_free(&hfp_error); -+ addon.had_media = has_media; -+ -+ return TRUE; -+ } -+ return FALSE; -+} -+ - static void - update_proc_title (const char *device, boolean polling_enabled) - { -@@ -159,6 +187,29 @@ update_proc_title (const char *device, b - setproctitle("no polling on %s because it is explicitly disabled", device); - } - -+static DBusHandlerResult -+filter_function (DBusConnection *connection, DBusMessage *message, void *user_data) -+{ -+ if (dbus_message_is_method_call(message, -+ "org.freedesktop.Hal.Device.Storage.Removable", -+ "CheckForMedia")) -+ { -+ DBusMessage *reply; -+ dbus_bool_t had_effect; -+ -+ hfp_info("Forcing poll for media becusse CheckForMedia() was called"); -+ -+ had_effect = poll_for_media(); -+ -+ reply = dbus_message_new_method_return (message); -+ dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &had_effect, DBUS_TYPE_INVALID); -+ dbus_connection_send(connection, reply, NULL); -+ dbus_message_unref(reply); -+ } -+ -+ return DBUS_HANDLER_RESULT_HANDLED; -+} -+ - int - main (int argc, char **argv) - { -@@ -202,13 +253,30 @@ main (int argc, char **argv) - ! strcmp(driver, "cd")))) && ! strcmp(removable, "true"); - addon.had_media = hf_addon_storage_update(); - -+ if (! libhal_device_addon_is_ready(hfp_ctx, hfp_udi, &hfp_error)) -+ goto end; -+ dbus_error_free(&hfp_error); -+ - connection = libhal_ctx_get_dbus_connection(hfp_ctx); - assert(connection != NULL); -+ dbus_connection_set_exit_on_disconnect(connection, 0); -+ dbus_connection_add_filter(connection, filter_function, NULL, NULL); - -- while (TRUE) -+ if (! libhal_device_claim_interface(hfp_ctx, -+ hfp_udi, -+ "org.freedesktop.Hal.Device.Storage.Removable", -+ " <method name=\"CheckForMedia\">\n" -+ " <arg name=\"call_had_sideeffect\" direction=\"out\" type=\"b\"/>\n" -+ " </method>\n", -+ &hfp_error)) - { -- boolean has_media; -+ hfp_critical("Cannot claim interface 'org.freedesktop.Hal.Device.Storage.Removable'"); -+ goto end; -+ } -+ dbus_error_free(&hfp_error); - -+ while (TRUE) -+ { - /* process dbus traffic until update interval has elapsed */ - while (TRUE) - { -@@ -225,7 +293,7 @@ main (int argc, char **argv) - if (timeout.tv_sec < 0) /* current time went backwards */ - timeout = addon.update_interval; - -- dbus_connection_read_write(connection, timeout.tv_sec * 1000 + timeout.tv_usec / 1000); -+ dbus_connection_read_write_dispatch(connection, timeout.tv_sec * 1000 + timeout.tv_usec / 1000); - if (! dbus_connection_get_is_connected(connection)) - goto end; - } -@@ -239,24 +307,7 @@ main (int argc, char **argv) - - if (should_poll) - { -- has_media = hf_addon_storage_update(); -- if (has_media != addon.had_media) -- { -- /* -- * FIXME: if the media was removed, we should force-unmount -- * all its child volumes (see linux2/addons/addon-storage.c). -- * However, currently (FreeBSD 6.0) umount -f is broken and -- * can cause kernel panics. When I tried to umount -f a -- * flash card after removing it, it failed with EAGAIN. It -- * continued to fail after I inserted the card. The system -- * then hung while rebooting and did not unmount my other -- * filesystems. -- */ -- -- libhal_device_rescan(hfp_ctx, hfp_udi, &hfp_error); -- dbus_error_free(&hfp_error); -- addon.had_media = has_media; -- } -+ poll_for_media(); - } - else - { diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c b/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c deleted file mode 100644 index 598ac6283..000000000 --- a/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c +++ /dev/null @@ -1,12 +0,0 @@ ---- hald/freebsd/hf-scsi.c.orig 2008-03-18 15:58:59.000000000 -0400 -+++ hald/freebsd/hf-scsi.c 2008-03-18 15:57:36.000000000 -0400 -@@ -409,8 +409,8 @@ hf_scsi_handle_pending_device (struct de - */ - hf_block_device_complete(block_device, block_device, FALSE); - -- hf_storage_device_probe(block_device, FALSE); - hf_device_add(block_device); -+ hf_storage_device_probe(block_device, FALSE); - } - } - } diff --git a/sysutils/hal/files/pkg-deinstall.in b/sysutils/hal/files/pkg-deinstall.in deleted file mode 100644 index 96f8e9f91..000000000 --- a/sysutils/hal/files/pkg-deinstall.in +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -[ "$2" != DEINSTALL ] && exit 0 - -for pair in %%RC_FILES%%; do - file=`echo $pair | cut -f 1 -d :` - destdir=`echo $pair | cut -f 2 -d :` - - if cmp -s %%DATADIR%%/dist/$file $destdir/$file; then - rm -f $destdir/$file - fi -done diff --git a/sysutils/hal/files/pkg-install.in b/sysutils/hal/files/pkg-install.in deleted file mode 100644 index 72b67ff95..000000000 --- a/sysutils/hal/files/pkg-install.in +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -[ "$2" != POST-INSTALL ] && exit 0 - -if [ -z "${PACKAGE_BUILDING}" ]; then - USER=haldaemon - GROUP=${USER} - UID=560 - GID=${UID} - PW=/usr/sbin/pw - - if ${PW} group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if ${PW} groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if ${PW} user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "/nonexistent" -s /sbin/nologin -c "HAL Daemon User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - /usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/hald - /usr/bin/install -d -o ${USER} -g ${GROUP} /var/cache/hald - /usr/bin/install -d -o ${USER} -g ${GROUP} /var/lib/hal -fi - -for pair in %%RC_FILES%%; do - file=`echo $pair | cut -f 1 -d :` - destdir=`echo $pair | cut -f 2 -d :` - - if [ ! -f $destdir/$file ]; then - mkdir -p $destdir - cp -p %%DATADIR%%/dist/$file $destdir/$file - fi -done |