|
|
529334a |
diff -up cups-1.4.4/scheduler/conf.c.serverbin-compat cups-1.4.4/scheduler/conf.c
|
|
|
529334a |
--- cups-1.4.4/scheduler/conf.c.serverbin-compat 2010-04-23 19:56:34.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/conf.c 2010-09-15 13:20:41.339960335 +0100
|
|
|
529334a |
@@ -488,6 +488,9 @@ cupsdReadConfiguration(void)
|
|
|
a1088d0 |
cupsdClearString(&ServerName);
|
|
|
a1088d0 |
cupsdClearString(&ServerAdmin);
|
|
|
69289fd |
cupsdSetString(&ServerBin, CUPS_SERVERBIN);
|
|
|
69289fd |
+#ifdef __x86_64__
|
|
|
69289fd |
+ cupsdSetString(&ServerBin_compat, "/usr/lib64/cups");
|
|
|
69289fd |
+#endif /* __x86_64__ */
|
|
|
69289fd |
cupsdSetString(&RequestRoot, CUPS_REQUESTS);
|
|
|
69289fd |
cupsdSetString(&CacheDir, CUPS_CACHEDIR);
|
|
|
69289fd |
cupsdSetString(&DataDir, CUPS_DATADIR);
|
|
|
529334a |
@@ -1318,7 +1321,12 @@ cupsdReadConfiguration(void)
|
|
|
69289fd |
* Read the MIME type and conversion database...
|
|
|
69289fd |
*/
|
|
|
69289fd |
|
|
|
69289fd |
+#ifdef __x86_64__
|
|
|
69289fd |
+ snprintf(temp, sizeof(temp), "%s/filter:%s/filter", ServerBin,
|
|
|
69289fd |
+ ServerBin_compat);
|
|
|
cb06f24 |
+#else
|
|
|
69289fd |
snprintf(temp, sizeof(temp), "%s/filter", ServerBin);
|
|
|
69289fd |
+#endif
|
|
|
cb06f24 |
snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
|
|
|
69289fd |
|
|
|
cb06f24 |
MimeDatabase = mimeLoadTypes(NULL, mimedir);
|
|
|
529334a |
diff -up cups-1.4.4/scheduler/conf.h.serverbin-compat cups-1.4.4/scheduler/conf.h
|
|
|
529334a |
--- cups-1.4.4/scheduler/conf.h.serverbin-compat 2010-04-23 19:56:34.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/conf.h 2010-09-15 13:20:41.340959464 +0100
|
|
|
529334a |
@@ -105,6 +105,10 @@ VAR char *ConfigurationFile VALUE(NULL)
|
|
|
69289fd |
/* Root directory for scheduler */
|
|
|
69289fd |
*ServerBin VALUE(NULL),
|
|
|
69289fd |
/* Root directory for binaries */
|
|
|
69289fd |
+#ifdef __x86_64__
|
|
|
69289fd |
+ *ServerBin_compat VALUE(NULL),
|
|
|
69289fd |
+ /* Compat directory for binaries */
|
|
|
69289fd |
+#endif /* __x86_64__ */
|
|
|
69289fd |
*StateDir VALUE(NULL),
|
|
|
69289fd |
/* Root directory for state data */
|
|
|
69289fd |
*RequestRoot VALUE(NULL),
|
|
|
529334a |
diff -up cups-1.4.4/scheduler/env.c.serverbin-compat cups-1.4.4/scheduler/env.c
|
|
|
529334a |
--- cups-1.4.4/scheduler/env.c.serverbin-compat 2009-06-15 18:13:52.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/env.c 2010-09-15 13:20:41.341959587 +0100
|
|
|
529334a |
@@ -87,8 +87,13 @@ cupsdInitEnv(void)
|
|
|
69289fd |
cupsdSetEnv("LD_LIBRARY_PATH", NULL);
|
|
|
69289fd |
cupsdSetEnv("LD_PRELOAD", NULL);
|
|
|
69289fd |
cupsdSetEnv("NLSPATH", NULL);
|
|
|
69289fd |
+#ifdef __x86_64__
|
|
|
69289fd |
+ cupsdSetEnvf("PATH", "%s/filter:%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
|
|
|
69289fd |
+ ":/bin:/usr/bin", ServerBin, ServerBin_compat);
|
|
|
69289fd |
+#else /* ! defined(__x86_64__) */
|
|
|
69289fd |
cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
|
|
|
69289fd |
":/bin:/usr/bin", ServerBin);
|
|
|
69289fd |
+#endif
|
|
|
69289fd |
cupsdSetEnv("SERVER_ADMIN", ServerAdmin);
|
|
|
69289fd |
cupsdSetEnv("SHLIB_PATH", NULL);
|
|
|
69289fd |
cupsdSetEnv("SOFTWARE", CUPS_MINIMAL);
|
|
|
529334a |
diff -up cups-1.4.4/scheduler/ipp.c.serverbin-compat cups-1.4.4/scheduler/ipp.c
|
|
|
529334a |
--- cups-1.4.4/scheduler/ipp.c.serverbin-compat 2010-04-23 19:56:34.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/ipp.c 2010-09-15 13:20:41.359835378 +0100
|
|
|
529334a |
@@ -2615,9 +2615,18 @@ add_printer(cupsd_client_t *con, /* I -
|
|
|
c07f027 |
* Could not find device in list!
|
|
|
c07f027 |
*/
|
|
|
c07f027 |
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
cb06f24 |
+ snprintf(srcfile, sizeof(srcfile), "%s/backend/%s", ServerBin_compat,
|
|
|
4f25cbd |
+ scheme);
|
|
|
c07f027 |
+ if (access(srcfile, X_OK))
|
|
|
cb06f24 |
+ {
|
|
|
c07f027 |
+#endif /* __x86_64__ */
|
|
|
cb06f24 |
send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad device-uri scheme \"%s\"!"),
|
|
|
cb06f24 |
scheme);
|
|
|
c07f027 |
return;
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
cb06f24 |
+ }
|
|
|
c07f027 |
+#endif /* __x86_64__ */
|
|
|
c07f027 |
}
|
|
|
c07f027 |
}
|
|
|
c07f027 |
|
|
|
529334a |
diff -up cups-1.4.4/scheduler/job.c.serverbin-compat cups-1.4.4/scheduler/job.c
|
|
|
529334a |
--- cups-1.4.4/scheduler/job.c.serverbin-compat 2010-03-30 23:07:33.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/job.c 2010-09-15 13:20:41.366836134 +0100
|
|
|
ca53cd4 |
@@ -972,8 +972,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
|
|
c07f027 |
i ++, filter = (mime_filter_t *)cupsArrayNext(filters))
|
|
|
c07f027 |
{
|
|
|
c07f027 |
if (filter->filter[0] != '/')
|
|
|
c07f027 |
- snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
|
|
|
c07f027 |
- filter->filter);
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
|
|
|
c07f027 |
+ filter->filter);
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
c07f027 |
+ if (access(command, F_OK))
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ snprintf(command, sizeof(command), "%s/filter/%s",
|
|
|
c07f027 |
+ ServerBin_compat, filter->filter);
|
|
|
c07f027 |
+ if (!access(command, F_OK))
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ /* Not in the correct directory, but found it in the compat
|
|
|
c07f027 |
+ * directory. Issue a warning. */
|
|
|
c07f027 |
+ cupsdLogMessage(CUPSD_LOG_INFO,
|
|
|
c07f027 |
+ "Filter '%s' not in %s/filter!",
|
|
|
c07f027 |
+ filter->filter, ServerBin);
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+ else
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ /* Not in the compat directory either; make any error
|
|
|
c07f027 |
+ * messages use the correct directory name then. */
|
|
|
c07f027 |
+ snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
|
|
|
c07f027 |
+ filter->filter);
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+#endif /* __x86_64__ */
|
|
|
02266be |
+ }
|
|
|
c07f027 |
else
|
|
|
c07f027 |
strlcpy(command, filter->filter, sizeof(command));
|
|
|
c07f027 |
|
|
|
ca53cd4 |
@@ -1119,6 +1143,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
|
|
a1088d0 |
cupsdClosePipe(job->print_pipes);
|
|
|
a1088d0 |
cupsdClosePipe(job->back_pipes);
|
|
|
a1088d0 |
cupsdClosePipe(job->side_pipes);
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
c07f027 |
+ if (access(command, F_OK))
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ snprintf(command, sizeof(command), "%s/backend/%s", ServerBin_compat,
|
|
|
c07f027 |
+ method);
|
|
|
c07f027 |
+ if (!access(command, F_OK))
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ /* Not in the correct directory, but we found it in the compat
|
|
|
c07f027 |
+ * directory. Issue a warning. */
|
|
|
c07f027 |
+ cupsdLogMessage(CUPSD_LOG_INFO,
|
|
|
c07f027 |
+ "Backend '%s' not in %s/backend!", method,
|
|
|
c07f027 |
+ ServerBin);
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+ else
|
|
|
c07f027 |
+ {
|
|
|
c07f027 |
+ /* Not in the compat directory either; make any error
|
|
|
c07f027 |
+ messages use the correct directory name then. */
|
|
|
c07f027 |
+ snprintf(command, sizeof(command), "%s/backend/%s", ServerBin,
|
|
|
c07f027 |
+ method);
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+ }
|
|
|
c07f027 |
+#endif /* __x86_64__ */
|
|
|
c07f027 |
|
|
|
a1088d0 |
close(job->status_pipes[1]);
|
|
|
a1088d0 |
job->status_pipes[1] = -1;
|
|
|
529334a |
diff -up cups-1.4.4/scheduler/printers.c.serverbin-compat cups-1.4.4/scheduler/printers.c
|
|
|
529334a |
--- cups-1.4.4/scheduler/printers.c.serverbin-compat 2010-04-23 21:53:38.000000000 +0100
|
|
|
529334a |
+++ cups-1.4.4/scheduler/printers.c 2010-09-15 13:21:39.627960657 +0100
|
|
|
529334a |
@@ -1059,9 +1059,19 @@ cupsdLoadAllPrinters(void)
|
|
|
69289fd |
* Backend does not exist, stop printer...
|
|
|
69289fd |
*/
|
|
|
69289fd |
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
69289fd |
+ snprintf(line, sizeof(line), "%s/backend/%s", ServerBin_compat,
|
|
|
69289fd |
+ p->device_uri);
|
|
|
ca53cd4 |
+ if (access(line, 0))
|
|
|
69289fd |
+ {
|
|
|
69289fd |
+#endif /* __x86_64__ */
|
|
|
69289fd |
+
|
|
|
69289fd |
p->state = IPP_PRINTER_STOPPED;
|
|
|
69289fd |
snprintf(p->state_message, sizeof(p->state_message),
|
|
|
69289fd |
"Backend %s does not exist!", line);
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
69289fd |
+ }
|
|
|
c07f027 |
+#endif /* __x86_64__ */
|
|
|
69289fd |
}
|
|
|
69289fd |
}
|
|
|
c07f027 |
|
|
|
529334a |
@@ -3603,6 +3613,14 @@ add_printer_filter(
|
|
|
69289fd |
|
|
|
a1088d0 |
if (stat(filename, &fileinfo))
|
|
|
69289fd |
{
|
|
|
c07f027 |
+#ifdef __x86_64__
|
|
|
69289fd |
+ snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat,
|
|
|
69289fd |
+ program);
|
|
|
ca53cd4 |
+ if (stat(filename, &fileinfo))
|
|
|
ca53cd4 |
+ {
|
|
|
529334a |
+ snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin,
|
|
|
529334a |
+ program);
|
|
|
69289fd |
+#endif /* __x86_64__ */
|
|
|
ca53cd4 |
memset(&fileinfo, 0, sizeof(fileinfo));
|
|
|
ca53cd4 |
|
|
|
69289fd |
snprintf(p->state_message, sizeof(p->state_message),
|
|
|
529334a |
@@ -3611,6 +3629,9 @@ add_printer_filter(
|
|
|
ca53cd4 |
cupsdSetPrinterReasons(p, "+cups-missing-filter-warning");
|
|
|
c07f027 |
|
|
|
69289fd |
cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
|
|
|
69289fd |
+#ifdef __x86_64__
|
|
|
ca53cd4 |
+ }
|
|
|
69289fd |
+#endif /* __x86_64__ */
|
|
|
69289fd |
}
|
|
|
c07f027 |
|
|
|
a1088d0 |
/*
|