Rose [Tue, 8 Nov 2022 16:52:46 +0000 (11:52 -0500)]
Update regex to the modified rxspenser repo
This repo was linked in the original repo as a newer version, with the current version being the original version that abandoned development 8 years ago.
Nothing has been changed outside of that source, which is from upstream.
Benjamin Gordon [Wed, 19 Oct 2022 03:19:30 +0000 (21:19 -0600)]
Add missing registered media sizes to PWG mapping table
A number of sizes that were added to ipp-registrations.xml after the
initial PWG 5101.1-2002 document are not currently mapped. When these
sizes are mapped through a generated IPP Everywhere PPD and back to IPP
media size names, they get changed into auto-generated self-describing
names instead of the official registered names.
This change adds all the non-duplicate missing names. Most of them
don't have official MediaOptions keywords, so the PPD names are mapped
to dimensions. With the updated mapping table, all of these sizes can
roundtrip correctly.
This also fixes a missing unit and an incorrect name in two existing
mappings for oe photo sizes.
These entries were not added due to being duplicates of existing sizes:
scheduler: Protect MimeDatabase from parallel access (fixes #466)
If multiple create_local_bg_thread threads are spawned, they can fight
over MimeDatabase (specifically over MimeDatabase->srcs array), ending
up in SIGSEGV if one thread uses the array, but the other deletes it.
I chose to use RW locks for protecting the pointer - IMHO we benefit
from multiple threads being able to read in parallel.
If a client uses PPD option ColorModel (which is converted into
attribute to be sent via IPP) for changing the default color option
(which happens via CUPS-Add-Modify-Printer operation), we have to
convert ColorModel into print-color-mode attribute, so the
print-color-mode-default attribute gets updated.
The change survives reboot because print-color-mode is saved as an
option in printer's entry in /etc/cups/printers.conf.
Zdenek Dohnal [Mon, 15 Aug 2022 14:04:50 +0000 (16:04 +0200)]
cups/dest.c: Look for default printer on network as well
The current code of `cupsGetNamedDest()` doesn't look up on network for
a default printer. The result is a temporary queue cannot be set as a
default printer.
Some PPD files are larger than the current limit and they don't reside
in directories handled by `cups-driverd`, so users have to add them via
Web UI. The limit is now 2 MiB, the same as in PAPPL.
Tyson Tan [Sat, 16 Jul 2022 14:22:13 +0000 (22:22 +0800)]
Corrected Simplified Chinese translations of page sizes and others
Corrected Simplified Chinese translations of page sizes and envelope sizes to match standards and reflect the original meanings. Corrected duplex translations. Replaced full-width brackets with half-width ones, which is the preferred practice of Chinese translation for FOSS projects.
Zdenek Dohnal [Wed, 22 Jun 2022 07:23:45 +0000 (09:23 +0200)]
scheduler/ipp.c: Allocate device_uri via cupsdSetString()
If a driverless printer has .local in its URI, we resolve the
URI and save the resolved one as new device URI. The problem was that
a local pointer was assigned to the structure which is passed to the
function as parameter, so the pointer became invalid once the execution
left the create_local_bg_thread() function.
We need to allocate the device URI via cupsdSetString() - the string is
then freed when the printer is deleted or cupsd shuts down.
Zdenek Dohnal [Mon, 20 Jun 2022 16:17:58 +0000 (18:17 +0200)]
Don't override color settings from print dialog
When we put print-color-mode as a default attribute, it always overrides
settings from print dialog. We need to respect those settings and transform
the known PPD options into print-color-mode options.
Till Kamppeter [Fri, 10 Jun 2022 19:19:29 +0000 (21:19 +0200)]
create_local_printer(): Improved comparison of device URI host name
Improved the comparison of the device URI host name with the CUPS
server's host name to find out whether the temporary queue is for a
local IPP service.
- Compare case-insensitively as host names are case-insensitive
- If we have the DNS-SD host name (DNSSDHostName) of the CUPS server,
consider names equal if they only differ by the presence or absense
of a trailing dot ('.')
- If we only have the ServerName (for example with "Browsing = Off",
not sharing printers), consider also a server name without ".local"
equal to a device URI host name with ".local" as equal.