NetBSD Problem Report #58476
From www@netbsd.org Sat Jul 27 15:31:15 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)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 907EC1A923B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 27 Jul 2024 15:31:15 +0000 (UTC)
Message-Id: <20240727153114.3D2D21A923C@mollari.NetBSD.org>
Date: Sat, 27 Jul 2024 15:31:14 +0000 (UTC)
From: fstd@pr0.tips
Reply-To: fstd@pr0.tips
To: gnats-bugs@NetBSD.org
Subject: postinstall checks for /var/db/blacklist.db instead of /var/db/blacklistd.db
X-Send-Pr-Version: www-1.0
>Number: 58476
>Notify-List: riastradh@NetBSD.org
>Category: bin
>Synopsis: postinstall checks for /var/db/blacklist.db instead of /var/db/blacklistd.db
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: spz
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 27 15:35:00 +0000 2024
>Closed-Date: Sun Nov 10 16:27:47 +0000 2024
>Last-Modified: Sun Nov 10 16:27:47 +0000 2024
>Originator: Timo Buhrmester
>Release: 10.0_STABLE
>Organization:
>Environment:
NetBSD lemon.pr0.tips 10.0_STABLE NetBSD 10.0_STABLE (LEMONKERN) #0: Sat Jul 27 04:04:40 CEST 2024 build@kiwi.pr0.tips:/stor/netbsd/foreign/lemon-apu/obj/sys/arch/amd64/compile/LEMONKERN amd64
>Description:
the "blocklist" part of postinstall looks at /var/db/blacklist.db, but the file used to be called /var/db/blacklistd.db instead.
Additionally, while sed(1)-ing files to adjust "blacklistd" to "blocklistd", it's also somewhat sloppy and will hit terms like "blackhole" (e.g. in npf.conf, where it wouldn't be unreasonable to appear)
proposed patch below.
>How-To-Repeat:
upgrade 9 to 10 and do the postinstall dance
>Fix:
--- /tmp/orig 2024-07-27 16:09:02.877570977 +0200
+++ /usr/sbin/postinstall 2024-07-27 16:43:13.971213979 +0200
@@ -941,7 +941,7 @@
continue
fi
- if ${GREP} '[bB]lack' "${target}" > /dev/null; then
+ if ${GREP} '[bB]lacklist' "${target}" > /dev/null; then
if [ "$1" = "check" ]; then
msg "Fix old configuration file(s)."
return 1
@@ -966,7 +966,7 @@
local i old
# if we are actually using blocklistd
- for i in /var/db/blacklist.db /etc/blacklistd.conf; do
+ for i in /var/db/blacklistd.db /etc/blacklistd.conf; do
old="${DEST_DIR}${i}"
if [ ! -f "${old}" ]; then
continue
@@ -974,7 +974,7 @@
msg "Rename old file(s)."
return 1
fi
- local new=$(echo "${old}" | ${SED} s/black/block/)
+ local new=$(echo "${old}" | ${SED} s/blacklist/blocklist/)
mv "${old}" "${new}" || return 1
done
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Tue, 15 Oct 2024 13:53:02 +0000
State-Changed-Why:
Part of this was fixed by:
https://mail-index.netbsd.org/source-changes/2024/10/12/msg153838.html
Module Name: src
Committed By: spz
Date: Sat Oct 12 07:00:18 UTC 2024
Modified Files:
src/usr.sbin/postinstall: postinstall.in
Log Message:
(typo) it used to be /var/db/blacklistd.db not /var/db/blacklist.db
To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/postinstall/postinstall.in
Responsible-Changed-From-To: bin-bug-people->spz
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Tue, 15 Oct 2024 13:53:29 +0000
Responsible-Changed-Why:
over to committer of fix
From: "S.P.Zeidler" <spz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58476 CVS commit: src/usr.sbin/postinstall
Date: Sun, 27 Oct 2024 19:58:26 +0000
Module Name: src
Committed By: spz
Date: Sun Oct 27 19:58:26 UTC 2024
Modified Files:
src/usr.sbin/postinstall: postinstall.in
Log Message:
PR bin/58476: second half: be more selective with the strings to update
for blacklistd -> blocklistd
issue pointed out and patch supplied by Timo Buhrmester
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/postinstall/postinstall.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 30 Oct 2024 16:01:05 +0000
State-Changed-Why:
pullup-10 #992 https://releng.netbsd.org/cgi-bin/req-10.cgi?show=992
inapplicable <10
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58476 CVS commit: [netbsd-10] src/usr.sbin/postinstall
Date: Thu, 31 Oct 2024 18:44:45 +0000
Module Name: src
Committed By: martin
Date: Thu Oct 31 18:44:45 UTC 2024
Modified Files:
src/usr.sbin/postinstall [netbsd-10]: postinstall.in
Log Message:
Pull up following revision(s) (requested by spz in ticket #992):
usr.sbin/postinstall/postinstall.in: revision 1.68
usr.sbin/postinstall/postinstall.in: revision 1.71
(typo) it used to be /var/db/blacklistd.db not /var/db/blacklist.db
PR bin/58476: second half: be more selective with the strings to update
for blacklistd -> blocklistd
issue pointed out and patch supplied by Timo Buhrmester
To generate a diff of this commit:
cvs rdiff -u -r1.51.2.3 -r1.51.2.4 src/usr.sbin/postinstall/postinstall.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 10 Nov 2024 16:27:47 +0000
State-Changed-Why:
fixed in HEAD, pulled up to 10, inapplicable <10
>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.