summaryrefslogtreecommitdiff
path: root/Makefile-ostree.am
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* bin/remote: Rename list-gpg-keys to gpg-list-keysDan Nicholson2021-08-231-1/+1
| | | | | | | | | | | | | | | As pointed out in the original review, `gpg-list-keys` fits better alongside the existing `gpg-import`. Changes were done with: ``` git grep -l list-gpg-keys | xargs sed -i 's/list-gpg-keys/gpg-list-keys/' for src in $(git ls-files '*list-gpg-keys*'); do dst=${src/list-gpg-keys/gpg-list-keys} git mv "$src" "$dst" done ```
* bin/remote: Add list-gpg-keys subcommandDan Nicholson2021-07-151-0/+1
| | | | | | | | This provides a wrapper for the `ostree_repo_remote_get_gpg_keys` function to show the GPG keys associated with a remote. This is particularly useful for validating that GPG key updates have been applied. Tests are added, which checks the `ostree_repo_remote_get_gpg_keys` API by extension.
* build-sys: Remove --enable-experimental-apiColin Walters2021-04-071-5/+0
| | | | | | | | | It was added for the collections bits, but we made that stable. It's now just cruft and we're very unlikely to reuse the infrastructure again. Motivated by a unit test failure when running from a tarball: https://github.com/ostreedev/ostree/issues/2313
* 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>
* lib/sign: initial implementationDenis Pynkin2020-03-251-5/+5
| | | | | | | | | | | Added the initial version of signing interface allowing to allowing to sign and verify commits. Implemented initial signing modules: - dummy -- simple module allowing to sign/verify with ASCII string - ed25519 -- module allowing to sign/verify commit with ed25519 (EdDSA) signature scheme provided by libsodium library. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
* Add libsodium dependencyDenis Pynkin2020-03-251-0/+4
| | | | | | Allow to configure with libsodium flag. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
* Avoid race condition when building outside of source treeStefan Agner2019-11-261-0/+1
| | | | | | | | | When building outside of source tree it can happen that src/ostree/ does not exist (yet) when bison is called. This leads to an build error like so: bison: src/ostree/parse-datetime.c: cannot open: No such file or directory Make sure that src/ostree/ exists when parse-datetime.c is built.
* Revert "Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD"Alex Kiernan2019-10-191-2/+1
| | | | This reverts commit 83d44ac20ae80d74e05d89744fd1fbd4f45b7fba.
* Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPDAlex Kiernan2019-10-091-1/+2
| | | | | | | When building without --enable-trivial-httpd-cmdline, don't build or install the ostree-trivial-httpd binary. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
* build: Conditionally build GPGME-related sourcesDenis Pynkin2019-08-011-2/+12
| | | | | | | | | Do not build GPGME-related sources if flag USE_GPGME is not defined. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> Closes: #1889 Approved by: cgwalters
* lib/kargs: Make API public and upstream new rpm-ostree APIsAllen Bai2019-06-181-1/+1
| | | | | | | | | | | | | | | | This change makes public the current kargs API in src/libostree/ostree-kernel-args.c and adds documentations. Upstreams the new kargs API from rpm-ostree/src/libpriv/rpmostree-kargs-process.c Merges libostree_kernel_args_la_SOURCES to libostree_1_la_SOURCES in Makefile-libostree.am Upstreams tests/check/test-kargs.c from rpm-ostree. Closes: #1833 Closes: #1869 Approved by: jlebon
* Make P2P API public (no longer experimental)Matthew Leeds2018-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* build: Don't distribute Bison-generated parser in dist tarballsSimon McVittie2018-04-301-0/+3
| | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Closes: #1563 Approved by: cgwalters
* Add concept of "staged" deploymentColin Walters2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add API to write a deployment state to `/run/ostree/staged-deployment`, along with a systemd service which runs at shutdown time. This is a big change to the ostree model for hosts, but it closes a longstanding set of bugs; many, many people have hit the "losing changes in /etc" problem. It also avoids the other problem of racing with programs that modify `/etc` such as LVM backups: https://bugzilla.redhat.com/show_bug.cgi?id=1365297 We need this in particular to go to a full-on model for automatically updated host systems where (like a dual-partition model) everything is fully prepared and the reboot can be taken asynchronously. Closes: https://github.com/ostreedev/ostree/issues/545 Closes: #1503 Approved by: jlebon
* sysroot: Add concept of deployment "pinning" đź“ŚColin Walters2018-02-261-0/+1
| | | | | | | | | | | | | Example user story: Jane rebases her OS to a new major version N, and wants to keep around N-1 even after a few upgrades for a while so she can easily roll back. I plan to add `rpm-ostree rebase --pin` to opt-in to this for example. Builds on the new `libostree-transient` group to store pinning state there. Closes: https://github.com/ostreedev/ostree/issues/1460 Closes: #1464 Approved by: jlebon
* 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
* create-usb: Add a create-usb command to complement OstreeRepoFinderMountPhilip Withnall2017-09-271-1/+4
| | | | | | | | | | 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
* find-remotes: Add a find-remotes built-in commandPhilip Withnall2017-06-261-0/+4
| | | | | | | | | | | 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
* libostree: add versioning macrosGeorges Basile Stavracas Neto2017-03-111-1/+1
| | | | | | | | | | | | | | | | | OSTree currently provides no way to inspect the versioning information at run time, being only available at compile time through pkg-config. This is a problem for e.g. Flatpak, that needs to check whether the 'update-frequency' option is available. Checking at compile time isn't great since it's not looking for new symbols, but only if an optional feature is present. This commit, then, adds a new header that is generated at compile time, exposing OSTree's versioning information. Closes: #728 Approved by: cgwalters
* libcurl backendColin Walters2017-02-091-10/+20
| | | | | | | | | | | | | | | | | | | | | For rpm-ostree, we already link to libcurl indirectly via librepo, and only having one HTTP library in process makes sense. Further, libcurl is (I think) more popular in the embedded space. It also supports HTTP/2.0 today, which is a *very* nice to have for OSTree. This seems to be working fairly well for me in my local testing, but it's obviously brand new nontrivial code, so it's going to need some soak time. The ugliest part of this is having to vendor in the soup-url code. With Oxidation we could follow the path of Firefox and use the [Servo URL parser](https://github.com/servo/rust-url). Having to redo cookie parsing also sucked, and that would also be a good oxidation target. But that's for the future. Closes: #641 Approved by: jlebon
* Split trivial-httpd into separate binaryColin Walters2017-01-041-5/+8
| | | | | | | | | | | | | | | | | | Working on the libcurl backend, I hit the issue that the trivial-httpd program depends on libsoup. I briefly considered having two versions, but libcurl is client only, and moreover trivial-httpd is no longer trivial - it has various features which are used by the test suite extensively. Hence, what we'll do is build it as a separate binary which links to libsoup, and use it during the tests. We *also* currently still provide `ostree trivial-httpd` since some things use it like `rpm-ostree-toolbox` and the Cockpit tests. After those are ported to use some other webserver, I plan to add a build-time option to drop it. Closes: #636 Approved by: jlebon
* build-sys: Minor makefile tweaksColin Walters2017-01-041-5/+7
| | | | | | | | | | | I'm introducing a new binary in a later patch, and it makes sense to move more things to be common into the common section. Also I noticed we were missing an inclusion of common `$(AM_LDFLAGS)`, though AFAIK this doesn't break anything right now. Closes: #636 Approved by: jlebon
* build: Make libsoup optional againColin Walters2016-12-081-3/+8
| | | | | | | | | | The "remote cookies" code broke this. While I'm not sure anyone is actually using ostree-without-http, it isn't too hard to keep the build time conditional going. Further, this work is preparatory for libcurl porting. Closes: #621 Approved by: jlebon
* remote: Add commands to add and remove cookies for a remoteSjoerd Simons2016-11-051-0/+2
| | | | | | | Add commands to add and remove cookies to a remotes cookie jar. Closes: #531 Approved by: cgwalters
* remote: Add command to list cookiesSjoerd Simons2016-11-051-0/+1
| | | | | Closes: #531 Approved by: cgwalters
* lib: Use sd_journal directly (optionally)Colin Walters2016-06-211-1/+1
| | | | | | | | | | | | | | This was the last caller of libgsystem that isn't `gs_file_get_path_cached()`. I think the use case ostree has where the same code can be called via command line and via a shared library *and* via a daemon is rather unusual, so let's just copy the code for logging from libgsystem into here. For example rpm-ostree hard depends on a daemon mode, so it'll just use `sd_journal` directly. Closes: #341 Approved by: jlebon
* admin: Add an `unlock` command, and libostree APIColin Walters2016-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm trying to improve the developer experience on OSTree-managed systems, and I had an epiphany the other day - there's no reason we have to be absolutely against mutating the current rootfs live. The key should be making it easy to rollback/reset to a known good state. I see this command as useful for two related but distinct workflows: - `ostree admin unlock` will assume you're doing "development". The semantics hare are that we mount an overlayfs on `/usr`, but the overlay data is in `/var/tmp`, and is thus discarded on reboot. - `ostree admin unlock --hotfix` first clones your current deployment, then creates an overlayfs over `/usr` persistent to this deployment. Persistent in that now the initramfs switchroot tool knows how to mount it as well. In this model, if you want to discard the hotfix, at the moment you roll back/reboot into the clone. Note originally, I tried using `rofiles-fuse` over `/usr` for this, but then everything immediately explodes because the default (at least CentOS 7) SELinux policy denies tons of things (including `sshd_t` access to `fusefs_t`). Sigh. So the switch to `overlayfs` came after experimentation. It still seems to have some issues...specifically `unix_chkpwd` is broken, possibly because it's setuid? Basically I can't ssh in anymore. But I *can* `rpm -Uvh strace.rpm` which is handy. NOTE: I haven't tested the hotfix path fully yet, specifically the initramfs bits.
* build: Link ostree with libarchiveJoaquim Rocha2016-02-221-0/+5
| | | | | | | libarchive (when available) is being used in ot-builtin-export.c so it is necessary to link ostree with it. https://bugzilla.gnome.org/show_bug.cgi?id=762457
* 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.
* build: 'make clean' removes parse-datetime.cGiuseppe Scrivano2016-02-071-0/+2
| | | | | | and fix make dist while at it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* remote: Add "ostree remote summary" commandMatthew Barnes2015-12-171-1/+2
| | | | | | | | Downloads and prints a remote summary file and any signatures in an easy-to-read format, or alternatively with the --raw option, prints the summary GVariant data directly. https://bugzilla.gnome.org/show_bug.cgi?id=759250
* build: Delete generated parse-datetime.c file, use AM_V_GENColin Walters2015-12-071-2/+2
| | | | | | | | Bison is a well known external dependency, so just require it. Including the generated content in git means it may or may not be regenerated based randomly on timestamps, etc. Also use `$(AM_V_GEN)` so we get prettier output.
* parse-datetime: use the module from gnulibGiuseppe Scrivano2015-12-041-0/+4
| | | | | | | | | | | | | Use the parse-datetime module from gnulib, and adapt it to not require other modules as portability is not really an issue for us. DATE can be specified in different formats, such as: "-1 week", "last monday", "1 week ago". Include the generated .c file in the repository so to not add another dependency to Bison. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* prune: add --keep-younger-than=DATEGiuseppe Scrivano2015-11-161-0/+2
| | | | | | The format used for DATE is "%Y-%m-%d %H:%M:%S %z" Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* ostree: Add a "remote refs" commandMatthew Barnes2015-06-261-0/+1
| | | | | | | Works like "ostree refs" but fetches refs from a remote repo. This depends on the remote repo having a summary file, but any repo being served over HTTP *ought* to have one.
* ostree: Add a "remote gpg-import" commandMatthew Barnes2015-05-131-0/+1
| | | | Imports GPG keys into a remote-specific keyring.
* ostree: Split up "remote" subcommandsMatthew Barnes2015-05-011-0/+9
| | | | | | | To make room for "remote gpg-import", which will be non-trivial. ot-builtin-remote.c was already a little too crowded anyway. Also while we're at it, port this bit of code away from libgsystem.
* src: Move ot-tool-util from ostree/ to libotutil/Giuseppe Scrivano2015-03-061-2/+0
| | | | | | These utilities are not actually specific to the ostree commandline. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Add bsdiff submoduleGiuseppe Scrivano2015-03-031-1/+1
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* ostree: Add gpg-sign commandMatthew Barnes2015-02-261-0/+1
| | | | Signs a commit with one or more GPG keys.
* Use libglnxColin Walters2015-02-221-2/+2
| | | | | | Starting down the path of not using libgsystem. The main win here will be code sharing between ostree/rpm-ostree as well as going down the path of not using GFile * for local files.
* admin: Add set-origin commandColin Walters2015-01-191-0/+1
| | | | | | | | See projectatomic/rpm-ostree#42 for rationale. There are two high level use cases: - If the OS comes unconfigured, this is a way to point it at a repo of your choice. - To switch between repositories while keeping the same branch easily.
* checkout: Add --fsync=falseColin Walters2015-01-071-0/+2
| | | | | | | | | | | Some use cases for checkouts don't need to fsync during checkout. Installer programs for example will just do a global fsync at the end. In the future, the default "ostree admin" core could also be rearchitected to only do a transaction commit right before reboot, and do the fsync then. https://bugzilla.gnome.org/show_bug.cgi?id=742482
* Add ostree_repo_pull_default_console_progress_changed()Matthew Barnes2014-12-181-2/+0
| | | | | Replaces ot_common_pull_progress() in ostree binary, so it can be shared with rpm-ostree.
* libostree: Add initial GRUB2 supportColin Walters2014-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | In this approach, we drop a /etc/grub.d/15_ostree file which is a hybrid of shell/C that picks up bits from the GRUB2 library (e.g. the block device script generation), and then calls into libostree's GRUB2 code which knows about the BLS entries. This is admittedly ugly. There exists another approach for GRUB2 to learn the BLS specification. However, the spec has a few issues: https://www.redhat.com/archives/anaconda-devel-list/2014-July/msg00002.html This approach also gives a bit more control to the admin via the naming of the 15_ostree symlink; they can easily disable it: Or reorder the ostree entries ahead of 10_linux: Also, this approach doesn't require patches for grub2, which is an issue with the pressure to backport (rpm-)OSTree to EL7.
* build: Unify CPPFLAGS settingsColin Walters2014-09-081-1/+0
| | | | | | | The libostree core uses SYSCONFDIR now, so we should ensure it's used consistently. Someone else was seeing SYSCONFDIR not being defined while compiling with a newer automake version, which may process CPPFLAGS more precisely.
* 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
* Support /etc/ostree/remotes.dColin Walters2014-05-081-1/+3
| | | | | | | | | | | | | | | For many OS install scenarios, one runs through an installer which may come with embedded data, and then the OS is configured post-install to receive updates. In this model, it'd be nice to avoid the post-install having to rewrite the /ostree/repo/config file. Additionally, it feels weird for admins to interact with "/ostree" - let's make the system feel more like Unix and have our important configuration in /etc. https://bugzilla.gnome.org/show_bug.cgi?id=729343
* Use external libgsystem 2014.2Colin Walters2014-04-041-1/+1
| | | | | | | It's been split off for a while, let's kill the code duplication. Among other things, this fixes the systemd detection for the journal logging.