diff --git a/contrib/ci/build_and_install_rpms.sh b/contrib/ci/build_and_install_rpms.sh index ff234652f..8fe02a058 100755 --- a/contrib/ci/build_and_install_rpms.sh +++ b/contrib/ci/build_and_install_rpms.sh @@ -42,7 +42,7 @@ cp $HOME/rpmbuild/RPMS/*/*.rpm . # run the installed tests if [ "$CI" = "true" ]; then - sed "s,^EnableTestSuite=.*,EnableTestSuite=true," -i /etc/fwupd.conf + sed "s,^EnableTestSuite=.*,EnableTestSuite=true," -i /etc/fwupd/daemon.conf mkdir -p /run/dbus mkdir -p /var ln -s /var/run /run diff --git a/contrib/debian/fwupd-tests.postinst b/contrib/debian/fwupd-tests.postinst index 47f61827f..8191dc352 100644 --- a/contrib/debian/fwupd-tests.postinst +++ b/contrib/debian/fwupd-tests.postinst @@ -5,11 +5,11 @@ set -e #only enable on installation not upgrade if [ "$1" = configure ] && [ -z "$2" ]; then - if [ -f /etc/fwupd.conf ]; then + if [ -f /etc/fwupd/daemon.conf ]; then if [ "$CI" = "true" ]; then - sed "s,^EnableTestSuite=.*,EnableTestSuite=true," -i /etc/fwupd.conf + sed "s,^EnableTestSuite=.*,EnableTestSuite=true," -i /etc/fwupd/daemon.conf else - echo "To enable test suite, modify /etc/fwupd.conf" + echo "To enable test suite, modify /etc/fwupd/daemon.conf" fi fi fi diff --git a/contrib/debian/fwupd-tests.postrm b/contrib/debian/fwupd-tests.postrm index 9e82d8fa9..6f49616d8 100644 --- a/contrib/debian/fwupd-tests.postrm +++ b/contrib/debian/fwupd-tests.postrm @@ -4,11 +4,11 @@ set -e #DEBHELPER# if [ "$1" = remove -o "$1" = purge ]; then - if [ -f /etc/fwupd.conf ]; then + if [ -f /etc/fwupd/daemon.conf ]; then if [ "$CI" = "true" ]; then - sed "s,^EnableTestSuite=.*,EnableTestSuite=false," -i /etc/fwupd.conf + sed "s,^EnableTestSuite=.*,EnableTestSuite=false," -i /etc/fwupd/daemon.conf else - echo "To disable test suite, modify /etc/fwupd.conf" + echo "To disable test suite, modify /etc/fwupd/daemon.conf" fi fi fi diff --git a/contrib/debian/fwupd.install b/contrib/debian/fwupd.install index 8eeb9657e..058d79639 100644 --- a/contrib/debian/fwupd.install +++ b/contrib/debian/fwupd.install @@ -11,7 +11,7 @@ usr/share/man/man1/* lib/systemd/system/* var/lib/fwupd lib/udev/rules.d/* -data/fwupd.conf etc +data/daemon.conf etc/fwupd debian/fwupd.pkla /var/lib/polkit-1/localauthority/10-vendor.d usr/lib/*/fwupd-plugins-*/*.so debian/lintian/fwupd usr/share/lintian/overrides diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index d09c3ac37..265058765 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -179,7 +179,7 @@ mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg %files -f %{name}.lang %doc README.md AUTHORS NEWS %license COPYING -%config(noreplace)%{_sysconfdir}/fwupd.conf +%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf %dir %{_libexecdir}/fwupd %{_libexecdir}/fwupd/fwupd %{_bindir}/dfu-tool diff --git a/data/fwupd.conf b/data/daemon.conf similarity index 100% rename from data/fwupd.conf rename to data/daemon.conf diff --git a/data/meson.build b/data/meson.build index 70f43a694..7938381dd 100644 --- a/data/meson.build +++ b/data/meson.build @@ -7,8 +7,8 @@ if get_option('enable-tests') subdir('installed-tests') endif -install_data(['fwupd.conf'], - install_dir : get_option('sysconfdir') +install_data(['daemon.conf'], + install_dir : join_paths(get_option('sysconfdir'), 'fwupd') ) install_data(['org.freedesktop.fwupd.metainfo.xml'], diff --git a/data/tests/fwupd.conf b/data/tests/daemon.conf similarity index 100% rename from data/tests/fwupd.conf rename to data/tests/daemon.conf diff --git a/src/fu-config.c b/src/fu-config.c index 895839938..0b257229f 100644 --- a/src/fu-config.c +++ b/src/fu-config.c @@ -60,7 +60,7 @@ fu_config_get_config_paths (void) } /* use sysconfig, and then fall back to /etc */ - sysconfdir = g_build_filename (SYSCONFDIR, "fwupd", NULL); + sysconfdir = g_build_filename (FWUPDCONFIGDIR, NULL); if (g_file_test (sysconfdir, G_FILE_TEST_EXISTS)) g_ptr_array_add (paths, g_steal_pointer (&sysconfdir)); @@ -293,7 +293,7 @@ fu_config_load (FuConfig *self, GError **error) g_ptr_array_set_size (self->remotes, 0); /* load the main daemon config file */ - config_file = g_build_filename (SYSCONFDIR, "fwupd.conf", NULL); + config_file = g_build_filename (FWUPDCONFIGDIR, "daemon.conf", NULL); g_debug ("loading config values from %s", config_file); if (!g_key_file_load_from_file (self->keyfile, config_file, G_KEY_FILE_NONE, error)) diff --git a/src/meson.build b/src/meson.build index e5220cd7a..ffd543107 100644 --- a/src/meson.build +++ b/src/meson.build @@ -137,6 +137,7 @@ executable( '-DPLUGINDIR="' + plugin_dir + '"', '-DSYSFSFIRMWAREDIR="/sys/firmware"', '-DSYSCONFDIR="' + default_sysconfdir + '"', + '-DFWUPDCONFIGDIR="' + join_paths(default_sysconfdir, 'fwupd') + '"', '-DFU_OFFLINE_DESTDIR=""', ], install : true, @@ -202,6 +203,7 @@ if get_option('enable-tests') '-DPLUGINDIR="' + testdatadir_src + '"', '-DSYSFSFIRMWAREDIR="' + testdatadir_src + '"', '-DSYSCONFDIR="' + testdatadir_src + '"', + '-DFWUPDCONFIGDIR="' + testdatadir_src + '"', ], ) test('fu-self-test', e, is_parallel:false)