diff mbox series

[isar-cip-core,1/1] Revert "kas/opt/reproducible.yml: Move SOURCE_DATE_EPOCH to layer.conf"

Message ID 20240405064757.378647-1-felix.moessbauer@siemens.com (mailing list archive)
State Rejected
Headers show
Series [isar-cip-core,1/1] Revert "kas/opt/reproducible.yml: Move SOURCE_DATE_EPOCH to layer.conf" | expand

Commit Message

MOESSBAUER, Felix April 5, 2024, 6:47 a.m. UTC
This change is too invasive. The layer.conf is read after the local
conf. By that, there is no way for a downstream user to set it to a
different value.

This reverts commit fcdbec9d2ab1daebd19e021c2b90ed30d0eeae00.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 conf/layer.conf          | 2 --
 kas/opt/reproducible.yml | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Jan Kiszka April 5, 2024, 5:48 p.m. UTC | #1
On 05.04.24 08:47, Felix Moessbauer wrote:
> This change is too invasive. The layer.conf is read after the local
> conf. By that, there is no way for a downstream user to set it to a
> different value.
> 
> This reverts commit fcdbec9d2ab1daebd19e021c2b90ed30d0eeae00.
> 
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  conf/layer.conf          | 2 --
>  kas/opt/reproducible.yml | 1 +
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/conf/layer.conf b/conf/layer.conf
> index 82b4084..2c888b2 100644
> --- a/conf/layer.conf
> +++ b/conf/layer.conf
> @@ -24,5 +24,3 @@ LAYERDIR_cip-core = "${LAYERDIR}"
>  LAYERDIR_cip-core[vardepvalue] = "isar-cip-core"
>  
>  IMAGE_CLASSES += "squashfs verity swupdate"
> -
> -SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
> diff --git a/kas/opt/reproducible.yml b/kas/opt/reproducible.yml
> index bc71f28..5d6a896 100644
> --- a/kas/opt/reproducible.yml
> +++ b/kas/opt/reproducible.yml
> @@ -13,4 +13,5 @@ header:
>  
>  local_conf_header:
>    reproducible-builds: |
> +    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>      WIC_DEPLOY_PARTITIONS = "1"

Let's fix the issue, rather than rolling back to conditional
reproducibility. You could move the SOURCE_DATE_EPOCH assignment to
kas-cip.yml, e.g.

Jan
Gylstorff Quirin April 8, 2024, 7:02 a.m. UTC | #2
On 4/5/24 7:48 PM, Jan Kiszka wrote:
> On 05.04.24 08:47, Felix Moessbauer wrote:
>> This change is too invasive. The layer.conf is read after the local
>> conf. By that, there is no way for a downstream user to set it to a
>> different value.
>>
>> This reverts commit fcdbec9d2ab1daebd19e021c2b90ed30d0eeae00.
>>
>> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
>> ---
>>   conf/layer.conf          | 2 --
>>   kas/opt/reproducible.yml | 1 +
>>   2 files changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/conf/layer.conf b/conf/layer.conf
>> index 82b4084..2c888b2 100644
>> --- a/conf/layer.conf
>> +++ b/conf/layer.conf
>> @@ -24,5 +24,3 @@ LAYERDIR_cip-core = "${LAYERDIR}"
>>   LAYERDIR_cip-core[vardepvalue] = "isar-cip-core"
>>   
>>   IMAGE_CLASSES += "squashfs verity swupdate"
>> -
>> -SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>> diff --git a/kas/opt/reproducible.yml b/kas/opt/reproducible.yml
>> index bc71f28..5d6a896 100644
>> --- a/kas/opt/reproducible.yml
>> +++ b/kas/opt/reproducible.yml
>> @@ -13,4 +13,5 @@ header:
>>   
>>   local_conf_header:
>>     reproducible-builds: |
>> +    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>>       WIC_DEPLOY_PARTITIONS = "1"
> 
> Let's fix the issue, rather than rolling back to conditional
> reproducibility. You could move the SOURCE_DATE_EPOCH assignment to
> kas-cip.yml, e.g.


Also since we had multiple issues with variables in layer.conf we should 
maybe we should not let layer conf set any build related variables.
E.g. IMAGE_CLASSES

Quirin
> 
> Jan
>
MOESSBAUER, Felix April 8, 2024, 7:16 a.m. UTC | #3
On Mon, 2024-04-08 at 09:02 +0200, Gylstorff Quirin wrote:
> 
> 
> On 4/5/24 7:48 PM, Jan Kiszka wrote:
> > On 05.04.24 08:47, Felix Moessbauer wrote:
> > > This change is too invasive. The layer.conf is read after the
> > > local
> > > conf. By that, there is no way for a downstream user to set it to
> > > a
> > > different value.
> > > 
> > > This reverts commit fcdbec9d2ab1daebd19e021c2b90ed30d0eeae00.
> > > 
> > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > > ---
> > >   conf/layer.conf          | 2 --
> > >   kas/opt/reproducible.yml | 1 +
> > >   2 files changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/conf/layer.conf b/conf/layer.conf
> > > index 82b4084..2c888b2 100644
> > > --- a/conf/layer.conf
> > > +++ b/conf/layer.conf
> > > @@ -24,5 +24,3 @@ LAYERDIR_cip-core = "${LAYERDIR}"
> > >   LAYERDIR_cip-core[vardepvalue] = "isar-cip-core"
> > >   
> > >   IMAGE_CLASSES += "squashfs verity swupdate"
> > > -
> > > -SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-
> > > core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
> > > diff --git a/kas/opt/reproducible.yml b/kas/opt/reproducible.yml
> > > index bc71f28..5d6a896 100644
> > > --- a/kas/opt/reproducible.yml
> > > +++ b/kas/opt/reproducible.yml
> > > @@ -13,4 +13,5 @@ header:
> > >   
> > >   local_conf_header:
> > >     reproducible-builds: |
> > > +    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C
> > > ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
> > >       WIC_DEPLOY_PARTITIONS = "1"
> > 
> > Let's fix the issue, rather than rolling back to conditional
> > reproducibility. You could move the SOURCE_DATE_EPOCH assignment to
> > kas-cip.yml, e.g.
> 
> 
> Also since we had multiple issues with variables in layer.conf we
> should 
> maybe we should not let layer conf set any build related variables.
> E.g. IMAGE_CLASSES

The IMAGE_CLASSES is fine IMHO, as this is non-invasive (at least it
should be). However, the SOURCE_DATE_EPOCH as this IS invasive and pins
all downstream layers the one defined by CIP.

@Quirin: As Jan prefers to not revert this patch, would you take over
and redesign this?

Felix

> 
> Quirin
> > 
> > Jan
> >
Gylstorff Quirin April 8, 2024, 7:58 a.m. UTC | #4
On 4/8/24 9:16 AM, Moessbauer, Felix (T CED OES-DE) wrote:
> On Mon, 2024-04-08 at 09:02 +0200, Gylstorff Quirin wrote:
>>
>>
>> On 4/5/24 7:48 PM, Jan Kiszka wrote:
>>> On 05.04.24 08:47, Felix Moessbauer wrote:
>>>> This change is too invasive. The layer.conf is read after the
>>>> local
>>>> conf. By that, there is no way for a downstream user to set it to
>>>> a
>>>> different value.
>>>>
>>>> This reverts commit fcdbec9d2ab1daebd19e021c2b90ed30d0eeae00.
>>>>
>>>> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
>>>> ---
>>>>    conf/layer.conf          | 2 --
>>>>    kas/opt/reproducible.yml | 1 +
>>>>    2 files changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/conf/layer.conf b/conf/layer.conf
>>>> index 82b4084..2c888b2 100644
>>>> --- a/conf/layer.conf
>>>> +++ b/conf/layer.conf
>>>> @@ -24,5 +24,3 @@ LAYERDIR_cip-core = "${LAYERDIR}"
>>>>    LAYERDIR_cip-core[vardepvalue] = "isar-cip-core"
>>>>    
>>>>    IMAGE_CLASSES += "squashfs verity swupdate"
>>>> -
>>>> -SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-
>>>> core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>>>> diff --git a/kas/opt/reproducible.yml b/kas/opt/reproducible.yml
>>>> index bc71f28..5d6a896 100644
>>>> --- a/kas/opt/reproducible.yml
>>>> +++ b/kas/opt/reproducible.yml
>>>> @@ -13,4 +13,5 @@ header:
>>>>    
>>>>    local_conf_header:
>>>>      reproducible-builds: |
>>>> +    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C
>>>> ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>>>>        WIC_DEPLOY_PARTITIONS = "1"
>>>
>>> Let's fix the issue, rather than rolling back to conditional
>>> reproducibility. You could move the SOURCE_DATE_EPOCH assignment to
>>> kas-cip.yml, e.g.
>>
>>
>> Also since we had multiple issues with variables in layer.conf we
>> should
>> maybe we should not let layer conf set any build related variables.
>> E.g. IMAGE_CLASSES
> 
> The IMAGE_CLASSES is fine IMHO, as this is non-invasive (at least it
> should be). However, the SOURCE_DATE_EPOCH as this IS invasive and pins
> all downstream layers the one defined by CIP.

It is something we don't see in yocto layers.
> 
> @Quirin: As Jan prefers to not revert this patch, would you take over
> and redesign this?
Will do it.
Quirin

> 
> Felix
> 
>>
>> Quirin
>>>
>>> Jan
>>>
>
diff mbox series

Patch

diff --git a/conf/layer.conf b/conf/layer.conf
index 82b4084..2c888b2 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -24,5 +24,3 @@  LAYERDIR_cip-core = "${LAYERDIR}"
 LAYERDIR_cip-core[vardepvalue] = "isar-cip-core"
 
 IMAGE_CLASSES += "squashfs verity swupdate"
-
-SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
diff --git a/kas/opt/reproducible.yml b/kas/opt/reproducible.yml
index bc71f28..5d6a896 100644
--- a/kas/opt/reproducible.yml
+++ b/kas/opt/reproducible.yml
@@ -13,4 +13,5 @@  header:
 
 local_conf_header:
   reproducible-builds: |
+    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
     WIC_DEPLOY_PARTITIONS = "1"