[Libosinfo] [libosinfo PATCH] osinfo-detect: Describe the needed env vars in order to run as root
Cole Robinson
crobinso at redhat.com
Tue May 21 19:00:55 UTC 2019
On 5/20/19 5:01 AM, Fabiano Fidêncio wrote:
> GVfs requires the session bus i order to work properly, which means
> `DBUS_SESSION_BUS_ADDRESS` has to be defined in the environment.
>
> https://gitlab.com/libosinfo/libosinfo/issues/30
>
Hmm that issue kinda sucks and could be a blocker for virt-install to
ever fully depend on libosinfo create_from_location for media detection,
because we want 'sudo virt-install' to just work.
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
> tools/osinfo-detect.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
> index c21e694..8c6538c 100644
> --- a/tools/osinfo-detect.c
> +++ b/tools/osinfo-detect.c
> @@ -366,6 +366,12 @@ install trees (B<tree>)
> The exit status will be 0 if an operating system was detected,
> or 1 if none was found.
>
> +=head1 ENVIRONMENT
> +
> +When running osinfo-detect as root, `DBUS_SESSION_BUS_ADDRESS` needs
> +to be defined in the environment as GVfs requires the session bus in
> +order to work properly.
> +
> =head1 AUTHORS
>
> Zeeshan Ali (Khattak) <zeeshanak at gnome.org>, Daniel P. Berrange <berrange at redhat.com>
>
This also looks like it affects general libosinfo API usage as well.
Maybe we append a message about DBUS_SESSION_BUS_ADDRESS to the error
that gvfs raises? IMO documenting it in the man page is going to
accomplish much
Thanks,
Cole
More information about the Libosinfo
mailing list