[PATCH 0/4] hplip: Enable network support

  • Open
  • quality assurance status badge
Details
One participant
  • Lukas Gradl
Owner
unassigned
Submitted by
Lukas Gradl
Severity
normal

Debbugs page

Lukas Gradl wrote 2 weeks ago
(address . guix-patches@gnu.org)(name . Lukas Gradl)(address . lgradl@posteo.net)
cover.1740568536.git.lgradl@posteo.net
Hello Guix,

currently, our hplip package does not build the network support. This causes
the following:

* the 'hp-setup' utility does not allow to configure network-connected HP
printers or all-in-ones.

* printing on network-connected HP printers through hplip (i.e. using a url
like 'hp:/net/...' for the connection in CUPS) does not work.

* scanning with sane on a network-connected HP all-in-one is not possible
using a url of the form 'hpaio:/...'. Such scanners are also not
automatically found by sane.


The following patch-series fixes these issues by building the network support
in hplip. After reconfiguring my system with these changes I am able to print
and scan using an HP OfficeJet Pro 8020 series all-in-one connected to the
local network.

Thank you in advance for your feedback!

best,
Lukas


Lukas Gradl (4):
gnu: hplip: Update to 3.24.4.
gnu: hplip: Enable networking.
gnu: hplip-minimal: Disable networking.
gnu: sane-backends: Enable hplip network scanners.

gnu/packages/cups.scm | 29 ++++++++++++++++++++---------
gnu/packages/scanner.scm | 2 +-
2 files changed, 21 insertions(+), 10 deletions(-)


base-commit: 90ee330bafc5a95493f9cdae2e32ddf740104ebc
--
2.47.1
Lukas Gradl wrote 2 weeks ago
[PATCH 4/4] gnu: sane-backends: Enable hplip network scanners.
(address . 76583@debbugs.gnu.org)(name . Lukas Gradl)(address . lgradl@posteo.net)
30b77740c4039ca6f6e4b01937fe3c7e8f9ac66a.1740568536.git.lgradl@posteo.net
* gnu/packages/scanner.scm (sane-backends): Enable hplip network scanners.
[inputs]: Replace hplip-minimal with hplip.

Change-Id: Id5fb321fc0e0ccdfabf30cbc617a4800126041c7
---
gnu/packages/scanner.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index 21e9506d112..259e378b658 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -213,7 +213,7 @@ (define-public sane-backends
(package/inherit sane-backends-minimal
(name "sane-backends")
(inputs
- `(("hplip" ,(@ (gnu packages cups) hplip-minimal))
+ `(("hplip" ,(@ (gnu packages cups) hplip))
("libjpeg" ,libjpeg-turbo) ; for pixma/epsonds/other back ends
("libpng" ,libpng) ; support ‘scanimage --format=png’
("libxml2" ,libxml2) ; for pixma back end
--
2.47.1
Lukas Gradl wrote 2 weeks ago
[PATCH 1/4] gnu: hplip: Update to 3.24.4.
(address . 76583@debbugs.gnu.org)(name . Lukas Gradl)(address . lgradl@posteo.net)
2817197b496ebbd914987fc82f564aa841a0484c.1740568536.git.lgradl@posteo.net
* gnu/packages/cups.scm (hplip): Update to 3.24.4.

Change-Id: Ic9c88ce3a6d4ad7f5b6b85373a1cb12b26cfea9f
---
gnu/packages/cups.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index e8ca5efc868..09881fc1b8b 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -529,14 +529,14 @@ (define-public cups-pk-helper
(define-public hplip
(package
(name "hplip")
- (version "3.23.12")
+ (version "3.24.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/hplip/hplip/" version
"/hplip-" version ".tar.gz"))
(sha256
(base32
- "1vb9irqsm3d4c2qdr4h6ia940x65bb99h4x31mgxn7dkvv42lv57"))
+ "1yzil1fn9ib2hxmqh9in0apmmznvln0xahlxvyny59ck321l6xjx"))
(patches (search-patches "hplip-usb-timeout.patch"))
(modules '((guix build utils)))
(snippet
--
2.47.1
Lukas Gradl wrote 2 weeks ago
[PATCH 2/4] gnu: hplip: Enable networking.
(address . 76583@debbugs.gnu.org)(name . Lukas Gradl)(address . lgradl@posteo.net)
e2c65c7f7a7b70bb6d28700395443343e7ad3b12.1740568536.git.lgradl@posteo.net
* gnu/packages/cups.scm (hplip): Enable networking.
[arguments] <#:configure-flags>: Remove flag "--disable-network-build".
[inputs]: Add net-snmp, openssl, and avahi.

Change-Id: Ibd95a9786c7bea5b45d0fcfa6ab81eca47ca82a0
---
gnu/packages/cups.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 09881fc1b8b..b318915065c 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2025 Lukas Gradl <lgradl@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@ (define-module (gnu packages cups)
#:use-module (gnu packages image)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
@@ -579,7 +581,6 @@ (define-public hplip
((guix build python-build-system) #:prefix python:))
#:configure-flags
#~(list "--disable-imageProcessor-build"
- "--disable-network-build"
(string-append "--prefix=" #$output)
(string-append "--sysconfdir=" #$output "/etc")
(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
@@ -690,6 +691,9 @@ (define-public hplip
python-pyqt
python-wrapper
sane-backends-minimal
+ net-snmp
+ openssl
+ avahi
zlib))
(home-page "https://developers.hp.com/hp-linux-imaging-and-printing")
(synopsis "HP printer drivers")
--
2.47.1
Lukas Gradl wrote 2 weeks ago
[PATCH 3/4] gnu: hplip-minimal: Disable networking.
(address . 76583@debbugs.gnu.org)(name . Lukas Gradl)(address . lgradl@posteo.net)
3cf6341bd1af16d27fc90cf680f77e69341555c0.1740568536.git.lgradl@posteo.net
* gnu/packages/cups.scm (hplip-minimal): Disable networking.
[arguments] <#:configure-flags>: Add "--disable-network-build". The "lite
build" of hplip is incompatible with the "network build", so disable
the latter explicitly.
[inputs]: Rephrase the inputs as a positive list and remove net-snmp, openssl,
and avahi (inherited from hplip).

Change-Id: I954b665fe5bdeae2a2fab79c1e2cbfa8ac01f58b
---
gnu/packages/cups.scm | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index b318915065c..41c3f0af456 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -713,16 +713,23 @@ (define-public hplip-minimal
;; Produce a "light build", meaning that only the printer (CUPS) and
;; scanner (SANE) support gets built, without all the 'hp-*'
;; command-line tools.
- #~(cons "--enable-lite-build"
- (delete "--enable-qt5" #$cf)))
+ #~(cons* "--enable-lite-build"
+ "--disable-network-build"
+ ;; The flag "--enable-lite-build" is incompatible with
+ ;; "--enable-network-build" inherited from hplip, so we need
+ ;; to override it with "--disable-network-build".
+ (delete "--enable-qt5" #$cf)))
((#:phases phases)
;; The 'wrap-binaries' is not needed here since the 'hp-*' programs
;; are not installed.
#~(alist-delete 'wrap-binaries #$phases))))
- (inputs (remove (match-lambda
- ((label . _)
- (string-prefix? "python" label)))
- (package-inputs hplip)))
+ (inputs
+ (list cups-minimal
+ dbus
+ libjpeg-turbo
+ libusb
+ sane-backends-minimal
+ zlib))
(synopsis "GUI-less version of hplip")))
(define-public foomatic-filters
--
2.47.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76583@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76583
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help