summaryrefslogtreecommitdiff
path: root/Makefile-libostree.am
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* Remove OstreeTlsCertInteraction bits from introspectionColin Walters2021-10-061-1/+1
| | | | | | | | We filter out everything named `-private.h` from scanning, which differs from the gtk-doc exclude. Eventually this will be solved when we switch to the new gir-based docs. Came up in https://github.com/ostreedev/ostree-rs/pull/34#discussion_r723337772
* Release 2021.5v2021.5Colin Walters2021-10-051-3/+3
|
* repo: Add an API to init `OstreeSePolicy` from commit directlyColin Walters2021-09-301-3/+3
| | | | | | | | | | This is part of `OstreeCommitModifier`, but I'm not using that in some of the ostree-ext Rust code. It just makes more sense as a direct policy API, where it should have been in the first place. There's already support for setting a policy object on a commit modifier, so that's all the old API needs to do now.
* configure: post-release version bumpColin Walters2021-09-081-3/+3
|
* lib/repo: Add ostree_repo_remote_get_gpg_keys()Dan Nicholson2021-07-151-3/+3
| | | | | | | | | | | | | | | | This function enumerates the trusted GPG keys for a remote and returns an array of `GVariant`s describing them. This is useful to see which keys are collected by ostree for a particular remote. The same information can be gathered with `gpg`. However, since ostree allows multiple keyring locations, that's only really useful if you have knowledge of how ostree collects GPG keyrings. The format of the variants is documented in `OSTREE_GPG_KEY_GVARIANT_FORMAT`. This format is primarily a copy of selected fields within `gpgme_key_t` and its subtypes. The fields are placed within vardicts rather than using a more efficient tuple of concrete types. This will allow flexibility if more components of `gpgme_key_t` are desired in the future.
* Release 2021.3v2021.3Luca BRUNO2021-07-121-3/+3
|
* repo: Make locking APIs publicColin Walters2021-06-051-3/+3
| | | | | | | | Doing anything even somewhat sophisticated requires this; turns out our own `ostree prune` CLI wants this, e.g. https://github.com/ostreedev/ostree/issues/2337 Closes: https://github.com/ostreedev/ostree/issues/2286
* Release 2021.2v2021.2Colin Walters2021-04-151-3/+3
|
* repo: Add ostree_repo_write_regfileColin Walters2021-04-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This API is push rather than pull, which makes it much more suitable to use cases like parsing a tar file from external code. Now, we have a large mess in this area internally because the original file writing code was pull based, but static deltas hit the same problem of wanting a push API, so I added this special `OstreeRepoBareContent` just for writing regular files from a push API. Eventually...I'd like to deprecate the pull based API, and rework things so that for regular files the push API is the default, and then `write_content_object()` would be split up into archive/bare cases. In this world the `ostree_repo_write_content()` API would then need to hackily bridge pull to push and it'd be less efficient. Anyways for now due to this bifurcation, this API only works on non-archive repositories, but that's fine for now because that's what I want for the `ostree-ext-container` bits.
* Merge pull request #2327 from cgwalters/writing-apisColin Walters2021-04-081-3/+3
|\ | | | | repo: Add ostree_repo_write_regfile_inline
| * repo: Add ostree_repo_write_regfile_inlineColin Walters2021-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working on ostree-ext and importing from tar, it's quite inefficient and awkward for small files to end up creating a whole `GInputStream` and `GFileInfo` and etc. for small files. Plus the gtk-rs binding API to map from `impl Read` to Gio https://docs.rs/gio/0.9.1/gio/struct.ReadInputStream.html requires that the input stream is `Send` but the Rust `tar` API isn't. This is only 1/3 of the problem; we also need similar APIs to directly create a symlink, and to stream large objects via a push-based API.
* | build-sys: Remove --enable-experimental-apiColin Walters2021-04-071-13/+1
|/ | | | | | | | | 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
* Release 2021.1v2021.1Colin Walters2021-03-231-3/+3
|
* Drop minimal rust/ libraryColin Walters2021-03-181-12/+0
| | | | | | | | | | | | | | | | | | | This was my first experiment with using Rust in this way; I gained a lot of knowledge from it. But, we don't really gain anything from the code as it is today - while it is "bit fiddling" code, the C code is well tested. We have a lot of compile-time options, and trimming them will be helpful. We've also gotten pushback on hard requiring Rust client side. Instead, what I'd like to do is hopefully soon create an `ostree-system` crate that uses the existing `ostree` library and can contain code drained from the rpm-ostree Rust and used by other projects perhaps. So the goal here is really more Rust, but we need to focus our efforts on where it's most valuable.
* Add an API+CLI to inject metadata for bootable OSTree commitsColin Walters2021-03-121-4/+5
| | | | | | | | | | | | | | | | | | | | | I was doing some rpm-ostree work and I wanted to compare two OSTree commits to see if the kernel has changed. I think this should be a lot more natural. Add `ostree commit --bootable` which calls into a new generic library API `ostree_commit_metadata_for_bootable()` that discovers the kernel version and injects it as an `ostree.linux` metadata key. And for extra clarity, add an `ostree.bootable` key. It's interesting because the "core" OSTree layer is all about generic files, but this is adding special APIs around bootable OSTree commits (as opposed to e.g. flatpak as well as things like rpm-ostree's pkgcache refs). Eventually, I'd like to ensure everyone is using this and hard require this metadata key for the `ostree admin deploy` flow - mainly to prevent accidents.
* repo: Move fsverity bits to ostree-repo-verity.cColin Walters2021-01-111-0/+1
| | | | This file will get larger when we start doing more with fsverity.
* Release 2020.8v2020.8Luca BRUNO2020-11-171-3/+6
|
* deltas: Add ostree_repo_list_static_delta_indexes() functionAlexander Larsson2020-10-231-3/+3
| | | | This lists all the available delta indexes.
* Merge pull request #2205 from pwithnall/etags-and-last-modifiedOpenShift Merge Robot2020-10-221-0/+2
|\ | | | | Add support for ETag and Last-Modified headers for summary and summary.sig
| * tests: Split RFC 2616 date parsing code out and add testsPhilip Withnall2020-10-221-0/+2
| | | | | | | | | | | | | | This makes it testable, and increases its test coverage too 100% of lines, as measured by `make coverage`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | Post-release version bumpColin Walters2020-10-131-3/+3
|/
* Makefile-libostree.am: Uncomment BUILDOPT_IS_DEVEL_BUILD conditionalJonathan Lebon2020-09-251-2/+2
| | | | | We shouldn't have to toggle the conditional itself during release builds. It should only evaluate to true during devel builds.
* lib/deltas: Add signature check API for static-delta superblockFrédéric Danis2020-09-141-1/+1
| | | | | | | This retrieves the signatures and pass the static delta block as an array of bytes to ostree_sign_data_verify(). Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
* Post-release version bumpColin Walters2020-07-221-3/+3
|
* lib: Move gpg/signapi bits into ostree-repo-pull-verify.cColin Walters2020-04-181-0/+1
| | | | | `ostree-repo-pull.c` is huge; separate some of the GPG/signing verification functions into their own file so they're more easily seen.
* lib/sign: initial implementationDenis Pynkin2020-03-251-0/+14
| | | | | | | | | | | 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>
* build: fix systemd feature advertisementAlex Kiernan2020-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 17db0f15a798 ("configure: add option for libsystemd") exposed --without-libsystemd to allow systemd to be disabled even if the systemd pkgconfig script was present, introducing a new variable with_libsystemd; there are now three, almost identical variables: - with_libsystemd [yes, no, maybe] - controlled by --without-libsystemd, resolved into yes/no by the initial checks - have_libsystemd [yes, no, <undefined>] - only set if with_libsystemd is yes/maybe, otherwise undefined - with_systemd [yes, <undefined>] - yes if have_systemd is yes, otherwise undefined with_systemd is the earliest variable and was previously set by a set of checks for dracut and mkinitcpio. These checks were changed for a systemd check in 9e2763106be0 ("lib: Use sd_journal directly (optionally)"). This commit also introduced BUILDOPT_LIBSYSTEMD, which will always match BUILDOPT_SYSTEMD. Fix the confusion by removing with_systemd which will always be yes when with_libsystemd=yes, or undefined if with_libsystemd=no. We can ignore the with_libsystemd=maybe case because it will always be resolved into yes/no before with_systemd is set. And replace all uses of BUILDOPT_SYSTEMD with BUILDOPT_LIBSYSTEMD, since they again always match. This fixes both the advertised features and the summary output when systemd is disabled by using with_libsystemd which is always defined. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Fixes: 5c62a7e4d0a5 ("build: Expose systemd in OSTREE_FEATURES") Fixes: 17db0f15a798 ("configure: add option for libsystemd") Supersedes: #1992
* bootloader: Add a zipl bootloader backendColin Walters2019-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | zipl is a bit special in that it parses the BLS config files directly *but* we need to run the command to update the "boot block". Hence, we're not generating a separate config file like the other backends. Instead, extend the bootloader interface with a `post_bls_sync` method that is run in the same place we swap the `boot/loader` symlink. We write a "stamp file" in `/boot` that says we need to run this command. The reason we use stamp file is to prevent the case where the system is interrupted after BLS file is updated, but before zipl is triggered, then zipl boot records are not updated. This opens the door to making things eventually-consistent/reconcilable by later adding a systemd unit to run `zipl` if we're interrupted via a systemd unit - I think we should eventually take this approach everywhere rather than requiring `/boot/loader` to be a symlink. Author: Colin Walters <walters@verbum.org> Tested-by: Tuan Hoang <tmhoang@linux.ibm.com> Co-Authored-By: Tuan Hoang <tmhoang@linux.ibm.com>
* gpg: add dummy public interfaceDenis Pynkin2019-08-011-0/+4
| | | | | | | | | | | | | Add dummy stubs for GPG public functions to be compiled instead of original code in case if support of GPG is disabled. Need that to keep API backward compatibility. Based on original code from file `ostree-gpg-verify-result.c`. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> Closes: #1889 Approved by: cgwalters
* build: Conditionally build GPGME-related sourcesDenis Pynkin2019-08-011-4/+9
| | | | | | | | | 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
* Makefile-libostree.am: Work around clang issues with g-ir-scannerRobert Fairley2019-06-211-0/+4
| | | | | | | | | | | | Work around an issue with clang-7 in Fedora 29 where the `-fstack-clash-protection` flag is not recognized. Force the compiler used by `g-ir-scanner` to `gcc`, so that the flag is recognized. Related: https://github.com/projectatomic/rpm-ostree/pull/1787#issuecomment-473971585 Closes: #1871 Approved by: jlebon
* lib/kargs: Make API public and upstream new rpm-ostree APIsAllen Bai2019-06-181-10/+3
| | | | | | | | | | | | | | | | 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
* build: add ostree-soup-* to build process when configured with avahiMarcus Folkesson2018-07-031-0/+7
| | | | | | | | | | | | | | | | | | | | Avoid getting these link errors: ./.libs/libostree-1.so: undefined reference to `soup_uri_set_path' ./.libs/libostree-1.so: undefined reference to `soup_uri_new' ./.libs/libostree-1.so: undefined reference to `soup_uri_free' ./.libs/libostree-1.so: undefined reference to `soup_uri_set_scheme' ./.libs/libostree-1.so: undefined reference to `soup_uri_to_string' ./.libs/libostree-1.so: undefined reference to `soup_uri_set_host' ./.libs/libostree-1.so: undefined reference to `soup_uri_set_port' collect2: error: ld returned 1 exit status Reproduce with: ./configure --with-avahi --without-soup Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1666 Approved by: cgwalters
* Make P2P API public (no longer experimental)Matthew Leeds2018-06-041-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* build-sys: Link with -ldl for rust buildColin Walters2018-01-041-0/+4
| | | | | | | | | I didn't dive into this too much, it looks like something in rust changed that broke our build. Probably libstd gained a dependency on `-ldl` or so, and that's handled by cargo? Anyways linking against it isn't going to hurt. Closes: #1391 Approved by: smcv
* lib/pull: Split verify_bindings() out into a cmdprivate methodPhilip Withnall2017-12-141-0/+1
| | | | | | | | | | It will be used by the fsck utility in future. We could expose it publicly in future too, if needed. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1347 Approved by: cgwalters
* build: Add a TODO comment about improving glib-mkenums usage in futurePhilip Withnall2017-11-071-0/+1
| | | | | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com> https://github.com/ostreedev/ostree/pull/1329 Closes: #1330 Approved by: cgwalters
* build: Define OSTREE_ENABLE_EXPERIMENTAL_API for g-ir-scannerDan Nicholson2017-11-031-0/+4
| | | | | | | | | | | | When compiling libostree, OSTREE_ENABLE_EXPERIMENTAL_API is managed via config.h. However, g-ir-scanner can't use that since it gets confused about the namespace of all the random macros. It won't include the experimental APIs unless the macro is defined through another means. Without this, none of the experimental APIs were being included in the gir data. Closes: #1322 Approved by: pwithnall
* build: Ensure enumtypes.h is built before enumtypes.cDan Nicholson2017-11-031-1/+1
| | | | | | | | | | | ostree-enumtypes.c includes ostree-enumtypes.h, so make needs to be told about the dependency. Without it, parallel make could try to build ostree-enumtypes.c before the header file exists. I hit this when running `make -j OSTree-1.0.gir`. Closes: #1322 Approved by: pwithnall
* lib/repo-finder: Add OstreeRepoFinderOverridePhilip Withnall2017-10-191-0/+2
| | | | | | | | | | | This is another OstreeRepoFinder implementation; it returns results from a given set of URIs. It’s designed to be used for implementing user overrides to other repo-finders, or for implementing unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1281 Approved by: mwleeds
* Add --with-crypto=gnutlsJussi Laako2017-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce support for GnuTLS for computing cryptograpic hashes, similar to the OpenSSL backend. A reason to do this is some distributors want to avoid GPLv3, and GPG pulls that in. A possible extension of using GnuTLS would be replacing the GPG signing with `PKCS#7` signatures and `X.509` keys. We also support `--with-crypto=openssl`, which has the same effect as `--with-openssl`, and continues to be supported. Changes by Colin Walters <walters@verbum.org>: - Drop libgcrypt option for now - Unify buildsystem on --with-crypto Link: https://mail.gnome.org/archives/ostree-list/2017-June/msg00002.html Signed-off-by: Jussi Laako <jussi.laako@linux.intel.com> Closes: #1189 Approved by: cgwalters
* Move the include directive to the enum templateEmmanuele Bassi2017-07-171-1/+0
| | | | | | | | | | | There is no actual written guarantee in glib-mkenums that the template line specified using --fhead will be added after the templates specified inside the template file. Since the template file is only used once, we can simply move the `#include` directive inside the template, so that it is guaranteed to be in the right place. Closes: #1007 Approved by: cgwalters
* build: Ensure all .sym files are distributed in tarballsPhilip Withnall2017-07-121-1/+5
| | | | | | | | | | | | | | | | | | | | Since we’re using a custom variable for listing the .sym files, automake’s magic support for automatically distributing all files in conditionals doesn’t work, and the devel and experimental .sym files were only being distributed if `make dist` was run on a source tree which had been configured with --enable-experimental-api or not a release flag. Fix that by explicitly listing all the .sym files in EXTRA_DIST. Specifically, this fixes the case of trying to compile with --enable-experimental-api from a release tarball which was disted with --disable-experimental-api. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1001 Approved by: cgwalters
* build: Don't scan ostree-remote.h for introspection if !experimental-apiColin Walters2017-06-271-3/+4
| | | | | | | | | | It's a bit unfortunate that the scanner doesn't error on this, but anyways Closes: https://github.com/ostreedev/ostree/issues/966 Closes: #967 Approved by: jlebon
* ci: Make introspection warnings fatalColin Walters2017-06-271-1/+1
| | | | | Closes: #965 Approved by: pwithnall
* lib/repo-finder: Add Avahi based OstreeRepoFinder implementationPhilip Withnall2017-06-261-1/+17
| | | | | | | | | | | | | | | | | | | | | This is a more complex implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking for refs advertised by peers on the local network using DNS-SD records and mDNS (Avahi). The idea is to allow OS and app updates to be propagated over local networks, without the internet. It requires an OSTree server and code to generate the DNS-SD adverts in order to be fully functional — support for this will be added separately. Unit tests are included. Includes fixes by Krzesimir Nowak <krzesimir@kinvolk.io>. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/bloom: Add an internal bloom filter implementationPhilip Withnall2017-06-261-0/+2
| | | | | | | | | | | | | | | | This will be used in an upcoming commit. It adds a basic bloom filter implementation, using the SipHash family of hash functions. The implementation (including its parameter choices and hash functions) will become a protocol detail in future, so must not be changed so that its output is bitwise incompatible between OSTree versions. Unit tests are included. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/repo-finder: Add mount based OstreeRepoFinder implementationPhilip Withnall2017-06-261-1/+3
| | | | | | | | | | | | | | | | | | | | This is a basic implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking for them on any currently mounted removable storage volumes. The idea is to support OS and app updates via USB stick. Unit tests are included. This bumps libostree’s maximum GLib dependency from 2.44 to 2.50 for g_drive_is_removable(). If GLib 2.50 is not available, the call which needs it will be omitted and the OstreeRepoFinderMount implementation will scan all volumes (not just removable ones); this is a performance hit, but not a functionality hit. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters