5046 Commits

Author SHA1 Message Date
OpenShift Merge Robot
5d565790d4
Merge pull request #2218 from cgwalters/travis-32bit
travis: Add a 32 bit build
2020-10-15 15:27:48 -04:00
Jonathan Lebon
dec9eab203 ostree-prepare-root: print st_dev and st_ino as 64-bit ints
This matches what systemd does and should work fine on all platforms.

Possibly resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1888436
2020-10-15 12:26:47 -04:00
Colin Walters
53b6bbbdf2 travis: Add a 32 bit build
In the past we've had 32 bit bugs that were caught by
the compiler, let's add this to Travis.
2020-10-15 10:50:22 -04:00
OpenShift Merge Robot
26b98ebc56
Merge pull request #2215 from cgwalters/fd-transfer
deploy: Remove (transfer none) from fd arg
2020-10-14 00:45:13 +02:00
OpenShift Merge Robot
cfa25837dc
Merge pull request #2214 from cgwalters/release-2020-7
Release 2020.7
2020-10-14 00:18:49 +02:00
Colin Walters
b4e7ab014e deploy: Remove (transfer none) from fd arg
GI complains.  And in general one needs to assume that file
descriptors aren't stolen.
2020-10-13 17:40:11 -04:00
Colin Walters
326b8b13c6 Post-release version bump 2020-10-13 17:38:19 -04:00
Colin Walters
32a3a12973 Release 2020.7 v2020.7 2020-10-13 14:31:26 -04:00
OpenShift Merge Robot
a13509ee7d
Merge pull request #2213 from alexlarsson/summary-bugfixes
Various fixes from the indexed-summaries branch
2020-10-08 15:18:34 -04:00
Alexander Larsson
2e9db809b9 signatures: Fix leak in _sign_detached_metadata_append()
This needs to ref_sink the returned variant, as it is used with g_autoptr
in the callers.
2020-10-08 14:10:04 +02:00
Alexander Larsson
f821cdb89e fetch_summary_with_options: Fix n-network-retries option parsing
"&u" is not a valid gvariant format string, it should just be "u".
2020-10-08 14:09:16 +02:00
Alexander Larsson
6ed1066ef0 ostree_repo_find_remotes_async: Fix leak of summary
We were creating a GVariant from a GBytes and storing it in an
g_autoptr without ref_sinking it.
2020-10-08 14:08:51 +02:00
OpenShift Merge Robot
cc1c26f55f
Merge pull request #2212 from jlebon/pr/packit-tweak
ci: Make Packit ignore downstream patches
2020-10-07 15:34:22 -04:00
OpenShift Merge Robot
8eb2d5f820
Merge pull request #2211 from jlebon/pr/close-fd
lib/deploy: Don't leak fd when checksumming dtbs
2020-10-07 15:23:43 -04:00
Jonathan Lebon
ee632e4968 ci: Make Packit ignore downstream patches
We don't really carry "Fedora-only" patches in dist-git. So we want to
nuke all the patches which exist there.

Follow-up to #2210.
2020-10-07 15:04:17 -04:00
Jonathan Lebon
b3dc074f5e lib/deploy: Don't leak fd when checksumming dtbs
Likely the root of https://bugzilla.redhat.com/show_bug.cgi?id=1886149.
2020-10-07 14:47:34 -04:00
OpenShift Merge Robot
84f8de6daa
Merge pull request #2210 from jlebon/pr/packit
Add Packit integration
2020-10-07 09:46:14 -04:00
Jonathan Lebon
9c51aa3090 Add Packit integration
This is a basic `.packit.yaml` integration file which will allow us have
continuous builds of OSTree in cosa and upstream CI. If things go well,
we'll likely deploy this in other build tools like rpm-ostree.

Prompted by wanting to get #2155 out to unblock
https://github.com/coreos/rpm-ostree/pull/2170.
2020-10-06 14:20:57 -04:00
OpenShift Merge Robot
9f98aa9223
Merge pull request #2198 from cgwalters/no-hardlink-zerosize
checkout: Don't hardlink zero sized files
2020-10-05 22:06:38 +02:00
OpenShift Merge Robot
0462de63a1
Merge pull request #2209 from travier/docs-fixup
docs: Fix URL in Jekyll _config.yml
2020-10-05 21:50:00 +02:00
Timothée Ravier
0bbd89e326
docs: Fix URL in Jekyll _config.yml 2020-10-05 21:10:31 +02:00
OpenShift Merge Robot
13290a070c
Merge pull request #2208 from cgwalters/bump-libglnx
libglnx: Bump to master
2020-10-05 20:56:35 +02:00
OpenShift Merge Robot
de5704fbe5
Merge pull request #2207 from travier/docs
docs: Add GitHub Pages support
2020-10-05 20:19:29 +02:00
Colin Walters
3f6eb2264e libglnx: Bump to master
To pull in the fix for `/var/tmp` on NixOS but also
on general principle.

Update submodule: libglnx

```
Colin Walters (1):
      xattrs: Add better error prefixing

Rebecca Turner (2):
      glnx-fdio: try $TMPDIR if /var/tmp doesn't exist
      glnx-fdio: use $TMPDIR if set
```
2020-10-05 14:05:03 -04:00
OpenShift Merge Robot
06a77bfd69
Merge pull request #2155 from jlebon/pr/add-initrds
lib/deploy: Add support for overlay initrds
2020-10-02 16:41:01 -04:00
Timothée Ravier
797eb3b14f
README: Update and mention new docs 2020-10-02 14:43:26 +02:00
Timothée Ravier
13844c6b3e
docs: Move historical README to the docs 2020-10-02 14:38:28 +02:00
Timothée Ravier
68ac9e9c50
docs: Move and update pages from the manual 2020-10-02 14:34:48 +02:00
Timothée Ravier
6ca312a923
docs: Update Contributing and tutorial pages 2020-10-02 14:34:48 +02:00
Colin Walters
558720e7aa checkout: Don't hardlink zero sized files
Alternative to https://github.com/ostreedev/ostree/pull/2197

Python's (usually) zero-sized `__init__.py` files can provoke
us hitting the hardlink limits on some filesystems (`EMLINK`).
At least one Fedora rpm-ostree user hit this.

The benefits of hardlinking here are quite marginal; lots
of hardlinks can behave suboptimally in particular filesystems
like BTRFS too.

This builds on prior code which made this an option, introduced
in 673cacd633
Now we just do it uncondtionally.

Also this provoked a different bug in a very obscure user mode checkout
case; when the "real" permissions were different from the "physical"
permissions, we would still hardlink.  Fix the test case for this.
2020-10-01 16:47:07 -04:00
OpenShift Merge Robot
15878c935a
Merge pull request #2167 from pwithnall/2165-dont-download-config
Avoid need to download remote config when pulling
2020-10-01 16:46:29 -04:00
Timothée Ravier
90b1644f1e
docs: Update Index page 2020-10-01 19:32:12 +02:00
Timothée Ravier
015d44d58d
docs: Add Jekyll and theme config 2020-10-01 19:32:12 +02:00
Philip Withnall
23bdc4e5df ostree/dump: Fix a memory leak
Re-using the `refs` variable for the main list of refs, plus the
iterated lists, meant that the main list was never freed (although all
the iterated ones were freed correctly).

Fix this by using two variables rather than reusing the one.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-10-01 11:06:56 +01:00
Philip Withnall
8d09a1a8ea lib/pull: Read mode and tombstone options from summary file if possible
Otherwise, fall back to downloading and reading them from the `config`
file. See the previous commit for details.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2165
2020-10-01 11:06:56 +01:00
Philip Withnall
206f1d3a13 lib/repo: Add mode and tombstone config options to the summary file
Currently, they are set in the `config` file and cause that to be
downloaded on every pull. Given that the client is already pulling the
`summary` file, it makes sense to avoid an additional network round trip
and cache those options in the `summary` file.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #2165
2020-10-01 11:06:56 +01:00
Jonathan Lebon
81b13da8e3 lib/deploy: Add support for overlay initrds
In FCOS and RHCOS, the need to configure software in the initramfs has
come up multiple times. Sometimes, using kernel arguments suffices.
Other times, it really must be a configuration file. Rebuilding the
initramfs on the client-side however is a costly operation. Not only
does it add complexity to the update workflow, it also erodes a lot of
the value obtained from using the baked "blessed" initramfs from the
tree itself.

One elegant way to address this is to allow specifying multiple
initramfses. This is supported by most bootloaders (notably GRUB) and
results in each initrd being overlayed on top of each other.

This patch allows libostree clients to leverage this so that they can
avoid regenerating the initramfs entirely. libostree itself is agnostic
as to what kind and how much data overlay initrds contain. It's up to
the clients to enforce such boundaries.

To implement this, we add a new ostree_sysroot_stage_overlay_initrd
which takes a file descriptor and returns a checksum. Then users can
pass these checksums when calling the deploy APIs via the new array
option `overlay_initrds`. We copy these files into `/boot` and add them
to the BLS as another `initrd` entry.
2020-09-30 13:29:32 -04:00
Jonathan Lebon
40fea4c443 lib/deploy: Add deploy/stage APIs with options
And make the `override_kernel_argv` one of those options. This is mostly
a mechanical move here, no functional change otherwise.

Prep for adding a new option.
2020-09-30 13:29:32 -04:00
Jonathan Lebon
f7500bb703 lib/bootconfig: Add support for multiple initrd keys
Prep for actually teaching the rest of the codebase about this.

We keep the primary initrd in the `options` hash table for backwards
compatibility.
2020-09-30 13:29:32 -04:00
OpenShift Merge Robot
a5f9651dab
Merge pull request #2204 from jlebon/pr/versioning-tweaks
Various minor versioning related tweaks
2020-09-30 17:22:49 +00:00
Jonathan Lebon
f04e5d047d lib: Minor versioning related fixes
Fix/add the `Since` marker to the new static delta APIs, and update the
symbol versioning templates/comments.
2020-09-25 15:30:20 -04:00
Jonathan Lebon
75342035d5 Makefile-libostree.am: Uncomment BUILDOPT_IS_DEVEL_BUILD conditional
We shouldn't have to toggle the conditional itself during release
builds. It should only evaluate to true during devel builds.
2020-09-25 15:07:36 -04:00
OpenShift Merge Robot
fad95167ce
Merge pull request #2203 from cgwalters/delta-sign-cleanups
delta: Some minor code style fixups
2020-09-25 13:57:33 +00:00
OpenShift Merge Robot
e6f673a8ed
Merge pull request #2202 from cgwalters/bootcsum-dtb
deploy: Remove deployment bootcsum assertion
2020-09-24 22:14:31 +00:00
Colin Walters
9198fa040c delta: Some minor code style fixups
- Remove some unused variables
- Switch to declare-and-initialize with others
- Fix some indentation from 4 spaces to 2 (GNU style)
2020-09-24 22:12:56 +00:00
Colin Walters
aa2a2783ea deploy: Remove deployment bootcsum assertion
When support for devicetree was added, it created a problem
because old and new ostree versions would compute different
checksums for the "boot data".  The scenario here is:

- Have system with ostree < 2020.4
- Reboot into system with ostree 2020.5
- Try to perform an operation that would retain
  that previous booted deployment (common)

Currently ostree iterates over all the deployments
that will be retained and calls `install_deployment_kernel()`,
even for the booted one (which is a bit silly), but
just to verify that all boot data for the targeted
deployments are installed.

This then re-computes the checksum and we'd trip this
assertion.

In practice though, we don't strictly require them to match;
the only thing that will happen if they don't is that we'll
end up with another copy of the kernel/initramfs - and
that only temporarily until the previous deployment
gets GC'd.

Longer term, I think what we really want to do anyways
is probably closer to like a little ostree repo for `/boot`
so that we can e.g. still hardlink kernels there even if
the initramfs changes, or hardlink both kernel/initramfs
if just the devicetree changes, etc.

Closes: https://github.com/ostreedev/ostree/issues/2154
2020-09-24 21:24:48 +00:00
OpenShift Merge Robot
00df896550
Merge pull request #1985 from fdanis-oss/wip/fda/sign_delta_metadata
Static-delta's superblock signature support
2020-09-24 14:21:16 +00:00
OpenShift Merge Robot
6950a98099
Merge pull request #2199 from cgwalters/no-hardlink-unreadable
checkout: Ensure copies of unreadable usermode checkouts are readable
2020-09-16 17:58:55 +02:00
Colin Walters
3441a48c58 checkout: Ensure copies of unreadable usermode checkouts are readable
The extreme special case of "zero mode" files like `/etc/shadow`
comes up again.  What we want is for "user mode" checkouts to
override it to make the file readable; otherwise when operating
as non-root without `CAP_DAC_OVERRIDE` it becomes very difficult
to work with.

Previously, we were hardlinking these files, but then it intersects
with *another* special case around zero sized files, which is
*also* true for `/etc/shadow`.

Trying to avoid hardlinking there unveiled this bug - when
we go to do a copy checkout, we need to override the mode.
2020-09-16 15:14:54 +00:00
OpenShift Merge Robot
ca2f3435be
Merge pull request #2195 from ostreedev/avoid-shadows
Avoid shadowing local variables
2020-09-14 10:43:40 -04:00