[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian watch file and GitLab for Autotools projects?



opts="searchmode=plain,downloadurlmangle=s{/uploads}{/sstp-client/sstp-client/uploads}" \
https://gitlab.com/api/v4/projects/26690467/releases /uploads/[0-9a-z]+/sstp-client-([0-9.]+)\.tar\.gz

So when I do this, I find the files in the /upload directory, that seems to work. However, the number of links with "upload" in it also includes the git release tagged source directories. My permanent link would be something similar to this:

https://gitlab.com/api/v4/projects/26690467/releases -/releases/@ANY_VERSION@/downloads/dist-gzip/sstp-client-\d\S*@ARCHIVE_EXT@

While it does find the link, it gets mixed in with a bunch of JSON stuff. Replacing the @ARCHIVE_EXT@ with ([0-9.]+)\.tar\.gz does find the link, but now won't find the base url.

opts="searchmode=plain,downloadurlmangle=s{/uploads}{/sstp-client/sstp-client/uploads}" \
https://gitlab.com/api/v4/projects/26690467/releases -/releases/@ANY_VERSION@/downloads/dist-gzip/sstp-client-([0-9.]+)\.tar\.gz

Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Devscripts/Uscan/http.pm line 204.
uscan info: Matching target for downloadurlmangle: -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz
uscan debug: safe_replace input="-/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz"
uscan debug: safe_replace with regexp="/uploads", replacement="/sstp-client/sstp-client/uploads", and flags=""
uscan debug: After downloadurlmangle: -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz
uscan info: Upstream URL(+tag) to download is identified as    -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz
uscan debug: line: get_newfile_base()
uscan info: Filename (filenamemangled) for downloaded file: sstp-client-1.0.17.tar.gz
uscan debug: line: cmp_versions()
uscan: Newest version of sstp-client on remote site is 1.0.17.1.0.17, local version is 1.0.17
uscan:  => Newer package available from:
        => -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz
uscan debug: line: download_file_and_sig()
uscan info: Downloading upstream package: sstp-client-1.0.17.tar.gz
uscan info: Requesting URL:
   -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz
uscan warn: In directory ., downloading
  -/releases/1.0.17/downloads/dist-gzip/sstp-client-1.0.17.tar.gz failed: 400 URL must be absolute [Devscripts::Uscan::Downloader: 124]


Any idea?





På onsdag 6. april 2022, 10:06:38 PDT skrev Ansgar <ansgar@debian.org> følgende: 





Hi,

On Wed, 2022-04-06 at 16:26 +0000, Eivind Naess wrote:
> Using watch with git tags yields the same thing (snapshot of the
> source code, not the release tarball). I could use the GitLab API and
> fetch a JSON file, but I can't figure out to make that work with the
> watch file.


I once suggested to use

opts="searchmode=plain,downloadurlmangle=s{/uploads}{/upower/upower/uploads}" \
https://gitlab.freedesktop.org/api/v4/projects/upower%2fupower/releases /uploads/[0-9a-z]+/upower-([0-9.]+)\.tar\.xz

on IRC for a Gitlab project.  I think that or something similar might
be what you are looking for.

Ansgar



Reply to: