Commit Graph

3782 Commits

Author SHA1 Message Date
Colin Walters
a015fb345f Expose more from treefile via cxx-rs; adapt _install_langs to use it
We only honor `_install_langs` in the compose path, so move the
code to look at the treefile and move the string concatention to
Rust.
2021-04-19 19:59:06 -04:00
Colin Walters
f2bc1d86ef core: Split off a method to set the treespec
Since in the future we'll operate on a treefile, move the callers
still using treespecs to an explicit API.  This is also clearer
because about half the callers were passing `NULL` for this anyways.
2021-04-19 19:59:06 -04:00
Jonathan Lebon
78b7f934e4 rust/passwd: Fix handling of previous mode
We need to handle the case where no previous commit exists. This is
expressed from the C side by passing the empty string.

We're currently not testing this, though... AFAIK no distro uses this
right now anyway and hopefully we simplify a lot of this when we move to
systemd-sysusers!

Fixes: #2580
Fixes: #2769
2021-04-19 19:56:08 -04:00
Jonathan Lebon
2ad8543b3e
Merge pull request #2758 from cgwalters/treefile-validate-repos
compose: Move repos/lockfile-repos validation to Rust
2021-04-19 11:43:21 -04:00
Jonathan Lebon
4f2c12cf0e
Merge pull request #2762 from coreos/dependabot/submodules/libdnf-be66d09
build(deps): bump libdnf from `930f258` to `be66d09`
2021-04-19 10:01:45 -04:00
Luca Bruno
03fa62558f
Merge pull request #2767 from coreos/dependabot/cargo/curl-0.4.36
build(deps): bump curl from 0.4.35 to 0.4.36
2021-04-19 13:27:38 +00:00
Luca Bruno
610815eb83
Merge pull request #2765 from coreos/dependabot/cargo/ostree-sys-0.7.3
build(deps): bump ostree-sys from 0.7.2 to 0.7.3
2021-04-19 12:35:19 +00:00
dependabot[bot]
83658dda35
build(deps): bump curl from 0.4.35 to 0.4.36
Bumps [curl](https://github.com/alexcrichton/curl-rust) from 0.4.35 to 0.4.36.
- [Release notes](https://github.com/alexcrichton/curl-rust/releases)
- [Commits](https://github.com/alexcrichton/curl-rust/compare/curl-sys-0.4.35...curl-sys-0.4.36)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 12:29:29 +00:00
Luca Bruno
4bf9d17079
Merge pull request #2768 from coreos/dependabot/cargo/openat-0.1.21
build(deps): bump openat from 0.1.20 to 0.1.21
2021-04-19 12:28:10 +00:00
Luca BRUNO
0d79b25a52 postprocess: move /var tmpfiles.d translation logic to Rust
This ports to Rust the auto-tmfiles.d translation logic which is
meant to consume a populated `/var` and to produce a matching
`rpm-ostree-1-autovar.conf` instead.
It also adds a unit-test covering most codepaths.
2021-04-19 07:39:58 -04:00
Luca BRUNO
1ec3b7fd55 tests/compose: add more autovar testcases
This adds some testcases in order to cover more codepaths in the
translation logic.
2021-04-19 07:39:58 -04:00
dependabot[bot]
84e8cec344
build(deps): bump ostree-sys from 0.7.2 to 0.7.3
Bumps [ostree-sys](https://gitlab.com/fkrull/ostree-rs) from 0.7.2 to 0.7.3.
- [Release notes](https://gitlab.com/fkrull/ostree-rs/tags)
- [Commits](https://gitlab.com/fkrull/ostree-rs/commits/master)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 10:15:38 +00:00
dependabot[bot]
95cdc4e678
build(deps): bump openat from 0.1.20 to 0.1.21
Bumps [openat](https://github.com/tailhook/openat) from 0.1.20 to 0.1.21.
- [Release notes](https://github.com/tailhook/openat/releases)
- [Commits](https://github.com/tailhook/openat/compare/v0.1.20...v0.1.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 10:14:18 +00:00
Luca Bruno
acda0753e6
Merge pull request #2764 from coreos/dependabot/cargo/cxx-1.0.45
build(deps): bump cxx from 1.0.43 to 1.0.45
2021-04-19 08:38:23 +00:00
Luca Bruno
44dbfd1fcd
Merge pull request #2763 from coreos/dependabot/cargo/cxx-build-1.0.45
build(deps): bump cxx-build from 1.0.42 to 1.0.45
2021-04-19 08:37:54 +00:00
Luca Bruno
c44ba69c19
Merge pull request #2757 from cgwalters/always-staged
daemon: Always write `staged` JSON field
2021-04-19 07:24:12 +00:00
Luca Bruno
30c45da631
Merge pull request #2759 from cgwalters/origin-treefile-prep-3
core: Remove cancellable/error from context creation APIs
2021-04-19 07:23:04 +00:00
dependabot[bot]
c4b66a0e66
build(deps): bump cxx from 1.0.43 to 1.0.45
Bumps [cxx](https://github.com/dtolnay/cxx) from 1.0.43 to 1.0.45.
- [Release notes](https://github.com/dtolnay/cxx/releases)
- [Commits](https://github.com/dtolnay/cxx/compare/1.0.43...1.0.45)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 06:29:58 +00:00
dependabot[bot]
36ef9b8ca2
build(deps): bump cxx-build from 1.0.42 to 1.0.45
Bumps [cxx-build](https://github.com/dtolnay/cxx) from 1.0.42 to 1.0.45.
- [Release notes](https://github.com/dtolnay/cxx/releases)
- [Commits](https://github.com/dtolnay/cxx/compare/1.0.42...1.0.45)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 06:29:45 +00:00
dependabot[bot]
1120838890
build(deps): bump libdnf from 930f258 to be66d09
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `930f258` to `be66d09`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](930f2582f9...be66d0908d)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 05:52:52 +00:00
Colin Walters
324724da2c core: Remove cancellable/error from context creation APIs
A further cleanup, I noticed these functions never throw an
error, and we weren't consistently checking for one anyways.
2021-04-16 17:21:48 -04:00
Colin Walters
db227840f1 daemon: Always write staged JSON field
It's an important property, and it's more self-documenting if we
always emit the value rather than only when it's `true`.
2021-04-16 17:05:48 -04:00
Colin Walters
5845e3ab6a compose: Move repos/lockfile-repos validation to Rust
More prep for removing treespec.
2021-04-16 17:05:11 -04:00
Timothée Ravier
19e40a8708 countme: Force disable Count Me logic in DNF
Make sure that we do not use the internal Count Me logic in DNF in
rpm-ostree as we have our own external implementation that is aware of
the different behavior regarding repo handling.

See also the discussions in:
  - https://github.com/rpm-software-management/libdnf/issues/1174
  - https://github.com/rpm-software-management/libdnf/issues/1068
  - https://github.com/coreos/rpm-ostree/pull/2671

Also remove the corresponding note in the docs which not needed anymore.
2021-04-16 16:01:43 -04:00
Jonathan Lebon
5d199a60f7 .gitignore: add compose-{cache,logs} dirs
And roughly split the file into build system things and "owned" test
things.
2021-04-16 16:00:58 -04:00
Jonathan Lebon
464c368c88
Merge pull request #2753 from cgwalters/fix-cxx-rebuilds
build-sys: Avoid re-building + re-linking cxx-rs C++ bits each build
2021-04-16 14:08:09 -04:00
Luca Bruno
23d15a4a78
Merge pull request #2752 from cgwalters/origin-treefile-prep-1
core: Two minor API cleanups
2021-04-16 16:04:35 +00:00
Colin Walters
2ed1e73c06 build-sys: Avoid re-building + re-linking cxx-rs C++ bits each build
We need to do the same `cmp` dance for the generated `.cxx` file
as for the source, because `make` only works on timestamps.

Currently every time one edits the rust code and types `make`
we end up re-building that object, which also forces a re-link
of the `librpmostreeinternals.la` library.
2021-04-16 10:54:04 -04:00
Colin Walters
22a32a5757 core: Rename context_new_tree() to context_new_compose()
Makes the intention clearer.
2021-04-16 10:46:58 -04:00
Colin Walters
2b554dde64 core: Rename context_new_system() to context_new_client()
Makes the intention clearer.
2021-04-16 10:42:36 -04:00
Jonathan Lebon
b2b3795df1
Merge pull request #2750 from cgwalters/drop-git-mk
build-sys: Drop git.mk, hardcode .gitignore
2021-04-15 17:05:10 -04:00
Colin Walters
cd82724913 build-sys: Drop git.mk, hardcode .gitignore
As rpm-ostree is transitioning to a primarily-Rust project,
our dependency on running `make` to generate `.gitignore` is a
problem.

For example, just opening the project in an IDE that runs rust-analyzer,
the latter will start a build and generate files in the `target/` directory,
but because r-a doesn't know to run `make` we won't have `.gitignore` yet.

I think further what we should do is try changing the C/Automake side
to write generated files into `target/` too.
2021-04-15 11:29:25 -04:00
Jonathan Lebon
d2143986c7
Merge pull request #2742 from cgwalters/treefile-client 2021-04-15 10:45:02 -04:00
Colin Walters
834328f963 Move ref parsing into core
We went through a lot of gyrations on this one.  It's only
relevant to server side composes, so having the core parse
the treefile for it directly just makes sense.
2021-04-14 18:24:42 -04:00
Colin Walters
53b4fc8c26 Read treefile directly for releasever
More draining of treespec to treefile.
2021-04-14 18:24:42 -04:00
Colin Walters
29b63cf270 compose: Remove unused helper functions
No longer needed.
2021-04-14 18:24:42 -04:00
Colin Walters
c792587645 Read treefile directly for selinux and recommends flags
Part of removing treespec in favor of treefile.
2021-04-14 18:24:42 -04:00
Colin Walters
69a79bc8e6 Read treefile directly for documentation flag
Part of removing treespec in favor of treefile.
2021-04-14 18:24:42 -04:00
Colin Walters
6321916436 compose: Pass treefile directly in rpmostree_context_new_tree()
Since the treefile is a requirement for server side composes,
pass the treefile directly there in the setup function.

Prep for dropping "treespec".
2021-04-14 18:24:42 -04:00
Luca BRUNO
8e231b5aad composepost: uniform results and visibility for cxxbridge
This aligns the result types and visibility for all post-processing
functions that are bridged to C++.
2021-04-13 11:15:52 -04:00
Luca Bruno
a700b2e74b
Merge pull request #2736 from bgilbert/edit
docs: fix "Edit this page on GitHub" links
2021-04-13 12:14:27 +00:00
Stefan Berger
29440346f1 Support hardcoded user.ima to security.ima translation
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-04-12 21:16:46 -04:00
Jonathan Lebon
4179cbadd2 Release 2021.4 2021-04-12 15:36:20 -04:00
Luca Bruno
358865675a
Merge pull request #2737 from cgwalters/treefile-client-prep
Treefile client prep
2021-04-12 16:04:07 +00:00
dependabot[bot]
9a7ffb2b0c build(deps): bump libdnf from 31a8b8b to 930f258
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `31a8b8b` to `930f258`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](31a8b8bcec...930f2582f9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 11:52:49 -04:00
dependabot[bot]
aa662e8faa build(deps): bump openat-ext from 0.1.13 to 0.2.0
Bumps [openat-ext](https://github.com/coreos/openat-ext) from 0.1.13 to 0.2.0.
- [Release notes](https://github.com/coreos/openat-ext/releases)
- [Commits](https://github.com/coreos/openat-ext/compare/v0.1.13...v0.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 10:58:23 -04:00
dependabot[bot]
89d4e2dcf1 build(deps): bump cxx from 1.0.41 to 1.0.43
Bumps [cxx](https://github.com/dtolnay/cxx) from 1.0.41 to 1.0.43.
- [Release notes](https://github.com/dtolnay/cxx/releases)
- [Commits](https://github.com/dtolnay/cxx/compare/1.0.41...1.0.43)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 10:58:08 -04:00
dependabot[bot]
33e317ca23 build(deps): bump libc from 0.2.92 to 0.2.93
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.92 to 0.2.93.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.92...0.2.93)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 08:50:56 -04:00
Colin Walters
fb7514240f treefile: derive(Default)
So that it's easy to construct without deserializing.  Prep
for converting from origins.
2021-04-10 11:14:24 -04:00
Colin Walters
fab62ac9fc treefile: Make all members pub(crate)
We've been doing this piecemeal so far, let's do it all at once
now.  Prep for converting origin files to treefiles in `origin.rs`.
2021-04-10 11:12:48 -04:00