From: Ian Campbell Subject: Re: [PATCH v3 7/7] systemd: add support initial xen systemd service files Date: Mon, 24 Mar 2014 10:14:01 +0000 Message-ID: <1395656041.19365.19.camel@kazak.uk.xensource.com> References: <1395263261-12038-1-git-send-email-mcgrof@do-not-panic.com> <1395416450.19839.156.camel@kazak.uk.xensource.com> <20140322023033.GJ5011@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WS1tO-0008Sz-IM for xen-devel@lists.xenproject.org; Mon, 24 Mar 2014 10:14:23 +0000 In-Reply-To: <20140322023033.GJ5011@wotan.suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Luis R. Rodriguez" Cc: Stefano Stabellini , Jan =?UTF-8?Q?R=C4=99korajski?= , Ian Jackson , Jacek Konieczny , M A Young , xen-devel@lists.xenproject.org, "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org On Sat, 2014-03-22 at 03:30 +0100, Luis R. Rodriguez wrote: > On Fri, Mar 21, 2014 at 03:40:50PM +0000, Ian Campbell wrote: > > On Wed, 2014-03-19 at 14:07 -0700, Luis R. Rodriguez wrote: > > > As for integration with xen, we house keep all the systemd files > > > under a new directory tools/hotplug/Linux/systemd/ and will be > > > targetted > > > by default when building on Linux systems (CONFIG_Linux) given the low > > > overhead of only having to only sed the meta @VARIABLES@. > > > > Could configure not generate these more easily than what you have below? > > Not sure, I've dodged configure all my life. > > > It could still be conditional on Linux I'd have though, given a little > > bit of autofoo ninjutsu. > > I'm autofoo dumb. For this case I think you just need to add the files to tools/configure.ac:AC_CONFIG_FILES > > > +%.socket: %.socket.in > > > + cp $< $@ > > > + @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g' $@ > > > + @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g' $@ > > > + @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g' $@ > > > + @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g' $@ > > > + > > > +%.service: %.service.in > > > + cp $< $@ > > > + @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g' $@ > > > + @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g' $@ > > > + @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g' $@ > > > + @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g' $@ > > > + > > > +%.mount: %.mount.in > > > + cp $< $@ > > > + @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g' $@ > > > + @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g' $@ > > > + @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g' $@ > > > + @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g' $@ > > > + @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g' $@ > > > > If you do keep this then itis crying out for a helper macro/make > > function. > > Can we welcome this as an enhancement? If not the autoconf way then I'd like to at least see this collapsed into one instance with some make facitily or other please. Ian.