3.13.6
- hplip-ipp-accessors.patch merged upstream - /etc/cron.daily/hplip_cron -> /usr/share/hplip/hplip_clean.sh
This commit is contained in:
parent
d997917a78
commit
098fac3992
1
.gitignore
vendored
1
.gitignore
vendored
@ -55,3 +55,4 @@ hplip-3.10.6.tar.gz
|
|||||||
/hplip-3.13.3.tar.gz
|
/hplip-3.13.3.tar.gz
|
||||||
/hplip-3.13.4.tar.gz
|
/hplip-3.13.4.tar.gz
|
||||||
/hplip-3.13.5.tar.gz
|
/hplip-3.13.5.tar.gz
|
||||||
|
/hplip-3.13.6.tar.gz
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
|
||||||
|
|
||||||
iEYEABECAAYFAlGMyHEACgkQc9dwzaWQR7mbhQCg6toDozQF4AOYtjUKU2oEdKDx
|
|
||||||
DYIAn0vw4HPVVDL+u95ug5xW8B+vgE+e
|
|
||||||
=Fbzl
|
|
||||||
-----END PGP SIGNATURE-----
|
|
7
hplip-3.13.6.tar.gz.asc
Normal file
7
hplip-3.13.6.tar.gz.asc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||||
|
|
||||||
|
iEYEABECAAYFAlHD+qQACgkQc9dwzaWQR7nGagCdGytHhhD+LN7raSm2UKSi2VHB
|
||||||
|
LzIAoOTCb4tS9AU2i5HbVqxgtKgN3yy7
|
||||||
|
=XJ4P
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,392 +0,0 @@
|
|||||||
diff -up hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors hplip-3.12.6/prnt/cupsext/cupsext.c
|
|
||||||
--- hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors 2012-06-18 12:41:19.000000000 +0200
|
|
||||||
+++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-07-19 17:11:47.606524137 +0200
|
|
||||||
@@ -87,6 +87,46 @@ typedef int Py_ssize_t;
|
|
||||||
#define PY_SSIZE_T_MIN INT_MIN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
|
|
||||||
+#define HAVE_CUPS_1_6 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef HAVE_CUPS_1_6
|
|
||||||
+#define ippGetCount(attr) attr->num_values
|
|
||||||
+#define ippGetGroupTag(attr) attr->group_tag
|
|
||||||
+#define ippGetValueTag(attr) attr->value_tag
|
|
||||||
+#define ippGetName(attr) attr->name
|
|
||||||
+#define ippGetBoolean(attr, element) attr->values[element].boolean
|
|
||||||
+#define ippGetInteger(attr, element) attr->values[element].integer
|
|
||||||
+#define ippGetStatusCode(ipp) ipp->request.status.status_code
|
|
||||||
+#define ippGetString(attr, element, language) attr->values[element].string.text
|
|
||||||
+
|
|
||||||
+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
|
|
||||||
+{
|
|
||||||
+ if (!ipp)
|
|
||||||
+ return (NULL);
|
|
||||||
+ return (ipp->current = ipp->attrs);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
|
|
||||||
+{
|
|
||||||
+ if (!ipp || !ipp->current)
|
|
||||||
+ return (NULL);
|
|
||||||
+ return (ipp->current = ipp->current->next);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
|
|
||||||
+{
|
|
||||||
+ ipp->request.op.operation_id = op;
|
|
||||||
+ return (1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ippSetRequestId( ipp_t *ipp, int request_id )
|
|
||||||
+{
|
|
||||||
+ ipp->request.any.request_id = request_id;
|
|
||||||
+ return (1);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
int g_num_options = 0;
|
|
||||||
cups_option_t * g_options;
|
|
||||||
@@ -333,8 +373,8 @@ PyObject * getPrinters( PyObject * self,
|
|
||||||
request = ippNew();
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_GET_PRINTERS;
|
|
||||||
- request->request.any.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_GET_PRINTERS );
|
|
||||||
+ ippSetRequestId ( request, 1);
|
|
||||||
|
|
||||||
ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
|
|
||||||
"attributes-charset", NULL, cupsLangEncoding( language ) );
|
|
||||||
@@ -378,10 +418,10 @@ PyObject * getPrinters( PyObject * self,
|
|
||||||
ipp_pstate_t state;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
- for ( attr = response->attrs; attr != NULL; attr = attr->next )
|
|
||||||
+ for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) )
|
|
||||||
{
|
|
||||||
- while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER )
|
|
||||||
- attr = attr->next;
|
|
||||||
+ while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER )
|
|
||||||
+ attr = ippNextAttribute( response );
|
|
||||||
|
|
||||||
if ( attr == NULL )
|
|
||||||
break;
|
|
||||||
@@ -390,41 +430,41 @@ PyObject * getPrinters( PyObject * self,
|
|
||||||
state = IPP_PRINTER_IDLE;
|
|
||||||
accepting = 0;
|
|
||||||
|
|
||||||
- while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER )
|
|
||||||
+ while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER )
|
|
||||||
{
|
|
||||||
- if ( strcmp( attr->name, "printer-name" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_NAME )
|
|
||||||
- name = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "device-uri" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_URI )
|
|
||||||
- device_uri = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_URI )
|
|
||||||
- printer_uri = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "printer-info" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_TEXT )
|
|
||||||
- info = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "printer-location" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_TEXT )
|
|
||||||
- location = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_TEXT )
|
|
||||||
- make_model = attr->values[ 0 ].string.text;
|
|
||||||
-
|
|
||||||
- else if ( strcmp( attr->name, "printer-state" ) == 0 &&
|
|
||||||
- attr->value_tag == IPP_TAG_ENUM )
|
|
||||||
- state = ( ipp_pstate_t ) attr->values[ 0 ].integer;
|
|
||||||
-
|
|
||||||
- else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
|
|
||||||
- attr->value_tag == IPP_TAG_BOOLEAN)
|
|
||||||
- accepting = attr->values[ 0 ].boolean;
|
|
||||||
+ if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_NAME )
|
|
||||||
+ name = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_URI )
|
|
||||||
+ device_uri = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_URI )
|
|
||||||
+ printer_uri = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
|
|
||||||
+ info = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
|
|
||||||
+ location = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
|
|
||||||
+ make_model = ippGetString( attr, 0, NULL );
|
|
||||||
+
|
|
||||||
+ else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_ENUM )
|
|
||||||
+ state = ( ipp_pstate_t ) ippGetInteger( attr, 0 );
|
|
||||||
+
|
|
||||||
+ else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") &&
|
|
||||||
+ ippGetValueTag( attr ) == IPP_TAG_BOOLEAN)
|
|
||||||
+ accepting = ippGetBoolean( attr, 0 );
|
|
||||||
|
|
||||||
- attr = attr->next;
|
|
||||||
+ attr = ippNextAttribute( response );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( device_uri == NULL )
|
|
||||||
@@ -522,8 +562,8 @@ PyObject * addPrinter( PyObject * self,
|
|
||||||
request = ippNew();
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_ADD_PRINTER;
|
|
||||||
- request->request.any.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_ADD_PRINTER );
|
|
||||||
+ ippSetRequestId ( request, 1 );
|
|
||||||
|
|
||||||
ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
|
|
||||||
"attributes-charset", NULL, cupsLangEncoding( language ) );
|
|
||||||
@@ -568,7 +608,7 @@ PyObject * addPrinter( PyObject * self,
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- status = response->request.status.status_code;
|
|
||||||
+ status = ippGetStatusCode( response );
|
|
||||||
//ippDelete( response );
|
|
||||||
r = 1;
|
|
||||||
}
|
|
||||||
@@ -631,8 +671,8 @@ PyObject * delPrinter( PyObject * self,
|
|
||||||
*/
|
|
||||||
request = ippNew();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_DELETE_PRINTER;
|
|
||||||
- request->request.op.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_DELETE_PRINTER );
|
|
||||||
+ ippSetRequestId ( request, 1 );
|
|
||||||
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
@@ -650,7 +690,7 @@ PyObject * delPrinter( PyObject * self,
|
|
||||||
*/
|
|
||||||
response = cupsDoRequest( http, request, "/admin/" );
|
|
||||||
|
|
||||||
- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
|
|
||||||
+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
|
|
||||||
{
|
|
||||||
r = 1;
|
|
||||||
}
|
|
||||||
@@ -721,8 +761,8 @@ PyObject * setDefaultPrinter( PyObject *
|
|
||||||
|
|
||||||
request = ippNew();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_SET_DEFAULT;
|
|
||||||
- request->request.op.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_SET_DEFAULT );
|
|
||||||
+ ippSetRequestId ( request, 1 );
|
|
||||||
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
@@ -743,7 +783,7 @@ PyObject * setDefaultPrinter( PyObject *
|
|
||||||
|
|
||||||
response = cupsDoRequest( http, request, "/admin/" );
|
|
||||||
|
|
||||||
- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
|
|
||||||
+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
|
|
||||||
{
|
|
||||||
r = 1;
|
|
||||||
}
|
|
||||||
@@ -797,8 +837,8 @@ PyObject * controlPrinter( PyObject * se
|
|
||||||
|
|
||||||
request = ippNew();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = op;
|
|
||||||
- request->request.op.request_id = 1;
|
|
||||||
+ ippSetOperation( request, op );
|
|
||||||
+ ippSetRequestId ( request, 1 );
|
|
||||||
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
@@ -822,7 +862,7 @@ PyObject * controlPrinter( PyObject * se
|
|
||||||
|
|
||||||
response = cupsDoRequest(http, request, "/admin/");
|
|
||||||
|
|
||||||
- if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT))
|
|
||||||
+ if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT))
|
|
||||||
{
|
|
||||||
r = 1;
|
|
||||||
}
|
|
||||||
@@ -837,7 +877,7 @@ abort:
|
|
||||||
if ( response != NULL )
|
|
||||||
ippDelete( response );
|
|
||||||
|
|
||||||
- return Py_BuildValue( "i", r );;
|
|
||||||
+ return Py_BuildValue( "i", r );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1116,8 +1156,8 @@ PyObject * getPPDList( PyObject * self,
|
|
||||||
|
|
||||||
request = ippNew();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_GET_PPDS;
|
|
||||||
- request->request.op.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_GET_PPDS );
|
|
||||||
+ ippSetRequestId ( request, 1 );
|
|
||||||
|
|
||||||
language = cupsLangDefault();
|
|
||||||
|
|
||||||
@@ -1143,43 +1183,43 @@ PyObject * getPPDList( PyObject * self,
|
|
||||||
if ((response = cupsDoRequest(http, request, "/")) != NULL)
|
|
||||||
{
|
|
||||||
|
|
||||||
- for (attr = response->attrs; attr; attr = attr->next)
|
|
||||||
+ for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response ))
|
|
||||||
{
|
|
||||||
PyObject *dict;
|
|
||||||
char *ppdname = NULL;
|
|
||||||
|
|
||||||
- while (attr && attr->group_tag != IPP_TAG_PRINTER)
|
|
||||||
- attr = attr->next;
|
|
||||||
+ while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
|
|
||||||
+ attr = ippNextAttribute( response );
|
|
||||||
|
|
||||||
if (!attr)
|
|
||||||
break;
|
|
||||||
|
|
||||||
dict = PyDict_New ();
|
|
||||||
|
|
||||||
- for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
|
|
||||||
+ for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response ))
|
|
||||||
{
|
|
||||||
PyObject *val = NULL;
|
|
||||||
|
|
||||||
- if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME)
|
|
||||||
+ if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME)
|
|
||||||
{
|
|
||||||
- ppdname = attr->values[0].string.text;
|
|
||||||
+ ppdname = ippGetString( attr, 0, NULL );
|
|
||||||
|
|
||||||
//sprintf( buf, "print '%s'", ppdname);
|
|
||||||
//PyRun_SimpleString( buf );
|
|
||||||
}
|
|
||||||
|
|
||||||
- else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD)
|
|
||||||
- //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) ||
|
|
||||||
- // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) ||
|
|
||||||
- // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) ||
|
|
||||||
- // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT))
|
|
||||||
+ else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD)
|
|
||||||
+ //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) ||
|
|
||||||
+ // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
|
|
||||||
+ // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
|
|
||||||
+ // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT))
|
|
||||||
{
|
|
||||||
- val = PyObj_from_UTF8(attr->values[0].string.text);
|
|
||||||
+ val = PyObj_from_UTF8(ippGetString( attr, 0, NULL ));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val)
|
|
||||||
{
|
|
||||||
- PyDict_SetItemString (dict, attr->name, val);
|
|
||||||
+ PyDict_SetItemString (dict, ippGetName( attr ), val);
|
|
||||||
Py_DECREF (val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff -up hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors hplip-3.12.6/scan/sane/hpaio.c
|
|
||||||
--- hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors 2012-06-18 12:42:51.000000000 +0200
|
|
||||||
+++ hplip-3.12.6/scan/sane/hpaio.c 2012-07-19 17:12:34.557848760 +0200
|
|
||||||
@@ -47,6 +47,43 @@
|
|
||||||
#define DEBUG_DECLARE_ONLY
|
|
||||||
#include "sanei_debug.h"
|
|
||||||
|
|
||||||
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
|
|
||||||
+#define HAVE_CUPS_1_6 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef HAVE_CUPS_1_6
|
|
||||||
+#define ippGetGroupTag(attr) attr->group_tag
|
|
||||||
+#define ippGetValueTag(attr) attr->value_tag
|
|
||||||
+#define ippGetName(attr) attr->name
|
|
||||||
+#define ippGetString(attr, element, language) attr->values[element].string.text
|
|
||||||
+
|
|
||||||
+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
|
|
||||||
+{
|
|
||||||
+ if (!ipp)
|
|
||||||
+ return (NULL);
|
|
||||||
+ return (ipp->current = ipp->attrs);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
|
|
||||||
+{
|
|
||||||
+ if (!ipp || !ipp->current)
|
|
||||||
+ return (NULL);
|
|
||||||
+ return (ipp->current = ipp->current->next);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
|
|
||||||
+{
|
|
||||||
+ ipp->request.op.operation_id = op;
|
|
||||||
+ return (1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ippSetRequestId( ipp_t *ipp, int request_id )
|
|
||||||
+{
|
|
||||||
+ ipp->request.any.request_id = request_id;
|
|
||||||
+ return (1);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static SANE_Device **DeviceList = NULL;
|
|
||||||
|
|
||||||
static int AddDeviceList(char *uri, char *model, SANE_Device ***pd)
|
|
||||||
@@ -186,8 +223,8 @@ static int GetCupsPrinters(char ***print
|
|
||||||
/* Assemble the IPP request */
|
|
||||||
request = ippNew();
|
|
||||||
|
|
||||||
- request->request.op.operation_id = CUPS_GET_PRINTERS;
|
|
||||||
- request->request.any.request_id = 1;
|
|
||||||
+ ippSetOperation( request, CUPS_GET_PRINTERS );
|
|
||||||
+ ippSetRequestId( request, 1 );
|
|
||||||
|
|
||||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
|
|
||||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
|
|
||||||
@@ -197,20 +234,20 @@ static int GetCupsPrinters(char ***print
|
|
||||||
if ((response = cupsDoRequest(http, request, "/")) == NULL)
|
|
||||||
goto bugout;
|
|
||||||
|
|
||||||
- for (attr = response->attrs; attr != NULL; attr = attr->next)
|
|
||||||
+ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response ))
|
|
||||||
{
|
|
||||||
/* Skip leading attributes until we hit a printer. */
|
|
||||||
- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
|
|
||||||
- attr = attr->next;
|
|
||||||
+ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
|
|
||||||
+ attr = ippNextAttribute( response );
|
|
||||||
|
|
||||||
if (attr == NULL)
|
|
||||||
break;
|
|
||||||
|
|
||||||
- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
|
|
||||||
+ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER)
|
|
||||||
{
|
|
||||||
- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0)
|
|
||||||
+ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0)
|
|
||||||
cnt++;
|
|
||||||
- attr = attr->next;
|
|
||||||
+ attr = ippNextAttribute( response );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attr == NULL)
|
|
@ -1,7 +1,7 @@
|
|||||||
diff -up hplip-3.13.2/Makefile.in.chgrp hplip-3.13.2/Makefile.in
|
diff -up hplip-3.13.6/Makefile.in.chgrp hplip-3.13.6/Makefile.in
|
||||||
--- hplip-3.13.2/Makefile.in.chgrp 2013-02-14 12:40:50.000000000 +0100
|
--- hplip-3.13.6/Makefile.in.chgrp 2013-06-24 10:34:05.350757765 +0200
|
||||||
+++ hplip-3.13.2/Makefile.in 2013-02-14 12:43:46.844042178 +0100
|
+++ hplip-3.13.6/Makefile.in 2013-06-24 10:36:33.104780576 +0200
|
||||||
@@ -8952,18 +8952,18 @@ uninstall-am: uninstall-binPROGRAMS unin
|
@@ -8965,18 +8965,18 @@ uninstall-am: uninstall-binPROGRAMS unin
|
||||||
|
|
||||||
install-dist_hplip_LogDATA:
|
install-dist_hplip_LogDATA:
|
||||||
@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir)
|
@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir)
|
||||||
@ -17,10 +17,10 @@ diff -up hplip-3.13.2/Makefile.in.chgrp hplip-3.13.2/Makefile.in
|
|||||||
@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
|
@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
|
||||||
-@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
-@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
||||||
+#@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
+#@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
||||||
@FULL_BUILD_TRUE@ chmod 1775 $(DESTDIR)$(hplip_tmpdir)
|
@FULL_BUILD_TRUE@ chmod 0775 $(DESTDIR)$(hplip_tmpdir)
|
||||||
@HPLIP_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
|
@HPLIP_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
|
||||||
-@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
-@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
||||||
+#@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
+#@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
|
||||||
@HPLIP_BUILD_TRUE@ chmod 1775 $(DESTDIR)$(hplip_tmpdir)
|
@HPLIP_BUILD_TRUE@ chmod 0775 $(DESTDIR)$(hplip_tmpdir)
|
||||||
|
|
||||||
install-dist_cronDATA:$(dist_cron_DATA)
|
install-data-hook:
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
diff -up hplip-3.13.5/data/rules/56-hpmud.rules.udev-rules hplip-3.13.5/data/rules/56-hpmud.rules
|
diff -up hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules hplip-3.13.6/data/rules/56-hpmud.rules
|
||||||
--- hplip-3.13.5/data/rules/56-hpmud.rules.udev-rules 2013-05-10 12:08:05.000000000 +0200
|
--- hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules 2013-06-24 10:28:19.865301396 +0200
|
||||||
+++ hplip-3.13.5/data/rules/56-hpmud.rules 2013-05-14 19:03:18.003846301 +0200
|
+++ hplip-3.13.6/data/rules/56-hpmud.rules 2013-06-24 10:31:21.283926852 +0200
|
||||||
@@ -11,8 +11,8 @@ LABEL="hpmud_usb_rules"
|
@@ -11,8 +11,6 @@ LABEL="hpmud_usb_rules"
|
||||||
ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0660", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
|
ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0660", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
|
||||||
|
|
||||||
|
|
||||||
-# This rule will add the printer and install plugin
|
-# This rule will add the printer and install plugin
|
||||||
-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}; fi'"
|
-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
|
||||||
+# This rule will install plugin
|
|
||||||
+ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/python /usr/share/hplip/check-plugin.py -m $env{BUSNUM}:$env{DEVNUM} &'"
|
|
||||||
|
|
||||||
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
|
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
|
||||||
ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
|
ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
|
||||||
diff -up hplip-3.13.5/Makefile.in.udev-rules hplip-3.13.5/Makefile.in
|
diff -up hplip-3.13.6/Makefile.in.udev-rules hplip-3.13.6/Makefile.in
|
||||||
--- hplip-3.13.5/Makefile.in.udev-rules 2013-05-14 12:45:14.670392763 +0200
|
--- hplip-3.13.6/Makefile.in.udev-rules 2013-06-24 10:28:19.868301356 +0200
|
||||||
+++ hplip-3.13.5/Makefile.in 2013-05-14 12:47:24.779623958 +0200
|
+++ hplip-3.13.6/Makefile.in 2013-06-24 10:32:21.272134161 +0200
|
||||||
@@ -4369,7 +4369,7 @@ cups_drv = prnt/drv/hpcups.drv
|
@@ -4371,7 +4371,7 @@ cups_drv = prnt/drv/hpcups.drv
|
||||||
@HPLIP_BUILD_TRUE@dist_cron_DATA = data/rules/hplip_cron
|
@HPLIP_BUILD_TRUE@dist_rulessystem_DATA = data/rules/hplip-printer@.service
|
||||||
|
|
||||||
# hpmud.rules
|
# hpmud.rules
|
||||||
-@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
|
-@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
|
||||||
|
29
hplip.spec
29
hplip.spec
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.13.5
|
Version: 3.13.6
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+ and MIT
|
License: GPLv2+ and MIT
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
|
|
||||||
@ -44,10 +44,9 @@ Patch27: hplip-CVE-2010-4267.patch
|
|||||||
Patch28: hplip-wifisetup.patch
|
Patch28: hplip-wifisetup.patch
|
||||||
Patch29: hplip-makefile-chgrp.patch
|
Patch29: hplip-makefile-chgrp.patch
|
||||||
Patch30: hplip-hpaio-localonly.patch
|
Patch30: hplip-hpaio-localonly.patch
|
||||||
Patch31: hplip-ipp-accessors.patch
|
Patch31: hplip-IEEE-1284-4.patch
|
||||||
Patch32: hplip-IEEE-1284-4.patch
|
Patch32: hplip-check.patch
|
||||||
Patch33: hplip-check.patch
|
Patch33: hplip-mkstemp.patch
|
||||||
Patch34: hplip-mkstemp.patch
|
|
||||||
|
|
||||||
%global hpijs_epoch 1
|
%global hpijs_epoch 1
|
||||||
Requires: hpijs%{?_isa} = %{hpijs_epoch}:%{version}-%{release}
|
Requires: hpijs%{?_isa} = %{hpijs_epoch}:%{version}-%{release}
|
||||||
@ -56,8 +55,6 @@ Requires: python-imaging
|
|||||||
Requires: cups
|
Requires: cups
|
||||||
Requires: wget
|
Requires: wget
|
||||||
Requires: dbus-python
|
Requires: dbus-python
|
||||||
# for /etc/cron.daily/hplip_cron
|
|
||||||
Requires: crontabs
|
|
||||||
|
|
||||||
BuildRequires: net-snmp-devel
|
BuildRequires: net-snmp-devel
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
@ -289,17 +286,14 @@ done
|
|||||||
# Pay attention to the SANE localOnly flag in hpaio (bug #743593).
|
# Pay attention to the SANE localOnly flag in hpaio (bug #743593).
|
||||||
%patch30 -p1 -b .hpaio-localonly
|
%patch30 -p1 -b .hpaio-localonly
|
||||||
|
|
||||||
# To build against CUPS-1.6 (launchpad #1026666)
|
|
||||||
%patch31 -p1 -b .ipp-accessors
|
|
||||||
|
|
||||||
# Support IEEE 1284.4 protocol over USB (bug #858861).
|
# Support IEEE 1284.4 protocol over USB (bug #858861).
|
||||||
%patch32 -p1 -b .hplip-IEEE-1284-4
|
%patch31 -p1 -b .hplip-IEEE-1284-4
|
||||||
|
|
||||||
# Various adjustments to make 'hp-check' run more smoothly (bug #683007).
|
# Various adjustments to make 'hp-check' run more smoothly (bug #683007).
|
||||||
%patch33 -p1 -b .check
|
%patch32 -p1 -b .check
|
||||||
|
|
||||||
# Avoid several bugs in createTempFile (bug #925032).
|
# Avoid several bugs in createTempFile (bug #925032).
|
||||||
%patch34 -p1 -b .mkstemp
|
%patch33 -p1 -b .mkstemp
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
@ -441,6 +435,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%{_datadir}/hplip/faxsetup.py*
|
%{_datadir}/hplip/faxsetup.py*
|
||||||
%{_datadir}/hplip/firmware.py*
|
%{_datadir}/hplip/firmware.py*
|
||||||
%{_datadir}/hplip/hpdio.py*
|
%{_datadir}/hplip/hpdio.py*
|
||||||
|
%{_datadir}/hplip/hplip_clean.sh
|
||||||
%{_datadir}/hplip/hpssd*
|
%{_datadir}/hplip/hpssd*
|
||||||
%{_datadir}/hplip/info.py*
|
%{_datadir}/hplip/info.py*
|
||||||
%{_datadir}/hplip/__init__.py*
|
%{_datadir}/hplip/__init__.py*
|
||||||
@ -476,7 +471,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%dir %attr(0774,root,lp) %{_localstatedir}/log/hp
|
%dir %attr(0774,root,lp) %{_localstatedir}/log/hp
|
||||||
%dir %attr(1774,root,lp) %{_localstatedir}/log/hp/tmp
|
%dir %attr(1774,root,lp) %{_localstatedir}/log/hp/tmp
|
||||||
%dir %attr(0775,root,lp) %{_localstatedir}/run/hplip
|
%dir %attr(0775,root,lp) %{_localstatedir}/run/hplip
|
||||||
%config(noreplace) %{_sysconfdir}/cron.daily/hplip_cron
|
|
||||||
|
|
||||||
%files common
|
%files common
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
@ -531,6 +525,11 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 24 2013 Jiri Popelka <jpopelka@redhat.com> - 3.13.6-1
|
||||||
|
- 3.13.6
|
||||||
|
- hplip-ipp-accessors.patch merged upstream
|
||||||
|
- /etc/cron.daily/hplip_cron -> /usr/share/hplip/hplip_clean.sh
|
||||||
|
|
||||||
* Wed May 29 2013 Tim Waugh <twaugh@redhat.com> - 3.13.5-2
|
* Wed May 29 2013 Tim Waugh <twaugh@redhat.com> - 3.13.5-2
|
||||||
- Avoid several bugs in createTempFile (bug #925032).
|
- Avoid several bugs in createTempFile (bug #925032).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user