Patchwork [V2] systemd: set the location of the kill binary

login
register
mail settings
Submitter Ross Burton
Date Feb. 26, 2013, 5:53 p.m.
Message ID <1361901233-23197-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/45141/
State New
Headers show

Comments

Ross Burton - Feb. 26, 2013, 5:53 p.m.
Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
work on the target.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_197.bb |    1 +
 1 file changed, 1 insertion(+)
Otavio Salvador - Feb. 26, 2013, 7:52 p.m.
On Tue, Feb 26, 2013 at 2:53 PM, Ross Burton <ross.burton@intel.com> wrote:
> Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
> work on the target.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador - Feb. 26, 2013, 7:53 p.m.
On Tue, Feb 26, 2013 at 4:52 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Tue, Feb 26, 2013 at 2:53 PM, Ross Burton <ross.burton@intel.com> wrote:
>> Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
>> work on the target.
>>
>> Signed-off-by: Ross Burton <ross.burton@intel.com>
>
> Acked-by: Otavio Salvador <otavio@ossystems.com.br>

Now I saw the Khem suggestion to use /usr/bin/env kill; seems good.
Koen Kooi - Feb. 26, 2013, 7:54 p.m.
On Tue, 2013-02-26 at 17:53 +0000, Ross Burton wrote:
> Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
> work on the target.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/recipes-core/systemd/systemd_197.bb |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
> index c765c18..001d111 100644
> --- a/meta/recipes-core/systemd/systemd_197.bb
> +++ b/meta/recipes-core/systemd/systemd_197.bb
> @@ -63,6 +63,7 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
>                   --disable-microhttpd \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
> +                 ac_cv_path_KILL=/bin/kill \

${base_bindir} ?
Koen Kooi - Feb. 26, 2013, 8 p.m.
On Tue, 2013-02-26 at 17:53 +0000, Ross Burton wrote:
> Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
> work on the target.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/recipes-core/systemd/systemd_197.bb |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
> index c765c18..001d111 100644
> --- a/meta/recipes-core/systemd/systemd_197.bb
> +++ b/meta/recipes-core/systemd/systemd_197.bb
> @@ -63,6 +63,7 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
>                   --disable-microhttpd \
>                   --without-python \
>                   --with-sysvrcnd-path=${sysconfdir} \
> +                 ac_cv_path_KILL=/bin/kill \

Like V1 this hardcodes ${base_bindir} to /bin, this breaks when your
DISTRO sets $base_prefix to /usr. So please change that to:

	ac_cv_path+KILL=${base_bindir}/kill
Phil Blundell - Feb. 26, 2013, 8:05 p.m.
On Tue, 2013-02-26 at 16:53 -0300, Otavio Salvador wrote:
> On Tue, Feb 26, 2013 at 4:52 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
> > On Tue, Feb 26, 2013 at 2:53 PM, Ross Burton <ross.burton@intel.com> wrote:
> >> Otherwise systemd uses AC_PROG_PATH and finds it in the sysroot, which won't
> >> work on the target.
> >>
> >> Signed-off-by: Ross Burton <ross.burton@intel.com>
> >
> > Acked-by: Otavio Salvador <otavio@ossystems.com.br>
> 
> Now I saw the Khem suggestion to use /usr/bin/env kill; seems good.

If it wants a target path then "/usr/bin/env kill" would fail for
targets that either don't have /usr or don't have "env" installed.  That
might not be so good.

/usr/bin/env would be fine if we were talking about a build host path
but that doesn't appear to be the case here.

p.
Ross Burton - Feb. 27, 2013, 2:02 p.m.
On 26 February 2013 20:00, Koen Kooi <koen@dominion.thruhere.net> wrote:
> Like V1 this hardcodes ${base_bindir} to /bin, this breaks when your
> DISTRO sets $base_prefix to /usr. So please change that to:
>
>         ac_cv_path+KILL=${base_bindir}/kill

Yeah, not sure why I did that.  :/ V2 coming shortly.

Ross

Patch

diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index c765c18..001d111 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -63,6 +63,7 @@  EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-microhttpd \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
+                 ac_cv_path_KILL=/bin/kill \
                "
 # uclibc does not have NSS
 EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "