@ -4,31 +4,26 @@
# Enable hardened build, as the udev part runs with privilege.
# Enable hardened build, as the udev part runs with privilege.
%global _hardened_build 1
%global _hardened_build 1
%global username zdohnal
%global username OpenPrinting
Summary: A printer administration tool
Summary: A printer administration tool
Name: system-config-printer
Name: system-config-printer
Version: 1.5.11
Version: 1.5.15
Release: 13 %{?dist}
Release: 4 %{?dist}
License: GPLv2+
License: GPLv2+
URL: https://github.com/%{username}/%{name}
URL: https://github.com/%{username}/%{name}
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.g z
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.x z
# all upstream patches, remove with new release
# all upstream patches, remove with new release
Patch01: system-config-printer-authdialog.patch
Patch02: 0001-Use-ValueError-instead-of-ImportError-to-catch-excep.patch
Patch03: 0001-Require-proper-version-of-GDK-and-GTK-in-scp-dbus-se.patch
Patch04: 0001-Set-programe-name-for-scp-dbus-service-as-well.patch
Patch05: 0001-require-Gtk-and-Gdk-version-3.0-in-asyncpk1.py.patch
Patch06: 0001-encoding-Modified-to-use-utf-8-in-fdopen.patch
Patch07: 0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch
Patch08: 0001-define-classes-for-Secret-only-when-libsecret-is-ins.patch
Patch09: 0001-Fix-typo-in-debugprint-call-https-github.com-zdohnal.patch
Patch10: 0001-Fix-TypeError-raised-by-debugprint-call.patch
# gcc is no longer in buildroot by default
# gcc is no longer in buildroot by default
# gcc is needed for udev-configure-printer.c
# gcc is needed for udev-configure-printer.c
BuildRequires: gcc
BuildRequires: gcc
# for autosetup
BuildRequires: git-core
# uses make
BuildRequires: make
BuildRequires: cups-devel >= 1.2
BuildRequires: cups-devel >= 1.2
BuildRequires: desktop-file-utils >= 0.2.92
BuildRequires: desktop-file-utils >= 0.2.92
@ -52,7 +47,6 @@ Requires: libnotify%{?_isa}
Requires: python3-cairo%{?_isa}
Requires: python3-cairo%{?_isa}
Requires: python3-firewall
Requires: python3-firewall
Requires: libcanberra-gtk3
Requires: libcanberra-gtk3
Requires: PackageKit-gtk3-module
%{?systemd_requires}
%{?systemd_requires}
%description
%description
@ -61,6 +55,7 @@ the user to configure a CUPS print server.
%package libs
%package libs
Summary: Libraries and shared code for printer administration tool
Summary: Libraries and shared code for printer administration tool
Requires: libnotify
Requires: python3-cups >= 1.9.60
Requires: python3-cups >= 1.9.60
Requires: python3-pycurl
Requires: python3-pycurl
Requires: gobject-introspection
Requires: gobject-introspection
@ -70,60 +65,83 @@ Requires: python3-dbus
Requires: python3-requests
Requires: python3-requests
Suggests: python3-smbc
Suggests: python3-smbc
BuildArch: noarch
BuildArch: noarch
Obsoletes: %{name}-libs < 1.3.12-10
%description libs
%description libs
The common code used by both the graphical and non-graphical parts of
The common code used by both the graphical and non-graphical parts of
the configuration tool.
the configuration tool.
%if 0%{?rhel} <= 8 || 0%{?fedora}
%package applet
%package applet
Summary: Print job notification applet
Summary: Print job notification applet
Requires: %{name}-libs
Requires: %{name}-libs
%description applet
%description applet
Print job notification applet.
Print job notification applet.
%endif
%package udev
%package udev
Summary: Rules for udev for automatic configuration of USB printers
Summary: Rules for udev for automatic configuration of USB printers
Requires: system-config-printer-libs = %{version}-%{release}
Requires: system-config-printer-libs = %{version}-%{release}
Obsoletes: hal-cups-utils < 0.6.20
Provides: hal-cups-utils = 0.6.20
%description udev
%description udev
The udev rules and helper programs for automatically configuring USB
The udev rules and helper programs for automatically configuring USB
printers.
printers.
%prep
%prep
%setup -q
%autosetup -S git
%patch01 -p1 -b .authdialog
%patch02 -p1 -b .upstream0
%patch03 -p1 -b .upstream1
%patch04 -p1 -b .upstream2
%patch05 -p1 -b .upstream3
%patch06 -p1 -b .upstream4
%patch07 -p1 -b .upstream5
%patch08 -p1 -b .upstream6
%patch09 -p1 -b .upstream7
%patch10 -p1 -b .upstream8
%build
%build
%configure --with-udev-rules
%configure --with-udev-rules
make %{?_smp_mflags}
%make_build
%install
%install
make DESTDIR=%buildroot install
%make_install
%{__mkdir_p} %buildroot%{_localstatedir}/run/udev-configure-printer
%{__mkdir_p} %buildroot%{_localstatedir}/run/udev-configure-printer
touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
# Manually invoke the python byte compile macro for each path that
# Manually invoke the python byte compile macro for each path that
# needs byte compilation
# needs byte compilation
%py_byte_compile %{__python3} %%{buildroot}%{python3_sitelib}/cupshelpers
%py_byte_compile %{__python3} %{buildroot}/%{_datadir}/system-config-printer
%py_byte_compile %{__python3} %%{buildroot}%{datadir}/system-config-printer
%find_lang system-config-printer
%find_lang system-config-printer
%if 0%{?rhel} > 8
rm -rf %{buildroot}%{_bindir}/%{name}-applet \
%{buildroot}%{_datadir}/%{name}/__pycache__/applet* \
%{buildroot}%{_datadir}/%{name}/applet.py* \
%{buildroot}%{_sysconfdir}/xdg/autostart/print-applet.desktop \
%{buildroot}%{_mandir}/man1/%{name}-applet.1* \
%{buildroot}%{_bindir}/%{name} \
%{buildroot}%{_bindir}/install-printerdriver \
%{buildroot}%{_datadir}/%{name}/__pycache__/check-device-ids* \
%{buildroot}%{_datadir}/%{name}/__pycache__/HIG* \
%{buildroot}%{_datadir}/%{name}/__pycache__/SearchCriterion* \
%{buildroot}%{_datadir}/%{name}/__pycache__/serversettings* \
%{buildroot}%{_datadir}/%{name}/__pycache__/system-config-printer* \
%{buildroot}%{_datadir}/%{name}/__pycache__/ToolbarSearchEntry* \
%{buildroot}%{_datadir}/%{name}/__pycache__/userdefault* \
%{buildroot}%{_datadir}/%{name}/__pycache__/install-printerdriver* \
%{buildroot}%{_datadir}/%{name}/check-device-ids.py* \
%{buildroot}%{_datadir}/%{name}/HIG.py* \
%{buildroot}%{_datadir}/%{name}/SearchCriterion.py* \
%{buildroot}%{_datadir}/%{name}/serversettings.py* \
%{buildroot}%{_datadir}/%{name}/system-config-printer.py* \
%{buildroot}%{_datadir}/%{name}/ToolbarSearchEntry.py* \
%{buildroot}%{_datadir}/%{name}/userdefault.py* \
%{buildroot}%{_datadir}/%{name}/troubleshoot \
%{buildroot}%{_datadir}/%{name}/icons \
%{buildroot}%{_datadir}/%{name}/install-printerdriver.py* \
%{buildroot}%{_datadir}/%{name}/xml/__pycache__ \
%{buildroot}%{_datadir}/%{name}/xml/validate.py* \
%{buildroot}%{_datadir}/%{name}/ui \
%{buildroot}%{_datadir}/applications/system-config-printer.desktop \
%{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml \
%{buildroot}%{_mandir}/man1/%{name}.1* \
%endif
%files libs -f system-config-printer.lang
%files libs -f system-config-printer.lang
%doc ChangeLog NEWS ABOUT-NLS AUTHORS ChangeLog-OLD
%license COPYING
%license COPYING
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf
@ -131,6 +149,16 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%{_datadir}/dbus-1/services/*.service
%{_datadir}/dbus-1/services/*.service
%{_bindir}/scp-dbus-service
%{_bindir}/scp-dbus-service
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/__pycache__/*
%exclude %{_datadir}/%{name}/__pycache__/check-device-ids*
%exclude %{_datadir}/%{name}/__pycache__/HIG*
%exclude %{_datadir}/%{name}/__pycache__/SearchCriterion*
%exclude %{_datadir}/%{name}/__pycache__/serversettings*
%exclude %{_datadir}/%{name}/__pycache__/system-config-printer*
%exclude %{_datadir}/%{name}/__pycache__/ToolbarSearchEntry*
%exclude %{_datadir}/%{name}/__pycache__/userdefault*
%exclude %{_datadir}/%{name}/__pycache__/install-printerdriver*
%exclude %{_datadir}/%{name}/__pycache__/applet*
%{_datadir}/%{name}/asyncconn.py*
%{_datadir}/%{name}/asyncconn.py*
%{_datadir}/%{name}/asyncipp.py*
%{_datadir}/%{name}/asyncipp.py*
%{_datadir}/%{name}/asyncpk1.py*
%{_datadir}/%{name}/asyncpk1.py*
@ -162,16 +190,22 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%{_datadir}/%{name}/smburi.py*
%{_datadir}/%{name}/smburi.py*
%{_datadir}/%{name}/statereason.py*
%{_datadir}/%{name}/statereason.py*
%{_datadir}/%{name}/timedops.py*
%{_datadir}/%{name}/timedops.py*
%dir %{_datadir}/%{name}/__pycache__
%dir %{_datadir}/%{name}/xml
%{_datadir}/%{name}/xml/*.rng
%dir %{_sysconfdir}/cupshelpers
%dir %{_sysconfdir}/cupshelpers
%config(noreplace) %{_sysconfdir}/cupshelpers/preferreddrivers.xml
%config(noreplace) %{_sysconfdir}/cupshelpers/preferreddrivers.xml
%{python3_sitelib}/cupshelpers
%{python3_sitelib}/cupshelpers
%{python3_sitelib}/*.egg-info
%{python3_sitelib}/*.egg-info
%if 0%{?rhel} <= 8 || 0%{?fedora}
%files applet
%files applet
%{_bindir}/%{name}-applet
%{_bindir}/%{name}-applet
%{_datadir}/%{name}/__pycache__/applet*
%{_datadir}/%{name}/applet.py*
%{_datadir}/%{name}/applet.py*
%{_sysconfdir}/xdg/autostart/print-applet.desktop
%{_sysconfdir}/xdg/autostart/print-applet.desktop
%{_mandir}/man1/%{name}-applet.1*
%{_mandir}/man1/%{name}-applet.1*
%endif
%files udev
%files udev
%{_prefix}/lib/udev/rules.d/*.rules
%{_prefix}/lib/udev/rules.d/*.rules
@ -180,11 +214,20 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %attr(0644,root,root) %{_localstatedir}/run/udev-configure-printer/usb-uris
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %attr(0644,root,root) %{_localstatedir}/run/udev-configure-printer/usb-uris
%{_unitdir}/configure-printer@.service
%{_unitdir}/configure-printer@.service
%if 0%{?rhel} <= 8 || 0%{?fedora}
%files
%files
%doc ChangeLog NEWS ABOUT-NLS AUTHORS ChangeLog-OLD
%doc ChangeLog NEWS ABOUT-NLS AUTHORS ChangeLog-OLD
%license COPYING
%license COPYING
%{_bindir}/%{name}
%{_bindir}/%{name}
%{_bindir}/install-printerdriver
%{_bindir}/install-printerdriver
%{_datadir}/%{name}/__pycache__/check-device-ids*
%{_datadir}/%{name}/__pycache__/HIG*
%{_datadir}/%{name}/__pycache__/SearchCriterion*
%{_datadir}/%{name}/__pycache__/serversettings*
%{_datadir}/%{name}/__pycache__/system-config-printer*
%{_datadir}/%{name}/__pycache__/ToolbarSearchEntry*
%{_datadir}/%{name}/__pycache__/userdefault*
%{_datadir}/%{name}/__pycache__/install-printerdriver*
%{_datadir}/%{name}/check-device-ids.py*
%{_datadir}/%{name}/check-device-ids.py*
%{_datadir}/%{name}/HIG.py*
%{_datadir}/%{name}/HIG.py*
%{_datadir}/%{name}/SearchCriterion.py*
%{_datadir}/%{name}/SearchCriterion.py*
@ -195,8 +238,8 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%{_datadir}/%{name}/troubleshoot
%{_datadir}/%{name}/troubleshoot
%{_datadir}/%{name}/icons
%{_datadir}/%{name}/icons
%{_datadir}/%{name}/install-printerdriver.py*
%{_datadir}/%{name}/install-printerdriver.py*
%dir %{_datadir}/%{name}/xml
%dir %{_datadir}/%{name}/xml/__pycache__
%{_datadir}/%{name}/xml/*.rng
%{_datadir}/%{name}/xml/__pycache__/ *
%{_datadir}/%{name}/xml/validate.py*
%{_datadir}/%{name}/xml/validate.py*
%dir %{_datadir}/%{name}/ui
%dir %{_datadir}/%{name}/ui
%{_datadir}/%{name}/ui/*.ui
%{_datadir}/%{name}/ui/*.ui
@ -205,12 +248,84 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}.1*
%post
%post
/bin /rm -f /var/cache/foomatic/foomatic.pickle
%{_bindir} /rm -f /var/cache/foomatic/foomatic.pickle
exit 0
exit 0
%endif
%changelog
%changelog
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.5.11-13
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.15-4
- Rebuilt for MSVSphere 8.8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.15-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 14 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.15-1
- 1.5.15, apply eln changes
* Tue Jan 05 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.13-3
- 1750156 - hangs on selection of change PPD (Make and Model)
* Fri Nov 27 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.13-2
- set preferred driver for Dymo LabelWriter 400
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.13-1
- 1.15.13
* Mon Oct 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.12-9
- 1884866 - s-c-p: isAlive() is removed, use is_alive()
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.12-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 22 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.12-7
- python3.9 - xml module removed elem.getchildren() method, use list(elem)
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 1.5.12-6
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.5.12-5
- Rebuilt for Python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 31 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.12-3
- whole fix for #1765915
* Tue Oct 29 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.12-2
- 1765915 - abrt in udev-configure-printer
* Tue Oct 01 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.12-1
- 1.5.12
* Tue Aug 27 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-21
- require libnotify - there can be cases where it is not brought by any other packages
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.11-20
- Rebuilt for Python 3.8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.11-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 15 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-18
- 1729453 - system-config-printer does not ship byte-compiled Python files
* Wed May 29 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-17
- upstream was moved to OpenPrinting
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.11-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 02 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-15
- remove packagekit-gtk3-module dependency
* Fri Nov 09 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-14
- deprecate at_console statement
* Mon Oct 15 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-13
* Mon Oct 15 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-13
- backport several upstream patches
- backport several upstream patches