diff --git a/hplip-udev-rules.patch b/hplip-udev-rules.patch
index 449caab..6f60a10 100644
--- a/hplip-udev-rules.patch
+++ b/hplip-udev-rules.patch
@@ -1,14 +1,12 @@
---- hplip-2.7.7/55-hpmud.rules.udev-rules 2007-05-17 17:48:16.000000000 +0100
-+++ hplip-2.7.7/55-hpmud.rules 2007-08-09 10:22:42.000000000 +0100
-@@ -1,5 +1,9 @@
+--- hplip-2.7.6/55-hpmud.rules.udev-rules 2007-07-20 14:13:01.000000000 +0100
++++ hplip-2.7.6/55-hpmud.rules 2007-07-20 14:13:32.000000000 +0100
+@@ -1,5 +1,7 @@
# TODO: add PROGRAM rule for 7/xx/xx printer class interface
-SUBSYSTEM!="usb_device", GOTO="hpmud_rules_end"
+SUBSYSTEM!="usb", GOTO="hpmud_rules_end"
+ATTR{devnum}!="?*", GOTO="hpmud_rules_end"
+ATTR{busnum}!="?*", GOTO="hpmud_rules_end"
-+ENV{PHYSDEVDRIVER}=="usblp", GOTO="hpmud_rules_end"
ACTION!="add", GOTO="hpmud_rules_end"
-SYSFS{idVendor}=="03f0", GROUP="lp"
+SYSFS{idVendor}=="03f0", GROUP="lp", MODE="0664"
-+SYSFS{idVendor}=="03f0", SYMLINK+="scanner-%k"
LABEL="hpmud_rules_end"
diff --git a/hplip.fdi b/hplip.fdi
new file mode 100644
index 0000000..cbbdc08
--- /dev/null
+++ b/hplip.fdi
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ scanner
+
+
+
+
+
+ access_control
+ linux.device_file
+ scanner
+
+
+
diff --git a/hplip.spec b/hplip.spec
index f096610..cce079a 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 2.7.7
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -12,7 +12,8 @@ Obsoletes: xojpanel <= 0.91
Conflicts: selinux-policy < 3.0.3-3
Url: http://hplip.sourceforge.net/
-Source: http://kent.dl.sourceforge.net/sourceforge/hplip/%{name}-%{version}.tar.gz
+Source0: http://kent.dl.sourceforge.net/sourceforge/hplip/%{name}-%{version}.tar.gz
+Source1: hplip.fdi
Patch1: hplip-desktop.patch
Patch3: hplip-quiet.patch
Patch4: hplip-marker-supply.patch
@@ -34,6 +35,7 @@ Requires(preun): /sbin/chkconfig
Requires: hpijs = %{hpijs_epoch}:%{version}-%{release}
Requires: python-imaging
+Requires: hal
BuildRequires: net-snmp-devel
BuildRequires: cups-devel
@@ -79,6 +81,7 @@ Group: System Environment/Daemons
License: GPL
Obsoletes: libsane-hpoj <= 0.91
Requires: sane-backends
+Requires: %{name} = %{version}-%{release}
ExcludeArch: s390 s390x
%description -n libsane-hpaio
@@ -153,6 +156,9 @@ desktop-file-install --vendor HP \
--add-category Application \
hplip.desktop
+mkdir -p %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
+install -p -m644 %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/10-hplip.fdi
+
# Remove files we don't want to package.
rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc
rm -f %{buildroot}%{_datadir}/hplip/hplip-install
@@ -165,6 +171,7 @@ rm -rf %{buildroot}
%defattr(-,root,root)
%doc COPYING doc/*
%{_sysconfdir}/udev/rules.d/*
+%{_datadir}/hal/fdi/policy/10osvendor/10-hplip.fdi
%dir %{_sysconfdir}/hp
%config(noreplace) %{_sysconfdir}/hp/hplip.conf
%{_bindir}/hp-align
@@ -271,6 +278,13 @@ fi
exit 0
%changelog
+* Thu Sep 6 2007 Tim Waugh 2.7.7-4
+- Reverted udev rules change.
+- Ship a HAL FDI file to get correct access control on the USB device
+ nodes (bug #251470).
+- Make libsane-hpaio requires the main hplip package, needed for
+ libhpip.so (bug #280281).
+
* Thu Aug 30 2007 Tim Waugh 2.7.7-3
- Updated udev rules to allow scanning by console user.