[Commits] [SCM] claws-win32-installer branch, master, updated. 4.1.1-1-2-g6afb805

jonathan at claws-mail.org jonathan at claws-mail.org
Wed Nov 30 06:17:02 CET 2022


The branch, master has been updated
       via  6afb80520eb6fe85482f13a26e4ee0f42039af62 (commit)
       via  fe948a792af412f66803621017b39e29a145b8e8 (commit)
      from  6783299bda32c658572702cf0f45f263dd1f3ace (commit)

Summary of changes:
 Makefile.am          |  2 ++
 packages/download.sh | 39 ++++++++++++++++++++++++++++++---------
 2 files changed, 32 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit 6afb80520eb6fe85482f13a26e4ee0f42039af62
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Tue Nov 29 23:03:03 2022 -0700

    Include build-aux scripts in make dist

diff --git a/Makefile.am b/Makefile.am
index 255ab7d..02e4cb7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,8 @@ DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
 SUBDIRS = po src
 
 EXTRA_DIST = autogen.sh doc patches \
+	build-aux/clean.sh \
+	build-aux/pkg.sh \
 	packages/download.sh \
 	packages/mk-ca-bundle.pl \
 	packages/packages.current

commit fe948a792af412f66803621017b39e29a145b8e8
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Mon Nov 28 01:16:46 2022 -0700

    Improve download error handling

diff --git a/packages/download.sh b/packages/download.sh
index 74ed224..88cf24b 100755
--- a/packages/download.sh
+++ b/packages/download.sh
@@ -2,6 +2,7 @@
 
 failed_downloads=""
 failed_hash=""
+skipped_hash=""
 
 failed_download () {
 	failed_downloads="$failed_downloads $name"
@@ -82,14 +83,17 @@ gen_cert_bundle () {
 		return 1
 	fi
 
-	./mk-ca-bundle.pl -f -n ca-certificates.crt
-	if [[ $? -ne 0 ]]; then
-		printf "\nError: Failed to generate CA certificate bundle\n"
+	printf "%s" "$skipped_hash" | grep -qw "certdata"
+	if [[ $? -eq 0 ]]; then
+		printf "\nError: SHA256 verification skipped for CA certificate data\n"
 		return 1
 	fi
+
+	./mk-ca-bundle.pl -f -n ca-certificates.crt
 }
 
 pushd "${pkg_root}" > /dev/null || exit 1
+ret=0
 current=1
 total=$(sed -e '/^#/d' -e '/^$/d' packages.current | wc -l)
 
@@ -105,10 +109,15 @@ do
 		exit 1
 	fi
 
-	printf "%s *%s" "$hash" "$file" | sha256sum -c
-	if [[ $? != 0 ]]; then
-		printf "Error while checking sha256sum for %s package\n" "$name"
-		failed_hash="$failed_hash $name"
+	if [[ -z "$hash" ]]; then
+		printf "No hash specified - Skipping sha256sum for %s package\n" "$name"
+		skipped_hash="$skipped_hash $name"
+	else
+		printf "%s *%s" "$hash" "$file" | sha256sum -c
+		if [[ $? != 0 ]]; then
+			printf "Error while checking sha256sum for %s package\n" "$name"
+			failed_hash="$failed_hash $name"
+		fi
 	fi
 
 	(( current++ ))
@@ -117,14 +126,26 @@ done < <(sed -e '/^#/d' -e '/^$/d' packages.current)
 
 # Generate the ca-certificates.crt bundle
 gen_cert_bundle
+if [[ $? -ne 0 ]]; then
+	printf "\n\033[31mError:\033[0m Failed to generate CA certificate bundle\n"
+	ret=1
+fi
 
 if [[ -n "$failed_downloads" ]]; then
-	printf "\nError: Failed to download these packages: %s\n" "$failed_downloads"
+	printf "\n\033[31mError:\033[0m Failed to download these packages: %s\n" "$failed_downloads"
+	ret=1
 fi
 
 if [[ -n "$failed_hash" ]]; then
-	printf "\nError: SHA256 verification failed for these packages: %s\n" "$failed_hash"
+	printf "\n\033[31mError:\033[0m SHA256 verification failed for these packages: %s\n" "$failed_hash"
+	ret=1
+fi
+
+if [[ -n "$skipped_hash" ]]; then
+	printf "\n\033[33mWarning:\033[0m SHA256 verification skipped for these packages: %s\n" "$skipped_hash"
+	ret=1
 fi
 
 popd > /dev/null
+exit $ret
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Installer sources for Claws Mail Windows port


More information about the Commits mailing list