From ee5abfafc9f513034c81a167b9e16ee9f96149f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 2 Apr 2024 15:02:02 +0200 Subject: [PATCH 1/4] disable content type check --- scripts/ingest-tarball.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/ingest-tarball.sh b/scripts/ingest-tarball.sh index 9a91af93..ea7c186d 100755 --- a/scripts/ingest-tarball.sh +++ b/scripts/ingest-tarball.sh @@ -250,7 +250,6 @@ fi # Get some information about the tarball tar_file_basename=$(basename "${tar_file}") version=$(echo "${tar_file_basename}" | cut -d- -f2) -contents_type_dir=$(echo "${tar_file_basename}" | cut -d- -f3) tar_first_file=$(tar tf "${tar_file}" | head -n 1) tar_top_level_dir=$(echo "${tar_first_file}" | cut -d/ -f1) tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f2) @@ -261,5 +260,4 @@ is_repo_owner || cvmfs_server="sudo cvmfs_server" # Do some checks, and ingest the tarball check_repo_vars check_version -check_contents_type ingest_${tar_contents_type_dir}_tarball From a8b9d332a7d94e6ac7ecb84290028f401c968421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 2 Apr 2024 15:02:14 +0200 Subject: [PATCH 2/4] disable tests for content type check --- scripts/test-ingest-tarball.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/test-ingest-tarball.sh b/scripts/test-ingest-tarball.sh index 0bdad1af..72f2b05f 100755 --- a/scripts/test-ingest-tarball.sh +++ b/scripts/test-ingest-tarball.sh @@ -54,10 +54,11 @@ tarballs_success=( # Test that should return an error tarballs_fail=( # Non-matching type dirs - "$tstdir/eessi-2000.01-compat-123456.tar.gz 2000.01 init" - "$tstdir/eessi-2000.01-init-123456.tar.gz 2000.01 initt" - "$tstdir/eessi-2000.01-scripts-123456.tar.gz 2000.01 scriptss" - "$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01 soft" + # They have been disabled, as we removed the content type check in the ingestion script + # "$tstdir/eessi-2000.01-compat-123456.tar.gz 2000.01 init" + # "$tstdir/eessi-2000.01-init-123456.tar.gz 2000.01 initt" + # "$tstdir/eessi-2000.01-scripts-123456.tar.gz 2000.01 scriptss" + # "$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01 soft" # Non-matching versions "$tstdir/eessi-2000.01-compat-123456.tar.gz 2000.12 compat" "$tstdir/eessi-2000.01-init-123456.tar.gz 2000.12 init" From 35ca33ea334335eb7ec94fa6e42c97c7413ee788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 2 Apr 2024 15:16:55 +0200 Subject: [PATCH 3/4] add check_contents_type lines back, but comment them out --- scripts/ingest-tarball.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ingest-tarball.sh b/scripts/ingest-tarball.sh index ea7c186d..fa2d38fa 100755 --- a/scripts/ingest-tarball.sh +++ b/scripts/ingest-tarball.sh @@ -250,6 +250,7 @@ fi # Get some information about the tarball tar_file_basename=$(basename "${tar_file}") version=$(echo "${tar_file_basename}" | cut -d- -f2) +contents_type_dir=$(echo "${tar_file_basename}" | cut -d- -f3) tar_first_file=$(tar tf "${tar_file}" | head -n 1) tar_top_level_dir=$(echo "${tar_first_file}" | cut -d/ -f1) tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f2) @@ -260,4 +261,7 @@ is_repo_owner || cvmfs_server="sudo cvmfs_server" # Do some checks, and ingest the tarball check_repo_vars check_version +# Disable the call to check_contents_type, as it does not work for tarballs produced +# by our build bot that only contain init files (as they have "software" in the filename) +# check_contents_type ingest_${tar_contents_type_dir}_tarball From 2606cd21ca1f8f3d21bff737dbb686eca9ec20b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 2 Apr 2024 15:18:32 +0200 Subject: [PATCH 4/4] also redirect stderr to /dev/null --- scripts/test-ingest-tarball.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-ingest-tarball.sh b/scripts/test-ingest-tarball.sh index 72f2b05f..ee7db376 100755 --- a/scripts/test-ingest-tarball.sh +++ b/scripts/test-ingest-tarball.sh @@ -86,7 +86,7 @@ tarballs_fail=( # Run the tests that should succeed for ((i = 0; i < ${#tarballs_success[@]}; i++)); do t=$(create_tarball ${tarballs_success[$i]}) - "${INGEST_SCRIPT}" "$t" > /dev/null + "${INGEST_SCRIPT}" "$t" >& /dev/null if [ ! $? -eq 0 ]; then num_tests_failed=$((num_tests_failed + 1)) else