public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: doc/, catalyst/base/, catalyst/, etc/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; only message in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     45edc6510ce9cbf9cbe9ab5d2b7b8cd9f65f84cb
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 06:38:14 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 17:03:47 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=45edc651

catalyst: Remove the 'hash_function' config option

Switch to SHA1, which is plenty fast. The next commit switches from the
external shash/b2sum tools to Python's hashlib, and the removal of this
config option will simplify that since the crc32 hash is in a different
python module (zlib).

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py |  4 ++--
 catalyst/defaults.py       |  2 --
 catalyst/main.py           | 16 ----------------
 doc/catalyst-config.5.txt  |  6 ------
 etc/catalyst.conf          | 10 ----------
 5 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f673382f..5f3fa1d0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -444,7 +444,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     self.settings["source_path_hash"] = \
                         self.settings["hash_map"].generate_hash(
                             self.settings["source_path"],
-                            hash_=self.settings["hash_function"])
+                            hash_="sha1")
         log.notice('Source path set to %s', self.settings['source_path'])
 
     def set_dest_path(self):
@@ -471,7 +471,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         self.settings["snapshot_path_hash"] = \
             self.settings["hash_map"].generate_hash(
                 self.settings["snapshot_path"],
-                hash_=self.settings["hash_function"])
+                hash_="sha1")
 
     def set_snapcache_path(self):
         self.settings["snapshot_cache_path"] = \

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index e60980d3..f292c211 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -40,7 +40,6 @@ valid_config_file_values.extend([
     "digests",
     "distcc",
     "envscript",
-    "hash_function",
     "options",
     "snapshot_cache",
     "VERBOSE",
@@ -63,7 +62,6 @@ confdefaults = {
     "decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS['linux'],
     "decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER,
     "distdir": DISTDIR[:],
-    "hash_function": "crc32",
     "icecream": "/var/cache/icecream",
     'list_xattrs_opt': LIST_XATTRS_OPTIONS['linux'],
     "local_overlay": REPODIR[:] + "/local",

diff --git a/catalyst/main.py b/catalyst/main.py
index ba6e3fcc..cb3cd3f7 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -384,22 +384,6 @@ def _main(parser, opts):
         # Now reload the config with our updated value.
         conf_values['digests'] = ' '.join(digests)
 
-    if "hash_function" in conf_values:
-        if conf_values["hash_function"] not in HASH_DEFINITIONS:
-            log.critical(
-                '%s is not a valid hash_function entry\n'
-                'Valid hash_function entries:\n'
-                '%s', conf_values["hash_function"], HASH_DEFINITIONS.keys())
-        try:
-            process.find_binary(
-                hash_map.hash_map[conf_values["hash_function"]].cmd)
-        except process.CommandNotFound:
-            log.critical(
-                'The "%s" binary needed by hash_function "%s" was not found. '
-                'It needs to be in your system path.',
-                hash_map.hash_map[conf_values['hash_function']].cmd,
-                conf_values['hash_function'])
-
     addlargs = {}
 
     if myspecfile:

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 220bb528..d5e8c128 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -66,12 +66,6 @@ variables using POSIX shell notation:
 export FOO="bar"
 ---------------------------------
 
-*hash_function*::
-Internal hash function catalyst should use for things like autoresume,
-seedcache, etc.  The default and fastest is `crc32`.  You should not
-ever need to change this unless your OS does not support it.  See the
-*SUPPORTED HASHES* section for a list of supported hashes.
-
 **options*::
 Set different build-time options (example: `autoresume bindist
 kerncache pkgcache seedcache snapcache`).  Supported values:

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index a3c22049..4c4d491e 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -24,16 +24,6 @@ distdir="/var/cache/distfiles"
 # export FOO="bar"
 envscript="/etc/catalyst/catalystrc"
 
-# Internal hash function catalyst should use for things like autoresume,
-# 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, 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
-hash_function="crc32"
-
 # options set different build-time options for catalyst. Some examples are:
 # autoresume = Attempt to resume a failed build, clear the autoresume flags with
 #	the -a option to the catalyst cmdline.  -p will clear the autoresume flags


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-17 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 19:52 [gentoo-commits] proj/catalyst:master commit in: doc/, catalyst/base/, catalyst/, etc/ Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox