From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] ci: add step to verify the functionality of update-check
Date: Sat, 08 Jul 2023 21:56:20 +0200 [thread overview]
Message-ID: <20230708195620.5mKCgYmUgohQQ-m6PpJaTmmgu1Z-vCji6-YsZNSrgRg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44927@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update-check-ci
https://github.com/void-linux/void-packages/pull/44927
ci: add step to verify the functionality of update-check
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
#### Testing the changes
- I tested the changes in this PR: **YES**
A patch file from https://github.com/void-linux/void-packages/pull/44927.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-ci-44927.patch --]
[-- Type: text/x-diff, Size: 9379 bytes --]
From 4260bf7f4cf453e54f902ba6bb787928d45d453a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:05:19 -0400
Subject: [PATCH 1/8] ci: add step to verify the functionality of update-check
---
.github/workflows/build.yaml | 9 +++++++++
common/travis/verify-update-check.sh | 25 +++++++++++++++++++++++++
2 files changed, 34 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..8a05eb59abed
--- /dev/null
+++ b/common/travis/verify-update-check.sh
@@ -0,0 +1,25 @@
+#!/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
+
+if ! command -v curl; then
+ xbps-install -Su chroot-curl
+fi
+
+export XBPS_UPDATE_CHECK_VERBOSE=yes
+err=0
+
+while read -r pkg; do
+ /bin/echo -e "\x1b[34mVerifying update-check of $pkg:\x1b[0m"
+ {
+ ./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 7107af5da07b6cfddfcefa15a9aac01633d5ee78 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:30:14 -0400
Subject: [PATCH 2/8] 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 06aad78cdd1afeb6a3c3faf3834df3ac0d780ff6 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:34:58 -0400
Subject: [PATCH 3/8] 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.
+
<a id="patches"></a>
### 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 162d6d22ab80173e70b857ebf0a1a3260a6e3e76 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:53:43 -0400
Subject: [PATCH 4/8] common/xbps-src/shutils/update-check: support chroot-curl
---
common/xbps-src/shutils/update_check.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index 882764100577..9bd9a5112ab8 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -23,8 +23,12 @@ update_check() {
return 0
fi
- if ! type curl >/dev/null 2>&1; then
- echo "ERROR: cannot find \`curl' executable!"
+ if type curl >/dev/null 2>&1; then
+ CURL=curl
+ elif type chroot-curl >/dev/null 2>&1; then
+ CURL=chroot-curl
+ else
+ echo "ERROR: cannot find \`curl' or \`chroot-curl' executable!"
return 1
fi
@@ -97,7 +101,7 @@ update_check() {
echo "(folder) fetching $urlpfx and scanning with $rx" 1>&2
fi
skipdirs=
- curl -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$urlpfx" |
+ $CURL -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$urlpfx" |
grep -Po -i "$rx" |
# sort -V places 1.1/ before 1/, but 1A/ before 1.1A/
sed -e 's:$:A:' -e 's:/A$:A/:' | sort -Vru | sed -e 's:A/$:/A:' -e 's:A$::' |
@@ -203,7 +207,7 @@ update_check() {
if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
echo "fetching $url and scanning with $rx" 1>&2
fi
- curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
+ $CURL -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
grep -Po -i "$rx"
fetchedurls[$url]=yes
done |
From d6070680f432577f820b13d9c33d142cc0669b27 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:06:16 -0400
Subject: [PATCH 5/8] 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 ca853c2eebf5c1da4b8a68812a66d16f6f8cbaf0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:55:48 -0400
Subject: [PATCH 6/8] 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 3f90800cac47d5a40365e7cc29a503fdff795f5b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:55:50 -0400
Subject: [PATCH 7/8] 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 4bc6e68cb20f8885b3ce7bf7dd8ea94478471979 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 15:55:51 -0400
Subject: [PATCH 8/8] megazeux: tmp for testing
---
srcpkgs/megazeux/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/megazeux/template b/srcpkgs/megazeux/template
index 77cce87718a1..a3e7382dad28 100644
--- a/srcpkgs/megazeux/template
+++ b/srcpkgs/megazeux/template
@@ -1,7 +1,7 @@
# Template file for 'megazeux'
pkgname=megazeux
version=2.92f
-revision=1
+revision=2
build_style=configure
configure_script="./config.sh"
configure_args="--platform unix --enable-release --bindir /usr/lib/megazeux
next prev parent reply other threads:[~2023-07-08 19:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-08 19:07 [PR PATCH] " classabbyamp
2023-07-08 19:22 ` Chocimier
2023-07-08 19:56 ` classabbyamp [this message]
2023-07-08 19:56 ` classabbyamp
2023-07-08 19:58 ` [PR PATCH] [Updated] " classabbyamp
2023-07-08 20:19 ` classabbyamp
2023-07-08 20:26 ` classabbyamp
2023-07-08 20:45 ` classabbyamp
2023-07-08 20:52 ` Chocimier
2023-07-08 20:55 ` [PR PATCH] [Updated] " classabbyamp
2023-07-08 21:01 ` classabbyamp
2023-07-08 21:04 ` classabbyamp
2023-07-08 21:09 ` [PR REVIEW] " mhmdanas
2023-07-08 21:11 ` [PR PATCH] [Updated] " classabbyamp
2023-07-08 23:02 ` classabbyamp
2023-07-09 6:35 ` classabbyamp
2023-09-06 0:49 ` classabbyamp
2023-09-06 0:50 ` classabbyamp
2023-09-06 0:51 ` classabbyamp
2023-09-06 0:54 ` classabbyamp
2023-09-06 0:56 ` classabbyamp
2023-09-06 0:58 ` classabbyamp
2023-09-06 1:00 ` classabbyamp
2023-09-06 1:00 ` [PR PATCH] [Updated] " classabbyamp
2023-09-08 8:33 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230708195620.5mKCgYmUgohQQ-m6PpJaTmmgu1Z-vCji6-YsZNSrgRg@z \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).