Re: [libosinfo PATCH] osinfo-detect: Describe the needed env vars in order to run as root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxx>, Daniel P. Berrange <berrange@xxxxxxxxxx>
> 
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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux