CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Wed Jun 19 10:30:53 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist/libfile: file.h Log Message: No need to check and redefine C89 strerror(3) and strtoul(3). Fixes build error on MacOS 10.4 with Xcode 2.5. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/libfile/file.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/libfile/file.h diff -u src/external/gpl2/mkhybrid/dist/libfile/file.h:1.2 src/external/gpl2/mkhybrid/dist/libfile/file.h:1.3 --- src/external/gpl2/mkhybrid/dist/libfile/file.h:1.2 Fri May 31 20:25:41 2024 +++ src/external/gpl2/mkhybrid/dist/libfile/file.h Wed Jun 19 10:30:53 2024 @@ -116,15 +116,4 @@ extern int debug; /* enable debugging? extern int zflag; /* process compressed files? */ extern int lflag; /* follow symbolic links? */ - -#ifndef HAVE_STRERROR -extern int sys_nerr; -extern char *sys_errlist[]; -#define strerror(e) \ - (((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error") -#endif -#ifndef HAVE_STRTOUL -#define strtoul(a, b, c) strtol(a, b, c) -#endif - #endif /* __file_h__ */
CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Wed Jun 19 10:30:53 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist/libfile: file.h Log Message: No need to check and redefine C89 strerror(3) and strtoul(3). Fixes build error on MacOS 10.4 with Xcode 2.5. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/libfile/file.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8/man8.macppc
Module Name:src Committed By: tsutsui Date: Sun Jun 9 05:42:59 UTC 2024 Modified Files: src/share/man/man8/man8.macppc: ofwboot.8 Log Message: Update misc ofwboot(8) descriptions. - add examples how to boot USB flash containing bootable CD ISO - also add notes how to check a device path of USB flash - no need to specify a name of "netbsd.macppc" because ofwboot(8) searches "netbsd", "netbsd.gz", and "netbsd.macppc" by default - describe about partition "zero" required on booting via raw ofwboot - no need to specify boot-file (i.e. ofwboot.xcf) on booting from CD on Open Firmware 1 or 2 machines that use the partition "zero" method - remove leftover of ancient release number of NetBSD "1.5" - add "CLAIM failed" case in ERROR section - add notes that it's recommended to restart Open Firmware by "reset-all" command if got any Open Firmware errors - add links to "NetBSD/macppc Partitioning HOW-TO" and "NetBSD/macppc Model Support" in the SEE ALSO section - use https for links also use https://cdn.NetBSD.org/ instead of obsolete ftp: - avoid newlines in boot-device and boot-file argument descriptions - consistently use "\" in the boot-file paths - consistently use "CD-ROM" rather than "CDROM" - remove an obsolete commented out block - bump date To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man8/man8.macppc/ofwboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/man8.macppc/ofwboot.8 diff -u src/share/man/man8/man8.macppc/ofwboot.8:1.17 src/share/man/man8/man8.macppc/ofwboot.8:1.18 --- src/share/man/man8/man8.macppc/ofwboot.8:1.17 Sat Mar 2 00:03:20 2024 +++ src/share/man/man8/man8.macppc/ofwboot.8 Sun Jun 9 05:42:59 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: ofwboot.8,v 1.17 2024/03/02 00:03:20 uwe Exp $ +.\" $NetBSD: ofwboot.8,v 1.18 2024/06/09 05:42:59 tsutsui Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 1, 2024 +.Dd June 9, 2024 .Dt OFWBOOT 8 macppc .Os .Sh NAME @@ -82,14 +82,13 @@ actually designates the primary bootload form: .Bd -literal -offset indent .Sm off -.Ar device Ic \&: Op Ar partition-num -.Ic \&, Op Ar bootloader-filename +.Ar device Ic \&: Oo Ar partition-num Oc Op \&, \e Ar bootloader-filename .Sm on .Ed .Pp A typical example, from a PowerBook (FireWire), is .Pp -.Dl /pci@f200/mac-io@17/ata-4@1f000/@0:9,ofwboot.xcf +.Dl /pci@f200/mac-io@17/ata-4@1f000/@0:9,\eofwboot.xcf .Pp Note that colon .Pq Ql \&: @@ -119,7 +118,7 @@ The .Ar boot-device above could then be simplified to: .Pp -.Dl hd:9,ofwboot.xcf +.Dl hd:9,\eofwboot.xcf .Pp .Ar bootloader-filename is usually @@ -159,8 +158,7 @@ The syntax is similar to the argument: .Bd -literal -offset indent .Sm off -.Op Ar boot-file-device Ic \&: Ar partition-num\^ Ic \&/ -.Op Ar kernel-name +.Oo Ar boot-file-device Ic \&: Ar partition-num\^ Ic \&/ Oc Op Ar kernel-name .Sm on .Ed .Pp @@ -242,8 +240,14 @@ are the same program, in different execu is installed via .Xr installboot 8 on systems with Open Firmware versions less than 3. -It is not necessary to specify this file name, as it is stored in a special -location on the disk, partition +It is not necessary to specify this file name on the Open Firmware +.Ic boot +command, as it is stored in a special location in the +.Nx +partition that is marked +.Dq bootable +in the Apple partition map entry. +The bootable partition can be specified as partition .Dq zero . For example, the following command might be used to boot from a SCSI device with ID 2: @@ -303,9 +307,9 @@ with RAM disk and included. . .It Pa NetBSD-{RELEASE}-macppc.iso -bootable CDROM image for all supported systems. +bootable CD-ROM image for all supported systems. Usually located at -.Pa ftp://ftp.NetBSD.org/pub/NetBSD/images/{RELEASE}/NetBSD-{RELEASE}-macppc.iso +.Pa https://cdn.NetBSD.org/pub/NetBSD/images/{RELEASE}/ .El .Sh EXAMPLES .Pp @@ -323,7 +327,7 @@ Boot an Open Firmware 3 system, with .Ar netbsd installed on partition .Dq Pa a : -.Dl 0 > boot hd:,ofwboot.xcf +.Dl 0 > boot hd:,\eofwboot.xcf . .It Boot the kernel named @@ -338,16 +342,39 @@ version of .Nm from the USB flash drive: .Dl 0 > boot usb0/disk:,\eofwboot.elf hd/netbsd.new -d +or +.Dl 0 > boot usb1/disk:,\eofwboot.elf hd/netbsd.new -d +Note: You can check which usb device name should be used by +.Dq Ic devalias +and +.Dq Ic dev usb0 ls +commands etc. . .It -Boot from bootable CDROM with Open Firmware 3 or higher: -.Dl 0 > boot cd:,\eofwboot.xcf netbsd.macppc +Boot from bootable CD-ROM of +.Nx +release with Open Firmware 3 or higher: +.Dl 0 > boot cd:,\eofwboot.xcf . .It -Boot from bootable CDROM (internal SCSI, id=3) of -.Nx 1.5 +Boot from bootable CD-ROM
CVS commit: src/share/man/man8/man8.macppc
Module Name:src Committed By: tsutsui Date: Sun Jun 9 05:42:59 UTC 2024 Modified Files: src/share/man/man8/man8.macppc: ofwboot.8 Log Message: Update misc ofwboot(8) descriptions. - add examples how to boot USB flash containing bootable CD ISO - also add notes how to check a device path of USB flash - no need to specify a name of "netbsd.macppc" because ofwboot(8) searches "netbsd", "netbsd.gz", and "netbsd.macppc" by default - describe about partition "zero" required on booting via raw ofwboot - no need to specify boot-file (i.e. ofwboot.xcf) on booting from CD on Open Firmware 1 or 2 machines that use the partition "zero" method - remove leftover of ancient release number of NetBSD "1.5" - add "CLAIM failed" case in ERROR section - add notes that it's recommended to restart Open Firmware by "reset-all" command if got any Open Firmware errors - add links to "NetBSD/macppc Partitioning HOW-TO" and "NetBSD/macppc Model Support" in the SEE ALSO section - use https for links also use https://cdn.NetBSD.org/ instead of obsolete ftp: - avoid newlines in boot-device and boot-file argument descriptions - consistently use "\" in the boot-file paths - consistently use "CD-ROM" rather than "CDROM" - remove an obsolete commented out block - bump date To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man8/man8.macppc/ofwboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:07:48 UTC 2024 Modified Files: src/distrib/macppc: Makefile src/etc/etc.macppc: Makefile.inc Log Message: Build macppc iso with TOOL_MKHYBRID via "iso-image" target in src/etc. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/macppc/Makefile cvs rdiff -u -r1.12 -r1.13 src/etc/etc.macppc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/macppc/Makefile diff -u src/distrib/macppc/Makefile:1.17 src/distrib/macppc/Makefile:1.18 --- src/distrib/macppc/Makefile:1.17 Tue May 25 11:55:40 2021 +++ src/distrib/macppc/Makefile Sat Jun 8 13:07:48 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2021/05/25 11:55:40 martin Exp $ +# $NetBSD: Makefile,v 1.18 2024/06/08 13:07:48 tsutsui Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -18,6 +18,9 @@ release: check_RELEASEDIR .WAIT ${OWFBOO ${RELEASE_INSTALL} ${OFWBOOTERS} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation iso_image: - ${MAKEDIRTARGET} cdroms iso_image +# macppc installcd is now created via "do-isa-image" target in +# etc/Makefile using ${TOOLS_MKHYBRID} for ISO9660/HFS hybrid image +# with bootable special Apple partition map +# ${MAKEDIRTARGET} cdroms iso_image .include Index: src/etc/etc.macppc/Makefile.inc diff -u src/etc/etc.macppc/Makefile.inc:1.12 src/etc/etc.macppc/Makefile.inc:1.13 --- src/etc/etc.macppc/Makefile.inc:1.12 Tue Sep 15 08:14:31 2020 +++ src/etc/etc.macppc/Makefile.inc Sat Jun 8 13:07:48 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2020/09/15 08:14:31 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.13 2024/06/08 13:07:48 tsutsui Exp $ # # etc.macppc/Makefile.inc -- macppc-specific etc Makefile targets # @@ -14,3 +14,41 @@ BUILD_KERNELS+= INSTALL INSTALL_601 GEN INSTALLATION_DIRS+= installation/floppy .endif + +# For "make iso-image" +# mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image. +# XXX: files in ${DISTRIB_CDROMDIR} should be moved under distrib/macppc/cdrom? +DISTRIB_CDROMDIR= ${NETBSDSRCDIR}/distrib/cdrom + +BOOTHFS= boothfs +UUDECODE_FILES= ${BOOTHFS} +.SUFFIXES: .uue +.PATH.uue: ${DISTRIB_CDROMDIR} + +MKISOFS_FLAGS+= -hide-rr-moved \ + -hfs -part -hide-hfs-list ${DISTRIB_CDROMDIR}/hide-hfs.lst \ + --macbin -map ${DISTRIB_CDROMDIR}/hfsmap.lst \ + -hide-joliet-list ${DISTRIB_CDROMDIR}/hide-jol.lst \ + -boot-hfs-file ${.OBJDIR}/${BOOTHFS} +# exclude large debug sets to avoid 700MB overflow +MKISOFS_FLAGS+= -m debug.tgz -m xdebug.tgz + +MD_DISTRIBDIR= ${NETBSDSRCDIR}/distrib/${MACHINE} +CDINSTKERNEL= ${MD_DISTRIBDIR}/floppies/md-kernel +_INSTKERNELNOBJDIR!= cd ${CDINSTKERNEL} && ${PRINTOBJDIR} +CDKERNELS= netbsd-INSTALL.gz netbsd +CDKERNELS+= netbsd-INSTALL_601.gz netbsd.601 + +iso-image-md-pre: ${BOOTHFS} +.for kernel target in ${CDKERNELS} + ${INSTALL} ${COPY} -m 0644 \ + ${_INSTKERNELNOBJDIR}/${kernel} ${CDROM.dir}/${target} +.endfor + ${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/ofwboot ${CDROM.dir} + ${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/ofwboot.xcf ${CDROM.dir} + +iso-image: do-iso-image + +iso-image-md-post: + ${TOOL_MACPPCINSTALLBOOT} ${CDROM_IMAGE} \ + ${DESTDIR}/usr/mdec/bootxx /ofwboot
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:07:48 UTC 2024 Modified Files: src/distrib/macppc: Makefile src/etc/etc.macppc: Makefile.inc Log Message: Build macppc iso with TOOL_MKHYBRID via "iso-image" target in src/etc. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/macppc/Makefile cvs rdiff -u -r1.12 -r1.13 src/etc/etc.macppc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/cdrom
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:05:33 UTC 2024 Modified Files: src/distrib/cdrom: boothfs.uue src/distrib/cdrom/macppc_mkboothfs: mkboothfs.c Log Message: Make sure NetBSD_BootBlock partition has 32KB to avoid extra padding. It looks at least OpenFirmware 2.x fails to load the primary bootloader in the NetBSD_BootBlock partition if the partition size is too small, probably because OpenFirmware read() function implicitly uses 32KB blocks. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/boothfs.uue cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_mkboothfs/mkboothfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/boothfs.uue diff -u src/distrib/cdrom/boothfs.uue:1.1 src/distrib/cdrom/boothfs.uue:1.2 --- src/distrib/cdrom/boothfs.uue:1.1 Sun Mar 29 04:54:19 2009 +++ src/distrib/cdrom/boothfs.uue Sat Jun 8 13:05:32 2024 @@ -1,4 +1,4 @@ -$NetBSD: boothfs.uue,v 1.1 2009/03/29 04:54:19 tsutsui Exp $ +$NetBSD: boothfs.uue,v 1.2 2024/06/08 13:05:32 tsutsui Exp $ begin 644 boothfs M15((`0`! M @@ -11,9 +11,9 @@ M``` M M M -M``!030```0$!3F5T0E-$7T)O;W1" +M``!030```0$03F5T0E-$7T)O;W1" M;&]C:P!!<'!L95]$ #endif +#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H +#include +#endif #include #include @@ -40,8 +43,18 @@ #include #include +#define BUFSIZE (64 * 1024) + #define BSIZE 512 -#define BUFSIZE (8 * 1024) +#define BOOTPARTSIZE 32768 /* XXX: not sure how much required */ +#define BOOTDATASIZE (BOOTPARTSIZE - MACPPC_BOOT_BLOCK_MAX_SIZE) + +#define HFS_BLKSIZE 512 +#define HFS_MAGICOFFSET (BOOTDATASIZE - (HFS_BLKSIZE * 2)) +#define HFS_MAGIC 0x4c4b + +#define SIZETOBLK512(size) ((size) / 512) +#define SIZETOBLK2048(size) ((size) / 2048) static void usage(void); @@ -94,8 +107,8 @@ main(int argc, char **argv) pme.pmSig = htobe16(APPLE_PART_MAP_ENTRY_MAGIC); pme.pmMapBlkCnt = htobe32(1); pme.pmPyPartStart = htobe32(1); - pme.pmPartBlkCnt = htobe32(1); - pme.pmDataCnt = htobe32(1); + pme.pmPartBlkCnt = htobe32(SIZETOBLK2048(BOOTPARTSIZE)); + pme.pmDataCnt = htobe32(SIZETOBLK2048(BOOTDATASIZE)); strlcpy(pme.pmPartName, "NetBSD_BootBlock", sizeof(pme.pmPartName)); strlcpy(pme.pmPartType, "Apple_Driver", sizeof(pme.pmPartType)); pme.pmPartStatus = htobe32(0x3b); @@ -112,8 +125,8 @@ main(int argc, char **argv) * Write 512-byte/sector map in the third 512 byte block */ pme.pmPyPartStart = htobe32(4); - pme.pmPartBlkCnt = htobe32(4); - pme.pmDataCnt = htobe32(4); + pme.pmPartBlkCnt = htobe32(SIZETOBLK512(BOOTPARTSIZE)); + pme.pmDataCnt = htobe32(SIZETOBLK512(BOOTDATASIZE)); memset(buf, 0, BSIZE); memcpy(buf, , sizeof(pme)); write(ofd, buf, BSIZE); @@ -133,10 +146,9 @@ main(int argc, char **argv) /* * Prepare HFS "bootblock"; enough to pacify mkisofs. */ - memset(buf, 0, BSIZE * 2); - buf[0] = 0x4c; - buf[1] = 0x4b; - if (write(ofd, buf, BSIZE * 2) != BSIZE * 2) + memset(buf, 0, BOOTDATASIZE); + be16enc([HFS_MAGICOFFSET], HFS_MAGIC); + if (write(ofd, buf, BOOTDATASIZE) != BOOTDATASIZE) err(1, "write boot-hfs-file `%s'", boothfs); free(buf);
CVS commit: src/distrib/cdrom
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:05:33 UTC 2024 Modified Files: src/distrib/cdrom: boothfs.uue src/distrib/cdrom/macppc_mkboothfs: mkboothfs.c Log Message: Make sure NetBSD_BootBlock partition has 32KB to avoid extra padding. It looks at least OpenFirmware 2.x fails to load the primary bootloader in the NetBSD_BootBlock partition if the partition size is too small, probably because OpenFirmware read() function implicitly uses 32KB blocks. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/boothfs.uue cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_mkboothfs/mkboothfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:03:41 UTC 2024 Modified Files: src/distrib/cdrom: Makefile src/distrib/cdrom/macppc_installboot: Makefile src/share/mk: bsd.own.mk src/tools: Makefile Added Files: src/tools/macppc_installboot: Makefile Log Message: Build src/distrib/cdrom/macppc_installboot in src/tools as a tool. Also use the tools version ${TOOLS_MACPPC_INSTALLBOOT} to create bootable ISO9660/HFS hybrid installcd image for macppc. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/distrib/cdrom/Makefile cvs rdiff -u -r1.13 -r1.14 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.1375 -r1.1376 src/share/mk/bsd.own.mk cvs rdiff -u -r1.221 -r1.222 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/macppc_installboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/Makefile diff -u src/distrib/cdrom/Makefile:1.56 src/distrib/cdrom/Makefile:1.57 --- src/distrib/cdrom/Makefile:1.56 Fri May 31 20:57:32 2024 +++ src/distrib/cdrom/Makefile Sat Jun 8 13:03:40 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.56 2024/05/31 20:57:32 tsutsui Exp $ +# $NetBSD: Makefile,v 1.57 2024/06/08 13:03:40 tsutsui Exp $ # # Consult "*.conf" for the configuration variables; this Makefile is typically # not edited for basic configuration changes. @@ -67,10 +67,6 @@ SUBDIR= MKISOFS= ${TOOL_MKHYBRID} .endif -.if !empty(ALL_PORTS:Mmacppc) -SUBDIR+= macppc_installboot -.endif - .if !empty(SUBDIR) .include .endif @@ -85,9 +81,6 @@ RSYNC?= /usr/pkg/bin/rsync ALPHA_IBOOT?= ${TOOL_INSTALLBOOT} -m alpha -o sunsum,append PMAX_IBOOT?= ${TOOL_INSTALLBOOT} -m pmax -o sunsum,append VAX_IBOOT?= ${TOOL_INSTALLBOOT} -m vax -o sunsum,append -.if !empty(ALL_PORTS:Mmacppc) -MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${PRINTOBJDIR} -.endif .if !empty(ALL_PORTS:Msgimips) SGIMIPS_SGIVOL?= ${TOOLDIR}/bin/nbsgivol .endif @@ -472,10 +465,6 @@ size-${image}: stage-${image} extfilepre # Actually build the image with all the bootstrap goo -.if !empty(BASE_PORTS.${image}:Mmacppc) -${IMAGEDIR}/${image}.iso: all-macppc_installboot -.endif - ${IMAGEDIR}/${image}.iso: size-${image} check_mkisofs @sort -o ${contents.${image}} ${contents.${image}} .if defined(LOG_MKISOFS) @@ -489,8 +478,7 @@ ${IMAGEDIR}/${image}.iso: size-${image} ${.TARGET} ${SUN_BOOT_ARGS.${image}} .endif .if !empty(BASE_PORTS.${image}:Mmacppc) - ${MACPPC_IBOOTDIR}/macppc_installboot \ - $@ ${EXTFILEDIR}/macppc.bootxx /ofwboot + ${TOOL_MACPPCINSTALLBOOT} $@ ${EXTFILEDIR}/macppc.bootxx /ofwboot .endif .if !empty(BASE_PORTS.${image}:Mpmax) ${PMAX_IBOOT} $@ ${BOOTFILE.pmax} Index: src/distrib/cdrom/macppc_installboot/Makefile diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.13 src/distrib/cdrom/macppc_installboot/Makefile:1.14 --- src/distrib/cdrom/macppc_installboot/Makefile:1.13 Fri May 24 10:13:44 2024 +++ src/distrib/cdrom/macppc_installboot/Makefile Sat Jun 8 13:03:40 2024 @@ -1,14 +1,16 @@ -# $NetBSD: Makefile,v 1.13 2024/05/24 10:13:44 tsutsui Exp $ +# $NetBSD: Makefile,v 1.14 2024/06/08 13:03:40 tsutsui Exp $ -.include -HOSTPROG= macppc_installboot -SRCS= installboot.c cd9660.c cd9660_util.c +NOMAN= # defined +PROG= macppc_installboot +SRCS= installboot.c cd9660.c cd9660_util.c +.PATH.c: ${.CURDIR} .PATH.c: ${NETBSDSRCDIR}/usr.sbin/installboot ${NETBSDSRCDIR}/sys/fs/cd9660 -HOST_CPPFLAGS+= -I. -I${.CURDIR} -#HOST_CPPFLAGS+= -DDEBUG +CPPFLAGS+= -I. -I${.CURDIR} +#CPPFLAGS+= -DDEBUG +.if !defined(HOSTPROGNAME) .if !make(obj) && !make(clean) && !make(cleandir) .BEGIN: -rm -rf fs @@ -23,11 +25,6 @@ cleandir distclean: cleaninc cleaninc: -rm -rf fs +.endif # !defined(HOSTPROGNAME) -.include - -.ifndef NOCOMPATLIB -.-include "${TOOLDIR}/share/compat/defs.mk" -.endif - -.include +.include Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1375 src/share/mk/bsd.own.mk:1.1376 --- src/share/mk/bsd.own.mk:1.1375 Fri May 31 20:52:58 2024 +++ src/share/mk/bsd.own.mk Sat Jun 8 13:03:41 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1375 2024/05/31 20:52:58 tsutsui Exp $ +# $NetBSD: bsd.own.mk,v 1.1376 2024/06/08 13:03:41 tsutsui Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -473,6 +473,7 @@ TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFI TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff +TOOL_MACPPCINSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc_installboot TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys Index: src/tools/Makefile diff -u src/tools/Makefile:1.221 src/tools/Makefile:1.222 ---
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sat Jun 8 13:03:41 UTC 2024 Modified Files: src/distrib/cdrom: Makefile src/distrib/cdrom/macppc_installboot: Makefile src/share/mk: bsd.own.mk src/tools: Makefile Added Files: src/tools/macppc_installboot: Makefile Log Message: Build src/distrib/cdrom/macppc_installboot in src/tools as a tool. Also use the tools version ${TOOLS_MACPPC_INSTALLBOOT} to create bootable ISO9660/HFS hybrid installcd image for macppc. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/distrib/cdrom/Makefile cvs rdiff -u -r1.13 -r1.14 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.1375 -r1.1376 src/share/mk/bsd.own.mk cvs rdiff -u -r1.221 -r1.222 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/macppc_installboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: tsutsui Date: Wed Jun 5 17:20:18 UTC 2024 Modified Files: src/etc: Makefile Log Message: Drop -T (for non-Rock Ridge capable systems) from ${MKISOFS_FLAGS}. Even old mac68k and macppc don't require it, and somehow TRANS.TBL files are shown on NetBSD when the ISO images created with both -T and and -hide-joliet-trans-tbl are mounted by mount_cd9660(8). Note this also happens with mkisofs(8) from cdrtools-3.02, but I have not investigated if it's expected behavior. To generate a diff of this commit: cvs rdiff -u -r1.471 -r1.472 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.471 src/etc/Makefile:1.472 --- src/etc/Makefile:1.471 Fri May 31 20:58:52 2024 +++ src/etc/Makefile Wed Jun 5 17:20:18 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.471 2024/05/31 20:58:52 tsutsui Exp $ +# $NetBSD: Makefile,v 1.472 2024/06/05 17:20:18 tsutsui Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -54,7 +54,7 @@ MKISOFS?= ${TOOL_MKHYBRID} DISTRIBREV!= ${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh -s # ISO 9660 volume ID. Note that this can only contain [A-Z0-9_]. ISO_VOLID!= echo NETBSD_${DISTRIBREV} | tr a-z A-Z -MKISOFS_FLAGS+= -J -l -hide-joliet-trans-tbl -r -T \ +MKISOFS_FLAGS+= -J -l -r \ -V ${ISO_VOLID} \ -publisher "The NetBSD Project" \ -m "${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom"
CVS commit: src/etc
Module Name:src Committed By: tsutsui Date: Wed Jun 5 17:20:18 UTC 2024 Modified Files: src/etc: Makefile Log Message: Drop -T (for non-Rock Ridge capable systems) from ${MKISOFS_FLAGS}. Even old mac68k and macppc don't require it, and somehow TRANS.TBL files are shown on NetBSD when the ISO images created with both -T and and -hide-joliet-trans-tbl are mounted by mount_cd9660(8). Note this also happens with mkisofs(8) from cdrtools-3.02, but I have not investigated if it's expected behavior. To generate a diff of this commit: cvs rdiff -u -r1.471 -r1.472 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.mac68k
Module Name:src Committed By: tsutsui Date: Wed Jun 5 15:07:13 UTC 2024 Modified Files: src/etc/etc.mac68k: Makefile.inc Log Message: Exclude debug.tgz and xdebug.tgz from mac68k ISO to save ~320MB. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/etc/etc.mac68k/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.mac68k/Makefile.inc diff -u src/etc/etc.mac68k/Makefile.inc:1.25 src/etc/etc.mac68k/Makefile.inc:1.26 --- src/etc/etc.mac68k/Makefile.inc:1.25 Fri May 31 20:57:32 2024 +++ src/etc/etc.mac68k/Makefile.inc Wed Jun 5 15:07:13 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2024/05/31 20:57:32 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.26 2024/06/05 15:07:13 tsutsui Exp $ # # etc.mac68k/Makefile.inc -- mac68k-specific etc Makefile targets # @@ -20,5 +20,7 @@ snap_md_post: # mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image. MKISOFS_FLAGS+= -hfs --macbin \ -map ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/extensions.map +# exclude large debug sets to avoid possible 700MB overflow +MKISOFS_FLAGS+= -m debug.tgz -m xdebug.tgz iso-image: do-iso-image
CVS commit: src/etc/etc.mac68k
Module Name:src Committed By: tsutsui Date: Wed Jun 5 15:07:13 UTC 2024 Modified Files: src/etc/etc.mac68k: Makefile.inc Log Message: Exclude debug.tgz and xdebug.tgz from mac68k ISO to save ~320MB. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/etc/etc.mac68k/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Mon Jun 3 15:55:05 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: write.c Log Message: Don't print progress if -quiet is specfied as cdrtools-2.01 and later. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/write.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/write.c diff -u src/external/gpl2/mkhybrid/dist/write.c:1.1 src/external/gpl2/mkhybrid/dist/write.c:1.2 --- src/external/gpl2/mkhybrid/dist/write.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/write.c Mon Jun 3 15:55:05 2024 @@ -280,7 +280,8 @@ static void FDECL3(write_one_file, char fprintf(stderr,"%d..", last_extent_written); } #else - if((last_extent_written % 5000) < use/SECTOR_SIZE) + if(verbose > 0 && + (last_extent_written % 5000) < use/SECTOR_SIZE) { time_t now; time_t the_end;
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Mon Jun 3 15:55:05 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: write.c Log Message: Don't print progress if -quiet is specfied as cdrtools-2.01 and later. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/write.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Mon Jun 3 14:38:55 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkhybrid.8 Log Message: Also pull man page description of options pulled from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/mkhybrid.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/mkhybrid.8 diff -u src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.1 src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.2 --- src/external/gpl2/mkhybrid/dist/mkhybrid.8:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/mkhybrid.8 Mon Jun 3 14:38:55 2024 @@ -46,6 +46,9 @@ mkhybrid \- create an hybrid ISO9660/JOL .B \-D ] [ +.B \-graft-points +] +[ .B \-hide .I glob ] @@ -62,6 +65,12 @@ mkhybrid \- create an hybrid ISO9660/JOL .I file ] [ +.B \-hide-joliet-trans-tbl +] +[ +.B \-hide-rr-moved +] +[ .B \-J ] [ @@ -344,7 +353,10 @@ mkhybrid will merge the files found in all of the specified path components to form the cdrom image. .PP -It is possible to graft the paths at points other than the root +If the option +.I \-graft-points +has been specified, +it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the cdrom image with names different than what they have in the source filesystem. This is easiest to illustrate with a couple of examples. Let's start by assuming that a local @@ -479,6 +491,14 @@ Follow symbolic links when generating th in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored. .TP +.B \-graft-points +Allow to use graft points for filenames. If this option is used, all filenames +are checked for graft points. The filename is divided at the first unescaped +equal sign. All occurrences of '' and '=' characters must be escaped with '' +if +.I \-graft-points +has been specified. +.TP .BI \-hide " glob Hide .I glob @@ -521,6 +541,34 @@ A file containing a list of .I globs to be hidden as above. .TP +.B \-hide-joliet-trans-tbl +Hide the +.B TRANS.TBL +files from the Joliet tree. +These files usually don't make sense in the Joliet World as they list +the real name and the ISO9660 name which may both be different from the +Joliet name. +.TP +.B \-hide-rr-moved +Rename the directory +.B RR_MOVED +to +.B .rr_moved +in the Rock Ridge tree. +It seems to be impossible to completely hide the +.B RR_MOVED +directory from the Rock Ridge tree. +This option only makes the visible tree better to understand for +people who don't know what this directory is for. +If you need to have no +.B RR_MOVED +directory at all, you should use the +.B \-D +option. Note that in case that the +.B \-D +option has been specified, the resulting filesystem is not ISO9660 +level-1 compliant and will not be readable on MS-DOS. +.TP .B \-l Allow full 32 character filenames. Normally the ISO9660 filename will be in an 8.3 format which is compatible with MS-DOS, even though the ISO9660 standard
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Mon Jun 3 14:38:55 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkhybrid.8 Log Message: Also pull man page description of options pulled from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/mkhybrid.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.bin/gzip
> Your diff is backwards and I guess that is the cause for the confusion. Ah, I checked a wrong tree. Sorry for the noise. --- Izumi Tsutsui
Re: CVS commit: src/usr.bin/gzip
martin@ wrote: > Module Name: src > Committed By: martin > Date: Sat Jun 1 10:17:12 UTC 2024 > > Modified Files: > src/usr.bin/gzip: gzip.c > > Log Message: > Fix typo in previous --- @@ -1126,7 +1126,7 @@ copymodes(int fd, const struct stat *sbp if (fchmod(fd, sb.st_mode) < 0) maybe_warn("couldn't fchmod: %s", file); -#if !HAVE_NBTOOL_CONFIG_H +#ifdef !HAVE_NBTOOL_CONFIG_H TIMESPEC_TO_TIMEVAL([0], _atimespec); TIMESPEC_TO_TIMEVAL([1], _mtimespec); if (futimes(fd, times) < 0) --- What's the problem in previous? gzip.c already has the following lines: >> #if HAVE_NBTOOL_CONFIG_H >> #include "nbtool_config.h" >> #endif and also has >> #if !HAVE_NBTOOL_CONFIG_H >> #define DISKUNIT(dev) (minor(dev) / MAXPARTITIONS) >> #define DISKPART(dev) (minor(dev) % MAXPARTITIONS) >> #define DISKMINOR(unit, part) \ >> (((unit) * MAXPARTITIONS) + (part)) >> #endif /* !HAVE_NBTOOL_CONFIG_H */ (though etc uses !defined(HAVE_NBTOOL_CONFIG_H)) If HAVE_NBTOOL_CONFIG_H is not defined, it's treated as 0 so !HAVE_NBTOOL_CONFIG_H still works. If you don't like !HAVE_NBTOOL_CONFIG_H, could you please fix all other files? Thanks, --- Izumi Tsutsui
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: tsutsui Date: Sat Jun 1 09:45:37 UTC 2024 Modified Files: src/usr.bin/gzip: gzip.c Log Message: Don't try to set non-POSIX struct stat members on tools builds. Fixes PR/58278 (src/tools/gzip build failed on Cygwin). To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/usr.bin/gzip/gzip.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.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.125 src/usr.bin/gzip/gzip.c:1.126 --- src/usr.bin/gzip/gzip.c:1.125 Tue Apr 2 12:42:35 2024 +++ src/usr.bin/gzip/gzip.c Sat Jun 1 09:45:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.125 2024/04/02 12:42:35 christos Exp $ */ +/* $NetBSD: gzip.c,v 1.126 2024/06/01 09:45:36 tsutsui Exp $ */ /* * Copyright (c) 1997-2024 Matthew R. Green @@ -34,7 +34,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1997-2024 Matthew R. Green. " "All rights reserved."); -__RCSID("$NetBSD: gzip.c,v 1.125 2024/04/02 12:42:35 christos Exp $"); +__RCSID("$NetBSD: gzip.c,v 1.126 2024/06/01 09:45:36 tsutsui Exp $"); #endif /* not lint */ /* @@ -1126,7 +1126,7 @@ copymodes(int fd, const struct stat *sbp if (fchmod(fd, sb.st_mode) < 0) maybe_warn("couldn't fchmod: %s", file); -#ifdef TIMESPEC_TO_TIMEVAL +#ifdef !HAVE_NBTOOL_CONFIG_H TIMESPEC_TO_TIMEVAL([0], _atimespec); TIMESPEC_TO_TIMEVAL([1], _mtimespec); if (futimes(fd, times) < 0)
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: tsutsui Date: Sat Jun 1 09:45:37 UTC 2024 Modified Files: src/usr.bin/gzip: gzip.c Log Message: Don't try to set non-POSIX struct stat members on tools builds. Fixes PR/58278 (src/tools/gzip build failed on Cygwin). To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/usr.bin/gzip/gzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Fri May 31 21:07:40 UTC 2024 Modified Files: src/doc: CHANGES Log Message: Note about import of mkhybrid as a tool. To generate a diff of this commit: cvs rdiff -u -r1.3060 -r1.3061 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3060 src/doc/CHANGES:1.3061 --- src/doc/CHANGES:1.3060 Fri May 24 16:10:21 2024 +++ src/doc/CHANGES Fri May 31 21:07:40 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3060 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3061 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -412,4 +412,6 @@ Changes from NetBSD 10.0 to NetBSD 11.0: hp300: Installation CD ISO image is now bootable. [tsutsui 20240519] tic(1): Honour the user's umask (from RVP). [christos 20240520] dhcpcd: Import version 10.0.8. [roy 20240524] - + mkhybrid: Import mkhybrid from OpenBSD 7.3 as a tool to create + ISO9660/HFS hybrid ISO images for mac68k and macppc. + [tsutsui 20240531]
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Fri May 31 21:07:40 UTC 2024 Modified Files: src/doc: CHANGES Log Message: Note about import of mkhybrid as a tool. To generate a diff of this commit: cvs rdiff -u -r1.3060 -r1.3061 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid
Module Name:src Committed By: tsutsui Date: Fri May 31 21:04:22 UTC 2024 Added Files: src/external/gpl2/mkhybrid: README.md Log Message: Note about current status. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/README.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl2/mkhybrid/README.md diff -u /dev/null src/external/gpl2/mkhybrid/README.md:1.1 --- /dev/null Fri May 31 21:04:23 2024 +++ src/external/gpl2/mkhybrid/README.md Fri May 31 21:04:22 2024 @@ -0,0 +1,37 @@ +# tools'fied mkhybrid to build HFS/ISO9660 hybrid image for mac68k and macppc + +(See src/distrib/cdrom/README how to fetch set binaries and build iso images) + +## What's this? + +This external/gpl2/mkhybrid provides tools'fied mkhybrid(8) to build +HFS/ISO9660 hybrid CD images for mac68k and macppc install media, +based on mkhybrid 1.12b5.1 in OpenBSD 7.3: + http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.sbin/mkhybrid/src/ + +## Changes from OpenBSD's one + +- pull sources in OpenBSD's src/gnu/usr.sbin/mkhybrid/src except libfile + into NetBSD's src/external/gpl2/mkhybrid/dist + (unnecessary files for tools builds are not imported) +- pull 2 clause BSD licensed libfile sources from upstream cdrtools-3.01 +- pull Makefile in OpenBSD's src/gnu/usr.sbin/mkhybrid/mkhybrid + into NetBSD's src/external/gpl2/mkhybrid/bin +- src/external/gpl2/mkhybrid/bin is prepared to build tools version + in src/tools/mkhybrid using src/tools/Makefile.host +- tweak configure to pull several header files for NetBSD tools builds +- appease various dumb warnings +- pull -hide-rr-moved option from upstream mkisofs-1.13 +- pull -graft-points option from upstream mkisofs-1.13 and cdrtools-2.01 +- pull malloc related fixes in tree.c from upstream cdrtools-2.01 + +## Current status + +- builds on NetBSD, ubuntu, and Cygwin hosts are tested + +See commit logs and diffs for more details. + +## TODO + +- add support to specify permissions via mtree-specfiles + as native makefs(8) for non-root build
CVS commit: src/external/gpl2/mkhybrid
Module Name:src Committed By: tsutsui Date: Fri May 31 21:04:22 UTC 2024 Added Files: src/external/gpl2/mkhybrid: README.md Log Message: Note about current status. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/README.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: tsutsui Date: Fri May 31 20:58:52 UTC 2024 Modified Files: src/etc: Makefile Log Message: Use tools/mkhybrid as MKISOFS for mac68k and future macppc. To generate a diff of this commit: cvs rdiff -u -r1.470 -r1.471 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.470 src/etc/Makefile:1.471 --- src/etc/Makefile:1.470 Fri Apr 26 18:06:02 2024 +++ src/etc/Makefile Fri May 31 20:58:52 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.470 2024/04/26 18:06:02 christos Exp $ +# $NetBSD: Makefile,v 1.471 2024/05/31 20:58:52 tsutsui Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -48,13 +48,9 @@ DISTRIBVER!= ${HOST_SH} ${NETBSDSRCDIR}/ GZIP_FLAGS= -9 ${GZIP_N_FLAG} -# Flags for creating ISO CDROM image -# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrtools -# Note: At least mkisofs 2.0 should be used. -# -.if !defined(MKISOFS) -MKISOFS!= (which mkisofs || echo true) 2>/dev/null -.endif +# Flags for creating ISO CDROM image for mac68k and macppc that require +# tools mkhybrid(8) to create hybrid ISO9660/HFS images. +MKISOFS?= ${TOOL_MKHYBRID} DISTRIBREV!= ${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh -s # ISO 9660 volume ID. Note that this can only contain [A-Z0-9_]. ISO_VOLID!= echo NETBSD_${DISTRIBREV} | tr a-z A-Z @@ -442,14 +438,9 @@ CDROM.pathlist= ${.OBJDIR}/cdrom.pathlis iso-image: -.if ${MKISOFS} != true do-iso-image: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-post ${MAKESUMS} -t ${RELEASEDIR}/images/ '*.iso' @echo "iso-image created as: ${CDROM_IMAGE}" -.else -do-iso-image: - @echo iso-image: mkisofs not found -.endif iso-image-setup: .PHONY check_RELEASEDIR rm -f ${CDROM.pathlist} @@ -468,10 +459,6 @@ check_imagedir: # Create the image after the MD operations have completed. # iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-pre check_imagedir - @if ! ${MKISOFS} --version; then \ - echo "install pkgsrc/sysutils/cdrtools and run 'make iso-image'." ; \ - false; \ - fi ${MKISOFS} ${MKISOFS_FLAGS} -graft-points -path-list ${CDROM.pathlist} \ -o ${CDROM_IMAGE} ${CDROM.dir}
CVS commit: src/etc
Module Name:src Committed By: tsutsui Date: Fri May 31 20:58:52 UTC 2024 Modified Files: src/etc: Makefile Log Message: Use tools/mkhybrid as MKISOFS for mac68k and future macppc. To generate a diff of this commit: cvs rdiff -u -r1.470 -r1.471 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: tsutsui Date: Fri May 31 20:57:32 UTC 2024 Modified Files: src/distrib/cdrom: Makefile src/etc/etc.mac68k: Makefile.inc Log Message: Drop -data-change-warn from MKISOFS_FLAGS. It's available only on cdrtools-3.x and later. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/distrib/cdrom/Makefile cvs rdiff -u -r1.24 -r1.25 src/etc/etc.mac68k/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/Makefile diff -u src/distrib/cdrom/Makefile:1.55 src/distrib/cdrom/Makefile:1.56 --- src/distrib/cdrom/Makefile:1.55 Fri May 31 20:54:33 2024 +++ src/distrib/cdrom/Makefile Fri May 31 20:57:32 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.55 2024/05/31 20:54:33 tsutsui Exp $ +# $NetBSD: Makefile,v 1.56 2024/05/31 20:57:32 tsutsui Exp $ # # Consult "*.conf" for the configuration variables; this Makefile is typically # not edited for basic configuration changes. @@ -298,12 +298,12 @@ MKISOFS_ARGS.${image}+= -b ${BOOTFILE.am .if !empty(ports:Mmacppc) BOOTHFS= boothfs MKISOFS_ARGS.${image}+= -hfs -part -hide-hfs-list ${.CURDIR}/hide-hfs.lst \ - --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst \ + --macbin -map ${.CURDIR}/hfsmap.lst \ -boot-hfs-file ${.OBJDIR}/${BOOTHFS} UUDECODE_FILES= ${BOOTHFS} .include .elif defined(USE_APPLE_ISO) || !empty(ports:Mmac68k) -MKISOFS_ARGS.${image}+= -apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst +MKISOFS_ARGS.${image}+= -apple --macbin -map ${.CURDIR}/hfsmap.lst .endif # Sun (sparc, sparc64, sun3) Index: src/etc/etc.mac68k/Makefile.inc diff -u src/etc/etc.mac68k/Makefile.inc:1.24 src/etc/etc.mac68k/Makefile.inc:1.25 --- src/etc/etc.mac68k/Makefile.inc:1.24 Fri May 19 14:47:16 2023 +++ src/etc/etc.mac68k/Makefile.inc Fri May 31 20:57:32 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.24 2023/05/19 14:47:16 hauke Exp $ +# $NetBSD: Makefile.inc,v 1.25 2024/05/31 20:57:32 tsutsui Exp $ # # etc.mac68k/Makefile.inc -- mac68k-specific etc Makefile targets # @@ -18,7 +18,7 @@ snap_md_post: # For "make iso-image" # mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image. -MKISOFS_FLAGS+= -hfs --macbin -data-change-warn \ +MKISOFS_FLAGS+= -hfs --macbin \ -map ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/extensions.map iso-image: do-iso-image
CVS commit: src
Module Name:src Committed By: tsutsui Date: Fri May 31 20:57:32 UTC 2024 Modified Files: src/distrib/cdrom: Makefile src/etc/etc.mac68k: Makefile.inc Log Message: Drop -data-change-warn from MKISOFS_FLAGS. It's available only on cdrtools-3.x and later. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/distrib/cdrom/Makefile cvs rdiff -u -r1.24 -r1.25 src/etc/etc.mac68k/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/cdrom
Module Name:src Committed By: tsutsui Date: Fri May 31 20:54:33 UTC 2024 Modified Files: src/distrib/cdrom: Makefile Log Message: Build mac68k and macppc iso images using tools/mkhybrid. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/distrib/cdrom/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/Makefile diff -u src/distrib/cdrom/Makefile:1.54 src/distrib/cdrom/Makefile:1.55 --- src/distrib/cdrom/Makefile:1.54 Thu May 16 14:21:45 2024 +++ src/distrib/cdrom/Makefile Fri May 31 20:54:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.54 2024/05/16 14:21:45 tsutsui Exp $ +# $NetBSD: Makefile,v 1.55 2024/05/31 20:54:33 tsutsui Exp $ # # Consult "*.conf" for the configuration variables; this Makefile is typically # not edited for basic configuration changes. @@ -63,6 +63,10 @@ ALL_PORTS:= ${ALL_PORTS} ${BASE_PORTS.$ SUBDIR= +.if !empty(ALL_PORTS:Mmac68k) || !empty(ALL_PORTS:Mmacppc) +MKISOFS= ${TOOL_MKHYBRID} +.endif + .if !empty(ALL_PORTS:Mmacppc) SUBDIR+= macppc_installboot .endif
CVS commit: src/distrib/cdrom
Module Name:src Committed By: tsutsui Date: Fri May 31 20:54:33 UTC 2024 Modified Files: src/distrib/cdrom: Makefile Log Message: Build mac68k and macppc iso images using tools/mkhybrid. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/distrib/cdrom/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: tsutsui Date: Fri May 31 20:52:59 UTC 2024 Modified Files: src/share/mk: bsd.own.mk src/tools: Makefile Added Files: src/tools/mkhybrid: Makefile Log Message: Build mkhybrid as a build tool. To generate a diff of this commit: cvs rdiff -u -r1.1374 -r1.1375 src/share/mk/bsd.own.mk cvs rdiff -u -r1.220 -r1.221 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/mkhybrid/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1374 src/share/mk/bsd.own.mk:1.1375 --- src/share/mk/bsd.own.mk:1.1374 Wed May 29 02:06:45 2024 +++ src/share/mk/bsd.own.mk Fri May 31 20:52:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1374 2024/05/29 02:06:45 riastradh Exp $ +# $NetBSD: bsd.own.mk,v 1.1375 2024/05/31 20:52:58 tsutsui Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -488,6 +488,7 @@ TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOO TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb +TOOL_MKHYBRID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkhybrid TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod Index: src/tools/Makefile diff -u src/tools/Makefile:1.220 src/tools/Makefile:1.221 --- src/tools/Makefile:1.220 Thu May 23 02:50:47 2024 +++ src/tools/Makefile Fri May 31 20:52:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.220 2024/05/23 02:50:47 gutteridge Exp $ +# $NetBSD: Makefile,v 1.221 2024/05/31 20:52:58 tsutsui Exp $ .include .include @@ -230,6 +230,10 @@ SUBDIR+= dtc SUBDIR+= mvme68k-wrtvid .endif +.if ${MACHINE} == "mac68k" || ${MACHINE} == "macppc" +SUBDIR+= mkhybrid +.endif + .if ${MKX11} != "no" SUBDIR+= makestrs SUBDIR+= makekeys Added files: Index: src/tools/mkhybrid/Makefile diff -u /dev/null src/tools/mkhybrid/Makefile:1.1 --- /dev/null Fri May 31 20:52:59 2024 +++ src/tools/mkhybrid/Makefile Fri May 31 20:52:59 2024 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile,v 1.1 2024/05/31 20:52:59 tsutsui Exp $ +# + +HOSTPROGNAME= ${_TOOL_PREFIX}mkhybrid +HOST_SRCDIR=external/gpl2/mkhybrid/bin +HOST_CPPFLAGS= -I${.CURDIR} + +.include "${.CURDIR}/../Makefile.nbincludes" +.include "${.CURDIR}/../Makefile.host"
CVS commit: src
Module Name:src Committed By: tsutsui Date: Fri May 31 20:52:59 UTC 2024 Modified Files: src/share/mk: bsd.own.mk src/tools: Makefile Added Files: src/tools/mkhybrid: Makefile Log Message: Build mkhybrid as a build tool. To generate a diff of this commit: cvs rdiff -u -r1.1374 -r1.1375 src/share/mk/bsd.own.mk cvs rdiff -u -r1.220 -r1.221 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/mkhybrid/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:50:48 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: tree.c Log Message: Pull malloc related fixes from cdrtools-2.01. This seems to fix SIGSEGV during free(3) in write.c:write_one_file(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/tree.c diff -u src/external/gpl2/mkhybrid/dist/tree.c:1.2 src/external/gpl2/mkhybrid/dist/tree.c:1.3 --- src/external/gpl2/mkhybrid/dist/tree.c:1.2 Fri May 31 20:46:19 2024 +++ src/external/gpl2/mkhybrid/dist/tree.c Fri May 31 20:50:48 2024 @@ -410,8 +410,8 @@ got_valid_name: if (jhide_trans_tbl) table->de_flags|= INHIBIT_JOLIET_ENTRY; table->name = strdup(""); - table->table = (char *) e_malloc(ROUND_UP(tablesize)); - memset(table->table, 0, ROUND_UP(tablesize)); + table->table = (char *) e_malloc(ROUND_UP(tablesize)+1); + memset(table->table, 0, ROUND_UP(tablesize)+1); #ifdef APPLE_HYB iso9660_file_length (trans_tbl, table, 0); #else @@ -678,6 +678,13 @@ static void FDECL2(attach_dot_entries, s e_malloc(sizeof (struct directory_entry)); memcpy(s_entry, dirnode->self, sizeof(struct directory_entry)); +#ifdef APPLE_HYB + if (dirnode->self->hfs_ent) { + s_entry->hfs_ent = (hfsdirent *) e_malloc(sizeof (hfsdirent)); + memcpy(s_entry->hfs_ent, dirnode->self->hfs_ent, + sizeof (hfsdirent)); +} +#endif s_entry->name = strdup(".."); s_entry->whole_name = NULL; s_entry->isorec.name_len[0] = 1; @@ -710,6 +717,13 @@ static void FDECL2(attach_dot_entries, s e_malloc(sizeof (struct directory_entry)); memcpy(s_entry, dirnode->self, sizeof(struct directory_entry)); +#ifdef APPLE_HYB + if (dirnode->self->hfs_ent) { + s_entry->hfs_ent = (hfsdirent *) e_malloc(sizeof (hfsdirent)); + memcpy(s_entry->hfs_ent, dirnode->self->hfs_ent, + sizeof (hfsdirent)); + } +#endif s_entry->name = strdup("."); s_entry->whole_name = NULL; s_entry->isorec.name_len[0] = 1;
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:50:48 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: tree.c Log Message: Pull malloc related fixes from cdrtools-2.01. This seems to fix SIGSEGV during free(3) in write.c:write_one_file(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:49:44 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Tweak OPTION_* definitions to reduce diffs from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.6 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.7 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.6 Fri May 31 20:48:22 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:49:44 2024 @@ -222,11 +222,13 @@ struct ld_option #define OPTION_HIDE_RR_MOVED 176 #if 0 #define OPTION_GUI 177 +#endif #define OPTION_TRANS_TBL 178 #define OPTION_P_LIST 179 #define OPTION_I_LIST 180 #define OPTION_J_LIST 181 #define OPTION_X_LIST 182 +#if 0 #define OPTION_NO_RR 183 #define OPTION_JCHARSET 184 #define OPTION_PAD 185 @@ -262,13 +264,18 @@ struct ld_option #define OPTION_USH 208 #define OPTION_XIN 209 +#if 0 +#define OPTION_DAVE 210 +#define OPTION_SFM 211 +#endif + #define OPTION_PROBE 220 #define OPTION_MACNAME 221 #define OPTION_NOMACFILES 222 #define OPTION_BOOT_HFS_FILE 223 #define OPTION_MAGIC_FILE 224 -#define OPTION_TRANS_TBL 225 +#define OPTION_HFS_LIST 225 #define OPTION_GEN_PT 226 @@ -279,15 +286,6 @@ struct ld_option #define OPTION_BSIZE 230 #define OPTION_HFS_VOLID 231 -#define OPTION_H_LIST 240 -#endif /* APPLE_HYB */ - -#define OPTION_P_LIST 241 -#define OPTION_I_LIST 242 -#define OPTION_J_LIST 243 -#define OPTION_X_LIST 244 - -#ifdef APPLE_HYB #define OPTION_HFS_BLESS 245 #endif /* APPLE_HYB */ @@ -421,7 +419,7 @@ static const struct ld_option ld_options '\0', NULL, "Do not create the HFS (empty) Desktop files", ONE_DASH }, { {"hide-hfs", required_argument, NULL, OPTION_HFS_HIDE}, '\0', "GLOBFILE", "Hide HFS file" , ONE_DASH }, - { {"hide-hfs-list", required_argument, NULL, OPTION_H_LIST}, + { {"hide-hfs-list", required_argument, NULL, OPTION_HFS_LIST}, '\0', "GLOBFILE", "List of HFS files to hide" , ONE_DASH }, { {"table-name", required_argument, NULL, OPTION_TRANS_TBL}, '\0', "TABLE_NAME", "translation table file name", ONE_DASH }, @@ -1183,7 +1181,7 @@ int FDECL2(main, int, argc, char **, arg case OPTION_HFS_HIDE: hfs_add_match(optarg); break; - case OPTION_H_LIST: + case OPTION_HFS_LIST: hfs_add_list(optarg); break; #endif /* APPLE_HYB */
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:49:44 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Tweak OPTION_* definitions to reduce diffs from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:48:22 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: match.c match.h mkisofs.c mkisofs.h Log Message: Pull -graft-points option from mkisofs-1.13 and cdrtools-2.01. Also remove #ifdef APPLE_HYB for NON-HFS changes to reduce diffs. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/match.c \ src/external/gpl2/mkhybrid/dist/match.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/match.c diff -u src/external/gpl2/mkhybrid/dist/match.c:1.1 src/external/gpl2/mkhybrid/dist/match.c:1.2 --- src/external/gpl2/mkhybrid/dist/match.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/match.c Fri May 31 20:48:22 2024 @@ -228,8 +228,7 @@ intptr_t hfs_ishidden() { return((intptr_t)hfs_mat[0]); } - -/* These will probably appear in mkisofs in the future */ +#endif /* APPLE_HYB */ void add_list(file) char *file; @@ -293,5 +292,3 @@ char *file; fclose(fp); } - -#endif /* APPLE_HYB */ Index: src/external/gpl2/mkhybrid/dist/match.h diff -u src/external/gpl2/mkhybrid/dist/match.h:1.1 src/external/gpl2/mkhybrid/dist/match.h:1.2 --- src/external/gpl2/mkhybrid/dist/match.h:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/match.h Fri May 31 20:48:22 2024 @@ -27,8 +27,8 @@ int hfs_add_match __PR((char *fn)); void hfs_add_list __PR((char *fn)); int hfs_matches __PR((char *fn)); intptr_t hfs_ishidden __PR((void)); +#endif /* APPLE_HYB */ void add_list __PR((char *fn)); void i_add_list __PR((char *fn)); void j_add_list __PR((char *fn)); -#endif /* APPLE_HYB */ Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.5 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.6 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.5 Fri May 31 20:46:19 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:48:22 2024 @@ -104,6 +104,7 @@ char * boot_image = BOOT_IMAGE_DEFAULT; int volume_set_size = 1; int volume_sequence_number = 1; +int use_graft_ptrs = 0; /* Use graft points */ int jhide_trans_tbl;/* Hide TRANS.TBL from Joliet tree */ int hide_rr_moved; /* Name RR_MOVED .rr_moved in Rock Ridge tree */ int omit_period = 0; /* Violates iso9660, but these are a pain */ @@ -219,6 +220,34 @@ struct ld_option #endif #define OPTION_HIDE_TRANS_TBL 175 #define OPTION_HIDE_RR_MOVED 176 +#if 0 +#define OPTION_GUI 177 +#define OPTION_TRANS_TBL 178 +#define OPTION_P_LIST 179 +#define OPTION_I_LIST 180 +#define OPTION_J_LIST 181 +#define OPTION_X_LIST 182 +#define OPTION_NO_RR 183 +#define OPTION_JCHARSET 184 +#define OPTION_PAD 185 +#define OPTION_H_HIDE 186 +#define OPTION_H_LIST 187 +#define OPTION_CHECK_OLDNAMES 188 + +#ifdef SORTING +#define OPTION_SORT 189 +#endif /* SORTING */ +#define OPTION_UCS_LEVEL 190 +#define OPTION_ISO_TRANSLATE 191 +#define OPTION_ISO_LEVEL 192 +#define OPTION_RELAXED_FILENAMES 193 +#define OPTION_ALLOW_LOWERCASE 194 +#define OPTION_ALLOW_MULTIDOT 195 +#define OPTION_USE_FILEVERSION 196 +#define OPTION_MAX_FILENAMES 197 +#define OPTION_ALT_BOOT 198 +#endif +#define OPTION_USE_GRAFT 199 #ifdef APPLE_HYB #define OPTION_CAP 200 @@ -251,14 +280,19 @@ struct ld_option #define OPTION_HFS_VOLID 231 #define OPTION_H_LIST 240 +#endif /* APPLE_HYB */ + #define OPTION_P_LIST 241 #define OPTION_I_LIST 242 #define OPTION_J_LIST 243 #define OPTION_X_LIST 244 +#ifdef APPLE_HYB #define OPTION_HFS_BLESS 245 #endif /* APPLE_HYB */ +static int save_pname = 0; + static const struct ld_option ld_options[] = { { {"all-files", no_argument, NULL, 'a'}, @@ -283,26 +317,22 @@ static const struct ld_option ld_options 'D', NULL, "Disable deep directory relocation", ONE_DASH }, { {"follow-links", no_argument, NULL, 'f'}, 'f', NULL, "Follow symbolic links", ONE_DASH }, + {{"graft-points", no_argument, NULL, OPTION_USE_GRAFT}, + '\0', NULL, "Allow to use graft points for filenames", ONE_DASH}, { {"help", no_argument, NULL, OPTION_HELP}, '\0', NULL, "Print option help", ONE_DASH }, { {"hide", required_argument, NULL, OPTION_I_HIDE}, '\0', "GLOBFILE", "Hide ISO9660/RR file" , ONE_DASH }, -#ifdef APPLE_HYB - /* NON-HFS change */ { {"hide-list", required_argument, NULL, OPTION_I_LIST}, '\0', "FILE", "list of ISO9660/RR files to hide" , ONE_DASH }, -#endif /* APPLE_HYB */ { {"hide-joliet", required_argument, NULL, OPTION_J_HIDE}, '\0', "GLOBFILE", "Hide Joliet file" , ONE_DASH }, -#ifdef APPLE_HYB - /* NON-HFS change */ { {"hide-joliet-list", required_argument, NULL, OPTION_J_LIST}, '\0',
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:48:22 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: match.c match.h mkisofs.c mkisofs.h Log Message: Pull -graft-points option from mkisofs-1.13 and cdrtools-2.01. Also remove #ifdef APPLE_HYB for NON-HFS changes to reduce diffs. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/match.c \ src/external/gpl2/mkhybrid/dist/match.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:46:19 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c mkisofs.h tree.c Log Message: Pull options -hide-joliet-trans-tbl and -hide-rr-moved from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:46:19 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c mkisofs.h tree.c Log Message: Pull options -hide-joliet-trans-tbl and -hide-rr-moved from mkisofs-1.13. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.4 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.5 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.4 Fri May 31 20:36:24 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:46:19 2024 @@ -104,6 +104,8 @@ char * boot_image = BOOT_IMAGE_DEFAULT; int volume_set_size = 1; int volume_sequence_number = 1; +int jhide_trans_tbl;/* Hide TRANS.TBL from Joliet tree */ +int hide_rr_moved; /* Name RR_MOVED .rr_moved in Rock Ridge tree */ int omit_period = 0; /* Violates iso9660, but these are a pain */ int transparent_compression = 0; /* So far only works with linux */ int omit_version_number = 0; /* May violate iso9660, but noone uses vers*/ @@ -204,6 +206,20 @@ struct ld_option #define OPTION_I_HIDE 163 #define OPTION_J_HIDE 164 #define OPTION_LOG_FILE 165 +#if 0 +#define OPTION_PVERSION 166 +#define OPTION_NOBAK 167 +#define OPTION_SPARCLABEL 168 +#define OPTION_HARD_DISK_BOOT 169 +#define OPTION_NO_EMUL_BOOT 170 +#define OPTION_NO_BOOT 171 +#define OPTION_BOOT_LOAD_ADDR 172 +#define OPTION_BOOT_LOAD_SIZE 173 +#define OPTION_BOOT_INFO_TABLE 174 +#endif +#define OPTION_HIDE_TRANS_TBL 175 +#define OPTION_HIDE_RR_MOVED 176 + #ifdef APPLE_HYB #define OPTION_CAP 200 #define OPTION_NETA 201 @@ -282,6 +298,10 @@ static const struct ld_option ld_options /* NON-HFS change */ { {"hide-joliet-list", required_argument, NULL, OPTION_J_LIST}, '\0', "FILE", "List of Joliet files to hide" , ONE_DASH }, + {{"hide-joliet-trans-tbl", no_argument, NULL, OPTION_HIDE_TRANS_TBL}, + '\0', NULL, "Hide TRANS.TBL from Joliet tree", ONE_DASH}, + {{"hide-rr-moved", no_argument, NULL, OPTION_HIDE_RR_MOVED}, + '\0', NULL, "Rename RR_MOVED to .rr_moved in Rock Ridge tree", ONE_DASH}, #endif /* APPLE_HYB */ { {NULL, required_argument, NULL, 'i'}, 'i', "ADD_FILES", "No longer supported" , TWO_DASHES }, @@ -1014,6 +1034,12 @@ int FDECL2(main, int, argc, char **, arg case OPTION_J_HIDE: j_add_match(optarg); break; + case OPTION_HIDE_TRANS_TBL: + jhide_trans_tbl++; + break; + case OPTION_HIDE_RR_MOVED: + hide_rr_moved++; + break; case OPTION_HELP: usage (); exit (0); Index: src/external/gpl2/mkhybrid/dist/mkisofs.h diff -u src/external/gpl2/mkhybrid/dist/mkisofs.h:1.4 src/external/gpl2/mkhybrid/dist/mkisofs.h:1.5 --- src/external/gpl2/mkhybrid/dist/mkisofs.h:1.4 Fri May 31 20:44:36 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.h Fri May 31 20:46:19 2024 @@ -293,6 +293,8 @@ extern int all_files; extern int generate_tables; extern int print_size; extern int split_output; +extern int jhide_trans_tbl; +extern int hide_rr_moved; extern int omit_period; extern int omit_version_number; extern int transparent_compression; Index: src/external/gpl2/mkhybrid/dist/tree.c diff -u src/external/gpl2/mkhybrid/dist/tree.c:1.1 src/external/gpl2/mkhybrid/dist/tree.c:1.2 --- src/external/gpl2/mkhybrid/dist/tree.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/tree.c Fri May 31 20:46:19 2024 @@ -407,7 +407,8 @@ got_valid_name: set_733((char *) table->isorec.size, tablesize); table->size = tablesize; table->filedir = this_dir; - table->de_flags|= INHIBIT_JOLIET_ENTRY; + if (jhide_trans_tbl) + table->de_flags|= INHIBIT_JOLIET_ENTRY; table->name = strdup(""); table->table = (char *) e_malloc(ROUND_UP(tablesize)); memset(table->table, 0, ROUND_UP(tablesize)); @@ -605,8 +606,13 @@ static void generate_reloc_directory() reloc_dir->next = root->subdir; root->subdir = reloc_dir; reloc_dir->depth = 1; - reloc_dir->whole_name = strdup("./rr_moved"); - reloc_dir->de_name = strdup("rr_moved"); + if (hide_rr_moved) { + reloc_dir->whole_name = strdup("./.rr_moved"); + reloc_dir->de_name = strdup(".rr_moved"); + } else { + reloc_dir->whole_name = strdup("./rr_moved"); + reloc_dir->de_name = strdup("rr_moved"); + } reloc_dir->extent = 0; @@ -638,8 +644,8 @@ static void generate_reloc_directory() fstatbuf.st_mode = 0555 | S_IFDIR; fstatbuf.st_nlink = 2; generate_rock_ridge_attributes("", - "rr_moved", s_entry, - , , 0); + hide_rr_moved ? ".rr_moved" : "rr_moved", + s_entry, , , 0); };
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:44:36 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c getopt.c getopt.h getopt1.c hash.c mkisofs.h volume.c src/external/gpl2/mkhybrid/dist/include: mconfig.h Log Message: Appease more warnings and remove unused getopt functions. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/mkhybrid/dist/apple.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/getopt.c \ src/external/gpl2/mkhybrid/dist/getopt1.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/getopt.h \ src/external/gpl2/mkhybrid/dist/hash.c \ src/external/gpl2/mkhybrid/dist/volume.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/include/mconfig.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:44:36 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c getopt.c getopt.h getopt1.c hash.c mkisofs.h volume.c src/external/gpl2/mkhybrid/dist/include: mconfig.h Log Message: Appease more warnings and remove unused getopt functions. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/mkhybrid/dist/apple.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/getopt.c \ src/external/gpl2/mkhybrid/dist/getopt1.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/getopt.h \ src/external/gpl2/mkhybrid/dist/hash.c \ src/external/gpl2/mkhybrid/dist/volume.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/include/mconfig.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/apple.c diff -u src/external/gpl2/mkhybrid/dist/apple.c:1.3 src/external/gpl2/mkhybrid/dist/apple.c:1.4 --- src/external/gpl2/mkhybrid/dist/apple.c:1.3 Fri May 31 20:31:05 2024 +++ src/external/gpl2/mkhybrid/dist/apple.c Fri May 31 20:44:36 2024 @@ -92,7 +92,7 @@ static char tmp_type[CT_SIZE+1], tmp_cre ** ** ':' is replaced by '%' and string is terminated with '\0' */ -void +static void cstrncpy(char *t, const char *f, int c) { while (c-- && *f) @@ -142,7 +142,7 @@ hex2char(const char *s) if(strlen(++s) < 2) return(0); - if (!isxdigit(*s) || !isxdigit(*(s+1))) + if (!isxdigit((int)(u_char)*s) || !isxdigit((int)(u_char)*(s+1))) return(0); o = (dehex(*s) << 4) & 0xf0; @@ -163,7 +163,7 @@ hex2char(const char *s) ** that ":" is replaced by "%" ** */ -void +static void hstrncpy(unsigned char *t, const char *f, int c) { unsigned char o; @@ -244,7 +244,7 @@ get_none_info(char *hname, char *dname, ** read_info_file: open and read a finderinfo file for an HFS file ** or directory */ -int +static int read_info_file(char *name, void *info, int len) /* char *name;finderinfo filename */ /* void *info;info buffer */ @@ -868,7 +868,7 @@ get_sgl_info(char *hname, char *dname, d ** Only tested with PC Exchange v2.1 - don't know if it will work ** with v2.2 and above. */ -struct hfs_info * +static struct hfs_info * get_hfs_fe_info(struct hfs_info *hfs_info, char *name) { FILE *fp; @@ -964,7 +964,7 @@ get_hfs_fe_info(struct hfs_info *hfs_inf ** directory - saves on reading this many times for each ** file. */ -struct hfs_info * +static struct hfs_info * get_hfs_sgi_info(struct hfs_info *hfs_info, char *name) { FILE *fp; @@ -1028,7 +1028,7 @@ del_hfs_info(struct hfs_info *hfs_info) ** match_key: find the correct hfs_ent using the Unix filename ** as the key */ -hfsdirent * +static hfsdirent * match_key(struct hfs_info *hfs_info, const char *key) { while (hfs_info) { @@ -1240,7 +1240,7 @@ get_sgi_info(char *hname, char *dname, d /* ** get_hfs_itype: get the type of HFS info for a file */ -int +static int get_hfs_itype(const char *wname, const char *dname, char *htmp) { int wlen, i; Index: src/external/gpl2/mkhybrid/dist/mkisofs.h diff -u src/external/gpl2/mkhybrid/dist/mkisofs.h:1.3 src/external/gpl2/mkhybrid/dist/mkisofs.h:1.4 --- src/external/gpl2/mkhybrid/dist/mkisofs.h:1.3 Fri May 31 20:29:24 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.h Fri May 31 20:44:36 2024 @@ -412,7 +412,7 @@ extern int DECL(iso9660_date,(char *, ti extern void DECL(add_hash,(struct directory_entry *)); extern struct file_hash * DECL(find_hash,(dev_t, ino_t)); #ifdef APPLE_HYB -extern void flush_hash(); +extern void flush_hash(void); #endif /* APPLE_HYB */ extern void DECL(add_directory_hash,(dev_t, ino_t)); extern struct file_hash * DECL(find_directory_hash,(dev_t, ino_t)); Index: src/external/gpl2/mkhybrid/dist/getopt.c diff -u src/external/gpl2/mkhybrid/dist/getopt.c:1.2 src/external/gpl2/mkhybrid/dist/getopt.c:1.3 --- src/external/gpl2/mkhybrid/dist/getopt.c:1.2 Fri May 31 20:41:50 2024 +++ src/external/gpl2/mkhybrid/dist/getopt.c Fri May 31 20:44:36 2024 @@ -230,8 +230,7 @@ static int last_nonopt; the new indices of the non-options in ARGV after they are moved. */ static void -exchange (argv) - char **argv; +exchange (char **argv) { int bottom = first_nonopt; int middle = last_nonopt; @@ -288,8 +287,7 @@ exchange (argv) /* Initialize the internal data when the first call is made. */ static const char * -_getopt_initialize (optstring) - const char *optstring; +_getopt_initialize (const char *optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped @@ -673,18 +671,6 @@ _getopt_internal (argc, argv, optstring, } } -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; -{ -
CVS commit: src/external/gpl2/mkhybrid
Module Name:src Committed By: tsutsui Date: Fri May 31 20:41:50 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/bin: Makefile src/external/gpl2/mkhybrid/dist: getopt.c getopt1.c Log Message: Use HAVE_CONFIG_H to include and in getopt sources. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/bin/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/getopt.c \ src/external/gpl2/mkhybrid/dist/getopt1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid
Module Name:src Committed By: tsutsui Date: Fri May 31 20:41:50 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/bin: Makefile src/external/gpl2/mkhybrid/dist: getopt.c getopt1.c Log Message: Use HAVE_CONFIG_H to include and in getopt sources. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/bin/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/getopt.c \ src/external/gpl2/mkhybrid/dist/getopt1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/bin/Makefile diff -u src/external/gpl2/mkhybrid/bin/Makefile:1.2 src/external/gpl2/mkhybrid/bin/Makefile:1.3 --- src/external/gpl2/mkhybrid/bin/Makefile:1.2 Fri May 31 20:27:19 2024 +++ src/external/gpl2/mkhybrid/bin/Makefile Fri May 31 20:41:50 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2024/05/31 20:27:19 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2024/05/31 20:41:50 tsutsui Exp $ # $OpenBSD: Makefile,v 1.8 2022/07/11 03:11:49 daniel Exp $ # NOTE: The mkhybrid distrib also makes an "mkisofs" which is the same binary @@ -25,6 +25,7 @@ SRCS+= block.c btree.c data.c file.c hfs SRCS+= apprentice.c lfile.c softmagic.c CPPFLAGS+=-DSYSTEM_ID_DEFAULT=\"NetBSD\" -DAPPLE_HYB -DVANILLA_AUTOCONF \ + -DHAVE_CONFIG_H \ -I${DIST} -I${DIST}/include \ -I${DIST}/libhfs_iso \ -I${DIST}/libfile Index: src/external/gpl2/mkhybrid/dist/getopt.c diff -u src/external/gpl2/mkhybrid/dist/getopt.c:1.1 src/external/gpl2/mkhybrid/dist/getopt.c:1.2 --- src/external/gpl2/mkhybrid/dist/getopt.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/getopt.c Fri May 31 20:41:50 2024 @@ -70,7 +70,7 @@ the executable file might be covered by /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ -#if defined(__GNU_LIBRARY__) || defined(__OpenBSD__) +#if defined(HAVE_STDLIB_H) /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include @@ -169,7 +169,7 @@ static enum REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; -#if defined(__GNU_LIBRARY__) || defined(__OpenBSD__) +#if defined(HAVE_STRING_H) /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work Index: src/external/gpl2/mkhybrid/dist/getopt1.c diff -u src/external/gpl2/mkhybrid/dist/getopt1.c:1.1 src/external/gpl2/mkhybrid/dist/getopt1.c:1.2 --- src/external/gpl2/mkhybrid/dist/getopt1.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/getopt1.c Fri May 31 20:41:50 2024 @@ -55,7 +55,7 @@ /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ +#if defined(HAVE_STDLIB_H) #include #else char *getenv ();
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:40:06 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: config.h config.h.in configure configure.in Log Message: Check and in configure and regen config.h. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/config.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/config.h.in \ src/external/gpl2/mkhybrid/dist/configure \ src/external/gpl2/mkhybrid/dist/configure.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:40:06 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: config.h config.h.in configure configure.in Log Message: Check and in configure and regen config.h. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/config.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/config.h.in \ src/external/gpl2/mkhybrid/dist/configure \ src/external/gpl2/mkhybrid/dist/configure.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/config.h diff -u src/external/gpl2/mkhybrid/dist/config.h:1.1 src/external/gpl2/mkhybrid/dist/config.h:1.2 --- src/external/gpl2/mkhybrid/dist/config.h:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/config.h Fri May 31 20:40:06 2024 @@ -22,15 +22,24 @@ /* Define if you have the sbrk function. */ #define HAVE_SBRK 1 +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 +/* Define if you have the header file. */ +/* #undef HAVE_FLOCK_H */ + /* Define if you have the header file. */ /* #undef HAVE_MALLOC_H */ /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + /* Define if you have the header file. */ #define HAVE_STRING_H 1 @@ -63,5 +72,3 @@ /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 - -#define HAVE_FLOCK 1 Index: src/external/gpl2/mkhybrid/dist/config.h.in diff -u src/external/gpl2/mkhybrid/dist/config.h.in:1.2 src/external/gpl2/mkhybrid/dist/config.h.in:1.3 --- src/external/gpl2/mkhybrid/dist/config.h.in:1.2 Fri May 31 20:37:55 2024 +++ src/external/gpl2/mkhybrid/dist/config.h.in Fri May 31 20:40:06 2024 @@ -27,12 +27,18 @@ /* Define if you have the header file. */ #undef HAVE_DIRENT_H +/* Define if you have the header file. */ +#undef HAVE_FLOCK_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + /* Define if you have the header file. */ #undef HAVE_STRING_H Index: src/external/gpl2/mkhybrid/dist/configure diff -u src/external/gpl2/mkhybrid/dist/configure:1.2 src/external/gpl2/mkhybrid/dist/configure:1.3 --- src/external/gpl2/mkhybrid/dist/configure:1.2 Fri May 31 20:37:55 2024 +++ src/external/gpl2/mkhybrid/dist/configure Fri May 31 20:40:06 2024 @@ -1231,7 +1231,7 @@ else fi done -for ac_hdr in unistd.h string.h strings.h sys/stat.h sys/fcntl.h +for ac_hdr in unistd.h string.h strings.h stdlib.h sys/stat.h sys/fcntl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1271,6 +1271,46 @@ else fi done +for ac_hdr in flock.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1279: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1302,7 +1342,7 @@ ac_configure=$ac_aux_dir/configure # Thi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1306: checking for a BSD compatible install" >&5 +echo "configure:1346: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1357,7 +1397,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA= # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1361: checking for $ac_word" >&5 +echo "configure:1401:
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:37:55 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: config.h.in configure configure.in Log Message: Tweak and regen configure using autoconf-2.13 to use pkgsrc tools. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/config.h.in \ src/external/gpl2/mkhybrid/dist/configure \ src/external/gpl2/mkhybrid/dist/configure.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/config.h.in diff -u src/external/gpl2/mkhybrid/dist/config.h.in:1.1 src/external/gpl2/mkhybrid/dist/config.h.in:1.2 --- src/external/gpl2/mkhybrid/dist/config.h.in:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/config.h.in Fri May 31 20:37:55 2024 @@ -21,6 +21,9 @@ /* Define if you have the sbrk function. */ #undef HAVE_SBRK +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + /* Define if you have the header file. */ #undef HAVE_DIRENT_H Index: src/external/gpl2/mkhybrid/dist/configure diff -u src/external/gpl2/mkhybrid/dist/configure:1.1 src/external/gpl2/mkhybrid/dist/configure:1.2 --- src/external/gpl2/mkhybrid/dist/configure:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/configure Fri May 31 20:37:55 2024 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -49,6 +49,7 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -332,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) -echo "configure generated by autoconf version 2.12" +echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -502,9 +503,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says gh...@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -522,15 +525,16 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:526: checking for $ac_word" >&5 +echo "configure:529: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -551,16 +555,17 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:555: checking for $ac_word" >&5 +echo "configure:559: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -595,25 +600,61 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then +case "`uname -s`" in +*win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:610: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:37:55 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: config.h.in configure configure.in Log Message: Tweak and regen configure using autoconf-2.13 to use pkgsrc tools. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/config.h.in \ src/external/gpl2/mkhybrid/dist/configure \ src/external/gpl2/mkhybrid/dist/configure.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:36:24 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Always use local getopt.h as cdrtools-2.01 did. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:36:24 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Always use local getopt.h as cdrtools-2.01 did. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.3 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.4 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.3 Fri May 31 20:34:18 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:36:24 2024 @@ -28,11 +28,7 @@ #include "match.h" #include "apple_proto.h" -#ifdef linux -#include -#else -#include "getopt.h" -#endif +#include "getopt.h" /* Always include local (nonstandard) getopt.h */ #include "iso9660.h" #include
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:34:18 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Remove ancient rlimit hacks for NetBSD disabled in cdrtools-2.01. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.2 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.3 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.2 Fri May 31 20:23:33 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:34:18 2024 @@ -54,11 +54,6 @@ #endif #include -#if defined(__NetBSD__) || defined(__OpenBSD__) -#include -#include -#endif - struct directory * root = NULL; #ifdef APPLE_HYB @@ -1137,18 +1132,6 @@ int FDECL2(main, int, argc, char **, arg parse_input_files: -#if defined(__NetBSD__) || defined(__OpenBSD__) -{ -struct rlimit rlp; - if (getrlimit(RLIMIT_DATA,) == -1) - perror("Warning: getrlimit"); - else { - rlp.rlim_cur=33554432; - if (setrlimit(RLIMIT_DATA,) == -1) - perror("Warning: setrlimit"); - } - } -#endif #ifdef HAVE_SBRK mem_start = (unsigned long) sbrk(0); #endif
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:34:18 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: mkisofs.c Log Message: Remove ancient rlimit hacks for NetBSD disabled in cdrtools-2.01. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/mkisofs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:33:12 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: defaults.h Log Message: Don't redefine SYSTEM_ID_DEFAULT if it's specified in CPPFLAGS. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/defaults.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/defaults.h diff -u src/external/gpl2/mkhybrid/dist/defaults.h:1.2 src/external/gpl2/mkhybrid/dist/defaults.h:1.3 --- src/external/gpl2/mkhybrid/dist/defaults.h:1.2 Fri May 31 20:32:03 2024 +++ src/external/gpl2/mkhybrid/dist/defaults.h Fri May 31 20:33:12 2024 @@ -22,6 +22,8 @@ #define DEFCREATOR "unix" /* default Apple CREATOR */ #endif /* APPLE_HYB */ +#ifndef SYSTEM_ID_DEFAULT + #ifdef __QNX__ #define SYSTEM_ID_DEFAULT "QNX" #endif @@ -73,3 +75,5 @@ #ifndef SYSTEM_ID_DEFAULT #define SYSTEM_ID_DEFAULT "Unknown" #endif + +#endif /* !SYSTEM_ID_DEFAULT */
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:33:12 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: defaults.h Log Message: Don't redefine SYSTEM_ID_DEFAULT if it's specified in CPPFLAGS. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/defaults.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:32:04 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: defaults.h Log Message: Remove duplicated SYSTEM_ID_DEFAULT definitions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/defaults.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/defaults.h diff -u src/external/gpl2/mkhybrid/dist/defaults.h:1.1 src/external/gpl2/mkhybrid/dist/defaults.h:1.2 --- src/external/gpl2/mkhybrid/dist/defaults.h:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/defaults.h Fri May 31 20:32:03 2024 @@ -70,18 +70,6 @@ #define SYSTEM_ID_DEFAULT "LINUX" #endif -#ifdef __FreeBSD__ -#define SYSTEM_ID_DEFAULT "FreeBSD" -#endif - -#ifdef __OpenBSD__ -#define SYSTEM_ID_DEFAULT "OpenBSD" -#endif - -#ifdef __NetBSD__ -#define SYSTEM_ID_DEFAULT "NetBSD" -#endif - #ifndef SYSTEM_ID_DEFAULT #define SYSTEM_ID_DEFAULT "Unknown" #endif
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:32:04 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: defaults.h Log Message: Remove duplicated SYSTEM_ID_DEFAULT definitions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/defaults.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:31:05 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c apple_proto.h Log Message: Appease discard-const warnings. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/apple.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/apple_proto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:31:05 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c apple_proto.h Log Message: Appease discard-const warnings. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/apple.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/apple_proto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/apple.c diff -u src/external/gpl2/mkhybrid/dist/apple.c:1.2 src/external/gpl2/mkhybrid/dist/apple.c:1.3 --- src/external/gpl2/mkhybrid/dist/apple.c:1.2 Fri May 31 20:23:33 2024 +++ src/external/gpl2/mkhybrid/dist/apple.c Fri May 31 20:31:05 2024 @@ -34,17 +34,17 @@ typedef struct directory_entry dir_ent; /* routines for getting HFS names and info */ -static int get_none_dir(char *, char *, dir_ent *, int); +static int get_none_dir(char *, const char *, dir_ent *, int); static int get_none_info(char *, char *, dir_ent *, int); -static int get_cap_dir(char *, char *, dir_ent *, int); +static int get_cap_dir(char *, const char *, dir_ent *, int); static int get_cap_info(char *, char *, dir_ent *, int); static int get_es_info(char *, char *, dir_ent *, int); static int get_dbl_info(char *, char *, dir_ent *, int); static int get_mb_info(char *, char *, dir_ent *, int); static int get_sgl_info(char *, char *, dir_ent *, int); -static int get_fe_dir(char *, char *, dir_ent *, int); +static int get_fe_dir(char *, const char *, dir_ent *, int); static int get_fe_info(char *, char *, dir_ent *, int); -static int get_sgi_dir(char *, char *, dir_ent *, int); +static int get_sgi_dir(char *, const char *, dir_ent *, int); static int get_sgi_info(char *, char *, dir_ent *, int); void map_ext(char *, char **, char **, unsigned short *, char *); @@ -63,11 +63,11 @@ static unsigned int hselect; /* type of struct hfs_type { /* Types of various HFS Unix files */ int type; /* type of file */ int flags; /* special flags */ - char *info; /* finderinfo name */ - char *rsrc; /* resource fork name */ + const char *info; /* finderinfo name */ + const char *rsrc; /* resource fork name */ int (*get_info)(char*, char*, dir_ent*,int); /* finderinfo function */ - int (*get_dir)(char*, char*,dir_ent*,int); /* directory name function */ - char *desc; /* description */ + int (*get_dir)(char*, const char*,dir_ent*,int); /* directory name function */ + const char *desc;/* description */ }; /* Above filled in */ @@ -93,7 +93,7 @@ static char tmp_type[CT_SIZE+1], tmp_cre ** ':' is replaced by '%' and string is terminated with '\0' */ void -cstrncpy(char *t, char *f, int c) +cstrncpy(char *t, const char *f, int c) { while (c-- && *f) { @@ -135,7 +135,7 @@ dehex(char c) } static unsigned char -hex2char(char *s) +hex2char(const char *s) { unsigned char o; @@ -164,7 +164,7 @@ hex2char(char *s) ** */ void -hstrncpy(unsigned char *t, char *f, int c) +hstrncpy(unsigned char *t, const char *f, int c) { unsigned char o; while (c-- && *f) @@ -211,7 +211,7 @@ basename(char *a) ** get_none_dir: ordinary Unix directory */ int -get_none_dir(char *hname, char *dname, dir_ent *s_entry, int ret) +get_none_dir(char *hname, const char *dname, dir_ent *s_entry, int ret) { /* just copy the given name */ hstrncpy(s_entry->hfs_ent->name, dname, HFS_MAX_FLEN); @@ -270,9 +270,9 @@ read_info_file(char *name, void *info, i ** get_cap_dir: get the CAP name for a directory */ int -get_cap_dir(char *hname, char *dname, dir_ent *s_entry, int ret) +get_cap_dir(char *hname, const char *dname, dir_ent *s_entry, int ret) /* char *hnamewhole path */ -/* char *dnamethis dir name */ +/* const char *dnamethis dir name */ /* dir_ent *s_entry directory entry */ { FileInfo info; /* finderinfo struct */ @@ -1029,7 +1029,7 @@ del_hfs_info(struct hfs_info *hfs_info) ** as the key */ hfsdirent * -match_key(struct hfs_info *hfs_info, char *key) +match_key(struct hfs_info *hfs_info, const char *key) { while (hfs_info) { if (!strcasecmp(key, hfs_info->keyname)) @@ -1046,9 +1046,9 @@ match_key(struct hfs_info *hfs_info, cha ** base on probing with od ... */ int -get_fe_dir(char *hname, char *dname, dir_ent *s_entry, int ret) +get_fe_dir(char *hname, const char *dname, dir_ent *s_entry, int ret) /* char *hnamewhole path */ -/* char *dnamethis dir name */ +/* const char *dnamethis dir name */ /* dir_ent *s_entry directory entry */ { struct hfs_info *hfs_info; @@ -1152,9 +1152,9 @@ get_fe_info(char *hname, char *dname, di ** base on probing with od ... */ int -get_sgi_dir(char *hname, char *dname, dir_ent *s_entry, int ret) +get_sgi_dir(char *hname, const char *dname, dir_ent *s_entry, int ret) /* char *hnamewhole path */ -/* char
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:29:24 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: desktop.c mac_label.c mkisofs.h volume.h src/external/gpl2/mkhybrid/dist/libhfs_iso: hfs.h Log Message: Suppress implicit declaration warnings. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/desktop.c \ src/external/gpl2/mkhybrid/dist/mac_label.c \ src/external/gpl2/mkhybrid/dist/volume.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/desktop.c diff -u src/external/gpl2/mkhybrid/dist/desktop.c:1.1 src/external/gpl2/mkhybrid/dist/desktop.c:1.2 --- src/external/gpl2/mkhybrid/dist/desktop.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/desktop.c Fri May 31 20:29:24 2024 @@ -22,9 +22,11 @@ #ifdef APPLE_HYB +#include #include #include -#include "hfs.h" +#include "mkisofs.h" +#include "volume.h" #define DB "Desktop DB" #define DBFC "DMGR" Index: src/external/gpl2/mkhybrid/dist/mac_label.c diff -u src/external/gpl2/mkhybrid/dist/mac_label.c:1.1 src/external/gpl2/mkhybrid/dist/mac_label.c:1.2 --- src/external/gpl2/mkhybrid/dist/mac_label.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/mac_label.c Fri May 31 20:29:24 2024 @@ -23,6 +23,7 @@ #include #include "mac_label_proto.h" #include +#include "data.h" int gen_mac_label(defer *mac_boot) Index: src/external/gpl2/mkhybrid/dist/volume.h diff -u src/external/gpl2/mkhybrid/dist/volume.h:1.1 src/external/gpl2/mkhybrid/dist/volume.h:1.2 --- src/external/gpl2/mkhybrid/dist/volume.h:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/volume.h Fri May 31 20:29:24 2024 @@ -20,4 +20,5 @@ #define VOLUME_H extern int make_mac_volume(struct directory *, int); +extern int write_fork(hfsfile *, long); #endif Index: src/external/gpl2/mkhybrid/dist/mkisofs.h diff -u src/external/gpl2/mkhybrid/dist/mkisofs.h:1.2 src/external/gpl2/mkhybrid/dist/mkisofs.h:1.3 --- src/external/gpl2/mkhybrid/dist/mkisofs.h:1.2 Fri May 31 20:23:33 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.h Fri May 31 20:29:24 2024 @@ -433,6 +433,9 @@ extern intDECL(check_prev_session, ( struct stat *, struct directory_entry **)); +/* desktop.c */ +extern int make_desktop(hfsvol *, int); + #ifdef USE_SCG /* scsi.c */ #ifdef __STDC__ Index: src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h diff -u src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h:1.1 src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h:1.2 --- src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h:1.1 Fri May 31 19:49:03 2024 +++ src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h Fri May 31 20:29:24 2024 @@ -149,4 +149,5 @@ int hfs_rename(hfsvol *, char *, char *) #ifdef APPLE_HYB unsigned short hfs_get_drAllocPtr(hfsfile *); int hfs_set_drAllocPtr(hfsfile *, unsigned short, int size); +void hfs_vsetbless(hfsvol *, unsigned long); #endif /* APPLE_HYB */
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:29:24 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: desktop.c mac_label.c mkisofs.h volume.h src/external/gpl2/mkhybrid/dist/libhfs_iso: hfs.h Log Message: Suppress implicit declaration warnings. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/desktop.c \ src/external/gpl2/mkhybrid/dist/mac_label.c \ src/external/gpl2/mkhybrid/dist/volume.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/mkisofs.h cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/libhfs_iso/hfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/bin
Module Name:src Committed By: tsutsui Date: Fri May 31 20:27:19 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/bin: Makefile Log Message: Update mkhybrid Makefile for NetBSD's tools builds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/bin
Module Name:src Committed By: tsutsui Date: Fri May 31 20:27:19 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/bin: Makefile Log Message: Update mkhybrid Makefile for NetBSD's tools builds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/bin/Makefile diff -u src/external/gpl2/mkhybrid/bin/Makefile:1.1 src/external/gpl2/mkhybrid/bin/Makefile:1.2 --- src/external/gpl2/mkhybrid/bin/Makefile:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/bin/Makefile Fri May 31 20:27:19 2024 @@ -1,3 +1,4 @@ +# $NetBSD: Makefile,v 1.2 2024/05/31 20:27:19 tsutsui Exp $ # $OpenBSD: Makefile,v 1.8 2022/07/11 03:11:49 daniel Exp $ # NOTE: The mkhybrid distrib also makes an "mkisofs" which is the same binary @@ -5,19 +6,27 @@ # to make mkisofs as a link to this, rather than the (earlier) version in # the tree. +DIST= ${NETBSDSRCDIR}/external/gpl2/mkhybrid/dist + PROG= mkhybrid MAN= mkhybrid.8 BINDIR= /usr/sbin -.PATH: ${.CURDIR}/../src ${.CURDIR}/../src/libhfs_iso ${.CURDIR}/../src/libfile -SRCS= data.c block.c low.c lfile.c btree.c node.c record.c lvolume.c \ - hfs.c file.c apprentice.c softmagic.c mkisofs.c tree.c write.c \ - hash.c rock.c multi.c joliet.c match.c name.c eltorito.c \ +.PATH: ${DIST} +SRCS= mkisofs.c tree.c write.c hash.c rock.c multi.c \ + joliet.c match.c name.c eltorito.c \ apple.c volume.c desktop.c mac_label.c +SRCS+= getopt.c getopt1.c + +.PATH: ${DIST}/libhfs_iso +SRCS+= block.c btree.c data.c file.c hfs.c low.c lvolume.c node.c record.c + +.PATH: ${DIST}/libfile +SRCS+= apprentice.c lfile.c softmagic.c -CFLAGS+=-DSYSTEM_ID_DEFAULT=\"OpenBSD\" -DAPPLE_HYB -DVANILLA_AUTOCONF \ - -I${.CURDIR}/../src -I${.CURDIR}/../src/include \ - -I${.CURDIR}/../src/libhfs_iso \ - -I${.CURDIR}/../src/libfile +CPPFLAGS+=-DSYSTEM_ID_DEFAULT=\"NetBSD\" -DAPPLE_HYB -DVANILLA_AUTOCONF \ + -I${DIST} -I${DIST}/include \ + -I${DIST}/libhfs_iso \ + -I${DIST}/libfile .include
CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Fri May 31 20:25:41 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist/libfile: apprentice.c file.h lfile.c softmagic.c Log Message: Make newer BSD Licensed libfile sources build as tools. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/libfile/apprentice.c \ src/external/gpl2/mkhybrid/dist/libfile/file.h \ src/external/gpl2/mkhybrid/dist/libfile/lfile.c \ src/external/gpl2/mkhybrid/dist/libfile/softmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/libfile/apprentice.c diff -u src/external/gpl2/mkhybrid/dist/libfile/apprentice.c:1.1 src/external/gpl2/mkhybrid/dist/libfile/apprentice.c:1.2 --- src/external/gpl2/mkhybrid/dist/libfile/apprentice.c:1.1 Fri May 31 19:52:25 2024 +++ src/external/gpl2/mkhybrid/dist/libfile/apprentice.c Fri May 31 20:25:41 2024 @@ -1,7 +1,6 @@ /* @(#)apprentice.c 1.13 09/07/11 joerg */ -#include #ifndef lint -static UConst char sccsid[] = +static const char sccsid[] = "@(#)apprentice.c 1.13 09/07/11 joerg"; #endif /* @@ -44,15 +43,15 @@ static UConst char sccsid[] = * SUCH DAMAGE. */ -#include -#include -#include -#include +#include +#include +#include +#include +#include "proto.h" #include "file.h" -#include #ifndef lint -static UConst char moduleid[] = +static const char moduleid[] = "@(#)Id: apprentice.c,v 1.25 1997/01/15 17:23:24 christos Exp"; #endif /* lint */ @@ -73,23 +72,24 @@ struct magic *__f_magic; /* array of ma tolower((unsigned char) (l)) : (l)) -static int getvalue __PR((struct magic *, char **)); -static int hextoint __PR((int)); -static char *apgetstr __PR((char *, char *, int, int *)); -static int parse __PR((char *, int *, int)); -static void eatsize __PR((char **)); +static int getvalue (struct magic *, char **); +static int hextoint (int); +static char *apgetstr (char *, char *, int, int *); +static int parse (char *, int *, int); +static void eatsize (char **); static int maxmagic = 0; -static int apprentice_1 __PR((char *, int)); +static int apprentice_1 (char *, int); /* * init_magic - read magic file and set up mapping * based on the original apprentice() */ int -init_magic(fn) -char *fn; /* list of magic files */ +init_magic( +char *fn /* list of magic files */ +) { maxmagic = MAXMAGIS; __f_magic = (struct magic *) calloc(sizeof(struct magic), maxmagic); @@ -100,9 +100,10 @@ char *fn; /* list of magic files */ } static int -apprentice_1(fn, check) -char *fn; /* name of magic file */ -int check; /* non-zero? checking-only run. */ +apprentice_1( +char *fn, /* name of magic file */ +int check /* non-zero? checking-only run. */ +) { static const char hdr[] = "cont\toffset\ttype\topcode\tmask\tvalue\tdesc"; @@ -139,9 +140,7 @@ int check; /* non-zero? checking-only * XXX is uint32 really a good idea XXX JS */ UInt32_t -signextend(m, v) -struct magic *m; -UInt32_t v; +signextend(struct magic *m, UInt32_t v) { if (!(m->flag & UNSIGNED)) switch(m->type) { @@ -178,9 +177,7 @@ UInt32_t v; * parse one line from magic file, put into magic[index++] if valid */ static int -parse(l, ndx, check) -char *l; -int *ndx, check; +parse(char *l, int *ndx, int check) { int i = 0, nd = *ndx; struct magic *m; @@ -402,9 +399,7 @@ GetDesc: * just after the number read. Return 0 for success, non-zero for failure. */ static int -getvalue(m, p) -struct magic *m; -char **p; +getvalue(struct magic *m, char **p) { int slen; @@ -426,10 +421,7 @@ char **p; * Return updated scan pointer as function result. */ static char * -apgetstr(s, p, plen, slen) -register char *s; -register char *p; -int plen, *slen; +apgetstr(char *s, char *p, int plen, int *slen) { char *origs = s, *origp = p; char *pmax = p + plen - 1; @@ -529,8 +521,7 @@ out: /* Single hex char to int; -1 if not a hex char. */ static int -hextoint(c) -int c; +hextoint(int c) { if (!isascii((unsigned char) c)) return -1; if (isdigit((unsigned char) c)) return c - '0'; @@ -544,10 +535,7 @@ int c; * Print a string containing C character escapes. */ void -showstr(fp, s, len) -FILE *fp; -const char *s; -int len; +showstr(FILE *fp, const char *s, int len) { register char c; @@ -603,8 +591,7 @@ int len; * eatsize(): Eat the size spec from a number [eg. 10UL] */ static void -eatsize(p) -char **p; +eatsize(char **p) { char *l = *p; Index: src/external/gpl2/mkhybrid/dist/libfile/file.h diff -u src/external/gpl2/mkhybrid/dist/libfile/file.h:1.1 src/external/gpl2/mkhybrid/dist/libfile/file.h:1.2 --- src/external/gpl2/mkhybrid/dist/libfile/file.h:1.1 Fri May 31 19:52:25 2024 +++ src/external/gpl2/mkhybrid/dist/libfile/file.h Fri May 31 20:25:41 2024 @@ -35,10 +35,8 @@ #ifndef __file_h__ #define __file_h__
CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Fri May 31 20:25:41 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist/libfile: apprentice.c file.h lfile.c softmagic.c Log Message: Make newer BSD Licensed libfile sources build as tools. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/libfile/apprentice.c \ src/external/gpl2/mkhybrid/dist/libfile/file.h \ src/external/gpl2/mkhybrid/dist/libfile/lfile.c \ src/external/gpl2/mkhybrid/dist/libfile/softmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:23:34 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c apple.h mkisofs.c mkisofs.h Log Message: Pull changes from mkisofs-1.12.1 to avoid statvfs(2). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/apple.c \ src/external/gpl2/mkhybrid/dist/apple.h \ src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:23:34 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: apple.c apple.h mkisofs.c mkisofs.h Log Message: Pull changes from mkisofs-1.12.1 to avoid statvfs(2). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/apple.c \ src/external/gpl2/mkhybrid/dist/apple.h \ src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/apple.c diff -u src/external/gpl2/mkhybrid/dist/apple.c:1.1 src/external/gpl2/mkhybrid/dist/apple.c:1.2 --- src/external/gpl2/mkhybrid/dist/apple.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/apple.c Fri May 31 20:23:33 2024 @@ -872,11 +872,6 @@ struct hfs_info * get_hfs_fe_info(struct hfs_info *hfs_info, char *name) { FILE *fp; -#ifdef __svr4__ - struct statvfs fsbuf; -#else - struct statfs fsbuf; -#endif /* __svr4__ */ int fe_num, fe_pad; fe_info info; int c = 0; @@ -889,30 +884,15 @@ get_hfs_fe_info(struct hfs_info *hfs_inf if ((fp = fopen(name, "rb")) == NULL) return(NULL); - /* The FAT cluster size may have been given on the command line - - if not they try and find *guess* it */ - if (!bsize) { - /* FINDER.DAT layout depends on the FAT cluster size - assume - this is mapped to the "fundamental file system block size" - For SVR4 we use statvfs(), others use statfs() */ -#ifdef __svr4__ - if (statvfs(name, ) < 0) - return(NULL); - - bsize = fsbuf.f_frsize; -#else - if (statfs(name, ) < 0) - return(NULL); - - bsize = fsbuf.f_bsize; -#endif /* __svr4__ */ - } - - if (bsize <= 0) + /* + * no longer attempt to find out FAT cluster + * - rely on command line parameter + */ + if (afe_size <= 0) return(NULL); - fe_num = bsize/FE_SIZE; - fe_pad = bsize%FE_SIZE; + fe_num = afe_size / FE_SIZE; + fe_pad = afe_size % FE_SIZE; while(fread(, 1, FE_SIZE, fp) != 0) { Index: src/external/gpl2/mkhybrid/dist/apple.h diff -u src/external/gpl2/mkhybrid/dist/apple.h:1.1 src/external/gpl2/mkhybrid/dist/apple.h:1.2 --- src/external/gpl2/mkhybrid/dist/apple.h:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/apple.h Fri May 31 20:23:33 2024 @@ -10,20 +10,6 @@ #define __svr4__ /* maybe there's a "configure" solution ? */ #endif /* __sgi */ -#ifdef __svr4__ -#include -#else -#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) -#include -#else -#if defined(_IBMR2) -#include -#else -#include -#endif /* _IBMR2 */ -#endif /* __FreeBSD__ || __bsdi__ */ -#endif /* __svr4__ */ - #ifndef O_BINARY #define O_BINARY 0 #endif /* O_BINARY */ Index: src/external/gpl2/mkhybrid/dist/mkisofs.c diff -u src/external/gpl2/mkhybrid/dist/mkisofs.c:1.1 src/external/gpl2/mkhybrid/dist/mkisofs.c:1.2 --- src/external/gpl2/mkhybrid/dist/mkisofs.c:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/mkisofs.c Fri May 31 20:23:33 2024 @@ -138,7 +138,7 @@ int probe = 0; /* search files for HFS/ int nomacfiles = 0; /* don't look for Mac/Unix files */ int hfs_select = 0; /* Mac/Unix types to select */ int create_dt = 1; /* create the Desktp files */ -int bsize = 0; /* Apple File Exchange block size */ +int afe_size = 0; /* Apple File Exchange block size */ int hfs_last = MAG_LAST; /* process magic file after map file */ char *deftype = DEFTYPE; /* default Apple TYPE */ char *defcreator = DEFCREATOR; /* default Apple CREATOR */ @@ -1068,7 +1068,9 @@ int FDECL2(main, int, argc, char **, arg /* gen_pt = 1; */ break; case OPTION_BSIZE: - bsize = atoi(optarg); + afe_size = atoi(optarg); + hfs_select |= DO_FEU; + hfs_select |= DO_FEL; break; case OPTION_HFS_VOLID: hfs_volume_id = optarg; @@ -1164,7 +1166,7 @@ parse_input_files: /* if -probe, -macname, any hfs selection and/or mapping file is given, but no HFS option, then select apple_hyb */ if (!apple_hyb && !apple_ext) { -if (*afpfile || probe || mac_name || nomacfiles || hfs_select || hfs_boot_file || magic_file || hfs_ishidden() || gen_pt || autoname || bsize) +if (*afpfile || probe || mac_name || nomacfiles || hfs_select || hfs_boot_file || magic_file || hfs_ishidden() || gen_pt || autoname || afe_size) apple_hyb = 1; } @@ -1181,6 +1183,12 @@ parse_input_files: if (apple_hyb || apple_ext) apple_both = 1; + if (apple_both && verbose && !afe_size && + (hfs_select & (DO_FEU | DO_FEL))) { +fprintf(stderr, +"Warning: assuming PC Exchange cluster size of 512 bytes\n"); +afe_size = 512; + } if (apple_both) { /* set up the TYPE/CREATOR mappings */ hfs_init(afpfile, 0, probe, nomacfiles, hfs_select); Index: src/external/gpl2/mkhybrid/dist/mkisofs.h diff -u src/external/gpl2/mkhybrid/dist/mkisofs.h:1.1
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:21:06 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: Makefile.in Log Message: Remove dependencies on non-existent exclude.h. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/mkhybrid/dist/Makefile.in diff -u src/external/gpl2/mkhybrid/dist/Makefile.in:1.1 src/external/gpl2/mkhybrid/dist/Makefile.in:1.2 --- src/external/gpl2/mkhybrid/dist/Makefile.in:1.1 Fri May 31 19:49:02 2024 +++ src/external/gpl2/mkhybrid/dist/Makefile.in Fri May 31 20:21:06 2024 @@ -76,7 +76,7 @@ install: mkisofs mkisofs.8 $(INSTALL_PROGRAM) mkhybrid $(bindir)/mkhybrid -$(INSTALL_DATA) $(srcdir)/mkhybrid.8 $(mandir)/mkhybrid.$(manext) -tree.o: tree.c mkisofs.h iso9660.h exclude.h config.h Makefile +tree.o: tree.c mkisofs.h iso9660.h config.h Makefile $(CC) -c $(CFLAGS) $(srcdir)/tree.c write.o: write.c mkisofs.h iso9660.h config.h Makefile @@ -100,7 +100,7 @@ multi.o: multi.c iso9660.h mkisofs.h con name.o: name.c iso9660.h mkisofs.h config.h Makefile $(CC) -c $(CFLAGS) $(srcdir)/name.c -mkisofs.o: mkisofs.c iso9660.h mkisofs.h exclude.h config.h Makefile $(LIBHFS) $(INCHFS) $(LIBFILE) +mkisofs.o: mkisofs.c iso9660.h mkisofs.h config.h Makefile $(LIBHFS) $(INCHFS) $(LIBFILE) $(CC) -c $(CFLAGS) $(srcdir)/mkisofs.c eltorito.o: eltorito.c iso9660.h mkisofs.h config.h Makefile
CVS commit: src/external/gpl2/mkhybrid/dist
Module Name:src Committed By: tsutsui Date: Fri May 31 20:21:06 UTC 2024 Modified Files: src/external/gpl2/mkhybrid/dist: Makefile.in Log Message: Remove dependencies on non-existent exclude.h. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/mkhybrid/dist/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Fri May 31 19:52:25 UTC 2024 Added Files: src/external/gpl2/mkhybrid/dist/libfile: LEGAL.NOTICE README apprentice.c file.h lfile.c patchlevel.h softmagic.c Log Message: Import BSD licensed libfile for mkhybrid builds from cdrtools-3.01. - unnecessary files for tools build are not imported - file.c is renamed to lfile.c to avoid conflict with libhfs_iso - RCSId strings are trimmed To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE \ src/external/gpl2/mkhybrid/dist/libfile/README \ src/external/gpl2/mkhybrid/dist/libfile/apprentice.c \ src/external/gpl2/mkhybrid/dist/libfile/file.h \ src/external/gpl2/mkhybrid/dist/libfile/lfile.c \ src/external/gpl2/mkhybrid/dist/libfile/patchlevel.h \ src/external/gpl2/mkhybrid/dist/libfile/softmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE diff -u /dev/null src/external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE:1.1 --- /dev/null Fri May 31 19:52:25 2024 +++ src/external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE Fri May 31 19:52:25 2024 @@ -0,0 +1,37 @@ +# @(#)LEGAL.NOTICE 1.2 08/10/19 joerg +Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. +Software written by Ian F. Darwin and others; maintained by Christos Zoulas. +Id: LEGAL.NOTICE,v 1.9 1995/10/27 23:14:20 christos Exp + +License changed Oct 19th 2008 by J. Schilling with permission from +Ian F. Darwin, Christos Zoulas and James Pearson to: + +File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp +Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. +Software written by Ian F. Darwin and others; +maintained 1994- Christos Zoulas. + +This software is not subject to any export provision of the United States +Department of Commerce, and may be exported to any country or planet. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice immediately at the beginning of the file, without modification, + this list of conditions, and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Index: src/external/gpl2/mkhybrid/dist/libfile/README diff -u /dev/null src/external/gpl2/mkhybrid/dist/libfile/README:1.1 --- /dev/null Fri May 31 19:52:25 2024 +++ src/external/gpl2/mkhybrid/dist/libfile/README Fri May 31 19:52:25 2024 @@ -0,0 +1,70 @@ +# @(#)README 1.1 98/06/16 joerg + +Find file types by using a modified "magic" file + +Based on file v3.22 by Ian F. Darwin (see libfile/LEGAL.NOTICE and +libfile/README.dist - File v3.22 can be found at many archive sites) + +For each entry in the magic file, the "message" for the initial offset MUST +be 4 characters for the CREATOR and 4 characters for the TYPE - white space is +optional between them. Any other characters on this line are ignored. +Continuation lines (starting with a '>') are also ignored i.e. only the initial +offset lines are used. + +e.g magic entry for a GIF file: + +# off type test message +# +# GIF image +0 string GIF88BIM GIFf +>4 string 7a \b, version 8%s, +>4 string 9a \b, version 8%s, +>6 leshort >0 %hd x +>8 leshort >0 %hd, +#>10byte&0x80 color mapped, +#>10byte&0x07 =0x00 2 colors +#>10byte&0x07 =0x01 4 colors +#>10byte&0x07 =0x02 8 colors +#>10byte&0x07 =0x03 16 colors +#>10byte&0x07 =0x04 32 colors +#>10byte&0x07 =0x05 64 colors +#>10byte&0x07 =0x06 128 colors +#>10byte&0x07 =0x07 256 colors + +Just the
CVS commit: src/external/gpl2/mkhybrid/dist/libfile
Module Name:src Committed By: tsutsui Date: Fri May 31 19:52:25 UTC 2024 Added Files: src/external/gpl2/mkhybrid/dist/libfile: LEGAL.NOTICE README apprentice.c file.h lfile.c patchlevel.h softmagic.c Log Message: Import BSD licensed libfile for mkhybrid builds from cdrtools-3.01. - unnecessary files for tools build are not imported - file.c is renamed to lfile.c to avoid conflict with libhfs_iso - RCSId strings are trimmed To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/libfile/LEGAL.NOTICE \ src/external/gpl2/mkhybrid/dist/libfile/README \ src/external/gpl2/mkhybrid/dist/libfile/apprentice.c \ src/external/gpl2/mkhybrid/dist/libfile/file.h \ src/external/gpl2/mkhybrid/dist/libfile/lfile.c \ src/external/gpl2/mkhybrid/dist/libfile/patchlevel.h \ src/external/gpl2/mkhybrid/dist/libfile/softmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl2/mkhybrid
Module Name:src Committed By: tsutsui Date: Fri May 31 19:49:03 UTC 2024 Added Files: src/external/gpl2/mkhybrid/bin: Makefile src/external/gpl2/mkhybrid/dist: COPYING ChangeLog ChangeLog.mkhybrid Makefile.in README README.eltorito README.hfs_boot README.hfs_magic README.mkhybrid README.mkisofs README.session README.win32 TODO acconfig.h apple.c apple.h apple_proto.h config.h config.h.in configure configure.in defaults.h desktop.c eltorito.c getopt.c getopt.h getopt1.c hash.c install-sh iso9660.h joliet.c mac_label.c mac_label.h mac_label_proto.h mactypes.h magic mapping match.c match.h mkhybrid.8 mkisofs.8 mkisofs.c mkisofs.h mkisofs.spec multi.c name.c rock.c tree.c volume.c volume.h write.c write.h src/external/gpl2/mkhybrid/dist/include: fctldefs.h mconfig.h prototyp.h statdefs.h src/external/gpl2/mkhybrid/dist/libfile: proto.h src/external/gpl2/mkhybrid/dist/libhfs_iso: Makefile README block.c block.h btree.c btree.h data.c data.h file.c file.h hfs.c hfs.h hybrid.h internal.h low.c low.h lvolume.c node.c node.h record.c record.h volume.h Log Message: Import mkhybrid from OpenBSD 7.3 to create ISO9660/HFS hybrid ISO images. - files in libfile except proto.h prepared by OpenBSD are not imported due to non-standard license (newer BSD Licensed versions will be imported later) - unnecessary files for tools build are not imported - RCSId strings are trimmed to avoid unintended substitutions Proposed on tech-toolchain@: https://mail-index.netbsd.org/tech-toolchain/2024/05/25/msg004355.html To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/bin/Makefile cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/COPYING \ src/external/gpl2/mkhybrid/dist/ChangeLog \ src/external/gpl2/mkhybrid/dist/ChangeLog.mkhybrid \ src/external/gpl2/mkhybrid/dist/Makefile.in \ src/external/gpl2/mkhybrid/dist/README \ src/external/gpl2/mkhybrid/dist/README.eltorito \ src/external/gpl2/mkhybrid/dist/README.hfs_boot \ src/external/gpl2/mkhybrid/dist/README.hfs_magic \ src/external/gpl2/mkhybrid/dist/README.mkhybrid \ src/external/gpl2/mkhybrid/dist/README.mkisofs \ src/external/gpl2/mkhybrid/dist/README.session \ src/external/gpl2/mkhybrid/dist/README.win32 \ src/external/gpl2/mkhybrid/dist/TODO \ src/external/gpl2/mkhybrid/dist/acconfig.h \ src/external/gpl2/mkhybrid/dist/apple.c \ src/external/gpl2/mkhybrid/dist/apple.h \ src/external/gpl2/mkhybrid/dist/apple_proto.h \ src/external/gpl2/mkhybrid/dist/config.h \ src/external/gpl2/mkhybrid/dist/config.h.in \ src/external/gpl2/mkhybrid/dist/configure \ src/external/gpl2/mkhybrid/dist/configure.in \ src/external/gpl2/mkhybrid/dist/defaults.h \ src/external/gpl2/mkhybrid/dist/desktop.c \ src/external/gpl2/mkhybrid/dist/eltorito.c \ src/external/gpl2/mkhybrid/dist/getopt.c \ src/external/gpl2/mkhybrid/dist/getopt.h \ src/external/gpl2/mkhybrid/dist/getopt1.c \ src/external/gpl2/mkhybrid/dist/hash.c \ src/external/gpl2/mkhybrid/dist/install-sh \ src/external/gpl2/mkhybrid/dist/iso9660.h \ src/external/gpl2/mkhybrid/dist/joliet.c \ src/external/gpl2/mkhybrid/dist/mac_label.c \ src/external/gpl2/mkhybrid/dist/mac_label.h \ src/external/gpl2/mkhybrid/dist/mac_label_proto.h \ src/external/gpl2/mkhybrid/dist/mactypes.h \ src/external/gpl2/mkhybrid/dist/magic \ src/external/gpl2/mkhybrid/dist/mapping \ src/external/gpl2/mkhybrid/dist/match.c \ src/external/gpl2/mkhybrid/dist/match.h \ src/external/gpl2/mkhybrid/dist/mkhybrid.8 \ src/external/gpl2/mkhybrid/dist/mkisofs.8 \ src/external/gpl2/mkhybrid/dist/mkisofs.c \ src/external/gpl2/mkhybrid/dist/mkisofs.h \ src/external/gpl2/mkhybrid/dist/mkisofs.spec \ src/external/gpl2/mkhybrid/dist/multi.c \ src/external/gpl2/mkhybrid/dist/name.c \ src/external/gpl2/mkhybrid/dist/rock.c \ src/external/gpl2/mkhybrid/dist/tree.c \ src/external/gpl2/mkhybrid/dist/volume.c \ src/external/gpl2/mkhybrid/dist/volume.h \ src/external/gpl2/mkhybrid/dist/write.c \ src/external/gpl2/mkhybrid/dist/write.h cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/include/fctldefs.h \ src/external/gpl2/mkhybrid/dist/include/mconfig.h \ src/external/gpl2/mkhybrid/dist/include/prototyp.h \ src/external/gpl2/mkhybrid/dist/include/statdefs.h cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/libfile/proto.h cvs rdiff -u -r0 -r1.1 src/external/gpl2/mkhybrid/dist/libhfs_iso/Makefile \ src/external/gpl2/mkhybrid/dist/libhfs_iso/README \ src/external/gpl2/mkhybrid/dist/libhfs_iso/block.c \ src/external/gpl2/mkhybrid/dist/libhfs_iso/block.h \ src/external/gpl2/mkhybrid/dist/libhfs_iso/btree.c \
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: tsutsui Date: Sat May 25 06:27:57 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_util.c Log Message: Appease warnings on building tools/installboot on Cygwin. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/fs/cd9660/cd9660_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: tsutsui Date: Sat May 25 06:27:57 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_util.c Log Message: Appease warnings on building tools/installboot on Cygwin. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/fs/cd9660/cd9660_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/cd9660/cd9660_util.c diff -u src/sys/fs/cd9660/cd9660_util.c:1.15 src/sys/fs/cd9660/cd9660_util.c:1.16 --- src/sys/fs/cd9660/cd9660_util.c:1.15 Sun May 19 15:41:53 2024 +++ src/sys/fs/cd9660/cd9660_util.c Sat May 25 06:27:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_util.c,v 1.15 2024/05/19 15:41:53 tsutsui Exp $ */ +/* $NetBSD: cd9660_util.c,v 1.16 2024/05/25 06:27:57 tsutsui Exp $ */ /*- * Copyright (c) 1994 @@ -38,7 +38,7 @@ #include #ifdef _KERNEL -__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.15 2024/05/19 15:41:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.16 2024/05/25 06:27:57 tsutsui Exp $"); #else /* used by macppc_installboot */ #if HAVE_NBTOOL_CONFIG_H @@ -63,6 +63,10 @@ __KERNEL_RCSID(0, "$NetBSD: cd9660_util. #include #include #define KASSERT(x) assert(x) /* XXX for */ + +#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H +#include /* for le16dec(9) etc. in iso.h */ +#endif #endif #include
CVS commit: src/distrib/emips
Module Name:src Committed By: tsutsui Date: Fri May 24 13:26:36 UTC 2024 Modified Files: src/distrib/emips/cdroms/installcd: Makefile src/distrib/emips/instkernel: Makefile src/distrib/emips/miniroot: Makefile.inc Log Message: Remove installboot(8) calls against emips install media. XXX: maybe we should also remove blindly copied bootxx binaries. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/cdroms/installcd/Makefile cvs rdiff -u -r1.5 -r1.6 src/distrib/emips/instkernel/Makefile cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/emips
Module Name:src Committed By: tsutsui Date: Fri May 24 13:26:36 UTC 2024 Modified Files: src/distrib/emips/cdroms/installcd: Makefile src/distrib/emips/instkernel: Makefile src/distrib/emips/miniroot: Makefile.inc Log Message: Remove installboot(8) calls against emips install media. XXX: maybe we should also remove blindly copied bootxx binaries. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/cdroms/installcd/Makefile cvs rdiff -u -r1.5 -r1.6 src/distrib/emips/instkernel/Makefile cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/cdroms/installcd/Makefile diff -u src/distrib/emips/cdroms/installcd/Makefile:1.4 src/distrib/emips/cdroms/installcd/Makefile:1.5 --- src/distrib/emips/cdroms/installcd/Makefile:1.4 Mon Sep 23 13:42:31 2019 +++ src/distrib/emips/cdroms/installcd/Makefile Fri May 24 13:26:35 2024 @@ -1,12 +1,8 @@ -# $NetBSD: Makefile,v 1.4 2019/09/23 13:42:31 christos Exp $ +# $NetBSD: Makefile,v 1.5 2024/05/24 13:26:35 tsutsui Exp $ CDBASE= emipscd # gives ${CDBASE}.iso CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR CDRELEASE_NODEBUG= true CDKERNELS= netbsd-INSTALL.gz netbsd CDINSTKERNEL= ../../instkernel -#make the CD bootable -image_md_post: - ${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE} - .include "${.CURDIR}/../../../common/Makefile.bootcd" Index: src/distrib/emips/instkernel/Makefile diff -u src/distrib/emips/instkernel/Makefile:1.5 src/distrib/emips/instkernel/Makefile:1.6 --- src/distrib/emips/instkernel/Makefile:1.5 Fri Jun 14 16:34:31 2019 +++ src/distrib/emips/instkernel/Makefile Fri May 24 13:26:35 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2019/06/14 16:34:31 martin Exp $ +# $NetBSD: Makefile,v 1.6 2024/05/24 13:26:35 tsutsui Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -10,9 +10,7 @@ IMAGESIZE= 2600k LISTS= ${.CURDIR}/list MTREECONF= ${DISTRIBDIR}/common/mtree.dot IMAGEENDIAN= be -PRIMARYBOOT= ${DESTDIR}/usr/mdec/bootxx_ffs -IMAGEDEPENDS= netbsd-INSTALL.gz ${DESTDIR}/usr/mdec/boot.emips ${PRIMARYBOOT} -IMAGEPOSTBUILD= ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${PRIMARYBOOT} +IMAGEDEPENDS= netbsd-INSTALL.gz ${DESTDIR}/usr/mdec/boot.emips RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR} RAMDISK= ${RAMDISKDIR}/ramdisk.fs Index: src/distrib/emips/miniroot/Makefile.inc diff -u src/distrib/emips/miniroot/Makefile.inc:1.4 src/distrib/emips/miniroot/Makefile.inc:1.5 --- src/distrib/emips/miniroot/Makefile.inc:1.4 Tue Jan 24 18:04:01 2017 +++ src/distrib/emips/miniroot/Makefile.inc Fri May 24 13:26:35 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2017/01/24 18:04:01 christos Exp $ +# $NetBSD: Makefile.inc,v 1.5 2024/05/24 13:26:35 tsutsui Exp $ DBG= -Os @@ -12,5 +12,3 @@ IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ ${DESTDIR}/.profile ${DESTDIR}/boot.emips \ ${DESTDIR}/etc/disktab \ ${KERNOBJDIR}/GENERIC/netbsd - -IMAGEPOSTBUILD= ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/bootxx_ffs
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Fri May 24 10:13:44 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: Makefile Removed Files: src/distrib/cdrom/macppc_installboot: cd9660.c Log Message: Pull sharable src/usr.sbin/installboot/cd9660.c. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.6 -r0 src/distrib/cdrom/macppc_installboot/cd9660.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Fri May 24 10:13:44 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: Makefile Removed Files: src/distrib/cdrom/macppc_installboot: cd9660.c Log Message: Pull sharable src/usr.sbin/installboot/cd9660.c. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.6 -r0 src/distrib/cdrom/macppc_installboot/cd9660.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/macppc_installboot/Makefile diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.12 src/distrib/cdrom/macppc_installboot/Makefile:1.13 --- src/distrib/cdrom/macppc_installboot/Makefile:1.12 Sun May 19 15:51:30 2024 +++ src/distrib/cdrom/macppc_installboot/Makefile Fri May 24 10:13:44 2024 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.12 2024/05/19 15:51:30 tsutsui Exp $ +# $NetBSD: Makefile,v 1.13 2024/05/24 10:13:44 tsutsui Exp $ .include HOSTPROG= macppc_installboot SRCS= installboot.c cd9660.c cd9660_util.c -.PATH.c: ${NETBSDSRCDIR}/sys/fs/cd9660 +.PATH.c: ${NETBSDSRCDIR}/usr.sbin/installboot ${NETBSDSRCDIR}/sys/fs/cd9660 HOST_CPPFLAGS+= -I. -I${.CURDIR} #HOST_CPPFLAGS+= -DDEBUG
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Fri May 24 09:59:42 UTC 2024 Modified Files: src/usr.sbin/installboot: cd9660.c Log Message: Fix tools build errors on Cygwin. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/installboot/cd9660.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/installboot/cd9660.c diff -u src/usr.sbin/installboot/cd9660.c:1.1 src/usr.sbin/installboot/cd9660.c:1.2 --- src/usr.sbin/installboot/cd9660.c:1.1 Sun May 19 15:48:57 2024 +++ src/usr.sbin/installboot/cd9660.c Fri May 24 09:59:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.1 2024/05/19 15:48:57 tsutsui Exp $ */ +/* $NetBSD: cd9660.c,v 1.2 2024/05/24 09:59:42 tsutsui Exp $ */ /*- * Copyright (c) 2005 Izumi Tsutsui. All rights reserved. @@ -30,7 +30,7 @@ #include #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: cd9660.c,v 1.1 2024/05/19 15:48:57 tsutsui Exp $"); +__RCSID("$NetBSD: cd9660.c,v 1.2 2024/05/24 09:59:42 tsutsui Exp $"); #endif /* !__lint */ #include @@ -38,6 +38,9 @@ __RCSID("$NetBSD: cd9660.c,v 1.1 2024/05 #if !HAVE_NBTOOL_CONFIG_H #include #endif +#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H +#include +#endif #include #include
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Fri May 24 09:59:42 UTC 2024 Modified Files: src/usr.sbin/installboot: cd9660.c Log Message: Fix tools build errors on Cygwin. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/installboot/cd9660.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/emips/miniroot
Module Name:src Committed By: tsutsui Date: Thu May 23 15:00:43 UTC 2024 Modified Files: src/distrib/emips/miniroot: list Log Message: Remove installboot(8) from emips miniroot too. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/emips/miniroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/emips/miniroot
Module Name:src Committed By: tsutsui Date: Thu May 23 15:00:43 UTC 2024 Modified Files: src/distrib/emips/miniroot: list Log Message: Remove installboot(8) from emips miniroot too. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/emips/miniroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/miniroot/list diff -u src/distrib/emips/miniroot/list:1.3 src/distrib/emips/miniroot/list:1.4 --- src/distrib/emips/miniroot/list:1.3 Sat Nov 30 08:27:18 2013 +++ src/distrib/emips/miniroot/list Thu May 23 15:00:43 2024 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.3 2013/11/30 08:27:18 nakayama Exp $ +# $NetBSD: list,v 1.4 2024/05/23 15:00:43 tsutsui Exp $ # extras in bin PROG bin/csh @@ -18,9 +18,6 @@ PROG usr/bin/rsh PROG usr/bin/tset usr/bin/reset PROG usr/bin/vi -# extras in usr/sbin -PROG usr/sbin/installboot - # crunchgen source directory specials: progs built in nonstandard places SPECIAL vi srcdir external/bsd/nvi/usr.bin/nvi
CVS commit: src/distrib/emips/ramdisk
Module Name:src Committed By: tsutsui Date: Wed May 22 16:24:41 UTC 2024 Modified Files: src/distrib/emips/ramdisk: list Log Message: Also remove installboot(8) from emips install ramdisk. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/ramdisk/list diff -u src/distrib/emips/ramdisk/list:1.4 src/distrib/emips/ramdisk/list:1.5 --- src/distrib/emips/ramdisk/list:1.4 Sun Jun 19 02:40:38 2011 +++ src/distrib/emips/ramdisk/list Wed May 22 16:24:40 2024 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.4 2011/06/19 02:40:38 tsutsui Exp $ +# $NetBSD: list,v 1.5 2024/05/22 16:24:40 tsutsui Exp $ SRCDIRS bin sbin usr.bin usr.sbin sys/arch/emips/stand @@ -47,8 +47,6 @@ PROG usr/bin/sed PROG usr/bin/tip PROG usr/bin/tset -PROG usr/sbin/installboot - PROG usr/sbin/chown usr/bin/chgrp PROG usr/sbin/chroot
CVS commit: src/distrib/emips/ramdisk
Module Name:src Committed By: tsutsui Date: Wed May 22 16:24:41 UTC 2024 Modified Files: src/distrib/emips/ramdisk: list Log Message: Also remove installboot(8) from emips install ramdisk. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/emips/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Wed May 22 15:42:42 UTC 2024 Modified Files: src/usr.sbin/installboot: Makefile installboot.h machines.c Removed Files: src/usr.sbin/installboot/arch: emips.c Log Message: Remove no-op emips stuff. It seems blindly copied and modified from pmax, but emips bootloader can be specified by "Ml40x_2ace.plx" config file on the Giano simulator. (not sure what on the real Xilinx ML401 board, but maybe hardcoded) To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/installboot/Makefile cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/installboot/installboot.h cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/installboot/machines.c cvs rdiff -u -r1.2 -r0 src/usr.sbin/installboot/arch/emips.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/installboot
Module Name:src Committed By: tsutsui Date: Wed May 22 15:42:42 UTC 2024 Modified Files: src/usr.sbin/installboot: Makefile installboot.h machines.c Removed Files: src/usr.sbin/installboot/arch: emips.c Log Message: Remove no-op emips stuff. It seems blindly copied and modified from pmax, but emips bootloader can be specified by "Ml40x_2ace.plx" config file on the Giano simulator. (not sure what on the real Xilinx ML401 board, but maybe hardcoded) To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/installboot/Makefile cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/installboot/installboot.h cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/installboot/machines.c cvs rdiff -u -r1.2 -r0 src/usr.sbin/installboot/arch/emips.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/installboot/Makefile diff -u src/usr.sbin/installboot/Makefile:1.59 src/usr.sbin/installboot/Makefile:1.60 --- src/usr.sbin/installboot/Makefile:1.59 Sun May 19 15:48:57 2024 +++ src/usr.sbin/installboot/Makefile Wed May 22 15:42:42 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.59 2024/05/19 15:48:57 tsutsui Exp $ +# $NetBSD: Makefile,v 1.60 2024/05/22 15:42:42 tsutsui Exp $ # .include @@ -12,7 +12,7 @@ ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c .if !defined(SMALLPROG) && !defined(ARCH_FILES) ARCH_FILES= alpha.c amiga.c -ARCH_FILES+= emips.c evbarm.c evbmips.c ews4800mips.c +ARCH_FILES+= evbarm.c evbmips.c ews4800mips.c ARCH_FILES+= hp300.c hppa.c ARCH_FILES+= i386.c ARCH_FILES+= landisk.c Index: src/usr.sbin/installboot/installboot.h diff -u src/usr.sbin/installboot/installboot.h:1.45 src/usr.sbin/installboot/installboot.h:1.46 --- src/usr.sbin/installboot/installboot.h:1.45 Sun May 19 15:48:57 2024 +++ src/usr.sbin/installboot/installboot.h Wed May 22 15:42:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.h,v 1.45 2024/05/19 15:48:57 tsutsui Exp $ */ +/* $NetBSD: installboot.h,v 1.46 2024/05/22 15:42:42 tsutsui Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -193,7 +193,6 @@ int raw_findstage2(ib_params *, uint32_ extern struct ib_mach ib_mach_alpha; extern struct ib_mach ib_mach_amd64; extern struct ib_mach ib_mach_amiga; -extern struct ib_mach ib_mach_emips; extern struct ib_mach ib_mach_evbarm; extern struct ib_mach ib_mach_evbmips; extern struct ib_mach ib_mach_ews4800mips; Index: src/usr.sbin/installboot/machines.c diff -u src/usr.sbin/installboot/machines.c:1.43 src/usr.sbin/installboot/machines.c:1.44 --- src/usr.sbin/installboot/machines.c:1.43 Sun Jun 21 17:17:02 2020 +++ src/usr.sbin/installboot/machines.c Wed May 22 15:42:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machines.c,v 1.43 2020/06/21 17:17:02 thorpej Exp $ */ +/* $NetBSD: machines.c,v 1.44 2024/05/22 15:42:42 tsutsui Exp $ */ /*- * Copyright (c) 2002-2005 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if !defined(__lint) -__RCSID("$NetBSD: machines.c,v 1.43 2020/06/21 17:17:02 thorpej Exp $"); +__RCSID("$NetBSD: machines.c,v 1.44 2024/05/22 15:42:42 tsutsui Exp $"); #endif /* !__lint */ #include @@ -48,7 +48,6 @@ struct ib_mach * const machines[] = { _mach_alpha, _mach_amd64, _mach_amiga, -_mach_emips, _mach_evbarm, _mach_evbmips, _mach_ews4800mips,
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Tue May 21 15:35:18 UTC 2024 Modified Files: src/doc: CHANGES Log Message: hp300 installcd is now bootable so mention it properly. To generate a diff of this commit: cvs rdiff -u -r1.3057 -r1.3058 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3057 src/doc/CHANGES:1.3058 --- src/doc/CHANGES:1.3057 Tue May 21 10:46:20 2024 +++ src/doc/CHANGES Tue May 21 15:35:18 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3057 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3058 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -383,7 +383,6 @@ Changes from NetBSD 10.0 to NetBSD 11.0: [mrg 20240506] makefs(8): Add an option to warn and error out for mtree missing entries. [christos 20240508] - hp300: Preliminary CD boot support. [tsutsui 20240509] lint(1): Support new keywords in C23 mode, including nullptr. [rillig 20240509] install(1): Support -v (verbose). [wiz 20240510] @@ -410,4 +409,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0: and earlier. [nia 20240517] curses(3): Constify arguments of newterm(3), setterm(3) functions. [uwe 20240517] + hp300: Installation CD ISO image is now bootable. [tsutsui 20240519] tic(1): Honour the user's umask (from RVP). [christos 20240520]
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Tue May 21 15:35:18 UTC 2024 Modified Files: src/doc: CHANGES Log Message: hp300 installcd is now bootable so mention it properly. To generate a diff of this commit: cvs rdiff -u -r1.3057 -r1.3058 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:52:34 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: cd9660.c installboot.c Log Message: Use native cd9660 blocksize to specify block numbers in cd9660.c. This reduces diffs from src/usr.sbin/installboot/cd9660.c. Also explicitly call cd9660_match() to get fstype->blocksize properly. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/cd9660.c cvs rdiff -u -r1.6 -r1.7 src/distrib/cdrom/macppc_installboot/installboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/macppc_installboot/cd9660.c diff -u src/distrib/cdrom/macppc_installboot/cd9660.c:1.5 src/distrib/cdrom/macppc_installboot/cd9660.c:1.6 --- src/distrib/cdrom/macppc_installboot/cd9660.c:1.5 Sun May 19 15:51:30 2024 +++ src/distrib/cdrom/macppc_installboot/cd9660.c Sun May 19 15:52:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $ */ +/* $NetBSD: cd9660.c,v 1.6 2024/05/19 15:52:34 tsutsui Exp $ */ /*- * Copyright (c) 2005 Izumi Tsutsui. All rights reserved. @@ -30,7 +30,7 @@ #include #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $"); +__RCSID("$NetBSD: cd9660.c,v 1.6 2024/05/19 15:52:34 tsutsui Exp $"); #endif /* !__lint */ #include @@ -213,8 +213,6 @@ cd9660_findstage2(ib_params *params, uin found = 1; /* ISO filesystem always has contiguous file blocks */ blocks[0].block = (int64_t)isonum_733(idr->extent); - /* XXX bootxx assumes blocksize is 512 */ - blocks[0].block *= blocksize / 512; blocks[0].blocksize = roundup(isonum_733(idr->size), blocksize); *maxblk = 1; Index: src/distrib/cdrom/macppc_installboot/installboot.c diff -u src/distrib/cdrom/macppc_installboot/installboot.c:1.6 src/distrib/cdrom/macppc_installboot/installboot.c:1.7 --- src/distrib/cdrom/macppc_installboot/installboot.c:1.6 Sun May 19 15:51:30 2024 +++ src/distrib/cdrom/macppc_installboot/installboot.c Sun May 19 15:52:34 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.6 2024/05/19 15:51:30 tsutsui Exp $ */ +/* $NetBSD: installboot.c,v 1.7 2024/05/19 15:52:34 tsutsui Exp $ */ /*- * Copyright (c) 2005 Izumi Tsutsui. All rights reserved. @@ -47,6 +47,12 @@ static void usage(void); static ib_params installboot_params; +static struct ib_fs cd9660_fstype = { + .name = "cd9660", + .match = cd9660_match, + .findstage2 = cd9660_findstage2 +}; + int main(int argc, char **argv) { @@ -59,6 +65,7 @@ main(int argc, char **argv) uint32_t nblk, maxblk, blk_i; int rv; ib_block *blocks; + uint64_t block; setprogname(argv[0]); params = _params; @@ -70,11 +77,16 @@ main(int argc, char **argv) usage(); params->filesystem = argv[1]; + params->fstype = _fstype; if ((params->fsfd = open(params->filesystem, O_RDWR, 0600)) == -1) err(1, "Opening file system `%s' read", params->filesystem); if (fstat(params->fsfd, >fsstat) == -1) err(1, "Examining file system `%s'", params->filesystem); + if (!params->fstype->match(params)) + errx(1, "File system `%s' is not of type %s", + params->filesystem, params->fstype->name); + #ifdef DEBUG printf("file system: %s, %ld bytes\n", params->filesystem, (long)params->fsstat.st_size); @@ -167,14 +179,16 @@ main(int argc, char **argv) } nblk = maxblk; - if (!cd9660_findstage2(params, , blocks)) { + if (!params->fstype->findstage2(params, , blocks)) { exit(1); } bbinfop->bbi_block_count = htobe32(nblk); bbinfop->bbi_block_size = htobe32(blocks[0].blocksize); for (blk_i = 0; blk_i < nblk; blk_i++) { - bbinfop->bbi_block_table[blk_i] = htobe32(blocks[blk_i].block); + /* XXX bootxx assumes blocksize is 512 */ + block = blocks[blk_i].block * (params->fstype->blocksize / 512); + bbinfop->bbi_block_table[blk_i] = htobe32(block); if (blocks[blk_i].blocksize < blocks[0].blocksize && blk_i + 1 != nblk) { warnx("Secondary bootstrap `%s' blocks do not have "
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:52:34 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: cd9660.c installboot.c Log Message: Use native cd9660 blocksize to specify block numbers in cd9660.c. This reduces diffs from src/usr.sbin/installboot/cd9660.c. Also explicitly call cd9660_match() to get fstype->blocksize properly. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/cd9660.c cvs rdiff -u -r1.6 -r1.7 src/distrib/cdrom/macppc_installboot/installboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:51:30 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: Makefile cd9660.c installboot.c installboot.h Log Message: Sync with src/usr.sbin/installboot/cd9660.c: - include now properly updated cd9660_extern.h for function prototypes and remove them from local installboot.h - use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN - use proper names for the secondary boot file - appease several pointer signedness warnings (not fatal on HOST tools) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/macppc_installboot/cd9660.c \ src/distrib/cdrom/macppc_installboot/installboot.h cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/installboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/macppc_installboot/Makefile diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.11 src/distrib/cdrom/macppc_installboot/Makefile:1.12 --- src/distrib/cdrom/macppc_installboot/Makefile:1.11 Tue May 1 19:59:43 2018 +++ src/distrib/cdrom/macppc_installboot/Makefile Sun May 19 15:51:30 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2018/05/01 19:59:43 christos Exp $ +# $NetBSD: Makefile,v 1.12 2024/05/19 15:51:30 tsutsui Exp $ .include HOSTPROG= macppc_installboot @@ -16,6 +16,7 @@ HOST_CPPFLAGS+= -I. -I${.CURDIR} ${HOST_INSTALL_DIR} fs/cd9660 ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/unicode.h fs ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/iso.h fs/cd9660 + ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/cd9660_extern.h fs/cd9660 .endif cleandir distclean: cleaninc Index: src/distrib/cdrom/macppc_installboot/cd9660.c diff -u src/distrib/cdrom/macppc_installboot/cd9660.c:1.4 src/distrib/cdrom/macppc_installboot/cd9660.c:1.5 --- src/distrib/cdrom/macppc_installboot/cd9660.c:1.4 Sat Sep 27 15:21:40 2014 +++ src/distrib/cdrom/macppc_installboot/cd9660.c Sun May 19 15:51:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.4 2014/09/27 15:21:40 tsutsui Exp $ */ +/* $NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $ */ /*- * Copyright (c) 2005 Izumi Tsutsui. All rights reserved. @@ -30,7 +30,7 @@ #include #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: cd9660.c,v 1.4 2014/09/27 15:21:40 tsutsui Exp $"); +__RCSID("$NetBSD: cd9660.c,v 1.5 2024/05/19 15:51:30 tsutsui Exp $"); #endif /* !__lint */ #include @@ -51,6 +51,7 @@ __RCSID("$NetBSD: cd9660.c,v 1.4 2014/09 #include #include +#include #include "installboot.h" @@ -87,7 +88,7 @@ cd9660_match(ib_params *params) return 0; } - blocksize = isonum_723((char *)ipd.logical_block_size); + blocksize = isonum_723((u_char *)ipd.logical_block_size); if (blocksize != ISO_DEFAULT_BLOCK_SIZE) { warnx("Invalid blocksize %d in `%s'", blocksize, params->filesystem); @@ -104,10 +105,11 @@ int cd9660_findstage2(ib_params *params, uint32_t *maxblk, ib_block *blocks) { uint8_t buf[ISO_DEFAULT_BLOCK_SIZE]; - char name[MAXNAMLEN]; - char *ofwboot; + char name[ISO_MAXNAMLEN]; + char *stage2; off_t loc; - int rv, blocksize, found, i; + int rv, blocksize, found; + u_int i; struct iso_primary_descriptor ipd; struct iso_directory_record *idr; @@ -122,20 +124,20 @@ cd9660_findstage2(ib_params *params, uin #endif /* The secondary bootstrap must be clearly in /. */ - strlcpy(name, params->stage2, MAXNAMLEN); - ofwboot = name; - if (ofwboot[0] == '/') - ofwboot++; - if (strchr(ofwboot, '/') != NULL) { + strlcpy(name, params->stage2, ISO_MAXNAMLEN); + stage2 = name; + if (stage2[0] == '/') + stage2++; + if (strchr(stage2, '/') != NULL) { warnx("The secondary bootstrap `%s' must be in / " "on filesystem `%s'", params->stage2, params->filesystem); return 0; } - if (strchr(ofwboot, '.') == NULL) { + if (strchr(stage2, '.') == NULL) { /* * XXX should fix isofncmp()? */ - strlcat(ofwboot, ".", MAXNAMLEN); + strlcat(name, ".", ISO_MAXNAMLEN); } rv = pread(params->fsfd, , sizeof(ipd), @@ -148,7 +150,7 @@ cd9660_findstage2(ib_params *params, uin params->filesystem); return 0; } - blocksize = isonum_723((char *)ipd.logical_block_size); + blocksize = isonum_723((u_char *)ipd.logical_block_size); idr = (void *)ipd.root_directory_record; loc = (off_t)isonum_733(idr->extent) * blocksize; @@ -205,8 +207,9 @@ cd9660_findstage2(ib_params *params, uin printf("\n"); } #endif - if (isofncmp(ofwboot, strlen(ofwboot), - idr->name, isonum_711(idr->name_len), 0) == 0) { + if (isofncmp((u_char *)stage2, strlen(stage2), + (u_char *)idr->name, + isonum_711((u_char *)idr->name_len), 0) == 0) {
CVS commit: src/distrib/cdrom/macppc_installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:51:30 UTC 2024 Modified Files: src/distrib/cdrom/macppc_installboot: Makefile cd9660.c installboot.c installboot.h Log Message: Sync with src/usr.sbin/installboot/cd9660.c: - include now properly updated cd9660_extern.h for function prototypes and remove them from local installboot.h - use ISO_MAXNAMLEN rather than (BSD specific and incorrect) MAXNAMLEN - use proper names for the secondary boot file - appease several pointer signedness warnings (not fatal on HOST tools) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/cdrom/macppc_installboot/Makefile cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/macppc_installboot/cd9660.c \ src/distrib/cdrom/macppc_installboot/installboot.h cvs rdiff -u -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/installboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/hp300/cdroms/installcd
Module Name:src Committed By: tsutsui Date: Sun May 19 15:50:00 UTC 2024 Modified Files: src/distrib/hp300/cdroms/installcd: Makefile Log Message: Put a RAMDISK kernel and SYS_UBOOT into hp300 installcd to make it bootable. This should finally close PR/54455. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/hp300/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/hp300/cdroms/installcd/Makefile diff -u src/distrib/hp300/cdroms/installcd/Makefile:1.3 src/distrib/hp300/cdroms/installcd/Makefile:1.4 --- src/distrib/hp300/cdroms/installcd/Makefile:1.3 Mon Sep 23 13:42:32 2019 +++ src/distrib/hp300/cdroms/installcd/Makefile Sun May 19 15:50:00 2024 @@ -1,6 +1,20 @@ -# $NetBSD: Makefile,v 1.3 2019/09/23 13:42:32 christos Exp $ +# $NetBSD: Makefile,v 1.4 2024/05/19 15:50:00 tsutsui Exp $ CDBASE= hp300cd # gives ${CDBASE}.iso CDRELEASE= true # include $RELEASEDIR/$RELEASEMACHINEDIR CDRELEASE_NODEBUG= true +CDKERNELS= netbsd-RAMDISK.gz netbsd +CDINSTKERNEL= ../../instkernel + +SYS_UBOOT= SYS_UBOOT +BOOTDIR= ${DESTDIR}/usr/mdec/rbootd + +# make the CD bootable +prepare_md_post: + ${INSTALL} ${COPY} -m 0644 ${BOOTDIR}/${SYS_UBOOT} cdrom + +image_md_post: + ${TOOL_INSTALLBOOT} -m ${MACHINE} \ + ${CDIMAGE} ${BOOTDIR}/${SYS_UBOOT} /${SYS_UBOOT} + .include "${.CURDIR}/../../../common/Makefile.bootcd"
CVS commit: src/distrib/hp300/cdroms/installcd
Module Name:src Committed By: tsutsui Date: Sun May 19 15:50:00 UTC 2024 Modified Files: src/distrib/hp300/cdroms/installcd: Makefile Log Message: Put a RAMDISK kernel and SYS_UBOOT into hp300 installcd to make it bootable. This should finally close PR/54455. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/hp300/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:48:58 UTC 2024 Modified Files: src/usr.sbin/installboot: Makefile fstypes.c installboot.8 installboot.h src/usr.sbin/installboot/arch: hp300.c Added Files: src/usr.sbin/installboot: cd9660.c Log Message: Add cd9660 support to search a bootloader file in the target file system. Also add CD boot support for hp300, using a bootloader file in cd9660 fs. This is a tool's part to close PR/54455. HP 9000/300 machines read LIF directory entry allocated after the LIF volume header at the top of the boot disk during bootstrap, and a bootstrap file must be contiguously allocated on the disk due to limitation of the LIF specification. Current NetBSD/hp300's bootloader is larger than ~80KB so we have to prepare a special 'boot' partition for FFS (that has only 8KB (ffsv1) or 32KB (ffsv2) spaces) disks to put such a large bootloader. On the other hand, on ISO9660 fs all files are allocated contiguously so we can specify a bootloader file in the target ISO9660 directly in the LIF directory entry. Note we can simply use the existing "append" option to create bootable CD ISO for hp300, but it looks some emulators (at leaset MAME) reject such non-standard ISO files, i.e. with an appended bootloader file at the end of the image. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/usr.sbin/installboot/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/installboot/cd9660.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/installboot/fstypes.c cvs rdiff -u -r1.108 -r1.109 src/usr.sbin/installboot/installboot.8 cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/installboot/installboot.h cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/installboot/arch/hp300.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/installboot
`%s' found at offset %lu in `%s'\n", + params->stage2, (unsigned long)boot_offset, + params->filesystem); + } + + } else +#endif if (params->flags & IB_APPEND) { if (!S_ISREG(params->fsstat.st_mode)) { warnx( @@ -157,11 +223,27 @@ hp300_setboot(ib_params *params) } } - bootstrap = mmap(NULL, params->s1stat.st_size, PROT_READ | PROT_WRITE, - MAP_PRIVATE, params->s1fd, 0); - if (bootstrap == MAP_FAILED) { - warn("mmapping `%s'", params->stage1); - goto done; +#ifdef SUPPORT_CD9660 + if (params->stage2 != NULL) { + /* Use bootstrap file in the target filesystem. */ + bootstrap = mmap(NULL, bootstrap_size, + PROT_READ | PROT_WRITE, MAP_PRIVATE, params->fsfd, + boot_offset); + if (bootstrap == MAP_FAILED) { + warn("mmapping `%s'", params->filesystem); + goto done; + } + } else +#endif + { + /* Use bootstrap specified as stage1. */ + bootstrap_size = params->s1stat.st_size; + bootstrap = mmap(NULL, bootstrap_size, + PROT_READ | PROT_WRITE, MAP_PRIVATE, params->s1fd, 0); + if (bootstrap == MAP_FAILED) { + warn("mmapping `%s'", params->stage1); + goto done; + } } /* Relocate files, sanity check LIF directory on the way */ @@ -187,8 +269,8 @@ hp300_setboot(ib_params *params) } /* Write LIF volume header and directory to sectors 0 and 1 */ - rv = pwrite(params->fsfd, bootstrap, 1024, 0); - if (rv != 1024) { + rv = pwrite(params->fsfd, bootstrap, LIF_VOLDIRSIZE, 0); + if (rv != LIF_VOLDIRSIZE) { if (rv == -1) warn("Writing `%s'", params->filesystem); else @@ -196,6 +278,17 @@ hp300_setboot(ib_params *params) goto done; } +#ifdef SUPPORT_CD9660 + if (params->stage2 != NULL) { + /* + * Bootstrap in the target filesystem is used. + * No need to write bootstrap to BOOT partition. + */ + retval = 1; + goto done; + } +#endif + /* Write files to BOOT partition */ offset = boot_offset <= HP300_SECTSIZE * 16 ? HP300_SECTSIZE * 16 : 0; i = roundup(params->s1stat.st_size, secsize) - offset; @@ -216,6 +309,6 @@ hp300_setboot(ib_params *params) if (label != NULL) free(label); if (bootstrap != MAP_FAILED) - munmap(bootstrap, params->s1stat.st_size); + munmap(bootstrap, bootstrap_size); return retval; } Added files: Index: src/usr.sbin/installboot/cd9660.c diff -u /dev/null src/usr.sbin/installboot/cd9660.c:1.1 --- /dev/null Sun May 19 15:48:58 2024 +++ src/usr.sbin/installboot/cd9660.c Sun May 19 15:48:57 2024 @@ -0,0 +1,234 @@ +/* $NetBSD: cd9660.c,v 1.1 2024/05/19 15:48:57 tsutsui Exp $ */ + +/*- + * Copyright (c) 2005 Izumi Tsutsui. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(__RCSID) && !defined(__lint) +__RCSID("$NetBSD: cd9660.c,v 1.1 2024/05/19 15:48:57 tsutsui Exp $"); +#endif /* !__lint */ + +#include + +#if !HAVE_NBTOOL_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "installboot.h" + +#define roundup(x, y) x)+((y)-1))/(y))*(y)) +#define MAXLEN 16 + + +int +cd9660_match(ib_params *params) +{ + int rv, blocksize; + struct iso_primary_descriptor ipd; + + assert(params != NULL); + assert(params->fstype != NULL); + assert(params->fsfd != -1); + + rv = pread(params->fsfd, , sizeof(ipd), + ISO_DEFAULT_BLOCK_SIZE * 16); + if (rv == -1) { + warn("Reading primary descriptor in `%s'", params->filesystem); + return 0; + } else if (rv != sizeof(ipd)) { + warnx("Reading primary descript
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:44:22 UTC 2024 Modified Files: src/usr.sbin/installboot: installboot.h Log Message: Reorder function prototypes per source files. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/installboot/installboot.h 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/installboot/installboot.h diff -u src/usr.sbin/installboot/installboot.h:1.43 src/usr.sbin/installboot/installboot.h:1.44 --- src/usr.sbin/installboot/installboot.h:1.43 Sun Jul 10 19:28:00 2022 +++ src/usr.sbin/installboot/installboot.h Sun May 19 15:44:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.h,v 1.43 2022/07/10 19:28:00 brook Exp $ */ +/* $NetBSD: installboot.h,v 1.44 2024/05/19 15:44:21 tsutsui Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -171,15 +171,19 @@ int shared_bbinfo_clearboot(ib_params * int shared_bbinfo_setboot(ib_params *, struct bbinfo_params *, int (*)(ib_params *, struct bbinfo_params *, uint8_t *)); - /* fstypes.c */ -int hardcode_stage2(ib_params *, uint32_t *, ib_block *); + /* ext2fs.c */ +int ext2fs_match(ib_params *); +int ext2fs_findstage2(ib_params *, uint32_t *, ib_block *); + + /* ffs.c */ int ffs_match(ib_params *); int ffs_findstage2(ib_params *, uint32_t *, ib_block *); int raid_match(ib_params *); + + /* fstypes.c */ +int hardcode_stage2(ib_params *, uint32_t *, ib_block *); int raw_match(ib_params *); int raw_findstage2(ib_params *, uint32_t *, ib_block *); -int ext2fs_match(ib_params *); -int ext2fs_findstage2(ib_params *, uint32_t *, ib_block *); /* machines.c */ extern struct ib_mach ib_mach_alpha;
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: tsutsui Date: Sun May 19 15:44:22 UTC 2024 Modified Files: src/usr.sbin/installboot: installboot.h Log Message: Reorder function prototypes per source files. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/installboot/installboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools
Module Name:src Committed By: tsutsui Date: Sun May 19 15:43:24 UTC 2024 Modified Files: src/tools: Makefile.nbincludes Log Message: Install cd9660 related system headers for tools installboot(8) builds. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tools/Makefile.nbincludes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.nbincludes diff -u src/tools/Makefile.nbincludes:1.10 src/tools/Makefile.nbincludes:1.11 --- src/tools/Makefile.nbincludes:1.10 Mon Apr 1 02:18:30 2024 +++ src/tools/Makefile.nbincludes Sun May 19 15:43:24 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.nbincludes,v 1.10 2024/04/01 02:18:30 christos Exp $ +# $NetBSD: Makefile.nbincludes,v 1.11 2024/05/19 15:43:24 tsutsui Exp $ .include @@ -6,12 +6,15 @@ _ARCHDIR:= ${.PARSEDIR}/../sys/arch _INCDIR:= ${.PARSEDIR}/../include _SYSDIR:= ${.PARSEDIR}/../sys/sys _UFSDIR:= ${.PARSEDIR}/../sys/ufs +_FSDIR:= ${.PARSEDIR}/../sys/fs _SUBDIR!= cd ${_ARCHDIR} && ${MAKE} -V SUBDIR .if make(depend) || make(all) || make(dependall) || make(install) # There's no need to run these commands for "make cleandir" or "make obj", # and TOOL_SED will not yet have been built. _UFS_INCS!= cd ${_UFSDIR} && find ffs ufs -name '*.h' +_FS_INCS!= cd ${_FSDIR} && find cd9660 -name '*.h' +_FS_INCS+= unicode.h _ARCH_INCS!= ${TOOL_SED} -e 's/^\#.*//' ${.PARSEDIR}/headerlist .endif @@ -34,6 +37,8 @@ beforedepend: ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs + ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/fs + ${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/fs/cd9660 cd ${_ARCHDIR} && \ ${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \ ${TOOLDIR}/include/nbinclude @@ -43,5 +48,7 @@ beforedepend: ${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys cd ${_UFSDIR} && \ ${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs + cd ${_FSDIR} && \ + ${TOOL_PAX} -rw ${_FS_INCS} ${TOOLDIR}/include/nbinclude/fs cd ${TOOLDIR}/include/nbinclude && rm -f machine && \ ${HOST_INSTALL_SYMLINK} ${MACHINE} machine