NetBSD Problem Report #56001

From www@netbsd.org  Sun Feb 21 01:37:25 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 CFFDC1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 21 Feb 2021 01:37:24 +0000 (UTC)
Message-Id: <20210221013723.57C881A923B@mollari.NetBSD.org>
Date: Sun, 21 Feb 2021 01:37:23 +0000 (UTC)
From: bapabooiee@gmail.com
Reply-To: bapabooiee@gmail.com
To: gnats-bugs@NetBSD.org
Subject: lang/rakudo: [macOS Big Sur] `post-install` fails due to illegal option `-i` in call to `sed`
X-Send-Pr-Version: www-1.0

>Number:         56001
>Category:       pkg
>Synopsis:       lang/rakudo: [macOS Big Sur] `post-install` fails due to illegal option `-i` in call to `sed`
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 21 01:40:00 +0000 2021
>Last-Modified:  Sun Feb 21 12:15:01 +0000 2021
>Originator:     Dean Matzkov
>Release:        pkgsrc-2020Q4
>Organization:
>Environment:
Darwin MBP.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
>Description:
lang/rakudo fails to insall on macOS Big Sur due to the `sed` command within `post-install`, as such:


---SNIP---
sed -i "s,/usr/bin/env raku,/opt/pkg/bin/raku," /Volumes/Devel/pkgscrc_stuff/work/2020Q4/lang/rakudo/work.x86_64/rakudo-2020.10/tools/install-dist.p6                                sed: illegal option -- i
usage:  sed [-aEn] script [file ...]                                                                                                                                                         sed [-aEn] [-e script] ... [-f script_file] ... [file ...]
*** Error code 1

Stop.
---/SNIP---


The offending line is this line in rakudo's pkgsrc Makefile:

sed -i "s,/usr/bin/env raku,${PREFIX}/bin/raku," ${WRKSRC}/tools/install-dist.p6


This error occurs because on macOS Big Sur, the system-supplied /usr/bin/sed does not support the `-i` flag.
>How-To-Repeat:
1. Run macOS Big Sur.
2. cd $pkgsrc/lang/rakudo && bmake install

>Fix:
Perhaps it should explicitly use gsed instead, as it supports the `-i` flag.

>Audit-Trail:
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56001 CVS commit: pkgsrc/lang/rakudo
Date: Sun, 21 Feb 2021 12:13:07 +0000

 Module Name:	pkgsrc
 Committed By:	nia
 Date:		Sun Feb 21 12:13:07 UTC 2021

 Modified Files:
 	pkgsrc/lang/rakudo: Makefile

 Log Message:
 rakudo: Avoid non-portable usage of sed -i

 PR pkg/56001


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/lang/rakudo/Makefile

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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.