Version string of package
Takashi Yano
takashi.yano@nifty.ne.jp
Fri Jan 13 14:21:42 GMT 2023
On Fri, 13 Jan 2023 13:22:44 +0000
Jon Turney 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
>
>
> In any case, you should be suspicious of using upstream version names of
> this form. They may expect the 'stable' string to sort against other
> strings based on meaning, rather than alphabetically (e.g.
> '20230113-testing' is considered greater, which is probably not what's
> wanted)
Thanks for the answer.
I'll use version 20230113 with release 1.g<git hash tag>
e.g. package-name-20230113-1.g123456789abc like
cygwin test package.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin-apps
mailing list