NetBSD Problem Report #45611

From mouse@Sparkle.Rodents-Montreal.ORG  Sun Nov 13 16:43:13 2011
Return-Path: <mouse@Sparkle.Rodents-Montreal.ORG>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C7A3363B8A8
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Nov 2011 16:43:13 +0000 (UTC)
Message-Id: <201111131643.LAA19855@Sparkle.Rodents-Montreal.ORG>
Date: Sun, 13 Nov 2011 11:43:11 -0500 (EST)
From: Mouse <mouse@Rodents-Montreal.ORG>
Reply-To: mouse@Rodents-Montreal.ORG
To: gnats-bugs@gnats.NetBSD.org
Subject: [dM] build.sh suggests nonworking postinstall usage
X-Send-Pr-Version: 3.95

>Number:         45611
>Category:       install
>Synopsis:       [dM] build.sh suggests nonworking postinstall usage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 13 16:45:00 +0000 2011
>Last-Modified:  Sun Nov 13 18:25:01 +0000 2011
>Originator:     Mouse
>Release:        NetBSD 5.1
>Organization:
	Dis-
>Environment:
	Seen on

System: NetBSD MVN-Frank.Rodents-Montreal.ORG 5.1 NetBSD 5.1 (MVN) #0: Thu Nov 10 16:06:20 EST 2011 mouse@MVN-Frank.Rodents-Montreal.ORG:/home/mouse/kbuild/MVN i386
Architecture: i386
Machine: i386

	Quite likely present on any with X support.
>Description:
	I installed a system with a reasonably minimal install; in
	particular, I did not install any X sets.  Then I set up
	/usr/src and /usr/xsrc and did a build.sh run to build
	everything:

	sh ./build.sh -D /home/mouse/i386/DESTDIR -O /home/mouse/i386/OBJDIR -x -U build

	After this completed, apparently normally, I installed with

	sh ./build.sh -V USETOOLS=never -V TOOLDIR=/home/mouse/i386/OBJDIR/tooldir.NetBSD-5.1-i386 -D /home/mouse/i386/DESTDIR -O /home/mouse/i386/OBJDIR -x -U install=/

	(Note in particular that this was a 5.1-on-5.1 build, so the
	host tools and the newly-created tools are compatible.  Note
	also that both build.sh runs specified -x.)

	This said, in part,

	postinstall-check ===> .	(with: DESTDIR=/)
	   === Post installation checks ===
	AWK=/home/mouse/i386/OBJDIR/tooldir.NetBSD-5.1-i386/bin/nbawk MAKE=/home/mouse/i386/OBJDIR/tooldir.NetBSD-5.1-i386/bin/nbmake /bin/sh /usr/src/usr.sbin/postinstall/postinstall -s /usr/src -d // check; if [ $? -gt 1 ]; then exit 1; fi
	Source directory: /usr/src
	Target directory: //
	bluetooth check:
	[...]
	rc check:
		///etc/rc.d/xdm does not exist
		///etc/rc.d/xfs does not exist
	ssh check:

	This much is hardly surprising in view of my not installing X
	sets, and is not a problem.  But it also said

	postinstall checks passed: bluetooth ddbonpanic defaults dhcpcd envsys fontconfig gid hosts iscsi makedev motd mtree named nosa pam periodic pf ssh wscons x11 xkb uid varrwho obsolete
	postinstall checks failed: rc
	To fix, run:
	    /usr/src/usr.sbin/postinstall/postinstall -s '/usr/src' -d // fix rc
	Note that this may overwrite local changes.

	However, (a) the recommended command does not run at all
	because postinstall in the source tree has no execute bits, and
	(b) when I work around this by prepending "sh " to it, it does
	not install either of the missing files.  Furthermore, manually
	running postinstall check does not notice the missing xdm and
	xfs, even though they are still missing.

	In an exchange on tech-userlevel, apb said that postinstall
	changes its behaviour based on MKX11 in the environment; when I
	further prepended "env MKX11=yes " to the command, it installed
	xdm and xfs very nicely.

	Thus, it seems to me there are two things that need fixing
	here: (1) build.sh needs to recommend running postinstall in a
	way that actually runs, either with an explicit sh (or
	equivalent) or running the installed copy instead of the
	source-tree copy, and (2) the suggested command should include
	everything necessary to make postinstall fix anything it's
	complained about.  (MKX11 might be the only thing needed here;
	I don't know.)

>How-To-Repeat:
	Remove (or don't install) the xdm and xfs rc.d scripts.  Build
	with build.sh (with -x).  Install the resulting build (again,
	with -x).  Notice the resulting alerts.  Try to run the
	suggested command to fix the missing scripts.  Notice it
	doesn't run.  Explicitly supply sh to make it run and notice it
	still doesn't fix anything.
>Fix:
	Dunno.  I don't understand build.sh.  For that matter, I'm not
	even sure how much of the problem is in build.sh (instead of
	various other pieces of build/install machinery).

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

>Audit-Trail:
From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/45611: [dM] build.sh suggests nonworking postinstall usage
Date: Sun, 13 Nov 2011 18:25:43 +0100

 On Sun, Nov 13, 2011 at 04:45:00PM +0000, Mouse wrote:
 [..]

 > 	However, (a) the recommended command does not run at all
 > 	because postinstall in the source tree has no execute bits, and

 This is not true. It has the execute bits set if you do a check out
 in a new directory.

 Either you may have a very old check out (if the execute bits were
 missing in the initial check in) or you transfered the source from
 a different system and used a too strict umask.

 Bernd

From: Mouse <mouse@Rodents-Montreal.ORG>
To: gnats-bugs@NetBSD.org
Cc: netbsd@lists.veego.de, install-manager@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: install/45611: [dM] build.sh suggests nonworking postinstall usage
Date: Sun, 13 Nov 2011 13:20:01 -0500 (EST)

 >> 	However, (a) the recommended command does not run at all
 >> 	because postinstall in the source tree has no execute bits,
 > This is not true.  It has the execute bits set if you do a check out
 > in a new directory.

 Then the 5.1 source tarballs were built wrong.  In the 5.1 distribution
 source/sets directory:

 [Truly-Delicious] 114> ls
 MD5 SHA512 gnusrc.tgz sharesrc.tgz src.tgz syssrc.tgz xsrc.tgz
 [Truly-Delicious] 114> sh -c 'for i in *.tgz; do gunzip < $i | /bin/tar tvf - | egrep postinstall/postinstall; done'
 -rw-rw-r--  1 root     wsrc       42508 Jan 10  2010 usr/src/usr.sbin/postinstall/postinstall
 -rw-rw-r--  1 root     wsrc        5029 Oct  4  2008 usr/src/usr.sbin/postinstall/postinstall.8
 [Truly-Delicious] 115> 

 /~\ The ASCII				  Mouse
 \ / Ribbon Campaign
  X  Against HTML		mouse@rodents-montreal.org
 / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.