NetBSD Problem Report #38037
From paul@whooppee.com Fri Feb 15 14:42:27 2008
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id F205D63B293
for <gnats-bugs@gnats.NetBSD.org>; Fri, 15 Feb 2008 14:42:26 +0000 (UTC)
Message-Id: <20080215144225.E349C59EB@quicky.whooppee.com>
Date: Fri, 15 Feb 2008 06:42:25 -0800 (PST)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@gnats.NetBSD.org
Subject: print/magicfilter - ghostscript invoked without explicit tempdir
X-Send-Pr-Version: 3.95
>Number: 38037
>Category: pkg
>Synopsis: print/magicfilter - ghostscript invoked without explicit tempdir
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: tron
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 15 14:45:00 +0000 2008
>Closed-Date: Fri Feb 15 15:51:02 +0000 2008
>Last-Modified: Fri Feb 15 15:51:18 +0000 2008
>Originator: Paul Goyette
>Release: NetBSD 4.99.53
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------
>Environment:
System: NetBSD quicky.whooppee.com 4.99.53 NetBSD 4.99.53 (QUICKY (ASUS M2N32 WS) 2008-02-07 00:51:46 UTC) #7: Wed Feb 6 17:04:39 PST 2008 paul@quicky.whooppee.com:/usr/obj/objdir/amd64/sys/arch/amd64/compile/QUICKY amd64
Architecture: x86_64
Machine: amd64
>Description:
magicfilter installs filters that invoke ghostscript for processing
postscript files. When magicfilter is used as a filter for lpd and
a postscript file is printed, ghostscript fails to open its temp
file and spits out an error "**** Unable to open the initial device,
quitting."
>How-To-Repeat:
Install print/magicfilter using all defaults, create a printer
that specifies :if=/usr/pkg/libexec/magicfilter/#blah#: and then
print a postscript file. (#blah# is whatever filter you want to
use for your printer!)
>Fix:
The following patch updates the configure script to set the TEMP
environment variable to /tmp when executing ghostscript:
--- configure.orig 2008-02-15 06:30:51.000000000 -0800
+++ configure 2008-02-15 06:25:16.000000000 -0800
@@ -930,7 +930,7 @@
EOF
cat >> confdefs.h <<EOF
-#define PATH_GHOSTSCRIPT $GHOSTSCRIPT
+#define PATH_GHOSTSCRIPT TEMP=/tmp $GHOSTSCRIPT
EOF
fi
Also need to provide checksum in pkgsrc/print/magicfilter/distinfo:
SHA1 (patches/patch-ad) = f8a338ba1760962e23f0576cbffd9bd68aae0c7a
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: tron@narn.netbsd.org
Responsible-Changed-When: Fri, 15 Feb 2008 15:35:04 +0000
Responsible-Changed-Why:
I'll handle this PR.
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38037 CVS commit: pkgsrc/print/magicfilter
Date: Fri, 15 Feb 2008 15:47:56 +0000 (UTC)
Module Name: pkgsrc
Committed By: tron
Date: Fri Feb 15 15:47:56 UTC 2008
Modified Files:
pkgsrc/print/magicfilter: Makefile
Log Message:
Set temporary directory before invoking Ghostscript to avoid random
failures when attempting to print Postscript files. Bump package
revision because of this fix.
Based on a patch contributed by Paul Goyette in PR pkg/38037.
To generate a diff of this commit:
cvs rdiff -r1.51 -r1.52 pkgsrc/print/magicfilter/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: tron@narn.netbsd.org
State-Changed-When: Fri, 15 Feb 2008 15:51:02 +0000
State-Changed-Why:
I've fixed it in a more portable way. Thanks a lot for the bug report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.