From 3c90dd62d5b1631a15110c7fb2a6a5b5e699714a Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 20 Mar 2024 15:57:43 +0100 Subject: [PATCH] RHEL-28165 - configure-printer exits with failure status when device is already handled Resolves: RHEL-28165 --- ...value-when-device-is-already-handled.patch | 35 +++++++++++++++++++ system-config-printer.spec | 7 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0001-udev-Fix-exit-value-when-device-is-already-handled.patch diff --git a/0001-udev-Fix-exit-value-when-device-is-already-handled.patch b/0001-udev-Fix-exit-value-when-device-is-already-handled.patch new file mode 100644 index 0000000..e22102b --- /dev/null +++ b/0001-udev-Fix-exit-value-when-device-is-already-handled.patch @@ -0,0 +1,35 @@ +From 77540d0cb539364bbf63e21cfa970e62d9a86ed3 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Tue, 12 Mar 2024 18:59:43 +0100 +Subject: [PATCH] udev: Fix exit value when device is already handled + +--- + NEWS | 1 + + udev/udev-configure-printer.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c +index fd158b09..5703c1af 100644 +--- a/udev/udev-configure-printer.c ++++ b/udev/udev-configure-printer.c +@@ -806,7 +806,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath, + { + udev_device_unref (dev); + syslog (LOG_ERR, "unable to access %s", syspath); +- return NULL; ++ exit (1); + } + + usb_device_devpath = strdup (udev_device_get_devpath (dev)); +@@ -831,7 +831,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath, + syslog (LOG_DEBUG, "Device already handled"); + free (usb_device_devpath); + free (devicefilepath); +- return NULL; ++ exit (0); + } + + serial = udev_device_get_sysattr_value (dev, "serial"); +-- +2.44.0 + diff --git a/system-config-printer.spec b/system-config-printer.spec index 6ed415e..fa26ca3 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -9,13 +9,15 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.5.18 -Release: 7%{?dist} +Release: 8%{?dist} License: GPL-2.0-or-later URL: https://github.com/%{username}/%{name} Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz # all upstream patches, remove with new release Patch0001: 0001-Fix-debugprint-in-options.py-fixes-291.patch +# RHEL-28165 - configure-printer exits with failure status when device is already handled +Patch0002: 0001-udev-Fix-exit-value-when-device-is-already-handled.patch # needed for macro AM_GNU_GETTEXT in configure.ac @@ -295,6 +297,9 @@ exit 0 %endif %changelog +* Wed Mar 20 2024 Zdenek Dohnal - 1.5.18-8 +- RHEL-28165 - configure-printer exits with failure status when device is already handled + * Tue Jan 23 2024 Zdenek Dohnal - 1.5.18-7 - 2259526 - FTBFS s-c-p due missing distutils