From d516c99cafaeab2316c43d1505ef41ed09496ff9 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:05:19 -0400 Subject: [PATCH 1/7] ci: add step to verify the functionality of update-check --- .github/workflows/build.yaml | 9 +++++++++ common/travis/verify-update-check.sh | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 common/travis/verify-update-check.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb4fb7c85be9..4c338bc328aa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -120,3 +120,12 @@ jobs: cd / "$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH" ) + + - name: Verify update-check + if: matrix.config.arch == 'x86_64' # no point in running this multiple times + run: | + ( + here="$(pwd)" + cd / + "$here/common/travis/verify-update-check.sh" + ) diff --git a/common/travis/verify-update-check.sh b/common/travis/verify-update-check.sh new file mode 100755 index 000000000000..4e0eb244a298 --- /dev/null +++ b/common/travis/verify-update-check.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# runs update-check on all changed templates, then errors only if there was an +# issue with the update-check. does not error if further updates are available, +# as there may be a good reason not to update to those versions + +set -e + +xbps-install -Syu curl +export XBPS_UPDATE_CHECK_VERBOSE=yes +err=0 + +while read -r pkg; do + /bin/echo -e "\x1b[34mVerifying update-check of $pkg:\x1b[0m" + { + /hostrepo/xbps-src update-check "$pkg" 2>&1 || err=1 + } | tee /tmp/update-check.log + if grep -q '^NO VERSION|^=> ERROR:' /tmp/update-check.log; then + echo "::warning file=srcpkgs/$pkg/template,line=1,title=update-check failed::verify and fix update-check for $pkg" + fi +done < /tmp/templates + +exit $err From 48b3f2d956e436c4b2b51680a022a495ab2fd35a Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:30:14 -0400 Subject: [PATCH 2/7] ci: make xlint non-fatal sometimes xlint has false-positives that could lead to packages waiting to be merged for longer because of the failed CI status. xlint issues are already reported via annotation so this should be fine. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c338bc328aa..1de4b5004c81 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,7 +31,7 @@ jobs: - run: common/travis/changed_templates.sh - run: common/travis/fetch-xbps.sh - run: common/travis/fetch-xtools.sh - - run: common/travis/xlint.sh + - run: common/travis/xlint.sh || exit 0 # Build changed packages. build: From d5be20384ed7098a69cf02451248eb29d7bb53d4 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:34:58 -0400 Subject: [PATCH 3/7] common/xbps-src/shutils/update_check: add ability to disable update-check useful for cases where update checking does not make sense or is impossible --- Manual.md | 4 ++++ common/xbps-src/shutils/update_check.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Manual.md b/Manual.md index 63f10f354582..56ded0559d49 100644 --- a/Manual.md +++ b/Manual.md @@ -905,6 +905,10 @@ in url. Defaults to `(|v|$pkgname)[-_.]*`. part that follows numeric part of version directory in url. Defaults to `(|\.x)`. +- `disabled` can be set to disable update checking for the package, +in cases where checking for updates is impossible or does not make sense. +This should be set to a string describing why it is disabled. + ### Handling patches diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index e656cf06fbcc..882764100577 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -13,6 +13,9 @@ update_check() { if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "using $XBPS_TARGET_PKG/update overrides" 1>&2 fi + if [ -n "$disabled" ]; then + echo "update-check DISABLED for $original_pkgname: $disabled" 1>&2 + fi elif [ -z "$distfiles" ]; then if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "NO DISTFILES found for $original_pkgname" 1>&2 From 7113719bad4a992e58ddec4dc67d5eedaa07b5e9 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:06:16 -0400 Subject: [PATCH 4/7] chezmoi: temp for testing --- srcpkgs/chezmoi/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template index 074ef8b8c602..dac1e038fed8 100644 --- a/srcpkgs/chezmoi/template +++ b/srcpkgs/chezmoi/template @@ -1,7 +1,7 @@ # Template file for 'chezmoi' pkgname=chezmoi version=2.34.3 -revision=1 +revision=2 build_style=go go_import_path="github.com/twpayne/chezmoi/v2" go_build_tags="noembeddocs noupgrade" From bfed196e49a25e2f276294f5129dfc5d908ef40c Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:55:48 -0400 Subject: [PATCH 5/7] 66: tmp for testing --- srcpkgs/66/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/66/template b/srcpkgs/66/template index 89677d007138..008fc0c77828 100644 --- a/srcpkgs/66/template +++ b/srcpkgs/66/template @@ -1,7 +1,7 @@ # Template file for '66' pkgname=66 version=0.6.2.0 -revision=4 +revision=5 build_style=configure configure_args="--prefix=/usr --with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps From c631f7d2eeeaff7253a5a03a60390b4818729fbb Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:55:50 -0400 Subject: [PATCH 6/7] rock64-base: tmp for testing --- srcpkgs/rock64-base/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/rock64-base/template b/srcpkgs/rock64-base/template index 6f885e79783f..38502d54288d 100644 --- a/srcpkgs/rock64-base/template +++ b/srcpkgs/rock64-base/template @@ -1,7 +1,7 @@ # Template file for 'rock64-base' pkgname=rock64-base version=0.1 -revision=1 +revision=2 archs="aarch64*" build_style=meta # Linux 5.10 used for USB3 support and stability From 26cd2c855ea5b1e44497385ad82c7cfdf9afe26c Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 16:25:48 -0400 Subject: [PATCH 7/7] asdfhashdfjsahdjf --- srcpkgs/chezmoi/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template index dac1e038fed8..35e5de3b01ed 100644 --- a/srcpkgs/chezmoi/template +++ b/srcpkgs/chezmoi/template @@ -1,4 +1,4 @@ -# Template file for 'chezmoi' +# Template file for 'chez' pkgname=chezmoi version=2.34.3 revision=2