NetBSD Problem Report #54850

From www@netbsd.org  Thu Jan  9 23:30:11 2020
Return-Path: <www@netbsd.org>
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 0B39A7A149
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  9 Jan 2020 23:30:11 +0000 (UTC)
Message-Id: <20200109233009.D6F647A1D3@mollari.NetBSD.org>
Date: Thu,  9 Jan 2020 23:30:09 +0000 (UTC)
From: mforney@mforney.org
Reply-To: mforney@mforney.org
To: gnats-bugs@NetBSD.org
Subject: lang/lua5.3 uses incorrect `install` program
X-Send-Pr-Version: www-1.0

>Number:         54850
>Category:       pkg
>Synopsis:       lang/lua5.3 uses incorrect `install` program
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 09 23:35:00 +0000 2020
>Closed-Date:    Sun Feb 09 20:06:05 +0000 2020
>Last-Modified:  Sun Feb 09 20:06:05 +0000 2020
>Originator:     Michael Forney
>Release:        
>Organization:
>Environment:
Linux oasis 5.4.7+ #103 SMP Fri Jan 3 16:39:41 PST 2020 x86_64
>Description:
The lang/lua53 Makefile has `MAKE_ENV+=INSTALL_DATA=${INSTALL_DATA:Q}`, however the upstream lua Makefile has its own definition of `INSTALL_DATA`, so the one in the environment has no effect.

The result is that the upstream INSTALL_DATA definition is used instead of pkgsrc's. My system's install(1) program (sbase) does not support some of the options used, so this causes an error:

$ bmake
=> Bootstrap dependency digest>=20010302: found digest-20190127
===> Skipping vulnerability checks.
WARNING: No /pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/pkg/sbin/pkg_admin -K /pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Installing for lua53-5.3.5
=> Generating pre-install file lists
=> Creating installation directories
cd src && mkdir -p /src/pkgsrc/lang/lua53/work/.destdir/pkg/bin /src/pkgsrc/lang/lua53/work/.destdir/pkg/include/lua-5.3 /src/pkgsrc/lang/lua53/work/.destdir/pkg/lib /src/pkgsrc/lang/lua53/work/.destdir/pkg/man/man1 /src/pkgsrc/lang/lua53/work/.destdir/pkg/share/lua/5.3 /src/pkgsrc/lang/lua53/work/.destdir/pkg/lib/lua/5.3
cd src && /src/pkgsrc/lang/lua53/work/.cwrapper/bin/libtool  --tag=CC --mode=install /bin/install -c -s -o michael -g michael -m 755 lua5.3 luac5.3 /src/pkgsrc/lang/lua53/work/.destdir/pkg/bin
libtool: install: /bin/install -c -o michael -g michael -m 755 -s .libs/lua5.3 /src/pkgsrc/lang/lua53/work/.destdir/pkg/bin/lua5.3
libtool: install: /bin/install -c -o michael -g michael -m 755 -s luac5.3 /src/pkgsrc/lang/lua53/work/.destdir/pkg/bin/luac5.3
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp /src/pkgsrc/lang/lua53/work/.destdir/pkg/include/lua-5.3
usage: install [-g group] [-o owner] [-m mode] (-d dir ... | [-D] (-t dest source ... | source ... dest))
make: *** [Makefile:63: install] Error 1
*** Error code 2

Stop.
bmake[1]: stopped in /src/pkgsrc/lang/lua53
*** Error code 1

Stop.
bmake: stopped in /src/pkgsrc/lang/lua53
$

>How-To-Repeat:
Change your system install program to one that does not support the -p flag (for example from sbase), then attempt to build the lang/lua53 package.
>Fix:
Since patches/patch-Makefile is already patching the install target, it could just replace $(INSTALL_DATA) with $(BSD_INSTALL_DATA) while it's at it (like it already does for BSD_INSTALL_PROGRAM and BSD_INSTALL_LIB).

Another option (which is used by lang/lua52 and lang/lua51) is to just comment out the upstream INSTALL_DATA definition, so the one set by pkgsrc in the environment is used instead.

A third option is to replace `MAKE_ENV+=INSTALL_DATA=${INSTALL_DATA:Q}` with `MAKE_FLAGS+=INSTALL_DATA=${INSTALL_DATA:Q}` to override the INSTALL_DATA in the upstream Makefile.

>Release-Note:

>Audit-Trail:
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54850 CVS commit: pkgsrc/lang/lua53
Date: Thu, 16 Jan 2020 23:51:29 +0000

 Module Name:	pkgsrc
 Committed By:	nia
 Date:		Thu Jan 16 23:51:29 UTC 2020

 Modified Files:
 	pkgsrc/lang/lua53: Makefile

 Log Message:
 lua53: Override INSTALL_DATA with MAKE_FLAGS.

 PR pkg/54850


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/lua53/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: nia@NetBSD.org
State-Changed-When: Thu, 16 Jan 2020 23:56:30 +0000
State-Changed-Why:
Should be fixed as of r1.4. I generally prefer the MAKE_FLAGS solution in this case.


From: Michael Forney <mforney@mforney.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54850 (lang/lua5.3 uses incorrect `install` program)
Date: Wed, 5 Feb 2020 16:46:16 -0800

 On 2020-01-16, nia@netbsd.org <nia@netbsd.org> wrote:
 > Should be fixed as of r1.4. I generally prefer the MAKE_FLAGS solution in
 > this case.

 Thanks, this fixed the issue.

 (sorry for not giving feedback earlier)

State-Changed-From-To: feedback->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 09 Feb 2020 20:06:05 +0000
State-Changed-Why:
Feedback received.


>Unformatted:

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.