fwupd/libfwupd/fwupd-remote-private.h
Mario Limonciello d1681e6de5 libfwupd: Add a new private function fwupd_remote_set_remotes_dir
This allows the daemon to set the base directory to store remotes.

This fixes issues with systemd where the installation prefix was set
to soemthing not writable such as `/usr/local` but systemd
`STATE_DIRECTORY` doesn't match up.

```
$ fwupdmgr refresh
Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading…             [***************************************] Less than one minute remaining…
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc

Failed to update metadata for lvfs: Error creating directory /usr/local/var/lib/fwupd/remotes.d: Read-only file system
```

It should also hopefully help with immutable systems.
2019-08-29 11:44:32 -05:00

30 lines
843 B
C

/*
* Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fwupd-remote.h"
G_BEGIN_DECLS
GVariant *fwupd_remote_to_variant (FwupdRemote *self);
gboolean fwupd_remote_load_from_filename (FwupdRemote *self,
const gchar *filename,
GCancellable *cancellable,
GError **error);
void fwupd_remote_set_priority (FwupdRemote *self,
gint priority);
void fwupd_remote_set_agreement (FwupdRemote *self,
const gchar *agreement);
void fwupd_remote_set_mtime (FwupdRemote *self,
guint64 mtime);
gchar **fwupd_remote_get_order_after (FwupdRemote *self);
gchar **fwupd_remote_get_order_before (FwupdRemote *self);
void fwupd_remote_set_remotes_dir (FwupdRemote *self,
const gchar *directory);
G_END_DECLS