Your message dated Wed, 13 May 2026 12:09:06 +0000
with message-id <[email protected]>
and subject line Bug#1133886: fixed in devscripts 2.26.8
has caused the Debian Bug report #1133886,
regarding devscripts: uscan with mode:git and filename-mangle has trouble with 
udis86
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1133886: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1133886
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: devscripts
Version: 2.25.19ubuntu2
Severity: important
Tags: patch

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

With the following uscan file, uscan correctly detects the version, but
fails to generate the correct tarball due to undefined variables:

    % cat debian/watch
    Version: 5

    Source: https://github.com/canihavesomecoffee/udis86.git
    Matching-Pattern: HEAD
    Mode: git
    Git-Pretty: %(describe)+git%cd.%h
    Git-Mode: full
    Filename-Mangle: s/^(@PACKAGE@)-v([^-]+)[^+]*(?=\+git)/$1_$2/

    % uscan --verbose --force-download
    uscan info: Scan watch files in .
    uscan info: Check debian/watch and debian/changelog in .
    uscan info: package="udis86" version="1.7.2+git20221013.5336633-1" (as seen 
in debian/changelog)
    uscan info: package="udis86" version="1.7.2+git20221013.5336633" (no 
epoch/revision)
    uscan info: ./debian/changelog sets package="udis86" 
version="1.7.2+git20221013.5336633"
    uscan info: Process watch file at: debian/watch
        package = udis86
        version = 1.7.2+git20221013.5336633
        pkg_dir = .
    uscan info: Parsing filenamemangle: 
s/^(udis86)-v([^-]+)[^+]*(?=\+git)/$1_$2/
    uscan info: Parsing gitmode: full
    uscan info: Parsing gitpretty: %(describe)+git%cd.%h
    uscan info: Parsing mode: git
    uscan info: Last orig.tar.* tarball version (from debian/changelog): 
1.7.2+git20221013.5336633
    uscan info: Last orig.tar.* tarball version (dversionmangled): 
1.7.2+git20221013.5336633
    Cloning into bare repository '../udis86-temporary.2984285.git'...
    remote: Enumerating objects: 2477, done.
    remote: Total 2477 (delta 0), reused 0 (delta 0), pack-reused 2477 (from 2)
    Receiving objects: 100% (2477/2477), 1.81 MiB | 8.76 MiB/s, done.
    Resolving deltas: 100% (1503/1503), done.
    uscan info: Looking at $base        = 
https://github.com/canihavesomecoffee/udis86.git with
        $filepattern        = HEAD found
        $newfile            = HEAD
        $mangled_newversion = v1.7.2-186-g5336633+git20221013.5336633
        $newversion         = v1.7.2-186-g5336633+git20221013.5336633
        $lastversion        = 1.7.2+git20221013.5336633
    uscan info: Upstream URL(+tag) to download is identified as    
https://github.com/canihavesomecoffee/udis86.git HEAD
    uscan info: Matching target for filenamemangle: 
udis86-v1.7.2-186-g5336633+git20221013.5336633.tar.xz
    uscan info: Newest upstream tarball version from the filenamemangled 
filename: 1.7.2+git20221013.5336633
    uscan info: Filename (filenamemangled) for downloaded file: 
udis86_1.7.2+git20221013.5336633.tar.xz
    uscan info: Newest version of udis86 on remote site is 
1.7.2+git20221013.5336633, local version is 1.7.2+git20221013.5336633
    uscan info:  => Package is up to date from:
                 => https://github.com/canihavesomecoffee/udis86.git HEAD
    uscan info:  => Forcing download as requested
    uscan info: Downloading upstream package: udis86.git HEAD
    Use of uninitialized value in subroutine entry at 
/usr/share/perl5/Devscripts/Uscan/Downloader.pm line 135.
    Use of uninitialized value $ver in concatenation (.) or string at 
/usr/share/perl5/Devscripts/Uscan/Downloader.pm line 301.
    Use of uninitialized value $ver in concatenation (.) or string at 
/usr/share/perl5/Devscripts/Uscan/Downloader.pm line 301.
    uscan info: Successfully downloaded upstream package: udis86.git HEAD
    uscan info: Renamed upstream package to: 
udis86_1.7.2+git20221013.5336633.tar.xz
    uscan info: Start checking for common possible upstream OpenPGP signature 
files
    uscan info: End checking for common possible upstream OpenPGP signature 
files
    uscan info: Missing OpenPGP signature.
    uscan info: New orig.tar.* tarball version (oversionmangled): 
1.7.2+git20221013.5336633
    uscan info: Launch mk-origtargz with options:
       --package udis86 --version 1.7.2+git20221013.5336633 --rename 
--compression default --directory .. --copyright-file debian/copyright 
../udis86_1.7.2+git20221013.5336633.tar.xz
    uscan error: Could not read ../udis86_1.7.2+git20221013.5336633.tar.xz: No 
such file or directory


Note that I attempted to generate the filename as
`udis86_1.7.2+git20221013.5336633.tar.xz` (with an underscore separating
package and version), which breaks the regex in `Downloader.pm` that
populates `$ver`.


Switching to a hyphen however, results in a different bug:

    % cat debian/watch
    Version: 5

    Source: https://github.com/canihavesomecoffee/udis86.git
    Matching-Pattern: HEAD
    Mode: git
    Git-Pretty: %(describe)+git%cd.%h
    Git-Mode: full
    Filename-Mangle: s/^(@PACKAGE@)-v([^-]+)[^+]*(?=\+git)/$1-$2/

    % uscan --verbose --force-download
    uscan info: Scan watch files in .
    uscan info: Check debian/watch and debian/changelog in .
    uscan info: package="udis86" version="1.7.2+git20221013.5336633-1" (as seen 
in debian/changelog)
    uscan info: package="udis86" version="1.7.2+git20221013.5336633" (no 
epoch/revision)
    uscan info: ./debian/changelog sets package="udis86" 
version="1.7.2+git20221013.5336633"
    uscan info: Process watch file at: debian/watch
        package = udis86
        version = 1.7.2+git20221013.5336633
        pkg_dir = .
    uscan info: Parsing filenamemangle: 
s/^(udis86)-v([^-]+)[^+]*(?=\+git)/$1-$2/
    uscan info: Parsing gitmode: full
    uscan info: Parsing gitpretty: %(describe)+git%cd.%h
    uscan info: Parsing mode: git
    uscan info: Last orig.tar.* tarball version (from debian/changelog): 
1.7.2+git20221013.5336633
    uscan info: Last orig.tar.* tarball version (dversionmangled): 
1.7.2+git20221013.5336633
    Cloning into bare repository '../udis86-temporary.3023082.git'...
    remote: Enumerating objects: 2477, done.
    remote: Total 2477 (delta 0), reused 0 (delta 0), pack-reused 2477 (from 2)
    Receiving objects: 100% (2477/2477), 1.81 MiB | 5.07 MiB/s, done.
    Resolving deltas: 100% (1503/1503), done.
    uscan info: Looking at $base        = 
https://github.com/canihavesomecoffee/udis86.git with
        $filepattern        = HEAD found
        $newfile            = HEAD
        $mangled_newversion = v1.7.2-186-g5336633+git20221013.5336633
        $newversion         = v1.7.2-186-g5336633+git20221013.5336633
        $lastversion        = 1.7.2+git20221013.5336633
    uscan info: Upstream URL(+tag) to download is identified as    
https://github.com/canihavesomecoffee/udis86.git HEAD
    uscan info: Matching target for filenamemangle: 
udis86-v1.7.2-186-g5336633+git20221013.5336633.tar.xz
    uscan info: Newest upstream tarball version from the filenamemangled 
filename: 86-1.7.2+git20221013.5336633
    uscan info: Filename (filenamemangled) for downloaded file: 
udis86-1.7.2+git20221013.5336633.tar.xz
    Newest version of udis86 on remote site is 86-1.7.2+git20221013.5336633, 
local version is 1.7.2+git20221013.5336633
     => Newer package available from:
            => https://github.com/canihavesomecoffee/udis86.git HEAD
    uscan info: Downloading upstream package: udis86.git HEAD
    uscan info: Successfully downloaded upstream package: udis86.git HEAD
    uscan info: Renamed upstream package to: 
udis86-1.7.2+git20221013.5336633.tar.xz
    uscan info: Start checking for common possible upstream OpenPGP signature 
files
    uscan info: End checking for common possible upstream OpenPGP signature 
files
    uscan info: Missing OpenPGP signature.
    uscan info: New orig.tar.* tarball version (oversionmangled): 
86-1.7.2+git20221013.5336633
    uscan info: Launch mk-origtargz with options:
       --package udis86 --version 86-1.7.2+git20221013.5336633 --rename 
--compression default --directory .. --copyright-file debian/copyright 
../udis86-1.7.2+git20221013.5336633.tar.xz
    Successfully renamed ../udis86-1.7.2+git20221013.5336633.tar.xz to 
../udis86_86-1.7.2+git20221013.5336633.orig.tar.xz.
    uscan info: New orig.tar.* tarball version (after mk-origtargz): 
86-1.7.2+git20221013.5336633
    uscan info: Removing git repo (../udis86-temporary.3023082.git)
    uscan info: Scan finished


Note that despite a correct tarball name
(udis86-1.7.2+git20221013.5336633.tar.xz), the `86` at the end of the
`udis86` package name has now wrongly become part of the detected
version.

I've attached patches to fix both issues.

-- Package-specific info:

--- /etc/devscripts.conf ---
Empty.

--- ~/.devscripts ---
DEBFULLNAME="Chow Loong Jin <[email protected]>"
DEBSIGN_KEYID=12E0D09DFB3FF7F759D36ED0FBD5225B588752A1
USCAN_SYMLINK=rename

-- System Information:
Debian Release: forky/sid
  APT prefers questing-updates
  APT policy: (500, 'questing-updates'), (500, 'questing-security'), (500, 
'questing'), (100, 'questing-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.17.0-19-generic (SMP w/14 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_SG.UTF-8, LC_CTYPE=en_SG.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_SG:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages devscripts depends on:
ii  dpkg-dev              1.22.21ubuntu3.1
ii  file                  1:5.46-5build1
ii  gpg                   2.4.8-2ubuntu2.1
ii  gpg-agent             2.4.8-2ubuntu2.1
ii  gpgv                  2.4.8-2ubuntu2.1
ii  libdpkg-perl          1.22.21ubuntu3.1
ii  libfile-dirlist-perl  0.05-3
ii  libfile-homedir-perl  1.006-2
ii  libfile-touch-perl    0.12-2
ii  libio-string-perl     1.08-4
ii  libmoo-perl           2.005005-1
ii  libwww-perl           6.78-1
ii  patchutils            0.4.2-1build3
ii  perl                  5.40.1-6build1
ii  python3               3.13.7-1
ii  sensible-utils        0.0.25
ii  wdiff                 1.2.2-9

Versions of packages devscripts recommends:
ii  apt                        3.1.6ubuntu2
ii  curl                       8.14.1-2ubuntu1.2
ii  dctrl-tools                2.24-3build3
ii  dput                       1.2.4ubuntu3
ii  libdistro-info-perl        1.14
ii  libencode-locale-perl      1.05-3
ii  libjson-perl               4.10000-1
ii  libstring-shellquote-perl  1.04-3
ii  liburi-perl                5.30-1
ii  licensecheck               3.3.9-1ubuntu1
ii  lintian                    2.122.0ubuntu2
ii  lzip                       1.25-3
ii  man-db                     2.13.1-1
ii  patch                      2.8-2
ii  python3-apt                3.0.0ubuntu1.1
ii  python3-debian             1.0.1ubuntu1
ii  python3-magic              2:0.4.27-3
ii  python3-requests           2.32.3+dfsg-5ubuntu2
ii  python3-unidiff            0.7.5-2
ii  python3-xdg                0.28-2
ii  strace                     6.16+ds-2ubuntu2
ii  unzip                      6.0-28ubuntu7
ii  wget                       1.25.0-2ubuntu3
ii  xz-utils                   5.8.1-1build2

Versions of packages devscripts suggests:
ii  adequate                                  0.17.5
ii  at                                        3.2.5-2.2ubuntu1
ii  autopkgtest                               5.49
pn  bls-standalone                            <none>
ii  bsd-mailx [mailx]                         8.1.2-0.20220412cvs-1.1
ii  build-essential                           12.12ubuntu1
pn  check-all-the-things                      <none>
ii  debhelper                                 13.24.2ubuntu1
ii  debian-keyring                            2025.09.18
pn  debian-tag2upload-keyring                 <none>
ii  diffoscope                                305
ii  disorderfs                                0.6.0-1
pn  docker.io                                 <none>
pn  dose-extra                                <none>
pn  duck                                      <none>
pn  elpa-devscripts                           <none>
ii  equivs                                    2.3.2
pn  faketime                                  <none>
pn  git-debpush                               <none>
ii  gnuplot                                   6.0.2+dfsg1-2ubuntu1
ii  gnuplot-qt [gnuplot]                      6.0.2+dfsg1-2ubuntu1
pn  how-can-i-help                            <none>
ii  libauthen-sasl-perl                       2.1700-1
pn  libdbd-pg-perl                            <none>
ii  libgitlab-api-v4-perl                     0.27-1
ii  liblwp-protocol-https-perl                6.14-1
pn  libmetacpan-client-perl                   <none>
ii  libsoap-lite-perl                         1.27-3
ii  libterm-size-perl                         0.211-1build6
ii  libtimedate-perl                          2.3300-2
ii  libyaml-libyaml-perl                      0.903.0+ds-1
ii  mmdebstrap                                1.5.7-1
ii  mutt                                      2.2.13-1
ii  openssh-client [ssh-client]               1:10.0p1-5ubuntu5.1
ii  piuparts                                  1.6.0
ii  postgresql-client-17 [postgresql-client]  17.9-0ubuntu0.25.10.1
pn  pristine-lfs                              <none>
ii  pristine-tar                              1.50+nmu2build1
ii  python3-debianbts                         4.1.1
ii  python3-pycurl                            7.45.6-1
ii  quilt                                     0.68-1
pn  ratt                                      <none>
ii  reprotest                                 0.7.30
pn  svn-buildpackage                          <none>
ii  w3m                                       0.5.3+git20230121-2.1ubuntu1

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/perl5/Devscripts/Uscan/Modes/_vcs.pm (from 
devscripts package)

-- 
Kind regards,
Loong Jin
From 62a1dfc59612483627e3b534e04d52bf63bd8593 Mon Sep 17 00:00:00 2001
From: Chow Loong Jin <[email protected]>
Date: Wed, 15 Apr 2026 16:39:28 +0800
Subject: [PATCH 1/2] uscan: Support `$pkg_$ver.tar.gz` filenames in mode:git

---
 lib/Devscripts/Uscan/Downloader.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Devscripts/Uscan/Downloader.pm b/lib/Devscripts/Uscan/Downloader.pm
index 003236b1..1463b574 100644
--- a/lib/Devscripts/Uscan/Downloader.pm
+++ b/lib/Devscripts/Uscan/Downloader.pm
@@ -130,7 +130,7 @@ sub download ($$$$$$$$) {
     } else {    # $mode eq 'svn' or $mode eq 'git'
         my $destdir = $self->destdir;
         my $curdir  = cwd();
-        $fname =~ m%(.*)/\Q$pkg\E-([^_/]*)\.tar(?:\.(gz|xz|bz2|lzma|zstd?))?%;
+        $fname =~ m%(.*)/\Q$pkg\E[-_]([^_/]*)\.tar(?:\.(gz|xz|bz2|lzma|zstd?))?%;
         my $dst     = $1;
         my $abs_dst = abs_path($dst);
         my $ver     = $2;
-- 
2.51.0

From fd6ae185fd6dfca6f1a9bb16cb66c3fff7a7c0a0 Mon Sep 17 00:00:00 2001
From: Chow Loong Jin <[email protected]>
Date: Wed, 15 Apr 2026 16:53:50 +0800
Subject: [PATCH 2/2] uscan: Fix misparsed version from filenamemangling result
 in vcs

For packages that end with numbers, e.g. `udis86`, the `86` can end up being
prefixed into the detected version after a filename-mangling result. This fixes
that by tightening up the regex matching the package name portion.
---
 lib/Devscripts/Uscan/Modes/_vcs.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Devscripts/Uscan/Modes/_vcs.pm b/lib/Devscripts/Uscan/Modes/_vcs.pm
index d316ff5f..7fa2d6cd 100644
--- a/lib/Devscripts/Uscan/Modes/_vcs.pm
+++ b/lib/Devscripts/Uscan/Modes/_vcs.pm
@@ -37,7 +37,7 @@ sub _vcs_newfile_base {
         if ($self->versionless) {
             # set version from filenamemangling result
             $newfile_base
-              =~ m/^.+?[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?:\.tar(\..*)?)$/i;
+              =~ m/^\Q$self->{pkg}\E[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?:\.tar(\..*)?)$/i;
             $self->search_result->{newversion}
               = $self->search_result->{mangled_newversion} = $1;
             unless ($self->search_result->{mangled_newversion}) {
-- 
2.51.0

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: devscripts
Source-Version: 2.26.8
Done: Holger Levsen <[email protected]>

We believe that the bug you reported is fixed in the latest version of
devscripts, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Holger Levsen <[email protected]> (supplier of updated devscripts package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 13 May 2026 13:31:45 +0200
Source: devscripts
Architecture: source
Version: 2.26.8
Distribution: unstable
Urgency: medium
Maintainer: Devscripts Maintainers <[email protected]>
Changed-By: Holger Levsen <[email protected]>
Closes: 933555 1059734 1115546 1120369 1133886
Changes:
 devscripts (2.26.8) unstable; urgency=medium
 .
   [ Jochen Sprickerhof ]
   * Bump minimal black version.
   * test_uscan_git: Fix for git version in trixie.
 .
   [ Charles Plessy ]
   * uscan:
     - get template from metadata and package name from d/copyright.
     - remove stray print statement in CRAN template.
 .
   [ Agustin Martin Domingo ]
   * Uscan/WatchSource.pm: Deal with "0" package version. Closes: #1059734.
   * Uscan/Config.pm: Also support --nodownload as specified in docstrings.
     Closes: #933555.
   * Github.pm: Allow customized version regexps with new 'Custom-Version'
     parameter. Closes: #1115546, #1120369.
 .
   [ Chow Loong Jin ]
   * uscan:
     - support `$pkg_$ver.tar.gz` filenames in mode:git
     - fix misparsed version from filenamemangling result in vcs.
       Closes: #1133886.
   * salsa-ci: Disable test-uscan job.
 .
   [ Yadd ]
   * uscan:
     - update STABLE_VERSION to accept 0.x.y versions.
     - fix USCAN_HTTP_HEADER failure when value contains a space.
 .
   [ cen ]
   * debrebuild: document --cache flag usage.
 .
   [ Agustin Martin ]
   * Gitlab.pm: Allow customized version regexps with new 'Custom-Version' 
parameter.
 .
   [ Lukas Märdian ]
   * debchange: Adopt for 'LTS Team' in favor of 'LTS Security Team'.
   * po: Update debchange translations.
Checksums-Sha1:
 ba5fc06718b6b87e108856194508b607918bf791 3474 devscripts_2.26.8.dsc
 97d5e632185535e50f053e327c03bd3469573e5e 1118456 devscripts_2.26.8.tar.xz
 f4f08d147f2db2ce87415bfdbd00fa6648f2dce3 20580 
devscripts_2.26.8_source.buildinfo
Checksums-Sha256:
 9e1d38b880f751b24e4a2153055451d52b98b5ddd5eee779c642bda1db57aa7a 3474 
devscripts_2.26.8.dsc
 3b97d88d14302761ad42f83d0a86a5148fd106df997802b8f72388b44f3d6d5f 1118456 
devscripts_2.26.8.tar.xz
 9bb9b601c531537b86cdd418b0bb9367f00f8e3e22f0746369f299db94552df6 20580 
devscripts_2.26.8_source.buildinfo
Files:
 0a966303b3a35067cc86ba8dc06cd96d 3474 devel optional devscripts_2.26.8.dsc
 822b4d38941dafeb8c83bf8fc9c161fb 1118456 devel optional 
devscripts_2.26.8.tar.xz
 96314625d9bfd8fb2f2233382f934165 20580 devel optional 
devscripts_2.26.8_source.buildinfo

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

iQIzBAEBCgAdFiEEuL9UE3sJ01zwJv6dCRq4VgaaqhwFAmoEYeYACgkQCRq4Vgaa
qhwl/w/9HDp+HSCq0UHJ1QM/8VXLIjQOEt9DtxN3Axmi4+mHeXhHQemiew7V9bcc
v0kBjlDrMnoy3ncC6OPYK3cEWIXPOhDSDf3s8OrHMSTx/aAI/gdXbXB8Q0+H/QL+
eT79wRCJCAU0lFUcmf0UhPdjdoWUjJkQELtU1j3QtA/MF2A4NGaXpb8iIjm7FzB3
urGKGzV2tqSEFCNLBWFkzOF07Np0sGbD7ZR+cVH4RcgSGbdyKQAZO5nmGyCYQ9zL
Jc9OQFMGRxcSAAeyKbit/Glz/4tdOWVYEUjz0wySmQ5ws6ZT33D7Bg9unuIb7EEz
W9eWYQmCsWHaAMIAu+gNu08b+Lfr6CULnQq6lKc+7ZMmT7WLCmq134Ie9rXXXp31
x4+7Wrk6b9WvXoavSer6l5I4s/YEbHy6fuTw2Jwfv4TjG3BXtzK7JToO6vHG7Sgt
lLOdPsUo4qLXGrpxZ9RugIwvsal5ZY2H8+9MKHipi6path86hKWY4z+HsZDn4Xfk
qyuymJ0WZawL3sLiVmAs+KyWU/0y+lKnj6Tzh/IP/aX7c/BmnhTVNuZSS0avjs19
2Q6jGuZ5A3VOtNt7/38T9re7BVJX+7cxKeScEVv7MSnnEj+0UVUICpqBGTtQ2quS
cExX2JeMWGBhaCN5MrHDiOJa19V0Qfm/u24GgskfMGiuQ9aNtcs=
=Y2Hp
-----END PGP SIGNATURE-----

Attachment: pgpI7roDe_Am1.pgp
Description: PGP signature


--- End Message ---

Reply via email to