All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] util-linux.inc: add fallocate only for class-target
@ 2018-07-26 13:58 Ioan-Adrian Ratiu
  2018-07-26 14:00 ` Martin Jansa
  2018-07-26 23:34 ` Burton, Ross
  0 siblings, 2 replies; 10+ messages in thread
From: Ioan-Adrian Ratiu @ 2018-07-26 13:58 UTC (permalink / raw)
  To: openembedded-core

Because the util-linux_2.32.bb recipe explicitely disables fallocate
for nativesdk triggering build warnings:

WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
alternative target (sdk/usr/bin/fallocate or sdk/usr/bin/fallocate.util-linux)
does not exist, skipping...
WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
alternative provide sdk/usr/bin/fallocate: sdk/usr/bin/fallocate.util-linux
does not exist
WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index ed5c618750..504f3c5b61 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -206,8 +206,9 @@ do_install_append_class-native () {
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
-ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall fallocate unshare"
+ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
 ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
+ALTERNATIVE_${PN}_class-target += "fallocate"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
-- 
2.18.0



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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 13:58 [PATCH] util-linux.inc: add fallocate only for class-target Ioan-Adrian Ratiu
@ 2018-07-26 14:00 ` Martin Jansa
  2018-07-26 14:19   ` [PATCHv2] " Martin Jansa
  2018-07-26 14:22   ` [PATCH] " Martin Jansa
  2018-07-26 23:34 ` Burton, Ross
  1 sibling, 2 replies; 10+ messages in thread
From: Martin Jansa @ 2018-07-26 14:00 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]

This probably doesn't do what you're expecting it to do, use
ALTERNATIVE_${PN}_append_class-target = " fallocate"

You can check with bitbake -e to see what's the difference between these 2.

On Thu, Jul 26, 2018 at 3:56 PM Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
wrote:

> Because the util-linux_2.32.bb recipe explicitely disables fallocate
> for nativesdk triggering build warnings:
>
> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
> alternative target (sdk/usr/bin/fallocate or
> sdk/usr/bin/fallocate.util-linux)
> does not exist, skipping...
> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
> alternative provide sdk/usr/bin/fallocate: sdk/usr/bin/fallocate.util-linux
> does not exist
> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
> alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate
>
> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> ---
>  meta/recipes-core/util-linux/util-linux.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/util-linux/util-linux.inc
> b/meta/recipes-core/util-linux/util-linux.inc
> index ed5c618750..504f3c5b61 100644
> --- a/meta/recipes-core/util-linux/util-linux.inc
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -206,8 +206,9 @@ do_install_append_class-native () {
>  ALTERNATIVE_PRIORITY = "80"
>
>  ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
> switch_root"
> -ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall
> fallocate unshare"
> +ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
>  ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
> +ALTERNATIVE_${PN}_class-target += "fallocate"
>
>  ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
>  ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
> --
> 2.18.0
>
>

[-- Attachment #2: Type: text/html, Size: 3144 bytes --]

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

* [PATCHv2] util-linux.inc: add fallocate only for class-target
  2018-07-26 14:00 ` Martin Jansa
@ 2018-07-26 14:19   ` Martin Jansa
  2018-07-26 14:22   ` [PATCH] " Martin Jansa
  1 sibling, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-07-26 14:19 UTC (permalink / raw)
  To: openembedded-core

From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>

Because the util-linux_2.32.bb recipe explicitely disables fallocate
for nativesdk triggering build warnings:

WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
alternative target (sdk/usr/bin/fallocate or sdk/usr/bin/fallocate.util-linux)
does not exist, skipping...
WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
alternative provide sdk/usr/bin/fallocate: sdk/usr/bin/fallocate.util-linux
does not exist
WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index ed5c618750..9ac8bd6f79 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -206,8 +206,9 @@ do_install_append_class-native () {
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
-ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall fallocate unshare"
+ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
 ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
+ALTERNATIVE_${PN}_append_class-target = " fallocate"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
-- 
2.17.1



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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 14:00 ` Martin Jansa
  2018-07-26 14:19   ` [PATCHv2] " Martin Jansa
@ 2018-07-26 14:22   ` Martin Jansa
  2018-07-26 17:06     ` Ioan-Adrian Ratiu
  1 sibling, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2018-07-26 14:22 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 6373 bytes --]

I went ahead and sent v2 with the fix as I had it locally already anyway.

To illustrate what was wrong with using the override, see following output
from bitbake -e:

env.util-linux.append+override:ALTERNATIVE_util-linux="dmesg kill more
mkswap blockdev pivot_root switch_root hexdump last lastb logger mesg
renice wall unshare setsid chrt flock utmpdump eject nologin taskset
fallocate"
env.util-linux.before:ALTERNATIVE_util-linux="dmesg kill more mkswap
blockdev pivot_root switch_root hexdump last lastb logger mesg renice wall
fallocate unshare setsid chrt flock utmpdump eject nologin taskset"
env.util-linux.override:ALTERNATIVE_util-linux=" fallocate"

# $ALTERNATIVE_util-linux [2 operations]
#   rename from ALTERNATIVE_${PN} data.py:116 [expandKeys]
#     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
nologin taskset"
#   override[class-target]:rename from ALTERNATIVE_${PN}_class-target
data_smart.py:641 [renameVar]
#     " fallocate"
# pre-expansion value:
#   " fallocate"
ALTERNATIVE_util-linux=" fallocate"

# $ALTERNATIVE_util-linux_class-target
#   rename from ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
#     " fallocate"
ALTERNATIVE_util-linux_class-target=" fallocate"

# $ALTERNATIVE [19 operations]
#   set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:63
#     [doc] "Lists commands in a package that need an alternative binary
naming scheme."
#   override[util-linux-hwclock]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:245
#     "hwclock"
#   override[util-linux-fdisk]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:248
#     "fdisk"
#   override[util-linux-fstrim]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:251
#     "fstrim"
#   override[util-linux-agetty]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:254
#     "getty"
#   override[util-linux-mount]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:258
#     "mount"
#   override[util-linux-umount]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:261
#     "umount"
#   override[util-linux-readprofile]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:264
#     "readprofile"
#   override[util-linux-losetup]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:267
#     "losetup"
#   override[util-linux-swaponoff]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:270
#     "swapoff swapon"
#   override[util-linux-fsck]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:274
#     "fsck"
#   override[util-linux-blkid]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:277
#     "blkid"
#   override[util-linux-rfkill]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:280
#     "rfkill"
#   override[util-linux-getopt]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:283
#     "getopt"
#   override[util-linux-sulogin]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:286
#     "sulogin"
#   override[util-linux-mountpoint]:set
/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:289
#     "mountpoint"
#   override[util-linux]:rename from ALTERNATIVE_${PN} data.py:116
[expandKeys]
#     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
nologin taskset"
#   override[util-linux_class-target]:rename from
ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
#     " fallocate"
#   override[util-linux-doc]:rename from ALTERNATIVE_${PN}-doc data.py:116
[expandKeys]
#     "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8
utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3
eject.1 logger.1"
# pre-expansion value:
#   "None"

On Thu, Jul 26, 2018 at 4:00 PM Martin Jansa <martin.jansa@gmail.com> wrote:

> This probably doesn't do what you're expecting it to do, use
> ALTERNATIVE_${PN}_append_class-target = " fallocate"
>
> You can check with bitbake -e to see what's the difference between these 2.
>
> On Thu, Jul 26, 2018 at 3:56 PM Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> wrote:
>
>> Because the util-linux_2.32.bb recipe explicitely disables fallocate
>> for nativesdk triggering build warnings:
>>
>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
>> alternative target (sdk/usr/bin/fallocate or
>> sdk/usr/bin/fallocate.util-linux)
>> does not exist, skipping...
>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
>> alternative provide sdk/usr/bin/fallocate:
>> sdk/usr/bin/fallocate.util-linux
>> does not exist
>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
>> alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate
>>
>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>> ---
>>  meta/recipes-core/util-linux/util-linux.inc | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/util-linux/util-linux.inc
>> b/meta/recipes-core/util-linux/util-linux.inc
>> index ed5c618750..504f3c5b61 100644
>> --- a/meta/recipes-core/util-linux/util-linux.inc
>> +++ b/meta/recipes-core/util-linux/util-linux.inc
>> @@ -206,8 +206,9 @@ do_install_append_class-native () {
>>  ALTERNATIVE_PRIORITY = "80"
>>
>>  ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
>> switch_root"
>> -ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall
>> fallocate unshare"
>> +ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
>>  ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
>> +ALTERNATIVE_${PN}_class-target += "fallocate"
>>
>>  ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
>>  ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
>> --
>> 2.18.0
>>
>>

[-- Attachment #2: Type: text/html, Size: 8773 bytes --]

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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 14:22   ` [PATCH] " Martin Jansa
@ 2018-07-26 17:06     ` Ioan-Adrian Ratiu
  2018-07-26 23:19       ` Andre McCurdy
  0 siblings, 1 reply; 10+ messages in thread
From: Ioan-Adrian Ratiu @ 2018-07-26 17:06 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

Thank you Martin! The different behaviours between combinations of
appends and overrides has always been confusing to me.

On Thu, 26 Jul 2018, Martin Jansa <martin.jansa@gmail.com> wrote:
> I went ahead and sent v2 with the fix as I had it locally already anyway.
>
> To illustrate what was wrong with using the override, see following output
> from bitbake -e:
>
> env.util-linux.append+override:ALTERNATIVE_util-linux="dmesg kill more
> mkswap blockdev pivot_root switch_root hexdump last lastb logger mesg
> renice wall unshare setsid chrt flock utmpdump eject nologin taskset
> fallocate"
> env.util-linux.before:ALTERNATIVE_util-linux="dmesg kill more mkswap
> blockdev pivot_root switch_root hexdump last lastb logger mesg renice wall
> fallocate unshare setsid chrt flock utmpdump eject nologin taskset"
> env.util-linux.override:ALTERNATIVE_util-linux=" fallocate"
>
> # $ALTERNATIVE_util-linux [2 operations]
> #   rename from ALTERNATIVE_${PN} data.py:116 [expandKeys]
> #     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
> lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
> nologin taskset"
> #   override[class-target]:rename from ALTERNATIVE_${PN}_class-target
> data_smart.py:641 [renameVar]
> #     " fallocate"
> # pre-expansion value:
> #   " fallocate"
> ALTERNATIVE_util-linux=" fallocate"
>
> # $ALTERNATIVE_util-linux_class-target
> #   rename from ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
> #     " fallocate"
> ALTERNATIVE_util-linux_class-target=" fallocate"
>
> # $ALTERNATIVE [19 operations]
> #   set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:63
> #     [doc] "Lists commands in a package that need an alternative binary
> naming scheme."
> #   override[util-linux-hwclock]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:245
> #     "hwclock"
> #   override[util-linux-fdisk]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:248
> #     "fdisk"
> #   override[util-linux-fstrim]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:251
> #     "fstrim"
> #   override[util-linux-agetty]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:254
> #     "getty"
> #   override[util-linux-mount]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:258
> #     "mount"
> #   override[util-linux-umount]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:261
> #     "umount"
> #   override[util-linux-readprofile]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:264
> #     "readprofile"
> #   override[util-linux-losetup]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:267
> #     "losetup"
> #   override[util-linux-swaponoff]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:270
> #     "swapoff swapon"
> #   override[util-linux-fsck]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:274
> #     "fsck"
> #   override[util-linux-blkid]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:277
> #     "blkid"
> #   override[util-linux-rfkill]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:280
> #     "rfkill"
> #   override[util-linux-getopt]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:283
> #     "getopt"
> #   override[util-linux-sulogin]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:286
> #     "sulogin"
> #   override[util-linux-mountpoint]:set
> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:289
> #     "mountpoint"
> #   override[util-linux]:rename from ALTERNATIVE_${PN} data.py:116
> [expandKeys]
> #     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
> lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
> nologin taskset"
> #   override[util-linux_class-target]:rename from
> ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
> #     " fallocate"
> #   override[util-linux-doc]:rename from ALTERNATIVE_${PN}-doc data.py:116
> [expandKeys]
> #     "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8
> utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3
> eject.1 logger.1"
> # pre-expansion value:
> #   "None"
>
> On Thu, Jul 26, 2018 at 4:00 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
>> This probably doesn't do what you're expecting it to do, use
>> ALTERNATIVE_${PN}_append_class-target = " fallocate"
>>
>> You can check with bitbake -e to see what's the difference between these 2.
>>
>> On Thu, Jul 26, 2018 at 3:56 PM Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>> wrote:
>>
>>> Because the util-linux_2.32.bb recipe explicitely disables fallocate
>>> for nativesdk triggering build warnings:
>>>
>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
>>> alternative target (sdk/usr/bin/fallocate or
>>> sdk/usr/bin/fallocate.util-linux)
>>> does not exist, skipping...
>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
>>> alternative provide sdk/usr/bin/fallocate:
>>> sdk/usr/bin/fallocate.util-linux
>>> does not exist
>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
>>> alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate
>>>
>>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>>> ---
>>>  meta/recipes-core/util-linux/util-linux.inc | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/util-linux/util-linux.inc
>>> b/meta/recipes-core/util-linux/util-linux.inc
>>> index ed5c618750..504f3c5b61 100644
>>> --- a/meta/recipes-core/util-linux/util-linux.inc
>>> +++ b/meta/recipes-core/util-linux/util-linux.inc
>>> @@ -206,8 +206,9 @@ do_install_append_class-native () {
>>>  ALTERNATIVE_PRIORITY = "80"
>>>
>>>  ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
>>> switch_root"
>>> -ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall
>>> fallocate unshare"
>>> +ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
>>>  ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
>>> +ALTERNATIVE_${PN}_class-target += "fallocate"
>>>
>>>  ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
>>>  ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
>>> --
>>> 2.18.0
>>>
>>>


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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 17:06     ` Ioan-Adrian Ratiu
@ 2018-07-26 23:19       ` Andre McCurdy
  0 siblings, 0 replies; 10+ messages in thread
From: Andre McCurdy @ 2018-07-26 23:19 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu; +Cc: Patches and discussions about the oe-core layer

On Thu, Jul 26, 2018 at 10:06 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> Thank you Martin! The different behaviours between combinations of
> appends and overrides has always been confusing to me.

You're not alone. The behaviour of += with an over-ride is a trap
which catches most users at some point.

> On Thu, 26 Jul 2018, Martin Jansa <martin.jansa@gmail.com> wrote:
>> I went ahead and sent v2 with the fix as I had it locally already anyway.
>>
>> To illustrate what was wrong with using the override, see following output
>> from bitbake -e:
>>
>> env.util-linux.append+override:ALTERNATIVE_util-linux="dmesg kill more
>> mkswap blockdev pivot_root switch_root hexdump last lastb logger mesg
>> renice wall unshare setsid chrt flock utmpdump eject nologin taskset
>> fallocate"
>> env.util-linux.before:ALTERNATIVE_util-linux="dmesg kill more mkswap
>> blockdev pivot_root switch_root hexdump last lastb logger mesg renice wall
>> fallocate unshare setsid chrt flock utmpdump eject nologin taskset"
>> env.util-linux.override:ALTERNATIVE_util-linux=" fallocate"
>>
>> # $ALTERNATIVE_util-linux [2 operations]
>> #   rename from ALTERNATIVE_${PN} data.py:116 [expandKeys]
>> #     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
>> lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
>> nologin taskset"
>> #   override[class-target]:rename from ALTERNATIVE_${PN}_class-target
>> data_smart.py:641 [renameVar]
>> #     " fallocate"
>> # pre-expansion value:
>> #   " fallocate"
>> ALTERNATIVE_util-linux=" fallocate"
>>
>> # $ALTERNATIVE_util-linux_class-target
>> #   rename from ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
>> #     " fallocate"
>> ALTERNATIVE_util-linux_class-target=" fallocate"
>>
>> # $ALTERNATIVE [19 operations]
>> #   set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:63
>> #     [doc] "Lists commands in a package that need an alternative binary
>> naming scheme."
>> #   override[util-linux-hwclock]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:245
>> #     "hwclock"
>> #   override[util-linux-fdisk]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:248
>> #     "fdisk"
>> #   override[util-linux-fstrim]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:251
>> #     "fstrim"
>> #   override[util-linux-agetty]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:254
>> #     "getty"
>> #   override[util-linux-mount]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:258
>> #     "mount"
>> #   override[util-linux-umount]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:261
>> #     "umount"
>> #   override[util-linux-readprofile]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:264
>> #     "readprofile"
>> #   override[util-linux-losetup]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:267
>> #     "losetup"
>> #   override[util-linux-swaponoff]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:270
>> #     "swapoff swapon"
>> #   override[util-linux-fsck]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:274
>> #     "fsck"
>> #   override[util-linux-blkid]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:277
>> #     "blkid"
>> #   override[util-linux-rfkill]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:280
>> #     "rfkill"
>> #   override[util-linux-getopt]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:283
>> #     "getopt"
>> #   override[util-linux-sulogin]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:286
>> #     "sulogin"
>> #   override[util-linux-mountpoint]:set
>> /OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux.inc:289
>> #     "mountpoint"
>> #   override[util-linux]:rename from ALTERNATIVE_${PN} data.py:116
>> [expandKeys]
>> #     "dmesg kill more mkswap blockdev pivot_root switch_root hexdump last
>> lastb logger mesg renice wall unshare setsid chrt flock utmpdump eject
>> nologin taskset"
>> #   override[util-linux_class-target]:rename from
>> ALTERNATIVE_${PN}_class-target data_smart.py:641 [renameVar]
>> #     " fallocate"
>> #   override[util-linux-doc]:rename from ALTERNATIVE_${PN}-doc data.py:116
>> [expandKeys]
>> #     "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8
>> utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3
>> eject.1 logger.1"
>> # pre-expansion value:
>> #   "None"
>>
>> On Thu, Jul 26, 2018 at 4:00 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>>
>>> This probably doesn't do what you're expecting it to do, use
>>> ALTERNATIVE_${PN}_append_class-target = " fallocate"
>>>
>>> You can check with bitbake -e to see what's the difference between these 2.
>>>
>>> On Thu, Jul 26, 2018 at 3:56 PM Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>>> wrote:
>>>
>>>> Because the util-linux_2.32.bb recipe explicitely disables fallocate
>>>> for nativesdk triggering build warnings:
>>>>
>>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux:
>>>> alternative target (sdk/usr/bin/fallocate or
>>>> sdk/usr/bin/fallocate.util-linux)
>>>> does not exist, skipping...
>>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: NOT adding
>>>> alternative provide sdk/usr/bin/fallocate:
>>>> sdk/usr/bin/fallocate.util-linux
>>>> does not exist
>>>> WARNING: nativesdk-util-linux-2.32-r0 do_package: util-linux: alt_link ==
>>>> alt_target: sdk/usr/bin/fallocate == sdk/usr/bin/fallocate
>>>>
>>>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
>>>> ---
>>>>  meta/recipes-core/util-linux/util-linux.inc | 3 ++-
>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/recipes-core/util-linux/util-linux.inc
>>>> b/meta/recipes-core/util-linux/util-linux.inc
>>>> index ed5c618750..504f3c5b61 100644
>>>> --- a/meta/recipes-core/util-linux/util-linux.inc
>>>> +++ b/meta/recipes-core/util-linux/util-linux.inc
>>>> @@ -206,8 +206,9 @@ do_install_append_class-native () {
>>>>  ALTERNATIVE_PRIORITY = "80"
>>>>
>>>>  ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
>>>> switch_root"
>>>> -ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall
>>>> fallocate unshare"
>>>> +ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
>>>>  ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
>>>> +ALTERNATIVE_${PN}_class-target += "fallocate"
>>>>
>>>>  ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
>>>>  ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
>>>> --
>>>> 2.18.0
>>>>
>>>>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 13:58 [PATCH] util-linux.inc: add fallocate only for class-target Ioan-Adrian Ratiu
  2018-07-26 14:00 ` Martin Jansa
@ 2018-07-26 23:34 ` Burton, Ross
  2018-07-26 23:58   ` Andre McCurdy
  1 sibling, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2018-07-26 23:34 UTC (permalink / raw)
  To: Ioan-Adrian Ratiu; +Cc: OE-core

On 26 July 2018 at 14:58, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> Because the util-linux_2.32.bb recipe explicitely disables fallocate
> for nativesdk triggering build warnings:

Does anyone know why util-linux disables fallocate for nativesdk and
native builds?

Ross


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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 23:34 ` Burton, Ross
@ 2018-07-26 23:58   ` Andre McCurdy
  2018-07-27 11:05     ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Andre McCurdy @ 2018-07-26 23:58 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Thu, Jul 26, 2018 at 4:34 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 26 July 2018 at 14:58, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
>> Because the util-linux_2.32.bb recipe explicitely disables fallocate
>> for nativesdk triggering build warnings:
>
> Does anyone know why util-linux disables fallocate for nativesdk and
> native builds?

Seems to date back to this commit:

  http://git.openembedded.org/openembedded-core/commit/?id=17f3c548caf4adec37c3bbb139aa6b3900419794

  +# fallocate is glibc 2.10, fallocate64 is glibc 2.11
  +# we need to disable it for older versions
  +EXTRA_OECONF += "ac_cv_func_fallocate=no"
  +EXTRA_OECONF_virtclass-native += "--disable-fallocate
--disable-use-tty-group"


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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-26 23:58   ` Andre McCurdy
@ 2018-07-27 11:05     ` Burton, Ross
  2018-07-31 12:12       ` Richard Purdie
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2018-07-27 11:05 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OE-core

On 27 July 2018 at 00:58, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Thu, Jul 26, 2018 at 4:34 PM, Burton, Ross <ross.burton@intel.com> wrote:
>> On 26 July 2018 at 14:58, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
>>> Because the util-linux_2.32.bb recipe explicitely disables fallocate
>>> for nativesdk triggering build warnings:
>>
>> Does anyone know why util-linux disables fallocate for nativesdk and
>> native builds?
>
> Seems to date back to this commit:
>
>   http://git.openembedded.org/openembedded-core/commit/?id=17f3c548caf4adec37c3bbb139aa6b3900419794
>
>   +# fallocate is glibc 2.10, fallocate64 is glibc 2.11
>   +# we need to disable it for older versions
>   +EXTRA_OECONF += "ac_cv_func_fallocate=no"
>   +EXTRA_OECONF_virtclass-native += "--disable-fallocate
> --disable-use-tty-group"

Well done, it was late and I got bored following the git-blame log.  :)

Sounds like historical reasons to me, does anyone object to dropping this?
Ross


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

* Re: [PATCH] util-linux.inc: add fallocate only for class-target
  2018-07-27 11:05     ` Burton, Ross
@ 2018-07-31 12:12       ` Richard Purdie
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Purdie @ 2018-07-31 12:12 UTC (permalink / raw)
  To: Burton, Ross, Andre McCurdy; +Cc: OE-core

On Fri, 2018-07-27 at 12:05 +0100, Burton, Ross wrote:
> On 27 July 2018 at 00:58, Andre McCurdy <armccurdy@gmail.com> wrote:
> > On Thu, Jul 26, 2018 at 4:34 PM, Burton, Ross <ross.burton@intel.co
> > m> wrote:
> > > On 26 July 2018 at 14:58, Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
> > > wrote:
> > > > Because the util-linux_2.32.bb recipe explicitely disables
> > > > fallocate
> > > > for nativesdk triggering build warnings:
> > > 
> > > Does anyone know why util-linux disables fallocate for nativesdk
> > > and
> > > native builds?
> > 
> > Seems to date back to this commit:
> > 
> >   http://git.openembedded.org/openembedded-core/commit/?id=17f3c548
> > caf4adec37c3bbb139aa6b3900419794
> > 
> >   +# fallocate is glibc 2.10, fallocate64 is glibc 2.11
> >   +# we need to disable it for older versions
> >   +EXTRA_OECONF += "ac_cv_func_fallocate=no"
> >   +EXTRA_OECONF_virtclass-native += "--disable-fallocate
> > --disable-use-tty-group"
> 
> Well done, it was late and I got bored following the git-blame
> log.  :)
> 
> Sounds like historical reasons to me, does anyone object to dropping
> this?

No, I think this predates uninative...

Cheers,

Richard




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

end of thread, other threads:[~2018-07-31 12:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 13:58 [PATCH] util-linux.inc: add fallocate only for class-target Ioan-Adrian Ratiu
2018-07-26 14:00 ` Martin Jansa
2018-07-26 14:19   ` [PATCHv2] " Martin Jansa
2018-07-26 14:22   ` [PATCH] " Martin Jansa
2018-07-26 17:06     ` Ioan-Adrian Ratiu
2018-07-26 23:19       ` Andre McCurdy
2018-07-26 23:34 ` Burton, Ross
2018-07-26 23:58   ` Andre McCurdy
2018-07-27 11:05     ` Burton, Ross
2018-07-31 12:12       ` Richard Purdie

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.