NetBSD Problem Report #52534

From paul@whooppee.com  Sat Sep  9 05:28:30 2017
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E40B37A177
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  9 Sep 2017 05:28:30 +0000 (UTC)
Message-Id: <20170909052825.5A57016E41@speedy.whooppee.com>
Date: Sat,  9 Sep 2017 13:28:25 +0800 (+08)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: security/pinepgp build error
X-Send-Pr-Version: 3.95

>Number:         52534
>Category:       pkg
>Synopsis:       security/pinepgp build error on NetBSD
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 09 05:30:00 +0000 2017
>Closed-Date:    Sat Sep 09 22:54:24 +0000 2017
>Last-Modified:  Sat Sep 09 22:55:02 +0000 2017
>Originator:     Paul Goyette
>Release:        NetBSD 8.99.2
>Organization:
+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+
>Environment:


System: NetBSD speedy.whooppee.com 8.99.2 NetBSD 8.99.2 (SPEEDY 2017-08-30 21:55:55 UTC) #0: Thu Aug 31 03:05:47 UTC 2017 paul@speedy.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
	With current gcc compiler on NetBSD, the build for this package
	fails as follows:

	# /bin/cat pinegpgp.in | /usr/bin/sed -e 's%\@SED\@%/usr/bin/sed%; s%\@CAT\@%/bin/cat%; s%\@RM\@%/bin/rm%; s%\@MKTEMP\@%/usr/bin/mktemp%; s%\@BASH\@%/usr/pkg/bin/bash%; s%\@bindir\@%/usr/pkg/bin%; s%\@tmpdir\@%~/.pinepgp%' > pinegpgp
	# chmod 755 pinegpgp
	# gcc -E -DGPG -DUSE_MKTEMP -DUSE_NSE_FIX pinegpg.c | /usr/bin/grep -v "^# .* .*"> pinegpg
	# pinegpg.c:1:2: error: invalid preprocessing directive #!
	 #!/usr/pkg/bin/bash 
	  ^

	It then proceeds to install a shell script which has no #! line at
	the beginning.  When the script gets executed, it will use the user's
	current/default shell.  If the user happens to use csh (or some
	variant thereof), the variable assignment of 

		tmpdir=~/.pinegpg/

	fails, and subsequently the script will try to create its temp
	file in the system root file system.  Most users won't have the
	required permissions for this to success, so the script fails.
>How-To-Repeat:
	Build and install security/pinepgp on a _current_ NetBSD host.

>Fix:
	Fix it so the generated script file has a proper #! line at the top!

	As a work-around, you can modify the script to avoid using
	local variabkle assignments, especially to tmpdir


>Release-Note:

>Audit-Trail:
From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52534 CVS commit: pkgsrc/security/pinepgp
Date: Sat, 9 Sep 2017 11:43:08 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Sat Sep  9 11:43:08 UTC 2017

 Modified Files:
 	pkgsrc/security/pinepgp: Makefile distinfo
 Added Files:
 	pkgsrc/security/pinepgp: options.mk
 	pkgsrc/security/pinepgp/patches: patch-Makefile.in patch-pinegpgp.in
 	    patch-pinepgpgpg-install.in

 Log Message:
 Fix BASH substitutions with modern GCC, PR pkg/52534

 * Bump PKGREVISION
 * Use options framework for gpg and pgp5


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 pkgsrc/security/pinepgp/Makefile
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/security/pinepgp/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/security/pinepgp/options.mk
 cvs rdiff -u -r0 -r1.1 pkgsrc/security/pinepgp/patches/patch-Makefile.in \
     pkgsrc/security/pinepgp/patches/patch-pinegpgp.in \
     pkgsrc/security/pinepgp/patches/patch-pinepgpgpg-install.in

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

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 09 Sep 2017 22:11:33 +0000
Responsible-Changed-Why:
ryoon committed a fix.


State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 09 Sep 2017 22:11:33 +0000
State-Changed-Why:
Does it fix the problem for you?


State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 09 Sep 2017 22:54:24 +0000
State-Changed-Why:
Thanks for the confirmation.
Btw, you can close it yourself :-)


From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: ryoon@NetBSD.org, pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, 
    gnats-admin@netbsd.org, wiz@NetBSD.org
Subject: Re: pkg/52534 (security/pinepgp build error on NetBSD)
Date: Sun, 10 Sep 2017 06:53:15 +0800 (+08)

 > ryoon committed a fix.
 > ...
 > Does it fix the problem for you?

 Yes, it is fixed - please close!

 Thanks for the rapid turn-around.


 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+

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