From: kn Date: Wed, 31 Aug 2022 20:48:55 +0000 (+0000) Subject: Rename helper vars/files under obj/ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=82923d5901a2597f701f66cfe3e3412fe349d5b2;p=openbsd Rename helper vars/files under obj/ Up-front cleanup for a future diff to run directly on vnd(4) without softraid(4). No functional change. --- diff --git a/regress/usr.sbin/installboot/Makefile b/regress/usr.sbin/installboot/Makefile index 4848056ef32..6c80fa530a9 100644 --- a/regress/usr.sbin/installboot/Makefile +++ b/regress/usr.sbin/installboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2022/08/31 20:23:57 kn Exp $ +# $OpenBSD: Makefile,v 1.10 2022/08/31 20:48:55 kn Exp $ INSTALLBOOT ?= /usr/sbin/installboot DRY_RUN = ${INSTALLBOOT} -n @@ -6,9 +6,9 @@ REAL_RUN = ${INSTALLBOOT} # installboot(8) behaviour for multi-chunk softraid(4) differs across platforms NCHUNKS ?= 1 2 -CHUNKFILES = ${NCHUNKS:=chunk%.img} -DEVFILES = ${NCHUNKS:=vnd%.txt} -SRFILE = sr.txt +DISKFILES = ${NCHUNKS:=disk%.img} +DISKDEVFILES = ${NCHUNKS:=diskdev%.txt} +ROOTDEVFILE = rootdev.txt MOUNTPOINT = mnt STAGEDIR = /usr/mdec @@ -29,31 +29,31 @@ REGRESS_SETUP_ONCE = copy-bootstrap-to-softraid create-new-chunks: .for n in ${NCHUNKS} - dd if=/dev/zero of=chunk${n}.img bs=1m count=0 seek=64 status=none - ${SUDO} vnconfig -- chunk${n}.img 1>vnd${n}.txt + dd if=/dev/zero of=disk${n}.img bs=1m count=0 seek=64 status=none + ${SUDO} vnconfig -- disk${n}.img 1>diskdev${n}.txt .endfor # what the installer does, see /usr/src/distrib/$(machine)/ramdisk/install.md format-new-chunks: create-new-chunks -.for devfile in ${DEVFILES} +.for devfile in ${DISKDEVFILES} ${SUDO} ${FORMAT_DISK} -- "$$(<${devfile})" 1>/dev/null printf 'a\n\n\n\nRAID\nw\nq\n' | \ ${SUDO} disklabel -E -- "$$(<${devfile})" 1>/dev/null .endfor create-new-softraid: format-new-chunks - ${SUDO} bioctl -l"$$(sed -- s/$$/a/ ${DEVFILES} | paste -sd, -- -)" \ + ${SUDO} bioctl -l"$$(sed -- s/$$/a/ ${DISKDEVFILES} | paste -sd, -- -)" \ -cc -- softraid0 | \ - awk -- '{ print $$NF }' 1>${SRFILE} + awk -- '{ print $$NF }' 1>${ROOTDEVFILE} create-mountpoint: mkdir -- ${MOUNTPOINT} format-new-softraid: create-new-softraid create-mountpoint - ${SUDO} ${FORMAT_DISK} -- "$$(<${SRFILE})" 1>/dev/null - ${SUDO} disklabel -Aw -- "$$(<${SRFILE})" - ${SUDO} newfs -q -- "$$(<${SRFILE})"a 1>/dev/null - ${SUDO} mount -- /dev/"$$(<${SRFILE})"a ${MOUNTPOINT} + ${SUDO} ${FORMAT_DISK} -- "$$(<${ROOTDEVFILE})" 1>/dev/null + ${SUDO} disklabel -Aw -- "$$(<${ROOTDEVFILE})" + ${SUDO} newfs -q -- "$$(<${ROOTDEVFILE})"a 1>/dev/null + ${SUDO} mount -- /dev/"$$(<${ROOTDEVFILE})"a ${MOUNTPOINT} copy-bootstrap-to-softraid: format-new-softraid ${SUDO} mkdir -- ${MOUNTPOINT}/usr @@ -67,9 +67,9 @@ REGRESS_TARGETS = prepare # what the installer does, see /usr/src/distrib/$(machine)/ramdisk/install.md # do this as regress target and not in format-new-chunks prepare: - ${SUDO} ${REAL_RUN} -p -- "$$(<${SRFILE})" + ${SUDO} ${REAL_RUN} -p -- "$$(<${ROOTDEVFILE})" # XXX -p is not yet softraid(4) aware, need to prepare chunks manually -. for devfile in ${DEVFILES} +. for devfile in ${DISKDEVFILES} ${SUDO} ${REAL_RUN} -p -- "$$(<${devfile})" . endfor .else @@ -82,21 +82,21 @@ REGRESS_TARGETS += dry-prepare \ root-explicit-stages dry-prepare: - ${SUDO} ${DRY_RUN} -p -- "$$(<${SRFILE})" + ${SUDO} ${DRY_RUN} -p -- "$$(<${ROOTDEVFILE})" dry-default: - ${SUDO} ${DRY_RUN} -- "$$(<${SRFILE})" + ${SUDO} ${DRY_RUN} -- "$$(<${ROOTDEVFILE})" dry-root: - ${SUDO} ${DRY_RUN} -r/ -- "$$(<${SRFILE})" + ${SUDO} ${DRY_RUN} -r/ -- "$$(<${ROOTDEVFILE})" # what the installer does, see /usr/src/distrib/$(machine)/ramdisk/install.md -# XXX fails with N > 1 on sparc64, 1 <= N <= 4 works on amd64 +# XXX fails with NCHUNKS > 1 on sparc64, 1 <= NCHUNKS <= 4 works on amd64 root-installer: - ${SUDO} ${REAL_RUN} -r ${MOUNTPOINT} "$$(<${SRFILE})" + ${SUDO} ${REAL_RUN} -r ${MOUNTPOINT} "$$(<${ROOTDEVFILE})" root-explicit-stages: - ${SUDO} ${REAL_RUN} -- "$$(<${SRFILE})" ${STAGEFILES} + ${SUDO} ${REAL_RUN} -- "$$(<${ROOTDEVFILE})" ${STAGEFILES} REGRESS_EXPECTED_FAILURES = dry-prepare-root \ @@ -106,10 +106,10 @@ REGRESS_EXPECTED_FAILURES = dry-prepare-root \ REGRESS_TARGETS += ${REGRESS_EXPECTED_FAILURES} dry-prepare-root: - ${DRY_RUN} -p -r/ -- "$$(<${SRFILE})" + ${DRY_RUN} -p -r/ -- "$$(<${ROOTDEVFILE})" dry-prepare-stage: - ${DRY_RUN} -p -- "$$(<${SRFILE})" ${STAGEFILES} + ${DRY_RUN} -p -- "$$(<${ROOTDEVFILE})" ${STAGEFILES} dry-nodisk-stage: ${SUDO} ${DRY_RUN} -- ${STAGEFILES} @@ -118,15 +118,15 @@ dry-toomany: ${DRY_RUN} -- disk stage1 stage2 too many -CLEANFILES = ${CHUNKFILES} ${DEVFILES} ${SRFILE} +CLEANFILES = ${DISKFILES} ${DISKDEVFILES} ${ROOTDEVFILE} REGRESS_CLEANUP = cleanup # allow failure to always cleanup as much as possible cleanup: -${SUDO} umount -- ${MOUNTPOINT} - - rmdir -- ${MOUNTPOINT} - -${SUDO} bioctl -d -- "$$(<${SRFILE})" -.for devfile in ${DEVFILES} + -rmdir -- ${MOUNTPOINT} + -${SUDO} bioctl -d -- "$$(<${ROOTDEVFILE})" +.for devfile in ${DISKDEVFILES} -${SUDO} vnconfig -u -- "$$(<${devfile})" .endfor