On 20.11.23 14:31, MOESSBAUER, Felix wrote:
> On Mon, 2023-11-20 at 11:07 +0100, 'Jörg Sommer' via kas-devel wrote:
>> On 17.11.23 13:13, Jan Kiszka wrote:
>>> On 17.11.23 11:50, 'Jörg Sommer' via kas-devel wrote:
>>>> Hi,
>>>>
>>>> I have to fetch the source for a Yocto recipe from a self-signed
>>>> webserver. How can I add the certificate to the trusted
>>>> certificate
>>>> store in the container started by kas-container?
>>>>
>>>
>>> This specific use case has not been addressed yet, but it is
>>> conceptually close to ssh. We could add a switch to bind-mount the
>>> host's cert folder into the container. Not sure if that folder is
>>> standardized over all distros, though. If not, we would have to
>>> make the
>>> path an argument.
>>
>> Would it be possible to add an option `--pre-code …` to supply any
>> shell
>> code that gets executed by *container-entrypoint* before `exec kas`?
>
> Hi Jörg,
>
> for me, this interface looks a bit too generic.
It's not so uncommon to have hook in some stages where you can inject code.
> In general, the kas-container should be a slim wrapper around KAS to
> run the build in an well-defined, stable and isolated environment. By
> that, it is also discouraged to wrap the kas-container script in
> another script.
Unfortunately, kas-container is not very alias friendly to make the
usage convenient. The most disturbing is the config file parameter *at
the end* that is used sometimes and sometime not (menu). And sometimes
other parameters follow this config file parameter, and sometime not.
An option -c would make it possible to have aliases like
alias kc_dev='./kas-container -c dev-settings.yaml'
I've also extended my wrapper with some tools to work with the container
from outside; like find-ipk, console-log, list-logs, cd-src, runqemu.
Good tools offer some mechanism for extension, think of git aliases.
> With support for the pre-code option, I already see
> people adding a ton of commands there to modify the build environment,
> which makes the builds less portable.
But isn't it up to the user to care about what he does? A knife can be
used in good and in bad ways. But it's not the responsibility of the
cutler, what happens with the knife.