From 90b9b0eaf8a43e5a77af0bda6b6088f44918624f Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 18 Nov 2015 14:26:40 +0100 Subject: [PATCH] run autoreconf instead of patching libtool script to work-around rpath issues There's been a libhpdiscovery since 3.15.11, which messes up builds when we remove rpath from libtool script. Running autoreconf seems to work-around the problem. --- hplip-udev-rules.patch | 53 +++++++++++++++++++----------------------- hplip.spec | 20 ++++++++++------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/hplip-udev-rules.patch b/hplip-udev-rules.patch index 7d7c93b..9e2ab4a 100644 --- a/hplip-udev-rules.patch +++ b/hplip-udev-rules.patch @@ -1,14 +1,14 @@ -diff -up hplip-3.15.9/data/rules/56-hp_conf_usb.rules.udev-rules hplip-3.15.9/data/rules/56-hp_conf_usb.rules ---- hplip-3.15.9/data/rules/56-hp_conf_usb.rules.udev-rules 2015-09-25 14:03:52.043159504 +0200 -+++ hplip-3.15.9/data/rules/56-hp_conf_usb.rules 2015-09-25 14:03:52.043159504 +0200 +diff -up hplip-3.15.11/data/rules/56-hp_conf_usb.rules.udev-rules hplip-3.15.11/data/rules/56-hp_conf_usb.rules +--- hplip-3.15.11/data/rules/56-hp_conf_usb.rules.udev-rules 2015-11-18 13:41:08.003952433 +0100 ++++ hplip-3.15.11/data/rules/56-hp_conf_usb.rules 2015-11-18 13:41:08.003952433 +0100 @@ -0,0 +1,4 @@ +# HPLIP udev rules file. + +# This rule will check the smart install feature, plugin status and firmware download for the required printers. +ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service'" -diff -up hplip-3.15.9/data/rules/56-hpmud.rules.udev-rules hplip-3.15.9/data/rules/56-hpmud.rules ---- hplip-3.15.9/data/rules/56-hpmud.rules.udev-rules 2015-09-14 15:39:40.000000000 +0200 -+++ hplip-3.15.9/data/rules/56-hpmud.rules 2015-09-25 14:03:52.044159503 +0200 +diff -up hplip-3.15.11/data/rules/56-hpmud.rules.udev-rules hplip-3.15.11/data/rules/56-hpmud.rules +--- hplip-3.15.11/data/rules/56-hpmud.rules.udev-rules 2015-11-12 11:28:50.000000000 +0100 ++++ hplip-3.15.11/data/rules/56-hpmud.rules 2015-11-18 13:41:08.003952433 +0100 @@ -12,7 +12,4 @@ ENV{ID_USB_INTERFACES}=="", IMPORT{built # ENV{ID_HPLIP}="1" is for Ubuntu udev-acl ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:08????:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1" @@ -17,34 +17,29 @@ diff -up hplip-3.15.9/data/rules/56-hpmud.rules.udev-rules hplip-3.15.9/data/rul -ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'" - LABEL="hpmud_rules_end" -diff -up hplip-3.15.9/data/rules/hplip-printer@.service.udev-rules hplip-3.15.9/data/rules/hplip-printer@.service ---- hplip-3.15.9/data/rules/hplip-printer@.service.udev-rules 2015-09-14 15:39:40.000000000 +0200 -+++ hplip-3.15.9/data/rules/hplip-printer@.service 2015-09-25 14:04:40.712096091 +0200 +diff -up hplip-3.15.11/data/rules/hplip-printer@.service.udev-rules hplip-3.15.11/data/rules/hplip-printer@.service +--- hplip-3.15.11/data/rules/hplip-printer@.service.udev-rules 2015-11-12 11:28:50.000000000 +0100 ++++ hplip-3.15.11/data/rules/hplip-printer@.service 2015-11-18 13:41:08.003952433 +0100 @@ -2,4 +2,4 @@ Description=Configure HP Plugged-In Printer [Service] -ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer "%i" +ExecStart=/usr/bin/hp-config_usb_printer "%i" -diff -up hplip-3.15.9/Makefile.in.udev-rules hplip-3.15.9/Makefile.in ---- hplip-3.15.9/Makefile.in.udev-rules 2015-09-14 15:42:57.000000000 +0200 -+++ hplip-3.15.9/Makefile.in 2015-09-25 14:03:52.045159501 +0200 -@@ -2471,6 +2471,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase - am__dist_prnt_DATA_DIST = prnt/cups.py prnt/__init__.py prnt/ldl.py \ - prnt/pcl.py prnt/colorcal.py - am__dist_rules_DATA_DIST = data/rules/56-hpmud.rules \ -+ data/rules/56-hp_conf_usb.rules \ - data/rules/56-hpmud_sysfs.rules - am__dist_rulessystem_DATA_DIST = data/rules/hplip-printer@.service - am__dist_scan_DATA_DIST = scan/__init__.py scan/sane.py -@@ -4623,8 +4624,8 @@ cups_drv = prnt/drv/hpcups.drv - @HPLIP_BUILD_TRUE@dist_rulessystem_DATA = data/rules/hplip-printer@.service +diff -up hplip-3.15.11/Makefile.am.udev-rules hplip-3.15.11/Makefile.am +--- hplip-3.15.11/Makefile.am.udev-rules 2015-11-12 11:29:04.000000000 +0100 ++++ hplip-3.15.11/Makefile.am 2015-11-18 13:54:18.817431087 +0100 +@@ -118,11 +118,12 @@ rulessystemdir=/usr/lib/systemd/system + dist_rulessystem_DATA =data/rules/hplip-printer@.service # hpmud.rules --@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d --@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules -+@HPLIP_BUILD_TRUE@rulesdir = /usr/lib/udev/rules.d -+@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules data/rules/56-hp_conf_usb.rules - @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_sysfs.rules - @HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor - @HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi +-rulesdir = /etc/udev/rules.d ++rulesdir = /usr/lib/udev/rules.d + if UDEV_SYSFS_RULES + dist_rules_DATA = data/rules/56-hpmud_sysfs.rules + else + dist_rules_DATA = data/rules/56-hpmud.rules ++dist_rules_DATA += data/rules/56-hp_conf_usb.rules + endif + + halpredir = /usr/share/hal/fdi/preprobe/10osvendor diff --git a/hplip.spec b/hplip.spec index d0f9997..0095dbf 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.15.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and MIT and BSD Url: http://hplip.sourceforge.net/ @@ -44,6 +44,7 @@ Requires: wget Requires: python3-dbus Requires: gnupg +BuildRequires: autoconf automake libtool BuildRequires: net-snmp-devel BuildRequires: cups-devel BuildRequires: python3-devel @@ -219,6 +220,10 @@ sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \ fax/filters/pstotiff %build +# work-around rpaths errors +sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in +autoreconf --verbose --force --install + %configure \ --enable-scan-build --enable-gui-build --enable-fax-build \ --disable-foomatic-rip-hplip-install --enable-pp-build \ @@ -227,18 +232,16 @@ sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \ --enable-hpijs-install \ --disable-policykit --with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3} -# FIXME: uncomment these once libhpdiscovery rpath problems are resolved ! -#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +make %{?_smp_mflags} -make %install mkdir -p %{buildroot}%{_bindir} make install DESTDIR=%{buildroot} PYTHON=%{__python3} -# Create /run/hplip +# Create /run/hplip & /var/lib/hp mkdir -p %{buildroot}/run/hplip +mkdir -p %{buildroot}%{_sharedstatedir}/hp # install /usr/lib/tmpfiles.d/hplip.conf (bug #1015831) mkdir -p %{buildroot}%{_tmpfilesdir} @@ -402,7 +405,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/prnt %{_datadir}/hplip/scan %{_datadir}/ppd -%{_localstatedir}/lib/hp +%{_sharedstatedir}/hp %dir %attr(0775,root,lp) /run/hplip %{_tmpfilesdir}/hplip.conf %{_udevrulesdir}/56-hp_conf_usb.rules @@ -453,6 +456,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %postun libs -p /sbin/ldconfig %changelog +* Wed Nov 18 2015 Jiri Popelka - 3.15.11-2 +- run autoreconf instead of patching libtool script to work-around rpath issues + * Mon Nov 16 2015 Jiri Popelka - 3.15.11-1 - 3.15.11