NetBSD Problem Report #39650

From www@NetBSD.org  Mon Sep 29 15:08:44 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 0FA2763BD01
	for <gnats-bugs@gnats.netbsd.org>; Mon, 29 Sep 2008 15:08:44 +0000 (UTC)
Message-Id: <20080929150843.D35FD63BCFE@narn.NetBSD.org>
Date: Mon, 29 Sep 2008 15:08:43 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: print/mpage fails on Solaris due to wrong papersize
X-Send-Pr-Version: www-1.0

>Number:         39650
>Category:       pkg
>Synopsis:       print/mpage fails on Solaris due to wrong papersize
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 29 15:10:00 +0000 2008
>Closed-Date:    Sat Oct 04 14:51:44 +0000 2008
>Last-Modified:  Sat Oct 04 14:55:01 +0000 2008
>Originator:     Jörn Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
SunOS spare250 5.10 Generic_137111-03 sun4u sparc SUNW,Ultra-250
SunOS spare4200 5.10 Generic_120012-14 i86pc i386 i86pc
>Description:
The Makefile of print/mpage changes the macro PAGESIZE to either A4_PAPER or LETTER_PAPER:

.if ${PAPERSIZE} == "A4"
MAKE_ENV+=      PAGESIZE=PAGE_A4
.elif ((${PAPERSIZE} == "Letter") || (${PAPERSIZE} == "Letterdj"))
MAKE_ENV+=      PAGESIZE=PAGE_LETTER
.endif

At least under Solaris 2.8/Sparc and Solaris 2.10/i86pc this causes mpage to segfault immediately:

mpage: ignoring unknown paper type: PAGE_A4
Segmentation fault (core dumped)

Otherwise, it might generate dubious PostScript code.
>How-To-Repeat:

>Fix:
The correct values are "A4" and "Letter" respectively. Replace "PAGE_A4" with "A4" and "PAGE_LETTER" with "Letter" in the Makefile.

I wonder, what "Letterdj" is supposed to be. Something for a "DeskJet"? Personally, I would drop it.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: reed@NetBSD.org
State-Changed-When: Sat, 04 Oct 2008 14:51:44 +0000
State-Changed-Why:
Closed. Thank you for the PR.
Full details in the CVS commit message.


From: "Jeremy C. Reed" <reed@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39650 CVS commit: pkgsrc/print/mpage
Date: Sat,  4 Oct 2008 14:51:16 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	reed
 Date:		Sat Oct  4 14:51:16 UTC 2008

 Modified Files:
 	pkgsrc/print/mpage: Makefile

 Log Message:
 Fix PR 39650. I now realize I had broken this myself back in March 2007
 when I updated to 2.5.5.

 Use the correct papersize names. And bump PKGREVISION.

 It now just passes along the name set in pkgsrc PAPERSIZE.
 It has no checking so could still have wrong value.
 I didn't check for "Letterdj" so that may cause problem as mpage
 doesn't know it. For the record this is what mpage knows:

 Mpage knows about the following paper types:
 Type           Points Wide Points High
 -------------- ----------- -----------
 Letter                 612         792
 LetterSmall            612         792
 Tabloid                792        1224
 Ledger                1224         792
 Legal                  612        1008
 Statement              396         612
 Executive              540         720
 A0                    2384        3368
 A1                    1684        2384
 A2                    1192        1684
 A3                     842        1192
 A4                     596         842
 A4Small                595         842
 A5                     420         595
 B4                     729        1032
 B5                     516         729
 Folio                  612         936
 Quarto                 610         780
 10x14                  720        1008


 To generate a diff of this commit:
 cvs rdiff -r1.19 -r1.20 pkgsrc/print/mpage/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.