NetBSD Problem Report #53905
From www@NetBSD.org Thu Jan 24 16:00:32 2019
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 2D4067A232
for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Jan 2019 16:00:32 +0000 (UTC)
Message-Id: <20190124160031.3C1647A237@mollari.NetBSD.org>
Date: Thu, 24 Jan 2019 16:00:31 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: install(1) is unnecessarily difficult to use
X-Send-Pr-Version: www-1.0
>Number: 53905
>Category: bin
>Synopsis: install(1) is unnecessarily difficult to use
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 24 16:05:00 +0000 2019
>Last-Modified: Fri Jan 25 00:15:01 +0000 2019
>Originator: coypu
>Release: NetBSD 8.99.31
>Organization:
>Environment:
NetBSD planets 8.99.31 NetBSD 8.99.31 (GENERIC) #0: Thu Jan 24 20:41:48 IST 2019 fly@planets:/current/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
GDC effectively installs its runtime library source code to the machine:
ALL_DRUNTIME_INSTALL_DSOURCES = core/atomic.d core/attribute.d #... a list of 600+ files in 64 directories
install-data-local:
for file in $(ALL_DRUNTIME_INSTALL_DSOURCES); do \
$(INSTALL_HEADER) -D $(srcdir)/$$file \
$(DESTDIR)$(gdc_include_dir)/$$file ; \
done
This can't work with NetBSD install(1) because there is no stanza for creating
the directories used for these files.
I don't see why install(1) should require separate code for the creation of
directories.
This works fine in GNU install because:
-D create all leading components of DEST except the last, or all
components of --target-directory, then copy SOURCE to DEST
It appears that the rest of the world manages to hold up by having
automake mask these differences.
>How-To-Repeat:
>Fix:
>Audit-Trail:
From: David Holland <dholland-gnats@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/53905: install(1) is unnecessarily difficult to use
Date: Thu, 24 Jan 2019 17:47:59 +0000
On Thu, Jan 24, 2019 at 04:05:00PM +0000, coypu@sdf.org wrote:
> ALL_DRUNTIME_INSTALL_DSOURCES = core/atomic.d core/attribute.d #... a list of 600+ files in 64 directories
>
>
> install-data-local:
> for file in $(ALL_DRUNTIME_INSTALL_DSOURCES); do \
> $(INSTALL_HEADER) -D $(srcdir)/$$file \
> $(DESTDIR)$(gdc_include_dir)/$$file ; \
> done
for pkgsrc (unless the package's makefile is already gmake-only) you
can handle the dirs with
$(INSTALL_DATA_DIR) $(ALL_DRUNTIME_INSTALL_DSOURCES:H:O:u)
provided that our INSTALL_DATA_DIR is visible (it's install -d).
For gmake, ymwv.
IME it's not a good idea in general to autocreate destination
directories because it has a tendency to accidentally put stuff in
strange places without anyone noticing.
--
David A. Holland
dholland@netbsd.org
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/53905: install(1) is unnecessarily difficult to use
Date: Fri, 25 Jan 2019 00:00:38 +0000
so, I am patching this now, I dont know if I can upstream it.
https://mail-index.netbsd.org/pkgsrc-wip-changes/2019/01/24/msg012092.html
From: Christos Zoulas <christos@zoulas.com>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: bin/53905: install(1) is unnecessarily difficult to use
Date: Thu, 24 Jan 2019 19:12:46 -0500
needs =E2=80=9C$$file=E2=80=9D =E2=80=9C$$dirname=E2=80=9D otherwise it =
will fail if they contain spaces.
> On Jan 24, 2019, at 7:05 PM, coypu@sdf.org wrote:
>=20
> The following reply was made to PR bin/53905; it has been noted by =
GNATS.
>=20
> From: coypu@sdf.org
> To: gnats-bugs@NetBSD.org
> Cc:=20
> Subject: Re: bin/53905: install(1) is unnecessarily difficult to use
> Date: Fri, 25 Jan 2019 00:00:38 +0000
>=20
> so, I am patching this now, I dont know if I can upstream it.
> =
https://mail-index.netbsd.org/pkgsrc-wip-changes/2019/01/24/msg012092.html=
>=20
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.