all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org
Subject: Re: Version numbers for VCS snapshots
Date: Sat, 23 Jan 2016 23:00:19 +0100	[thread overview]
Message-ID: <87a8nwq7m4.fsf@gnu.org> (raw)
In-Reply-To: <87d1suvbev.fsf@mdc-berlin.de> (Ricardo Wurmus's message of "Thu, 21 Jan 2016 23:02:32 +0100")

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> +
>> +It is a good idea to strip commit identifiers to, say, 7 digits so that
>> +they do not become aesthetically disturbing (assuming aesthetics have a
>> +role to play here.)  It is best to use the full commit identifiers in
>> +@code{origin}s, though, to avoid ambiguities.
>> +
>
> I would probably find this a little confusing if I didn’t already know
> what you meant.  Where should commit identifiers be stripped?  Are there
> more places than just the ‘version’ field?  Could we name the ‘version’
> field as an example?
>
> Is it only aesthetics or also a matter of keeping shebangs shorter (in
> case the output provides an interpreter that could end up in a shebang
> line).  The version is usually part of the output name, so maybe it
> would make sense to mention the ‘version’ field explicitly.

You’re right on both points.

How about this variant?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1685 bytes --]

diff --git a/doc/guix.texi b/doc/guix.texi
index 0a67652..a8b9366 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10130,6 +10130,38 @@ If we also wanted GTK+ 3.8.2, this would be packaged as
     ...))
 @end example
 
+@cindex version number, for VCS snapshots
+Occasionally, we package snapshots of upstream's version control system
+(VCS) instead of formal releases.  This should remain exceptional,
+because it is up to upstream developers to clarify what the stable
+release is.  Yet, it is sometimes necessary.  So, what should we put in
+the @code{version} field?
+
+Clearly, we need to make the commit identifier of the VCS snapshot
+visible in the version string, but we also need to make sure that the
+version string is monotonically increasing so that @command{guix package
+--upgrade} can determine which version is newer.  Since commit
+identifiers, notably with Git, are not monotonically increasing, we add
+a revision number that we increase each time we upgrade to a newer
+snapshot.  The resulting version string looks like this:
+
+@example
+2.0.11-3.cabba9e
+  ^    ^    ^
+  |    |    `-- upstream commit ID
+  |    |
+  |    `--- Guix package revision
+  |
+latest upstream version
+@end example
+
+It is a good idea to strip commit identifiers in the @code{version}
+field to, say, 7 digits.  It avoids an aesthetic annoyance (assuming
+aesthetics have a role to play here) as well as problems related to OS
+limits such as the maximum shebang length (127 bytes for the Linux
+kernel.)  It is best to use the full commit identifiers in
+@code{origin}s, though, to avoid ambiguities.
+
 @node Synopses and Descriptions
 @subsection Synopses and Descriptions
 

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


Thanks!

Ludo’.

  reply	other threads:[~2016-01-23 22:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 21:26 New CLI syntax for package version Ludovic Courtès
2016-01-09 22:52 ` Andreas Enge
2016-01-10  8:32 ` Ricardo Wurmus
2016-01-11  3:37   ` Christopher Allan Webber
2016-01-11 15:48     ` Eric Bavier
2016-01-12  7:50 ` Ricardo Wurmus
2016-01-12  9:26   ` Version numbers for VCS snapshots Ludovic Courtès
2016-01-21  4:51     ` Ben Woodcroft
2016-01-21  6:22       ` Leo Famulari
2016-01-21  9:40         ` Ricardo Wurmus
2016-01-21 18:44           ` Leo Famulari
2016-01-21 21:05             ` Ludovic Courtès
2016-02-21  4:35               ` Leo Famulari
2016-02-21  9:17                 ` Alex Kost
2016-02-21 22:52                   ` Leo Famulari
2016-02-22  0:09                     ` Christopher Allan Webber
2016-02-23 11:53                       ` Ludovic Courtès
2016-01-21  9:44       ` Ricardo Wurmus
2016-01-21 21:25         ` Ludovic Courtès
2016-01-21 22:02           ` Ricardo Wurmus
2016-01-23 22:00             ` Ludovic Courtès [this message]
2016-01-23 22:07               ` Ricardo Wurmus
2016-01-24 23:12                 ` Ludovic Courtès
2016-01-21 22:08           ` Eric Bavier
2016-01-21 22:23             ` Jookia
2016-01-22  9:35           ` Andy Wingo
2016-01-22 12:31             ` Ricardo Wurmus
2016-01-23 21:51             ` Ludovic Courtès

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=87a8nwq7m4.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.