Richard W.M. Jones
2017-Apr-04 22:03 UTC
[Libguestfs] [PATCH] builder: Don't hard-code /etc for configuration files.
Use ./configure --sysconfdir setting. --- builder/paths.ml | 2 +- mllib/guestfs_config.ml.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/paths.ml b/builder/paths.ml index cbd9d4bd0..9ce8504a1 100644 --- a/builder/paths.ml +++ b/builder/paths.ml @@ -35,7 +35,7 @@ let xdg_config_home () let xdg_config_dirs () let dirs try Sys.getenv "XDG_CONFIG_DIRS" - with Not_found -> "/etc/xdg" in + with Not_found -> Guestfs_config.sysconfdir ^ "/xdg" in let dirs = String.nsplit ":" dirs in let dirs = List.filter (fun x -> x <> "") dirs in List.map (fun x -> x // prog) dirs diff --git a/mllib/guestfs_config.ml.in b/mllib/guestfs_config.ml.in index 68dbcbc20..15bebd582 100644 --- a/mllib/guestfs_config.ml.in +++ b/mllib/guestfs_config.ml.in @@ -22,5 +22,6 @@ let package_version = "@PACKAGE_VERSION@" let package_version_full = "@PACKAGE_VERSION_FULL@" let prefix = "@prefix@" let datadir = prefix ^ "/share" +let sysconfdir = "@sysconfdir@" let host_cpu = "@host_cpu@" let gnupg = "@GNUPG@" -- 2.12.0
Apparently Analagous Threads
- [PATCH v2] builder: Don't hard-code /etc for configuration files.
- Re: [PATCH v2] builder: Don't hard-code /etc for configuration files.
- [PATCH] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
- Re: [PATCH 3/8] builder: add functions to read XDG_CONFIG_DIRS and XDG_CONFIG_PATH
- [PATCH v4 1/7] v2v: require libvirt