Package: devscripts Version: 2.20.4 Severity: normal Hi,
I maintain a few non-free packages where I can't directly download the corresponding upstream tarballs. But at least there exist upstream websites where I can parse the current version number from. That information is at least sufficient for the tracker for reporting if new upstream versions are available. It would be nice if uscan would have a watch file mode where only the version number is relevant while the whole match is discarded instead of being treated as some downloadable filename. The version parsing mostly works today already, but there is a "uninitialized value in concatenation" warning and I can't match on whitespace in the pattern (therefore I wildcards the spaces with '.'). Example watch file from r8168 (currently in git only): ===== 8< ===== version=4 # The upstream download page at # https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software # does not offer direct download links but rather redirects via hashes # and mandatory email registration to a temporary download location. # Therefore we can only parse the version number from the upstream # download page. opts=searchmode=plain \ https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software \ GBE.Ethernet.LINUX.driver.r8168[^<]*</td>[^\d]*([\d\.]+)[^<]*</td> # There exist unofficial mirrors ... but they are not always in sync. #https://github.com/mtorromeo/r8168/releases /mtorromeo/r8168/archive/([\d\.]+)\.(?:tar\.gz|tar\.bz2|tar\.xz) ===== >8 ===== ----- 8< ----- r8168$ uscan --report --verbose uscan info: uscan (version 2.20.4~bpo10+1) See uscan(1) for help uscan info: Scan watch files in . uscan info: Check debian/watch and debian/changelog in . uscan info: package="r8168" version="8.048.03-2" (as seen in debian/changelog) uscan info: package="r8168" version="8.048.03" (no epoch/revision) uscan info: ./debian/changelog sets package="r8168" version="8.048.03" uscan info: Process watch file at: debian/watch package = r8168 version = 8.048.03 pkg_dir = . uscan info: opts: searchmode=plain uscan info: line: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software GBE.Ethernet.LINUX.driver.r8168[^<]*</td>[^\d]*([\d\.]+)[^<]*</td> uscan info: Parsing searchmode=plain uscan info: line: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software GBE.Ethernet.LINUX.driver.r8168[^<]*</td>[^\d]*([\d\.]+)[^<]*</td> uscan info: Last orig.tar.* tarball version (from debian/changelog): 8.048.03 uscan info: Last orig.tar.* tarball version (dversionmangled): 8.048.03 uscan info: Requesting URL: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software uscan info: Found the following matching hrefs on the web page (newest first): GBE Ethernet LINUX driver r8168 for kernel up to 5.6 </td> <td > 8.048.03 </td> (8.048.03) index=8.048.03-0 uscan info: Looking at $base = https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software with $filepattern = GBE.Ethernet.LINUX.driver.r8168[^<]*</td>[^\d]*([\d\.]+)[^<]*</td> found $newfile = GBE Ethernet LINUX driver r8168 for kernel up to 5.6 </td> <td > 8.048.03 </td> $newversion = 8.048.03 $lastversion = 8.048.03 Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Devscripts/Uscan/http.pm line 193. uscan info: Matching target for downloadurlmangle: GBE Ethernet LINUX driver r8168 for kernel up to 5.6 </td> <td > 8.048.03 </td> uscan info: Upstream URL(+tag) to download is identified as GBE Ethernet LINUX driver r8168 for kernel up to 5.6 </td> <td > 8.048.03 </td> uscan info: Filename (filenamemangled) for downloaded file: td> uscan info: Newest version of r8168 on remote site is 8.048.03, local version is 8.048.03 uscan info: => Package is up to date from => GBE Ethernet LINUX driver r8168 for kernel up to 5.6 </td> <td > 8.048.03 </td> uscan info: Scan finished ----- >8 ----- The version parsing part already works today, but the extracted "download URL" is just junk. Other examples are nvidia-graphics-drivers-tesla-{418,440,450}, e.g.: version=3 opts=searchmode=plain https://docs.nvidia.com/datacenter/tesla/index.html Version.(418(?:\.[\d\.\-]+)?) Downloading and repacking multiple upstream .run files into multi-component .orig-*.tar.gz is performed by some targets in debian/rules, I'm mot interested in using uscan for that, just knowing that a new upstream version is available will be sufficient. Andreas