All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: generate systemd service files only when systemd is available
@ 2015-01-20 11:47 Wei Liu
  2015-01-20 11:58 ` Ian Campbell
  2015-01-20 14:49 ` Ian Jackson
  0 siblings, 2 replies; 10+ messages in thread
From: Wei Liu @ 2015-01-20 11:47 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell

Though that's not in any way harmful but it is on the other hand not
very useful.

Please rerun autogen.sh after applying this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/configure.ac | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/tools/configure.ac b/tools/configure.ac
index 113285d..850ba23 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -12,16 +12,6 @@ hotplug/Linux/init.d/sysconfig.xencommons
 hotplug/Linux/init.d/xen-watchdog
 hotplug/Linux/init.d/xencommons
 hotplug/Linux/init.d/xendomains
-hotplug/Linux/systemd/proc-xen.mount
-hotplug/Linux/systemd/var-lib-xenstored.mount
-hotplug/Linux/systemd/xen-init-dom0.service
-hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
-hotplug/Linux/systemd/xen-watchdog.service
-hotplug/Linux/systemd/xenconsoled.service
-hotplug/Linux/systemd/xendomains.service
-hotplug/Linux/systemd/xenstored.service
-hotplug/Linux/systemd/xenstored.socket
-hotplug/Linux/systemd/xenstored_ro.socket
 hotplug/Linux/vif-setup
 hotplug/Linux/xen-backend.rules
 hotplug/Linux/xen-hotplug-common.sh
@@ -386,5 +376,21 @@ AC_SUBST(LIBNL3_CFLAGS)
 fi # ! $rump
 
 AX_AVAILABLE_SYSTEMD()
+
+AS_IF([test "x$systemd" = "xy"], [
+    AC_CONFIG_FILES([
+    hotplug/Linux/systemd/proc-xen.mount
+    hotplug/Linux/systemd/var-lib-xenstored.mount
+    hotplug/Linux/systemd/xen-init-dom0.service
+    hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
+    hotplug/Linux/systemd/xen-watchdog.service
+    hotplug/Linux/systemd/xenconsoled.service
+    hotplug/Linux/systemd/xendomains.service
+    hotplug/Linux/systemd/xenstored.service
+    hotplug/Linux/systemd/xenstored.socket
+    hotplug/Linux/systemd/xenstored_ro.socket
+    ])
+])
+
 AC_OUTPUT()
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 11:47 [PATCH] tools: generate systemd service files only when systemd is available Wei Liu
@ 2015-01-20 11:58 ` Ian Campbell
  2015-01-20 12:07   ` Wei Liu
  2015-01-20 14:49 ` Ian Jackson
  1 sibling, 1 reply; 10+ messages in thread
From: Ian Campbell @ 2015-01-20 11:58 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Jackson, xen-devel

On Tue, 2015-01-20 at 11:47 +0000, Wei Liu wrote:
> Though that's not in any way harmful but it is on the other hand not
> very useful.

It's not 100% clear in the docs that you can call this macro twice, but
it definitely doesn't say you can't so I'd assume it was OK:
Acked-by: Ian Campbell <ian.campbell@citrix.com>

> 
> Please rerun autogen.sh after applying this patch.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  tools/configure.ac | 26 ++++++++++++++++----------
>  1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/configure.ac b/tools/configure.ac
> index 113285d..850ba23 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -12,16 +12,6 @@ hotplug/Linux/init.d/sysconfig.xencommons
>  hotplug/Linux/init.d/xen-watchdog
>  hotplug/Linux/init.d/xencommons
>  hotplug/Linux/init.d/xendomains
> -hotplug/Linux/systemd/proc-xen.mount
> -hotplug/Linux/systemd/var-lib-xenstored.mount
> -hotplug/Linux/systemd/xen-init-dom0.service
> -hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> -hotplug/Linux/systemd/xen-watchdog.service
> -hotplug/Linux/systemd/xenconsoled.service
> -hotplug/Linux/systemd/xendomains.service
> -hotplug/Linux/systemd/xenstored.service
> -hotplug/Linux/systemd/xenstored.socket
> -hotplug/Linux/systemd/xenstored_ro.socket
>  hotplug/Linux/vif-setup
>  hotplug/Linux/xen-backend.rules
>  hotplug/Linux/xen-hotplug-common.sh
> @@ -386,5 +376,21 @@ AC_SUBST(LIBNL3_CFLAGS)
>  fi # ! $rump
>  
>  AX_AVAILABLE_SYSTEMD()
> +
> +AS_IF([test "x$systemd" = "xy"], [
> +    AC_CONFIG_FILES([
> +    hotplug/Linux/systemd/proc-xen.mount
> +    hotplug/Linux/systemd/var-lib-xenstored.mount
> +    hotplug/Linux/systemd/xen-init-dom0.service
> +    hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> +    hotplug/Linux/systemd/xen-watchdog.service
> +    hotplug/Linux/systemd/xenconsoled.service
> +    hotplug/Linux/systemd/xendomains.service
> +    hotplug/Linux/systemd/xenstored.service
> +    hotplug/Linux/systemd/xenstored.socket
> +    hotplug/Linux/systemd/xenstored_ro.socket
> +    ])
> +])
> +
>  AC_OUTPUT()
>  

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 11:58 ` Ian Campbell
@ 2015-01-20 12:07   ` Wei Liu
  2015-01-20 12:12     ` Wei Liu
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Liu @ 2015-01-20 12:07 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

On Tue, Jan 20, 2015 at 11:58:43AM +0000, Ian Campbell wrote:
> On Tue, 2015-01-20 at 11:47 +0000, Wei Liu wrote:
> > Though that's not in any way harmful but it is on the other hand not
> > very useful.
> 
> It's not 100% clear in the docs that you can call this macro twice, but
> it definitely doesn't say you can't so I'd assume it was OK:
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 

I tested this patch and it worked. There is similar usage in glibc
configure.ac.

Wei.

> > 
> > Please rerun autogen.sh after applying this patch.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > ---
> >  tools/configure.ac | 26 ++++++++++++++++----------
> >  1 file changed, 16 insertions(+), 10 deletions(-)
> > 
> > diff --git a/tools/configure.ac b/tools/configure.ac
> > index 113285d..850ba23 100644
> > --- a/tools/configure.ac
> > +++ b/tools/configure.ac
> > @@ -12,16 +12,6 @@ hotplug/Linux/init.d/sysconfig.xencommons
> >  hotplug/Linux/init.d/xen-watchdog
> >  hotplug/Linux/init.d/xencommons
> >  hotplug/Linux/init.d/xendomains
> > -hotplug/Linux/systemd/proc-xen.mount
> > -hotplug/Linux/systemd/var-lib-xenstored.mount
> > -hotplug/Linux/systemd/xen-init-dom0.service
> > -hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> > -hotplug/Linux/systemd/xen-watchdog.service
> > -hotplug/Linux/systemd/xenconsoled.service
> > -hotplug/Linux/systemd/xendomains.service
> > -hotplug/Linux/systemd/xenstored.service
> > -hotplug/Linux/systemd/xenstored.socket
> > -hotplug/Linux/systemd/xenstored_ro.socket
> >  hotplug/Linux/vif-setup
> >  hotplug/Linux/xen-backend.rules
> >  hotplug/Linux/xen-hotplug-common.sh
> > @@ -386,5 +376,21 @@ AC_SUBST(LIBNL3_CFLAGS)
> >  fi # ! $rump
> >  
> >  AX_AVAILABLE_SYSTEMD()
> > +
> > +AS_IF([test "x$systemd" = "xy"], [
> > +    AC_CONFIG_FILES([
> > +    hotplug/Linux/systemd/proc-xen.mount
> > +    hotplug/Linux/systemd/var-lib-xenstored.mount
> > +    hotplug/Linux/systemd/xen-init-dom0.service
> > +    hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> > +    hotplug/Linux/systemd/xen-watchdog.service
> > +    hotplug/Linux/systemd/xenconsoled.service
> > +    hotplug/Linux/systemd/xendomains.service
> > +    hotplug/Linux/systemd/xenstored.service
> > +    hotplug/Linux/systemd/xenstored.socket
> > +    hotplug/Linux/systemd/xenstored_ro.socket
> > +    ])
> > +])
> > +
> >  AC_OUTPUT()
> >  
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 12:07   ` Wei Liu
@ 2015-01-20 12:12     ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2015-01-20 12:12 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

On Tue, Jan 20, 2015 at 12:07:48PM +0000, Wei Liu wrote:
> On Tue, Jan 20, 2015 at 11:58:43AM +0000, Ian Campbell wrote:
> > On Tue, 2015-01-20 at 11:47 +0000, Wei Liu wrote:
> > > Though that's not in any way harmful but it is on the other hand not
> > > very useful.
> > 
> > It's not 100% clear in the docs that you can call this macro twice, but
> > it definitely doesn't say you can't so I'd assume it was OK:
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> 
> I tested this patch and it worked. There is similar usage in glibc
> configure.ac.
> 

And FYI

https://www.gnu.org/software/automake/manual/html_node/Requirements.html

contains snippets that call AC_CONFIG_FILES more than once.

So it is officially legal to do that! :-)

Wei.

> Wei.
> 
> > > 
> > > Please rerun autogen.sh after applying this patch.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > > ---
> > >  tools/configure.ac | 26 ++++++++++++++++----------
> > >  1 file changed, 16 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/tools/configure.ac b/tools/configure.ac
> > > index 113285d..850ba23 100644
> > > --- a/tools/configure.ac
> > > +++ b/tools/configure.ac
> > > @@ -12,16 +12,6 @@ hotplug/Linux/init.d/sysconfig.xencommons
> > >  hotplug/Linux/init.d/xen-watchdog
> > >  hotplug/Linux/init.d/xencommons
> > >  hotplug/Linux/init.d/xendomains
> > > -hotplug/Linux/systemd/proc-xen.mount
> > > -hotplug/Linux/systemd/var-lib-xenstored.mount
> > > -hotplug/Linux/systemd/xen-init-dom0.service
> > > -hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> > > -hotplug/Linux/systemd/xen-watchdog.service
> > > -hotplug/Linux/systemd/xenconsoled.service
> > > -hotplug/Linux/systemd/xendomains.service
> > > -hotplug/Linux/systemd/xenstored.service
> > > -hotplug/Linux/systemd/xenstored.socket
> > > -hotplug/Linux/systemd/xenstored_ro.socket
> > >  hotplug/Linux/vif-setup
> > >  hotplug/Linux/xen-backend.rules
> > >  hotplug/Linux/xen-hotplug-common.sh
> > > @@ -386,5 +376,21 @@ AC_SUBST(LIBNL3_CFLAGS)
> > >  fi # ! $rump
> > >  
> > >  AX_AVAILABLE_SYSTEMD()
> > > +
> > > +AS_IF([test "x$systemd" = "xy"], [
> > > +    AC_CONFIG_FILES([
> > > +    hotplug/Linux/systemd/proc-xen.mount
> > > +    hotplug/Linux/systemd/var-lib-xenstored.mount
> > > +    hotplug/Linux/systemd/xen-init-dom0.service
> > > +    hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
> > > +    hotplug/Linux/systemd/xen-watchdog.service
> > > +    hotplug/Linux/systemd/xenconsoled.service
> > > +    hotplug/Linux/systemd/xendomains.service
> > > +    hotplug/Linux/systemd/xenstored.service
> > > +    hotplug/Linux/systemd/xenstored.socket
> > > +    hotplug/Linux/systemd/xenstored_ro.socket
> > > +    ])
> > > +])
> > > +
> > >  AC_OUTPUT()
> > >  
> > 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 11:47 [PATCH] tools: generate systemd service files only when systemd is available Wei Liu
  2015-01-20 11:58 ` Ian Campbell
@ 2015-01-20 14:49 ` Ian Jackson
  2015-01-20 15:12   ` Wei Liu
  1 sibling, 1 reply; 10+ messages in thread
From: Ian Jackson @ 2015-01-20 14:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Campbell, xen-devel

Wei Liu writes ("[PATCH] tools: generate systemd service files only when systemd is available"):
> Though that's not in any way harmful but it is on the other hand not
> very useful.

What is the effect of this in the context of a distro package, where
the build may occur in a different situation to the installed
package ?

Ian.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 14:49 ` Ian Jackson
@ 2015-01-20 15:12   ` Wei Liu
  2015-01-20 15:19     ` Ian Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Liu @ 2015-01-20 15:12 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, Ian Campbell, xen-devel

On Tue, Jan 20, 2015 at 02:49:12PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH] tools: generate systemd service files only when systemd is available"):
> > Though that's not in any way harmful but it is on the other hand not
> > very useful.
> 
> What is the effect of this in the context of a distro package, where
> the build may occur in a different situation to the installed
> package ?
> 

Not sure if I understand you question but let me try to answer.

Conceptually speaking for Xen's systemd components to function properly
the service files may need to rely on other components to be built. If
systemd is not available at build time that means those components which
service files rely on cannot be built, so the service files alone aren't
very useful even if you generate and package them.

Practically speaking those service files don't depend on any systemd
specific components to be built at the moment so it's harmless to
package them.

Wei.

> Ian.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 15:12   ` Wei Liu
@ 2015-01-20 15:19     ` Ian Campbell
  2015-01-20 15:37       ` Wei Liu
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Campbell @ 2015-01-20 15:19 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Jackson, xen-devel

On Tue, 2015-01-20 at 15:12 +0000, Wei Liu wrote:
> On Tue, Jan 20, 2015 at 02:49:12PM +0000, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH] tools: generate systemd service files only when systemd is available"):
> > > Though that's not in any way harmful but it is on the other hand not
> > > very useful.
> > 
> > What is the effect of this in the context of a distro package, where
> > the build may occur in a different situation to the installed
> > package ?
> > 
> 
> Not sure if I understand you question but let me try to answer.
> 
> Conceptually speaking for Xen's systemd components to function properly
> the service files may need to rely on other components to be built.

Where components is things like socket activation support in xenstored
etc, I think? Or is there more to it?

>  If
> systemd is not available at build time that means those components which
> service files rely on cannot be built, so the service files alone aren't
> very useful even if you generate and package them.
> 
> Practically speaking those service files don't depend on any systemd
> specific components to be built at the moment so it's harmless to
> package them.
> 
> Wei.
> 
> > Ian.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 15:19     ` Ian Campbell
@ 2015-01-20 15:37       ` Wei Liu
  2015-01-20 15:41         ` Ian Jackson
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Liu @ 2015-01-20 15:37 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

On Tue, Jan 20, 2015 at 03:19:31PM +0000, Ian Campbell wrote:
> On Tue, 2015-01-20 at 15:12 +0000, Wei Liu wrote:
> > On Tue, Jan 20, 2015 at 02:49:12PM +0000, Ian Jackson wrote:
> > > Wei Liu writes ("[PATCH] tools: generate systemd service files only when systemd is available"):
> > > > Though that's not in any way harmful but it is on the other hand not
> > > > very useful.
> > > 
> > > What is the effect of this in the context of a distro package, where
> > > the build may occur in a different situation to the installed
> > > package ?
> > > 
> > 
> > Not sure if I understand you question but let me try to answer.
> > 
> > Conceptually speaking for Xen's systemd components to function properly
> > the service files may need to rely on other components to be built.
> 
> Where components is things like socket activation support in xenstored
> etc, I think? Or is there more to it?
> 

Yes. [c/o]xenstored needs to link against systemd to use socket
activation. That's the only thing at the moment.

I was just speaking about things in general -- in case we have some more
daemons that need to link against systemd.

Wei.

> >  If
> > systemd is not available at build time that means those components which
> > service files rely on cannot be built, so the service files alone aren't
> > very useful even if you generate and package them.
> > 
> > Practically speaking those service files don't depend on any systemd
> > specific components to be built at the moment so it's harmless to
> > package them.
> > 
> > Wei.
> > 
> > > Ian.
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 15:37       ` Wei Liu
@ 2015-01-20 15:41         ` Ian Jackson
  2015-01-27 17:19           ` Ian Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Jackson @ 2015-01-20 15:41 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Campbell, xen-devel

Wei Liu writes ("Re: [PATCH] tools: generate systemd service files only when systemd is available"):
> On Tue, Jan 20, 2015 at 03:19:31PM +0000, Ian Campbell wrote:
> > Where components is things like socket activation support in xenstored
> > etc, I think? Or is there more to it?
> 
> Yes. [c/o]xenstored needs to link against systemd to use socket
> activation. That's the only thing at the moment.
> 
> I was just speaking about things in general -- in case we have some more
> daemons that need to link against systemd.

OK, right.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] tools: generate systemd service files only when systemd is available
  2015-01-20 15:41         ` Ian Jackson
@ 2015-01-27 17:19           ` Ian Campbell
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Campbell @ 2015-01-27 17:19 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, xen-devel

On Tue, 2015-01-20 at 15:41 +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH] tools: generate systemd service files only when systemd is available"):
> > On Tue, Jan 20, 2015 at 03:19:31PM +0000, Ian Campbell wrote:
> > > Where components is things like socket activation support in xenstored
> > > etc, I think? Or is there more to it?
> > 
> > Yes. [c/o]xenstored needs to link against systemd to use socket
> > activation. That's the only thing at the moment.
> > 
> > I was just speaking about things in general -- in case we have some more
> > daemons that need to link against systemd.
> 
> OK, right.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-27 17:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 11:47 [PATCH] tools: generate systemd service files only when systemd is available Wei Liu
2015-01-20 11:58 ` Ian Campbell
2015-01-20 12:07   ` Wei Liu
2015-01-20 12:12     ` Wei Liu
2015-01-20 14:49 ` Ian Jackson
2015-01-20 15:12   ` Wei Liu
2015-01-20 15:19     ` Ian Campbell
2015-01-20 15:37       ` Wei Liu
2015-01-20 15:41         ` Ian Jackson
2015-01-27 17:19           ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.