https://wiki.debian.org/debian/watch#Gitlab
"From 2024/03 above solution do not work anymore since Gitlab changed their tag ordering. You can use direct API access:”
version=4
opts=\
searchmode=plain,\
https://gitlab.com/api/v4/projects/PROJECTID/releases archive/v?\d[\d.]+/<project>/-v?([\d.]+)@ARCHIVE_EXT@
Looks like you aren’t the only one with this problem. ;)
On Tuesday, March 26, 2024 1:05:10 PM MST Sergio Durigan Junior wrote:
> On Monday, March 25 2024, Shriram Ravindranathan wrote:
> > Dear Mentors,
> >
> > I noticed from the past couple of days, uscan seems to be having trouble
> > finding files from the gitlab tags page.
> >
> > ```
> > $ uscan
> > uscan warn: In debian/watch no matching files for watch line
> >
> > https://gitlab.com/saalen/highlight/tags?sort=updated_desc
> > .*/archive/(\d\S+)/.*\.tar\.gz.*>
> > ```
> >
> > Checking the same pattern with grep shows that it does find a match
> >
> > ```
> > $ curl -L "https://gitlab.com/saalen/highlight/tags?sort=updated_desc" |
> > grep -E ".*/archive/([0-9]\S+)/.*\.tar\.gz.*">
> > % Total % Received % Xferd Average Speed Time Time Time
> > Current
> >
> > Dload Upload Total Spent Left
> > Speed
> >
> > 100 126 100 126 0 0 287 0 --:--:-- --:--:-- --:--:--
> > 287>
> > 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:--
> > 0<div class="js-source-code-dropdown" data-css-class=""
> > data-download-artifacts="[]"
> > data-download-links="[{"text":"zip","path":
> > "/saalen/highlight/-/archive/4.11/highlight-4.11.zip"},{"te
> > xt":"tar.gz","path":"/saalen/highlight/-/arc
> > hive/4.11/highlight-4.11.tar.gz"},{"text":"tar.bz2&quo
> > t;,"path":"/saalen/highlight/-/archive/4.11/highlight-4.11.
> > tar.bz2"},{"text":"tar","path":"/s
> > aalen/highlight/-/archive/4.11/highlight-4.11.tar"}]"></div>>
> > 100 85448 100 85448 0 0 51822 0 0:00:01 0:00:01 --:--:--
> > 401k ```
> >
> > It seems like a few other packages are also having similar troubles with
> > uscan, for example lomiri <https://tracker.debian.org/pkg/lomiri>
> >
> > Is there a way to fix this?
>
> I don't know if there's an "official" way to fix this, but the problem
> seems to be the fact the actual download link is embedded inside an
> element of the page, like this:
>
> <div class="js-source-code-dropdown" ...
> data-download-links="[{"text":"zip","path":&quo
> t;/saalen/highlight/-/archive/v4.11/highlight-v4.11.zip"},{"text&quo
> t;:"tar.gz","path":"/saalen/highlight/-/archive/v4.11
> /highlight-v4.11.tar.gz"},...>
>
> uscan by default will try to parse the HTML of the page, which is not
> helpful in this case. You can try changing its search mode by
> specifying "searchmode=plain" as part of the "opts" variable. You may
> have to adjust your "filenamemange" regexp as well.
>
> Cheers,
--
Soren Stoutner
soren@debian.org
Attachment:
signature.asc
Description: This is a digitally signed message part.