[SOLVED] printer-driver-cups-pdf in Bookworm
Posted: 2023-06-12 03:35
I upgraded (yes it is an upgrade, not and update!) from Bullseye to Bookworm last night. It went very smoothly, no issues at all. After most major dist-upgrades, typically I'll have to mess with cups-pdf to work "my way". Two of those things being, 1) pre-fixing the job ID, 2) Change the output directory from the default {HOME}/PDF/ to {HOME}/Documents/cups-pdf.
I had been able accomplish this by editing edit /etc/cups/cups.conf and changing the label option from 0 to 1, and modify the output path. It appears now that due to apparmor, cups.conf and apparmor profile both need to be edited.
From the Bookworm package page
https://packages.debian.org/bookworm/pr ... r-cups-pdf
Documents are written to a configurable directory (by default to ~/PDF) or can be further manipulated by a post-processing command.
Note that AppArmor prevents outputting PDF documents to non-default directories so </etc/apparmor.d/usr.sbin.cupsd> must also be edited, whenever the above default get changed in </etc/cups/cups-pdf.conf>.
/etc/apparmor.d/usr.sbin.cupsd doesn't exist, do I need to create it? The statement "must also be edited" implies it is created during apt-get install of the package. However, usr.sbin.cupsd.dpkg-dist does exist.
The last section of this file has
# allow read and write on almost anything in @{HOME} (lenient, but
# private-files-strict is in effect), to support customized "Out"
# setting in cups-pdf.conf (Debian#940578)
#include <abstractions/private-files-strict>
@{HOME}/[^.]*/{,**/} rw,
@{HOME}/[^.]*/** rw,
Which my understanding is that no modification to usr.sbin.cupsd.dpkg-dist is necessary.
So I'm a bit confused what needs editing in order to accomplish my two "tweaks" to customize the output path and filename format.
Rich
I had been able accomplish this by editing edit /etc/cups/cups.conf and changing the label option from 0 to 1, and modify the output path. It appears now that due to apparmor, cups.conf and apparmor profile both need to be edited.
From the Bookworm package page
https://packages.debian.org/bookworm/pr ... r-cups-pdf
Documents are written to a configurable directory (by default to ~/PDF) or can be further manipulated by a post-processing command.
Note that AppArmor prevents outputting PDF documents to non-default directories so </etc/apparmor.d/usr.sbin.cupsd> must also be edited, whenever the above default get changed in </etc/cups/cups-pdf.conf>.
/etc/apparmor.d/usr.sbin.cupsd doesn't exist, do I need to create it? The statement "must also be edited" implies it is created during apt-get install of the package. However, usr.sbin.cupsd.dpkg-dist does exist.
The last section of this file has
# allow read and write on almost anything in @{HOME} (lenient, but
# private-files-strict is in effect), to support customized "Out"
# setting in cups-pdf.conf (Debian#940578)
#include <abstractions/private-files-strict>
@{HOME}/[^.]*/{,**/} rw,
@{HOME}/[^.]*/** rw,
Which my understanding is that no modification to usr.sbin.cupsd.dpkg-dist is necessary.
So I'm a bit confused what needs editing in order to accomplish my two "tweaks" to customize the output path and filename format.
Rich