** Description changed:

+ [ Impact ]
+ 
+ vim-runtime's syntax/shared/debversions.vim hard-codes the Debian and
+ Ubuntu codenames that the debchangelog, debsources and deb822sources
+ syntax files treat as valid distributions.
+ 
+ In resolute (26.04 LTS) the list stops at "resolute". The current devel
+ series "stonking", and every later one, is shown as an invalid target,
+ so Ubuntu developers on the LTS see their devel uploads' changelog
+ target flagged as invalid for the whole lifetime of the LTS.
+ 
+ The fix reads the codenames at runtime from distro-info, keeping the
+ hard-coded list as a fallback when distro-info is not installed.
+ 
+ [ Test Plan ]
+ 
+ The new autopkgtest debian/tests/debversions (Depends: vim,
+ distro-info) checks that:
+ 
+ 1. the vim lists contain every codename from
+    {debian,ubuntu}-distro-info --supported/--unsupported, the aliases,
+    and nothing else
+ 2. without distro-info in PATH, the hard-coded fallback is used
+ 3. a debian/changelog targeting ubuntu-distro-info --devel is
+    highlighted as debchangelogTarget
+ 
+ So, the test plan is to check that the autopkgtest succeeds.
+ 
+ [ Where problems could occur ]
+ 
+ Only a runtime syntax file changes, so problems are limited to editing
+ debian/changelog, sources.list and *.sources files:
+ - Up to four distro-info processes are spawned when one of these files
+   is opened, so a slow distro-info delays opening.
+ - In restricted mode (rvim, vim -Z) shell commands are not allowed: vim
+   prints E145 and falls back to the hard-coded list.
+ - systemlist() also captures stderr, so a distro-info warning would end
+   up in the generated regex and break highlighting.
+ - With distro-info installed the valid set follows distro-info-data:
+   bookworm (now Debian LTS) shows as unsupported, and duke (not yet in
+   --supported) is no longer recognised.
+ 
+ Without distro-info the behaviour is unchanged.
+ 
+ [ Other Info ]
+ 
+ Backport of the devel patch from 2:9.2.0858-1ubuntu2, only the context
+ of hunk 1 differs. Debian: #1118059, salsa MR vim-debian!17.
+ 
+ vim does not gain a dependency on distro-info, to keep the SRU minimal.
+ 
+ [ Original Description ]
+ 
+ 
  Imported from Debian bug http://bugs.debian.org/1118059:
  
  Package: vim
  Version: 2:9.1.1846-1
  Severity: normal
  X-Debbugs-Cc: [email protected]
  
  Dear Maintainer,
  
  /usr/share/vim/vim91/syntax/shared/debversions.vim shipped by
  vim-runtime contains hard-coded Debian/Ubuntu codenames. Please get
  this data during runtime from distro-info-data instead.
  distro-info-data is the singe source of truths on installed systems and
  this package is kept up-to-date.
  
  --
  Benjamin Drung
  Debian & Ubuntu Developer

** Changed in: vim (Ubuntu)
     Assignee: (unassigned) => Benjamin Drung (bdrung)

** Changed in: vim (Ubuntu Resolute)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161203

Title:
  vim: Please use distro-info-data instead of hard-coding distro
  codenames

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/2161203/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to