From owner-svn-src-all@freebsd.org Thu May 23 02:12:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D87BA1594C02; Thu, 23 May 2019 02:12:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB887604B; Thu, 23 May 2019 02:12:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 596102646B; Thu, 23 May 2019 02:12:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4N2C1G3052192; Thu, 23 May 2019 02:12:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4N2C1W6052191; Thu, 23 May 2019 02:12:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201905230212.x4N2C1W6052191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 23 May 2019 02:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348145 - stable/12/tools/boot X-SVN-Group: stable-12 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/12/tools/boot X-SVN-Commit-Revision: 348145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FB887604B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 02:12:02 -0000 Author: ian Date: Thu May 23 02:12:00 2019 New Revision: 348145 URL: https://svnweb.freebsd.org/changeset/base/348145 Log: MFC r346652-r346654 r346652: Complain and exit the script if the 'make install' phase fails. Also, there is no need to install any debug files. r346653: The zfs module has grown a dependency on zcl_nfs4.ko, so copy it into all the test images. r346654: For the geli-gpt-zfs test images, both bios and uefi flavors, add a dummy ufs partition as p2, and put the zfs partition at p3, to test the ability of the zfs probe code to find a zfs pool on something other than the first partition. Modified: stable/12/tools/boot/rootgen.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/boot/rootgen.sh ============================================================================== --- stable/12/tools/boot/rootgen.sh Thu May 23 02:10:41 2019 (r348144) +++ stable/12/tools/boot/rootgen.sh Thu May 23 02:12:00 2019 (r348145) @@ -130,6 +130,7 @@ mk_nogeli_gpt_zfs_legacy() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -168,6 +169,7 @@ mk_nogeli_gpt_zfs_uefi() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -207,6 +209,7 @@ mk_nogeli_gpt_zfs_both() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -288,6 +291,7 @@ mk_nogeli_mbr_zfs_legacy() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -329,6 +333,7 @@ mk_nogeli_mbr_zfs_uefi() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -370,6 +375,7 @@ mk_nogeli_mbr_zfs_both() { zfs_load=YES opensolaris_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko # end tweaks @@ -501,15 +507,20 @@ mk_geli_gpt_zfs_legacy() { bios=$7 pool=geli-gpt-zfs-legacy - dd if=/dev/zero of=${img} count=1 seek=$(( 200 * 1024 * 1024 / 512 )) + # Note that in this flavor we create an empty p2 ufs partition, and put + # the bootable zfs stuff on p3, just to test the ability of the zfs probe + # probe routines to find a pool on a partition other than the first one. + + dd if=/dev/zero of=${img} count=1 seek=$(( 300 * 1024 * 1024 / 512 )) md=$(mdconfig -f ${img}) gpart create -s gpt ${md} gpart add -t freebsd-boot -s 400k -a 4k ${md} # <= ~540k + gpart add -t freebsd-ufs -s 100m ${md} gpart add -t freebsd-zfs -l root $md # install-boot will make this bootable - echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p2 - echo ${passphrase} | geli attach -j - ${md}p2 - zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2.eli + echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p3 + echo ${passphrase} | geli attach -j - ${md}p3 + zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p3.eli zpool set bootfs=${pool} ${pool} zfs create -po mountpoint=/ ${pool}/ROOT/default # NB: The online guides go nuts customizing /var and other mountpoints here, no need @@ -520,6 +531,7 @@ zfs_load=YES opensolaris_load=YES geom_eli_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko @@ -529,7 +541,7 @@ EOF zpool set bootfs=${pool}/ROOT/default ${pool} zpool set autoexpand=on ${pool} zpool export ${pool} - geli detach ${md}p2 + geli detach ${md}p3 ${SRCTOP}/tools/boot/install-boot.sh -g ${geli} -s ${scheme} -f ${fs} -b ${bios} -d ${src} ${md} mdconfig -d -u ${md} } @@ -544,15 +556,20 @@ mk_geli_gpt_zfs_uefi() { bios=$7 pool=geli-gpt-zfs-uefi - dd if=/dev/zero of=${img} count=1 seek=$(( 200 * 1024 * 1024 / 512 )) + # Note that in this flavor we create an empty p2 ufs partition, and put + # the bootable zfs stuff on p3, just to test the ability of the zfs probe + # probe routines to find a pool on a partition other than the first one. + + dd if=/dev/zero of=${img} count=1 seek=$(( 300 * 1024 * 1024 / 512 )) md=$(mdconfig -f ${img}) gpart create -s gpt ${md} gpart add -t efi -s 800k -a 4k ${md} + gpart add -t freebsd-ufs -s 100m ${md} gpart add -t freebsd-zfs -l root $md # install-boot will make this bootable - echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p2 - echo ${passphrase} | geli attach -j - ${md}p2 - zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2.eli + echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p3 + echo ${passphrase} | geli attach -j - ${md}p3 + zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p3.eli zpool set bootfs=${pool} ${pool} zfs create -po mountpoint=/ ${pool}/ROOT/default # NB: The online guides go nuts customizing /var and other mountpoints here, no need @@ -563,6 +580,7 @@ zfs_load=YES opensolaris_load=YES geom_eli_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko @@ -572,7 +590,7 @@ EOF zpool set bootfs=${pool}/ROOT/default ${pool} zpool set autoexpand=on ${pool} zpool export ${pool} - geli detach ${md}p2 + geli detach ${md}p3 ${SRCTOP}/tools/boot/install-boot.sh -g ${geli} -s ${scheme} -f ${fs} -b ${bios} -d ${src} ${md} mdconfig -d -u ${md} } @@ -607,6 +625,7 @@ zfs_load=YES opensolaris_load=YES geom_eli_load=YES EOF + cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko @@ -803,7 +822,11 @@ EOF # XXX cp /boot/device.hints ${DESTDIR}/boot/device.hints # Assume we're already built -make install DESTDIR=${DESTDIR} MK_MAN=no MK_INSTALL_AS_USER=yes +make install DESTDIR=${DESTDIR} MK_MAN=no MK_INSTALL_AS_USER=yes WITHOUT_DEBUG_FILES=yes +if [ $? -ne 0 ]; then + echo "make install failed" + exit 1 +fi # Copy init, /bin/sh, minimal libraries and testing /etc/rc mkdir -p ${DESTDIR}/sbin ${DESTDIR}/bin \ ${DESTDIR}/lib ${DESTDIR}/libexec \