* [PR PATCH] xbps-src/update_check: add codeberg support
@ 2020-08-17 9:24 ifreund
2020-08-17 9:30 ` ifreund
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ifreund @ 2020-08-17 9:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
There is a new pull request by ifreund against master on the void-packages repository
https://github.com/ifreund/void-packages upcheck-codeberg
https://github.com/void-linux/void-packages/pull/24317
xbps-src/update_check: add codeberg support
A patch file from https://github.com/void-linux/void-packages/pull/24317.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-upcheck-codeberg-24317.patch --]
[-- Type: text/x-diff, Size: 1330 bytes --]
From d57921ab128d566927b44e87897516d742b644a1 Mon Sep 17 00:00:00 2001
From: Isaac Freund <ifreund@ifreund.xyz>
Date: Mon, 17 Aug 2020 11:23:19 +0200
Subject: [PATCH] xbps-src/update_check: add codeberg support
---
common/xbps-src/shutils/update_check.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e8a549ad39b..eb96fc8ada2 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -56,7 +56,8 @@ update_check() {
*cran.r-project.org/src/contrib*|\
*rubygems.org*|\
*crates.io*|\
- *hg.sr.ht*)
+ *hg.sr.ht*|\
+ *codeberg.org*)
continue
;;
*)
@@ -140,6 +141,10 @@ update_check() {
hgsrhtname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://hg.sr.ht/$hgsrhtname/tags"
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
+ *codeberg.org*)
+ codebergname="$(printf %s "$url" | cut -d/ -f4,5)"
+ url="https://codeberg.org/$codebergname/releases"
+ rx='/archive/\K[\d\.]+(?=\.tar\.gz)';;
esac
fi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
@ 2020-08-17 9:30 ` ifreund
2020-08-17 10:39 ` [PR REVIEW] " Chocimier
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ifreund @ 2020-08-17 9:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
New comment by ifreund on void-packages repository
https://github.com/void-linux/void-packages/pull/24317#issuecomment-674771310
Comment:
This can be tested with `./xbps-src update-check fcft` (Well, until #24318 is merged at least)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR REVIEW] xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
2020-08-17 9:30 ` ifreund
@ 2020-08-17 10:39 ` Chocimier
2020-08-17 10:39 ` Chocimier
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chocimier @ 2020-08-17 10:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/24317#discussion_r471390945
Comment:
please add codeberg.org above hg.sr.ht to preserve history
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR REVIEW] xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
2020-08-17 9:30 ` ifreund
2020-08-17 10:39 ` [PR REVIEW] " Chocimier
@ 2020-08-17 10:39 ` Chocimier
2020-08-17 10:52 ` [PR PATCH] [Updated] " ifreund
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chocimier @ 2020-08-17 10:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/24317#discussion_r471392315
Comment:
codebergname should be declared local.
Better yet, there should be one variable, say, `siteurlname`, instead of sfname, lpname, and so on. Commit separately if you feel like.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
` (2 preceding siblings ...)
2020-08-17 10:39 ` Chocimier
@ 2020-08-17 10:52 ` ifreund
2020-08-17 10:53 ` [PR REVIEW] " ifreund
2020-08-18 12:46 ` [PR PATCH] [Merged]: " Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: ifreund @ 2020-08-17 10:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
There is an updated pull request by ifreund against master on the void-packages repository
https://github.com/ifreund/void-packages upcheck-codeberg
https://github.com/void-linux/void-packages/pull/24317
xbps-src/update_check: add codeberg support
A patch file from https://github.com/void-linux/void-packages/pull/24317.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-upcheck-codeberg-24317.patch --]
[-- Type: text/x-diff, Size: 5058 bytes --]
From 441243e565f29e5e8184aa87ac0c184850e4cc11 Mon Sep 17 00:00:00 2001
From: Isaac Freund <ifreund@ifreund.xyz>
Date: Mon, 17 Aug 2020 12:47:29 +0200
Subject: [PATCH 1/2] xbps-src/update-check: unify per-site locals
---
common/xbps-src/shutils/update_check.sh | 26 ++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e8a549ad39b..9b3d322e797 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -1,7 +1,7 @@
# vim: set ts=4 sw=4 et:
update_check() {
- local i p url sfname lpname bbname githubname rx found_version consider
+ local i p url pkgurlname rx found_version consider
local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
local original_pkgname=$pkgname
local urlpfx urlsfx
@@ -98,13 +98,13 @@ update_check() {
if [ -z "$site" ]; then
case "$url" in
*sourceforge.net/sourceforge*)
- sfname="$(printf %s "$url" | cut -d/ -f5)"
- url="https://sourceforge.net/projects/$sfname/rss?limit=200";;
+ pkgurlname="$(printf %s "$url" | cut -d/ -f5)"
+ url="https://sourceforge.net/projects/$pkgurlname/rss?limit=200";;
*code.google.com*|*googlecode*)
url="http://code.google.com/p/$pkgname/downloads/list";;
*launchpad.net*)
- lpname="$(printf %s "$url" | cut -d/ -f4)"
- url="https://launchpad.net/$lpname/+download";;
+ pkgurlname="$(printf %s "$url" | cut -d/ -f4)"
+ url="https://launchpad.net/$pkgurlname/+download";;
*cpan.*)
pkgname=${pkgname#perl-};;
*pythonhosted.org*)
@@ -112,16 +112,16 @@ update_check() {
pkgname=${pkgname#python3-}
url="https://pypi.org/simple/$pkgname";;
*github.com*)
- githubname="$(printf %s "$url" | cut -d/ -f4,5)"
- url="https://github.com/$githubname/tags"
+ pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
+ url="https://github.com/$pkgurlname/tags"
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
*//gitlab.*)
- gitlaburl="$(printf %s "$url" | cut -d/ -f1-5)"
- url="$gitlaburl/tags"
+ pkgurlname="$(printf %s "$url" | cut -d/ -f1-5)"
+ url="$pkgurlname/tags"
rx='/archive/[^/]+/\Q'"$pkgname"'\E-v?\K[\d\.]+(?=\.tar\.gz")';;
*bitbucket.org*)
- bbname="$(printf %s "$url" | cut -d/ -f4,5)"
- url="https://bitbucket.org/$bbname/downloads"
+ pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
+ url="https://bitbucket.org/$pkgurlname/downloads"
rx='/(get|downloads)/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar)';;
*ftp.gnome.org*)
: ${pattern="\Q$pkgname\E-\K[0-9]+\.[0-9]*[02468]\.[0-9.]*[0-9](?=)"}
@@ -137,8 +137,8 @@ update_check() {
url="https://crates.io/api/v1/crates/${pkgname#rust-}"
rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;;
*hg.sr.ht*)
- hgsrhtname="$(printf %s "$url" | cut -d/ -f4,5)"
- url="https://hg.sr.ht/$hgsrhtname/tags"
+ pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
+ url="https://hg.sr.ht/$pkgurlname/tags"
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
esac
fi
From eb7a6404ba42bbae09a58290437b8a83f5e4a4c2 Mon Sep 17 00:00:00 2001
From: Isaac Freund <ifreund@ifreund.xyz>
Date: Mon, 17 Aug 2020 12:51:35 +0200
Subject: [PATCH 2/2] xbps-src/update-check: add codeberg support
---
common/xbps-src/shutils/update_check.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index 9b3d322e797..b450c57beea 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -56,6 +56,7 @@ update_check() {
*cran.r-project.org/src/contrib*|\
*rubygems.org*|\
*crates.io*|\
+ *codeberg.org*|\
*hg.sr.ht*)
continue
;;
@@ -136,6 +137,10 @@ update_check() {
*crates.io*)
url="https://crates.io/api/v1/crates/${pkgname#rust-}"
rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;;
+ *codeberg.org*)
+ pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
+ url="https://codeberg.org/$pkgurlname/releases"
+ rx='/archive/\K[\d\.]+(?=\.tar\.gz)' ;;
*hg.sr.ht*)
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://hg.sr.ht/$pkgurlname/tags"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR REVIEW] xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
` (3 preceding siblings ...)
2020-08-17 10:52 ` [PR PATCH] [Updated] " ifreund
@ 2020-08-17 10:53 ` ifreund
2020-08-18 12:46 ` [PR PATCH] [Merged]: " Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: ifreund @ 2020-08-17 10:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New review comment by ifreund on void-packages repository
https://github.com/void-linux/void-packages/pull/24317#discussion_r471399303
Comment:
Unifying these is definitely the right way to go, done.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src/update_check: add codeberg support
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
` (4 preceding siblings ...)
2020-08-17 10:53 ` [PR REVIEW] " ifreund
@ 2020-08-18 12:46 ` Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: Chocimier @ 2020-08-18 12:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
There's a merged pull request on the void-packages repository
xbps-src/update_check: add codeberg support
https://github.com/void-linux/void-packages/pull/24317
Description:
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-18 12:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 9:24 [PR PATCH] xbps-src/update_check: add codeberg support ifreund
2020-08-17 9:30 ` ifreund
2020-08-17 10:39 ` [PR REVIEW] " Chocimier
2020-08-17 10:39 ` Chocimier
2020-08-17 10:52 ` [PR PATCH] [Updated] " ifreund
2020-08-17 10:53 ` [PR REVIEW] " ifreund
2020-08-18 12:46 ` [PR PATCH] [Merged]: " Chocimier
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).