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

Re: [Xen-devel] [PATCH 2/5] raisin: Detect systemd



On Mon, 19 Oct 2015, George Dunlap wrote:
> On 16/10/15 15:04, Stefano Stabellini wrote:
> > On Fri, 16 Oct 2015, Ian Campbell wrote:
> >> On Fri, 2015-10-16 at 14:39 +0100, Stefano Stabellini wrote:
> >>> On Wed, 14 Oct 2015, George Dunlap wrote:
> >>>> Add systemd development libraries if we detect systemd present on the
> >>>> system
> >>>>
> >>>> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> >>>
> >>> Please use spaces for indentation
> >>>
> >>>     
> >>>>  components/xen | 10 ++++++++++
> >>>>  1 file changed, 10 insertions(+)
> >>>>
> >>>> diff --git a/components/xen b/components/xen
> >>>> index 090cceb..93ed288 100644
> >>>> --- a/components/xen
> >>>> +++ b/components/xen
> >>>> @@ -8,6 +8,11 @@ function xen_check_package() {
> >>>>      local DEP_Debian_common="build-essential python-dev gettext uuid
> >>>> -dev   \
> >>>>               libncurses5-dev libyajl-dev libaio-dev pkg-config
> >>>> libglib2.0-dev  \
> >>>>               libssl-dev libpixman-1-dev bridge-utils wget"
> >>>> +
> >>>> +    if [[ -e "/usr/lib/systemd" ]]
> >>>
> >>> I don't know much about systemd but isn't there a better way to detect
> >>> systemd? Check if it is running for example?
> >>
> >> You might want to build with systemd support even if systemd isn't actually
> >> the current init system the system was booted with?
> > 
> > That is possible but also the vice versa might be true: one might want
> > to build without systemd even if systemd is running. Maybe we need some
> > kind of variable that can be overridden by the user?
> 
> You mean like XEN_CONFIG_EXTRA? :-D

Actually I was thinking of something more specific like:

if [[ -z "$WITH_SYSTEMD" ]]
then
    if check-package systemd
    then
        WITH_SYSTEMD=y
    else
        WITH_SYSTEMD=n
    fi
fi

so that people that don't want systemd but they have it installed for
some reasons, they can export WITH_SYSTEMD=n and from raisin point of
view we are not cluttering the interface too much. But I am also OK with
just enable systemd if it is installed and not enable it if it is not.


> For people frobbing around with XEN_CONFIG_EXTRA, I think it's
> reasonable for them to get a build error if they add --with-systemd but
> don't have the requisite packages.  (I'm pretty sure that's what will
> happen now, at any rate.)
> 
> Since I'm going to be checking for systemd packages anyway due to the
> container issue, maybe it would just make sense to include the dep
> automatically only if the systemd packages are installed.

I agree, that works and it is simple.


> Alternately, I suppose we could extend the check-package "syntax" to
> have "if package X in stalled, add dependency Y" -- similar to the '|'
> operator we added earlier.  Then we could do something like this:
> 
> systemd:systemd-devel systemd-container:systemd-container-devel
> 
> What do you think?

I would prefer to avoid it unless strictly necessary.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.