printingraspberry-pidriverarchlinuxarchlinux-arm

Printer on Raspberry pi : Yaourt can't build the driver


I'm trying to use my hp laserjet p1006 printer with my raspberry pi (archlinux, Linus 3.18.9). I already set up the cups server, I can manage my printer through the web interface, and added my user to sys and lp groups. I can "install" my printer through this interface, choose a "model" (driver?) amongst hpcups and hpijs (none works). I can manage my printer, but when I try to print something with it, it ends with a "filter failed" error in my cups interface and my printer doesn't react. I didn't find a PPD file (on openprinting.org, they say : "PPD files (and the Foomatic XML files to generate them) come with the driver (foo2xqx), therefore we do not supply PPDs here on the OpenPrinting site.").

I tried to install foo2xqx by installing foo2zjs (in which it's included) with yaourt. I also edited each PKGBUILD to replace the architecture ('i686' or 'x86_64') with 'armv6h'. But It fails to build and install a dependency : foomatic-db-foo2zjs. Here is the output of yaourt :

==> ERROR: Failure while creating working copy of foomatic-db-foo2zjs bzr repo
    Aborting...
==> ERROR: Makepkg was unable to build foomatic-db-foo2zjs.

I also tried to add more swap but it solved nothing.

What could I do?

Thank you for your help!

EDIT : I tried to add space to /tmp (as this tutorial explains : http://www.boxtutorials.com/how-to-increase-the-size-of-disk-space-tmp-usrtmpdsk-partition-in-linux-server.html) and it went further.

But I still have an issue :

If I try to build the package with yaourt :

I got an error with the PKGBUILD file :

pkgname=foomatic-db-foo2zjs
arch=('i686' 'x86_64' 'armv6h')
_snapdate=20141011
pkgver=${_snapdate}
pkgrel=1
epoch=3
license=('GPL' 'custom')
pkgdesc="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomat\
ic-db-engine to generate PPD files. Rebuilt for use with foo2zjs."
depends=('perl' 'libxml2')
conflicts=('foomatic-db-ppd' 'foomatic-db-hpijs' 'foomatic-db' 'foo2zjs-testing')
provides=('foomatic-db-hpijs' 'foomatic-db')
makedepends=('cups' 'perl' 'libxml2' 'enscript' 'perl' 'net-snmp' 'bash' 'bzr')
source=(foomatic-db-foo2zjs::bzr+http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db/)
url="http://www.linuxprinting.org/foomatic.html"
md5sums=('SKIP')

package() {
   cd ${srcdir}/${pkgname}
   bzr revno
   echo $pkgver
   # here are the problems :
   # I tried chmod calls both with and without "sudo"
   # chmod 777 ./make_configure
   ./make_configure
   # chmod 777 ./configure
   ./configure --prefix=/usr
   make DESTDIR=${pkgdir} install
   install -v -Dm644 ${srcdir}/${pkgname}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING

   # foo2zjs provides different versions of the following files

   rm ${pkgdir}/usr/share/foomatic/db/source/driver/foo2hiperc.xml
   # some other rm calls
   rm ${pkgdir}/usr/share/foomatic/db/source/printer/HP-LaserJet_1005.xml
}

I got the following :

PKGBUILD: line 24: ./make_configure: Permission denied
==> ERROR: A failure occurred in package().
    Aborting...
==> ERROR: Makepkg was unable to build foomatic-db-foo2zjs.

I tried to add a call to "sudo chmod" in this file to get permissions but it doesn't work.

And if I try to build myself the package (with makepkg) :

it returns :

  -> Creating working copy of foomatic-db-foo2zjs bzr repo...
bzr: ERROR: Not a branch: "/home/vmonteco/build/foomatic-db-foo2zjs/foomatic-db-foo2zjs/.bzr/branch/": location is a repository.
==> ERROR: Failure while creating working copy of foomatic-db-foo2zjs bzr repo
    Aborting...

Any idea?

By the way, I also found a tutorial (in French, sorry) that is exactly what I was searching for (same case, same devices, same package...), I put it here in case it could help somebody else, even a non-french speaker with just the commands. http://www.azurs.net/carnet/2013/09/raspberry-pi-serveur-impression-imprimante-hp-laserjet-p1006/ I'm stuck (see the two errors above) at the two last steps "L’AUR sans peine, mais avec yaourt" ("AUR without troubles, but with yaourt") and "Empaquetage avec makepkg" ("packaging with makepkg"). I tried both but both failed when I tried.


Solution

  • I finally managed to fix it.

    I'll recapitulate : I added swap and made a larger /tmp to get rid off space issues. (The first problem I was encountering).. But I also had to mount the /tmp without "noexec" option, to permit yaourt to run the PKGBUILD file (as suggested here : https://bbs.archlinux.org/viewtopic.php?id=189625).

    I still have an issue (filter failed) with installing my printer with cups with the new drivers, so I'll wait to have a solution for this too before I mark this post as "solved". :)

    EDIT: I finally reinstalled my printer with the hp-setup tool (hp-lip package) and it worked. :)

    I hope it could help anybody else!