dev-util/catalyst: reintroduce verify patch

This commit is contained in:
Rick Farina (Zero_Chaos) 2015-09-19 18:37:32 -04:00
parent f4fcc1dbf2
commit c16940ed73
4 changed files with 1743 additions and 0 deletions

1605
dev-util/catalyst/ChangeLog Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,68 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
if [[ ${PV} == *9999* ]]; then
SRC_ECLASS="git-2"
EGIT_REPO_URI="git://anongit.gentoo.org/proj/catalyst.git"
EGIT_BRANCH="master"
SRC_URI=""
KEYWORDS=""
S="${WORKDIR}/${PN}"
else
SRC_URI="mirror://gentoo/${P}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/${P}.tar.bz2
https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.bz2"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
fi
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 multilib ${SRC_ECLASS}
DESCRIPTION="Release metatool used for creating releases based on Gentoo Linux"
HOMEPAGE="https://www.gentoo.org/proj/en/releng/catalyst/"
LICENSE="GPL-2"
SLOT="0"
IUSE="ccache doc kernel_linux"
DEPEND="
app-text/asciidoc
>=dev-python/snakeoil-0.5.2
"
RDEPEND="
=dev-python/pydecomp-9999
app-arch/lbzip2
app-crypt/shash
virtual/cdrtools
amd64? ( >=sys-boot/syslinux-3.72 )
ia64? ( sys-fs/dosfstools )
x86? ( >=sys-boot/syslinux-3.72 )
ccache? ( dev-util/ccache )
kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )
"
src_prepare() {
epatch "${FILESDIR}"/isoroot_checksum.patch
}
python_prepare_all() {
python_export_best
echo VERSION="${PV}" "${PYTHON}" setup.py set_version
VERSION="${PV}" "${PYTHON}" setup.py set_version
}
python_compile_all() {
# build the man pages and docs
emake
}
python_install_all(){
distutils-r1_python_install_all
if use doc; then
dodoc files/HOWTO.html files/docbook-xsl.css
fi
}

View file

@ -0,0 +1,59 @@
diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index 08598e5..d807c17 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -78,6 +78,15 @@ 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 sha512sum
+#and then we call it from arches where it makes sense, starting with amd64/x86
+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
+}
+
# Here we actually create the ISO images for each architecture
case ${clst_hostarch} in
alpha)
@@ -262,16 +271,19 @@ case ${clst_hostarch} in
mv ${clst_target_path}/boot/* ${clst_target_path}/isolinux
rm -r ${clst_target_path}/boot
echo "Creating ISO using ISOLINUX bootloader"
+ isoroot_checksum
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
isohybrid ${1}
elif [ -e ${clst_target_path}/gentoo.efimg ]
then
+ isoroot_checksum
echo "Creating ISO using both ISOLINUX and EFI bootloader"
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -b gentoo.efimg -c boot.cat -no-emul-boot -z ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -b gentoo.efimg -c boot.cat -no-emul-boot -z ${clst_target_path} || die "Cannot make ISO image"
fi
else
+ isoroot_checksum
echo "Creating ISO using ISOLINUX bootloader"
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
@@ -279,15 +291,18 @@ case ${clst_hostarch} in
fi
elif [ -e ${clst_target_path}/boot/grub/stage2_eltorito ]
then
+ isoroot_checksum
echo "Creating ISO using GRUB bootloader"
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
elif [ -e ${clst_target_path}/gentoo.efimg ]
then
+ isoroot_checksum
echo 'Creating ISO using EFI bootloader'
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path} || die "Cannot make ISO image"
else
+ isoroot_checksum
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
fi

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>livecd</herd>
<maintainer>
<email>catalyst@gentoo.org</email>
</maintainer>
<use>
<flag name="ccache">Enables ccache support</flag>
</use>
</pkgmetadata>