[v2] kas: Allow to define custom snapshot date

Message ID 0eeb5f86-30b7-4904-986a-e57ac9203cc2@siemens.com
State Superseded, archived
Headers show
Series [v2] kas: Allow to define custom snapshot date | expand

Commit Message

Jan Kiszka Oct. 10, 2024, 4:45 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Currently very useful for building constantly broken riscv via sid. The
default value is actually a known-to-work one, taken from isar-cip-core.

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

Changes in v2:
 - base on ISAR_APT_SNAPSHOT_DATE patch

Depends on https://patchwork.isar-build.org/project/isar/patch/20241007122709.215901-1-alexander.heinisch@siemens.com/

 kas/opt/Kconfig | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Comments

alexander.heinisch Oct. 10, 2024, 4:26 p.m. UTC | #1
> Currently very useful for building constantly broken riscv via sid. The default value is actually a known-to-work one, taken from isar-cip-core.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Changes in v2:
>  - base on ISAR_APT_SNAPSHOT_DATE patch
>
> Depends on https://patchwork.isar-build.org/project/isar/patch/20241007122709.215901-1-alexander.heinisch@siemens.com/
>
>  kas/opt/Kconfig | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig index 1e56c29f..b29a25e5 100644
> --- a/kas/opt/Kconfig
> +++ b/kas/opt/Kconfig
> @@ -44,7 +44,25 @@ config USE_APT_SNAPSHOT
>       bool "Use the distros snapshot mirror"
>       depends on !MIRROR_DEBIAN && (DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM || DEBIAN_TRIXIE || DEBIAN_SID || UBUNTU_FOCAL || UBUNTU_JAMMY)
>       help
> -             Use a snapshot mirror for the selected distribution. The date is defined by ISAR_APT_SNAPSHOT_DATE.
> +             Use a snapshot mirror for the selected distribution.
> +
> +choice
> +     prompt "Snapshot date"
> +     depends on USE_APT_SNAPSHOT
> +     default APT_SNAPSHOT_GIT_DATE
> +
> +config APT_SNAPSHOT_GIT_DATE
> +     bool "Latest git commit"

"Use timestamp of latest git commit"

BR Alexander

Patch

diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 1e56c29f..b29a25e5 100644
--- a/kas/opt/Kconfig
+++ b/kas/opt/Kconfig
@@ -44,7 +44,25 @@  config USE_APT_SNAPSHOT
 	bool "Use the distros snapshot mirror"
 	depends on !MIRROR_DEBIAN && (DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM || DEBIAN_TRIXIE || DEBIAN_SID || UBUNTU_FOCAL || UBUNTU_JAMMY)
 	help
-		Use a snapshot mirror for the selected distribution. The date is defined by ISAR_APT_SNAPSHOT_DATE.
+		Use a snapshot mirror for the selected distribution.
+
+choice
+	prompt "Snapshot date"
+	depends on USE_APT_SNAPSHOT
+	default APT_SNAPSHOT_GIT_DATE
+
+config APT_SNAPSHOT_GIT_DATE
+	bool "Latest git commit"
+
+config APT_SNAPSHOT_CUSTOM_DATE
+	bool "Custom date"
+
+endchoice
+
+config ISAR_APT_SNAPSHOT_DATE
+	string "Custom snapshot date"
+	depends on APT_SNAPSHOT_CUSTOM_DATE
+	default "20240211T000000Z"
 
 config KAS_INCLUDE_APT_SNAPSHOT
 	string