Hi, The CUPS web interface in my Guix system hangs when loading the adminpage, making it cumbersome to manage CUPS printers and settings. Thecause appears to be that the web interface CGI scripts expect a configfile in the wrong location.
HOW TO REPRODUCE: My system is running Guix commit 290b55c55a5 with the following CUPSconfiguration: (service cups-service-type (cups-configuration (web-interface? #t) (log-level 'debug) (extensions (list cups-filters foomatic-filters hplip-minimal)))) I load http://localhost:631/adminin a browser (Icecat). Expectedbehavior is for the page to load immediately. Actual behavior is thepage hangs for a minute or two, displaying a blank screen. Eventuallythe expected Administration page loads, but is missing some controlsand displays "Unable to open cupsd.conf file: Success."
DETAILS: Excerpt from /var/log/cups/error_log is attached. Note especiallyCUPS_SERVERROOT=/etc/cups. Output of ‘ps -ef | grep cupsd’: root 6374 1 0 00:29 ? 00:00:01/gnu/store/wxg6fa0d1hlna6gg2nrn51fkq68q7fy9-cups-2.3.1/sbin/cupsd -f-c /gnu/store/6i13apvx94y7q61rh3hsj7fhjb6brgf4-cupsd.conf -s/gnu/store/nxzmy9s6inia31wvhrcrzcf66rb4v4pp-cups-files.conf Output of ‘sudo strace -p `pidof cupsd` -f -e file’ while refreshingthe Administration page contains a number of entries like this: [pid 8423] access("/etc/cups/cupsd.conf", R_OK) = -1 ENOENT(No such file or directory) The directory /etc/cups exists but contains only ssl/ and ppd/subdirectories, no cupsd.conf. If I create a symlink /etc/cups/conf.d ->/gnu/store/6i13...-cupsd.conf, the Administration page now loadswithout any issue. In addition, I noticed that (per Guix manual) the server-root field ofthe CUPS service’s files-configuration section defaults to /etc/cups.If I set that field to /gnu/store/wxg6...-cups-2.3.1/etc/cups (see thecupsd command line above) then run ‘guix system reconfigure’ andrestart cupsd, the web interface again works as expected. Finally, note that the ServerRoot field of/gnu/store/nxzm...-cups-files.conf is set to/gnu/store/wxg6...-2.3.1/etc/cups (again see cupsd command lineabove).
COMMENTARY: From examining the CUPS sources, it appears the web admin interfaceexpects to find cupsd.conf in CUPS_SERVERROOT solely to make the "EditConfiguration File" feature work. This feature doesn't seem veryuseful on Guix since the config file lives in the (read-only) store.However, the file still needs to be present in order to satisfy theadmin page CGI script and keep it from hanging. Thus, perhaps the problem could be solved by having the service make asymlink /etc/cups/cupsd.conf pointing at its generated cupsd.conffile.