NetBSD Problem Report #57877
From www@netbsd.org Thu Jan 25 00:25:50 2024
Return-Path: <www@netbsd.org>
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 7A1421A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 25 Jan 2024 00:25:50 +0000 (UTC)
Message-Id: <20240125002549.91E291A9239@mollari.NetBSD.org>
Date: Thu, 25 Jan 2024 00:25:49 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: /etc/mtree/set.* is not automatically tested and doesn't always match installation
X-Send-Pr-Version: www-1.0
>Number: 57877
>Category: misc
>Synopsis: /etc/mtree/set.* is not automatically tested and doesn't always match installation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: needs-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 25 00:30:00 +0000 2024
>Closed-Date:
>Last-Modified: Sat May 04 20:25:01 +0000 2024
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBmtree Foundation
>Environment:
>Description:
The /etc/mtree/set.* files are supposed to be useful for verifying the integrity of a system installation, but they often have little mismatches because we don't do anything to automatically verify them.
>How-To-Repeat:
Run `cat /etc/mtree/set.* | mtree -e' in an installed system.
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src
Date: Thu, 25 Jan 2024 00:30:58 +0000
Module Name: src
Committed By: riastradh
Date: Thu Jan 25 00:30:58 UTC 2024
Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/mtree: Makefile t_sets.sh
Log Message:
mtree(8): Test the installed sets.
Except etc and xetc, which likely won't match for reasons that aren't
great, like etc including empty log files which in an installed
system have probably changed.
This test will probably fail, but we should make sure it doesn't!
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.1299 -r1.1300 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.201 -r1.202 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.38 -r1.39 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/mtree/Makefile \
src/tests/usr.bin/mtree/t_sets.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Cc:
Subject: Re: misc/57877: /etc/mtree/set.* is not automatically tested and doesn't always match installation
Date: Thu, 25 Jan 2024 23:47:07 +0000
Amazingly, only two files are troublesome in these tests, according to
the i386 testbed:
https://releng.netbsd.org/b5reports/i386/2024/2024.01.25.19.12.49/test.html=
#usr.bin_mtree_t_sets_set_base
check_mtree
Fail: incorrect exit status: 2, expected: 0
stdout:
dev/pts:=20
permissions (0755, 0555)
./var/run/named missing
stderr:
I think we can just:
1. fix the permissions on dev/pts in src/etc/NetBSD.dist.base, since
it never makes sense for userland to write to files here --
/dev/pts is always intended to have ptyfs mounted; and
2. delete var/run/named from src/etc/NetBSD.dist.base, since it gets
deleted on every boot by rc.d/clearcritlocal (which is presumably
why it's reported missing here), so anything that relies on
/var/run/named at boot has to recreate it anyway.
P.S. OOPS: mtree lives at /usr/sbin/mtree, so this test should have
been put at tests/usr.sbin/mtree, not tests/usr.bin/mtree.
From: RVP <rvp@SDF.ORG>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: misc/57877: /etc/mtree/set.* is not automatically tested and
doesn't always match installation
Date: Fri, 26 Jan 2024 00:28:16 +0000 (UTC)
On Thu, 25 Jan 2024, Taylor R Campbell wrote:
> Amazingly, only two files are troublesome in these tests, according to
> the i386 testbed:
>
There are, occasionally, some more. Please see PR misc/56896.
(I must say that I haven't re-checked this recently...)
-RVP
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src/tests/usr.bin/mtree
Date: Fri, 26 Jan 2024 00:32:46 +0000
Module Name: src
Committed By: riastradh
Date: Fri Jan 26 00:32:46 UTC 2024
Modified Files:
src/tests/usr.bin/mtree: t_sets.sh
Log Message:
tests/usr.bin/mtree: xfail PR 57877; omit needless debug print.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/mtree/t_sets.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src/etc/mtree
Date: Sat, 27 Jan 2024 21:01:08 +0000
Module Name: src
Committed By: riastradh
Date: Sat Jan 27 21:01:08 UTC 2024
Modified Files:
src/etc/mtree: NetBSD.dist.base
Log Message:
NetBSD.dist.base: Fix permissions on /dev/pts.
No reason to write to this -- it's expected to have ptyfs mounted,
and ptyfs doesn't allow changing the directory. So use 0555
(-r-xr-xr-x) instead of 0755 (-rwxr-xr-x), like it is by default with
ptyfs mounted.
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/etc/mtree/NetBSD.dist.base
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src
Date: Sat, 27 Jan 2024 21:06:09 +0000
Module Name: src
Committed By: riastradh
Date: Sat Jan 27 21:06:09 UTC 2024
Modified Files:
src/distrib/sets/lists/base: mi
src/etc/mtree: NetBSD.dist.base
Log Message:
NetBSD.dist.base: Nix /var/run/named.
/var/run is emptied at boot time by /etc/rc.d/mountcritlocal, so
there's no point in creating this at install time -- it has to be
created on the fly after /var/run is cleared on every boot anyway.
Mark /var/run/named obsolete in the set lists. XXX This isn't quite
right, because it is legitimate for /var/run/named to exist in a
running installation, but it doesn't exist in a freshly installed
system any more. Maybe we should just remove the entry from the set
lists and add a note to UPDATING about deleting it manually from the
destdir in incremental builds.
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.1330 -r1.1331 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.254 -r1.255 src/etc/mtree/NetBSD.dist.base
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src/tests/usr.bin/mtree
Date: Sun, 28 Jan 2024 19:08:07 +0000
Module Name: src
Committed By: riastradh
Date: Sun Jan 28 19:08:06 UTC 2024
Modified Files:
src/tests/usr.bin/mtree: t_sets.sh
Log Message:
tests/usr.bin/mtree: Fixed the set lists, no more xfail.
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/mtree/t_sets.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/57877: /etc/mtree/set.* is not automatically tested and
doesn't always match installation
Date: Wed, 31 Jan 2024 15:58:09 +0100
The new tests do not deal with var_shm_symlink settings in /etc/rc.conf
(and mtree does not seem to provide a syntax to allow /var/shm to be a
directory or a symlink to a directory).
There are also strange link count differences that I do not understand
and can't seem to be able to get rid of for my local builds and the
test installs I use them on, e.g. see
https://www.NetBSD.org/~martin/aarch64-atf/
where the only failures (right now) are mtree set list issues.
Martin
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Tue, 19 Mar 2024 17:07:02 +0000
State-Changed-Why:
not everything is fixed but some of these commits are ready for pullup
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src
Date: Thu, 11 Apr 2024 02:15:39 +0000
Module Name: src
Committed By: riastradh
Date: Thu Apr 11 02:15:39 UTC 2024
Modified Files:
src: UPDATING
src/distrib/sets/lists/base: mi
Log Message:
Nix /var/run/named entry from set lists.
Normally we don't do this, but /var/run/named is
(a) used by running daemons, so postinstall should not delete it, and
(b) deleted at boot-time anyway by /etc/rc.d/mountcritlocal, so
there's no sense in having it checked by mtree.
However, this means that update builds need manual intervention to
delete $DESTDIR/var/run/named or else checkflist will fail, so add a
note to UPDATING about this.
Do the same with /var/run/lwresd just in case.
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.345 -r1.346 src/UPDATING
cvs rdiff -u -r1.1342 -r1.1343 src/distrib/sets/lists/base/mi
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57877 CVS commit: src/tests/usr.bin/mtree
Date: Sat, 4 May 2024 20:24:37 +0000
Module Name: src
Committed By: riastradh
Date: Sat May 4 20:24:37 UTC 2024
Modified Files:
src/tests/usr.bin/mtree: t_sets.sh
Log Message:
tests/usr.bin/mtree: Fail gracefully with unknown sets.
Rather than `bogus test program', make a test fail.
PR misc/57877
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/mtree/t_sets.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.