Bug#1118623: deb-src-control: fix VCS-CVS and VCS-git header field specification

Thorsten Glaser <[email protected]>
Newsgroups gmane.linux.debian.devel.dpkg.bugs
Message-ID <25682b55-1cab-9c66-c494-5ee6dbe16a9b__11790.0889295683$1761188968$gmane$org@mirbsd.de>
Package: dpkg-dev
Version: 1.22.21
Severity: minor
X-Debbugs-Cc: Thorsten Glaser <[email protected]>

The fields are currently, like all the other Vcs-* fields,
specified to take (only) an “url” parameter.


For VCS-git, this is not entirely correct, the spec should be:

"VCS-git:" wsp url [wsp "-b" wsp branchname]

This is well-established and has been disseminated right around
the time those VCS-* headers were introduced.


For VCS-CVS, we need two(!) items instead. CVS repository
coordinates are not defined, nor definable, by an URL, as
they are comprised of two independent URL-like entities,
the path to the repository and the module within that.

For example, to obtain the upstream sources for mksh, you can do:

cvs -Rqd [email protected]:/cvs co -PA src/bin/mksh

Here, the RCS ,v files are placed in /cvs/src/bin/mksh/ on
the server. However, we cannot just say, for example,

VCS-CVS: [email protected]:/cvs/src/bin/mksh  # wrong

… because the split between the CVS repository and the
module within the repository cannot be determined from
just that.

It also cannot be determined server-side, as each repository
is defined by having a CVSROOT/ subdirectory, but you can
nest them (and I’ve seen people do that, and I’ve done that
for my cvs2git pseudo-repos as well), and between…

cvs -Rqd [email protected]:/repo co subrepo/dir/file
# vs.
cvs -Rqd [email protected]:/repo/subrepo co dir/file

… you get different content (the RCS IDs will differ), so
the distinction must be observed.

With CVS rising in importance due to git going to require
a port of LLVM and Rust to be used, excluding most hobby
OSes, I would like this spec bug to be fixed so lintian
stops complaining. I have been naïvely (relying only on
the aforementioned announcement) using…

"VCS-CVS:" wsp repopath wsp modulepath

… for this purpose, but am willing to work together to find
a better spec if this doesn’t suit. (Spaces within directory
names are going to break lots, so I hope people stay off them.)

Herein, repopath is anything that fulfills *(cvs)Repository::
(i.e. works as argument to the cvs -d global option), and
modulepath is a relative filesystem construct.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.