NetBSD Problem Report #48479

From makoto@t-105.i.ki.nu  Wed Dec 25 03:06:11 2013
Return-Path: <makoto@t-105.i.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 699C5A6469
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Dec 2013 03:06:11 +0000 (UTC)
Message-Id: <201312250306.rBP3687v029664@t-105.i.ki.nu>
Date: Wed, 25 Dec 2013 12:06:08 +0900 (JST)
From: Makoto.Fujiwara@t-105.i.ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: [PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl
X-Send-Pr-Version: 3.95

>Number:         48479
>Category:       pkg
>Synopsis:       [PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mef
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 25 03:10:00 +0000 2013
>Closed-Date:    Sun May 01 05:55:59 +0000 2016
>Last-Modified:  Sun May 01 05:55:59 +0000 2016
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.1.2
>Organization:
KINU Corporation
>Environment:


System: NetBSD t-105 6.1.2 NetBSD 6.1.2 (GENERIC) amd64
Architecture: x86_64
Machine: amd64
>Description:
For ghostscript, we have following three case:
   1 PKG_OPTIONS.gs_type=ghostscript-agpl
   2 PKG_OPTIONS.gs_type=ghostscript-gpl
   3 None of both above are set
     (defaults to 2 by following line in print/ghostscript/Makefile)
      PKG_SUGGESTED_OPTIONS+=         ghostscript-gpl
But ghostscript-cidfonts will package -gpl side even when option 1 is selected.
>How-To-Repeat:
(set one of three listed above)

cd pkgsrc/fonts/ghostscript-cidfonts

pkg_delete -r ghostscript-agpl
pkg_delete -r ghostscript-gpl
make clean-depends
   (You may notice case 1 will clean -gpl side at this stage)
make clean && make package
>Fix:
Index: fonts/ghostscript-cidfonts/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/ghostscript-cidfonts/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- fonts/ghostscript-cidfonts/Makefile	16 Mar 2013 23:02:18 -0000	1.18
+++ fonts/ghostscript-cidfonts/Makefile	25 Dec 2013 03:04:55 -0000
@@ -10,10 +10,9 @@
 COMMENT=	CIDFont resources for Ghostscript

 DEPENDS+=	adobe-cidfonts>=20000901:../../fonts/adobe-cidfonts
-DEPENDS+=	ghostscript-gpl-[0-9]*:../../print/ghostscript-gpl
+DEPENDS+=	ghostscript-[0-9]*:../../print/ghostscript

 GHOSTSCRIPT_REQD=	9.05
-.include	"../../print/ghostscript-gpl/Makefile.common"

 ADOBE_RESOURCEDIR=	${PREFIX}/share/Adobe/Resource
 GS_RESOURCEDIR=		${PREFIX}/share/ghostscript/${GS_VERSION}/Resource

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/48479: [PATCH] ghostscript-cidfonts doesn't switch correctly
 ghostscript-agpl and -gpl
Date: Wed, 25 Dec 2013 11:28:22 +0100

 On Wed, Dec 25, 2013 at 03:10:00AM +0000, Makoto.Fujiwara@t-105.i.ki.nu wrote:
 > >Number:         48479
 > >Category:       pkg
 > >Synopsis:       [PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl

 Looks correct, please commit.

 Thanks,
  Thomas

State-Changed-From-To: open->closed
State-Changed-By: mef@NetBSD.org
State-Changed-When: Wed, 25 Dec 2013 12:13:56 +0000
State-Changed-Why:
Patch committed, thanks wiz@ for review.


From: "Makoto Fujiwara" <mef@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48479 CVS commit: pkgsrc/fonts/ghostscript-cidfonts
Date: Wed, 25 Dec 2013 12:12:37 +0000

 Module Name:	pkgsrc
 Committed By:	mef
 Date:		Wed Dec 25 12:12:36 UTC 2013

 Modified Files:
 	pkgsrc/fonts/ghostscript-cidfonts: Makefile

 Log Message:
 PR pkg/48479 Fix problem of:
 ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl
 Thanks wiz@.


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 pkgsrc/fonts/ghostscript-cidfonts/Makefile

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

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48479: [PATCH] ghostscript-cidfonts doesn't switch correctly
 ghostscript-agpl and -gpl
Date: Fri, 27 Dec 2013 20:41:34 +0000

 On Wed, Dec 25, 2013 at 03:10:00AM +0000, Makoto.Fujiwara@t-105.i.ki.nu wrote:
  > -DEPENDS+=	ghostscript-gpl-[0-9]*:../../print/ghostscript-gpl
  > +DEPENDS+=	ghostscript-[0-9]*:../../print/ghostscript

 I think this is one I intentionally left for someone else to review
 when I first split the gs packages a few months ago. Thanks for taking
 care of it.

  >  GHOSTSCRIPT_REQD=	9.05
  > -.include	"../../print/ghostscript-gpl/Makefile.common"

 Can you update its used-by comment?

 Also, doesn't ghostscript-cidfonts-ryumin require the same changes?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48479: [PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl
Date: Sat, 28 Dec 2013 10:20:26 +0900

 > Can you update its used-by comment?
 Thanks for advice, I have committed (sorry not mentioning as just on comment line).

 Honestly speaking, ghostscript-cidfonts-ryumin is
 tough to resolve, I'm working on it, but anybody can do it before I
 fix it, thanks.
 ---
 Makoto Fujiwara

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48479: [PATCH] ghostscript-cidfonts doesn't switch correctly
 ghostscript-agpl and -gpl
Date: Sun, 29 Dec 2013 20:05:57 +0000

 On Sat, Dec 28, 2013 at 01:25:00AM +0000, Makoto Fujiwara wrote:
  >  > Can you update its used-by comment?
  >  Thanks for advice, I have committed (sorry not mentioning as just on comment line).

 Thanks.

  >  Honestly speaking, ghostscript-cidfonts-ryumin is
  >  tough to resolve, I'm working on it, but anybody can do it before I
  >  fix it, thanks.

 Should we leave this PR open (or actually I guess reopen it) to make
 sure it doesn't get forgotten?

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: closed->open
State-Changed-By: mef@NetBSD.org
State-Changed-When: Sun, 29 Dec 2013 22:41:27 +0000
State-Changed-Why:
companion package ghostscript-cidfonts-ryumin not fixed yet.
Thanks dholland@


Responsible-Changed-From-To: pkg-manager->mef
Responsible-Changed-By: mef@NetBSD.org
Responsible-Changed-When: Sun, 29 Dec 2013 22:43:16 +0000
Responsible-Changed-Why:
I will be (kind of) responsible, thank you.


From: "Makoto Fujiwara" <mef@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48479 CVS commit: pkgsrc/fonts/ghostscript-cidfonts-ryumin
Date: Thu, 9 Jan 2014 08:08:56 +0000

 Module Name:	pkgsrc
 Committed By:	mef
 Date:		Thu Jan  9 08:08:56 UTC 2014

 Modified Files:
 	pkgsrc/fonts/ghostscript-cidfonts-ryumin: Makefile PLIST
 	pkgsrc/fonts/ghostscript-cidfonts-ryumin/files: cidfmap-adobe

 Log Message:
 Related change with PR pkg/48479 (of ghostscript-cidfonts):
 Makefile
   Adjust for splitting ghostscript-{,a}gpl done before.
   Convert LICENSE from generic-nonlicense to 2-clause-bsd.
   Set MAINTAINER, to notice-quick-if-fail.
 PLIST
   Convert path from ${PKGVERSION} to ${PKGVERSION_NOREV}.
 files/cidfmap-adobe
   Add one entry
    /Ryumin-Light          /WadaMin-Regular
 (NO PKGREVISION++, binaries may not have been built yet).
 Thanks dholland@ for taking care of -agpl and -gpl split.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 pkgsrc/fonts/ghostscript-cidfonts-ryumin/Makefile
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/fonts/ghostscript-cidfonts-ryumin/PLIST
 cvs rdiff -u -r1.1 -r1.2 \
     pkgsrc/fonts/ghostscript-cidfonts-ryumin/files/cidfmap-adobe

 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: dholland@NetBSD.org
State-Changed-When: Fri, 10 Jan 2014 18:29:42 +0000
State-Changed-Why:
fixed, thanks


State-Changed-From-To: closed->open
State-Changed-By: obache@NetBSD.org
State-Changed-When: Sat, 11 Jan 2014 09:13:28 +0000
State-Changed-Why:
broken

make: "/usr/pkgsrc/fonts/ghostscript-cidfonts/Makefile" line 29: Malformed conditional (!empty(PKG_OPTIONS.gs_type:Mghostscript-agpl))
make: Fatal errors encountered -- cannot continue

make: stopped in /usr/pkgsrc/fonts/ghostscript-cidfonts


From: Makoto Fujiwara <makoto@ki.nu>
To: obache@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/48479 ([PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl)
Date: Sun, 12 Jan 2014 12:23:30 +0900

 > make: "/usr/pkgsrc/fonts/ghostscript-cidfonts/Makefile" line 29:
 >   Malformed conditional (!empty(PKG_OPTIONS.gs_type:Mghostscript-agpl))

 I was trying to reproduce above, but not succeeded yet.
 Would you help me to reproduce ?  (OS, /etc/mk.conf or so, and installed
 package related to ghostscript and fonts/adobe* ).

 Thanks a lot,
 ---
 Makoto Fujiwara



From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48479 ([PATCH] ghostscript-cidfonts doesn't switch correctly
 ghostscript-agpl and -gpl)
Date: Sun, 12 Jan 2014 18:25:55 +0900

 On Sun, 12 Jan 2014 12:25:00 +0900, Makoto Fujiwara <makoto@ki.nu> wrote:

 >  > make: "/usr/pkgsrc/fonts/ghostscript-cidfonts/Makefile" line 29:
 >  >   Malformed conditional (!empty(PKG_OPTIONS.gs_type:Mghostscript-agpl))
 > I was trying to reproduce above, but not succeeded yet.
 >  Would you help me to reproduce ?  (OS, /etc/mk.conf or so, and installed
 >  package related to ghostscript and fonts/adobe* ).

 Because it is not defined yet.
 Please try to do old bmake (in NetBSD-5), or put PKG_OPTIONS.gs_type in /etc/mk.conf.
 Former will be error, and later will not work as expected.

   Newer bmake recognize that not yet defined variable as empty, but old bmake does not.
   Many people think that it is improvement, but I fee it is a regression,
   because this kind of failure will not be caught.

 You must include bsd.prefs.mk before using configuration switch.
 Even if it is included, following case is not handled well:
 * PKG_DEFAULT_OPTIONS= ghostscript-agpl
 * installed binary of ghostscript is configured as ghostscript-agpl,
    but mk.conf is not

 -- 
 OBATA Akio / obache@NetBSD.org

From: Makoto Fujiwara <makoto@ki.nu>
To: "OBATA Akio" <obache@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/48479 ([PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl)
Date: Mon, 13 Jan 2014 09:50:17 +0900

 Thank you, obache. I am testing following patch.

 Index: Makefile
 ===================================================================
 RCS file: /cvs/cvsroot/pkgsrc/fonts/ghostscript-cidfonts/Makefile,v
 retrieving revision 1.21
 diff -u -r1.21 Makefile
 --- Makefile	9 Jan 2014 02:39:42 -0000	1.21
 +++ Makefile	13 Jan 2014 00:47:33 -0000
 @@ -10,7 +10,6 @@
  COMMENT=	CIDFont resources for Ghostscript

  DEPENDS+=	adobe-cidfonts>=20000901:../../fonts/adobe-cidfonts
 -DEPENDS+=	ghostscript-[0-9]*:../../print/ghostscript

  GHOSTSCRIPT_REQD=	9.05

 @@ -26,10 +25,16 @@

  REQD_DIRS=		${GS_RESOURCEDIR} ${GS_RESOURCEDIR}/CIDFont

 +.include	"../../mk/bsd.prefs.mk"
 +# work around for old bmake (for example, NetBSD-5.1) http://gnats.netbsd.org/48479
 +PKG_OPTIONS.gs_type?= ghostscript-agpl
 +
  .if   !empty(PKG_OPTIONS.gs_type:Mghostscript-agpl)
  . include       "../../print/ghostscript-agpl/Makefile.common"
 +DEPENDS+=	ghostscript-agpl-[0-9]*:../../print/ghostscript-agpl
  .else
  . include       "../../print/ghostscript-gpl/Makefile.common"
 +DEPENDS+=	ghostscript-gpl-[0-9]*:../../print/ghostscript-gpl
  .endif

  do-install:	# nothing

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48479 ([PATCH] ghostscript-cidfonts doesn't switch correctly
 ghostscript-agpl and -gpl)
Date: Mon, 13 Jan 2014 18:25:31 +0900

 Probably, related to origin of issue...

 Why print/ghostscript-{gpl,agpl} packages define GS_RESOURCEDIR as including
 ${PKGVERSION}?
   * Should it be ${PKGVERSION_NOREV} (or ${GS_VERSION})? or it will be mismatched
     with ghostscript-cidfonts?
   * It was added without reason in comments when updated print/ghostscript from 8.63 to 8.64.
     At least, multi version ghostscript coexistence is not allowed now.

 How about remove GS_RESOURCEDIR from print/ghostscript-{gpl,agpl} and install
 ghostscript-cidfonts into version independent resource directory?

From: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48479: [PATCH] ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl
Date: Mon, 20 Jan 2014 08:33:45 +0900

 I'm testing with attached patch and will probably
 commit soon, thanks,

 (and PKGREVISION++ ?) 
 ---
 Makoto Fujiwara, 

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/fonts/ghostscript-cidfonts/Makefile,v
 retrieving revision 1.21
 diff -u -r1.21 Makefile
 --- Makefile	9 Jan 2014 02:39:42 -0000	1.21
 +++ Makefile	19 Jan 2014 23:31:12 -0000
 @@ -15,7 +15,7 @@
  GHOSTSCRIPT_REQD=	9.05

  ADOBE_RESOURCEDIR=	${PREFIX}/share/Adobe/Resource
 -GS_RESOURCEDIR=		${PREFIX}/share/ghostscript/${GS_VERSION}/Resource
 +GS_RESOURCEDIR=		${PREFIX}/share/ghostscript/fonts

  NO_CONFIGURE=		yes
  NO_BUILD=		yes
 @@ -26,12 +26,6 @@

  REQD_DIRS=		${GS_RESOURCEDIR} ${GS_RESOURCEDIR}/CIDFont

 -.if   !empty(PKG_OPTIONS.gs_type:Mghostscript-agpl)
 -. include       "../../print/ghostscript-agpl/Makefile.common"
 -.else
 -. include       "../../print/ghostscript-gpl/Makefile.common"
 -.endif
 -
  do-install:	# nothing

  .include "../../mk/bsd.pkg.mk"

From: "Makoto Fujiwara" <mef@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48479 CVS commit: pkgsrc/fonts/ghostscript-cidfonts
Date: Thu, 23 Jan 2014 00:08:02 +0000

 Module Name:	pkgsrc
 Committed By:	mef
 Date:		Thu Jan 23 00:08:02 UTC 2014

 Modified Files:
 	pkgsrc/fonts/ghostscript-cidfonts: Makefile

 Log Message:
 For PR pkg/48479, old make (like NetBSD-5.1) behaves differently
 with undefined VARIABLE:
   Malformed conditional (!empty(PKG_OPTIONS.gs_type:Mghostscript-agpl))
 So, avoid using ghostscript version dependent installation path.
 PKGREVISION++ (installation path changed). Thanks obache@


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.22 pkgsrc/fonts/ghostscript-cidfonts/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->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 29 Oct 2014 08:11:34 +0000
State-Changed-Why:
Is this fixed?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 01 May 2016 05:55:59 +0000
State-Changed-Why:
feedback timeout, guess it's fixed.


>Unformatted:
 ghostscript-cidfonts doesn't switch correctly ghostscript-agpl and -gpl

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.