HPLIP as RPM / BUG: HPLIP GUIs do not work with Python 2.4 and PyQt 3.13

Till Kamppeter <[email protected]> Thu, 16 Dec 2004 02:14:02 +0100
Newsgroups gmane.linux.drivers.hpofficejet.devel
Message-ID <[email protected]>
Thank you for the patch, I have made an RPM for Mandrakelinux 10.1 now. 
Here are the packages for download:

Downloads
=========

Patch (adapted and bugfixed):

http://www.linuxprinting.org/till/tmp/hplip_0.8.2-1.diff.bz2

Source RPM:

http://www.linuxprinting.org/till/tmp/hplip-0.8.2-1mdk.src.rpm

Bimary RPMs:

http://www.linuxprinting.org/till/tmp/hplip-0.8.2-1mdk-i586-rpm.tar.bz2

Bugs
====

For Cory
--------

Your DESTDIR support had some bugs, at the installation of files in to 
/etc the DESTDIR was missing, but at the insertion of the HPLIP paths 
into the config files you have inserted DESTDIR. DESTDIR should NOT be 
inserted into the config files or any other files which get installed, 
but every destination path where "make install" puts a file HAS to use 
DESTDIR.

Also the installation of C libraries for Python should respect DESTDIR.

./setup.py install

is wrong, it must be

./setup.py install --root=$(DESTDIR)

(with $DESTDIR being "/" when the user does not supply it) in the Makefiles.

C Library packages in distros are accompanied by a '-devel' package. For 
that the .h files with the API of the library have to be installed into 
/usr/include This is missing in HPLIP.

SANE backends should go into ./usr/lib/sane and not into /usr/lib

"make install" should not call chkconfig or similar tools to set up the 
links for the startup scripts, or it should be easy to turn this off by 
a command line setting, as in an RPM or Debian package "make install" is 
not run on the machine where the actual installation takes place. 
chkconfig is usua;;y called by the postinstall script of the package. 
This script is executed when one installs the package and not already 
when one build the package.

"make install" does not stop when an error occurs, for example the 
"Permission denied" due to the missing DESTDIR support at the library 
installation for Python.

Cory, see also the incompatibility with Mandrakelinux Cooker below.

For Mark
--------

The patch on your home page adds all machine-generated files as logs and 
so on to the package. It has more than 50000 (!) lines. The relevant 
part are only the 130 lines which you are showing in your e-mail, but in 
the e-mail they are destroyed by e-mail-encoding. Probably the biggest 
part of your Debian package are these superflous lines.

Your patch comments away the installation of pcardext.so, a C library 
for the python programs to access memory cards. So most probably your 
Debian package will not be able to read memory cards.

Installation on Mandrakelinux 10.1
==================================

The downloadable packages are built on a Mandrakelinux 10.1 box and on 
10.1 they work without problems.

Some remarks:

- Mandrakelinux 10.1 includes compatible versions of all required 
packages and libraries. Installing packages with "urpmi" installs the 
needed packages automatically.

- Do not install HPLIP if your device is ethernet-connected, as ethernet 
support is not fully implemented yet, stay with HPOJ (at least on 
production machines).

- Remove HPOJ and change the URIs of the appropriate print queues by the 
"hp:/..." URIs of HPLIP (for example with "lpadmin -p <queue> -v 
hp:/..."). You get the URIs with HPLIP installed, HPOJ uninstalled, 
device connected and turned on, CUPS restarted and "lpinfo -v". "urpme 
libptal" removes HPOJ completely.

- foomatic-rip is not included in the RPM. Have the 'foomatic-filters" 
package of the distro installed.

- "hplip-hpijs" conflicts with "printer-filters" (file /usr/lib/hpijs). 
Uninstall "printer-filters" or install "hplip-hpijs" with "rpm -Uvh 
--nodeps --force hplip-hpijs*.rpm". There are no other conflicts.

- Under no circumstances run "printerdrake" or the printing part of the 
Mandrakelinux Control Center, as this way HPOJ gets installed and 
configured automatically and then HPLIP cannot access your printers any 
more. HPLIP support will be added to printerdrake later, but before 
release of Mandrakelinux 10.2.

Other RPM-based Linux distributions
===================================

You will most probably have to "rpm --rebuild" the source RPM package.

Incompatibility with Mandrakelinux Cooker
=========================================

Mandrakelinux 10.1 has Python 2.3.4 and PyQt 3.12. There HPLIP works 
completely, independent whether one installs via RPM or directly from 
source.

Mandrakelinux Cooker already advanced to Python 2.4 and PyQt 3.13. Here 
all except the Python GUIs works: Printing via applications, command 
line, XPP, kprinter, scanning via xsane, photo card access via the text 
mode tool /usr/share/hplip/photo. The toolbox and all the other GUI 
tools of HPLIP do not work.

For me this seems to be an incompatibility either of HPLIP with PyQt 
3.13 or of PyQt 3.13 with Python 2.4. Python 2.4 seems to be compatible 
with HPLIP, as the daemons and text mode tools work.

This incompatibility is independent of whether one installs via RPM 
(RPMs built on Cooker box, you can "rpm --rebuild" the downloadable 
source RPM for testing) or directly from source.

    Till


Mark Purcell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, 7 Dec 2004 11:18 am, Cory Meisch wrote:
> 
>>Hewlett-Packard is proud to announce the introduction of HP Linux
>>Imaging and Printing System (HPLIP). HPLIP is a complete single and
>>multi-function printing device connectivity solution for users of Linux
>>OS. The goal of this project is to provide ā€œradically simpleā€ printing,
>>scanning, photo card access, and device management to the consumer and
>>business Linux user.
> 
> 
> Cory,
> 
> Thanks for this long awaited release.
> 
> A couple of issues from a Debian GNU/Linux perspective.
> 
> . When following the Debian Installation instructions to the letter the
> update-rc.d command fails with the following:
> 
> [...]
> update-rc.d: error: expected runlevel [0-9S] (did you forget "." ?)
> usage: update-rc.d [-n] [-f] <basename> remove
>        update-rc.d [-n] <basename> defaults [NN | sNN kNN]
>        update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
>                 -n: not really
>                 -f: force
> 
> 
> . In trying to generate a Debian package for hplip (I'm currently the Debian
> maintainer for hpoj) DESTDIR is not honoured for the following installation
> candidates:
> 
> error: /usr/lib/python2.3/site-packages/cupsext.so: Permission denied
>  /usr/bin/install -c -m 644
> xml/errors.xml /home/msp/src/hpinkjet.sf.net/hplip-0.8.2/debian/hplip/usr/home/msp/src/hpinkjet.sf.net/hplip-0.8.2/debian/hplip/usr/hplip/data/xml/errors.xml
> error.png
> error: /usr/lib/python2.3/site-packages/pcardext.so: Permission denied
> /etc/hp/hplip.conf
> 
> 
> My build-log is available at:
> http://people.debian.org/~msp/hplip_0.8.2-1_i386.build
> 
> It also tends to place of lot of arch independant files under /usr/hplip, this
> would be better has /usr/share/hplip, but the use of $(datadir) rather than
> $(prefix) in a number of places.
> 
> What we did with davidp in hpoj was split up the install target into a
> user_install (for base files and applications) and root_install (for /etc/ &
> init.d files). The Debian package called user_install (honouring DETSDIR) to
> place the base files in the correct location, but didn't call root_install.
> Instead using the debian/rules to place /etc & init.d files.  Could you look
> at a similar scheme for hplip as it would greatly help package maintainers
> and would be transparent to other users of the upstream source.
> 
> Some other suggestions I have are:
> 
> - --- hplip-0.8.2.orig/prnt/Makefile.in
> +++ hplip-0.8.2/prnt/Makefile.in
> @@ -115,9 +115,9 @@
>  sysconfdir = @sysconfdir@
>  target_alias = @target_alias@
> 
> - -hplipdir = $(prefix)/hplip
> - -prntdir = $(prefix)/hplip/prnt
> - -cupsextdir = $(prefix)/hplip/prnt/cupsext
> +hplipdir = $(datadir)/hplip
> +prntdir = $(datadir)/hplip/prnt
> +cupsextdir = $(datadir)/hplip/prnt/cupsext
> 
>  hplip_DATA =
> 
> - --- hplip-0.8.2.orig/base/Makefile.in
> +++ hplip-0.8.2/base/Makefile.in
> @@ -93,7 +93,7 @@
>  sysconfdir = @sysconfdir@
>  target_alias = @target_alias@
> 
> - -hplipdir = $(prefix)/hplip/base
> +hplipdir = $(datadir)/hplip/base
> 
>  hplip_SCRIPTS = maint.py codes.py g.py mfpdtf2.py pml.py status.py async.py \
>      database.py __init__.py mfpdtf.py service.py utils.py async_qt.py \
> - --- hplip-0.8.2.orig/data/Makefile.in
> +++ hplip-0.8.2/data/Makefile.in
> @@ -95,11 +95,11 @@
>  sysconfdir = @sysconfdir@
>  target_alias = @target_alias@
> 
> - -xmldir = $(prefix)/hplip/data/xml
> - -imagesdir = $(prefix)/hplip/data/images
> - -pcldir = $(prefix)/hplip/data/pcl
> - -ldldir = $(prefix)/hplip/data/ldl
> - -psdir = $(prefix)/hplip/data/ps
> +xmldir = $(datadir)/hplip/data/xml
> +imagesdir = $(datadir)/hplip/data/images
> +pcldir = $(datadir)/hplip/data/pcl
> +ldldir = $(datadir)/hplip/data/ldl
> +psdir = $(datadir)/hplip/data/ps
> 
>  ps_DATA = \
>      ps/testpage.ps.gz
> - --- hplip-0.8.2.orig/scan/Makefile.in
> +++ hplip-0.8.2/scan/Makefile.in
> @@ -93,7 +93,7 @@
>  sysconfdir = @sysconfdir@
>  target_alias = @target_alias@
> 
> - -hplipdir = $(prefix)/hplip/scan
> +hplipdir = $(datadir)/hplip/scan
> 
>  hplip_SCRIPTS = __init__.py pml_scanner.py sane.py scanner.py scl.py
> scl_scanner.py
>  subdir = .
> 
> - --- hplip-0.8.2.orig/ui/Makefile.in
> +++ hplip-0.8.2/ui/Makefile.in
> @@ -93,7 +93,7 @@
>  sysconfdir = @sysconfdir@
>  target_alias = @target_alias@
> 
> - -hplipdir = $(prefix)/hplip/ui
> +hplipdir = $(datadir)/hplip/ui
> 
>  hplip_SCRIPTS = \
>      advancedinfoform_base.py \
> 
> - --- hplip-0.8.2.orig/pcard/Makefile.in
> +++ hplip-0.8.2/pcard/Makefile.in
> @@ -118,9 +118,9 @@
> 
>  noinst_PROGRAMS = ptest
> 
> - -hplipdir = $(prefix)/hplip
> - -pcarddir = $(prefix)/hplip/pcard
> - -pcardextdir = $(prefix)/hplip/pcard/pcardext
> +hplipdir = $(datadir)/hplip
> +pcarddir = $(datadir)/hplip/pcard
> +pcardextdir = $(datadir)/hplip/pcard/pcardext
> 
>  hplip_DATA =
> 
> - --- hplip-0.8.2.orig/Makefile.in
> +++ hplip-0.8.2/Makefile.in
> @@ -63,27 +63,27 @@
>            cd $$here/$$i; \
>            $(MAKE) $(AM_MAKEFLAGS) install; \
>         done
> - -       $(install_script) $(PYTHON_SOURCES) $(PYTHON_SOURCES2)
> $(DESTDIR)$(prefix)/$(PACKAGE)
> +       $(install_script) $(PYTHON_SOURCES) $(PYTHON_SOURCES2)
> $(DESTDIR)$(datadir)/$(PACKAGE)
>         for i in $(PYTHON_SOURCES); do \
>             newname=$${i%.*}; \
> - -           mv $(DESTDIR)$(prefix)/$(PACKAGE)/$$i
> $(DESTDIR)$(prefix)/$(PACKAGE)/$$newname; \
> +           mv $(DESTDIR)$(datadir)/$(PACKAGE)/$$i
> $(DESTDIR)$(datadir)/$(PACKAGE)/$$newname; \
>         done
> - -       $(mkinstalldirs) /etc/hp
> - -       $(install_data) $(PACKAGE).conf /etc/hp/
> - -       echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n"
> 
>>>/etc/hp/$(PACKAGE).conf
> 
> - -       echo -e "[dirs]\nhome=$(DESTDIR)$(prefix)/$(PACKAGE)\n"
> 
>>>/etc/hp/$(PACKAGE).conf
> 
> +       $(mkinstalldirs) $(DESTDIR)/etc/hp
> +       $(install_data) $(PACKAGE).conf $(DESTDIR)/etc/hp/
> +       echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >>
> $(DESTDIR)/etc/hp/$(PACKAGE).conf
> +       echo -e "[dirs]\nhome=$(DESTDIR)$(prefix)/$(PACKAGE)\n"
> 
>>>$(DESTDIR)/etc/hp/$(PACKAGE).conf
> 
> 
> 
> Mark
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFBt1x0oCzanz0IthIRAlKQAJ9WCwm/X4l4SUB3YVYRVjFDa8QcuACdGekc
> lwl4rUTV6raGsTeBhPTB8N8=
> =PMGI
> -----END PGP SIGNATURE-----
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> 
> _______________________________________________
> hpoj-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hpoj-devel
> 
> 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/