BuildRequires systemd-devel instead of udev-devel
- replace udev_get_sys_path() with hard-coded "/sys"
This commit is contained in:
parent
4e2ace70f4
commit
cd29b7b20e
45
system-config-printer-udev-sys-path.patch
Normal file
45
system-config-printer-udev-sys-path.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From cbacff0c9f7e3e6549c9b33a42e805a935db36e6 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Tue, 5 Jun 2012 14:28:36 +0200
|
||||
Subject: [PATCH] udev: replace udev_get_sys_path() with hard-coded "/sys"
|
||||
(trac #223)
|
||||
|
||||
udev_get_sys_path() is no longer provided by libudev
|
||||
---
|
||||
udev/udev-configure-printer.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
|
||||
index 1d89f9a..8d349e4 100644
|
||||
--- a/udev/udev-configure-printer.c
|
||||
+++ b/udev/udev-configure-printer.c
|
||||
@@ -451,7 +451,6 @@ device_id_from_devpath (const char *devpath,
|
||||
struct usb_uri_map_entry *entry;
|
||||
struct udev *udev;
|
||||
struct udev_device *dev, *parent_dev = NULL;
|
||||
- const char *sys;
|
||||
const char *idVendorStr, *idProductStr, *serial;
|
||||
char *end;
|
||||
unsigned long idVendor, idProduct;
|
||||
@@ -500,8 +499,7 @@ device_id_from_devpath (const char *devpath,
|
||||
*dest = '\0';
|
||||
}
|
||||
|
||||
- sys = udev_get_sys_path (udev);
|
||||
- syslen = strlen (sys);
|
||||
+ syslen = strlen ("/sys");
|
||||
devpathlen = strlen (devpath);
|
||||
syspath = malloc (syslen + devpathlen + 1);
|
||||
if (syspath == NULL)
|
||||
@@ -511,7 +509,7 @@ device_id_from_devpath (const char *devpath,
|
||||
exit (1);
|
||||
}
|
||||
|
||||
- memcpy (syspath, sys, syslen);
|
||||
+ memcpy (syspath, "/sys", syslen);
|
||||
memcpy (syspath + syslen, devpath, devpathlen);
|
||||
syspath[syslen + devpathlen] = '\0';
|
||||
|
||||
--
|
||||
1.7.10.2
|
||||
|
@ -1,19 +1,20 @@
|
||||
Summary: A printer administration tool
|
||||
Name: system-config-printer
|
||||
Version: 1.3.9
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||
Group: System Environment/Base
|
||||
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
|
||||
Patch1: system-config-printer-no-applet-in-gnome.patch
|
||||
Patch2: system-config-printer-udev-sys-path.patch
|
||||
BuildRequires: cups-devel >= 1.2
|
||||
BuildRequires: desktop-file-utils >= 0.2.92
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: intltool
|
||||
BuildRequires: libusb-devel, libudev-devel, glib2-devel
|
||||
BuildRequires: libusb-devel, glib2-devel
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: systemd-units
|
||||
BuildRequires: systemd-units, systemd-devel
|
||||
|
||||
Requires: pygtk2%{?_isa} >= 2.12
|
||||
Requires: pygobject2%{?_isa}
|
||||
@ -62,14 +63,16 @@ printers.
|
||||
|
||||
# Don't start the applet in GNOME.
|
||||
%patch1 -p1 -b .no-applet-in-gnome
|
||||
# replace udev_get_sys_path() with hard-coded "/sys"
|
||||
%patch2 -p1 -b .sys-path
|
||||
|
||||
%build
|
||||
%configure --with-udev-rules
|
||||
|
||||
%install
|
||||
make DESTDIR=%buildroot install \
|
||||
udevrulesdir=/lib/udev/rules.d \
|
||||
udevhelperdir=/lib/udev
|
||||
udevrulesdir=%{_prefix}/lib/udev/rules.d \
|
||||
udevhelperdir=%{_prefix}/lib/udev
|
||||
|
||||
%{__mkdir_p} %buildroot%{_localstatedir}/run/udev-configure-printer
|
||||
touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
|
||||
@ -128,8 +131,8 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
|
||||
%{python_sitelib}/*.egg-info
|
||||
|
||||
%files udev
|
||||
/lib/udev/rules.d/*.rules
|
||||
/lib/udev/udev-*-printer
|
||||
%{_prefix}/lib/udev/rules.d/*.rules
|
||||
%{_prefix}/lib/udev/udev-*-printer
|
||||
%ghost %dir %{_localstatedir}/run/udev-configure-printer
|
||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %attr(0644,root,root) %{_localstatedir}/run/udev-configure-printer/usb-uris
|
||||
%{_unitdir}/udev-configure-printer.service
|
||||
@ -182,6 +185,10 @@ if [ $1 -ge 1 ] ; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Tue Jun 05 2012 Jiri Popelka <jpopelka@redhat.com> 1.3.9-2
|
||||
- BuildRequires systemd-devel instead of udev-devel
|
||||
- replace udev_get_sys_path() with hard-coded "/sys"
|
||||
|
||||
* Thu Mar 1 2012 Tim Waugh <twaugh@redhat.com> 1.3.9-1
|
||||
- 1.3.9:
|
||||
- Updated translations.
|
||||
|
Loading…
Reference in New Issue
Block a user