summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtins.h
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: Run clang-formatColin Walters2023-05-021-29/+31
| | | | | This is a one-time tree wide reformatting to ensure consistency going forward.
* tree-wide: Fix various include ordering issuesColin Walters2023-05-011-0/+1
| | | | This fixes the build with `clang-format`.
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* sign: add new builtin for signingDenis Pynkin2020-03-251-0/+1
| | | | | | | | | | | | | | | | | This builtin allows to sign and verify commit with new signature mechanism. At the moment it is possible to use 'dummy' and 'ed25519' signing modules. 'dummy' module use any ASCII string from command line as a key for commit's signing or verification. Support of ed25519 signature is implemented with `libsoium` library. Secret and public key should be provided in hex presentation via command line. Based on 'gpg-sign' source. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
* gpg: conditionally build GPG-related code for sign/verificationDenis Pynkin2019-08-011-0/+2
| | | | | | | | | | | | Do not build the code related to GPG sign and verification if GPGME support is disabled. Public functions return error 'G_IO_ERROR_NOT_SUPPORTED' in case if gpg-related check is rquested. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> Closes: #1889 Approved by: cgwalters
* Make P2P API public (no longer experimental)Matthew Leeds2018-06-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the API that allows P2P operations (e.g. pulling an ostree ref from a LAN or USB source) is hidden behind the configure flag --enable-experimental-api. This commit makes the API public and makes that flag essentially a no-op (leaving it in place in case we want to use it again in the future). The P2P API has been tested over the last several months and proven to work. This means that since we're no longer using the "experimental" feature flag, P2P builds of Flatpak will fail when using versions of OSTree from this commit onwards, until Flatpak is patched in the near future. If you want to build Flatpak < 0.11.8 with P2P enabled and link against OSTree 2018.6, you'll have to patch Flatpak. However, since Flatpak won't yet have a hard dependency on OSTree 2018.6, it needs a new way to determine if the P2P API in OSTree is available, so this commit adds a "p2p" feature flag. This way the feature set is more semantically correct than if we had continued to use the "experimental" feature flag. In addition to making the P2P API public, this commit makes the P2P unit tests run by default, removes the f27-experimental CI instance that's no longer needed, changes a few man pages to reflect the changes, and updates the bash completion script to accept the new commands and options. Closes: #1596 Approved by: cgwalters
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* ostree: move flags into command struct, pass down through builtinsRuixin Bao2017-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | This is a similar approach as https://github.com/projectatomic/rpm-ostree/commit/12c34bb2491a07079c911ef26401fee939e5573c. One thing to note is when we parse the admin related functions, we still keep the old admin related flags, and added a new parameter to represent the command struct. This allows us to identify the caller of the function, making it easier for us to possibly deduplicate the subcommand handling in the future. A similar approach is done in rpm-ostree: https://github.com/projectatomic/rpm-ostree/commit/83aeb018c1012c7a43783c09b74ec71bc9c45826 This also makes it easier for us to change the prototype of the function. If we want to add something new in the future, we won't need to touch every prototype. Closes: #1267 Approved by: cgwalters
* create-usb: Add a create-usb command to complement OstreeRepoFinderMountPhilip Withnall2017-09-271-0/+1
| | | | | | | | | | This can be used to put OSTree repositories on USB sticks in a format recognised by OstreeRepoFinderMount. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1182 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* find-remotes: Add a find-remotes built-in commandPhilip Withnall2017-06-261-0/+5
| | | | | | | | | | | This is a wrapper around the new ostree_repo_find_remotes() method; it tries to find available remotes which can serve updates for the user-provided refs. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* Add an `export` builtin, and API to write to libarchiveColin Walters2016-02-141-0/+1
| | | | | | | | | | At the moment I'm looking at using rpm-ostree to manage RPM inputs which can then be converted into Docker images. It's most convenient if we can stream directly out of libostree rather than doing a checkout + tar combination. There are also backup/debugging etc. reasons to implement `export` as well.
* ostree: Add gpg-sign commandMatthew Barnes2015-02-261-0/+1
| | | | Signs a commit with one or more GPG keys.
* syntax-check: Remove empty lines at the end of fileGiuseppe Scrivano2015-02-021-1/+0
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Refactor command-line parsingMatthew Barnes2014-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor command-line parsing to better utilize GOptionContext. This eliminates most of the manual parsing and global options are now shown in the help output. Here's a sample: $ ostree admin --help Usage: ostree admin [OPTION...] --print-current-dir|COMMAND Builtin "admin" Commands: cleanup config-diff deploy init-fs instutil os-init status switch undeploy upgrade Help Options: -h, --help Show help options Application Options: --sysroot=PATH Create a new OSTree sysroot at PATH -v, --verbose Print debug information during command processing --version Print version information and exit https://bugzilla.gnome.org/show_bug.cgi?id=740295
* Add repository "summary" file and metalink supportColin Walters2014-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | For Fedora and potentially other distributions which use globally distributed mirrors, metalink is a popular solution to redirect clients to a dynamic set of mirrors. In order to make metalink work though, it needs *one* file which can be checksummed. (Well, potentially we could explode all refs into the metalink.xml, but that would be a lot more invasive, and a bit weird as we'd end up checksumming the checksum file). This commit adds a new command: $ ostree summary -u To regenerate the summary file. Can only be run by one process at a time. After that's done, the metalink can be generated based on it, and the client fetch code will parse and load it. https://bugzilla.gnome.org/show_bug.cgi?id=729585
* Initial basic static delta code dropColin Walters2014-02-041-0/+1
| | | | | | | | | This has a very basic level of functionality (deltas can be generated, and applied offline). There is only some stubbed out pull code to fetch them via HTTP. But, better to commit this now and improve it from a known starting point, rather than have it languish in a branch.
* main: Code cleanup by passing OstreeRepo * directly to builtinsColin Walters2013-08-251-2/+2
| | | | | | | | | | It turns out every builtin (with one special exception) that takes a repo argument did the same thing; let's just centralize it. The special exception was "ostree init --repo=foo" where foo is expected to *not* actually be a repo. In that case, simply skip the ostree_repo_check() invocation. https://bugzilla.gnome.org/show_bug.cgi?id=706762
* main: Use macro to reduce duplication among builtin prototypesColin Walters2013-08-191-21/+25
| | | | Just less code.
* Add 'ostree reset' command to undo a bad commitStef Walter2013-08-161-0/+1
| | | | | | | | | Accepts the following arguments: ref checksum Checks that the checksum is a parent of the ref before rewriting the ref. https://bugzilla.gnome.org/show_bug.cgi?id=705979
* Add 'ostree log' commandStef Walter2013-08-151-0/+1
| | | | | | | Follows the parent of commits showing each in turn until it reaches the top of the commit tree. https://bugzilla.gnome.org/show_bug.cgi?id=705973
* main: Drop log builtinColin Walters2013-07-231-1/+0
| | | | | | | | | We may revive this later, but commits in their current form aren't very useful for humans to read, so it doesn't make sense to have a tool to show a history of useless stuff. More interesting things are diffs between commits, object statistics, etc.
* main: Move GCancellable to toplevelColin Walters2013-07-161-20/+20
| | | | | This is just cleaner, and makes the builtins slightly more of a library, which in turn makes it easier to turn them into real API.
* Switch to #pragma once for headersColin Walters2013-07-091-3/+1
| | | | It's just less tedious, and we're GCC/LLVM specific anyways.
* Add "trivial-httpd" builtin, use it in testsColin Walters2013-07-051-0/+1
| | | | | | | | | A simple HTTP server implementation is so few lines of code when one is linking to libsoup anyways, so let's just have one here in ostree that will be used for the test suite. This allows us to run the archive tests that previously required apache even in gnome-ostree.
* Add "refs" builtinColin Walters2013-06-291-0/+1
| | | | This is just useful to look at before pruning, etc.
* Fold ostree-pull into main binaryColin Walters2013-05-301-0/+1
| | | | | | The rationale for the separation was always kind of weak; I want to refactor the command line argument parsing, and it was complicating things.
* core: Drop packfiles as they are nowColin Walters2012-09-231-2/+0
| | | | | | | | They're not a large efficiency win at the moment, because we don't do any delta compression. At the moment, they simply served to compress data, but we will change the archive mode to do that by default.
* Move "ostadmin" => "ostree admin"Colin Walters2012-09-081-0/+1
| | | | This helps us avoid polluting the global binary namespace.
* core: Add write-refs builtinColin Walters2012-05-141-0/+1
| | | | This will be used by import-tree to pipe refs to write.
* core: Rename local-clone to pull-localColin Walters2012-05-011-1/+1
| | | | | Also change it to copy selective refs, rather than enumerating all objects.
* core: Add ability for repositories to have a "parent"Colin Walters2012-04-181-0/+1
| | | | | | This will be useful for ostbuild; a user can create their own archive mode repository which transparently inherits objects from the root-owned one in /ostree.
* core: Drop 'compose' builtinColin Walters2012-04-111-1/+0
| | | | We'll just add this functionality to commit.
* core: Add pack filesColin Walters2012-03-311-0/+2
| | | | | | This concept is also directly inspired by git. At present, our implementation is quite similar, except we don't have delta compression.
* core: Add 'cat' builtinColin Walters2012-03-061-0/+1
|
* core: Add "prune" builtinColin Walters2012-02-241-0/+1
| | | | | | | | | | This should be useful on clients to trim old refs. For example, after an upgrade the system could do: ostree --repo=/ostree/repo prune --depth=2 gnomeos-3.4-i686-runtime This would remote all objects that aren't in the current build and the previous one.
* core: Move triggers into separate binary: ostree-run-triggersColin Walters2012-01-131-1/+0
| | | | | | I'm trying to keep ostree as being closer to just being the versioning filesystem, so let's split out the triggers into a different binary (although still namespaced ostree-).
* core: Use GFile for repo constructor API, and a bit more internallyColin Walters2011-12-221-15/+15
| | | | | Also, ensure that the repo directory GFile is absolute - this avoids a getcwd() syscall every time we construct a GFile object.
* core: Split pull functionality into separate ostree-pull binaryColin Walters2011-11-301-12/+0
| | | | This is to avoid everything depending on libsoup.
* core: Add ls builtinColin Walters2011-11-271-0/+1
|
* core: Add local-clone builtinColin Walters2011-11-181-0/+1
| | | | | This is useful for converting between e.g. archive and non-archive repositories.
* core: Add checksum builtinColin Walters2011-11-181-0/+2
| | | | | This necessitated reworking things so that builtins can specify no --repo is required.
* build: Move sources into src/ againColin Walters2011-11-141-0/+55
This is necessary if we want to build when srcdir == builddir, otherwise we blow up because "ostree" is a source directory and a binary.