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:
1 parent
6f3162849b
commit
30c685e085
22 files changed
+1070
-273
No files matched your search
@@ -2,61 +2,104 @@
|
||||
|
||||
## Context
|
||||
|
||||
See proposal.md for motivation - we need to create a Podman container that runs a CUPS print server for Brother HL-4150CDN. The repo contains the Brother driver packages in `assets/Brother HL-4150CDN/`:
|
||||
- `lpr-driver/hl4150cdnlpr-1.1.1-5.i386.deb`
|
||||
- `cupswrapper/hl4150cdncupswrapper-1.1.1-5.i386.deb`
|
||||
- `installer/linux-brprinter-installer-2.2.6-0.gz` (reference only; we will NOT run it in the build - it is interactive and downloads from the network)
|
||||
See proposal.md. We need a Podman container that runs CUPS for the Brother
|
||||
HL-4150CDN network printer and shares it over IPP/AirPrint.
|
||||
|
||||
Key observations:
|
||||
- Brother drivers are i386 binaries (32-bit ELF). Container needs 32-bit runtime libraries.
|
||||
- CUPS wrapper + LPR packages provide PPD, filters, and helper binaries.
|
||||
- AirPrint requires CUPS + Avahi/mDNS (DNS-SD).
|
||||
- Brother's cups wrapper installs files to /usr/local/Brother/ and may need symlinks into CUPS directories.
|
||||
Facts established while exploring the device at `192.168.100.7`:
|
||||
|
||||
- The printer is a Brother HL-4150CDN (`Ver.1.22`) with PCL6 and **BR-Script3
|
||||
(PostScript 3)** emulation — `@PJL INFO CONFIG` lists `POSTSCRIPT`.
|
||||
- Open services: `:9100` (raw/AppSocket), `:515` (LPR/LPD), `:631` (IPP/IPPS)
|
||||
and `:80` (Brother web UI). It has one paper cassette plus the MP tray.
|
||||
- A raw PostScript job sent to `:9100` is interpreted by the printer, and a full
|
||||
CUPS job with `Duplex=DuplexNoTumble BRPrintQuality=Color` printed correctly
|
||||
(duplex, colour).
|
||||
|
||||
An earlier iteration used Brother's Linux packages. That vendor CUPS chain is
|
||||
broken in `debian:bookworm-slim`: `filterhl4150cdn` needs `file` (and `a2ps` as
|
||||
a fallback), which are absent, so the filter exits 1 and emits zero bytes. That
|
||||
chain also rasterises locally (Ghostscript → `ppmraw` → `brhl4150cdnfilter`) and
|
||||
stores per-queue options in a single global file (`brhl4150cdnrc`), which is
|
||||
heavy and racy. The packages have since been removed from the repository.
|
||||
|
||||
Crucially, the Brother **vendor** PPD (`brhl4150cdn.ppd`) cannot be used for
|
||||
direct PostScript because its option values are blank (`" "`); all
|
||||
option handling lives in the vendor filter. Brother's **BR-Script3 PPD**, in
|
||||
contrast, encodes every option as PostScript `setpagedevice`.
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
**Goals:**
|
||||
- Create a Containerfile that builds a working image for Podman
|
||||
- Install and configure Brother HL-4150CDN drivers
|
||||
- Share printer via IPP with AirPrint discovery
|
||||
- Expose ports 631 (CUPS/IPP) and 5353/udp (mDNS)
|
||||
- Make it easy to run with podman
|
||||
- Build a working CUPS image for Podman with no 32-bit dependencies.
|
||||
- Drive the printer with its native PostScript (BR-Script3) interpreter.
|
||||
- Preserve the hardware options the user cares about: paper tray, duplex and
|
||||
colour/mono (plus the other options the PPD exposes).
|
||||
- Share the queue over IPP and advertise it via AirPrint.
|
||||
- Keep the printer address/name runtime-configurable.
|
||||
|
||||
**Non-Goals:**
|
||||
- Managing multiple printers
|
||||
- Custom SSL/TLS configuration for CUPS (use defaults or documented)
|
||||
- Persistent CUPS spool/state beyond basic setup
|
||||
- Managing multiple printers.
|
||||
- Sharing via SMB/Samba (Windows uses a client-side Brother driver).
|
||||
- Persisting CUPS spool/state beyond the container lifecycle.
|
||||
- TLS for the CUPS web interface.
|
||||
|
||||
## Decisions
|
||||
|
||||
### Base image
|
||||
- Use Debian/Ubuntu (or similar) as base to handle .deb packages and 32-bit libs easily. Alternatively Alpine, but Alpine needs musl + 32-bit support can be more complex for prebuilt i386 ELF binaries from Brother. Debian stable is practical.
|
||||
### Base image and packages
|
||||
Use `debian:bookworm-slim` with `cups`, `cups-client`, `cups-filters`,
|
||||
`avahi-daemon`, `avahi-utils`, `libnss-mdns`, `dbus`, `ghostscript` and
|
||||
`poppler-utils`. No `dpkg --add-architecture i386` and no Brother `.deb`
|
||||
packages: the job is converted to PostScript in CUPS and interpreted by the
|
||||
printer, so no vendor binary is needed.
|
||||
|
||||
### Driver installation
|
||||
- Use the local `.deb` packages from `assets/Brother HL-4150CDN/` (copied into the build context) and install with `dpkg -i --force-all`. No network download at build time for the driver itself.
|
||||
- Do not run the Brother installer script (`linux-brprinter-installer-2.2.6-0.gz`) in the build - it is interactive and downloads packages from download.brother.com.
|
||||
- Also need to install brcupsconfpt1 helper if needed - comes with cups wrapper.
|
||||
- Run the cups wrapper install logic as per Brother installer (or manually create symlinks).
|
||||
_Alternative considered:_ keep Brother's Linux CUPS wrapper + LPR filter. It
|
||||
provides the same options but requires 32-bit libraries, Ghostscript
|
||||
rasterisation and the missing `file`/`a2ps` tools, and it writes options to a
|
||||
single global config file. Rejected.
|
||||
|
||||
### CUPS + Avahi + DBus
|
||||
- Install cups, avahi-daemon, dbus. Run dbus and avahi-daemon; start cupsd.
|
||||
- Configure CUPS to allow remote access/sharing. For containerized setup, typically need to listen on all interfaces and configure sharing.
|
||||
### Print path: direct PostScript via the BR-Script3 PPD
|
||||
Install Brother's official BR-Script3 PPD as
|
||||
`/usr/share/cups/model/BR4150_2.PPD` (committed at
|
||||
`assets/Brother HL-4150CDN/ppd/BR4150_2.PPD`, extracted from the vendor Windows
|
||||
driver) and create the queue with it. CUPS's `pstops` filter reads the PPD and
|
||||
injects the selected option code (e.g. `/BRFeeder`, `/Duplex`,
|
||||
`/BRProcessColor`, `/MediaType`) into the job; the PPD's `*JCLBegin`,
|
||||
`*JCLToPSInterpreter` and `*JCLEnd` entries wrap it in PJL. The result is
|
||||
forwarded unchanged to the printer.
|
||||
|
||||
### Printer configuration
|
||||
- Add printer via lpadmin using the Brother PPD. Point to network URI (e.g., ipp://PRINTER_IP/ipp or socket://PRINTER_IP:9100 - depends on printer; HL-4150CDN is network printer).
|
||||
- Enable printer sharing and default options.
|
||||
A stock PostScript PPD (like CUPS's own `generic.ppd`) has no `*cupsFilter`
|
||||
either, and CUPS accepts such PPDs — the printer's native format is
|
||||
`application/vnd.cups-postscript`.
|
||||
|
||||
### Device URI
|
||||
Use raw AppSocket as the default: `socket://<ip>:9100`. `lpd://<ip>/binary_p1`
|
||||
and `ipp://…` remain available through `PRINTER_PROTOCOL`/`PRINTER_URI`.
|
||||
|
||||
### Client support
|
||||
- macOS / iOS / iPadOS: AirPrint → CUPS. The queue advertises `image/urf`,
|
||||
`image/pwg-raster`, `application/pdf` and `application/postscript`, with
|
||||
`urf-supported = V1.4,CP1,W8,PQ4,SRGB24,RS600,DM1,FN3`, `sides-supported`
|
||||
(one-sided/two-sided long/short edge) and `color-supported = true`.
|
||||
- Linux: IPP / IPP Everywhere, or plain IPP with PDF/PostScript.
|
||||
- Windows: client-side Brother BR-Script3 Windows driver, pointed at the
|
||||
printer directly or at the shared queue.
|
||||
|
||||
### Runtime configuration
|
||||
- The printer endpoint and advertised name are supplied through environment variables rather than baked into the image, so the same image can be pointed at any HL-4150CDN:
|
||||
- `PRINTER_IP` + `PRINTER_PROTOCOL` (lpd/socket/ipp) derive the device URI.
|
||||
- `PRINTER_URI` overrides the derived URI for full control.
|
||||
- `PRINTER_NAME` sets the CUPS queue name and the DNS-SD/AirPrint advertised name.
|
||||
- `PRINTER_DESCRIPTION` sets the CUPS Description (Info) shown in the web UI.
|
||||
- The entrypoint builds the URI and runs lpadmin at startup, then shares the queue.
|
||||
The printer endpoint and advertised name come from environment variables
|
||||
(`PRINTER_IP`, `PRINTER_PROTOCOL`, `PRINTER_URI`, `PRINTER_NAME`,
|
||||
`PRINTER_DESCRIPTION`, `PPD_FILE`) rather than being baked into the image. The
|
||||
entrypoint derives the URI and runs `lpadmin` on startup, then shares the queue.
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- [Risk] Brother binaries are 32-bit only → require multiarch libs (libc6:i386, etc.). Increases image size slightly.
|
||||
- [Risk] Using .deb packages assumes glibc-based base. If we choose different base, need to ensure compatibility.
|
||||
- [Risk] Avahi in container needs --net=host or proper mDNS setup. AirPrint discovery typically works better with host network mode; document this.
|
||||
- [Risk] CUPS state (printers.conf, etc.) should be persisted if we want config to survive restarts - may need volumes.
|
||||
- [Risk] The AirPrint path (URF → PDF → PostScript) relies on cups-filters'
|
||||
`rastertopdf`; it was not exercised with a real URF job during exploration.
|
||||
macOS/iOS printing should be verified end to end.
|
||||
- [Risk] Colour handling now relies on the printer's PostScript RIP rather than
|
||||
Brother's host-side colour tables; output may differ slightly from the vendor
|
||||
raster driver.
|
||||
- [Risk] The committed PPD is a Windows PPD and contains no CUPS-specific keys.
|
||||
CUPS accepts it as a PostScript PPD (verified for this CUPS version), but this
|
||||
should be re-checked on CUPS upgrades.
|
||||
- [Risk] Avahi needs host networking (or equivalent) to advertise mDNS.
|
||||
- [Risk] CUPS state is not persisted; the queue is recreated on every start.
|
||||
@@ -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.
|
||||
@@ -2,34 +2,69 @@
|
||||
|
||||
## 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.
|
||||
Provide a containerized CUPS print server that shares the Brother HL-4150CDN
|
||||
network printer as an AirPrint/IPP printer and prints by sending PostScript
|
||||
directly to the printer, so clients can print without a server-side vendor
|
||||
driver.
|
||||
|
||||
## 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.
|
||||
The container SHALL include CUPS, cups-filters, Avahi/mDNS, D-Bus and the
|
||||
conversion tools needed to turn client documents into PostScript, and SHALL NOT
|
||||
require any 32-bit runtime libraries.
|
||||
|
||||
#### 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
|
||||
#### Scenario: No 32-bit runtime required
|
||||
- **WHEN** the image is built
|
||||
- **THEN** required 32-bit libraries are present for the Brother i386 filters
|
||||
- **THEN** the image contains no i386 multiarch libraries and no Brother vendor binaries
|
||||
|
||||
### 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.
|
||||
### Requirement: Brother BR-Script3 PPD is installed
|
||||
The container SHALL install Brother's official HL-4150CDN BR-Script3 PPD from
|
||||
the committed asset so CUPS can emit device options as PostScript.
|
||||
|
||||
#### 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: PPD present
|
||||
- **WHEN** the image is built
|
||||
- **THEN** the BR-Script3 PPD is present in the CUPS model directory
|
||||
|
||||
#### Scenario: CUPS recognizes HL-4150CDN
|
||||
- **WHEN** CUPS starts with the driver installed
|
||||
- **THEN** CUPS is able to use the HL-4150CDN PPD
|
||||
#### Scenario: CUPS recognises the model
|
||||
- **WHEN** the queue is created with the PPD
|
||||
- **THEN** CUPS reports the printer make and model as "Brother HL-4150CDN BR-Script3"
|
||||
|
||||
### Requirement: Hardware options are sent to the printer
|
||||
The system SHALL translate the PPD's device options into PostScript
|
||||
`setpagedevice` instructions so the printer's own hardware options are used.
|
||||
|
||||
#### Scenario: Paper source
|
||||
- **WHEN** a job selects an input slot (auto select, a tray or the MP tray)
|
||||
- **THEN** the emitted PostScript selects the corresponding paper source on the printer
|
||||
|
||||
#### Scenario: Duplex
|
||||
- **WHEN** a job selects long-edge or short-edge two-sided printing
|
||||
- **THEN** the emitted PostScript sets `/Duplex` and `/Tumble` accordingly
|
||||
|
||||
#### Scenario: Colour or mono
|
||||
- **WHEN** a job selects colour or mono
|
||||
- **THEN** the emitted PostScript sets the corresponding colour/mono device parameters
|
||||
|
||||
### Requirement: Jobs are printed via direct PostScript
|
||||
The container SHALL forward the converted job as PostScript to the printer
|
||||
without a server-side vendor filter or host-side rasterisation.
|
||||
|
||||
#### Scenario: Default device URI
|
||||
- **WHEN** the container is started with a printer IP and no explicit URI
|
||||
- **THEN** the queue is created with a raw AppSocket URI (`socket://<ip>:9100`)
|
||||
|
||||
#### Scenario: A job is printed
|
||||
- **WHEN** a print job is submitted to the queue
|
||||
- **THEN** the job is delivered to the printer as PostScript and printed by the printer's PostScript interpreter
|
||||
|
||||
### 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.
|
||||
The system SHALL share the queue over IPP and advertise it via AirPrint
|
||||
(mDNS/DNS-SD).
|
||||
|
||||
#### Scenario: IPP printer is shared
|
||||
- **WHEN** CUPS runs in the container
|
||||
@@ -37,7 +72,22 @@ The system SHALL share the Brother HL-4150CDN printer over IPP and make it disco
|
||||
|
||||
#### 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
|
||||
- **THEN** the printer is advertised via AirPrint with URF, sides and colour capabilities so macOS and iOS/iPadOS clients can discover it without a driver
|
||||
|
||||
### Requirement: Supported client platforms
|
||||
The shared printer SHALL be usable from macOS, iOS/iPadOS, Linux and Windows.
|
||||
|
||||
#### Scenario: macOS and iOS/iPadOS
|
||||
- **WHEN** a macOS or iOS/iPadOS client prints via AirPrint
|
||||
- **THEN** the job is converted to PostScript and printed
|
||||
|
||||
#### Scenario: Linux
|
||||
- **WHEN** a Linux client prints over IPP
|
||||
- **THEN** the job is converted to PostScript and printed
|
||||
|
||||
#### Scenario: Windows
|
||||
- **WHEN** a Windows client prints
|
||||
- **THEN** it uses a client-side BR-Script3 driver against the printer or the shared queue
|
||||
|
||||
### Requirement: Runtime configuration is exposed
|
||||
The container SHALL expose CUPS on port 631 and mDNS on UDP port 5353.
|
||||
@@ -50,13 +100,6 @@ The container SHALL expose CUPS on port 631 and mDNS on UDP port 5353.
|
||||
- **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.
|
||||
|
||||
@@ -66,7 +109,7 @@ The container SHALL accept the network printer address and the advertised printe
|
||||
|
||||
#### 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)
|
||||
- **THEN** the device URI uses that protocol (socket, lpd or ipp), defaulting to socket
|
||||
|
||||
#### Scenario: Full URI override
|
||||
- **WHEN** `PRINTER_URI` is set
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user