Re: Possible side effects of --enable-fhs and cfe_internal_update_policy_python_symlink

"'Nick Anderson' via help-cfengine" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
I Guess it would need to be separate promises. One to filter if sys.bindir 
is as expected (/var/cfengine/bin) one to not filter if it's not. I don't 
think we can do it in a single statement since we don't have a function 
like ifelse() that returns a list.

That protection filtering /var/cfengine/bin from the paths when looking up 
the symlink was added for a reason, I am hesitant to think it should be 
reverted.


On Friday, February 3, 2023 at 12:44:22 PM UTC-6 [email protected] wrote:

>
> Hi Nick,
>
> thanks for your quick response.
> I applied the change from the PR and it seems to be working well.
>
> Do you have an opinion about my proposal for the other problem (that the 
> code currently doesn't look for python in /usr/bin)?
> I also just implemented my suggestion by reversing the commit that added 
> the filter for the path list and that seems to be working fine then, too.
>
> Regards,
> Moritz
> [email protected] schrieb am Freitag, 3. Februar 2023 um 17:39:11 
> UTC+1:
>
>> "mosc…@metalabs.de" <[email protected]> writes: 
>>
>> Does this problem seem valid? 
>>>
>> MM, yeah, that's a valid issue. https://tracker.mender.io/browse/CFE-4146 
>>
>> Seems to me like it would make sense to scope the cleanup of the python 
>> symlink to more tightly target the expected context where $(sys.bindir) 
>> = /var/cfengine/bin. 
>>
>> Perhaps something like: 
>>
>> "$(sys.bindir)/python" -> { "CFE-3512", "CFE-4146" }
>>   delete => u_tidy,
>>   if => and( islink( "$(sys.bindir)/python" ),
>>              strcmp( "$(sys.bindir)", "/var/cfengine/bin")),
>>   comment => concat( "We don't want to leave a python that is potentially in $PATH ",
>>                      
>>
>> "after having re-named our python symlink that is used for various "
>>
>> ,
>>                      "modules. Additionally we want to be cautious that we don't delete ",
>>                      "system python symlinks in the event the binary was built for FHS.");
>>
>> https://github.com/cfengine/masterfiles/pull/2591 
>>
>> Please comment on the ticket and or the pull request as to how that works 
>> out for you. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/b7341cbe-2963-429b-b1d7-f1f3c34e2e84n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.