From f4a4e4834d19222b5e56fc13b78d74da31b200e5 Mon Sep 17 00:00:00 2001 From: Jaro Habiger Date: Thu, 11 Apr 2024 15:04:33 +0200 Subject: [PATCH] replace hashdeep with rhash hashdeep was removed from the arch package repositories --- makefiles/in_chroot/install.sh | 6 +++--- makefiles/in_chroot/requirements_pacman.txt | 2 +- software/scripts/axiom_file_check.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/makefiles/in_chroot/install.sh b/makefiles/in_chroot/install.sh index 7e9d649f..e7df896e 100755 --- a/makefiles/in_chroot/install.sh +++ b/makefiles/in_chroot/install.sh @@ -17,11 +17,11 @@ sed -i 's/#IgnorePkg =/IgnorePkg = linux linux-*/' /etc/pacman.conf echo 'Server = http://de3.mirror.archlinuxarm.org/$arch/$repo' > /etc/pacman.d/mirrorlist pacman-key --init pacman-key --populate archlinuxarm -pacman --noprogressbar --noconfirm --needed -Syu +pacman --noprogressbar --noconfirm --needed --overwrite '*' -Syu pacman --noprogressbar --noconfirm -R linux-zedboard || true # install dependencies -pacman --noprogressbar --noconfirm --needed -S $(grep -vE "^\s*#" makefiles/in_chroot/requirements_pacman.txt | tr "\n" " ") +pacman --noprogressbar --noconfirm --needed --overwrite '*' -S $(grep -vE "^\s*#" makefiles/in_chroot/requirements_pacman.txt | tr "\n" " ") pip install --break-system-packages wheel pip install --break-system-packages --progress-bar off -r makefiles/in_chroot/requirements_pip.txt @@ -197,6 +197,6 @@ rm -f $HASH_LOCATION/hashes.txt; rm -f $HASH_LOCATION/files.txt find $VERIFY_DIRECTORIES -type f > $HASH_LOCATION/files.txt # also hash file list echo "$HASH_LOCATION/files.txt" >> $HASH_LOCATION/files.txt -hashdeep -c sha256 -f $HASH_LOCATION/files.txt > $HASH_LOCATION/hashes.txt +sudo rhash --sha256 --file-list $HASH_LOCATION/files.txt -o $HASH_LOCATION/hashes.txt echo "axiom-update finished. Software version is now $(git describe --always --abbrev=8 --dirty)." diff --git a/makefiles/in_chroot/requirements_pacman.txt b/makefiles/in_chroot/requirements_pacman.txt index e670131d..c36d9083 100644 --- a/makefiles/in_chroot/requirements_pacman.txt +++ b/makefiles/in_chroot/requirements_pacman.txt @@ -9,7 +9,7 @@ base-devel git figlet wget -hashdeep +rhash pacman-contrib rsync diff --git a/software/scripts/axiom_file_check.sh b/software/scripts/axiom_file_check.sh index f4552513..d36d1105 100755 --- a/software/scripts/axiom_file_check.sh +++ b/software/scripts/axiom_file_check.sh @@ -2,7 +2,7 @@ HASH_LOCATION="/opt/integrity_check" echo "Checking Axiom system files... (this might take a while)" -output=$(hashdeep -c sha256 -x -f $HASH_LOCATION/files.txt -k $HASH_LOCATION/hashes.txt) +output=$(sudo rhash -c --skip-ok --brief $HASH_LOCATION/hashes.txt) if [ -z "$output" ]; then echo "No problems detected, all files are in factory state."