Date: Thu, 15 Mar 2018 09:04:24 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330976 - in stable/11/usr.sbin/makefs: . cd9660 ffs Message-ID: <201803150904.w2F94OYZ050364@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Thu Mar 15 09:04:23 2018 New Revision: 330976 URL: https://svnweb.freebsd.org/changeset/base/330976 Log: MFC r303036,r303038,r306822,r307923,: makefs: reorder 'usage' alphabetically From NetBSD, Mon Aug 15 14:45:01 2011 +0000 (wiz) Re-order `usage' alphabetically; rename option arguments in the manpage's `SYNOPSIS' section to match those from `usage' (not the other way around; the `usage'-line (and other parts of makefs.c) contain the correct names); minor punctuation improvements. From Snader_LB. makefs.8 1.36 makefs.c 1.30 Obtained from: NetBSD ------------------------------------------------------------------------ r303038 | emaste | 2016-07-19 18:40:54 +0000 (Tue, 19 Jul 2016) | 56 lines makefs: sync NetBSD IDs with upstream for changes that we already have May 22 21:51:39 2011 +0000 (christos): From Nathan Whitehorn (nwhitehorn at freebsd dot org): Add code to generate bootable ISOs on Powermac and CHRP systems. Synthesize some partition maps (APM and MBR, respectively) pointing to (a) the whole disk, and (b) relevant El Torito boot images that have been added by other code. These partition maps are a little bit funny looking, but they seem to work. FreeBSD has been using this successfully in their release generation on powerpc, as well as generating all non-SPARC install media. SPARC support could probably be added as an extension of this patch. makefs.8 1.33 Tue Aug 23 17:09:11 2011 +0000 (christos): PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2 filenames (buffer overflow) makefs does not properly verify the maximum filename length in the special "." case for both ISO level 1 and ISO level 2 filename conversion. This creates broken images or causes a buffer overflow (ISO level 2). ISO level 1: If a filename contains only dots or up to 8 characters followed by dots the 8+3 limit check doesn't work. ISO level 2: If a filename contains a dot in the first 30 characters and a dot on the 30th character, the length limit check doesn't work and the buffer is overflowed. $ mkdir level1 $ touch level1/12345............ $ makefs -t cd9660 -o isolevel=1 test.iso level1 $ mkdir level2 $ touch level2/1234567890.2345678901234567.....34567890123456789012345 $ makefs -t cd9660 -o isolevel=2 test.iso level2 cd9660.c 1.32 Sun Oct 9 21:33:43 2011 +0000 (christos): add support for setting the ufs label. (Nathan Whitehorn) ffs.c 1.45 ffs.h 1.2 mkfs.c 1.22 makefs.8 1.37 Obtained from: NetBSD ------------------------------------------------------------------------ r306822 | emaste | 2016-10-07 19:12:15 +0000 (Fri, 07 Oct 2016) | 4 lines makefs: diff reduction with NetBSD Obtained from: NetBSD usr.sbin/makefs/cd9660.c 1.33 ------------------------------------------------------------------------ r307923 | marcel | 2016-10-25 16:21:38 +0000 (Tue, 25 Oct 2016) | 7 lines Allow building makefs(8) from another Makefile (such as one in a seperate directory hierarchy used to build tools). This boils down to replacing the use of ${.CURDIR} with either ${SRCDIR} or ${SRCTOP}. SRCDIR is defined as the directory in which the Makefile lives that bmake(1) is currently reading. Use SRCTOP when reaching outside of makefs's directory. Modified: stable/11/usr.sbin/makefs/Makefile stable/11/usr.sbin/makefs/cd9660.c stable/11/usr.sbin/makefs/cd9660/Makefile.inc stable/11/usr.sbin/makefs/ffs.c stable/11/usr.sbin/makefs/ffs.h stable/11/usr.sbin/makefs/ffs/Makefile.inc stable/11/usr.sbin/makefs/ffs/mkfs.c stable/11/usr.sbin/makefs/makefs.8 stable/11/usr.sbin/makefs/makefs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/makefs/Makefile ============================================================================== --- stable/11/usr.sbin/makefs/Makefile Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/Makefile Thu Mar 15 09:04:23 2018 (r330976) @@ -1,10 +1,12 @@ # $FreeBSD$ +SRCDIR:=${.PARSEDIR:tA} + .include <src.opts.mk> PROG= makefs -CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${SRCDIR} SRCS= cd9660.c ffs.c \ makefs.c \ @@ -14,24 +16,24 @@ MAN= makefs.8 WARNS?= 2 -.include "${.CURDIR}/cd9660/Makefile.inc" -.include "${.CURDIR}/ffs/Makefile.inc" +.include "${SRCDIR}/cd9660/Makefile.inc" +.include "${SRCDIR}/ffs/Makefile.inc" CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1 CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1 -.PATH: ${.CURDIR}/../../contrib/mtree -CFLAGS+=-I${.CURDIR}/../../contrib/mtree +.PATH: ${SRCTOP}/contrib/mtree +CFLAGS+=-I${SRCTOP}/contrib/mtree SRCS+= getid.c misc.c spec.c -.PATH: ${.CURDIR}/../../contrib/mknod -CFLAGS+=-I${.CURDIR}/../../contrib/mknod +.PATH: ${SRCTOP}/contrib/mknod +CFLAGS+=-I${SRCTOP}/contrib/mknod SRCS+= pack_dev.c -.PATH: ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCTOP}/sys/ufs/ffs SRCS+= ffs_tables.c -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd +CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd util sbuf .if ${MK_TESTS} != "no" Modified: stable/11/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/11/usr.sbin/makefs/cd9660.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/cd9660.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.31 2011/08/06 23:25:19 christos Exp $ */ +/* $NetBSD: cd9660.c,v 1.32 2011/08/23 17:09:11 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD AND BSD-4-Clause @@ -1624,6 +1624,7 @@ cd9660_level1_convert_filename(const char *oldname, ch if (diskStructure.archimedes_enabled && *oldname == ',' && strlen(oldname) == 4) break; + /* Enforce 12.3 / 8 */ if (namelen == 8 && !found_ext) break; @@ -1631,7 +1632,7 @@ cd9660_level1_convert_filename(const char *oldname, ch if (islower((unsigned char)*oldname)) *newname++ = toupper((unsigned char)*oldname); else if (isupper((unsigned char)*oldname) - || isdigit((unsigned char)*oldname)) + || isdigit((unsigned char)*oldname)) *newname++ = *oldname; else *newname++ = '_'; @@ -1641,7 +1642,7 @@ cd9660_level1_convert_filename(const char *oldname, ch else namelen++; } - oldname ++; + oldname++; } if (is_file) { if (!found_ext && !diskStructure.omit_trailing_period) Modified: stable/11/usr.sbin/makefs/cd9660/Makefile.inc ============================================================================== --- stable/11/usr.sbin/makefs/cd9660/Makefile.inc Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/cd9660/Makefile.inc Thu Mar 15 09:04:23 2018 (r330976) @@ -1,9 +1,9 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/cd9660 ${.CURDIR}/../../sys/fs/cd9660/ +.PATH: ${SRCDIR}/cd9660 ${SRCTOP}/sys/fs/cd9660/ -CFLAGS+=-I${.CURDIR}/../../sys/fs/cd9660/ +CFLAGS+=-I${SRCTOP}/sys/fs/cd9660/ SRCS+= cd9660_strings.c cd9660_debug.c cd9660_eltorito.c \ cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c Modified: stable/11/usr.sbin/makefs/ffs.c ============================================================================== --- stable/11/usr.sbin/makefs/ffs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.c,v 1.44 2009/04/28 22:49:26 joerg Exp $ */ +/* $NetBSD: ffs.c,v 1.45 2011/10/09 22:49:26 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause Modified: stable/11/usr.sbin/makefs/ffs.h ============================================================================== --- stable/11/usr.sbin/makefs/ffs.h Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs.h Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.h,v 1.1 2004/12/20 20:51:42 jmc Exp $ */ +/* $NetBSD: ffs.h,v 1.2 2004/12/20 20:51:42 jmc Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause Modified: stable/11/usr.sbin/makefs/ffs/Makefile.inc ============================================================================== --- stable/11/usr.sbin/makefs/ffs/Makefile.inc Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs/Makefile.inc Thu Mar 15 09:04:23 2018 (r330976) @@ -1,9 +1,9 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/ffs ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCDIR}/ffs ${SRCTOP}/sys/ufs/ffs -CFLAGS+= -I${.CURDIR}/../../sys/ufs/ffs +CFLAGS+= -I${SRCTOP}/sys/ufs/ffs SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ufs_bmap.c SRCS+= buf.c mkfs.c Modified: stable/11/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- stable/11/usr.sbin/makefs/ffs/mkfs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs/mkfs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs.c,v 1.20 2004/06/24 22:30:13 lukem Exp $ */ +/* $NetBSD: mkfs.c,v 1.22 2011/10/09 22:30:13 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-3-Clause Modified: stable/11/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/11/usr.sbin/makefs/makefs.8 Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/makefs.8 Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -.\" $NetBSD: makefs.8,v 1.32 2009/01/20 20:47:25 bjh21 Exp $ +.\" $NetBSD: makefs.8,v 1.33 2011/05/22 21:51:39 christos Exp $ .\" .\" Copyright (c) 2001-2003 Wasabi Systems, Inc. .\" All rights reserved. @@ -407,7 +407,8 @@ The utility appeared in .Nx 1.6 . .Sh AUTHORS -.An Luke Mewburn Aq Mt lukem@NetBSD.org +.An Luke Mewburn +.Aq Mt lukem@NetBSD.org (original program), .An Daniel Watt , .An Walter Deignan , Modified: stable/11/usr.sbin/makefs/makefs.c ============================================================================== --- stable/11/usr.sbin/makefs/makefs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/makefs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -405,10 +405,10 @@ usage(void) prog = getprogname(); fprintf(stderr, -"usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" -"\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" -"\t[-xZ] [-N userdb-dir] [-T <timestamp/file>]\n" +"usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n" +"\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n" +"\t[-N userdb-dir] [-o fs-options] [-R roundup-size] [-S sector-size]\n" +"\t[-s image-size] [-T <timestamp/file>] [-t fs-type]\n" "\timage-file directory | manifest [extra-directory ...]\n", prog); exit(1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803150904.w2F94OYZ050364>