me
/
guix
Archived
1
0
Fork 0

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.
master
Tobias Geerinckx-Rice 2021-06-22 19:23:29 +02:00
parent 3b5297d975
commit a437bd9180
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 13 additions and 0 deletions

View File

@ -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"