Add CUPS print server container for Brother HL-4150CDN

This commit is contained in:
juergen committed 2026-10-18 09:16:37 +02:00
commit 6f3162849b
52 files changed
+5168

No files matched your search

@@ -0,0 +1,81 @@
# Spec Delta
## Purpose
Provide a containerized CUPS print server that shares the Brother HL-4150CDN network printer as an AirPrint and IPP printer so clients can print without installing local printer drivers.
## ADDED Requirements
### Requirement: Container image builds with required dependencies
The container SHALL include CUPS, Avahi/mDNS, DBus, and required 32-bit runtime libraries to run Brother HL-4150CDN i386 binaries.
#### Scenario: Image contains CUPS
- **WHEN** the image is built
- **THEN** CUPS is installed and available at /usr/sbin/cupsd
#### Scenario: Image supports 32-bit Brother binaries
- **WHEN** the image is built
- **THEN** required 32-bit libraries are present for the Brother i386 filters
### Requirement: Brother HL-4150CDN driver is installed in container
The container SHALL install the Brother HL-4150CDN CUPS wrapper, PPD, LPR/filter components from the provided driver artifacts.
#### Scenario: Driver files present
- **WHEN** the container image is built
- **THEN** the HL-4150CDN PPD and Brother filters are installed in standard system locations
#### Scenario: CUPS recognizes HL-4150CDN
- **WHEN** CUPS starts with the driver installed
- **THEN** CUPS is able to use the HL-4150CDN PPD
### Requirement: Printer is shared and discoverable
The system SHALL share the Brother HL-4150CDN printer over IPP and make it discoverable via AirPrint (mDNS/DNS-SD) on the container network.
#### Scenario: IPP printer is shared
- **WHEN** CUPS runs in the container
- **THEN** the printer is shared via IPP for network clients
#### Scenario: AirPrint discovery
- **WHEN** Avahi runs alongside CUPS
- **THEN** the printer is advertised via AirPrint so macOS/iOS clients can discover it without driver installation
### Requirement: Runtime configuration is exposed
The container SHALL expose CUPS on port 631 and mDNS on UDP port 5353.
#### Scenario: CUPS port exposed
- **WHEN** the container runs
- **THEN** port 631 is available for CUPS administration and IPP
#### Scenario: mDNS port exposed
- **WHEN** the container runs
- **THEN** UDP port 5353 is available for AirPrint discovery
### Requirement: No client drivers required
The shared printer SHALL be exposed in a way that client devices can print without installing vendor printer drivers.
#### Scenario: AirPrint compatibility
- **WHEN** a client discovers the printer via AirPrint
- **THEN** the client uses native IPP/AirPrint drivers
### Requirement: Printer endpoint and advertised name are configurable at runtime
The container SHALL accept the network printer address and the advertised printer name through environment variables so the same image can target a different printer or name without rebuilding.
#### Scenario: Printer IP is provided
- **WHEN** the container is started with `PRINTER_IP` set
- **THEN** a device URI is derived from that address and the Brother HL-4150CDN queue is created pointing at it
#### Scenario: Printer protocol is selected
- **WHEN** the container is started with `PRINTER_IP` and `PRINTER_PROTOCOL`
- **THEN** the device URI uses that protocol (lpd, socket or ipp)
#### Scenario: Full URI override
- **WHEN** `PRINTER_URI` is set
- **THEN** it is used as the device URI and `PRINTER_IP` is ignored
#### Scenario: Custom advertised name
- **WHEN** the container is started with `PRINTER_NAME`
- **THEN** the CUPS queue uses that name and it is the name advertised via AirPrint/DNS-SD
#### Scenario: Custom CUPS description
- **WHEN** the container is started with `PRINTER_DESCRIPTION`
- **THEN** the queue's CUPS Description (Info) is set to that value