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

@@ -3,21 +3,31 @@
## 1. Repository initialization
- [x] 1.1 Initialize jujutsu repository with `jj git init` in repo root and verify `.jj` directory exists
## 2. Container build setup
- [x] 2.1 Create Containerfile in repository root based on Debian/Ubuntu base image with multiarch support for i386
- [x] 2.2 Install required system packages: cups, avahi-daemon, dbus, wget/curl, and 32-bit runtime libraries (libc6:i386, libstdc++6:i386, etc.)
- [x] 2.3 Copy the local Brother driver packages (`assets/Brother HL-4150CDN/lpr-driver/hl4150cdnlpr-1.1.1-5.i386.deb` and `assets/Brother HL-4150CDN/cupswrapper/hl4150cdncupswrapper-1.1.1-5.i386.deb`) into the build context and install them in the container with `dpkg -i --force-all` (verify install reports success)
- [x] 2.4 Configure CUPS and Brother drivers (symlink PPD/filter files as needed, set up cupsd.conf for container use) and verify files are in correct locations
- [x] 2.5 Set up startup script to run dbus, avahi-daemon, and cupsd in the container
- [x] 2.6 Expose ports 631 (CUPS/IPP) and 5353/udp (mDNS) in Containerfile and verify ports are declared
## 2. BR-Script3 PostScript PPD asset
- [x] 2.1 Extract Brother's official HL-4150CDN BR-Script3 PPD (`eng/BR4150_2.PPD`) from the vendor Windows driver archive and commit it under `assets/Brother HL-4150CDN/ppd/BR4150_2.PPD`
- [x] 2.2 Document the provenance and the option→`setpagedevice` mapping in `assets/Brother HL-4150CDN/ppd/README.md`
## 3. Printer configuration
- [x] 3.1 Add logic/config to create and share the Brother HL-4150CDN printer (using lpadmin) with appropriate network URI and PPD; ensure printer is shared for network clients
- [x] 3.2 Configure Avahi/CUPS for AirPrint advertisement and verify printer will be discoverable
- [x] 3.3 Add environment-based configuration for the printer address and advertised name (`PRINTER_IP`, `PRINTER_PROTOCOL`, `PRINTER_NAME`, `PRINTER_DESCRIPTION`; `PRINTER_URI` overrides)
## 3. Container build
- [x] 3.1 Create Containerfile based on Debian stable with CUPS, cups-filters, Avahi, D-Bus, Ghostscript and Poppler (no i386 multiarch)
- [x] 3.2 Install the BR-Script3 PPD into the CUPS model directory in the Containerfile
- [x] 3.3 Remove the Brother vendor `.deb` installation, i386 multiarch and the 32-bit loader setup from the Containerfile
- [x] 3.4 Keep cupsd.conf (listen on all interfaces, share printers, DNS-SD) and the required runtime directories
- [x] 3.5 Set up the startup script to run dbus, avahi-daemon and cupsd, and create the queue
- [x] 3.6 Expose ports 631/tcp and 5353/udp in the Containerfile
## 4. Documentation and testing
- [x] 4.1 Create or update README with instructions for building and running the container with podman (including host network mode note for mDNS, volume mounts if needed)
- [x] 4.2 Test container build with podman build and verify image builds successfully
- [x] 4.3 Test container run and verify CUPS is accessible and printer is shared/discoverable (manual verification)
- [x] 4.4 Verify `podman run` with `PRINTER_IP` and a custom `PRINTER_NAME` creates the queue at the derived URI and advertises that name
## 4. Printer configuration
- [x] 4.1 Create the queue with the BR-Script3 PPD and a raw AppSocket URI by default (`socket://<ip>:9100`)
- [x] 4.2 Keep environment-based configuration (`PRINTER_IP`, `PRINTER_PROTOCOL`, `PRINTER_URI`, `PRINTER_NAME`, `PRINTER_DESCRIPTION`, `PPD_FILE`)
- [x] 4.3 Share the queue and set it as default; verify AirPrint capabilities (URF, sides, colour)
## 5. Documentation and testing
- [x] 5.1 Update README for the PostScript/BR-Script3 approach and the client matrix (macOS, iOS/iPadOS, Linux, Windows)
- [x] 5.2 Build the image with podman and verify it builds
- [x] 5.3 Run the container and verify CUPS is reachable and the queue is shared/discoverable
- [x] 5.4 Submit a job (colour + duplex) and verify it prints correctly
- [x] 5.5 Verify `PRINTER_IP`/`PRINTER_PROTOCOL`/`PRINTER_NAME` derive the expected queue URI and advertised name
## 6. Cleanup
- [x] 6.1 Add `.gitignore` for macOS metadata and stop tracking existing `.DS_Store` files
- [x] 6.2 Remove the unused Brother Linux vendor packages (`lpr-driver/`, `cupswrapper/`, `installer/`) from the repository
- [x] 6.3 Prune the obsolete `printserver:amd64` image, the test containers and scratch files