diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-11-28 20:06:37 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-11-28 20:06:37 +0000 |
commit | f76d32b8e89fed7c0e459c1a7fe7a4b57661b01c (patch) | |
tree | ad29e6808ff698f84e08dab8e047f0ae72838df9 /sysutils/hal | |
parent | 873cae3ab41a109b6f9cf9f4149f101d6d996235 (diff) | |
download | ports-f76d32b8e89fed7c0e459c1a7fe7a4b57661b01c.tar.gz ports-f76d32b8e89fed7c0e459c1a7fe7a4b57661b01c.zip |
Notes
Diffstat (limited to 'sysutils/hal')
19 files changed, 667 insertions, 463 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index c83611bfa3b3..bf18e1e15daf 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/hal/Makefile,v 1.54 2008/12/21 06:20:19 marcus Exp $ +# $MCom: ports/sysutils/hal/Makefile,v 1.72 2009/11/28 05:59:03 mezz Exp $ # PORTNAME= hal -DISTVERSION= 0.5.11 -PORTREVISION= 26 +DISTVERSION= 0.5.13 +PORTREVISION= 12 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ @@ -43,7 +43,7 @@ CONFIGURE_ARGS= --disable-gtk-doc \ --with-pid-file=/var/run/hald/hald.pid \ --with-deprecated-keys \ --localstatedir=/var -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -DHAVE_CK_0_3" \ +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" \ GTKDOC="false" @@ -78,13 +78,6 @@ OPTIONS= FIXED_MOUNTPOINTS "use fixed mountpoints" off RUN_DEPENDS+= dmidecode:${PORTSDIR}/sysutils/dmidecode .endif -.if ${OSVERSION} <= 601100 -NEEDS_MEDIA= yes -PLIST_SUB+= MEDIA="" -.else -PLIST_SUB+= MEDIA="@comment " -.endif - .if defined(WITH_FIXED_MOUNTPOINTS) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-tools_hal-storage-mount.c .endif @@ -96,11 +89,12 @@ PLIST_SUB+= USB2="@comment " .endif post-patch: - @${REINPLACE_CMD} -e '/^scriptdir = /s|libdir|libexecdir|' \ + @${REINPLACE_CMD} -e '/^scriptdir = /s|[(]libexecdir[)]/scripts|(libexecdir)/hal/scripts|' \ ${WRKSRC}/tools/Makefile.in \ ${WRKSRC}/tools/freebsd/Makefile.in - @${REINPLACE_CMD} -e 's|[(]libdir[)]/hal/scripts|(libexecdir)/hal/scripts|' \ - ${WRKSRC}/hald/Makefile.in + @${REINPLACE_CMD} -e 's|[(]libexecdir[)]/scripts|(libexecdir)/hal/scripts|' \ + ${WRKSRC}/hald/Makefile.in \ + ${WRKSRC}/tools/Makefile.in @${REINPLACE_CMD} -e 's|user="0"|group="operator"|g' \ ${WRKSRC}/hal.conf.in @${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ @@ -117,9 +111,6 @@ post-install: .if !defined(PACKAGE_BUILDING) @${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.if defined(NEEDS_MEDIA) - ${MKDIR} /media -.endif .endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} diff --git a/sysutils/hal/distinfo b/sysutils/hal/distinfo index 00f32dd5190c..5885af28aef5 100644 --- a/sysutils/hal/distinfo +++ b/sysutils/hal/distinfo @@ -1,3 +1,3 @@ -MD5 (hal-0.5.11.tar.gz) = 750cf074e88b6fb7012f26d99cd39b9b -SHA256 (hal-0.5.11.tar.gz) = 730a9f2340f789677eb0c3b0984bbaca3ede6c12d1e4b16bc7ea91f51d10ba90 -SIZE (hal-0.5.11.tar.gz) = 1672992 +MD5 (hal-0.5.13.tar.gz) = 46ecc5d2e5bd964fb78099688f01bb6a +SHA256 (hal-0.5.13.tar.gz) = ebcf22a373761530920643add1a791af40954dc7349f027d1c35b0e0f7f9c8af +SIZE (hal-0.5.13.tar.gz) = 1199224 diff --git a/sysutils/hal/files/hald.in b/sysutils/hal/files/hald.in index 9ccdbc16e6d1..42643888c954 100644 --- a/sysutils/hal/files/hald.in +++ b/sysutils/hal/files/hald.in @@ -1,7 +1,7 @@ #!/bin/sh # # $FreeBSD$ -# $MCom: ports/sysutils/hal/files/hald.in,v 1.14 2008/08/21 16:04:48 mezz Exp $ +# $MCom: ports/sysutils/hal/files/hald.in,v 1.17 2009/09/26 13:42:01 marcus Exp $ # # PROVIDE: hald # REQUIRE: DAEMON usbd devd dbus moused @@ -9,12 +9,13 @@ # Add the following line to /etc/rc.conf to enable the HAL daemon: # # hald_enable="YES" -# hald_flags="<set as needed>" +# . %%RC_SUBR%% . %%GNOME_SUBR%% hald_enable=${hald_enable-${gnome_enable}} +hald_flags=${hald_flags-""} name=hald rcvar=`set_rcvar` diff --git a/sysutils/hal/files/patch-configure b/sysutils/hal/files/patch-configure index e70d7d60f497..bc4df6d96423 100644 --- a/sysutils/hal/files/patch-configure +++ b/sysutils/hal/files/patch-configure @@ -1,183 +1,53 @@ ---- configure.orig 2009-03-14 00:22:20.000000000 -0400 -+++ configure 2009-03-14 00:22:44.000000000 -0400 -@@ -930,6 +930,9 @@ HALD_COMPILE_FREEBSD_FALSE - HALD_COMPILE_SOLARIS_TRUE - HALD_COMPILE_SOLARIS_FALSE - HALD_BACKEND -+HAVE_LIBUSB20_TRUE -+HAVE_LIBUSB20_FALSE -+LIBUSB20_LIBS - HAVE_CONKIT_TRUE - HAVE_CONKIT_FALSE +--- configure.orig 2009-07-18 21:14:47.000000000 -0400 ++++ configure 2009-07-18 21:14:47.000000000 -0400 +@@ -818,6 +818,8 @@ XMLTO + HALD_OS_LIBS + BLKID_LIBS + BLKID_CFLAGS ++VOLUME_ID_LIBS ++VOLUME_ID_CFLAGS + GLIB_LIBS + GLIB_CFLAGS + DBUS_LIBS +@@ -847,6 +849,9 @@ HAVE_GPERF GPERF -@@ -5944,7 +5947,7 @@ ia64-*-hpux*) - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 5947 "configure"' > conftest.$ac_ext -+ echo '#line 5950 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -8596,11 +8599,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8599: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8602: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:8603: \$? = $ac_status" >&5 -+ echo "$as_me:8606: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -8886,11 +8889,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8889: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8892: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:8893: \$? = $ac_status" >&5 -+ echo "$as_me:8896: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -8990,11 +8993,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8993: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8996: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:8997: \$? = $ac_status" >&5 -+ echo "$as_me:9000: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -11354,7 +11357,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF --#line 11357 "configure" -+#line 11360 "configure" - #include "confdefs.h" + HAVE_CONKIT_FALSE + HAVE_CONKIT_TRUE ++LIBUSB20_LIBS ++HAVE_LIBUSB20_FALSE ++HAVE_LIBUSB20_TRUE + HALD_BACKEND + HALD_COMPILE_SOLARIS_FALSE + HALD_COMPILE_SOLARIS_TRUE +@@ -1101,6 +1106,8 @@ DBUS_CFLAGS + DBUS_LIBS + GLIB_CFLAGS + GLIB_LIBS ++VOLUME_ID_CFLAGS ++VOLUME_ID_LIBS + BLKID_CFLAGS + BLKID_LIBS' - #if HAVE_DLFCN_H -@@ -11454,7 +11457,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF --#line 11457 "configure" -+#line 11460 "configure" - #include "confdefs.h" +@@ -1825,6 +1832,10 @@ Some influential environment variables: + DBUS_LIBS linker flags for DBUS, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config ++ VOLUME_ID_CFLAGS ++ C compiler flags for VOLUME_ID, overriding pkg-config ++ VOLUME_ID_LIBS ++ linker flags for VOLUME_ID, overriding pkg-config + BLKID_CFLAGS + C compiler flags for BLKID, overriding pkg-config + BLKID_LIBS linker flags for BLKID, overriding pkg-config +@@ -2794,6 +2805,7 @@ fi + glib_module="glib-2.0 >= 2.10.0 gobject-2.0 > 2.10.0 dbus-glib-1 >= 0.61" + dbus_module="dbus-1 >= 0.61" + blkid_module="blkid >= 1.43" ++volume_id_module="libvolume_id >= 0.77" + polkit_module="polkit >= 0.5" - #if HAVE_DLFCN_H -@@ -13855,11 +13858,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13858: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13861: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:13862: \$? = $ac_status" >&5 -+ echo "$as_me:13865: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -13959,11 +13962,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13962: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13965: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:13966: \$? = $ac_status" >&5 -+ echo "$as_me:13969: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -15542,11 +15545,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:15545: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:15548: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:15549: \$? = $ac_status" >&5 -+ echo "$as_me:15552: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -15646,11 +15649,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:15649: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:15652: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:15653: \$? = $ac_status" >&5 -+ echo "$as_me:15656: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -17853,11 +17856,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:17856: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:17859: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:17860: \$? = $ac_status" >&5 -+ echo "$as_me:17863: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -18143,11 +18146,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:18146: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:18149: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:18150: \$? = $ac_status" >&5 -+ echo "$as_me:18153: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -18247,11 +18250,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:18250: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:18253: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:18254: \$? = $ac_status" >&5 -+ echo "$as_me:18257: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -23420,6 +23423,9 @@ else + # libtool versioning - this applies to libhal and libhal-storage +@@ -19129,6 +19141,9 @@ else fi @@ -187,15 +57,15 @@ # Check whether --with-backend was given. if test "${with_backend+set}" = set; then -@@ -23477,6 +23483,176 @@ else +@@ -19186,6 +19201,184 @@ else fi +if test "x$HALD_BACKEND" = "xfreebsd"; then -+ { echo "$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb20" >&5 -+echo $ECHO_N "checking for libusb20_dev_get_info in -lusb20... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb20" >&5 ++$as_echo_n "checking for libusb20_dev_get_info in -lusb20... " >&6; } +if test "${ac_cv_lib_usb20_libusb20_dev_get_info+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lusb20 $LIBS" @@ -227,33 +97,37 @@ + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err -+ } && test -s conftest$ac_exeext && -+ $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_usb20_libusb20_dev_get_info=yes +else -+ echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_usb20_libusb20_dev_get_info=no +fi + ++rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi -+{ echo "$as_me:$LINENO: result: $ac_cv_lib_usb20_libusb20_dev_get_info" >&5 -+echo "${ECHO_T}$ac_cv_lib_usb20_libusb20_dev_get_info" >&6; } -+if test $ac_cv_lib_usb20_libusb20_dev_get_info = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_usb20_libusb20_dev_get_info" >&5 ++$as_echo "$ac_cv_lib_usb20_libusb20_dev_get_info" >&6; } ++if test "x$ac_cv_lib_usb20_libusb20_dev_get_info" = x""yes; then + USE_LIBUSB20=yes +else + USE_LIBUSB20=no @@ -261,10 +135,10 @@ + +fi +if test "x$USE_LIBUSB20" = "xno"; then -+ { echo "$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb" >&5 -+echo $ECHO_N "checking for libusb20_dev_get_info in -lusb... $ECHO_C" >&6; } ++ { $as_echo "$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb" >&5 ++$as_echo_n "checking for libusb20_dev_get_info in -lusb... " >&6; } +if test "${ac_cv_lib_usb_libusb20_dev_get_info+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lusb $LIBS" @@ -296,33 +170,37 @@ + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err -+ } && test -s conftest$ac_exeext && -+ $as_test_x conftest$ac_exeext; then ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then + ac_cv_lib_usb_libusb20_dev_get_info=yes +else -+ echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_usb_libusb20_dev_get_info=no +fi + ++rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi -+{ echo "$as_me:$LINENO: result: $ac_cv_lib_usb_libusb20_dev_get_info" >&5 -+echo "${ECHO_T}$ac_cv_lib_usb_libusb20_dev_get_info" >&6; } -+if test $ac_cv_lib_usb_libusb20_dev_get_info = yes; then ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_usb_libusb20_dev_get_info" >&5 ++$as_echo "$ac_cv_lib_usb_libusb20_dev_get_info" >&6; } ++if test "x$ac_cv_lib_usb_libusb20_dev_get_info" = x""yes; then + USE_LIBUSB=yes +else + USE_LIBUSB=no @@ -364,63 +242,157 @@ cat >>confdefs.h <<_ACEOF -@@ -25602,6 +25778,20 @@ echo "$as_me: error: conditional \"HALD_ +@@ -19943,8 +20136,132 @@ fi + { $as_echo "$as_me:$LINENO: result: $have_glib_2_14" >&5 + $as_echo "$have_glib_2_14" >&6; } + ++case "$host" in ++*-*-freebsd*) ++ ++pkg_failed=no ++{ $as_echo "$as_me:$LINENO: checking for VOLUME_ID" >&5 ++$as_echo_n "checking for VOLUME_ID... " >&6; } ++ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$VOLUME_ID_CFLAGS"; then ++ pkg_cv_VOLUME_ID_CFLAGS="$VOLUME_ID_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ ++ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$volume_id_module\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "$volume_id_module") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ pkg_cv_VOLUME_ID_CFLAGS=`$PKG_CONFIG --cflags "$volume_id_module" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ fi ++else ++ pkg_failed=untried ++fi ++if test -n "$PKG_CONFIG"; then ++ if test -n "$VOLUME_ID_LIBS"; then ++ pkg_cv_VOLUME_ID_LIBS="$VOLUME_ID_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ ++ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$volume_id_module\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "$volume_id_module") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ pkg_cv_VOLUME_ID_LIBS=`$PKG_CONFIG --libs "$volume_id_module" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ fi ++else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ VOLUME_ID_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$volume_id_module"` ++ else ++ VOLUME_ID_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$volume_id_module"` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$VOLUME_ID_PKG_ERRORS" >&5 ++ ++ { { $as_echo "$as_me:$LINENO: error: Package requirements ($volume_id_module) were not met: ++ ++$VOLUME_ID_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables VOLUME_ID_CFLAGS ++and VOLUME_ID_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++" >&5 ++$as_echo "$as_me: error: Package requirements ($volume_id_module) were not met: ++ ++$VOLUME_ID_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables VOLUME_ID_CFLAGS ++and VOLUME_ID_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++" >&2;} ++ { (exit 1); exit 1; }; } ++elif test $pkg_failed = untried; then ++ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++Alternatively, you may set the environment variables VOLUME_ID_CFLAGS ++and VOLUME_ID_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++ ++To get pkg-config, see <http://pkg-config.freedesktop.org/>. ++See \`config.log' for more details." >&5 ++$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++Alternatively, you may set the environment variables VOLUME_ID_CFLAGS ++and VOLUME_ID_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++ ++To get pkg-config, see <http://pkg-config.freedesktop.org/>. ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; }; } ++else ++ VOLUME_ID_CFLAGS=$pkg_cv_VOLUME_ID_CFLAGS ++ VOLUME_ID_LIBS=$pkg_cv_VOLUME_ID_LIBS ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++$as_echo "yes" >&6; } ++ : ++fi ++ ++ ++ ;; ++*) ++ ;; ++esac ++ + # blkid + case "$host" in ++*-*-freebsd*) ++ ;; + *-*-solaris*) + ;; + *) +@@ -21441,6 +21758,20 @@ $as_echo "$as_me: error: conditional \"H Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${HAVE_LIBUSB20_TRUE}" && test -z "${HAVE_LIBUSB20_FALSE}"; then -+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBUSB20\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBUSB20\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 -+echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined. ++$as_echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_LIBUSB20_TRUE}" && test -z "${HAVE_LIBUSB20_FALSE}"; then -+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBUSB20\" was never defined. ++ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBUSB20\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 -+echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined. ++$as_echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${HAVE_CONKIT_TRUE}" && test -z "${HAVE_CONKIT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_CONKIT\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CONKIT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -@@ -26568,6 +26758,9 @@ HALD_COMPILE_FREEBSD_FALSE!$HALD_COMPILE - HALD_COMPILE_SOLARIS_TRUE!$HALD_COMPILE_SOLARIS_TRUE$ac_delim - HALD_COMPILE_SOLARIS_FALSE!$HALD_COMPILE_SOLARIS_FALSE$ac_delim - HALD_BACKEND!$HALD_BACKEND$ac_delim -+HAVE_LIBUSB20_TRUE!$HAVE_LIBUSB20_TRUE$ac_delim -+HAVE_LIBUSB20_FALSE!$HAVE_LIBUSB20_FALSE$ac_delim -+LIBUSB20_LIBS!$LIBUSB20_LIBS$ac_delim - HAVE_CONKIT_TRUE!$HAVE_CONKIT_TRUE$ac_delim - HAVE_CONKIT_FALSE!$HAVE_CONKIT_FALSE$ac_delim - GPERF!$GPERF$ac_delim -@@ -26597,9 +26790,6 @@ DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim - DBUS_LIBS!$DBUS_LIBS$ac_delim - GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim - GLIB_LIBS!$GLIB_LIBS$ac_delim --VOLUME_ID_CFLAGS!$VOLUME_ID_CFLAGS$ac_delim --VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim --HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim - _ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then -@@ -26641,6 +26831,9 @@ _ACEOF - ac_delim='%!_!# ' - for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -+VOLUME_ID_CFLAGS!$VOLUME_ID_CFLAGS$ac_delim -+VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim -+HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim - XMLTO!$XMLTO$ac_delim - XMLLINT!$XMLLINT$ac_delim - DOCBOOK_DOCS_ENABLED_TRUE!$DOCBOOK_DOCS_ENABLED_TRUE$ac_delim -@@ -26672,7 +26865,7 @@ LIBOBJS!$LIBOBJS$ac_delim - LTLIBOBJS!$LTLIBOBJS$ac_delim - _ACEOF - -- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then -+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/sysutils/hal/files/patch-configure.in b/sysutils/hal/files/patch-configure.in index 37fb1534e484..84e12d18796b 100644 --- a/sysutils/hal/files/patch-configure.in +++ b/sysutils/hal/files/patch-configure.in @@ -1,6 +1,14 @@ ---- configure.in.orig 2008-05-07 19:24:31.000000000 -0400 -+++ configure.in 2009-03-14 00:14:25.000000000 -0400 -@@ -446,6 +446,9 @@ if test "x$with_libpci" != xno ; then +--- configure.in.orig 2009-05-10 15:43:52.000000000 -0400 ++++ configure.in 2009-05-17 00:53:29.000000000 -0400 +@@ -14,6 +14,7 @@ AM_MAINTAINER_MODE + glib_module="glib-2.0 >= 2.10.0 gobject-2.0 > 2.10.0 dbus-glib-1 >= 0.61" + dbus_module="dbus-1 >= 0.61" + blkid_module="blkid >= 1.43" ++volume_id_module="libvolume_id >= 0.77" + polkit_module="polkit >= 0.5" + + # libtool versioning - this applies to libhal and libhal-storage +@@ -477,6 +478,9 @@ if test "x$with_libpci" != xno ; then fi AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"]) @@ -10,7 +18,7 @@ AC_ARG_WITH([backend], AS_HELP_STRING([--with-backend=<name>], [backend to use (linux/solaris/freebsd/dummy)]), -@@ -473,6 +476,22 @@ AM_CONDITIONAL(HALD_COMPILE_LINUX, [test +@@ -504,6 +508,22 @@ AM_CONDITIONAL(HALD_COMPILE_LINUX, [test AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD]) AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris]) AC_SUBST(HALD_BACKEND) @@ -33,3 +41,24 @@ dnl DBUS API is subject to changes AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change]) +@@ -685,8 +705,20 @@ else + fi + AC_MSG_RESULT($have_glib_2_14) + ++case "$host" in ++*-*-freebsd*) ++ PKG_CHECK_MODULES(VOLUME_ID, [$volume_id_module]) ++ AC_SUBST(VOLUME_ID_CFLAGS) ++ AC_SUBST(VOLUME_ID_LIBS) ++ ;; ++*) ++ ;; ++esac ++ + # blkid + case "$host" in ++*-*-freebsd*) ++ ;; + *-*-solaris*) + ;; + *) diff --git a/sysutils/hal/files/patch-consolekit03 b/sysutils/hal/files/patch-consolekit03 deleted file mode 100644 index 13ac31849390..000000000000 --- a/sysutils/hal/files/patch-consolekit03 +++ /dev/null @@ -1,66 +0,0 @@ -diff -p -up hal-0.5.11/configure.in.ck03 hal-0.5.11/configure.in ---- hal-0.5.11/configure.in.ck03 2008-05-07 19:24:31.000000000 -0400 -+++ configure.in 2008-08-11 06:18:07.000000000 -0400 -diff -p -up hal-0.5.11/hald/ck-tracker.c.ck03 hal-0.5.11/hald/ck-tracker.c ---- hal-0.5.11/hald/ck-tracker.c.ck03 2008-05-07 19:23:48.000000000 -0400 -+++ hald/ck-tracker.c 2008-08-12 12:34:47.000000000 -0400 -@@ -256,7 +256,11 @@ ck_session_get_info (CKTracker *tracker, - goto error; - } - if (!dbus_message_get_args (reply, NULL, -+#ifdef HAVE_CK_0_3 -+ DBUS_TYPE_UINT32, &(session->user), -+#else - DBUS_TYPE_INT32, &(session->user), -+#endif - DBUS_TYPE_INVALID)) { - HAL_ERROR (("Invalid GetUnixUser reply from CK")); - goto error; -@@ -531,7 +535,11 @@ ck_tracker_process_system_bus_message (C - seat_objpath = dbus_message_get_path (message); - - if (!dbus_message_get_args (message, NULL, -+#ifdef HAVE_CK_0_3 -+ DBUS_TYPE_OBJECT_PATH, &seat_objpath, -+#else - DBUS_TYPE_STRING, &seat_objpath, -+#endif - DBUS_TYPE_INVALID)) { - HAL_ERROR (("Invalid SeatAdded signal from CK")); - goto out; -@@ -558,7 +566,11 @@ ck_tracker_process_system_bus_message (C - seat_objpath = dbus_message_get_path (message); - - if (!dbus_message_get_args (message, NULL, -+#ifdef HAVE_CK_0_3 -+ DBUS_TYPE_OBJECT_PATH, &seat_objpath, -+#else - DBUS_TYPE_STRING, &seat_objpath, -+#endif - DBUS_TYPE_INVALID)) { - HAL_ERROR (("Invalid SeatRemoved signal from CK")); - goto out; -@@ -588,7 +600,11 @@ ck_tracker_process_system_bus_message (C - seat_objpath = dbus_message_get_path (message); - - if (!dbus_message_get_args (message, NULL, -+#ifdef HAVE_CK_0_3 -+ DBUS_TYPE_OBJECT_PATH, &session_objpath, -+#else - DBUS_TYPE_STRING, &session_objpath, -+#endif - DBUS_TYPE_INVALID)) { - HAL_ERROR (("Invalid SessionAdded signal from CK")); - goto out; -@@ -624,7 +640,11 @@ ck_tracker_process_system_bus_message (C - seat_objpath = dbus_message_get_path (message); - - if (!dbus_message_get_args (message, NULL, -+#ifdef HAVE_CK_0_3 -+ DBUS_TYPE_OBJECT_PATH, &session_objpath, -+#else - DBUS_TYPE_STRING, &session_objpath, -+#endif - DBUS_TYPE_INVALID)) { - HAL_ERROR (("Invalid SessionRemoved signal from CK")); - goto out; diff --git a/sysutils/hal/files/patch-fdi_policy_10osvendor_10-x11-input.fdi b/sysutils/hal/files/patch-fdi_policy_10osvendor_10-x11-input.fdi index b4fd8b3ff74c..bb18f33107a3 100644 --- a/sysutils/hal/files/patch-fdi_policy_10osvendor_10-x11-input.fdi +++ b/sysutils/hal/files/patch-fdi_policy_10osvendor_10-x11-input.fdi @@ -1,9 +1,9 @@ ---- fdi/policy/10osvendor/10-x11-input.fdi.orig 2008-05-07 19:21:15.000000000 -0400 -+++ fdi/policy/10osvendor/10-x11-input.fdi 2009-01-23 18:20:10.000000000 -0500 -@@ -1,19 +1,10 @@ - <?xml version="1.0" encoding="ISO-8859-1"?> - <deviceinfo version="0.2"> - <device> +--- fdi/policy/10osvendor/10-x11-input.fdi.orig 2009-06-26 03:28:39.000000000 -0400 ++++ fdi/policy/10osvendor/10-x11-input.fdi 2009-07-18 21:19:15.000000000 -0400 +@@ -7,15 +7,6 @@ + <merge key="input.x11_driver" type="string">evdev</merge> + </match> + - <!-- FIXME: Support tablets too. --> - <match key="info.capabilities" contains="input.mouse"> - <merge key="input.x11_driver" type="string">mouse</merge> @@ -13,6 +13,13 @@ - </match> - </match> - + <match key="info.capabilities" contains="input.tablet"> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" + string="Linux"> +@@ -23,10 +14,10 @@ + </match> + </match> + - <match key="info.capabilities" contains="input.keys"> + <match key="info.capabilities" contains="input.keyboard"> <!-- If we're using Linux, we use evdev by default (falling back to diff --git a/sysutils/hal/files/patch-hal.conf.in b/sysutils/hal/files/patch-hal.conf.in deleted file mode 100644 index 2d11e7133b18..000000000000 --- a/sysutils/hal/files/patch-hal.conf.in +++ /dev/null @@ -1,25 +0,0 @@ -fix for 'stderr' error - -dbus-daemon: Would reject message, 1 matched rules; type="method_call", sender=":1.33" (uid=1002 pid=23124 comm=") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=25899 comm=")) - -here is a patch for hal.conf. Fixed in upstream, obrient from https://bugs.freedesktop.org/show_bug.cgi?id=18985 - ---- hal.conf.in.orig 2008-08-14 04:32:12.000000000 -0400 -+++ hal.conf.in 2008-12-19 12:11:02.000000000 -0500 -@@ -16,6 +16,8 @@ - - <!-- Allow anyone to invoke methods on the Manager and Device interfaces --> - <policy context="default"> -+ <allow send_destination="org.freedesktop.Hal" -+ send_interface="org.freedesktop.DBus.Introspectable"/> - <allow send_interface="org.freedesktop.Hal.Manager"/> - <allow send_interface="org.freedesktop.Hal.Device"/> - <allow receive_interface="org.freedesktop.Hal.Manager" -@@ -26,6 +28,7 @@ - <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/> - <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/> - <allow send_interface="org.freedesktop.Hal.Device.Volume"/> -+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/> - <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/> - <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement" - receive_sender="org.freedesktop.Hal"/> diff --git a/sysutils/hal/files/patch-hald_freebsd_Makefile.in b/sysutils/hal/files/patch-hald_freebsd_Makefile.in index 793066528491..44dbf8adc88a 100644 --- a/sysutils/hal/files/patch-hald_freebsd_Makefile.in +++ b/sysutils/hal/files/patch-hald_freebsd_Makefile.in @@ -1,5 +1,5 @@ ---- hald/freebsd/Makefile.in.orig 2009-02-17 18:59:04.000000000 -0500 -+++ hald/freebsd/Makefile.in 2009-02-18 00:18:00.000000000 -0500 +--- hald/freebsd/Makefile.in.orig 2009-05-17 00:43:12.000000000 -0400 ++++ hald/freebsd/Makefile.in 2009-05-17 00:43:12.000000000 -0400 @@ -32,6 +32,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ @@ -43,15 +43,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ -@@ -228,6 +242,7 @@ sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ -+top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - SUBDIRS = libprobe probing addons . -@@ -241,46 +256,15 @@ AM_CPPFLAGS = \ +@@ -250,46 +264,15 @@ AM_CPPFLAGS = \ @GLIB_CFLAGS@ @DBUS_CFLAGS@ @POLKIT_CFLAGS@ @HALD_COMPILE_FREEBSD_TRUE@noinst_LTLIBRARIES = libhald_freebsd.la @@ -107,7 +99,7 @@ EXTRA_DIST = README TODO all: all-recursive -@@ -349,6 +333,7 @@ distclean-compile: +@@ -358,6 +341,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hf-sound.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hf-storage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hf-usb.Plo@am__quote@ diff --git a/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c b/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c index 474658423dc7..f19b7e92dcea 100644 --- a/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c +++ b/sysutils/hal/files/patch-hald_freebsd_addons_addon-storage.c @@ -1,6 +1,6 @@ ---- hald/freebsd/addons/addon-storage.c.orig 2008-05-07 19:24:04.000000000 -0400 -+++ hald/freebsd/addons/addon-storage.c 2008-05-19 02:18:59.000000000 -0400 -@@ -36,17 +36,23 @@ +--- hald/freebsd/addons/addon-storage.c.orig 2008-08-10 09:50:10.000000000 -0400 ++++ hald/freebsd/addons/addon-storage.c 2009-09-13 17:23:52.000000000 -0400 +@@ -36,17 +36,24 @@ #include "../libprobe/hfp.h" #include "../libprobe/hfp-cdrom.h" @@ -22,11 +22,22 @@ } addon = { { 2, 0 } }; +static void update_proc_title (const char *device); ++static void unmount_volumes (void); + /* see MMC-3 Working Draft Revision 10 */ static boolean hf_addon_storage_cdrom_eject_pressed (HFPCDROM *cdrom) -@@ -144,18 +150,49 @@ hf_addon_storage_update (void) +@@ -100,8 +107,7 @@ hf_addon_storage_update (void) + + if (hf_addon_storage_cdrom_eject_pressed(cdrom)) + { +- libhal_device_emit_condition(hfp_ctx, hfp_udi, "EjectPressed", "", &hfp_error); +- dbus_error_free(&hfp_error); ++ libhal_device_emit_condition(hfp_ctx, hfp_udi, "EjectPressed", "", NULL); + } + + hfp_cdrom_free(cdrom); +@@ -144,18 +150,142 @@ hf_addon_storage_update (void) } } @@ -36,6 +47,102 @@ return has_media; } ++static void ++unmount_volumes (void) ++{ ++ int num_volumes; ++ char **volumes; ++ ++ if ((volumes = libhal_manager_find_device_string_match(hfp_ctx, ++ "block.storage_device", ++ hfp_udi, ++ &num_volumes, ++ NULL)) != NULL) ++ { ++ int i; ++ ++ for (i = 0; i < num_volumes; i++) ++ { ++ char *vol_udi; ++ ++ vol_udi = volumes[i]; ++ ++ if (libhal_device_get_property_bool(hfp_ctx, vol_udi, "volume.is_mounted", NULL)) ++ { ++ DBusMessage *msg = NULL; ++ DBusMessage *reply = NULL; ++ DBusConnection *dbus_connection; ++ unsigned int num_options = 0; ++ char **options = NULL; ++ char *devfile; ++ ++ hfp_info("Forcing unmount of volume '%s'", vol_udi); ++ ++ dbus_connection = libhal_ctx_get_dbus_connection(hfp_ctx); ++ msg = dbus_message_new_method_call("org.freedesktop.Hal", vol_udi, ++ "org.freedesktop.Hal.Device.Volume", ++ "Unmount"); ++ if (msg == NULL) ++ { ++ hfp_warning("Could not create dbus message for %s", vol_udi); ++ continue; ++ } ++ ++ options = calloc(1, sizeof (char *)); ++ if (options == NULL) ++ { ++ hfp_warning("Could not allocation memory for options"); ++ dbus_message_unref(msg); ++ continue; ++ } ++ ++ options[0] = "force"; ++ num_options = 1; ++ ++ devfile = libhal_device_get_property_string(hfp_ctx, vol_udi, "block.device", NULL); ++ if (devfile != NULL) ++ { ++ hfp_info("Forcibly attempting to unmount %s as media was removed", devfile); ++ libhal_free_string(devfile); ++ } ++ ++ if (! dbus_message_append_args(msg, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &options, num_options, DBUS_TYPE_INVALID)) ++ { ++ hfp_warning("Could not append args to dbus message for %s", vol_udi); ++ free(options); ++ dbus_message_unref(msg); ++ continue; ++ } ++ ++ if (! (reply = dbus_connection_send_with_reply_and_block(dbus_connection, msg, -1, &hfp_error))) ++ { ++ hfp_warning("Unmount failed for %s: %s: %s", vol_udi, hfp_error.name, hfp_error.message); ++ dbus_error_free(&hfp_error); ++ free(options); ++ dbus_message_unref(msg); ++ continue; ++ } ++ ++ if (dbus_error_is_set(&hfp_error)) ++ { ++ hfp_warning("Unmount failed for %s: %s : %s", vol_udi, hfp_error.name, hfp_error.message); ++ dbus_error_free(&hfp_error); ++ free(options); ++ dbus_message_unref(msg); ++ dbus_message_unref(reply); ++ continue; ++ } ++ ++ hfp_info("Successfully unmounted udi '%s'", vol_udi); ++ free(options); ++ dbus_message_unref(msg); ++ dbus_message_unref(reply); ++ } ++ } ++ libhal_free_string_array(volumes); ++ } ++} ++ static boolean -poll_for_media (void) +poll_for_media (boolean check_only, boolean force) @@ -49,10 +156,9 @@ + check_lock_state = FALSE; + + hfp_info("Checking whether device %s is locked by HAL", addon.device_file); -+ if (libhal_device_is_locked_by_others(hfp_ctx, hfp_udi, "org.freedesktop.Hal.Device.Storage", &hfp_error)) ++ if (libhal_device_is_locked_by_others(hfp_ctx, hfp_udi, "org.freedesktop.Hal.Device.Storage", NULL)) + { + hfp_info("... device %s is locked by HAL", addon.device_file); -+ dbus_error_free(&hfp_error); + is_locked_by_hal = TRUE; + update_proc_title(addon.device_file); + goto skip_check; @@ -62,10 +168,8 @@ + hfp_info("... device %s is not locked by HAL", addon.device_file); + is_locked_by_hal = FALSE; + } -+ dbus_error_free(&hfp_error); + -+ should_poll = libhal_device_get_property_bool(hfp_ctx, hfp_udi, "storage.media_check_enabled", &hfp_error); -+ dbus_error_free(&hfp_error); ++ should_poll = libhal_device_get_property_bool(hfp_ctx, hfp_udi, "storage.media_check_enabled", NULL); + polling_disabled = ! should_poll; + update_proc_title(addon.device_file); + } @@ -80,7 +184,23 @@ if (has_media != addon.had_media) { /* -@@ -175,20 +212,33 @@ poll_for_media (void) +@@ -168,27 +298,47 @@ poll_for_media (void) + * then hung while rebooting and did not unmount my other + * filesystems. + */ ++#if __FreeBSD_version >= 800066 ++ /* ++ * With newusb, it is safe to force unmount volumes. This may be ++ * safe on newer versions of the old USB stack, but we'll be ++ * extra cautious. ++ */ ++ unmount_volumes(); ++#endif + +- libhal_device_rescan(hfp_ctx, hfp_udi, &hfp_error); +- dbus_error_free(&hfp_error); ++ libhal_device_rescan(hfp_ctx, hfp_udi, NULL); + addon.had_media = has_media; return TRUE; } @@ -119,7 +239,7 @@ { if (dbus_message_is_method_call(message, "org.freedesktop.Hal.Device.Storage.Removable", -@@ -199,7 +249,7 @@ filter_function (DBusConnection *connect +@@ -199,7 +349,7 @@ filter_function (DBusConnection *connect hfp_info("Forcing poll for media becusse CheckForMedia() was called"); @@ -128,7 +248,7 @@ reply = dbus_message_new_method_return (message); dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &had_effect, DBUS_TYPE_INVALID); -@@ -217,8 +267,9 @@ main (int argc, char **argv) +@@ -217,8 +367,9 @@ main (int argc, char **argv) char *removable; char *bus; char *driver; @@ -139,19 +259,19 @@ if (! hfp_init(argc, argv)) goto end; -@@ -251,16 +302,41 @@ main (int argc, char **argv) +@@ -251,16 +402,39 @@ main (int argc, char **argv) addon.is_scsi_removable = (! strcmp(bus, "scsi") || (! strcmp(bus, "usb") && (! strcmp(driver, "da") || ! strcmp(driver, "sa") || ! strcmp(driver, "cd")))) && ! strcmp(removable, "true"); - addon.had_media = hf_addon_storage_update(); + addon.had_media = poll_for_media(TRUE, FALSE); - if (! libhal_device_addon_is_ready(hfp_ctx, hfp_udi, &hfp_error)) +- if (! libhal_device_addon_is_ready(hfp_ctx, hfp_udi, &hfp_error)) ++ if (! libhal_device_addon_is_ready(hfp_ctx, hfp_udi, NULL)) goto end; - dbus_error_free(&hfp_error); - -+ syscon = dbus_bus_get(DBUS_BUS_SYSTEM, &hfp_error); -+ dbus_error_free(&hfp_error); +- dbus_error_free(&hfp_error); ++ ++ syscon = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); + assert(syscon != NULL); + dbus_connection_set_exit_on_disconnect(syscon, 0); + @@ -174,7 +294,7 @@ + hfp_free(filter_str); + + dbus_connection_add_filter(syscon, dbus_filter_function, NULL, NULL); -+ + connection = libhal_ctx_get_dbus_connection(hfp_ctx); assert(connection != NULL); dbus_connection_set_exit_on_disconnect(connection, 0); @@ -183,7 +303,20 @@ if (! libhal_device_claim_interface(hfp_ctx, hfp_udi, -@@ -280,40 +356,32 @@ main (int argc, char **argv) +@@ -268,52 +442,43 @@ main (int argc, char **argv) + " <method name=\"CheckForMedia\">\n" + " <arg name=\"call_had_sideeffect\" direction=\"out\" type=\"b\"/>\n" + " </method>\n", +- &hfp_error)) ++ NULL)) + { + 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) { diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-computer.c b/sysutils/hal/files/patch-hald_freebsd_hf-computer.c new file mode 100644 index 000000000000..e2921c58aa12 --- /dev/null +++ b/sysutils/hal/files/patch-hald_freebsd_hf-computer.c @@ -0,0 +1,26 @@ +--- hald/freebsd/hf-computer.c.orig 2009-07-18 21:22:48.000000000 -0400 ++++ hald/freebsd/hf-computer.c 2009-07-18 21:23:51.000000000 -0400 +@@ -26,6 +26,7 @@ + # include <config.h> + #endif + ++#include <stdio.h> + #include <string.h> + #include <sys/utsname.h> + +@@ -133,11 +134,11 @@ hf_computer_device_add (void) + if (PACKAGE_VERSION) { + int major, minor, micro; + +- hal_device_property_set_string (root, "org.freedesktop.Hal.version", PACKAGE_VERSION); ++ hal_device_property_set_string (device, "org.freedesktop.Hal.version", PACKAGE_VERSION); + if ( sscanf( PACKAGE_VERSION, "%d.%d.%d", &major, &minor, µ ) == 3 ) { +- hal_device_property_set_int (root, "org.freedesktop.Hal.version.major", major); +- hal_device_property_set_int (root, "org.freedesktop.Hal.version.minor", minor); +- hal_device_property_set_int (root, "org.freedesktop.Hal.version.micro", micro); ++ hal_device_property_set_int (device, "org.freedesktop.Hal.version.major", major); ++ hal_device_property_set_int (device, "org.freedesktop.Hal.version.minor", minor); ++ hal_device_property_set_int (device, "org.freedesktop.Hal.version.micro", micro); + } + } + diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c b/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c new file mode 100644 index 000000000000..bc7ad871d67d --- /dev/null +++ b/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c @@ -0,0 +1,11 @@ +--- hald/freebsd/hf-scsi.c.orig 2009-08-18 16:19:02.000000000 -0400 ++++ hald/freebsd/hf-scsi.c 2009-08-18 16:19:24.000000000 -0400 +@@ -549,7 +549,7 @@ hf_scsi_probe (void) + break; /* only use the first peripheral */ + + match = &ccb.cdm.matches[i].result.periph_result; +- if ((int) match->path_id == -1 || ! strcmp(match->periph_name, "pass")) ++ if ((int) match->path_id == -1 || ! strcmp(match->periph_name, "pass") || ! strcmp(match->periph_name, "probe")) + break; + + pending_devname = g_strdup_printf("%s%i", match->periph_name, match->unit_number); diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c b/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c index 0da9bc2bc566..9f0f5726186c 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c @@ -1,6 +1,6 @@ ---- hald/freebsd/hf-usb2.c.orig 2009-03-02 20:16:10.000000000 -0600 -+++ hald/freebsd/hf-usb2.c 2009-03-02 20:33:13.000000000 -0600 -@@ -0,0 +1,287 @@ +--- hald/freebsd/hf-usb2.c.orig 2009-11-21 19:57:40.000000000 -0500 ++++ hald/freebsd/hf-usb2.c 2009-11-21 19:58:07.000000000 -0500 +@@ -0,0 +1,312 @@ +/*************************************************************************** + * CVSID: $Id$ + * @@ -102,7 +102,7 @@ + { + if (! strcmp(driver, "ukbd")) + hf_device_set_input(device, "keyboard", NULL); -+ else if (! strcmp(driver, "ums")) ++ else if (! strcmp(driver, "ums") || ! strcmp(driver, "atp")) + { + hf_device_set_input(device, "mouse", devname); + hf_runner_run_sync(device, 0, "hald-probe-mouse", NULL); @@ -195,11 +195,12 @@ + addr = libusb20_dev_get_address(pdev); + + if (addr == 1) -+ parent = hf_devtree_find_parent_from_info(hald_get_gdl(), "usbus", bus); ++ parent = hf_devtree_find_from_info(hald_get_gdl(), "usbus", bus); + else + parent = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number", + HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number", -+ HAL_PROPERTY_TYPE_INT32, addr - 1, NULL); ++ HAL_PROPERTY_TYPE_INT32, addr - 1, "info.bus", ++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL); + if (! parent || hal_device_property_get_bool(parent, "info.ignore")) + continue; + @@ -219,7 +220,13 @@ + HalDevice *parent_device; + int bus, addr, pbus, paddr; + -+ if (strncmp(name, "ugen", strlen("ugen"))) ++ if (! parent) ++ return FALSE; ++ ++ if (strncmp(name, "ugen", strlen("ugen")) && ++ ! strncmp(parent, "uhub", strlen("uhub"))) ++ return TRUE; ++ else if (strncmp(name, "ugen", strlen("ugen"))) + return FALSE; + else if (strncmp(parent, "ugen", strlen("ugen"))) + return TRUE; @@ -235,7 +242,8 @@ + + parent_device = hf_device_store_match(hald_get_gdl(), + "usb_device.bus_number", HAL_PROPERTY_TYPE_INT32, pbus, -+ "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, NULL); ++ "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, "info.bus", ++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL); + + if (parent_device && ! hal_device_property_get_bool(parent_device, + "info.ignore")) @@ -258,8 +266,6 @@ + + if (strncmp(name, "ugen", strlen("ugen"))) + return FALSE; -+ else if (strncmp(parent, "ugen", strlen("ugen"))) -+ return TRUE; + + if (sscanf(name, "ugen%i.%i", &bus, &addr) != 2) + return FALSE; @@ -268,7 +274,8 @@ + + device = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number", + HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number", -+ HAL_PROPERTY_TYPE_INT32, addr, NULL); ++ HAL_PROPERTY_TYPE_INT32, addr, "info.bus", ++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL); + + if (device) + { @@ -279,6 +286,23 @@ + return FALSE; +} + ++static gboolean ++hf_usb2_devd_notify (const char *system, ++ const char *subsystem, ++ const char *type, ++ const char *data) ++{ ++ if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") || ++ (strcmp(type, "CREATE") && strcmp(type, "DESTROY"))) ++ return FALSE; ++ ++ if (! strncmp(data, "cdev=ugen", strlen("cdev=ugen")) || ++ ! strncmp(data, "cdev=usb", strlen("cdev=usb"))) ++ return TRUE; ++ ++ return FALSE; ++} ++ +HFHandler hf_usb2_handler = { + .privileged_init = hf_usb2_privileged_init, + .probe = hf_usb2_probe @@ -286,5 +310,6 @@ + +HFDevdHandler hf_usb2_devd_handler = { + .add = hf_usb2_devd_add, -+ .remove = hf_usb2_devd_remove ++ .remove = hf_usb2_devd_remove, ++ .notify = hf_usb2_devd_notify +}; diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-volume.c b/sysutils/hal/files/patch-hald_freebsd_hf-volume.c index 039a1a6760f4..6ee93b139a6b 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-volume.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-volume.c @@ -1,5 +1,5 @@ ---- hald/freebsd/hf-volume.c.orig 2008-05-07 19:24:03.000000000 -0400 -+++ hald/freebsd/hf-volume.c 2008-10-26 15:17:09.000000000 -0400 +--- hald/freebsd/hf-volume.c.orig 2008-08-10 09:50:10.000000000 -0400 ++++ hald/freebsd/hf-volume.c 2009-09-19 02:06:37.000000000 -0400 @@ -45,6 +45,7 @@ #include "hf-util.h" @@ -8,7 +8,7 @@ static void hf_volume_get_mounts (struct statfs **mounts, int *n_mounts) -@@ -60,6 +61,55 @@ hf_volume_get_mounts (struct statfs **mo +@@ -60,6 +61,58 @@ hf_volume_get_mounts (struct statfs **mo } } @@ -37,9 +37,12 @@ + { + if (strcmp(fields[0], special) == 0) + { ++ char *ret; ++ ++ ret = g_strdup(fields[1]); + g_strfreev(fields); + g_strfreev(lines); -+ return g_strdup(fields[1]); ++ return ret; + } + } + g_strfreev(fields); @@ -64,7 +67,7 @@ static const struct statfs * hf_volume_mounts_find (const struct statfs *mounts, int n_mounts, -@@ -71,8 +121,18 @@ hf_volume_mounts_find (const struct stat +@@ -71,8 +124,18 @@ hf_volume_mounts_find (const struct stat g_return_val_if_fail(special != NULL, NULL); for (i = 0; i < n_mounts; i++) @@ -85,7 +88,7 @@ return NULL; } -@@ -92,7 +152,13 @@ hf_volume_device_update_mount_properties +@@ -92,7 +155,13 @@ hf_volume_device_update_mount_properties special = hal_device_property_get_string(device, "block.device"); if (special) diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.am b/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.am index 405026cc65b3..091af3c1ca0e 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.am +++ b/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.am @@ -1,5 +1,5 @@ ---- hald/freebsd/probing/Makefile.am.orig 2008-05-07 19:24:08.000000000 -0400 -+++ hald/freebsd/probing/Makefile.am 2009-02-18 00:16:28.000000000 -0500 +--- hald/freebsd/probing/Makefile.am.orig 2008-08-10 09:50:10.000000000 -0400 ++++ hald/freebsd/probing/Makefile.am 2009-07-17 02:31:02.000000000 -0400 @@ -9,11 +9,18 @@ AM_CPPFLAGS = \ if HALD_COMPILE_FREEBSD @@ -49,3 +49,9 @@ hald_probe_smbios_SOURCES = probe-smbios.c hald_probe_smbios_LDADD = \ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la +@@ -41,4 +67,5 @@ hald_probe_volume_CPPFLAGS = $(AM_CPPFLA + hald_probe_volume_LDADD = \ + @GLIB_LIBS@ \ + @VOLUME_ID_LIBS@ \ ++ -lufs \ + $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.in b/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.in index 5cc771653f20..4a8ea2f053e3 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.in +++ b/sysutils/hal/files/patch-hald_freebsd_probing_Makefile.in @@ -1,5 +1,5 @@ ---- hald/freebsd/probing/Makefile.in.orig 2009-02-15 13:42:09.000000000 -0500 -+++ hald/freebsd/probing/Makefile.in 2009-02-18 00:18:00.000000000 -0500 +--- hald/freebsd/probing/Makefile.in.orig 2009-07-16 22:17:53.000000000 -0400 ++++ hald/freebsd/probing/Makefile.in 2009-07-17 02:32:09.000000000 -0400 @@ -34,10 +34,16 @@ build_triplet = @build@ host_triplet = @host@ @HALD_COMPILE_FREEBSD_TRUE@libexec_PROGRAMS = \ @@ -75,15 +75,7 @@ $(hald_probe_volume_SOURCES) ETAGS = etags CTAGS = ctags -@@ -238,6 +266,7 @@ sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ -+top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - AM_CPPFLAGS = \ -@@ -254,6 +283,23 @@ hald_probe_hiddev_LDADD = \ +@@ -263,6 +291,23 @@ hald_probe_hiddev_LDADD = \ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \ -lusbhid @@ -107,7 +99,15 @@ hald_probe_smbios_SOURCES = probe-smbios.c hald_probe_smbios_LDADD = \ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la -@@ -340,6 +386,9 @@ clean-libexecPROGRAMS: +@@ -283,6 +328,7 @@ hald_probe_volume_CPPFLAGS = $(AM_CPPFLA + hald_probe_volume_LDADD = \ + @GLIB_LIBS@ \ + @VOLUME_ID_LIBS@ \ ++ -lufs \ + $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la + + all: all-am +@@ -349,6 +395,9 @@ clean-libexecPROGRAMS: hald-probe-hiddev$(EXEEXT): $(hald_probe_hiddev_OBJECTS) $(hald_probe_hiddev_DEPENDENCIES) @rm -f hald-probe-hiddev$(EXEEXT) $(LINK) $(hald_probe_hiddev_OBJECTS) $(hald_probe_hiddev_LDADD) $(LIBS) @@ -117,7 +117,7 @@ hald-probe-scsi$(EXEEXT): $(hald_probe_scsi_OBJECTS) $(hald_probe_scsi_DEPENDENCIES) @rm -f hald-probe-scsi$(EXEEXT) $(LINK) $(hald_probe_scsi_OBJECTS) $(hald_probe_scsi_LDADD) $(LIBS) -@@ -349,6 +398,12 @@ hald-probe-smbios$(EXEEXT): $(hald_probe +@@ -358,6 +407,12 @@ hald-probe-smbios$(EXEEXT): $(hald_probe hald-probe-storage$(EXEEXT): $(hald_probe_storage_OBJECTS) $(hald_probe_storage_DEPENDENCIES) @rm -f hald-probe-storage$(EXEEXT) $(LINK) $(hald_probe_storage_OBJECTS) $(hald_probe_storage_LDADD) $(LIBS) @@ -130,7 +130,7 @@ hald-probe-volume$(EXEEXT): $(hald_probe_volume_OBJECTS) $(hald_probe_volume_DEPENDENCIES) @rm -f hald-probe-volume$(EXEEXT) $(LINK) $(hald_probe_volume_OBJECTS) $(hald_probe_volume_LDADD) $(LIBS) -@@ -359,6 +414,7 @@ mostlyclean-compile: +@@ -368,6 +423,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c @@ -138,7 +138,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_probe_storage-freebsd_dvd_rw_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_probe_storage-probe-storage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_probe_volume-freebsd_dvd_rw_utils.Po@am__quote@ -@@ -366,6 +422,8 @@ distclean-compile: +@@ -375,6 +431,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/probe-hiddev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/probe-scsi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/probe-smbios.Po@am__quote@ @@ -147,7 +147,7 @@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -388,6 +446,20 @@ distclean-compile: +@@ -397,6 +455,20 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c index b9dc099e63b3..c92b7026654d 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c @@ -1,6 +1,19 @@ ---- hald/freebsd/probing/probe-volume.c.orig 2008-04-07 00:41:22.000000000 -0400 -+++ hald/freebsd/probing/probe-volume.c 2008-04-07 00:43:32.000000000 -0400 -@@ -502,7 +502,8 @@ main (int argc, char **argv) +--- hald/freebsd/probing/probe-volume.c.orig 2008-08-10 09:50:10.000000000 -0400 ++++ hald/freebsd/probing/probe-volume.c 2009-09-26 03:54:16.000000000 -0400 +@@ -36,7 +36,12 @@ + #include <sys/disk.h> + #include <sys/cdio.h> + #include <sys/param.h> ++#include <sys/mount.h> + #include <sys/types.h> ++#include <ufs/ufs/ufsmount.h> ++#include <ufs/ufs/dinode.h> ++#include <ufs/ffs/fs.h> ++#include <libufs.h> + #include <isofs/cd9660/iso.h> + #include <glib.h> + #include <libvolume_id.h> +@@ -502,7 +507,8 @@ main (int argc, char **argv) hfp_cdrom_free(cdrom); } @@ -10,3 +23,52 @@ hf_probe_volume_advanced_disc_detect(fd); } else +@@ -555,6 +561,48 @@ main (int argc, char **argv) + + libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", has_children || is_swap, &hfp_error); + ++ if (vid && ! strcmp (vid->type, "ufs")) ++ { ++ struct uufsd ufsdisk; ++ ++ if (ufs_disk_fillout(&ufsdisk, device_file) == 0) ++ { ++ char ufsid[64]; ++ char **ufs_devs = NULL; ++ int num_udis; ++ int i; ++ ++ snprintf(ufsid, sizeof(ufsid), "%08x%08x", ufsdisk.d_fs.fs_id[0], ufsdisk.d_fs.fs_id[1]); ++ libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.freebsd.ufsid", ufsid, &hfp_error); ++ dbus_error_free(&hfp_error); ++ ufs_devs = libhal_manager_find_device_string_match(hfp_ctx, ++ "volume.freebsd.ufsid", ++ ufsid, ++ &num_udis, ++ &hfp_error); ++ dbus_error_free(&hfp_error); ++ for (i = 0; i < num_udis; i++) ++ { ++ if (ufs_devs[i] != NULL && strcmp(ufs_devs[i], hfp_udi)) ++ { ++ gboolean mounted; ++ ++ mounted = libhal_device_get_property_bool(hfp_ctx, ufs_devs[i], "volume.is_mounted", &hfp_error); ++ dbus_error_free(&hfp_error); ++ if (mounted) ++ { ++ libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", TRUE, &hfp_error); ++ dbus_error_free(&hfp_error); ++ break; ++ } ++ } ++ } ++ if (ufs_devs) ++ libhal_free_string_array(ufs_devs); ++ ufs_disk_close(&ufsdisk); ++ } ++ } ++ + if (has_children) + usage = "partitiontable"; + else if (is_swap) diff --git a/sysutils/hal/files/patch-hald_hf-storage.c b/sysutils/hal/files/patch-hald_hf-storage.c index 605342c36b3b..a699ca827e57 100644 --- a/sysutils/hal/files/patch-hald_hf-storage.c +++ b/sysutils/hal/files/patch-hald_hf-storage.c @@ -1,14 +1,15 @@ ---- hald/freebsd/hf-storage.c.orig 2008-08-10 09:50:10.000000000 -0400 -+++ hald/freebsd/hf-storage.c 2009-05-23 18:52:52.000000000 -0400 -@@ -30,6 +30,7 @@ +--- hald/freebsd/hf-storage.c.orig 2009-05-12 08:24:28.000000000 -0400 ++++ hald/freebsd/hf-storage.c 2009-10-24 02:30:22.000000000 -0400 +@@ -30,6 +30,8 @@ #include <limits.h> #include <inttypes.h> #include <string.h> ++#include <unistd.h> +#include <sys/param.h> #include <sys/types.h> #include <sys/disklabel.h> -@@ -38,6 +39,7 @@ +@@ -38,6 +40,7 @@ #include "hf-storage.h" #include "hf-block.h" @@ -16,7 +17,7 @@ #include "hf-devtree.h" #include "hf-volume.h" #include "hf-util.h" -@@ -64,7 +66,7 @@ typedef struct +@@ -64,7 +67,7 @@ typedef struct static GNode *hf_storage_geom_tree = NULL; static GHashTable *hf_storage_geom_hash = NULL; @@ -25,7 +26,7 @@ static gboolean hf_storage_device_has_addon (HalDevice *device); static void -@@ -104,6 +106,8 @@ hf_storage_class_is_partitionable (const +@@ -104,6 +107,8 @@ hf_storage_class_is_partitionable (const { return (! strcmp(geom_class, "MBR") || ! strcmp(geom_class, "MBREXT") || @@ -34,7 +35,7 @@ ! strcmp(geom_class, "GPT") || ! strcmp(geom_class, "APPLE") || ! strcmp(geom_class, "SUN")); } -@@ -117,6 +121,7 @@ hf_storage_geom_has_partitions (const Ge +@@ -117,6 +122,7 @@ hf_storage_geom_has_partitions (const Ge if (g_node_n_children(node) > 0) return TRUE; @@ -42,7 +43,7 @@ if (hf_storage_class_is_partitionable(geom_obj->class) && g_node_next_sibling(node) != NULL) { -@@ -135,6 +140,7 @@ hf_storage_geom_has_partitions (const Ge +@@ -135,6 +141,7 @@ hf_storage_geom_has_partitions (const Ge return TRUE; } } @@ -50,7 +51,7 @@ return FALSE; } -@@ -294,7 +300,7 @@ hf_storage_device_probe (HalDevice *devi +@@ -294,7 +301,7 @@ hf_storage_device_probe (HalDevice *devi { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -59,7 +60,7 @@ if (hf_runner_run_sync(device, 0, "hald-probe-storage", "HF_HAS_CHILDREN", HF_BOOL_TO_STRING(hf_storage_device_has_partitions(device)), -@@ -403,13 +409,20 @@ hf_storage_parse_conftxt (const char *co +@@ -403,13 +410,49 @@ hf_storage_parse_conftxt (const char *co continue; } @@ -72,17 +73,46 @@ + continue; + } + ++ /* XXX This is a hack, but we need to ignore dynamic labels like ++ * ufsids which are created and destroyed based on whether or not ++ * the actual device is mounted or not. If we don't then strange ++ * things happen in applications like nautilus. ++ */ ++ if ((! strcmp(fields[1], "LABEL") || ++ ! strcmp(fields[1], "BSD")) && ++ ! strncmp(fields[2], "ufsid/", strlen("ufsid/"))) ++ { ++ g_strfreev(fields); ++ continue; ++ } ++ geom_obj = g_new0(Geom_Object, 1); - depth = atoi(fields[0]); geom_obj->class = g_strdup(fields[1]); geom_obj->dev = g_strdup(fields[2]); ++ /* Allow for spaces in label names. */ ++ if (! strcmp(fields[1], "LABEL")) ++ { ++ int j; ++ ++ for (j = 3; g_strv_length(fields) > (j + 2) && ++ strcmp(fields[j + 2], "i"); j++) ++ { ++ char *tmp; ++ ++ tmp = g_strdup_printf("%s %s", geom_obj->dev, fields[j]); ++ g_free(geom_obj->dev); ++ geom_obj->dev = tmp; ++ } ++ } ++ geom_obj->type = -1; /* We use -1 here to denote a missing type. */ - hash = g_str_hash(geom_obj->dev); geom_obj->hash = hash; if (g_strv_length(fields) >= 5) -@@ -433,6 +446,30 @@ hf_storage_parse_conftxt (const char *co +@@ -433,6 +476,30 @@ hf_storage_parse_conftxt (const char *co if (! strcmp (geom_obj->class, "GPT") || ! strcmp (geom_obj->class, "APPLE")) geom_obj->str_type = g_strdup(fields[10]); @@ -113,7 +143,7 @@ else geom_obj->type = atoi(fields[10]); } -@@ -541,15 +578,20 @@ hf_storage_device_rescan_real (HalDevice +@@ -541,17 +608,27 @@ hf_storage_device_rescan_real (HalDevice } static gboolean @@ -131,13 +161,20 @@ - if (hf_is_waiting) - return TRUE; -+ if (strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") || ++ if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") || + (strcmp(type, "CREATE") && strcmp(type, "DESTROY"))) + return FALSE; ++ ++ if (! strcmp(type, "DESTROY")) ++ g_usleep(G_USEC_PER_SEC/2); conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); ++ if (! conftxt) ++ return FALSE; new_disks = hf_storage_parse_conftxt(conftxt); -@@ -572,6 +614,7 @@ hf_storage_conftxt_timeout_cb (gpointer + g_free(conftxt); + +@@ -572,6 +649,7 @@ hf_storage_conftxt_timeout_cb (gpointer if (! hf_storage_find_disk(disks, disk->name)) { osspec_probe(); /* catch new disk(s) */ @@ -145,7 +182,7 @@ break; } } -@@ -593,7 +636,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -593,7 +671,10 @@ hf_storage_conftxt_timeout_cb (gpointer device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage") && ! hf_storage_device_has_addon(device)) @@ -157,7 +194,7 @@ } } else -@@ -601,7 +647,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -601,7 +682,10 @@ hf_storage_conftxt_timeout_cb (gpointer /* disk removed */ device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage")) @@ -169,7 +206,7 @@ } } } -@@ -610,17 +659,30 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -610,17 +694,30 @@ hf_storage_conftxt_timeout_cb (gpointer g_slist_free(disks); disks = new_disks; @@ -183,7 +220,7 @@ + if (hf_is_waiting) + return TRUE; + -+ hf_storage_devd_notify("DEVFS", "CDEV", "CREATE", NULL); ++ hf_storage_devd_notify("DEVFS", "CDEV", "CREATE", ""); + return TRUE; } @@ -202,7 +239,7 @@ return; conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); -@@ -636,8 +698,10 @@ hf_storage_init_geom (void) +@@ -636,8 +733,10 @@ hf_storage_init_geom (void) static void hf_storage_init (void) { @@ -214,7 +251,7 @@ } void -@@ -720,8 +784,6 @@ hf_storage_device_add (HalDevice *device +@@ -719,8 +818,6 @@ hf_storage_device_add (HalDevice *device { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -223,7 +260,7 @@ if (hf_device_preprobe(device)) { hf_storage_device_probe(device, FALSE); -@@ -739,7 +801,7 @@ hf_storage_get_geoms (const char *devnam +@@ -738,7 +835,7 @@ hf_storage_get_geoms (const char *devnam g_return_val_if_fail(devname != NULL, NULL); @@ -232,7 +269,7 @@ hash = g_str_hash(devname); node = g_node_find(hf_storage_geom_tree, G_PRE_ORDER, G_TRAVERSE_ALL, -@@ -802,3 +864,7 @@ HFHandler hf_storage_handler = { +@@ -801,3 +898,7 @@ HFHandler hf_storage_handler = { .probe = hf_storage_probe, .device_rescan = hf_storage_device_rescan }; diff --git a/sysutils/hal/pkg-plist b/sysutils/hal/pkg-plist index 03a497327d34..0f42ef11f040 100644 --- a/sysutils/hal/pkg-plist +++ b/sysutils/hal/pkg-plist @@ -1,5 +1,4 @@ @unexec %D/etc/rc.d/hald stop > /dev/null 2>&1 || true -%%MEDIA%%@exec mkdir -p /media bin/hal-device bin/hal-disable-polling bin/hal-find-by-capability @@ -83,6 +82,7 @@ sbin/hald %%DATADIR%%/fdi/policy/10osvendor/10-dockstation.fdi %%DATADIR%%/fdi/policy/10osvendor/10-input-policy.fdi %%DATADIR%%/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi +%%DATADIR%%/fdi/policy/10osvendor/10-leds.fdi %%DATADIR%%/fdi/policy/10osvendor/10-mouse-sysmouse.fdi %%DATADIR%%/fdi/policy/10osvendor/10-power-mgmt-policy.fdi %%DATADIR%%/fdi/policy/10osvendor/10-rfkill-switch.fdi @@ -94,6 +94,7 @@ sbin/hald %%DATADIR%%/mount-fuse share/PolicyKit/policy/org.freedesktop.hal.dockstation.policy share/PolicyKit/policy/org.freedesktop.hal.killswitch.policy +share/PolicyKit/policy/org.freedesktop.hal.leds.policy share/PolicyKit/policy/org.freedesktop.hal.policy share/PolicyKit/policy/org.freedesktop.hal.power-management.policy share/PolicyKit/policy/org.freedesktop.hal.storage.policy @@ -131,4 +132,3 @@ share/PolicyKit/policy/org.freedesktop.hal.wol.policy @unexec rmdir /var/cache 2>/dev/null || true @unexec /var/lib/hal 2>/dev/null || true @unexec /var/lib 2>/dev/null || true -%%MEDIA%%@unexec rmdir /media 2>/dev/null || true |