summaryrefslogtreecommitdiffstats
path: root/abs/core/hal
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/hal')
-rw-r--r--abs/core/hal/PKGBUILD49
-rw-r--r--abs/core/hal/cryptsetup_location.patch36
-rw-r--r--abs/core/hal/hal54
-rw-r--r--abs/core/hal/hal-0.5.9-hide-diagnostic.patch14
-rw-r--r--abs/core/hal/hal-policy.patch32
-rw-r--r--abs/core/hal/hal.install25
-rw-r--r--abs/core/hal/ntfs3g-valid-options.patch11
7 files changed, 221 insertions, 0 deletions
diff --git a/abs/core/hal/PKGBUILD b/abs/core/hal/PKGBUILD
new file mode 100644
index 0000000..f1a3b3f
--- /dev/null
+++ b/abs/core/hal/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 8861 2008-08-16 22:34:13Z eric $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Link Dupont <link@subpop.net>
+
+pkgname=hal
+pkgver=0.5.11
+pkgrel=1
+pkgdesc="Hardware Abstraction Layer"
+arch=(i686 x86_64)
+license=('GPL' 'custom')
+url="http://www.freedesktop.org/wiki/Software/hal"
+depends=('dbus-glib>=0.74' 'dbus>=1.2.1' 'libusb>=0.1.12' 'udev>=118' 'filesystem>=0.7.1-5' 'hal-info>=0.20080508' 'eject' 'libsmbios>=2.0.2' 'dmidecode' 'pciutils>=2.2.8-3' 'usbutils>=0.73-5' 'pm-utils>=1.1.2')
+makedepends=('pkgconfig' 'gperf')
+options=('!libtool')
+install=hal.install
+source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.bz2
+ hal
+ hal-policy.patch
+ cryptsetup_location.patch
+ hal-0.5.9-hide-diagnostic.patch
+ ntfs3g-valid-options.patch)
+md5sums=('5e8935ab61bcb14afd2d4548084aace0' '277e96ac130d7bfce0b30f0b80db8782'\
+ '18dcdaa79952e2057c2e4745fbc8ad52' 'c688a3c6574699365926f4fef7441545'\
+ '4d4b6801a1cedca22b8bdd9db73b16fb' '4242a2c78885e396f639d0cd5e33218c')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np1 -i ${startdir}/src/hal-policy.patch || return 1
+ patch -Np1 -i ${startdir}/src/cryptsetup_location.patch || return 1
+ patch -Np1 -i ${startdir}/src/hal-0.5.9-hide-diagnostic.patch || return 1
+ patch -Np0 -i ${startdir}/src/ntfs3g-valid-options.patch || return 1
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib/hal --enable-static=no \
+ --enable-acpi-ibm --enable-acpi-toshiba \
+ --disable-docbook-docs --disable-doxygen-docs \
+ --with-hal-user=hal --with-hal-group=hal \
+ --with-pid-file=/var/run/hald.pid \
+ --enable-policy-kit=no || return 1
+ sed -e 's/device-manager//' -i tools/Makefile || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ install -m755 -d ${startdir}/pkg/etc/rc.d
+ install -m755 -d ${startdir}/pkg/media || return 1
+ install -m 755 ${startdir}/src/hal ${startdir}/pkg/etc/rc.d/hal || return 1
+
+ install -m755 -d ${startdir}/pkg/usr/share/licenses/${pkgname}
+ install -m644 COPYING ${startdir}/pkg/usr/share/licenses/${pkgname}/ || return 1
+}
diff --git a/abs/core/hal/cryptsetup_location.patch b/abs/core/hal/cryptsetup_location.patch
new file mode 100644
index 0000000..1e4f5ef
--- /dev/null
+++ b/abs/core/hal/cryptsetup_location.patch
@@ -0,0 +1,36 @@
+diff -Naur hal-0.5.8.1/tools/linux/hal-luks-remove-linux hal-0.5.8.1-new/tools/linux/hal-luks-remove-linux
+--- hal-0.5.8.1/tools/linux/hal-luks-remove-linux 2006-09-19 22:23:25.000000000 +0200
++++ hal-0.5.8.1-new/tools/linux/hal-luks-remove-linux 2007-02-11 13:04:46.000000000 +0100
+@@ -6,7 +6,7 @@
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License version 2.
+
+-CRYPTSETUP=/sbin/cryptsetup
++CRYPTSETUP=/usr/sbin/cryptsetup
+
+ echo LUKS cryptotext device $HAL_PROP_INFO_UDI is going away
+
+diff -Naur hal-0.5.8.1/tools/linux/hal-luks-setup-linux hal-0.5.8.1-new/tools/linux/hal-luks-setup-linux
+--- hal-0.5.8.1/tools/linux/hal-luks-setup-linux 2006-09-19 22:23:25.000000000 +0200
++++ hal-0.5.8.1-new/tools/linux/hal-luks-setup-linux 2007-02-11 13:04:45.000000000 +0100
+@@ -9,7 +9,7 @@
+ read password
+ PASSWORD=${PASSWORD//[^[:alnum:]_=[:space:]:.+-]/@}
+
+-CRYPTSETUP=/sbin/cryptsetup
++CRYPTSETUP=/usr/sbin/cryptsetup
+
+ if [ ! -f $CRYPTSETUP ]; then
+ echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
+diff -Naur hal-0.5.8.1/tools/linux/hal-luks-teardown-linux hal-0.5.8.1-new/tools/linux/hal-luks-teardown-linux
+--- hal-0.5.8.1/tools/linux/hal-luks-teardown-linux 2006-09-19 22:23:25.000000000 +0200
++++ hal-0.5.8.1-new/tools/linux/hal-luks-teardown-linux 2007-02-11 13:04:44.000000000 +0100
+@@ -6,7 +6,7 @@
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License version 2.
+
+-CRYPTSETUP=/sbin/cryptsetup
++CRYPTSETUP=/usr/sbin/cryptsetup
+
+ if [ ! -f $CRYPTSETUP ]; then
+ echo org.freedesktop.Hal.Device.Volume.Crypto.TeardownError >&2
diff --git a/abs/core/hal/hal b/abs/core/hal/hal
new file mode 100644
index 0000000..012d456
--- /dev/null
+++ b/abs/core/hal/hal
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ #Check for running dbus, start when not running
+ ck_daemon dbus && /etc/rc.d/dbus start
+ if [ -x /etc/rc.d/acpid ]; then
+ ck_daemon acpid && /etc/rc.d/acpid start
+ fi
+ stat_busy "Starting Hardware Abstraction Layer"
+ if [ ! -x /var/cache/hald ] ; then
+ install -m755 -g 82 -o 82 -d /var/cache/hald
+ fi
+ if [ ! -x /var/run/hald ]; then
+ install -m755 -g 82 -o 82 -d /var/run/hald
+ fi
+ if [ ! -x /var/run/hald/hald-local ]; then
+ install -m755 -g 0 -o 0 -d /var/run/hald/hald-local
+ fi
+ if [ ! -x /var/run/hald/hald-runner ]; then
+ install -m755 -g 0 -o 0 -d /var/run/hald/hald-runner
+ fi
+ /usr/sbin/hald
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon hal
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Hardware Abstraction Layer"
+ [ -f /var/run/hald.pid ] && kill `cat /var/run/hald.pid` &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon hal
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
+exit 0
diff --git a/abs/core/hal/hal-0.5.9-hide-diagnostic.patch b/abs/core/hal/hal-0.5.9-hide-diagnostic.patch
new file mode 100644
index 0000000..58c882d
--- /dev/null
+++ b/abs/core/hal/hal-0.5.9-hide-diagnostic.patch
@@ -0,0 +1,14 @@
+--- hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi.orig 2007-05-01 21:39:31.000000000 +0000
++++ hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi 2007-05-01 21:51:14.000000000 +0000
+@@ -100,6 +100,11 @@
+ </match>
+ </match>
+
++ <!-- Hide partitions marked as Compaq Diagnostics -->
++ <match key="volume.partition.type" string="0x12">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++
+ <!-- EFI firmware partitions -->
+ <match key="volume.fstype" string="vfat">
+ <match key="volume.label" string="EFI">
diff --git a/abs/core/hal/hal-policy.patch b/abs/core/hal/hal-policy.patch
new file mode 100644
index 0000000..96528b5
--- /dev/null
+++ b/abs/core/hal/hal-policy.patch
@@ -0,0 +1,32 @@
+--- hal-0.5.11/hal.conf.in 2008-05-27 16:09:25.000000000 +0200
++++ hal-0.5.11/hal.conf.in 2008-05-27 16:21:28.000000000 +0200
+@@ -37,9 +37,27 @@
+ receive_sender="org.freedesktop.Hal"/>
+ </policy>
+
+- <!-- Default policy for the exported interfaces; if PolicyKit is not used
+- for access control you will need to modify this -->
++ <!-- Default policy for the exported interfaces -->
+ <policy context="default">
++ <deny send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <deny send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
++ <deny send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ <deny send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <deny send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
++ <policy group="power">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ </policy>
++
++ <policy group="storage">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
++ <!-- You can change this to a more suitable user, or make per-group -->
++ <policy user="0">
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
diff --git a/abs/core/hal/hal.install b/abs/core/hal/hal.install
new file mode 100644
index 0000000..d3f3686
--- /dev/null
+++ b/abs/core/hal/hal.install
@@ -0,0 +1,25 @@
+post_install() {
+ getent group hal >/dev/null || usr/sbin/groupadd -g 82 hal
+ getent group optical >/dev/null || usr/sbin/groupadd -g 93 optical
+ getent group floppy >/dev/null || usr/sbin/groupadd -g 94 floppy
+ getent group storage >/dev/null || usr/sbin/groupadd -g 95 storage
+ getent passwd hal >/dev/null || usr/sbin/useradd -c 'HAL daemon' -u 82 -g hal -G optical,floppy,storage -d '/' -s /bin/false hal
+ usr/bin/passwd -l hal &>/dev/null
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ usr/sbin/userdel hal &>/dev/null
+ usr/sbin/groupdel hal &>/dev/null
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/core/hal/ntfs3g-valid-options.patch b/abs/core/hal/ntfs3g-valid-options.patch
new file mode 100644
index 0000000..4731442
--- /dev/null
+++ b/abs/core/hal/ntfs3g-valid-options.patch
@@ -0,0 +1,11 @@
+--- fdi/policy/10osvendor/20-storage-methods.fdi.orig 2007-10-28 19:40:22.000000000 +0000
++++ fdi/policy/10osvendor/20-storage-methods.fdi 2007-10-28 19:40:58.000000000 +0000
+@@ -240,6 +240,8 @@
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ <append key="volume.mount.valid_options" type="strlist">gid=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
++ <append key="volume.mount.valid_options" type="strlist">dmask=</append>
++ <append key="volume.mount.valid_options" type="strlist">fmask=</append>
+ <append key="volume.mount.valid_options" type="strlist">locale=</append>
+ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ </match>