summaryrefslogtreecommitdiffstats
path: root/man/repo-manifest.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/repo-manifest.1')
-rw-r--r--man/repo-manifest.1545
1 files changed, 545 insertions, 0 deletions
diff --git a/man/repo-manifest.1 b/man/repo-manifest.1
new file mode 100644
index 00000000..e42cc42e
--- /dev/null
+++ b/man/repo-manifest.1
@@ -0,0 +1,545 @@
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
2.TH REPO "1" "July 2021" "repo manifest" "Repo Manual"
3.SH NAME
4repo \- repo manifest - manual page for repo manifest
5.SH SYNOPSIS
6.B repo
7\fI\,manifest \/\fR[\fI\,-o {-|NAME.xml}\/\fR] [\fI\,-m MANIFEST.xml\/\fR] [\fI\,-r\/\fR]
8.SH DESCRIPTION
9Summary
10.PP
11Manifest inspection utility
12.SH OPTIONS
13.TP
14\fB\-h\fR, \fB\-\-help\fR
15show this help message and exit
16.TP
17\fB\-r\fR, \fB\-\-revision\-as\-HEAD\fR
18save revisions as current HEAD
19.TP
20\fB\-m\fR NAME.xml, \fB\-\-manifest\-name\fR=\fI\,NAME\/\fR.xml
21temporary manifest to use for this sync
22.TP
23\fB\-\-suppress\-upstream\-revision\fR
24if in \fB\-r\fR mode, do not write the upstream field (only
25of use if the branch names for a sha1 manifest are
26sensitive)
27.TP
28\fB\-\-suppress\-dest\-branch\fR
29if in \fB\-r\fR mode, do not write the dest\-branch field
30(only of use if the branch names for a sha1 manifest
31are sensitive)
32.TP
33\fB\-\-json\fR
34output manifest in JSON format (experimental)
35.TP
36\fB\-\-pretty\fR
37format output for humans to read
38.TP
39\fB\-o\fR \-|NAME.xml, \fB\-\-output\-file\fR=\fI\,\-\/\fR|NAME.xml
40file to save the manifest to
41.SS Logging options:
42.TP
43\fB\-v\fR, \fB\-\-verbose\fR
44show all output
45.TP
46\fB\-q\fR, \fB\-\-quiet\fR
47only show errors
48.PP
49Run `repo help manifest` to view the detailed manual.
50.SH DETAILS
51.PP
52With the \fB\-o\fR option, exports the current manifest for inspection. The manifest
53and (if present) local_manifests/ are combined together to produce a single
54manifest file. This file can be stored in a Git repository for use during future
55\&'repo init' invocations.
56.PP
57The \fB\-r\fR option can be used to generate a manifest file with project revisions set
58to the current commit hash. These are known as "revision locked manifests", as
59they don't follow a particular branch. In this case, the 'upstream' attribute is
60set to the ref we were on when the manifest was generated. The 'dest\-branch'
61attribute is set to indicate the remote ref to push changes to via 'repo
62upload'.
63.PP
64repo Manifest Format
65.PP
66A repo manifest describes the structure of a repo client; that is the
67directories that are visible and where they should be obtained from with git.
68.PP
69The basic structure of a manifest is a bare Git repository holding a single
70`default.xml` XML file in the top level directory.
71.PP
72Manifests are inherently version controlled, since they are kept within a Git
73repository. Updates to manifests are automatically obtained by clients during
74`repo sync`.
75.PP
76[TOC]
77.PP
78XML File Format
79.PP
80A manifest XML file (e.g. `default.xml`) roughly conforms to the following DTD:
81.PP
82```xml <!DOCTYPE manifest [
83.TP
84<!ELEMENT manifest (notice?,
85remote*,
86default?,
87manifest\-server?,
88remove\-project*,
89project*,
90extend\-project*,
91repo\-hooks?,
92superproject?,
93contactinfo?,
94include*)>
95.IP
96<!ELEMENT notice (#PCDATA)>
97.IP
98<!ELEMENT remote EMPTY>
99<!ATTLIST remote name ID #REQUIRED>
100<!ATTLIST remote alias CDATA #IMPLIED>
101<!ATTLIST remote fetch CDATA #REQUIRED>
102<!ATTLIST remote pushurl CDATA #IMPLIED>
103<!ATTLIST remote review CDATA #IMPLIED>
104<!ATTLIST remote revision CDATA #IMPLIED>
105.IP
106<!ELEMENT default EMPTY>
107<!ATTLIST default remote IDREF #IMPLIED>
108<!ATTLIST default revision CDATA #IMPLIED>
109<!ATTLIST default dest\-branch CDATA #IMPLIED>
110<!ATTLIST default upstream CDATA #IMPLIED>
111<!ATTLIST default sync\-j CDATA #IMPLIED>
112<!ATTLIST default sync\-c CDATA #IMPLIED>
113<!ATTLIST default sync\-s CDATA #IMPLIED>
114<!ATTLIST default sync\-tags CDATA #IMPLIED>
115.IP
116<!ELEMENT manifest\-server EMPTY>
117<!ATTLIST manifest\-server url CDATA #REQUIRED>
118.TP
119<!ELEMENT project (annotation*,
120project*,
121copyfile*,
122linkfile*)>
123.TP
124<!ATTLIST project name
125CDATA #REQUIRED>
126.TP
127<!ATTLIST project path
128CDATA #IMPLIED>
129.TP
130<!ATTLIST project remote
131IDREF #IMPLIED>
132.TP
133<!ATTLIST project revision
134CDATA #IMPLIED>
135.IP
136<!ATTLIST project dest\-branch CDATA #IMPLIED>
137<!ATTLIST project groups CDATA #IMPLIED>
138<!ATTLIST project sync\-c CDATA #IMPLIED>
139<!ATTLIST project sync\-s CDATA #IMPLIED>
140<!ATTLIST project sync\-tags CDATA #IMPLIED>
141<!ATTLIST project upstream CDATA #IMPLIED>
142<!ATTLIST project clone\-depth CDATA #IMPLIED>
143<!ATTLIST project force\-path CDATA #IMPLIED>
144.IP
145<!ELEMENT annotation EMPTY>
146<!ATTLIST annotation name CDATA #REQUIRED>
147<!ATTLIST annotation value CDATA #REQUIRED>
148<!ATTLIST annotation keep CDATA "true">
149.IP
150<!ELEMENT copyfile EMPTY>
151<!ATTLIST copyfile src CDATA #REQUIRED>
152<!ATTLIST copyfile dest CDATA #REQUIRED>
153.IP
154<!ELEMENT linkfile EMPTY>
155<!ATTLIST linkfile src CDATA #REQUIRED>
156<!ATTLIST linkfile dest CDATA #REQUIRED>
157.IP
158<!ELEMENT extend\-project EMPTY>
159<!ATTLIST extend\-project name CDATA #REQUIRED>
160<!ATTLIST extend\-project path CDATA #IMPLIED>
161<!ATTLIST extend\-project groups CDATA #IMPLIED>
162<!ATTLIST extend\-project revision CDATA #IMPLIED>
163<!ATTLIST extend\-project remote CDATA #IMPLIED>
164.IP
165<!ELEMENT remove\-project EMPTY>
166<!ATTLIST remove\-project name CDATA #REQUIRED>
167<!ATTLIST remove\-project optional CDATA #IMPLIED>
168.IP
169<!ELEMENT repo\-hooks EMPTY>
170<!ATTLIST repo\-hooks in\-project CDATA #REQUIRED>
171<!ATTLIST repo\-hooks enabled\-list CDATA #REQUIRED>
172.IP
173<!ELEMENT superproject EMPTY>
174<!ATTLIST superproject name CDATA #REQUIRED>
175<!ATTLIST superproject remote IDREF #IMPLIED>
176.IP
177<!ELEMENT contactinfo EMPTY>
178<!ATTLIST contactinfo bugurl CDATA #REQUIRED>
179.IP
180<!ELEMENT include EMPTY>
181<!ATTLIST include name CDATA #REQUIRED>
182<!ATTLIST include groups CDATA #IMPLIED>
183.PP
184]>
185```
186.PP
187For compatibility purposes across repo releases, all unknown elements are
188silently ignored. However, repo reserves all possible names for itself for
189future use. If you want to use custom elements, the `x\-*` namespace is reserved
190for that purpose, and repo guarantees to never allocate any corresponding names.
191.PP
192A description of the elements and their attributes follows.
193.PP
194Element manifest
195.PP
196The root element of the file.
197.PP
198Element notice
199.PP
200Arbitrary text that is displayed to users whenever `repo sync` finishes. The
201content is simply passed through as it exists in the manifest.
202.PP
203Element remote
204.PP
205One or more remote elements may be specified. Each remote element specifies a
206Git URL shared by one or more projects and (optionally) the Gerrit review server
207those projects upload changes through.
208.PP
209Attribute `name`: A short name unique to this manifest file. The name specified
210here is used as the remote name in each project's .git/config, and is therefore
211automatically available to commands like `git fetch`, `git remote`, `git pull`
212and `git push`.
213.PP
214Attribute `alias`: The alias, if specified, is used to override `name` to be set
215as the remote name in each project's .git/config. Its value can be duplicated
216while attribute `name` has to be unique in the manifest file. This helps each
217project to be able to have same remote name which actually points to different
218remote url.
219.PP
220Attribute `fetch`: The Git URL prefix for all projects which use this remote.
221Each project's name is appended to this prefix to form the actual URL used to
222clone the project.
223.PP
224Attribute `pushurl`: The Git "push" URL prefix for all projects which use this
225remote. Each project's name is appended to this prefix to form the actual URL
226used to "git push" the project. This attribute is optional; if not specified
227then "git push" will use the same URL as the `fetch` attribute.
228.PP
229Attribute `review`: Hostname of the Gerrit server where reviews are uploaded to
230by `repo upload`. This attribute is optional; if not specified then `repo
231upload` will not function.
232.PP
233Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`).
234Remotes with their own revision will override the default revision.
235.PP
236Element default
237.PP
238At most one default element may be specified. Its remote and revision attributes
239are used when a project element does not specify its own remote or revision
240attribute.
241.PP
242Attribute `remote`: Name of a previously defined remote element. Project
243elements lacking a remote attribute of their own will use this remote.
244.PP
245Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`).
246Project elements lacking their own revision attribute will use this revision.
247.PP
248Attribute `dest\-branch`: Name of a Git branch (e.g. `main`). Project elements
249not setting their own `dest\-branch` will inherit this value. If this value is
250not set, projects will use `revision` by default instead.
251.PP
252Attribute `upstream`: Name of the Git ref in which a sha1 can be found. Used
253when syncing a revision locked manifest in \fB\-c\fR mode to avoid having to sync the
254entire ref space. Project elements not setting their own `upstream` will inherit
255this value.
256.PP
257Attribute `sync\-j`: Number of parallel jobs to use when synching.
258.PP
259Attribute `sync\-c`: Set to true to only sync the given Git branch (specified in
260the `revision` attribute) rather than the whole ref space. Project elements
261lacking a sync\-c element of their own will use this value.
262.PP
263Attribute `sync\-s`: Set to true to also sync sub\-projects.
264.PP
265Attribute `sync\-tags`: Set to false to only sync the given Git branch (specified
266in the `revision` attribute) rather than the other ref tags.
267.PP
268Element manifest\-server
269.PP
270At most one manifest\-server may be specified. The url attribute is used to
271specify the URL of a manifest server, which is an XML RPC service.
272.PP
273The manifest server should implement the following RPC methods:
274.IP
275GetApprovedManifest(branch, target)
276.PP
277Return a manifest in which each project is pegged to a known good revision for
278the current branch and target. This is used by repo sync when the \fB\-\-smart\-sync\fR
279option is given.
280.PP
281The target to use is defined by environment variables TARGET_PRODUCT and
282TARGET_BUILD_VARIANT. These variables are used to create a string of the form
283$TARGET_PRODUCT\-$TARGET_BUILD_VARIANT, e.g. passion\-userdebug. If one of those
284variables or both are not present, the program will call GetApprovedManifest
285without the target parameter and the manifest server should choose a reasonable
286default target.
287.IP
288GetManifest(tag)
289.PP
290Return a manifest in which each project is pegged to the revision at the
291specified tag. This is used by repo sync when the \fB\-\-smart\-tag\fR option is given.
292.PP
293Element project
294.PP
295One or more project elements may be specified. Each element describes a single
296Git repository to be cloned into the repo client workspace. You may specify
297Git\-submodules by creating a nested project. Git\-submodules will be
298automatically recognized and inherit their parent's attributes, but those may be
299overridden by an explicitly specified project element.
300.PP
301Attribute `name`: A unique name for this project. The project's name is appended
302onto its remote's fetch URL to generate the actual URL to configure the Git
303remote with. The URL gets formed as:
304.IP
305${remote_fetch}/${project_name}.git
306.PP
307where ${remote_fetch} is the remote's fetch attribute and ${project_name} is the
308project's name attribute. The suffix ".git" is always appended as repo assumes
309the upstream is a forest of bare Git repositories. If the project has a parent
310element, its name will be prefixed by the parent's.
311.PP
312The project name must match the name Gerrit knows, if Gerrit is being used for
313code reviews.
314.PP
315"name" must not be empty, and may not be an absolute path or use "." or ".."
316path components. It is always interpreted relative to the remote's fetch
317settings, so if a different base path is needed, declare a different remote with
318the new settings needed. These restrictions are not enforced for [Local
319Manifests].
320.PP
321Attribute `path`: An optional path relative to the top directory of the repo
322client where the Git working directory for this project should be placed. If not
323supplied the project "name" is used. If the project has a parent element, its
324path will be prefixed by the parent's.
325.PP
326"path" may not be an absolute path or use "." or ".." path components. These
327restrictions are not enforced for [Local Manifests].
328.PP
329If you want to place files into the root of the checkout (e.g. a README or
330Makefile or another build script), use the [copyfile] or [linkfile] elements
331instead.
332.PP
333Attribute `remote`: Name of a previously defined remote element. If not supplied
334the remote given by the default element is used.
335.PP
336Attribute `revision`: Name of the Git branch the manifest wants to track for
337this project. Names can be relative to refs/heads (e.g. just "main") or absolute
338(e.g. "refs/heads/main"). Tags and/or explicit SHA\-1s should work in theory, but
339have not been extensively tested. If not supplied the revision given by the
340remote element is used if applicable, else the default element is used.
341.PP
342Attribute `dest\-branch`: Name of a Git branch (e.g. `main`). When using `repo
343upload`, changes will be submitted for code review on this branch. If
344unspecified both here and in the default element, `revision` is used instead.
345.PP
346Attribute `groups`: List of groups to which this project belongs, whitespace or
347comma separated. All projects belong to the group "all", and each project
348automatically belongs to a group of its name:`name` and path:`path`. E.g. for
349`<project name="monkeys" path="barrel\-of"/>`, that project definition is
350implicitly in the following manifest groups: default, name:monkeys, and
351path:barrel\-of. If you place a project in the group "notdefault", it will not be
352automatically downloaded by repo. If the project has a parent element, the
353`name` and `path` here are the prefixed ones.
354.PP
355Attribute `sync\-c`: Set to true to only sync the given Git branch (specified in
356the `revision` attribute) rather than the whole ref space.
357.PP
358Attribute `sync\-s`: Set to true to also sync sub\-projects.
359.PP
360Attribute `upstream`: Name of the Git ref in which a sha1 can be found. Used
361when syncing a revision locked manifest in \fB\-c\fR mode to avoid having to sync the
362entire ref space.
363.PP
364Attribute `clone\-depth`: Set the depth to use when fetching this project. If
365specified, this value will override any value given to repo init with the
366\fB\-\-depth\fR option on the command line.
367.PP
368Attribute `force\-path`: Set to true to force this project to create the local
369mirror repository according to its `path` attribute (if supplied) rather than
370the `name` attribute. This attribute only applies to the local mirrors syncing,
371it will be ignored when syncing the projects in a client working directory.
372.PP
373Element extend\-project
374.PP
375Modify the attributes of the named project.
376.PP
377This element is mostly useful in a local manifest file, to modify the attributes
378of an existing project without completely replacing the existing project
379definition. This makes the local manifest more robust against changes to the
380original manifest.
381.PP
382Attribute `path`: If specified, limit the change to projects checked out at the
383specified path, rather than all projects with the given name.
384.PP
385Attribute `groups`: List of additional groups to which this project belongs.
386Same syntax as the corresponding element of `project`.
387.PP
388Attribute `revision`: If specified, overrides the revision of the original
389project. Same syntax as the corresponding element of `project`.
390.PP
391Attribute `remote`: If specified, overrides the remote of the original project.
392Same syntax as the corresponding element of `project`.
393.PP
394Element annotation
395.PP
396Zero or more annotation elements may be specified as children of a project
397element. Each element describes a name\-value pair that will be exported into
398each project's environment during a 'forall' command, prefixed with REPO__. In
399addition, there is an optional attribute "keep" which accepts the case
400insensitive values "true" (default) or "false". This attribute determines
401whether or not the annotation will be kept when exported with the manifest
402subcommand.
403.PP
404Element copyfile
405.PP
406Zero or more copyfile elements may be specified as children of a project
407element. Each element describes a src\-dest pair of files; the "src" file will be
408copied to the "dest" place during `repo sync` command.
409.PP
410"src" is project relative, "dest" is relative to the top of the tree. Copying
411from paths outside of the project or to paths outside of the repo client is not
412allowed.
413.PP
414"src" and "dest" must be files. Directories or symlinks are not allowed.
415Intermediate paths must not be symlinks either.
416.PP
417Parent directories of "dest" will be automatically created if missing.
418.PP
419Element linkfile
420.PP
421It's just like copyfile and runs at the same time as copyfile but instead of
422copying it creates a symlink.
423.PP
424The symlink is created at "dest" (relative to the top of the tree) and points to
425the path specified by "src" which is a path in the project.
426.PP
427Parent directories of "dest" will be automatically created if missing.
428.PP
429The symlink target may be a file or directory, but it may not point outside of
430the repo client.
431.PP
432Element remove\-project
433.PP
434Deletes the named project from the internal manifest table, possibly allowing a
435subsequent project element in the same manifest file to replace the project with
436a different source.
437.PP
438This element is mostly useful in a local manifest file, where the user can
439remove a project, and possibly replace it with their own definition.
440.PP
441Attribute `optional`: Set to true to ignore remove\-project elements with no
442matching `project` element.
443.PP
444Element repo\-hooks
445.PP
446NB: See the [practical documentation](./repo\-hooks.md) for using repo hooks.
447.PP
448Only one repo\-hooks element may be specified at a time. Attempting to redefine
449it will fail to parse.
450.PP
451Attribute `in\-project`: The project where the hooks are defined. The value must
452match the `name` attribute (**not** the `path` attribute) of a previously
453defined `project` element.
454.PP
455Attribute `enabled\-list`: List of hooks to use, whitespace or comma separated.
456.PP
457Element superproject
458.PP
459*** *Note*: This is currently a WIP. ***
460.PP
461NB: See the [git superprojects documentation](
462https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects) for background
463information.
464.PP
465This element is used to specify the URL of the superproject. It has "name" and
466"remote" as atrributes. Only "name" is required while the others have reasonable
467defaults. At most one superproject may be specified. Attempting to redefine it
468will fail to parse.
469.PP
470Attribute `name`: A unique name for the superproject. This attribute has the
471same meaning as project's name attribute. See the [element
472project](#element\-project) for more information.
473.PP
474Attribute `remote`: Name of a previously defined remote element. If not supplied
475the remote given by the default element is used.
476.PP
477Element contactinfo
478.PP
479*** *Note*: This is currently a WIP. ***
480.PP
481This element is used to let manifest authors self\-register contact info. It has
482"bugurl" as a required atrribute. This element can be repeated, and any later
483entries will clobber earlier ones. This would allow manifest authors who extend
484manifests to specify their own contact info.
485.PP
486Attribute `bugurl`: The URL to file a bug against the manifest owner.
487.PP
488Element include
489.PP
490This element provides the capability of including another manifest file into the
491originating manifest. Normal rules apply for the target manifest to include \- it
492must be a usable manifest on its own.
493.PP
494Attribute `name`: the manifest to include, specified relative to the manifest
495repository's root.
496.PP
497"name" may not be an absolute path or use "." or ".." path components. These
498restrictions are not enforced for [Local Manifests].
499.PP
500Attribute `groups`: List of additional groups to which all projects in the
501included manifest belong. This appends and recurses, meaning all projects in
502sub\-manifests carry all parent include groups. Same syntax as the corresponding
503element of `project`.
504.PP
505Local Manifests
506.PP
507Additional remotes and projects may be added through local manifest files stored
508in `$TOP_DIR/.repo/local_manifests/*.xml`.
509.PP
510For example:
511.IP
512\f(CW$ ls .repo/local_manifests\fR
513.IP
514local_manifest.xml
515another_local_manifest.xml
516.IP
517\f(CW$ cat .repo/local_manifests/local_manifest.xml\fR
518.IP
519<?xml version="1.0" encoding="UTF\-8"?>
520<manifest>
521.IP
522<project path="manifest"
523.IP
524name="tools/manifest" />
525.IP
526<project path="platform\-manifest"
527.IP
528name="platform/manifest" />
529.IP
530</manifest>
531.PP
532Users may add projects to the local manifest(s) prior to a `repo sync`
533invocation, instructing repo to automatically download and manage these extra
534projects.
535.PP
536Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will be loaded
537in alphabetical order.
538.PP
539Projects from local manifest files are added into local::<local manifest
540filename> group.
541.PP
542The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported.
543.SS [copyfile]: #Element\-copyfile [linkfile]: #Element\-linkfile [Local Manifests]:
544.PP
545#local\-manifests