1. 08 Jan, 2019 1 commit
  2. 20 Aug, 2018 1 commit
  3. 14 Aug, 2018 1 commit
  4. 18 Jun, 2018 1 commit
    • Dan Nicholson's avatar
      deploy: Delete .updated file from /etc and /var on new deployments · ce583077
      Dan Nicholson authored
      Systemd units using ConditionNeedsUpdate run if the mtime of .updated in
      the specified directory is newer than /usr. Since /usr has an mtime of
      0, there's no way to have an older .updated file. Systemd units
      typically specify ConditionNeedsUpdate=/etc or ConditionNeedsUpdate=/var
      to support stateless systems like ostree.
      Remove the file from the new deployment's /etc and the OS's /var
      regardless of where they came from to ensure that these systemd units
      run when booting new deployments. This will provide a method to run
      services only on upgrade.
      Closes: #1628
      Closes: #1631
      Approved by: cgwalters
  5. 07 Jun, 2018 1 commit
  6. 04 Jun, 2018 1 commit
    • Matthew Leeds's avatar
      Make P2P API public (no longer experimental) · 8fbf19c9
      Matthew Leeds authored
      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
      Closes: #1596
      Approved by: cgwalters
  7. 30 Jan, 2018 1 commit
    • Marcus Folkesson's avatar
      Add SPDX-License-Identifier to source files · 6bf4b3e1
      Marcus Folkesson authored
      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
      * 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: 's avatarMarcus Folkesson <marcus.folkesson@gmail.com>
      Closes: #1439
      Approved by: cgwalters
  8. 12 Jan, 2018 1 commit
  9. 10 Jan, 2018 1 commit
    • Gatis Paeglis's avatar
      Support for booting without initramfs · 4233b1db
      Gatis Paeglis authored
      Previously when initramfs-* was not found in a deployment's
      boot directory, it was assumed that rootfs is prepared for
      ostree booting by a kernel patch.
      With this patch, the behaviour changes to be - if initramfs-*
      is not found, assume that system is using a static
      ostree-prepare-root as init process. Booting without initramfs
      is a common use case on embedded systems. This approach is
      also more convenient, than having to patch the kernel.
      Closes: #1401
      Approved by: cgwalters
  10. 08 Jan, 2018 1 commit
  11. 04 Jan, 2018 1 commit
  12. 05 Dec, 2017 1 commit
    • Colin Walters's avatar
      tests: Test concurrent operations · 3f4506f0
      Colin Walters authored
      Test that concurrent commits and prunes can succeed. Mostly this is a
      check that the new locking works correctly and the concurrent processes
      will properly wait until they've acquired the appropriate repository
      Closes: #1343
      Approved by: cgwalters
  13. 01 Dec, 2017 1 commit
    • Dan Nicholson's avatar
      tests: Run python tests with stdout unbuffered · afebb5c3
      Dan Nicholson authored
      Set the PYTHONUNBUFFERED environment variable during tests so that
      python leaves stdout unbuffered. This is helpful when reading logs for
      failures since the interleaved stdout and stderr will generally come out
      in the right order. It's not perfect since tap-driver.sh does some
      special redirection to the log file, but it's an improvement.
      Closes: #1352
      Approved by: dbnicholson
  14. 03 Nov, 2017 1 commit
    • Dan Nicholson's avatar
      tests: Don't symlink rofiles-fuse if it's disabled · 2e9fea8f
      Dan Nicholson authored
      Creating the symlink will cause make to try to build rofiles-fuse, which
      will fail if it's disabled. Normally I wouldn't disable rofiles-fuse,
      but it's triggering a hang in our ARM Xenial builder's kernel in splice.
      I'm sure that's fuse's fault, but for now I just need to disable
      rofiles-fuse there and found --disable-rofiles-fuse didn't actually
      Closes: #1325
      Approved by: cgwalters
  15. 01 Nov, 2017 1 commit
  16. 17 Oct, 2017 1 commit
    • Colin Walters's avatar
      tests: Add test-pull-bareuseronly · 95afe284
      Colin Walters authored
      I was going to fix a bug in the static deltas code and I noticed
      we were missing `pull-test.sh` coverage for bareuseronly 🙈.
      Obviously fixing this requires duplicating some of the bits we have in
      `basic-test.sh`; need to hoist that into `libtest.sh`. For now though let's get
      the coverage.
      Closes: #1270
      Approved by: jlebon
  17. 28 Sep, 2017 1 commit
    • Philip Withnall's avatar
      tests: Add a manual integration test for OstreeRepoFinderMount · df1d0a5f
      Philip Withnall authored
      Test an end-to-end flow of pulling refs from an online
      repository → local OS repository → create a USB stick of
      them → pull to a local OS repository on another machine.
      This is a manual test, as it requires a throwaway USB stick which the
      test can format as ext4 or vfat to test the flow works with both file
      Run it as:
      MOUNT_INTEGRATION_DEV=/dev/sdb1 make check \
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #1203
      Approved by: cgwalters
  18. 27 Sep, 2017 1 commit
  19. 21 Sep, 2017 1 commit
  20. 08 Sep, 2017 1 commit
    • Dan Nicholson's avatar
      repo: Fix non-system remotes-config-dir usage · 43c78c90
      Dan Nicholson authored
      Before commit e0346c14, a non-system repo could specify
      remotes-config-dir and have remotes read from there. However, adding
      remotes would only be done in the config dir for a system repo. Restore
      that by respecting remotes-config-dir when no sysroot is found and
      adding back the ostree_repo_is_system() check when adding remotes.
      Closes: #1133
      Closes: #1151
      Approved by: cgwalters
  21. 21 Jul, 2017 1 commit
    • Colin Walters's avatar
      tests: More fixes for gjs tests · ed99b416
      Colin Walters authored
      Previous to this commit, the gjs tests were installed-only; and our
      logic for handling the "--enable-installed-tests=exclusive" logic
      actually also meant they weren't installed.
      It did work for me locally with `--enable-installed-tests`.
      However, to make things fully symmetric, let's enable the js tests to also be
      run under `make check`.
      Also remove `corrupt-repo-ref.js` from the PAPR invocation since it's not
      actually a unit test, it's a utility helper.
      Closes: #1022
      Approved by: jlebon
  22. 12 Jul, 2017 1 commit
  23. 10 Jul, 2017 1 commit
    • Colin Walters's avatar
      tests: Run pull tests for bare/bare-user · 0aa20df2
      Colin Walters authored
      We have variants of `test-basic` for all 4 modes, but not for pull-test, which
      for some reason was named `pull-archive`, but mostly pulls *into* bare repos.
      The test code was structured like the basic one where it called into a
      `pull-test.sh`, so let's actually use it for 2/3 bare modes. (I tried to extend
      it to `bare-user-only` but it failed, going to look at that after this).
      This is related to https://github.com/ostreedev/ostree/issues/991
      Closes: #998
      Approved by: jlebon
  24. 06 Jul, 2017 1 commit
  25. 30 Jun, 2017 1 commit
    • Colin Walters's avatar
      Add "pull --localcache-repo" · 4273e670
      Colin Walters authored
      This is a lot like `git clone --reference`, but we chose "localcache" as the
      term "reference" is already used.
      The main use case I'm targeting this for is the Fedora Atomic Host installer
      case where we embed the repo content in the installer, but we may want to
      kickstart and download newer content. There, while we want to get a newer ref,
      we can still use the local repo as an object cache, since we have it sitting
      there in memory anyways.
      Another case is where one has a host ostree (say e.g. Fedora Atomic
      Workstation), and one wants to create a local archive mirror of FAH. Then one
      can use `pull --reference /ostree/repo` and pull the common objects (e.g.
      contents of `bash.rpm` etc.)
      Closes: https://github.com/ostreedev/ostree/issues/975
      Closes: #982
      Approved by: jlebon
  26. 29 Jun, 2017 1 commit
    • Colin Walters's avatar
      tree-wide: Replace various uses of `archive-z2` → `archive` · 90e0d563
      Colin Walters authored
      The `-z2` is annoying now since it's really a legacy; we've long
      since supported typing `archive`.  Convert the docs fully and
      explain that.
      Also do some (but not all) of the tests just to encourage newer tests to use
      `archive` too.
      Closes: #980
      Approved by: jlebon
  27. 27 Jun, 2017 1 commit
  28. 26 Jun, 2017 5 commits
    • Philip Withnall's avatar
      tests: Add integration tests for collections · 11ad3ec5
      Philip Withnall authored
      Test various pieces of core and command line utility functionality
      relating to the newly-introduced concept of collections. Mostly focussed
      around the find-remotes utility, and around handling of collection–refs.
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #924
      Approved by: cgwalters
    • Philip Withnall's avatar
      lib/repo-finder: Add Avahi based OstreeRepoFinder implementation · e3d4eeac
      Philip Withnall authored
      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
      Unit tests are included.
      Includes fixes by Krzesimir Nowak <krzesimir@kinvolk.io>.
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #924
      Approved by: cgwalters
    • Philip Withnall's avatar
      lib/bloom: Add an internal bloom filter implementation · 7ee4e129
      Philip Withnall authored
      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: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #924
      Approved by: cgwalters
    • Philip Withnall's avatar
      lib/repo-finder: Add mount based OstreeRepoFinder implementation · ae335f24
      Philip Withnall authored
      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: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #924
      Approved by: cgwalters
    • Philip Withnall's avatar
      lib/repo-finder: Add config-file based OstreeRepoFinder implementation · d15f83c9
      Philip Withnall authored
      This is a basic implementation of OstreeRepoFinder which resolves ref
      names to remote URIs by looking their collection IDs up in the local
      configuration of remotes who have their collection-id key set.
      Unit tests are included.
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #924
      Approved by: cgwalters
  29. 23 May, 2017 1 commit
  30. 22 May, 2017 1 commit
    • Daniel Drake's avatar
      Allow commits to mark refs as EOL, replaced by others · c1ed9a15
      Daniel Drake authored
      A commit can now include a "ostree.endoflife-rebase" metadata key
      pointing to a new ref.
      When updating, the sysroot upgrader will see this and proceed to
      pull and deploy the new ref instead. The origin file in the new
      deployment will point to the new ref.
      This functionality is planned to be used in Endless OS. We will create
      a lesser tested branch for brand new, cutting edge hardware support,
      and ship that on hardware platforms that require the latest drivers.
      However, once our slower-moving official release is later updated to
      support the new hardware, we will use this functionality to migrate
      those bleeding-edge users over to the official release.
      Closes: #874
      Approved by: cgwalters
  31. 12 May, 2017 1 commit
    • Colin Walters's avatar
      lib/checkout: Fix regression in subpath for regular files · a195888b
      Colin Walters authored
      This is what caused the merge of
      to blow up, since https://github.com/ostreedev/ostree/pull/848
      landed right before we tried to merge it.
      When I was writing that PR I remember having an uncertain feeling
      since we were doing a `mkdirat` above, but at the time I thought
      we'd have test suite coverage...turns out we didn't.
      For backwards compatibility, we need to continue to do a `mkdirat` here of the
      parent. However...I can't think of a reason anyone would *want* that behavior.
      Hence, let's add a special trick - if the destination name is `.`, we skip
      `mkdirat()`. That way rpm-ostree for example can open a dfd for `/etc` and avoid
      the `mkdir`.
      Fold the subpath tests into `test-basic.sh` since it's not worth a separate
      file. Add a test case for checking out a file.
      Closes: #854
      Approved by: jlebon
  32. 09 May, 2017 1 commit
    • Colin Walters's avatar
      tests: Migrate test-pull-many.sh to installed on FAH · 48d2637e
      Colin Walters authored
      `test-pull-many.sh` is was just too slow to be a unit test.  Generating
      a bunch of files via shell is slow, the delta generation is slow, etc.
      Every developer doesn't need to run it every time.
      Somewhat address this by converting it into our installed test framework, which
      moves it out of the developer fast paths.  Another advantage to this is
      that we can simply reuse the FAH tree content rather than synthesizing
      new bits each time.
      Closes: #840
      Approved by: jlebon
  33. 08 May, 2017 4 commits
    • Philip Withnall's avatar
      build: Add --enable-experimental-api configure option for unstable APIs · c9244b1b
      Philip Withnall authored
      There are currently no unstable APIs, but some will be added in
      following commits. They will be built and exposed in the libostree
      global symbol list iff configured with --enable-experimental-api.
      Distributions should not package OSTree with --enable-experimental-api.
      This is designed for previewing new APIs on controlled platforms; any of
      the APIs hidden behind this option may be changed or removed at any
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #832
      Approved by: cgwalters
    • Colin Walters's avatar
      Add --enable-installed-tests=exclusive, fix installed case · c7efe015
      Colin Walters authored
      The major reason to do this is that running tests *both* installed
      and uninstalled in our CI is a mostly pointless waste of time.
      Particularly given we have a few expensive tests.
      We *do* have tests that only run uninstalled (since they require
      the source code) like `test-symbols.sh`.
      Hence, add `--enable-installed-tests=exclusive` to mean *only* do installed for
      most tests.
      We'll still have uninstalled coverage via the Travis/Debian configs, and we
      could perhaps do another build with a subset of uninstalled tests, but I'm not
      really concerned about it.
      I'd like to do a renewed push for the InstalledTests model since
      I feel it's just fundamentally better.  (`g-d-t-r` kind of sucks,
      but then so does the automake runner).
      Also while we're here - fix the CI to use the correct context,
      which started this mess.
      Closes: #837
      Approved by: dbnicholson
    • Dan Nicholson's avatar
      tests: Install libtest-core.sh with installed tests · 1fe91475
      Dan Nicholson authored
      Without this, running the installed tests fails dramatically. Remove it
      from EXTRA_DIST since dist_installed_test_data takes care of dist.
      Closes: #837
      Approved by: dbnicholson
    • Philip Withnall's avatar
      tests: Add a test for `ostree summary --view` · f3cc0eb2
      Philip Withnall authored
      This includes a test of the new human-readable key names.
      Signed-off-by: 's avatarPhilip Withnall <withnall@endlessm.com>
      Closes: #826
      Approved by: cgwalters