1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 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 62 63 64 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
|
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
Copyright 2014 Anne LoVerso <anne.loverso@students.olin.edu>
SPDX-License-Identifier: LGPL-2.0+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<refentry id="ostree">
<refentryinfo>
<title>ostree commit</title>
<productname>OSTree</productname>
</refentryinfo>
<refmeta>
<refentrytitle>ostree commit</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>ostree-commit</refname>
<refpurpose>Commit a new revision</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>ostree commit</command> <arg choice="opt" rep="repeat">OPTIONS</arg> --branch=<arg choice="req">BRANCH</arg> <arg choice="opt">PATH</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
This allows you to commit changes to a branch. The specification of the branch is required. The command will print the checksum of a successful commit.
</para>
</refsect1>
<refsect1>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>--subject</option>, <option>-s</option>="SUBJECT"</term>
<listitem><para>
One line subject. (optional)
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--body</option>, <option>-m</option>="BODY"</term>
<listitem><para>
Full description. (optional)
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--body-file</option>, <option>-F</option>="FILE"</term>
<listitem><para>
Full commit description from a file. (optional)
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--editor</option>, <option>-e</option></term>
<listitem><para>
Open a text editor for the commit description. It will use OSTREE_EDITOR, VISUAL, EDITOR, or vi, in descending order of preference. The commit will be aborted if the message is left empty.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--branch</option>, <option>-b</option>="BRANCH"</term>
<listitem><para>
Branch. Required, unless --orphan is given.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--parent</option>="COMMIT"</term>
<listitem><para>
Parent checksum or "none" to explicitly use no parent. If not specified, <literal>BRANCH</literal> is used as parent (no parent in case <literal>BRANCH</literal> does not exist).
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--tree</option>="dir=PATH" or "tar=TARFILE" or "ref=COMMIT"</term>
<listitem><para>
Overlay the given argument as a tree. When committing an archive, the TARFILE can be specified as <literal>-</literal> to read the archive from standard input.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--base</option>="REV"</term>
<listitem><para>
Start from the content in a commit. This differs from <literal>--tree=ref=REV</literal> in that no commit modifiers are applied. This is usually what you want when
creating a derived commit. This is also used for <literal>--selinux-policy-from-base</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--add-metadata-string</option>="KEY=VALUE"</term>
<listitem><para>
Add a key/value pair to metadata. Can be specified multiple times.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--add-metadata</option>="KEY=VALUE"</term>
<listitem><para>
Add a key/value pair to metadata, where the KEY is a string, and VALUE is g_variant_parse() formatted. Can be specified multiple times.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--keep-metadata</option>="KEY"</term>
<listitem><para>
Keep metadata KEY and its associated VALUE from parent. Can be specified multiple times.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--add-detached-metadata-string</option>="KEY=VALUE"</term>
<listitem><para>
Add a key/value pair to detached metadata.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--owner-uid</option>="UID"</term>
<listitem><para>
Set file ownership user id.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--owner-gid</option>="GID"</term>
<listitem><para>
Set file ownership group id.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--no-xattrs</option></term>
<listitem><para>
Do not import extended attributes.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--selinux-labeling-epoch</option>0 | 1</term>
<listitem><para>
When SELinux labeling is enabled, epoch <literal>1</literal> ensures that <literal>/usr/etc</literal> is labeled as if it was <literal>/etc</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--bootable</option></term>
<listitem><para>
Inject standard metadata for a bootable Linux filesystem tree.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--link-checkout-speedup</option></term>
<listitem><para>
Optimize for commits of trees composed of hardlinks into the repository.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--tar-autocreate-parents</option></term>
<listitem><para>
When loading tar archives, automatically create parent directories as needed.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--skip-if-unchanged</option></term>
<listitem><para>
If the contents are unchanged from previous commit, do nothing.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--consume</option></term>
<listitem><para>
When committing from a local directory (i.e. not an archive or --tree=ref),
assume ownership of the content. This may simply involve deleting it,
but if possible, the content may simply be <literal>rename()</literal>ed
into the repository rather than creating a new copy.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--statoverride</option>="PATH"</term>
<listitem><para>
File containing list of modifications to make permissions (file mode in
decimal, followed by space, followed by file path). The specified mode
is ORed with the file's original mode unless preceded by "=".
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--skip-list</option>="PATH"</term>
<listitem><para>
File containing list of file paths to skip (one path per line).
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--table-output</option></term>
<listitem><para>
Output more information in a KEY: VALUE format.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--generate-sizes</option></term>
<listitem><para>
Generate size information along with commit metadata.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--gpg-sign</option>="KEY-ID"</term>
<listitem><para>
GPG Key ID with which to sign the commit (if have GPGME - GNU Privacy Guard Made Easy).
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--gpg-homedir</option>="HOMEDIR"</term>
<listitem><para>
GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy).
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--timestamp</option>="TIMESTAMP"</term>
<listitem><para>
Override the timestamp of the commit to TIMESTAMP.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--orphan</option></term>
<listitem><para>
Create a commit without writing to a ref (branch)
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--fsync</option>="POLICY"</term>
<listitem><para>
POLICY is a boolean which specifies whether fsync should be used or not. Default to true.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-s, --sign-type</option></term>
<listitem><para>
Use particular signature engine. Currently
available <arg choice="plain">ed25519</arg>, <arg choice="plain">spki</arg>, and <arg choice="plain">dummy</arg>
signature types.
The default is <arg choice="plain">ed25519</arg>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--sign-from-file</option>="PATH"</term>
<listitem><para>
This will read a key (corresponding to the provided <literal>--sign-type</literal> from the provided path. The encoding of the key depends on
signature engine. For ed25519 the key should be base64 encoded, for spki it should be in PEM format, and for dummy it should be an ASCII-string.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--sign</option>="KEY-ID"</term>
<listitem><para>
In new code, avoid using this because passing private keys via command line arguments
are prone to leakage in logs and process listings.
</para>
<para>
The <literal>KEY-ID</literal> is:
<variablelist>
<varlistentry>
<term><option>for ed25519 and spki:</option></term>
<listitem><para>
<literal>base64</literal>-encoded secret key for commit signing.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>for dummy:</option></term>
<listitem><para>
ASCII-string used as secret key.
</para></listitem>
</varlistentry>
</variablelist>
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Example</title>
<para><command>$ ostree commit --branch=my-branch --subject="Initial commit"</command></para>
<programlisting>
67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
</programlisting>
</refsect1>
</refentry>
|