Your message dated Sat, 05 Jul 2014 11:19:26 +0200
with message-id <1404551966.24448.10.camel@merkur>
and subject line Debian bug #656660
has caused the Debian Bug report #656660,
regarding foomatic-rip: dying with "Cannot find a writable temp dir"
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
656660: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656660
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: foomatic-filters
Version: 4.0.5-6+squeeze1
Severity: important
When running lenny, I have been using foomatic-rip with lprng.
On upgrading to squeeze, foomatic-rip fails with the message:
process dying with "Cannot find a writable temp dir".
The error seems to be in function "temp_dir()" in source file "util.c",
The search for a temporary-file directory, encounters a
premature NULL pointer (from getenv) which terminates the search.
The undeclared variable "P_tmpdir" also seems to be a NULL pointer.
Also, in foomatic-filters_4.0.9 (from unstable), the declaration of
dirs lacks a terminating NULL.
I observe that this code is not used by the CUPS printing system,
but it is required by lprng. CUPS passes data to foomatic rip as
command-line arguments; lprng uses a pipe.
I don't know how to make patches properly (I apologise),
so I'll just put my code for temp_dir() here.
It works when I test it.
---------------------------------
const char * temp_dir()
{
static const char *tmpdir = NULL;
if (!tmpdir)
{
/*
* getenv returns NULL if no match & prematurely terminates search;
* remove undeclared NULL pointer, P_tmpdir, from the list;
* terminating NULL is required to stop search.
*/
const char *dirs[] = { getenv("TMPDIR"), "/tmp", NULL };
const char **dir;
/* The fix ... */
if ( dirs[0] == NULL ) dirs[0]=" ";
for (dir = dirs; *dir; dir++)
if (access(*dir, W_OK) == 0) {
tmpdir = *dir;
break;
}
/*
* alternative to the above:
* WARNING : not tested
const char env_tmp = getenv("TMPDIR"), sys_tmp="/tmp";
if ( access(env_tmp, W_OK) == 0 )
tmpdir = env_tmp;
else if ( access(sys_tmp, W_OK) == 0 )
tmpdir = sys_tmp;
*/
if (tmpdir)
{
_log("Storing temporary files in %s\n", tmpdir);
setenv("TMPDIR", tmpdir, 1); /* for child processes */
}
else
rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS,
"Cannot find a writable temp dir.");
}
return tmpdir;
}
------------------------------
-- System Information:
Debian Release: 6.0.3
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages foomatic-filters depends on:
ii bash 4.1-3 The GNU Bourne Again SHell
ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii perl 5.10.1-17squeeze2 Larry Wall's Practical Extraction
ii ucf 3.0025+nmu1 Update Configuration File: preserv
Versions of packages foomatic-filters recommends:
ii a2ps 1:4.14-1.1 GNU a2ps - 'Anything to PostScript
ii enscript 1.6.5.2-1 converts text to Postscript, HTML
pn foomatic-db-engine <none> (no description available)
ii ghostscript 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF
ii lprng [lpr] 3.8.A-3 lpr/lpd printer spooling system
ii mpage 2.5.6-1 print multiple pages per sheet on
ii poppler-utils 0.12.4-1.2 PDF utilitites (based on libpopple
foomatic-filters suggests no packages.
-- debconf-show failed
--- End Message ---
--- Begin Message ---
Hello,
I close this bug now.
If the error still exists feel free to reopen this bug.
CU
Jörg
--
pgp Fingerprint: 7D13 3C60 0A10 DBE1 51F8 EBCB 422B 44B0 BE58 1B6E
pgp Key: BE581B6E
CAcert Key S/N: 0E:D4:56
Jörg Frings-Fürst
D-54526 Niederkail
Threema: SYR8SJXB
IRC: [email protected]
[email protected]
signature.asc
Description: This is a digitally signed message part
--- End Message ---