From 9ea0342f43380ae06ca62fa4f83c116dd312fd26 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 28 Nov 2019 13:20:49 +0100 Subject: [PATCH] 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id --- hplip-missing-laserjet2200.patch | 14 ++++++++------ hplip.spec | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hplip-missing-laserjet2200.patch b/hplip-missing-laserjet2200.patch index b67d586..3dca0a1 100644 --- a/hplip-missing-laserjet2200.patch +++ b/hplip-missing-laserjet2200.patch @@ -1,5 +1,5 @@ diff --git a/io/hpmud/model.c b/io/hpmud/model.c -index d546ec1..288cd75 100644 +index d546ec1..5bb6091 100644 --- a/io/hpmud/model.c +++ b/io/hpmud/model.c @@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * @@ -14,21 +14,23 @@ index d546ec1..288cd75 100644 if ((fp = fopen(datFile, "r")) == NULL) goto bugout; -@@ -423,9 +426,15 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * +@@ -422,10 +425,16 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int * + strncpy(section, rcbuf+1, sizeof(section)); /* found new section */ n = strlen(section); section[n-2]=0; /* remove ']' and CR */ - if (strcasecmp(model, section) == 0 || +- if (strcasecmp(model, section) == 0 || - (section[0] == 'h' && section[1] == 'p' && - section[2] == '_' && - strcasecmp(model, section + 3) == 0)) ++ if ((strcasecmp(model, section) == 0) || + (section[0] == 'h' && + section[1] == 'p' && + section[2] == '_' && + strcasecmp(model, section + 3) == 0) || + (n > model_len && -+ strncasecmp(section, model, model_len) && -+ strncasecmp(section + model_len, "_series", strlen("_series")) -+ ) ++ strncasecmp(section, model, model_len) == 0 && ++ strncasecmp(section + model_len, "_series", strlen("_series") == 0) ++ ) + ) { /* Found model match. */ diff --git a/hplip.spec b/hplip.spec index b938b4a..7dfed39 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.19.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -690,6 +690,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Nov 28 2019 Zdenek Dohnal - 3.19.10-3 +- 1777457 - hplip-3.19.10-2 breaks support for devices with '_series' in device id + * Mon Nov 18 2019 Zdenek Dohnal - 3.19.10-2 - 1773345 - Problems with HP M281fdw LaserJet