All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stress-ng: create a symlink for /usr/bin/stress
@ 2020-07-23  4:31 Dan Callaghan
  2020-07-23  6:09 ` [OE-core] " Khem Raj
  2020-07-23  8:50 ` [PATCH v2] " Dan Callaghan
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Callaghan @ 2020-07-23  4:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dan Callaghan

In commit 72641004, stress-ng was made to provide the stress package,
because it's backwards compatible with the old stress command. But it
doesn't actually provide /usr/bin/stress which is what other recipes
depending on stress will expect.

Symlink /usr/bin/stress to stress-ng so that it actually becomes
a drop-in replacement for stress.

Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
---
 meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
index 8ea0476db5..dcded1120d 100644
--- a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
+++ b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
@@ -22,5 +22,6 @@ inherit bash-completion
 
 do_install() {
     oe_runmake DESTDIR=${D} install
+    ln -s stress-ng ${D}/usr/bin/stress
 }
 
-- 
2.25.4


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

* Re: [OE-core] [PATCH] stress-ng: create a symlink for /usr/bin/stress
  2020-07-23  4:31 [PATCH] stress-ng: create a symlink for /usr/bin/stress Dan Callaghan
@ 2020-07-23  6:09 ` Khem Raj
  2020-07-23  8:06   ` Dan Callaghan
  2020-07-23  8:50 ` [PATCH v2] " Dan Callaghan
  1 sibling, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-07-23  6:09 UTC (permalink / raw)
  To: Dan Callaghan, openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 1342 bytes --]

Hi Dan

On 7/22/20 9:31 PM, Dan Callaghan wrote:
> In commit 72641004, stress-ng was made to provide the stress package,
> because it's backwards compatible with the old stress command. But it
> doesn't actually provide /usr/bin/stress which is what other recipes
> depending on stress will expect.
> 
> Symlink /usr/bin/stress to stress-ng so that it actually becomes
> a drop-in replacement for stress.
> 
> Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
> ---
>  meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
> index 8ea0476db5..dcded1120d 100644
> --- a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
> +++ b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
> @@ -22,5 +22,6 @@ inherit bash-completion
>
>  do_install() {
>      oe_runmake DESTDIR=${D} install
> +    ln -s stress-ng ${D}/usr/bin/stress

there is stress recipe in some layers which could provide stress utility
as well, therefore it should be using update-alternatives mechanism so
it fills in when stress is not provided by say stress recipe.

secondly please use ${D}${bindir}/stress instead of hardcoding the path

>  }
>
> 
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

* Re: [OE-core] [PATCH] stress-ng: create a symlink for /usr/bin/stress
  2020-07-23  6:09 ` [OE-core] " Khem Raj
@ 2020-07-23  8:06   ` Dan Callaghan
  2020-07-23  8:31     ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Callaghan @ 2020-07-23  8:06 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

Excerpts from Khem Raj's message of 2020-07-22 23:09:23 -07:00:
> there is stress recipe in some layers which could provide stress 
> utility as well, therefore it should be using update-alternatives 
> mechanism so it fills in when stress is not provided by say stress 
> recipe.

Hmm... The stress-ng recipe already RPROVIDES stress though. Doesn't 
that make it incompatible with any other existing stress recipe and 
update-alternatives?

Personally I think alternatives is overkill here, and stress-ng should 
not RPROVIDES stress at all (that is, revert commit 72641004). In that 
case, we would have noticed that the stress recipe had been removed from 
oe-core and we could have just updated our image accordingly to depend 
on stress-ng instead.

> secondly please use ${D}${bindir}/stress instead of hardcoding the path

Oops, yes of course.

-- 
Dan Callaghan <dan.callaghan@digi.com>
Software Engineer
Opengear <https://opengear.com/>

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

* Re: [OE-core] [PATCH] stress-ng: create a symlink for /usr/bin/stress
  2020-07-23  8:06   ` Dan Callaghan
@ 2020-07-23  8:31     ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2020-07-23  8:31 UTC (permalink / raw)
  To: Dan Callaghan; +Cc: openembedded-core

On Thu, Jul 23, 2020 at 1:06 AM Dan Callaghan
<dan.callaghan@opengear.com> wrote:
>
> Excerpts from Khem Raj's message of 2020-07-22 23:09:23 -07:00:
> > there is stress recipe in some layers which could provide stress
> > utility as well, therefore it should be using update-alternatives
> > mechanism so it fills in when stress is not provided by say stress
> > recipe.
>
> Hmm... The stress-ng recipe already RPROVIDES stress though. Doesn't
> that make it incompatible with any other existing stress recipe and
> update-alternatives?
>
> Personally I think alternatives is overkill here, and stress-ng should
> not RPROVIDES stress at all (that is, revert commit 72641004). In that
> case, we would have noticed that the stress recipe had been removed from
> oe-core and we could have just updated our image accordingly to depend
> on stress-ng instead.
>

yeah I think its a fair point, we already are providing it in that
case we can live with unconditional
symlink and let older stress recipe deal with conflicts if someone needs it

> > secondly please use ${D}${bindir}/stress instead of hardcoding the path
>
> Oops, yes of course.
>
> --
> Dan Callaghan <dan.callaghan@digi.com>
> Software Engineer
> Opengear <https://opengear.com/>
> 

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

* [PATCH v2] stress-ng: create a symlink for /usr/bin/stress
  2020-07-23  4:31 [PATCH] stress-ng: create a symlink for /usr/bin/stress Dan Callaghan
  2020-07-23  6:09 ` [OE-core] " Khem Raj
@ 2020-07-23  8:50 ` Dan Callaghan
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Callaghan @ 2020-07-23  8:50 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dan Callaghan

In commit 72641004, stress-ng was made to provide the stress package,
because it's backwards compatible with the old stress command. But it
doesn't actually provide /usr/bin/stress which is what other recipes
depending on stress will expect.

Symlink /usr/bin/stress to stress-ng so that it actually becomes
a drop-in replacement for stress.

Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
---
 meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
index 8ea0476db5..28bf9884cf 100644
--- a/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
+++ b/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
@@ -22,5 +22,6 @@ inherit bash-completion
 
 do_install() {
     oe_runmake DESTDIR=${D} install
+    ln -s stress-ng ${D}${bindir}/stress
 }
 
-- 
2.25.4


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

end of thread, other threads:[~2020-07-23  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  4:31 [PATCH] stress-ng: create a symlink for /usr/bin/stress Dan Callaghan
2020-07-23  6:09 ` [OE-core] " Khem Raj
2020-07-23  8:06   ` Dan Callaghan
2020-07-23  8:31     ` Khem Raj
2020-07-23  8:50 ` [PATCH v2] " Dan Callaghan

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.