[v2,1/1] fix: package exceptions for distro versions

Message ID 20240326093919.1847049-1-adriaan.schmidt@siemens.com
State Accepted, archived
Headers show
Series [v2,1/1] fix: package exceptions for distro versions | expand

Commit Message

Schmidt, Adriaan March 26, 2024, 9:39 a.m. UTC
We have some cases of changing package names (originally between bullseye
and bookworm), which were solved by adding explicit exceptions for bookworm.

This cleans that up:
- assume bookworm is the default
- define exceptions for bullseye and buster (making it easier to find them
  once those versions are dropped)

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/conf/distro/debian-common.conf         | 6 +++---
 meta/recipes-kernel/kselftest/kselftest.inc | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Uladzimir Bely April 5, 2024, 9:18 a.m. UTC | #1
On Tue, 2024-03-26 at 10:39 +0100, 'Adriaan Schmidt' via isar-users
wrote:
> We have some cases of changing package names (originally between
> bullseye
> and bookworm), which were solved by adding explicit exceptions for
> bookworm.
> 
> This cleans that up:
> - assume bookworm is the default
> - define exceptions for bullseye and buster (making it easier to find
> them
>   once those versions are dropped)
> 
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
>  meta/conf/distro/debian-common.conf         | 6 +++---
>  meta/recipes-kernel/kselftest/kselftest.inc | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/conf/distro/debian-common.conf
> b/meta/conf/distro/debian-common.conf
> index 1e1dfc83..5c7a98d9 100644
> --- a/meta/conf/distro/debian-common.conf
> +++ b/meta/conf/distro/debian-common.conf
> @@ -33,9 +33,9 @@ GRUB_DEBIAN_SB_MOK:amd64 = "shim-helpers-amd64-
> signed"
>  
>  SYSLINUX_BOOTLOADER_INSTALL = "syslinux syslinux-common"
>  
> -SYSTEMD_BOOTLOADER_INSTALL = "systemd:${DISTRO_ARCH}"
> -SYSTEMD_BOOTLOADER_INSTALL:bookworm = "systemd-boot-
> efi:${DISTRO_ARCH}"
> -SYSTEMD_BOOTLOADER_INSTALL:sid = "systemd-boot-efi:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL = "systemd-boot-efi:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL:bullseye = "systemd:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL:buster = "systemd:${DISTRO_ARCH}"
>  

The similar fallback is needed for ubuntu images (ubuntu-common.conf):

SYSTEMD_BOOTLOADER_INSTALL:focal = "systemd:${DISTRO_ARCH}"
SYSTEMD_BOOTLOADER_INSTALL:jammy = "systemd:${DISTRO_ARCH}"

Distros newer than Jammy include systemd-boot-efi package, so when we
add Ubuntu Nobble it won't require such kind of redefinition.

Current patch doesn't break building 'isar-image-base" since we use
Grub by default. But "isar-image-ci" build gets broken since we replace
grub with systemd bootloader in the image recipe.

I think to send the fix for isar-image-ci separately, together with
some kas-related changes (with support this image and meta-test layer)
I used to debug failing CI issue when PATCH v2 is applied.

So, there is no need in PATCH v3 of the patch.


>  COMPAT_DISTRO_ARCH:amd64 = "i386"
>  COMPAT_DISTRO_ARCH:arm64 = "armhf"
> diff --git a/meta/recipes-kernel/kselftest/kselftest.inc
> b/meta/recipes-kernel/kselftest/kselftest.inc
> index 6196f825..95dece10 100644
> --- a/meta/recipes-kernel/kselftest/kselftest.inc
> +++ b/meta/recipes-kernel/kselftest/kselftest.inc
> @@ -20,7 +20,7 @@ DEBIAN_BUILD_DEPENDS ?= " \
>      rsync, \
>      flex,  \
>      bison, \
> -    ${@ 'fuse3' if d.getVar('BASE_DISTRO_CODENAME') == 'bookworm'
> else 'fuse'}, \
> +    ${@ 'fuse' if d.getVar('BASE_DISTRO_CODENAME') in ['bullseye',
> 'buster'] else 'fuse3'}, \
>      libelf-dev:native, \
>      libcap-ng-dev:native, \
>      libpopt-dev:native, \
> -- 
> 2.30.2
>
Uladzimir Bely April 11, 2024, 4:52 a.m. UTC | #2
On Tue, 2024-03-26 at 10:39 +0100, 'Adriaan Schmidt' via isar-users
wrote:
> We have some cases of changing package names (originally between
> bullseye
> and bookworm), which were solved by adding explicit exceptions for
> bookworm.
> 
> This cleans that up:
> - assume bookworm is the default
> - define exceptions for bullseye and buster (making it easier to find
> them
>   once those versions are dropped)
> 
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
>  meta/conf/distro/debian-common.conf         | 6 +++---
>  meta/recipes-kernel/kselftest/kselftest.inc | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/conf/distro/debian-common.conf
> b/meta/conf/distro/debian-common.conf
> index 1e1dfc83..5c7a98d9 100644
> --- a/meta/conf/distro/debian-common.conf
> +++ b/meta/conf/distro/debian-common.conf
> @@ -33,9 +33,9 @@ GRUB_DEBIAN_SB_MOK:amd64 = "shim-helpers-amd64-
> signed"
>  
>  SYSLINUX_BOOTLOADER_INSTALL = "syslinux syslinux-common"
>  
> -SYSTEMD_BOOTLOADER_INSTALL = "systemd:${DISTRO_ARCH}"
> -SYSTEMD_BOOTLOADER_INSTALL:bookworm = "systemd-boot-
> efi:${DISTRO_ARCH}"
> -SYSTEMD_BOOTLOADER_INSTALL:sid = "systemd-boot-efi:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL = "systemd-boot-efi:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL:bullseye = "systemd:${DISTRO_ARCH}"
> +SYSTEMD_BOOTLOADER_INSTALL:buster = "systemd:${DISTRO_ARCH}"
>  
>  COMPAT_DISTRO_ARCH:amd64 = "i386"
>  COMPAT_DISTRO_ARCH:arm64 = "armhf"
> diff --git a/meta/recipes-kernel/kselftest/kselftest.inc
> b/meta/recipes-kernel/kselftest/kselftest.inc
> index 6196f825..95dece10 100644
> --- a/meta/recipes-kernel/kselftest/kselftest.inc
> +++ b/meta/recipes-kernel/kselftest/kselftest.inc
> @@ -20,7 +20,7 @@ DEBIAN_BUILD_DEPENDS ?= " \
>      rsync, \
>      flex,  \
>      bison, \
> -    ${@ 'fuse3' if d.getVar('BASE_DISTRO_CODENAME') == 'bookworm'
> else 'fuse'}, \
> +    ${@ 'fuse' if d.getVar('BASE_DISTRO_CODENAME') in ['bullseye',
> 'buster'] else 'fuse3'}, \
>      libelf-dev:native, \
>      libcap-ng-dev:native, \
>      libpopt-dev:native, \
> -- 
> 2.30.2
> 

Applied to next, thanks.

Patch

diff --git a/meta/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
index 1e1dfc83..5c7a98d9 100644
--- a/meta/conf/distro/debian-common.conf
+++ b/meta/conf/distro/debian-common.conf
@@ -33,9 +33,9 @@  GRUB_DEBIAN_SB_MOK:amd64 = "shim-helpers-amd64-signed"
 
 SYSLINUX_BOOTLOADER_INSTALL = "syslinux syslinux-common"
 
-SYSTEMD_BOOTLOADER_INSTALL = "systemd:${DISTRO_ARCH}"
-SYSTEMD_BOOTLOADER_INSTALL:bookworm = "systemd-boot-efi:${DISTRO_ARCH}"
-SYSTEMD_BOOTLOADER_INSTALL:sid = "systemd-boot-efi:${DISTRO_ARCH}"
+SYSTEMD_BOOTLOADER_INSTALL = "systemd-boot-efi:${DISTRO_ARCH}"
+SYSTEMD_BOOTLOADER_INSTALL:bullseye = "systemd:${DISTRO_ARCH}"
+SYSTEMD_BOOTLOADER_INSTALL:buster = "systemd:${DISTRO_ARCH}"
 
 COMPAT_DISTRO_ARCH:amd64 = "i386"
 COMPAT_DISTRO_ARCH:arm64 = "armhf"
diff --git a/meta/recipes-kernel/kselftest/kselftest.inc b/meta/recipes-kernel/kselftest/kselftest.inc
index 6196f825..95dece10 100644
--- a/meta/recipes-kernel/kselftest/kselftest.inc
+++ b/meta/recipes-kernel/kselftest/kselftest.inc
@@ -20,7 +20,7 @@  DEBIAN_BUILD_DEPENDS ?= " \
     rsync, \
     flex,  \
     bison, \
-    ${@ 'fuse3' if d.getVar('BASE_DISTRO_CODENAME') == 'bookworm' else 'fuse'}, \
+    ${@ 'fuse' if d.getVar('BASE_DISTRO_CODENAME') in ['bullseye', 'buster'] else 'fuse3'}, \
     libelf-dev:native, \
     libcap-ng-dev:native, \
     libpopt-dev:native, \