Commit Graph

3777 Commits

Author SHA1 Message Date
Luca Bruno
b2edfd94d4
Merge pull request #2832 from coreos/dependabot/cargo/subprocess-0.2.7
build(deps): bump subprocess from 0.2.6 to 0.2.7
2021-05-17 07:51:00 +00:00
Luca Bruno
3ef74fac0c
Merge pull request #2833 from coreos/dependabot/cargo/ostree-ext-0.1.2
build(deps): bump ostree-ext from 0.1.0 to 0.1.2
2021-05-17 07:42:51 +00:00
dependabot[bot]
275bf4a2bd
build(deps): bump ostree-ext from 0.1.0 to 0.1.2
Bumps [ostree-ext](https://github.com/ostreedev/ostree-ext) from 0.1.0 to 0.1.2.
- [Release notes](https://github.com/ostreedev/ostree-ext/releases)
- [Commits](https://github.com/ostreedev/ostree-ext/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:05:20 +00:00
dependabot[bot]
e6d64586f2
build(deps): bump subprocess from 0.2.6 to 0.2.7
Bumps [subprocess](https://github.com/hniksic/rust-subprocess) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/hniksic/rust-subprocess/releases)
- [Commits](https://github.com/hniksic/rust-subprocess/compare/release/0.2.6...release/0.2.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 06:05:15 +00:00
Colin Walters
a6da3c08d4 passwd: Make default perms 0644
This matches the default from the RPM, and we don't want
the file to be writable if an admin adds a user to the `root`
group.  (Which IMO is just a bad idea, but
for historical reasons OpenShift suggests this for
images
https://docs.openshift.com/container-platform/4.7/openshift_images/create-images.html#images-create-guide-openshift_create-images
for example)
2021-05-13 17:49:07 -04:00
Luca Bruno
58684c43f1
Merge pull request #2823 from coreos/ups/release-steps
docs: update release steps
2021-05-11 19:12:23 +00:00
Jonathan Lebon
8cc31a20b2
Merge pull request #2816 from travier/rename-ext
*: rename master branch to main (for external projects)
2021-05-11 13:15:33 -04:00
Luca BRUNO
1e50821bcb
docs: update release step
This fixes the release instructions.
2021-05-11 16:11:36 +00:00
Timothée Ravier
aed0f194ad *: rename master branch to main (external repos) 2021-05-11 18:11:30 +02:00
Jonathan Lebon
195807870a
Merge pull request #2815 from travier/rename
*: rename master branch to main
2021-05-11 12:03:08 -04:00
Luca Bruno
2f75135d56
Merge pull request #2822 from lucab/release-2021.5
Release 2021.5
2021-05-11 15:09:07 +00:00
Luca BRUNO
c0081311dd
Release 2021.5
New release `2021.5`.
2021-05-11 13:56:26 +00:00
Jonathan Lebon
5d79fbf375
Merge pull request #2819 from jlebon/pr/skip-branch-validation
app/deploy: Add --skip-branch-check
2021-05-11 09:18:20 -04:00
Luca BRUNO
7c7d00421f libpriv/importer: move path-checking logic to Rust
This moves the path-checking logic to Rust.
Additionally it tweaks the /opt conditions to use absolute paths.
2021-05-10 19:49:18 -04:00
Jonathan Lebon
ffb8353b11 lockfile: Allow metadata field in locked packages
This field will allow humans to shove additional structured metadata
into lockfiles which could then be used by higher-level tools.

See: https://github.com/coreos/fedora-coreos-config/pull/965
2021-05-10 19:48:42 -04:00
Jonathan Lebon
771361d59b lockfile: Add missing serde(deny_unknown_fields)
Match the treefile spec and default to denying unknown fields.
2021-05-10 19:48:42 -04:00
Jonathan Lebon
18a00f2825
Merge pull request #2820 from Razaloc/fu2776
kargs: Simplify conditional statements
2021-05-10 11:46:09 -04:00
Rafael G. Ruiz
6d6ebd324d kargs: Simplify conditional statements
Follow-up for PR #2776
Simplify multiple if statements into one if  else statement

Signed-off-by: Rafael G. Ruiz <llerrak@hotmail.com>
2021-05-09 03:38:25 +02:00
Jonathan Lebon
7c1072f965 app/deploy: Add --skip-branch-check
In Fedora CoreOS, updates are driven by Zincati and we thus completely
trust the information it gives us. The branch validation rpm-ostree does
is thus not necessary. It's also harmful in the case where the node is
extremely out of date because it may not be able to GPG verify the
commit at the tip of the branch (because the GPG key isn't yet in the
tree).

See: https://github.com/coreos/fedora-coreos-tracker/issues/749
2021-05-07 17:45:09 -04:00
Jonathan Lebon
57250d11ab
Merge pull request #2813 from kelvinfan001/pr/detect-inactive-driver
app/clientlib: Don't error if updates driver inactive
2021-05-07 17:12:42 -04:00
Kelvin Fan
86cf6ad479 app/clientlib: Don't error if update driver "stopped"
If updates driver is registered but "stopped", ignore driver (i.e.
do not error out during deploy, rebase, ugprade).

We define "stopped" to mean the driver's `ActiveState` is not in
the following states: "active", "activating", "reloading", "failed".
2021-05-07 18:41:45 +00:00
Timothée Ravier
95de194f59 *: rename master branch to main 2021-05-07 16:12:45 +02:00
Timothée Ravier
c7bf08789d countme: Drop SELinux workaround/unpriv copy of rpm-ostree
The SELinux policy change has been merged and released upstream.

This reverts:
5d5ccf01 Install a temporary copy of rpm-ostree for unprivileged use
2021-05-07 08:41:22 -04:00
Jonathan Lebon
c05460380a treefile: Fix rpmdb backend casing
We're using `kebab-case` so serde translates capitalized letters like
`BDB` as `b-d-b`, which is not what we want here.
2021-05-06 15:49:21 -04:00
Luca Bruno
c29421c429
Merge pull request #2811 from coreos/dependabot/cargo/tracing-0.1.26
build(deps): bump tracing from 0.1.25 to 0.1.26
2021-05-06 14:00:15 +00:00
Jonathan Lebon
f33c2c8c6c
Merge pull request #2776 from Razaloc/exit-77
kargs: Add CLI switch --unchanged-exit-77
2021-05-06 09:41:42 -04:00
dependabot[bot]
5243f95ee2
build(deps): bump tracing from 0.1.25 to 0.1.26
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.25 to 0.1.26.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.25...tracing-0.1.26)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 12:55:18 +00:00
Luca Bruno
5b068dadfe
Merge pull request #2803 from coreos/dependabot/cargo/tracing-subscriber-0.2.18
build(deps): bump tracing-subscriber from 0.2.17 to 0.2.18
2021-05-06 12:54:23 +00:00
dependabot[bot]
29a5d3b2ad
build(deps): bump tracing-subscriber from 0.2.17 to 0.2.18
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.17...tracing-subscriber-0.2.18)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 10:54:53 +00:00
Luca Bruno
0d9a5dc1a3
Merge pull request #2804 from coreos/dependabot/cargo/cxx-build-1.0.49
build(deps): bump cxx-build from 1.0.47 to 1.0.49
2021-05-06 10:53:49 +00:00
Luca Bruno
5ce024676f
Merge pull request #2802 from coreos/dependabot/cargo/cxx-1.0.49
build(deps): bump cxx from 1.0.48 to 1.0.49
2021-05-06 10:53:24 +00:00
dependabot[bot]
221796a4ec
build(deps): bump cxx-build from 1.0.47 to 1.0.49
Bumps [cxx-build](https://github.com/dtolnay/cxx) from 1.0.47 to 1.0.49.
- [Release notes](https://github.com/dtolnay/cxx/releases)
- [Commits](https://github.com/dtolnay/cxx/compare/1.0.47...1.0.49)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 09:03:49 +00:00
dependabot[bot]
a6a73d9e38
build(deps): bump cxx from 1.0.48 to 1.0.49
Bumps [cxx](https://github.com/dtolnay/cxx) from 1.0.48 to 1.0.49.
- [Release notes](https://github.com/dtolnay/cxx/releases)
- [Commits](https://github.com/dtolnay/cxx/compare/1.0.48...1.0.49)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 09:03:40 +00:00
Rafael G. Ruiz
6246b990a9 kargs: Add CLI switch --unchanged-exit-77
The new switch will rise an exit code 77 if kernel args are unchanged

Closes: #1802

Signed-off-by: Rafael G. Ruiz <llerrak@hotmail.com>
2021-05-05 23:19:52 +02:00
Jonathan Lebon
13dcc5950b
Merge pull request #2799 from cgwalters/minor-treefile-cleanup
treefile: Minor cleanup of handle_repo_packages_overrides()
2021-05-05 16:50:54 -04:00
Colin Walters
73b9d2ff3b treefile: Minor cleanup of handle_repo_packages_overrides()
This isn't important at all, but I am just trying to up my
"Rust iterator and mapping" skills.  Here:

- In this case we always want to go from `Option<T>` to `Option<T>`,
  so instead of destructuring `Some()` back to another `Some()`
  we can use `as_mut()` to manipulate the inner vector directly.
- Now instead of destroying the inner `Vec<>` we need to use `drain()`
  instead
- And then we can just `extend()` with a reversed iterator from
  our explicit temporary
2021-05-05 15:52:52 -04:00
Jonathan Lebon
7fe133b6d8
Merge pull request #2807 from lucab/ups/tests-override-kernel-f34
tests/override-kernel: add f34 kernel
2021-05-05 09:58:22 -04:00
Jonathan Lebon
7f19930916 tests/vmcheck/misc-2: Update error message to grep for
For some reason, in f34 the error that libostree gets now when trying to
checkout a file on top of an existing one with different content is no
longer EEXIST but EPERM.

Likely due to a change in the kernel or glibc though some quick googling
doesn't reveal anything.
2021-05-04 15:58:14 -04:00
Luca BRUNO
7ece1846c0
tests/override-kernel: add f34 kernel
This adds support for Fedora 34.
2021-05-04 14:58:12 +00:00
Colin Walters
12cc4e5f5b composepost: Fix race condition in timestamp checking
`syncfs()` isn't going to do anything on e.g. `tmpfs` and even
if it did wouldn't fix any race conditions because that's about
synchronizing in memory changes to disk, but won't change
what system calls return.

Some investigation turned up
https://stackoverflow.com/questions/14392975/timestamp-accuracy-on-ext4-sub-millsecond
and `current_fs_time` is now:
https://www.kernel.org/doc/html/v5.12/core-api/timekeeping.html

Basically there's a "coarse" time that might only update once every 10ms
for example.

Let's just sleep 100ms for now.

I think we should be using the inode versions, but we can investigate
that separately.
2021-04-30 15:15:10 -04:00
Jonathan Lebon
a42fcd06c7
Merge pull request #2800 from cgwalters/camino
Add and use the `camino` library for UTF-8 paths
2021-04-30 11:15:40 -04:00
Colin Walters
7b57f2b9d0 Add and use the camino library for UTF-8 paths
ostree hard requires UTF-8 paths (and really we should
never have any non-UTF-8 paths in the OS in general).  The
camino library has types that are both `Path` and `&str` and
has a convenient `try_into()` too to avoid us duplicating
the error handling.
2021-04-30 09:56:05 -04:00
Jonathan Lebon
ba7a72995b treefile: Add new repo-packages field for pinning packages to repos
This addresses the server compose side of
https://github.com/coreos/rpm-ostree/issues/2584.

One tricky bit is handling overrides across included treefiles (or
really, even within a single treefile): as usual, higher-level treefiles
should override lowel-level ones. Rust makes it pretty nice to handle.

For now this just supports a `repo` field, but one could imagine e.g.
`repos` (which takes an array of repoids instead), or e.g.
`exclude-repos`.

The actual core implementation otherwise is pretty straightforward.

This should help a lot in RHCOS where we currently use many `exclude=`
directives in repo files to get it to do what we want.

This is also kind of a requirement for modularity support because as
soon as rpm-ostree becomes modules-aware, modular filtering logic will
break composes which assume rpm-ostree treats modular and non-modular
packages the same.
2021-04-30 09:13:18 -04:00
Luca BRUNO
3b76a7eeef composepost: move rpmdb linking logic to Rust
This ports the rpmdb hardlinking logic which serves to maintain
a coherent single source of truth across tools.
2021-04-29 16:05:27 -04:00
Luca Bruno
30d5c79272
Merge pull request #2795 from coreos/dependabot/cargo/cxx-1.0.48
build(deps): bump cxx from 1.0.47 to 1.0.48
2021-04-29 15:17:47 +00:00
Luca BRUNO
f1138dd134 composepost: move SELinux workaround logic to Rust
This ports the timestamp updating logic which serves as a workaround
for SELinux leaking host details.
2021-04-29 10:47:13 -04:00
Timothée Ravier
9ee8bbb6f7 daemon: Only update idle status every 10 seconds
This slightly reduces DBus traffic on nodes as we don't really need to
update systemd status more often than that.
2021-04-29 09:56:27 -04:00
Jonathan Lebon
2ed6e40cd2 core: Add comment about SERVER_BASE commits
This made me hesitate for a bit so add a comment about it to make it
clear. The RPMOSTREE_ASSEMBLE_TYPE_SERVER_BASE path was used by the `ex
container`, which was subsequently ripped out.
2021-04-29 09:52:02 -04:00
Jonathan Lebon
fdd6ff83cb rust/treefile: Fix minor comment typo 2021-04-29 09:52:02 -04:00
Jonathan Lebon
c095b97bf3 libpriv: Bridge print_treepkg_diff_from_sysroot_path()
This will be necessary for Rust-based client commands to be able to do
the regular "post-deployment package diff".
2021-04-29 09:52:02 -04:00