CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Wed Apr 24 01:44:51 UTC 2024 Modified Files: src/usr.sbin/mtree: create.c Log Message: For the NetBSD tools build we provide our own fts.h not FreeBSD's so the comparator should have the NetBSD signature. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/create.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mtree/create.c diff -u src/usr.sbin/mtree/create.c:1.77 src/usr.sbin/mtree/create.c:1.78 --- src/usr.sbin/mtree/create.c:1.77 Sat Dec 2 08:34:48 2023 +++ src/usr.sbin/mtree/create.c Tue Apr 23 21:44:51 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $ */ +/* $NetBSD: create.c,v 1.78 2024/04/24 01:44:51 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.78 2024/04/24 01:44:51 christos Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ static uid_t uid; static mode_t mode; static u_long flags; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) && !defined(HAVE_NBTOOL_CONFIG_H) #define FTS_CONST const #else #define FTS_CONST
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Wed Apr 24 01:44:51 UTC 2024 Modified Files: src/usr.sbin/mtree: create.c Log Message: For the NetBSD tools build we provide our own fts.h not FreeBSD's so the comparator should have the NetBSD signature. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/create.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Sat Dec 2 13:34:48 UTC 2023 Modified Files: src/usr.sbin/mtree: create.c verify.c Log Message: PR/57735: Jose Louis Duran: check if fts_read(3) had an error. (FreeBSD commit https://github.com/freebsd/freebsd-src/commit/\ 2dfa4b66b3d0ce6ce2df476b5615f8415a19) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/mtree/create.c cvs rdiff -u -r1.47 -r1.48 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. Modified files: Index: src/usr.sbin/mtree/create.c diff -u src/usr.sbin/mtree/create.c:1.76 src/usr.sbin/mtree/create.c:1.77 --- src/usr.sbin/mtree/create.c:1.76 Sun Nov 18 18:03:36 2018 +++ src/usr.sbin/mtree/create.c Sat Dec 2 08:34:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.76 2018/11/18 23:03:36 sevan Exp $ */ +/* $NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.76 2018/11/18 23:03:36 sevan Exp $"); +__RCSID("$NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $"); #endif #endif /* not lint */ @@ -173,6 +173,8 @@ cwalk(FILE *fp) } } + if (errno != 0) + mtree_err("fts_read: %s", strerror(errno)); fts_close(t); if (sflag && keys & F_CKSUM) mtree_err("%s checksum: %u", fullpath, crc_total); Index: src/usr.sbin/mtree/verify.c diff -u src/usr.sbin/mtree/verify.c:1.47 src/usr.sbin/mtree/verify.c:1.48 --- src/usr.sbin/mtree/verify.c:1.47 Thu Mar 18 16:02:18 2021 +++ src/usr.sbin/mtree/verify.c Sat Dec 2 08:34:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $ */ +/* $NetBSD: verify.c,v 1.48 2023/12/02 13:34:48 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $"); +__RCSID("$NetBSD: verify.c,v 1.48 2023/12/02 13:34:48 christos Exp $"); #endif #endif /* not lint */ @@ -166,6 +166,8 @@ vwalk(void) } fts_set(t, p, FTS_SKIP); } + if (errno != 0) + mtree_err("fts_read: %s", strerror(errno)); fts_close(t); if (sflag) warnx("%s checksum: %u", fullpath, crc_total);
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Sat Dec 2 13:34:48 UTC 2023 Modified Files: src/usr.sbin/mtree: create.c verify.c Log Message: PR/57735: Jose Louis Duran: check if fts_read(3) had an error. (FreeBSD commit https://github.com/freebsd/freebsd-src/commit/\ 2dfa4b66b3d0ce6ce2df476b5615f8415a19) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/mtree/create.c cvs rdiff -u -r1.47 -r1.48 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.
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Sat Dec 2 13:26:09 UTC 2023 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: PR/57735: Jose Louis Duran: Add missing xref to mtree.5 (FreeBSD commit https://github.com/freebsd/freebsd-src/commit/\ da232c04ab9eba3d3a7fc73881daff847071e9fd) To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mtree/mtree.8 diff -u src/usr.sbin/mtree/mtree.8:1.77 src/usr.sbin/mtree/mtree.8:1.78 --- src/usr.sbin/mtree/mtree.8:1.77 Thu Jun 1 09:04:47 2023 +++ src/usr.sbin/mtree/mtree.8 Sat Dec 2 08:26:09 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mtree.8,v 1.77 2023/06/01 13:04:47 uwe Exp $ +.\" $NetBSD: mtree.8,v 1.78 2023/12/02 13:26:09 christos Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -56,7 +56,7 @@ .\" .\" @(#)mtree.8 8.2 (Berkeley) 12/11/93 .\" -.Dd June 16, 2020 +.Dd December 2, 2023 .Dt MTREE 8 .Os .Sh NAME @@ -825,6 +825,7 @@ seconds.nanoseconds without zero padding .Xr fnmatch 3 , .Xr fts 3 , .Xr strsvis 3 , +.Xr mtree 5 , .Xr chown 8 , .Xr mknod 8 .Sh HISTORY
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Sat Dec 2 13:26:09 UTC 2023 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: PR/57735: Jose Louis Duran: Add missing xref to mtree.5 (FreeBSD commit https://github.com/freebsd/freebsd-src/commit/\ da232c04ab9eba3d3a7fc73881daff847071e9fd) To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: uwe Date: Thu Jun 1 13:04:48 UTC 2023 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: mtree(8): a few markup fixes Didn't touch the section that describes the spec file format. We have the format documented here, in mtree(8), and we also have the format description in mtree(5) that comes from libarchive. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mtree/mtree.8 diff -u src/usr.sbin/mtree/mtree.8:1.76 src/usr.sbin/mtree/mtree.8:1.77 --- src/usr.sbin/mtree/mtree.8:1.76 Tue Jun 16 14:26:39 2020 +++ src/usr.sbin/mtree/mtree.8 Thu Jun 1 13:04:47 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mtree.8,v 1.76 2020/06/16 14:26:39 wiz Exp $ +.\" $NetBSD: mtree.8,v 1.77 2023/06/01 13:04:47 uwe Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -93,9 +93,11 @@ characteristics do not match the specifi missing from either the file hierarchy or the specification. .Pp The options are as follows: -.Bl -tag -width Xxxexcludexfilexx +.Bl -tag -width Fl +. .It Fl b Suppress blank lines before entering and after exiting directories. +. .It Fl C Convert a specification into a format that's easier to parse with various tools. @@ -105,8 +107,7 @@ from the file given by In the output, each file or directory is represented using a single line (which might be very long). The full path name -(beginning with -.Dq \&./ ) +.Pq beginning with Ql \&./ is always printed as the first field; .Fl K , .Fl k , @@ -120,19 +121,25 @@ can be used to control which files are p and the .Fl S option can be used to sort the output. +. .It Fl c Print a specification for the file hierarchy originating at -the current working directory (or the directory provided by -.Fl p Ar path ) +the current working directory +.Po or the directory provided by +.Fl p Ar path +.Pc to the standard output. The output is in a style using relative path names. +. .It Fl D As per .Fl C , except that the path name is always printed as the last field instead of the first. +. .It Fl d Ignore everything except directory type files. +. .It Fl E Ar tags Add the comma separated tags to the .Dq exclusion @@ -141,9 +148,11 @@ Non-directories with tags which are in t .Fl C and .Fl D . +. .It Fl e Don't complain about files that are in the file hierarchy, but not in the specification. +. .It Fl F Ar flavor Set the compatibility flavor of the .Nm @@ -151,22 +160,23 @@ utility. The .Ar flavor can be one of -.Sy mtree , -.Sy freebsd9 , +.Cm mtree , +.Cm freebsd9 , or -.Sy netbsd6 . +.Cm netbsd6 . The default is -.Sy mtree . +.Cm mtree . The -.Sy freebsd9 +.Cm freebsd9 and -.Sy netbsd6 +.Cm netbsd6 flavors attempt to preserve output compatibility and command line option backward compatibility with .Fx 9.0 and .Nx 6.0 respectively. +. .It Fl f Ar spec Read the specification from .Ar file , @@ -178,10 +188,18 @@ The specifications will be sorted like o .Fl c . The output format in this case is somewhat reminiscent of .Xr comm 1 , -having "in first spec only", "in second spec only", and "different" -columns, prefixed by zero, one and two TAB characters respectively. -Each entry in the "different" column occupies two lines, one from each -specification. +having +.Dq in first spec only , +.Dq in second spec only , +and +.Dq different +columns, prefixed by zero, one and two +.Tn TAB +characters respectively. +Each entry in the +.Dq different +column occupies two lines, one from each specification. +. .It Fl I Ar tags Add the comma separated tags to the .Dq inclusion @@ -191,14 +209,22 @@ Non-directories with tags which are in t and .Fl D . If no inclusion list is provided, the default is to display all files. +. .It Fl i -If specified, set the schg and/or sappnd flags. +If specified, set the +.Ql schg +and/or +.Ql sappnd +flags. +. .It Fl j Indent the output 4 spaces each time a directory level is descended when creating a specification with the .Fl c option. -This does not affect either the /set statements or the comment before each +This does not affect either the +.Ql /set +statements or the comment before each directory. It does however affect the comment before the close of each directory. This is the equivalent of the @@ -207,26 +233,31 @@ option in the .Fx version of .Nm . +. .It Fl K Ar keywords Add the specified (whitespace or comma separated) keywords to the current set of keywords. If .Ql all is specified, add all of the other keywords. +. .It Fl k Ar keywords Use the .Sy type keyword plus the specified (whitespace or comma separated) -keywords instead of the current set of keywords. +.Ar keywords +instead of the current set of keywords. If .Ql all is specified, use all of the o
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: uwe Date: Thu Jun 1 13:04:48 UTC 2023 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: mtree(8): a few markup fixes Didn't touch the section that describes the spec file format. We have the format documented here, in mtree(8), and we also have the format description in mtree(5) that comes from libarchive. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/mtree
On Jan 2, 8:55am, g...@ir.bbn.com (Greg Troxel) wrote: -- Subject: Re: CVS commit: src/usr.sbin/mtree | Then it seems that the tests should have been changed in the same | commit, and new tests added for netbsd flavor! I did not know about the tests. I will fix them. christos
Re: CVS commit: src/usr.sbin/mtree
chris...@zoulas.com (Christos Zoulas) writes: > On Jan 2, 10:19am, mar...@homeworld.netbsd.org (Martin Husemann) wrote: > -- Subject: Re: CVS commit: src/usr.sbin/mtree > > | On Thu, Dec 20, 2012 at 11:43:17AM -0500, Christos Zoulas wrote: > | > Module Name: src > | > Committed By: christos > | > Date: Thu Dec 20 16:43:17 UTC 2012 > | > > | > Modified Files: > | > src/usr.sbin/mtree: create.c extern.h mtree.8 mtree.c spec.c > | > > | > Log Message: > | > Implement the "flavor" output discussed in tech-userlevel@, by Brooks > Davis > | This broke the mtree atf tests. Output now differs by additional size > | values for symlinks and directories: > | > | -2 type=dir nlink=2 > | +2 type=dir nlink=2 size=0 > | > | See for example: > | > http://www.netbsd.org/~martin/sparc64-atf/147_atf.html#usr.sbin_mtree_t_mtree_create > > Yes, we agreed to change the format for the default and if you want > the backwards > compatible one, we you need to say netbsd flavor. Then it seems that the tests should have been changed in the same commit, and new tests added for netbsd flavor! pgpwIjxnuv4aW.pgp Description: PGP signature
Re: CVS commit: src/usr.sbin/mtree
On Wed, 2 Jan 2013, Christos Zoulas wrote: On Jan 2, 10:19am, mar...@homeworld.netbsd.org (Martin Husemann) wrote: -- Subject: Re: CVS commit: src/usr.sbin/mtree | On Thu, Dec 20, 2012 at 11:43:17AM -0500, Christos Zoulas wrote: | > Module Name: src | > Committed By:christos | > Date:Thu Dec 20 16:43:17 UTC 2012 | > | > Modified Files: | > src/usr.sbin/mtree: create.c extern.h mtree.8 mtree.c spec.c | > | > Log Message: | > Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis | > | > | > To generate a diff of this commit: | > cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/mtree/create.c | > cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/mtree/extern.h | > cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/mtree/mtree.8 | > cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/mtree/mtree.c | > cvs rdiff -u -r1.84 -r1.85 src/usr.sbin/mtree/spec.c | | This broke the mtree atf tests. Output now differs by additional size | values for symlinks and directories: | | -2 type=dir nlink=2 | +2 type=dir nlink=2 size=0 | | | See for example: | http://www.netbsd.org/~martin/sparc64-atf/147_atf.html#usr.sbin_mtree_t_mtree_create Yes, we agreed to change the format for the default and if you want the backwards compatible one, we you need to say netbsd flavor. Seems to me we to get the tests updated * to reflect the changes in expected output, and also * additional test cases to ensure that "compatability mode" works correctly. christos !DSPAM:50e43a9b17431864914745! - | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com| | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | | Kernel Developer | | pgoyette at netbsd.org | -
Re: CVS commit: src/usr.sbin/mtree
On Jan 2, 10:19am, mar...@homeworld.netbsd.org (Martin Husemann) wrote: -- Subject: Re: CVS commit: src/usr.sbin/mtree | On Thu, Dec 20, 2012 at 11:43:17AM -0500, Christos Zoulas wrote: | > Module Name:src | > Committed By: christos | > Date: Thu Dec 20 16:43:17 UTC 2012 | > | > Modified Files: | > src/usr.sbin/mtree: create.c extern.h mtree.8 mtree.c spec.c | > | > Log Message: | > Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis | > | > | > To generate a diff of this commit: | > cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/mtree/create.c | > cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/mtree/extern.h | > cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/mtree/mtree.8 | > cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/mtree/mtree.c | > cvs rdiff -u -r1.84 -r1.85 src/usr.sbin/mtree/spec.c | | This broke the mtree atf tests. Output now differs by additional size | values for symlinks and directories: | | -2 type=dir nlink=2 | +2 type=dir nlink=2 size=0 | | | See for example: | http://www.netbsd.org/~martin/sparc64-atf/147_atf.html#usr.sbin_mtree_t_mtree_create Yes, we agreed to change the format for the default and if you want the backwards compatible one, we you need to say netbsd flavor. christos
Re: CVS commit: src/usr.sbin/mtree
On Thu, Dec 20, 2012 at 11:43:17AM -0500, Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Thu Dec 20 16:43:17 UTC 2012 > > Modified Files: > src/usr.sbin/mtree: create.c extern.h mtree.8 mtree.c spec.c > > Log Message: > Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis > > > To generate a diff of this commit: > cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/mtree/create.c > cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/mtree/extern.h > cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/mtree/mtree.8 > cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/mtree/mtree.c > cvs rdiff -u -r1.84 -r1.85 src/usr.sbin/mtree/spec.c This broke the mtree atf tests. Output now differs by additional size values for symlinks and directories: -2 type=dir nlink=2 +2 type=dir nlink=2 size=0 See for example: http://www.netbsd.org/~martin/sparc64-atf/147_atf.html#usr.sbin_mtree_t_mtree_create Martin
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: wiz Date: Wed Jan 20 14:00:48 UTC 2010 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: Fix date. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: uebayasi Date: Wed Jan 20 13:50:27 UTC 2010 Modified Files: src/usr.sbin/mtree: mtree.8 Log Message: Document -t (modify mtime). Bump date. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/mtree/mtree.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/mtree
On Sat, 04 Apr 2009, Alan Barrett wrote: > Modified Files: > src/usr.sbin/mtree: mtree.h spec.c > > Log Message: > Tags are internally stored with leading and trailing commas, for ease > of using strcmp(3) to check them against inclusion or exclusion lists. > Don't output the leading or trailing commas. That should have been strstr(3), not strcmp(3). I have modified the log message in the repository. --apb (Alan Barrett)