From: Adam Dinwoodie <adam@dinwoodie.org>
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: Takashi Yano <takashi.yano@nifty.ne.jp>,
"cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: Re: Version string of package
Date: Tue, 17 Jan 2023 23:59:02 +0000 [thread overview]
Message-ID: <20230117235902.f7sr234ptcj77ees@lucy.dinwoodie.org> (raw)
In-Reply-To: <b4e5bba9-1782-5f94-50ea-6f8bffb9e9d7@dronecode.org.uk>
On Fri, Jan 13, 2023 at 01:22:44PM +0000, Jon Turney via Cygwin-apps wrote:
> On 13/01/2023 11:52, Takashi Yano via Cygwin-apps wrote:
> > Hi,
> >
> > Is it allowed to include '-' in version string (e.g. '20230113-stable')?
> > I'm asking because mksetupini warns:
> >
> > mksetupini: file 'xxx.tar.xz' in package yyy contains '-' in version
> >
> > though it works as expected.
>
> Short answer:
>
> It's a bug that this isn't a fatal error. Please don't do it!
>
> Long answer:
>
> Package naming in Cygwin has a long and tangled history. This isn't
> explicitly precluded by the rules at [1], but probably should be.
>
> (Fedora, which we generally follow for packaging rules, now doesn't allow
> '-' in versions, just digits, letters and '.')
>
> We need to be able to unambiguously separate a NVR string into the package
> name, version and release.
>
> Underscores are allowed in package names, so the simple approach of
> splitting on the rightmost two hyphens would work, if we don't allow
> exceptions like this.
>
> (We can get it right in this case, because we have a piece of extra
> information: the directory the package is in, which happens to always be
> named N in the current scheme of things, but we might want to change that)
>
> [1] https://cygwin.com/packaging-package-files.html
I just spotted [0] in the Cygport documentation, and was reminded of
this conversation. According to that, the version string is explicitly
allowed to include hyphens! I suspect that's fundamentally a
documentanion bug these days, and should just be expunged...
[0]: https://cygwin.github.io/cygport/syntax_cygpart.html#VERSION
Quick patch below; I can submit this properly as a GitHub PR or with
`git send-email` or otherwise if that'd be useful...
diff --git a/lib/syntax.cygpart b/lib/syntax.cygpart
index 4a400a71..6b992031 100644
--- a/lib/syntax.cygpart
+++ b/lib/syntax.cygpart
@@ -316,7 +316,7 @@ __target_is_embedded() {
#****v* Globals/VERSION
# DESCRIPTION
# The upstream package version number. PV must begin with a digit 0-9, and
-# subsequent characters can be a digit, letter, dot, hyphen, or underscore.
+# subsequent characters can be a digit, letter, dot, or underscore.
#****
#****v* Globals/RELEASE
# DESCRIPTION
next prev parent reply other threads:[~2023-01-17 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 11:52 Takashi Yano
2023-01-13 13:22 ` Jon Turney
2023-01-13 14:21 ` Takashi Yano
2023-01-13 19:11 ` Brian Inglis
2023-01-17 23:59 ` Adam Dinwoodie [this message]
2023-01-18 16:17 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230117235902.f7sr234ptcj77ees@lucy.dinwoodie.org \
--to=adam@dinwoodie.org \
--cc=cygwin-apps@cygwin.com \
--cc=jon.turney@dronecode.org.uk \
--cc=takashi.yano@nifty.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).