aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-06-22 19:23:29 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-06-23 02:51:29 +0200
commita437bd9180d1af0f84229d4ae3e9cd0ab93d9fa0 (patch)
treebf3fae31ca0348054387a3889a94697497251305
parent3b5297d975efd07e7819f671c14856fd0778870e (diff)
downloadguix-a437bd9180d1af0f84229d4ae3e9cd0ab93d9fa0.tar.gz
guix-a437bd9180d1af0f84229d4ae3e9cd0ab93d9fa0.zip
gnu: cups-minimal: Remove the server settings from the /admin Web UI.
* gnu/packages/cups.scm (cups-minimal)[arguments]: Add a new 'remove-Web-UI-server-settings phase.
-rw-r--r--gnu/packages/cups.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 959caa70f6..8301802e72 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -287,6 +287,19 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
(substitute* "cgi-bin/admin.c"
(("!cupsAdminGetServerSettings" match)
(string-append "0 && " match)))))
+ (add-after 'unpack 'remove-Web-UI-server-settings
+ ;; The /admin page's server configuration form is questionable for
+ ;; the same reason as cupsAdminGetServerSettings, and won't work at
+ ;; all on Guix Systems. Remove it entirely.
+ (lambda _
+ ;; SUBSTITUTE* and a patch both have (dis)advantages. This is
+ ;; shorter & should ensure that no translation is forgotten.
+ (substitute* (find-files "templates" "^admin\\.tmpl$")
+ ((" class=\"halves\"") "")
+ (("<FORM.* ACTION=\"/jobs.*</FORM>" match)
+ (string-append match "</P>{BROKEN? "))
+ (("</FORM>}" match)
+ (string-append match "}")))))
(add-before 'configure 'patch-makedefs
(lambda _
(substitute* "Makedefs.in"