diff mbox series

[isar-cip-core,v4] Update ISAR to latest version

Message ID 3f91291f-7e40-4060-b66a-90a135bb6015@siemens.com (mailing list archive)
State Superseded
Headers show
Series [isar-cip-core,v4] Update ISAR to latest version | expand

Commit Message

Jan Kiszka May 10, 2024, 11:19 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This update requires to resolve duplicate "Provides:" statements in
secrets/certificates recipes (based on original patch by Rakesh Kumar).

We furthermore need to drop the now obsolete SOURCE_DATE_EPOCH variable
injection in squashfs.bbclass and define SOURCE_DATE_EPOCH_FALLBACK,
rather than SOURCE_DATE_EPOCH directly as this is now handled by isar
itself.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v4:
 - bump isar to include required fixes
 - fix DEBIAN_PROVIDES
 - address SOURCE_DATE_EPOCH changes

 classes/squashfs.bbclass                                    | 6 ------
 kas-cip.yml                                                 | 4 ++--
 .../secure-boot-secrets/secure-boot-secrets.inc             | 4 +---
 .../swupdate-certificates/swupdate-certificates-key.inc     | 4 +---
 .../swupdate-certificates/swupdate-certificates.inc         | 4 +---
 5 files changed, 5 insertions(+), 17 deletions(-)

Comments

Felix Moessbauer May 10, 2024, 12:15 p.m. UTC | #1
On Fri, 2024-05-10 at 13:19 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This update requires to resolve duplicate "Provides:" statements in
> secrets/certificates recipes (based on original patch by Rakesh
> Kumar).
> 
> We furthermore need to drop the now obsolete SOURCE_DATE_EPOCH
> variable
> injection in squashfs.bbclass and define SOURCE_DATE_EPOCH_FALLBACK,
> rather than SOURCE_DATE_EPOCH directly as this is now handled by isar
> itself.

Thanks for refactoring this.

Acked-by: Felix Moessbauer <felix.moessbauer@siemens.com>

> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Changes in v4:
>  - bump isar to include required fixes
>  - fix DEBIAN_PROVIDES
>  - address SOURCE_DATE_EPOCH changes
> 
>  classes/squashfs.bbclass                                    | 6 ----
> --
>  kas-cip.yml                                                 | 4 ++--
>  .../secure-boot-secrets/secure-boot-secrets.inc             | 4 +---
>  .../swupdate-certificates/swupdate-certificates-key.inc     | 4 +---
>  .../swupdate-certificates/swupdate-certificates.inc         | 4 +---
>  5 files changed, 5 insertions(+), 17 deletions(-)
> 
> diff --git a/classes/squashfs.bbclass b/classes/squashfs.bbclass
> index bf72133e..b39be0cd 100644
> --- a/classes/squashfs.bbclass
> +++ b/classes/squashfs.bbclass
> @@ -31,12 +31,6 @@ SQUASHFS_MEMLIMIT ?= "${@int(get_free_mem() *
> 3/4)}"
>  SQUASHFS_CREATION_LIMITS = "-mem ${SQUASHFS_MEMLIMIT} -processors
> ${SQUASHFS_THREADS}"
>  
>  python __anonymous() {
> -    # Set file timestamps for reproducible builds
> -    source_date_epoch = d.getVar('SOURCE_DATE_EPOCH')
> -    if source_date_epoch:
> -        args = " -fstime {time}".format(time=source_date_epoch)
> -        d.appendVar('SQUASHFS_CREATION_ARGS', args)
> -
>      exclude_directories = d.getVar('SQUASHFS_EXCLUDE_DIRS').split()
>      if len(exclude_directories) == 0:
>          return
> diff --git a/kas-cip.yml b/kas-cip.yml
> index 2c3c8b0b..52e53061 100644
> --- a/kas-cip.yml
> +++ b/kas-cip.yml
> @@ -22,7 +22,7 @@ repos:
>  
>    isar:
>      url: https://github.com/ilbers/isar.git
> -    commit: 9dc362cd7115074c0f60843e687ed89db5c9339a
> +    commit: 3d863aad5e12c7bef382cb6fb3f1f5e18b236156
>      layers:
>        meta:
>  
> @@ -42,7 +42,7 @@ local_conf_header:
>      USER_root[password] = "root"
>      USER_root[flags] = "clear-text-password"
>    source_epoch: |
> -    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-
> core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
> +    SOURCE_DATE_EPOCH_FALLBACK := "${@bb.process.run("git -C
> ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
>  
>  env:
>    DISTRO_APT_PREMIRRORS: ""
> diff --git a/recipes-devtools/secure-boot-secrets/secure-boot-
> secrets.inc b/recipes-devtools/secure-boot-secrets/secure-boot-
> secrets.inc
> index 2164b121..f11e93d2 100644
> --- a/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc
> +++ b/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc
> @@ -14,6 +14,7 @@ inherit dpkg-raw
>  DPKG_ARCH = "all"
>  DEBIAN_MULTI_ARCH = "foreign"
>  PROVIDES += "secure-boot-secrets"
> +DEBIAN_PROVIDES = "secure-boot-secrets"
>  
>  SB_KEY ??= ""
>  SB_CERT ??= ""
> @@ -31,6 +32,3 @@ do_install() {
>      install -m 0700 ${WORKDIR}/${SB_CERT} ${TARGET}/secure-boot.pem
>  }
>  
> -do_prepare_build:append() {
> -    echo "Provides: secure-boot-secrets" >> ${S}/debian/control
> -}
> diff --git a/recipes-devtools/swupdate-certificates/swupdate-
> certificates-key.inc b/recipes-devtools/swupdate-
> certificates/swupdate-certificates-key.inc
> index 944c2dce..93cf255e 100644
> --- a/recipes-devtools/swupdate-certificates/swupdate-certificates-
> key.inc
> +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-
> key.inc
> @@ -15,6 +15,7 @@ FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
>  
>  DPKG_ARCH = "all"
>  PROVIDES += "swupdate-certificates-key"
> +DEBIAN_PROVIDES = "swupdate-certificates-key"
>  
>  SWU_SIGN_KEY ??= ""
>  SWU_SIGN_SCRIPT ??= "sign-swu-cms"
> @@ -35,6 +36,3 @@ do_install() {
>      install -m 0600 ${WORKDIR}/${SWU_SIGN_KEY} ${TARGET}/swupdate-
> sign.key
>  }
>  
> -do_prepare_build:append() {
> -    echo "Provides: swupdate-certificates-key" >>
> ${S}/debian/control
> -}
> diff --git a/recipes-devtools/swupdate-certificates/swupdate-
> certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-
> certificates.inc
> index dec9a836..2532de6d 100644
> --- a/recipes-devtools/swupdate-certificates/swupdate-
> certificates.inc
> +++ b/recipes-devtools/swupdate-certificates/swupdate-
> certificates.inc
> @@ -16,6 +16,7 @@ FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
>  DPKG_ARCH = "all"
>  DEBIAN_MULTI_ARCH = "foreign"
>  PROVIDES += "swupdate-certificates"
> +DEBIAN_PROVIDES = "swupdate-certificates"
>  
>  SWU_SIGN_CERT ??= ""
>  
> @@ -30,6 +31,3 @@ do_install() {
>      install -m 0700 ${WORKDIR}/${SWU_SIGN_CERT} ${TARGET}/swupdate-
> sign.crt
>  }
>  
> -do_prepare_build:append() {
> -    echo "Provides: swupdate-certificates" >> ${S}/debian/control
> -}
diff mbox series

Patch

diff --git a/classes/squashfs.bbclass b/classes/squashfs.bbclass
index bf72133e..b39be0cd 100644
--- a/classes/squashfs.bbclass
+++ b/classes/squashfs.bbclass
@@ -31,12 +31,6 @@  SQUASHFS_MEMLIMIT ?= "${@int(get_free_mem() * 3/4)}"
 SQUASHFS_CREATION_LIMITS = "-mem ${SQUASHFS_MEMLIMIT} -processors ${SQUASHFS_THREADS}"
 
 python __anonymous() {
-    # Set file timestamps for reproducible builds
-    source_date_epoch = d.getVar('SOURCE_DATE_EPOCH')
-    if source_date_epoch:
-        args = " -fstime {time}".format(time=source_date_epoch)
-        d.appendVar('SQUASHFS_CREATION_ARGS', args)
-
     exclude_directories = d.getVar('SQUASHFS_EXCLUDE_DIRS').split()
     if len(exclude_directories) == 0:
         return
diff --git a/kas-cip.yml b/kas-cip.yml
index 2c3c8b0b..52e53061 100644
--- a/kas-cip.yml
+++ b/kas-cip.yml
@@ -22,7 +22,7 @@  repos:
 
   isar:
     url: https://github.com/ilbers/isar.git
-    commit: 9dc362cd7115074c0f60843e687ed89db5c9339a
+    commit: 3d863aad5e12c7bef382cb6fb3f1f5e18b236156
     layers:
       meta:
 
@@ -42,7 +42,7 @@  local_conf_header:
     USER_root[password] = "root"
     USER_root[flags] = "clear-text-password"
   source_epoch: |
-    SOURCE_DATE_EPOCH := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
+    SOURCE_DATE_EPOCH_FALLBACK := "${@bb.process.run("git -C ${LAYERDIR_cip-core} log -1 --pretty=%ct | tr -d '\n'")[0]}"
 
 env:
   DISTRO_APT_PREMIRRORS: ""
diff --git a/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc b/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc
index 2164b121..f11e93d2 100644
--- a/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc
+++ b/recipes-devtools/secure-boot-secrets/secure-boot-secrets.inc
@@ -14,6 +14,7 @@  inherit dpkg-raw
 DPKG_ARCH = "all"
 DEBIAN_MULTI_ARCH = "foreign"
 PROVIDES += "secure-boot-secrets"
+DEBIAN_PROVIDES = "secure-boot-secrets"
 
 SB_KEY ??= ""
 SB_CERT ??= ""
@@ -31,6 +32,3 @@  do_install() {
     install -m 0700 ${WORKDIR}/${SB_CERT} ${TARGET}/secure-boot.pem
 }
 
-do_prepare_build:append() {
-    echo "Provides: secure-boot-secrets" >> ${S}/debian/control
-}
diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
index 944c2dce..93cf255e 100644
--- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
+++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
@@ -15,6 +15,7 @@  FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
 
 DPKG_ARCH = "all"
 PROVIDES += "swupdate-certificates-key"
+DEBIAN_PROVIDES = "swupdate-certificates-key"
 
 SWU_SIGN_KEY ??= ""
 SWU_SIGN_SCRIPT ??= "sign-swu-cms"
@@ -35,6 +36,3 @@  do_install() {
     install -m 0600 ${WORKDIR}/${SWU_SIGN_KEY} ${TARGET}/swupdate-sign.key
 }
 
-do_prepare_build:append() {
-    echo "Provides: swupdate-certificates-key" >> ${S}/debian/control
-}
diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
index dec9a836..2532de6d 100644
--- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
+++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
@@ -16,6 +16,7 @@  FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
 DPKG_ARCH = "all"
 DEBIAN_MULTI_ARCH = "foreign"
 PROVIDES += "swupdate-certificates"
+DEBIAN_PROVIDES = "swupdate-certificates"
 
 SWU_SIGN_CERT ??= ""
 
@@ -30,6 +31,3 @@  do_install() {
     install -m 0700 ${WORKDIR}/${SWU_SIGN_CERT} ${TARGET}/swupdate-sign.crt
 }
 
-do_prepare_build:append() {
-    echo "Provides: swupdate-certificates" >> ${S}/debian/control
-}