diff mbox series

rxvt-unicode.inc: disable the terminfo installation by setting TIC to :

Message ID 20241105101214.4095063-1-changqing.li@windriver.com
State New
Headers show
Series rxvt-unicode.inc: disable the terminfo installation by setting TIC to : | expand

Commit Message

Changqing Li Nov. 5, 2024, 10:12 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

Without this change, TIC is the native tic in recipe-sysroot-native.
By default, native tic has set its default terminfo path to native path:
${datadir}/terminfo; $HOME/.terminfo

When sstate cache is used, the cached native tic's terminfo path could
be a path not exist on current host, then native tic will try to install
terminfo to HOME dir, cause host contamination.

This patch disable the terminfo installation by setting TIC to :, we
already set the terminfo to correct path in do_install

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc | 1 +
 1 file changed, 1 insertion(+)

Comments

Ross Burton Nov. 20, 2024, 4:51 p.m. UTC | #1
On 5 Nov 2024, at 10:12, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> --- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
> +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
> @@ -37,6 +37,7 @@ do_configure:prepend () {
> if [ ! -e ${S}/acinclude.m4 ]; then
> cp ${S}/aclocal.m4 ${S}/acinclude.m4
> fi
> + sed -i -e 's#@TIC@#:#g' ${S}/doc/Makefile.in
> }

A brute-force sed feels ugly and prone to silent breakage.  Wouldn’t this work just as well:

EXTRA_OEMAKE = “TIC=true”

Ross
Changqing Li Nov. 21, 2024, 4:04 a.m. UTC | #2
On 11/21/24 00:51, Ross Burton wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 5 Nov 2024, at 10:12, Changqing Li via lists.openembedded.org<changqing.li=windriver.com@lists.openembedded.org>  wrote:
>> --- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
>> +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
>> @@ -37,6 +37,7 @@ do_configure:prepend () {
>> if [ ! -e ${S}/acinclude.m4 ]; then
>> cp ${S}/aclocal.m4 ${S}/acinclude.m4
>> fi
>> + sed -i -e 's#@TIC@#:#g' ${S}/doc/Makefile.in
>> }
> A brute-force sed feels ugly and prone to silent breakage.  Wouldn’t this work just as well:
>
> EXTRA_OEMAKE = “TIC=true”

Hi, Ross

Thanks for advice.  But this @TIC@ cannot replaced by add configs like 
EXTRA_OEMAKE.

TIC is defined in configure.ac by "AC_PATH_PROG(TIC, tic, :) ", so TIC 
will be native tic path.

and during configure process, configure will replace @TIC@ in 
doc/Makefile.in with native tic path.

So in do_install stage, the doc/Makefile already have a hardcode native 
tic path, not variable $(TIC)

which could be replaced by pass argument. Seems no interface for us to 
pass argument to change TIC.

Regards

Changqing

>
> Ross
Khem Raj Nov. 21, 2024, 4:10 a.m. UTC | #3
On Wed, Nov 20, 2024 at 8:04 PM Changqing Li via
lists.openembedded.org
<changqing.li=windriver.com@lists.openembedded.org> wrote:
>
>
> On 11/21/24 00:51, Ross Burton wrote:
>
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 5 Nov 2024, at 10:12, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
>
> --- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
> +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
> @@ -37,6 +37,7 @@ do_configure:prepend () {
> if [ ! -e ${S}/acinclude.m4 ]; then
> cp ${S}/aclocal.m4 ${S}/acinclude.m4
> fi
> + sed -i -e 's#@TIC@#:#g' ${S}/doc/Makefile.in
> }
>
> A brute-force sed feels ugly and prone to silent breakage.  Wouldn’t this work just as well:
>
> EXTRA_OEMAKE = “TIC=true”
>
> Hi, Ross
>
> Thanks for advice.  But this @TIC@ cannot replaced by add configs like EXTRA_OEMAKE.
>
> TIC is defined in configure.ac by "AC_PATH_PROG(TIC, tic, :) ", so TIC will be native tic path.
>
> and during configure process, configure will replace @TIC@ in doc/Makefile.in with native tic path.
>
> So in do_install stage, the doc/Makefile already have a hardcode native tic path, not variable $(TIC)
>
> which could be replaced by pass argument. Seems no interface for us to pass argument to change TIC.
>

you can override this via setting ac_cv_path_TIC=path/to/tic in
EXTRA_OECONF or CACHED_CONFIGUREVARS

> Regards
>
> Changqing
>
> Ross
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#207500): https://lists.openembedded.org/g/openembedded-core/message/207500
> Mute This Topic: https://lists.openembedded.org/mt/109403291/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Changqing Li Nov. 21, 2024, 5:55 a.m. UTC | #4
On 11/21/24 12:10, Khem Raj wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed, Nov 20, 2024 at 8:04 PM Changqing Li via
> lists.openembedded.org
> <changqing.li=windriver.com@lists.openembedded.org>  wrote:
>>
>> On 11/21/24 00:51, Ross Burton wrote:
>>
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 5 Nov 2024, at 10:12, Changqing Li via lists.openembedded.org<changqing.li=windriver.com@lists.openembedded.org>  wrote:
>>
>> --- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
>> +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
>> @@ -37,6 +37,7 @@ do_configure:prepend () {
>> if [ ! -e ${S}/acinclude.m4 ]; then
>> cp ${S}/aclocal.m4 ${S}/acinclude.m4
>> fi
>> + sed -i -e 's#@TIC@#:#g' ${S}/doc/Makefile.in
>> }
>>
>> A brute-force sed feels ugly and prone to silent breakage.  Wouldn’t this work just as well:
>>
>> EXTRA_OEMAKE = “TIC=true”
>>
>> Hi, Ross
>>
>> Thanks for advice.  But this @TIC@ cannot replaced by add configs like EXTRA_OEMAKE.
>>
>> TIC is defined in configure.ac by "AC_PATH_PROG(TIC, tic, :) ", so TIC will be native tic path.
>>
>> and during configure process, configure will replace @TIC@ in doc/Makefile.in with native tic path.
>>
>> So in do_install stage, the doc/Makefile already have a hardcode native tic path, not variable $(TIC)
>>
>> which could be replaced by pass argument. Seems no interface for us to pass argument to change TIC.
>>
> you can override this via setting ac_cv_path_TIC=path/to/tic in
> EXTRA_OECONF or CACHED_CONFIGUREVARS

This way works. I will send a V2 later.

Just remembered,  I had tried to pass TIC=:  to configure before using 
sed,  but TIC=: cannot match as a path.

And didn't think of using ac_cv_path_TIC directly.

[snip]

e) case $TIC

     in [\\/]* | ?:[\\/]*)

     ac_cv_path_TIC="$TIC" # Let the user override the test with a path.

[snip]


@Khem, Ross,  Thanks a lot.


Regards

Changqing


>
>> Regards
>>
>> Changqing
>>
>> Ross
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#207500):https://lists.openembedded.org/g/openembedded-core/message/207500
>> Mute This Topic:https://lists.openembedded.org/mt/109403291/1997914
>> Group Owner:openembedded-core+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index 5193eebb0b..ab20ee98d6 100644
--- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -37,6 +37,7 @@  do_configure:prepend () {
 	if [ ! -e ${S}/acinclude.m4 ]; then
 		cp ${S}/aclocal.m4 ${S}/acinclude.m4
 	fi
+	sed -i -e 's#@TIC@#:#g' ${S}/doc/Makefile.in
 }
 
 do_compile:prepend () {