runtime(debian): update debian related runtime files (#13423)

Commit: 
https://github.com/vim/vim/commit/7b7cda67a1246874520b280277d9b1447e1a7ef5
Author: James McCoy <[email protected]>
Date:   Thu Oct 26 17:14:30 2023 -0400

    runtime(debian): update debian related runtime files 
(https://github.com/vim/vim/issues/13423)
    
    * Update Debian runtime files
    
    Add mantic as a supported Ubuntu release and move buster/kinetic to
    unsupported.
    
    Add syntax highlighting for deb822sources filetype.
    
    Add debsources ftplugin to set relevant comment options.
    
    Move common version information to shared/debversions.vim
    
    Closes #11934
    
    Co-authored-by: Heinrich Schuchardt <[email protected]>
    Co-authored-by: James Addison <[email protected]>
    Co-authored-by: Viktor Szépe <[email protected]>
    Signed-off-by: James McCoy <[email protected]>
    
    * Add myself as codeowner for Debian-related runtime files
    
    Signed-off-by: James McCoy <[email protected]>
    
    ---------
    
    Signed-off-by: James McCoy <[email protected]>
    Co-authored-by: Heinrich Schuchardt <[email protected]>
    Co-authored-by: James Addison <[email protected]>
    Co-authored-by: Viktor Szépe <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ccb36b3f0..cd648004e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -124,6 +124,9 @@ runtime/ftplugin/cs.vim                     @nickspoons
 runtime/ftplugin/csh.vim               @dkearns
 runtime/ftplugin/css.vim               @dkearns
 runtime/ftplugin/cucumber.vim          @tpope
+runtime/ftplugin/debchangelog.vim      @jamessan
+runtime/ftplugin/debcontrol.vim                @jamessan
+runtime/ftplugin/debsources.vim                @jamessan
 runtime/ftplugin/desktop.vim           @e-kwsm
 runtime/ftplugin/dosbatch.vim          @mrdubya
 runtime/ftplugin/eiffel.vim            @dkearns
@@ -357,6 +360,12 @@ runtime/syntax/d.vim                       @JesseKPhillips
 runtime/syntax/dart.vim                        @pr3d4t0r
 runtime/syntax/datascript.vim          @dpelle
 runtime/syntax/dcl.vim                 @cecamp
+runtime/syntax/deb822sources.vim       @jamessan
+runtime/syntax/debchangelog.vim                @jamessan
+runtime/syntax/debcontrol.vim          @jamessan
+runtime/syntax/debcopyright.vim                @jamessan
+runtime/syntax/debsources.vim          @jamessan
+runtime/syntax/dep3patch.vim           @jamessan
 runtime/syntax/desktop.vim             @e-kwsm
 runtime/syntax/dosbatch.vim            @mrdubya
 runtime/syntax/dosini.vim              @xuhdev
@@ -479,6 +488,7 @@ runtime/syntax/scss.vim                     @tpope
 runtime/syntax/sdoc.vim                        @gpanders
 runtime/syntax/sed.vim                 @dkearns
 runtime/syntax/sh.vim                  @cecamp
+runtime/syntax/shared/debversions.vim  @jamessan
 runtime/syntax/sm.vim                  @cecamp
 runtime/syntax/solidity.vim            @cothi
 runtime/syntax/spec.vim                        @ignatenkobrain
diff --git a/runtime/ftplugin/debchangelog.vim 
b/runtime/ftplugin/debchangelog.vim
index dca7f7355..aa657a9b9 100644
--- a/runtime/ftplugin/debchangelog.vim
+++ b/runtime/ftplugin/debchangelog.vim
@@ -3,7 +3,7 @@
 " Maintainer:   Debian Vim Maintainers <[email protected]>
 " Former Maintainers:   Michael Piefel <[email protected]>
 "                       Stefano Zacchiroli <[email protected]>
-" Last Change:  2023 Jan 16
+" Last Change:  2023 Aug 18
 " License:      Vim License
 " URL:          
https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debchangelog.vim
 
diff --git a/runtime/ftplugin/debsources.vim b/runtime/ftplugin/debsources.vim
new file mode 100644
index 000000000..cbb4fafd2
--- /dev/null
+++ b/runtime/ftplugin/debsources.vim
@@ -0,0 +1,16 @@
+" Language:     Debian sources.list
+" Maintainer:   Debian Vim Maintainers <[email protected]>
+" Last Change:  2023 Aug 30
+" License:      Vim License
+" URL:          
https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debsources.vim
+
+if exists('b:did_ftplugin')
+  finish
+endif
+let b:did_ftplugin=1
+
+setlocal comments=:#
+setlocal commentstring=#%s
+setlocal formatoptions-=t
+
+let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/syntax/deb822sources.vim b/runtime/syntax/deb822sources.vim
new file mode 100644
index 000000000..81113610e
--- /dev/null
+++ b/runtime/syntax/deb822sources.vim
@@ -0,0 +1,63 @@
+" Vim syntax file
+" Language:     Debian deb822-format source list file
+" Maintainer:   Debian Vim Maintainers
+" Last Change: 2023 May 25
+" URL: 
https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim
+
+" Standard syntax initialization
+if exists('b:current_syntax')
+  finish
+endif
+
+" case insensitive
+syn case ignore
+
+" Comments are matched from the first character of a line to the end-of-line
+syn region deb822sourcesComment start="^#" end="$"
+
+" A bunch of useful keywords
+syn match deb822sourcesType               /\(deb-src\|deb\)/
+syn match deb822sourcesFreeComponent      /\(main\|universe\)/
+syn match deb822sourcesNonFreeComponent   
/\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/
+
+" Include Debian versioning information
+runtime! syntax/shared/debversions.vim
+
+exe 'syn match deb822sourcesSupportedSuites contained + 
*\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). 
'\)\>\([-[:alnum:]_./]*\)+'
+exe 'syn match deb822sourcesUnsupportedSuites contained + 
*\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). 
'\)\>\([-[:alnum:]_./]*\)+'
+
+unlet g:debSharedSupportedVersions
+unlet g:debSharedUnsupportedVersions
+
+syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" 
contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline
+
+syn keyword deb822sourcesForce contained force
+syn keyword deb822sourcesYesNo contained yes no
+
+" Match uri's
+syn match deb822sourcesUri            
'\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^'    
 <>"]\+'
+
+syn match deb822sourcesEntryField            
"^\%(Types\|URIs\|Suites\|Components\): *"
+syn match deb822sourcesOptionField           
"^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\):
 *"
+syn match deb822sourcesMultiValueOptionField 
"^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *"
+
+syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField 
start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\):
 *" end="$" contains=deb822sourcesYesNo oneline
+syn region deb822sourcesStrictField 
matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" 
end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline
+
+hi def link deb822sourcesComment                 Comment
+hi def link deb822sourcesEntryField              Keyword
+hi def link deb822sourcesOptionField             Special
+hi def link deb822sourcesMultiValueOptionField   Special
+hi def link deb822sourcesBooleanOptionField      Special
+hi def link deb822sourcesForceBooleanOptionField Special
+hi def link deb822sourcesStrictField             Error
+hi def link deb822sourcesType                    Identifier
+hi def link deb822sourcesFreeComponent           Identifier
+hi def link deb822sourcesNonFreeComponent        Identifier
+hi def link deb822sourcesForce                   Identifier
+hi def link deb822sourcesYesNo                   Identifier
+hi def link deb822sourcesUri                     Constant
+hi def link deb822sourcesSupportedSuites         Type
+hi def link deb822sourcesUnsupportedSuites       WarningMsg
+
+let b:current_syntax = 'deb822sources'
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index d3c3d3930..da35a6a10 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
 " Maintainer:  Debian Vim Maintainers
 " Former Maintainers: Gerfried Fuchs <[email protected]>
 "                     Wichert Akkerman <[email protected]>
-" Last Change: 2023 Jan 16
+" Last Change: 2023 Oct 11
 " URL: 
https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debchangelog.vim
 
 " Standard syntax initialization
@@ -17,34 +17,19 @@ syn case ignore
 let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( 
[^[:space:],][^,]*\)\='
 let s:binNMU='binary-only=yes'
 
-let s:cpo = &cpo
-set cpo-=C
-let s:supported = [
-      \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 
'rc-buggy',
-      \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
-      \
-      \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
-      \ 'devel'
-      \ ]
-let s:unsupported = [
-      \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
-      \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
-      \ 'jessie', 'stretch',
-      \
-      \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
-      \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
-      \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 
'saucy',
-      \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
-      \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
-      \ ]
-let &cpo=s:cpo
+" Include Debian versioning information
+runtime! syntax/shared/debversions.vim
+
+exe 'syn match debchangelogTarget      contained "\%( 
\%('.join(g:debSharedSupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'
+exe 'syn match debchangelogUnsupportedTarget   contained "\%( 
\%('.join(g:debSharedUnsupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'
+
+unlet g:debSharedSupportedVersions
+unlet g:debSharedUnsupportedVersions
 
 " Define some common expressions we can use later on
 syn match debchangelogName     contained "^[[:alnum:]][[:alnum:].+-]\+ "
 exe 'syn match debchangelogFirstKV     contained "; 
\('.s:urgency.'\|'.s:binNMU.'\)"'
 exe 'syn match debchangelogOtherKV     contained ", 
\('.s:urgency.'\|'.s:binNMU.'\)"'
-exe 'syn match debchangelogTarget      contained "\%( \%('.join(s:supported, 
'\|').'\)\>[-[:alnum:]]*\)\+"'
-exe 'syn match debchangelogUnsupportedTarget   contained "\%( 
\%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"'
 syn match debchangelogUnreleased       contained / UNRELEASED/
 syn match debchangelogVersion  contained "(.\{-})"
 syn match debchangelogCloses   contained 
"closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
@@ -58,19 +43,19 @@ syn region debchangelogFooter start="^ [^ ]" end="$" 
contains=debchangelogEmail
 syn region debchangelogEntry start="^  " end="$" 
contains=debchangelogCloses,debchangelogLP oneline
 
 " Associate our matches and regions with pretty colours
-hi def link debchangelogHeader  Error
-hi def link debchangelogFooter  Identifier
-hi def link debchangelogEntry   Normal
-hi def link debchangelogCloses  Statement
-hi def link debchangelogLP      Statement
-hi def link debchangelogFirstKV Identifier
-hi def link debchangelogOtherKV Identifier
-hi def link debchangelogName    Comment
-hi def link debchangelogVersion Identifier
-hi def link debchangelogTarget  Identifier
-hi def link debchangelogUnsupportedTarget  Identifier
+hi def link debchangelogHeader     Error
+hi def link debchangelogFooter     Identifier
+hi def link debchangelogEntry      Normal
+hi def link debchangelogCloses     Statement
+hi def link debchangelogLP         Statement
+hi def link debchangelogFirstKV    Identifier
+hi def link debchangelogOtherKV    Identifier
+hi def link debchangelogName       Comment
+hi def link debchangelogVersion    Identifier
 hi def link debchangelogUnreleased WarningMsg
-hi def link debchangelogEmail   Special
+hi def link debchangelogEmail      Special
+hi def link debchangelogTarget     Identifier
+hi def link debchangelogUnsupportedTarget Identifier
 
 let b:current_syntax = 'debchangelog'
 
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index cbb3b36c1..9846cfdef 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
 " Language:     Debian sources.list
 " Maintainer:   Debian Vim Maintainers
 " Former Maintainer: Matthijs Mohlmann <[email protected]>
-" Last Change: 2023 Feb 06
+" Last Change: 2023 Oct 11
 " URL: 
https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
 
 " Standard syntax initialization
@@ -21,41 +21,27 @@ syn match debsourcesNonFreeComponent   
/\(contrib\|non-free-firmware\|non-free\|
 " Match comments
 syn match debsourcesComment        /#.*/  contains=@Spell
 
-let s:cpo = &cpo
-set cpo-=C
-let s:supported = [
-      \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 
'rc-buggy',
-      \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
-      \
-      \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
-      \ 'devel'
-      \ ]
-let s:unsupported = [
-      \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
-      \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
-      \ 'jessie', 'stretch',
-      \
-      \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
-      \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
-      \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 
'saucy',
-      \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
-      \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
-      \ ]
-let &cpo=s:cpo
+" Include Debian versioning information
+runtime! syntax/shared/debversions.vim
+
+exe 'syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\<\('. 
join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
+exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. 
join(g:debSharedUnsupportedVersions, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
+
+unlet g:debSharedSupportedVersions
+unlet g:debSharedUnsupportedVersions
 
 " Match uri's
 syn match debsourcesUri            
'\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^'    
    <>"]\+'
-exe 'syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\<\('. 
join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
-exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. 
join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
+syn region debsourcesLine start="^" end="$" 
contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword
 oneline
+
 
 " Associate our matches and regions with pretty colours
-hi def link debsourcesLine                    Error
 hi def link debsourcesType                    Statement
 hi def link debsourcesFreeComponent           Statement
 hi def link debsourcesNonFreeComponent        Statement
-hi def link debsourcesDistrKeyword            Type
-hi def link debsourcesUnsupportedDistrKeyword WarningMsg
 hi def link debsourcesComment                 Comment
 hi def link debsourcesUri                     Constant
+hi def link debsourcesDistrKeyword            Type
+hi def link debsourcesUnsupportedDistrKeyword WarningMsg
 
 let b:current_syntax = 'debsources'
diff --git a/runtime/syntax/shared/debversions.vim 
b/runtime/syntax/shared/debversions.vim
new file mode 100644
index 000000000..e96b55842
--- /dev/null
+++ b/runtime/syntax/shared/debversions.vim
@@ -0,0 +1,29 @@
+" Vim syntax file
+" Language:     Debian version information
+" Maintainer:   Debian Vim Maintainers
+" Last Change: 2023 Oct 11
+" URL: 
https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/shared/debversions.vim
+
+let s:cpo = &cpo
+set cpo-=C
+
+let g:debSharedSupportedVersions = [
+      \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 
'rc-buggy',
+      \ 'bullseye', 'bookworm', 'trixie', 'forky',
+      \
+      \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'lunar', 'mantic',
+      \ 'devel'
+      \ ]
+let g:debSharedUnsupportedVersions = [
+      \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
+      \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
+      \ 'jessie', 'stretch', 'buster',
+      \
+      \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
+      \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
+      \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 
'saucy',
+      \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
+      \ 'disco', 'eoan', 'hirsute', 'impish', 'kinetic', 'groovy'
+      \ ]
+
+let &cpo=s:cpo

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qw7h5-006rNL-Gr%40256bit.org.

Raspunde prin e-mail lui