%general-entities; ]> $LastChangedBy$ $Date$ hal-&hal-version;.tar hal HAL-&hal-version; HAL Introduction to HAL HAL is a hardware abstraction layer, which is a piece of software that provides a view of the various hardware attached to a system. In addition to this, HAL keeps detailed metadata for each piece of hardware and provides hooks such that system and desktop-level software can react to changes in the hardware configuration in order to maintain system policy. The most important goal of HAL is to provide plug-and-play facilities for UNIX-like desktops with focus on providing a rich and extensible description of device characteristics and features. One example of the functionality provided by HAL is when you plug in a USB storage device. HAL can automatically create an appropriate entry in the /etc/fstab file and create the corresponding mount point in /media. Package Information Download (HTTP): Download (FTP): Download MD5 sum: &hal-md5sum; Download size: &hal-size; Estimated disk space required: &hal-buildsize; Estimated build time: &hal-time; Additional Downloads Recommended USB ID list: HAL Dependencies Required , (see the ), , , and Recommended (with a current pci.ids file) Optional , , , , and Installation of HAL If you downloaded the USB ID list, install it by issuing the following command as the root user: install -v -m644 ../usb.ids /usr/share You must create a dedicated user and group before installing the package. Though the default BLFS instructions run the HAL daemon as the root user, a configuration file is installed which has the dedicated user's name hard-coded in it. This causes a confusing message to be generated when starting the D-BUS daemon. Issue the following commands as the root user: groupadd -g 19 haldaemon && useradd -c "HAL Daemon User" -d /dev/null -u 19 \ -g haldaemon -s /bin/false haldaemon Install HAL by running the following commands: sed -i -e "s/managed</comment=&/" \ -e "s/pamconsole/users/" \ fdi/policy/10osvendor/10-storage-policy.fdi && ./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/hal \ --localstatedir=/var \ --enable-fstab-sync \ --enable-pcmcia-support && make This package does not come with a test suite. Now, as the root user: make install && install -v -m755 -d /var/run/hald Command Explanations sed -i -e ...: This command adjusts the policy for storage devices so that the /etc/fstab file is updated to standards used by LFS systems. --libexecdir=/usr/lib/hal: This parameter forces the installation of libexec files to /usr/lib/hal instead of /usr/libexec. --localstatedir=/var: This parameter forces the creation of the pid file to /var/run/hald instead of /usr/var/run/hald. --enable-fstab-sync: This parameter will ensure the fstab-sync program is built. --enable-pcmcia-support: This parameter provides extended PCMCIA support. Run-Time Dependencies The program requires several additional packages to be installed before it will run. The list is significant and requires a substantial commitment to install them. It is left up to you to determine if the time and effort spent installing the following packages is worth using the hal-device-manager program. Though the only requirement to run the hal-device-manager program is installing GNOME-Python, the dependency list is staggering. The following list does not include the dependencies already identified in the BLFS book. For example, libgnome already lists GNOME VFS, GConf, etc., so they are not repeated here. Note that some of the dependencies have their own dependencies, which have their own, and so forth and so on. GNOME-Python PyGTK (required) Pycairo (optional) libsvg-cairo (optional) libsvg (required) PyGTK (optional, and circular) Numerical Python (optional) Numerical Python (optional) (required) (optional) (required) PyORBit (optional) (required) The dependency list is designed to start at the bottom and work your way up until the last package to install is GNOME-Python. Note that the dependencies marked as required are required for the package it is listed under. For example, you don't need to install ORBit if you don't plan on installing PyORBit. The minimum packages you could install to support running would be (in this order): , , PyGTK and GNOME-Python. Configuring HAL Config Files /etc/dbus-1/system.d/hal.conf and /etc/hal/* /etc/dbus-1/system.d/hal.conf /etc/hal/* Configuration Information No configuration is necessary for the majority of installations on systems configured with ISO-8859-1 compatible locales. The defaults should work just fine. For some installations, tweaking of the various policies may be required. One such configuration change necessary in some locales is identifying the and variables in the /etc/fstab entries created by the fstab-sync program. If changes are required to the configuration so that your locale is properly identified in the entries created in /etc/fstab, issue the following commands as the root user (you must substitute the proper data for the [iocharset] and [codepage] info): install -v -m755 -d /etc/hal/fdi/policy/30user && cat > /etc/hal/fdi/policy/30user/30user-policy.fdi << "EOF" <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <!-- This file is used to set custom options to the HAL policy settings. The default policy settings are defined in files contained in the /usr/share/hal/fdi/policy directories. User defined customizations should be in files contained in the /etc/hal/fdi/policy directories. --> <deviceinfo version="0.2"> <device> <match key="info.udi" string="/org/freedesktop/Hal/devices/computer"> <!-- Set the iocharset variable in the /etc/fstab file entry --> <merge key="storage.policy.default.mount_option.iocharset=[iocharset]" type="bool">true</merge> <!-- Set the codepage variable in the /etc/fstab file entry --> <merge key="storage.policy.default.mount_option.codepage=[codepage]" type="bool">true</merge> </match> </device> </deviceinfo> EOF The previous commands created a file named /etc/hal/fdi/policy/30user/30user-policy.fdi. To ease readability of the file, put everything between the <angle brackets> and <merge></merge> tags on one line. You must have at least one space character where the ends of the lines were. The file would then look like this (trimmed at the top and bottom for brevity): <device> <match key="[text]" string="[text]"> <!-- Set the iocharset variable in the /etc/fstab file entry --> <merge key="[iocharset text]" type="bool">true</merge> <!-- Set the codepage variable in the /etc/fstab file entry --> <merge key="[codepage text]" type="bool">true</merge> </match> </device> Boot Script To automatically start the hald daemon when the system is rebooted, install the /etc/rc.d/init.d/haldaemon bootscript from the package. haldaemon If the system-wide D-BUS daemon was running during the installation of HAL, ensure you stop and restart the D-BUS daemon before attempting to start the hald daemon. make install-haldaemon Contents Installed Programs Installed Libraries Installed Directories fstab-sync, hal.hotplug, hal-device, hal-device-manager, hal-find-by-capability, hal-find-by-property, hal-get-property, hal-luks-remove, hal-luks-setup, hal-set-property, hal-system-power-hibernate, hal-system-power-set-power-save, hal-system-power-suspend, hald, hald-addon-acpi, hald-addon-hid-ups, hald-addon-pmu, hald-addon-storage, hald-addon-usb-csr, hald-probe-hiddev, hald-probe-input, hald-probe-pc-floppy, hald-probe-printer, hald-probe-smbios, hald-probe-storage, hald-probe-volume and lshal libhal.[so,a] and libhal-storage,[so,a] /etc/hal, /usr/include/hal, /usr/lib/hal, /usr/share/doc/hal-&hal-version;, /usr/share/hal and /var/run/hald Short Descriptions fstab-sync updates the file systems table file /etc/fstab and creates/removes mount points in /media in response to HAL events. This program is usually never run directly from a shell; instead it is invoked as a callout by the HAL daemon. fstab-sync hal-device is used to create, remove or show a HAL device. hal-device hal-device-manager shows a graphical respresentation of all the devices HAL is aware of. This program requires . Here is a screenshot of hal-device-manager communicating with the HAL daemon and displaying a tree of device objects. The shown properties in the screenshot are for a device object representing a hard disk. hal-device-manager hal-find-by-capability prints the Unique Device Identifiers for HAL device objects of a given capability. hal-find-by-capability hal-find-by-property prints the Unique Device Identifiers for HAL device objects where a given property assumes a given value. hal-find-by-property hal-get-property retrieves a property from a device. hal-get-property hal-luks-remove is a HAL method wrapper for cryptsetup remove. This program requires LUKS. hal-luks-remove hal-luks-setup is a HAL method wrapper for luks-setup. This program requires LUKS. hal-luks-setup hal-set-property attempts to set property for a device. Note that, due to security considerations, it may not be possible to set a property. hal-set-property hal-system-power-hibernate is a HAL wrapper script for system power saving features. This program is currently not supported on LFS platforms. hal-system-power-hibernate hal-system-power-set-power-save is a HAL wrapper script for system power saving features. This program is currently not supported on LFS platforms. hal-system-power-set-power-save hal-system-power-suspend is a HAL wrapper script for system power saving features. This program is currently not supported on LFS platforms. hal-system-power-suspend hald is the HAL daemon program. hald lshal shows all devices and their properties. If the --monitor option is given then the device list and all devices are monitored for changes. lshal libhal.[so,a] contains the API functions required by the HAL programs. libhal.[so,a] libhal-storage.[so,a] contains the API functions required by the HAL storage and volume utility programs. libhal-storage.[so,a]