From 2a93e0585de86c875d897f10763131c56f41c749 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 27 Sep 2012 17:18:17 +0200 Subject: [PATCH] make hplip_cron work with non-english locale --- hplip-cron-locale.patch | 12 ++++++++++++ hplip.spec | 25 +++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 hplip-cron-locale.patch diff --git a/hplip-cron-locale.patch b/hplip-cron-locale.patch new file mode 100644 index 0000000..804750e --- /dev/null +++ b/hplip-cron-locale.patch @@ -0,0 +1,12 @@ +diff -Naur hplip-3.12.9_old/data/rules/hplip_cron hplip-3.12.9/data/rules/hplip_cron +--- hplip-3.12.9_old/data/rules/hplip_cron 2012-09-22 15:29:11.026025004 +0200 ++++ hplip-3.12.9/data/rules/hplip_cron 2012-09-22 15:29:56.113580760 +0200 +@@ -1,5 +1,8 @@ + #!/bin/sh + ++LC_ALL=C ++LANG=C ++ + LOG_DIR=/var/log/hp/tmp + + # Default for number of days to keep old log files in /var/log/hp/tmp diff --git a/hplip.spec b/hplip.spec index c4e258a..c7d3a0c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,14 +1,9 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.12.9 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons -Conflicts: system-config-printer < 0.6.132 -Obsoletes: hpoj < 0.91 -Provides: hpoj = 0.91 -Obsoletes: xojpanel < 0.91 -Provides: xojpanel = 0.91 Url: http://hplip.sourceforge.net/ Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz @@ -44,6 +39,7 @@ Patch28: hplip-wifisetup.patch Patch29: hplip-makefile-chgrp.patch Patch30: hplip-hpaio-localonly.patch Patch31: hplip-IEEE-1284-4.patch +Patch32: hplip-cron-locale.patch Requires(pre): /sbin/service Requires(post): /sbin/chkconfig @@ -62,7 +58,7 @@ Requires: crontabs BuildRequires: net-snmp-devel BuildRequires: cups-devel -BuildRequires: python-devel +BuildRequires: python2-devel BuildRequires: libjpeg-devel BuildRequires: desktop-file-utils BuildRequires: libusb1-devel @@ -296,6 +292,9 @@ done # Support IEEE 1284.4 protocol over USB (bug #858861). %patch31 -p1 -b .hplip-IEEE-1284-4 +# hplip_cron only works with english locale (Launchpad #1054584) +%patch32 -p1 -b .hplip-cron-locale.patch + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -511,13 +510,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_libdir}/sane/libsane-*.so* %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio -%pre -# No daemons any more. -/sbin/chkconfig --del hplip 2>/dev/null || true -if [ -x /etc/init.d/hplip ]; then - /sbin/service hplip stop -fi - %post gui /usr/bin/update-desktop-database &>/dev/null ||: @@ -532,6 +524,11 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Thu Sep 27 2012 Jiri Popelka 3.12.9-4 +- remove useless Conflicts:, Obsoletes: and Provides: fields +- remove %%pre section (stopping&disabling of hplip service on upgrade) +- make hplip_cron work with non-english locale + * Mon Sep 24 2012 Jiri Popelka 3.12.9-3 - amend hplip-notification-exception.patch (bug #859543).