contents.rst 4.01 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
.. _package contents:

================
Package Contents
================

A package contains files that are installed on a target system as well as
additionals, which are only relevant for the package manager and the repository
management software (e.g. to create entries in the :ref:`management repository`
and :ref:`sync database`).

David Runge's avatar
David Runge committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.. _package:

Package
-------

The metadata contained in a package is described by several components, which
are described in more detail in the sections for :ref:`mtree`, :ref:`buildinfo`
and :ref:`pkginfo`.

Package files are read and their contents parsed, which can subsequently be
described by a JSON schema.

Below is a list of currently understood versions of the schema.

.. _packagev1:

PackageV1
^^^^^^^^^

31
.. literalinclude:: ../schema/PackageV1.json
David Runge's avatar
David Runge committed
32
33
   :language: json

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.. _mtree:

.MTREE
------

The ``.MTREE`` files contained in a package are |mtree| files, which describe
the contents of a package. Entities such as directories, files and symlinks are
described in a binary format that lists their ownership, permissions, creation
date and various checksums.

Not all |mtree| keywords are used during package creation, which means that
only a subset of them are available in the eventual ``.MTREE`` file.

.. _mtree json schema:

MTreeEntry
^^^^^^^^^^

The entries of an ``.MTREE`` file are parsed and can subsequently be described
by a JSON schema.

Below is a list of currently understood versions of the schema.

.. _mtreeentryv1:

MTreeEntryV1
""""""""""""

62
.. literalinclude:: ../schema/MTreeEntryV1.json
63
64
   :language: json

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.. _buildinfo:

.BUILDINFO
----------

The ``.BUILDINFO`` files contained in packages are |BUILDINFO| files, which
describe aspects of the build environment present during the creation of a
package.

Formats for the file are specified by |makepkg|. Its |write_buildinfo()|
function implements only the latest version of the available formats.

.. _buildinfo json schema:

BuildInfo
^^^^^^^^^

The entries in a ``.BUILDINFO`` file are parsed and can subsequently be
described by a JSON schema.

Below is a list of currently understood versions of the schema.

.. _buildinfov1:

BuildInfoV1
"""""""""""

92
.. literalinclude:: ../schema/BuildInfoV1.json
93
94
95
96
97
98
99
100
101
102
103
104
105
   :language: json

.. _buildinfov2:

BuildInfoV2
"""""""""""

.. note::

  If |devtools| has been used as ``buildtool``, the ``buildtoolver`` has to be
  of the form ``<optional_epoch><pkgver>-<pkgrel>-<arch>`` (e.g.
  ``20220207-1-any``)!

106
.. literalinclude:: ../schema/BuildInfoV2.json
107
108
   :language: json

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.. _pkginfo:

.PKGINFO
--------

The ``.PKGINFO`` files contained in packages describe their metadata.

Formats for the file are specified by |makepkg|. Its |write_pkginfo()|
function implements only the latest version of the available formats.

.. _pkginfo json schema:

PkgInfo
^^^^^^^

The entries in a ``.PKGINFO`` file are parsed and can subsequently be described
by a JSON schema.

Below is a list of currently understood versions of the schema.

.. _pkginfov1:

PkgInfoV1
"""""""""

134
.. literalinclude:: ../schema/PkgInfoV1.json
135
136
137
138
139
140
141
   :language: json

.. _pkginfov2:

PkgInfoV2
"""""""""

142
In this version the optional ``xdata`` attribute has been introduced.
143

144
.. literalinclude:: ../schema/PkgInfoV2.json
145
146
   :language: json

147
148
149
.. |mtree| raw:: html

  <a target="blank" href="https://man.archlinux.org/man/mtree.5">mtree</a>
150
151
152
153
154
155
156
157
158
159
160
161
162

.. |BUILDINFO| raw:: html

  <a target="blank" href="https://man.archlinux.org/man/BUILDINFO.5">BUILDINFO</a>

.. |makepkg| raw:: html

  <a target="blank" href="https://man.archlinux.org/man/makepkg.8">makepkg</a>

.. |write_buildinfo()| raw:: html

  <a target="blank" href="https://gitlab.archlinux.org/pacman/pacman/-/blob/bddfcc3f40ce1a19d4c9552cddbf2cab07c94d4b/scripts/makepkg.sh.in#L519-550">write_buildinfo()</a>

163
164
165
166
.. |write_pkginfo()| raw:: html

  <a target="blank" href="https://gitlab.archlinux.org/pacman/pacman/-/blob/bddfcc3f40ce1a19d4c9552cddbf2cab07c94d4b/scripts/makepkg.sh.in#L479-517">write_pkginfo()</a>

167
168
169
.. |devtools| raw:: html

  <a target="blank" href="https://gitlab.archlinux.org/archlinux/devtools">devtools</a>