Commit Graph

1616 Commits

Author SHA1 Message Date
Jonathan Lebon
6e054517d3 app: Alias remove -> uninstall
For better finger compatibility with `dnf`.

Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Jonathan Lebon
57fa460837 core: Add all packages to the sack upfront
Don't go back and forth between adding packages to the sack and marking
them for install. Do the former upfront, and then do the latter.

This allows us to work around:
https://github.com/rpm-software-management/libdnf/issues/700

Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Jonathan Lebon
e2ed1036f1 core: Fix leak of a DnfPackage
We weren't freeing the `DnfPackage` that `dnf_sack_add_cmdline_package`
returned. But really, once it's marked for install, we don't need it.

Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Jonathan Lebon
3a616bd318 daemon/deployment-utils: Specify array element type
Otherwise, glib will complain if the array is empty since it can't infer
the type of the item.

While we're here, just `git grep` all instances of
`G_VARIANT_TYPE_ARRAY` and make sure they use a fully-specified format.
I added a test to sanity check that glib is happy to synthesize empty
`GVariant` arrays from `g_variant_builder()` if the format string is
specified.

Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Jonathan Lebon
cc1ac0eabe upgrader: Add missing check for error
Not that it matters much since that function can't fail right now
(though it does have a precondition check). But this just matches what
we do elsewhere and prepares us in the event the function becomes
fallible.

Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Jonathan Lebon
ed3294fa98 app/status: Fix spacing in function call
Closes: #1783
Approved by: cgwalters
2019-03-13 02:46:09 +00:00
Colin Walters
adff1e98b6 compose: Add boot-location: modules
And this (for now at least) completes the epic journey of the
"where's the kernel"?  With this it's found solely in
`/usr/lib/modules/$kver`.

There are a few reasons to do this; most prominent is that
it avoids duplicating the content as the locations may have
different SELinux labels.

Closes: #1773
Approved by: jlebon
2019-03-08 22:49:40 +00:00
Colin Walters
f37426f1ad compose: Remove support for boot-location: both
I'd like to add a new `boot-location: modules`.  In prep
for that, let's remove the legacy `both` which drops into
`/boot`.

The libostree support for handling `/usr/lib/ostree-boot` has
existed for over 4 years:

```
commit 37a059925f6b96d30190b65bee6bdde0ae1c6915
Commit:     Colin Walters <walters@verbum.org>
CommitDate: Sun Nov 30 23:14:05 2014 -0500

    deploy: Ensure that we can deploy using only /usr/lib/ostree-boot

```

I think we assume now that no one is now making *new* treecomposes and needs
a newer rpm-ostree and that they expect people to be able to use as an
upgrade target from a libostree that predates that.

Closes: #1773
Approved by: jlebon
2019-03-08 22:49:40 +00:00
Jonathan Lebon
1fe66e91d0 rust/treefile: Support dash convention for all options
Now that we support YAML, it's a gotcha/eyesore that some of our options
use underscores rather than dashes. Let's be nice and switch those few
options over, while of course still supporting the previous name.

Co-authored-by: Colin Walters <walters@verbum.org>

Closes: #1749
Approved by: cgwalters
2019-03-02 19:20:21 +00:00
Jonathan Lebon
27e4c353b2 daemon/sysroot: Fix ActiveTransaction property
Minor regression from #1755. Noticed this after seeing the following in
the journal:

```
Mar 01 02:41:03 f29-ros rpm-ostree[3931]: Failed to GetConnectionUnixUser for client /org/projectatomic/rpmostree1/fedora_atomic: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name '/org/projectatomic/rpmostree1/fedora_atomic': no such name
Mar 01 02:41:03 f29-ros rpm-ostree[3931]: Failed to GetConnectionUnixProcessID for client /org/projectatomic/rpmostree1/fedora_atomic: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name '/org/projectatomic/rpmostree1/fedora_atomic': no such name
```

Closes: #1769
Approved by: cgwalters
2019-03-01 15:50:33 +00:00
Colin Walters
5c69bcb4fe compose: Make initramfs.img world-readable
There's nothing secret there, it's server side generated.
Ref: https://github.com/coreos/coreos-assembler/pull/372#issuecomment-467620937

Closes: #1767
Approved by: jlebon
2019-02-27 14:33:05 +00:00
Colin Walters
07d621bac9 compose: Pass treefile directly to core
A lot of history here.  Long before the YAML treefiles, I was
dissatisfied with the JSON treefile syntax, and also wanted
to create a format that could be used by the (still experimental)
`container` builtin, and chose to use GKeyFile.

I don't think that really worked out; the Rust YAML is just way
better.

In the future we probably want to more cleanly split off the
"compose only" aspects of the treefile.  But for now, it's rather
tedious to pass down flags from the treefile into the keyfile/gvariant.
Let's just give direct access to the treefile to the core.

Prep for sysusers.

Closes: #1764
Approved by: jlebon
2019-02-25 20:56:44 +00:00
Colin Walters
a2044f8923 main: Move cancellable creation later
We should only be calling into GIO once we've set our preparatory
environment variables etc.  Not fixing anything today that I know
of, just noticed while looking at the code.

Closes: #1763
Approved by: jlebon
2019-02-25 14:21:28 +00:00
Colin Walters
13e4976f59 bwrap: Add an API to take a file descriptor
Will be used by the sysusers code to pass down a pipe that
the child writes to.

Closes: #1763
Approved by: jlebon
2019-02-25 14:21:28 +00:00
Colin Walters
406cc51fdc compose: Support RPMOSTREE_PRESERVE_TMPDIR=on-fail
This is easy to set in the environment for local development
and avoid leaking space in the success cases.

Closes: #1763
Approved by: jlebon
2019-02-25 14:21:28 +00:00
Colin Walters
aea374710e daemon: Time out client txn connections after 30s
This removes the "transaction monitor".  Originally the idea
here was things would queue, but we never really made that
work. Since transactions started grabbing the
libostree sysroot lock in particular.

Rip out the transaction monitor code with the queue and have
a singleton txn ref in the sysroot object.  This should ensure
that if a txn is active, one always gets an error message about
which one.

Next, add a 30s timeout for connections to the transaction DBus
sockets after they're complete.

This should address https://github.com/projectatomic/rpm-ostree/issues/1692
which is a case where gnome-software was leaking the txn DBus
connection and keeping it alive.

Closes: #1755
Approved by: cgwalters
2019-02-22 14:47:02 +00:00
Colin Walters
e58ee20996 cli/cancel: Close txn bus connection after cancelling
There's no reason to keep this around, we aren't going to use it.
Motivation here is the lifetime of transactions is currently
entangled with the bus connections from clients, and we don't
want to hold them open unnecessarily.

Also, we were adding a notify on the wrong object.  I think it
was just working before because something else ran the mainloop
and we got the property notification anyways.

Closes: #1759
Approved by: jlebon
2019-02-19 16:01:50 +00:00
Jonathan Lebon
677c083f24 libpriv: Rebuild policy during postprocessing
It's possible for some postprocessing scripts to affect the final
SELinux policy. This is the case for the new `/etc/default/useradd` edit
we now do (#1726), but it could've been the case beforehand too with
user scripts modifying e.g. booleans (though ideally all these
modifications would be part of RPMs).

Do a final `semodule -nB` during postprocessing so that the final policy
we commit is "up to date". Otherwise, users may only see changes take
effect if they layer packages that trigger a rebuild.

The motivation for this is specifically for `/etc/default/useradd`.
There is magic in `selinux-policy` that parses the file and generates
templated rules from the value of `HOME`.

For more info, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1669982
https://src.fedoraproject.org/rpms/selinux-policy/pull-request/14

Closes: #1754
Approved by: cgwalters
2019-02-14 17:24:09 +00:00
Jonathan Lebon
58a79056a8 libpriv/scripts: Add /run/ostree-booted for scriptlets
RPM-OSTree has been pretty good so far at consuming the exact same RPMs
used for traditional OSes without modifications. This is important,
because shielding RPMs from the OSTree abstraction means we remain
compatible with a large portion of the ecosystem.

However, there are some apps that definitely require rethinking their
approach. The example right now is akmods, which has a patch proposed to
build kmods at `%post` time on OSTree systems instead of from the
daemon.[1]

In such situations, scriptlets need something to key off of for the
OSTree-specific approach. The `/run/ostree-booted` file is the de facto
API to determine if we're running on an OSTree system or not. This patch
simply extends this API so that scriptlets can naturally make use of
them.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1667014

Closes: #1750
Approved by: cgwalters
2019-02-12 14:24:48 +00:00
Colin Walters
9ca74d0c31 compose: Fix install --unified-core
There's lots of gyrations here for unified-core vs not; it's
been broken in the case of `--unified-core` for a while I think.
In that case our workdir is tmpdir, so rename that directory.

Closes: #1743
Approved by: jlebon
2019-02-05 22:26:11 +00:00
Jonathan Lebon
7cceb35219 app/rebase: Support local repo remotes
Teach rpm-ostree to interpret rebases where the remote component is a
path to a local repo, e.g.:

    rpm-ostree rebase /mnt/ostree/repo:my/target/ref

Essentially, the local remote in this case is considered "ephemeral".
It's kind of the equivalent of, on traditional systems:

    dnf install --repofrompath repo,/path/to/repodata ...

The use case for this is in OpenShift v4, in which upgrades are done
from containers containing the OSTree commit. There, we want to point
RPM-OSTree directly at the repo in the mounted container and rebase to
the checksum.

For now, the option is marked experimental. One major reason for this is
that the way we pass the repo differs on RHEL7 vs other platforms. (See
comment block in `rpmostree-dbus-helpers.c` for details).

Related: https://github.com/openshift/machine-config-operator/issues/314

Co-authored-by: Colin Walters <walters@verbum.org>

Closes: #1732
Approved by: cgwalters
2019-02-05 18:03:02 +00:00
Jonathan Lebon
fa5be441b1 libpriv/rpm-util: Group by SRPMs when printing changelogs
I've become quite fond of the `--changelogs` switch lately on my
Silverblue. I find it useful as a first step when nailing down a
regression, or just to peruse the churn of changes after an update.

One annoyance is that the same changelog gets printed multiple times for
each RPM that shares the same SRPM. This patch does a naive lookahead to
dedupe them. Example output:

```
  NetworkManager 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-adsl 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-bluetooth 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-config-connectivity-fedora 1:1.12.6-4.fc29.noarch -> 1:1.12.6-5.fc29.noarch
  NetworkManager-libnm 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-ppp 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-wifi 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
  NetworkManager-wwan 1:1.12.6-4.fc29.x86_64 -> 1:1.12.6-5.fc29.x86_64
    * Mon Jan 14 2019 Beniamino Galvani <bgalvani@redhat.com> - 1:1.12.6-5
    - improve Wi-Fi PMF support (rh #1665694)
```

I say "naive" because this doesn't catch the case where a binary RPM is
named differently enough that they're not consecutive. Anyway, this
simple heuristic cleans up the output nicely.

Closes: #1738
Approved by: cgwalters
2019-01-26 14:36:52 +00:00
rfairley
a20d10e3d5 libpriv/util: Add date field in auto-versioning
This adds an optional date field to the prefix
passed by automatic_version_prefix. An example of specifying
the field is as follows:

10.<date:%Y>

And the fields progress like:

10.2018.0
10.2018.1
10.2018.2
10.2019.0

The date format creates a new "current date" string using
valid date directives passed into g_date_time_format().

If there is a problem reading the given date format,
an error is given and the next version is returned as NULL.

If no <date:...> tag is detected in the auto version prefix,
the same behavior as before (appending .1 and incrementing) occurs.

This may be helpful to avoid writing glue code to auto-update
the version if a date string in the commit version is desired.
Otherwise, --add-metadata-string=version= is an alternative for
complete customization.

Fixes: #1712

Closes: #1721
Approved by: jlebon
2019-01-14 18:49:41 +00:00
Colin Walters
255dc7027e compose: Minor further oxidation of postprocessing
Take a baby step into further oxidation by migrating the bit
to write our presets.

Closes: #1727
Approved by: jlebon
2019-01-07 18:50:49 +00:00
Colin Walters
bb4a17d0ba compose: Add a stub "postprocess" entrypoint in Rust
Prep for more code.

Closes: #1726
Approved by: jlebon
2019-01-07 15:35:37 +00:00
Colin Walters
43bd9f4329 core: Fix rpm-md repo caching
I'd been seeing hangs sometimes in "Importing metadata" and had
thought it was libsolv being slow, but actually the problem is
that while we explicitly check the libdnf repos,
`dnf_context_setup_sack_with_flags()` checks them again using
its `cache_age`.

Set the libdnf context's expiry to "never" after we've done the
checking so it's not checked twice.

This PR brought to you by airplane 🛫 travel and not wanting
to pay for expensive WiFi 💸.

Closes: #1723
Approved by: lucab
2018-12-25 08:39:16 +00:00
Jonathan Lebon
514f4d2473 core: Explain a bit the base/layered split mismatch issue
This is a very commonly hit issue in Fedora land. Add some explanation
so users aren't just confused, as well as the `cleanup -m` pointer. Also
link back to the main issue.

Closes: #1717
Approved by: cgwalters
2018-12-19 20:40:17 +00:00
Colin Walters
c60043c2db compose: Use dracut tmpdir under target root
The problem here is that bare-user has `user.ostreemeta` xattrs,
`tmpfs` (which bwrap uses for `/var/tmp` by default) doesn't support that.

Pass through the tmpdir to the target rootfs, which is the same place
as the repo in unified-core mode.

Ref: https://github.com/coreos/coreos-assembler/issues/254

Closes: #1716
Approved by: cgwalters
2018-12-17 22:06:49 +00:00
Jonathan Lebon
88c2700cdd daemon/deploy: Fix free() of override replace pkgs
We were using `g_strfreev()` to free the string array, but the strings
themselves were owned by the `modifiers` GVariantDict. Fix this and make
the comments about it more explicit. On my computer (and at least
Dusty's), this was only actually tripping up libc when passing more than
just one package on the CLI.

Closes: #1707

Closes: #1709
Approved by: cgwalters
2018-12-10 20:49:52 +00:00
Jonathan Lebon
a1014aee2f daemon: Perform kargs in cache-only mode
Users don't expect the tree to get updated here.

Closes: #1705

Closes: #1708
Approved by: cgwalters
2018-12-10 18:54:46 +00:00
Jonathan Lebon
b104a289f7 daemon/kargs: Fix handling of staged deployments
When handling `GetDeploymentBootConfig()`, we would trip an assertion
when trying to read the full bootconfig from a staged deployment, which
of course doesn't have a full bootconfig yet. Rework this to add a new
`staged` key to the returned dict, in which case only `options` is
included. (Which is all `rpm-ostree kargs` needs anyway).

Closes: #1708
Approved by: cgwalters
2018-12-10 18:54:46 +00:00
Jonathan Lebon
770e6e72e1 compose: Don't require full previous commit
Right now, if we want to commit onto the same ref, we require the full
previous commit. The previous commit full root is currently used as
follow:

- for handling `check-passwd` in the `previous` case
- as an optimization for SELinux policy matching (#1659)

Let's change the logic so that we gracefully handle partial commits.
This patch lowers full commit root loading in the one function that
really needs it (`rpmostree_passwd_compose_prep()`). We also turn off
the SELinux optimization if the commit is partial.

My goal here is to use this in coreos-assembler to seed the repo just
enough to keep the commit history intact. (Though we do have cache so
that we can still profit from the SELinux optimization if it's
populated).

Closes: #1704
Approved by: cgwalters
2018-12-07 21:51:14 +00:00
Jonathan Lebon
6e4d653292 compose: Factor out SELinux policy checkout
Simplifies return paths. Prep for next commit.

Closes: #1704
Approved by: cgwalters
2018-12-07 21:51:14 +00:00
Jonathan Lebon
9aee7d43ce libpriv/passwd-util: Rework error-handling
In the passwd/group migration code, rather than do a bunch of work and
then check for the error cases where we only migrate one of passwd and
group, just bring those checks and and queue the work at the end. This
simpifies the logic a bit since we don't have to maintain a
`perform_migrate` variable as well and instead can just return early in
the trival cases.

Closes: #1704
Approved by: cgwalters
2018-12-07 21:51:14 +00:00
Colin Walters
ff80765a86 daemon: Drop unused mutex
Was reading the code while looking at
https://github.com/projectatomic/rpm-ostree/issues/1692
and blinked at the comment, then noticed it hasn't been used
since:  3e289ffab0

Closes: #1699
Approved by: jlebon
2018-12-06 16:20:48 +00:00
Jonathan Lebon
544d79fd3f compose: Fix EBADF in unified core mode without cachedir
If no cache dir is given in the workdir, we would alias the cache dir fd
to the workdir fd. But of course, this meant that we'd try to close the
same fd twice when freeing the compose context. Instead, let's just copy
the fd as is also done in the non-unified path.

Closes: #1697

Closes: #1698
Approved by: lucab
2018-12-06 13:44:19 +00:00
Jonathan Lebon
bdf3cda8db Print CVEs fixed in available updates
One question I often have when looking at the output of `status -a`:

```
AvailableUpdate:
        Version: 29.20181202.0 (2018-12-02T08:37:50Z)
         Commit: dece5737a087d5c6038efdb86cb4512f867082ccfc6eb0fa97b2734c1f6d99c3
   GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
  SecAdvisories: FEDORA-2018-042156f164  Unknown    net-snmp-libs-1:5.8-3.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-core-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-modules-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-modules-extra-4.19.5-300.fc29.x86_64
                 FEDORA-2018-f467c36c2b  Moderate   git-core-2.19.2-1.fc29.x86_64
           Diff: 67 upgraded, 1 removed, 16 added
```

is "How serious and relevant are these advisories to me? How soon should
I reboot?". For the packages that I'm most familiar with, e.g. `kernel`
and `git-core`, I usually look up the advisory and check why it was
marked as a security update, mentioned CVEs, and how those affect me.

The updateinfo metadata includes a wealth of information that could be
useful here. In Fedora, CVEs treated by the security response team
result in RHBZs, which end up attached to the advisories and thus make
it into that metadata.

This patch tries to reduce friction in answering some of those questions
above by checking for those CVEs and printing a short description in the
output of `status -a`. Example:

```
AvailableUpdate:
        Version: 29.20181202.0 (2018-12-02T08:37:50Z)
         Commit: dece5737a087d5c6038efdb86cb4512f867082ccfc6eb0fa97b2734c1f6d99c3
   GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
  SecAdvisories: FEDORA-2018-042156f164  Unknown    net-snmp-libs-1:5.8-3.fc29.x86_64
                   CVE-2018-18065 CVE-2018-18066 net-snmp: various flaws [fedora-all]
                   https://bugzilla.redhat.com/show_bug.cgi?id=1637573
                 FEDORA-2018-87ba0312c2  Moderate   kernel-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-core-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-modules-4.19.5-300.fc29.x86_64
                 FEDORA-2018-87ba0312c2  Moderate   kernel-modules-extra-4.19.5-300.fc29.x86_64
                   CVE-2018-16862 kernel: cleancache: Infoleak of deleted files after reuse of old inodes
                   https://bugzilla.redhat.com/show_bug.cgi?id=1649017
                   CVE-2018-19407 kernel: kvm: NULL pointer dereference in vcpu_scan_ioapic in arch/x86/kvm/x86.c
                   https://bugzilla.redhat.com/show_bug.cgi?id=1652656
                 FEDORA-2018-f467c36c2b  Moderate   git-core-2.19.2-1.fc29.x86_64
                   CVE-2018-19486 git: Improper handling of PATH allows for commands to executed from current directory
                   https://bugzilla.redhat.com/show_bug.cgi?id=1653143
           Diff: 67 upgraded, 1 removed, 16 added
```

Including the CVE name and RHBZ link also makes it easier to look for
more details if desired.

Closes: #1695
Approved by: rfairley
2018-12-05 18:56:49 +00:00
Colin Walters
5554ca10d1 Add rpm-ostree-bootstatus.service
Capturing the system state at boot aids debugging.  This is a
trivial implementation; we could in the future do structured
logging too.

The high level goal here is to help us track system state in
Red Hat CoreOS.

Closes: #1693
Approved by: jlebon
2018-12-03 15:38:50 +00:00
Colin Walters
09e7caef4e compose: Add a CUtf8Buf copy of rojig_name
Avoids passing an allocated buffer from Rust to C; there's
controversy in the PR I sent to rust-lang around defining this as
supported.

Closes: #1691
Approved by: jlebon
2018-11-28 16:53:00 +00:00
Jonathan Lebon
01c349a558 libpriv/rpm-util: Tweak changelog entry indentation
Indent the changelog entries so it's easier to tell which entries belong
to which packages.

Before:

```
$ ros db diff -c
ostree diff commit old: rollback deployment (ef3c0e45ee1b874bc4952904a778084f0c32a0e06346e271786abf544dad54ff)
ostree diff commit new: booted deployment (c1d4c3ef571a53e5ab3dbd6ea1ec91a374ebd5f6ba9c0a99938d0649853588a5)
Upgraded:
  firefox 63.0.3-1.fc29.x86_64 -> 63.0.3-2.fc29.x86_64
* Wed Nov 21 2018 Martin Stransky <stransky@redhat.com> - 63.0.3-2
- Fixed mozbz#1507475 - crash when display changes (rhbz#1646151).

  httpd 2.4.37-3.fc29.x86_64 -> 2.4.37-5.fc29.x86_64
* Fri Nov 23 2018 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-5
- Resolves: #1652678 - TLS connection allowed while all protocols are forbidden

* Thu Nov 08 2018 Joe Orton <jorton@redhat.com> - 2.4.37-4
- add httpd.conf(5) (#1611361)
```

After:

```
$ ros db diff -c
ostree diff commit old: rollback deployment (ef3c0e45ee1b874bc4952904a778084f0c32a0e06346e271786abf544dad54ff)
ostree diff commit new: booted deployment (c1d4c3ef571a53e5ab3dbd6ea1ec91a374ebd5f6ba9c0a99938d0649853588a5)
Upgraded:
  firefox 63.0.3-1.fc29.x86_64 -> 63.0.3-2.fc29.x86_64
    * Wed Nov 21 2018 Martin Stransky <stransky@redhat.com> - 63.0.3-2
    - Fixed mozbz#1507475 - crash when display changes (rhbz#1646151).

  httpd 2.4.37-3.fc29.x86_64 -> 2.4.37-5.fc29.x86_64
    * Fri Nov 23 2018 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-5
    - Resolves: #1652678 - TLS connection allowed while all protocols are forbidden

    * Thu Nov 08 2018 Joe Orton <jorton@redhat.com> - 2.4.37-4
    - add httpd.conf(5) (#1611361)
```

Closes: #1687
Approved by: rfairley
2018-11-28 13:40:41 +00:00
Jonathan Lebon
0e8eab7bfc libpriv/rpm-util: Use g_print instead of printf
For consistency with the rest of the codebase. There were also a few
spots which were missing the space between the function name and the
opening parenthesis.

Closes: #1687
Approved by: rfairley
2018-11-28 13:40:41 +00:00
Jonathan Lebon
140704c105 daemon/transaction-types: Fix dnf cache override
Minor regression from #1587. There were places that were still doing
`dnf_context_set_cache_age()` manually, but those calls didn't exactly
have the intended effect since the core now handled caching itself.

The actual result was that the metadata was still being updated, but not
during the `dnf_repo_check` pass that the core does, but rather the
`Importing rpm-md` pass it does right after. So then, we were
incorrectly printing `(cached)` even though we'd update it afterwards.

Switch to the new way of doing things.

Closes: #1686
Approved by: cgwalters
2018-11-26 23:39:44 +00:00
Jonathan Lebon
1164b7b047 daemon/transaction-types: Drop unneeded arg
Drop the `force_refresh` boolean parameter since we only ever call it
with `TRUE`. I think this dates from an earlier implementation where we
did call it with differing values.

Small prep for next patch.

Closes: #1686
Approved by: cgwalters
2018-11-26 23:39:44 +00:00
Jonathan Lebon
ed2fefad85 Move reset out of experimental
This is relatively uncontroversial functionality that has already proved
useful when helping folks debug their stuff. Let's promote it to the
stable interface.

Closes: #1682
Approved by: rfairley
2018-11-22 20:47:50 +00:00
Jonathan Lebon
03a92c0981 app/ex: Nuke ex kargs compatibilty alias
It said so right there; "nuke in next version". No need to carry this
stuff forever. It's the final phase of feature promotion, like when one
officially moves out of their parents'.

Closes: #1682
Approved by: rfairley
2018-11-22 20:47:50 +00:00
Jonathan Lebon
17359bc0cc core: Tweak "Importing" messages
To make it more obvious what the difference between "Importing metadata"
and "Importing" is, add "rpm-md" to the first and "packages" to the
second.

Closes: #1681
Approved by: cgwalters
2018-11-21 13:54:35 +00:00
Colin Walters
da8be3f7b8 scripts: Add a hack to handle RHEL7's glibc-common.post
While we had an override for both the Fedora `glibc-all-langpacks.posttrans`
version and the RHEL7-era `glibc-common.post`, there were two
problems.

First, the RHEL7 version's lua calls `rpm.expand()` internally
rather than flagging the script itself for expansion.

Second, we also need to disable rofiles-fuse for it.

Closes: #1678
Approved by: jlebon
2018-11-21 08:14:24 +00:00
Jonathan Lebon
c9cbad94a3 daemon/utils: Finish OstreeAsyncProgress after pull
Otherwise, the object might still own an idle source on the main
context, which will cause issues if another pull operation happens
again. This wasn't causing issues before because in places where we did
do multiple pull operations, we would reuse the same
`OstreeAsyncProgress` object, and the second pull operation *did* do
`ostree_async_progress_finish()`. But that's no longer the case now with
66761916.

Closes: #1676
Approved by: cgwalters
2018-11-20 18:06:34 +00:00
Jonathan Lebon
c7ce2564dc daemon/transaction: Emit progress end signal
This is not strictly necessary since the progress is considered ended on
the client side when the transaction is finished, but let's be nice.

Closes: #1676
Approved by: cgwalters
2018-11-20 18:06:34 +00:00
Colin Walters
89486eace1 core: Typo in indicatif commit: metdatametadata
A typo.

Closes: #1673
Approved by: arithx
2018-11-13 20:08:59 +00:00