IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Because otherwise, there's no way to see the output of the script.
Also, turn off `gather_facts` since in the majority of cases, we don't
need it, so let's avoid the overhead. We can make this an opt-in flag
later on if needed.
Closes: #1304
Approved by: cgwalters
This came up in a few places recently; it happens for RHEL in some
cases, and in general we don't want to completely fail the daemon
start if someone messes up their remote config.
Closes: https://github.com/projectatomic/rpm-ostree/issues/1301Closes: #1302
Approved by: jlebon
This adds a shell primitive to make it easy to execute a playbook
task list.
The big picture idea is to sync with https://github.com/ostreedev/ostree/pull/1462
and rewrite some of the libvm shell stuff as playbooks, allowing easier
code sharing with a-h-t and just in general being a better library for
talking ssh and executing commnads.
Closes: #1297
Approved by: jlebon
This is a logical followup to:
- "core: Add rpmostree.repo metadata to imported packages" AKA a52cb7d78e
- "compose: Add rpmostree.rpmmd-repo metadata to commits by default" AKA e7a42f70a9
Basically I'd like to display this in `status` at least, though how we render it
gets...interesting when there is layering in play. For now though let's just
capture the data the same way we do server side.
Theoretically we could reconstruct this data by walking all of the pkgrefs in
the tree but...ugh. It's just a lot simpler to have it in this form too just
like the server-side path.
Closes: #1296
Approved by: jlebon
Very often when I have a pending deployment, I just want to find out
what the diff is before rebooting. We do print it after whatever
transaction laid down the new deployment, though we may not reboot right
away. It seems like a common enough operation to warrant some shortcuts.
This makes `db diff` more useful by automatically subbing in the booted
deployment if less arguments are given:
rpm-ostree db diff
<diff booted and pending deployment>
rpm-ostree db diff $csum
<diff booted and $csum>
rpm-ostree db diff $csum1 $csum2
<as before, diff $csum1 and $csum2>
As before, we never try to even load the sysroot in the last invocation,
so it still works equally well on non-OSTree systems/unprivileged.
Closes: #1294
Approved by: cgwalters
No functional change. Prep for more work.
Note we reword `old/new_ref` to `old/new_desc` inside the function
because it's only used for printing at this point.
Closes: #1294
Approved by: cgwalters
Fix all instances where we were returning `EXIT_FAILURE` instead of
`FALSE`. Also be more precise and use `gboolean` instead of `int` as
return type, which probably makes it easier to fall in this trap.
We should probably add a `make syntax-check` or something to scan for
these.
Closes: #1294
Approved by: cgwalters
Implemented in libostree in https://github.com/ostreedev/ostree/pull/1464
Let's display it - wrapping the command will come later.
I also just noticed `rpmostree_syscore_filter_deployments()` at least is
going to have to learn about pinning; will need to improve the test suite
around this too.
Closes: #1292
Approved by: jlebon
Add the missing docs for the recently promoted `override` command.
Also drop the `pkg-add` and `pkg-remove` mentions. I think `install` and
`uninstall` have pervaded enough by now that most people have probably
forgotten (or never learned) the legacy aliases. Let's just nuke them
from the man pages.
Closes: #1291
Approved by: cgwalters
If the `rpm-ostreed-automatic.service` unit is running while a user runs
`status`, we would incorrectly print `no runs since boot`. Check for
this case and just show the state as `running`.
Closes: #1291
Approved by: cgwalters
We had no coverage for `--check` and `--preview`. Now that they use the
more efficient auto-updates API, it should be fine to document/recommend
to users. Let's add some coverage in the existing auto-updates tests to
make sure we don't regress on them e.g. only working when auto-update
"check" mode is on.
Closes: #1268
Approved by: cgwalters
Rather than recalculating `cached-update` as part of transaction
cleanups and RpmostreedOS internal reloads, write it directly to a file
from `deploy_transaction_execute`. This gives two major benefits:
1. Auto-updates now has virtually zero impact to daemon startup time.
2. We get to directly use the `DnfSack` created during metadata refresh
rather than reconstructing it later on. This greatly simplifies code.
This makes use of new APIs in libdnf to skip filelists and load
updateinfo metadata right from the start.
Closes: #1268
Approved by: cgwalters
Allow callers to pass flags directly to libdnf depending on their needs.
Make use of this in `refresh-md` at least so that we don't even bother
loading the rpmdb since we're just interested in downloading fresh bits.
Closes: #1268
Approved by: cgwalters
All depsolving etc. was done on the server side; we just need the
`primary.xml` in order to enumerate available rojigRPMs.
Update submodule: libdnf
Requires: https://github.com/rpm-software-management/libdnf/pull/416Closes: #1268
Approved by: cgwalters
The "Preparing pkg txn" message is a bit misleading when all we're doing
is e.g. `refresh-md` or check-mode auto-updates trigger. Move that
message to `prepare()` instead.
We already do print to the journal the repos that are enabled before we
try to update them. That seems like good enough information for the
cases mentioned above.
Closes: #1289
Approved by: cgwalters
We would error out when trying to start the transient httpd service if
it already exists, e.g. from a previous test.
Depending on how we exit, the `vm_stop_httpd` trap for the previous test
might not have been able to kick in. I think this happens when we exit
using `fatal`, which just does an `exit 1`. It's not strictly an error,
so doesn't trip the `ERR` handler.
Let's just go the extra mile and explicitly delete transient services if
they already exist.
Closes: #1284
Approved by: cgwalters
Not sure what I was thinking using "makecache" as the human-friendly
title for this transaction, when the well-known name is "refresh-md".
Let's just make these match.
Closes: #1284
Approved by: cgwalters
I prefer to use `-Og` rather than `-O0` in debug mode. Notably, it shuts
up `_FORTIFY_SOURCE` warnings which require *some* optimizations turned
on.
Closes: #1284
Approved by: cgwalters
To reduce confusion in future versions of myself and other readers,
complete the suggested rename from "redirect-output" to "output-to-self"
to internal variable names as well.
Closes: #1283
Approved by: cgwalters
This renames the remaining C files, tests, etc. There are only
a few hits for `jigdo` left; changing them would be a format break,
so let's wait to do that until we need to.
Closes: #1279
Approved by: jlebon
This renames the API functions in the core and origin, and also fixes up the
fact that we were still looking for `jigdo/` refs in the pruning code.
Closes: #1279
Approved by: jlebon
Let's give a nicer error than 'Permission denied' if users try to run
this as non-root. Kinda overkill to set up polkit auth for this command.
Feels like something only uid 0 should be able to do anyway.
Also fix `/usr` typo.
Closes: #1286
Approved by: cgwalters
Fedora is apparently currently using sshfs because S390 is in a different
location than the main servers.
Since it seems nontrivial to detect just sshfs, and FUSE is problematic in
general, let's just do the the not-horrific-on-netfs path for all FUSE mounts.
Closes: #1285
Approved by: jlebon
If one isn't actually booted in a deployment, we'd get `NULL` from
libostree. Check for it before trying to use it. Something something
Rust.
This will all go away soon with #1268, though this quick fix should
allow anyone hitting this to use FAHC RPMs to move forward.
Closes: #1282
Approved by: cgwalters
OK so I give up on this glibc locales issue; see
https://github.com/ostreedev/ostree/pull/1470
Based on what I've been reading it looks like newer FUSE may
help, but we can't rely on that.
We should also rewrite the upstream glibc code to be less pathological; it'd
make sense to use `O_TMPFILE` for example, and keep track of how many bytes we
wrote rather than calling `fstat()`, and rather than `truncate()` on the tmpl
file at the end, do a create-empty-file-then-`rename()`. But for now let's go
with this so we get the pretty `●` back in rojig mode!
Closes: #1280
Approved by: jlebon
As mentioned during code review, it feels odd to have our automatic
service collect output under its name rather than the main daemon. It
shouldn't be thought of as a daemon with its own logs, it's really just
a trigger.
We change this here so that for automatic updates, output is redirected
to the daemon stdout, which of course goes to the journal. This should
make logs in case of errors more discoverable as well since
`rpm-ostreed` is the well-known name.
I drilled down the notion directly into `RpmostreedTransaction` since I
think it's a useful property that might be handy at a more general
level.
Closes: #1278
Approved by: cgwalters
Teach the RpmOstreeOutput default handler to be nice to non-TTYs as
well, just like we did in #1225. We should look at somehow unifying this
with the code in `rpmostree-dbus-helpers.c`.
Closes: #1278
Approved by: cgwalters
Didn't hit this, but clearly we should check if there's even a
transaction to listen to before trying to connect a signal.
Closes: #1278
Approved by: cgwalters
This was superseded by `rpmostree_output_message`. This is prep for
being able to "silence" transactions and instead have all the output go
to the daemon.
Closes: #1277
Approved by: cgwalters
This makes it easy to get an interactive shell instead of executing a specific
script. I used this while debugging `build-locale-archive`. This is better than
`bwrap-script-shell.sh` as we'll get the real rofiles-fuse etc., and
additionally have the root filesystem at the exact same point.
Closes: #1275
Approved by: jlebon
We're continuing an incremental renaming process; previously we changed
the most user-visible strings. Now we're doing some internal variables,
and notably the cached refs and the origin files - the latter set is
things that end up on disk.
This leaves the biggest items; renaming APIs, files, and tests.
Closes: #1276
Approved by: jlebon
Let's try to match expectations a bit from the dnf/yum world and
describe e.g. a `noarch` package become archful as an upgrade rather
than a removal and an addition. This was originally implicitly supported
(before PR #1230) by the fact that we didn't compare arches at all (and
in fact, arches don't even show up in a `db diff` output for modified
packages).
We bring this back here, but only in the simple case that it's a single
package. We still don't try to do any fancy handling for packages of the
same name.
Closes: #1272Closes: #1274
Approved by: cgwalters
Classic indentation/bracing error causing logic error. This made us skip
over some packages which then showed up wrongly as removed. This will be
implicitly tested in a new test case added in a following commit.
Closes: #1274
Approved by: cgwalters
The man page was a little weak on how to configure and enable the
automatic update policy of `rpm-ostreed`. I've added an `EXAMPLE`
section that shows the necessary steps to get this working.
Closes: #1273
Approved by: jlebon
I noticed that Ubuntu also uses the original "jigdo", so let's start
pulling off the band-aid here and do a mass rename.
For this first pass I'm focusing on CLI entrypoints and docs, as that's what
people are going to see; renaming all of the internal C functions, structure
variables etc. can come later.
Closes: #1269
Approved by: jlebon