[v3] kas: Allow to define custom snapshot date

Message ID fa06bce8-8eb3-4a15-9787-7807bbecfee2@siemens.com
State Accepted, archived
Headers show
Series [v3] kas: Allow to define custom snapshot date | expand

Commit Message

Jan Kiszka Oct. 11, 2024, 5:34 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 v3:
 - tune wording of menu entry

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

Comments

Uladzimir Bely Oct. 14, 2024, 5:29 p.m. UTC | #1
On Fri, 2024-10-11 at 07:34 +0200, 'Jan Kiszka' via isar-users wrote:
> 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 v3:
>  - tune wording of menu entry
> 
>  kas/opt/Kconfig | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
> index 1e56c29f..b1b1ff16 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 "Timestamp of 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
> -- 
> 2.43.0
> 

Applied to next, thanks.

Patch

diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 1e56c29f..b1b1ff16 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 "Timestamp of 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