Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions .codacy.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .lgtm.yml

This file was deleted.

376 changes: 272 additions & 104 deletions CHANGES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ the Apache License, Version 2.0 with exceptions to allow linking to GPL2/LGPL2
code.

Contributions should be submitted either as pull requests or as attachments
(unified diffs) to bug reports on the OpenPrinting CUPS Github project at
(unified diffs) to bug reports on the OpenPrinting CUPS GitHub project at
<https://github.com/openprinting/cups>.
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ to thank the following individuals for their contributions:
fixes.
Bjoern Jacke - I18N stuff.
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Roderick Johnstone - Beta tester of the millennium.
Till Kamppeter - Bug fixes, beta testing, evangelism.
Tomohiro Kato - Japanese localization.
Kiko - Bug fixes.
Expand Down
14 changes: 12 additions & 2 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ Manual, which is generated using the [codedoc](https://www.msweet.org/codedoc)
software.


### Copyright notice

If there are changes for a file, which contains copyright notice already
and the notice is not updated for the current year, update the year of copyright
notice to include the current year.

Only the following files must have copyright notice updated every year: README.md,
NOTICE, index.html.in, and header.html.in.


### Source Files

All source files names must consist of lowercase ASCII letters, numbers, dash
Expand All @@ -137,7 +147,7 @@ the source file and the copyright and licensing notice:
/*
* Description of file contents.
*
* Copyright © 2021-2022 by OpenPrinting
* Copyright © 2021-2023 by OpenPrinting
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
Expand Down Expand Up @@ -379,7 +389,7 @@ of the file, and CUPS copyright and license notice:
#
# Makefile for ...
#
# Copyright © 2021-2022 by OpenPrinting
# Copyright © 2021-2023 by OpenPrinting
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
Expand Down
6 changes: 6 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ prerequisites:
libsystemd-dev libusb-1.0-0-dev zlib1g-dev


For Fedora you can install these packages:

sudo dnf install autoconf make automake gcc gcc-c++ krb5-devel avahi-devel \
gnutls-devel krb5-libs nss-mdns pam-devel \
systemd-devel libusb1-devel zlib-devel

Configuration
-------------

Expand Down
6 changes: 1 addition & 5 deletions Makedefs.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Common makefile definitions for CUPS.
#
# Copyright © 2021 by OpenPrinting.
# Copyright © 2020-2025 by OpenPrinting.
# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2007 by Easy Software Products, all rights reserved.
#
Expand Down Expand Up @@ -77,8 +77,6 @@ CUPS_LOG_FILE_PERM = @CUPS_LOG_FILE_PERM@
#

LANGUAGES = @LANGUAGES@
INSTALL_LANGUAGES = @INSTALL_LANGUAGES@
UNINSTALL_LANGUAGES = @UNINSTALL_LANGUAGES@

#
# Cross-compilation support: "local" target is used for any tools that are
Expand Down Expand Up @@ -223,7 +221,6 @@ top_srcdir = @top_srcdir@
BUILDROOT = $(DSTROOT)$(DESTDIR)

BINDIR = $(BUILDROOT)@bindir@
BUNDLEDIR = @CUPS_BUNDLEDIR@
CACHEDIR = $(BUILDROOT)@CUPS_CACHEDIR@
DATADIR = $(BUILDROOT)@CUPS_DATADIR@
DOCDIR = $(BUILDROOT)@CUPS_DOCROOT@
Expand All @@ -239,7 +236,6 @@ RCLEVELS = @RCLEVELS@
RCSTART = @RCSTART@
RCSTOP = @RCSTOP@
REQUESTS = $(BUILDROOT)@CUPS_REQUESTS@
RESOURCEDIR = @CUPS_RESOURCEDIR@
SBINDIR = $(BUILDROOT)@sbindir@
SERVERBIN = $(BUILDROOT)@CUPS_SERVERBIN@
SERVERROOT = $(BUILDROOT)@CUPS_SERVERROOT@
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Top-level Makefile for CUPS.
#
# Copyright © 2020-2022 by OpenPrinting
# Copyright © 2020-2023 by OpenPrinting
# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2007 by Easy Software Products, all rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CUPS

Copyright © 2020-2022 by OpenPrinting
Copyright © 2020-2025 by OpenPrinting
Copyright © 2007-2019 by Apple Inc.
Copyright © 1997-2007 by Easy Software Products.

Expand Down
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
OpenPrinting CUPS v2.4.2
========================
OpenPrinting CUPS v2.4.16
=========================

![Version](https://img.shields.io/github/v/release/openprinting/cups?include_prereleases)
![Apache 2.0](https://img.shields.io/github/license/openprinting/cups)
[![Build and Test](https://github.com/OpenPrinting/cups/workflows/Build%20and%20Test/badge.svg)](https://github.com/OpenPrinting/cups/actions/workflows/build.yml)
[![Coverity Scan](https://img.shields.io/coverity/scan/23806)](https://scan.coverity.com/projects/openprinting-cups)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4ea68dc02692436b82541b6f232eba66)](https://www.codacy.com/gh/OpenPrinting/cups/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OpenPrinting/cups&amp;utm_campaign=Badge_Grade)
[![LGTM Grade](https://img.shields.io/lgtm/grade/cpp/github/OpenPrinting/cups)](https://lgtm.com/projects/g/OpenPrinting/cups/?mode=list)


Introduction
Expand Down Expand Up @@ -51,6 +49,7 @@ the CUPS sources:
- `LICENSE`: The CUPS license agreement (Apache 2.0).
- `NOTICE`: Copyright notices and exceptions to the CUPS license agreement.
- `README.md`: This file.
- `REPORTING_ISSUES.md`: Instructions what information to provide when reporting an issue.

Once you have installed the software you can access the documentation (and a
bunch of other stuff) online at <http://localhost:631/> and using the `man`
Expand All @@ -62,15 +61,6 @@ the `doc/help` and `man` directories.
*Please read the documentation before asking questions.*


Getting Support and Other Resources
-----------------------------------

In addition to the OpenPrinting CUPS home page at
<https://openprinting.github.io/cups>, we provide a mailing list for CUPS users
and developers to ask questions and discuss issues at
<https://linuxfoundation.groups.io/g/printing>.


Setting Up Printers
-------------------

Expand Down Expand Up @@ -163,7 +153,7 @@ This will prevent the filters from misinterpreting your print file.
Legal Stuff
-----------

Copyright © 2020-2022 by OpenPrinting
Copyright © 2020-2025 by OpenPrinting

Copyright © 2007-2020 by Apple Inc.

Expand Down
176 changes: 176 additions & 0 deletions REPORTING_ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# REPORTING ISSUES FOR CUPS PROJECT

> Disclaimer: We provide only best effort support for CUPS releases older than the latest release. This means we try to reproduce the issue on the latest release if it is possible, and if we can't reproduce, we can give a hint what can be the problem and ask you to contact your distribution support.

> All commands are written from point of view of user which has superuser rights (f.e. he is in `wheel` on Linux system) or he is in a group defined in SystemGroup directive in `/etc/cups/cups-files.conf`. Other users will have to use `sudo` with certain commands.

The steps you are asked to do differ based on how your printer is connected (USB/network) and whether you use driverless printing or not. Since the connection is obvious for the user, the paragraph below will tell you how to find out whether driverless printing is used.


## HOW TO FIND OUT THAT I USE DRIVERLESS PRINTING

For network printers:
* your printer is seen by `lpstat -e`, but not by `lpstat -a` - this means you print via temporary queue, which works only via driverless means,

or

* your printer is seen by `lpstat -a`, its PPD file at `/etc/cups/ppd` has `IPP Everywhere` or `driverless` in its `Nickname` entry and its connection is `ipp` or `ipps` when you check the connection uri (f.e. by `lpstat -v <printer_name>`)

If any of them apply, your device works in driverless mode.

For USB printers:
* your printer is listed if you enter:

```
$ sudo ipp-usb check
```

in case the printer is not listed or the command is not found, your device doesn't work in driverless mode.


## HOW TO REPORT THE ISSUE TO CUPS PROJECT

Please do the steps below and provide the mentioned information (**use attachments for blocks of text longer than 10 lines** - put the text into a file, rename it to have .txt suffix and click on `pasting them` string under comment box in the issue) in your initial comment if you file an issue:

1. tell us what is **your OS**
2. tell us your **CUPS version**
3. in case you compile CUPS by yourself, tell us **all configuration options** you pass into `./configure`
4. **describe** the problem
5. mention your **printer model**
6. try to **narrow the issue if possible**:

1. check how the printing works via CUPS CLI tools, f.e.:

See whether the printer is available (f.e. in case the printer is not shown in application) - shows both temporary and permanent queues:

```
$ lpstat -e
HP_LaserJet_M1536dnf_MFP_42307C
```

See whether there are installed printers which accept jobs:

```
$ lpstat -a
```

See its available options (in case an application doesn't show some options):

```
$ lpoptions -p HP_LaserJet_M1536dnf_MFP_42307C -l
PageSize/Media Size: 184x260mm 195x270mm *A4 A5 B5 DoublePostcardRotated Env10 EnvC5 EnvDL EnvMonarch Executive FanFoldGermanLegal ISOB5 Legal Letter Postcard roc16k
MediaType/Media Type: *Stationery StationeryLightweight Midweight StationeryHeavyweight ExtraHeavy ColorTransparency Labels StationeryLetterhead Envelope StationeryPreprinted StationeryPrepunched Color Bond Recycled Rough Vellum
cupsPrintQuality/cupsPrintQuality: Draft *Normal
ColorModel/Output Mode: *Gray
Duplex/Duplex: *None DuplexNoTumble DuplexTumble
OutputBin/OutputBin: *FaceDown
```

Print a file to a printer with specific options (in case the printout from application is incorrect - print the same file and set the same options as you did in application, in case they are seen in `lpoptions`), f.e. to check duplex printing on a document you want to print (put the path to the document instead of <document>):

```
$ lp -d HP_LaserJet_M1536dnf_MFP_42307C -o Duplex=DuplexNoTumble <document>
```

For more info check `man lp`, `man lpstat`, `man lpoptions`.

2. check if the issue happens with different documents
3. check if the issue happens when using different applications
4. in case you use mDNS hostnames (hostnames with `.local`), check mDNS resolution by pinging such hostname - mDNS is used for temporary queues (printers which are seen by `lpstat -e`, but not by `lpstat -a`) or for permanent queues which have `.local` in its URI (check `lpstat -a`). However the hostname from URI is not resolvable as it is, you need to get usual printer's mDNS hostname from `hostname` entry in `avahi-browse -avrt` output.

Rule of thumb:
1. in case printing works from CUPS CLI tools or CUPS Web UI, but not via an application, file the issue to the application for the initial investigation.
2. in case mDNS resolution doesn't work and you use driverless printing or mDNS hostnames in CUPS, file the issue to your mDNS resolution provider - it can be `nss-mdns` or `systemd-resolved` depending on your configuration.

7. turn on **CUPS debug logging**:

```
$ cupsctl LogLevel=debug2
```

8. **reproduce the issue**
9. **collect the logs** - the logs can be in `/var/log/cups/error_log` or in `journalctl`:

For `error_log`:
```
$ sudo cp /var/log/cups/error_log ~/error_log.txt
$ sudo chmod 666 ~/error_log.txt
```

For `journalctl`:
```
$ journalctl -u cups --since=today > log.txt
```

and attach the file to the GitHub issue.

10. provide output of **lpstat -e**, **lpstat -t** and **lpinfo -v**
11. provide **PPD file** from `/etc/cups/ppd` if exists for the printer
12. provide **the file you are trying to print**, if the issue happens with a specific file
13. provide **the d file from /var/spool/cups** - this is the file CUPS actually gets from the application
14. tell us the name of application where you experience the problem
15. if needed, turn off the debug logging by:

```
$ cupsctl LogLevel=warn
```

### INFORMATION REQUESTED FOR USB DEVICES

* attach **output of `lsusb -v`** in a file as attachment
* in case of **communication issues with USB device**, it is helpful to **capture USB communication** - you have to know bus number where your device is connected to with `tcpdump`:

```
$ lsusb
Bus 002 Device 010: ID 03f0:012a HP, Inc HP LaserJet M1536dnf MFP
=
$ sudo tcpdump -s0 -w usb.pcap -i usbmon2
```
compress the `usb.pcap` with `zip` and attach it to the issue if the problem is with USB printer.

#### INFORMATION REQUESTED FOR DRIVERLESS USB PRINTERS

* **provide the file attr.log** from `ipptool` command if the command passes:

```
$ ipptool --ippserver attr.log -v ipp://localhost:60000/ipp/print get-printer-attributes.test
```

* compress **/var/log/ipp-usb** directory into `.zip` file and attach it to the issue


### INFORMATION REQUESTED FOR NETWORK DEVICES

* **provide network.pcap.zip** which is network packet capture - **catch the network traffic** f.e. with tcpdump:

```
$ sudo tcpdump -s0 -w network.pcap -i any host <server_or_printer_IP>
```

compress the `network.pcap` with `zip` and attach it to the issue.

The communication can be encrypted - the person who investigates the issue can contact you off-issue for further data, because session keys will be needed as it is explained at [Wireshark wiki](https://wiki.wireshark.org/TLS) and a change in CUPS configuration (Wireshark is not able to decode IPPS directly, so the printer's connection has to be via HTTPS, which Wireshark can decrypt correctly).

#### INFORMATION REQUESTED FOR DRIVERLESS NETWORK PRINTERS

* **provide the file attr.log** from `ipptool` command, if the command passes:

For network driverless printer:
```
$ ipptool --ippserver attr.log -v ipp://<printer_IP>/ipp/print get-printer-attributes.test
```

For driverless printer pointing to a printer at CUPS server:
```
$ ipptool --ippserver attr.log -v ipp://<server_IP>/printers/<remote_printer_name> get-printer-attributes.test
```

For driverless printer installed in a printer application based on PAPPL:
```
$ ipptool --ippserver attr.log -v ipp://localhost:8000/ipp/print/<printer_name> get-printer-attributes.test
```


## THANKS

This document uses knowledge from documentation and tips written by Till Kamppeter, Brian Potkin, Mike R. Sweet, Johannes Meixner, Tim Waugh, Jiri Popelka and Zdenek Dohnal. Thank you for all your work!
Loading
Loading