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

Re: watch file for Fiji



Frederic,

Uscan needs to be able to find the file to download based on the version number 
in the debian/changelog.  So, for example, if the changelog says:

privacybrowser (0.6-1) unstable; urgency=medium

It will look for a download with version number 0.6 (uscan automatically 
removes the `-1` Debian part of the version number).

For example, here is the watch file that, paired with that changelog, can find 
the correct download.

version=4
opts=pgpsigurlmangle=s/$/.asc/ https://download.stoutner.com/privacybrowser-pc/privacybrowser-(.+).tar.xz

This is pretty easy because all of the releases are in one directory and are 
named similar to the release number.

https://download.stoutner.com/privacybrowser-pc/

Your case is more complicated, because each release in the archive you are 
referencing is stored in a separate directory based on the date.

https://downloads.imagej.net/fiji/archive/

But, it looks like the source code is available on GitHub.

https://github.com/fiji/fiji

Uscan can download release artifacts from GitHub.  For example, the following 
watch file downloads two (manually uploaded) release assets from GitHub and 
combines them into one orig.tar.xz.

# uversionmangle rewrites the binary tarball releases to sort before the 
source releases.
# For example, 3.052R becomes 3.052~R.

version=4
opts="searchmode=plain,repacksuffix=+dfsg,dversionmangle=auto,\
    filenamemangle=s%.*/v?@ANY_VERSION@%@PACKAGE@-$1.tar.gz%,\
    uversionmangle=s/(\d)((R)\d*)$/$1~$2/" \
    https://api.github.com/repos/adobe-fonts/source-sans/tags?per_page=50 \
    https://api.github.com/repos/adobe-fonts/source-sans/tarball/refs/tags/v?
@ANY_VERSION@
opts="searchmode=plain,dversionmangle=auto,component=precompiled-binary-fonts,
\
    filenamemangle=s%.*/v?@ANY_VERSION@%@PACKAGE@-$1.tar.gz%" \
    https://api.github.com/repos/adobe-fonts/source-sans/tags?per_page=50 \
    https://api.github.com/repos/adobe-fonts/source-sans/tarball/refs/tags/v?
@ANY_VERSION@R same uupdate

It looks like you might only need much simpler options.  Try using these 
instructions:

https://wiki.debian.org/debian/watch/#GitHub

To pull directly from:

https://github.com/fiji/fiji/tags

Soren

P.S.  I find `uscan -vv` (extra verbose) to be really helpful in 
troubleshooting what uscan sees when it scans for a download.

On Wednesday, August 7, 2024 6:25:25 AM MST PICCA Frederic-Emmanuel wrote:
> Hello, I am trying to write a watch file for Fiji
> 
> All the version are available in this
> 
> https://downloads.imagej.net/fiji/archive/@ANY_VERSION@/fiji-linux64.zip
> 
> I tryed with the simple
> 
> version=4
> https://downloads.imagej.net/fiji/archive/@ANY_VERSION@/fiji-linux64.zip
> 
> but I end up with this error
> 
> $ uscan --verbose
> uscan info: uscan (version 2.23.4+deb12u1) See uscan(1) for help
> uscan info: Scan watch files in .
> uscan info: Check debian/watch and debian/changelog in .
> uscan info: package="fiji" version="0.0.1-1" (as seen in debian/changelog)
> uscan info: package="fiji" version="0.0.1" (no epoch/revision)
> uscan info: ./debian/changelog sets package="fiji" version="0.0.1"
> uscan info: Process watch file at: debian/watch
>     package = fiji
>     version = 0.0.1
>     pkg_dir = .
> uscan warn: Tag pattern missing version delimiters () in debian/watch,
> skipping:
> https://downloads.imagej.net/fiji/archive/(?:[-_]?v?(\d[\-+\.:\~\da-zA-Z]*))/
> fiji-linux64.zip group uscan info: Scan finished
> 
> What is wrong ?
> 
> thanks for your help
> 
> Frederic


-- 
Soren Stoutner
soren@debian.org

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: