public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pappl-retrofit] f43: 1.0b3 (fedora#2571734)
@ 2026-11-12 15:26 Zdenek Dohnal
0 siblings, 0 replies; only message in thread
From: Zdenek Dohnal @ 2026-11-12 15:26 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/pappl-retrofit
Branch : f43
Commit : ef90a878c7652a9db5ef5373f194ddcf20f330c3
Author : Zdenek Dohnal <zdohnal@redhat.com>
Date : 2026-11-12T14:52:05+01:00
Stats : +197/-841 in 17 file(s)
URL : https://src.fedoraproject.org/rpms/pappl-retrofit/c/ef90a878c7652a9db5ef5373f194ddcf20f330c3?branch=f43
Log:
1.0b3 (fedora#2571734)
---
diff --git a/0001-Add-PAPPL-1.4.x-compatibility-shims.patch b/0001-Add-PAPPL-1.4.x-compatibility-shims.patch
deleted file mode 100644
index 0a4a692..0000000
--- a/0001-Add-PAPPL-1.4.x-compatibility-shims.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/pappl-retrofit/pappl-retrofit-private.h b/pappl-retrofit/pappl-retrofit-private.h
-index efa8311..a88ef82 100644
---- a/pappl-retrofit/pappl-retrofit-private.h
-+++ b/pappl-retrofit/pappl-retrofit-private.h
-@@ -29,6 +29,17 @@
- #include <pappl/pappl.h>
- #include <ppd/ppd.h>
- #include <cupsfilters/ieee1284.h>
-+
-+//
-+// PAPPL 1.4.x compatibility shims: the single-document job accessors
-+// became document-indexed in PAPPL 2.x; map them back onto the
-+// PAPPL 1.4.x single-document accessors.
-+//
-+
-+#ifndef papplJobGetDocumentFilename
-+# define papplJobGetDocumentFilename(job, doc) papplJobGetFilename(job)
-+#endif
-+
- #include <cups/cups.h>
- #include <cups/dir.h>
- #include <cups/sidechannel.h>
diff --git a/0001-Added-man-page-for-the-Legacy-Printer-Application.patch b/0001-Added-man-page-for-the-Legacy-Printer-Application.patch
deleted file mode 100644
index 9b081f6..0000000
--- a/0001-Added-man-page-for-the-Legacy-Printer-Application.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 33be36f28f1be2870594c7aa5bcdf3fc42a186ca Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Thu, 17 Aug 2023 23:57:43 +0200
-Subject: [PATCH] Added man page for the Legacy Printer Application
-
-As the Legacy Printer Application is a useful utility for end users,
-allowing them to continue using proprietary CUPS drivers for their
-legacy printers after updating to CUPS 3.x or to the CUPS Snap, we add
-a man page for it now, as we have already man pages for the other
-Printer Applications: PostScript, Ghostscript, HPLIP, and Gutenprint
-Printer Application.
----
- Makefile.am | 13 +++++
- legacy/legacy-printer-app.1 | 112 ++++++++++++++++++++++++++++++++++++
- 2 files changed, 125 insertions(+)
- create mode 100644 legacy/legacy-printer-app.1
-
-diff --git a/Makefile.am b/Makefile.am
-index 76008e5..e127c85 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -82,6 +82,19 @@ legacy_printer_app_CFLAGS = \
- EXTRA_DIST += \
- legacy/legacy-printer-app.service
-
-+# =========
-+# Man pages
-+# =========
-+
-+man_MANS =
-+
-+legacy_printer_app_manpages = \
-+ legacy/legacy-printer-app.1
-+man_MANS += $(legacy_printer_app_manpages)
-+
-+EXTRA_DIST += \
-+ $(legacy_printer_app_manpages)
-+
- # ===========
- # Directories
- # ===========
-diff --git a/legacy/legacy-printer-app.1 b/legacy/legacy-printer-app.1
-new file mode 100644
-index 0000000..d45e9df
---- /dev/null
-+++ b/legacy/legacy-printer-app.1
-@@ -0,0 +1,112 @@
-+.\"
-+.\" Legacy Printer Application man page
-+.\"
-+.\" Copyright © 2020 by Till Kamppeter
-+.\" Copyright © 2020 by Michael R Sweet
-+.\"
-+.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
-+.\" information.
-+.\"
-+.TH legacy-printer-app 1 "legacy-printer-app" "2023-08-17" "OpenPrinting"
-+.SH NAME
-+legacy-printer-app \- Legacy Printer Application
-+.SH SYNOPSIS
-+.B legacy-printer-app
-+[
-+.I SUB-COMMAND
-+] [ OPTIONS ] [ FILES ]
-+.SH DESCRIPTION
-+.B legacy-printer-app
-+is a Printer Application that can be run standalone or as a dedicated IPP Everywhere network service.
-+.B legacy-printer-app
-+maps arbitrary classic CUPS drivers to the Printer Application format. If on a system there is no classic installation (DEB, RPM, ... packages, installation from source) of CUPS 2.x or older, but instead, CUPS 3.x or newer is used and/or the CUPS Snap, claasic CUPS drivers are not supported any more and printer drivers can only be provided by means of Printer Applications.
-+.B legacy-printer-app
-+finds classic CUPS drivers in the locations where they are usually installed for being found by the distribution's classic CUPS 2.x installation, typically filters in /usr/lib/cups/filter, backends in /usr/lib/cups/backend, PPD files (and files generating PPDs) in /usr/share/ppd, /usr/share/cups/model/, /usr/share/cups/drv, and /usr/lib/cups/driver. When opening the Printer Application's web interface (http://localhost:8000/, http://localhost:8001/, ...) and clicking "Add Printer" printers are discovered and available classic drivers offered. Once setting up a printer it gets available as an emulation of a driverless IPP printer and the Printer Application uses the classically installed driver. A classic installation of CUPS or any general CUPS filters (cups-filters package) is not needed.
-+
-+This way classic CUPS drivers for which no equivalent Printer Application is available, especially manufacturer-supplied proprietary drivers for legacy printers, can be continued to be used with CUPS 3.x or the CUPS Snap.
-+
-+.SH SUB-COMMANDS
-+If no sub-command is specified, "submit" is assumed.
-+
-+The following sub-commands are recognized by
-+.B legacy-printer-app:
-+.TP 5
-+add
-+Add a printer queue.
-+.TP 5
-+cancel
-+Cancel one or more print jobs.
-+.TP 5
-+default
-+Get/Set the default printer queue.
-+.TP 5
-+delete
-+Delete a printer queue.
-+.TP 5
-+devices
-+List connected printers.
-+.TP 5
-+drivers
-+List the supported drivers.
-+.TP 5
-+jobs
-+List pending print jobs.
-+.TP 5
-+modify
-+Modify a printer queue.
-+.TP 5
-+options
-+List supported options.
-+.TP 5
-+printers
-+List the printer queues.
-+.TP 5
-+server
-+Start a server.
-+.TP 5
-+shutdown
-+Shutdown a running server.
-+.TP 5
-+status
-+Show the status of a printer or all printers.
-+.TP 5
-+submit
-+Submit a file for printing.
-+.SH OPTIONS
-+The following options are recognized by
-+.B legacy-printer-app:
-+.TP 5
-+-a
-+Cancel all jobs.
-+.TP 5
-+-d PRINTER
-+Specify printer.
-+.TP 5
-+-h HOST
-+Specify hostname.
-+.TP 5
-+-j JOB-ID
-+Specify job ID.
-+.TP 5
-+-m DRIVER-NAME
-+Specify driver.
-+.TP 5
-+-n COPIES
-+Specify number of copies.
-+.TP 5
-+-o NAME=VALUE
-+Specify option.
-+.TP 5
-+-t TITLE
-+Specify job title.
-+.TP 5
-+-u URI
-+Specify ipp: or ipps: printer/server.
-+.TP 5
-+-v DEVICE-URI
-+Specify socket: or usb: device.
-+.SH SEE ALSO
-+https://github.com/OpenPrinting/pappl-retrofit
-+.SH COPYRIGHT
-+Copyright \[co] 2020 by Till Kamppeter.
-+Copyright \[co] 2020 by Michael R Sweet.
---
-2.43.0
-
diff --git a/0001-Fix-buffer-length-comparison.patch b/0001-Fix-buffer-length-comparison.patch
new file mode 100644
index 0000000..ef6a7db
--- /dev/null
+++ b/0001-Fix-buffer-length-comparison.patch
@@ -0,0 +1,27 @@
+From 1b622728953105d4e86fe781c70e34a125fa0054 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 12 Nov 2026 09:43:04 +0100
+Subject: [PATCH 1/3] Fix buffer length comparison
+
+Previously the memory size of pointer was used instead of size of buffer
+the pointer points to.
+---
+ pappl-retrofit/cups-side-back-channel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pappl-retrofit/cups-side-back-channel.c b/pappl-retrofit/cups-side-back-channel.c
+index 1004ee3..2c3fd1e 100644
+--- a/pappl-retrofit/cups-side-back-channel.c
++++ b/pappl-retrofit/cups-side-back-channel.c
+@@ -621,7 +621,7 @@ _prSideChannelSNMPWalk(
+ return (_PR_SC_STATUS_OK);
+ }
+
+- if ((size_t)real_datalen < sizeof(real_data))
++ if ((size_t)real_datalen < _PR_SC_MAX_BUFFER)
+ real_data[real_datalen] = '\0';
+
+ real_oidlen = strlen(real_data) + 1;
+--
+2.56.0
+
diff --git a/0001-Fix-memory-leaks-from-compiled_re_list.patch b/0001-Fix-memory-leaks-from-compiled_re_list.patch
deleted file mode 100644
index 04edc65..0000000
--- a/0001-Fix-memory-leaks-from-compiled_re_list.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/pappl-retrofit/pappl-retrofit.c b/pappl-retrofit/pappl-retrofit.c
-index 8e272d3..386fede 100644
---- a/pappl-retrofit/pappl-retrofit.c
-+++ b/pappl-retrofit/pappl-retrofit.c
-@@ -253,7 +253,10 @@ prBestMatchingPPD(const char *device_id, // I - IEEE-1284 device ID
- {
- for (re = (regex_t *)cupsArrayFirst(compiled_re_list);
- re; re = (regex_t *)cupsArrayNext(compiled_re_list))
-+ {
- regfree(re);
-+ free(re);
-+ }
- cupsArrayDelete(compiled_re_list);
- }
- }
diff --git a/0001-Fix-possible-unterminated-string.patch b/0001-Fix-possible-unterminated-string.patch
deleted file mode 100644
index 8048f88..0000000
--- a/0001-Fix-possible-unterminated-string.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a06689c14dbff46107aa9b1933ed3d9268cfc9c9 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 16 Dec 2024 14:38:08 +0100
-Subject: [PATCH] Fix possible unterminated string
-
-Although we terminate buf2 in libcupsfilters and make_model can't be
-1024 bytes long, using snprintf() fixes the coverity report and makes
-sure the buffer is terminated.
----
- pappl-retrofit/pappl-retrofit.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/pappl-retrofit/pappl-retrofit.c b/pappl-retrofit/pappl-retrofit.c
-index 7627164..b187bde 100644
---- a/pappl-retrofit/pappl-retrofit.c
-+++ b/pappl-retrofit/pappl-retrofit.c
-@@ -4054,9 +4054,7 @@ _prSetupDriverList(pr_printer_app_global_data_t *global_data)
- // word (cleaned manufacturer name or part of it) is the
- // same, we accept the data of the device ID as display
- // string.
-- strncpy(buf1,
-- (buf2[0] ? buf2 : ppd->record.make_and_model),
-- sizeof(buf1));
-+ snprintf(buf1, sizeof(buf1), "%s", buf2[0] ? buf2 : ppd->record.make_and_model);
- if ((ptr = strchr(buf1, ' ')) != NULL)
- *ptr = '\0';
- // Convert device ID to make/model string, so that we can add
---
-2.48.1
-
diff --git a/0001-Fix-potential-memory-leaks.patch b/0001-Fix-potential-memory-leaks.patch
deleted file mode 100644
index 6dc3435..0000000
--- a/0001-Fix-potential-memory-leaks.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 1477124fd2b94229fb3580dd74abaecf72095a5c Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Tue, 28 Jan 2025 16:41:28 +0100
-Subject: [PATCH] Fix potential memory leaks
-
----
- pappl-retrofit/pappl-retrofit.c | 10 +++++++---
- pappl-retrofit/print-job.c | 4 ++++
- pappl-retrofit/web-interface.c | 3 +++
- 3 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/pappl-retrofit/pappl-retrofit.c b/pappl-retrofit/pappl-retrofit.c
-index b187bde..98b8b56 100644
---- a/pappl-retrofit/pappl-retrofit.c
-+++ b/pappl-retrofit/pappl-retrofit.c
-@@ -157,7 +157,7 @@ prBestMatchingPPD(const char *device_id, // I - IEEE-1284 device ID
- {
- if (regcomp(re, regex, REG_ICASE | REG_EXTENDED | REG_NOSUB))
- {
-- regfree(re);
-+ free(re);
- papplLog(global_data->system, PAPPL_LOGLEVEL_ERROR,
- "Invalid regular expression: %s", regex);
- continue;
-@@ -334,7 +334,7 @@ prRegExMatchDevIDField(const char *device_id, // I - Device ID to search in
- // Compile the regular expression
- if (regcomp(re, value_regex, REG_ICASE | REG_EXTENDED | REG_NOSUB))
- {
-- regfree(re);
-+ free(re);
- ret = -3;
- goto out;
- }
-@@ -365,6 +365,7 @@ prRegExMatchDevIDField(const char *device_id, // I - Device ID to search in
- }
-
- regfree(re);
-+ free(re);
- }
- else
- ret = -5;
-@@ -3930,7 +3931,7 @@ _prSetupDriverList(pr_printer_app_global_data_t *global_data)
- if (regcomp(driver_re, global_data->config->driver_display_regex,
- REG_ICASE | REG_EXTENDED))
- {
-- regfree(driver_re);
-+ free(driver_re);
- driver_re = NULL;
- papplLog(system, PAPPL_LOGLEVEL_ERROR,
- "Invalid regular expression: %s",
-@@ -4230,7 +4231,10 @@ _prSetupDriverList(pr_printer_app_global_data_t *global_data)
-
- // Free the compiled regular expression
- if (driver_re)
-+ {
- regfree(driver_re);
-+ free(driver_re);
-+ }
-
- cupsArrayDelete(ppds);
-
-diff --git a/pappl-retrofit/print-job.c b/pappl-retrofit/print-job.c
-index 1fbd16f..3138590 100644
---- a/pappl-retrofit/print-job.c
-+++ b/pappl-retrofit/print-job.c
-@@ -996,6 +996,7 @@ _prFilter(
- {
- papplLogJob(job, PAPPL_LOGLEVEL_ERROR, "Unable to open input file '%s' for printing: %s",
- filename, strerror(errno));
-+ _prFreeJobData(job_data);
- return (false);
- }
-
-@@ -1033,6 +1034,8 @@ _prFilter(
- papplLogJob(job, PAPPL_LOGLEVEL_ERROR,
- "No pre-filter found for input format %s",
- informat);
-+ _prFreeJobData(job_data);
-+ close(fd);
- return (false);
- }
-
-@@ -1655,6 +1658,7 @@ _prRasterPrepareJob(
- "Unable to create pipe for filtering and sending off the job");
- if (strlen(job_data->stream_filter) > 1)
- free(ppd_filter_params);
-+ _prFreeJobData(job_data);
- return (NULL);
- }
-
-diff --git a/pappl-retrofit/web-interface.c b/pappl-retrofit/web-interface.c
-index 6935aa0..5afc99c 100644
---- a/pappl-retrofit/web-interface.c
-+++ b/pappl-retrofit/web-interface.c
-@@ -1294,6 +1294,9 @@ _prSystemWebAddPPD(
- // Flush remaining data...
- if (httpGetState(http) == initial_state)
- httpFlush(http);
-+
-+ if (fp)
-+ fclose(fp);
- }
-
- strbuf[0] = '\0';
---
-2.48.1
-
diff --git a/0001-Implement-prPrintFile-for-raw-printing.patch b/0001-Implement-prPrintFile-for-raw-printing.patch
deleted file mode 100644
index d1d957c..0000000
--- a/0001-Implement-prPrintFile-for-raw-printing.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-From 1626b338fc8b92a99c2c1a483ac39c739d71b305 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Wed, 10 Sep 2026 12:16:32 +0200
-Subject: [PATCH] Implement prPrintFile() for raw printing
-
-Implement new public function for raw printing, so all retrofitting
-printer application can use it.
-
-Fixes OpenPrinting/pappl-retrofit#41
-
-Upstream: https://github.com/OpenPrinting/pappl-retrofit/pull/58
----
- pappl-retrofit/pappl-retrofit.c | 2 +-
- pappl-retrofit/pappl-retrofit.h | 2 +
- pappl-retrofit/print-job.c | 208 +++++++++++++++++++++++++++++++
- 3 files changed, 211 insertions(+), 1 deletion(-)
-
-diff --git a/pappl-retrofit/pappl-retrofit.c b/pappl-retrofit/pappl-retrofit.c
-index 386fede..f14bb8c 100644
---- a/pappl-retrofit/pappl-retrofit.c
-+++ b/pappl-retrofit/pappl-retrofit.c
-@@ -1364,7 +1364,7 @@ _prDriverSetup(
- driver_data->identify_default = PAPPL_IDENTIFY_ACTIONS_SOUND;
- driver_data->identify_supported = PAPPL_IDENTIFY_ACTIONS_DISPLAY |
- PAPPL_IDENTIFY_ACTIONS_SOUND;
-- driver_data->printfile_cb = NULL;
-+ driver_data->printfile_cb = prPrintFile;
- driver_data->rendjob_cb = NULL;
- driver_data->rendpage_cb = NULL;
- driver_data->rstartjob_cb = NULL;
-diff --git a/pappl-retrofit/pappl-retrofit.h b/pappl-retrofit/pappl-retrofit.h
-index 9246935..d97fdcf 100644
---- a/pappl-retrofit/pappl-retrofit.h
-+++ b/pappl-retrofit/pappl-retrofit.h
-@@ -274,6 +274,8 @@ extern bool prPSRasterStartPage(pappl_job_t *job, pappl_pr_options_t *options,
- extern bool prPSRasterWriteLine(pappl_job_t *job, pappl_pr_options_t *options,
- pappl_device_t *device, unsigned y,
- const unsigned char *pixels);
-+extern bool prPrintFile(pappl_job_t *job, pappl_pr_options_t *options,
-+ pappl_device_t *device);
- extern void prSetupAddPPDFilesPage(void *data);
- extern void prSetupDeviceSettingsPage(pappl_printer_t *printer,
- void *data);
-diff --git a/pappl-retrofit/print-job.c b/pappl-retrofit/print-job.c
-index 466d9d3..0074c0e 100644
---- a/pappl-retrofit/print-job.c
-+++ b/pappl-retrofit/print-job.c
-@@ -1522,6 +1522,214 @@ _prPrintFilterFunction(int inputfd, // I - File descriptor input
- }
-
-
-+//
-+// 'prPrintFile()' - Print a raw file by passing it directly to
-+// the device without filtering. Used as the
-+// printfile_cb callback for PAPPL's raw print
-+// path when the job format matches the driver's
-+// native format.
-+//
-+
-+bool // O - `true` on success, `false` on failure
-+prPrintFile(
-+ pappl_job_t *job, // I - Job
-+ pappl_pr_options_t *options, // I - Job options
-+ pappl_device_t *device) // I - Output device
-+{
-+ int fd; // Input file descriptor
-+ ssize_t bytes; // Bytes read/written
-+ char buffer[65536]; // Read/write buffer
-+ pappl_printer_t *printer = NULL; // Printer
-+ pappl_pr_driver_data_t driver_data, // Driver data
-+ *ret_data = NULL; // Return data pointer
-+ pr_driver_extension_t *extension; // Driver extension data
-+ pr_printer_app_global_data_t *global_data; // Global data
-+ const char *device_uri; // Printer device URI
-+ pr_cups_device_data_t *device_data = NULL; // CUPS backend device data
-+ cf_filter_data_t *filter_data = NULL; // Filter data for CUPS backend
-+ char filename[2048]; // Debug copy file name
-+ int debug_fd = -1; // File descriptor for debug copy
-+ bool ret = true; // Return value
-+
-+
-+ (void)options;
-+
-+ if (!job || !device)
-+ return (false);
-+
-+ if ((printer = papplJobGetPrinter(job)) == NULL)
-+ return (false);
-+
-+ if ((ret_data = papplPrinterGetDriverData(printer, &driver_data)) == NULL)
-+ return (false);
-+
-+ extension = (pr_driver_extension_t *)driver_data.extension;
-+
-+ if (!extension || !extension->global_data)
-+ return (false);
-+
-+ global_data = extension->global_data;
-+
-+ if ((device_uri = papplPrinterGetDeviceURI(printer)) == NULL)
-+ return (false);
-+
-+ //
-+ // Connect filter_data to CUPS backend if using cups: device URI
-+ //
-+
-+ if (global_data->config && global_data->config->components & PR_COPTIONS_CUPS_BACKENDS &&
-+ strncmp(device_uri, "cups:", 5) == 0)
-+ {
-+ filter_data = (cf_filter_data_t *)calloc(1, sizeof(cf_filter_data_t));
-+
-+ if (!filter_data)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR, "Unable to allocate memory");
-+ return (false);
-+ }
-+
-+ filter_data->back_pipe[0] = -1;
-+ filter_data->back_pipe[1] = -1;
-+ filter_data->side_pipe[0] = -1;
-+ filter_data->side_pipe[1] = -1;
-+ filter_data->logfunc = _prJobLog;
-+ filter_data->logdata = job;
-+ filter_data->iscanceledfunc = _prJobIsCanceled;
-+ filter_data->iscanceleddata = job;
-+
-+ if (cfFilterOpenBackAndSidePipes(filter_data))
-+ {
-+ free(filter_data);
-+
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR, "Couldn't open side and back channels to the backend");
-+ return (false);
-+ }
-+
-+ if ((device_data = (pr_cups_device_data_t *)papplDeviceGetData(device)) == NULL)
-+ {
-+ cfFilterCloseBackAndSidePipes(filter_data);
-+ free(filter_data);
-+
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR, "No device data found");
-+ return (false);
-+ }
-+ else
-+ device_data->filter_data = filter_data;
-+ }
-+
-+ //
-+ // Update printer status
-+ //
-+
-+ _prUpdateStatus(printer, device);
-+
-+ //
-+ // Clean up old debug copies and open a new one if in debug mode
-+ //
-+
-+ _prCleanDebugCopies(global_data);
-+
-+ if (papplSystemGetLogLevel(global_data->system) == PAPPL_LOGLEVEL_DEBUG)
-+ {
-+ snprintf(filename, sizeof(filename), "%s/debug-jobdata-%s-%d.prn",
-+ global_data->spool_dir, papplPrinterGetName(printer),
-+ papplJobGetID(job));
-+ papplLogJob(job, PAPPL_LOGLEVEL_DEBUG,
-+ "Creating debug copy: %s", filename);
-+ debug_fd = open(filename, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
-+ }
-+
-+ //
-+ // Open the raw job file
-+ //
-+
-+ papplJobSetImpressions(job, 1);
-+
-+ if ((fd = open(papplJobGetDocumentFilename(job, 1), O_RDONLY)) < 0)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR,
-+ "Unable to open print file '%s': %s",
-+ papplJobGetDocumentFilename(job, 1), strerror(errno));
-+ ret = false;
-+ goto cleanup;
-+ }
-+
-+ //
-+ // Copy raw data to the device
-+ //
-+
-+ while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
-+ {
-+ if (debug_fd >= 0)
-+ {
-+ if (write(debug_fd, buffer, (size_t)bytes) != bytes)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_WARN,
-+ "Debug copy: Unable to write %d bytes, "
-+ "stopping debug copy, continuing job.",
-+ (int)bytes);
-+ close(debug_fd);
-+ debug_fd = -1;
-+ }
-+ }
-+
-+ if (papplDeviceWrite(device, buffer, (size_t)bytes) < 0)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR,
-+ "Unable to send %d bytes to printer.",
-+ (int)bytes);
-+ close(fd);
-+ ret = false;
-+ goto cleanup;
-+ }
-+ }
-+ close(fd);
-+
-+ if (bytes < 0)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_ERROR,
-+ "Unable to read print file: %s", strerror(errno));
-+ ret = false;
-+ goto cleanup;
-+ }
-+
-+ papplDeviceFlush(device);
-+
-+ papplJobSetImpressionsCompleted(job, 1);
-+
-+ //
-+ // Clean up
-+ //
-+
-+cleanup:
-+
-+ if (debug_fd >= 0)
-+ close(debug_fd);
-+
-+ //
-+ // Update printer status
-+ //
-+
-+ _prUpdateStatus(printer, device);
-+
-+ //
-+ // Stop CUPS backend and disconnect filter_data
-+ //
-+
-+ if (device_data && filter_data)
-+ {
-+ papplLogJob(job, PAPPL_LOGLEVEL_DEBUG,
-+ "Shutting down CUPS backend");
-+ _prCUPSDevStopBackend(device);
-+ device_data->filter_data = NULL;
-+ cfFilterCloseBackAndSidePipes(filter_data);
-+ free(filter_data);
-+ }
-+
-+ return (ret);
-+}
-+
-+
- //
- // '_prRasterPrepareJob()' - Create job data record to carry through
- // all the raster printing callbacks from
---
-2.49.0
diff --git a/0001-Protect-_prASCII-from-negative-lengths.patch b/0001-Protect-_prASCII-from-negative-lengths.patch
deleted file mode 100644
index ba58068..0000000
--- a/0001-Protect-_prASCII-from-negative-lengths.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 63b2c618cf770de3338fe94fd910656cc3c6ec38 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 27 Jan 2025 15:46:19 +0100
-Subject: [PATCH] Protect `_prASCII()` from negative lengths
-
----
- pappl-retrofit/cups-backends.c | 2 +-
- pappl-retrofit/print-job.c | 4 ++++
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/pappl-retrofit/cups-backends.c b/pappl-retrofit/cups-backends.c
-index 5cfd78c..4639449 100644
---- a/pappl-retrofit/cups-backends.c
-+++ b/pappl-retrofit/cups-backends.c
-@@ -470,7 +470,7 @@ _prCUPSDevList(pappl_device_cb_t cb,
- //
-
- backends[i].bytes += bytes;
-- backends[i].buf[4095] = '\0';
-+ backends[i].buf[4095] = '\0';
- while ((newline = strchr(backends[i].buf, '\n')) != NULL)
- {
- // We have read at least one line
-diff --git a/pappl-retrofit/print-job.c b/pappl-retrofit/print-job.c
-index 115dd4b..1fbd16f 100644
---- a/pappl-retrofit/print-job.c
-+++ b/pappl-retrofit/print-job.c
-@@ -55,6 +55,10 @@ _prASCII85(FILE *outputfp,
- static unsigned int num_remaining = 0;
-
-
-+ // Prevent possible negative lengths...
-+ if (length < 0)
-+ return;
-+
- while (num_remaining + length > 0)
- {
- if (num_remaining > 0 || length < 4)
---
-2.48.1
-
diff --git a/0001-Use-PAPPL-configuration-options-from-file.patch b/0001-Use-PAPPL-configuration-options-from-file.patch
deleted file mode 100644
index 06c9c4c..0000000
--- a/0001-Use-PAPPL-configuration-options-from-file.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From f1cfd4bdd916568712347c42ca8e7268e4e76171 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 29 Jul 2024 16:14:48 +0200
-Subject: [PATCH] Use PAPPL configuration options from file
-
-My previous commit added possibility to configure legacy-printer-app to
-be run with different options when the service is started. However PAPPL
-supports reading configuration files, which can happen either in default
-system callback defined in PAPPL, or by specific system callback defined
-by the application.
-
-The change updates `_prSystemCB()` to accept different server options,
-the same way as lprint or default PAPPL system callback does. This way
-the retrofitting printer application and lprint can use the same way of
-configuration.
----
- configure.ac | 75 ----------------------------
- legacy/legacy-printer-app.service | 10 ++++
- legacy/legacy-printer-app.service.in | 10 ----
- pappl-retrofit/pappl-retrofit.c | 44 +++++++++++++++-
- 4 files changed, 52 insertions(+), 87 deletions(-)
- create mode 100644 legacy/legacy-printer-app.service
- delete mode 100644 legacy/legacy-printer-app.service.in
-
-diff --git a/pappl-retrofit/pappl-retrofit.c b/pappl-retrofit/pappl-retrofit.c
-index dfbf570..7627164 100644
---- a/pappl-retrofit/pappl-retrofit.c
-+++ b/pappl-retrofit/pappl-retrofit.c
-@@ -4553,6 +4553,7 @@ _prSystemCB(int num_options, // I - Number of options
- pappl_system_t *system; // System object
- const char *val, // Current option value
- *hostname, // Hostname, if any
-+ *listenhost, // Listen hostname, if any
- *logfile, // Log file, if any
- *system_name; // System name, if any
- pappl_loglevel_t loglevel; // Log level
-@@ -4599,8 +4600,43 @@ _prSystemCB(int num_options, // I - Number of options
- else
- loglevel = PAPPL_LOGLEVEL_UNSPEC;
-
-- logfile = cupsGetOption("log-file", num_options, options);
-+ if ((val = cupsGetOption("server-options", num_options, options)) != NULL)
-+ {
-+ const char *valptr; // Pointer into value
-+
-+ for (valptr = val; valptr && *valptr;)
-+ {
-+ if (!strcmp(valptr, "none") || !strncmp(valptr, "none,", 5))
-+ soptions = PAPPL_SOPTIONS_NONE;
-+ else if (!strcmp(valptr, "dnssd-host") || !strncmp(valptr, "dnssd-host,", 11))
-+ soptions |= PAPPL_SOPTIONS_DNSSD_HOST;
-+ else if (!strcmp(valptr, "no-multi-queue") || !strncmp(valptr, "no-multi-queue,", 15))
-+ soptions &= (pappl_soptions_t)~PAPPL_SOPTIONS_MULTI_QUEUE;
-+ else if (!strcmp(valptr, "raw-socket") || !strncmp(valptr, "raw-socket,", 11))
-+ soptions |= PAPPL_SOPTIONS_RAW_SOCKET;
-+ else if (!strcmp(valptr, "usb-printer") || !strncmp(valptr, "usb-printer,", 12))
-+ soptions |= PAPPL_SOPTIONS_USB_PRINTER;
-+ else if (!strcmp(valptr, "no-web-interface") || !strncmp(valptr, "no-web-interface,", 17))
-+ soptions &= (pappl_soptions_t)~PAPPL_SOPTIONS_WEB_INTERFACE;
-+ else if (!strcmp(valptr, "web-log") || !strncmp(valptr, "web-log,", 8))
-+ soptions |= PAPPL_SOPTIONS_WEB_LOG;
-+ else if (!strcmp(valptr, "web-network") || !strncmp(valptr, "web-network,", 12))
-+ soptions |= PAPPL_SOPTIONS_WEB_NETWORK;
-+ else if (!strcmp(valptr, "web-remote") || !strncmp(valptr, "web-remote,", 11))
-+ soptions |= PAPPL_SOPTIONS_WEB_REMOTE;
-+ else if (!strcmp(valptr, "web-security") || !strncmp(valptr, "web-security,", 13))
-+ soptions |= PAPPL_SOPTIONS_WEB_SECURITY;
-+ else if (!strcmp(valptr, "no-tls") || !strncmp(valptr, "no-tls,", 7))
-+ soptions |= PAPPL_SOPTIONS_NO_TLS;
-+
-+ if ((valptr = strchr(valptr, ',')) != NULL)
-+ valptr ++;
-+ }
-+ }
-+
-+ listenhost = cupsGetOption("listen-hostname", num_options, options);
- hostname = cupsGetOption("server-hostname", num_options, options);
-+ logfile = cupsGetOption("log-file", num_options, options);
- system_name = cupsGetOption("system-name", num_options, options);
-
- if ((val = cupsGetOption("server-port", num_options, options)) != NULL)
-@@ -4744,8 +4780,12 @@ _prSystemCB(int num_options, // I - Number of options
-
- global_data->system = system;
-
-- papplSystemAddListeners(system, NULL);
-+ papplSystemAddListeners(system, listenhost);
- papplSystemSetHostName(system, hostname);
-+
-+ if ((val = cupsGetOption("admin-group", num_options, options)) != NULL)
-+ papplSystemSetAdminGroup(system, val);
-+
- _prSetup(global_data);
-
- // Extra setup steps for the system (like adding buttos/pages)
---
-2.45.2
-
diff --git a/0001-cups-backends.c-Ensure-read-string-is-NULL-terminate.patch b/0001-cups-backends.c-Ensure-read-string-is-NULL-terminate.patch
deleted file mode 100644
index cf3e011..0000000
--- a/0001-cups-backends.c-Ensure-read-string-is-NULL-terminate.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1780a78ed0b40b7eef769346958b1148fa598be0 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 16 Dec 2024 14:48:15 +0100
-Subject: [PATCH] cups-backends.c: Ensure read string is NULL-terminated
-
-We read from external program output, make sure we use NULL terminator.
----
- pappl-retrofit/cups-backends.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pappl-retrofit/cups-backends.c b/pappl-retrofit/cups-backends.c
-index 9ef3f4d..5cfd78c 100644
---- a/pappl-retrofit/cups-backends.c
-+++ b/pappl-retrofit/cups-backends.c
-@@ -470,6 +470,7 @@ _prCUPSDevList(pappl_device_cb_t cb,
- //
-
- backends[i].bytes += bytes;
-+ backends[i].buf[4095] = '\0';
- while ((newline = strchr(backends[i].buf, '\n')) != NULL)
- {
- // We have read at least one line
---
-2.48.1
-
diff --git a/0001-pappl-retrofit-private.h-Add-include-cups-sidechanne.patch b/0001-pappl-retrofit-private.h-Add-include-cups-sidechanne.patch
deleted file mode 100644
index a1631bf..0000000
--- a/0001-pappl-retrofit-private.h-Add-include-cups-sidechanne.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 0317fae79cef0c2ed47850183bf64116004ad3c7 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Thu, 27 Apr 2023 20:18:48 +0200
-Subject: [PATCH] pappl-retrofit-private.h: Add "#include <cups/sidechannel.h>"
-
-Seems that some other *.h file, of CUPS or PAPPL most probably,
-does not include cups/sidechannel.h any more.
----
- pappl-retrofit/pappl-retrofit-private.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pappl-retrofit/pappl-retrofit-private.h b/pappl-retrofit/pappl-retrofit-private.h
-index 86dd010..efa8311 100644
---- a/pappl-retrofit/pappl-retrofit-private.h
-+++ b/pappl-retrofit/pappl-retrofit-private.h
-@@ -31,6 +31,7 @@
- #include <cupsfilters/ieee1284.h>
- #include <cups/cups.h>
- #include <cups/dir.h>
-+#include <cups/sidechannel.h>
- #include <limits.h>
- #include <poll.h>
- #include <regex.h>
---
-2.43.0
-
diff --git a/0002-Fix-assigning-command-code-for-side-channel.patch b/0002-Fix-assigning-command-code-for-side-channel.patch
new file mode 100644
index 0000000..e835f02
--- /dev/null
+++ b/0002-Fix-assigning-command-code-for-side-channel.patch
@@ -0,0 +1,26 @@
+From ba95daa0ba3cdb107026f094dfa42db94f5a5d9a Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 12 Nov 2026 09:49:55 +0100
+Subject: [PATCH 2/3] Fix assigning command code for side channel
+
+Typo after comment migration
+---
+ pappl-retrofit/cups-side-back-channel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pappl-retrofit/cups-side-back-channel.c b/pappl-retrofit/cups-side-back-channel.c
+index 2c3fd1e..3b925b9 100644
+--- a/pappl-retrofit/cups-side-back-channel.c
++++ b/pappl-retrofit/cups-side-back-channel.c
+@@ -371,7 +371,7 @@ _prSideChannelRead(
+ return (-1);
+ }
+
+- //command = (pr_sc_command_t)buffer[0];
++ *command = (pr_sc_command_t)buffer[0];
+
+ //
+ // Validate the data length in the message...
+--
+2.56.0
+
diff --git a/0003-Web-UI-Fix-tags-when-listing-reports-after-adding-PP.patch b/0003-Web-UI-Fix-tags-when-listing-reports-after-adding-PP.patch
new file mode 100644
index 0000000..fcff76b
--- /dev/null
+++ b/0003-Web-UI-Fix-tags-when-listing-reports-after-adding-PP.patch
@@ -0,0 +1,53 @@
+From 0e2f6f9de2998cf31d00f5c24b0b810bf36a6e73 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 12 Nov 2026 10:38:25 +0100
+Subject: [PATCH 3/3] Web UI: Fix tags when listing reports after adding PPD
+
+Pair tags did not match in the table.
+
+Assisted-By: Claude Code
+---
+ pappl-retrofit/web-interface.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/pappl-retrofit/web-interface.c b/pappl-retrofit/web-interface.c
+index 5e1c313..14835fe 100644
+--- a/pappl-retrofit/web-interface.c
++++ b/pappl-retrofit/web-interface.c
+@@ -1454,27 +1454,29 @@ _prSystemWebAddPPD(
+ if (cupsArrayGetCount(rejected_report))
+ {
+ papplClientHTMLPrintf(client,
+- " <tr><div class=\"col-12\"><div class=\"log\" style = \"height: 200px\"><pre>");
++ " <tr><td colspan=\"3\"><div class=\"log\" style=\"height: 200px\"><pre>");
+ for (i = 0; i < cupsArrayGetCount(rejected_report); i ++)
+ papplClientHTMLPrintf(client,
+ (i == 0 ?
+ " Upload failed:%s\n" :
+ " %s\n"),
+ (char *)cupsArrayGetElement(rejected_report, i));
++ papplClientHTMLPuts(client,
++ " </pre></div></td></tr>\n");
+ }
+ if (cupsArrayGetCount(accepted_report))
+ {
+ papplClientHTMLPrintf(client,
+- " <tr><div class=\"col-12\"><div class=\"log\" style = \"height: 200px\"><pre>");
++ " <tr><td colspan=\"3\"><div class=\"log\" style=\"height: 200px\"><pre>");
+ for (i = 0; i < cupsArrayGetCount(accepted_report); i ++)
+ papplClientHTMLPrintf(client,
+ (i == 0 ?
+ " Uploaded:%s\n" :
+ " %s\n"),
+ (char *)cupsArrayGetElement(accepted_report, i));
++ papplClientHTMLPuts(client,
++ " </pre></div></td></tr>\n");
+ }
+- papplClientHTMLPrintf(client,
+- " </pre></div></div></tr>");
+ papplClientHTMLPuts(client,
+ " <tr><th><label for=\"ppdfiles\">PPD file(s):</label></th><td><input type=\"file\" name=\"ppdfiles\" accept=\".ppd,.PPD,.ppd.gz,.PPD.gz\" required multiple></td><td>(Only individual PPD files, no PPD-generating executables)</td></tr>\n");
+ papplClientHTMLPuts(client,
+--
+2.56.0
+
diff --git a/legacy-printer-app.conf b/legacy-printer-app.conf
index b8de2ae..79d0ad2 100644
--- a/legacy-printer-app.conf
+++ b/legacy-printer-app.conf
@@ -12,3 +12,6 @@ server-port=8001
# default log level - info, available levels: fatal, error, warn, info, debug
log-level=info
+
+# listen on localhost by default
+listen-hostname=localhost
diff --git a/pappl-retrofit-use-after-free.patch b/pappl-retrofit-use-after-free.patch
deleted file mode 100644
index 9df8ba4..0000000
--- a/pappl-retrofit-use-after-free.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/pappl-retrofit/cups-backends.c b/pappl-retrofit/cups-backends.c
-index b5d1643..bbb80f4 100644
---- a/pappl-retrofit/cups-backends.c
-+++ b/pappl-retrofit/cups-backends.c
-@@ -586,11 +586,11 @@ _prCUPSDevList(pappl_device_cb_t cb,
- // Check whether we have a duplicate and if so, skip it
- if (cupsArrayFind(devices, device))
- {
-- free(device);
- _prCUPSDevLog(&devlog_data, PAPPL_LOGLEVEL_DEBUG,
- "Duplicate device from backend '%s' skipped: %s (URI: %s Device ID: %s)",
- backends[i].name, info, device->device_uri,
- device_id);
-+ free(device);
- }
- else
- {
diff --git a/pappl-retrofit.spec b/pappl-retrofit.spec
index 88f2ded..231ba6a 100644
--- a/pappl-retrofit.spec
+++ b/pappl-retrofit.spec
@@ -3,7 +3,7 @@
#
# Brandon changes are present in Changelog as well to let people know he worked on this SPEC file.
-%global serverbin /usr/lib/
+%global serverbin /usr/lib
%if 0%{?fedora}
%bcond_without mdns
@@ -12,8 +12,8 @@
%endif
Name: pappl-retrofit
-Version: 1.0b2
-Release: 13%{?dist}
+Version: 1.0b3
+Release: 1%{?dist}
# the CUPS exception text is the same as LLVM exception, so using that name with
# agreement from legal team
# https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/A7GFSD6M3GYGSI32L2FC5KB22DUAEQI3/
@@ -24,30 +24,10 @@ Source0: %{URL}/releases/download/%{version}/pappl-retrofit-%{version}.tar.gz
Source1: legacy-printer-app.conf
# Patches
-# FTBFS
-# https://github.com/OpenPrinting/pappl-retrofit/commit/0317fae79ce
-Patch001: 0001-pappl-retrofit-private.h-Add-include-cups-sidechanne.patch
-# add man page
-# https://github.com/OpenPrinting/pappl-retrofit/commit/33be36f28
-Patch002: 0001-Added-man-page-for-the-Legacy-Printer-Application.patch
-# fix use after free
-# part of https://github.com/OpenPrinting/pappl-retrofit/commit/eebb36724a62
-Patch003: pappl-retrofit-use-after-free.patch
-# https://github.com/OpenPrinting/pappl-retrofit/pull/27
-Patch004: 0001-Use-PAPPL-configuration-options-from-file.patch
-# https://github.com/OpenPrinting/pappl-retrofit/pull/28
-Patch005: 0001-Fix-possible-unterminated-string.patch
-Patch006: 0001-cups-backends.c-Ensure-read-string-is-NULL-terminate.patch
-Patch007: 0001-Protect-_prASCII-from-negative-lengths.patch
-Patch008: 0001-Fix-potential-memory-leaks.patch
-# https://github.com/OpenPrinting/pappl-retrofit/pull/31
-Patch009: 0001-Fix-memory-leaks-from-compiled_re_list.patch
-# PAPPL 1.4.x compatibility shims for backported patches using PAPPL 2.x API
-# https://github.com/OpenPrinting/pappl-retrofit/blob/master/pappl-retrofit/pappl1-private.h
-Patch010: 0001-Add-PAPPL-1.4.x-compatibility-shims.patch
-# https://github.com/OpenPrinting/pappl-retrofit/pull/58
-# Implement prPrintFile() for raw printing (INFRASERV-1240)
-Patch011: 0001-Implement-prPrintFile-for-raw-printing.patch
+# https://github.com/OpenPrinting/pappl-retrofit/pull/73
+Patch001: 0001-Fix-buffer-length-comparison.patch
+Patch002: 0002-Fix-assigning-command-code-for-side-channel.patch
+Patch003: 0003-Web-UI-Fix-tags-when-listing-reports-after-adding-PP.patch
# for autogen.sh - generating configure scripts
@@ -149,6 +129,7 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
%install
+mkdir -p %{buildroot}%{serverbin}
%make_install
# Remove license files from doc
@@ -156,10 +137,63 @@ rm -f %{buildroot}/%{_docdir}/%{name}/{LICENSE,NOTICE,COPYING}
# remove symlink, we need it in /usr/lib
rm -f %{buildroot}/%{_libdir}/legacy-printer-app
-ln -sf /usr/lib/cups %{buildroot}/%{serverbin}/legacy-printer-app
install -p -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/legacy-printer-app.conf
+mkdir -p %{buildroot}%{_libexecdir}/legacy-printer-app
+
+cat > %{buildroot}%{_libexecdir}/legacy-printer-app/posttrans.sh << EOF
+#!/usr/bin/bash
+
+# upgrade script for adding new options into existing legacy-printer-app.conf
+# runs once on upgrade via legacy-printer-app-conf-upgrade.service
+
+conf=/etc/legacy-printer-app.conf
+
+if test ! -f "$conf"
+then
+ exit 0
+fi
+
+# add listen-hostname if missing
+if ! grep -q "^listen-hostname=" "$conf"
+then
+ echo "" >> "$conf"
+ echo "# listen on localhost by default" >> "$conf"
+ echo "listen-hostname=localhost" >> "$conf"
+fi
+
+# mark as upgraded so legacy-printer-app-conf-upgrade.service won't run again
+echo "" >> "$conf"
+echo "# added in version %{version}-%{release}" >> "$conf"
+
+exit 0
+EOF
+
+mkdir -p %{buildroot}%{_unitdir}
+
+cat > %{buildroot}%{_unitdir}/legacy-printer-app-conf-upgrade.service << EOF
+[Unit]
+Description=Upgrade legacy-printer-app.conf with new default options
+ConditionPathExists=%{_sysconfdir}/legacy-printer-app.conf
+
+[Service]
+Type=oneshot
+ExecCondition=bash -c '! grep -q "^# added in version" %{_sysconfdir}/legacy-printer-app.conf'
+ExecStart=bash -c %{_libexecdir}/legacy-printer-app/posttrans.sh
+
+[Install]
+WantedBy=multi-user.target
+EOF
+
+mkdir -p %{buildroot}%{_unitdir}/legacy-printer-app.service.d
+
+cat > %{buildroot}%{_unitdir}/legacy-printer-app.service.d/10-conf-upgrade.conf << EOF
+[Unit]
+After=legacy-printer-app-conf-upgrade.service
+Wants=legacy-printer-app-conf-upgrade.service
+EOF
+
%check
make check
@@ -167,12 +201,23 @@ make check
%post -n legacy-printer-app
%systemd_post legacy-printer-app.service
+%systemd_post legacy-printer-app-conf-upgrade.service
%preun -n legacy-printer-app
%systemd_preun legacy-printer-app.service
+%systemd_preun legacy-printer-app-conf-upgrade.service
%postun -n legacy-printer-app
%systemd_postun_with_restart legacy-printer-app.service
+%systemd_postun legacy-printer-app-conf-upgrade.service
+
+%posttrans -n legacy-printer-app
+%systemd_posttrans_with_reload legacy-printer-app-conf-upgrade.service
+
+if [ $1 -gt 1 ]
+then
+ systemctl start legacy-printer-app-conf-upgrade.service || :
+fi
%files
%license LICENSE NOTICE COPYING
@@ -188,20 +233,29 @@ make check
%{_libdir}/pkgconfig/libpappl-retrofit.pc
%files -n legacy-printer-app
-%config(noreplace) %{_sysconfdir}/legacy-printer-app.conf
-%{_sbindir}/legacy-printer-app
-%{_unitdir}/legacy-printer-app.service
%dir %{_datadir}/legacy-printer-app
-%{_datadir}/legacy-printer-app/testpage.ps
%{_datadir}/legacy-printer-app/testpage.pdf
+%{_datadir}/legacy-printer-app/testpage.ps
+%dir %{_libexecdir}/legacy-printer-app
+%attr(0744,root,root) %{_libexecdir}/legacy-printer-app/posttrans.sh
%dir %attr(0755,root,root) %{_localstatedir}/lib/legacy-printer-app
%dir %attr(0710,root,lp) %{_localstatedir}/spool/legacy-printer-app
+%{_mandir}/man8/legacy-printer-app.8.gz
+%{_sbindir}/legacy-printer-app
# this symlink is required if the app should use CUPS backends/filters
# in /usr/lib/cups
%{serverbin}/legacy-printer-app
-%{_mandir}/man1/legacy-printer-app.1.gz
+%config(noreplace) %{_sysconfdir}/legacy-printer-app.conf
+%dir %{_unitdir}/legacy-printer-app.service.d
+%{_unitdir}/legacy-printer-app.service.d/10-conf-upgrade.conf
+%{_unitdir}/legacy-printer-app-conf-upgrade.service
+%{_unitdir}/legacy-printer-app.service
+
%changelog
+* Thu Nov 12 2026 Zdenek Dohnal <zdohnal@redhat.com> - 1.0b3-1
+- 1.0b3 (fedora#2571734)
+
* Thu Sep 24 2026 Petr Dancak <pdancak@redhat.com> - 1.0b2-13
- Implement prPrintFile() for raw printing (INFRASERV-1240)
- Add PAPPL 1.4.x compatibility shims for PAPPL 2.x API
diff --git a/sources b/sources
index ae6be91..cdf2e67 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pappl-retrofit-1.0b2.tar.gz) = 4ccd7dec0f952cbaaa2ff02acf0e87ce16fe8fb76e40d0fd9eeb599296fbb871476f768f353295d8ae74cfbbd7cd7fd3a2845bd0c49eba26a8383e718d5a83fd
+SHA512 (pappl-retrofit-1.0b3.tar.gz) = 7edd13e2ab860f1a873b700764cacb02ab43a44fd2726684803b57355c96f691a61f6f574a66dbe8b2c4c5d5523a2000946f08ba6f4f7a3796a14f99f35cdeda
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-12 15:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 15:26 [rpms/pappl-retrofit] f43: 1.0b3 (fedora#2571734) Zdenek Dohnal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox