NetBSD Problem Report #52394

From www@NetBSD.org  Tue Jul 11 12:10:13 2017
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 "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F374A7A1FE
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Jul 2017 12:10:12 +0000 (UTC)
Message-Id: <20170711121007.EC8997A274@mollari.NetBSD.org>
Date: Tue, 11 Jul 2017 12:10:07 +0000 (UTC)
From: chris@sogubsys.com
Reply-To: chris@sogubsys.com
To: gnats-bugs@NetBSD.org
Subject: eval: cannot open /usr/src/etc/motd: no such file
X-Send-Pr-Version: www-1.0

>Number:         52394
>Category:       install
>Synopsis:       eval: cannot open /usr/src/etc/motd: no such file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 11 12:15:00 +0000 2017
>Last-Modified:  Tue Jul 11 16:50:00 +0000 2017
>Originator:     Chris Humphries
>Release:        current
>Organization:
>Environment:
NetBSD xena.sogubsys.com 8.99.1 NetBSD 8.99.1 (GENERIC) #0: Tue Jul 11 11:49:36 UTC 2017  root@xena.sogubsys.com:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
postinstall checks failed: motd
To fix, run:
    sh /usr/sbin/postinstall -s /usr/src -d / fix motd
Note that this may overwrite local changes.
*** All done
root@xena /usr/src>>     sh /usr/sbin/postinstall -s /usr/src -d / fix motd
Source directory: /usr/src
Target directory: /
motd fix:
eval: cannot open /usr/src/etc/motd: no such file
eval: cannot open /usr/src/etc/motd: no such file
postinstall fixes passed: motd
postinstall fixes failed:
root@xena /usr/src>> cat /etc/motd 
NetBSD ?.? (UNKNOWN)

root@xena /usr/src>> 
>How-To-Repeat:
install current, do etcupdate, choose to install new motd, new motd fails to install (though it is shown in etcupdate).
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/52394: eval: cannot open /usr/src/etc/motd: no such file
Date: Tue, 11 Jul 2017 14:50:05 +0200

 Good catch!

 This only should happen if installing from source (i.e. sets should
 provide the proper etc/motd file).

 postinstall(8) has not been updated to varying motd sources depending
 on beta/current/... state of the source.

 Maybe if "${SRC_DIR}/etc/motd" does not exist, assume we have a full source
 environment and proper tools available and do

   cd "${SRC_DIR}/etc/" && ${MAKE} -v MOTD_SOURCE

 to get the proper name?

 Martin

From: Chris Humphries <chris@sogubsys.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/52394: eval: cannot open /usr/src/etc/motd: no such file
Date: Tue, 11 Jul 2017 16:46:59 +0000

 Interesting too is that postinstall regards the fix of motd as a success.

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.