Print via Brother BR-Script3 PostScript instead of the vendor driver

The HL-4150CDN emulates PostScript 3, so CUPS converts client documents to PostScript and forwards them to socket://<ip>:9100. The official BR-Script3 PPD turns device options (tray, duplex, colour, media type, toner save, ...) into setpagedevice instructions. This drops the i386 multiarch runtime and the broken Brother vendor filter chain, and removes the unused Brother Linux packages from the repo.
This commit is contained in:
juergen committed 2026-10-18 16:54:33 +02:00
1 parent 6f3162849b
commit 30c685e085
22 files changed
+1070 -273

No files matched your search

@@ -2,28 +2,56 @@
## Why
Provide a Podman container that runs CUPS and shares the Brother HL-4150CDN network printer as an AirPrint and IPP printer. Clients should be able to print without installing local printer drivers.
Run a Podman container that shares the Brother HL-4150CDN network printer over
IPP/AirPrint, so clients on macOS, iOS/iPadOS, Linux and Windows can print.
The HL-4150CDN already emulates BR-Script3 (PostScript 3) and accepts PostScript
on its AppSocket/LPD ports, so the container can forward PostScript directly to
the printer instead of shipping Brother's 32-bit Linux CUPS wrapper plus
Ghostscript rasterisation. This removes the i386 dependency, the multiarch
runtime and the fragile vendor filter chain.
The previous approach (Brother Linux `.deb` packages) turned out not to work in
`debian:bookworm-slim`: the vendor filter `filterhl4150cdn` needs `file` (with
`a2ps` as a fallback), which are not installed, so it exits with an error and
produces no output. The official BR-Script3 PPD avoids that entire code path.
## What Changes
- Create a Containerfile for Podman (based on a Linux distro that supports CUPS and 32-bit binaries)
- Extract and install Brother driver files (from `assets/Brother HL-4150CDN/` - local .deb packages: `hl4150cdnlpr` and `hl4150cdncupswrapper`) needed for HL-4150CDN
- Configure CUPS to run in the container and share the network printer
- Enable mDNS/Avahi for AirPrint discovery
- Provide minimal runtime configuration (ports 631, 5353/udp) and documentation for running with podman
- Handle 32-bit dependencies required by Brother i386 binaries
- Create a Containerfile for Podman based on Debian stable running CUPS, Avahi
and D-Bus (no i386 multiarch).
- Install Brother's official **BR-Script3 PPD** (committed under
`assets/Brother HL-4150CDN/ppd/`) so CUPS emits device options — paper source
(tray), duplex and colour/mono, plus media type, print quality, toner save and
secure print — as PostScript `setpagedevice`.
- Point the queue at the printer with a raw AppSocket URI (`socket://<ip>:9100`)
by default.
- Convert incoming client formats (URF/Apple Raster, PWG Raster, PDF, PostScript)
to PostScript inside CUPS and pass them through to the printer's PostScript
interpreter.
- Share the queue over IPP and advertise it via mDNS/DNS-SD (Avahi/AirPrint).
- Keep runtime configuration (printer address, protocol, queue name) in
environment variables.
- Document the supported client matrix.
## Capabilities
### New Capabilities
- `printserver/cups`: Containerized CUPS print server with AirPrint/IPP sharing and Brother HL-4150CDN driver support
- `printserver/cups`: Containerised CUPS print server which shares the Brother
HL-4150CDN over IPP/AirPrint and prints by sending PostScript (BR-Script3)
directly to the printer.
### Modified Capabilities
None
## Impact
- New Containerfile (and possibly supporting files) in repository root
- Uses Brother driver artifacts in `assets/Brother HL-4150CDN/`
- Runtime ports: CUPS (631), mDNS (5353/udp) for AirPrint
- Depends on Avahi/DBus, CUPS, and 32-bit compatibility libs for Brother binaries
- Containerfile plus supporting `cupsd.conf` and `entrypoint.sh` in the
repository root.
- Uses `assets/Brother HL-4150CDN/ppd/BR4150_2.PPD`.
- Runtime ports: CUPS/IPP (631/tcp), mDNS/DNS-SD (5353/udp).
- No 32-bit runtime libraries; the image no longer depends on the host CPU
architecture.
- Windows clients install Brother's own BR-Script3 Windows driver client-side.
- The unused Brother Linux `.deb` packages previously under
`assets/Brother HL-4150CDN/` have been removed.