Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
@ 2022-11-07  7:02 icp1994
  2022-11-09 14:30 ` JamiKettunen
  2022-12-05  2:37 ` [PR PATCH] [Merged]: " classabbyamp
  0 siblings, 2 replies; 3+ messages in thread
From: icp1994 @ 2022-11-07  7:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages tweak-git.sr.ht-update-check
https://github.com/void-linux/void-packages/pull/40372

common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
#### Testing the changes
- I tested the changes in this PR: **YES**
- `grep -lr --include template git.sr.ht srcpkgs/ | cut -d/ -f2 | xargs -n1 ./xbps-src update-check`

A few packages with `git.sr.ht` upstream, such as [imv](https://git.sr.ht/~exec64/imv/refs), uses commit hash to name their release tarballs instead of a version string. These packages (imv, mymcplus, pc & dotool) all report `NO VERSION` to the update checker in current master.

With this change, the custom update file of `clickclack` breaks as it mitigated the issue mentioned above in a different way. But it's now redundant and reports updates correctly without a separate update file. `wlopm` (maintained by me) also had a redundant update file so I removed it too.

A patch file from https://github.com/void-linux/void-packages/pull/40372.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tweak-git.sr.ht-update-check-40372.patch --]
[-- Type: text/x-diff, Size: 2355 bytes --]

From 9ef858d8027b0890642e867271cb3bb92338b02e Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 6 Nov 2022 15:12:41 +0530
Subject: [PATCH 1/3] common/xbps-src/shutils/update_check.sh: tweak url and rx
 for git.sr.ht

Accommodate for tarballs in refs named after commit hash.
---
 common/xbps-src/shutils/update_check.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e7193c98ffad..7d4e3314a970 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -162,8 +162,8 @@ update_check() {
                 rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=\.tar\.gz")';;
             *git.sr.ht*)
                 pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
-                url="https://git.sr.ht/$pkgurlname/refs"
-                rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=\.tar\.gz")';;
+                url="https://git.sr.ht/$pkgurlname/refs/rss.xml"
+                rx='<guid>\Q'"${url%/*}"'\E/(v-?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=</guid>)' ;;
             *pkgs.fedoraproject.org*)
                 url="https://pkgs.fedoraproject.org/repo/pkgs/$pkgname" ;;
             esac

From 3aa659eb82db6bc693d5f63560618cfe3bede5f2 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 6 Nov 2022 15:27:18 +0530
Subject: [PATCH 2/3] clickclack: remove redundant update file

---
 srcpkgs/clickclack/update | 1 -
 1 file changed, 1 deletion(-)
 delete mode 100644 srcpkgs/clickclack/update

diff --git a/srcpkgs/clickclack/update b/srcpkgs/clickclack/update
deleted file mode 100644
index 963c41fa75bc..000000000000
--- a/srcpkgs/clickclack/update
+++ /dev/null
@@ -1 +0,0 @@
-pattern='\s{12}\K[\d.]+'

From f1fb7117d3c3e141b46d2befdfc5999464911e6c Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 6 Nov 2022 15:27:49 +0530
Subject: [PATCH 3/3] wlopm: remove redundant update file

---
 srcpkgs/wlopm/update | 2 --
 1 file changed, 2 deletions(-)
 delete mode 100644 srcpkgs/wlopm/update

diff --git a/srcpkgs/wlopm/update b/srcpkgs/wlopm/update
deleted file mode 100644
index a0f8bcfb49e3..000000000000
--- a/srcpkgs/wlopm/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.sr.ht/~leon_plickat/wlopm/refs"
-pattern="v\K\d+\.\d+\.\d+(?=)"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
  2022-11-07  7:02 [PR PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht icp1994
@ 2022-11-09 14:30 ` JamiKettunen
  2022-12-05  2:37 ` [PR PATCH] [Merged]: " classabbyamp
  1 sibling, 0 replies; 3+ messages in thread
From: JamiKettunen @ 2022-11-09 14:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

New comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/40372#issuecomment-1308852103

Comment:
+1 from me, also appears to find version on my local packaging for [`pnc`](https://git.sr.ht/~anjan/pnc):
```
$ XBPS_UPDATE_CHECK_VERBOSE=1 ./xbps-src update-check pnc
fetching https://git.sr.ht/~anjan/pnc/refs/rss.xml and scanning with <guid>\Qhttps://git.sr.ht/~anjan/pnc/refs\E/(v-?|\Qpnc\E-)?\K[\d.]+(?=</guid>)
already fetched https://git.sr.ht/~anjan/pnc/refs/rss.xml
found version 0.9.1
```

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
  2022-11-07  7:02 [PR PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht icp1994
  2022-11-09 14:30 ` JamiKettunen
@ 2022-12-05  2:37 ` classabbyamp
  1 sibling, 0 replies; 3+ messages in thread
From: classabbyamp @ 2022-12-05  2:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

There's a merged pull request on the void-packages repository

common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
https://github.com/void-linux/void-packages/pull/40372

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**
- `grep -lr --include template git.sr.ht srcpkgs/ | cut -d/ -f2 | xargs -n1 ./xbps-src update-check`

A few packages with `git.sr.ht` upstream, such as [imv](https://git.sr.ht/~exec64/imv/refs), uses commit hash to name their release tarballs instead of a version string. These packages (imv, mymcplus, pc & dotool) all report `NO VERSION` to the update checker in current master.

With this change, the custom update file of `clickclack` breaks as it mitigated the issue mentioned above in a different way. But it's now redundant and reports updates correctly without a separate update file. `wlopm` (maintained by me) also had a redundant update file so I removed it too.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-05  2:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07  7:02 [PR PATCH] common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht icp1994
2022-11-09 14:30 ` JamiKettunen
2022-12-05  2:37 ` [PR PATCH] [Merged]: " classabbyamp

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).