catalyst: unfork

This commit is contained in:
Rick Farina (Zero_Chaos) 2020-03-19 21:09:16 -04:00
parent ee440dd7ac
commit 9e5b3ed0ec
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 0 additions and 145 deletions

View file

@ -1,69 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
if [[ ${PV} == *9999* ]]; then
SRC_ECLASS="git-r3"
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/catalyst.git"
EGIT_BRANCH="master"
else
SRC_URI="https://gitweb.gentoo.org/proj/catalyst.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
fi
PYTHON_COMPAT=( python3_{6,7,8} )
inherit distutils-r1 ${SRC_ECLASS}
DESCRIPTION="Release metatool used for creating releases based on Gentoo Linux"
HOMEPAGE="https://wiki.gentoo.org/wiki/Catalyst"
LICENSE="GPL-2"
SLOT="0"
IUSE="ccache doc +iso kernel_linux system-bootloader"
DEPEND="
app-text/asciidoc
>=dev-python/snakeoil-0.6.5[${PYTHON_USEDEP}]
"
RDEPEND="
>=dev-python/snakeoil-0.6.5[${PYTHON_USEDEP}]
>=dev-python/pydecomp-0.3[${PYTHON_USEDEP}]
app-arch/lbzip2
app-crypt/shash
sys-fs/dosfstools
!kernel_FreeBSD? ( || ( app-arch/tar[xattr] app-arch/libarchive[xattr] ) )
kernel_FreeBSD? ( app-arch/libarchive[xattr] )
amd64? ( >=sys-boot/syslinux-3.72 )
x86? ( >=sys-boot/syslinux-3.72 )
ccache? ( dev-util/ccache )
iso? ( virtual/cdrtools )
kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )
"
PDEPEND="system-bootloader? ( >=sys-apps/memtest86+-5.01-r4
sys-boot/grub:2
amd64? ( sys-boot/grub[grub_platforms_efi-32,grub_platforms_efi-64] )
x86? ( sys-boot/grub[grub_platforms_efi-32] )
sys-boot/syslinux
sys-boot/shim )"
python_prepare_all() {
eapply "${FILESDIR}"/blake2.patch
python_setup
echo VERSION="${PV}" "${PYTHON}" setup.py set_version
VERSION="${PV}" "${PYTHON}" setup.py set_version || die
distutils-r1_python_prepare_all
}
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

@ -1,76 +0,0 @@
diff --git a/catalyst/hash_utils.py b/catalyst/hash_utils.py
index 1134f50..8f1ab8f 100644
--- a/catalyst/hash_utils.py
+++ b/catalyst/hash_utils.py
@@ -11,6 +11,7 @@ from catalyst.support import CatalystError
# fields = ["func", "cmd", "args", "id"]
HASH_DEFINITIONS = {
"adler32" :["calc_hash2", "shash", ["-a", "ADLER32"], "ADLER32"],
+ "blake2" :["calc_hash", "b2sum", [ ], "BLAKE2"],
"crc32" :["calc_hash2", "shash", ["-a", "CRC32"], "CRC32"],
"crc32b" :["calc_hash2", "shash", ["-a", "CRC32B"], "CRC32B"],
"gost" :["calc_hash2", "shash", ["-a", "GOST"], "GOST"],
@@ -94,12 +95,14 @@ class HashMap(object):
args = [_hash.cmd]
args.extend(_hash.args)
args.append(file_)
+ log.debug('args = %r', args)
source = Popen(args, stdout=PIPE)
- mylines = source.communicate()[0]
- mylines=mylines[0].split()
- result=mylines[0]
- log.info('%s (%s) = %s', _hash.id, file_, result)
- return result
+ output = source.communicate()
+ mylines = output[0].decode('ascii').split('\n')
+ log.debug('output = %s', result)
+ log.info('%s (%s) = %s', _hash.id, file_, mylines)
+ result = "# " + _hash.id + "HASH\n" + mylines
+ return result
def calc_hash2(self, file_, hash_type):
diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 5a5eedb..ee014c1 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -8,7 +8,7 @@
# special "auto" keyword will skip digests that the system does not support,
# and if it's the only keyword given, will default to enabling all digests.
# Supported hashes:
-# adler32, crc32, crc32b, gost, haval128, haval160, haval192, haval224,
+# adler32, blake2, crc32, crc32b, gost, haval128, haval160, haval192, haval224,
# haval256, md2, md4, md5, ripemd128, ripemd160, ripemd256, ripemd320, sha1,
# sha224, sha256, sha384, sha512, snefru128, snefru256, tiger, tiger128,
# tiger160, whirlpool
@@ -40,7 +40,7 @@ envscript="/etc/catalyst/catalystrc"
# seedcache, etc. The default and fastest is crc32. You should not ever need
# to change this unless your OS does not support it.
# Supported hashes:
-# adler32, crc32, crc32b, gost, haval128, haval160, haval192, haval224,
+# adler32, blake2, crc32, crc32b, gost, haval128, haval160, haval192, haval224,
# haval256, md2, md4, md5, ripemd128, ripemd160, ripemd256, ripemd320, sha1,
# sha224, sha256, sha384, sha512, snefru128, snefru256, tiger, tiger128,
# tiger160, whirlpool
diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index 8338e30..92efaa8 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -94,12 +94,14 @@ 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
+#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
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
+ 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
+ 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
}
run_mkisofs() {