Development/Release Spec
From Mandriva
The goal is:
- to define a way to uniquely define any Mandriva Linux system release (per distribution/release/arch/product/build); that is a unique serial identifier for any released system;
- to have a definition set we can very simply map from the system to a web service API and the other way around.
- to have something somehow backward compatible with existing Mandriva systems all around
Discussion happens on mdv-distro-tools mailing list.
Contents |
Identify a distribution, a release and a product
Definition proposal
First, let's define what we need/have; here's a set of rules; once we agree on these, we can see how to make it backward compatible at best, how to make it fit in existing files, and/or make up a new syntax.
Please correct/add:
- a vendor (Mandriva) has many distributions;
- a distribution has one name (Mandriva Linux);
- a distribution has one type ([none], Corporate, MNF, etc.);
- a distribution has one version (2006.0, 3.0);
- a distribution has many branches (Official, Community, etc.);
- a branch has many target architecture (i586);
- a release is a published branch and is described as (distribution name, version, type, branch, arch)
- a release has a support expiration date
Mandriva -- vendor name +- Mandriva Linux -- distribution name +-- Basic -- type. find another name? | +-- 2006.0 -- distribution version | +-- 2007.0 | +-- Official -- branch | | +-- i586 -- arch - release? | | | +-- One -- product | | | +-- Free | | | +-- Discovery | | | +-- PowerPack | | | | | | +-- main -- media | | | +-- contrib -- | | | | | | | | +-- x86_64 | | | +-- Community -- branch | +-- i586 | +-- x86_64 | +-- Corporate -- type | +-- 3.0 | | +-- Official | | +-- i586 | | +-- Desktop | +-- Server | +-- MNF +-- Globetrotter
For instance, we would have the path Mandriva / Mandriva Linux / Basic / 2007.0 / Official / i586 that qualifies a full release.
We could attach/define medias to this node; the media would still be valid for a child node, but not for a parent node (unless it is a noarch media); and we have here a clean distinction between medias made for Official branch and for Community branch. Note, for corporate: are desktop and server products eligible to the same medias?
Other equivalent paths would be Mandriva / Mandriva Linux / Corporate / 4.0 / Beta / i586.
Now:
- a product is a release with a commercial name;
- this commercial name (for instance, Free, One, Discovery 2006.0, Corporate Desktop) has:
- a type
- a version
We could then define a product with Mandriva / Mandriva Linux / Basic / 2006.0 / Official / i586 / One.
With this set, have we correctly defined the contents of the /etc/release file, and does it fit with your needs?
We may need to add a build identifier, because we may have distinct builds of the same release, or the same product (several ISOs, for instance, for QA purpose in the beginning). This could be appended to the string, separated with a comma, as it is a distinct information.
Id representation / format
With a LDAP-like path.
A release would be identified with:
vendor=Mandriva,distribution=Mandriva Linux,type=Corporate,version=3.0,branch=Beta2,arch=i586,product=Desktop,build=123.456.789
A specific media for this release would be identified with:
vendor=PLF,distribution=Mandriva Linux,type=Basic,version=2006.0,branch=Official,arch=i586,media=free
The new proposal of media layout on maintainers does not make this more difficult to spot a media:
vendor=Mandriva,distribution=Mandriva Linux,type=Basic,version=2007.0,branch=Official,arch=i586,media=official/release
Remind that the goal is the system may query web services, sending this full string, so to identify itself and retrieve information as accurate as possible for itself.
Publish this information as a web service
See Mandriva Web API.
Set this information in all our systems
/etc/productid
This is still a proposal.
Expected behaviour:
- programs (and system) must rely on this id to query webservices and identify themselves;
- programs must rely on this id and to its related description to have detailed information about the product; the description will be published on a webservice, but the same description should be embedded along the product id on the system so offline operations are available; online and embedded descriptions must be the same; this could be media.cfg, but this is not xml...
- if the product id is invalid, no valid answer from any service should be expected (from the service point of view, it is just noise).
This file should contain the same document as published by the product API for this very id. It would something like:
vendor=Mandriva,distribution=Mandriva Linux,type=Basic,version=1503.0,branch=Official,arch=i586,product=Discovery,build=123.456.789
If this a matter of discussion, shorter var names and spaces may be used to obtain something easier to read:
vendor=Mandriva, d=Mandriva Linux, t=Basic, v=1503.0, br=Official, a=i586, p=Discovery, build=123.456.789
Parsers should then have to take care of this.
The Product API may be queried with either the full id string: http://api/product?id=[ID] or with parts of it: http://api/product?vendor=Mandriva or http://api/product?version=1503.0. Depending on the query, the results returned will differ: either a list of possible matches (for one vendor, we have many things; for one version, we have several branches, etc.), either an object (a distribution, a type, a version, a branch, a product).
To satisfy point 2. above, the id could be embedded directly in the XML document as well:
<product xmlns="http://api/product" id="..."> <!-- details about the product --> </product>
/etc/release
(or /etc/mandrakelinux-release, /etc/mandrake-release, /etc/mandriva-release depending on the system)
Some of existing /etc/release strings:
Mandriva Linux release 2006.1 for i586 Mandriva Linux release 2006.2 (Official) for i586 Mandriva Linux release 2006.1 (Cooker) for i586 Mandriva Linux release 2006.0 (Official) for i586 Mandriva Linux release 2006.0 (Official) for x86_64 Mandrakelinux release 10.0 (Official) for i586 Mandrake Linux release 9.2 (Official) for i586 Mandrakelinux Corporate release 3.0 () for i586 Mandrakelinux MNF release 2.0 () for i586
So the format regexp would be like:
/(Mandrakelinux|Mandrake Linux|Mandriva Linux|Mandrivalinux)( Corporate( Server| Desktop)?| MNF)? release ((?:\d|\.)+) (?:\((.*)\) )?for (.*)/
to return this data distribution, type, release, branch, arch .
Proposed: some programs still rely on this one, so it should not be tampered with for now, but deprecated, and generated from the new product id.
/etc/sysconfig/system#META_CLASS
(download, desktop, server or powerpack or...?
Proposed: some programs still rely on this one, so it should not be tampered with for now, but deprecated, and generated from the new product id.
/etc/version
with format Version.Minor.Subversion devel_state extra info .
Community version ends with 0 (2006.0.0), Official version ends with 1 or more (2006.0.1).
2006.0.1 2.0.20060 Metal Platinum Official 2006.0 x86_64 Powerpack 2006.1.0 0.2 this is a 2006.1 community version beta release number 2. 2006.0.1 1.0 this is 2006.0 Official version stable version.
Proposed: some programs may still rely on this one, so it should not be tampered with for now, but deprecated, and generated from the new product id. If the product id format does not contain enough info still, please comment.