The package "univention-printserver" brings a template "/etc/univention/templates/files/etc/cups/cupsd.conf.d/01cupsd-base" which is not Python3 compatible. Therefore the upgrade fails. ------------------ The system can not be updated to UCS 5.0 due to the following reasons: python_ucr_template_compatibility: The following UCR templates are not compatible with Python 3: /etc/univention/templates/files/etc/cups/cupsd.conf.d/01cupsd-base (package: univention-printserver) See <https://help.univention.com/t/17948> for information on how to proceed with each template. /etc/univention/templates/files/etc/samba/base.conf (package: univention-samba) See <https://help.univention.com/t/17948> for information on how to proceed with each template. --------------------- These adjustments had to be made in two files, otherwise CUPS does not print properly: ------------------------ /etc/univention/templates/files/etc/cups/cupsd.conf.d/01cups-base PreserveJobFiles Yes MaxJobs 0 /etc/univention/templates/files/etc/samba/base.conf [printers] comment = Drucker browseable = no path = /tmp printable = yes public = no writable = no create mode = 0700 # use client driver = true # lpq command = lpstat -o %p # lprm command = cancel %p-%j # using windows printer drivers # print command = lpr -P %p -o raw %s -r print command = /opt/papercut/providers/print/linux-x64/samba-print-provider -u "%u" -J "%J" -h "%h" -m "%m" -p "%p" -s "%s" -a "lp -c -d%p %s; rm %s" & #print command = /opt/papercut/providers/print/linux-x64/samba-print-provider -u "%u" -J "%J" -h "%h" -m "%m" -p "%p" -s "%s" -a "lpr -r -o raw -P%p %s" & # using cups drivers (PostScript on Windows) # print command = lpr -P %p %s -------------------- There are no UCR variables for all the changes, so these changes had to be made manually. Could UCR variables be created for this?
/etc/univention/templates/files/etc/cups/cupsd.conf.d/01cupsd-base was migrated by Bug #52814 git:ef2b987b3ecea1d48577966fb7070c42b02ac704 years ago (UCS 4.4-7). Did you check "univention-check-templates" if it's really the original version and not overwritten?
Well, the 01cupsd-base file was migrated but since we've had to insert changes into it (as Christina oulined) the update process in 4.4-7 put a separate dpkg-dist file on the disk. We adopted the changes and the upgrade to 5.0-3 worked as expected after that. I would appreceate three additional UCR variables for the changes in 01cupsd-base as well as samba/base.conf that we don't have to change the templates again.
Ok, trying to re-structure this bug to make it tractable: For the adjustment to cupsd.conf I found the option of Bug #19552: ========================================== root@ucs# cat >> /etc/cups/cupsd.local.conf <<%EOF PreserveJobFiles Yes MaxJobs 0 %EOF root@ucs# ucr set cups/include/local=yes root@ucs# /etc/init.d/cups restart ========================================== Does that cover the requested configurability for cupsd.conf ?
For the second part of adjusting the "print command" in /etc/samba/base.conf the UCR template for smb.conf gives us this option to extend/adjust/override settings in arbitrary configuration sections: ========================================== cat >> /etc/samba/local.conf <<%EOF [printers] print command = /opt/papercut/providers/print/linux-x64/samba-print-provider -u "%u" -J "%J" -h "%h" -m "%m" -p "%p" -s "%s" -a "lp -c -d%p %s; rm %s" & %EOF ucr commit /etc/samba/smb.conf testparm -sv | less ## check # /etc/init.d/samba restart ## uncomment if changes should become active ==========================================
The customer now used the local.conf and it worked fine. There is no need for ucr variables.