NetBSD Problem Report #58885
From www@netbsd.org Mon Dec 9 18:33:39 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 0BB5D1A923A
for <gnats-bugs@gnats.NetBSD.org>; Mon, 9 Dec 2024 18:33:39 +0000 (UTC)
Message-Id: <20241209183337.D22E71A923B@mollari.NetBSD.org>
Date: Mon, 9 Dec 2024 18:33:37 +0000 (UTC)
From: jlduran@gmail.com
Reply-To: jlduran@gmail.com
To: gnats-bugs@NetBSD.org
Subject: mtree: Fix FreeBSD 9 compatibility output
X-Send-Pr-Version: www-1.0
>Number: 58885
>Category: bin
>Synopsis: mtree: Fix FreeBSD 9 compatibility output
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: needs-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 09 18:35:00 +0000 2024
>Closed-Date:
>Last-Modified: Tue Dec 17 19:50:23 +0000 2024
>Originator: Jose Luis Duran
>Release: trunk
>Organization:
FreeBSD
>Environment:
>Description:
A FreeBSD user reports[^1] that the output of mtree with freebsd9 format should be "%s extra", not "extra: %s".
[^1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199075
>How-To-Repeat:
# mkdir /tmp/foo
# cd /tmp/foo
# touch bar
# mtree -c > /tmp/m
# touch baz
# mtree -f /tmp/m -F freebsd9
. changed
modification time expected Mon Dec 9 12:00:00 2024 found Mon Dec 9 12:00:00 2024
extra: baz
It should have been:
"baz extra", not "extra: baz".
>Fix:
Subject: [PATCH 1/2] mtree: Fix FreeBSD 9 compatibility
The output on FreeBSD should be "%s extra", not "extra: %s".
FreeBSD PR: 199075
---
usr.sbin/mtree/verify.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c
index cfe335686afb..be11002cef85 100644
--- a/usr.sbin/mtree/verify.c
+++ b/usr.sbin/mtree/verify.c
@@ -147,7 +147,10 @@ vwalk(void)
continue;
extra:
if (!eflag && !(dflag && p->fts_info == FTS_SL)) {
- printf("extra: %s", RP(p));
+ if (flavor == F_FREEBSD9)
+ printf("%s extra", RP(p));
+ else
+ printf("extra: %s", RP(p));
if (rflag) {
#if HAVE_STRUCT_STAT_ST_FLAGS
if (rflag > 1 &&
--
Jose Luis Duran
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58885 CVS commit: src/usr.sbin/mtree
Date: Wed, 11 Dec 2024 09:52:26 -0500
Module Name: src
Committed By: christos
Date: Wed Dec 11 14:52:26 UTC 2024
Modified Files:
src/usr.sbin/mtree: verify.c
Log Message:
PR/58885: Jose Luis Duran: Fix output formatting for extra entries for
FreeBSD-9 compatibility.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/mtree/verify.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Tue, 17 Dec 2024 19:50:23 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-9 and pullup-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.