Skip to content

Commit

Permalink
Merge pull request #26 from dmach/productmd-1.1
Browse files Browse the repository at this point in the history
Productmd 1.1
  • Loading branch information
lubomir committed Apr 12, 2016
2 parents 29a3410 + 55ed2aa commit 591af2f
Show file tree
Hide file tree
Showing 17 changed files with 781 additions and 38 deletions.
68 changes: 68 additions & 0 deletions doc/composeinfo-1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
===========================
Composeinfo file format 1.1
===========================

composeifo.json files provide details about composes which includes
product information, variants, architectures and paths.


Changes from 1.0
================

* Added 'type' field to 'header', "productmd.composeinfo" required
* Added 'type' field to 'release'
* Added 'type' field to 'base_product'


File Format
===========
Composeinfo is stored as a JSON serialized dictionary.
It's recommended to sort keys alphabetically and use 4 spaces for indentation
in order to read and diff composeinfo.json files easily.


::

{
"header": {
"type": "productmd.composeinfo", # metadata type; "productmd.composeinfo" required; [new in 1.1]
"version": "1.1" # metadata version; format: $major<int>.$minor<int>
},
"payload": {
"compose": {
"id": <str>,
"date": <str>,
"respin": <int>,
"type": <str>,
"label": <str|unset>,
"final": <bool=false> # true if a compose is final for a milestone (for example latest Beta-1.x)
},
"release": {
"name": <str>,
"version": <str>,
"short": <str>,
"type": <str>, # [new in 1.1]
"is_layered": <bool=false>,
},
"base_product": {
"name": <str>,
"version": <str>,
"short": <str>,
"type": <str>, # [new in 1.1]
},
"variants": {
variant_uid<str>: {
"id": <str>,
"uid": <str>,
"name": <str>,
"type": <str>,
"arches": [<str>],
"paths": {
path_category<str>: {
arch<str>: <str>,
},
},
},
},
},
}
22 changes: 11 additions & 11 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,29 +217,29 @@
[u'Daniel Mach <dmach@redhat.com>'], 7),

# modules
('compose', 'compose', u'productmd Documentation',
('compose', 'productmd-compose', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),
('composeinfo', 'composeinfo', u'productmd Documentation',
('composeinfo', 'productmd-composeinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),
('discinfo', 'discinfo', u'productmd Documentation',
('discinfo', 'productmd-discinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),
('images', 'images', u'productmd Documentation',
('images', 'productmd-images', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),
('rpms', 'rpms', u'productmd Documentation',
('rpms', 'productmd-rpms', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),
('treeinfo', 'treeinfo', u'productmd Documentation',
('treeinfo', 'productmd-treeinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 1),

# file formats
('composeinfo-1.0', 'composeinfo', u'productmd Documentation',
('composeinfo-1.1', 'productmd-composeinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 5),
('discinfo-1.0', 'discinfo', u'productmd Documentation',
('discinfo-1.0', 'productmd-discinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 5),
('images-1.0', 'images', u'productmd Documentation',
('images-1.1', 'productmd-images', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 5),
('rpms-1.0', 'rpms', u'productmd Documentation',
('rpms-1.0', 'productmd-rpms', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 5),
('treeinfo-1.0', 'treeinfo', u'productmd Documentation',
('treeinfo-1.1', 'productmd-treeinfo', u'productmd Documentation',
[u'Daniel Mach <dmach@redhat.com>'], 5),
]

Expand Down
1 change: 0 additions & 1 deletion doc/images-1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ in order to read and diff images.json files easily.
"implant_md5": <str|null>, # md5 checksum implanted directly on media (see implantisomd5 and checkisomd5 commands)
"mtime": <int>, # mtime of the image stored as a decimal unix timestamp
"path": <str>, # relative path to the image
"subvariant": <str>, # image content (e.g. 'Workstation' or 'KDE')
"size": <int>, # file size of the image
"type": <str>, # see productmd.images.SUPPORTED_IMAGE_TYPES
"volume_id": <str|null> # volume ID; null if not available/applicable
Expand Down
60 changes: 60 additions & 0 deletions doc/images-1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
======================
Images file format 1.1
======================

images.json files provide details about images included in composes.


Changes from 1.0
================

* Added 'type' field to 'header', "productmd.images" required
* Added 'subvariant' field to image


File Format
===========

Compose images metadata is stored as a JSON serialized dictionary.
It's recommended to sort keys alphabetically and use 4 spaces for indentation
in order to read and diff images.json files easily.

::

{
"header": {
"type": "productmd.images", # metadata type; "productmd.images" required; [new in 1.1]
"version": "1.1" # metadata version; format: $major<int>.$minor<int>
},
"payload": {
"compose": { # see composeinfo for details
"date": <str>,
"id": <str>,
"respin": <int>,
"type": <str>
},
"images": {
variant_uid<str>: { # compose variant UID
arch<str>: [ # compose variant arch
{
"arch": <str>, # image arch
"bootable": <bool>, # can the image be booted?
"checksums": {
type<str>: <str> #
},
"disc_count": <int>, # number of discs in media set
"disc_number": <int>, # disc number
"format": <str>, # see productmd.images.SUPPORTED_IMAGE_FORMATS
"implant_md5": <str|null>, # md5 checksum implanted directly on media (see implantisomd5 and checkisomd5 commands)
"mtime": <int>, # mtime of the image stored as a decimal unix timestamp
"path": <str>, # relative path to the image
"subvariant": <str>, # image content (e.g. 'Workstation' or 'KDE'); [new in 1.1]
"size": <int>, # file size of the image
"type": <str>, # see productmd.images.SUPPORTED_IMAGE_TYPES
"volume_id": <str|null> # volume ID; null if not available/applicable
}
]
}
}
}
}
12 changes: 11 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,18 @@ File formats:
.. toctree::
:maxdepth: 2

composeinfo-1.0
composeinfo-1.1
discinfo-1.0
images-1.1
rpms-1.1
treeinfo-1.1

Old file formats:

.. toctree::
:maxdepth: 1

composeinfo-1.0
images-1.0
rpms-1.0
treeinfo-1.0
Expand Down
159 changes: 159 additions & 0 deletions doc/rpms-1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
====================
RPMs file format 1.1
====================

rpms.json files provide details about RPMs included in composes.


Changes from 1.0
================

* Added 'type' field to 'header', "productmd.rpms" required


File Format
===========

Compose RPMs metadata is stored as a JSON serialized dictionary.
It's recommended to sort keys alphabetically and use 4 spaces for indentation
in order to read and diff rpms.json files easily.

::

{
"header": {
"type": "productmd.rpms", # metadata type; "productmd.rpms" required; [new in 1.1]
"version": "1.1" # metadata version; format: $major<int>.$minor<int>
},
"payload": {
"compose": { # see composeinfo for details
"date": <str>,
"id": <str>,
"respin": <int>,
"type": <str>
},
"rpms": {
variant_uid<str>: { # compose variant UID
arch<str>: { # compose variant arch
srpm_nevra<str>: { # %name-%epoch:%version-%release-%arch of source RPM (koji build with epoch included)
rpm_nevra<str>: { # %name-%epoch:%version-%release-%arch of RPM file
"path": <str>, # relative path to RPM file
"sigkey": <str|null>, # sigkey ID: hex string 8 characters long, lower case; null for unsigned RPMs
"category": <str> # binary, debug, source
}
}
}
}
}
}
}


Examples
========

Bash in Fedora 21::

{
"header": {
"version": "1.0"
},
"payload": {
"compose": {
"date": "20141203",
"id": "Fedora-21-20141203.0",
"respin": 0,
"type": "production"
},
"rpms": {
"Server": {
"armhfp": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.armv7hl": {
"path": "Server/armhfp/os/Packages/b/bash-4.3.30-2.fc21.armv7hl.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Server/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
},
"i386": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.i686": {
"path": "Server/i386/os/Packages/b/bash-4.3.30-2.fc21.i686.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Server/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
},
"x86_64": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.x86_64": {
"path": "Server/x86_64/os/Packages/b/bash-4.3.30-2.fc21.x86_64.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Server/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
}
},
"Workstation": {
"armhfp": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.armv7hl": {
"path": "Workstation/armhfp/os/Packages/b/bash-4.3.30-2.fc21.armv7hl.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Workstation/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
},
"i386": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.i686": {
"path": "Workstation/i386/os/Packages/b/bash-4.3.30-2.fc21.i686.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Workstation/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
},
"x86_64": {
"bash-0:4.3.30-2.fc21.src": {
"bash-0:4.3.30-2.fc21.x86_64": {
"path": "Workstation/x86_64/os/Packages/b/bash-4.3.30-2.fc21.x86_64.rpm",
"sigkey": "95a43f54",
"category": "binary"
},
"bash-0:4.3.30-2.fc21.src": {
"path": "Workstation/source/SRPMS/b/bash-4.3.30-2.fc21.src.rpm",
"sigkey": "95a43f54",
"category": "binary"
}
}
}
}
}
}
}
Loading

0 comments on commit 591af2f

Please sign in to comment.