Message ID | 20230206121747.1633-1-venkata.pyla@toshiba-tsip.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [isar-cip-core] generate_rb_kas_file.sh: Add script to generate rb.yml | expand |
On 06.02.23 13:17, venkata.pyla@toshiba-tsip.com wrote: > From: venkata pyla <venkata.pyla@toshiba-tsip.com> > > This script helps to generate kas file on the fly for reproducible > builds that includes latest value of SOURCE_DATE_EPOCH value. > > Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com> > --- > scripts/generate_rb_kas_file.sh | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > create mode 100755 scripts/generate_rb_kas_file.sh > > diff --git a/scripts/generate_rb_kas_file.sh b/scripts/generate_rb_kas_file.sh > new file mode 100755 > index 0000000..cf0b030 > --- /dev/null > +++ b/scripts/generate_rb_kas_file.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > + > +# Generates kas file on the fly for reproducible builds with the > +# SOURCE_DATE_EPOCH value > + > + > +source_date_epoch=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)} Can't we resolve that via a bitbake function during the build? Then we do not need this script, just a kas/opt/reproducible-build.yml. Jan > + > +cat <<EOT > rb.yml > +header: > + version: 12 > + > +local_conf_header: > + reproducible-builds: | > + SOURCE_DATE_EPOCH = "$source_date_epoch" > +EOT > +
>-----Original Message----- >From: Jan Kiszka <jan.kiszka@siemens.com> >Sent: 06 February 2023 18:11 >To: pyla venkata(TSIP TMIEC ODG Porting) <Venkata.Pyla@toshiba- >tsip.com>; cip-dev@lists.cip-project.org >Cc: dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba- >tsip.com>; hayashi kazuhiro(林 和宏 □SWC◯ACT) ><kazuhiro3.hayashi@toshiba.co.jp> >Subject: Re: [isar-cip-core] generate_rb_kas_file.sh: Add script to generate >rb.yml > >On 06.02.23 13:17, venkata.pyla@toshiba-tsip.com wrote: >> From: venkata pyla <venkata.pyla@toshiba-tsip.com> >> >> This script helps to generate kas file on the fly for reproducible >> builds that includes latest value of SOURCE_DATE_EPOCH value. >> >> Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com> >> --- >> scripts/generate_rb_kas_file.sh | 17 +++++++++++++++++ >> 1 file changed, 17 insertions(+) >> create mode 100755 scripts/generate_rb_kas_file.sh >> >> diff --git a/scripts/generate_rb_kas_file.sh >> b/scripts/generate_rb_kas_file.sh new file mode 100755 index >> 0000000..cf0b030 >> --- /dev/null >> +++ b/scripts/generate_rb_kas_file.sh >> @@ -0,0 +1,17 @@ >> +#!/bin/bash >> + >> +# Generates kas file on the fly for reproducible builds with the # >> +SOURCE_DATE_EPOCH value >> + >> + >> +source_date_epoch=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)} > >Can't we resolve that via a bitbake function during the build? Then we do not >need this script, just a kas/opt/reproducible-build.yml. I want to check this approach, but really don't know how to do this, tried below and gives syntax error SOURCE_DATE_EPOCH = "${@bb.process.run(git log -1 --pretty=%ct)}" Any references that would help me to achieve this? Thanks. > >Jan > >> + >> +cat <<EOT > rb.yml >> +header: >> + version: 12 >> + >> +local_conf_header: >> + reproducible-builds: | >> + SOURCE_DATE_EPOCH = "$source_date_epoch" >> +EOT >> + > >-- >Siemens AG, Technology >Competence Center Embedded Linux
diff --git a/scripts/generate_rb_kas_file.sh b/scripts/generate_rb_kas_file.sh new file mode 100755 index 0000000..cf0b030 --- /dev/null +++ b/scripts/generate_rb_kas_file.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Generates kas file on the fly for reproducible builds with the +# SOURCE_DATE_EPOCH value + + +source_date_epoch=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)} + +cat <<EOT > rb.yml +header: + version: 12 + +local_conf_header: + reproducible-builds: | + SOURCE_DATE_EPOCH = "$source_date_epoch" +EOT +