[gentoo-commits] proj/catalyst:master commit in: targets/support/, examples/, doc/, targets/embedded/
commit: 23e9ea1052e819d0737e020ba1bd48023c4697b0 Author: Matt Turner gentoo org> AuthorDate: Fri May 1 06:14:44 2020 + Commit: Matt Turner gentoo org> CommitDate: Mon May 4 02:41:07 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=23e9ea10 targets: Use gensquashfs instead of mksquashfs We're using tar2sqfs from squashfs-tools-ng, so let's replace the usage of mksquashfs (from squashfs-tools) with gensquashfs. Signed-off-by: Matt Turner gentoo.org> doc/catalyst-spec.5.txt | 4 ++-- examples/livecd-stage2_template.spec| 2 -- targets/embedded/fs-runscript.sh| 6 +++--- targets/support/filesystem-functions.sh | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt index f87bd69e..e269e16d 100644 --- a/doc/catalyst-spec.5.txt +++ b/doc/catalyst-spec.5.txt @@ -180,8 +180,8 @@ CD. Possible values are as follows: *livecd/fsops*:: The fsops are a list of optional parameters that can be passed to the tool which will create the filesystem specified in *livecd/fstype* -(example: `-root-owned`). It is valid for the following fstypes: -`squashfs`, `jffs`, `jffs2`, and `cramfs`. +It is valid for the following fstypes: `squashfs`, `jffs`, `jffs2`, +and `cramfs`. *livecd/iso*:: This is the full path and filename to the ISO image that the diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec index 4cb94d40..3b9ca1da 100644 --- a/examples/livecd-stage2_template.spec +++ b/examples/livecd-stage2_template.spec @@ -95,8 +95,6 @@ livecd/fstype: # The fsops are a list of optional parameters that can be passed to the tool # which will create the filesystem specified in livecd/fstype. It is valid for # the following fstypes: squashfs, jffs, jffs2, cramfs -# example: -# livecd/fsops: -root-owned livecd/fsops: # The cdtar is essentially the bootloader for the CD. It also holds the main diff --git a/targets/embedded/fs-runscript.sh b/targets/embedded/fs-runscript.sh index 8d5abab1..4746a909 100755 --- a/targets/embedded/fs-runscript.sh +++ b/targets/embedded/fs-runscript.sh @@ -32,9 +32,9 @@ case ${1} in ;; squashfs) - fs_check /usr/bin/mksquashfs squashfs sys-fs/squashfs-tools - mksquashfs ${root_fs_path} ${clst_image_path}/root.img \ - ${clst_embedded_fs_ops} || \ + fs_check /usr/bin/gensquashfs squashfs sys-fs/squashfs-tools-ng + gensquashfs -D ${root_fs_path} -q ${clst_embedded_fs_ops} \ + ${clst_image_path}/root.img || die "Could not create a squashfs filesystem" ;; diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh index 0c144ba8..a4d31b4e 100755 --- a/targets/support/filesystem-functions.sh +++ b/targets/support/filesystem-functions.sh @@ -55,8 +55,8 @@ create_noloop() { create_squashfs() { echo "Creating squashfs..." export loopname="image.squashfs" - mksquashfs "${clst_destpath}" "$1/${loopname}" ${clst_fsops} -noappend \ - || die "mksquashfs failed, did you emerge squashfs-tools?" + gensquashfs -D "${clst_destpath}" -q ${clst_fsops} "$1/${loopname}" \ + || die "gensquashfs failed, did you emerge squashfs-tools-ng?" } create_jffs() {
[gentoo-commits] proj/catalyst:master commit in: targets/support/, examples/
commit: 9560022e2734a314cf81a62769f23220f5214859 Author: Matt Turner gentoo org> AuthorDate: Wed Apr 8 01:27:35 2020 + Commit: Matt Turner gentoo org> CommitDate: Thu Apr 9 19:05:42 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9560022e targets: Drop SHA512 isoroot verification support BLAKE2 is good and fast. Pentoo is using BLAKE2. There's no need for a second digest. Signed-off-by: Matt Turner gentoo.org> examples/livecd-stage2_template.spec | 8 targets/support/create-iso.sh| 27 +++ 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec index 7398c972..4cb94d40 100644 --- a/examples/livecd-stage2_template.spec +++ b/examples/livecd-stage2_template.spec @@ -316,11 +316,11 @@ boot/kernel/gentoo/packages: # boot/kernel/gentoo/console: tty0 ttyS0 boot/kernel/gentoo/console: -# This feature will make sha512, blake2, or both checksums for every file in the iso (including files provided by livecd/overlay -# These checksums can be verified at boot using the genkernel option "verify" added to the kernel line. -# Currently this feature will generate both checksums if livecd/verify is defined to *any* value other than "blake2" or "sha512" +# Enables the generation of a isoroot_b2sums file containing a BLAKE2 digest of +# each file in the ISO. When 'livecd/bootargs' contains 'verify' this feature +# will be used to verify the contents of the ISO at boot time. # No checksums are generated if this is left commented. -#livecd/verify: sha512 +#livecd/verify: blake2 # This feature controls the depclean run after fsscript and before unmerge. # The default is unset, and will run emerge --depclean --with-bdeps=n which results diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index 9b10b7cf..b0e4d15e 100755 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -94,30 +94,17 @@ else mkisofs_zisofs_opts="" fi -#we want to create a checksum for every file on the iso so we can verify it -#from genkernel during boot. Here we make a function to create the sha512sums, and blake2sums +# Generate list of checksums that genkernel can use to verify the contents of +# the ISO isoroot_checksum() { - echo "Creating checksums for all files included in the iso, please wait..." - if [ -z "${1}" ] || [ "${1}" = "sha512" ]; then - find "${clst_target_path}" -type f ! -name 'isoroot_checksums' ! -name 'isolinux.bin' ! -name 'isoroot_b2sums' -exec sha512sum {} + > "${clst_target_path}"/isoroot_checksums - ${clst_sed} -i "s#${clst_target_path}/\?##" "${clst_target_path}"/isoroot_checksums - fi - if [ -z "${1}" ] || [ "${1}" = "blake2" ]; then - find "${clst_target_path}" -type f ! -name 'isoroot_checksums' ! -name 'isolinux.bin' ! -name 'isoroot_b2sums' -exec b2sum {} + > "${clst_target_path}"/isoroot_b2sums - ${clst_sed} -i "s#${clst_target_path}/\?##" "${clst_target_path}"/isoroot_b2sums - fi + echo ">> Creating checksums for all files included in the ISO" + find "${clst_target_path}" -type f ! -name 'isoroot_b2sums' -exec b2sum {} + > "${clst_target_path}"/isoroot_b2sums + ${clst_sed} -i "s#${clst_target_path}/\?##" "${clst_target_path}"/isoroot_b2sums } run_mkisofs() { - if [ -n "${clst_livecd_verify}" ]; then - if [ "${clst_livecd_verify}" = "sha512" ]; then - isoroot_checksum sha512 - elif [ "${clst_livecd_verify}" = "blake2" ]; then - isoroot_checksum blake2 - else - isoroot_checksum - fi - fi + [ -n "${clst_livecd_verify}" ] && isoroot_checksum + echo "Running \"mkisofs ${@}\"" mkisofs "${@}" || die "Cannot make ISO image" }
[gentoo-commits] proj/catalyst:master commit in: targets/support/, examples/, catalyst/targets/
commit: 2b0e9243fb2456e86053b9448938359920916ecc Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Wed Sep 23 17:25:23 2015 + Commit: Richard Farina gentoo org> CommitDate: Wed Sep 23 17:25:23 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2b0e9243 add isoroot checksum support to generate checksums for genkernel to verify catalyst/targets/livecd_stage2.py| 2 +- examples/livecd-stage2_template.spec | 5 targets/support/create-iso.sh| 44 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py index 70f0fac..77c6613 100644 --- a/catalyst/targets/livecd_stage2.py +++ b/catalyst/targets/livecd_stage2.py @@ -28,7 +28,7 @@ class livecd_stage2(StageBase): "livecd/rcdel","livecd/fsscript","livecd/xinitrc",\ "livecd/root_overlay","livecd/users","portage_overlay",\ "livecd/fstype","livecd/fsops","livecd/linuxrc","livecd/bootargs",\ - "gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid"]) + "gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid","livecd/verify"]) StageBase.__init__(self,spec,addlargs) if "livecd/type" not in self.settings: diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec index c2c6bf3..49ddcd7 100644 --- a/examples/livecd-stage2_template.spec +++ b/examples/livecd-stage2_template.spec @@ -331,6 +331,11 @@ boot/kernel/gentoo/machine_type: # boot/kernel/gentoo/console: tty0 ttyS0 boot/kernel/gentoo/console: +# This feature will make sha512 checksums for every file in the iso (including files provided by livecd/overlay +# These checksums can be verified at boot using the genkernel option "verify" added to the kernel line. +# Currently this feature will be enabled if livecd/verify is defined to *any* value, leave commented to disable. +#livecd/verify: true + # This is a list of packages that will be unmerged after all the kernels have # been built. There are no checks on these packages, so be careful what you # add here. They can potentially break your CD. diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index 5e8cdc3..a8a194f 100755 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -82,6 +82,20 @@ else mkisofs_zisofs_opts="" fi +#we want to create a sha512sum for every file on the iso so we can verify it +#from genkernel during boot. Here we make a function to create the sha512sums +isoroot_checksum() { + echo "Creating checksums for all files included in the iso, please wait..." + find "${clst_target_path}" -type f ! -name 'isoroot_checksums' ! -name 'isolinux.bin' -exec sha512sum {} + > "${clst_target_path}"/isoroot_checksums + sed -i "s#${clst_target_path}##" "${clst_target_path}"/isoroot_checksums +} + +run_mkisofs() { + [ -n "${clst_livecd_verify}" ] && isoroot_checksum + echo "Running \"mkisofs ${@}\"" + mkisofs "${@}" || die "Cannot make ISO image" +} + # Here we actually create the ISO images for each architecture case ${clst_hostarch} in alpha) @@ -92,8 +106,7 @@ case ${clst_hostarch} in ;; hppa) echo ">> Running mkisofs to create iso image" - echo ">> mkisofs -R -l -J ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}/" - mkisofs -R -l -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}/ || die "Cannot make ISO image" + run_mkisofs -R -l -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}/ pushd ${clst_target_path}/ palo -f boot/palo.conf -C ${1} popd @@ -127,8 +140,7 @@ case ${clst_hostarch} in rm -rf ${clst_target_path}/boot echo ">> Running mkisofs to create iso image" - echo ">> mkisofs -R -l -b gentoo.efimg -c boot.cat -no-emul-boot -J ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}/" - mkisofs -R -l -b gentoo.efimg -c boot.cat -no-emul-boot -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}/ || die "Cannot make ISO image" + run_mkisofs -R -l -b gentoo.efimg -c boot.cat -no-emul-boot -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}/ ;; mips) case ${clst_fstype} in @@ -200,8 +212,7 @@ case ${clst_hostarch} in fi echo ">> Running mkisofs to create iso image" - echo ">> mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map ${clst_target_path}/boot/map.hfs -part -no-desktop -hfs-volid