• d/watch for Gitea's new dynamic pages

    From Felix Lechner@21:1/5 to All on Thu Nov 4 20:40:02 2021
    Hi,

    For anyone having issues with Gitea's new dynamic download links [1]
    here is a debian/watch file that works.

    Kind regards
    Felix Lechner

    [1] https://github.com/go-gitea/gitea/issues/16354

    * * *

    version=4
    opts=\
    downloadurlmangle=s/\/releases\/tag\/(\d\S+)$/\/archive\/$1\.tar\.gz/,\
    filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \ https://codeberg.org/dnkl/foot/releases .*/releases/tag/(\d\S+)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johannes Schauer Marin Rodrigues@21:1/5 to All on Thu Nov 4 20:50:02 2021
    Quoting Felix Lechner (2021-11-04 20:17:49)
    For anyone having issues with Gitea's new dynamic download links [1] here is a debian/watch file that works.

    * * *

    version=4
    opts=\
    downloadurlmangle=s/\/releases\/tag\/(\d\S+)$/\/archive\/$1\.tar\.gz/,\
    filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \ https://codeberg.org/dnkl/foot/releases .*/releases/tag/(\d\S+)

    Not all projects use releases. Here is a watch file that works with git tags which also use data-url attribute instead of href:

    version=4 opts=downloadurlmangle=s{/src/tag/(@ANY_VERSION@)}{/archive/$1.tar.gz},\ filenamemangle=s{.*/(.*)}{@PACKAGE@-$1.tar.gz} \ https://gitlab.mister-muffin.de/josch/@PACKAGE@/tags /josch/@PACKAGE@/src/tag/([0-9.]+)
    --==============83556635653423184=MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Description: signature
    Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmGEOPYACgkQ8sulx4+9 g+HgBg/+MWfasj3Zcw0SC91V/0FziBTSk8PeO5iy4lpN6XZiHiG6zAfpRh6q8huc PmYlDekt9vyRsUSDiycmiOOI579ocWXFn+sw342hcUs4DabOpjsS0mYgNtiS6bfU pRc6YEqpor/1XIahOlBCxmxSaeN24xfJeuhYIUb/Vp4z3tIHihbAUcthwtUJXiLB wcQniS3gSvhL1hwxQDhfF3BILawSI2LQaelOYk6kPxGPV5QheBKEJoHFqrrCrXL7 rQXWlaHUnXf5ENlidxkfPqLTZIZKF1NcpdILKBGez5DeonXpRJgoNIGO7RXf+m/Q wcF6it/lffgfTTXNnPJjsGol/FR6GT4XHYHuVycZ0FO0SDVvlqdIOJ2y92qHNxgU SenUBqSkt3MGyioj0fWRFXzgdWFDAnJKEoFZZ8DcaaZAiaTmg66L5WXOv8dHaDIN Y2ngJ0Ltera1CbDLRYYCi2pl8cQC6bwnX44kdNFXibnztIthk8PLKYxXc4mxWlGl wxz3yQioS+ydByqVHyb6P/Dc9X0LxZm22eoDSHm5Un4GresErUduEZHcUiVP5gD1 uT4c+w/3IvLvTn2Rfp9qEzV8BL9TEnPPW8RKfdehLcu0oEtFV+nmx4Y76Oq0jpXa gJndPQTByfj8DGcpHE98RLVR79oC9Rnb9VtrkG4+4h++IAEWt64=
    =uOzj
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Yadd@21:1/5 to josch@debian.org on Sun Nov 7 22:10:01 2021
    On Thu, Nov 4, 2021 at 12:48 PM Johannes Schauer Marin Rodrigues <josch@debian.org> wrote:

    filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \
    filenamemangle=s{.*/(.*)}{@PACKAGE@-$1.tar.gz} \

    I think this is more generic:

    filenamemangle=s/.*?(@ANY_VERSION@@ARCHIVE_EXT@)/@PACKAGE@-$1/

    (not dependent to compression format)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Lechner@21:1/5 to josch@debian.org on Sun Nov 7 22:00:01 2021
    Hi

    On Thu, Nov 4, 2021 at 12:48 PM Johannes Schauer Marin Rodrigues <josch@debian.org> wrote:

    filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \
    filenamemangle=s{.*/(.*)}{@PACKAGE@-$1.tar.gz} \

    mapreri pointed out that 'USCAN_SYMLINK=rename' is superior to
    'filenamemangle' in both of our cases.

    Lintian will also suggest it very soon (more generally).

    Kind regards
    Felix Lechner

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Yadd@21:1/5 to All on Sun Nov 7 22:10:01 2021
    Le 07/11/2021 à 21:37, Felix Lechner a écrit :
    Hi

    On Thu, Nov 4, 2021 at 12:48 PM Johannes Schauer Marin Rodrigues <josch@debian.org> wrote:

    filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \
    filenamemangle=s{.*/(.*)}{@PACKAGE@-$1.tar.gz} \

    mapreri pointed out that 'USCAN_SYMLINK=rename' is superior to 'filenamemangle' in both of our cases.

    Lintian will also suggest it very soon (more generally).

    Kind regards
    Felix Lechner

    Yes, but USCAN_SYMLINK is a local parameter, filenamemangle is better in
    a team

    Cheers,
    Yadd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Lechner@21:1/5 to yadd@debian.org on Mon Nov 8 04:40:02 2021
    Hi Yadd,

    On Sun, Nov 7, 2021 at 1:08 PM Yadd <yadd@debian.org> wrote:

    Yes, but USCAN_SYMLINK is a local parameter

    I wondered about that, but in the interest of progress implemented the experimental and pedantic tag 'prefer-uscan-symlink'. [1] The
    description includes the disclaimer: "Please check with your team
    before making changes to sources you maintain together. There are
    circumstances when the 'filenamemangle' option is better."

    Will you and mapreri please hash it out, and instruct the Lintian
    maintainers? The compromise may be a better tag description.
    Alternatively, would it be better to set USCAN_SYMLINK in d/watch
    (instead of ~/.devscripts)? Thank you!

    Kind regards
    Felix Lechner

    [1] https://salsa.debian.org/lintian/lintian/-/commit/d336b6f732fb0059a522f19dbd1e322864c821a9

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)