NetBSD Problem Report #57780

From bjjl@mx.plus  Sun Dec 17 13:04:46 2023
Return-Path: <bjjl@mx.plus>
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 BF23A1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Dec 2023 13:04:45 +0000 (UTC)
Message-Id: <20231217104210.749F79E78B1@lion.mx.plus>
Date: Sun, 17 Dec 2023 11:42:10 +0100 (CET)
From: ben@pocket.services
To: gnats-bugs@NetBSD.org
Subject: opensslcertsrehash limited to DEST_DIR=/
X-Send-Pr-Version: 3.95

>Number:         57780
>Category:       install
>Synopsis:       opensslcertsrehash limited to DEST_DIR=/
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 17 13:05:00 +0000 2023
>Closed-Date:    Sat Dec 30 21:43:57 +0000 2023
>Last-Modified:  Sat Dec 30 21:43:57 +0000 2023
>Originator:     Benjamin Lorenz
>Release:        NetBSD 10.0_RC1
>Organization:

>Environment:


System: NetBSD lion.mx.plus 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #1: Sat Nov 25 14:17:29 CET 2023 bjjl@lion.mx.plus:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
./build.sh -O ../obj -T ../tools -U -x install=/
might tell at the end:
postinstall checks failed: makedev mtree named opensslcertsrehash
To fix, run:
    /bin/sh /usr/src/../obj/usr.sbin/postinstall/postinstall -s /usr/src -x /usr/xsrc -d // fix makedev mtree named opensslcertsrehash

sudo /bin/sh /usr/src/../obj/usr.sbin/postinstall/postinstall -s /usr/src -x /usr/xsrc -d // fix makedev mtree named opensslcertsrehash
will then yield

opensslcertsrehash fix:
        opensslcertsrehash limited to DEST_DIR=/
postinstall fixes passed: makedev mtree named
postinstall fixes failed: opensslcertsrehash

Changing -d // to -d / in the script solved the problem. Not sure why there's
the double slash in the script. Looks like a typo at first sight.
>How-To-Repeat:

>Fix:
Call the postinstall script with one slash:

sudo /bin/sh /usr/src/../obj/usr.sbin/postinstall/postinstall -s /usr/src -x /usr/xsrc -d / fix opensslcertsrehash 

>Release-Note:

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: install/57780: opensslcertsrehash limited to DEST_DIR=/
Date: Sun, 17 Dec 2023 15:13:07 +0000

 This is a multi-part message in MIME format.
 --=_uYve6LJUJbusqt1t17g4r8OQ3Se97Nkl

 Should be fixed by this commit:

 https://mail-index.netbsd.org/source-changes/2023/09/08/msg147487.html

 Patch attached, can you give it a try, and maybe we can pull it up?

 --=_uYve6LJUJbusqt1t17g4r8OQ3Se97Nkl
 Content-Type: text/plain; charset="ISO-8859-1"; name="postinstalldestdirslash"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="postinstalldestdirslash.patch"

 From 5278b8e44df34702d8041b06cf76319dea99b5ed Mon Sep 17 00:00:00 2001
 From: riastradh <riastradh@NetBSD.org>
 Date: Fri, 8 Sep 2023 12:01:56 +0000
 Subject: [PATCH] Makefile: Run `postinstall -d /', not `postinstall -d //'.

 This happens when doing `build.sh install=3D/'.  The message is less
 confusing and it makes postinstall's job simpler for detecting when
 it's installing to / rather than somewhere else.
 ---
  Makefile | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

 diff --git a/Makefile b/Makefile
 index 9694811ddb98..5c9d95ca29b9 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1,4 +1,4 @@
 -#	$NetBSD: Makefile,v 1.337 2023/06/11 10:43:51 lukem Exp $
 +#	$NetBSD: Makefile,v 1.338 2023/09/08 12:01:56 riastradh Exp $
 =20
  #
  # This is the top-level makefile for building NetBSD. For an outline of
 @@ -190,23 +190,23 @@ _POSTINSTALL_X11=3D-x ${X11SRCDIR:Q}
 =20
  postinstall-check: .PHONY
  	@echo "   =3D=3D=3D Post installation checks =3D=3D=3D"
 -	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
 +	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR:C/^\/$//}/ check; if [ $$? -gt 1 ]; then exit 1; fi
  	@echo "   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
 =20
  postinstall-fix: .NOTMAIN .PHONY
  	@echo "   =3D=3D=3D Post installation fixes =3D=3D=3D"
 -	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR}/ fix
 +	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR:C/^\/$//}/ fix
  	@echo "   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
 =20
  postinstall-fix-obsolete: .NOTMAIN .PHONY
  	@echo "   =3D=3D=3D Removing obsolete files =3D=3D=3D"
 -	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR}/ fix obsolete
 +	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete
  	@echo "   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
 =20
  postinstall-fix-obsolete_stand: .NOTMAIN .PHONY
  	@echo "   =3D=3D=3D Removing obsolete files =3D=3D=3D"
 -	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR}/ fix obsolete_stand
 -	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR}/ fix obsolete_stand_debug
 +	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete_stand
 +	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTA=
 LL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete_stand_debug
  	@echo "   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"
 =20
 =20

 --=_uYve6LJUJbusqt1t17g4r8OQ3Se97Nkl--

From: ben@pocket.services
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: gnats-bugs@netbsd.org,
 install-manager@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: install/57780: opensslcertsrehash limited to DEST_DIR=/
Date: Thu, 21 Dec 2023 14:45:10 +0100

 I have tested the patch, and the problem seems to be fixed, indeed. =
 Thank you!

 Regards,
 Benjamin


 > On 17. Dec 2023, at 16:13, Taylor R Campbell <riastradh@NetBSD.org> =
 wrote:
 >=20
 > Should be fixed by this commit:
 >=20
 > https://mail-index.netbsd.org/source-changes/2023/09/08/msg147487.html
 >=20
 > Patch attached, can you give it a try, and maybe we can pull it up?
 > <postinstalldestdirslash.patch>

State-Changed-From-To: open->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 21 Dec 2023 15:22:41 +0000
State-Changed-Why:
pullup-10 #513


State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 30 Dec 2023 21:43:57 +0000
State-Changed-Why:
pullup-10 done


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.