implement fix for color mode default
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
juergen committed 2026-10-20 15:59:53 +02:00
1 parent b22e82a8c2
commit 509af2a410
5 files changed
+238 -35

No files matched your search

+13 -1
View File
@@ -85,7 +85,7 @@ podman run -d --name printserver \
| `PRINTER_NAME` | `HL4150CDN` | CUPS queue name. Also the base of the advertised AirPrint/DNS-SD name (`<name> @ <host>`) — while no Description is set; `PRINTER_DESCRIPTION` overrides the advertised name. |
| `PRINTER_DESCRIPTION` | *(empty)* | CUPS printer description (`lpadmin -D`), shown in the CUPS web UI. |
| `PPD_FILE` | `/usr/share/cups/model/BR4150_2.PPD` | PPD used for the queue. |
| `PRINTER_OPTIONS` | *(empty)* | Space-separated PPD option assignments (`key=value`) applied as queue defaults on every start, e.g. `BRColorMode=Vivid TonerSaveMode=False`. Discover the names with `lpoptions -p <queue> -l`. |
| `PRINTER_OPTIONS` | *(empty)* | Space-separated PPD option assignments (`key=value`) applied as queue defaults on every start, e.g. `BRColorMode=Vivid TonerSaveMode=False`. Discover the names with `lpoptions -p <queue> -l` — but note that this command mis-renders Boolean options; see below. |
| `CERT_EXTRA_NAMES` | *(empty)* | Comma-separated extra DNS names and/or IP addresses to put into the generated `_ipps` certificate. |
| `CERT_DAYS` | `3650` | Validity of the generated certificate, in days. |
@@ -102,6 +102,18 @@ podman run -d --name printserver \
printserver:latest
```
An applied assignment wins over the PPD's own default for that option: a job that
does not select it itself is printed with the configured value, which shows up in
the PostScript the queue sends to the printer (e.g. `%%BeginFeature:
*TonerSaveMode False`). Verify it with `tests/test-queue-defaults.sh`.
Do not read a queue default back from `lpoptions -p <queue> -l`: for Boolean
options it marks the *False/Off* entry instead of the current value, so a queue
default of `TonerSaveMode=True` still shows as `*False`. `BRColorMode` (a
`PickOne`) reflects correctly with `*Vivid`, and the stored setting is always
visible in `/etc/cups/ppd/<queue>.ppd` as `*DefaultBRColorMode: Vivid` /
`*DefaultTonerSaveMode: True`.
Entries that the PPD does not know are logged as a warning and ignored; the
remaining ones are applied and the container starts normally.