hal-0.5.11-r9 с патчем, исправляющим ошибку автоматического

подключения ntfs томов. (модификация из hal-0.5.11-r1)


git-svn-id: http://svn.calculate.ru/overlay@675 c91db197-33c1-4113-bf15-f8a5c547ca64
atratsevskiy
mhiretskiy 16 years ago
parent d0d6d71fea
commit 7558222c7a

@ -0,0 +1,8 @@
AUX 0.5-hald.rc 681 RMD160 f94d4a6e4ffb3beb84eeeb8e25564fa566ecc493 SHA1 fe413a84ee58cefa923cbc922a1c961fbdb17aa6 SHA256 802f83998c50a3e030d1db2f5a8364e4bb10eebecd464683445d63cf56702161
AUX 96_plugdev_allow_send.patch 1781 RMD160 08f0cbb8960d4753d15d02c8694fae09a6ef2a02 SHA1 ad04ac23936ac8f1915b2d25cbc366d6db24cdc9 SHA256 090d666c8df223fc0ea30f473fa3d52412ef22aff85c1eebf609a3f00dbd652a
AUX hal-0.5.11-kde4-ntfs3g.patch 1677 RMD160 caa64a9019d7ec43761fdec7fc1e4977b2918dee SHA1 c6faad59008c8f7d1597e215d7d641a959b58293 SHA256 5eefbf45b3423da75b595d9512948c6f783fbb0c3ac409af23f4e67caec27faa
AUX hal-0.5.11-ppc64.patch 1127 RMD160 cbb3483ccc324b6c1c076ad03a3c6fbdf4f99c74 SHA1 31dc51bc11563ba5d4d20d7a05459aa1c77975be SHA256 e3707973bd2589f0dfabbbc2121964afa6c55afb20fc530a454ce7edf2f41c78
AUX hal-unmount.dev 397 RMD160 78286dd9527bbb421082e73b0d08e06cd514d275 SHA1 31169a28448fb1eb1dfee5d1699de9a02449a6b7 SHA256 747a4c483f8a558f2c75666e9547e539475f112363f1dbfc6ea19ca393c8e89b
DIST hal-0.5.11-gentoo-patches-1.tar.bz2 3941 RMD160 a33c088dbb9dac955870959238fa8292d6dba460 SHA1 c279a44301841a15d9ebef740953e11184f46d99 SHA256 23498d492e2b14749606d94865c70798a3caa47e3385d5aca02ed2f39422a375
DIST hal-0.5.11.tar.bz2 1281251 RMD160 741cfe82f0bc2d67106b24cfe526a754ab36e45f SHA1 1ddb7895d2ddc2464b553ad11f7ba38860478ae9 SHA256 78a2621209b2db4d71f25fe3a7df7b7dd4b5e866e9c699454b78e611def065cf
EBUILD hal-0.5.11-r9.ebuild 9209 RMD160 ec42fd1fdaee368803afefd8d9a5bf133bc28841 SHA1 872255490e476c7afaa5bc3ca203250988b9b696 SHA256 7c29447a0a025d8e5c6520d6f098b57e89c0371951a0d66b6c31eedd5d19fe6d

@ -0,0 +1,28 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5-hald.rc,v 1.7 2006/09/04 15:50:02 cardoe Exp $
depend() {
need dbus
use logger
after coldplug dns nscd
}
start() {
ebegin "Starting Hardware Abstraction Layer daemon"
if [ -f /proc/acpi/event ]; then
chgrp haldaemon /proc/acpi/event
chmod 440 /proc/acpi/event
fi
start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog
eend $?
}
stop() {
ebegin "Stopping Hardware Abstraction Layer daemon"
start-stop-daemon --stop -q --pidfile /var/run/hald.pid
eend $?
}

@ -0,0 +1,42 @@
Index: b/hal.conf
===================================================================
--- a/hal.conf 2007-04-03 00:41:24.000000000 -0400
+++ b/hal.conf 2007-04-06 20:36:53.000000000 -0400
@@ -63,5 +63,16 @@
<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>
+ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
+ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
+ <policy group="plugdev">
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ </policy>
+ <policy group="plugdev">
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
</busconfig>
Index: b/hal.conf.in
===================================================================
--- a/hal.conf.in 2007-03-07 16:52:19.000000000 -0500
+++ b/hal.conf.in 2007-04-06 20:37:59.000000000 -0400
@@ -63,5 +63,16 @@
<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>
+ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
+ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
+ <policy group="plugdev">
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ </policy>
+ <policy group="plugdev">
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
</busconfig>

@ -0,0 +1,31 @@
diff -ru hal-0.5.11.orig/fdi/policy/10osvendor/20-storage-methods.fdi hal-0.5.11/fdi/policy/10osvendor/20-storage-methods.fdi
--- hal-0.5.11.orig/fdi/policy/10osvendor/20-storage-methods.fdi 2008-05-08 03:21:16.000000000 +0400
+++ hal-0.5.11/fdi/policy/10osvendor/20-storage-methods.fdi 2008-12-10 20:11:16.000000000 +0300
@@ -246,6 +246,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>
diff -ru hal-0.5.11.orig/tools/hal-storage-mount.c hal-0.5.11/tools/hal-storage-mount.c
--- hal-0.5.11.orig/tools/hal-storage-mount.c 2008-05-08 03:24:23.000000000 +0400
+++ hal-0.5.11/tools/hal-storage-mount.c 2008-12-10 20:08:45.000000000 +0300
@@ -763,13 +763,13 @@
if (pol_is_fixed) {
if (pol_change_uid) {
- action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO: rethink */
+ action = "hal-storage-mount-fixed-extra-options";
} else {
action = "org.freedesktop.hal.storage.mount-fixed";
}
} else {
if (pol_change_uid) {
- action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO: rethink "extra-options" */
+ action = "hal-storage-mount-removable-extra-options";
} else {
action = "org.freedesktop.hal.storage.mount-removable";
}

@ -0,0 +1,35 @@
From 4e44e6ee79de160c70a1dc38dddbf4623f6a7965 Mon Sep 17 00:00:00 2001
From: root <root@powerstation.mrothe.de>
Date: Sat, 27 Sep 2008 13:04:02 +0200
Subject: [PATCH] Fix issue on 64bit big endian architectures.
---
hald/create_cache.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hald/create_cache.c b/hald/create_cache.c
index d52f834..6903688 100644
--- a/hald/create_cache.c
+++ b/hald/create_cache.c
@@ -305,15 +305,17 @@ static void remember_jump_position(struct fdi_context *fdi_ctx)
static void set_jump_position(struct fdi_context *fdi_ctx)
{
off_t offset;
+ u_int32_t offset32;
if (fdi_ctx->depth <= 0)
DIE(("Rule depth underrun"));
fdi_ctx->depth--;
offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END));
+ offset32 = (u_int32_t)offset;
pad32_write(fdi_ctx->cache_fd,
fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position),
- &offset, sizeof(fdi_ctx->rule.jump_position));
+ &offset32, sizeof(fdi_ctx->rule.jump_position));
if (haldc_verbose)
HAL_INFO(("modify rule=0x%08x, set jump to 0x%08x",
--
1.6.0.2

@ -0,0 +1,17 @@
#!/bin/sh
# sanity check. DEVNAME should start with a /
[ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0
# Lazily unmount drives which are removed, but still mounted
if [ "$ACTION" = remove ] \
&& (grep -q "^$DEVNAME" /proc/mounts || grep -q "^$DEVNAME" /etc/mtab); then
if [ -x /usr/bin/pumount ] ; then
/usr/bin/pumount -l "$DEVNAME";
else
/bin/umount -l "$DEVNAME";
fi
fi
exit 0

@ -0,0 +1,297 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.11-r1.ebuild,v 1.10 2008/10/18 14:32:41 ranger Exp $
inherit eutils linux-info autotools flag-o-matic
PATCH_VERSION="1"
DESCRIPTION="Hardware Abstraction Layer"
HOMEPAGE="http://www.freedesktop.org/Software/hal"
SRC_URI="http://hal.freedesktop.org/releases/${P/_/}.tar.bz2
http://dev.gentoo.org/~compnerd/files/${PN}/${P}-gentoo-patches-${PATCH_VERSION}.tar.bz2"
LICENSE="|| ( GPL-2 AFL-2.0 )"
SLOT="0"
KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86"
KERNEL_IUSE="kernel_linux kernel_FreeBSD"
IUSE="X acpi apm crypt debug dell disk-partition doc laptop selinux ${KERNEL_IUSE}"
RDEPEND=">=dev-libs/dbus-glib-0.61
>=dev-libs/glib-2.14
>=dev-libs/expat-1.95.8
>=dev-libs/libusb-0.1.10a
>=sys-apps/pciutils-2.2.7-r1
>=dev-util/gperf-3.0.3
sys-apps/usbutils
virtual/eject
amd64? ( >=sys-apps/dmidecode-2.7 )
dell? ( >=sys-libs/libsmbios-0.13.4 )
disk-partition? ( >=sys-apps/parted-1.8.0 )
ia64? ( >=sys-apps/dmidecode-2.7 )
kernel_linux? (
>=sys-fs/udev-111
>=sys-apps/util-linux-2.13
>=sys-kernel/linux-headers-2.6.19
crypt? ( >=sys-fs/cryptsetup-1.0.5 )
)
kernel_FreeBSD? ( dev-libs/libvolume_id )
x86? ( >=sys-apps/dmidecode-2.7 )
selinux? ( sys-libs/libselinux sec-policy/selinux-hal )"
DEPEND="${RDEPEND}
dev-util/pkgconfig
>=dev-util/intltool-0.35
X? ( >=dev-python/pyxf86config-0.3.34-r1 )
doc? (
app-doc/doxygen
app-text/docbook-sgml-utils
app-text/xmlto
dev-libs/libxml2
)"
PDEPEND=">=app-misc/hal-info-20080310
!gnome-extra/hal-device-manager
laptop? ( >=sys-power/pm-utils-0.99.3 )"
## HAL Daemon drops privledges so we need group access to read disks
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
function check_hotplug_net() {
local CONFIG_CHECK="~HOTPLUG ~NET"
local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)\n"
local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)\n"
check_extra_config
}
function check_inotify() {
local CONFIG_CHECK="~INOTIFY_USER"
local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)\n"
check_extra_config
}
function check_acpi_proc() {
local CONFIG_CHECK="~ACPI_PROCFS ~ACPI_PROC_EVENT"
local WARNING_ACPI_PROCFS="CONFIG_ACPI_PROCFS:\tis not set (required for HAL)\n"
local WARNING_ACPI_PROC_EVENT="CONFIG_ACPI_PROC_EVENT:\tis not set (required for HAL)\n"
check_extra_config
}
pkg_setup() {
if use kernel_linux ; then
if [[ -e "${ROOT}/usr/src/linux/.config" ]] ; then
kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer"
if kernel_is lt 2 6 23 && use acpi ; then
check_acpi_proc
fi
fi
check_hotplug_net
check_inotify
fi
# http://devmanual.gentoo.org/ebuild-writing/functions/
# http://bugs.gentoo.org/show_bug.cgi?id=191605
# Create groups for hotplugging and HAL
enewgroup haldaemon || die "Problem adding haldaemon group"
enewgroup plugdev || die "Problem adding plugdev group"
# HAL drops priviledges by default now ...
# ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
if use kernel_linux; then
enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} || die "Problem adding haldaemon user"
elif use kernel_FreeBSD; then
enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} || die "Problem addding haldaemon user"
fi
# Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
# If users have a problem with this, let them file a bug
if [[ ${ROOT} == / ]] ; then
if use kernel_linux; then
usermod -G ${HALDAEMON_GROUPS_LINUX} haldaemon
elif use kernel_FreeBSD; then
pw usermod haldaemon -G ${HALDAEMON_GROUPS_FREEBSD}
fi
fi
}
S="${WORKDIR}/${PF/-r*/}"
src_unpack() {
unpack ${A}
cd "${S}"
EPATCH_MULTI_MSG="Applying Gentoo Patchset ..." \
EPATCH_SUFFIX="patch" \
EPATCH_SOURCE="${WORKDIR}/${P}-patches/" \
EPATCH_FORCE="yes" \
epatch
epatch "${FILESDIR}/${P}-kde4-ntfs3g.patch"
eautoreconf
}
src_compile() {
local acpi="$(use_enable acpi)"
local backend=
local hardware=
append-flags -rdynamic
if use kernel_linux ; then
backend="linux"
elif use kernel_FreeBSD ; then
backend="freebsd"
else
eerror "Invalid backend"
fi
if use kernel_linux ; then
if use acpi ; then
# Using IBM ACPI and Toshiba ACPI results in double notification as this
# was merged into the Linux Kernel 2.6.22
if kernel_is lt 2 6 22 ; then
acpi="$acpi --enable-acpi-ibm --enable-acpi-toshiba"
else
acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
fi
acpi="$acpi --enable-acpi-proc --enable-acpi-acpid"
else
acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
acpi="$acpi --disable-acpi-proc --disable-acpi-acpid"
fi
hardware="--with-cpufreq --with-usb-csr --with-keymaps"
use arm && hardware="$hardware --enable-omap"
if use dell ; then
hardware="$hardware --with-dell-backlight"
else
hardware="$hardware --without-dell-backlight"
fi
else
hardware="--without-cpufreq --without-usb-csr --without-keymaps"
hardware="$hardware --disable-omap"
hardware="$hardware --without-dell-backlight"
hardware="$hardware --enable-acpi-ibm --enable-acpi-toshiba"
fi
econf --with-backend=${backend} \
--with-os-type=gentoo \
--with-pid-file=/var/run/hald.pid \
--with-hwdata=/usr/share/misc \
--with-socket-dir=/var/run/hald \
--enable-umount-helper \
--enable-man-pages \
--disable-policy-kit \
--disable-console-kit \
--disable-acl-management \
--enable-pci \
--enable-sonypic \
$(use_enable apm) \
$(use_enable arm pmu) \
$(use_with arm omap) \
$(use_enable debug verbose-mode) \
$(use_enable disk-partition parted) \
$(use_enable doc docbook-docs) \
$(use_enable doc doxygen-docs) \
--docdir=/usr/share/doc/${PF} \
--localstatedir=/var \
${acpi} ${hardware} \
|| die "configure failed"
emake || die "make failed"
}
src_install() {
make DESTDIR="${D}" install || die
dodoc AUTHORS ChangeLog NEWS README
# hal umount for unclean unmounts
exeinto /lib/udev/
newexe "${FILESDIR}/hal-unmount.dev" hal_unmount
# initscript
newinitd "${FILESDIR}/0.5.10-hald.rc" hald
# configuration
cp "${FILESDIR}/0.5.10-hald.conf" "${WORKDIR}/"
if use debug; then
sed -e 's:HALD_VERBOSE="no":HALD_VERBOSE="yes":' \
-i "${WORKDIR}/0.5.10-hald.conf"
fi
newconfd "${WORKDIR}/0.5.10-hald.conf" hald
if use X ; then
# New Configuration Snippets
dodoc "${WORKDIR}/${P}-extras/"*.fdi
dobin "${WORKDIR}/${P}-extras/migrate-xorg-to-fdi.py"
# Automagic conversion!
elog "Migrating xorg.conf Core Keyboard configuration to HAL FDI file..."
"${WORKDIR}/${P}-extras/migrate-xorg-to-fdi.py" 2> /dev/null > "${D}/etc/hal/fdi/policy/10-x11-input.fdi"
fi
# We now create and keep /media here as both gnome-mount and pmount
# use these directories, to avoid collision.
keepdir /media
# We also need to create and keep /etc/fdi/{information,policy,preprobe}
# or else hal bombs.
keepdir /etc/hal/fdi/{information,policy,preprobe}
# HAL stores it's fdi cache in /var/lib/cache/hald
keepdir /var/lib/cache/hald
# HAL keeps its unix socket here
keepdir /var/run/hald
keepdir /var/lib/hal
}
pkg_postinst() {
# Despite what people keep changing this location. Either one works.. it doesn't matter
# http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
elog "The HAL daemon needs to be running for certain applications to"
elog "work. Suggested is to add the init script to your start-up"
elog "scripts, this should be done like this :"
elog "\`rc-update add hald default\`"
echo
elog "Looking for automounting support? Add yourself to the plugdev group"
echo
elog "IF you have additional applications which consume ACPI events, you"
elog "should consider installing acpid to allow applications to share ACPI"
elog "events."
if use X ; then
echo
elog "If you wish to use a non US layout, you may do so by executing:"
elog "setxkbmap <layout> or by utilizing your Desktop Environment's"
elog "Keyboard Layout Settings mechanism."
elog "Under GNOME, this is gnome-keyboard-properties, and under KDE"
elog "it is kxkb."
fi
echo
elog "In order have suspend/hibernate function with HAL or apps that use HAL"
elog "(such as gnome-power-manager), you should build HAL with the laptop"
elog "useflag which will install pm-utils."
if use X ; then
echo
elog "X Input Hotplugging (if you build xorg-server with the HAL useflag)"
elog "reads user specific configuration from /etc/hal/fdi/policy/."
if [[ $(cat "${ROOT}etc/hal/fdi/policy/10-x11-input.fdi" | wc -c) -gt 0 ]]
then
elog "We have converted your existing xorg.conf rules and the FDI is stored"
elog "at /etc/hal/fdi/policy/10-x11-input.fdi"
fi
elog "You should remove the Input sections from your xorg.conf once you have"
elog "migrated the rules to a HAL fdi file."
fi
ebeep 5
epause 5
}
Loading…
Cancel
Save