From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id 0D2393858425 for ; Fri, 13 Jan 2023 19:11:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D2393858425 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=Shaw.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=shaw.ca Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id GKoAp01SWc9C4GPSnpDjoO; Fri, 13 Jan 2023 19:11:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1673637101; bh=yumHAsdjdaXNZoUuBwpzQpSM9q37Zy8ysXquvocF46A=; h=Date:Reply-To:Subject:To:References:From:In-Reply-To; b=sFIvkZepxz6UO4/SUi6DkWSz0r/kHoj4roCgYa/+M5TIn6Sofclmzfu2VFFVFPiU5 CQ2E0NkpKlyEahZVzKdPq0PFCYStZ3wEA9Fty4/gDjevSlRy7wRVtk220GZszsCQ5U fsy+2pnndo9R3uzUaJAPTd+CPmsP7C7xO/2w90u40XeLT40zvOha6Gi6su9N2WcFbU gsDRIbRD5wbipOO9YwrfNfclKDGA5d9nvSjvGGnfPSfPZAHSlERvF4IxPjn/Ifba5K Cq0zKVNeWCBh+fqDMBay9DVWCi2++nTv/oIc2rc+JlfmulhaOig+1nGQPThIgkosJJ 6Yg8s1ln7Yg3Q== Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id GPSmpFNqXyAOeGPSmpMHRz; Fri, 13 Jan 2023 19:11:41 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=63c1aced a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=MTuh8u4X5BP5g9CfT9wA:9 a=QEXdDO2ut3YA:10 a=DyKocZ4c4pQA:10 a=sRI3_1zDfAgwuvI8zelB:22 Message-ID: <39045b05-6a82-6fa9-37c4-82d725af2b02@Shaw.ca> Date: Fri, 13 Jan 2023 12:11:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Reply-To: cygwin-apps@cygwin.com Subject: Re: Version string of package Content-Language: en-CA To: cygwin-apps@cygwin.com References: <20230113205210.e23a2f47c2ffd6ea86d97541@nifty.ne.jp> <20230113232142.fe8ce6fef4f83d397fd2b23b@nifty.ne.jp> From: Brian Inglis Organization: Inglis In-Reply-To: <20230113232142.fe8ce6fef4f83d397fd2b23b@nifty.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfCSQn2Qlobs879FF/novhFYed3bxgZv7Z/bASTsWTt+0KpHAhRHWrHFi283rWY1xbPaerVAqKGiprjOi6nGp+/AeZSlT5ZEEfoXJKpgp8CpMjsKBQILC UuFwm9Hx3kxfpxQbIYs2RCCV6fErU2UOKkZVzvgrkMrHYKHD9x+dT9wPaajg+kUkijH3ahUemX9BGw== X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-01-13 07:21, Takashi Yano via Cygwin-apps wrote: > 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 > e.g. package-name-20230113-1.g123456789abc like > cygwin test package. We typically use *stable* commit dates of unambiguous commits or incremental versions rather than hashes even when packages are pulled from repos which do not provide releases e.g. ca-certificates, libhsts, publicsuffix-list. We also have packages where the versions have been frozen for historical reasons and new versions have release numbers like 1.yyyymmdd, 2.YYYYMMDD, etc. Status like stable is assumed of current releases, as test releases can be promoted to current stable release using 'untest'. Other suffixes normally use release 0 and imply never being promoted to current from pre-release candidates, like Cygwin snapshots and interim test releases. You can keep the hash info around in your build or cygport but it does not help users, as you are already using a date version and a release, so you might as well drop it from the package. We can handle numbering issues using cygport SRC_URI, SRC_DIR, CYGPORT_USE_UNSTABLE_API source hooks, and src_... script overrides. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry